aa_dfa_leftmatch(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, aa_dfa_leftmatch β€” it's the one that traverses @dfa to find state @str stops at. that's the whole vibe. literally what it does. ✨

welcome to the aa_dfa_leftmatch(9) glow-up, straight outta the Kernel API Manual β€” yes we're in the kernel docs channel now, put your hair up πŸŽ€


🌸 SYNOPSIS 🌸

aa_state_t aa_dfa_leftmatch (const struct aa_dfa *dfa , aa_state_t start
, const char *str , unsigned int *count );

look at her. iconic signature. four params, zero notes πŸ’…


✨ ARGUMENTS ✨

  • dfa β€” the dfa you're matching str against. NOT NULL, bestie, i'm serious πŸ™ˆ
  • start β€” which state of the dfa you're kicking things off in. your starting point, your main character entrance πŸ‘‘
  • str β€” the null terminated string of bytes to match against the dfa. also NOT NULL. (two NOT NULLs. the audacity. the standards.) 🫢
  • count β€” current count of longest left. that's it, that's the description, keep it πŸ“

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so aa_dfa_match will match str against the dfa and return the state it finished matching in. no cap. πŸ”₯

and the way that final state is useful? multiple things bestie:

  • you can use it to look up the accepting label ⭐
  • OR you can use it as the start state of a continuing match β€” like, keep going, the story isn't over πŸ’œ

it's giving "one function, two whole destinies." ngl kinda obsessed 😭


🌈 RETURN 🌈

final state reached after input is consumed. that's the return value. periodt. ✨


🧚 SEE ALSO 🧚

the whole friend group, fr fr β€” from the Kernel file ./security/apparmor/match.c:

twelve links. twelve icons. go read them all, i'll wait πŸ’–


lowkey reminder: dfa and str are NOT NULL. not me being dramatic, it's literally in the docs πŸ’€

and that's the page, bestie πŸŽ€ sign-off time: this whole thing lives in ./security/apparmor, dated October 2026, and yes β€” aa_dfa_leftmatch(9) is the moment, the myth, the legend. slay πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from