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: <ceaa0a9a-8d72-44c0-943d-dc212f1aa5db@beagleboard.org>
Date: Mon, 12 Jan 2026 21:11:52 +0530
From: Ayush Singh <ayush@...gleboard.org>
To: Herve Codina <herve.codina@...tlin.com>,
 David Gibson <david@...son.dropbear.id.au>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
 devicetree-compiler@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, devicetree-spec@...r.kernel.org,
 Hui Pu <hui.pu@...ealthcare.com>, Ian Ray <ian.ray@...ealthcare.com>,
 Luca Ceresoli <luca.ceresoli@...tlin.com>,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [RFC PATCH 05/77] fdtdump: Change FDT_PROP prob handling to ease
 future addition

On 1/12/26 7:48 PM, Herve Codina wrote:

> In order to ease future tags addition, perform operation related to
> FDT_PROP when the tag is explicitly FDT_PROP instead of relying to a
> kind of default value case.
>
> Handle the FDT_PROP tag exactly in the same way as it is done for
> other tags.
>
> No functional modification.
>
> Signed-off-by: Herve Codina <herve.codina@...tlin.com>
> ---
>   fdtdump.c | 34 ++++++++++++++++++----------------
>   1 file changed, 18 insertions(+), 16 deletions(-)
>
> diff --git a/fdtdump.c b/fdtdump.c
> index ec25edf..95a2274 100644
> --- a/fdtdump.c
> +++ b/fdtdump.c
> @@ -129,23 +129,25 @@ static void dump_blob(void *blob, bool debug)
>   			continue;
>   		}
>   
> -		if (tag != FDT_PROP) {
> -			fprintf(stderr, "%*s ** Unknown tag 0x%08"PRIx32"\n", depth * shift, "", tag);
> -			break;
> +		if (tag == FDT_PROP) {
> +			sz = fdt32_to_cpu(GET_CELL(p));
> +			s = p_strings + fdt32_to_cpu(GET_CELL(p));
> +			if (version < 16 && sz >= 8)
> +				p = PALIGN(p, 8);
> +			t = p;
> +
> +			p = PALIGN(p + sz, 4);
> +
> +			dumpf("%04"PRIxPTR": string: %s\n", (uintptr_t)s - blob_off, s);
> +			dumpf("%04"PRIxPTR": value\n", (uintptr_t)t - blob_off);
> +			printf("%*s%s", depth * shift, "", s);
> +			utilfdt_print_data(t, sz);
> +			printf(";\n");
> +			continue;
>   		}
> -		sz = fdt32_to_cpu(GET_CELL(p));
> -		s = p_strings + fdt32_to_cpu(GET_CELL(p));
> -		if (version < 16 && sz >= 8)
> -			p = PALIGN(p, 8);
> -		t = p;
> -
> -		p = PALIGN(p + sz, 4);
> -
> -		dumpf("%04"PRIxPTR": string: %s\n", (uintptr_t)s - blob_off, s);
> -		dumpf("%04"PRIxPTR": value\n", (uintptr_t)t - blob_off);
> -		printf("%*s%s", depth * shift, "", s);
> -		utilfdt_print_data(t, sz);
> -		printf(";\n");
> +
> +		fprintf(stderr, "%*s ** Unknown tag 0x%08"PRIx32"\n", depth * shift, "", tag);
> +		break;
>   	}
>   }
>   


This seems reasonable refactor independently from the rest of the patch 
series.


Reviewed-by: Ayush Singh <ayush@...gleboard.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ