mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-17 03:07:46 +07:00
x86/speculation/mds: Eliminate leaks by trace_hardirqs_on()
Move mds_idle_clear_cpu_buffers() after trace_hardirqs_on() to ensure all store buffer entries are flushed. Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: bp@alien8.de Cc: hpa@zytor.com Cc: jgross@suse.com Cc: ndesaulniers@google.com Cc: gregkh@linuxfoundation.org Link: https://lkml.kernel.org/r/1561260904-29669-2-git-send-email-zhenzhong.duan@oracle.com
This commit is contained in:
parent
4b972a01a7
commit
ab3765a050
@ -86,9 +86,9 @@ static inline void __mwaitx(unsigned long eax, unsigned long ebx,
|
|||||||
|
|
||||||
static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
|
static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
|
||||||
{
|
{
|
||||||
mds_idle_clear_cpu_buffers();
|
|
||||||
|
|
||||||
trace_hardirqs_on();
|
trace_hardirqs_on();
|
||||||
|
|
||||||
|
mds_idle_clear_cpu_buffers();
|
||||||
/* "mwait %eax, %ecx;" */
|
/* "mwait %eax, %ecx;" */
|
||||||
asm volatile("sti; .byte 0x0f, 0x01, 0xc9;"
|
asm volatile("sti; .byte 0x0f, 0x01, 0xc9;"
|
||||||
:: "a" (eax), "c" (ecx));
|
:: "a" (eax), "c" (ecx));
|
||||||
|
Loading…
Reference in New Issue
Block a user