]> Git Repo - linux.git/commit
x86/callthunks: Handle %rip-relative relocations in call thunk template
authorUros Bizjak <[email protected]>
Sun, 5 Nov 2023 21:34:36 +0000 (22:34 +0100)
committerIngo Molnar <[email protected]>
Thu, 30 Nov 2023 19:06:17 +0000 (20:06 +0100)
commit17bce3b2ae2d52e8c5c12274ce4c3a631ce9e66b
tree64fed2ccae63192f4ff0dd193e9fbbc8b2d9a4fc
parent43bda69ed9e3b86d0ba5ff9256e437d50074d7d5
x86/callthunks: Handle %rip-relative relocations in call thunk template

Contrary to alternatives, relocations are currently not supported in
call thunk templates.  Re-use the existing infrastructure from
alternative.c to allow %rip-relative relocations when copying call
thunk template from its storage location.

The patch allows unification of ASM_INCREMENT_CALL_DEPTH, which already
uses PER_CPU_VAR macro, with INCREMENT_CALL_DEPTH, used in call thunk
template, which is currently limited to use absolute address.

Reuse existing relocation infrastructure from alternative.c.,
as suggested by Peter Zijlstra.

Signed-off-by: Uros Bizjak <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
arch/x86/include/asm/text-patching.h
arch/x86/kernel/alternative.c
arch/x86/kernel/callthunks.c
This page took 0.047436 seconds and 4 git commands to generate.