* [PATCH] smp: Replace deprecated strcpy() with strscpy()
@ 2025-04-17 19:20 Thorsten Blum
2025-04-18 20:23 ` Kees Cook
0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Blum @ 2025-04-17 19:20 UTC (permalink / raw)
To: Richard Henderson, Matt Turner, Paul E. McKenney, Al Viro,
Arnd Bergmann
Cc: Thorsten Blum, linux-hardening, linux-alpha, linux-kernel
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/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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] smp: Replace deprecated strcpy() with strscpy()
2025-04-17 19:20 [PATCH] smp: Replace deprecated strcpy() with strscpy() Thorsten Blum
@ 2025-04-18 20:23 ` Kees Cook
2025-04-18 21:11 ` Thorsten Blum
0 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2025-04-18 20:23 UTC (permalink / raw)
To: Thorsten Blum
Cc: Richard Henderson, Matt Turner, Paul E. McKenney, Al Viro,
Arnd Bergmann, linux-hardening, linux-alpha, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] smp: Replace deprecated strcpy() with strscpy()
2025-04-18 20:23 ` Kees Cook
@ 2025-04-18 21:11 ` Thorsten Blum
2025-04-18 23:01 ` Matt Turner
0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Blum @ 2025-04-18 21:11 UTC (permalink / raw)
To: Kees Cook
Cc: Richard Henderson, Matt Turner, Paul E. McKenney, Al Viro,
Arnd Bergmann, linux-hardening, linux-alpha, linux-kernel
On 18. Apr 2025, at 22:23, Kees Cook wrote:
> 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:".
There are a handful left, but they're not as straightforward as this
one - so I'd prefer to keep them separate.
Could the committer change the subject to "alpha: smp:" or should I
submit a v2 just for the title?
Thanks,
Thorsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] smp: Replace deprecated strcpy() with strscpy()
2025-04-18 21:11 ` Thorsten Blum
@ 2025-04-18 23:01 ` Matt Turner
2025-06-10 10:47 ` Thorsten Blum
0 siblings, 1 reply; 5+ messages in thread
From: Matt Turner @ 2025-04-18 23:01 UTC (permalink / raw)
To: Thorsten Blum
Cc: Kees Cook, Richard Henderson, Paul E. McKenney, Al Viro,
Arnd Bergmann, linux-hardening, linux-alpha, linux-kernel
On Fri, Apr 18, 2025 at 5:11 PM Thorsten Blum <thorsten.blum@linux.dev> wrote:
>
> On 18. Apr 2025, at 22:23, Kees Cook wrote:
> > 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:".
>
> There are a handful left, but they're not as straightforward as this
> one - so I'd prefer to keep them separate.
>
> Could the committer change the subject to "alpha: smp:" or should I
> submit a v2 just for the title?
I'll fix it up when I add it to my tree.
Thanks!
Matt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] smp: Replace deprecated strcpy() with strscpy()
2025-04-18 23:01 ` Matt Turner
@ 2025-06-10 10:47 ` Thorsten Blum
0 siblings, 0 replies; 5+ messages in thread
From: Thorsten Blum @ 2025-06-10 10:47 UTC (permalink / raw)
To: Matt Turner
Cc: Kees Cook, Richard Henderson, Paul E. McKenney, Al Viro,
Arnd Bergmann, linux-hardening, linux-alpha, linux-kernel
Hi Matt,
On 19. Apr 2025, at 01:01, Matt Turner wrote:
> On Fri, Apr 18, 2025 at 5:11 PM Thorsten Blum wrote:
>>
>> On 18. Apr 2025, at 22:23, Kees Cook wrote:
>>> 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:".
>>
>> There are a handful left, but they're not as straightforward as this
>> one - so I'd prefer to keep them separate.
>>
>> Could the committer change the subject to "alpha: smp:" or should I
>> submit a v2 just for the title?
>
> I'll fix it up when I add it to my tree.
This one didn't make it into the last merge window, did it?
Should I resend it or can you take care of it?
Thanks,
Thorsten
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-10 10:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17 19:20 [PATCH] smp: Replace deprecated strcpy() with strscpy() Thorsten Blum
2025-04-18 20:23 ` Kees Cook
2025-04-18 21:11 ` Thorsten Blum
2025-04-18 23:01 ` Matt Turner
2025-06-10 10:47 ` Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox