[PATCH bpf-next 1/2] bpf: add bpf_init_inode_xattr kfunc for atomic inode labeling
bot+bpf-ci at kernel.org
bot+bpf-ci at kernel.org
Mon Apr 27 00:51:09 UTC 2026
> diff --git a/fs/bpf_fs_kfuncs.c b/fs/bpf_fs_kfuncs.c
> --- a/fs/bpf_fs_kfuncs.c
> +++ b/fs/bpf_fs_kfuncs.c
[ ... ]
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
[ ... ]
> @@ -19272,6 +19299,33 @@ struct bpf_insn addr[2] = { BPF_LD_IMM64(BPF_REG_2, (long)kptr_struct_meta) };
> insn_buf[4] = BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1);
> insn_buf[5] = BPF_ALU64_IMM(BPF_NEG, BPF_REG_0, 0);
> *cnt = 6;
> + } else if (env->insn_aux_data[insn_idx].init_inode_xattr_fixup) {
> + struct bpf_kfunc_desc *impl_desc;
> +
> + impl_desc = find_kfunc_desc(env->prog,
> + special_kfunc_list[KF_bpf_init_inode_xattr_impl], 0);
> + if (!impl_desc) {
> + verifier_bug(env, "bpf_init_inode_xattr_impl desc not found");
> + return -EFAULT;
> + }
> +
> + /* Rewrite bpf_init_inode_xattr(name, value) to inject xattrs and
> + * xattr_count loaded from the saved inode_init_security ctx.
> + */
This isn't a bug, but the comment style needs adjustment. In
kernel/bpf/verifier.c, multi-line comments should have the opening /*
on its own line:
/*
* Rewrite bpf_init_inode_xattr(name, value) to inject xattrs
* and xattr_count loaded from the saved inode_init_security
* ctx.
*/
[ ... ]
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/24970971112
More information about the Linux-security-module-archive
mailing list