diff options
| author | Like Xu <like.xu.linux@gmail.com> | 2026-08-18 19:29:18 +0800 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2026-09-14 13:01:08 +0100 |
| commit | 05fd5844cc83c1a51b0a38113a7ee196a69bda1d (patch) | |
| tree | 5c406eb93561ab6dfbd6152ce1fedb14abbb9881 /tools/perf/scripts/python/stackcollapse.py | |
| parent | bb6c7d2bf564cdaa24b14764b7126f5cab45965a (diff) | |
KVM: arm64: selftests: Fix EINJ handling in sea_to_user
sea_to_user drives EINJ injection through popen("echo ... > file"). A
failed write is hidden behind the shell pipeline, so a botched injection
is silently ignored and the test proceeds as if a poison were placed.
Drive the debugfs interface directly so a write failure is reported
rather than swallowed.
The EINJ support probe is also unreliable. It checks the ACPI EINJ table
with access(R_OK), but reading that table needs CAP_SYS_ADMIN, so the
check gives a false negative for unprivileged runs and skips a test that
could otherwise report a real problem. Probe by opening the debugfs
injection interface instead and classify errno: absence means EINJ is
not built or firmware lacks support, EACCES/EPERM means the test is not
running as root -- both are skips -- while anything else is a genuine
failure.
The injection path is only reachable through debugfs; the kernel EINJ
driver exposes no other interface, so the test must depend on it.
Link: https://lore.kernel.org/kvm/86y0le9cvz.wl-maz@kernel.org/
Signed-off-by: Like Xu <likexu@tencent.com>
Link: https://patch.msgid.link/20260818112920.26252-2-likexu@tencent.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
