start_userspace(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… start_userspace(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so picture this: you're deep in the kernel, you want a whole new userspace process to just exist, and this little function is the girlboss that sets the stage for it. it's giving backstage-pass energy. ✨


πŸ¦‹ NAME πŸ¦‹

start_userspace β€” the one that prepares a brand-new userspace process. literally its whole job. no cap. πŸ’–


🌸 SYNOPSIS 🌸

int start_userspace (struct mm_id *mm_id );

yes bestie, that's the whole signature. int out, one pointer in. clean, iconic, minimal. πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • mm_id β€” the corresponding struct mm_id. that's it, that's the argument. it's the matching struct mm_id for this whole operation, so don't go handing it some random other one, iykyk. 🫢

✨ DESCRIPTION ✨

so what actually happens? two things, and they're both important so don't skip:

  1. it setups a new temporary stack page β€” yes, the manpage says "setups", we're keeping it, it's canon β€” and that page is the one getting used while userspace_tramp runs. temporary stack, main character energy, does its bit then dips. 🌈
  2. it clones the kernel process into a new userspace process β€” with FDs only. that's the whole vibe: file descriptors only, nothing extra invited to the party. πŸ’…

πŸ”₯ RETURN πŸ”₯

  • when positive β†’ you get the process id of the new userspace process. slay, a fresh PID, a fresh little guy. 🐣
  • when negative β†’ you get an error number. not slay, but informative. 😭
and then there's this: FIXME: can PIDs become negative?! β€” genuinely one of the great unanswered questions of our time, and the manpage is just as confused as we are. πŸ’€ it's a real note in the original, we do not resolve it, we simply sit with it. πŸ™ˆ

🧚 SEE ALSO 🧚

  • Kernel file ./arch/um/os-Linux/skas/process.c β€” go read it, that's where the lore lives. πŸ“–

and that's the page, bestie!! πŸ“ this one's from the ./arch/um/os-Linux/skas corner of the source tree, dated October 2026 β€” so like, future-dated and mysterious and honestly kind of iconic for it. mwah, go forth and start some userspace πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from