Re: [PATCH 11/11] x86/pti: leave kernel text global for !PCID

2018-04-19 Thread Kees Cook
On Thu, Apr 19, 2018 at 9:02 AM, Dave Hansen wrote: > On 04/18/2018 05:11 PM, Kees Cook wrote: >> On Fri, Apr 6, 2018 at 1:55 PM, Dave Hansen >> wrote: >>> +/* >>> + * For some configurations, map all of kernel text into the user page >>> + * tables. This reduces TLB misses, especially on non-P

Re: [PATCH 11/11] x86/pti: leave kernel text global for !PCID

2018-04-19 Thread Dave Hansen
On 04/18/2018 05:11 PM, Kees Cook wrote: > On Fri, Apr 6, 2018 at 1:55 PM, Dave Hansen > wrote: >> +/* >> + * For some configurations, map all of kernel text into the user page >> + * tables. This reduces TLB misses, especially on non-PCID systems. >> + */ >> +void pti_clone_kernel_text(void) >>

Re: [PATCH 11/11] x86/pti: leave kernel text global for !PCID

2018-04-18 Thread Kees Cook
On Fri, Apr 6, 2018 at 1:55 PM, Dave Hansen wrote: > +/* > + * For some configurations, map all of kernel text into the user page > + * tables. This reduces TLB misses, especially on non-PCID systems. > + */ > +void pti_clone_kernel_text(void) > +{ > + unsigned long start = PFN_ALIGN(_text)

[PATCH 11/11] x86/pti: leave kernel text global for !PCID

2018-04-06 Thread Dave Hansen
Note: This has changed since the last version. It now clones the kernel text PMDs at a much later point and also disables this functionality on AMD K8 processors. Details in the patch. -- I'm sticking this at the end of the series because it's a bit weird. It can be dropped and the rest of the

Re: [PATCH 11/11] x86/pti: leave kernel text global for !PCID

2018-04-04 Thread kbuild test robot
Hi Dave, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/auto-latest] [also build test WARNING on next-20180403] [cannot apply to tip/x86/core v4.16] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH 11/11] x86/pti: leave kernel text global for !PCID

2018-04-03 Thread Dave Hansen
Note: This has changed since the last version. It now clones the kernel text PMDs at a much later point and also disables this functionality on AMD K8 processors. Details in the patch. -- I'm sticking this at the end of the series because it's a bit weird. It can be dropped and the rest of the

[PATCH 11/11] x86/pti: leave kernel text global for !PCID

2018-04-02 Thread Dave Hansen
Note: This has changed since the last version. It now clones the kernel text PMDs at a much later point and also disables this functionality on AMD K8 processors. Details in the patch. -- I'm sticking this at the end of the series because it's a bit weird. It can be dropped and the rest of the

[PATCH 11/11] x86/pti: leave kernel text global for !PCID

2018-03-23 Thread Dave Hansen
I'm sticking this at the end of the series because it's a bit weird. It can be dropped and the rest of the series is still useful without it. Global pages are bad for hardening because they potentially let an exploit read the kernel image via a Meltdown-style attack which makes it easier to find