Re: [PATCH v2] x86/mm/pti: remove dead logic during user pagetable population

2018-01-07 Thread Dave Hansen
On 01/07/2018 04:05 AM, Thomas Gleixner wrote: >> static DEFINE_SPINLOCK(shadow_table_allocation_lock); >> >> Now I have my suspicions why that's not needed anymore upstream but I'd >> let tglx explain better. > We got rid of all that runtime mapping stuff and the functions are only > called from

Re: [PATCH v2] x86/mm/pti: remove dead logic during user pagetable population

2018-01-07 Thread Dave Hansen
On 01/07/2018 04:05 AM, Thomas Gleixner wrote: >> static DEFINE_SPINLOCK(shadow_table_allocation_lock); >> >> Now I have my suspicions why that's not needed anymore upstream but I'd >> let tglx explain better. > We got rid of all that runtime mapping stuff and the functions are only > called from

Re: [PATCH v2] x86/mm/pti: remove dead logic during user pagetable population

2018-01-07 Thread Thomas Gleixner
On Sun, 7 Jan 2018, Borislav Petkov wrote: > On Sun, Jan 07, 2018 at 06:33:17PM +0800, Jike Song wrote: > > Look at one of the code snippets: > > > > 162 if (pgd_none(*pgd)) { > > 163 unsigned long new_p4d_page = __get_free_page(gfp); > > 164 if (!new_p4d_page) > >

Re: [PATCH v2] x86/mm/pti: remove dead logic during user pagetable population

2018-01-07 Thread Thomas Gleixner
On Sun, 7 Jan 2018, Borislav Petkov wrote: > On Sun, Jan 07, 2018 at 06:33:17PM +0800, Jike Song wrote: > > Look at one of the code snippets: > > > > 162 if (pgd_none(*pgd)) { > > 163 unsigned long new_p4d_page = __get_free_page(gfp); > > 164 if (!new_p4d_page) > >

Re: [PATCH v2] x86/mm/pti: remove dead logic during user pagetable population

2018-01-07 Thread Borislav Petkov
On Sun, Jan 07, 2018 at 06:33:17PM +0800, Jike Song wrote: > Look at one of the code snippets: > > 162 if (pgd_none(*pgd)) { > 163 unsigned long new_p4d_page = __get_free_page(gfp); > 164 if (!new_p4d_page) > 165 return NULL; > 166 > 167

Re: [PATCH v2] x86/mm/pti: remove dead logic during user pagetable population

2018-01-07 Thread Borislav Petkov
On Sun, Jan 07, 2018 at 06:33:17PM +0800, Jike Song wrote: > Look at one of the code snippets: > > 162 if (pgd_none(*pgd)) { > 163 unsigned long new_p4d_page = __get_free_page(gfp); > 164 if (!new_p4d_page) > 165 return NULL; > 166 > 167

[PATCH v2] x86/mm/pti: remove dead logic during user pagetable population

2018-01-07 Thread Jike Song
Look at one of the code snippets: 162 if (pgd_none(*pgd)) { 163 unsigned long new_p4d_page = __get_free_page(gfp); 164 if (!new_p4d_page) 165 return NULL; 166 167 if (pgd_none(*pgd)) { 168 set_pgd(pgd,

[PATCH v2] x86/mm/pti: remove dead logic during user pagetable population

2018-01-07 Thread Jike Song
Look at one of the code snippets: 162 if (pgd_none(*pgd)) { 163 unsigned long new_p4d_page = __get_free_page(gfp); 164 if (!new_p4d_page) 165 return NULL; 166 167 if (pgd_none(*pgd)) { 168 set_pgd(pgd,