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: <20260210173349.636766-9-herve.codina@bootlin.com>
Date: Tue, 10 Feb 2026 18:33:36 +0100
From: Herve Codina <herve.codina@...tlin.com>
To: David Gibson <david@...son.dropbear.id.au>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>
Cc: Ayush Singh <ayush@...gleboard.org>,
	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>,
	Herve Codina <herve.codina@...tlin.com>
Subject: [RFC PATCH 08/15] tests: asm: Introduce treehdr_vers macro

tree.S is used to generate custom dtbs. It uses the treehdr macro to
build the header part.

The current definition of this macro doesn't allow to set custom
settings related to version fields.

In order to easily generate some dtb with custom version values without
duplicating the full header computation, introduce the treehdr_vers
macro.

The modification doesn't introduce any functional changes.

Signed-off-by: Herve Codina <herve.codina@...tlin.com>
---
 tests/trees.S | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/trees.S b/tests/trees.S
index d69f7f1..4db2b9b 100644
--- a/tests/trees.S
+++ b/tests/trees.S
@@ -8,7 +8,7 @@
 	.byte	(\val) & 0xff
 	.endm
 
-	.macro	treehdr	tree
+	.macro	treehdr_vers	tree vers last_comp_vers
 	.balign	8
 	.globl	\tree
 \tree :
@@ -17,13 +17,17 @@
 	fdtlong	(\tree\()_struct - \tree)
 	fdtlong	(\tree\()_strings - \tree)
 	fdtlong	(\tree\()_rsvmap - \tree)
-	fdtlong	0x11
-	fdtlong	0x10
+	fdtlong	\vers
+	fdtlong	\last_comp_vers
 	fdtlong	0
 	fdtlong	(\tree\()_strings_end - \tree\()_strings)
 	fdtlong	(\tree\()_struct_end - \tree\()_struct)
 	.endm
 
+	.macro	treehdr	tree
+	treehdr_vers \tree 0x11 0x10
+	.endm
+
 	.macro	rsvmape	addrh, addrl, lenh, lenl
 	fdtlong	\addrh
 	fdtlong	\addrl
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ