Message ID | 20240315-sysctl-const-handler-v1-6-1322ac7cb03d@weissschuh.net (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96A88C54E6A for <linux-mm@archiver.kernel.org>; Fri, 15 Mar 2024 20:48:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 806ED80147; Fri, 15 Mar 2024 16:48:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7695B800B4; Fri, 15 Mar 2024 16:48:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56AA880147; Fri, 15 Mar 2024 16:48:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 405E1800B4 for <linux-mm@kvack.org>; Fri, 15 Mar 2024 16:48:32 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 19EEFC0959 for <linux-mm@kvack.org>; Fri, 15 Mar 2024 20:48:32 +0000 (UTC) X-FDA: 81900461664.28.E09796A Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf23.hostedemail.com (Postfix) with ESMTP id 55B1A140012 for <linux-mm@kvack.org>; Fri, 15 Mar 2024 20:48:30 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=FizCPf3S; dmarc=none; spf=pass (imf23.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710535710; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FbpW8OtDAenCttGekYaNBp6p0kgmPGbT5dc9uTJshoA=; b=1Wsntv1ppC8+JpVvq61q2CQ4ULd3kTrbd9NXiTpcmyWMQ81TaYx5WWfskO5djmrkJMMpd1 FG4p7xgm0lVlfDjB1UoT3Ee1UfLIAGPIZj09GBtqMcvqfZ3xcQNwyNLhCgaYMjc5n2uziA iCfRNu5bcDiR7ViPqb+WbhQxZQpMesg= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=FizCPf3S; dmarc=none; spf=pass (imf23.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710535710; a=rsa-sha256; cv=none; b=XogzPudlj1dQIlBVG6E0BmIp09tuCj5BhehBBCeXJ0B0pEuYP3NEgKhD4Fc9fRSfc5XYXw 1mVxgSIcTwnzGciaE9TWrcdn3b+nNj5NJyoqEDulV3jAkJ41EKlFP5mnsaGH7B5ZWoLVuL wZjBBTSNCkTzsDFBshQ4ZSbuzx4t4yA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535698; bh=yGyEnmkHG4K/QBZUE+wYC6PI0MysqQBf2jxKv03Uqeg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FizCPf3SLAP8QJl7MKFLQmc5kz5/Ber5gPk8JnKK898Pgfacl6e7Q9zZ8wapuxDxV TQWvxZCydhPkPxx+WAYMk6TZp7HXP9SWmdfrZU1oYK6fsVpzjHLFaMHd2iiXqD6aYq mvnmhabBstRavzIG/FFHz4xiVL036JzBS8Q+3twI= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> Date: Fri, 15 Mar 2024 21:48:04 +0100 Subject: [PATCH 06/11] ipv4/sysctl: constify ctl_table arguments of utility functions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240315-sysctl-const-handler-v1-6-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 <gregkh@linuxfoundation.org>, Kees Cook <keescook@chromium.org>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, John Fastabend <john.fastabend@gmail.com>, Andrii Nakryiko <andrii@kernel.org>, Martin KaFai Lau <martin.lau@linux.dev>, Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>, Yonghong Song <yonghong.song@linux.dev>, KP Singh <kpsingh@kernel.org>, Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>, Muchun Song <muchun.song@linux.dev>, Andrew Morton <akpm@linux-foundation.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, David Ahern <dsahern@kernel.org>, Simon Horman <horms@verge.net.au>, Julian Anastasov <ja@ssi.bg>, Pablo Neira Ayuso <pablo@netfilter.org>, Jozsef Kadlecsik <kadlec@netfilter.org>, Florian Westphal <fw@strlen.de>, Luis Chamberlain <mcgrof@kernel.org>, Joel Granados <j.granados@samsung.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Heiko Carstens <hca@linux.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, Alexander Gordeev <agordeev@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Sven Schnelle <svens@linux.ibm.com>, Gerald Schaefer <gerald.schaefer@linux.ibm.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>, Phillip Potter <phil@philpotter.co.uk>, Theodore Ts'o <tytso@mit.edu>, "Jason A. Donenfeld" <Jason@zx2c4.com>, Sudip Mukherjee <sudipm.mukherjee@gmail.com>, Mark Rutland <mark.rutland@arm.com>, Atish Patra <atishp@atishpatra.org>, Anup Patel <anup@brainfault.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>, Eric Biederman <ebiederm@xmission.com>, Chandan Babu R <chandan.babu@oracle.com>, "Darrick J. Wong" <djwong@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Arnaldo Carvalho de Melo <acme@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com>, Balbir Singh <bsingharora@gmail.com>, "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>, Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>, Petr Mladek <pmladek@suse.com>, John Ogness <john.ogness@linutronix.de>, Sergey Senozhatsky <senozhatsky@chromium.org>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>, Daniel Bristot de Oliveira <bristot@redhat.com>, Valentin Schneider <vschneid@redhat.com>, Andy Lutomirski <luto@amacapital.net>, Will Drewry <wad@chromium.org>, John Stultz <jstultz@google.com>, Stephen Boyd <sboyd@kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Roopa Prabhu <roopa@nvidia.com>, Nikolay Aleksandrov <razor@blackwall.org>, Remi Denis-Courmont <courmisch@gmail.com>, Allison Henderson <allison.henderson@oracle.com>, Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Xin Long <lucien.xin@gmail.com>, Chuck Lever <chuck.lever@oracle.com>, Jeff Layton <jlayton@kernel.org>, Neil Brown <neilb@suse.de>, Olga Kornievskaia <kolga@netapp.com>, Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>, Trond Myklebust <trond.myklebust@hammerspace.com>, Anna Schumaker <anna@kernel.org>, John Johansen <john.johansen@canonical.com>, Paul Moore <paul@paul-moore.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com>, Alexander Popov <alex.popov@linux.com> 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?= <linux@weissschuh.net> X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1710535695; l=1269; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=yGyEnmkHG4K/QBZUE+wYC6PI0MysqQBf2jxKv03Uqeg=; b=WplrulYKd7B5TGswqzcDZbw2m/RyDv+HhOXZKHSfdG38pZxdNlsfrZeeItPHEYHA5eD5Kt+EM V7+s8EbXwZLDElxohBqz8CxV4en1zqMOoIPQsYqfboOMLt8tzBvHJKe X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 55B1A140012 X-Stat-Signature: ozz8nda1nz8bqobqihpge741rigqsrde X-Rspam-User: X-HE-Tag: 1710535710-507824 X-HE-Meta: U2FsdGVkX1/TG9u65upJ/yDNdb90M+y0lf+3eQ+cwg3T6Lp8vvr+OteMwnGLbAqR98kh7s5qM0LT9rV4XY55V6XvosgdBdYWRQbRqK4102JVH94aDMbm1DuD2UlxcllGvyNVfXashAxo5anJMjVe5COiv0Dor2RGo6cOZRn2eYKThsNjsf25eZe8Gy6IajXi5XZoKxPBWtZTIozQsbL4epuv3XzeLyL+CmbOv/xVy4BZdrtvHMHTki2dzBt8Z5rML542EEvypvXhxQ7G7ipVAKDUrqYTd7kSh8KcAatUswBgm0NvJrXs2mT1ZFRwEvyt0n3KHqnTvxgTrdlAkVD7hkQcopm7KH5gUvUTpq3JofSvyAfRsWhRZuvRLJkfZ0MjA8vscS2+o5Hf7Q00BxPTXdHXYOL4llRyLQiItpCVxE4p4fVSlyB8fbwGsaLwDUAJgaHUCz3XcwTym0MaBbnD0mc53+kJkc75htg3BgJ+BihOpR/J2XKGGgG/SBdFS/dHVlc2qmE88QYgbXIVoxS127QSqqU/J9wBfHVgcPxTq1QRg8AjgY/QqI9WiTkbO1PIqzZqigTV7KMlFpR4SI1kru+o1ziW+D344l7KAv38HDGZXvJmKiKzamhKlDjwwj4bkcf1aCCfS9Qq1Y0FVHANuqQSmDy6vdhSIB02CLY00tBJeqtqtX44GaWb7zN27gaJ74XiqEKnU6QNdum4pZzRHG0jySeRKyX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ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
sysctl: treewide: constify ctl_table argument of sysctl handlers
|
expand
|
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 7e4f16a7dcc1..363dc2a487ac 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -130,7 +130,8 @@ static int ipv4_privileged_ports(struct ctl_table *table, int write, return ret; } -static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low, kgid_t *high) +static void inet_get_ping_group_range_table(const struct ctl_table *table, + kgid_t *low, kgid_t *high) { kgid_t *data = table->data; struct net *net = @@ -145,7 +146,8 @@ static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low } /* Update system visible IP port range */ -static void set_ping_group_range(struct ctl_table *table, kgid_t low, kgid_t high) +static void set_ping_group_range(const struct ctl_table *table, + kgid_t low, kgid_t high) { kgid_t *data = table->data; struct net *net =
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@weissschuh.net> --- net/ipv4/sysctl_net_ipv4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)