[Ilugc] Communicating From User Space to Kernel Space

  • From: cyborg4k@xxxxxxxxx (Shakthi Kannan)
  • Date: Mon Sep 11 13:34:50 2006

Hi Suman and others,

--- Suman Adak <ilugsuman@xxxxxxxxx> wrote:

And more ever i used to wonder
how many configuration
files are being read by kernel? 

Treat kernel as a resource manager. As a user you make
requests to the kernel, not force the kernel to do
things as you as a kernel developer would like it to
do. Freedom is always to the end user. 

More ever i and amit submitted one paper at
ILUG-Delhi annual festival
Freedel 2006. It has been selected and amit is going
to give talk. 

Congrats!

But the question is that why we shouldn't read or
write files in kernel
space? 

"The most common problem is interpreting the data.
Writing a file interpreter from within the kernel is a
process ripe for problems, and any errors in that
interpreter can cause devastating crashes. Also, any
errors in the interpreter could cause buffer
overflows. These might allow unprivileged users to
take over a machine or get access to protected data,
such as password files.

Trying to protect the kernel from dumb programming
errors is not the most important reason for not
allowing drivers to read files."

http://www.linuxjournal.com/article/8110

 I can give some example
1.Mounting file system [ mount program reads config
file /etc/fstab and
issue mount system call]

Yes, but, it is initiated by the end-user as a request
to the kernel, via a system call.

It is always the end-user or user daemons that make
requests to the kernel, and the kernel just services
it.

Regards,

SK

--
Shakthi Kannan
http://www.shakthimaan.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ;

Other related posts: