Re: [PATCH] x86/mm/64: Do not dereference non-present PGD entries

2020-08-13 Thread Ingo Molnar
* Mike Rapoport wrote: > On Mon, Aug 10, 2020 at 07:27:33AM -0700, Dave Hansen wrote: > > ... adding Kirill > > > > On 8/7/20 1:40 AM, Joerg Roedel wrote: > > > + lvl = "p4d"; > > > + p4d = p4d_alloc(_mm, pgd, addr); > > > + if (!p4d) > > > + goto

Re: [PATCH] x86/mm/64: Do not dereference non-present PGD entries

2020-08-10 Thread Mike Rapoport
On Mon, Aug 10, 2020 at 07:27:33AM -0700, Dave Hansen wrote: > ... adding Kirill > > On 8/7/20 1:40 AM, Joerg Roedel wrote: > > + lvl = "p4d"; > > + p4d = p4d_alloc(_mm, pgd, addr); > > + if (!p4d) > > + goto failed; > > > > + /* > > +

Re: [PATCH] x86/mm/64: Do not dereference non-present PGD entries

2020-08-10 Thread Dave Hansen
... adding Kirill On 8/7/20 1:40 AM, Joerg Roedel wrote: > + lvl = "p4d"; > + p4d = p4d_alloc(_mm, pgd, addr); > + if (!p4d) > + goto failed; > > + /* > + * With 5-level paging the P4D level is not folded. So the

Re: [PATCH] x86/mm/64: Do not dereference non-present PGD entries

2020-08-07 Thread Mike Rapoport
On Fri, Aug 07, 2020 at 10:40:13AM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > The code for preallocate_vmalloc_pages() was written under the > assumption that the p4d_offset() and pud_offset() functions will perform > present checks before dereferencing the parent entries. > > This

Re: [PATCH] x86/mm/64: Do not dereference non-present PGD entries

2020-08-07 Thread Jason A. Donenfeld
On Fri, Aug 7, 2020 at 10:40 AM Joerg Roedel wrote: > > From: Joerg Roedel > > The code for preallocate_vmalloc_pages() was written under the > assumption that the p4d_offset() and pud_offset() functions will perform > present checks before dereferencing the parent entries. > > This assumption

[PATCH] x86/mm/64: Do not dereference non-present PGD entries

2020-08-07 Thread Joerg Roedel
From: Joerg Roedel The code for preallocate_vmalloc_pages() was written under the assumption that the p4d_offset() and pud_offset() functions will perform present checks before dereferencing the parent entries. This assumption is wrong an leads to a bug in the code which causes the physical