lkml.org 
[lkml]   [1999]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: access_ok inside kernelspace
Date
From
> I patched the 2.2.12 kernel to be able to write to the file system within my
> driver.
> I do this by patching the copy_to/from_user functions like this

You don't need to do this

> If someone has written such a function, or knows which already implemented
> function of Linux does that, please inform me.


mm_segment_t fs;

fs=get_fs();
set_fs(get_ds());

/* User space is now the kernel */


/* Put it back again */

set_fs(fs);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.095 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site