[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] treewide: const qualify ctl_tables where applicable
- To: Joel Granados <joel.granados@xxxxxxxxxx>
- From: "Darrick J. Wong" <djwong@xxxxxxxxxx>
- Date: Thu, 9 Jan 2025 07:51:54 -0800
- Cc: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>, Luis Chamberlain <mcgrof@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, intel-xe@xxxxxxxxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-serial@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-aio@xxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, netfs@xxxxxxxxxxxxxxx, codalist@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxxx, fsverity@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, io-uring@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx, linux-hardening@xxxxxxxxxxxxxxx, apparmor@xxxxxxxxxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx, keyrings@xxxxxxxxxxxxxxx
- Delivery-date: Thu, 09 Jan 2025 15:52:02 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Jan 09, 2025 at 02:16:39PM +0100, Joel Granados wrote:
> Add the const qualifier to all the ctl_tables in the tree except the
> ones in ./net dir. The "net" sysctl code is special as it modifies the
> arrays before passing it on to the registration function.
>
> Constifying ctl_table structs will prevent the modification of
> proc_handler function pointers as the arrays would reside in .rodata.
> This is made possible after commit 78eb4ea25cd5 ("sysctl: treewide:
> constify the ctl_table argument of proc_handlers") constified all the
> proc_handlers.
Sounds like a good idea,
Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> # xfs
--D
|