Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    put_user and get_user

    I just started linux system programming and little bit of driver programming.

    I came across some functions like put_user and get_user, and i read that when we are writting device drivers we should not use direct assignmnet of pointers especially when trying to acsess uspace from kspace and vice versa.

    But i could not get proper reasons even after some googling to why it is not allowed to use direct assignment.

    I would appreciate any help in this.


  2. #2
    A pointer into userspace should never be simply dereferenced: data should be copied using these routines. See the link for more information as to why an API is preferred to use for memory access.

    User space memory access from the Linux kernel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts