common_perm(9)
π common_perm β the kernel manual, but make it make sense
okay so bestie, we're looking at common_perm(9) from the Kernel API Manual β and she's lowkey iconic. buckle up π
β¨ NAME β¨
common_perm β the basic common permission check wrapper fn for paths. that's it, that's her whole job, and she ate π
πΈ SYNOPSIS πΈ
int common_perm (const char *op , const struct path *path , u32 mask ,
struct path_cond *cond );
so she takes four things and gives you back an int. simple. elegant. no cap. β¨
π¦ ARGUMENTS π¦
opβ the operation being checked. like, what are you even trying to do, bestie? πpathβ the path to check permission of. and listen β this one is NOT NULL. she does not play about that. π«maskβ the requested permissions mask. basically the permission wishlist. πcondβ conditional info for the permission request. also NOT NULL. two wholeNOT NULLs, she's serious. π
fr fr do not passNULLforpathorcond. that's not a vibe check you wanna fail π
π RETURN π
returns 0 β or else an error code if there's an error or permission denied. so, zero means slay, anything else means go touch grass and fix your permissions π«Ά
π SEE ALSO π
Kernel file ./security/apparmor/lsm.c and honestly the whole friend group:
common_perm_cond(9)common_perm_dir_dentry(9)common_perm_rm(9)common_perm_create(9)apparmor_uring_override_creds(9)apparmor_uring_sqpoll(9)apparmor_bprm_committing_creds(9)apparmor_bprm_committed_creds(9)apparmor_sk_clone_security(9)apparmor_unix_stream_connect(9)apparmor_unix_may_send(9)apparmor_socket_post_create(9)apparmor_socket_bind(9)apparmor_socket_getpeersec_stream(9)apparmor_socket_getpeersec_dgram(9)apparmor_sock_graft(9)apparmor_socket_sock_rcv_skb(9)set_init_ctx(9)
all linked, all relevant, all invited to the group chat π
and that's the whole page, bestie. this one lives in ./security/apparmor and the version tag says October 2026 β so she's from the future, main character energy only βπ
π¦ 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