match_mnt_flags(9)
π match_mnt_flags β Kernel API Manual, section 9 π
okay so bestie, welcome to the match_mnt_flags(9) page β¨ this one's a little function living in the kernel's AppArmor mount code, and honestly? she's doing an ordered match on mount flags, which is kind of the whole plot. let's get into it π¦
β¨ SYNOPSIS β¨
aa_state_t match_mnt_flags (const struct aa_dfa *dfa , aa_state_t state
, unsigned long flags );
that's the whole vibe, no cap. three args in, one state out π
πΈ ARGUMENTS πΈ
dfaβ the dfa you're matching against, bestie. that's the automaton in question π§stateβ the state you're starting from. like, where the walk begins β¨flagsβ the mount flags you're matching against. yes, those flags π
π DESCRIPTION π
okay so here's the tea β mount flags are encoded as an ordered match. and the reason she does that instead of just checking against a simple bitmask? it's giving flexibility, because the ordered-match setup allows for logical operations on the flags π₯ that's the whole point β a plain bitmask check couldn't do that, so we don't do it. periodt π
π RETURN π
the next state after the flags match π« that's it, that's the return value, no extra lore π«Ά
π SEE ALSO π
- Kernel file
./security/apparmor/mount.c(that's where the magic lives π ) audit_cb(9)match_mnt_path_str(9)match_mnt(9)
lowkey a reminder bestie: this page is from ./security/apparmor, and it's dated October 2026 β so if you're reading this in the future, hey, you're right on time πΈ mwah, go read the rest of the family, they all slay π
π¦ 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