Re: [PATCH] x86, kaslr: avoid setup_data when picking location

2014-10-01 Thread H. Peter Anvin
On 10/01/2014 11:08 AM, Kees Cook wrote: >> >> The use of (u64) in the assignment to avoid.start gives a nuisance >> warning on 32 bits. > > Ah, good catch! This should be (unsigned long), I think. Shall I send > a follow-up patch, or do you want to fix this directly? > Please do. In theory it

Re: [PATCH] x86, kaslr: avoid setup_data when picking location

2014-10-01 Thread Kees Cook
On Wed, Oct 1, 2014 at 11:01 AM, H. Peter Anvin wrote: > On 09/11/2014 09:19 AM, Kees Cook wrote: >> --- a/arch/x86/boot/compressed/aslr.c >> +++ b/arch/x86/boot/compressed/aslr.c >> @@ -183,12 +183,27 @@ static void mem_avoid_init(unsigned long input, >> unsigned long input_size, >> static bool

Re: [PATCH] x86, kaslr: avoid setup_data when picking location

2014-10-01 Thread H. Peter Anvin
On 09/11/2014 09:19 AM, Kees Cook wrote: > --- a/arch/x86/boot/compressed/aslr.c > +++ b/arch/x86/boot/compressed/aslr.c > @@ -183,12 +183,27 @@ static void mem_avoid_init(unsigned long input, > unsigned long input_size, > static bool mem_avoid_overlap(struct mem_vector *img) > { > int i;

[PATCH] x86, kaslr: avoid setup_data when picking location

2014-09-11 Thread Kees Cook
The KASLR location-choosing logic needs to avoid the setup_data list memory areas as well. Without this, it would be possible to have the ASLR position stomp on the memory, ultimately causing the boot to fail. Signed-off-by: Kees Cook Tested-by: Baoquan He Cc: sta...@vger.kernel.org --- arch/x8