home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!sdd.hp.com!usc!howland.reston.ans.net!sol.ctr.columbia.edu!eff!world!ksr!zdenek
- From: zdenek@ksr.com (Zdenek Radouch)
- Newsgroups: comp.os.linux
- Subject: Re: IMPORTANT [BUG in 0.99] Re: [ANNOUNCE]: linux version 0.99
- Keywords: kernel linux 0.99
- Message-ID: <20281@ksr.com>
- Date: 20 Dec 92 18:42:17 GMT
- References: <1992Dec14.174625.1102@galileo.cc.rochester.edu> <1992Dec14.192204.16359@klaava.Helsinki.FI> <1992Dec19.193230.282@grendel.demon.co.uk> <1992Dec19.222324.22106@klaava.Helsinki.FI>
- Sender: news@ksr.com
- Organization: Kendall Square Research Corp.
- Lines: 30
-
- Lars Wirzenius writes:
-
- [about questionable initialization of a static pointer to NULL]
-
- >In normal C programs, yes, but the kernel is a bit special. Like, for
- >instance, who is going to do the initialization? Normally it is the
- >kernel (which zeroes out all memory before it is given to a user
- >process), the linker (which loads the pre-initialized variables from a
- >file, i.e. those variables which are given an explicit initializer),
- >and possbily the C startup code. Trouble is, none of these are active
- >when the kernel is booting...
-
- Sounds more like a slight design problem, or perhaps a "feature".
- Normally, the primary bootstrap code, before doing anything else, loads
- either itself or a kernel or a secondary boot code into memory (from a PROM
- or from a device). An integral part of this loading process is to initialize
- BSS. That way the loaded object can be written as any other piece of C code.
- Actually, even the loader itself can be written in C (I've written one myself),
- you just have to make sure there is no static data in the code.
-
- I can't think of a reason for the kernel loader to skip the BSS initialization.
- And, as the bug more than clearly demonstrates, there are quite a few reasons
- to keep the kernel coding standard.
-
- This reminded me that I was questioning why the linux kernel uses floating
- point code (I seem to remember a message posted, implying that it is used).
- Generally, there is no need for any floating point code in
- operating systems and absence of the floating point code eliminates all
- difficulties with handling the coprocessors or emulation code.
- -Z
-