move_addr_to_user(9)
π move_addr_to_user(9) π
okay bestie, this page is from the Kernel API Manual, and itβs all about move_addr_to_user(9) β so cozy up, because itβs giving kernel-to-user copy realness β¨.
π NAME π
move_addr_to_user β copy an address to user space π«Ά. Thatβs the name, thatβs the assignment, periodt.
β¨ SYNOPSIS β¨
int move_addr_to_user (struct sockaddr_storage *kaddr , int klen , void
__user *uaddr , int __user *ulen );
π ARGUMENTS π
kaddrβ the kernel space address, no cap.klenβ length of the address in kernel.uaddrβ the user space address.ulenβ pointer to the user length field.
π¦ DESCRIPTION π¦
okay so on entry, the value pointed to by ulen is the buffer length available. Then it gets overwritten with the buffer space used β the way it just updates, iconic π
.
-EINVAL is returned if an overlong buffer is specified or a negative buffer size. -EFAULT is returned if either the buffer or the length field are not accessible. Those error returns are not a vibe, but they are important fr fr π.
After copying the data up to the limit the user specifies, the true length of the data is written over the length limit the user specified. And 0 is returned for a success β yes bestie, success gets a big fat zero and thatβs slay π.
πΈ SEE ALSO πΈ
Kernel file ./net/socket.c is the spot π. The SEE ALSO crew, in order and with zero skips: move_addr_to_kernel(9), sock_read_xattr(9), sock_alloc_file(9), sock_from_file(9), sockfd_lookup(9), sock_alloc(9), sock_release(9), sock_sendmsg(9), kernel_sendmsg(9), sock_recvmsg(9), kernel_recvmsg(9), sock_create_lite(9), __sock_create(9), sock_create(9), sock_create_kern(9), sock_register(9), sock_unregister(9), kernel_bind(9), kernel_listen(9), kernel_accept(9), kernel_connect(9), kernel_getsockname(9), kernel_getpeername(9), kernel_sock_shutdown(9), kernel_sock_ip_overhead(9). iykyk π.
source vibes: ./net Β· date: October 2026 Β· manual: move_addr_to_user(9) β mwah πβ¨
π¦ 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