linux/arch
Ondrej Mosnacek 881a9c9cb7 bpf: Do not audit capability check in do_jit()
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.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2369326
Fixes: d4e89d212d ("x86/bpf: Call branch history clearing sequence on exit")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Reviewed-by: Paul Moore <paul@paul-moore.com>
Link: https://lore.kernel.org/r/20251021122758.2659513-1-omosnace@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-10-21 18:22:47 -07:00
..
alpha assorted dead code removal around asm/pgtable.h 2025-10-03 11:37:50 -07:00
arc Ext4 bug fixes for 6.18-rc2, including 2025-10-15 07:51:57 -07:00
arm Remove long-stale ext3 defconfig option 2025-10-15 07:57:28 -07:00
arm64 ARM: 2025-10-18 07:07:14 -10:00
csky assorted dead code removal around asm/pgtable.h 2025-10-03 11:37:50 -07:00
hexagon Remove long-stale ext3 defconfig option 2025-10-15 07:57:28 -07:00
loongarch Use CONFIG_EXT4_FS instead of CONFIG_EXT3_FS in all of the defconfigs 2025-10-13 21:50:40 -04:00
m68k Ext4 bug fixes for 6.18-rc2, including 2025-10-15 07:51:57 -07:00
microblaze Ext4 bug fixes for 6.18-rc2, including 2025-10-15 07:51:57 -07:00
mips Ext4 bug fixes for 6.18-rc2, including 2025-10-15 07:51:57 -07:00
nios2 Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
openrisc Ext4 bug fixes for 6.18-rc2, including 2025-10-15 07:51:57 -07:00
parisc Ext4 bug fixes for 6.18-rc2, including 2025-10-15 07:51:57 -07:00
powerpc powerpc/fadump: skip parameter area allocation when fadump is disabled 2025-10-13 09:41:31 +05:30
riscv riscv: kprobes: convert one final __ASSEMBLY__ to __ASSEMBLER__ 2025-10-10 16:04:25 -06:00
s390 Kbuild fixes for 6.18 #1 2025-10-11 15:47:12 -07:00
sh Remove long-stale ext3 defconfig option 2025-10-15 07:57:28 -07:00
sparc Remove long-stale ext3 defconfig option 2025-10-15 07:57:28 -07:00
um updates for UML, notably 2025-10-06 12:10:55 -07:00
x86 bpf: Do not audit capability check in do_jit() 2025-10-21 18:22:47 -07:00
xtensa Ext4 bug fixes for 6.18-rc2, including 2025-10-15 07:51:57 -07:00
.gitignore
Kconfig rust: cfi: only 64-bit arm and x86 support CFI_CLANG 2025-10-09 19:36:45 -06:00