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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMzpN2hDmLyW2rC6kA2xc609t2LRAAZrSRb5gf+D=Ami30jCCg@mail.gmail.com>
Date:	Mon, 31 Aug 2015 23:55:54 -0400
From:	Brian Gerst <brgerst@...il.com>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	X86 ML <x86@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: Why is irq_stack_union a union?

On Mon, Aug 31, 2015 at 6:01 PM, Andy Lutomirski <luto@...capital.net> wrote:
> On Mon, Aug 31, 2015 at 2:47 PM, Brian Gerst <brgerst@...il.com> wrote:
>> On Mon, Aug 31, 2015 at 5:00 PM, Andy Lutomirski <luto@...capital.net> wrote:
>>> Why not just a struct? Also, why is this all tangled up in gsbase initialization?
>>
>> It has to do with the fact that the GCC stackprotector is hardcoded to
>> look for the canary at %gs:40.  Since we also use %gs for the percpu
>> segment, we have to make sure that the canary is placed at the start
>> of the percpu section.  Overlaying it onto the bottom of the IRQ stack
>> and was the most convenient way to do it, with a side benefit that
>> overflowing the stack will trip the canary.
>
> Would a struct not make more sense, then?

Why would it?  A union shows the overlay better.

--
Brian Gerst
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ