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 6FF952153D8 for ; Thu, 11 Dec 2025 01:37:14 +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=1765417034; cv=none; b=P2HLTC1rLfFyl+KVtrRboTeBwqqLN/1QewRCUC+D3aoawXbMJ7YIha5jhoy3aS8bf/a4EIP7yYxX5Vj/Z//uvchCF6KsIOXMysF7RAOI+/VQGFGQyfl3gLAE6c7O5EISnb57OL5YItL+UOkckAZuVNyniOztFEylW+xBb+0L50s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765417034; c=relaxed/simple; bh=n+9g2JgdFj8T1N/HU2TUa1N0FmuWTTQ+EG/gxfX3CKQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=shm9+f59kYwRceNu6n4RzUnVumZeOwfpXVjUUHFoV881p2bi/jPFD0nGn76XH2fLwakpQT1Sw5t4XxGb3zzW/q2rFe9f0GtXDBAvYHmJ/P1RYnjFcB62m9xXt2QAJfsnqxrIutwnMVyNChUOl5j7lYL+OX01/OLHcdOwAODU2Lo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V6AMT8jM; 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="V6AMT8jM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF1DEC4CEF1; Thu, 11 Dec 2025 01:37:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765417034; bh=n+9g2JgdFj8T1N/HU2TUa1N0FmuWTTQ+EG/gxfX3CKQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V6AMT8jM/NWZgAaaUGPPuWI1qMzBJz+zOjs4zb7tpTK7FPSUMxZQOkuEkuw7vGa25 QNoAWlM1YQ5qhv3qNEFLEYJ3CYdWKKsYtpwnjZGrZYOlot7FowEd8nbM33Lp2AzOA8 V69jxhN36SKUJpp1bj2ZcW0VkIo8xjN5tRfUG2XziOkPiU6vPs15XE60rjWp2FnV5m WpOluu1qliViMciPhLMkb4Udyp7hUpcNt35QN4HGx/LbMaAc/3+qoTytZgrpGRFQ9i npg1B49J7LiraRY0vLupKzuJVo2r1CAZ3WwlK+MeYLum7tCz0uRAwfQwpvpRE4n7mP K5gi0nmY2EvMQ== Date: Wed, 10 Dec 2025 17:37:13 -0800 From: Kees Cook To: Alejandro Colomar Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Christopher Bazley , Rasmus Villemoes , Marco Elver , Michal Hocko , Linus Torvalds , Al Viro , Alexander Potapenko , Dmitry Vyukov , Jann Horn , Andrew Morton , "Maciej W. Rozycki" Subject: Re: [PATCH v5 4/4] mm: Use ARRAY_END() instead of open-coding it Message-ID: <202512101736.DE24BE89@keescook> References: 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=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Dec 11, 2025 at 01:21:59AM +0100, Alejandro Colomar wrote: > Hi Kees, > > On Thu, Dec 11, 2025 at 08:18:56AM +0900, Kees Cook wrote: > > > > > > On December 11, 2025 7:46:49 AM GMT+09:00, Alejandro Colomar wrote: > > >Cc: Kees Cook > > >Cc: Linus Torvalds > > >Signed-off-by: Alejandro Colomar > > > > Hm, this seems to be missing a commit log body? > > Actually, there's not much to it. The patch uses ARRAY_END() where it > was being open-coded. There aren't any bugs in this code, so it's > purely cosmetic (and of course, to prevent future issues, in case the > code is modified). Maybe I could say precisely that. What would you > say here? Yup, that would be perfect. A what/why, even a single sentence, is a minimum for commit log bodies. > > Are there other open-coded instances that could be replaced? This seems like a great task for a coccinelle script. > > There are many, but I wanted to keep them out of this initial patch set, > to make it easy to apply. When this one is applied, I could work on a > second round that replaces more of them with coccinelle. This is just > for showing that this is beneficial, and to make sure that you ask for > more. :) > > Also, it's easier if there are few maintainers that would block an > initial patch set. If restrict the patch set to a few files, I don't > have to deal with many of them. Once I get used to this, I'll deal with > all of them. Sounds good! -Kees -- Kees Cook