Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1529582

Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot?

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot?
Date 2016-11-24 18:20 +0100
Message-ID <sH5QJ-5Hs-9@gated-at.bofh.it> (permalink)
References (2 earlier) <sFpTA-4UY-5@gated-at.bofh.it> <sFRd8-6zi-15@gated-at.bofh.it> <sG1ct-4DY-3@gated-at.bofh.it> <sG1Fw-4P0-9@gated-at.bofh.it> <sG4k1-6wK-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Nov 21, 2016 at 1:21 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Mon, Nov 21, 2016 at 10:26 AM, H. Peter Anvin <hpa@zytor.com> wrote:
>> On 11/21/16 10:00, Linus Torvalds wrote:
>>>
>>> I'd much rather we go back to just making the "cs" entry explicitly
>>> 16-bit, and have a separate padding entry, the way we used to long
>>> long ago.
>>>
>>
>> I would agree 100% with this.
>
> We _used_ to do it like this in some places (signal stack, other places):
>
>     unsigned short  cs, __csh;

I'm testing a patch to do exactly this.  I didn't bother with the
fancy anonymous union stuff because I don't see any great reason that
anything needs to write the high bits.

Amusingly, grsecurity seems to contain a fix for one instance of this
bug on x86_32 and one instance on x86_64 (!).

--Andy

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Andy Lutomirski <luto@kernel.org> - 2016-11-20 03:00 +0100
  Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Brian Gerst <brgerst@gmail.com> - 2016-11-20 03:20 +0100
    Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Andy Lutomirski <luto@amacapital.net> - 2016-11-20 03:20 +0100
      Re: What exactly do 32-bit x86 exceptions push on the stack in the  CS slot? Ingo Molnar <mingo@kernel.org> - 2016-11-21 08:30 +0100
        Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-21 19:10 +0100
          Re: What exactly do 32-bit x86 exceptions push on the stack in the CS  slot? "H. Peter Anvin" <hpa@zytor.com> - 2016-11-21 19:40 +0100
            Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-21 22:30 +0100
              Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-21 23:30 +0100
              Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? hpa@zytor.com - 2016-11-21 23:30 +0100
              Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Andy Lutomirski <luto@amacapital.net> - 2016-11-24 18:20 +0100
          Re: What exactly do 32-bit x86 exceptions push on the stack in the  CS slot? Ingo Molnar <mingo@kernel.org> - 2016-11-22 09:40 +0100
            Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Andy Lutomirski <luto@amacapital.net> - 2016-11-22 18:40 +0100
              Re: What exactly do 32-bit x86 exceptions push on the stack in the  CS slot? Ingo Molnar <mingo@kernel.org> - 2016-11-23 10:00 +0100
  Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? hpa@zytor.com - 2016-11-21 07:00 +0100
    Re: What exactly do 32-bit x86 exceptions push on the stack in the CS  slot? "H. Peter Anvin" <hpa@zytor.com> - 2016-11-21 17:10 +0100
      Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-21 19:30 +0100

csiph-web