process_vm_rw_single_vec(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 process_vm_rw_single_vec(9) 🌸

okay so bestie, welcome to the Kernel API Manual πŸ’… this one's a kernel-function page and it's lowkey iconic β€” it's all about moving pages in and out of another task's memory. no cap, kind of main character energy for a helper function. let's get into it 🫢


✨ NAME ✨

process_vm_rw_single_vec β€” read/write pages from task specified πŸ’–

like, literally: you point at a task, and you read from it or write to it. that's the whole vibe.


🌈 SYNOPSIS 🌈

int process_vm_rw_single_vec (unsigned long addr , unsigned long len ,
       struct iov_iter *iter , struct page **process_pages , struct mm_struct
       *mm , struct task_struct *task , int vm_write );

seven arguments, one int coming back at you. she's thorough πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • addr β€” start memory address of target process. like, where in the other task's memory we're kicking things off ✨
  • len β€” size of area to copy to/from. how much we're moving, fr fr πŸ“
  • iter β€” where to copy to/from locally. this is our side of the transaction, the local hangout spot πŸ’œ
  • process_pages β€” struct pages area that can store at least nr_pages_to_copy struct page pointers. yes, "at least" β€” she needs room to breathe, don't skimp πŸ™ˆ
  • mm β€” mm for task. the memory map that goes with the task, obviously πŸ’…
  • task β€” task to read/write from. our target. the one we're visiting πŸ‘‘
  • vm_write β€” 0 means copy from, 1 means copy to. and hey, the return info is tucked right in here too: Returns 0 on success or on failure error code. so like, 0 = slay, anything else = the error code, no cap 😭
heads up bestie: 0 and 1 are the only two vibes for vm_write β€” from, or to. pick your lane πŸ’€

🧚 SEE ALSO 🧚

kernel file ./mm/process_vm_access.c, plus the whole friend group:

all hanging out in the same file, iykyk πŸ“


and that's the page!! mwah πŸ’‹ sourced straight from ./mm, dated October 2026 β€” go read the source, it ate πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from