diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-09-22 12:35:56 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-09-22 12:35:56 -0700 |
| commit | b61ec8d0f18ce257360d58304e79ee5774706b56 (patch) | |
| tree | 431f4014b00b61919734e086fb980b86f333438b /arch/x86/kernel/alternative.c | |
| parent | e583bffeb8bc3a7b64455b14376afd5fad71d62f (diff) | |
| parent | aee9d30b9744d677509ef790f30f3a24c7841c3d (diff) | |
| download | linux-b61ec8d0f18ce257360d58304e79ee5774706b56.tar.gz linux-b61ec8d0f18ce257360d58304e79ee5774706b56.tar.bz2 linux-b61ec8d0f18ce257360d58304e79ee5774706b56.zip | |
Merge tag 'x86_urgent_for_v6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 rethunk fixes from Borislav Petkov:
"Fix the patching ordering between static calls and return thunks"
* tag 'x86_urgent_for_v6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86,static_call: Fix static-call vs return-thunk
x86/alternatives: Remove faulty optimization
Diffstat (limited to 'arch/x86/kernel/alternative.c')
| -rw-r--r-- | arch/x86/kernel/alternative.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index a5ead6a6d233..517ee01503be 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -720,13 +720,8 @@ void __init_or_module noinline apply_returns(s32 *start, s32 *end) { s32 *s; - /* - * Do not patch out the default return thunks if those needed are the - * ones generated by the compiler. - */ - if (cpu_feature_enabled(X86_FEATURE_RETHUNK) && - (x86_return_thunk == __x86_return_thunk)) - return; + if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) + static_call_force_reinit(); for (s = start; s < end; s++) { void *dest = NULL, *addr = (void *)s + *s; |
