Skip to content

Commit 144e2bc

Browse files
author
CKI KWF Bot
committed
Merge: [rhel-9] bpf: Do not audit capability check in do_jit()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7544 JIRA: https://issues.redhat.com/browse/RHEL-105376 Backport one commit that silences CAP_SYS_ADMIN denials when BPF decides whether to apply a Spectre mitigation. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Approved-by: Viktor Malik <vmalik@redhat.com> Approved-by: Gregory Bell <grbell@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 771d56c + b62933c commit 144e2bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/net/bpf_jit_comp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,7 @@ st: if (is_imm8(insn->off))
24502450
/* Update cleanup_addr */
24512451
ctx->cleanup_addr = proglen;
24522452
if (bpf_prog_was_classic(bpf_prog) &&
2453-
!capable(CAP_SYS_ADMIN)) {
2453+
!ns_capable_noaudit(&init_user_ns, CAP_SYS_ADMIN)) {
24542454
u8 *ip = image + addrs[i - 1];
24552455

24562456
if (emit_spectre_bhb_barrier(&prog, ip, bpf_prog))

0 commit comments

Comments
 (0)