Re: [PATCH] lib/string: rewrite strlcat() to use sized_strscpy()

From: Andy Shevchenko

Date: Mon Mar 16 2026 - 12:54:17 EST


On Mon, Mar 16, 2026 at 04:49:39PM +0000, Josh Law wrote:
> Replace the hand-rolled copy logic and BUG_ON() in strlcat() with a
> call to sized_strscpy(). This removes the kernel panic on caller
> misuse (dsize >= count) and instead returns a truncation indicator
> consistent with BSD strlcat semantics.
>
> strlcat() is deprecated and callers should be converted to strscpy()
> or similar bounded interfaces.

I mentioned something different, id est converting users.
This function will go when ~130 or so users gone.

So, I don't see a need to touch this function (implementation) at all.

--
With Best Regards,
Andy Shevchenko