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-next>] [day] [month] [year] [list]
Message-Id: <1353078878-13566-1-git-send-email-catalin.marinas@arm.com>
Date:	Fri, 16 Nov 2012 15:14:38 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	devicetree-discuss@...ts.ozlabs.org
Cc:	linux-kernel@...r.kernel.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Rob Herring <rob.herring@...xeda.com>
Subject: [PATCH] of/fdt: NULL-terminate the root node path

From: Benjamin Herrenschmidt <benh@...nel.crashing.org>

Commit 509b7455 (of/fdt: Don't copy garbage after "/" in root node path)
sets the path length to 0 to ignore any garbage after "/" in the root
node path. This has the side effect of also ignoring '\0' at the end of
the root node path. This patch sets the ignores the garbage by setting
the last character to '\0' and length to 1.

Signed-off-by: Catalin Marinas <catalin.marinas@....com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Rob Herring <rob.herring@...xeda.com>
---

The patch is against linux-next, not sure whether mainline will get the
same commit number. Please feel free to fold it into the original patch,
whichever is easier. Without this I can't boot arm64, doesn't populate
the platform devices.

 drivers/of/fdt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 73fb8c0..d9b2207 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -186,7 +186,8 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob,
 			 */
 			fpsize = 1;
 			allocl = 2;
-			l = 0;
+			l = 1;
+			*pathp = '\0';
 		} else {
 			/* account for '/' and path size minus terminal 0
 			 * already in 'l'

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ