match_exception(9)
π match_exception(9) π
okay so welcome to the match_exception(9) page, bestie β this is a Kernel API Manual situation, and we're about to get into it. no cap, this one's a little function with a big job: it goes shopping through the exception list looking for a complete match. slay.
β¨ NAME β¨
match_exception β iterates the exception list trying to find a complete match
like, it literally walks the list. that's the whole vibe. πΆββοΈπ
πΈ SYNOPSIS πΈ
bool match_exception (struct list_head *exceptions , short type , u32
major , u32 minor , short access );
π ARGUMENTS π
exceptionsβ the list of exceptions. the lineup. the guest list. πtypeβ device type, and it's one ofDEVCG_DEV_BLOCKorDEVCG_DEV_CHAR.majorβ device file major number. and here's the cute part:~0matches all of them. yes, all. π«Άminorβ device file minor number, same deal,~0matches all.accessβ the permission mask. pick your fighters:DEVCG_ACC_READ,DEVCG_ACC_WRITE,DEVCG_ACC_MKNOD. π
π¦ DESCRIPTION π¦
so the rule is literally this: it counts as a complete match if an exception is found that will contain the entire range of the provided parameters. that's it. that's the whole criteria. if an exception only covers part of what you asked for? not a complete match, bestie, sorry. π
think of it as an exception that has to be big enough to hold everything you brought. no partial credit energy here β the word "complete" is doing heavy lifting and she's earned it. β¨
π₯ RETURN π₯
true in case it matches an exception completely. iconic. otherwise bestie you already know.
π SEE ALSO π
the kernel file lives at ./security/device_cgroup.c, and here's the whole friend group, fr fr:
dev_exception_clean(9)devcgroup_online(9)match_exception_partial(9)verify_new_ex(9)parent_allows_removal(9)may_allow_all(9)revalidate_active_exceptions(9)propagate_exception(9)devcgroup_legacy_check_permission(9)
π note the difference between this one and match_exception_partial(9) β one of them wants the whole range, and it is not the partial one. iykyk.
and that's the page! π mwah π β sourced from ./security, dated October 2026, and this has been match_exception(9), signing off like the main character she is. ππ
π¦ 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