Messages in this thread | | | Date | Tue, 6 Sep 2022 10:07:35 +0000 | From | Marek Bykowski <> | Subject | Re: [PATCH] of/fdt: Don't calculate initrd_start from the DT if 'linux,initrd-end' is 0 |
| |
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
| |