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


Groups > linux.kernel > #1216480

Re: Why is irq_stack_union a union?

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: Why is irq_stack_union a union?
Date 2015-09-01 00:10 +0200
Message-ID <q3Fr3-3Tm-9@gated-at.bofh.it> (permalink)
References <q3Ev1-2yp-23@gated-at.bofh.it> <q3F7H-3hD-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 31, 2015 at 2:47 PM, Brian Gerst <brgerst@gmail.com> wrote:
> On Mon, Aug 31, 2015 at 5:00 PM, Andy Lutomirski <luto@amacapital.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?

--Andy

>
> --
> Brian Gerst



-- 
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

Why is irq_stack_union a union? Andy Lutomirski <luto@amacapital.net> - 2015-08-31 23:10 +0200
  Re: Why is irq_stack_union a union? Brian Gerst <brgerst@gmail.com> - 2015-08-31 23:50 +0200
    Re: Why is irq_stack_union a union? Andy Lutomirski <luto@amacapital.net> - 2015-09-01 00:10 +0200
      Re: Why is irq_stack_union a union? Brian Gerst <brgerst@gmail.com> - 2015-09-01 06:00 +0200
        Re: Why is irq_stack_union a union? Andy Lutomirski <luto@amacapital.net> - 2015-09-01 23:50 +0200

csiph-web