On Tue, May 12, 2026 at 12:43:54PM +0200, Manuel Ebner wrote:
> On Tue, 2026-05-12 at 11:52 +0300, Jani Nikula wrote:
> > On Sun, 10 May 2026, Manuel Ebner <[email protected]> wrote:
> > > add strlcat and alternatives
> > 
> > You'd think it's the strlcat() definition that needs a comment above it
> > saying it's deprecated. I don't think folks really look at
> > deprecated.rst.
> 
> arch/s390/lib/string.c
> lib/string.c
> and
> tools/include/nolibc/string.h
> 
> do not mentions anything about obsolete.
> 
> include/linux/fortify-string.h has 
> 
>  /* Defined after fortified strlen() to reuse it. */
>  extern size_t __real_strlcat(char *p, const char *q, size_t avail) 
> __RENAME(strlcat);
>  /**
>   * strlcat - Append a string to an existing string
>   * [...]
>   * Do not use this function. While FORTIFY_SOURCE tries to avoid
>   * read and write overflows, this is only possible when the sizes
>   * of @p and @q are known to the compiler. Prefer building the
>   * string with formatting, via scnprintf(), seq_buf, or similar.
> 
> should i add this to the former three files?

I'm going to remove s390's implementation of strlcat(), and convert the only
two users of strlcat() in s390 code to something else. No reason to add a
comment there.

Reply via email to