linux/arch/arm64
Ondrej Mosnacek b3f937e891 bpf, arm64: Do not audit capability check in do_jit()
[ Upstream commit 189e5deb94 ]

Analogically to the x86 commit 881a9c9cb7 ("bpf: Do not audit
capability check in do_jit()"), change the capable() call to
ns_capable_noaudit() in order to avoid spurious SELinux denials in audit
log.

The commit log from that commit applies here as well:
"""
The failure of this check only results in a security mitigation being
applied, slightly affecting performance of the compiled BPF program. It
doesn't result in a failed syscall, an thus auditing a failed LSM
permission check for it is unwanted. For example with SELinux, it causes
a denial to be reported for confined processes running as root, which
tends to be flagged as a problem to be fixed in the policy. Yet
dontauditing or allowing CAP_SYS_ADMIN to the domain may not be
desirable, as it would allow/silence also other checks - either going
against the principle of least privilege or making debugging potentially
harder.

Fix it by changing it from capable() to ns_capable_noaudit(), which
instructs the LSMs to not audit the resulting denials.
"""

Fixes: f300769ead ("arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Link: https://lore.kernel.org/r/20251204125916.441021-1-omosnace@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-01-19 13:09:41 +01:00
..
boot arm64: dts: imx8mm-venice-gw72xx: remove unused sdhc1 pinctrl 2026-01-19 13:09:23 +01:00
configs arm64: defconfig: build imx-sdma as a module 2022-04-08 14:24:00 +02:00
crypto crypto: arm64/gcm - Select AEAD for GHASH_ARM64_CE 2022-08-17 14:23:26 +02:00
hyperv arm64: hyperv: Initialize hypervisor on boot 2021-08-04 16:54:36 +00:00
include arm64: cputype: Add Neoverse-V3AE definitions 2025-10-29 14:03:13 +01:00
kernel arm64: errata: Apply workarounds for Neoverse-V3AE 2025-10-29 14:03:13 +01:00
kvm KVM: arm64: Eagerly switch ZCR_EL{1,2} 2025-05-02 07:44:17 +02:00
lib arm64: insn: Add support for encoding DSB 2025-06-27 11:05:37 +01:00
mm mm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd() 2025-08-28 16:24:32 +02:00
net bpf, arm64: Do not audit capability check in do_jit() 2026-01-19 13:09:41 +01:00
tools arm64: errata: Add workaround for Arm errata 3194386 and 3312417 2024-08-19 05:45:40 +02:00
xen xen/arm: call uaccess_ttbr0_enable for dm_op hypercall 2025-06-27 11:05:22 +01:00
Kbuild arm64: hyperv: Add Hyper-V hypercall and register access utilities 2021-08-04 16:54:36 +00:00
Kconfig arm64: errata: Apply workarounds for Neoverse-V3AE 2025-10-29 14:03:13 +01:00
Kconfig.debug arm64: remove TEXT_OFFSET randomization 2020-06-15 13:10:59 +01:00
Kconfig.platforms irqchip/exiu: Fix acknowledgment of edge triggered interrupts 2022-06-09 10:22:54 +02:00
Makefile arm64: Force position-independent veneers 2024-11-01 01:52:35 +01:00