From nobody Thu Oct 2 10:38:46 2025 Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0897E328980 for ; Wed, 17 Sep 2025 14:48:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758120487; cv=none; b=GOC2fBR9Ck3QO2OtmpYi9xAIgcpxyNeB2cuYsa28bhi+lIwQXG/W7D/btpcG37RuDt/rBnDDy6G6BR/8IDFJr5Z9J1l3qjM4heuQ7YAtHccO6JDZWPL+pitEYXTELTr+CCsG4d1LsZP2TYfnzeFO12Glfd6God87f/74cFPRPyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758120487; c=relaxed/simple; bh=WAl5OuqroQdkdQI4Wd3qHEcTe93M5exvNPWBFvPsfw0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BRZVvDqj1YkHY8dIbQz2W4ei/p2JeqvPLsH2sIddgjQfnVKVmw7hVIyACNCLsDSxU2xqm+lNjreecGqDGniQQB885izRQwFjXUxeHx+j6EUnN+YwTqFnC6Rc7UtV8GAwQ4Z/Vp1K005pv4+32DmJlMT2KaUU3tja0LAn0jrBPww= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=F7gaKwOK; arc=none smtp.client-ip=95.215.58.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="F7gaKwOK" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1758120471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=wz2Qh6CCUAyXy2y7KZplScVX0TJVeLEXcg6HqXMpxrE=; b=F7gaKwOKLZ5+NGschFIL4W3vuy1U9X3NyMy4FxCeCPyIE5Ad9gCrveKM8rdJzOVW582AQr nIM+Yxj8kMyHS/98WXObiHPbAMdAvIxNh2IwBXIx93YzPRro8Z2mJl6Vk/EUM4CE/go8BU RE85zrMsJLWuWbCRqa0sbU5sQ73Rie8= From: Thorsten Blum To: "David S. Miller" , Andreas Larsson , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Bjorn Helgaas Cc: linux-hardening@vger.kernel.org, Thorsten Blum , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND] sparc: PCI: Replace deprecated strcpy() with strscpy() Date: Wed, 17 Sep 2025 16:47:30 +0200 Message-ID: <20250917144733.118553-1-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum --- arch/sparc/kernel/pcic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 25fe0a061732..f894ae79e78a 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c @@ -16,6 +16,7 @@ #include #include #include +#include #include =20 #include /* for cache flushing. */ @@ -352,7 +353,7 @@ int __init pcic_probe(void) pbm =3D &pcic->pbm; pbm->prom_node =3D node; prom_getstring(node, "name", namebuf, 63); namebuf[63] =3D 0; - strcpy(pbm->prom_name, namebuf); + strscpy(pbm->prom_name, namebuf); =20 { extern int pcic_nmi_trap_patch[4]; @@ -477,7 +478,7 @@ static void pcic_map_pci_device(struct linux_pcic *pcic, int j; =20 if (node =3D=3D 0 || node =3D=3D -1) { - strcpy(namebuf, "???"); + strscpy(namebuf, "???"); } else { prom_getstring(node, "name", namebuf, 63); namebuf[63] =3D 0; } @@ -536,7 +537,7 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *= dev, int node) char namebuf[64]; =20 if (node =3D=3D 0 || node =3D=3D -1) { - strcpy(namebuf, "???"); + strscpy(namebuf, "???"); } else { prom_getstring(node, "name", namebuf, sizeof(namebuf)); } --=20 2.51.0