From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 192B1319848 for ; Sun, 18 Jan 2026 23:23:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768778598; cv=none; b=qhd4aPGRn44AWJryq69mbGbogGHs60LEm2Kyfuh+779/VUdySPtayHL1/ZUoqUUB6Q7fEDFoqNp8kW8jy41eHHQKi4URMjNRfnGZuKfq+rB1vMciw5GNj5sl8IEJKWj0YVimCPvpiBMYiVhKHhWkyFjvGbtXHxZMTRsYchubhvA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768778598; c=relaxed/simple; bh=SxSuGDkkfdaFlcw0f/gAXaelcBTfHHqeVzYfNdVzysU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UPECkhbpiXc0+MOVp+PTClZHqUzKjqZSw4CXZPr7rwYt+E6JNsAUg1/FhNRHFWrcP88Fl35PbBQxUzU1PVq2Q8OsGHKUCm3ORrVJANNXKbHFoI6etsPYiXVaDXAxo8LFTJ2EF6xUJOY0KgChz4PVHcRapOF8A2LFrLDpo7LfxoQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0800C116D0; Sun, 18 Jan 2026 23:23:16 +0000 (UTC) Message-ID: <7e3e6aa7-9d9b-424a-8964-d18d26df1f06@linux-m68k.org> Date: Mon, 19 Jan 2026 09:23:13 +1000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] m68knommu: Replace deprecated strcpy with strscpy in init_ucsimm To: Thorsten Blum , Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org References: <20260118173349.1197500-2-thorsten.blum@linux.dev> Content-Language: en-US From: Greg Ungerer In-Reply-To: <20260118173349.1197500-2-thorsten.blum@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Thorsten, On 19/1/26 03:33, Thorsten Blum wrote: > strcpy() has been deprecated [1] because it performs no bounds checking > on the destination buffer, which can lead to buffer overflows. Replace > it with the safer strscpy(). > > Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1] > Signed-off-by: Thorsten Blum Thanks, applied to m68knommu git tree, for-next branch. Regards Greg > --- > Compile-tested only. > --- > arch/m68k/68000/ucsimm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/m68k/68000/ucsimm.c b/arch/m68k/68000/ucsimm.c > index c54fde75eae8..6b84e826040f 100644 > --- a/arch/m68k/68000/ucsimm.c > +++ b/arch/m68k/68000/ucsimm.c > @@ -9,6 +9,7 @@ > * for more details. > */ > #include > +#include > #include > #include > #include > @@ -31,7 +32,7 @@ void __init init_ucsimm(char *command, int size) > pr_info("uCsimm/uCdimm hwaddr %pM\n", p); > p = getbenv("APPEND"); > if (p) > - strcpy(p, command); > + strscpy(p, command, size); > else > command[0] = 0; > }