Path: utzoo!mnetor!uunet!lll-winken!lll-tis!mordor!sri-spam!ames!pacbell!att-ih!cuuxb!dlm From: dlm@cuuxb.ATT.COM (Dennis L. Mumaugh) Newsgroups: comp.unix.wizards Subject: Re: Referencing through a null pointer Message-ID: <1767@cuuxb.ATT.COM> Date: 25 Apr 88 23:04:19 GMT References: <1988Apr24.092740.8673@utzoo.uucp <50676@sun.uucp Reply-To: dlm@cuuxb.UUCP (Dennis L. Mumaugh) Organization: ATT Data Systems Group, Lisle, Ill. Lines: 33 Summary: WE32100 won't allow no page 0 In article <50676@sun.uucp guy@gorodish.Sun.COM (Guy Harris) writes: ??> Both System V and Berklix inherited the problem, but it ??> *mostly* got cleaned out of Berklix by early efforts at ??> Sun that were fed back to Berkeley. It keeps creeping ??> back, since Berklix (unlike Sunnix) does not set up its ??> page map to trap accesses to location 0. Unless it's been ??> fixed quite recently, System V still has the problem, ??> since AT&T likewise does not map out 0. GH> That's somewhat hardware dependent; AT&T's releases don't, but GH> people who port it to their hardware can. Also, the paging GH> S5R2.2 release had a "-z" flag to the linker that set up a "no GH> page 0" executable; alas, this flag wasn't the default, so GH> buggy programs didn't get fixed. (I seem to remember a claim GH> that the '286 or '386 port of S5 has no location zero, and the GH> Motorola 68K port may also have no location zero; alas, none GH> of the fixes made to programs that broke got folded back into GH> the mainstream S5 releases.) Yes, we were going to make -z the default and then we discovered that we couldn't map out page 0 of the processes. Seems that on a WE32100 chip the "gate" instruction wants the kernel trap vectors maped into the user virtual locations starting at 0. [The the kernel gate tables reside in page 0.] That's also why we have to have our programs load into the top half of vitrual memory making all pointers negative ( try subtracting two pointers!). On ports to other boxes it is possible to have page 0 mapped out. And most do. -- =Dennis L. Mumaugh Lisle, IL ...!{ihnp4,cbosgd,lll-crg}!cuuxb!dlm