__iommu_cop...ct_from_user(9)
π
__iommu_cop...ct_from_user(9) β like, the Kernel API Manual page you didn't know you needed π
okay bestie, so this is a page straight out of the Kernel API Manual (the (9) section, iykyk), and it's about one very specific little function that copies iommu driver specific user space data. yes it's niche. yes it's iconic. let's get into it β¨
πΈ NAME πΈ
__iommu_copy_struct_from_user β copies iommu driver specific user space data. that's the whole vibe fr fr π
π¦ SYNOPSIS π¦
int __iommu_copy_struct_from_user (void *dst_data , const struct
iommu_user_data *src_data , unsigned int data_type , size_t data_len ,
size_t min_len );
like, five things in, one int out. main character energy honestly π
β¨ ARGUMENTS β¨
dst_dataβ pointer to an iommu driver specific user data that is defined ininclude/uapi/linux/iommufd.h. this is where the goods land, bestie π«Άsrc_dataβ pointer to a structiommu_user_datafor user space data info. it's giving "here's the tea about the user's data" βdata_typeβ the data type of thedst_data. it must match withsrc_data.typeβ no cap, they gotta match or it's not it πdata_lenβ length of current user data structure, i.e.sizeof(struct _dst). literally just how big the thing is πmin_lenβ initial length of user data structure for backward compatibility. this should beoffsetofendusing the last member in the user data struct that was initially added toinclude/uapi/linux/iommufd.hβ it's the "we've gotta keep the old stuff working" number, respect it π
π SEE ALSO π
the whole friend group came out for this one, so let's give them their moment π
- 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_array(9)iommu_copy_struct_from_user_array(9)iommu_copy_struct_from_full_user_array(9)__iommu_copy_struct_to_user(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)
that's the whole page, bestie. every argument, every reference, all of it. nothing skipped, we ate and left no crumbs π
and that's a wrap on our little kernel journey! this one lives in ./include/linux and it's dated October 2026, filed under __iommu_cop...ct_from_user(9). go forth and copy those structs safely, queen πππ
π¦ 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