Re: userspace vs. kernelspace address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2005-01-27 at 09:14 -0800, Rock Gordon wrote:
> If I'm given a particular address, how do I test
> whether that address is from userspace or from kernel
> space?

You don't.

> I need to make these decisions from either inside a
> kernel module or a userspace program. The idea is I
> use memcpy() in the user-user version,
> copy_from/to_user in the kernel-kernel version, and
> prohibit the others.

You need to know where the address is from and use the correct function.


	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux