RTAS(2)

πŸ’– RTAS(2) β€” the glow-up edition πŸ’–

ok bestie, welcome to RTAS(2), straight outta the System Calls Manual. section 2, we're in syscall territory, and this one is a whole vibe. let's get into it πŸ¦‹


✨ NAME ✨

rtas β€” Allows userspace to call RTAS (Run Time Abstraction Services)

no cap, that's literally the whole job description.


🌸 SYNOPSIS 🌸

int ppc_rtas (struct rtas_args *uargs);

one function, one struct pointer, main character energy fr fr.


πŸ’… DESCRIPTION πŸ’…

okay so, ppc_rtas is the lil doorway that lets userspace do its own manipulation of the RunTime Abstraction Services (aka RTAS, iykyk).

and what is RTAS for? it provides for a portable method of access and setting system information. like, for example, you could gather information on various system sensors, and set poweron values. very demure, very mindful, very portable. πŸ’–

RTAS is accessed via the /proc entry called "rtas". and the manipulations on RTAS? they're implemented via command line arguments on /proc/rtas. yes bestie, /proc/rtas, that's the one.

heads up though β€” the values for uargs vary greatly. like, wildly. so if you need more info, go see the view/arch/ppcKconfig file. that's where the lore lives πŸ“–βœ¨


🫢 RETURN VALUE 🫢

rtas returns 0 on success πŸŽ€ otherwise it returns one of the errors listed in the "Errors" section. so basically zero = slay, anything else = read the next section babes.


😭 ERRORS 😭

  • -EPERM β€” User does not have CAP_SYS_ADMIN capabilities. not you without the right permissions πŸ’€
  • -EFAULT β€” Problem copying uargs values to/from user space. the copy just didn't copy, and honestly? relatable.
  • -EINVAL β€” Either number of uargs passed in too large or size of uargs array too large. too much of a good thing, bestie. it's giving overpacked suitcase 🧳

πŸ‘‘ AUTHOR πŸ‘‘

Niki Rahimi. periodt. πŸ’œ


that's the whole page bestie, you ate it up 🌈⭐ and just so you know, this was the RTAS(2) page from the System Calls Manual β€” go be iconic with your /proc/rtas calls, ily πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from
  • centos-stream 10: man-pages 6.06-13.el10 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-Fedora-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • centos-stream 9: man-pages 6.04-10.el9 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-Fedora-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • fedora 43: man-pages 6.13-2.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-Fedora-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • fedora 43: man-pages 6.9.1-5.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-Fedora-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • fedora 44: man-pages 6.13-3.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-Fedora-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms