From: Marek Bykowski <marek.bykowski@gmail.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>,
devicetree@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] of/fdt: Don't calculate initrd_start from the DT if 'linux,initrd-end' is 0
Date: Tue, 6 Sep 2022 10:07:35 +0000 [thread overview]
Message-ID: <20220906100735.7a226942@ubuntu.armcompdev.pub.tds.tieto.com> (raw)
In-Reply-To: <20220830153500.49206b5a@ubuntu.armcompdev.pub.tds.tieto.com>
On Tue, 30 Aug 2022 15:35:00 +0000
Marek Bykowski <marek.bykowski@gmail.com> wrote:
> On Sun, 28 Aug 2022 20:12:41 -0500
> Rob Herring <robh+dt@kernel.org> wrote:
>
> >
> > Shouldn't we just check that start < end?
> >
> > Can we check this somewhere not DT specific (and also not arch
> > specific)? Then we don't have to worry if any other method of
> > setting initrd could have the same error.
>
> Yes, we can switch from checking on the end being 0 to that proposed:
> - if (!end)
> - return;
> + if (start >= end)
> + return;
>
> Then the check would even go further as would also catch cases where
> end < start.
>
> My taking is early_init_dt_scan_chosen() that sets initrd size
> incorrectly is DT specific but generic/arch agnostic. So that if
> the error got introduced by a bootloader/U-Boot through the DT
> chosen node, we should catch it in DT and react.
>
> ARM64, for example, before going down for mapping for the incorrect
> address (some extra large address resulting from the negative to
> positive value conversion), has a check after DT parsing if
> phys_initrd_size is other than 0 to proceed, and it is so that it
> passes or in other words it doesn't catch the error.
>
> Marek
Hello Rob and others,
Any updates on it?
Marek
next prev parent reply other threads:[~2022-09-06 10:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 22:00 [PATCH] of/fdt: Don't calculate initrd_start from the DT if 'linux,initrd-end' is 0 Marek Bykowski
2022-08-29 1:12 ` Rob Herring
2022-08-30 15:35 ` Marek Bykowski
2022-09-06 10:07 ` Marek Bykowski [this message]
2022-09-06 14:39 ` Rob Herring
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=20220906100735.7a226942@ubuntu.armcompdev.pub.tds.tieto.com \
--to=marek.bykowski@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.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).