Re: kernel thread and copy_to_user

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

 



On Fri, 2002-12-27 at 12:21, John Navil Joseph wrote:

> I am sorry if i get this wrong. But are you suggesting that 
> page fault handling doesn't work in kernel mode?  It should automatically 
> load the swapped page in right.? So why should one be careful here..?

You need to be careful about running the page fault handler inside the
kernel.

Accessing user-space memory should only be done via copy_to_user(),
copy_from_user(), put_user(), and get_user().

These also take care of permission checking.

	Robert Love

--
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