From nobody Tue Dec 2 00:25:29 2025 Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (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 7DDB51F4CB3 for ; Mon, 24 Nov 2025 12:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763988935; cv=none; b=oSV1nygt2FVOUt1t7rYChqQe8yPBYsuqUBerg5W9IvDhkiP6FYWyDnBbm+x5atmOspHW1gMJe+1f0N+VtTlG8vb1c/HGK23G92oLw41gL7HjSCKiWhHrV42bWUlUnHFHeIEi8y8uf+1YIYdWpCfop2XicLfzPa9PKg7PHIiZHOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763988935; c=relaxed/simple; bh=5+VTEVdabJESdKP7wsPbneViKDAaEAivZkwOaQdD+1A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mXd2HbDsRmLoNOnqM4dDbzx3Q/MIA9rE3mTLkVGdLJntB/NC+cUXC5TMGpRsioL/NT2OehFOgNKuu6WdqusybyoIxAWicPYX54yTdI267Pr3Kt9WqZTynIozeo9PTH7DcF14PKH/TUIjJ2e6maVb6eIEL+b5sVx8+7xNV3PIJm0= 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=AIuDdAw3; arc=none smtp.client-ip=95.215.58.188 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="AIuDdAw3" 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=1763988930; 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=zY/VYMc8PpNxKYVhZYSxPgUvOoScm3h1LxS2S/MQooY=; b=AIuDdAw3ZbiXWNR3L3/4+CU2Tb4NwUigGGS8pD+6YHXqfcFtvigz48cnJxFzkildp9/noZ ng3hUE9yh3IylD5Dj0mNv6YPClKGE9/sR+vhbxSLL6kmVld2s6WCVNh3RnMKjyNduDAuDk Tl7i45chXliGZ4PahhNqrNPsluxqPuM= From: Thorsten Blum To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: Thorsten Blum , linux-kernel@vger.kernel.org Subject: [PATCH RESEND] x86/olpc/xo15/sci: Replace strcpy with strscpy in xo15_sci_add Date: Mon, 24 Nov 2025 13:54:53 +0100 Message-ID: <20251124125455.5495-2-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() has been deprecated [1] because it performs no bounds checking on the destination buffer, which can lead to buffer overflows. Use the safer strscpy() instead. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy= [1] Signed-off-by: Thorsten Blum --- Updated link and patch description. --- arch/x86/platform/olpc/olpc-xo15-sci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/platform/olpc/olpc-xo15-sci.c b/arch/x86/platform/olp= c/olpc-xo15-sci.c index 68244a3422d1..82c51b6ec528 100644 --- a/arch/x86/platform/olpc/olpc-xo15-sci.c +++ b/arch/x86/platform/olpc/olpc-xo15-sci.c @@ -7,6 +7,7 @@ =20 #include #include +#include #include #include #include @@ -144,8 +145,8 @@ static int xo15_sci_add(struct acpi_device *device) if (!device) return -EINVAL; =20 - strcpy(acpi_device_name(device), XO15_SCI_DEVICE_NAME); - strcpy(acpi_device_class(device), XO15_SCI_CLASS); + strscpy(acpi_device_name(device), XO15_SCI_DEVICE_NAME); + strscpy(acpi_device_class(device), XO15_SCI_CLASS); =20 /* Get GPE bit assignment (EC events). */ status =3D acpi_evaluate_integer(device->handle, "_GPE", NULL, &tmp); --=20 2.51.1