p_next(9)
β¨ p_next(9) β¨
okay so bestie, this is a page from the Kernel API Manual β like, kernel-level manual, very serious, very demure β and today's main character is p_next. it lives in ./security/apparmor and honestly? it's giving "quiet little helper function that keeps the whole profile listing from falling apart." π
πΈ NAME πΈ
p_next β read the next profile entry
like, literally just go get the next one. that's the whole job. no cap. β¨
π¦ SYNOPSIS π¦
void * p_next (struct seq_file *f , void *p , loff_t *pos );
yep, that's it. three args, one pointer back. iconic minimalism. π
π ARGUMENTS π
fβ theseq_fileyou're filling. it's the little output buffer-ish situation, and you're feeding it. π«Άpβ the profile that was previously returned. like, the one you already got handed last time. we're continuing from there, bestie.posβ the current position. your spot in the lineup. π
β RETURN β
you get the next profile after p, or NULL if there isn't one. so if you get NULL... that's it, that's the end of the list, no more profiles, show's over, curtain down. π
π₯ DESCRIPTION π₯
it may acquire/release locks in the namespace tree as necessary.
and yes, that "may acquire/release locks" part is doing a lot of heavy lifting there β it's a real caveat, not just flavour text. the locking happens in the namespace tree as necessary. lowkey important. π
π SEE ALSO π
the kernel file lives at ./security/apparmor/apparmorfs.c β that's home base, iykyk. π
and here's the whole friend group, no one left out, periodt:
mangle_name(9)__aafs_setup_d_inode(9)aafs_create(9)aafs_create_file(9)aafs_create_dir(9)aafs_remove(9)aa_simple_write_to_buffer(9)aa_get_data_from_compressed(9)query_data(9)query_label(9)aa_write_access(9)__next_ns(9)__first_profile(9)__next_profile(9)next_profile(9)p_start(9)p_stop(9)seq_show_profile(9)entry_create_file(9)entry_create_dir(9)entry_remove_file(9)entry_remove_dir(9)aa_destroy_aafs(9)aa_create_aafs(9)
kisses bestie, go read the next profile π
this has been p_next(9) from the Kernel API Manual, sourced from ./security/apparmor, dated October 2026. slay, bye! π§β¨
π¦ 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