plpks_read_fw_var(9)
π plpks_read_fw_var β the group-chat rundown π
okay so real talk, bestie: this one comes straight out of the Kernel API Manual (section 9, kernel internals, iykyk) and it's called plpks_read_fw_var. Let's get into it πΈ
β¨ NAME β¨
plpks_read_fw_var β fetches the data for the specified variable that is owned by the firmware consumer π«Ά
β¨ SYNOPSIS β¨
int plpks_read_fw_var(struct plpks_var *var);
β¨ ARGUMENTS β¨
varβ the variable we're reading out of the PLPKS. that's the whole mood π
β¨ DESCRIPTION β¨
so the tea is: the consumer or the owner of the object is the firmware. not us. we're just visiting π§
The H_PKS_READ_OBJECT HCALL is the thing that actually reads an object from the PLPKS β that's the hypercall doing the heavy lifting, main character energy fr fr.
Here's the part you cannot skip, bestie: the caller has to allocate the buffer var->data and specify the length for this buffer in var->datalen. You're not getting a free buffer out of this function, no cap. And if no buffer is provided at all? Then var->datalen gets populated with the requested object's size instead β so you can call it once to ask "how big even is this?", then allocate, then call again π lowkey iconic two-step.
Possible reasons for the returned errno values, laid out all pretty:
-ENXIOβ if PLPKS is not supported π-EIOβ if PLPKS access is blocked due to the LPAR's state, or 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 π-EBUSYβ if unable to handle the request π
fr fr read that -EFBIG line twice β that's the "your buffer was cute but too small" error and it will find you π
β¨ RETURN β¨
On success, 0 is returned. If not? A negative errno. That's it, that's the whole vibe check π
β¨ SEE ALSO β¨
the kernel file, right here:
./arch/powerpc/platforms/pseries/plpks.c
and the whole PLPKS friend group, all showing up to the party π
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_os_var(9)plpks_read_bootloader_var(9)plpks_populate_fdt(9)plpks_early_init_devtree(9)
and that's the page!! mwah π this lil manpage lives in ./arch/powerpc/platforms/pseries and it's dated October 2026 β go off, archive girlies πΈβ¨π
π¦ 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