public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Matt Turner <mattst88@gmail.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>, Arnd Bergmann <arnd@arndb.de>,
	linux-hardening@vger.kernel.org, linux-alpha@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] smp: Replace deprecated strcpy() with strscpy()
Date: Fri, 18 Apr 2025 13:23:24 -0700	[thread overview]
Message-ID: <202504181322.5D3B93E93@keescook> (raw)
In-Reply-To: <20250417192054.69663-2-thorsten.blum@linux.dev>

On Thu, Apr 17, 2025 at 09:20:52PM +0200, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.

Are there more strcpy() uses in arch/alpha? Maybe do all of them and
give the Subject prefix as "alpha:". If not, the "smp:" prefix is likely
to non-specific. Maybe "alpha: smp:".

-Kees

> 
> Link: https://github.com/KSPP/linux/issues/88
> Cc: linux-hardening@vger.kernel.org
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  arch/alpha/kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
> index ed06367ece57..56155b988b9c 100644
> --- a/arch/alpha/kernel/smp.c
> +++ b/arch/alpha/kernel/smp.c
> @@ -262,7 +262,7 @@ recv_secondary_console_msg(void)
>  
>  		cnt = cpu->ipc_buffer[0] >> 32;
>  		if (cnt <= 0 || cnt >= 80)
> -			strcpy(buf, "<<< BOGUS MSG >>>");
> +			strscpy(buf, "<<< BOGUS MSG >>>");
>  		else {
>  			cp1 = (char *) &cpu->ipc_buffer[1];
>  			cp2 = buf;
> -- 
> 2.49.0
> 
> 

-- 
Kees Cook

  reply	other threads:[~2025-04-18 20:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 19:20 [PATCH] smp: Replace deprecated strcpy() with strscpy() Thorsten Blum
2025-04-18 20:23 ` Kees Cook [this message]
2025-04-18 21:11   ` Thorsten Blum
2025-04-18 23:01     ` Matt Turner
2025-06-10 10:47       ` Thorsten Blum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202504181322.5D3B93E93@keescook \
    --to=kees@kernel.org \
    --cc=arnd@arndb.de \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=richard.henderson@linaro.org \
    --cc=thorsten.blum@linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox