lkml.org 
[lkml]   [2019]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v6 20/27] x86: Support global stack cookie
On Thu, Jan 31, 2019 at 11:29 AM Thomas Garnier <thgarnie@chromium.org> wrote:
>
> Add an off-by-default configuration option to use a global stack cookie
> instead of the default TLS. This configuration option will only be used
> with PIE binaries.
>
> For kernel stack cookie, the compiler uses the mcmodel=kernel to switch
> between the fs segment to gs segment. A PIE binary does not use
> mcmodel=kernel because it can be relocated anywhere, therefore the
> compiler will default to the fs segment register. This is fixed on the
> latest version of gcc.

I hate all these gcc-sucks-so-we-hack-it-and-change-nasty-semantics
options. How about just preventing use of both stack protector and
PIE unless the version of gcc in use is new enough.

Also, does -mstack-protector-guard-reg not solve this? See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81708. Or is there
another bug? Or are you worried about gcc versions that don't have
that feature yet?

\
 
 \ /
  Last update: 2019-02-01 20:28    [W:0.075 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site