diff options
author | Juergen Gross <[email protected]> | 2024-11-29 15:47:49 +0100 |
---|---|---|
committer | Juergen Gross <[email protected]> | 2024-12-13 09:28:21 +0100 |
commit | dda014ba59331dee4f3b773a020e109932f4bd24 (patch) | |
tree | 36706823f8ff905afc600701913807230b3efce3 | |
parent | efbcd61d9bebb771c836a3b8bfced8165633db7c (diff) |
objtool/x86: allow syscall instruction
The syscall instruction is used in Xen PV mode for doing hypercalls.
Allow syscall to be used in the kernel in case it is tagged with an
unwind hint for objtool.
This is part of XSA-466 / CVE-2024-53241.
Reported-by: Andrew Cooper <[email protected]>
Signed-off-by: Juergen Gross <[email protected]>
Co-developed-by: Peter Zijlstra <[email protected]>
-rw-r--r-- | tools/objtool/check.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 4ce176ad411f..76060da755b5 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -3820,9 +3820,12 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, break; case INSN_CONTEXT_SWITCH: - if (func && (!next_insn || !next_insn->hint)) { - WARN_INSN(insn, "unsupported instruction in callable function"); - return 1; + if (func) { + if (!next_insn || !next_insn->hint) { + WARN_INSN(insn, "unsupported instruction in callable function"); + return 1; + } + break; } return 0; |