Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp28118lqb; Fri, 15 Mar 2024 14:00:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXM4jKjjVQ2szhB1dsb365FtChz6NLCGDXKl4E9UMmkJli4lyLtKqaNqa+/PgCL+zcR67k5oQkR1fpoqkf1iJCftkWYqHE7nb+Ok9w+Hw== X-Google-Smtp-Source: AGHT+IGRQBsGhIjin0MvKWrOj/3baIkSNvJ7VAqKlmZPZSe+VMJQ9Kq9BYOygQZ6kZCVV6cuLhX0 X-Received: by 2002:a05:6359:6102:b0:17e:bae0:fe91 with SMTP id rz2-20020a056359610200b0017ebae0fe91mr2898712rwb.5.1710536427229; Fri, 15 Mar 2024 14:00:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710536426; cv=pass; d=google.com; s=arc-20160816; b=NTGtrKX8X4CaQMF7ejAkodwN3wt4X5TS1kvBMORHrfBRPXOx9HPzNh3I8m1qSRy3V1 xzMgs1ueYY8vCmGPLIYcuW2gqSh0SNA+CqYgVzGrVyv2b7H3Eh277mXUI5EqeCzV3nY5 gPYGjTF6OKXTEkgYeqaMi2qJPWcUwdvBw3i/I6zWzgINPrEWKsdOgZ3vgawxPhZGlf0F vdeqRXrJ7zSO7grR6bo393i5G0PkcDEsCgDroNV/vl4zltHGs/eM0+nNIyIBME656Tbm nCXZ/425cl2b+3PYGcNQrlJgDXiMJWnzgX2vypfUizbGgwVg7ybWAZIqCWy8TfFhdsEI bE6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=rIJs+6xcdTgPiPHzD3/SxSjeiXKKP/u1pSX3IEU0Qdg=; fh=P5LopblOuM+wTyGvxUQN+d1jxiejuSAgMh+CJu1BpsA=; b=hO7IVkT0YfVWxzz64DvGOMGxOnA+q537mNVHZuluYz6mpWinz+YX2ThuAZxWlqkijA WpCulsYlnazKrvjIvwp7dQf7tPK3jrnXvcJzpGfzJCwE9zVH9heZnh/XwvbzN4VILtRI wt4HwthKLPhr/PnxUMmbX8HhJl1VG6H82tKB3eTv3y2FMekiBt1K7b92wllHGrabRsDd vQsCrYkjwl9kjouiEM8XEuwoWhXPxOC+SWtYWv/rLj8OB2AQos2Ecky77vhdGG67HFaz sEhU2ADzh0Q8T9X92mr+/QTsP0D7ss/jBRQ19Cj80w72ws3xfMjuZrMwwEeCwyoYimGT Rh4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=ZRYoy5xK; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2343-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a2-20020a630b42000000b005dcae4c1ff4si3313651pgl.172.2024.03.15.14.00.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 14:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=ZRYoy5xK; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2343-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7B0CBB2147A for ; Fri, 15 Mar 2024 20:55:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5605156745; Fri, 15 Mar 2024 20:49:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="ZRYoy5xK" X-Original-To: linux-nfs@vger.kernel.org Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C926355C13; Fri, 15 Mar 2024 20:49:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710535772; cv=none; b=KWTj+dZcVT6GZwOPouNVK59zv1impsiEZjr1DY0TbPr+3gkAb3KmuDlJfb2qLaSfnY/4Y41Jd/ioNtB0Dn3SQdedgoqq/l4iWWpAISu5x+sbGTaELZJBMNkmKXjinCtEJoUbdOPD4ElIkmXyh5rSjKCKR2d2zNBxdB5Uv1BKzdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710535772; c=relaxed/simple; bh=odMbVtXputh1B0wvO7gtV7cKLTLD5qqVWgyPwr4fby8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oNjECK7F+gHcKzrAXQhVmyUzc9+Si9XjskYNq6nb2uG0DFkwYd7p0/s1vgZoJZJxk10zIytdWqFMOBd1LRykgsqK5Okt3KBJbOjGRd/veJsiZyXNDVGpMVMlf8ShyLEnGnu0WSBvmGCBMSY+Hzj4Ohep/G6Z7BN4BjoIPOdFAgY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=ZRYoy5xK; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535767; bh=odMbVtXputh1B0wvO7gtV7cKLTLD5qqVWgyPwr4fby8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZRYoy5xKlPbaQJbgxsp1QGsFld7cYmUHymRwffDkifNDwOHyAedHpITyb+WigYxCt q1gwkFJh6JIVyUe2TB4mwf5as8GGNXoQ1lKGvZwP/yMMpArCzaDsGbQ55vzZG5KmO6 AB8XmeGq62jLL6684ZpFESHQRsP/qQVQN/RRxZNQ= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:07 +0100 Subject: [PATCH 09/11] ipvs: constify ctl_table arguments of utility functions Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240315-sysctl-const-handler-v1-9-1322ac7cb03d@weissschuh.net> References: <20240315-sysctl-const-handler-v1-0-1322ac7cb03d@weissschuh.net> In-Reply-To: <20240315-sysctl-const-handler-v1-0-1322ac7cb03d@weissschuh.net> To: Greg Kroah-Hartman , Kees Cook , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Muchun Song , Andrew Morton , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Luis Chamberlain , Joel Granados , Catalin Marinas , Will Deacon , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Gerald Schaefer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Phillip Potter , Theodore Ts'o , "Jason A. Donenfeld" , Sudip Mukherjee , Mark Rutland , Atish Patra , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexander Viro , Christian Brauner , Jan Kara , Eric Biederman , Chandan Babu R , "Darrick J. Wong" , Steven Rostedt , Masami Hiramatsu , Peter Zijlstra , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Ian Rogers , Adrian Hunter , Balbir Singh , "Naveen N. Rao" , Anil S Keshavamurthy , Petr Mladek , John Ogness , Sergey Senozhatsky , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Andy Lutomirski , Will Drewry , John Stultz , Stephen Boyd , Mathieu Desnoyers , "Matthew Wilcox (Oracle)" , Roopa Prabhu , Nikolay Aleksandrov , Remi Denis-Courmont , Allison Henderson , Marcelo Ricardo Leitner , Xin Long , Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Trond Myklebust , Anna Schumaker , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Alexander Popov Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-fsdevel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-xfs@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kexec@lists.infradead.org, bridge@lists.linux.dev, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-sctp@vger.kernel.org, linux-nfs@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1710535695; l=1292; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=odMbVtXputh1B0wvO7gtV7cKLTLD5qqVWgyPwr4fby8=; b=7GpUccAEuc2xBmXqEFNwFbz0XLotyU5tmG9v17gkewwd7Qns7NOwDWHSnZv3ofT48IWObeYTu 7RChjCUP9KPAHqCOBeJFTfx/E5jUeficzF5rmf2RzH6o0IYBCrGbbwP X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= 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 --- 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