Skip to content

Commit 8fb54fe

Browse files
jgross1gregkh
authored andcommitted
objtool/x86: allow syscall instruction
commit dda014b 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 <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Co-developed-by: Peter Zijlstra <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent aac984c commit 8fb54fe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/objtool/check.c

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

37213721
case INSN_CONTEXT_SWITCH:
3722-
if (func && (!next_insn || !next_insn->hint)) {
3723-
WARN_INSN(insn, "unsupported instruction in callable function");
3724-
return 1;
3722+
if (func) {
3723+
if (!next_insn || !next_insn->hint) {
3724+
WARN_INSN(insn, "unsupported instruction in callable function");
3725+
return 1;
3726+
}
3727+
break;
37253728
}
37263729
return 0;
37273730

0 commit comments

Comments
 (0)