summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2024-11-29 15:47:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-19 18:06:13 +0100
commit4099bcd87390c64d6778a17d5495863a11a7b356 (patch)
tree645e2a64e2613364f0e8dce0727a540c15a76eaa
parente74011db51793c9fc5ed5abb6e12c77b806e04bd (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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 0506a48f124c..bcc9948645a0 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -3039,10 +3039,13 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
break;
case INSN_CONTEXT_SWITCH:
- if (func && (!next_insn || !next_insn->hint)) {
- WARN_FUNC("unsupported instruction in callable function",
- sec, insn->offset);
- return 1;
+ if (func) {
+ if (!next_insn || !next_insn->hint) {
+ WARN_FUNC("unsupported instruction in callable function",
+ sec, insn->offset);
+ return 1;
+ }
+ break;
}
return 0;