[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202501311203.D6FDB314@keescook>
Date: Fri, 31 Jan 2025 12:03:39 -0800
From: Kees Cook <kees@...nel.org>
To: Joel Granados <joel.granados@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Anna Schumaker <anna.schumaker@...cle.com>,
Ashutosh Dixit <ashutosh.dixit@...el.com>,
Baoquan He <bhe@...hat.com>, Bill O'Donnell <bodonnel@...hat.com>,
Corey Minyard <cminyard@...sta.com>,
"Darrick J. Wong" <djwong@...nel.org>,
Jani Nikula <jani.nikula@...el.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Song Liu <song@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>, Wei Liu <wei.liu@...nel.org>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: Re: [GIT PULL] sysctl constification changes for v6.14-rc1
On Fri, Jan 31, 2025 at 02:57:40PM +0100, Joel Granados wrote:
> From 431abf6c9c11a8b7321842ed0747b3200d43ef34 Mon Sep 17 00:00:00 2001
> From: Joel Granados <joel.granados@...nel.org>
> Date: Fri, 31 Jan 2025 14:10:57 +0100
> Subject: [PATCH] csky: Remove the size from alignment_tbl declaration
>
> Having to synchronize the number of ctl_table array elements with the
> size in the declaration can lead to discrepancies between the two
> values. Since commit d7a76ec87195 ("sysctl: Remove check for sentinel
> element in ctl_table arrays"), the calculation of the ctl_table array
> size is done solely by the ARRAY_SIZE macro removing the need for the
> size in the declaration.
>
> Remove the size for the aligment_tbl declaration and const qualify the
> array for good measure.
>
> Signed-off-by: Joel Granados <joel.granados@...nel.org>
FWIW, this looks correct to me.
Reviewed-by: Kees Cook <kees@...nel.org>
--
Kees Cook
Powered by blists - more mailing lists