Commit dda014ba authored by Juergen Gross's avatar Juergen Gross
Browse files

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: default avatarAndrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Co-developed-by: default avatarPeter Zijlstra <peterz@infradead.org>
parent efbcd61d
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -3820,10 +3820,13 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
			break;

		case INSN_CONTEXT_SWITCH:
			if (func && (!next_insn || !next_insn->hint)) {
			if (func) {
				if (!next_insn || !next_insn->hint) {
					WARN_INSN(insn, "unsupported instruction in callable function");
					return 1;
				}
				break;
			}
			return 0;

		case INSN_STAC: