linux/net/netfilter/ipvs
Joel Granados 78eb4ea25c sysctl: treewide: constify the ctl_table argument of proc_handlers
const qualify the struct ctl_table argument in the proc_handler function
signatures. This is a prerequisite to moving the static ctl_table
structs into .rodata data which will ensure that proc_handler function
pointers cannot be modified.

This patch has been generated by the following coccinelle script:

```
  virtual patch

  @r1@
  identifier ctl, write, buffer, lenp, ppos;
  identifier func !~ "appldata_(timer|interval)_handler|sched_(rt|rr)_handler|rds_tcp_skbuf_handler|proc_sctp_do_(hmac_alg|rto_min|rto_max|udp_port|alpha_beta|auth|probe_interval)";
  @@

  int func(
  - struct ctl_table *ctl
  + const struct ctl_table *ctl
    ,int write, void *buffer, size_t *lenp, loff_t *ppos);

  @r2@
  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)
  { ... }

  @r3@
  identifier func;
  @@

  int func(
  - struct ctl_table *
  + const struct ctl_table *
    ,int , void *, size_t *, loff_t *);

  @r4@
  identifier func, ctl;
  @@

  int func(
  - struct ctl_table *ctl
  + const struct ctl_table *ctl
    ,int , void *, size_t *, loff_t *);

  @r5@
  identifier func, write, buffer, lenp, ppos;
  @@

  int func(
  - struct ctl_table *
  + const struct ctl_table *
    ,int write, void *buffer, size_t *lenp, loff_t *ppos);

```

* Code formatting was adjusted in xfs_sysctl.c to comply with code
  conventions. The xfs_stats_clear_proc_handler,
  xfs_panic_mask_proc_handler and xfs_deprecated_dointvec_minmax where
  adjusted.

* The ctl_table argument in proc_watchdog_common was const qualified.
  This is called from a proc_handler itself and is calling back into
  another proc_handler, making it necessary to change it as part of the
  proc_handler migration.

Co-developed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Co-developed-by: Joel Granados <j.granados@samsung.com>
Signed-off-by: Joel Granados <j.granados@samsung.com>
2024-07-24 20:59:29 +02:00
..
ip_vs_app.c ipvs: fix WARNING in ip_vs_app_net_cleanup() 2022-11-02 09:39:14 +01:00
ip_vs_conn.c ipvs: Simplify the allocation of ip_vs_conn slab caches 2024-01-29 15:43:20 +01:00
ip_vs_core.c ip_tunnel: convert __be16 tunnel flags to bitmaps 2024-04-01 10:49:28 +01:00
ip_vs_ctl.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
ip_vs_dh.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_est.c Kill sched.h dependency on rcupdate.h 2023-12-27 11:50:20 -05:00
ip_vs_fo.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_ftp.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_lblc.c netfilter: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
ip_vs_lblcr.c netfilter: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
ip_vs_lc.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_mh.c netfilter: ipvs: Use the bitmap API to allocate bitmaps 2022-07-21 00:55:39 +02:00
ip_vs_nfct.c netfilter: nf_conntrack_sip: fix expectation clash 2019-07-16 13:16:59 +02:00
ip_vs_nq.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_ovf.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_pe_sip.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_pe.c ipvs: don't ignore errors in case refcounting ip_vs module fails 2019-10-24 11:53:19 +02:00
ip_vs_proto_ah_esp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ip_vs_proto_sctp.c ipvs: Avoid unnecessary calls to skb_is_gso_sctp 2024-06-26 00:54:45 +02:00
ip_vs_proto_tcp.c ipvs: adjust the debug info in function set_tcp_state 2020-10-20 13:54:46 +02:00
ip_vs_proto_udp.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ip_vs_proto.c
ip_vs_rr.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_sched.c ipvs: don't ignore errors in case refcounting ip_vs module fails 2019-10-24 11:53:19 +02:00
ip_vs_sed.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_sh.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_sync.c ipv6: annotate data-races around np->mcast_oif 2023-12-11 10:59:17 +00:00
ip_vs_twos.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_wlc.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_wrr.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_xmit.c inet: introduce dst_rtable() helper 2024-04-30 18:32:38 -07:00
Kconfig ipvs: increase ip_vs_conn_tab_bits range for 64BIT 2023-06-01 21:16:38 +02:00
Makefile ipvs: add weighted random twos choice algorithm 2021-01-26 01:09:46 +01:00