pvr_ioctl_u...adding_check(9)
π NAME π
okay so welcome to the pvr_ioctl_u...adding_check(9) page in the Kernel API Manual β the main character is pvr_ioctl_union_padding_check(9), and her whole job is to validate that the implicit padding between the end of a union member and the end of the union itself is zeroed. no cap. π
β¨ SYNOPSIS β¨
bool pvr_ioctl_union_padding_check (void *instance , size_t union_offset
, size_t union_size , size_t member_size );
π§ ARGUMENTS π§
the whole cast, in order, bestie:
instanceβ Pointer to the instance of the struct to validate.union_offsetβ Offset into the type ofinstanceof the target union. Must be 64-bit aligned.union_sizeβ Size of the target union in the type ofinstance. Must be 64-bit aligned.member_sizeβ Size of the target member in the target union specified byunion_offsetandunion_size. It is assumed that the offset of the target member is zero relative tounion_offset. Must be 64-bit aligned.
π¦ DESCRIPTION π¦
okay so lowkey you probably want to use PVR_IOCTL_UNION_PADDING_CHECK instead of calling this function directly, since that macro abstracts away much of the setup, and also provides some static validation. See its docs for details. itβs giving βlet the macro handle the annoying bitsβ energy β¨
π RETURN π
the vibe check comes back as:
trueif every byte between the end of the used member of the union and the end of that union is zeroed, orfalseotherwise.
π SEE ALSO π
Kernel file ./drivers/gpu/drm/imagination/pvr_device.h, plus the whole squad:
struct pvr_gpu_id(9)struct pvr_fw_version(9)struct pvr_device_data(9)struct pvr_device(9)struct pvr_file(9)PVR_HAS_FEATURE(9)PVR_FEATURE_VALUE(9)PVR_HAS_QUIRK(9)PVR_HAS_ENHANCEMENT(9)PVR_PACKED_BVNC(9)pvr_gpu_id_to_packed_bvnc(9)PVR_CR_FIELD_GET(9)pvr_cr_read32(9)pvr_cr_read64(9)pvr_cr_write32(9)pvr_cr_write64(9)pvr_cr_poll_reg32(9)pvr_cr_poll_reg64(9)pvr_round_up_to_cacheline_size(9)IOCTL validation helpers(9)PVR_STATIC_ASSERT_64BIT_ALIGNED(9)PVR_IOCTL_UNION_PADDING_CHECK(9)
mwah π β source/version: ./drivers/gpu/drm/imagination; date: October 2026; page title: pvr_ioctl_u...adding_check(9). bye bestie, go zero that padding π«Ά
π¦ 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