summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorFuad Tabba <fuad.tabba@linux.dev>2026-09-01 15:03:24 +0100
committerMarc Zyngier <maz@kernel.org>2026-09-14 11:26:51 +0100
commitdb89e04ddbb7838b40f7d7b59b69220212678702 (patch)
tree8cb1fecd6e2b1c8b8329ee31acaa0b59b44b2b28 /tools/perf/scripts/python/stackcollapse.py
parent3a189b358018d76020c65b5a52c90ea9353ef642 (diff)
KVM: arm64: Type-check hypercall arguments at the caller
kvm_call_hyp_nvhe() reduces its target to an SMCCC function number, so the compiler never sees a callable: arguments that are wrong in number, type or order are silently marshalled into registers. The kvm_call_hyp() wrappers only catch this on the VHE branch, and the pKVM-only hypercalls have no such branch. Declare each hypercall's signature once in kvm_hcall.h and generate a typed stub from it, in the mold of the syscall wrappers. Make kvm_call_hyp_nvhe() resolve to the stub so every caller is checked against the declared signature; a stale or mistyped call now fails to compile. The stubs inline to the same SMCCC call the untyped macro used to make: the compiled callers are unchanged, apart from hypercall returns now being tested at their declared width. The stage-2 protection arguments are declared u64 rather than enum kvm_pgtable_prot, as kvm_pgtable.h includes linux/kvm_host.h and the enum cannot be completed here. Assisted-by: Antigravity:gemini-3.1-pro Reviewed-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20260901140326.3812068-10-fuad.tabba@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions