From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB6C9370D72 for ; Wed, 22 Apr 2026 23:13:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776899628; cv=none; b=brsYsWFauVDAJ/02IoGxDokEamNOTgfN4LDp3HgvRqzOH9PCnPxX7hK+e+Sl+gNPskWyStzFItAL11A4p0tXgpFUWIVHu7xU62o83lOUCsjHgU/Uobq0pinb9sfUTAAKbsi7DkEteILFwQCYfKJzGuUqluVBKtaNAnQ4fpNuNVI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776899628; c=relaxed/simple; bh=hIFECPDMw95GxXy0A6wdFL5WDgCHBwIFWMLtjMv+LA8=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=hGeAcXMgN+/LSQcEcGTs8DfihqXM563M3HflZ+qRiWKWE7ZKomamWiL8k2oS4+73C6wRM4MAqRyaFTvPi0oNJQ4xmvsYubTboSmJ4QGU5mOu9k7udd2M1w99AK0B5ZiEgTPcxuV/XwBjsTCZrAcG8rMxV9h0s2hGii448jBEHV8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CJrHACl/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CJrHACl/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6B20C19425; Wed, 22 Apr 2026 23:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776899628; bh=hIFECPDMw95GxXy0A6wdFL5WDgCHBwIFWMLtjMv+LA8=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=CJrHACl/CgFjY9E2XEYOF+tRDJguNQVY/WGR9yf11xt4l8+5vrIYdpw5Qg2wDUn4+ t5xOBzgCbbqJDoOTkm6b4m0Bvh+aEKsowrmkcTEHuiGWmnvCsS0yeTTbcTsGT18qhx oKyI/u4bMbRHOIdKJPrKQzqgGKSpUC9dpzd2XqDVEYWSn/sTjedywhHOSEDc+J22EL oGwX9GKWushJ6mm7Koq317MypsFG+VGz0QoLQhOv/9LDFO5TkZujUAhPFw2+78133a fKUQqjZ85dhGRGjwgRG8vfV45avBBzlK3ZrSk6ODH4UlQHjASO2QKwXwyTKaeTVESZ sbFHJ1NtM6pMA== Date: Wed, 22 Apr 2026 16:13:45 -0700 From: Kees Cook To: Andy Shevchenko , Josh Law 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 User-Agent: K-9 Mail for Android In-Reply-To: References: <313CDBE8-2AE7-4104-9DE0-C119A843A0F4@gmail.com> Message-ID: <017A12AC-0FCC-42F0-86C4-7413CE977025@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On April 22, 2026 12:23:47 PM PDT, Andy Shevchenko wrote: >On Wed, Apr 22, 2026 at 05:56:38PM +0100, Josh Law wrote: >> On 22 April 2026 17:51:40 BST, Andy Shevchenko >> wrote: >> >On Wed, Apr 22, 2026 at 05:28:39PM +0100, Josh Law wrote: >> >> On 22 April 2026 17:12:37 BST, Andy Shevchenko >> >> 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) >> >> >>=20 >> >> >> What do you guys have planned/would like me to have a look at doi= ng >> >in >> >> >> lib/string=2Ec >> >> >>=20 >> >> >> I am home from school so I am virtually free >> >> > >> >> >Arbitrary things that came to my mind (no particular order) >> >> > >> >> >- Get rid of strlcat() >> >>=20 >> >> Yeah, I'm working on that actually :D, privately, I sorta stopped cu= z i >> >> thought kees was gonna do that, if not, not issue! >> >>=20 >> >> >- Clean up include/linux/string=2Eh >> >> > a) drop extern for functions >> >> > b) put the headers it includes into an order and follow IWYU >> >>=20 >> >> Hmm, yeah, I see it's kind of a mess (in a polite way)=20 >> >>=20 >> >> >- kill memscan() in favour of memchr() / memchr_inv() >> >>=20 >> >> Hmm, maybe, is there a crazy amount of files that call memscan()? >> > >> >You can find an answer yourself=2E The daily-basis kill feature tool i= s >> >`git grep =2E=2E=2E`=2E >>=20 >> Oh, yes, I see this now, I should be able to do this, gotta slap the >> computer awake cuz sometimes it breaks=2E So it may take time for me >> to submit it, would you like a treewide cleanup, or subsystem by subsys= tem > >It depends case by case=2E As Kees' patch shows in some cases it may touc= h too >many things to be treewide and has to be subsystem / driver focused=2E Traditionally, patches for these kinds of changes (i=2Ee=2E strlcat) get s= plit per subsystem or per driver, since they're not 1:1 mechanical conversi= ons=2E 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=2E Feel free to tackle = it! You can reference https://github=2Ecom/KSPP/linux/issues/370 with a Link t= ag too=2E -Kees --=20 Kees Cook