iommu_copy_struct_to_user(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 a struct iommu_user_data that 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 in include/uapi/linux/iommufd.h. that's where the goods come from. πŸ“
  • data_type β€” the data type of the ksrc. it must match with user_data->type. not "should", not "ideally" β€” must. vibe check on types, no exceptions. πŸ”₯
  • min_last β€” the last member of the data structure that ksrc points to, in the initial version. and yeah, it returns 0 for 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:


πŸ’€ reminder bestie: data_type has to match user_data->type, and if it doesn't go the way you want you're getting -error instead of that sweet 0. 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