LWP_CACHE_CREDS(9)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ’– LWP_CACHE_CREDS(9) πŸ’–

okay so bestie, we're in the Kernel Developer's Manual and this page is literally all about LWP_CACHE_CREDS β€” the sync-up that keeps an LWP's cached credential matching the process credential. ✨

🌸 NAME 🌸

LWP_CACHE_CREDS β€” synchronize LWP credential with process credential 🫢

πŸŽ€ SYNOPSIS πŸŽ€

#include <sys/lwp.h>

void
LWP_CACHE_CREDS(lwp_t *l, struct proc *p);

πŸ¦‹ DESCRIPTION πŸ¦‹

LWP_CACHE_CREDS() updates the LWP's cached credential so it matches the process' credential if the latter has been changed after the last synchronization. no cap, that's the whole vibe check. πŸ’…

Every LWP has its own cached credential so that it can be used without worrying about potential of other LWP changing the process' credential. kauth_cred_get() returns the cached credential. πŸŽ€

LWP_CACHE_CREDS() is called by MD entry code for system call and various traps. LWPs which can live in kernel for long period should call LWP_CACHE_CREDS() by itself to refresh its credential. ⭐

LWP_CACHE_CREDS() takes the following arguments.

  • l β€” the calling lwp. πŸ‘‘
  • p β€” the process which the lwp l belongs to. 🫢
lowkey important: LWP_CACHE_CREDS() might be implemented as a macro. so don't be shocked if it's giving macro energy. πŸ’€

🌈 SEE ALSO 🌈


that's the whole page, bestie β€” brought to you by Debian, dated December 9, 2007. periodt. πŸ’–βœ¨

πŸ“¦ where this page comes from