Re: [PATCH v6 1/3] x86/mm: PUD VA support for physical mapping (x86_64)

2016-06-21 Thread Ingo Molnar
* Thomas Garnier wrote: > > Secondly, and that's a new problem introduced by this patch: > > > >> + int i = pud_index((unsigned long)__va(addr)); > >> + pud_t *pud = pud_page + pud_index((unsigned long)__va(addr)); > > > > ... beyond the repetition, using

Re: [PATCH v6 1/3] x86/mm: PUD VA support for physical mapping (x86_64)

2016-06-21 Thread Ingo Molnar
* Thomas Garnier wrote: > > Secondly, and that's a new problem introduced by this patch: > > > >> + int i = pud_index((unsigned long)__va(addr)); > >> + pud_t *pud = pud_page + pud_index((unsigned long)__va(addr)); > > > > ... beyond the repetition, using type casts is fragile.

Re: [PATCH v6 1/3] x86/mm: PUD VA support for physical mapping (x86_64)

2016-06-20 Thread Thomas Garnier
On Fri, Jun 17, 2016 at 2:02 AM, Ingo Molnar wrote: > > * Kees Cook wrote: > >> From: Thomas Garnier >> >> Minor change that allows early boot physical mapping of PUD level virtual >> addresses. The current implementation expects the

Re: [PATCH v6 1/3] x86/mm: PUD VA support for physical mapping (x86_64)

2016-06-20 Thread Thomas Garnier
On Fri, Jun 17, 2016 at 2:02 AM, Ingo Molnar wrote: > > * Kees Cook wrote: > >> From: Thomas Garnier >> >> Minor change that allows early boot physical mapping of PUD level virtual >> addresses. The current implementation expects the virtual address to be >> PUD aligned. For KASLR memory

Re: [PATCH v6 1/3] x86/mm: PUD VA support for physical mapping (x86_64)

2016-06-17 Thread Ingo Molnar
* Kees Cook wrote: > From: Thomas Garnier > > Minor change that allows early boot physical mapping of PUD level virtual > addresses. The current implementation expects the virtual address to be > PUD aligned. For KASLR memory randomization, we need

Re: [PATCH v6 1/3] x86/mm: PUD VA support for physical mapping (x86_64)

2016-06-17 Thread Ingo Molnar
* Kees Cook wrote: > From: Thomas Garnier > > Minor change that allows early boot physical mapping of PUD level virtual > addresses. The current implementation expects the virtual address to be > PUD aligned. For KASLR memory randomization, we need to be able to > randomize the offset used on

[PATCH v6 1/3] x86/mm: PUD VA support for physical mapping (x86_64)

2016-05-25 Thread Kees Cook
From: Thomas Garnier Minor change that allows early boot physical mapping of PUD level virtual addresses. The current implementation expects the virtual address to be PUD aligned. For KASLR memory randomization, we need to be able to randomize the offset used on the PUD

[PATCH v6 1/3] x86/mm: PUD VA support for physical mapping (x86_64)

2016-05-25 Thread Kees Cook
From: Thomas Garnier Minor change that allows early boot physical mapping of PUD level virtual addresses. The current implementation expects the virtual address to be PUD aligned. For KASLR memory randomization, we need to be able to randomize the offset used on the PUD table. It has no impact