plpks_read_os_var(9)
π¦ 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms