The HyperNews Linux KHG Discussion Pages

## memcpy_tofs() and memcpy_fromfs()

  Forum: Supporting Functions
  Re: memcpy_*fs(): which way is "fs"? (Reinhold J. Gerharz)
  Keywords: USER KERNEL SPACE MEMORY COPY
  Date: Mon, 13 Jan 1997 22:35:53 GMT
  From: David Hinds <dhinds@hyper.stanford.edu>

In older versions of the Linux kernel, the i386 FS segment register pointed to user space. So, memcpy_tofs meant to user space, and memcpy_fromfs meant from user space. On other platforms, these did the right thing despite the non-existence of an FS register. These calls are deprecated in current kernels, however, and new code should use copy_from_user() and copy_to_user().