Re: file access in kernel

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

 



On Thu, 26 Jan 2006, Fawad Lateef wrote:

> On 1/26/06, Hsieh Steve <stevecfhsieh@xxxxxxxxx> wrote:
> >
> > 2006/1/25, Thomas Petazzoni <thomas.petazzoni@xxxxxxxx>:
> > >
> > > Do not try to access a file from kernel space.
> >
> > Could u explan "Dont try to access files in kernel space?"
> > it this any drawback??
> >
> >
> 
> AFAIK accessing files from the kernel is not the good approach as it
> can open security issues/holes with-in the kernel, hence the better
> approach (if really wants to perform file-io) is to use some interface
> like sysfs/netlink sockets for sending data to user space and then
> performing file io from user space !

There's a nice paper written by Arjan van de Ven titled "How to NOT
write kernel driver" [1] that has two sections about accessing files
from kernel space. Look at sections 7 and 8.2 for the reasons why this
is not good.

 - Srdjan Todorovic

 [1] http://people.redhat.com/arjanv/olspaper.pdf


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux