__strn_find_child(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is __strn_find_child(9) from the Kernel API Manual, and its whole personality is: find a profile on the @head list using a substring of @name πŸ’…βœ¨. That's the mission, bestie β€” list head, name, substring length, go find the matching profile.

✨ SYNOPSIS ✨

struct aa_profile * __strn_find_child (struct list_head *head , const
char *name , int len );

πŸŽ€ ARGUMENTS πŸŽ€

  • head β€” list to search, and it is NOT NULL β€” like, do not come in here with a null head, no cap 🫢.
  • name β€” name of profile, also NOT NULL β€” null name? not today, bestie πŸ™ˆ.
  • len β€” length of name substring to match. That's the substring-energy you're matching with, periodt.

πŸ¦‹ DESCRIPTION πŸ¦‹

Requires: rcu_read_lock be held.

That's not a suggestion, bestie β€” Requires: rcu_read_lock be held. So hold that lock before you go searching. iykyk πŸ”₯.

🌸 RETURN 🌸

It returns an unrefcounted profile ptr, or NULL if not found. That's it β€” pointer if it finds your profile, NULL if not, and the pointer is unrefcounted. Slay πŸ’–.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./security/apparmor/policy.c β€” plus the whole reference squad, because we are listing every single one:


source/version: ./security/apparmor Β· date: October 2026 β€” mwah, bestie, go hold that rcu_read_lock and slay πŸ’–βœ¨

πŸ“¦ where this page comes from