[PATCH] ignore huge OF properties

Anton Blanchard anton at samba.org
Mon Mar 22 21:07:16 EST 2004

Hi Julie,

> In addition to the patch you provided, it is also necessary to ensure
> that the initrd image cannot be overwritten by calls into prom such as:
> 	pp->length = (int)(long) call_prom(RELOC("getprop"), 4, 1, node,
> 					   namep,valp, mem_end - mem_start);
> Here, mem_end needs to have been carefully chosen so that it doesn't
> start somewhere in the middle of the initrd image or past it. However,
> mem_end is arbitrarily chosen by copy_device_node to be 8MB beyond the
> starting mem_start value. In code I have been working with, mem_end has
> landed well into the initrd memory image.
> The attached patch corrects this problem for the 2.6 ameslab tree.
> Please consider pushing it to ameslab, as I don't know how to do that.

I think we should be checking further down in inspect_node as well. Also
we should rethink that 8MB limit, on our big machines we might have
device trees bigger than that.


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc64-dev mailing list