ACK/Cmnt: [SRU][Trusty][PATCH 1/1] UBUNTU: SAUCE: x86: Use barrier_nospec in arch/x86/um/asm/barrier.h

Juerg Haefliger juerg.haefliger at canonical.com
Fri Jul 27 13:47:50 UTC 2018


On Fri, 27 Jul 2018 15:20:15 +0200
Stefan Bader <stefan.bader at canonical.com> wrote:

> On 27.07.2018 14:49, Juerg Haefliger wrote:
> > BugLink: https://bugs.launchpad.net/bugs/1774181
> > 
> > Modify the duplicate rdtsc_barrier() in arch/x86/um/asm/barrier.h.
> > 
> > Fixes: b3d7ad85b80b  is
> > Signed-off-by: Juerg Haefliger <juergh at canonical.com>  
> Acked-by: Stefan Bader <stefan.bader at canonical.com>
> > ---  
> 
> For whomever applies, is there any requirement where to put this or
> is it ok just on top?

Anywhere after ("x86: Introduce barrier_nospec") is fine.

...Juerg

> -Stefan
> 
> >  arch/x86/um/asm/barrier.h | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/um/asm/barrier.h b/arch/x86/um/asm/barrier.h
> > index 7d01b8c56c00..f16760f3d848 100644
> > --- a/arch/x86/um/asm/barrier.h
> > +++ b/arch/x86/um/asm/barrier.h
> > @@ -68,8 +68,7 @@
> >   */
> >  static inline void rdtsc_barrier(void)
> >  {
> > -	alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
> > -	alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
> > +	barrier_nospec();
> >  }
> >  
> >  #endif
> >   
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180727/bbff834c/attachment.sig>


More information about the kernel-team mailing list