Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am currently writing a device driver and i wounder if it is safe to use copy_to_user on an __iomem pointer return by ioremap()? Or do I have to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2010
    Posts
    4

    Is it safe to use copy_to_user on a __iomem pointer returned by ioremap?


    Hi,

    I am currently writing a device driver and i wounder if it is safe to use copy_to_user on an __iomem pointer return by ioremap()? Or do I have to copy with memcpy_fromio() to an kmalloced buffer in the driver first and then copy_to_user?

    Thanks

  2. #2
    Just Joined!
    Join Date
    Feb 2010
    Posts
    1
    Quote Originally Posted by orback View Post
    Hi,

    I am currently writing a device driver and i wounder if it is safe to use copy_to_user on an __iomem pointer return by ioremap()? Or do I have to copy with memcpy_fromio() to an kmalloced buffer in the driver first and then copy_to_user?

    Thanks
    which architechture did you use, x86 arm or power. In x86 architechture it is safe to use copy_to_user, and ARM is OK tool

Posting Permissions

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