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: <20210614145129.63v2tau6ly6wtqbm@skbuf>
Date:   Mon, 14 Jun 2021 17:51:29 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Shawn Guo <shawnguo@...nel.org>
Cc:     devicetree@...r.kernel.org, Li Yang <leoyang.li@....com>,
        Rob Herring <robh+dt@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH] arm64: dts: fix node name for the sysclk

Hello Shawn,

On Sat, Jun 12, 2021 at 03:53:47PM +0800, Shawn Guo wrote:
> On Tue, Jun 08, 2021 at 02:26:58PM +0300, Vladimir Oltean wrote:
> > From: Vladimir Oltean <vladimir.oltean@....com>
> >
> > U-Boot attempts to fix up the "clock-frequency" property of the "/sysclk" node:
> > https://elixir.bootlin.com/u-boot/v2021.04/source/arch/arm/cpu/armv8/fsl-layerscape/fdt.c#L512
> >
> > but fails to do so:
> >
> >   ## Booting kernel from Legacy Image at a1000000 ...
> >      Image Name:
> >      Created:      2021-06-08  10:31:38 UTC
> >      Image Type:   AArch64 Linux Kernel Image (gzip compressed)
> >      Data Size:    15431370 Bytes = 14.7 MiB
> >      Load Address: 80080000
> >      Entry Point:  80080000
> >      Verifying Checksum ... OK
> >   ## Flattened Device Tree blob at a0000000
> >      Booting using the fdt blob at 0xa0000000
> >      Uncompressing Kernel Image
> >      Loading Device Tree to 00000000fbb19000, end 00000000fbb22717 ... OK
> >   Unable to update property /sysclk:clock-frequency, err=FDT_ERR_NOTFOUND
> >
> >   Starting kernel ...
> >
> > All Layerscape SoCs except LS1028A use "sysclk" as the node name, and
> > not "clock-sysclk". So change the node name of LS1028A accordingly.
>
> Wouldn't it more flexible to use alias/label for finding the node?
> Using node name/path looks fragile.

Thank you for the advice, I will keep it in mind next time when I design
my own bootloader device tree fixup scheme. However, in this case I did
not create it, and implementing your suggestion to find the sysclk node
through /aliases would require changes not only to the bootloader, but
to the Linux device tree still (and if we're modifying the Linux DT, why
not just go with this patch). So yes, the existing mechanism is more
fragile, but I am not sure if we gain anything by artificially creating
an additional dependency in the process.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ