Skip to content

Commit dda014b

Browse files
committed
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 <andrew.cooper3@citrix.com> Signed-off-by: Juergen Gross <jgross@suse.com> Co-developed-by: Peter Zijlstra <peterz@infradead.org>
1 parent efbcd61 commit dda014b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tools/objtool/check.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3820,9 +3820,12 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
38203820
break;
38213821

38223822
case INSN_CONTEXT_SWITCH:
3823-
if (func && (!next_insn || !next_insn->hint)) {
3824-
WARN_INSN(insn, "unsupported instruction in callable function");
3825-
return 1;
3823+
if (func) {
3824+
if (!next_insn || !next_insn->hint) {
3825+
WARN_INSN(insn, "unsupported instruction in callable function");
3826+
return 1;
3827+
}
3828+
break;
38263829
}
38273830
return 0;
38283831

0 commit comments

Comments
 (0)