Re: [PATCH 2/2] x86/speculation: Simplify indirect_branch_prediction_barrier()

2018-02-06 Thread Josh Poimboeuf
On Tue, Feb 06, 2018 at 11:31:18PM +, David Woodhouse wrote: > > > On Tue, 2018-02-06 at 17:25 -0600, Josh Poimboeuf wrote: > > On Tue, Feb 06, 2018 at 07:44:52PM +, David Woodhouse wrote: > > > > > > On Fri, 2018-01-26 at 21:08 +0100, Borislav Petkov wrote: > > > > > > > > Make it all

Re: [PATCH 2/2] x86/speculation: Simplify indirect_branch_prediction_barrier()

2018-02-06 Thread Josh Poimboeuf
On Tue, Feb 06, 2018 at 07:44:52PM +, David Woodhouse wrote: > On Fri, 2018-01-26 at 21:08 +0100, Borislav Petkov wrote: > > Make it all a function which does the WRMSR instead of having a hairy > > inline asm. > > ... > > > + alternative_input("", > > +  "call __ibp_barri

Re: [PATCH 2/2] x86/speculation: Simplify indirect_branch_prediction_barrier()

2018-02-06 Thread David Woodhouse
On Tue, 2018-02-06 at 17:25 -0600, Josh Poimboeuf wrote: > On Tue, Feb 06, 2018 at 07:44:52PM +, David Woodhouse wrote: > > > > On Fri, 2018-01-26 at 21:08 +0100, Borislav Petkov wrote: > > > > > > Make it all a function which does the WRMSR instead of having a hairy > > > inline asm. > > .

Re: [PATCH 2/2] x86/speculation: Simplify indirect_branch_prediction_barrier()

2018-02-06 Thread David Woodhouse
On Fri, 2018-01-26 at 21:08 +0100, Borislav Petkov wrote: > Make it all a function which does the WRMSR instead of having a hairy > inline asm. ... > + alternative_input("", > +  "call __ibp_barrier", > +  X86_FEATURE_IBPB, > +  ASM_

Re: [PATCH 2/2] x86/speculation: Simplify indirect_branch_prediction_barrier()

2018-01-27 Thread Borislav Petkov
On Sat, Jan 27, 2018 at 12:32:41PM +, David Woodhouse wrote: > Did I already say that needs to live in asm-prototypes.h? That's a C function. > And it needs to be exported to modules, I think. Right. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim t

Re: [PATCH 2/2] x86/speculation: Simplify indirect_branch_prediction_barrier()

2018-01-27 Thread David Woodhouse
On Fri, 2018-01-26 at 21:08 +0100, Borislav Petkov wrote: > > --- a/arch/x86/include/asm/processor.h > +++ b/arch/x86/include/asm/processor.h > @@ -971,4 +971,8 @@ bool xen_set_default_idle(void); >   >  void stop_this_cpu(void *dummy); >  void df_debug(struct pt_regs *regs, long error_code); > +

[PATCH 2/2] x86/speculation: Simplify indirect_branch_prediction_barrier()

2018-01-26 Thread Borislav Petkov
Make it all a function which does the WRMSR instead of having a hairy inline asm. Signed-off-by: Borislav Petkov --- arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/include/asm/nospec-branch.h | 13 - arch/x86/include/asm/processor.h | 4 arch/x86/kernel/cpu/bugs.c