Re: [PATCH] sysctl: treewide: constify ctl_table_header::ctl_table_arg

From: Joel Granados
Date: Thu Mar 28 2024 - 17:08:46 EST


On Fri, Mar 22, 2024 at 09:34:36PM +0100, Thomas Weißschuh wrote:
> To be able to constify instances of struct ctl_tables it is necessary to
> remove ways through which non-const versions are exposed from the
> sysctl core.
> One of these is the ctl_table_arg member of struct ctl_table_header.
>
> Constify this reference as a prerequisite for the full constification of
> struct ctl_table instances.
>
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> ---
> This patch is only sent to LKML and the sysctl maintainers to avoid
> spamming lots of maintainers for trivial changes.
>
> It is based upon the branch sysctl/constfy.
>
> It was implemented by manually searching for "ctl_table_arg"
> throughout the tree and inspecing each found site.
>
> If somebody comes up with a cocciscript for this, I'll be happy to use
> that.
> ---
> drivers/net/vrf.c | 2 +-
> include/linux/sysctl.h | 2 +-
> ipc/ipc_sysctl.c | 2 +-
> ipc/mq_sysctl.c | 2 +-
> kernel/ucount.c | 2 +-
> net/ax25/sysctl_net_ax25.c | 2 +-
> net/bridge/br_netfilter_hooks.c | 2 +-
> net/core/sysctl_net_core.c | 2 +-
> net/ieee802154/6lowpan/reassembly.c | 2 +-
> net/ipv4/devinet.c | 2 +-
> net/ipv4/ip_fragment.c | 2 +-
> net/ipv4/route.c | 2 +-
> net/ipv4/sysctl_net_ipv4.c | 2 +-
> net/ipv4/xfrm4_policy.c | 2 +-
> net/ipv6/addrconf.c | 2 +-
> net/ipv6/netfilter/nf_conntrack_reasm.c | 2 +-
> net/ipv6/reassembly.c | 2 +-
> net/ipv6/sysctl_net_ipv6.c | 6 +++---
> net/ipv6/xfrm6_policy.c | 2 +-
> net/mpls/af_mpls.c | 4 ++--
> net/mptcp/ctrl.c | 2 +-
> net/netfilter/nf_conntrack_standalone.c | 2 +-
> net/netfilter/nf_log.c | 2 +-
> net/sctp/sysctl.c | 2 +-
> net/smc/smc_sysctl.c | 2 +-
> net/unix/sysctl_net_unix.c | 2 +-
> net/xfrm/xfrm_sysctl.c | 2 +-
> 27 files changed, 30 insertions(+), 30 deletions(-)

I was expecting a lot more ppl cced for such an extensive patch; I only
see Eric Dumazet <edumazet@xxxxxxxxxx>, Luis Chamberlain <mcgrof@xxxxxxxxxx>,
and myself in the "To:" list. I'm missing the network maintainers. How
are you calculating the CC? Are you using get_maintainer.pl?

Best

--

Joel Granados

Attachment: signature.asc
Description: PGP signature