Re: [PATCH bpf-next] bpf: Replace deprecated strcpy() with strscpy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2025-07-14 20:23 UTC+0200 ~ Thorsten Blum <thorsten.blum@xxxxxxxxx>
> strcpy() is deprecated; use strscpy() instead.
> 
> No functional changes intended.
> 
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
> ---
>  kernel/bpf/disasm.c | 2 +-

Hi and thank you for the patch,

The disassembler file is also part of bpftool's source code [0][1],
where it is compiled as user space code, and where strscpy() is not
defined. So I'd rather not replace this particular occurrence of
strcpy(). We could add a comment in the file to mention this, though.

Thanks,
Quentin


[0]:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/bpf/bpftool/Makefile#n246
[1]:
https://github.com/libbpf/bpftool/blob/v7.5.0/src/kernel/bpf/disasm.c#L340




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux