From nobody Wed Dec 17 14:02:46 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79227C61D9D for ; Sat, 25 Nov 2023 12:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232088AbjKYMw5 (ORCPT ); Sat, 25 Nov 2023 07:52:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232000AbjKYMwy (ORCPT ); Sat, 25 Nov 2023 07:52:54 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC742D3; Sat, 25 Nov 2023 04:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1700916776; bh=iUFGOwiGkTIEhre+odhGn4/1WdiJ+qVq49adTV3gQHM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fztyoxz+RxX7MwxRfaVFrpt8zAzdiGOJNQQaZ2liuOTEhZJSPtgzPDAwdy8d+nduu 6HIpQDcLALScEvSo3TB44K9Cg07c0e+d5EKM4CrbFZS+z4cX07Vb3ZYhQbCW8bF+IK CuVl6bAJigVYO1bVG73ZQ0PsCKDHyk2/sxUnLMcc= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 25 Nov 2023 13:52:50 +0100 Subject: [PATCH RFC 1/7] sysctl: add helper sysctl_run_handler MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231125-const-sysctl-v1-1-5e881b0e0290@weissschuh.net> References: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> In-Reply-To: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700916776; l=1484; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=iUFGOwiGkTIEhre+odhGn4/1WdiJ+qVq49adTV3gQHM=; b=Cv+9BCerGMTP/2lwcmiBVc/6/kwT01UgiJ38sgxdeBN+8Ofpm5XgsYBpLeAWweL5YsfOi/XO9 t1IRt8PjV7dBp1eb61hCnnM6/2qS3I9vKlVDUuz7KXnyXahSMJE7Xs2 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A future patch will introduce a second handler function. To make the code future-proof add the sysctl_run_handler function that automatically can call the correct handler function. Signed-off-by: Thomas Wei=C3=9Fschuh --- fs/proc/proc_sysctl.c | 2 +- include/linux/sysctl.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 8064ea76f80b..1bb0aa2ff501 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -597,7 +597,7 @@ static ssize_t proc_sys_call_handler(struct kiocb *iocb= , struct iov_iter *iter, goto out_free_buf; =20 /* careful: calling conventions are nasty here */ - error =3D table->proc_handler(table, write, kbuf, &count, &iocb->ki_pos); + error =3D sysctl_run_handler(table, write, kbuf, &count, &iocb->ki_pos); if (error) goto out_free_buf; =20 diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 61b40ea81f4d..604aaaa1fce2 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -298,4 +298,10 @@ static inline bool sysctl_is_alias(char *param) int sysctl_max_threads(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); =20 +static inline int sysctl_run_handler(struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos) +{ + return ctl->proc_handler(ctl, write, buffer, lenp, ppos); +} + #endif /* _LINUX_SYSCTL_H */ --=20 2.43.0 From nobody Wed Dec 17 14:02:46 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E529C636CB for ; Sat, 25 Nov 2023 12:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232113AbjKYMxA (ORCPT ); Sat, 25 Nov 2023 07:53:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231808AbjKYMwy (ORCPT ); Sat, 25 Nov 2023 07:52:54 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 932558F; Sat, 25 Nov 2023 04:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1700916776; bh=TvazAFFGE0otnXYiwQcMdxMBACDm5WWzmf21WwSH3Jk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fC4/kcbE39t3cktG8KvZ2tjeXuGXOswHwzsR9Gbqe2FNKM8mZv2a+fLAb/OkUoGQl Ct/I3PU+OUB6zbRuI69jF5cGRu7dywPWwb2ewjxr+wSLSHc7HJdYyMbfjqrPEGja3h 89Rxn9tr6/tsHgNX0DJeeLmHsqiKHK5+aomenuXY= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 25 Nov 2023 13:52:51 +0100 Subject: [PATCH RFC 2/7] bpf: cgroup: call proc handler through helper MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231125-const-sysctl-v1-2-5e881b0e0290@weissschuh.net> References: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> In-Reply-To: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700916776; l=855; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=TvazAFFGE0otnXYiwQcMdxMBACDm5WWzmf21WwSH3Jk=; b=YdEbKegum1nk5186ZhIPwqPFp/VAJDdMZA4InijjRqP/7NAbrS1Qk9V7T+OhbslhbSi4ispVx jKuxCmX8CtFDorBAPbKAyM+pny1qZQU2W6Xbolh5PbFIiyaTYTPoO6C X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sysctl core will introduce a second handler function. To prepare for this use the provided helper function to call either handler function. Signed-off-by: Thomas Wei=C3=9Fschuh --- kernel/bpf/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c index 491d20038cbe..d537b1c80a36 100644 --- a/kernel/bpf/cgroup.c +++ b/kernel/bpf/cgroup.c @@ -1715,7 +1715,7 @@ int __cgroup_bpf_run_filter_sysctl(struct ctl_table_h= eader *head, =20 ctx.cur_val =3D kmalloc_track_caller(ctx.cur_len, GFP_KERNEL); if (!ctx.cur_val || - table->proc_handler(table, 0, ctx.cur_val, &ctx.cur_len, &pos)) { + sysctl_run_handler(table, 0, ctx.cur_val, &ctx.cur_len, &pos)) { /* Let BPF program decide how to proceed. */ ctx.cur_len =3D 0; } --=20 2.43.0 From nobody Wed Dec 17 14:02:46 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59929C61D9D for ; Sat, 25 Nov 2023 12:53:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232147AbjKYMxF (ORCPT ); Sat, 25 Nov 2023 07:53:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjKYMwy (ORCPT ); Sat, 25 Nov 2023 07:52:54 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 653B4A8; Sat, 25 Nov 2023 04:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1700916776; bh=4wlTsbEMCFaS0m7B2tSCdIXH5LNyqizp0qJ35foW3iw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=tbaCP1xvJLa80eoouC+sGhD61q51AcaibgzUxKmnP1gnl7/RLdCmLBSpoA42bFZQ1 ayR4fz3l/ASEIRRkYQeZ0/ftSegmFX4OyiqB0r5wt7cJDkKo53k3+icB85gv55bsso r0V0CwF6UstVLTarMDkoy64W3fsQOL0ynQwAs140= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 25 Nov 2023 13:52:52 +0100 Subject: [PATCH RFC 3/7] sysctl: add proc_handler_new to struct ctl_table MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231125-const-sysctl-v1-3-5e881b0e0290@weissschuh.net> References: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> In-Reply-To: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700916776; l=4132; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=4wlTsbEMCFaS0m7B2tSCdIXH5LNyqizp0qJ35foW3iw=; b=hmKOWy2O+FpZkCleOXKSegcXrK1adnCfG4RophWHn0w1+xCROYG2y8pEbrPPo4IeISVJ3ueeh pNzPhjY2ohmBKaA3pmDuj+1IkyZztsZMxuZl8jCgD+r1Crfp0mRe4jF X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The existing handler function take the struct ctl_table as a mutable parameter. This prevents the table definitions from being put into .rodata where they would be protected from accidental or malicious modification. As many parts of the kernel define proc_handlers provide a gradual transition mechanism through the introduction of a new field which takes the table as a read-only parameter. Signed-off-by: Thomas Wei=C3=9Fschuh --- fs/proc/proc_sysctl.c | 6 ++++-- include/linux/sysctl.h | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 1bb0aa2ff501..810ecdd3b84c 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -573,7 +573,7 @@ static ssize_t proc_sys_call_handler(struct kiocb *iocb= , struct iov_iter *iter, =20 /* if that can happen at all, it should be -EINVAL, not -EISDIR */ error =3D -EINVAL; - if (!table->proc_handler) + if (!table->proc_handler && !table->proc_handler_new) goto out; =20 /* don't even try if the size is too large */ @@ -655,7 +655,7 @@ static __poll_t proc_sys_poll(struct file *filp, poll_t= able *wait) if (IS_ERR(head)) return EPOLLERR | EPOLLHUP; =20 - if (!table->proc_handler) + if (!table->proc_handler && !table->proc_handler_new) goto out; =20 if (!table->poll) @@ -1333,6 +1333,8 @@ static struct ctl_dir *sysctl_mkdir_p(struct ctl_dir = *dir, const char *path) * * proc_handler - the text handler routine (described below) * + * proc_handler_new - const variant of the text handler routine (described= below) + * * extra1, extra2 - extra pointers usable by the proc handler routines * XXX: we should eventually modify these to use long min / max [0] * [0] https://lkml.kernel.org/87zgpte9o4.fsf@email.froward.int.ebiederm.o= rg diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 604aaaa1fce2..de1a5a714070 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -63,6 +63,8 @@ extern const unsigned long sysctl_long_vals[]; =20 typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); +typedef int proc_handler_new(const struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos); =20 int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *); int proc_dobool(struct ctl_table *table, int write, void *buffer, @@ -107,10 +109,10 @@ int proc_do_static_key(struct ctl_table *table, int w= rite, void *buffer, * struct enable minimal validation of the values being written to be * performed, and the mode field allows minimal authentication. *=20 - * There must be a proc_handler routine for any terminal nodes - * mirrored under /proc/sys (non-terminals are handled by a built-in - * directory handler). Several default handlers are available to - * cover common cases. + * There must be one proc_handler/proc_handler_new routine for any terminal + * nodes mirrored under /proc/sys (non-terminals are handled by a built-in + * directory handler). + * Several default handlers are available to cover common cases. */ =20 /* Support for userspace poll() to watch for changes */ @@ -149,6 +151,7 @@ struct ctl_table { SYSCTL_TABLE_TYPE_PERMANENTLY_EMPTY } type; proc_handler *proc_handler; /* Callback for text formatting */ + proc_handler_new *proc_handler_new; /* Callback for text formatting */ struct ctl_table_poll *poll; void *extra1; void *extra2; @@ -301,6 +304,12 @@ int sysctl_max_threads(struct ctl_table *table, int wr= ite, void *buffer, static inline int sysctl_run_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { + if (ctl->proc_handler_new && ctl->proc_handler) + pr_warn_ratelimited("sysctl table %s has both proc_handler and proc_hand= ler_new, this is a but\n", + ctl->procname); + + if (ctl->proc_handler_new) + return ctl->proc_handler_new(ctl, write, buffer, lenp, ppos); return ctl->proc_handler(ctl, write, buffer, lenp, ppos); } =20 --=20 2.43.0 From nobody Wed Dec 17 14:02:46 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EADEC61D9D for ; Sat, 25 Nov 2023 12:53:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229483AbjKYMxI (ORCPT ); Sat, 25 Nov 2023 07:53:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231838AbjKYMwy (ORCPT ); Sat, 25 Nov 2023 07:52:54 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E186A5; Sat, 25 Nov 2023 04:52:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1700916776; bh=BXpS/WrMvo7OTDWmO9J+PqDzo439myYjgk+dpF5igi8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=CRG3QeD32zcBVzyla/RRsF6DadjHrOG2/e79L8re92+jzT8/IfyAi2DfdoBcCYHur A2k3q/hsqBkuwUecbu+GEGdpdupAbwEVncN+nVgqJugk7OsLZPSTiq0NaWKPTVFFhw WrQ+wDYvJp5KEnU0jRyWQQ4/ErOC0NktBvbHAOxo= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 25 Nov 2023 13:52:53 +0100 Subject: [PATCH RFC 4/7] net: sysctl: add new sysctl table handler to debug message MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231125-const-sysctl-v1-4-5e881b0e0290@weissschuh.net> References: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> In-Reply-To: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700916776; l=931; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=BXpS/WrMvo7OTDWmO9J+PqDzo439myYjgk+dpF5igi8=; b=z+1Fq4ACjRMgDdB2UJc/veEQ9uIu8xVFByIIB2mjo/BjJ4ZvZTeODnNikN1oDZrXJV49ka+Rn RVaoHTiMe4rBwUAOOe95hamAjfJyb+bsIZK7oVnnE++MoxZdg9QI0GG X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sysctl core introduce an alternative handler function. Log it in the debug message, too. Signed-off-by: Thomas Wei=C3=9Fschuh --- net/sysctl_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sysctl_net.c b/net/sysctl_net.c index 051ed5f6fc93..29d871097ddc 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c @@ -132,8 +132,9 @@ static void ensure_safe_net_sysctl(struct net *net, con= st char *path, unsigned long addr; const char *where; =20 - pr_debug(" procname=3D%s mode=3D%o proc_handler=3D%ps data=3D%p\n", - ent->procname, ent->mode, ent->proc_handler, ent->data); + pr_debug(" procname=3D%s mode=3D%o proc_handler=3D%ps/%ps data=3D%p\n", + ent->procname, ent->mode, ent->proc_handler, + ent->proc_handler_new, ent->data); =20 /* If it's not writable inside the netns, then it can't hurt. */ if ((ent->mode & 0222) =3D=3D 0) { --=20 2.43.0 From nobody Wed Dec 17 14:02:46 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9FD2C61D9D for ; Sat, 25 Nov 2023 12:53:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232290AbjKYMxO (ORCPT ); Sat, 25 Nov 2023 07:53:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232056AbjKYMw4 (ORCPT ); Sat, 25 Nov 2023 07:52:56 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7924F1; Sat, 25 Nov 2023 04:53:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1700916777; bh=/WDUZvLgmtwowWFhyebf3z+zbs9nn84yIhkNiH/7ee8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LCxbmOZa+J2IB5NpBPuk5h9rpgszGW9op4qjV0ZOMtxAwe4EaNPUqbNDvKm+7xhvw 5QlZCNb5JZa/TCg/R/LWpYbwDAJrQkepoqYK3PVfnwvCVcEX4V7BXkTjdmVkN0IZkq OaZsJdN9+8pPvJRmHplvCujK2uCdHaZQQGSNNcDg= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 25 Nov 2023 13:52:54 +0100 Subject: [PATCH RFC 5/7] treewide: sysctl: migrate proc_dostring to proc_handler_new MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231125-const-sysctl-v1-5-5e881b0e0290@weissschuh.net> References: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> In-Reply-To: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700916776; l=7147; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=/WDUZvLgmtwowWFhyebf3z+zbs9nn84yIhkNiH/7ee8=; b=DmSJ+xNUOj11T8ibIOsvVWhy3jQCb+NdW2g1Rvh/7e+65Qg2kihR0SY+RUCAOyp0HeM7V9RoB jd6+ffiORq7CD9TSDFe5ON88TwAGgiqLyss1ay+y+LnTcBA5P54R+pD X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org proc_handler_new() prevents the handler function from modifying the ctl_table which then can be put into .rodata. Signed-off-by: Thomas Wei=C3=9Fschuh --- crypto/fips.c | 4 ++-- fs/coredump.c | 2 +- fs/ocfs2/stackglue.c | 2 +- fs/proc/proc_sysctl.c | 2 +- include/linux/sysctl.h | 2 +- kernel/reboot.c | 2 +- kernel/seccomp.c | 2 +- kernel/sysctl.c | 14 +++++++------- lib/test_sysctl.c | 2 +- net/mptcp/ctrl.c | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/crypto/fips.c b/crypto/fips.c index 92fd506abb21..d492f23bf53b 100644 --- a/crypto/fips.c +++ b/crypto/fips.c @@ -54,14 +54,14 @@ static struct ctl_table crypto_sysctl_table[] =3D { .data =3D &fips_name, .maxlen =3D 64, .mode =3D 0444, - .proc_handler =3D proc_dostring + .proc_handler_new =3D proc_dostring }, { .procname =3D "fips_version", .data =3D &fips_version, .maxlen =3D 64, .mode =3D 0444, - .proc_handler =3D proc_dostring + .proc_handler_new =3D proc_dostring }, {} }; diff --git a/fs/coredump.c b/fs/coredump.c index 9d235fa14ab9..733cb795f678 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -972,7 +972,7 @@ static struct ctl_table coredump_sysctls[] =3D { .data =3D core_pattern, .maxlen =3D CORENAME_MAX_SIZE, .mode =3D 0644, - .proc_handler =3D proc_dostring_coredump, + .proc_handler_new =3D proc_dostring_coredump, }, { .procname =3D "core_pipe_limit", diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index a8d5ca98fa57..e4eedd1d6b7d 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c @@ -656,7 +656,7 @@ static struct ctl_table ocfs2_nm_table[] =3D { .data =3D ocfs2_hb_ctl_path, .maxlen =3D OCFS2_MAX_HB_CTL_PATH, .mode =3D 0644, - .proc_handler =3D proc_dostring, + .proc_handler_new =3D proc_dostring, }, { } }; diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 810ecdd3b84c..0817d315fa36 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -1132,7 +1132,7 @@ static int sysctl_check_table(const char *path, struc= t ctl_table_header *header) struct ctl_table *entry; int err =3D 0; list_for_each_table_entry(entry, header) { - if ((entry->proc_handler =3D=3D proc_dostring) || + if ((entry->proc_handler_new =3D=3D proc_dostring) || (entry->proc_handler =3D=3D proc_dobool) || (entry->proc_handler =3D=3D proc_dointvec) || (entry->proc_handler =3D=3D proc_douintvec) || diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index de1a5a714070..2699605c5da5 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -66,7 +66,7 @@ typedef int proc_handler(struct ctl_table *ctl, int write= , void *buffer, typedef int proc_handler_new(const struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos); =20 -int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *); +int proc_dostring(const struct ctl_table *, int, void *, size_t *, loff_t = *); int proc_dobool(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 *); diff --git a/kernel/reboot.c b/kernel/reboot.c index 395a0ea3c7a8..69681100d884 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -1267,7 +1267,7 @@ static struct ctl_table kern_reboot_table[] =3D { .data =3D &poweroff_cmd, .maxlen =3D POWEROFF_CMD_PATH_LEN, .mode =3D 0644, - .proc_handler =3D proc_dostring, + .proc_handler_new =3D proc_dostring, }, { .procname =3D "ctrl-alt-del", diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 255999ba9190..29e9663cf220 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -2438,7 +2438,7 @@ static struct ctl_table seccomp_sysctl_table[] =3D { .data =3D (void *) &seccomp_actions_avail, .maxlen =3D sizeof(seccomp_actions_avail), .mode =3D 0444, - .proc_handler =3D proc_dostring, + .proc_handler_new =3D proc_dostring, }, { .procname =3D "actions_logged", diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 157f7ce2942d..7acd1cde0a5c 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; } =20 -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; @@ -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) @@ -1498,7 +1498,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int= write, =20 #else /* CONFIG_PROC_SYSCTL */ =20 -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; @@ -1653,7 +1653,7 @@ static struct ctl_table kern_table[] =3D { .data =3D reboot_command, .maxlen =3D 256, .mode =3D 0644, - .proc_handler =3D proc_dostring, + .proc_handler_new =3D proc_dostring, }, { .procname =3D "stop-a", @@ -1735,7 +1735,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &modprobe_path, .maxlen =3D KMOD_PATH_LEN, .mode =3D 0644, - .proc_handler =3D proc_dostring, + .proc_handler_new =3D proc_dostring, }, { .procname =3D "modules_disabled", @@ -1754,7 +1754,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &uevent_helper, .maxlen =3D UEVENT_HELPER_PATH_LEN, .mode =3D 0644, - .proc_handler =3D proc_dostring, + .proc_handler_new =3D proc_dostring, }, #endif #ifdef CONFIG_MAGIC_SYSRQ diff --git a/lib/test_sysctl.c b/lib/test_sysctl.c index 8036aa91a1cb..de42e3d99912 100644 --- a/lib/test_sysctl.c +++ b/lib/test_sysctl.c @@ -121,7 +121,7 @@ static struct ctl_table test_table[] =3D { .data =3D &test_data.string_0001, .maxlen =3D sizeof(test_data.string_0001), .mode =3D 0644, - .proc_handler =3D proc_dostring, + .proc_handler_new =3D proc_dostring, }, { .procname =3D "bitmap_0001", diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c index 13fe0748dde8..6de3178b81b4 100644 --- a/net/mptcp/ctrl.c +++ b/net/mptcp/ctrl.c @@ -148,7 +148,7 @@ static struct ctl_table mptcp_sysctl_table[] =3D { .procname =3D "scheduler", .maxlen =3D MPTCP_SCHED_NAME_MAX, .mode =3D 0644, - .proc_handler =3D proc_dostring, + .proc_handler_new =3D proc_dostring, }, { .procname =3D "close_timeout", --=20 2.43.0 From nobody Wed Dec 17 14:02:46 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F67FC61DF4 for ; Sat, 25 Nov 2023 12:53:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbjKYMxL (ORCPT ); Sat, 25 Nov 2023 07:53:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232063AbjKYMwz (ORCPT ); Sat, 25 Nov 2023 07:52:55 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3C34EA; Sat, 25 Nov 2023 04:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1700916777; bh=eBhOR2st0kYur9zVJzF7EyOPAu0FRzljdghuY8XBOWo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ruCv9eFB2WE77RMf3vbBpk3bVkniSFw8IzlWE7Fz17sBjZveEjpMX/8aQzd/joQC4 GZXSqv+GOalkDZJhIn4RnxKmGIpU6yxvpQLSJ/+T1d7/sNmHooD6FNhIAtqRE6DJin cl4L4Ub8SOMaXprr1Hvc8BN9KOB6cNfx/dSGUBMM= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 25 Nov 2023 13:52:55 +0100 Subject: [PATCH RFC 6/7] treewide: sysctl: migrate proc_dobool to proc_handler_new MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231125-const-sysctl-v1-6-5e881b0e0290@weissschuh.net> References: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> In-Reply-To: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700916776; l=4649; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=eBhOR2st0kYur9zVJzF7EyOPAu0FRzljdghuY8XBOWo=; b=TFErwepsPpof08h6PaKYFgDvwr7V8L6MNxWawrT6FywU47nmnGgngRZWo7O9VIC6e33pJRYvE Sbzhxjkb1MYBkiG8Yh7Iyu7dSbhzCyWNshcdo390tV38npbE01v1uDT X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org proc_handler_new() prevents the handler function from modifying the ctl_table which then can be put into .rodata. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/riscv/kernel/vector.c | 2 +- drivers/tty/tty_io.c | 2 +- fs/lockd/svc.c | 2 +- fs/proc/proc_sysctl.c | 4 ++-- include/linux/sysctl.h | 2 +- kernel/sysctl.c | 4 ++-- mm/hugetlb_vmemmap.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c index 578b6292487e..d2a37fe88174 100644 --- a/arch/riscv/kernel/vector.c +++ b/arch/riscv/kernel/vector.c @@ -253,7 +253,7 @@ static struct ctl_table riscv_v_default_vstate_table[] = =3D { .data =3D &riscv_v_implicit_uacc, .maxlen =3D sizeof(riscv_v_implicit_uacc), .mode =3D 0644, - .proc_handler =3D proc_dobool, + .proc_handler_new =3D proc_dobool, }, }; =20 diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 06414e43e0b5..a7bcc22fdae9 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3601,7 +3601,7 @@ static struct ctl_table tty_table[] =3D { .data =3D &tty_legacy_tiocsti, .maxlen =3D sizeof(tty_legacy_tiocsti), .mode =3D 0644, - .proc_handler =3D proc_dobool, + .proc_handler_new =3D proc_dobool, }, { .procname =3D "ldisc_autoload", diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 81be07c1d3d1..90ea8cd382d3 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -466,7 +466,7 @@ static struct ctl_table nlm_sysctls[] =3D { .data =3D &nsm_use_hostnames, .maxlen =3D sizeof(bool), .mode =3D 0644, - .proc_handler =3D proc_dobool, + .proc_handler_new =3D proc_dobool, }, { .procname =3D "nsm_local_state", diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 0817d315fa36..742a99540f2b 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -1119,7 +1119,7 @@ static int sysctl_check_table_array(const char *path,= struct ctl_table *table) err |=3D sysctl_err(path, table, "array not allowed"); } =20 - if (table->proc_handler =3D=3D proc_dobool) { + if (table->proc_handler_new =3D=3D proc_dobool) { if (table->maxlen !=3D sizeof(bool)) err |=3D sysctl_err(path, table, "array not allowed"); } @@ -1133,7 +1133,7 @@ static int sysctl_check_table(const char *path, struc= t ctl_table_header *header) int err =3D 0; list_for_each_table_entry(entry, header) { if ((entry->proc_handler_new =3D=3D proc_dostring) || - (entry->proc_handler =3D=3D proc_dobool) || + (entry->proc_handler_new =3D=3D proc_dobool) || (entry->proc_handler =3D=3D proc_dointvec) || (entry->proc_handler =3D=3D proc_douintvec) || (entry->proc_handler =3D=3D proc_douintvec_minmax) || diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 2699605c5da5..2dfaf718a21b 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -67,7 +67,7 @@ typedef int proc_handler_new(const struct ctl_table *ctl,= int write, void *buffer, size_t *lenp, loff_t *ppos); =20 int proc_dostring(const struct ctl_table *, int, void *, size_t *, loff_t = *); -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); int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *); int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *); diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 7acd1cde0a5c..c76668f47bcc 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -702,7 +702,7 @@ int do_proc_douintvec(struct ctl_table *table, int writ= e, * * 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; @@ -1504,7 +1504,7 @@ int proc_dostring(const struct ctl_table *table, int = write, return -ENOSYS; } =20 -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; diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c index 87818ee7f01d..e61e9fbfd639 100644 --- a/mm/hugetlb_vmemmap.c +++ b/mm/hugetlb_vmemmap.c @@ -779,7 +779,7 @@ static struct ctl_table hugetlb_vmemmap_sysctls[] =3D { .data =3D &vmemmap_optimize_enabled, .maxlen =3D sizeof(vmemmap_optimize_enabled), .mode =3D 0644, - .proc_handler =3D proc_dobool, + .proc_handler_new =3D proc_dobool, }, { } }; --=20 2.43.0 From nobody Wed Dec 17 14:02:46 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6779C61DF4 for ; Sat, 25 Nov 2023 12:53:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232212AbjKYMxT (ORCPT ); Sat, 25 Nov 2023 07:53:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232107AbjKYMw7 (ORCPT ); Sat, 25 Nov 2023 07:52:59 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B586EB; Sat, 25 Nov 2023 04:53:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1700916777; bh=mk4ERGiQ+ypiwZ7Vl9VU2ZoRpbYUovn98lDDkerN23g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=C5/1UkIIZUzU7N1C0adLmL3MG0a3j3bQOeRKu1fnGfpd5QJ76rmxy/zK5h24j4YK8 nyR+l0GDzybZxTNvA0OoC1HNsqr2iYGfq+xxmGYXnYMBPKusxr4nEp/i86yAIC7f/z CAm0ajvc/nBpY3ORl9yKVeVqMHUMnj+Olz74lHPs= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 25 Nov 2023 13:52:56 +0100 Subject: [PATCH RFC 7/7] treewide: sysctl: migrate proc_dointvec to proc_handler_new MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231125-const-sysctl-v1-7-5e881b0e0290@weissschuh.net> References: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> In-Reply-To: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700916776; l=68724; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=mk4ERGiQ+ypiwZ7Vl9VU2ZoRpbYUovn98lDDkerN23g=; b=lHQ6ZePvtOVNnKOXAjR8OXxKIqtERzkT2DbnzPSkYj4CdH/1ATyWQAzFof8QUXlnJafzGpYcC zMy/c7XxzdnCRMEq6G5809QqLaGykaCe6yrClDPi1Jq3V7kilwTfyRS X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org proc_handler_new() prevents the handler function from modifying the ctl_table which then can be put into .rodata. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/arm/kernel/isa.c | 6 +-- arch/csky/abiv1/alignment.c | 8 ++-- arch/powerpc/kernel/idle.c | 2 +- arch/s390/kernel/debug.c | 2 +- crypto/fips.c | 2 +- drivers/char/hpet.c | 2 +- drivers/char/random.c | 4 +- drivers/infiniband/core/iwcm.c | 2 +- drivers/infiniband/core/ucma.c | 2 +- drivers/macintosh/mac_hid.c | 4 +- drivers/md/md.c | 4 +- drivers/scsi/sg.c | 2 +- drivers/tty/tty_io.c | 2 +- fs/coda/sysctl.c | 6 +-- fs/coredump.c | 4 +- fs/devpts/inode.c | 2 +- fs/lockd/svc.c | 2 +- fs/locks.c | 4 +- fs/nfs/nfs4sysctl.c | 2 +- fs/nfs/sysctl.c | 2 +- fs/notify/dnotify/dnotify.c | 2 +- fs/ntfs/sysctl.c | 2 +- fs/proc/proc_sysctl.c | 2 +- fs/quota/dquot.c | 2 +- include/linux/sysctl.h | 2 +- init/do_mounts_initrd.c | 2 +- io_uring/io_uring.c | 2 +- ipc/mq_sysctl.c | 2 +- kernel/acct.c | 2 +- kernel/locking/lockdep.c | 4 +- kernel/printk/sysctl.c | 4 +- kernel/reboot.c | 2 +- kernel/signal.c | 2 +- kernel/sysctl-test.c | 20 ++++----- kernel/sysctl.c | 62 ++++++++++++++-------------- lib/test_sysctl.c | 8 ++-- mm/hugetlb.c | 2 +- mm/oom_kill.c | 4 +- net/appletalk/sysctl_net_atalk.c | 2 +- net/core/sysctl_net_core.c | 12 +++--- net/ipv4/route.c | 18 ++++----- net/ipv4/sysctl_net_ipv4.c | 38 ++++++++--------- net/ipv4/xfrm4_policy.c | 2 +- net/ipv6/addrconf.c | 72 ++++++++++++++++-------------= ---- net/ipv6/route.c | 8 ++-- net/ipv6/sysctl_net_ipv6.c | 18 ++++----- net/ipv6/xfrm6_policy.c | 2 +- net/netfilter/ipvs/ip_vs_ctl.c | 36 ++++++++--------- net/netfilter/nf_conntrack_standalone.c | 8 ++-- net/netfilter/nf_log.c | 2 +- net/rds/ib_sysctl.c | 2 +- net/rds/sysctl.c | 6 +-- net/sctp/sysctl.c | 26 ++++++------ net/sunrpc/xprtrdma/transport.c | 2 +- net/unix/sysctl_net_unix.c | 2 +- net/x25/sysctl_net_x25.c | 2 +- net/xfrm/xfrm_sysctl.c | 4 +- 57 files changed, 226 insertions(+), 226 deletions(-) diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c index 905b1b191546..f2a089e487a2 100644 --- a/arch/arm/kernel/isa.c +++ b/arch/arm/kernel/isa.c @@ -22,19 +22,19 @@ static struct ctl_table ctl_isa_vars[] =3D { .data =3D &isa_membase,=20 .maxlen =3D sizeof(isa_membase), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "portbase", .data =3D &isa_portbase,=20 .maxlen =3D sizeof(isa_portbase), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "portshift", .data =3D &isa_portshift,=20 .maxlen =3D sizeof(isa_portshift), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, }; =20 diff --git a/arch/csky/abiv1/alignment.c b/arch/csky/abiv1/alignment.c index e5b8b4b2109a..e3ef2cad2713 100644 --- a/arch/csky/abiv1/alignment.c +++ b/arch/csky/abiv1/alignment.c @@ -306,28 +306,28 @@ static struct ctl_table alignment_tbl[5] =3D { .data =3D &align_kern_enable, .maxlen =3D sizeof(align_kern_enable), .mode =3D 0666, - .proc_handler =3D &proc_dointvec + .proc_handler_new =3D &proc_dointvec }, { .procname =3D "user_enable", .data =3D &align_usr_enable, .maxlen =3D sizeof(align_usr_enable), .mode =3D 0666, - .proc_handler =3D &proc_dointvec + .proc_handler_new =3D &proc_dointvec }, { .procname =3D "kernel_count", .data =3D &align_kern_count, .maxlen =3D sizeof(align_kern_count), .mode =3D 0666, - .proc_handler =3D &proc_dointvec + .proc_handler_new =3D &proc_dointvec }, { .procname =3D "user_count", .data =3D &align_usr_count, .maxlen =3D sizeof(align_usr_count), .mode =3D 0666, - .proc_handler =3D &proc_dointvec + .proc_handler_new =3D &proc_dointvec }, }; =20 diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index 30b56c67fa61..c2ebd558c9c0 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c @@ -103,7 +103,7 @@ static struct ctl_table powersave_nap_ctl_table[] =3D { .data =3D &powersave_nap, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, }; =20 diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 85328a0ef3b6..eb5535710386 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -969,7 +969,7 @@ static struct ctl_table s390dbf_table[] =3D { .data =3D &debug_stoppable, .maxlen =3D sizeof(int), .mode =3D S_IRUGO | S_IWUSR, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "debug_active", diff --git a/crypto/fips.c b/crypto/fips.c index d492f23bf53b..d082685301aa 100644 --- a/crypto/fips.c +++ b/crypto/fips.c @@ -47,7 +47,7 @@ static struct ctl_table crypto_sysctl_table[] =3D { .data =3D &fips_enabled, .maxlen =3D sizeof(int), .mode =3D 0444, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "fips_name", diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 9c90b1d2c036..d2ba7dcbf8e8 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -707,7 +707,7 @@ static struct ctl_table hpet_table[] =3D { .data =3D &hpet_max_freq, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, }; =20 diff --git a/drivers/char/random.c b/drivers/char/random.c index 4a9c79391dee..0b2f01f89478 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1649,14 +1649,14 @@ static struct ctl_table random_table[] =3D { .data =3D &sysctl_poolsize, .maxlen =3D sizeof(int), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "entropy_avail", .data =3D &input_pool.init_bits, .maxlen =3D sizeof(int), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "write_wakeup_threshold", diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c index 0301fcad4b48..b9257465f8a8 100644 --- a/drivers/infiniband/core/iwcm.c +++ b/drivers/infiniband/core/iwcm.c @@ -109,7 +109,7 @@ static struct ctl_table iwcm_ctl_table[] =3D { .data =3D &default_backlog, .maxlen =3D sizeof(default_backlog), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, }; =20 diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 5f5ad8faf86e..2148fc1a04fa 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -69,7 +69,7 @@ static struct ctl_table ucma_ctl_table[] =3D { .data =3D &max_backlog, .maxlen =3D sizeof max_backlog, .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, }; =20 diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index 1ae3539beff5..dc992d16067a 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -227,14 +227,14 @@ static struct ctl_table mac_hid_files[] =3D { .data =3D &mouse_button2_keycode, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "mouse_button3_keycode", .data =3D &mouse_button3_keycode, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, }; =20 diff --git a/drivers/md/md.c b/drivers/md/md.c index c94373d64f2c..df1ec9e16689 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -295,14 +295,14 @@ static struct ctl_table raid_table[] =3D { .data =3D &sysctl_speed_limit_min, .maxlen =3D sizeof(int), .mode =3D S_IRUGO|S_IWUSR, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "speed_limit_max", .data =3D &sysctl_speed_limit_max, .maxlen =3D sizeof(int), .mode =3D S_IRUGO|S_IWUSR, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, }; =20 diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 86210e4dd0d3..e85d25602d9e 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1648,7 +1648,7 @@ static struct ctl_table sg_sysctls[] =3D { .data =3D &sg_big_buff, .maxlen =3D sizeof(int), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, }; =20 diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index a7bcc22fdae9..ad929011a68d 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3608,7 +3608,7 @@ static struct ctl_table tty_table[] =3D { .data =3D &tty_ldisc_autoload, .maxlen =3D sizeof(tty_ldisc_autoload), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE, }, diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index a247c14aaab7..f59959ee8dcc 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c @@ -20,21 +20,21 @@ static struct ctl_table coda_table[] =3D { .data =3D &coda_timeout, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "hard", .data =3D &coda_hard, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "fake_statfs", .data =3D &coda_fake_statfs, .maxlen =3D sizeof(int), .mode =3D 0600, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, {} }; diff --git a/fs/coredump.c b/fs/coredump.c index 733cb795f678..62747af9a417 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -965,7 +965,7 @@ static struct ctl_table coredump_sysctls[] =3D { .data =3D &core_uses_pid, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "core_pattern", @@ -979,7 +979,7 @@ static struct ctl_table coredump_sysctls[] =3D { .data =3D &core_pipe_limit, .maxlen =3D sizeof(unsigned int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index c830261aa883..c786a3f2c1c2 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -67,7 +67,7 @@ static struct ctl_table pty_table[] =3D { .maxlen =3D sizeof(int), .mode =3D 0444, .data =3D &pty_count, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, {} }; diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 90ea8cd382d3..6b0fd89990dc 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -473,7 +473,7 @@ static struct ctl_table nlm_sysctls[] =3D { .data =3D &nsm_local_state, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/fs/locks.c b/fs/locks.c index 46d88b9e222c..c99faee56d7d 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -100,7 +100,7 @@ static struct ctl_table locks_sysctls[] =3D { .data =3D &leases_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #ifdef CONFIG_MMU { @@ -108,7 +108,7 @@ static struct ctl_table locks_sysctls[] =3D { .data =3D &lease_break_time, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif /* CONFIG_MMU */ {} diff --git a/fs/nfs/nfs4sysctl.c b/fs/nfs/nfs4sysctl.c index e776200e9a11..2270bbe81e07 100644 --- a/fs/nfs/nfs4sysctl.c +++ b/fs/nfs/nfs4sysctl.c @@ -32,7 +32,7 @@ static struct ctl_table nfs4_cb_sysctls[] =3D { .data =3D &nfs_idmap_cache_timeout, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c index f39e2089bc4c..57cf00765062 100644 --- a/fs/nfs/sysctl.c +++ b/fs/nfs/sysctl.c @@ -27,7 +27,7 @@ static struct ctl_table nfs_cb_sysctls[] =3D { .data =3D &nfs_congestion_kb, .maxlen =3D sizeof(nfs_congestion_kb), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index 1cb9ad7e884e..6d1662ce7998 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c @@ -27,7 +27,7 @@ static struct ctl_table dnotify_sysctls[] =3D { .data =3D &dir_notify_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, {} }; diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c index 174fe536a1c0..d1d308ef5479 100644 --- a/fs/ntfs/sysctl.c +++ b/fs/ntfs/sysctl.c @@ -26,7 +26,7 @@ static struct ctl_table ntfs_sysctls[] =3D { .data =3D &debug_msgs, /* Data pointer and size. */ .maxlen =3D sizeof(debug_msgs), .mode =3D 0644, /* Mode, proc handler. */ - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, {} }; diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 742a99540f2b..b7e104b6f7ea 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -1134,7 +1134,7 @@ static int sysctl_check_table(const char *path, struc= t ctl_table_header *header) list_for_each_table_entry(entry, header) { if ((entry->proc_handler_new =3D=3D proc_dostring) || (entry->proc_handler_new =3D=3D proc_dobool) || - (entry->proc_handler =3D=3D proc_dointvec) || + (entry->proc_handler_new =3D=3D proc_dointvec) || (entry->proc_handler =3D=3D proc_douintvec) || (entry->proc_handler =3D=3D proc_douintvec_minmax) || (entry->proc_handler =3D=3D proc_dointvec_minmax) || diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 58b5de081b57..4f5d93ac9caa 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -2966,7 +2966,7 @@ static struct ctl_table fs_dqstats_table[] =3D { .data =3D &flag_print_warnings, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif { }, diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 2dfaf718a21b..58e9ddbbe828 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -69,7 +69,7 @@ typedef int proc_handler_new(const struct ctl_table *ctl,= int write, 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_dointvec(const 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, diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 425f4bcf4b77..8504e84ffc78 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -27,7 +27,7 @@ static struct ctl_table kern_do_mounts_initrd_table[] =3D= { .data =3D &real_root_dev, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index ed254076c723..0b91e6eed0f3 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -171,7 +171,7 @@ static struct ctl_table kernel_io_uring_disabled_table[= ] =3D { .data =3D &sysctl_io_uring_group, .maxlen =3D sizeof(gid_t), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, {}, }; diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c index ebb5ed81c151..478306e997c6 100644 --- a/ipc/mq_sysctl.c +++ b/ipc/mq_sysctl.c @@ -25,7 +25,7 @@ static struct ctl_table mq_sysctls[] =3D { .data =3D &init_ipc_ns.mq_queues_max, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "msg_max", diff --git a/kernel/acct.c b/kernel/acct.c index 986c8214dabf..007b9c08b0a9 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -82,7 +82,7 @@ static struct ctl_table kern_acct_table[] =3D { .data =3D &acct_parm, .maxlen =3D 3*sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index e85b5ad3e206..ea14dd786d82 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -85,7 +85,7 @@ static struct ctl_table kern_lockdep_table[] =3D { .data =3D &prove_locking, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif /* CONFIG_PROVE_LOCKING */ #ifdef CONFIG_LOCK_STAT @@ -94,7 +94,7 @@ static struct ctl_table kern_lockdep_table[] =3D { .data =3D &lock_stat, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif /* CONFIG_LOCK_STAT */ { } diff --git a/kernel/printk/sysctl.c b/kernel/printk/sysctl.c index c228343eeb97..009f5a9c7b75 100644 --- a/kernel/printk/sysctl.c +++ b/kernel/printk/sysctl.c @@ -26,7 +26,7 @@ static struct ctl_table printk_sysctls[] =3D { .data =3D &console_loglevel, .maxlen =3D 4*sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "printk_ratelimit", @@ -40,7 +40,7 @@ static struct ctl_table printk_sysctls[] =3D { .data =3D &printk_ratelimit_state.burst, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "printk_delay", diff --git a/kernel/reboot.c b/kernel/reboot.c index 69681100d884..9881f2ef5a21 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -1274,7 +1274,7 @@ static struct ctl_table kern_reboot_table[] =3D { .data =3D &C_A_D, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/kernel/signal.c b/kernel/signal.c index 47a7602dfe8d..d3c8f1150005 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -4809,7 +4809,7 @@ static struct ctl_table signal_debug_table[] =3D { .data =3D &show_unhandled_signals, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, #endif { } diff --git a/kernel/sysctl-test.c b/kernel/sysctl-test.c index 6ef887c19c48..a79878ba7fc6 100644 --- a/kernel/sysctl-test.c +++ b/kernel/sysctl-test.c @@ -25,7 +25,7 @@ static void sysctl_test_api_dointvec_null_tbl_data(struct= kunit *test) .data =3D NULL, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; @@ -75,7 +75,7 @@ static void sysctl_test_api_dointvec_table_maxlen_unset(s= truct kunit *test) */ .maxlen =3D 0, .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; @@ -118,7 +118,7 @@ static void sysctl_test_api_dointvec_table_len_is_zero(= struct kunit *test) .data =3D &data, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; @@ -152,7 +152,7 @@ static void sysctl_test_api_dointvec_table_read_but_pos= ition_set( .data =3D &data, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; @@ -187,7 +187,7 @@ static void sysctl_test_dointvec_read_happy_single_posi= tive(struct kunit *test) .data =3D &data, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; @@ -218,7 +218,7 @@ static void sysctl_test_dointvec_read_happy_single_nega= tive(struct kunit *test) .data =3D &data, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; @@ -247,7 +247,7 @@ static void sysctl_test_dointvec_write_happy_single_pos= itive(struct kunit *test) .data =3D &data, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; @@ -277,7 +277,7 @@ static void sysctl_test_dointvec_write_happy_single_neg= ative(struct kunit *test) .data =3D &data, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; @@ -309,7 +309,7 @@ static void sysctl_test_api_dointvec_write_single_less_= int_min( .data =3D &data, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; @@ -347,7 +347,7 @@ static void sysctl_test_api_dointvec_write_single_great= er_int_max( .data =3D &data, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE_HUNDRED, }; diff --git a/kernel/sysctl.c b/kernel/sysctl.c index c76668f47bcc..c02c98246621 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -468,7 +468,7 @@ static int do_proc_douintvec_conv(unsigned long *lvalp, =20 static const char proc_wspace_sep[] =3D { ' ', '\t', '\n' }; =20 -static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, +static int __do_proc_dointvec(void *tbl_data, const struct ctl_table *tabl= e, 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 ct= l_table *table, return err; } =20 -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), @@ -739,7 +739,7 @@ int proc_dobool(const struct ctl_table *table, int writ= e, 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); @@ -1510,7 +1510,7 @@ int proc_dobool(const struct ctl_table *table, int wr= ite, return -ENOSYS; } =20 -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; @@ -1621,7 +1621,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &panic_timeout, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #ifdef CONFIG_PROC_SYSCTL { @@ -1645,7 +1645,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &print_fatal_signals, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #ifdef CONFIG_SPARC { @@ -1660,14 +1660,14 @@ static struct ctl_table kern_table[] =3D { .data =3D &stop_a_enabled, .maxlen =3D sizeof (int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "scons-poweroff", .data =3D &scons_pwroff, .maxlen =3D sizeof (int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #ifdef CONFIG_SPARC64 @@ -1676,7 +1676,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &sysctl_tsb_ratio, .maxlen =3D sizeof (int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #ifdef CONFIG_PARISC @@ -1685,7 +1685,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &pwrsw_enabled, .maxlen =3D sizeof (int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW @@ -1694,7 +1694,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &unaligned_enabled, .maxlen =3D sizeof (int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #ifdef CONFIG_STACK_TRACER @@ -1712,14 +1712,14 @@ static struct ctl_table kern_table[] =3D { .data =3D &ftrace_dump_on_oops, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "traceoff_on_warning", .data =3D &__disable_trace_on_warning, .maxlen =3D sizeof(__disable_trace_on_warning), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "tracepoint_printk", @@ -1806,7 +1806,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &show_unhandled_signals, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif { @@ -1823,7 +1823,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &panic_on_oops, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "panic_print", @@ -1837,14 +1837,14 @@ static struct ctl_table kern_table[] =3D { .data =3D (void *)&ngroups_max, .maxlen =3D sizeof (int), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "cap_last_cap", .data =3D (void *)&cap_last_cap, .maxlen =3D sizeof(int), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) { @@ -1852,7 +1852,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &unknown_nmi_panic, .maxlen =3D sizeof (int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif =20 @@ -1863,7 +1863,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &sysctl_panic_on_stackoverflow, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #if defined(CONFIG_X86) @@ -1872,35 +1872,35 @@ static struct ctl_table kern_table[] =3D { .data =3D &panic_on_unrecovered_nmi, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "panic_on_io_nmi", .data =3D &panic_on_io_nmi, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "bootloader_type", .data =3D &bootloader_type, .maxlen =3D sizeof (int), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "bootloader_version", .data =3D &bootloader_version, .maxlen =3D sizeof (int), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "io_delay_type", .data =3D &io_delay_type, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #if defined(CONFIG_MMU) @@ -1909,7 +1909,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &randomize_va_space, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #if defined(CONFIG_S390) && defined(CONFIG_SMP) @@ -1918,7 +1918,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &spin_retry, .maxlen =3D sizeof (int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #if defined(CONFIG_ACPI_SLEEP) && defined(CONFIG_X86) @@ -1936,7 +1936,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &no_unaligned_warning, .maxlen =3D sizeof (int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #ifdef CONFIG_RT_MUTEXES @@ -1945,7 +1945,7 @@ static struct ctl_table kern_table[] =3D { .data =3D &max_lock_depth, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #ifdef CONFIG_PERF_EVENTS @@ -1960,14 +1960,14 @@ static struct ctl_table kern_table[] =3D { .data =3D &sysctl_perf_event_paranoid, .maxlen =3D sizeof(sysctl_perf_event_paranoid), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "perf_event_mlock_kb", .data =3D &sysctl_perf_event_mlock, .maxlen =3D sizeof(sysctl_perf_event_mlock), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "perf_event_max_sample_rate", @@ -2200,7 +2200,7 @@ static struct ctl_table vm_table[] =3D { .maxlen =3D sizeof(vdso_enabled), #endif .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, }, #endif diff --git a/lib/test_sysctl.c b/lib/test_sysctl.c index de42e3d99912..cb8475f3b23e 100644 --- a/lib/test_sysctl.c +++ b/lib/test_sysctl.c @@ -84,28 +84,28 @@ static struct ctl_table test_table[] =3D { .data =3D &test_data.int_0002, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "int_0003", .data =3D &test_data.int_0003, .maxlen =3D sizeof(test_data.int_0003), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "match_int", .data =3D &match_int_ok, .maxlen =3D sizeof(match_int_ok), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "boot_int", .data =3D &test_data.boot_int, .maxlen =3D sizeof(test_data.boot_int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE, }, diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 1169ef2f2176..338a7afe28ee 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4942,7 +4942,7 @@ static struct ctl_table hugetlb_table[] =3D { .data =3D &sysctl_hugetlb_shm_group, .maxlen =3D sizeof(gid_t), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "nr_overcommit_hugepages", diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 9e6071fde34a..9cb0d478df81 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -713,14 +713,14 @@ static struct ctl_table vm_oom_kill_table[] =3D { .data =3D &sysctl_oom_kill_allocating_task, .maxlen =3D sizeof(sysctl_oom_kill_allocating_task), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "oom_dump_tasks", .data =3D &sysctl_oom_dump_tasks, .maxlen =3D sizeof(sysctl_oom_dump_tasks), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, {} }; diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_at= alk.c index d945b7c0176d..9a18254f8875 100644 --- a/net/appletalk/sysctl_net_atalk.c +++ b/net/appletalk/sysctl_net_atalk.c @@ -31,7 +31,7 @@ static struct ctl_table atalk_table[] =3D { .data =3D &sysctl_aarp_retransmit_limit, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "aarp-resolve-time", diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 03f1edb948d7..c596de00e553 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -433,7 +433,7 @@ static struct ctl_table net_core_table[] =3D { .data =3D &netdev_max_backlog, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "netdev_rss_key", @@ -492,7 +492,7 @@ static struct ctl_table net_core_table[] =3D { .data =3D &netdev_tstamp_prequeue, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "message_cost", @@ -506,14 +506,14 @@ static struct ctl_table net_core_table[] =3D { .data =3D &net_ratelimit_state.burst, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "optmem_max", .data =3D &sysctl_optmem_max, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "tstamp_allow_data", @@ -577,14 +577,14 @@ static struct ctl_table net_core_table[] =3D { .data =3D &netdev_budget, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "warnings", .data =3D &net_msg_warn, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "max_skb_frags", diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 16615d107cf0..51958c4a3eef 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -3428,14 +3428,14 @@ static struct ctl_table ipv4_route_table[] =3D { .data =3D &ipv4_dst_ops.gc_thresh, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "max_size", .data =3D &ip_rt_max_size, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { /* Deprecated. Use gc_min_interval_ms */ @@ -3472,42 +3472,42 @@ static struct ctl_table ipv4_route_table[] =3D { .data =3D &ip_rt_redirect_load, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "redirect_number", .data =3D &ip_rt_redirect_number, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "redirect_silence", .data =3D &ip_rt_redirect_silence, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "error_cost", .data =3D &ip_rt_error_cost, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "error_burst", .data =3D &ip_rt_error_burst, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "gc_elasticity", .data =3D &ip_rt_gc_elasticity, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; @@ -3541,7 +3541,7 @@ static struct ctl_table ipv4_route_netns_table[] =3D { .data =3D &init_net.ipv4.ip_rt_min_advmss, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { }, }; diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index f63a545a7374..726494d5a6d7 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -474,14 +474,14 @@ static struct ctl_table ipv4_table[] =3D { .data =3D &sysctl_tcp_max_orphans, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "inet_peer_threshold", .data =3D &inet_peer_threshold, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "inet_peer_minttl", @@ -509,7 +509,7 @@ static struct ctl_table ipv4_table[] =3D { .data =3D &sysctl_tcp_low_latency, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, #ifdef CONFIG_NETLABEL { @@ -517,28 +517,28 @@ static struct ctl_table ipv4_table[] =3D { .data =3D &cipso_v4_cache_enabled, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "cipso_cache_bucket_size", .data =3D &cipso_v4_cache_bucketsize, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "cipso_rbm_optfmt", .data =3D &cipso_v4_rbm_optfmt, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "cipso_rbm_strictvalid", .data =3D &cipso_v4_rbm_strictvalid, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif /* CONFIG_NETLABEL */ { @@ -588,7 +588,7 @@ static struct ctl_table ipv4_net_table[] =3D { .data =3D &init_net.ipv4.tcp_death_row.sysctl_max_tw_buckets, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "icmp_echo_ignore_all", @@ -647,7 +647,7 @@ static struct ctl_table ipv4_net_table[] =3D { .data =3D &init_net.ipv4.sysctl_icmp_ratemask, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "ping_group_range", @@ -821,7 +821,7 @@ static struct ctl_table ipv4_net_table[] =3D { .data =3D &init_net.ipv4.sysctl_tcp_base_mss, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "tcp_min_snd_mss", @@ -846,7 +846,7 @@ static struct ctl_table ipv4_net_table[] =3D { .data =3D &init_net.ipv4.sysctl_tcp_probe_threshold, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "tcp_probe_interval", @@ -868,14 +868,14 @@ static struct ctl_table ipv4_net_table[] =3D { .data =3D &init_net.ipv4.sysctl_igmp_max_memberships, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "igmp_max_msf", .data =3D &init_net.ipv4.sysctl_igmp_max_msf, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, #ifdef CONFIG_IP_MULTICAST { @@ -966,7 +966,7 @@ static struct ctl_table ipv4_net_table[] =3D { .data =3D &init_net.ipv4.sysctl_tcp_reordering, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "tcp_retries1", @@ -1018,14 +1018,14 @@ static struct ctl_table ipv4_net_table[] =3D { .data =3D &init_net.ipv4.sysctl_max_syn_backlog, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "tcp_fastopen", .data =3D &init_net.ipv4.sysctl_tcp_fastopen, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "tcp_fastopen_key", @@ -1185,7 +1185,7 @@ static struct ctl_table ipv4_net_table[] =3D { .data =3D &init_net.ipv4.sysctl_tcp_max_reordering, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "tcp_dsack", @@ -1261,14 +1261,14 @@ static struct ctl_table ipv4_net_table[] =3D { .data =3D &init_net.ipv4.sysctl_tcp_limit_output_bytes, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "tcp_challenge_ack_limit", .data =3D &init_net.ipv4.sysctl_tcp_challenge_ack_limit, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "tcp_min_tso_segs", diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index c33bca2c3841..166528c3d768 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -150,7 +150,7 @@ static struct ctl_table xfrm4_policy_table[] =3D { .data =3D &init_net.xfrm.xfrm4_dst_ops.gc_thresh, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 3aaea56b5166..b18facff1d31 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -6705,28 +6705,28 @@ static const struct ctl_table addrconf_sysctl[] =3D= { .data =3D &ipv6_devconf.accept_ra, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "accept_redirects", .data =3D &ipv6_devconf.accept_redirects, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "autoconf", .data =3D &ipv6_devconf.autoconf, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "dad_transmits", .data =3D &ipv6_devconf.dad_transmits, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "router_solicitations", @@ -6762,7 +6762,7 @@ static const struct ctl_table addrconf_sysctl[] =3D { .data =3D &ipv6_devconf.force_mld_version, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "mldv1_unsolicited_report_interval", @@ -6785,49 +6785,49 @@ static const struct ctl_table addrconf_sysctl[] =3D= { .data =3D &ipv6_devconf.use_tempaddr, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "temp_valid_lft", .data =3D &ipv6_devconf.temp_valid_lft, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "temp_prefered_lft", .data =3D &ipv6_devconf.temp_prefered_lft, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "regen_max_retry", .data =3D &ipv6_devconf.regen_max_retry, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "max_desync_factor", .data =3D &ipv6_devconf.max_desync_factor, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "max_addresses", .data =3D &ipv6_devconf.max_addresses, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "accept_ra_defrtr", .data =3D &ipv6_devconf.accept_ra_defrtr, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "ra_defrtr_metric", @@ -6842,21 +6842,21 @@ static const struct ctl_table addrconf_sysctl[] =3D= { .data =3D &ipv6_devconf.accept_ra_min_hop_limit, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "accept_ra_min_lft", .data =3D &ipv6_devconf.accept_ra_min_lft, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "accept_ra_pinfo", .data =3D &ipv6_devconf.accept_ra_pinfo, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "ra_honor_pio_life", @@ -6873,7 +6873,7 @@ static const struct ctl_table addrconf_sysctl[] =3D { .data =3D &ipv6_devconf.accept_ra_rtr_pref, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "router_probe_interval", @@ -6888,14 +6888,14 @@ static const struct ctl_table addrconf_sysctl[] =3D= { .data =3D &ipv6_devconf.accept_ra_rt_info_min_plen, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "accept_ra_rt_info_max_plen", .data =3D &ipv6_devconf.accept_ra_rt_info_max_plen, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #endif @@ -6911,7 +6911,7 @@ static const struct ctl_table addrconf_sysctl[] =3D { .data =3D &ipv6_devconf.accept_source_route, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #ifdef CONFIG_IPV6_OPTIMISTIC_DAD { @@ -6919,14 +6919,14 @@ static const struct ctl_table addrconf_sysctl[] =3D= { .data =3D &ipv6_devconf.optimistic_dad, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "use_optimistic", .data =3D &ipv6_devconf.use_optimistic, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif #ifdef CONFIG_IPV6_MROUTE @@ -6935,7 +6935,7 @@ static const struct ctl_table addrconf_sysctl[] =3D { .data =3D &ipv6_devconf.mc_forwarding, .maxlen =3D sizeof(int), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif { @@ -6950,42 +6950,42 @@ static const struct ctl_table addrconf_sysctl[] =3D= { .data =3D &ipv6_devconf.accept_dad, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "force_tllao", .data =3D &ipv6_devconf.force_tllao, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "ndisc_notify", .data =3D &ipv6_devconf.ndisc_notify, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "suppress_frag_ndisc", .data =3D &ipv6_devconf.suppress_frag_ndisc, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "accept_ra_from_local", .data =3D &ipv6_devconf.accept_ra_from_local, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "accept_ra_mtu", .data =3D &ipv6_devconf.accept_ra_mtu, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "stable_secret", @@ -6999,7 +6999,7 @@ static const struct ctl_table addrconf_sysctl[] =3D { .data =3D &ipv6_devconf.use_oif_addrs_only, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "ignore_routes_with_linkdown", @@ -7013,21 +7013,21 @@ static const struct ctl_table addrconf_sysctl[] =3D= { .data =3D &ipv6_devconf.drop_unicast_in_l2_multicast, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "drop_unsolicited_na", .data =3D &ipv6_devconf.drop_unsolicited_na, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "keep_addr_on_down", .data =3D &ipv6_devconf.keep_addr_on_down, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, =20 }, { @@ -7035,7 +7035,7 @@ static const struct ctl_table addrconf_sysctl[] =3D { .data =3D &ipv6_devconf.seg6_enabled, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #ifdef CONFIG_IPV6_SEG6_HMAC { @@ -7043,7 +7043,7 @@ static const struct ctl_table addrconf_sysctl[] =3D { .data =3D &ipv6_devconf.seg6_require_hmac, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif { @@ -7051,7 +7051,7 @@ static const struct ctl_table addrconf_sysctl[] =3D { .data =3D &ipv6_devconf.enhanced_dad, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "addr_gen_mode", @@ -7081,7 +7081,7 @@ static const struct ctl_table addrconf_sysctl[] =3D { .data =3D &ipv6_devconf.rpl_seg_enabled, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "ioam6_enabled", diff --git a/net/ipv6/route.c b/net/ipv6/route.c index b132feae3393..62313c74d2fe 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -6350,14 +6350,14 @@ static struct ctl_table ipv6_route_table_template[]= =3D { .data =3D &init_net.ipv6.sysctl.ip6_rt_max_size, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "gc_thresh", .data =3D &ip6_dst_ops_template.gc_thresh, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "flush", @@ -6392,7 +6392,7 @@ static struct ctl_table ipv6_route_table_template[] = =3D { .data =3D &init_net.ipv6.sysctl.ip6_rt_gc_elasticity, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "mtu_expires", @@ -6406,7 +6406,7 @@ static struct ctl_table ipv6_route_table_template[] = =3D { .data =3D &init_net.ipv6.sysctl.ip6_rt_min_advmss, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "gc_min_interval_ms", diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 888676163e90..f3ecdd13fdb4 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c @@ -103,7 +103,7 @@ static struct ctl_table ipv6_table_template[] =3D { .data =3D &init_net.ipv6.sysctl.idgen_retries, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "idgen_delay", @@ -140,28 +140,28 @@ static struct ctl_table ipv6_table_template[] =3D { .data =3D &init_net.ipv6.sysctl.max_dst_opts_cnt, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "max_hbh_opts_number", .data =3D &init_net.ipv6.sysctl.max_hbh_opts_cnt, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "max_dst_opts_length", .data =3D &init_net.ipv6.sysctl.max_dst_opts_len, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "max_hbh_length", .data =3D &init_net.ipv6.sysctl.max_hbh_opts_len, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "fib_multipath_hash_policy", @@ -186,7 +186,7 @@ static struct ctl_table ipv6_table_template[] =3D { .data =3D &init_net.ipv6.sysctl.seg6_flowlabel, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "fib_notify_on_flag_change", @@ -222,7 +222,7 @@ static struct ctl_table ipv6_rotable[] =3D { .data =3D &sysctl_mld_max_msf, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "mld_qrv", @@ -238,14 +238,14 @@ static struct ctl_table ipv6_rotable[] =3D { .data =3D &calipso_cache_enabled, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "calipso_cache_bucket_size", .data =3D &calipso_cache_bucketsize, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif /* CONFIG_NETLABEL */ { } diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index 42fb6996b077..3d29a12b5fc1 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c @@ -182,7 +182,7 @@ static struct ctl_table xfrm6_policy_table[] =3D { .data =3D &init_net.xfrm.xfrm6_dst_ops.gc_thresh, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 143a341bbc0a..b832d55c7d0c 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -2077,13 +2077,13 @@ static struct ctl_table vs_vars[] =3D { .procname =3D "amemthresh", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "am_droprate", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "drop_entry", @@ -2102,7 +2102,7 @@ static struct ctl_table vs_vars[] =3D { .procname =3D "conntrack", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D &proc_dointvec, + .proc_handler_new =3D &proc_dointvec, }, #endif { @@ -2115,7 +2115,7 @@ static struct ctl_table vs_vars[] =3D { .procname =3D "snat_reroute", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D &proc_dointvec, + .proc_handler_new =3D &proc_dointvec, }, { .procname =3D "sync_version", @@ -2135,7 +2135,7 @@ static struct ctl_table vs_vars[] =3D { .procname =3D "sync_persist_mode", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "sync_qlen_max", @@ -2147,37 +2147,37 @@ static struct ctl_table vs_vars[] =3D { .procname =3D "sync_sock_size", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "cache_bypass", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "expire_nodest_conn", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "sloppy_tcp", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "sloppy_sctp", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "expire_quiescent_template", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "sync_threshold", @@ -2204,37 +2204,37 @@ static struct ctl_table vs_vars[] =3D { .procname =3D "nat_icmp_send", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "pmtu_disc", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "backup_only", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "conn_reuse_mode", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "schedule_icmp", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "ignore_tunneled", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "run_estimation", @@ -2260,7 +2260,7 @@ static struct ctl_table vs_vars[] =3D { .data =3D &sysctl_ip_vs_debug_level, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, #endif { } diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_con= ntrack_standalone.c index 0ee98ce5b816..d6779acd2693 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c @@ -627,13 +627,13 @@ static struct ctl_table nf_ct_sysctl_table[] =3D { .data =3D &nf_conntrack_max, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, [NF_SYSCTL_CT_COUNT] =3D { .procname =3D "nf_conntrack_count", .maxlen =3D sizeof(int), .mode =3D 0444, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, [NF_SYSCTL_CT_BUCKETS] =3D { .procname =3D "nf_conntrack_buckets", @@ -663,7 +663,7 @@ static struct ctl_table nf_ct_sysctl_table[] =3D { .data =3D &nf_ct_expect_max, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, [NF_SYSCTL_CT_ACCT] =3D { .procname =3D "nf_conntrack_acct", @@ -966,7 +966,7 @@ static struct ctl_table nf_ct_netfilter_table[] =3D { .data =3D &nf_conntrack_max, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index 8cc52d2bd31b..5c296f91a74d 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c @@ -398,7 +398,7 @@ static struct ctl_table nf_log_sysctl_ftable[] =3D { .data =3D &sysctl_nf_log_all_netns, .maxlen =3D sizeof(sysctl_nf_log_all_netns), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/net/rds/ib_sysctl.c b/net/rds/ib_sysctl.c index e4e41b3afce7..e90a5ecabc7c 100644 --- a/net/rds/ib_sysctl.c +++ b/net/rds/ib_sysctl.c @@ -101,7 +101,7 @@ static struct ctl_table rds_ib_sysctl_table[] =3D { .data =3D &rds_ib_sysctl_flow_control, .maxlen =3D sizeof(rds_ib_sysctl_flow_control), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/net/rds/sysctl.c b/net/rds/sysctl.c index e381bbcd9cc1..958b0465fed3 100644 --- a/net/rds/sysctl.c +++ b/net/rds/sysctl.c @@ -73,21 +73,21 @@ static struct ctl_table rds_sysctl_rds_table[] =3D { .data =3D &rds_sysctl_max_unacked_packets, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "max_unacked_bytes", .data =3D &rds_sysctl_max_unacked_bytes, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "ping_enable", .data =3D &rds_sysctl_ping_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { } }; diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c index f65d6f92afcb..b94ef7a34bce 100644 --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c @@ -71,14 +71,14 @@ static struct ctl_table sctp_table[] =3D { .data =3D &sysctl_sctp_rmem, .maxlen =3D sizeof(sysctl_sctp_rmem), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "sctp_wmem", .data =3D &sysctl_sctp_wmem, .maxlen =3D sizeof(sysctl_sctp_wmem), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, =20 { /* sentinel */ } @@ -172,7 +172,7 @@ static struct ctl_table sctp_net_table[] =3D { .data =3D &init_net.sctp.cookie_preserve_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "cookie_hmac_alg", @@ -240,49 +240,49 @@ static struct ctl_table sctp_net_table[] =3D { .data =3D &init_net.sctp.sndbuf_policy, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "rcvbuf_policy", .data =3D &init_net.sctp.rcvbuf_policy, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "default_auto_asconf", .data =3D &init_net.sctp.default_auto_asconf, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "addip_enable", .data =3D &init_net.sctp.addip_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "addip_noauth_enable", .data =3D &init_net.sctp.addip_noauth, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "prsctp_enable", .data =3D &init_net.sctp.prsctp_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "reconf_enable", .data =3D &init_net.sctp.reconf_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "auth_enable", @@ -296,14 +296,14 @@ static struct ctl_table sctp_net_table[] =3D { .data =3D &init_net.sctp.intl_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "ecn_enable", .data =3D &init_net.sctp.ecn_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "plpmtud_probe_interval", @@ -373,7 +373,7 @@ static struct ctl_table sctp_net_table[] =3D { .data =3D &init_net.sctp.pf_enable, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { .procname =3D "pf_expose", diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transpor= t.c index 29b0562d62e7..db7a9b2aa8ba 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c @@ -135,7 +135,7 @@ static struct ctl_table xr_tunables_table[] =3D { .data =3D &xprt_rdma_pad_optimize, .maxlen =3D sizeof(unsigned int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { }, }; diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c index 3e84b31c355a..4ddc9d9d2d30 100644 --- a/net/unix/sysctl_net_unix.c +++ b/net/unix/sysctl_net_unix.c @@ -17,7 +17,7 @@ static struct ctl_table unix_table[] =3D { .data =3D &init_net.unx.sysctl_max_dgram_qlen, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { } }; diff --git a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c index e9802afa43d0..97a44b455221 100644 --- a/net/x25/sysctl_net_x25.c +++ b/net/x25/sysctl_net_x25.c @@ -69,7 +69,7 @@ static struct ctl_table x25_table[] =3D { .data =3D &sysctl_x25_forward, .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler_new =3D proc_dointvec, }, { }, }; diff --git a/net/xfrm/xfrm_sysctl.c b/net/xfrm/xfrm_sysctl.c index 7fdeafc838a7..3190fb65e13d 100644 --- a/net/xfrm/xfrm_sysctl.c +++ b/net/xfrm/xfrm_sysctl.c @@ -30,13 +30,13 @@ static struct ctl_table xfrm_table[] =3D { .procname =3D "xfrm_larval_drop", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, { .procname =3D "xfrm_acq_expires", .maxlen =3D sizeof(int), .mode =3D 0644, - .proc_handler =3D proc_dointvec + .proc_handler_new =3D proc_dointvec }, {} }; --=20 2.43.0