mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
To: Thorsten Blum <thorsten.blum@linux.dev>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Kees Cook <kees@kernel.org>, Greg Ungerer <gerg@linux-m68k.org>
Cc: linux-hardening@vger.kernel.org, linux-m68k@lists.linux-m68k.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m68k: mm: Replace strcpy() with strscpy() in hardware_proc_show()
Date: Mon, 21 Apr 2025 15:02:13 +0200	[thread overview]
Message-ID: <f178cc44-1b97-4e72-94ae-cffa08173a99@yoseli.org> (raw)
In-Reply-To: <20250421122839.363619-1-thorsten.blum@linux.dev>

Hi Thorsten,

On 21/04/2025 14:28, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.
> 
> Link: https://github.com/KSPP/linux/issues/88
> Cc: linux-hardening@vger.kernel.org
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>   arch/m68k/kernel/setup_mm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
> index 0fba32552836..c7e8de0d34bb 100644
> --- a/arch/m68k/kernel/setup_mm.c
> +++ b/arch/m68k/kernel/setup_mm.c
> @@ -484,7 +484,7 @@ static int hardware_proc_show(struct seq_file *m, void *v)
>   	if (mach_get_model)
>   		mach_get_model(model);
>   	else
> -		strcpy(model, "Unknown m68k");
> +		strscpy(model, "Unknown m68k");
>   
>   	seq_printf(m, "Model:\t\t%s\n", model);
>   	for (mem = 0, i = 0; i < m68k_num_memory; i++)

As we are not using the return value, I think it is a safe replacement.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>

  reply	other threads:[~2025-04-21 13:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21 12:28 Thorsten Blum
2025-04-21 13:02 ` Jean-Michel Hautbois [this message]
2025-04-22  7:03   ` Geert Uytterhoeven

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=f178cc44-1b97-4e72-94ae-cffa08173a99@yoseli.org \
    --to=jeanmichel.hautbois@yoseli.org \
    --cc=geert@linux-m68k.org \
    --cc=gerg@linux-m68k.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=thorsten.blum@linux.dev \
    /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

all inboxes | Powered by JetHome®