[OpenBIOS] [PATCH 2/2] Don't map the page 0 to make NULL-dereferencing more obvious
tarl-b2 at tarl.net
Wed Apr 10 17:47:20 CEST 2013
On 2013-Apr-10 04:18 , Mark Cave-Ayland wrote:
> Hmmm the source looks like this:
> " /chosen" find-dev if
> " mmu" rot get-package-property 0= if
> decode-int nip nip ihandle>phandle active-package = if
> AFAICT the code should get the chosen package "mmu" property, decode
> it, remove the remainder, convert to a phandle and then do the
> comparison to active-package which should be valid?
Ah. Sorry, I was mistaken in what was going on in .properties. I thought
it was doing an ihandle>phandle on the returned value of active-package.
Looking more carefully at the stack trace, it's indeed doing an
ihandle>phandle on the result of a get-package-property rather than
active-package - the " mmu" property is coming back zero, and you really
can't feed that to ihandle>phandle.
More information about the OpenBIOS