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>] [day] [month] [year] [list]
Message-ID: <20251209125915.305793-1-nygameemail@163.com>
Date: Tue,  9 Dec 2025 12:59:15 +0000
From: ny <nygameemail@....com>
To: acme@...nel.org
Cc: peterz@...radead.org,
	mingo@...hat.com,
	linux-kernel@...r.kernel.org,
	ny <nygameemail@....com>
Subject: [PATCH] perf tools: Replace strlcpy with strscpy

Replace the deprecated strlcpy function with the preferred strscpy
function in tools/perf/util/machine.c.

strlcpy is deprecated and should be replaced with strscpy according
to kernel best practices. The strscpy function is safer and is the
recommended replacement.

Signed-off-by: ny <nygameemail@....com>
---
 tools/perf/util/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 841b711d9..8786764e2 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1052,7 +1052,7 @@ int machine__create_extra_kernel_map(struct machine *machine,
 
 	kmap = map__kmap(map);
 
-	strlcpy(kmap->name, xm->name, KMAP_NAME_LEN);
+	strscpy(kmap->name, xm->name, KMAP_NAME_LEN);
 
 	err = maps__insert(machine__kernel_maps(machine), map);
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ