plpks_wrap_object(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

hii bestie πŸ’– welcome to the plpks_wrap_object(9) page from the Kernel API Manual. plpks_wrap_object is literally here to wrap an object using the default wrapping key stored in the PLPKS. no cap, that's the whole name vibe ✨


✨ SYNOPSIS ✨

the signature is giving very serious kernel business, so here it is exactly:

int plpks_wrap_object (u8 **input_buf , u32 input_len , u16 wrap_flags ,
       u8 **output_buf , u32 *output_len );

πŸŽ€ ARGUMENTS πŸŽ€

  • input_buf β€” buffer containing the data to be wrapped 🫢
  • input_len β€” length of the input buffer
  • wrap_flags β€” object wrapping flags
  • output_buf β€” buffer to store the wrapped data
  • output_len β€” length of the output buffer

πŸ’… DESCRIPTION πŸ’…

okay so the H_PKS_WRAP_OBJECT HCALL is the main character here: it wraps an object using a wrapping key stored in the PLPKS and returns the wrapped object to the caller. periodt πŸ’…

The caller provides a label to the wrapping key with the 'wrapping key' policy set that must have been previously created with the H_PKS_GEN_KEY HCALL. The provided object is then encrypted with the wrapping key and additional metadata, and the result is returned to the user. The metadata includes the wrapping algorithm and the wrapping key name, so those parameters are not required during unwrap. iykyk ✨

Possible reasons for the returned errno values β€” bestie, this list is long but every bit matters πŸ‘‘:

  • -ENXIO β€” if PLPKS is not supported
  • -EIO
    • if PLPKS access is blocked due to the LPAR's state
    • if PLPKS modification is blocked due to the LPAR's state
    • if an error occurred while processing the request
  • -EINVAL
    • if invalid authorization parameter
    • if invalid wrapping key label parameter
    • if invalid wrapping key label length parameter
    • if invalid or unsupported object wrapping flags
    • if invalid input buffer parameter
    • if invalid input buffer length parameter
    • if invalid output buffer parameter
    • if invalid output buffer length parameter
    • if invalid continue token parameter
    • if the wrapping key is not compatible with the wrapping algorithm
  • -EPERM β€” if access is denied
  • -ENOENT β€” if the requested wrapping key was not found
  • -EBUSY β€” if unable to handle the request or long running operation initiated, retry later.

πŸ”₯ RETURN πŸ”₯

On success 0 is returned, a negative errno if not. that's it, that's the return vibe 😌


πŸ‘‘ SEE ALSO πŸ‘‘

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

and the whole plpks squad, in original order because we respect the lore πŸ¦‹:


Final footer vibe check πŸŽ€: source/version ./arch/powerpc/platforms/pseries, date October 2026, manual title plpks_wrap_object(9). bye bestie, go wrap something cute πŸ¦‹πŸ’–

πŸ“¦ where this page comes from