Re: [PATCH 12/16] x86/mm/pae: Populate the user page-table with user pgd's

2018-01-16 Thread Dave Hansen
On 01/16/2018 01:10 PM, Thomas Gleixner wrote: > > static inline pteval_t supported_pgd_mask(void) > { > if (IS_ENABLED(CONFIG_X86_64)) > return __supported_pte_mask; > return __supported_pte_mask & ~_PAGE_NX); > } > > and get rid of the ifdeffery completely. Heh, that'

Re: [PATCH 12/16] x86/mm/pae: Populate the user page-table with user pgd's

2018-01-16 Thread Thomas Gleixner
On Tue, 16 Jan 2018, Joerg Roedel wrote: > > +#ifdef CONFIG_X86_64 > /* >* If this is normal user memory, make it NX in the kernel >* pagetables so that, if we somehow screw up and return to > @@ -134,10 +135,16 @@ pgd_t __pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) >*

Re: [PATCH 12/16] x86/mm/pae: Populate the user page-table with user pgd's

2018-01-16 Thread Joerg Roedel
On Tue, Jan 16, 2018 at 10:11:14AM -0800, Dave Hansen wrote: > > Ugh. The ghosts of PAE have come back to haunt us. :-) Yeah, PAE caused the most trouble for me while getting this running. > > Could we do: > > static inline bool pgd_supports_nx(unsigned long) > { > #ifdef CONFIG_X86_64 >

Re: [PATCH 12/16] x86/mm/pae: Populate the user page-table with user pgd's

2018-01-16 Thread Dave Hansen
On 01/16/2018 08:36 AM, Joerg Roedel wrote: > +#ifdef CONFIG_X86_64 > /* >* If this is normal user memory, make it NX in the kernel >* pagetables so that, if we somehow screw up and return to > @@ -134,10 +135,16 @@ pgd_t __pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) >*