From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
Kees Cook <kees@kernel.org>, Andy Shevchenko <andy@kernel.org>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] string: use strnlen in strlcat
Date: Sat, 2 May 2026 11:37:08 +0300 [thread overview]
Message-ID: <afW3tJH4XfeX_OXG@ashevche-desk.local> (raw)
In-Reply-To: <CAHp75Vd10OdNQfhb-hOAapJ4=uhZ+t26vp_WMAoeCska6NCyOA@mail.gmail.com>
On Fri, May 01, 2026 at 11:55:33AM +0300, Andy Shevchenko wrote:
> On Thu, Apr 30, 2026 at 11:53 PM Thorsten Blum <thorsten.blum@linux.dev> wrote:
> >
> > Use strnlen() to limit the destination scan to the provided buffer size.
> > Remove the redundant comment.
>
> Please, do not spend time on amending strlcat(). This function must
> die. Instead, convert current users to use alternative ways.
Note, there is a patch by Kees to address this in partitions framework
(vast of the users of strlcat() in the kernel). Not sure if it's already
pending in Linux Next or not yet.
I have done a simple one in ACPI recently (in upstream already I believe).
So, you can use those two examples and continue killing strlcat().
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-05-02 8:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 20:50 [PATCH] string: use strnlen in strlcat Thorsten Blum
2026-05-01 8:55 ` Andy Shevchenko
2026-05-02 8:37 ` Andy Shevchenko [this message]
2026-05-04 12:26 ` Manuel Ebner
2026-05-04 12:52 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=afW3tJH4XfeX_OXG@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thorsten.blum@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox