bpf_set_dentry_xattr(9)
π bpf_set_dentry_xattr β a Kernel API Manual moment β¨
okay bestie, welcome to bpf_set_dentry_xattr(9) π the kernel API manual page that's about to teach you how to slap an xattr onto a dentry. no cap, it's lowkey niche but highkey useful. iykyk π¦
β¨ NAME β¨
bpf_set_dentry_xattr β set a xattr of a dentry πΈ
π«Ά SYNOPSIS π«Ά
__bpf_kfunc int bpf_set_dentry_xattr (struct dentry *dentry , const char
*name__str , const struct bpf_dynptr *value_p , int flags );
that's the whole signature, bestie, copy it exactly, do not improvise π
π ARGUMENTS π
dentryβ bestie this is the dentry to get xattr from π (yes, the manpage literally says "get" here, we're just reporting the facts, don't come for me π)name__strβ the name of the xattr β¨value_pβ the xattr value πflagsβ flags to pass into filesystem operations π
π DESCRIPTION π
so what does this actually do? it sets xattr name__str of dentry to the value in value_ptr. periodt. that's the whole vibe π
π¨ security check incoming π¨ for security reasons, only name__str with the prefix "security.bpf." is allowed. like, only that prefix, nothing else, the kernel is not playing around π
also important, bestie, and i need you to hear me on this one:
the caller has not locked dentry->d_inode. π
that's not a suggestion, that's a state of the world. respect it π
π₯ RETURN π₯
0on success π₯³- a negative value on error π
π¦ SEE ALSO π¦
kernel file ./fs/bpf_fs_kfuncs.c plus the whole friend group π:
bpf_get_task_exe_file(9)bpf_put_file(9)bpf_path_d_path(9)bpf_get_dentry_xattr(9)bpf_get_file_xattr(9)bpf_set_dentry_xattr_locked(9)bpf_remove_dentry_xattr_locked(9)bpf_remove_dentry_xattr(9)bpf_cgroup_read_xattr(9)bpf_sock_read_xattr(9)bpf_real_data_inode(9)
π§ sign-off π§
this icon was brought to you by ./fs, dated October 2026, and it lives under the name bpf_set_dentry_xattr(9) πΈ go set some xattrs, bestie, but only with the right prefix π
β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms