copy_min_struct_from_user(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– copy_min_struct_from_user(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual page for copy_min_struct_from_user(9) β€” it’s giving safe future-proof argument copying, no cap. This is the whole rundown, and every lil detail stays exactly where it belongs. 🫢


🌸 NAME 🌸

copy_min_struct_from_user β€” Safe future-proof argument copying. periodt. ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

int copy_min_struct_from_user (void *const dst , const size_t ksize ,
const size_t ksize_min , const void __user *const src , const size_t
usize );

πŸŽ€ ARGUMENTS πŸŽ€

  • dst β€” Kernel space pointer or NULL. iconic, honestly.
  • ksize β€” actual size of the data pointed to by dst.
  • ksize_min β€” minimal required size to be copied. the way this one is literally the minimum? obsessed.
  • src β€” User space pointer or NULL.
  • usize β€” (Alleged) size of the data pointed to by src. β€œalleged” is doing so much work here 😭

⭐ DESCRIPTION ⭐

Extend copy_struct_from_user to check for consistent user buffer. That’s the whole mission, bestie β€” future-proof argument copying, exactly as advertised. πŸ’…

πŸ”₯ RETURN πŸ”₯

  • 0 on success
  • -errno on failure

🌈 SEE ALSO 🌈


and that’s the tea for copy_min_struct_from_user(9) πŸ“ β€” source/version is ./security/landlock, dated October 2026. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from