After splitting Kernel Space and Non-Kernel Space and adding Paging mechanism, copying between different processes (with different privileges) is required.
Between kernel and non-kernel processes (Ring 0 <-> Ring 1, 2, 3):
- void copy_to_kernel(void* dst, void* src, uint32 size, uint32 pid);
From (src, pid) to (dst)
- void copy_to_non_kernel(void* dst, void* src, uint32 size, uint32 pid);
From (src) to (dst, pid)
NOTE: Must be called by kernel process.
Between non-kernel processes (Ring 1, 2, 3 <-> Ring 1, 2, 3)
- void copy_to(void* dst, void* src, uint32 size, uint32 pid);
From (src, CURRENT_PID) to (dst, pid)
- void copy_from(void* dst, void* src, uint32 size, uint32 pid);
From (src, pid) to (dst, CURRENT_PID)
NOTE: subject is the process of the caller.
After splitting Kernel Space and Non-Kernel Space and adding Paging mechanism, copying between different processes (with different privileges) is required.
Between kernel and non-kernel processes (Ring 0 <-> Ring 1, 2, 3):
From (src, pid) to (dst)
From (src) to (dst, pid)
NOTE: Must be called by kernel process.
Between non-kernel processes (Ring 1, 2, 3 <-> Ring 1, 2, 3)
From (src, CURRENT_PID) to (dst, pid)
From (src, pid) to (dst, CURRENT_PID)
NOTE: subject is the process of the caller.