Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 467 Bytes

userspace.md

File metadata and controls

12 lines (8 loc) · 467 Bytes

Userspace from syscalls

The kernel provides some functions to access the user-space from the kernel space during syscalls. Some of these are :

  • get_user()
  • put_user()
  • copy_from_user()
  • copy_to_user()

These functions also check if the pointer is in user-space and also handle faults if the pointer is invalid. For invalid pointers, they return non-zero value.

Remember syscalls run in process context so current is valid.