Re: copy_to/from_use query?

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

 



On Mon, Oct 11, 2004 at 14:45:59 +0530, Mandeep Sandhu wrote:
> On Mon, 2004-10-11 at 14:43, Jan Hudec wrote:
> > On Mon, Oct 11, 2004 at 14:34:50 +0530, Mandeep Sandhu wrote:
> > > won't a page fault be generated in case the page u r trying to
> > > copy to is not in the mem????????
> > 
> > In kernel mode, page faults must be handled manualy. The trap just gives
> > an oops if it happens in kernel mode.
> > 
> 
> right, then we can't simply use memcpy to copy data to user-space
> x86 or not?

Right. We can't.

And eg. in user-mode-linux in SKAS mode, not only the user memory is not
mapped, but the address spaces of kernel and user mode overlap! Using
that for debugging is really a good test that you have copy_to/from_user
in the right places.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[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