Re: [PATCH] arm64: kernel: Fix incorrect brk randomization

2016-05-11 Thread Kees Cook
On Wed, May 11, 2016 at 8:29 AM, Will Deacon wrote: > On Wed, May 11, 2016 at 08:27:14AM -0700, Kees Cook wrote: >> On Wed, May 11, 2016 at 2:44 AM, Jon Medhurst (Tixy) wrote: >> > On Tue, 2016-05-10 at 10:55 -0700, Kees Cook wrote: >> >> This fixes two issues with the arm64 brk randomziation. Fi

Re: [PATCH] arm64: kernel: Fix incorrect brk randomization

2016-05-11 Thread Will Deacon
On Wed, May 11, 2016 at 08:27:14AM -0700, Kees Cook wrote: > On Wed, May 11, 2016 at 2:44 AM, Jon Medhurst (Tixy) wrote: > > On Tue, 2016-05-10 at 10:55 -0700, Kees Cook wrote: > >> This fixes two issues with the arm64 brk randomziation. First, the > >> STACK_RND_MASK was being used incorrectly. T

Re: [PATCH] arm64: kernel: Fix incorrect brk randomization

2016-05-11 Thread Kees Cook
On Wed, May 11, 2016 at 2:44 AM, Jon Medhurst (Tixy) wrote: > On Tue, 2016-05-10 at 10:55 -0700, Kees Cook wrote: >> This fixes two issues with the arm64 brk randomziation. First, the >> STACK_RND_MASK was being used incorrectly. The original code was: >> >> unsigned long range_end = base +

Re: [PATCH] arm64: kernel: Fix incorrect brk randomization

2016-05-11 Thread Jon Medhurst (Tixy)
On Tue, 2016-05-10 at 10:55 -0700, Kees Cook wrote: > This fixes two issues with the arm64 brk randomziation. First, the > STACK_RND_MASK was being used incorrectly. The original code was: > > unsigned long range_end = base + (STACK_RND_MASK << PAGE_SHIFT) + 1; > > STACK_RND_MASK is 0x7ff (

[PATCH] arm64: kernel: Fix incorrect brk randomization

2016-05-10 Thread Kees Cook
This fixes two issues with the arm64 brk randomziation. First, the STACK_RND_MASK was being used incorrectly. The original code was: unsigned long range_end = base + (STACK_RND_MASK << PAGE_SHIFT) + 1; STACK_RND_MASK is 0x7ff (32-bit) or 0x3 (64-bit), with 4K pages where PAGE_SHIFT is