Re: /proc query

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

 



On Fri, 10 Dec 2004 18:53:39 -0800 (PST), cranium2003
<cranium2003@xxxxxxxxx> wrote:

> Can a user program be able to overwrite /proc entry
> with some changes to that /proc file frequently?

Not really. Files in /proc are not real, they are magically created on
the fly by a registered read routine for a given procfs entry -
writing to a file in /proc results in data being passed to a write
procfs routine. So you can pass some data in to the kernel that way
but you can't treat it like a real filesystem.

> can same file be able to read by kernel in its actual
> kernel execution?

I hope the above makes it clear that the files are not real so the
handling is all done by the kernel on each access.

Jon.

--
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