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: <ebbba4ac-ea65-472c-5a3a-201dfe59e402@alliedtelesis.co.nz>
Date:   Tue, 26 Jan 2021 00:33:21 +0000
From:   Chris Packham <Chris.Packham@...iedtelesis.co.nz>
To:     Qi Zheng <arch0.zheng@...il.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "robh@...nel.org" <robh@...nel.org>,
        "frowand.list@...il.com" <frowand.list@...il.com>
CC:     "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] of/fdt: Remove redundant kbasename function call

Hi All,

On 29/05/20 1:25 am, Qi Zheng wrote:
> For version 1 to 3 of the device tree, this is the node full
> path as a zero terminated string, starting with "/". The
> following equation will not hold, since the node name has
> been processed in the fdt_get_name().
>
> 	*pathp == '/'
>
> For version 16 and later, this is the node unit name only
> (or an empty string for the root node). So the above
> equation will still not hold.
>
> So the kbasename() is redundant, just remove it.
>
> Signed-off-by: Qi Zheng <arch0.zheng@...il.com>
> ---
>
> Change in v2:
> 	remove another kbasename() also.
>
>   drivers/of/fdt.c | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 38619e9ef6b2..4602e467ca8b 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -643,8 +643,6 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
>   	     offset = fdt_next_node(blob, offset, &depth)) {
>   
>   		pathp = fdt_get_name(blob, offset, NULL);
> -		if (*pathp == '/')
> -			pathp = kbasename(pathp);
>   		rc = it(offset, pathp, depth, data);
>   	}
>   	return rc;
> @@ -671,8 +669,6 @@ int __init of_scan_flat_dt_subnodes(unsigned long parent,
>   		int rc;
>   
>   		pathp = fdt_get_name(blob, node, NULL);
> -		if (*pathp == '/')
> -			pathp = kbasename(pathp);
>   		rc = it(node, pathp, data);
>   		if (rc)
>   			return rc;

I'm trying to keep our boards up to date with newer kernels.

I've just hit a problem on an older board that uses 
CONFIG_ARM_APPENDED_DTB and has a number of command line args passed up 
from the bootloader that are required for a successful boot.

I'm stepping through kernel versions in the hope that keeping things 
running is easier in smaller increments I'm up to v5.8. I'm not 
currently able to check a newer kernel on this board but looking at the 
code the problem still seems to exist in the latest tree.

early_init_dt_scan_chosen() searches for "chosen" prior to this change 
the "/chosen" node that gets inserted by atags_to_fdt.c but with this 
change it can't find it and fails to boot.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ