Re: [patch 2/2] x86/mm/pti: Do not invoke PTI functions when PTI is disabled

2019-08-30 Thread Joerg Roedel
On Wed, Aug 28, 2019 at 04:24:47PM +0200, Thomas Gleixner wrote: > --- a/arch/x86/mm/pti.c > +++ b/arch/x86/mm/pti.c > @@ -668,6 +668,8 @@ void __init pti_init(void) > */ > void pti_finalize(void) > { > + if (!boot_cpu_has(X86_FEATURE_PTI)) > + return; > /* >* We

Re: [patch 2/2] x86/mm/pti: Do not invoke PTI functions when PTI is disabled

2019-08-28 Thread Ingo Molnar
* Thomas Gleixner wrote: > When PTI is disabled at boot time either because the CPU is not affected or > PTI has been disabled on the command line, the boot code still calls into > pti_finalize() which then unconditionally invokes: > > pti_clone_entry_text() >

Re: [patch 2/2] x86/mm/pti: Do not invoke PTI functions when PTI is disabled

2019-08-28 Thread Song Liu
> On Aug 28, 2019, at 7:24 AM, Thomas Gleixner wrote: > > When PTI is disabled at boot time either because the CPU is not affected or > PTI has been disabled on the command line, the boot code still calls into > pti_finalize() which then unconditionally invokes: > >

Re: [patch 2/2] x86/mm/pti: Do not invoke PTI functions when PTI is disabled

2019-08-28 Thread Dave Hansen
On 8/28/19 7:24 AM, Thomas Gleixner wrote: > Neither function should be called when PTI is runtime disabled. Make the > invocation conditional. Thanks for sending that out. My impressions from a look through it matched your changelog. Reviewed-by: Dave Hansen

[patch 2/2] x86/mm/pti: Do not invoke PTI functions when PTI is disabled

2019-08-28 Thread Thomas Gleixner
When PTI is disabled at boot time either because the CPU is not affected or PTI has been disabled on the command line, the boot code still calls into pti_finalize() which then unconditionally invokes: pti_clone_entry_text() pti_clone_kernel_text() pti_clone_kernel_text() was called