On Tue, Jun 10, 2003 at 08:01:17PM -0700, Anthony Nicholson wrote: > I want to be able to turn the swap on and off from within > a kernel module I've written. I won't go into this. Suffice to say I think this is probably a pretty horrible idea. > I can't call the functions sys_swapon/sys_swapoff directly because they > both take a char* arg which is the swapfile name (i.e. "/dev/hda5"), > and since they do a user_path_walk() on that string to get the inode > info, the char* pointer must be in userspace not kernel space. Chances are good you can "unravel" the sys_swapoff() function, and do what it does. You may have to unravel several layers of functions before you're done. But it can probably be done. -- "Meanwhile, in North Korea, the possible 'second-front' in America's attempt to be 'Rome' in the next Bible, [...]" -- Jon Stewart
Attachment:
pgp00442.pgp
Description: PGP signature