Subject: Re: fix in pmap_bootstrap.c (hp300)
To: Masaru Oki <oki@fs.telcom.oki.co.jp>
From: Chris G. Demetriou <cgd@alpha.bostic.com>
List: netbsd-bugs
Date: 10/24/1994 14:17:38
> >> However, the hp300 kernel is normally linked as a NMAGIC executable.
> 
> in sys/arch/hp300/stand/boot.c:
> ...
> >	if (read(io, (char *)addr, x.a_text) != x.a_text)
> >		goto shread;
> >	addr += x.a_text;
> !>	if (N_GETMAGIC(x) == ZMAGIC || N_GETMAGIC(x) == NMAGIC)
> !>		while ((int)addr & CLOFSET)
> !>			*addr++ = 0;
> 
> What is this?

well, NMAGIC binaries are definitely always page aligned; that's why
they're called 'pure'.

> I think that protected kernel text is better than
> non-protected kernel text.  But, if you think
> non-protected kernel text is no problem, then I see.

i would tend to agree with this, but...  It seems to me that it's
_possible_ to boot an OMAGIC kernel, and if it's possible to do so,
and you can't tell the difference in the kernel itself, then you can't
safely protect the last page.

All in all, i think protecting the kernel text is rather important --
and i curse every time i have to track down a bug that's caused by
that not being possible on an architeture, e.g. on the mips.

it's not clear in my mind that the last page can be protected safely,
in this case.


chris