public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Alexander Sverdlin <alexander.sverdlin@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	linux-hardening@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: BCM63XX: Replace strcpy() with strscpy() in board_prom_init()
Date: Tue, 22 Apr 2025 11:03:32 +0300	[thread overview]
Message-ID: <aAdNVAzu0rmIfGGC@smile.fi.intel.com> (raw)
In-Reply-To: <20250422074257.544016-2-thorsten.blum@linux.dev>

On Tue, Apr 22, 2025 at 09:42:55AM +0200, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.

> Link: https://github.com/KSPP/linux/issues/88

> Cc: linux-hardening@vger.kernel.org

Can you use --cc OR put this line...

> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---

...here (after the cutter), so we won't see this in the commit message? The
list will be available in the lore archive anyway.

> @@ -764,7 +764,7 @@ void __init board_prom_init(void)
>  			snprintf(cfe_version, 12, "%s", (char *) &cfe[4]);
>  		}
>  	} else {
> -		strcpy(cfe_version, "unknown");
> +		strscpy(cfe_version, "unknown");
>  	}

Have you compiled this with `make W=1` with recent GCCs? I would recommend to
rewrite the whole function, as per commit ee44a1def7ee ("leds: core: Bail out
when composed name can't fit the buffer") in Linux Next.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-04-22  8:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22  7:42 [PATCH] MIPS: BCM63XX: Replace strcpy() with strscpy() in board_prom_init() Thorsten Blum
2025-04-22  8:03 ` Andy Shevchenko [this message]
2025-04-22  8:27   ` Thorsten Blum
2025-04-22 10:17     ` Andy Shevchenko
2025-04-22 10:33       ` Thorsten Blum
2025-04-22 15:18         ` Andy Shevchenko
2025-04-27  7:55 ` Thomas Bogendoerfer

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=aAdNVAzu0rmIfGGC@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alexander.sverdlin@gmail.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=thorsten.blum@linux.dev \
    --cc=tsbogend@alpha.franken.de \
    /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