Page 1 of 1

procfs and checksum

Posted: Thu Mar 29, 2012 11:03 am
by clavin123
i am trying to make something similar to procfs but have a few doubts
now my assumptions abut procfs is- procfs is a vitual file system where files are stored directly in ram

so now i have the following doubts
1. does procfs read or extract any data from hardrive or other storage media?

2. is there any checksum involved in this procfs file system? if yes then where and any idea about how it is implemented?

3. is there any encryption/decryption involved?

Re: procfs and checksum

Posted: Thu Mar 29, 2012 12:11 pm
by clavin123
ok so i can assume that in procfs files are written on the fly using info in the kernel provided to the procfs through buffers.
it does not or should i say it doesnt need to access files from storage medias.
ok what about inodes? does procfs files's headers contain inodes and other related info?

also about checksum. do you agree that it is not necessary as files are created in the ram and then destroyed
so the chances of changes to these files is very minimal? can anyone give one case where a checksum might come handy in files in procfs.
also any idea(just a general one),on how to implement checksum in files in procfs like file system

Re: procfs and checksum

Posted: Thu Mar 29, 2012 2:03 pm
by Snake
Why don't you try to run stat command on files in your proc and see what it returns? Or better yet maybe read the documentation for it? http://lxr.linux.no/linux+v3.3/Document ... s/proc.txt

Re: procfs and checksum

Posted: Thu Mar 29, 2012 5:17 pm
by Snake
berkus wrote:Hey, reading documentation requires learning to read, that's too tough.
If only I could read what you said, I could make a witty joke in response. :(