From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CF7C3081D4; Fri, 29 Aug 2025 10:31:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.175.24.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756463485; cv=none; b=B85vEmHHN1eVZEH5AbDyU5fnWb9ltDlbYe9FmDXpSaMtleGcqUoyAfXjR/3+RM9O0k0t4TDCbP9CHWQGRIATGsLZKCrWGdkWMIojea6cd/h2X6FdhbzPpxmnTozihZfDTNyAaRS50qL+HhaTGER/JU1xRiszGITeEJ7bavGkfDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756463485; c=relaxed/simple; bh=92SKU3EpfkGcS6IIcLwXlPj+A5HE40/1CNG66+vsSa4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AmnzwCJysmuD5byD03baK9NvxCs8TxrZAZeRoPk+Up/a5ySHkXkWmoJKNc+poruh8qUGXHzE+2KpiKMaRgnMeef9IvWaMAK8yGE0yIKsp5tBMICVRIO6WhH5LoKi/ITRn3kb75GEbcqEM0hX4uVkjXLi+0ez9TINMXXlLII/trg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.client-ip=193.175.24.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1urwO2-0004Fn-00; Fri, 29 Aug 2025 12:31:14 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id D6AC8C0B87; Fri, 29 Aug 2025 12:25:16 +0200 (CEST) Date: Fri, 29 Aug 2025 12:25:16 +0200 From: Thomas Bogendoerfer To: Thorsten Blum Cc: linux-hardening@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/8] MIPS: sgi-ip22: Replace deprecated strcpy() in plat_mem_setup() Message-ID: References: <20250817183728.612012-1-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250817183728.612012-1-thorsten.blum@linux.dev> On Sun, Aug 17, 2025 at 08:37:11PM +0200, Thorsten Blum wrote: > strcpy() is deprecated; use strscpy() instead. > > Link: https://github.com/KSPP/linux/issues/88 > Signed-off-by: Thorsten Blum > --- > arch/mips/sgi-ip22/ip22-setup.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c > index e06a818fe792..f083b25be13b 100644 > --- a/arch/mips/sgi-ip22/ip22-setup.c > +++ b/arch/mips/sgi-ip22/ip22-setup.c > @@ -11,6 +11,7 @@ > #include > #include > #include > +#include > #include > > #include > @@ -65,7 +66,7 @@ void __init plat_mem_setup(void) > static char options[8] __initdata; > char *baud = ArcGetEnvironmentVariable("dbaud"); > if (baud) > - strcpy(options, baud); > + strscpy(options, baud); > add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0, > baud ? options : NULL); > } else if (!ctype || *ctype != 'g') { > -- > 2.50.1 applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]