[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240429094747.29046-G-hca@linux.ibm.com>
Date: Mon, 29 Apr 2024 11:47:47 +0200
From: Heiko Carstens <hca@...ux.ibm.com>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: Luis Chamberlain <mcgrof@...nel.org>,
Joel Granados <j.granados@...sung.com>,
Kees Cook <keescook@...omium.org>, Eric Dumazet <edumazet@...gle.com>,
Dave Chinner <david@...morbit.com>, linux-fsdevel@...r.kernel.org,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, linux-mm@...ck.org,
linux-security-module@...r.kernel.org, bpf@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-xfs@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
kexec@...ts.infradead.org, linux-hardening@...r.kernel.org,
bridge@...ts.linux.dev, lvs-devel@...r.kernel.org,
linux-rdma@...r.kernel.org, rds-devel@....oracle.com,
linux-sctp@...r.kernel.org, linux-nfs@...r.kernel.org,
apparmor@...ts.ubuntu.com
Subject: Re: [PATCH v3 11/11] sysctl: treewide: constify the ctl_table
argument of handlers
On Tue, Apr 23, 2024 at 09:54:46AM +0200, Thomas Weißschuh wrote:
> Adapt the proc_hander function signature to make it clear that handlers
> are not supposed to modify their ctl_table argument.
>
> This is a prerequisite to moving the static ctl_table structs into
> rodata.
> By migrating all handlers at once a lengthy transition can be avoided.
>
> The patch was mostly generated by coccinelle with the following script:
>
> @@
> identifier func, ctl, write, buffer, lenp, ppos;
> @@
>
> int func(
> - struct ctl_table *ctl,
> + const struct ctl_table *ctl,
> int write, void *buffer, size_t *lenp, loff_t *ppos)
> { ... }
>
> In addition to the scripted changes some other changes are done:
>
> * the typedef proc_handler is adapted
>
> * the prototypes of non-static handler are adapted
>
> * kernel/seccomp.c:{read,write}_actions_logged() and
> kernel/watchdog.c:proc_watchdog_common() are adapted as they need to
> adapted together with the handlers for type-consistency reasons
>
> Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
..
> arch/s390/appldata/appldata_base.c | 10 ++---
> arch/s390/kernel/debug.c | 2 +-
> arch/s390/kernel/topology.c | 2 +-
> arch/s390/mm/cmm.c | 6 +--
Acked-by: Heiko Carstens <hca@...ux.ibm.com> # s390
Powered by blists - more mailing lists