aa_dfa_match_until(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aa_dfa_match_until(9) β€” from the Kernel API Manual, bestie

okay so this one's a whole vibe for anyone poking at AppArmor's DFA internals ✨ the manual name for this page is literally aa_dfa_match_until, so like… that's your entry point, iykyk πŸŽ€


✨ NAME ✨

aa_dfa_match_until β€” the way this one traverses @dfa until it hits an accept state or runs out of input πŸ¦‹ periodt.


🌸 SYNOPSIS 🌸

aa_state_t aa_dfa_match_until (const struct aa_dfa *dfa , aa_state_t
start , const char *str , const char **retpos );

like, that's the whole signature, nothing fnord-y about it πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • dfa β€” the dfa we're matching str against. and yes, it's (NOT NULL) β€” no cap, you cannot pass a null here, she will not be slaying that πŸ’€
  • start β€” the state of the dfa where you're kicking the match off πŸ‘‘
  • str β€” the null terminated string of bytes you're matching against the dfa. also (NOT NULL), same energy as dfa fr fr 🫢
  • retpos β€” gets set to the first character in str after the match OR the end of string 🌈 literally the pointer that tells you where you stopped consuming, and that's honestly so helpful

πŸ¦‹ DESCRIPTION πŸ¦‹

aa_dfa_match will match str against the dfa and return the state it finished matching in β€” that's the whole arc of this function, main character energy only 🌸

lowkey the best part? that final state is multi-use:

  • you can use it to look up the accepting label 🏷️
  • or as the start state of a continuing match πŸ”₯ (yes bestie, chaining is a thing)

πŸ’œ RETURN πŸ’œ

the final state reached after input is consumed β€” that's it, that's the return value πŸ’…


🧚 SEE ALSO 🧚

Kernel file ./security/apparmor/match.c β€” the source itself, go read her, she ate ✨


ngl go read match.c if you wanna know what's actually under the hood β€” that's where the lore lives πŸ™ˆ

that's the whole page bestie, no notes πŸ’– this one ships out of ./security/apparmor and the docs are dated October 2026, page name still aa_dfa_match_until(9) β€” mwah, go forth and match πŸŒŸπŸ¦‹πŸ’…

πŸ“¦ where this page comes from