On Fri, 26 Nov 1999, Arun Sharma wrote:

> 
> You seem to have a misconception here. Lets take the example of sys_read
> (linux/fs/read_write.c). The argument buf is a userland absolute address
> (not relative to some base) of the form 0x8xxxxxxx, passed unmodified
> from the read system call in libc. You can try printing it out to
> confirm this.
> 
> However, in traditional UNIX - for example FreeBSD, the syscall
> arguments get copied on to the kernel stack and a pointer to the
> "user area" is passed to the C routine that implements the system call.
> 
> In both the cases, one needs to do copyin/copyout to transfer the data.
> All of this is contained in one file: /usr/include/asm/uaccess.h on 
> Linux.

  Thank you Arun for the reply. 
  This is what i understand, please correct me wherever i'm wrong.

  Earlier, since we refer to "u area", we need to pass u->u_base to 
  copyin/copyout. But that is no more needed in newer versions and
  linux also follows that. And hence there is no further need to keep that
  absolute address in u area. Also is "struct task"  the one
  keeps informations related to u area.
  
  Now i have a silly doubt. You say "0x8xxxxxxx", but what's the
  significance of that '8' there. 

  Thanking you once again

  sudheer


--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.

Reply via email to