Re: [PATCH v6 bpf-next 0/7] Enable writing xattr from BPF programs
From: Song Liu <hidden>
Date: 2024-12-19 22:14:45
Also in:
bpf, lkml
From: Song Liu <hidden>
Date: 2024-12-19 22:14:45
Also in:
bpf, lkml
CI found a bug with this. I will resend. Sorry for the noise. Song
On Dec 19, 2024, at 12:25 PM, Song Liu [off-list ref] wrote: Add support to set and remove xattr from BPF program. Also add security.bpf. xattr name prefix. kfuncs are added to set and remove xattrs with security.bpf. name prefix. Update kfuncs bpf_get_[file|dentry]_xattr to read xattrs with security.bpf. name prefix. Note that BPF programs can read user. xattrs, but not write and remove them. To pick the right version of kfunc to use, a remap logic is added to btf_kfunc_id_set. This helps move some kfunc specific logic off the verifier core code. Also use this remap logic to select bpf_dynptr_from_skb or bpf_dynptr_from_skb_rdonly.