Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86_urgent_for_v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Borislav Petkov:

- Make sure TF is cleared before calling other functions (BHI
mitigation in this case) in the SYSENTER compat handler, as
otherwise it will warn about being in single-step mode

* tag 'x86_urgent_for_v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/bhi: Avoid warning in #DB handler due to BHI mitigation

+10 -4
+10 -4
arch/x86/entry/entry_64_compat.S
··· 89 89 90 90 cld 91 91 92 - IBRS_ENTER 93 - UNTRAIN_RET 94 - CLEAR_BRANCH_HISTORY 95 - 96 92 /* 97 93 * SYSENTER doesn't filter flags, so we need to clear NT and AC 98 94 * ourselves. To save a few cycles, we can check whether ··· 111 115 testl $X86_EFLAGS_NT|X86_EFLAGS_AC|X86_EFLAGS_TF, EFLAGS(%rsp) 112 116 jnz .Lsysenter_fix_flags 113 117 .Lsysenter_flags_fixed: 118 + 119 + /* 120 + * CPU bugs mitigations mechanisms can call other functions. They 121 + * should be invoked after making sure TF is cleared because 122 + * single-step is ignored only for instructions inside the 123 + * entry_SYSENTER_compat function. 124 + */ 125 + IBRS_ENTER 126 + UNTRAIN_RET 127 + CLEAR_BRANCH_HISTORY 114 128 115 129 movq %rsp, %rdi 116 130 call do_SYSENTER_32