lkml.org 
[lkml]   [2017]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 17/18] x86/asm/64: Remove thread_struct::sp0
On Wed, Nov 1, 2017 at 3:23 AM, Borislav Petkov <bp@suse.de> wrote:
> On Thu, Oct 26, 2017 at 01:26:49AM -0700, Andy Lutomirski wrote:
>> On x86_64, we can easily calculate sp0 when needed instead of
>> storing it in thread_struct.
>>
>> On x86_32, a similar cleanup would be possible, but it would require
>> cleaning up the vm86 code first, and that can wait for a later
>> cleanup series.
>>
>> Signed-off-by: Andy Lutomirski <luto@kernel.org>
>
> ...
>
>> @@ -816,23 +825,6 @@ static inline void spin_lock_prefetch(const void *x)
>> .addr_limit = KERNEL_DS, \
>> }
>>
>> -/*
>> - * TOP_OF_KERNEL_STACK_PADDING reserves 8 bytes on top of the ring0 stack.
>> - * This is necessary to guarantee that the entire "struct pt_regs"
>> - * is accessible even if the CPU haven't stored the SS/ESP registers
>> - * on the stack (interrupt gate does not save these registers
>> - * when switching to the same priv ring).
>> - * Therefore beware: accessing the ss/esp fields of the
>> - * "struct pt_regs" is possible, but they may contain the
>> - * completely wrong values.
>> - */
>
> Why are we removing the explaination of TOP_OF_KERNEL_STACK_PADDING? Is
> that going to change later?

There's another nearly identical explanatory comment, so it seemed redundant.

\
 
 \ /
  Last update: 2017-11-01 11:41    [W:0.085 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site