plpks_read_os_var(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay so this is plpks_read_os_var β€” the little function that fetches the data for the specified variable that is owned by the OS consumer. that's it, that's the whole vibe πŸ’…

this page lives in the Kernel API Manual, btw, in case you were wondering where we're at πŸŽ€


✨ SYNOPSIS ✨

int plpks_read_os_var (struct plpks_var *var );

🫢 ARGUMENTS 🫢

  • var β€” the variable to be read from the PLPKS. that's the one, bestie, that's who we're reading πŸ’–

πŸ’€ DESCRIPTION πŸ’€

so like, lowkey the whole deal here is that the consumer or the owner of the object is the os kernel. main character energy, honestly πŸ‘‘

the H_PKS_READ_OBJECT HCALL is the thing that actually reads an object from the PLPKS. iconic.

now listen up because this part matters πŸ”₯ β€” the caller must allocate the buffer var->data and specify the length for this buffer in var->datalen. that's on you, not on the function. no cap.

but hmm, what if you don't have a buffer yet? 🧚 then it's fine, because if no buffer is provided, var->datalen will be populated with the requested object's size. so you can literally ask "how big is this thing" first and then come back with the right-sized buffer. we love a two-step moment πŸ’…

😭 possible reasons for the returned errno values

  • -ENXIO β€” if PLPKS is not supported πŸ™ˆ
  • -EIO β€” if PLPKS access is blocked due to the LPAR's state; if an error occurred while processing the request πŸ˜΅β€πŸ’«
  • -EINVAL β€” if invalid authorization parameter; if invalid object label parameter; if invalid object label len parameter; if invalid output data parameter; if invalid output data len parameter 🚩
  • -EPERM β€” if access is denied πŸ™…β€β™€οΈ
  • -ENOENT β€” if the requested object was not found πŸ•΅οΈβ€β™€οΈ
  • -EFBIG β€” if the requested object couldn't be stored in the buffer provided 😀 (buffer too smol, tragic)
  • -EBUSY β€” if unable to handle the request πŸ’€

🌈 RETURN 🌈

on success, 0 is returned. if not? a negative errno. simple as that, bestie ✨


πŸ“ SEE ALSO πŸ“

the kernel file, right here:

./arch/powerpc/platforms/pseries/plpks.c

and the whole PLPKS friend group, obviously πŸ‘‘:

plpks_get_version(9), plpks_get_objoverhead(9), plpks_get_maxpwsize(9), plpks_get_maxobjectsize(9), plpks_get_maxobjectlabelsize(9), plpks_get_totalsize(9), plpks_get_usedspace(9), plpks_get_supportedpolicies(9), plpks_get_maxlargeobjectsize(9), plpks_get_signedupdatealgorithms(9), plpks_get_wrappingfeatures(9), plpks_get_passwordlen(9), plpks_is_available(9), plpks_signed_update_var(9), plpks_write_var(9), plpks_remove_var(9), plpks_wrapping_is_supported(9), plpks_gen_wrapping_key(9), plpks_wrap_object(9), plpks_unwrap_object(9), plpks_read_fw_var(9), plpks_read_bootloader_var(9), plpks_populate_fdt(9), plpks_early_init_devtree(9)


and that's the page, bestie 🫢 this little gem comes from ./arch/powerpc/platforms/pseries, dated October 2026, and it's plpks_read_os_var(9) β€” go read some OS-owned variables, you got this πŸ’œβœ¨

πŸ“¦ where this page comes from