From: Andy Lutomirski
> Sent: 18 March 2019 20:16
...
> > As a result this patch introduces 8 bits of randomness
> > (bits 4 - 11 are randomized, bits 0-3 must be zero due to stack alignment)
> > after pt_regs location on the thread stack.
> > The amount of randomness can be adjusted based on how much of the
> > stack space we wish/can trade for security.
> 
> Why do you need four zero bits at the bottom?  x86_64 Linux only
> maintains 8 byte stack alignment.

ISTR that the gcc developers arbitrarily changed the alignment
a few years ago.
If the stack is only 8 byte aligned and you allocate a variable that
requires 16 byte alignment you need gcc to generate the extra stack
frame to align the stack.
I don't remember seeing the relevant gcc options on the linux
gcc command lines.

        David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, 
UK
Registration No: 1397386 (Wales)

Reply via email to