Hi Doug, On 19. Jul 2025, at 00:48, Doug Anderson wrote: > On Fri, Jul 18, 2025 at 2:40 PM Thorsten Blum wrote: >> >> strcpy() is deprecated; use strscpy() instead. >> >> Link: https://github.com/KSPP/linux/issues/88 >> Signed-off-by: Thorsten Blum <thorsten.b...@linux.dev> >> --- >> kernel/debug/kdb/kdb_support.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) > > nit: Since this only covers things in the file `kdb_support.c` and not > everything in kernel/debug/kdb, perhaps that should be in the subject > line? Maybe "kdb: Replace deprecated strcpy() with strscpy() in > kdb_strdup()"? > > Other than that, this looks fine to me. > > Reviewed-by: Douglas Anderson <diand...@chromium.org>
I'm preparing a patch series for Daniel with my kdb changes. For this one here, I initially used: strscpy(s, str, n); return s; to replace 'return strcpy(s, str);', but now prefer: memcpy(s, str, n); return s; because we already know the string length 'n'. Can I keep your Reviewed-by: tag when making this change and submitting it as part of a patch series? Thanks, Thorsten