diff options
author | Juergen Gross <jgross@suse.com> | 2024-11-29 15:47:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-19 18:13:23 +0100 |
commit | c6eef3643608616b1dfdcf325738329d19d5d9e2 (patch) | |
tree | b7adb6bd3fb2a32ac806b464825a3957d773f88e | |
parent | 505b3523644d80f80f8d3de6d311ad1fa5a8242b (diff) |
objtool/x86: allow syscall instruction
commit dda014ba59331dee4f3b773a020e109932f4bd24 upstream.
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 <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Co-developed-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 6604f5d038aa..f0d8796b984a 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; |