Patch "x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-speculation-mds-mark-mds_user_clear_cpu_buffers-.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 434ace27808e8505c62f41ec1ce6a1a1b1594b75
Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Date:   Wed Mar 4 12:49:18 2020 +0100

    x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline
    
    [ Upstream commit a7ef9ba986b5fae9d80f8a7b31db0423687efe4e ]
    
    Prevent the compiler from uninlining and creating traceable/probable
    functions as this is invoked _after_ context tracking switched to
    CONTEXT_USER and rcu idle.
    
    Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Reviewed-by: Alexandre Chartre <alexandre.chartre@xxxxxxxxxx>
    Acked-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Link: https://lkml.kernel.org/r/20200505134340.902709267@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index 5c24a7b351665..b222a35959467 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -320,7 +320,7 @@ DECLARE_STATIC_KEY_FALSE(mds_idle_clear);
  * combination with microcode which triggers a CPU buffer flush when the
  * instruction is executed.
  */
-static inline void mds_clear_cpu_buffers(void)
+static __always_inline void mds_clear_cpu_buffers(void)
 {
 	static const u16 ds = __KERNEL_DS;
 
@@ -341,7 +341,7 @@ static inline void mds_clear_cpu_buffers(void)
  *
  * Clear CPU buffers if the corresponding static key is enabled
  */
-static inline void mds_user_clear_cpu_buffers(void)
+static __always_inline void mds_user_clear_cpu_buffers(void)
 {
 	if (static_branch_likely(&mds_user_clear))
 		mds_clear_cpu_buffers();



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux