ACK/Cmnt: [SRU][Trusty][PATCH 1/1] UBUNTU: SAUCE: x86: Use barrier_nospec in arch/x86/um/asm/barrier.h
Stefan Bader
stefan.bader at canonical.com
Fri Jul 27 13:20:15 UTC 2018
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 ("x86: Introduce barrier_nospec")
> 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?
-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: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180727/654412d9/attachment.sig>
More information about the kernel-team
mailing list