papr_vpd_create_handle(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

papr_vpd_create_handle β€” bestie, this is the one that creates a fd-based handle for reading VPD ✨


🌸 SYNOPSIS 🌸

long papr_vpd_create_handle (struct papr_location_code __user *ulc );

πŸŽ€ ARGUMENTS πŸŽ€

  • ulc β€” the location code, and it lives in user memory, okay? It's literally the thing that defines the scope of the VPD you're trying to retrieve 🫢

✨ DESCRIPTION ✨

Okay so this is the handler for the PAPR_VPD_IOC_CREATE_HANDLE ioctl command πŸ‘‘ It validates ulc and then instantiates an immutable VPD "blob" for it. That blob gets attached to a file descriptor so user space can read it, and the memory backing the blob is freed when the file is released. Clean, iconic, no leaks πŸ’…

The entire requested VPD is retrieved by this call β€” like, all the necessary RTAS interactions are performed before the fd ever gets returned to user space. This keeps the read handler simple and ensures the kernel can prevent interleaving of ibm,get-vpd call sequences πŸ”₯


πŸ¦‹ RETURN πŸ¦‹

The installed fd number if it slayed, -ve errno otherwise 😭


🌈 SEE ALSO 🌈

Kernel file ./arch/powerpc/platforms/pseries/papr-vpd.c struct rtas_ibm_get_vpd_params(9), rtas_ibm_get_vpd(9), vpd_sequence_begin(9), vpd_sequence_end(9)


okay that's the whole page, go read the source bestie πŸ§šπŸ’œ β€” with love from ./arch/powerpc/platforms/pseries, October 2026, and yes, we're still out here being papr_vpd_create_handle(9) πŸ’–πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from