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: <20240718134755.378115-6-darwi@linutronix.de>
Date: Thu, 18 Jul 2024 15:47:45 +0200
From: "Ahmed S. Darwish" <darwi@...utronix.de>
To: Borislav Petkov <bp@...en8.de>,
	Ingo Molnar <mingo@...hat.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	x86@...nel.org,
	x86-cpuid@...ts.linux.dev
Cc: Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org,
	"Ahmed S. Darwish" <darwi@...utronix.de>
Subject: [PATCH v1 5/9] tools/x86/kcpuid: Strip bitfield names leading/trailing whitespace

While parsing and saving bitfield names from the CSV file, an extra
leading space is copied verbatim.  That extra space is not a big issue
now, but further commits will add a new CSV file with much more padding
for the bitfield's name column.

Strip leading/trailing whitespaces while saving bitfield names.

Signed-off-by: Ahmed S. Darwish <darwi@...utronix.de>
---
 tools/arch/x86/kcpuid/kcpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/arch/x86/kcpuid/kcpuid.c b/tools/arch/x86/kcpuid/kcpuid.c
index c93015ee02e0..ccbf3b36724f 100644
--- a/tools/arch/x86/kcpuid/kcpuid.c
+++ b/tools/arch/x86/kcpuid/kcpuid.c
@@ -381,7 +381,7 @@ static int parse_line(char *line)
 	if (start)
 		bdesc->start = strtoul(start, NULL, 0);
 
-	strcpy(bdesc->simp, tokens[4]);
+	strcpy(bdesc->simp, strtok(tokens[4], " \t"));
 	strcpy(bdesc->detail, tokens[5]);
 	return 0;
 
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ