From: clingutla@codeaurora.org (Chandra Sekhar Lingutla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1] arm64: setup: Check for overlapping dtb and Image load addresses
Date: Mon, 5 Feb 2018 13:36:12 +0530 [thread overview]
Message-ID: <6fd2b4e9-ff54-61be-4031-facea28ba34e@codeaurora.org> (raw)
In-Reply-To: <20180129154812.GA25061@arm.com>
Hi Will,
On 1/29/2018 9:18 PM, Will Deacon wrote:
> On Wed, Jan 24, 2018 at 02:53:45PM +0530, Lingutla Chandrasekhar wrote:
>> Sometime kernel image and dtb load offsets can overlap due to
>> dynamically increased Image or dtb size if both load addresses
>> are near to each other, which leads to bootup failures.
>>
>> So validate dtb load address and kernel image, if they overlap
>> do not proceed to boot.
>>
>> Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
>> ---
>>
>> Changes since v0:
>> - Print overlap bytes.
>> - Simplify ovelap checks.
> This all feels a bit fragile to me, since we're relying on some portion of
> the Image and .dtb working in order to run this code successfully. I'd
> rather not pretend to detect this exact scenario, particularly as I can't
> see it being useful for anybody other than firmware developers (who are in a
> better position to check whether or not this is happening).
Yes, it is useful for boot loaders, adding one more condition to current checks
for bootloader failures, so that boot loader developers can easily identify the
real issue(Image size increased dynamically).
> More generally, is there not some .dtb checksum failure that detects
> corruption there? Perhaps we could do something like that for the Image
> too?
In boot loader, first we load Image and then dtb to corresponding DDR offset right,
so not sure checksum would help here.
> Will
next prev parent reply other threads:[~2018-02-05 8:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 9:23 [PATCH v1] arm64: setup: Check for overlapping dtb and Image load addresses Lingutla Chandrasekhar
2018-01-29 15:48 ` Will Deacon
2018-02-05 8:06 ` Chandra Sekhar Lingutla [this message]
2018-02-05 11:13 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6fd2b4e9-ff54-61be-4031-facea28ba34e@codeaurora.org \
--to=clingutla@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).