lkml.org 
[lkml]   [2008]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 00/15] x86_64: Optimize percpu accesses
On Wed, 09 Jul 2008 13:00:19 -0700
ebiederm@xmission.com (Eric W. Biederman) wrote:

>
> I just took a quick look at how stack_protector works on x86_64.
> Unless there is some deep kernel magic that changes the segment
> register to %gs from the ABI specified %fs CC_STACKPROTECTOR is
> totally broken on x86_64. We access our pda through %gs.

and so does gcc in kernel mode.

>
> Further -fstack-protector-all only seems to detect against buffer
> overflows and thus corruption of the stack. Not stack overflows. So
> it doesn't appear especially useful.

stopping buffer overflows and other return address corruption is not
useful? Excuse me?

>
> So we don't we kill the broken CONFIG_CC_STACKPROTECTOR. Stop trying
> to figure out how to use a zero based percpu area.

So why don't we NOT do that and fix instead what you're trying to do?

>
> That should allow us to make the current pda a per cpu variable, and
> use %gs with a large offset to access the per cpu area.

and what does that gain us?


--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org


\
 
 \ /
  Last update: 2008-07-09 22:17    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site