[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9e657181-866a-4626-82d0-e0030051b003@t-8ch.de>
Date: Thu, 25 Apr 2024 09:10:27 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Jakub Kicinski <kuba@...nel.org>
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 00/11] sysctl: treewide: constify ctl_table argument
of sysctl handlers
On 2024-04-24 20:12:34+0000, Jakub Kicinski wrote:
> On Tue, 23 Apr 2024 09:54:35 +0200 Thomas Weißschuh wrote:
> > The series was split from my larger series sysctl-const series [0].
> > It only focusses on the proc_handlers but is an important step to be
> > able to move all static definitions of ctl_table into .rodata.
>
> Split this per subsystem, please.
Unfortunately this would introduce an enormous amount of code churn.
The function prototypes for each callback have to stay consistent.
So a another callback member ("proc_handler_new") is needed and users
would be migrated to it gradually.
But then *all* definitions of "struct ctl_table" throughout the tree need to
be touched.
In contrast, the proposed series only needs to change the handler
implementations, not their usage sites.
There are many, many more usage sites than handler implementations.
Especially, as the majority of sysctl tables use the standard handlers
(proc_dostring, proc_dobool, ...) and are not affected by the proposed
aproach at all.
And then we would have introduced a new handler name "proc_handler_new"
and maybe have to do the whole thing again to rename it back to
the original and well-known "proc_handler".
Of course if somebody has a better aproach, I'm all ears.
Thomas
Powered by blists - more mailing lists