Skip to contentSkip to conversation

allocating user-memory from kernel: do i use GFP_USER

DISCUSSION Luke Kenneth Casson Leighton 1 participant 1 message Oct 4, 2004

lore
Share & tools
lore
#0 lore raw

hi, it occurred to me that instead of cut/paste all the sys_* functions in fs/*.c for this proxyfs kernel module i am doing that i could instead, if i could get hold of some user memory, call the sys_* functions directly.

can i just do this:

	char __user *filename = kmalloc(strlen(kfilename)+1, GFP_USER);

and then this:

	sys_rename(filename, ...);

and expect it to work?

ta,

l.

Signature · 7 lines
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />