On Thu, 30 Sep 1999 [EMAIL PROTECTED] wrote:
> My goal is to learn as much about the kernel and kernel security in
> relation to networking. I wish to start by exploring the /proc file
> system as it shows everything pretty much in real time and then move on
> to the kernel source itself.
>
> A while back, 4, 5 years ago, I used to program in assembler (for dos
> only tho), C++, and others, I understand the old x86 architecture,
> however I have not kept up with the news pretty much after pentium was
> released.
Hmm... Funny omission in that list - C. You know, the language this system
is written in...
> I bet EAX is out dated ... there must be a 64/128 bit type registers now
> ?
First of all, WHAT EAX? Linux runs not only on x86. And no, x86 still has
no 64bit registers.
> Anyway, I wish to understand every number in every file in the proc, so
> that I may write system utilities, as that is what I used to do and wish
> to do so now for linux. However it is hard to try to figure out what the
Sorry for the cold shower, but /proc is extermely non-portable and should
be used only when there is no other way to do the thing (or when the
alternative is equally unportable and more messy - access to kmem, for
one). Amount of "system utilities" is actually very small - it's not DOS,
it's UNIX.
> numbers mean. I do not suppose there is a white paper or any sort of
> docs to explain what files/numbers represent.
Rule of the tumb: if you don't know what it is for - most likely you don't
need it. Good programs come from the need to do something, not from the
desire to use every existing feature. And they are rarely (if ever)
limited to one flavor of UNIX.
> Can you possibly suggest how I may go about learning the proc file
> system ? At this stage it would not be efficient for me to go into the
> code, as I'm relearning programming in C for linux.
procfs is _not_ a good place to start. Really. You can do worse than that
(SCSI mid-layer for one ;-/), but it's one of the messiest parts of
fs/*/*. If you want to look at something more readable - go for
fs/{namei,open,fcntl,dcache,inode}.c. And use any book on the UNIX kernel
arcitecture - Linux VFS differs from BSD and SunOS ones in implementation
(IMO it's much nicer), but the external interface and many ideas are the
same. And look into one of the decent filesystems - ext2, for one. As for
the decent books - try combination of the Daemon Book (4.4BSD Design and
Implementation) and TLK (look on sunsite.unc.edu/pub/Linux/docs/LDP/).
BTW, many ideas are very old - Lions' Book ("Lions' Commentary on UNIX 6th
Edition") may be useful too, especially since it learns to read C (and
contains the full source of v6 kernel). The language had changed since
then, but the principles remain the same.
> Also you have any docs in terms of Linux and SMP, specially pertaining
> to security I would be mostly interested.
The same as for single-processor, unless you are inside the kernel.
There you should care for additional races. Start with Vahalia ("UNIX
Internals") if you are into that area - this stuff is not Linux-specific.
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]