lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220830153500.49206b5a@ubuntu.armcompdev.pub.tds.tieto.com>
Date:   Tue, 30 Aug 2022 15:35:00 +0000
From:   Marek Bykowski <marek.bykowski@...il.com>
To:     Rob Herring <robh+dt@...nel.org>
Cc:     Frank Rowand <frowand.list@...il.com>, devicetree@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] of/fdt: Don't calculate initrd_start from the DT if
 'linux,initrd-end' is 0

On Sun, 28 Aug 2022 20:12:41 -0500
Rob Herring <robh+dt@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ