iommu_copy_struct_to_user(9)
π iommu_copy_struct_to_user(9) π
okay so this is a page straight out of the Kernel API Manual bestie, and it's all about iommu_copy_struct_to_user β which honestly does exactly what it says on the tin: it reports iommu driver specific user space data. slay. that's the whole vibe. π¦
β¨ NAME β¨
iommu_copy_struct_to_user β Report iommu driver specific user space data π
πΈ SYNOPSIS πΈ
iommu_copy_struct_to_user (user_data , ksrc , data_type , min_last );
like, four things go in. no cap. π
π«Ά ARGUMENTS π«Ά
user_dataβ a pointer to astruct iommu_user_datathat says where the user space data is supposed to live. that's the drop-off address, basically. πksrcβ a pointer to an iommu driver specific user data, and that data is defined over ininclude/uapi/linux/iommufd.h. that's where the goods come from. πdata_typeβ the data type of theksrc. it must match withuser_data->type. not "should", not "ideally" β must. vibe check on types, no exceptions. π₯min_lastβ the last member of the data structure thatksrcpoints to, in the initial version. and yeah, it returns0for success, otherwise-error. so a big fat zero is the good ending. πβ¨
π SEE ALSO π
like a whole friend group, honestly β go say hi to all of them:
- Kernel file
./include/linux/iommu.h struct iommu_fault_page_request(9)struct iommu_fault(9)enum iommu_page_response_code(9)struct iommu_page_response(9)struct iopf_queue(9)struct iommu_resv_region(9)struct iommu_iotlb_gather(9)struct iommu_dirty_bitmap(9)struct iommu_dirty_ops(9)struct iommu_user_data(9)struct iommu_user_data_array(9)__iommu_copy_struct_from_user(9)iommu_copy_struct_from_user(9)__iommu_copy_struct_from_user_array(9)iommu_copy_struct_from_user_array(9)iommu_copy_struct_from_full_user_array(9)__iommu_copy_struct_to_user(9)struct iommu_ops(9)struct iommu_domain_ops(9)struct iommu_device(9)struct iommu_fault_param(9)struct dev_iommu(9)iommu_iotlb_gather_is_disjoint(9)iommu_iotlb_gather_add_range(9)iommu_iotlb_gather_add_page(9)struct iommu_fwspec(9)struct iommu_sva(9)iommu_map_sgtable(9)
π reminder bestie:data_typehas to matchuser_data->type, and if it doesn't go the way you want you're getting-errorinstead of that sweet0. watch the types. iykyk.
π okay that's the whole thing, mwah π β this little gem lives in ./include/linux, dated October 2026, and it's iommu_copy_struct_to_user(9) forever and always. periodt. π§ββοΈβ
π¦ 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