Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 2 Aug 2017 09:56:32 -0700
From: Kees Cook <>
To: Thomas Garnier <>
Cc: "H. Peter Anvin" <>, Brian Gerst <>, 
	Herbert Xu <>, "David S . Miller" <>, 
	Thomas Gleixner <>, Ingo Molnar <>, 
	Peter Zijlstra <>, Josh Poimboeuf <>, 
	Arnd Bergmann <>, Matthias Kaehlcke <>, 
	Boris Ostrovsky <>, Juergen Gross <>, 
	Paolo Bonzini <>, Radim Krčmář <>, 
	Joerg Roedel <>, Andy Lutomirski <>, Borislav Petkov <>, 
	"Kirill A . Shutemov" <>, Borislav Petkov <>, 
	Christian Borntraeger <>, "Rafael J . Wysocki" <>, 
	Len Brown <>, Pavel Machek <>, Tejun Heo <>, 
	Christoph Lameter <>, Paul Gortmaker <>, 
	Chris Metcalf <>, "Paul E . McKenney" <>, 
	Andrew Morton <>, Christopher Li <>, 
	Dou Liyang <>, Masahiro Yamada <>, 
	Daniel Borkmann <>, Markus Trippelsdorf <>, 
	Peter Foley <>, Steven Rostedt <>, 
	Tim Chen <>, Ard Biesheuvel <>, 
	Catalin Marinas <>, Matthew Wilcox <>, 
	Michal Hocko <>, Rob Landley <>, Jiri Kosina <>, 
	"H . J . Lu" <>, Paul Bolle <>, Baoquan He <>, 
	Daniel Micay <>, "the arch/x86 maintainers" <>, 
	"" <>, 
	Linux Kernel Mailing List <>,, 
	kvm list <>, linux-pm <>, 
	linux-arch <>,, 
	Kernel Hardening <>
Subject: Re: [RFC 16/22] x86/percpu: Adapt percpu for PIE support

On Wed, Aug 2, 2017 at 9:42 AM, Thomas Garnier <> wrote:
> I noticed that not only we have the problem of gs:0x40 not being
> accessible. The compiler will default to the fs register if
> mcmodel=kernel is not set.
> On the next patch set, I am going to add support for
> -mstack-protector-guard=global so a global variable can be used
> instead of the segment register. Similar approach than ARM/ARM64.

While this is probably understood, I have to point out that this would
be a major regression for the stack protection on x86.

> Following this patch, I will work with gcc and llvm to add
> -mstack-protector-reg=<segment register> support similar to PowerPC.
> This way we can have gs used even without mcmodel=kernel. Once that's
> an option, I can setup the GDT as described in the previous email
> (similar to RFG).

It would be much nicer if we could teach gcc about the percpu area
instead. This would let us solve the global stack protector problem on
the other architectures:


Kees Cook
Pixel Security

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.