From patchwork Fri Mar 15 20:47:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593976 Return-Path: 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 EEF69C54E6A for ; Fri, 15 Mar 2024 20:48:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D602A80142; Fri, 15 Mar 2024 16:48:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D0B1D800B4; Fri, 15 Mar 2024 16:48:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B845980142; Fri, 15 Mar 2024 16:48:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id AB5B1800B4 for ; Fri, 15 Mar 2024 16:48:22 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 85FAE140DB2 for ; Fri, 15 Mar 2024 20:48:22 +0000 (UTC) X-FDA: 81900461244.21.75CB5C4 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf03.hostedemail.com (Postfix) with ESMTP id 8AD0F20004 for ; Fri, 15 Mar 2024 20:48:20 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=KAKMyTIr; spf=pass (imf03.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710535700; 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=k6t3DmZzxMUzMtsSE5OLzF4+BBya42FgEYUbAPENz4M=; b=tsT+GGVvgwinSsRwp0ZKN0LocKccuLrIFVvB4eHJ70mQpnfT9waTWV/HnKofM1e9l5D5Gg ijjFa+iez7VSyW3wGhyBMpirFpu6/MXYNobBBUzB6hYFQmbdtTZcJ6/JQAOA+vkSZ0u3yv hBVpq6npD2B6ZNf+hT3U3h7PajnRvUA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710535700; a=rsa-sha256; cv=none; b=iAa7mxCCRm0ehohdaPAXrhul8LmXetURKWsjS2/jnSRytqe09G5kHwNdwV5ltHrFYrCk27 DYxHuadEjBDkGAPB1oLPgYuhzP4lIEIrketXb+5DgoYSkbOT85lk9EFdPjO3oDetvmgx3S F7xsaAklOZwuVK10RuN/kMbWRWivNNc= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=KAKMyTIr; spf=pass (imf03.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535696; bh=H2m3CgyPxKp8J+A7s6etu+nqQuMydVMaRq2xUBYcaE4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KAKMyTIrxsBKgzyowba560Va0oJiD0MsSOpq/KKmIhQMjwW/Y1aOE3/Dn8oyWJu3Q ch5t4fh43gRp6lXO3u/WZdPgPrZC1ZY1fTdYnJOWWejpqsv3ZFOQdJBBdBPCMymWyi mjiCD+xXA6BByHT9/rUXPnIE44pC/sa/0O7fCWDk= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:47:59 +0100 Subject: [PATCH 01/11] stackleak: don't modify ctl_table argument MIME-Version: 1.0 Message-Id: <20240315-sysctl-const-handler-v1-1-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=1205; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=H2m3CgyPxKp8J+A7s6etu+nqQuMydVMaRq2xUBYcaE4=; b=DLCpjj80ePju45B1sM6SeMu3SU3+SovEAF9F+apF8HUTZcbHxhK7sFWDz+WraIYUf5lzi8ctP 25gNqwcr0i1CjOhkjNKarmdmKbieJ/tL+nZegKGxX2K6TvuJVTedQUi X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Rspamd-Queue-Id: 8AD0F20004 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: umz4yxdn45umq3wi1jk985bfa6wm6ead X-HE-Tag: 1710535700-855289 X-HE-Meta: U2FsdGVkX1+jSQnpxnXpAAIU1uXshtpopuAr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-Bogosity: 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: List-Subscribe: List-Unsubscribe: In a future commit the proc_handlers will change to "const struct ctl_table". As a preparation for that adapt the logic to work with a temporary variable, similar to how it is done in other parts of the kernel. Fixes: 964c9dff0091 ("stackleak: Allow runtime disabling of kernel stack erasing") Acked-by: Kees Cook Signed-off-by: Thomas Weißschuh --- kernel/stackleak.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/stackleak.c b/kernel/stackleak.c index 34c9d81eea94..b292e5ca0b7d 100644 --- a/kernel/stackleak.c +++ b/kernel/stackleak.c @@ -27,10 +27,11 @@ static int stack_erasing_sysctl(struct ctl_table *table, int write, int ret = 0; int state = !static_branch_unlikely(&stack_erasing_bypass); int prev_state = state; + struct ctl_table tmp = *table; - table->data = &state; - table->maxlen = sizeof(int); - ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); + tmp.data = &state; + tmp.maxlen = sizeof(int); + ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); state = !!state; if (ret || !write || state == prev_state) return ret; From patchwork Fri Mar 15 20:48:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593977 Return-Path: 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 7797BC54E6E for ; Fri, 15 Mar 2024 20:48:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 40E0980143; Fri, 15 Mar 2024 16:48:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BD9A800B4; Fri, 15 Mar 2024 16:48:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20EF880143; Fri, 15 Mar 2024 16:48:24 -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 0EC18800B4 for ; Fri, 15 Mar 2024 16:48:24 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C9C86C01CA for ; Fri, 15 Mar 2024 20:48:23 +0000 (UTC) X-FDA: 81900461286.06.5A8E1FC Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf16.hostedemail.com (Postfix) with ESMTP id E034C180012 for ; Fri, 15 Mar 2024 20:48:21 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=lRsv4Z9B; spf=pass (imf16.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710535702; 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=dt3RSSxFIh3BCHHxJrwjnAoHDqJDG/guufZ1QNWwTCA=; b=3nub2CLXL7If5zVq/ATpNz2fBCxuMAvEycWPUsxDPfXMlrTwef94gsJMQ/+cQ4O7SllrqL XDdHSSIz3eKoBVWYHOHnQDRa2Uv4TLtvlfZ+XEeV8Wnu11TxMpScw8MTVKELA7UztDxqK9 yHw/MoFZ8dr8Oo9hBliQHG95KL1bbFs= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=lRsv4Z9B; spf=pass (imf16.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710535702; a=rsa-sha256; cv=none; b=1geVjgsotAg0TYMHnUAVxN2b7nJw5Kj3Dl+d5ZsuSkwXB770vuDakFstJ2qmA7gJXTsA1U Up896JLSTx3CZPd/1KY8b39ZXvVwsm9NZnjzI1ULO3JeDxRWKdnASSMtRo39Qg2aapcurr 4yMz7wdygzEOgIl+ijuynLL4MP0XM5Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535697; bh=71R8uSwybXZePn/hRWXZmFtBWgxzbTZn7lLN/sI0ct8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lRsv4Z9BtABJwb/x/sr0jT/ffaHtgaGIJaQNhXPIFehxU22UrZeOhl+MNP/n5GNRt JlHEstB5S7l8QpLccU0DCIGlvx+fB4q+PCoWEY+g0enoRMOwtyoGLxzzxdCrwcjk3Y FfwUZt+Em+SjtxwU6ocSEC2pAq54FlCCLx2fanAY= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:00 +0100 Subject: [PATCH 02/11] cgroup: bpf: constify ctl_table arguments and fields MIME-Version: 1.0 Message-Id: <20240315-sysctl-const-handler-v1-2-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=686; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=71R8uSwybXZePn/hRWXZmFtBWgxzbTZn7lLN/sI0ct8=; b=1p7QVCfT76tMKe2lhkLAnq+rZy1Hhj119ioAiiSdaA/KcTCdEQiKcZfPuzjhQVMIgFHQpgyqi 8KV8JuqLJSRB3yPnZuNAH/QOQJporNVr2ZASPvZ5f6myZthtsTyJC9S X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Rspamd-Queue-Id: E034C180012 X-Rspam-User: X-Stat-Signature: 1hsrd3tuypf7kp66xwxdzch5xupyruib X-Rspamd-Server: rspam01 X-HE-Tag: 1710535701-476807 X-HE-Meta: U2FsdGVkX1+iuEHJTwx5KPKMLmynjNVO2PG2EyKGEHSPZtosffd6TrGExfrUmAICL4qB75RO/hctF/vkWbP/QIhvsJFs/JRYihiz+7+pnwyYaAUjIRHkdd8NbtZrXLY/Sbv+pDzD2QHsRzZ/+6qGUN4b6Zu4FAZZ68qh/mBqzc3eM6VX13DaPAfizNy9JjhvbQjD7v5k/3D8Z71U74LmUc2qS1VPxoRQqtq4f756Bfu+mYdNXgDzgHNURD5pc8WnFRY3xFaQ9aH9cSp7YIDd2zmxR1b5NJhLWa/CK3mN57gOtBrqfHxmLEbVE6wYA7NQRGmh9bHcMRnaGcTpnXAaoThn00zOQCKGElGkQDUqUii7HawIQH7RXdfd5HbrTqZMy/r0OnFltD0PD4lRCxPjPS9lveTfkAfCx+KnWHbrrxaSD4vt6LC4yGzjafwa/b3wma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fbh8Zbu1wdSYNXvxMdTcMW/ONQJ9e6ShjDF3r0BZ8US/7uKxV+rGu849x3OzhQHgnbVPbbt9Q398pBXzynW0mP89g9pHu/zY6rH+Y23N0yhkHvY7Sj6pj/kdNcD4O3XHs8B1zmIVV4uwpnX5F+blVg+QK9o+i6zU8rUQthUtcRFTjkiIZDeRJpMK5Wj81M9SNU5cLiM036hcl6NVHNDpuLBa3SqzHPp2eRZ6I8Fm1eElAfCEyGWb9VGSb9023OCDZcV s6NtJycO mA8F1VXRoOVcvubkeyhBWIFSBRHCYqYsSCip6JIQjYXWVxnwH7J9raiv2KK6nVWiIfdxSAMmq3G11kLqJMv0wi4lT2Mf8b2Ir8YmuLb09Fnf6j2GnwU5CVRwNQ5PifBHb7GBI/yzM+GIuG7lIfsGtwpUQkxDYn+nDbdEfcBqESqRHaflvy3IMZSQSFTf1jBfBV8vqCBG98BSn5I1h9BU7EzJzIuhlYc8C28uEpvib8Vs5ZHtiDLFgQxFKbIpEqioLk6IlDFIz1hPQoyuJ3wMoAAIfF3orlIqqOhFbt7NpO5q/NhBOF5Gbg0G+xFlsW19iQx92n2t+hiC/oZcCZAtAF X-Bogosity: 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: List-Subscribe: List-Unsubscribe: In a future commit the sysctl core will only use "const struct ctl_table". As a preparation for that adapt the cgroup-bpf code. Signed-off-by: Thomas Weißschuh --- include/linux/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/filter.h b/include/linux/filter.h index c99bc3df2d28..3238dcff5703 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -1366,7 +1366,7 @@ struct bpf_sock_ops_kern { struct bpf_sysctl_kern { struct ctl_table_header *head; - struct ctl_table *table; + const struct ctl_table *table; void *cur_val; size_t cur_len; void *new_val; From patchwork Fri Mar 15 20:48:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593978 Return-Path: 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 B0B5BC54E58 for ; Fri, 15 Mar 2024 20:48:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B164A80144; Fri, 15 Mar 2024 16:48:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AC29A800B4; Fri, 15 Mar 2024 16:48:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 876C480144; Fri, 15 Mar 2024 16:48:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 78890800B4 for ; Fri, 15 Mar 2024 16:48:24 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5262EC04B4 for ; Fri, 15 Mar 2024 20:48:24 +0000 (UTC) X-FDA: 81900461328.02.F336D22 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf25.hostedemail.com (Postfix) with ESMTP id 5C218A0013 for ; Fri, 15 Mar 2024 20:48:22 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=Sq8LvcBI; dmarc=none; spf=pass (imf25.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=1710535702; 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=MD+qyRmOeEgyLbnBaZ/vRyIwcKlEn85ZJhhe2RuB9sU=; b=4k4zKG+JcuG26Z/Mm6lhlLeD1oLMOc1qYhfRTlO1HpYo4Itd6mrJSBs88kZCug1NoapNj7 BuzDb5ipN1IGeHys+H8yDne0wJ1EaRAMAjLM6D4omO+BPKU70dHtejrW/tEfcfyO59NNbq G/w7LUqhOLAnTfRWCGtfTI7UQf+C0yI= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=Sq8LvcBI; dmarc=none; spf=pass (imf25.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=1710535702; a=rsa-sha256; cv=none; b=NRH60nUzsyHfyHi2yLV0CpgeImfpfNMJKDR0/EFPUWt9/FlV3Gi86D19E+N3abkGZE03cY Nrj35PAc/RIV8y7imZTKsn1Swt+C05P2SejJAf5qAa1aXbX4PJyceQbGlVHkkiYK1G+/Rs kXOmkaTfUwLz4oPM1x7zou9zmTg5jrs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535697; bh=ZA8n2/koLk8T5EEGrZrQe3HTqPjD2IuDJPJOoTgLjZQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Sq8LvcBI7p1gv8YF+Fl6E9SHh6cG4uM9FEK2x/Wqq1z2lsOrhhz5yQNS/tUAIK6jL zaTESlVFyFVTGgnfO0nn5yRM2Yc0itbSdfIy/O/NbQJVPCSWx7t53jzls8LBlYOeHK IrYN0Ex/0XRwb/4piozxul/b2C8P/gHg2Vl5ibj4= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:01 +0100 Subject: [PATCH 03/11] hugetlb: constify ctl_table arguments of utility functions MIME-Version: 1.0 Message-Id: <20240315-sysctl-const-handler-v1-3-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=1138; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=ZA8n2/koLk8T5EEGrZrQe3HTqPjD2IuDJPJOoTgLjZQ=; b=boZ4t6eOPk3Dljh4IP0PKWoLOxGtOLAXof5Zxa1r9XXXItitoJuOMZutWnuJAn75hjXtWjz0B 7PQefNn5iOMATogPVExj5hPohFmPOE42B/+MU7bt9FL5JEbL5sxkIfe X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Rspamd-Queue-Id: 5C218A0013 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: gaqjn1qdpzjnkb5wuqttcp6khsuxmym8 X-HE-Tag: 1710535702-221914 X-HE-Meta: U2FsdGVkX18w0feIxdqJgcv0hlObDvpqX7LkiXypnC8CryIK4O8a8OzE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BihGmeDDEVbb29UmTonhM4W7agv4qgTiQBHtcrvupMJCAElgcKAxwmgD4yTsmgIxr2o4REGX7G2HbFIZDsEBqbYzAXfrSGUUyDtqQ7wF375Vvkhnwb8/O3sXmxnBhjUnLVzANWimJtJCCxqCXpC0UnLowllihnc/XmqmtUytC70ZBuZeCx4ChoN0r0zzJmsEEr4JUUo5CmWh3dP1PKRDUTpglH58YyXHy7PWdhNH77D3rR9jsq0zhY7kIw07Gmw440jcAKSsGMVtUztHTh5ccThbCcW9k4d17qhoX90OedBzLsfZSDqvtngwi5PNNAd/eeeklyVirUYOTfpIp2QWT9n/BhP0H0GWHZqyzJdfdlyn4AmdGXJnoZ8jopZ7NK8HpNY+WifLi8OsT5AsNcH+AyeoQfmvVA/CBrbOvlrjLnfqBEo7rpT/8G01Mx6Znhy3n+jgyA650AkU2xWrq8nMlpis7UwvKyQaBfmFhx+5PP52YByRwUjrYLlsaSpdZqeglxptXjOviMRXU0g8t/zwGuZu3PQd5S2g4w3okrUO3Lv86oRASUkHVSf46pi81iMGcwmR51WyoyFC7StK98iyXk3igxJcVcCIYWPC9JrF9kiWunUkRccKtbX6ZfcS1n+mMV433q6aiVmMgaJ43hYqKAy24Z5k23euKUyjySU0oUO2PLlaf 6RiiLKwk +IBXbRBkOquSdQLUoy9NHtey2EW9YDuodAFjhMvOsjY4II/18FYvTnw/uc7UFVfpZm+BCFORXue++OvH12GXiRqwI/j5cLRDqJHs1v3qsJyArFuL487h6Ah2VnQHU9Aq2WuB0VeGuYUyP5YWoOYLlwOsivqeHWVwncxgSi8tqrOyH/kbXMcwNDT/3m7XzR3paszNzcw6DDHsEqekkyBQT2PLiJAfx8cBKS0tysKKLLwH0igLteo4w8rIbuJZOWKAZJKP/GjqBAksbixDwmvOSN6BEIXQYIpRx0k0NVE1ws6m+VArqN1AeWy4Y77gA2J3GyvTKwGmGqOw== X-Bogosity: 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: List-Subscribe: List-Unsubscribe: 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 --- mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 23ef240ba48a..b0d89ab98eaa 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4929,7 +4929,7 @@ static unsigned int allowed_mems_nr(struct hstate *h) } #ifdef CONFIG_SYSCTL -static int proc_hugetlb_doulongvec_minmax(struct ctl_table *table, int write, +static int proc_hugetlb_doulongvec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *length, loff_t *ppos, unsigned long *out) { @@ -4946,7 +4946,7 @@ static int proc_hugetlb_doulongvec_minmax(struct ctl_table *table, int write, } static int hugetlb_sysctl_handler_common(bool obey_mempolicy, - struct ctl_table *table, int write, + const struct ctl_table *table, int write, void *buffer, size_t *length, loff_t *ppos) { struct hstate *h = &default_hstate; From patchwork Fri Mar 15 20:48:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593979 Return-Path: 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 13172C54E6A for ; Fri, 15 Mar 2024 20:48:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9B3BF80145; Fri, 15 Mar 2024 16:48:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 93B59800B4; Fri, 15 Mar 2024 16:48:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78F0880145; Fri, 15 Mar 2024 16:48:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 654BC800B4 for ; Fri, 15 Mar 2024 16:48:26 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 106551203B8 for ; Fri, 15 Mar 2024 20:48:26 +0000 (UTC) X-FDA: 81900461412.17.C5D4CC4 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf13.hostedemail.com (Postfix) with ESMTP id 589BA20026 for ; Fri, 15 Mar 2024 20:48:24 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=RuyY3u5r; spf=pass (imf13.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710535704; 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=4KgCdO5V5969ilLu1Mq240VZfrLrbzfUOL9ZyO+i4/4=; b=H6Q7MjnarwoQVgLMiXq52hZjkLdAakvjuQqQ+ySf0mxlO+6clZvNkTMidBs3gWvpmVxK7q yiZOsiPHQqmN6h0o3fgia1yrM3pXNxNuUaYNTqsOpKb9k6WOfhIShqVTrbtukecHMxDwg4 2C5rdckyp3bDOD+W6FMBD163zX+zShs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710535704; a=rsa-sha256; cv=none; b=aXO7kqVHWRLufHhFoPIABdfvJCr1gr7OR5g5tCjWwmpbhECgFvGgzOd/9AQOJDNvtCIbth bkOIVY6OXfv5emszbhFPwrcI7X1iORYN27Wm8Vn4XVwCK7pt434x2/DXEuW3pnFZRDmIeF t70nrKU/VuY7NkhKZX+kT/jllp391V4= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=RuyY3u5r; spf=pass (imf13.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535697; bh=N3YQ+74nNXsZKp7PEdJnsfg+4VEg1y14khiTCB8rEVY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RuyY3u5rYBiguTrn2XInl4Ajsqpr9gged17slcRcyBJUHHxvliEq2D58U55ZU0L/2 tDtmVWfSwncce6QhDGXdWdqZSGwnSc0Kzxfvkvrjor4H49NhkZZxu5MoEIzzUHk82w zNfqHOTG+OspUx4e92XQR4ruhqFKUsn1UDGgq48w= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:02 +0100 Subject: [PATCH 04/11] utsname: constify ctl_table arguments of utility function MIME-Version: 1.0 Message-Id: <20240315-sysctl-const-handler-v1-4-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=696; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=N3YQ+74nNXsZKp7PEdJnsfg+4VEg1y14khiTCB8rEVY=; b=xEm0d8CYQV6qN7oZA7EuQpgHjbZrMfPqjThMCUp02NAIP8Ff1lQTYCA5z6GSB4NPcFQzy/2jj Y0NcUklMzOzC1as2M3524rbivhNsj1cwIIJnIozArSnSxvsTxxWEUrP X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Rspamd-Queue-Id: 589BA20026 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: qy585ef55qupbthsy437ywe5xnj5feud X-HE-Tag: 1710535704-569945 X-HE-Meta: U2FsdGVkX1/F9rOBZFsfxLMBUkJMvmV0IiYoiMFHrFI+2ph5b00TA5FUJnkxRvR0MdyjBDr6eBnWrcwSJKpt9AULkf9Q4sk+hbtN50BNEZd7FpntSDtSNPUdvJ+5kM89FKR0ALfysOLOwAdVNJ0co3Utqdl5vA48+aSlW+uWJVx/eq/HJbsUSb2imyGjPeyvSgZ4RvcliTFFiz87C35hnFqEN2dfPFnN13o8y+EMvnk2+ndC2+sTrH/VpH4UjoNUvLBm0SBxKAzRMLofkiaRLknyJMWUFC7GTraRMs7x0dkbTI4Z+vqQ/Sn2zRNjK3YpmhcKEwyb7SY60oUFScC3TOB8V1vkhQvdh4TDkBfuvK8vrILhQGRtyJSyKszGtIieyR0h4VcizJNfjnZ4xh48Pk95KQi77Ean6gGaTq+q2sAEoFREOh4hrQuV+YtGvjS4dpazjdQhJeX32WQH3xL3c/wzSWJCxxgK49KUci+U829gLeLRsDV/ZNxaoPpmHfNndBpET7cFFJrdPlPYekDTHGLmQP8ESUZ+o8XtANMtW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1cjI00MMscKuwT+cbSZ5JZSur3ujzKoSs7gu+6nBM6Ua+6LPpkgEk35d5KKnilWbNHaJc626sDfgmA64uMklTEnX3a2pNL9GwAmaxVCCdO2Wl9qHOyCVNgHq2BemOpyG2te1PlUMRl6yXqUeZGA//q7YW9C4zYXbp0zpKhwSPbW/R2lahx3g== X-Bogosity: 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: List-Subscribe: List-Unsubscribe: In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- kernel/utsname_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c index 019e3a1566cf..46590d4addc8 100644 --- a/kernel/utsname_sysctl.c +++ b/kernel/utsname_sysctl.c @@ -15,7 +15,7 @@ #ifdef CONFIG_PROC_SYSCTL -static void *get_uts(struct ctl_table *table) +static void *get_uts(const struct ctl_table *table) { char *which = table->data; struct uts_namespace *uts_ns; From patchwork Fri Mar 15 20:48:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593980 Return-Path: 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 192DAC54E67 for ; Fri, 15 Mar 2024 20:48:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B614880146; Fri, 15 Mar 2024 16:48:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AC246800B4; Fri, 15 Mar 2024 16:48:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8515580146; Fri, 15 Mar 2024 16:48:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 67C4D800B4 for ; Fri, 15 Mar 2024 16:48:31 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 4A05A1C11B3 for ; Fri, 15 Mar 2024 20:48:31 +0000 (UTC) X-FDA: 81900461622.16.FA442EB Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf15.hostedemail.com (Postfix) with ESMTP id 5BD1EA0008 for ; Fri, 15 Mar 2024 20:48:28 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=OzlCngVZ; dmarc=none; spf=pass (imf15.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=1710535708; 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=fUJrbbz22O+JYEdA7UrsBfA/W1aIoTpG/duL4TJcoAI=; b=6p9/73KLUuJ9LXMMUc953EWWhyS6tUAbvPZwaKAxT0FM5S/RL6egD7rsGfhPQmXKZriKGW MS76K8D97JUZCQCqVQnLyq9wm3PcV1OHg/cJUWQMBdD6/j9v4ZOJBhK8uowsw9Fq1ENpRC U2KW5RWoUKfSRvmoAVMH9uTKiqsYxsg= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=OzlCngVZ; dmarc=none; spf=pass (imf15.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=1710535708; a=rsa-sha256; cv=none; b=EvenuIz2DNVW/bmIE2wX95mwc/dTHQbA+VbkPRc+/z6UfBSbYQLDLRhefEhc6yTb6AHm36 DDkH0fbbHIwlLtXfaXNBDHNOrC0356rmJd2pSwXFRTPVoEFUdWblZyajITM+fjp7SLXYH6 XX0LT2n6G6Wjf6uFvnEHVteD3JObNa4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535698; bh=oevlPOUTno1lzAS8VyWx7MVuhqnxcH7itmP3/5hwz20=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=OzlCngVZzs14BEfB2dc5J4o4ZKkSQQkWcdhqOSjhZhgkw/Ll2JQ6iAP5cU1U+kVsa SrPCNtTtm8SHoDqPXiHa4YsznSa7vqTifHCUJbDAIQNi550jyZtghvHYAeHSFkf+H5 CmLMXq4gfmBvTUDddBCzzP8cINqR1mq64EVXhq9A= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:03 +0100 Subject: [PATCH 05/11] neighbour: constify ctl_table arguments of utility function MIME-Version: 1.0 Message-Id: <20240315-sysctl-const-handler-v1-5-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=808; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=oevlPOUTno1lzAS8VyWx7MVuhqnxcH7itmP3/5hwz20=; b=nal6nqzlOqju6KoSlkSXv2irkXSIQB1hPxMMvRw5/3x5Pl0PJC8iZv6mLbrbrwrTwJiwMMOTx vrmE29LSkJlAudC9x/ESIVrRSshIpjIXJbLqbScnLDsQB6DzgzZYtRY X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 5BD1EA0008 X-Stat-Signature: n3utzj18sd8jz7yfi1mapyq1gxmpe5ys X-HE-Tag: 1710535708-735395 X-HE-Meta: U2FsdGVkX18QUB4WzcKCQkQ7qmMSHjpuxxdR9twC5G3ef5kXyXwfdpk9bIP8SEY7SBJRpG2Bh6H3pOI0YP7j+hjVdQhx1HVAHxUaegnjYRFGS/RqkeAIiP+K/jq9TRrEytM9JjhmSENn+USESoqb6ap8gzQ9dkXjNbT4r1Q7Wn4jmjJrAo4ZX5nMoTeSIEpAz/5T2PaNLVLB3pxDeRJpK/nuwvI+71oT8b5G1zzYU4Y4bpV51aZMagd3HhLUYqVjKI3x69hphYShSw+wQewZP4gjzAODySLyLnut0BlYCCygNajY35Lm79O0JA3fR8hp6SBwoOsWbeIKqwIPzHSAYKIxg07Zuo37vorabJosME7pn3Lrhd4lWy13RSbsupRAWopVTKD4jxzdjQqux9ghoTZPVjFGRL922o78w2TG/KtUXa4QjDrH1Ptl1YEikjwNZDXHAd4PL6IX78rD02p+N4iAbYZhJfmudl5CUx88FX9vjp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U7/PhJMupdgLiA5e+cBhhSVvibPczX7ZwEiYowbqiQZujaFRyyz9k2P2+mc3EpJWl957ykdgz9jpfY3OEvmUTKdzb8Lb0/8tZJX36Y1BqAfV37iiVGseF+4+0v5paTIx9JeLWPkb+SyDrKLcYdrnR49QPjojf1doHb5INtgnQuj3dZWZdHlZsHzHPI6lIFbrJTOnd+F15Hx//7EXtoLSP2Dau71z6rzWHlERVpdd21bPGda fM8ZUgwS C9CWqUALQQHrbUpJK1UcOrYtHepMO96/L2QMjwR47G1FlgKh43/1o4fZ13DlL7s/Skot8tsbELgs8KmIN9ZDlDVomJ2cJRglvJqHmbtaalhuN+PAOMUtqYLq+8URqracwTaV663iJcqFGqqvuzzjXklMLE/Y/kwX+1P1G7wSviDNxqQmfVWFj9ZzGigkyFuHiP3V4fTnS8j74JHBGWZ+Sp1RITWCZTXQ2ABO5Yzck1/CPsF710Uazp451bxg6FjNpZIv6y8x1sIM//9vNUwiJTWt0jtRpr2xJuY2LMrhbFz/af9FcjXWLF4dWyPd+cgkRB6a09jnXYYw== X-Bogosity: 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: List-Subscribe: List-Unsubscribe: In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 552719c3bbc3..1fb71107accf 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -3573,7 +3573,7 @@ static void neigh_copy_dflt_parms(struct net *net, struct neigh_parms *p, rcu_read_unlock(); } -static void neigh_proc_update(struct ctl_table *ctl, int write) +static void neigh_proc_update(const struct ctl_table *ctl, int write) { struct net_device *dev = ctl->extra1; struct neigh_parms *p = ctl->extra2; From patchwork Fri Mar 15 20:48:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593981 Return-Path: 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 ; 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 ; 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 ; 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 ; 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?= 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 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 , 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=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+O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Yo8kIYE0XxNjNCsWvk1q/D9u6RfSltYboTXrZtP6RW18mqdSFAE8EBDj3kj22HfKwS3eRjjiHXbtMXbwyr7ie9+btuaYwgkAl/ZrG3sFcof7/tvY7trlleGhLnOxWGQgAC+Cyuiv4Z7rd1KW4B01jvdqiAu6KDH5AlV//QVvy2PkoXovS+JU4yjmS15+qqAEhMX/MkYGhID+4DxKGGZi+Z+0UuW4g5tSFnrydyqwakVA4lEsr2oskend6B9uMFzGIEjiQEf20ANyiZnXExCOKn5JCBGvFiQGu3CHdZ2yBynrpeuBD1oi+UyP2lT6/7wEbM4ltgE4MbXxVTAVIwVkEC5FZNPP72GkHiOMCVkpchoidisgaaooWLR+YocuhqPCynmx1Tqd9viUUdmMETYtnIkV8gc68tQKz2lW93NU3qi/34SwIgKRvhMbmZZUKr4X62aDucR1ztkzWVSIbo6rv3VpZohM5ND1xYRH1TwKPJes1Qwnzs/qaImqnlYfd4CQPKh8Q1vL1hsU+bfQJ/vYllK1gIB3J3u9RSacRIKt7ngwtfK0eRuK5Uq/YGYW82ZCUhSfQkGwvflChc1qX3Fd2OLIX/37APOOXPku8oeKgq5edL+gbq0ytwOxgFzR+KaewILe2m6cyoY4VDFcMw8fI/B/Ik= X-Bogosity: 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: List-Subscribe: List-Unsubscribe: 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/ipv4/sysctl_net_ipv4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 = From patchwork Fri Mar 15 20:48:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593983 Return-Path: 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 5B77AC54E6A for ; Fri, 15 Mar 2024 20:48:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 08D2480149; Fri, 15 Mar 2024 16:48:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 03B8A800B4; Fri, 15 Mar 2024 16:48:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D810280149; Fri, 15 Mar 2024 16:48:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id C4FCF800B4 for ; Fri, 15 Mar 2024 16:48:34 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A744BA0DD1 for ; Fri, 15 Mar 2024 20:48:34 +0000 (UTC) X-FDA: 81900461748.06.4E0CFA1 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf10.hostedemail.com (Postfix) with ESMTP id AE4EFC0014 for ; Fri, 15 Mar 2024 20:48:32 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=fXx71L6J; spf=pass (imf10.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710535713; a=rsa-sha256; cv=none; b=7PgOtxGO+qSlAIdPwvCijOs/ZlTBHLiOVJgvYeVDsyjsyM+/k59jjUS+vvm/iRNt2wg4TT e+6Eg73bpUubQ27XfDgAi61bkehHBqqOtV3pDA3GT/GJC3tPLeKp2duWhkSKXN9bZGHLHO QAD0wyohAB2FPWS1IkjjA/F2uHqtqLM= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=fXx71L6J; spf=pass (imf10.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710535713; 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=ANWB3THTVGUwkCzekT5wEk35tYYqEGjvGDQoY9noUUU=; b=yNeqrR5+8hAJ10dyvrLp0pOGdUE022IcVlluzX9zhOMa6n69Zi4SiWrRNncYKr/Z9qWBHy 3odskt7Wn+4SzTz6gB+hY2XpCPYJqXuNXz1BOqWmheX9IkwlOseNaGRhiF2WrPclCu9vIV 4hMgE1+QaRG7hHqdFaFavpNEUojur74= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535698; bh=7M7T8qGemL/J5YUUwWJ0cC9nJ/50fjpcJlm81ezvXMY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fXx71L6JuiqeYvuZyYbzXSU8ULmJtg70CnofWoEiwBlN41Bqml1Gn5WgRnQq6Ajn5 qDRqHOKkbjZnx3OuwYfASjLfdLsDv6kvpZD8exd4YCHBoXJOczJAyokASCokeIgyZB Md/qSjV+tOfVMb7Hd80eciTQw4KJ1N/ByH4nv8Ww= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:05 +0100 Subject: [PATCH 07/11] ipv6/addrconf: constify ctl_table arguments of utility functions MIME-Version: 1.0 Message-Id: <20240315-sysctl-const-handler-v1-7-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=1733; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=7M7T8qGemL/J5YUUwWJ0cC9nJ/50fjpcJlm81ezvXMY=; b=tDrRFBvycsbBg1b0VjT1utAvA72vW/Pfn/OG8rmdlBPllpN3zp995mmaLodLsZ9cR6UItDzEG 934FLotKWacC+9a11IwVotmGV7cUQDZTwgtBLcNNphSOBq2Q6lt1ZQr X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: AE4EFC0014 X-Stat-Signature: j5c3iiyr5y7wncmzf6kicut8caqzg7et X-Rspam-User: X-HE-Tag: 1710535712-469597 X-HE-Meta: U2FsdGVkX18gPWahAsX0ulRCcTMWyBnfCZQQ6oU/BpnC3deTmt+zamyWEcfcNmbr2NA7kLjSioko5aBanaJOXDJ9dAdez/iNHcRuGlifoceBYS59yj8UkrKK1/88RGYwnagrsbRqflSqe3XRIiNBKqMuKjCoCo5ef7ckeHofFK9bXtp5vg/WMjeyU3vQ/5mGa7eOljrtvOTEws4MPaokloIjzDNCm4A0tDEMD7LsA6wO+W4yrddc2Jr03YP/3x2YVjt8O62hio6pcngQeegNOgOkwj4UDrGtuOCfVoYgk4it4dr1NLzsafy100tlwmLs55MvRXSm8bzara3g2gcpAAOcO5mBHxG8DpW7ZT6PgLTLo5aI1i6Ubm2yCc5oqmk1VN5r5tDdEMzJmIia3Ay/O9L4HHyKPqFhx3YFHwdNC3vXM1xxDuuzPoiBCKanZgf90txusqCWi9XAF2H1bBDbGWW2+qqORNaHy6eQefksaBkJEpJQE3TVLmn1HvpdE+LOUuFsrJeiQr3ohABAdqBCewLtQNz78kbwk31iKRQhthUUV/JajL/LjnPpbO2yexOzgY/gdWw11RguEdRO8wOqkrxnjENyrOkIrdklHG67PZrapoMPbRSeiKpcZgm9jnnE5BnBFpQw6p+TqWMYRLqi7+splAbJLe1Z9CdToC4mEf9w+AZzrG+SMexR9ZuzFAM34PbhKfLJNR/QGmrQl2iKUvEOwHC4fFXKfAFmY2O/LarJ6kZOGjnIx1XiFDOqzuaKMGoIlFqqamdZm4ssiwLn+MlDoU1kdS45FHNGmITRMzyrXbRPu7d3+y4Sce8X+Y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DTyvuvb2JcZNkuuIwtMbHGftD7GH/k6np51FfqtfkRW8fQUNrvRcMwSLJCnc+c0wUmiUAPjRdDrdH4tqqFfkpXtOj3iP9I6I1IZOxlw9O50OQDUfu4aQF1O2T8wHyX1aVe8RqI7Z3KteeE8BgCL+voLWzolF+5bBYQ5fZyNJzs6y1nTWMTgkZXskbaJrVzY5ybhbf7bISyX6xXD3nMDChE67rIyQlBxaC0 X-Bogosity: 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: List-Subscribe: List-Unsubscribe: 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/ipv6/addrconf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 247bd4d8ee45..c72f3b63e41d 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -862,7 +862,7 @@ static void addrconf_forward_change(struct net *net, __s32 newf) } } -static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int newf) +static int addrconf_fixup_forwarding(const struct ctl_table *table, int *p, int newf) { struct net *net; int old; @@ -930,7 +930,7 @@ static void addrconf_linkdown_change(struct net *net, __s32 newf) } } -static int addrconf_fixup_linkdown(struct ctl_table *table, int *p, int newf) +static int addrconf_fixup_linkdown(const struct ctl_table *table, int *p, int newf) { struct net *net; int old; @@ -6375,7 +6375,7 @@ static void addrconf_disable_change(struct net *net, __s32 newf) } } -static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int newf) +static int addrconf_disable_ipv6(const struct ctl_table *table, int *p, int newf) { struct net *net = (struct net *)table->extra2; int old; @@ -6666,7 +6666,7 @@ void addrconf_disable_policy_idev(struct inet6_dev *idev, int val) } static -int addrconf_disable_policy(struct ctl_table *ctl, int *valp, int val) +int addrconf_disable_policy(const struct ctl_table *ctl, int *valp, int val) { struct net *net = (struct net *)ctl->extra2; struct inet6_dev *idev; From patchwork Fri Mar 15 20:48:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593982 Return-Path: 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 98491C54E58 for ; Fri, 15 Mar 2024 20:48:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4D28B80148; Fri, 15 Mar 2024 16:48:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 45A38800B4; Fri, 15 Mar 2024 16:48:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2869080148; Fri, 15 Mar 2024 16:48:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 14674800B4 for ; Fri, 15 Mar 2024 16:48:34 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E5D281A034E for ; Fri, 15 Mar 2024 20:48:33 +0000 (UTC) X-FDA: 81900461706.14.EC3CB4F Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf21.hostedemail.com (Postfix) with ESMTP id DE2B61C000D for ; Fri, 15 Mar 2024 20:48:31 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=jqxDO3Tw; dmarc=none; spf=pass (imf21.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=1710535712; 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=RH63MKPwBnqVQniCp8meCxRPD68GQSfUHeVcLvWQV0I=; b=YcAwEMJthai8scfjKGWfVRs4Sn5v26tk/rglqjUsQ8MSddLxFRksjkXw8rwvWCFBxOQ2VE wy65cBAeO2XXUCqcyesICWYTACxzZ7t6O+ko1u7eFCvraLDSnEGN8+628fAxJAxLErr9JB h6+LutaWoIpSV6DGlOfkU8AuyFnQN9s= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=jqxDO3Tw; dmarc=none; spf=pass (imf21.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=1710535712; a=rsa-sha256; cv=none; b=KGQzdx67H1FZHkw/2rIf/eox0RZtbkN2fhJTe5qTT8vzQG9+4IOHozkAfn8I73jNU/j6A3 6xzB7yIm5QJk0tnxVcB1e7djNtoD9IKH6utb+ksbhEPLcBqwkcxvjTReYstC7UUTINmyhk ptIXWS1SkCFdgYidtoFEDgCWmhAmChM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535698; bh=m+K+pCOcUIKDJXVlXdIjxkNCOOD+02kNnAffkd4pv3g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jqxDO3Tw8x00e3dS7v4MMKOqIyXMSrjFO93KkLMrxEo1nDRFf5YphcW2HehQhDnFU PmlE72GP1SDCPoeSx/FKopC5InS9/uOUubALDtzDcA/2V1nHVuziA1mIR5zLXmk6E1 eB3NdTCQ/ci/brS7mGewz0aIM76V0ywhclUqxjJY= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:06 +0100 Subject: [PATCH 08/11] ipv6/ndisc: constify ctl_table arguments of utility function MIME-Version: 1.0 Message-Id: <20240315-sysctl-const-handler-v1-8-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=778; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=m+K+pCOcUIKDJXVlXdIjxkNCOOD+02kNnAffkd4pv3g=; b=d4zm13k2OQna/NlK3uekXkMo7hwOBupIjvbXHKdSXoSk2DsIK+yuhbmEQr0VAeaARyLv14HqX 0Z4woBXtUp1D7/pq8L0Ybaa/TZAKfXvfcMgjftD2Zr5aqWsk6Mdkffo X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Rspamd-Queue-Id: DE2B61C000D X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: mn1wmyyr9eppf1sjps8gjxaa5knxsbeo X-HE-Tag: 1710535711-472824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/meD1m6odZxrHE3dvXYQYg== X-Bogosity: 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: List-Subscribe: List-Unsubscribe: In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index ae134634c323..945d5f5ca039 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1936,7 +1936,7 @@ static struct notifier_block ndisc_netdev_notifier = { }; #ifdef CONFIG_SYSCTL -static void ndisc_warn_deprecated_sysctl(struct ctl_table *ctl, +static void ndisc_warn_deprecated_sysctl(const struct ctl_table *ctl, const char *func, const char *dev_name) { static char warncomm[TASK_COMM_LEN]; From patchwork Fri Mar 15 20:48:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593985 Return-Path: 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 B579EC54E67 for ; Fri, 15 Mar 2024 20:49:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 25F968014C; Fri, 15 Mar 2024 16:49:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E90D800B4; Fri, 15 Mar 2024 16:49:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E93808014C; Fri, 15 Mar 2024 16:49:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D2E55800B4 for ; Fri, 15 Mar 2024 16:49:30 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id AFF94140845 for ; Fri, 15 Mar 2024 20:49:30 +0000 (UTC) X-FDA: 81900464100.06.4830CDE Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf07.hostedemail.com (Postfix) with ESMTP id CCAA240010 for ; Fri, 15 Mar 2024 20:49:28 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=ZRYoy5xK; spf=pass (imf07.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710535769; 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=rIJs+6xcdTgPiPHzD3/SxSjeiXKKP/u1pSX3IEU0Qdg=; b=WLvsUVAMV3dIJW88XrGMsaURNiPvXuPa3JHf0Hh7szNQIHfB0vFv0sUQTEqTrutAKpXzQQ CTUTJqPBHr2IkAF8Ik2G6gmEsTSDB+5vOfXWwqx4LvgkXnYiwHTg8++V3lHhpq9oH2vJCV DtBV2ms8oqNz8Bep13c1BJAd8fl6RaI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710535769; a=rsa-sha256; cv=none; b=hokzAFjEnFzzj/8D4h5fBcgdncki5hC+eGPyehMYHiaJCyGK1GNIj0yWoOP4TMJtRIZ71v hpgVKxjtUQkOxAo4tMYqPxsXKgZ7FbWotBCNrS+9KQn9Z4aVqSb3rpi9JjBdtzn19oMbQl 0HpDqvnoHEDyD+wSNxpFyy+3H5PV0Ck= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=ZRYoy5xK; spf=pass (imf07.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none 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 MIME-Version: 1.0 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= X-Rspamd-Queue-Id: CCAA240010 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: airrqswx5myhjk8ic9kgwfmjit7ornca X-HE-Tag: 1710535768-246348 X-HE-Meta: U2FsdGVkX19an/DNf43/tj5nz0Sb8Ecv9lz6UIMYD5I886IXnvfCF00hicES10uVsRYv+xqICwgDhGOneV8UCaIyUWwaKJpTBJutk83jFdBBRTyyngW5/cfO7HmFgwpv1hjWSMs9/GCy8kicpk966o//Va0RQw/xnO8EfGOnLv8XXh5jQFjtsfxarVuFZaf9uaGKHgXKE+8mjcev5Q+Ji5/wtc9th1Ndq8LFjibqEFm5jahAcT4wKtLp9OefXL1w+zNGKnJIM7cDUrpA+TGF0daFhsbALrMtrpAsOHPBLT3E5LIBrItbMFxiNaEuDVJ9PMymI1b/jjo5oERJKxClFRqiqt4j9BW+lW007svJ5OUfXgzjVJ5ZQnvKhcvyBCWHFLzU4xY6RGTChCQvdtjc/0YHONBuuIpR3RJIKyMz/HwGeRuLdNkHcwB4CUMVIZyYfTE4S9g9YhLfq0yWBc+63e6pU8G2FxH3S3sxl97Wm6inQQqVaYzLzaQySqbPWwpMwrBomFtdPVqmYVdJLTXKLnOIsffXPo8fgSiGr49aJ/odmBRjvyNpzOGZLHYiZyr19opKn9g6uCAf2zOyAysdeizhK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En5zj7eli22g1k9dM0y5x++MMoZ4jzBAxIKnZrzL7IE+w0c99a3AUpE+8T5ZXG3igbPNPVG5e9u9XYFQUAzs7MGPv1FDmpqMmoMoDuHDnmbD9K8neNvD va03JS10 CwJlLf33Ef9K5Ex38FQ8FE2vhsAa9qPVAI4/M50PANNDMJ4+XBQ3RYKPKYYrwJIpMsgyifyg7qJK4Dfs46BZCIohPP9nxNz7Z0+nx7cdikpAb0fk4mxEik4yVhGTULtpgAYP2HUlguMQ+dhAKjT2NVjjTVILqzEB4dEfPrBUsphXIliF+FITiC98HNTc0o08GU/lCL/2ak0PG+zJ6fNmRRsLMhClgqdO1LmrDr04VuD2RfXXKwB4VAQcaAifTOQSPnTjg2K5wuyGiJrW/rcZhNiNsx6nLu/BTZ1FIA8tY9zkoObR/qSOz0uHceHnPumy+frrk3copaLDnGvHyDbFyi X-Bogosity: 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: List-Subscribe: List-Unsubscribe: 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; From patchwork Fri Mar 15 20:48:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593986 Return-Path: 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 93919C54E58 for ; Fri, 15 Mar 2024 20:49:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 25F3B8014B; Fri, 15 Mar 2024 16:49:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 20FF5800B4; Fri, 15 Mar 2024 16:49:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 061DB8014B; Fri, 15 Mar 2024 16:49:29 -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 E35FB800B4 for ; Fri, 15 Mar 2024 16:49:29 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B1FC2407EB for ; Fri, 15 Mar 2024 20:49:29 +0000 (UTC) X-FDA: 81900464058.12.2E3C307 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf22.hostedemail.com (Postfix) with ESMTP id CCBD5C0019 for ; Fri, 15 Mar 2024 20:49:27 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=e0gHJn00; dmarc=none; spf=pass (imf22.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=1710535768; 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=1VV4zrztCYLsSEmrDg++4n0CCKLp1aEWVav2GCV5kZg=; b=cnsb3NwRWGanjQm+8O3BTDbC08vVW1rLel4HfGhAGC/FiUeQZ1YL6HTygo5PzYG4sxNijY Yk1CvH5KFPdg3/RLpDuR2wTAN0yY76H2a6dqY3W0W7ECQ3Gve0FJ6bEJ0A/hkS3CCLeHsg cG4GLfIseLSNhicgk6MAjkmwugxVkKQ= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=e0gHJn00; dmarc=none; spf=pass (imf22.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=1710535768; a=rsa-sha256; cv=none; b=kOx6aDFFCHH0DeLpEk2EEDjCaYLlMbP2XxPFtzuI7+yFnM+5+nmGRm/46SkWmPSivwwlBi 32eQOmRD5NY1q4mD6m7WI3kLvfRhAkL4qy9mZS3UgFXpsIc18wimIPmODEl+E66Xsxel0/ rvKxBrvAfebtP8BlGPOFZQ9Pk3Ti8UU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535766; bh=ioYxjFgUhmgN64D7EqS9neBKa6VPb6OHx0+I2+vtq58=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=e0gHJn00rSPUSnJb+Jx6Ue3JxL9G0ZFpDZfWcshPnrqNLXF6mANtn7ZfmJdYtl2NH YF0nBfN7moHOVik9J5dzylQWjTUZQmTvqHZPgWQvbx9+WfDiZxC6O7h1e5C9Jdj55S lS7uTWKuOD2g2Cdt0l4N3qosPhGD2Ex77cb84CDs= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:08 +0100 Subject: [PATCH 10/11] sysctl: constify ctl_table arguments of utility function MIME-Version: 1.0 Message-Id: <20240315-sysctl-const-handler-v1-10-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=4555; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=ioYxjFgUhmgN64D7EqS9neBKa6VPb6OHx0+I2+vtq58=; b=3ezsimD4t+3/T0cNPSQ4+FYpRTQhNYyohAK+Rbgx8HlPQ+xGzze+WEFqLcmmpL3mfNQxqYUX7 1t4oHVoJb7wAVyGZrGoUFlfOOhXQ+0lakf0I5Pzjxrct2orfuAx6LgW X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-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AlMhtwnJubKLTje9N1EmjSr+zKIoEN3wModqEo0Jbvf8Fb/7WCWot+EmDE/Ilerw3+1BhYeKhUnqLfBLMb+tgddDgQkbziJYhsHmE64kAeiCjH5SjL4R6YT X-Bogosity: 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: List-Subscribe: List-Unsubscribe: In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- include/linux/sysctl.h | 2 +- kernel/sysctl.c | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index ee7d33b89e9e..99ea26b16c0d 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -238,7 +238,7 @@ extern struct ctl_table_header *register_sysctl_mount_point(const char *path); void do_sysctl_args(void); bool sysctl_is_alias(char *param); -int do_proc_douintvec(struct ctl_table *table, int write, +int do_proc_douintvec(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 157f7ce2942d..93824d8a3636 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -205,7 +205,7 @@ static int _proc_do_string(char *data, int maxlen, int write, return 0; } -static void warn_sysctl_write(struct ctl_table *table) +static void warn_sysctl_write(const struct ctl_table *table) { pr_warn_once("%s wrote to %s when file position was not 0!\n" "This will not be supported in the future. To silence this\n" @@ -223,7 +223,7 @@ static void warn_sysctl_write(struct ctl_table *table) * handlers can ignore the return value. */ static bool proc_first_pos_non_zero_ignore(loff_t *ppos, - struct ctl_table *table) + const struct ctl_table *table) { if (!*ppos) return false; @@ -468,7 +468,7 @@ static int do_proc_douintvec_conv(unsigned long *lvalp, static const char proc_wspace_sep[] = { ' ', '\t', '\n' }; -static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, +static int __do_proc_dointvec(void *tbl_data, const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, @@ -541,7 +541,7 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, return err; } -static int do_proc_dointvec(struct ctl_table *table, int write, +static int do_proc_dointvec(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write, void *data), @@ -552,7 +552,7 @@ static int do_proc_dointvec(struct ctl_table *table, int write, } static int do_proc_douintvec_w(unsigned int *tbl_data, - struct ctl_table *table, + const struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, @@ -639,7 +639,7 @@ static int do_proc_douintvec_r(unsigned int *tbl_data, void *buffer, return err; } -static int __do_proc_douintvec(void *tbl_data, struct ctl_table *table, +static int __do_proc_douintvec(void *tbl_data, const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, @@ -675,7 +675,7 @@ static int __do_proc_douintvec(void *tbl_data, struct ctl_table *table, return do_proc_douintvec_r(i, buffer, lenp, ppos, conv, data); } -int do_proc_douintvec(struct ctl_table *table, int write, +int do_proc_douintvec(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, @@ -1023,8 +1023,9 @@ static int sysrq_sysctl_handler(struct ctl_table *table, int write, } #endif -static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, - int write, void *buffer, size_t *lenp, loff_t *ppos, +static int __do_proc_doulongvec_minmax(void *data, + const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) { unsigned long *i, *min, *max; @@ -1096,7 +1097,7 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, return err; } -static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, +static int do_proc_doulongvec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) { From patchwork Fri Mar 15 20:48:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13593984 Return-Path: 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 AF8FFC54E58 for ; Fri, 15 Mar 2024 20:48:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5BB4D8014A; Fri, 15 Mar 2024 16:48:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 543C6800B4; Fri, 15 Mar 2024 16:48:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1E9B08014A; Fri, 15 Mar 2024 16:48:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F3FD0800B4 for ; Fri, 15 Mar 2024 16:48:36 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 971D4140A52 for ; Fri, 15 Mar 2024 20:48:36 +0000 (UTC) X-FDA: 81900461832.14.7752398 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf18.hostedemail.com (Postfix) with ESMTP id 764541C0003 for ; Fri, 15 Mar 2024 20:48:34 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b="J6/pl2CR"; dmarc=none; spf=pass (imf18.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=1710535715; 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=cDPg4hVSCoUf+vLlAcJ2+urE/t1nGtScyXDqSCMwiJ4=; b=BSuHW+LxL6GdYzwvhxhaKnhcgj7owE8SHXXQqVTSVqDgJZ7tTGO77QUxAeok0nno2YUIBi AVMU1st60fAZqox92PfTMB1fwMNkwdJCX3htIzf8ewQj6+IuJdwJy+OLy5p0BesTfIChwl z8UOMJshcv9Z4qOpklRzMNGjNoHIe24= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b="J6/pl2CR"; dmarc=none; spf=pass (imf18.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=1710535715; a=rsa-sha256; cv=none; b=SRfQojpfL27W5XzxrxL+AB1bBP3uHraiT6+w2NUNkAJVCwN0F5+UbEJ2Hch9sJYoKqAtkC My7qs66mzZcBsEtDxKNkg8FL7cU3fu374V2gY6eJsPCHKmxNu5175EucWMLMTQ/mBSRnf+ teNDXL47Cn4nZGQj0BlU23hS9uuzcUs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535699; bh=hccxx2UrNcPilqq2dEB/zO8lgaRy4vFcvfyKGNpTTKE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=J6/pl2CROMvE8X3YIh/Nk1y5EcWGa+bR5RixwrlxROwmmrbY+5Gxjshs2+d+LeX4P R7PYzE8jyc+IJUlHIHnCo0kDOC38Z1BDLB95rEJH0aJyrsvJvlO/edrTGxeNzVWvqE 3h34bBhTZhkXyNxhw+M6ZaciGY+bBP1mJzveGq0A= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:09 +0100 Subject: [PATCH 11/11] sysctl: treewide: constify the ctl_table argument of handlers MIME-Version: 1.0 Message-Id: <20240315-sysctl-const-handler-v1-11-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=112761; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=hccxx2UrNcPilqq2dEB/zO8lgaRy4vFcvfyKGNpTTKE=; b=Y/YcmLFIBfed1oYW4aBK76N8hTrI1Z5ECDFj9zpVN2k8qy0ZL7AtOEb4Gv2yCuvDV41iShQxU BFgIV3WdvyaBbT8TUPU+DDlwMiLp3XX6s3dAlneGcg2BtszsUoYjXOk X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Rspam-User: X-Stat-Signature: uyj4413mnf9kpeyzgafbcshehe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pXGLfUGTk1CLXzRtiH6H0EGYm6XeCBY9XLW3TrzMKJaE0KnCCUqjE9fVXYIN4X9R3kheIh0bwnfo5dvBfG0VMl16fY744fp1LFR5iiQrQpb25aWefC0wbTxAUEFhOgbIV1VRj+wQdqJCIIM9DnRiEFOWnQ1LmF6rwpZOv7Pw6uzU8/Wc0CFp1mylLt225tkvQWAt59LmGsYclSIMfXGwUFf81ag8lD/7OGIMwN8wyxPHT+nT5J8elHbHpZPqJMYBsc8ssad4QpX3HpfpyEds+dTgg4yD779K6VWXwssdIKF19Wi6Seu+VezETj4ScPQEw1s8zezNsnn2krBpP/BZEWP6cPc1RCG/5UEnBcRyijn7VVdOGuRRrTdzkSywbbCvWD7k8sKPgCjwsh4QottIBnCWc7JuVVHgp+KhCKV+jrFYRDfxMldhCw4NT4f2w7agYv1cPahVgm7am3Ci3YfgwQPADEWBAYAY0EJxHIBjpmR9TTS4C/AxuZIhW6I1wzajM9mnoZAlVPs2U2/zFrMrC3EVadX5Jkc6GagJ8KoMn4C03bRnWXK01Rcc88wWFu+Y0fZf/y7/znerZHE1C6r9aj7ACucyRw0CtKnRjO/r9WhbAZUy3CFEYnKVn3lDv3HvyyYASPeQS/idapFAY4Z1OyAFw02N6/E5bMBxS79Jdlmrx268MPU4yKptvs5JsWFR2/c9EHXo/UT6zyLwHyAyu6+v5oVI4ahi6AQdn5RsQaop7CcmTO/zR13Rd/zO63CFsa7Q== X-Bogosity: 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: List-Subscribe: List-Unsubscribe: Adapt the proc_hander function signature to make it clear that handlers are not supposed to modify their ctl_table argument. This is a prerequisite to moving the static ctl_table structs into .rodata. By migrating all handlers at once a lengthy transition can be avoided. The patch was mostly generated by coccinelle with the following script: @@ 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) { ... } In addition to the scripted changes some other changes are done: * the typedef proc_handler is adapted * the prototypes of non-static handler are adapted * kernel/seccomp.c:{read,write}_actions_logged() and kernel/watchdog.c:proc_watchdog_common() are adapted as they need to adapted together with the handlers for type-consistency reasons Signed-off-by: Thomas Weißschuh --- arch/arm64/kernel/armv8_deprecated.c | 2 +- arch/arm64/kernel/fpsimd.c | 2 +- arch/s390/appldata/appldata_base.c | 10 ++-- arch/s390/kernel/debug.c | 2 +- arch/s390/kernel/topology.c | 2 +- arch/s390/mm/cmm.c | 6 +-- arch/x86/kernel/itmt.c | 2 +- drivers/cdrom/cdrom.c | 6 +-- drivers/char/random.c | 5 +- drivers/macintosh/mac_hid.c | 2 +- drivers/net/vrf.c | 2 +- drivers/parport/procfs.c | 14 ++--- drivers/perf/arm_pmuv3.c | 6 ++- drivers/perf/riscv_pmu_sbi.c | 2 +- fs/coredump.c | 4 +- fs/dcache.c | 3 +- fs/drop_caches.c | 4 +- fs/exec.c | 6 ++- fs/file_table.c | 3 +- fs/fs-writeback.c | 2 +- fs/inode.c | 3 +- fs/pipe.c | 2 +- fs/quota/dquot.c | 4 +- fs/xfs/xfs_sysctl.c | 33 ++++++------ include/linux/ftrace.h | 4 +- include/linux/mm.h | 8 +-- include/linux/perf_event.h | 6 +-- include/linux/security.h | 2 +- include/linux/sysctl.h | 34 ++++++------ include/linux/vmstat.h | 6 +-- include/linux/writeback.h | 2 +- include/net/ndisc.h | 2 +- include/net/neighbour.h | 6 +-- include/net/netfilter/nf_hooks_lwtunnel.h | 2 +- ipc/ipc_sysctl.c | 14 ++--- kernel/bpf/syscall.c | 4 +- kernel/delayacct.c | 5 +- kernel/events/callchain.c | 2 +- kernel/events/core.c | 9 ++-- kernel/fork.c | 2 +- kernel/hung_task.c | 7 +-- kernel/kexec_core.c | 2 +- kernel/kprobes.c | 2 +- kernel/latencytop.c | 5 +- kernel/pid_namespace.c | 4 +- kernel/pid_sysctl.h | 2 +- kernel/printk/internal.h | 2 +- kernel/printk/printk.c | 2 +- kernel/printk/sysctl.c | 6 ++- kernel/sched/core.c | 15 +++--- kernel/sched/rt.c | 20 ++++--- kernel/sched/topology.c | 6 ++- kernel/seccomp.c | 7 +-- kernel/stackleak.c | 5 +- kernel/sysctl.c | 88 ++++++++++++++++--------------- kernel/time/timer.c | 4 +- kernel/trace/ftrace.c | 2 +- kernel/trace/trace.c | 2 +- kernel/trace/trace_events_user.c | 3 +- kernel/trace/trace_stack.c | 2 +- kernel/umh.c | 4 +- kernel/utsname_sysctl.c | 4 +- kernel/watchdog.c | 15 +++--- mm/compaction.c | 17 +++--- mm/hugetlb.c | 16 +++--- mm/page-writeback.c | 27 ++++++---- mm/page_alloc.c | 43 ++++++++++----- mm/util.c | 15 +++--- mm/vmstat.c | 6 +-- net/bridge/br_netfilter_hooks.c | 2 +- net/core/neighbour.c | 24 +++++---- net/core/sysctl_net_core.c | 24 +++++---- net/ipv4/devinet.c | 6 +-- net/ipv4/route.c | 4 +- net/ipv4/sysctl_net_ipv4.c | 34 ++++++------ net/ipv6/addrconf.c | 30 ++++++----- net/ipv6/ndisc.c | 5 +- net/ipv6/route.c | 4 +- net/ipv6/sysctl_net_ipv6.c | 6 ++- net/mpls/af_mpls.c | 4 +- net/netfilter/ipvs/ip_vs_ctl.c | 12 ++--- net/netfilter/nf_conntrack_standalone.c | 2 +- net/netfilter/nf_hooks_lwtunnel.c | 2 +- net/netfilter/nf_log.c | 4 +- net/phonet/sysctl.c | 2 +- net/rds/tcp.c | 4 +- net/sctp/sysctl.c | 30 ++++++----- net/sunrpc/sysctl.c | 5 +- net/sunrpc/xprtrdma/svc_rdma.c | 2 +- security/apparmor/lsm.c | 2 +- security/min_addr.c | 2 +- security/yama/yama_lsm.c | 2 +- 92 files changed, 433 insertions(+), 347 deletions(-) diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c index dd6ce86d4332..a3085cb68852 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c @@ -504,7 +504,7 @@ static int update_insn_emulation_mode(struct insn_emulation *insn, return ret; } -static int emulation_proc_handler(struct ctl_table *table, int write, +static int emulation_proc_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index ebb0158997ca..98efb587ef36 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -535,7 +535,7 @@ static unsigned int find_supported_vector_length(enum vec_type type, #if defined(CONFIG_ARM64_SVE) && defined(CONFIG_SYSCTL) -static int vec_proc_do_default_vl(struct ctl_table *table, int write, +static int vec_proc_do_default_vl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct vl_info *info = table->extra1; diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index c2978cb03b36..91a30e017d65 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c @@ -46,9 +46,9 @@ * /proc entries (sysctl) */ static const char appldata_proc_name[APPLDATA_PROC_NAME_LENGTH] = "appldata"; -static int appldata_timer_handler(struct ctl_table *ctl, int write, +static int appldata_timer_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); -static int appldata_interval_handler(struct ctl_table *ctl, int write, +static int appldata_interval_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); static struct ctl_table_header *appldata_sysctl_header; @@ -199,7 +199,7 @@ static void __appldata_vtimer_setup(int cmd) * Start/Stop timer, show status of timer (0 = not active, 1 = active) */ static int -appldata_timer_handler(struct ctl_table *ctl, int write, +appldata_timer_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int timer_active = appldata_timer_active; @@ -232,7 +232,7 @@ appldata_timer_handler(struct ctl_table *ctl, int write, * current timer interval. */ static int -appldata_interval_handler(struct ctl_table *ctl, int write, +appldata_interval_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int interval = appldata_interval; @@ -262,7 +262,7 @@ appldata_interval_handler(struct ctl_table *ctl, int write, * monitoring (0 = not in process, 1 = in process) */ static int -appldata_generic_handler(struct ctl_table *ctl, int write, +appldata_generic_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct appldata_ops *ops = NULL, *tmp_ops; diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 85328a0ef3b6..bce50ca75ea7 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -954,7 +954,7 @@ static int debug_active = 1; * always allow read, allow write only if debug_stoppable is set or * if debug_active is already off */ -static int s390dbf_procactive(struct ctl_table *table, int write, +static int s390dbf_procactive(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { if (!write || debug_stoppable || !debug_active) diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 89e91b8ce842..1df3dc118696 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c @@ -600,7 +600,7 @@ static int __init topology_setup(char *str) } early_param("topology", topology_setup); -static int topology_ctl_handler(struct ctl_table *ctl, int write, +static int topology_ctl_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int enabled = topology_is_enabled(); diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index f8b13f247646..1d6749e095f7 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -243,7 +243,7 @@ static int cmm_skip_blanks(char *cp, char **endp) return str != cp; } -static int cmm_pages_handler(struct ctl_table *ctl, int write, +static int cmm_pages_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { long nr = cmm_get_pages(); @@ -262,7 +262,7 @@ static int cmm_pages_handler(struct ctl_table *ctl, int write, return 0; } -static int cmm_timed_pages_handler(struct ctl_table *ctl, int write, +static int cmm_timed_pages_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -282,7 +282,7 @@ static int cmm_timed_pages_handler(struct ctl_table *ctl, int write, return 0; } -static int cmm_timeout_handler(struct ctl_table *ctl, int write, +static int cmm_timeout_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { char buf[64], *p; diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c index 9a7c03d47861..51b805c727fc 100644 --- a/arch/x86/kernel/itmt.c +++ b/arch/x86/kernel/itmt.c @@ -38,7 +38,7 @@ static bool __read_mostly sched_itmt_capable; */ unsigned int __read_mostly sysctl_sched_itmt_enabled; -static int sched_itmt_update_handler(struct ctl_table *table, int write, +static int sched_itmt_update_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { unsigned int old_sysctl; diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index a5e07270e0d4..2d5e4adcfc1f 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -3473,8 +3473,8 @@ static int cdrom_print_info(const char *header, int val, char *info, return 0; } -static int cdrom_sysctl_info(struct ctl_table *ctl, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int cdrom_sysctl_info(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) { int pos; char *info = cdrom_sysctl_settings.info; @@ -3586,7 +3586,7 @@ static void cdrom_update_settings(void) mutex_unlock(&cdrom_mutex); } -static int cdrom_sysctl_handler(struct ctl_table *ctl, int write, +static int cdrom_sysctl_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; diff --git a/drivers/char/random.c b/drivers/char/random.c index 456be28ba67c..055ed0aa1de8 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1604,7 +1604,7 @@ static u8 sysctl_bootid[UUID_SIZE]; * UUID. The difference is in whether table->data is NULL; if it is, * then a new UUID is generated and returned to the user. */ -static int proc_do_uuid(struct ctl_table *table, int write, void *buf, +static int proc_do_uuid(const struct ctl_table *table, int write, void *buf, size_t *lenp, loff_t *ppos) { u8 tmp_uuid[UUID_SIZE], *uuid; @@ -1635,7 +1635,8 @@ static int proc_do_uuid(struct ctl_table *table, int write, void *buf, } /* The same as proc_dointvec, but writes don't change anything. */ -static int proc_do_rointvec(struct ctl_table *table, int write, void *buf, +static int proc_do_rointvec(const struct ctl_table *table, int write, + void *buf, size_t *lenp, loff_t *ppos) { return write ? 0 : proc_dointvec(table, 0, buf, lenp, ppos); diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index 1ae3539beff5..891047c8a110 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -182,7 +182,7 @@ static void mac_hid_stop_emulation(void) mac_hid_destroy_emumouse(); } -static int mac_hid_toggle_emumouse(struct ctl_table *table, int write, +static int mac_hid_toggle_emumouse(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int *valp = table->data; diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index bb95ce43cd97..5d4283c2c022 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -1908,7 +1908,7 @@ static int vrf_strict_mode_change(struct vrf_map *vmap, bool new_mode) return res; } -static int vrf_shared_table_handler(struct ctl_table *table, int write, +static int vrf_shared_table_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = (struct net *)table->extra1; diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c index bd388560ed59..2349b5dfece4 100644 --- a/drivers/parport/procfs.c +++ b/drivers/parport/procfs.c @@ -33,8 +33,8 @@ #define PARPORT_MIN_SPINTIME_VALUE 1 #define PARPORT_MAX_SPINTIME_VALUE 1000 -static int do_active_device(struct ctl_table *table, int write, - void *result, size_t *lenp, loff_t *ppos) +static int do_active_device(const struct ctl_table *table, int write, + void *result, size_t *lenp, loff_t *ppos) { struct parport *port = (struct parport *)table->extra1; char buffer[256]; @@ -70,7 +70,7 @@ static int do_active_device(struct ctl_table *table, int write, } #ifdef CONFIG_PARPORT_1284 -static int do_autoprobe(struct ctl_table *table, int write, +static int do_autoprobe(const struct ctl_table *table, int write, void *result, size_t *lenp, loff_t *ppos) { struct parport_device_info *info = table->extra2; @@ -113,7 +113,7 @@ static int do_autoprobe(struct ctl_table *table, int write, } #endif /* IEEE1284.3 support. */ -static int do_hardware_base_addr(struct ctl_table *table, int write, +static int do_hardware_base_addr(const struct ctl_table *table, int write, void *result, size_t *lenp, loff_t *ppos) { struct parport *port = (struct parport *)table->extra1; @@ -140,7 +140,7 @@ static int do_hardware_base_addr(struct ctl_table *table, int write, return 0; } -static int do_hardware_irq(struct ctl_table *table, int write, +static int do_hardware_irq(const struct ctl_table *table, int write, void *result, size_t *lenp, loff_t *ppos) { struct parport *port = (struct parport *)table->extra1; @@ -167,7 +167,7 @@ static int do_hardware_irq(struct ctl_table *table, int write, return 0; } -static int do_hardware_dma(struct ctl_table *table, int write, +static int do_hardware_dma(const struct ctl_table *table, int write, void *result, size_t *lenp, loff_t *ppos) { struct parport *port = (struct parport *)table->extra1; @@ -194,7 +194,7 @@ static int do_hardware_dma(struct ctl_table *table, int write, return 0; } -static int do_hardware_modes(struct ctl_table *table, int write, +static int do_hardware_modes(const struct ctl_table *table, int write, void *result, size_t *lenp, loff_t *ppos) { struct parport *port = (struct parport *)table->extra1; diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c index 23fa6c5da82c..83d12dc83313 100644 --- a/drivers/perf/arm_pmuv3.c +++ b/drivers/perf/arm_pmuv3.c @@ -1253,8 +1253,10 @@ static void armv8pmu_disable_user_access_ipi(void *unused) armv8pmu_disable_user_access(); } -static int armv8pmu_proc_user_access_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int armv8pmu_proc_user_access_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); if (ret || !write || sysctl_perf_user_access) diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c index 8cbe6e5f9c39..9beda75e2e18 100644 --- a/drivers/perf/riscv_pmu_sbi.c +++ b/drivers/perf/riscv_pmu_sbi.c @@ -1013,7 +1013,7 @@ static void riscv_pmu_update_counter_access(void *info) csr_write(CSR_SCOUNTEREN, 0x2); } -static int riscv_pmu_proc_user_access_handler(struct ctl_table *table, +static int riscv_pmu_proc_user_access_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { diff --git a/fs/coredump.c b/fs/coredump.c index be6403b4b14b..3c9a9782ec05 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -988,8 +988,8 @@ void validate_coredump_safety(void) } } -static int proc_dostring_coredump(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_dostring_coredump(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { int error = proc_dostring(table, write, buffer, lenp, ppos); diff --git a/fs/dcache.c b/fs/dcache.c index 71a8e943a0fa..0118e47578c2 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -174,7 +174,8 @@ static long get_nr_dentry_negative(void) return sum < 0 ? 0 : sum; } -static int proc_nr_dentry(struct ctl_table *table, int write, void *buffer, +static int proc_nr_dentry(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { dentry_stat.nr_dentry = get_nr_dentry(); diff --git a/fs/drop_caches.c b/fs/drop_caches.c index b9575957a7c2..023482823ff1 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c @@ -48,8 +48,8 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused) iput(toput_inode); } -int drop_caches_sysctl_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +int drop_caches_sysctl_handler(const struct ctl_table *table, int write, + void *buffer, size_t *length, loff_t *ppos) { int ret; diff --git a/fs/exec.c b/fs/exec.c index ff6f26671cfc..1e17a798053b 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -2161,8 +2161,10 @@ COMPAT_SYSCALL_DEFINE5(execveat, int, fd, #ifdef CONFIG_SYSCTL -static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_dointvec_minmax_coredump(const struct ctl_table *table, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { int error = proc_dointvec_minmax(table, write, buffer, lenp, ppos); diff --git a/fs/file_table.c b/fs/file_table.c index 4f03beed4737..1d4f71072d28 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -96,7 +96,8 @@ EXPORT_SYMBOL_GPL(get_max_files); /* * Handle nr_files sysctl */ -static int proc_nr_files(struct ctl_table *table, int write, void *buffer, +static int proc_nr_files(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { files_stat.nr_files = get_nr_files(); diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index e4f17c53ddfc..535a1108960f 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2404,7 +2404,7 @@ static int __init start_dirtytime_writeback(void) } __initcall(start_dirtytime_writeback); -int dirtytime_interval_handler(struct ctl_table *table, int write, +int dirtytime_interval_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; diff --git a/fs/inode.c b/fs/inode.c index 3a41f83a4ba5..3b5bbb70a18c 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -107,7 +107,8 @@ long get_nr_dirty_inodes(void) */ static struct inodes_stat_t inodes_stat; -static int proc_nr_inodes(struct ctl_table *table, int write, void *buffer, +static int proc_nr_inodes(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { inodes_stat.nr_inodes = get_nr_inodes(); diff --git a/fs/pipe.c b/fs/pipe.c index 50c8a8596b52..7dff2aa50a6d 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -1469,7 +1469,7 @@ static int do_proc_dopipe_max_size_conv(unsigned long *lvalp, return 0; } -static int proc_dopipe_max_size(struct ctl_table *table, int write, +static int proc_dopipe_max_size(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return do_proc_douintvec(table, write, buffer, lenp, ppos, diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index dacbee455c03..b33df45426f4 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -2911,8 +2911,8 @@ const struct quotactl_ops dquot_quotactl_sysfile_ops = { }; EXPORT_SYMBOL(dquot_quotactl_sysfile_ops); -static int do_proc_dqstats(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int do_proc_dqstats(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { unsigned int type = (unsigned long *)table->data - dqstats.stat; s64 value = percpu_counter_sum(&dqstats.counter[type]); diff --git a/fs/xfs/xfs_sysctl.c b/fs/xfs/xfs_sysctl.c index a191f6560f98..a3ca192eca79 100644 --- a/fs/xfs/xfs_sysctl.c +++ b/fs/xfs/xfs_sysctl.c @@ -10,12 +10,11 @@ static struct ctl_table_header *xfs_table_header; #ifdef CONFIG_PROC_FS STATIC int -xfs_stats_clear_proc_handler( - struct ctl_table *ctl, - int write, - void *buffer, - size_t *lenp, - loff_t *ppos) +xfs_stats_clear_proc_handler(const struct ctl_table *ctl, + int write, + void *buffer, + size_t *lenp, + loff_t *ppos) { int ret, *valp = ctl->data; @@ -30,12 +29,11 @@ xfs_stats_clear_proc_handler( } STATIC int -xfs_panic_mask_proc_handler( - struct ctl_table *ctl, - int write, - void *buffer, - size_t *lenp, - loff_t *ppos) +xfs_panic_mask_proc_handler(const struct ctl_table *ctl, + int write, + void *buffer, + size_t *lenp, + loff_t *ppos) { int ret, *valp = ctl->data; @@ -51,12 +49,11 @@ xfs_panic_mask_proc_handler( #endif /* CONFIG_PROC_FS */ STATIC int -xfs_deprecated_dointvec_minmax( - struct ctl_table *ctl, - int write, - void *buffer, - size_t *lenp, - loff_t *ppos) +xfs_deprecated_dointvec_minmax(const struct ctl_table *ctl, + int write, + void *buffer, + size_t *lenp, + loff_t *ppos) { if (write) { printk_ratelimited(KERN_WARNING diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index e8921871ef9a..3e10fe61c2bf 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -470,7 +470,7 @@ static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, extern int stack_tracer_enabled; -int stack_trace_sysctl(struct ctl_table *table, int write, void *buffer, +int stack_trace_sysctl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); /* DO NOT MODIFY THIS VARIABLE DIRECTLY! */ @@ -1157,7 +1157,7 @@ extern int tracepoint_printk; extern void disable_trace_on_warning(void); extern int __disable_trace_on_warning; -int tracepoint_printk_sysctl(struct ctl_table *table, int write, +int tracepoint_printk_sysctl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); #else /* CONFIG_TRACING */ diff --git a/include/linux/mm.h b/include/linux/mm.h index 0436b919f1c7..f047b5752a78 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -203,11 +203,11 @@ extern int sysctl_overcommit_memory; extern int sysctl_overcommit_ratio; extern unsigned long sysctl_overcommit_kbytes; -int overcommit_ratio_handler(struct ctl_table *, int, void *, size_t *, +int overcommit_ratio_handler(const struct ctl_table *, int, void *, size_t *, loff_t *); -int overcommit_kbytes_handler(struct ctl_table *, int, void *, size_t *, +int overcommit_kbytes_handler(const struct ctl_table *, int, void *, size_t *, loff_t *); -int overcommit_policy_handler(struct ctl_table *, int, void *, size_t *, +int overcommit_policy_handler(const struct ctl_table *, int, void *, size_t *, loff_t *); #if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP) @@ -3837,7 +3837,7 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); #ifdef CONFIG_SYSCTL extern int sysctl_drop_caches; -int drop_caches_sysctl_handler(struct ctl_table *, int, void *, size_t *, +int drop_caches_sysctl_handler(const struct ctl_table *, int, void *, size_t *, loff_t *); #endif diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index d2a15c0c6f8a..707d5fe5da9c 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -1598,11 +1598,11 @@ extern int sysctl_perf_cpu_time_max_percent; extern void perf_sample_event_took(u64 sample_len_ns); -int perf_event_max_sample_rate_handler(struct ctl_table *table, int write, +int perf_event_max_sample_rate_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); -int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write, +int perf_cpu_time_max_percent_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); -int perf_event_max_stack_handler(struct ctl_table *table, int write, +int perf_event_max_stack_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); /* Access to perf_event_open(2) syscall. */ diff --git a/include/linux/security.h b/include/linux/security.h index f249f5b9a9d7..f12d1b7d650e 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -228,7 +228,7 @@ struct request_sock; #define LSM_UNSAFE_NO_NEW_PRIVS 4 #ifdef CONFIG_MMU -extern int mmap_min_addr_handler(struct ctl_table *table, int write, +extern int mmap_min_addr_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); #endif diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 99ea26b16c0d..97901dae1348 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -61,31 +61,31 @@ extern const int sysctl_vals[]; extern const unsigned long sysctl_long_vals[]; -typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer, +typedef int proc_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); -int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *); -int proc_dobool(struct ctl_table *table, int write, void *buffer, +int proc_dostring(const struct ctl_table *, int, void *, size_t *, loff_t *); +int proc_dobool(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); -int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *); -int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *); -int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *); -int proc_douintvec_minmax(struct ctl_table *table, int write, void *buffer, +int proc_dointvec(const struct ctl_table *, int, void *, size_t *, loff_t *); +int proc_douintvec(const struct ctl_table *, int, void *, size_t *, loff_t *); +int proc_dointvec_minmax(const struct ctl_table *, int, void *, size_t *, loff_t *); +int proc_douintvec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); -int proc_dou8vec_minmax(struct ctl_table *table, int write, void *buffer, +int proc_dou8vec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); -int proc_dointvec_jiffies(struct ctl_table *, int, void *, size_t *, loff_t *); -int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write, +int proc_dointvec_jiffies(const struct ctl_table *, int, void *, size_t *, loff_t *); +int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); -int proc_dointvec_userhz_jiffies(struct ctl_table *, int, void *, size_t *, +int proc_dointvec_userhz_jiffies(const struct ctl_table *, int, void *, size_t *, loff_t *); -int proc_dointvec_ms_jiffies(struct ctl_table *, int, void *, size_t *, +int proc_dointvec_ms_jiffies(const struct ctl_table *, int, void *, size_t *, loff_t *); -int proc_doulongvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *); -int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, void *, +int proc_doulongvec_minmax(const struct ctl_table *, int, void *, size_t *, loff_t *); +int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, int, void *, size_t *, loff_t *); -int proc_do_large_bitmap(struct ctl_table *, int, void *, size_t *, loff_t *); -int proc_do_static_key(struct ctl_table *table, int write, void *buffer, +int proc_do_large_bitmap(const struct ctl_table *, int, void *, size_t *, loff_t *); +int proc_do_static_key(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); /* @@ -288,7 +288,7 @@ static inline bool sysctl_is_alias(char *param) } #endif /* CONFIG_SYSCTL */ -int sysctl_max_threads(struct ctl_table *table, int write, void *buffer, +int sysctl_max_threads(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); #endif /* _LINUX_SYSCTL_H */ diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 343906a98d6e..0282aba4faa0 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -17,7 +17,7 @@ extern int sysctl_stat_interval; #define DISABLE_NUMA_STAT 0 extern int sysctl_vm_numa_stat; DECLARE_STATIC_KEY_TRUE(vm_numa_stat_key); -int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write, +int sysctl_vm_numa_stat_handler(const struct ctl_table *table, int write, void *buffer, size_t *length, loff_t *ppos); #endif @@ -301,8 +301,8 @@ void cpu_vm_stats_fold(int cpu); void refresh_zone_stat_thresholds(void); struct ctl_table; -int vmstat_refresh(struct ctl_table *, int write, void *buffer, size_t *lenp, - loff_t *ppos); +int vmstat_refresh(const struct ctl_table *, int write, void *buffer, + size_t *lenp, loff_t *ppos); void drain_zonestat(struct zone *zone, struct per_cpu_zonestat *); diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 9845cb62e40b..e58b039aa592 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -350,7 +350,7 @@ extern unsigned int dirty_expire_interval; extern unsigned int dirtytime_expire_interval; extern int laptop_mode; -int dirtytime_interval_handler(struct ctl_table *table, int write, +int dirtytime_interval_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty); diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 9bbdf6eaa942..7a533d5b1d59 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -486,7 +486,7 @@ void igmp6_event_report(struct sk_buff *skb); #ifdef CONFIG_SYSCTL -int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, +int ndisc_ifinfo_sysctl_change(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); #endif diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 0d28172193fa..a44f262a7384 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -412,12 +412,12 @@ void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, void *neigh_seq_next(struct seq_file *, void *, loff_t *); void neigh_seq_stop(struct seq_file *, void *); -int neigh_proc_dointvec(struct ctl_table *ctl, int write, +int neigh_proc_dointvec(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); -int neigh_proc_dointvec_jiffies(struct ctl_table *ctl, int write, +int neigh_proc_dointvec_jiffies(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); -int neigh_proc_dointvec_ms_jiffies(struct ctl_table *ctl, int write, +int neigh_proc_dointvec_ms_jiffies(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, diff --git a/include/net/netfilter/nf_hooks_lwtunnel.h b/include/net/netfilter/nf_hooks_lwtunnel.h index 52e27920f829..cef7a4eb8f97 100644 --- a/include/net/netfilter/nf_hooks_lwtunnel.h +++ b/include/net/netfilter/nf_hooks_lwtunnel.h @@ -2,6 +2,6 @@ #include #ifdef CONFIG_SYSCTL -int nf_hooks_lwtunnel_sysctl_handler(struct ctl_table *table, int write, +int nf_hooks_lwtunnel_sysctl_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); #endif diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c index 45cb1dabce29..c40e9384fb1b 100644 --- a/ipc/ipc_sysctl.c +++ b/ipc/ipc_sysctl.c @@ -17,8 +17,10 @@ #include #include "util.h" -static int proc_ipc_dointvec_minmax_orphans(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_ipc_dointvec_minmax_orphans(const struct ctl_table *table, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { struct ipc_namespace *ns = container_of(table->data, struct ipc_namespace, shm_rmid_forced); @@ -33,8 +35,8 @@ static int proc_ipc_dointvec_minmax_orphans(struct ctl_table *table, int write, return err; } -static int proc_ipc_auto_msgmni(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_ipc_auto_msgmni(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table ipc_table; int dummy = 0; @@ -48,8 +50,8 @@ static int proc_ipc_auto_msgmni(struct ctl_table *table, int write, return proc_dointvec_minmax(&ipc_table, write, buffer, lenp, ppos); } -static int proc_ipc_sem_dointvec(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_ipc_sem_dointvec(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct ipc_namespace *ns = container_of(table->data, struct ipc_namespace, sem_ctls); diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index ae2ff73bde7e..08f92fb3cefa 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -5904,7 +5904,7 @@ const struct bpf_prog_ops bpf_syscall_prog_ops = { }; #ifdef CONFIG_SYSCTL -static int bpf_stats_handler(struct ctl_table *table, int write, +static int bpf_stats_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct static_key *key = (struct static_key *)table->data; @@ -5939,7 +5939,7 @@ void __weak unpriv_ebpf_notify(int new_state) { } -static int bpf_unpriv_handler(struct ctl_table *table, int write, +static int bpf_unpriv_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret, unpriv_enable = *(int *)table->data; diff --git a/kernel/delayacct.c b/kernel/delayacct.c index 6f0c358e73d8..513791ef573d 100644 --- a/kernel/delayacct.c +++ b/kernel/delayacct.c @@ -44,8 +44,9 @@ void delayacct_init(void) } #ifdef CONFIG_PROC_SYSCTL -static int sysctl_delayacct(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +static int sysctl_delayacct(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { int state = delayacct_on; struct ctl_table t; diff --git a/kernel/events/callchain.c b/kernel/events/callchain.c index 1273be84392c..bd5699f869c3 100644 --- a/kernel/events/callchain.c +++ b/kernel/events/callchain.c @@ -229,7 +229,7 @@ get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user, * Used for sysctl_perf_event_max_stack and * sysctl_perf_event_max_contexts_per_stack. */ -int perf_event_max_stack_handler(struct ctl_table *table, int write, +int perf_event_max_stack_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int *value = table->data; diff --git a/kernel/events/core.c b/kernel/events/core.c index 724e6d7e128f..e2955e0d9f44 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -450,7 +450,8 @@ static void update_perf_cpu_limits(void) static bool perf_rotate_context(struct perf_cpu_pmu_context *cpc); -int perf_event_max_sample_rate_handler(struct ctl_table *table, int write, +int perf_event_max_sample_rate_handler(const struct ctl_table *table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; @@ -474,8 +475,10 @@ int perf_event_max_sample_rate_handler(struct ctl_table *table, int write, int sysctl_perf_cpu_time_max_percent __read_mostly = DEFAULT_CPU_TIME_MAX_PERCENT; -int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +int perf_cpu_time_max_percent_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); diff --git a/kernel/fork.c b/kernel/fork.c index 39a5046c2f0b..7be1dc035fe1 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -3417,7 +3417,7 @@ int unshare_files(void) return 0; } -int sysctl_max_threads(struct ctl_table *table, int write, +int sysctl_max_threads(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table t; diff --git a/kernel/hung_task.c b/kernel/hung_task.c index b2fc2727d654..003f0f5cb111 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -239,9 +239,10 @@ static long hung_timeout_jiffies(unsigned long last_checked, /* * Process updating of timeout sysctl */ -static int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, - void *buffer, - size_t *lenp, loff_t *ppos) +static int proc_dohung_task_timeout_secs(const struct ctl_table *table, + int write, + void *buffer, + size_t *lenp, loff_t *ppos) { int ret; diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index 0e96f6b24344..a6995bb89eef 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -888,7 +888,7 @@ struct kimage *kexec_crash_image; static int kexec_load_disabled; #ifdef CONFIG_SYSCTL -static int kexec_limit_handler(struct ctl_table *table, int write, +static int kexec_limit_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct kexec_load_limit *limit = table->data; diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 9d9095e81792..83771c44fc3a 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -939,7 +939,7 @@ static void unoptimize_all_kprobes(void) static DEFINE_MUTEX(kprobe_sysctl_mutex); static int sysctl_kprobes_optimization; -static int proc_kprobes_optimization_handler(struct ctl_table *table, +static int proc_kprobes_optimization_handler(const struct ctl_table *table, int write, void *buffer, size_t *length, loff_t *ppos) { diff --git a/kernel/latencytop.c b/kernel/latencytop.c index 781249098cb6..0a5c22b19821 100644 --- a/kernel/latencytop.c +++ b/kernel/latencytop.c @@ -65,8 +65,9 @@ static struct latency_record latency_record[MAXLR]; int latencytop_enabled; #ifdef CONFIG_SYSCTL -static int sysctl_latencytop(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +static int sysctl_latencytop(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { int err; diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index 7ade20e95232..008c32f11bbc 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -277,8 +277,8 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) } #ifdef CONFIG_CHECKPOINT_RESTORE -static int pid_ns_ctl_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int pid_ns_ctl_handler(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct pid_namespace *pid_ns = task_active_pid_ns(current); struct ctl_table tmp = *table; diff --git a/kernel/pid_sysctl.h b/kernel/pid_sysctl.h index 2ee41a3a1dfd..a1b47ad10ebc 100644 --- a/kernel/pid_sysctl.h +++ b/kernel/pid_sysctl.h @@ -5,7 +5,7 @@ #include #if defined(CONFIG_SYSCTL) && defined(CONFIG_MEMFD_CREATE) -static int pid_mfd_noexec_dointvec_minmax(struct ctl_table *table, +static int pid_mfd_noexec_dointvec_minmax(const struct ctl_table *table, int write, void *buf, size_t *lenp, loff_t *ppos) { struct pid_namespace *ns = task_active_pid_ns(current); diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h index 6c2afee5ef62..19dcc5832651 100644 --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h @@ -8,7 +8,7 @@ #if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL) void __init printk_sysctl_init(void); -int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, +int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); #else #define printk_sysctl_init() do { } while (0) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index ca5146006b94..c96ae16ca2cd 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -197,7 +197,7 @@ __setup("printk.devkmsg=", control_devkmsg); char devkmsg_log_str[DEVKMSG_STR_MAX_SIZE] = "ratelimit"; #if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL) -int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, +int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { char old_str[DEVKMSG_STR_MAX_SIZE]; diff --git a/kernel/printk/sysctl.c b/kernel/printk/sysctl.c index c228343eeb97..2571651aa1ce 100644 --- a/kernel/printk/sysctl.c +++ b/kernel/printk/sysctl.c @@ -11,8 +11,10 @@ static const int ten_thousand = 10000; -static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_dointvec_minmax_sysadmin(const struct ctl_table *table, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { if (write && !capable(CAP_SYS_ADMIN)) return -EPERM; diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 0621e4ee31de..ea143bb63f63 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1835,8 +1835,10 @@ static void uclamp_sync_util_min_rt_default(void) uclamp_update_util_min_rt_default(p); } -static int sysctl_sched_uclamp_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int sysctl_sched_uclamp_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { bool update_root_tg = false; int old_min, old_max, old_min_rt; @@ -4603,8 +4605,8 @@ static void reset_memory_tiering(void) } } -static int sysctl_numa_balancing(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int sysctl_numa_balancing(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table t; int err; @@ -4672,8 +4674,9 @@ static int __init setup_schedstats(char *str) __setup("schedstats=", setup_schedstats); #ifdef CONFIG_PROC_SYSCTL -static int sysctl_schedstats(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +static int sysctl_schedstats(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { struct ctl_table t; int err; diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 3261b067b67e..3bbf29d4e110 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -26,10 +26,12 @@ int sysctl_sched_rt_runtime = 950000; #ifdef CONFIG_SYSCTL static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC * RR_TIMESLICE) / HZ; -static int sched_rt_handler(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos); -static int sched_rr_handler(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos); +static int sched_rt_handler(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos); +static int sched_rr_handler(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos); static struct ctl_table sched_rt_sysctls[] = { { .procname = "sched_rt_period_us", @@ -2953,8 +2955,9 @@ static void sched_rt_do_global(void) raw_spin_unlock_irqrestore(&def_rt_bandwidth.rt_runtime_lock, flags); } -static int sched_rt_handler(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +static int sched_rt_handler(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { int old_period, old_runtime; static DEFINE_MUTEX(mutex); @@ -2992,8 +2995,9 @@ static int sched_rt_handler(struct ctl_table *table, int write, void *buffer, return ret; } -static int sched_rr_handler(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +static int sched_rr_handler(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { int ret; static DEFINE_MUTEX(mutex); diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 99ea5986038c..1c582cee6144 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -285,8 +285,10 @@ void rebuild_sched_domains_energy(void) } #ifdef CONFIG_PROC_SYSCTL -static int sched_energy_aware_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int sched_energy_aware_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { int ret, state; diff --git a/kernel/seccomp.c b/kernel/seccomp.c index aca7b437882e..397118a24631 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -2334,7 +2334,7 @@ static bool seccomp_actions_logged_from_names(u32 *actions_logged, char *names) return true; } -static int read_actions_logged(struct ctl_table *ro_table, void *buffer, +static int read_actions_logged(const struct ctl_table *ro_table, void *buffer, size_t *lenp, loff_t *ppos) { char names[sizeof(seccomp_actions_avail)]; @@ -2352,7 +2352,7 @@ static int read_actions_logged(struct ctl_table *ro_table, void *buffer, return proc_dostring(&table, 0, buffer, lenp, ppos); } -static int write_actions_logged(struct ctl_table *ro_table, void *buffer, +static int write_actions_logged(const struct ctl_table *ro_table, void *buffer, size_t *lenp, loff_t *ppos, u32 *actions_logged) { char names[sizeof(seccomp_actions_avail)]; @@ -2413,7 +2413,8 @@ static void audit_actions_logged(u32 actions_logged, u32 old_actions_logged, return audit_seccomp_actions_logged(new, old, !ret); } -static int seccomp_actions_logged_handler(struct ctl_table *ro_table, int write, +static int seccomp_actions_logged_handler(const struct ctl_table *ro_table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { diff --git a/kernel/stackleak.c b/kernel/stackleak.c index b292e5ca0b7d..abe530071c20 100644 --- a/kernel/stackleak.c +++ b/kernel/stackleak.c @@ -21,8 +21,9 @@ static DEFINE_STATIC_KEY_FALSE(stack_erasing_bypass); #ifdef CONFIG_SYSCTL -static int stack_erasing_sysctl(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) +static int stack_erasing_sysctl(const struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, + loff_t *ppos) { int ret = 0; int state = !static_branch_unlikely(&stack_erasing_bypass); diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 93824d8a3636..e06478682bb8 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -256,7 +256,7 @@ static bool proc_first_pos_non_zero_ignore(loff_t *ppos, * * Returns 0 on success. */ -int proc_dostring(struct ctl_table *table, int write, +int proc_dostring(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { if (write) @@ -702,7 +702,7 @@ int do_proc_douintvec(const struct ctl_table *table, int write, * * Returns 0 on success. */ -int proc_dobool(struct ctl_table *table, int write, void *buffer, +int proc_dobool(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table tmp; @@ -739,7 +739,7 @@ int proc_dobool(struct ctl_table *table, int write, void *buffer, * * Returns 0 on success. */ -int proc_dointvec(struct ctl_table *table, int write, void *buffer, +int proc_dointvec(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL); @@ -758,8 +758,8 @@ int proc_dointvec(struct ctl_table *table, int write, void *buffer, * * Returns 0 on success. */ -int proc_douintvec(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +int proc_douintvec(const struct ctl_table *table, int write, void *buffer, + size_t *lenp, loff_t *ppos) { return do_proc_douintvec(table, write, buffer, lenp, ppos, do_proc_douintvec_conv, NULL); @@ -769,7 +769,7 @@ int proc_douintvec(struct ctl_table *table, int write, void *buffer, * Taint values can only be increased * This means we can safely use a temporary. */ -static int proc_taint(struct ctl_table *table, int write, +static int proc_taint(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table t; @@ -864,8 +864,8 @@ static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long *lvalp, * * Returns 0 on success or -EINVAL on write when the range check fails. */ -int proc_dointvec_minmax(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +int proc_dointvec_minmax(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct do_proc_dointvec_minmax_conv_param param = { .min = (int *) table->extra1, @@ -933,7 +933,7 @@ static int do_proc_douintvec_minmax_conv(unsigned long *lvalp, * * Returns 0 on success or -ERANGE on write when the range check fails. */ -int proc_douintvec_minmax(struct ctl_table *table, int write, +int proc_douintvec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct do_proc_douintvec_minmax_conv_param param = { @@ -961,7 +961,7 @@ int proc_douintvec_minmax(struct ctl_table *table, int write, * * Returns 0 on success or an error on write when the range check fails. */ -int proc_dou8vec_minmax(struct ctl_table *table, int write, +int proc_dou8vec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table tmp; @@ -1004,7 +1004,7 @@ int proc_dou8vec_minmax(struct ctl_table *table, int write, EXPORT_SYMBOL_GPL(proc_dou8vec_minmax); #ifdef CONFIG_MAGIC_SYSRQ -static int sysrq_sysctl_handler(struct ctl_table *table, int write, +static int sysrq_sysctl_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int tmp, ret; @@ -1121,7 +1121,7 @@ static int do_proc_doulongvec_minmax(const struct ctl_table *table, int write, * * Returns 0 on success. */ -int proc_doulongvec_minmax(struct ctl_table *table, int write, +int proc_doulongvec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l); @@ -1144,7 +1144,8 @@ int proc_doulongvec_minmax(struct ctl_table *table, int write, * * Returns 0 on success. */ -int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, +int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { return do_proc_doulongvec_minmax(table, write, buffer, @@ -1265,15 +1266,15 @@ static int do_proc_dointvec_ms_jiffies_minmax_conv(bool *negp, unsigned long *lv * * Returns 0 on success. */ -int proc_dointvec_jiffies(struct ctl_table *table, int write, +int proc_dointvec_jiffies(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return do_proc_dointvec(table,write,buffer,lenp,ppos, do_proc_dointvec_jiffies_conv,NULL); } -int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct do_proc_dointvec_minmax_conv_param param = { .min = (int *) table->extra1, @@ -1298,7 +1299,7 @@ int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write, * * Returns 0 on success. */ -int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, +int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return do_proc_dointvec(table, write, buffer, lenp, ppos, @@ -1321,15 +1322,17 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, * * Returns 0 on success. */ -int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { return do_proc_dointvec(table, write, buffer, lenp, ppos, do_proc_dointvec_ms_jiffies_conv, NULL); } -static int proc_do_cad_pid(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +static int proc_do_cad_pid(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { struct pid *new_pid; pid_t tmp; @@ -1367,7 +1370,7 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, void *buffer, * * Returns 0 on success. */ -int proc_do_large_bitmap(struct ctl_table *table, int write, +int proc_do_large_bitmap(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int err = 0; @@ -1499,85 +1502,86 @@ int proc_do_large_bitmap(struct ctl_table *table, int write, #else /* CONFIG_PROC_SYSCTL */ -int proc_dostring(struct ctl_table *table, int write, +int proc_dostring(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_dobool(struct ctl_table *table, int write, +int proc_dobool(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_dointvec(struct ctl_table *table, int write, +int proc_dointvec(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_douintvec(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +int proc_douintvec(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_dointvec_minmax(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +int proc_dointvec_minmax(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_douintvec_minmax(struct ctl_table *table, int write, +int proc_douintvec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_dou8vec_minmax(struct ctl_table *table, int write, +int proc_dou8vec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_dointvec_jiffies(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +int proc_dointvec_jiffies(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_dointvec_ms_jiffies_minmax(struct ctl_table *table, int write, +int proc_dointvec_ms_jiffies_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +int proc_dointvec_userhz_jiffies(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, +int proc_dointvec_ms_jiffies(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_doulongvec_minmax(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +int proc_doulongvec_minmax(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, +int proc_doulongvec_ms_jiffies_minmax(const struct ctl_table *table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; } -int proc_do_large_bitmap(struct ctl_table *table, int write, +int proc_do_large_bitmap(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; @@ -1586,7 +1590,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int write, #endif /* CONFIG_PROC_SYSCTL */ #if defined(CONFIG_SYSCTL) -int proc_do_static_key(struct ctl_table *table, int write, +int proc_do_static_key(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct static_key *key = (struct static_key *)table->data; diff --git a/kernel/time/timer.c b/kernel/time/timer.c index ff49ddcc9800..57bece67ad0e 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -289,8 +289,8 @@ static void timers_update_migration(void) } #ifdef CONFIG_SYSCTL -static int timer_migration_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int timer_migration_handler(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { int ret; diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 83ba342aef31..d3f77aff71c3 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -8217,7 +8217,7 @@ static bool is_permanent_ops_registered(void) } static int -ftrace_enable_sysctl(struct ctl_table *table, int write, +ftrace_enable_sysctl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret = -ENODEV; diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index b12f8384a36a..2ae437ca5b73 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2730,7 +2730,7 @@ static void output_printk(struct trace_event_buffer *fbuffer) raw_spin_unlock_irqrestore(&tracepoint_iter_lock, flags); } -int tracepoint_printk_sysctl(struct ctl_table *table, int write, +int tracepoint_printk_sysctl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c index 70d428c394b6..00547aad3972 100644 --- a/kernel/trace/trace_events_user.c +++ b/kernel/trace/trace_events_user.c @@ -2811,7 +2811,8 @@ static int create_user_tracefs(void) return -ENODEV; } -static int set_max_user_events_sysctl(struct ctl_table *table, int write, +static int set_max_user_events_sysctl(const struct ctl_table *table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index 5a48dba912ea..7f9572a37333 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -514,7 +514,7 @@ static const struct file_operations stack_trace_filter_fops = { #endif /* CONFIG_DYNAMIC_FTRACE */ int -stack_trace_sysctl(struct ctl_table *table, int write, void *buffer, +stack_trace_sysctl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int was_enabled; diff --git a/kernel/umh.c b/kernel/umh.c index 1b13c5d34624..43bc45be8997 100644 --- a/kernel/umh.c +++ b/kernel/umh.c @@ -495,8 +495,8 @@ int call_usermodehelper(const char *path, char **argv, char **envp, int wait) EXPORT_SYMBOL(call_usermodehelper); #if defined(CONFIG_SYSCTL) -static int proc_cap_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_cap_handler(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table t; unsigned long cap_array[2]; diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c index 46590d4addc8..653727aae63b 100644 --- a/kernel/utsname_sysctl.c +++ b/kernel/utsname_sysctl.c @@ -30,8 +30,8 @@ static void *get_uts(const struct ctl_table *table) * Special case of dostring for the UTS structure. This has locks * to observe. Should this be in kernel/sys.c ???? */ -static int proc_do_uts_string(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_do_uts_string(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table uts_table; int r; diff --git a/kernel/watchdog.c b/kernel/watchdog.c index d7b2125503af..e9d0b854b587 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -769,8 +769,9 @@ static void proc_watchdog_update(void) * -------------------|----------------------------------|------------------------------- * proc_soft_watchdog | watchdog_softlockup_user_enabled | WATCHDOG_SOFTOCKUP_ENABLED */ -static int proc_watchdog_common(int which, struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_watchdog_common(int which, const struct ctl_table *table, + int write, void *buffer, size_t *lenp, + loff_t *ppos) { int err, old, *param = table->data; @@ -796,7 +797,7 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write, /* * /proc/sys/kernel/watchdog */ -static int proc_watchdog(struct ctl_table *table, int write, +static int proc_watchdog(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return proc_watchdog_common(WATCHDOG_HARDLOCKUP_ENABLED | @@ -807,7 +808,7 @@ static int proc_watchdog(struct ctl_table *table, int write, /* * /proc/sys/kernel/nmi_watchdog */ -static int proc_nmi_watchdog(struct ctl_table *table, int write, +static int proc_nmi_watchdog(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { if (!watchdog_hardlockup_available && write) @@ -820,7 +821,7 @@ static int proc_nmi_watchdog(struct ctl_table *table, int write, /* * /proc/sys/kernel/soft_watchdog */ -static int proc_soft_watchdog(struct ctl_table *table, int write, +static int proc_soft_watchdog(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { return proc_watchdog_common(WATCHDOG_SOFTOCKUP_ENABLED, @@ -831,7 +832,7 @@ static int proc_soft_watchdog(struct ctl_table *table, int write, /* * /proc/sys/kernel/watchdog_thresh */ -static int proc_watchdog_thresh(struct ctl_table *table, int write, +static int proc_watchdog_thresh(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int err, old; @@ -854,7 +855,7 @@ static int proc_watchdog_thresh(struct ctl_table *table, int write, * user to specify a mask that will include cpus that have not yet * been brought online, if desired. */ -static int proc_watchdog_cpumask(struct ctl_table *table, int write, +static int proc_watchdog_cpumask(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int err; diff --git a/mm/compaction.c b/mm/compaction.c index 807b58e6eb68..6b8db0442365 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -2950,8 +2950,11 @@ static int compact_nodes(void) return 0; } -static int compaction_proactiveness_sysctl_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int compaction_proactiveness_sysctl_handler(const struct ctl_table *table, + int write, + void *buffer, + size_t *length, + loff_t *ppos) { int rc, nid; @@ -2980,8 +2983,9 @@ static int compaction_proactiveness_sysctl_handler(struct ctl_table *table, int * This is the entry point for compacting all nodes via * /proc/sys/vm/compact_memory */ -static int sysctl_compaction_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int sysctl_compaction_handler(const struct ctl_table *table, int write, + void *buffer, size_t *length, + loff_t *ppos) { int ret; @@ -3291,8 +3295,9 @@ static int kcompactd_cpu_online(unsigned int cpu) return 0; } -static int proc_dointvec_minmax_warn_RT_change(struct ctl_table *table, - int write, void *buffer, size_t *lenp, loff_t *ppos) +static int proc_dointvec_minmax_warn_RT_change(const struct ctl_table *table, + int write, void *buffer, + size_t *lenp, loff_t *ppos) { int ret, old; diff --git a/mm/hugetlb.c b/mm/hugetlb.c index b0d89ab98eaa..8b4c87820a38 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4968,8 +4968,8 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy, return ret; } -static int hugetlb_sysctl_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int hugetlb_sysctl_handler(const struct ctl_table *table, int write, + void *buffer, size_t *length, loff_t *ppos) { return hugetlb_sysctl_handler_common(false, table, write, @@ -4977,16 +4977,20 @@ static int hugetlb_sysctl_handler(struct ctl_table *table, int write, } #ifdef CONFIG_NUMA -static int hugetlb_mempolicy_sysctl_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int hugetlb_mempolicy_sysctl_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *length, + loff_t *ppos) { return hugetlb_sysctl_handler_common(true, table, write, buffer, length, ppos); } #endif /* CONFIG_NUMA */ -static int hugetlb_overcommit_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int hugetlb_overcommit_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *length, + loff_t *ppos) { struct hstate *h = &default_hstate; unsigned long tmp; diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 3e19b87049db..e23c1e353e81 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -493,8 +493,10 @@ bool node_dirty_ok(struct pglist_data *pgdat) } #ifdef CONFIG_SYSCTL -static int dirty_background_ratio_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int dirty_background_ratio_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { int ret; @@ -504,8 +506,10 @@ static int dirty_background_ratio_handler(struct ctl_table *table, int write, return ret; } -static int dirty_background_bytes_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int dirty_background_bytes_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { int ret; @@ -515,8 +519,9 @@ static int dirty_background_bytes_handler(struct ctl_table *table, int write, return ret; } -static int dirty_ratio_handler(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +static int dirty_ratio_handler(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { int old_ratio = vm_dirty_ratio; int ret; @@ -529,8 +534,8 @@ static int dirty_ratio_handler(struct ctl_table *table, int write, void *buffer, return ret; } -static int dirty_bytes_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int dirty_bytes_handler(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { unsigned long old_bytes = vm_dirty_bytes; int ret; @@ -2132,8 +2137,10 @@ bool wb_over_bg_thresh(struct bdi_writeback *wb) /* * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs */ -static int dirty_writeback_centisecs_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int dirty_writeback_centisecs_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *length, + loff_t *ppos) { unsigned int old_interval = dirty_writeback_interval; int ret; diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 14d39f34d336..ec9171e89f58 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5002,8 +5002,10 @@ static char numa_zonelist_order[] = "Node"; /* * sysctl handler for numa_zonelist_order */ -static int numa_zonelist_order_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int numa_zonelist_order_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *length, + loff_t *ppos) { if (write) return __parse_numa_zonelist_order(buffer); @@ -5992,8 +5994,10 @@ postcore_initcall(init_per_zone_wmark_min) * that we can call two helper functions whenever min_free_kbytes * changes. */ -static int min_free_kbytes_sysctl_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int min_free_kbytes_sysctl_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *length, + loff_t *ppos) { int rc; @@ -6008,8 +6012,10 @@ static int min_free_kbytes_sysctl_handler(struct ctl_table *table, int write, return 0; } -static int watermark_scale_factor_sysctl_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int watermark_scale_factor_sysctl_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *length, + loff_t *ppos) { int rc; @@ -6038,8 +6044,11 @@ static void setup_min_unmapped_ratio(void) } -static int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int sysctl_min_unmapped_ratio_sysctl_handler(const struct ctl_table *table, + int write, + void *buffer, + size_t *length, + loff_t *ppos) { int rc; @@ -6065,8 +6074,10 @@ static void setup_min_slab_ratio(void) sysctl_min_slab_ratio) / 100; } -static int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +static int sysctl_min_slab_ratio_sysctl_handler(const struct ctl_table *table, + int write, + void *buffer, size_t *length, + loff_t *ppos) { int rc; @@ -6089,8 +6100,9 @@ static int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *table, int wri * minimum watermarks. The lowmem reserve ratio can only make sense * if in function of the boot time zone sizes. */ -static int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *table, - int write, void *buffer, size_t *length, loff_t *ppos) +static int lowmem_reserve_ratio_sysctl_handler(const struct ctl_table *table, + int write, void *buffer, + size_t *length, loff_t *ppos) { int i; @@ -6110,8 +6122,11 @@ static int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *table, * cpu. It is the fraction of total pages in each zone that a hot per cpu * pagelist can have before it gets flushed back to buddy allocator. */ -static int percpu_pagelist_high_fraction_sysctl_handler(struct ctl_table *table, - int write, void *buffer, size_t *length, loff_t *ppos) +static int percpu_pagelist_high_fraction_sysctl_handler(const struct ctl_table *table, + int write, + void *buffer, + size_t *length, + loff_t *ppos) { struct zone *zone; int old_percpu_pagelist_high_fraction; diff --git a/mm/util.c b/mm/util.c index 669397235787..c975b805679d 100644 --- a/mm/util.c +++ b/mm/util.c @@ -835,8 +835,9 @@ int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT; unsigned long sysctl_user_reserve_kbytes __read_mostly = 1UL << 17; /* 128MB */ unsigned long sysctl_admin_reserve_kbytes __read_mostly = 1UL << 13; /* 8MB */ -int overcommit_ratio_handler(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +int overcommit_ratio_handler(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { int ret; @@ -851,8 +852,9 @@ static void sync_overcommit_as(struct work_struct *dummy) percpu_counter_sync(&vm_committed_as); } -int overcommit_policy_handler(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +int overcommit_policy_handler(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { struct ctl_table t; int new_policy = -1; @@ -887,8 +889,9 @@ int overcommit_policy_handler(struct ctl_table *table, int write, void *buffer, return ret; } -int overcommit_kbytes_handler(struct ctl_table *table, int write, void *buffer, - size_t *lenp, loff_t *ppos) +int overcommit_kbytes_handler(const struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { int ret; diff --git a/mm/vmstat.c b/mm/vmstat.c index db79935e4a54..8e6d32af43fe 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -74,8 +74,8 @@ static void invalid_numa_statistics(void) static DEFINE_MUTEX(vm_numa_stat_lock); -int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write, - void *buffer, size_t *length, loff_t *ppos) +int sysctl_vm_numa_stat_handler(const struct ctl_table *table, int write, + void *buffer, size_t *length, loff_t *ppos) { int ret, oldval; @@ -1884,7 +1884,7 @@ static void refresh_vm_stats(struct work_struct *work) refresh_cpu_vm_stats(true); } -int vmstat_refresh(struct ctl_table *table, int write, +int vmstat_refresh(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { long val; diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c index 35e10c5a766d..86c24072544e 100644 --- a/net/bridge/br_netfilter_hooks.c +++ b/net/bridge/br_netfilter_hooks.c @@ -1170,7 +1170,7 @@ int br_nf_hook_thresh(unsigned int hook, struct net *net, #ifdef CONFIG_SYSCTL static -int brnf_sysctl_call_tables(struct ctl_table *ctl, int write, +int brnf_sysctl_call_tables(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 1fb71107accf..fd0b9a4136a6 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -3538,7 +3538,7 @@ EXPORT_SYMBOL(neigh_app_ns); #ifdef CONFIG_SYSCTL static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN); -static int proc_unres_qlen(struct ctl_table *ctl, int write, +static int proc_unres_qlen(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int size, ret; @@ -3590,7 +3590,8 @@ static void neigh_proc_update(const struct ctl_table *ctl, int write) neigh_copy_dflt_parms(net, p, index); } -static int neigh_proc_dointvec_zero_intmax(struct ctl_table *ctl, int write, +static int neigh_proc_dointvec_zero_intmax(const struct ctl_table *ctl, + int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -3605,7 +3606,8 @@ static int neigh_proc_dointvec_zero_intmax(struct ctl_table *ctl, int write, return ret; } -static int neigh_proc_dointvec_ms_jiffies_positive(struct ctl_table *ctl, int write, +static int neigh_proc_dointvec_ms_jiffies_positive(const struct ctl_table *ctl, + int write, void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table tmp = *ctl; @@ -3621,7 +3623,7 @@ static int neigh_proc_dointvec_ms_jiffies_positive(struct ctl_table *ctl, int wr return ret; } -int neigh_proc_dointvec(struct ctl_table *ctl, int write, void *buffer, +int neigh_proc_dointvec(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); @@ -3631,7 +3633,8 @@ int neigh_proc_dointvec(struct ctl_table *ctl, int write, void *buffer, } EXPORT_SYMBOL(neigh_proc_dointvec); -int neigh_proc_dointvec_jiffies(struct ctl_table *ctl, int write, void *buffer, +int neigh_proc_dointvec_jiffies(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) { int ret = proc_dointvec_jiffies(ctl, write, buffer, lenp, ppos); @@ -3641,7 +3644,8 @@ int neigh_proc_dointvec_jiffies(struct ctl_table *ctl, int write, void *buffer, } EXPORT_SYMBOL(neigh_proc_dointvec_jiffies); -static int neigh_proc_dointvec_userhz_jiffies(struct ctl_table *ctl, int write, +static int neigh_proc_dointvec_userhz_jiffies(const struct ctl_table *ctl, + int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -3651,7 +3655,7 @@ static int neigh_proc_dointvec_userhz_jiffies(struct ctl_table *ctl, int write, return ret; } -int neigh_proc_dointvec_ms_jiffies(struct ctl_table *ctl, int write, +int neigh_proc_dointvec_ms_jiffies(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret = proc_dointvec_ms_jiffies(ctl, write, buffer, lenp, ppos); @@ -3661,7 +3665,8 @@ int neigh_proc_dointvec_ms_jiffies(struct ctl_table *ctl, int write, } EXPORT_SYMBOL(neigh_proc_dointvec_ms_jiffies); -static int neigh_proc_dointvec_unres_qlen(struct ctl_table *ctl, int write, +static int neigh_proc_dointvec_unres_qlen(const struct ctl_table *ctl, + int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -3671,7 +3676,8 @@ static int neigh_proc_dointvec_unres_qlen(struct ctl_table *ctl, int write, return ret; } -static int neigh_proc_base_reachable_time(struct ctl_table *ctl, int write, +static int neigh_proc_base_reachable_time(const struct ctl_table *ctl, + int write, void *buffer, size_t *lenp, loff_t *ppos) { diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 6973dda3abda..6bb2e573ede4 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -94,7 +94,7 @@ static struct cpumask *rps_default_mask_cow_alloc(struct net *net) return rps_default_mask; } -static int rps_default_mask_sysctl(struct ctl_table *table, int write, +static int rps_default_mask_sysctl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = (struct net *)table->data; @@ -125,7 +125,7 @@ static int rps_default_mask_sysctl(struct ctl_table *table, int write, return err; } -static int rps_sock_flow_sysctl(struct ctl_table *table, int write, +static int rps_sock_flow_sysctl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { unsigned int orig_size, size; @@ -197,7 +197,7 @@ static int rps_sock_flow_sysctl(struct ctl_table *table, int write, #ifdef CONFIG_NET_FLOW_LIMIT static DEFINE_MUTEX(flow_limit_update_mutex); -static int flow_limit_cpu_sysctl(struct ctl_table *table, int write, +static int flow_limit_cpu_sysctl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct sd_flow_limit *cur; @@ -254,7 +254,8 @@ static int flow_limit_cpu_sysctl(struct ctl_table *table, int write, return ret; } -static int flow_limit_table_len_sysctl(struct ctl_table *table, int write, +static int flow_limit_table_len_sysctl(const struct ctl_table *table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { unsigned int old, *ptr; @@ -276,7 +277,7 @@ static int flow_limit_table_len_sysctl(struct ctl_table *table, int write, #endif /* CONFIG_NET_FLOW_LIMIT */ #ifdef CONFIG_NET_SCHED -static int set_default_qdisc(struct ctl_table *table, int write, +static int set_default_qdisc(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { char id[IFNAMSIZ]; @@ -295,8 +296,8 @@ static int set_default_qdisc(struct ctl_table *table, int write, } #endif -static int proc_do_dev_weight(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int proc_do_dev_weight(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { static DEFINE_MUTEX(dev_weight_mutex); int ret, weight; @@ -313,7 +314,7 @@ static int proc_do_dev_weight(struct ctl_table *table, int write, return ret; } -static int proc_do_rss_key(struct ctl_table *table, int write, +static int proc_do_rss_key(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table fake_table; @@ -326,7 +327,8 @@ static int proc_do_rss_key(struct ctl_table *table, int write, } #ifdef CONFIG_BPF_JIT -static int proc_dointvec_minmax_bpf_enable(struct ctl_table *table, int write, +static int proc_dointvec_minmax_bpf_enable(const struct ctl_table *table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -359,7 +361,7 @@ static int proc_dointvec_minmax_bpf_enable(struct ctl_table *table, int write, # ifdef CONFIG_HAVE_EBPF_JIT static int -proc_dointvec_minmax_bpf_restricted(struct ctl_table *table, int write, +proc_dointvec_minmax_bpf_restricted(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { if (!capable(CAP_SYS_ADMIN)) @@ -370,7 +372,7 @@ proc_dointvec_minmax_bpf_restricted(struct ctl_table *table, int write, # endif /* CONFIG_HAVE_EBPF_JIT */ static int -proc_dolongvec_minmax_bpf_restricted(struct ctl_table *table, int write, +proc_dolongvec_minmax_bpf_restricted(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { if (!capable(CAP_SYS_ADMIN)) diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 7a437f0d4190..b19b18211767 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -2377,7 +2377,7 @@ static int devinet_conf_ifindex(struct net *net, struct ipv4_devconf *cnf) } } -static int devinet_conf_proc(struct ctl_table *ctl, int write, +static int devinet_conf_proc(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int old_value = *(int *)ctl->data; @@ -2429,7 +2429,7 @@ static int devinet_conf_proc(struct ctl_table *ctl, int write, return ret; } -static int devinet_sysctl_forward(struct ctl_table *ctl, int write, +static int devinet_sysctl_forward(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int *valp = ctl->data; @@ -2476,7 +2476,7 @@ static int devinet_sysctl_forward(struct ctl_table *ctl, int write, return ret; } -static int ipv4_doint_and_flush(struct ctl_table *ctl, int write, +static int ipv4_doint_and_flush(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int *valp = ctl->data; diff --git a/net/ipv4/route.c b/net/ipv4/route.c index c8f76f56dc16..4eea59e06671 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -3408,8 +3408,8 @@ static int ip_rt_gc_min_interval __read_mostly = HZ / 2; static int ip_rt_gc_elasticity __read_mostly = 8; static int ip_min_valid_pmtu __read_mostly = IPV4_MIN_MTU; -static int ipv4_sysctl_rtcache_flush(struct ctl_table *__ctl, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int ipv4_sysctl_rtcache_flush(const struct ctl_table *__ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = (struct net *)__ctl->extra1; diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 363dc2a487ac..383270a2d227 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -62,7 +62,7 @@ static void set_local_port_range(struct net *net, unsigned int low, unsigned int } /* Validate changes from /proc interface. */ -static int ipv4_local_port_range(struct ctl_table *table, int write, +static int ipv4_local_port_range(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = table->data; @@ -96,8 +96,8 @@ static int ipv4_local_port_range(struct ctl_table *table, int write, } /* Validate changes from /proc interface. */ -static int ipv4_privileged_ports(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int ipv4_privileged_ports(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = container_of(table->data, struct net, ipv4.sysctl_ip_prot_sock); @@ -159,7 +159,7 @@ static void set_ping_group_range(const struct ctl_table *table, } /* Validate changes from /proc interface. */ -static int ipv4_ping_group_range(struct ctl_table *table, int write, +static int ipv4_ping_group_range(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct user_namespace *user_ns = current_user_ns(); @@ -194,7 +194,7 @@ static int ipv4_ping_group_range(struct ctl_table *table, int write, return ret; } -static int ipv4_fwd_update_priority(struct ctl_table *table, int write, +static int ipv4_fwd_update_priority(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net; @@ -210,7 +210,7 @@ static int ipv4_fwd_update_priority(struct ctl_table *table, int write, return ret; } -static int proc_tcp_congestion_control(struct ctl_table *ctl, int write, +static int proc_tcp_congestion_control(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = container_of(ctl->data, struct net, @@ -230,7 +230,7 @@ static int proc_tcp_congestion_control(struct ctl_table *ctl, int write, return ret; } -static int proc_tcp_available_congestion_control(struct ctl_table *ctl, +static int proc_tcp_available_congestion_control(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -246,7 +246,7 @@ static int proc_tcp_available_congestion_control(struct ctl_table *ctl, return ret; } -static int proc_allowed_congestion_control(struct ctl_table *ctl, +static int proc_allowed_congestion_control(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -283,7 +283,7 @@ static int sscanf_key(char *buf, __le32 *key) return ret; } -static int proc_tcp_fastopen_key(struct ctl_table *table, int write, +static int proc_tcp_fastopen_key(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = container_of(table->data, struct net, @@ -354,7 +354,7 @@ static int proc_tcp_fastopen_key(struct ctl_table *table, int write, return ret; } -static int proc_tfo_blackhole_detect_timeout(struct ctl_table *table, +static int proc_tfo_blackhole_detect_timeout(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -369,8 +369,8 @@ static int proc_tfo_blackhole_detect_timeout(struct ctl_table *table, return ret; } -static int proc_tcp_available_ulp(struct ctl_table *ctl, - int write, void *buffer, size_t *lenp, +static int proc_tcp_available_ulp(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table tbl = { .maxlen = TCP_ULP_BUF_MAX, }; @@ -386,7 +386,7 @@ static int proc_tcp_available_ulp(struct ctl_table *ctl, return ret; } -static int proc_tcp_ehash_entries(struct ctl_table *table, int write, +static int proc_tcp_ehash_entries(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = container_of(table->data, struct net, @@ -410,7 +410,7 @@ static int proc_tcp_ehash_entries(struct ctl_table *table, int write, return proc_dointvec(&tbl, write, buffer, lenp, ppos); } -static int proc_udp_hash_entries(struct ctl_table *table, int write, +static int proc_udp_hash_entries(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = container_of(table->data, struct net, @@ -434,7 +434,8 @@ static int proc_udp_hash_entries(struct ctl_table *table, int write, } #ifdef CONFIG_IP_ROUTE_MULTIPATH -static int proc_fib_multipath_hash_policy(struct ctl_table *table, int write, +static int proc_fib_multipath_hash_policy(const struct ctl_table *table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -449,7 +450,8 @@ static int proc_fib_multipath_hash_policy(struct ctl_table *table, int write, return ret; } -static int proc_fib_multipath_hash_fields(struct ctl_table *table, int write, +static int proc_fib_multipath_hash_fields(const struct ctl_table *table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index c72f3b63e41d..8e9e655ed690 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -6305,8 +6305,8 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) #ifdef CONFIG_SYSCTL -static int addrconf_sysctl_forward(struct ctl_table *ctl, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int addrconf_sysctl_forward(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) { int *valp = ctl->data; int val = *valp; @@ -6330,8 +6330,8 @@ static int addrconf_sysctl_forward(struct ctl_table *ctl, int write, return ret; } -static int addrconf_sysctl_mtu(struct ctl_table *ctl, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int addrconf_sysctl_mtu(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct inet6_dev *idev = ctl->extra1; int min_mtu = IPV6_MIN_MTU; @@ -6401,8 +6401,8 @@ static int addrconf_disable_ipv6(const struct ctl_table *table, int *p, int newf return 0; } -static int addrconf_sysctl_disable(struct ctl_table *ctl, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int addrconf_sysctl_disable(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) { int *valp = ctl->data; int val = *valp; @@ -6426,8 +6426,8 @@ static int addrconf_sysctl_disable(struct ctl_table *ctl, int write, return ret; } -static int addrconf_sysctl_proxy_ndp(struct ctl_table *ctl, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int addrconf_sysctl_proxy_ndp(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) { int *valp = ctl->data; int ret; @@ -6467,7 +6467,8 @@ static int addrconf_sysctl_proxy_ndp(struct ctl_table *ctl, int write, return ret; } -static int addrconf_sysctl_addr_gen_mode(struct ctl_table *ctl, int write, +static int addrconf_sysctl_addr_gen_mode(const struct ctl_table *ctl, + int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -6530,7 +6531,8 @@ static int addrconf_sysctl_addr_gen_mode(struct ctl_table *ctl, int write, return ret; } -static int addrconf_sysctl_stable_secret(struct ctl_table *ctl, int write, +static int addrconf_sysctl_stable_secret(const struct ctl_table *ctl, + int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -6598,7 +6600,7 @@ static int addrconf_sysctl_stable_secret(struct ctl_table *ctl, int write, } static -int addrconf_sysctl_ignore_routes_with_linkdown(struct ctl_table *ctl, +int addrconf_sysctl_ignore_routes_with_linkdown(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) @@ -6698,8 +6700,10 @@ int addrconf_disable_policy(const struct ctl_table *ctl, int *valp, int val) return 0; } -static int addrconf_sysctl_disable_policy(struct ctl_table *ctl, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int addrconf_sysctl_disable_policy(const struct ctl_table *ctl, + int write, + void *buffer, size_t *lenp, + loff_t *ppos) { int *valp = ctl->data; int val = *valp; diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 945d5f5ca039..2c95a5c8bfa1 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1951,8 +1951,9 @@ static void ndisc_warn_deprecated_sysctl(const struct ctl_table *ctl, } } -int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void *buffer, - size_t *lenp, loff_t *ppos) +int ndisc_ifinfo_sysctl_change(const struct ctl_table *ctl, int write, + void *buffer, + size_t *lenp, loff_t *ppos) { struct net_device *dev = ctl->extra1; struct inet6_dev *idev; diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 1f4b935a0e57..b434636cca1c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -6329,8 +6329,8 @@ static int rt6_stats_seq_show(struct seq_file *seq, void *v) #ifdef CONFIG_SYSCTL -static int ipv6_sysctl_rtcache_flush(struct ctl_table *ctl, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int ipv6_sysctl_rtcache_flush(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct net *net; int delay; diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 888676163e90..2d19c119853f 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c @@ -30,7 +30,8 @@ static u32 rt6_multipath_hash_fields_all_mask = static u32 ioam6_id_max = IOAM6_DEFAULT_ID; static u64 ioam6_id_wide_max = IOAM6_DEFAULT_ID_WIDE; -static int proc_rt6_multipath_hash_policy(struct ctl_table *table, int write, +static int proc_rt6_multipath_hash_policy(const struct ctl_table *table, + int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net; @@ -46,7 +47,8 @@ static int proc_rt6_multipath_hash_policy(struct ctl_table *table, int write, } static int -proc_rt6_multipath_hash_fields(struct ctl_table *table, int write, void *buffer, +proc_rt6_multipath_hash_fields(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { struct net *net; diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 6dab883a08dd..7138998e29c8 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1363,7 +1363,7 @@ static int mpls_netconf_dump_devconf(struct sk_buff *skb, #define MPLS_PERDEV_SYSCTL_OFFSET(field) \ (&((struct mpls_dev *)0)->field) -static int mpls_conf_proc(struct ctl_table *ctl, int write, +static int mpls_conf_proc(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { int oval = *(int *)ctl->data; @@ -2617,7 +2617,7 @@ static int resize_platform_label_table(struct net *net, size_t limit) return -ENOMEM; } -static int mpls_platform_labels(struct ctl_table *table, int write, +static int mpls_platform_labels(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = table->data; diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 689ac521ea2d..e34879f7a2f4 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -1846,7 +1846,7 @@ static int ip_vs_zero_all(struct netns_ipvs *ipvs) #ifdef CONFIG_SYSCTL static int -proc_do_defense_mode(struct ctl_table *table, int write, +proc_do_defense_mode(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct netns_ipvs *ipvs = table->extra2; @@ -1873,7 +1873,7 @@ proc_do_defense_mode(struct ctl_table *table, int write, } static int -proc_do_sync_threshold(struct ctl_table *table, int write, +proc_do_sync_threshold(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct netns_ipvs *ipvs = table->extra2; @@ -1901,7 +1901,7 @@ proc_do_sync_threshold(struct ctl_table *table, int write, } static int -proc_do_sync_ports(struct ctl_table *table, int write, +proc_do_sync_ports(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int *valp = table->data; @@ -1984,7 +1984,7 @@ static int ipvs_proc_est_cpumask_get(const struct ctl_table *table, return ret; } -static int ipvs_proc_est_cpulist(struct ctl_table *table, int write, +static int ipvs_proc_est_cpulist(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; @@ -2011,7 +2011,7 @@ static int ipvs_proc_est_cpulist(struct ctl_table *table, int write, return ret; } -static int ipvs_proc_est_nice(struct ctl_table *table, int write, +static int ipvs_proc_est_nice(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct netns_ipvs *ipvs = table->extra2; @@ -2041,7 +2041,7 @@ static int ipvs_proc_est_nice(struct ctl_table *table, int write, return ret; } -static int ipvs_proc_run_estimation(struct ctl_table *table, int write, +static int ipvs_proc_run_estimation(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct netns_ipvs *ipvs = table->extra2; diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 0ee98ce5b816..325b9094dca1 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c @@ -527,7 +527,7 @@ EXPORT_SYMBOL_GPL(nf_conntrack_count); static unsigned int nf_conntrack_htable_size_user __read_mostly; static int -nf_conntrack_hash_sysctl(struct ctl_table *table, int write, +nf_conntrack_hash_sysctl(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; diff --git a/net/netfilter/nf_hooks_lwtunnel.c b/net/netfilter/nf_hooks_lwtunnel.c index 00e89ffd78f6..3d237f9cc8ee 100644 --- a/net/netfilter/nf_hooks_lwtunnel.c +++ b/net/netfilter/nf_hooks_lwtunnel.c @@ -25,7 +25,7 @@ static inline int nf_hooks_lwtunnel_set(int enable) } #ifdef CONFIG_SYSCTL -int nf_hooks_lwtunnel_sysctl_handler(struct ctl_table *table, int write, +int nf_hooks_lwtunnel_sysctl_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int proc_nf_hooks_lwtunnel_enabled = 0; diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index 370f8231385c..7569532dbd43 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c @@ -409,8 +409,8 @@ static struct ctl_table nf_log_sysctl_ftable[] = { { } }; -static int nf_log_proc_dostring(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +static int nf_log_proc_dostring(const struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { const struct nf_logger *logger; char buf[NFLOGGER_NAME_LEN]; diff --git a/net/phonet/sysctl.c b/net/phonet/sysctl.c index 0d0bf41381c2..e59d16e67376 100644 --- a/net/phonet/sysctl.c +++ b/net/phonet/sysctl.c @@ -48,7 +48,7 @@ void phonet_get_local_port_range(int *min, int *max) } while (read_seqretry(&local_port_range_lock, seq)); } -static int proc_local_port_range(struct ctl_table *table, int write, +static int proc_local_port_range(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; diff --git a/net/rds/tcp.c b/net/rds/tcp.c index 2dba7505b414..d23ea8c11902 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c @@ -61,7 +61,7 @@ static atomic_t rds_tcp_unloading = ATOMIC_INIT(0); static struct kmem_cache *rds_tcp_conn_slab; -static int rds_tcp_skbuf_handler(struct ctl_table *ctl, int write, +static int rds_tcp_skbuf_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *fpos); static int rds_tcp_min_sndbuf = SOCK_MIN_SNDBUF; @@ -683,7 +683,7 @@ static void rds_tcp_sysctl_reset(struct net *net) spin_unlock_irq(&rds_tcp_conn_lock); } -static int rds_tcp_skbuf_handler(struct ctl_table *ctl, int write, +static int rds_tcp_skbuf_handler(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *fpos) { struct net *net = current->nsproxy->net_ns; diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c index f65d6f92afcb..0849b4224676 100644 --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c @@ -43,19 +43,21 @@ static unsigned long max_autoclose_max = (MAX_SCHEDULE_TIMEOUT / HZ > UINT_MAX) ? UINT_MAX : MAX_SCHEDULE_TIMEOUT / HZ; -static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write, +static int proc_sctp_do_hmac_alg(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); -static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write, +static int proc_sctp_do_rto_min(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); -static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write, void *buffer, +static int proc_sctp_do_rto_max(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos); -static int proc_sctp_do_udp_port(struct ctl_table *ctl, int write, void *buffer, +static int proc_sctp_do_udp_port(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos); -static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write, +static int proc_sctp_do_alpha_beta(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); -static int proc_sctp_do_auth(struct ctl_table *ctl, int write, +static int proc_sctp_do_auth(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); -static int proc_sctp_do_probe_interval(struct ctl_table *ctl, int write, +static int proc_sctp_do_probe_interval(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); static struct ctl_table sctp_table[] = { @@ -388,7 +390,7 @@ static struct ctl_table sctp_net_table[] = { { /* sentinel */ } }; -static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write, +static int proc_sctp_do_hmac_alg(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = current->nsproxy->net_ns; @@ -433,7 +435,7 @@ static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write, return ret; } -static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write, +static int proc_sctp_do_rto_min(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = current->nsproxy->net_ns; @@ -461,7 +463,7 @@ static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write, return ret; } -static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write, +static int proc_sctp_do_rto_max(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = current->nsproxy->net_ns; @@ -489,7 +491,7 @@ static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write, return ret; } -static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write, +static int proc_sctp_do_alpha_beta(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { if (write) @@ -499,7 +501,7 @@ static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write, return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); } -static int proc_sctp_do_auth(struct ctl_table *ctl, int write, +static int proc_sctp_do_auth(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = current->nsproxy->net_ns; @@ -528,7 +530,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write, return ret; } -static int proc_sctp_do_udp_port(struct ctl_table *ctl, int write, +static int proc_sctp_do_udp_port(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = current->nsproxy->net_ns; @@ -569,7 +571,7 @@ static int proc_sctp_do_udp_port(struct ctl_table *ctl, int write, return ret; } -static int proc_sctp_do_probe_interval(struct ctl_table *ctl, int write, +static int proc_sctp_do_probe_interval(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct net *net = current->nsproxy->net_ns; diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 93941ab12549..e3d6ceaee8fd 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c @@ -40,7 +40,7 @@ EXPORT_SYMBOL_GPL(nlm_debug); #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) -static int proc_do_xprt(struct ctl_table *table, int write, +static int proc_do_xprt(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { char tmpbuf[256]; @@ -62,7 +62,8 @@ static int proc_do_xprt(struct ctl_table *table, int write, } static int -proc_dodebug(struct ctl_table *table, int write, void *buffer, size_t *lenp, +proc_dodebug(const struct ctl_table *table, int write, void *buffer, + size_t *lenp, loff_t *ppos) { char tmpbuf[20], *s = NULL; diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c index f86970733eb0..09832e4945a3 100644 --- a/net/sunrpc/xprtrdma/svc_rdma.c +++ b/net/sunrpc/xprtrdma/svc_rdma.c @@ -74,7 +74,7 @@ enum { SVCRDMA_COUNTER_BUFSIZ = sizeof(unsigned long long), }; -static int svcrdma_counter_handler(struct ctl_table *table, int write, +static int svcrdma_counter_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct percpu_counter *stat = (struct percpu_counter *)table->data; diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 9a3dcaafb5b1..9b8d8d1b748b 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -2029,7 +2029,7 @@ static int __init alloc_buffers(void) } #ifdef CONFIG_SYSCTL -static int apparmor_dointvec(struct ctl_table *table, int write, +static int apparmor_dointvec(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { if (!aa_current_policy_admin_capable(NULL)) diff --git a/security/min_addr.c b/security/min_addr.c index 88c9a6a21f47..0ce267c041ab 100644 --- a/security/min_addr.c +++ b/security/min_addr.c @@ -29,7 +29,7 @@ static void update_mmap_min_addr(void) * sysctl handler which just sets dac_mmap_min_addr = the new value and then * calls update_mmap_min_addr() so non MAP_FIXED hints get rounded properly */ -int mmap_min_addr_handler(struct ctl_table *table, int write, +int mmap_min_addr_handler(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int ret; diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c index 49dc52b454ef..8c11e3f207a8 100644 --- a/security/yama/yama_lsm.c +++ b/security/yama/yama_lsm.c @@ -435,7 +435,7 @@ static struct security_hook_list yama_hooks[] __ro_after_init = { }; #ifdef CONFIG_SYSCTL -static int yama_dointvec_minmax(struct ctl_table *table, int write, +static int yama_dointvec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table table_copy;