On Tue, Jun 11, 2002 at 10:13:07PM +0100, Lars Olsson wrote: > I'm working on a project where I need to save/read data to/from file in > the > kernel. The files will be quite big (around 129k each). As I see it, > there are several ways of doing this. I could either do it in kernel > mode, or I could somehow transfer this data (or a pointer to it) to user > space and save it using regular file handling operations. What are the > different options and what is the best way of doing this? Well, both is possible. Doing it in kernel mode is a lot faster and VFS interface is not too complicated to use (path_walk to get the inode, open it with filp_open and then use the file->f_ops to read/write). On the other hand userland approach will give user better control over the process and it will be easier to avoid security issues. ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@ucw.cz> -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/