Thread (4 messages) 4 messages, 2 authors, 2018-01-17

Query : Regarding overwriting of DTB loading region while clearing BSS section

From: mark.rutland@arm.com (Mark Rutland)
Date: 2017-11-23 18:21:36
Also in: linux-arm-msm

On Thu, Nov 23, 2017 at 10:26:07PM +0530, Kohli, Gaurav wrote:
Hi Mark,

Thanks for the reply,

Actually, We solved our issue by removing unwanted code from kernel,
I would very strongly recommend that you update your bootladoer/firmware
to respect image_size, since any numbero f things may increase the size
of the kernel in future.

i.e. trimmign the kernel down is a workaround, but not a fix.
But my request can't we put some check itself in head.s during clear
of BSS region to check whether dtb is intact or not.  Because
ultimately it will fail in start kernel.
At that point(start_kernel),? we can not directly say what is the root cause
for this overriding.
Perhaps we could add a check in setup_arch(). If the DTB pointer
overlaps any part of the kerenl (BSS included), the bootloader is
clearly broken.

Even then, it's going to be a slient panic(), since we won't be able to
parse anything out of the DTB...

Thanks,
Mark.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help