Re: kernfs: Prefer strscpy over strlcpy calls

From: Tejun Heo
Date: Tue May 09 2023 - 20:43:37 EST


On Tue, May 09, 2023 at 08:40:08PM -0400, Azeem Shaikh wrote:
> Thanks for the quick response Tejun! I forgot to include the relevant links
> in the commit log, sorry about that.
> https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
> mentions that strlcpy is deprecated and should be replaced with strscpy
> instead. https://github.com/KSPP/linux/issues/89 is the relevant security
> bug which aims to remove strlcpy from the kernel entirely.
>
> Does that help justify this change? And if so, would you like me to resend
> this patch with the relevant links included in the commit log?

Yeah, I think so. Please explicitly state that this is a part of tree-wide
cleanup.

Thanks.

--
tejun