acrn-kernel/arch/arm64/kernel
Mark Rutland d87d9a23a1 drivers/perf: pmuv3: don't expose SW_INCR event in sysfs
[ Upstream commit ca6f537e459e2da4b331fe8928d1a0b0f9301f42 ]

The SW_INCR event is somewhat unusual, and depends on the specific HW
counter that it is programmed into. When programmed into PMEVCNTR<n>,
SW_INCR will count any writes to PMSWINC_EL0 with bit n set, ignoring
writes to SW_INCR with bit n clear.

Event rotation means that there's no fixed relationship between
perf_events and HW counters, so this isn't all that useful.

Further, we program PMUSERENR.{SW,EN}=={0,0}, which causes EL0 writes to
PMSWINC_EL0 to be trapped and handled as UNDEFINED, resulting in a
SIGILL to userspace.

Given that, it's not a good idea to expose SW_INCR in sysfs. Hide it as
we did for CHAIN back in commit:

  4ba2578fa7 ("arm64: perf: don't expose CHAIN event in sysfs")

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20231204115847.2993026-1-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-05 20:12:46 +00:00
..
pi
probes
vdso
vdso32
.gitignore
Makefile
acpi.c
acpi_numa.c
acpi_parking_protocol.c
alternative.c
armv8_deprecated.c
asm-offsets.c
cacheinfo.c
compat_alignment.c
cpu-reset.S
cpu_errata.c arm64: Rename ARM64_WORKAROUND_2966298 2024-01-31 16:17:01 -08:00
cpu_ops.c
cpufeature.c arm64: cpufeature: Fix CLRBHB and BC detection 2023-10-10 22:00:37 +02:00
cpuidle.c
cpuinfo.c
crash_core.c
crash_dump.c
debug-monitors.c
efi-entry.S
efi-header.S
efi-rt-wrapper.S
efi.c
elfcore.c
entry-common.c
entry-fpsimd.S
entry-ftrace.S
entry.S arm64: Rename ARM64_WORKAROUND_2966298 2024-01-31 16:17:01 -08:00
fpsimd.c arm64/fpsimd: Only provide the length to cpufeature for xCR registers 2023-09-13 09:42:29 +02:00
ftrace.c
head.S
hibernate-asm.S
hibernate.c
hw_breakpoint.c hw_breakpoint: fix single-stepping when using bpf_overflow_handler 2023-09-23 11:11:00 +02:00
hyp-stub.S
idle.c
idreg-override.c
image-vars.h
image.h
io.c
irq.c arm64: irq: set the correct node for VMAP stack 2024-02-05 20:12:46 +00:00
jump_label.c
kaslr.c
kexec_image.c
kgdb.c
kuser32.S
machine_kexec.c
machine_kexec_file.c
module-plts.c arm64: module: Use module_init_layout_section() to spot init sections 2023-09-02 09:16:19 +02:00
module.c
mte.c
paravirt.c
patching.c
pci.c
perf_callchain.c
perf_event.c drivers/perf: pmuv3: don't expose SW_INCR event in sysfs 2024-02-05 20:12:46 +00:00
perf_regs.c
pointer_auth.c
process.c
proton-pack.c
psci.c
ptrace.c arm64/ptrace: Clean up error handling path in sve_set_common() 2023-09-13 09:42:28 +02:00
reloc_test_core.c
reloc_test_syms.S
relocate_kernel.S
return_address.c
sdei.c arm64: sdei: abort running SDEI handlers during crash 2023-09-13 09:43:03 +02:00
setup.c
signal.c arm64/ptrace: Ensure that SME is set up for target when writing SSVE state 2023-08-23 17:52:41 +02:00
signal32.c
sigreturn32.S
sleep.S
smccc-call.S
smp.c arm64: sdei: abort running SDEI handlers during crash 2023-09-13 09:43:03 +02:00
smp_spin_table.c
stacktrace.c
suspend.c
sys.c
sys32.c
sys_compat.c
syscall.c
time.c
topology.c
trace-events-emulation.h
traps.c
vdso-wrap.S
vdso.c
vdso32-wrap.S
vmlinux.lds.S