from_kprojid_munged(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 from_kprojid_munged(9) 🌸

okay so bestie, welcome to the Kernel API Manual β€” this page is literally all about from_kprojid_munged, and by the end you're gonna be so comfy with projids it's giving main character energy πŸ’…


✨ NAME ✨

from_kprojid_munged β€” Create a projiid from a kprojid user-namespace pair. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

projid_t from_kprojid_munged (struct user_namespace *targ , kprojid_t kprojid );

πŸŽ€ ARGUMENTS πŸŽ€

  • targ β€” the user namespace we want a projid in. like, the destination vibe check 🌈
  • kprojid β€” the kernel internal projid to start with. this is your raw ingredient, no cap πŸ“

πŸ’– DESCRIPTION πŸ’–

So what does it actually do? Map kprojid into the user-namespace specified by targ and return the resulting projid. That's the whole plot. Slay. ✨

There is always a mapping into the initial user_namespace. always. it's iconic like that πŸ‘‘

Unlike from_kprojid, from_kprojid_munged never fails and always returns a valid projid. never ever, fr fr. This makes from_kprojid_munged appropriate for use in syscalls like stat and where failing the system call and failing to provide a valid projid are not an options. like, sometimes you just cannot come back empty-handed, and this function gets it 😭

heads up bestie: if kprojid has no mapping in targ, then OVERFLOW_PROJID is returned. that's your fallback value, and no, there's no error code to check β€” it's just the overflow projid, periodt πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/user_namespace.c 🌸

go read those too, iykyk 🧚


k that's the whole page bestie, and here's your cute little sign-off: this one comes from ./kernel, dated October 2026, and it's filed under from_kprojid_munged(9). take care of her πŸ’œπŸŽ€

πŸ“¦ where this page comes from