Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Baoquan He
On 08/04/17 at 12:55pm, Matt Fleming wrote: > On Fri, 04 Aug, at 07:40:05PM, Baoquan He wrote: > > On 08/04/17 at 12:23pm, Matt Fleming wrote: > > > On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > > > > Hi Matt, > > > > > > > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > > > > > > > *

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Baoquan He
On 08/04/17 at 12:55pm, Matt Fleming wrote: > On Fri, 04 Aug, at 07:40:05PM, Baoquan He wrote: > > On 08/04/17 at 12:23pm, Matt Fleming wrote: > > > On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > > > > Hi Matt, > > > > > > > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > > > > > > > *

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Matt Fleming
On Fri, 04 Aug, at 07:40:05PM, Baoquan He wrote: > On 08/04/17 at 12:23pm, Matt Fleming wrote: > > On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > > > Hi Matt, > > > > > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > > > > > * Matt Fleming wrote: > > > > > >

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Matt Fleming
On Fri, 04 Aug, at 07:40:05PM, Baoquan He wrote: > On 08/04/17 at 12:23pm, Matt Fleming wrote: > > On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > > > Hi Matt, > > > > > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > > > > > * Matt Fleming wrote: > > > > > > > > > On Fri, 21 Jul, at

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Baoquan He
On 08/04/17 at 12:23pm, Matt Fleming wrote: > On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > > Hi Matt, > > > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > > > * Matt Fleming wrote: > > > > > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > >

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Baoquan He
On 08/04/17 at 12:23pm, Matt Fleming wrote: > On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > > Hi Matt, > > > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > > > * Matt Fleming wrote: > > > > > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > > > > > > There are places

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Matt Fleming
On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > Hi Matt, > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > * Matt Fleming wrote: > > > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > > > > There are places where the efi map is getting and used

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-08-04 Thread Matt Fleming
On Fri, 28 Jul, at 07:26:03PM, Baoquan He wrote: > Hi Matt, > > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > * Matt Fleming wrote: > > > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > > > > There are places where the efi map is getting and used like this. E.g > > > > in

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Baoquan He
Hi Matt, On 07/28/17 at 11:55am, Ingo Molnar wrote: > > * Matt Fleming wrote: > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > > There are places where the efi map is getting and used like this. E.g > > > in efi_high_alloc() of

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Baoquan He
Hi Matt, On 07/28/17 at 11:55am, Ingo Molnar wrote: > > * Matt Fleming wrote: > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > > There are places where the efi map is getting and used like this. E.g > > > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. >

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Baoquan He
On 07/28/17 at 06:18pm, Baoquan He wrote: > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > * Matt Fleming wrote: > > > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > > > > There are places where the efi map is getting and used like this. E.g > > > >

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Baoquan He
On 07/28/17 at 06:18pm, Baoquan He wrote: > On 07/28/17 at 11:55am, Ingo Molnar wrote: > > > > * Matt Fleming wrote: > > > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > > > > There are places where the efi map is getting and used like this. E.g > > > > in efi_high_alloc() of

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Baoquan He
On 07/28/17 at 11:55am, Ingo Molnar wrote: > > * Matt Fleming wrote: > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > > There are places where the efi map is getting and used like this. E.g > > > in efi_high_alloc() of

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Baoquan He
On 07/28/17 at 11:55am, Ingo Molnar wrote: > > * Matt Fleming wrote: > > > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > > > There are places where the efi map is getting and used like this. E.g > > > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > > > EFI

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Ingo Molnar
* Matt Fleming wrote: > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > There are places where the efi map is getting and used like this. E.g > > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > > EFI developers worry the size of

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Ingo Molnar
* Matt Fleming wrote: > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > There are places where the efi map is getting and used like this. E.g > > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > > EFI developers worry the size of efi_memory_desc_t could not be

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Baoquan He
Hi Ingo, On 07/24/17 at 02:34pm, Matt Fleming wrote: > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > There are places where the efi map is getting and used like this. E.g > > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > > EFI developers worry the size of

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-28 Thread Baoquan He
Hi Ingo, On 07/24/17 at 02:34pm, Matt Fleming wrote: > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > There are places where the efi map is getting and used like this. E.g > > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > > EFI developers worry the size of

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-24 Thread Baoquan He
On 07/24/17 at 02:34pm, Matt Fleming wrote: > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > There are places where the efi map is getting and used like this. E.g > > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > > EFI developers worry the size of

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-24 Thread Baoquan He
On 07/24/17 at 02:34pm, Matt Fleming wrote: > On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > > > There are places where the efi map is getting and used like this. E.g > > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > > EFI developers worry the size of

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-24 Thread Matt Fleming
On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > There are places where the efi map is getting and used like this. E.g > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > EFI developers worry the size of efi_memory_desc_t could not be the same > as e->efi_memdesc_size? >

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-24 Thread Matt Fleming
On Fri, 21 Jul, at 09:19:56PM, Baoquan He wrote: > > There are places where the efi map is getting and used like this. E.g > in efi_high_alloc() of drivers/firmware/efi/libstub/efi-stub-helper.c. > EFI developers worry the size of efi_memory_desc_t could not be the same > as e->efi_memdesc_size? >

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Baoquan He
On 07/21/17 at 07:37pm, Ingo Molnar wrote: > > * Baoquan He wrote: > > > > > +static inline bool process_efi_entries(unsigned long minimum, > > > > + unsigned long image_size) > > > > > > ugly linebreak again ... > > > > The whole line is

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Baoquan He
On 07/21/17 at 07:37pm, Ingo Molnar wrote: > > * Baoquan He wrote: > > > > > +static inline bool process_efi_entries(unsigned long minimum, > > > > + unsigned long image_size) > > > > > > ugly linebreak again ... > > > > The whole line is more than 80. I

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Ingo Molnar
* Baoquan He wrote: > > > +static inline bool process_efi_entries(unsigned long minimum, > > > +unsigned long image_size) > > > > ugly linebreak again ... > > The whole line is more than 80. I break the line and use tab and space > to make it

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Ingo Molnar
* Baoquan He wrote: > > > +static inline bool process_efi_entries(unsigned long minimum, > > > +unsigned long image_size) > > > > ugly linebreak again ... > > The whole line is more than 80. I break the line and use tab and space > to make it align with above

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Baoquan He
On 07/21/17 at 12:37pm, Ingo Molnar wrote: > > * Baoquan He wrote: > > > +/* > > + * Returns true if mirror region found (and must have been processed > > + * for slots adding) > > + */ > > +static bool process_efi_entries(unsigned long minimum, > > +

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Baoquan He
On 07/21/17 at 12:37pm, Ingo Molnar wrote: > > * Baoquan He wrote: > > > +/* > > + * Returns true if mirror region found (and must have been processed > > + * for slots adding) > > + */ > > +static bool process_efi_entries(unsigned long minimum, > > + unsigned long

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Baoquan He
On 07/21/17 at 12:33pm, Ingo Molnar wrote: > > * Baoquan He wrote: > > > Kernel text may be located in non-mirror regions (movable zone) when both > > address range mirroring feature and KASLR are enabled. > > > > The address range mirroring feature arranges such mirror region

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Baoquan He
On 07/21/17 at 12:33pm, Ingo Molnar wrote: > > * Baoquan He wrote: > > > Kernel text may be located in non-mirror regions (movable zone) when both > > address range mirroring feature and KASLR are enabled. > > > > The address range mirroring feature arranges such mirror region into > > normal

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Ingo Molnar
* Baoquan He wrote: > +/* > + * Returns true if mirror region found (and must have been processed > + * for slots adding) > + */ > +static bool process_efi_entries(unsigned long minimum, > + unsigned long image_size) Also, please don't break the

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Ingo Molnar
* Baoquan He wrote: > +/* > + * Returns true if mirror region found (and must have been processed > + * for slots adding) > + */ > +static bool process_efi_entries(unsigned long minimum, > + unsigned long image_size) Also, please don't break the line in the middle

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Ingo Molnar
* Baoquan He wrote: > Kernel text may be located in non-mirror regions (movable zone) when both > address range mirroring feature and KASLR are enabled. > > The address range mirroring feature arranges such mirror region into > normal zone and other region into movable zone in

Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-21 Thread Ingo Molnar
* Baoquan He wrote: > Kernel text may be located in non-mirror regions (movable zone) when both > address range mirroring feature and KASLR are enabled. > > The address range mirroring feature arranges such mirror region into > normal zone and other region into movable zone in order to locate

[PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-20 Thread Baoquan He
Kernel text may be located in non-mirror regions (movable zone) when both address range mirroring feature and KASLR are enabled. The address range mirroring feature arranges such mirror region into normal zone and other region into movable zone in order to locate kernel code and data in mirror

[PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

2017-07-20 Thread Baoquan He
Kernel text may be located in non-mirror regions (movable zone) when both address range mirroring feature and KASLR are enabled. The address range mirroring feature arranges such mirror region into normal zone and other region into movable zone in order to locate kernel code and data in mirror