x86/srso: Fix return thunks in generated code
[platform/kernel/linux-starfive.git] / arch / x86 / kernel / alternative.c
index 920a8ca..2dcf3a0 100644 (file)
@@ -707,9 +707,7 @@ static int patch_return(void *addr, struct insn *insn, u8 *bytes)
        int i = 0;
 
        /* Patch the custom return thunks... */
-       if (cpu_feature_enabled(X86_FEATURE_RETHUNK) ||
-           cpu_feature_enabled(X86_FEATURE_SRSO) ||
-           cpu_feature_enabled(X86_FEATURE_SRSO_ALIAS)) {
+       if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) {
                i = JMP32_INSN_SIZE;
                __text_gen_insn(bytes, JMP32_INSN_OPCODE, addr, x86_return_thunk, i);
        } else {