aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/kernel/callthunks.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2023-09-22 10:12:25 +0000
committerBorislav Petkov (AMD) <bp@alien8.de>2023-09-22 18:58:24 +0200
commitaee9d30b9744d677509ef790f30f3a24c7841c3d (patch)
tree5694f1a9bf02a29db73a2ef9f07a25464c8f1854 /arch/x86/kernel/callthunks.c
parentx86/alternatives: Remove faulty optimization (diff)
downloadwireguard-linux-aee9d30b9744d677509ef790f30f3a24c7841c3d.tar.xz
wireguard-linux-aee9d30b9744d677509ef790f30f3a24c7841c3d.zip
x86,static_call: Fix static-call vs return-thunk
Commit 7825451fa4dc ("static_call: Add call depth tracking support") failed to realize the problem fixed there is not specific to call depth tracking but applies to all return-thunk uses. Move the fix to the appropriate place and condition. Fixes: ee88d363d156 ("x86,static_call: Use alternative RET encoding") Reported-by: David Kaplan <David.Kaplan@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Ingo Molnar <mingo@kernel.org> Tested-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: <stable@kernel.org>
Diffstat (limited to '')
-rw-r--r--arch/x86/kernel/callthunks.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kernel/callthunks.c b/arch/x86/kernel/callthunks.c
index c06bfc086565..faa9f2299848 100644
--- a/arch/x86/kernel/callthunks.c
+++ b/arch/x86/kernel/callthunks.c
@@ -272,7 +272,6 @@ void __init callthunks_patch_builtin_calls(void)
pr_info("Setting up call depth tracking\n");
mutex_lock(&text_mutex);
callthunks_setup(&cs, &builtin_coretext);
- static_call_force_reinit();
thunks_initialized = true;
mutex_unlock(&text_mutex);
}