mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>,
	Josh Law <joshlaw48@gmail.com>
Cc: akpm@linux-foundation.org, James.Bottomley@hansenpartnership.com,
	linux-kernel@vger.kernel.org, andy.shevchenko@gmail.com
Subject: Re: [RFC] [QUESTION] Stuff to do for string
Date: Wed, 22 Apr 2026 16:13:45 -0700	[thread overview]
Message-ID: <017A12AC-0FCC-42F0-86C4-7413CE977025@kernel.org> (raw)
In-Reply-To: <aekgQ5rvKf1VwkTY@ashevche-desk.local>



On April 22, 2026 12:23:47 PM PDT, Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
>On Wed, Apr 22, 2026 at 05:56:38PM +0100, Josh Law wrote:
>> On 22 April 2026 17:51:40 BST, Andy Shevchenko
>> <andriy.shevchenko@intel.com> wrote:
>> >On Wed, Apr 22, 2026 at 05:28:39PM +0100, Josh Law wrote:
>> >> On 22 April 2026 17:12:37 BST, Andy Shevchenko
>> >> <andriy.shevchenko@intel.com> wrote:
>> >> >On Wed, Apr 22, 2026 at 03:57:16PM +0100, Josh Law wrote:
>> >> >> Hello, (this is my first RFC, so maybe cc is bad, but yeah)
>> >> >> 
>> >> >> What do you guys have planned/would like me to have a look at doing
>> >in
>> >> >> lib/string.c
>> >> >> 
>> >> >> I am home from school so I am virtually free
>> >> >
>> >> >Arbitrary things that came to my mind (no particular order)
>> >> >
>> >> >- Get rid of strlcat()
>> >> 
>> >> Yeah, I'm working on that actually :D, privately, I sorta stopped cuz i
>> >> thought kees was gonna do that, if not, not issue!
>> >> 
>> >> >- Clean up include/linux/string.h
>> >> >  a) drop extern for functions
>> >> >  b) put the headers it includes into an order and follow IWYU
>> >> 
>> >> Hmm, yeah, I see it's kind of a mess (in a polite way) 
>> >> 
>> >> >- kill memscan() in favour of memchr() / memchr_inv()
>> >> 
>> >> Hmm, maybe, is there a crazy amount of files that call memscan()?
>> >
>> >You can find an answer yourself. The daily-basis kill feature tool is
>> >`git grep ...`.
>> 
>> Oh, yes, I see this now, I should be able to do this, gotta slap the
>> computer awake cuz sometimes it breaks. So it may take time for me
>> to submit it, would you like a treewide cleanup, or subsystem by subsystem
>
>It depends case by case. As Kees' patch shows in some cases it may touch too
>many things to be treewide and has to be subsystem / driver focused.

Traditionally, patches for these kinds of changes (i.e. strlcat) get split per subsystem or per driver, since they're not 1:1 mechanical conversions.

And while I did a couple conversions recently (since I was already looking at the code), it's not on my active TODO right now. Feel free to tackle it!

You can reference https://github.com/KSPP/linux/issues/370 with a Link tag too.

-Kees

-- 
Kees Cook

  parent reply	other threads:[~2026-04-22 23:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 14:57 Josh Law
2026-04-22 16:12 ` Andy Shevchenko
2026-04-22 16:28   ` Josh Law
2026-04-22 16:51     ` Andy Shevchenko
2026-04-22 16:56       ` Josh Law
2026-04-22 19:23         ` Andy Shevchenko
2026-04-22 19:25           ` Josh Law
2026-04-22 23:13           ` Kees Cook [this message]
2026-04-22 23:27             ` Josh Law
2026-04-23  6:24 ` Krzysztof Kozlowski
2026-04-23  6:29   ` Josh Law
2026-04-23  6:44     ` Krzysztof Kozlowski
2026-04-23  6:46       ` Josh Law
2026-04-23  6:53         ` Krzysztof Kozlowski
2026-04-23  6:56           ` Josh Law
2026-04-23  7:11             ` Krzysztof Kozlowski
2026-04-23  7:37               ` Andy Shevchenko
2026-04-23 12:32                 ` Steven Rostedt

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=017A12AC-0FCC-42F0-86C4-7413CE977025@kernel.org \
    --to=kees@kernel.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=joshlaw48@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®