aa_dfa_leftmatch(9)
π 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 matchingstragainst. 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:
unpack_table(9)verify_table_headers(9)verify_dfa(9)dfa_free(9)aa_dfa_free_kref(9)remap_data16_to_data32(9)aa_dfa_unpack(9)aa_dfa_match_len(9)aa_dfa_match(9)aa_dfa_next(9)aa_dfa_match_until(9)aa_dfa_matchn_until(9)
twelve links. twelve icons. go read them all, i'll wait π
lowkey reminder:dfaandstrare 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
- 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