Re: How can I create or read/write a file in linux device driver?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 12 2007 11:27, Jesper Juhl wrote:
> On 12/01/07, congwen <[email protected]> wrote:
>> Hello everyone, I want to create and read/write a file in Linux kernel or
>> device driver,
>
> Don't read/write user space files from kernel space.
>
> Please search the archives, this get asked a lot and it has been
> explained a million times why it's a bad idea.
> You can also read http://www.linuxjournal.com/article/8110

The article does it the bad way. IMHO filp_open() and 
vfs_read/vfs_write() are much less problematic wrt. to userspace.
FWIW see 
ftp://ftp-1.gwdg.de/pub/linux/misc/suser-jengelh/kernel/quad_dsp-1.5.1.tar.bz2


	-`J'
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux