⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

write_to_user_pages

Function write_to_user_pages 

Source
pub fn write_to_user_pages(
    vas: &VirtualAddressSpace,
    user_vaddr: u64,
    data: &[u8],
) -> Result<(), KernelError>
Expand description

Write data to user-space virtual addresses through the physical memory window.

User-space VAs (e.g., 0x400000) are only mapped in the process’s page tables, not the kernel’s CR3. This function translates each page through the process’s page tables and writes via phys_to_virt_addr().