lkml.org 
[lkml]   [2009]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:x86/asm] x86/i386: Make sure stack-protector segment base is cache aligned
On 09/03/09 14:15, H. Peter Anvin wrote:
> On 09/03/2009 01:45 PM, Jeremy Fitzhardinge wrote:
>
>> Two problems:
>>
>> * gcc generates %gs: references for stack-protector, but we use %fs
>> for percpu data (because restoring %fs is faster if it's a null
>> selector; TLS uses %gs). I guess we could use %fs if
>> !CONFIG_CC_STACKPROTECTOR, or %gs if we are using it (though that
>> has some fiddly ramifications for things like ptrace).
>>
> Well, by touching two segments we're getting the worst of both worlds,
> so at least assuming some significant number of real-world deployments
> use CC_STACKPROTECTOR, we really don't want to pessimize that case too much.
>

I'm assuming that stack-protector has fairly serious performance impact
anyway, so a bit of extra entry/exit cost is acceptable. But I agree
that there's no point in making it gratuitously bad.

J


\
 
 \ /
  Last update: 2009-09-03 23:31    [W:0.127 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site