Re: [PATCH] Use strscpy() instead of the deprecated strlcpy()

From: Daniel Yang
Date: Tue Nov 05 2024 - 19:30:12 EST


On Tue, Nov 5, 2024 at 4:25 AM Athira Rajeev
<atrajeev@xxxxxxxxxxxxxxxxxx> wrote:
> Hi,
>
> This hits a compilation fail:

Oh I see. Apologies, I thought compiling the kernel also compiled the
tools directory so I didn't get any compilation errors.

> So the strscpy here is defined as strcpy itself.
>
> Ian discussed about having an strscpy shim for perf here :
> https://lore.kernel.org/linux-perf-users/172892779710.897882.14949543082561189584.b4-ty@xxxxxxxxxx/T/#meaa2f8d993c6db435f9ed399dc1bf10132a31292
>
> So IIUC, we are yet to have the safe strscpy in the tools perf.

Is there any issue with just porting over the kernel code?

- Daniel