bpf_get_dentry_xattr(9)
π bpf_get_dentry_xattr β get xattr of a dentry
okay so bestie, welcome to the manual page for bpf_get_dentry_xattr, straight out of the Kernel API Manual β¨ this one's a lil kfunc that goes and fetches an extended attribute for you. it's giving "running errands but make it kernel-space" π
β¨ SYNOPSIS β¨
__bpf_kfunc int bpf_get_dentry_xattr (struct dentry *dentry , const char
*name__str , struct bpf_dynptr *value_p );
that's the whole vibe. three args, one int coming back, no cap πΈ
π«Ά ARGUMENTS π«Ά
dentryβ the dentry you wanna pull the xattr from, bestie. that's the target π―name__strβ the name of the xattr. literally just the name, don't overthink it πvalue_pβ the output buffer where the xattr's value lands. it's the lil basket you're carrying the goods home in π§Ί
π DESCRIPTION π
so the actual job: get xattr name__str of dentry, and store the output in value_ptr. simple as that, periodt β¨
but hold up β for security reasons, only name__str with the prefixes"user."or"security.bpf."are allowed π ngl that's the important part, don't skip it. anything else? not allowed, and that is on purpose, bestie π
π RETURN π
- length of the xattr value on success π (slay)
- a negative value on error π
π¦ SEE ALSO π¦
Kernel file ./fs/bpf_fs_kfuncs.c β that's where the whole friend group hangs out π«Ά
bpf_get_task_exe_file(9)bpf_put_file(9)bpf_path_d_path(9)bpf_get_file_xattr(9)bpf_set_dentry_xattr_locked(9)bpf_remove_dentry_xattr_locked(9)bpf_set_dentry_xattr(9)bpf_remove_dentry_xattr(9)bpf_cgroup_read_xattr(9)bpf_sock_read_xattr(9)bpf_real_data_inode(9)
like, the entire xattr-adjacent crew. go read them too, iykyk ππ
and that's a wrap, bestie! π this page comes to you from ./fs, dated October 2026 β mwah, go get those xattrs, i'm obsessed with you fr fr βπ
π¦ 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