lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240423-sysctl-const-handler-v3-9-e0beccb836e2@weissschuh.net>
Date: Tue, 23 Apr 2024 09:54:44 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Luis Chamberlain <mcgrof@...nel.org>, 
 Joel Granados <j.granados@...sung.com>, Kees Cook <keescook@...omium.org>
Cc: 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, 
 Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH v3 09/11] ipvs: constify ctl_table arguments of utility
 functions

In a future commit the proc_handlers themselves will change to
"const struct ctl_table". As a preparation for that adapt the internal
helpers.

Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
 net/netfilter/ipvs/ip_vs_ctl.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 143a341bbc0a..689ac521ea2d 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1924,7 +1924,8 @@ proc_do_sync_ports(struct ctl_table *table, int write,
 	return rc;
 }
 
-static int ipvs_proc_est_cpumask_set(struct ctl_table *table, void *buffer)
+static int ipvs_proc_est_cpumask_set(const struct ctl_table *table,
+				     void *buffer)
 {
 	struct netns_ipvs *ipvs = table->extra2;
 	cpumask_var_t *valp = table->data;
@@ -1962,8 +1963,8 @@ static int ipvs_proc_est_cpumask_set(struct ctl_table *table, void *buffer)
 	return ret;
 }
 
-static int ipvs_proc_est_cpumask_get(struct ctl_table *table, void *buffer,
-				     size_t size)
+static int ipvs_proc_est_cpumask_get(const struct ctl_table *table,
+				     void *buffer, size_t size)
 {
 	struct netns_ipvs *ipvs = table->extra2;
 	cpumask_var_t *valp = table->data;

-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ