lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 1 Nov 2017 03:40:22 -0700
From:   Andy Lutomirski <luto@...nel.org>
To:     Borislav Petkov <bp@...e.de>
Cc:     Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Brian Gerst <brgerst@...il.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 17/18] x86/asm/64: Remove thread_struct::sp0

On Wed, Nov 1, 2017 at 3:23 AM, Borislav Petkov <bp@...e.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@...nel.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.

Powered by blists - more mailing lists