Message ID | 20230518160705.3888592-2-j.granados@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp608916vqo; Thu, 18 May 2023 09:11:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7uhcrFUCQJp36iW5FvRYpDof8y6alSzyneUP5ntlJBeuwR/NGiVNYs/J8kwAy9Z5CcC7Sq X-Received: by 2002:a17:903:11c7:b0:1ab:160c:526d with SMTP id q7-20020a17090311c700b001ab160c526dmr3494606plh.22.1684426261376; Thu, 18 May 2023 09:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684426261; cv=none; d=google.com; s=arc-20160816; b=jOh1oSIna4xFOgxTJsPAz4ri6jfxJbeYx9DsVebu8TZIfD3a4MPNAfrd8qaFxJQ0Jj IModQv95d/TXf9MhAw69Ix2K0F6gchBY8KZ4I2pdXocFgBdjdG7vi7ZR9mdNljhEMK5q xojC+9ftRjvemNJSL5mcnBjfX9Dj/Mt2+U7kdFwF4RR53UnV0VWAhhfPlk8LCeb3EPcs tAJcctXzVcqe+zjhWpjqH11JHjJTCutwRnmq8ipJkjLfk1HsjYKOMurKIC9MAo1yhmlj twbNddUx2YtwKwZku35DjpECnQmNbBh4qsQg34PNS7mzWnQ2isF5pKVwAqBCIMLoOCzd P60A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=Ze+o09ZR17ldGY/8rqv5qNXytzqE0bHI/UYpvqWEbb8=; b=LubVTD9iylh/lYvKQ0B2MlF/a9Ap9ijrR8W57bBpP+L/TNgicSIumPw/cnA9KTxuFI jjTboUj/IEXBZnK/I7PSk9KVNXvG6ARVMULzO1PST6fO/swU/OskURhoVSJ6H5KSNbt2 MRrfaFEclu7jc9MXfVvGr8MrGI+riHNsDr9Sd5iaD1JAEMipjO9mGHSiaZUC4fZ877xq mT3fubuy8Ddcob9yOQ0vQ7B8lZMT7DWl7aPHAcEonnndRBhk59I9Xdt8TUOR8Cu/ycsH 6qGozyxiFIqkDBd84EpGdYrzn9x/wJq3LQ41ut+Db0rkzTiMNWgExwEw+pLkJFJqkgnD k/rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=XHBIUDus; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a170902c40300b0019aa0d010eesi1751208plk.308.2023.05.18.09.10.44; Thu, 18 May 2023 09:11:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=XHBIUDus; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229643AbjERQH2 (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Thu, 18 May 2023 12:07:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjERQHX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 18 May 2023 12:07:23 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 663EC10D0 for <linux-kernel@vger.kernel.org>; Thu, 18 May 2023 09:07:20 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230518160716euoutp01060e2766330d47facb522891a19d0595~gSI4vfn3e2454324543euoutp01U for <linux-kernel@vger.kernel.org>; Thu, 18 May 2023 16:07:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230518160716euoutp01060e2766330d47facb522891a19d0595~gSI4vfn3e2454324543euoutp01U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1684426036; bh=Ze+o09ZR17ldGY/8rqv5qNXytzqE0bHI/UYpvqWEbb8=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=XHBIUDusdDSKijcLAWB6kfNdY4j1GHQ4T67zD6pLGwc4VOFHNM09sRol9uN302IH1 qQtcCQdFBDV8Im6TyipuVa0/B9Gv+5fhzBBccNiVTWF+AyYm4Ptv+qRFzSNvCfLmlo NvYqm7jWmgkImr8xQg18QnZQXoAC6iEveDo7V69A= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230518160715eucas1p23ad608efcf7ecdf42580f254b9be8709~gSI4a6BBx2634626346eucas1p2u; Thu, 18 May 2023 16:07:15 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 2C.AA.37758.33D46646; Thu, 18 May 2023 17:07:15 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230518160715eucas1p1973b53732f9b05aabbef2669124eb413~gSI3-5U3V2475724757eucas1p1_; Thu, 18 May 2023 16:07:15 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230518160715eusmtrp2bae472f5070362eba9b744430b186561~gSI3-VqVv0827608276eusmtrp2N; Thu, 18 May 2023 16:07:15 +0000 (GMT) X-AuditID: cbfec7f5-7ffff7000002937e-c8-64664d33ec5c Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id B8.2B.10549.33D46646; Thu, 18 May 2023 17:07:15 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230518160715eusmtip2e1b7d7e853961bcfb162d83d3734eb14~gSI30HY9s0076100761eusmtip2F; Thu, 18 May 2023 16:07:15 +0000 (GMT) Received: from localhost (106.210.248.97) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 18 May 2023 17:07:12 +0100 From: Joel Granados <j.granados@samsung.com> To: <mcgrof@kernel.org> CC: Alexander Viro <viro@zeniv.linux.org.uk>, <linux-kernel@vger.kernel.org>, Iurii Zaikin <yzaikin@google.com>, Sudip Mukherjee <sudipm.mukherjee@gmail.com>, Christian Brauner <brauner@kernel.org>, <linux-fsdevel@vger.kernel.org>, Kees Cook <keescook@chromium.org>, "Joel Granados" <j.granados@samsung.com> Subject: [PATCH 1/2] sysctl: Refactor base paths registrations Date: Thu, 18 May 2023 18:07:04 +0200 Message-ID: <20230518160705.3888592-2-j.granados@samsung.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230518160705.3888592-1-j.granados@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [106.210.248.97] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0xSYRjex0E4so47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fpsRSnJFoqMVcVJwIAJewtfBXAwAA X-CMS-MailID: 20230518160715eucas1p1973b53732f9b05aabbef2669124eb413 X-Msg-Generator: CA X-RootMTR: 20230518160715eucas1p1973b53732f9b05aabbef2669124eb413 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230518160715eucas1p1973b53732f9b05aabbef2669124eb413 References: <20230518160705.3888592-1-j.granados@samsung.com> <CGME20230518160715eucas1p1973b53732f9b05aabbef2669124eb413@eucas1p1.samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766248951547898648?= X-GMAIL-MSGID: =?utf-8?q?1766248951547898648?= |
Series |
sysctl: Remove register_sysctl_table from sources
|
|
Commit Message
Joel Granados
May 18, 2023, 4:07 p.m. UTC
This is part of the general push to deprecate register_sysctl_paths and
register_sysctl_table. The old way of doing this through
register_sysctl_base and DECLARE_SYSCTL_BASE macro is replaced with a
call to register_sysctl. The 5 base paths affected are: "kernel", "vm",
"debug", "dev" and "fs".
We remove the register_sysctl_base function and the DECLARE_SYSCTL_BASE
macro since they are no longer needed.
In order to quickly acertain that the paths did not actually change I
executed `find /proc/sys/ | sha1sum` and made sure that the sha was the
same before and after the commit.
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
fs/sysctls.c | 9 ++++++---
include/linux/sysctl.h | 23 -----------------------
kernel/sysctl.c | 13 ++++---------
3 files changed, 10 insertions(+), 35 deletions(-)
Comments
On Thu, May 18, 2023 at 06:07:04PM +0200, Joel Granados wrote: > This is part of the general push to deprecate register_sysctl_paths and > register_sysctl_table. The old way of doing this through > register_sysctl_base and DECLARE_SYSCTL_BASE macro is replaced with a > call to register_sysctl. The 5 base paths affected are: "kernel", "vm", > "debug", "dev" and "fs". > > We remove the register_sysctl_base function and the DECLARE_SYSCTL_BASE > macro since they are no longer needed. > > In order to quickly acertain that the paths did not actually change I > executed `find /proc/sys/ | sha1sum` and made sure that the sha was the > same before and after the commit. > > Signed-off-by: Joel Granados <j.granados@samsung.com> This patch results in the following warning, seen across almost all architectures. sysctl table check failed: kernel/usermodehelper Not a file sysctl table check failed: kernel/usermodehelper No proc_handler sysctl table check failed: kernel/usermodehelper bogus .mode 0555 sysctl table check failed: kernel/keys Not a file sysctl table check failed: kernel/keys No proc_handler sysctl table check failed: kernel/keys bogus .mode 0555 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-rc3-next-20230524 #1 Stack : ffffffff 801aed28 80e44644 00000004 81946ba4 00000000 810d3db4 b782f641 810f0000 81269940 810f0000 810fa610 811bb193 00000001 810d3d58 00000000 00000000 00000000 810099d8 000000f2 00000001 000000f3 00000000 00000000 ffffffff 00000002 00000000 fff80000 810f0000 810099d8 00000001 ffffffea 8013bab4 8113bb14 8013caa8 80fe0000 00000000 807b9d54 00000000 81270000 ... Call Trace: [<8010a558>] show_stack+0x38/0x118 [<80d67edc>] dump_stack_lvl+0xa4/0xf0 [<8039c8e0>] __register_sysctl_table+0x5b4/0x7a0 [<811e55e4>] __register_sysctl_init+0x30/0x68 [<811d5164>] sysctl_init_bases+0x24/0x88 [<811e517c>] proc_root_init+0x94/0xa8 [<811ccebc>] start_kernel+0x704/0x740 failed when register_sysctl kern_table to kernel Reverting this patch alone results in build failures. Reverting this patch as well as the second patch in the series (to avoid the build failures) fixes the problem. Guenter --- bisect log: # bad: [cf09e328589a2ed7f6c8d90f2edb697fb4f8a96b] Add linux-next specific files for 20230524 # good: [44c026a73be8038f03dbdeef028b642880cf1511] Linux 6.4-rc3 git bisect start 'HEAD' 'v6.4-rc3' # good: [a20d8ab9e26daaeeaf971139b736981cf164ab0a] Merge branch 'for-linux-next' of git://anongit.freedesktop.org/drm/drm-misc git bisect good a20d8ab9e26daaeeaf971139b736981cf164ab0a # good: [2714032dfd641b22695e14efd5f9dff08a5e3245] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git git bisect good 2714032dfd641b22695e14efd5f9dff08a5e3245 # good: [b2bc2854ec87557033538aa9290f70b9141a6653] Merge branch 'for-leds-next' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git git bisect good b2bc2854ec87557033538aa9290f70b9141a6653 # good: [26931c8431566f9bec7d57512e4cad8ebaeb024f] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git git bisect good 26931c8431566f9bec7d57512e4cad8ebaeb024f # good: [669623b562b5cd308eaa58eabe8c72007dbb37e2] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git git bisect good 669623b562b5cd308eaa58eabe8c72007dbb37e2 # good: [a0ef85b20ffa65a89dc79b0a22edb80a88199939] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching git bisect good a0ef85b20ffa65a89dc79b0a22edb80a88199939 # bad: [a64335537001eb6af6e57a82317985441dafe4e7] Merge branch 'sysctl-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git git bisect bad a64335537001eb6af6e57a82317985441dafe4e7 # good: [ba3ad1554b569888f4a63a2e4a16a9009fdedd4e] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git git bisect good ba3ad1554b569888f4a63a2e4a16a9009fdedd4e # good: [3133f141259d7f6e0729db272f22724614472661] Merge branch 'slab/for-6.5/prandom' into slab/for-next git bisect good 3133f141259d7f6e0729db272f22724614472661 # good: [2716d45c6fdc1ae06e83db28f58f55f7e9415643] sysctl: stop exporting register_sysctl_table git bisect good 2716d45c6fdc1ae06e83db28f58f55f7e9415643 # good: [8ccb380db3a4bcef9ade852da8b33fdcea01c8a5] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git git bisect good 8ccb380db3a4bcef9ade852da8b33fdcea01c8a5 # bad: [ee996cff1fb203bffc8de5c87cab6056d60df71d] sysctl: Remove register_sysctl_table git bisect bad ee996cff1fb203bffc8de5c87cab6056d60df71d # bad: [7eec88986dce2d85012fbe516def7a2d7d77735c] sysctl: Refactor base paths registrations git bisect bad 7eec88986dce2d85012fbe516def7a2d7d77735c # first bad commit: [7eec88986dce2d85012fbe516def7a2d7d77735c] sysctl: Refactor base paths registrations
On Wed, May 24, 2023 at 06:29:06AM -0700, Guenter Roeck wrote: > On Thu, May 18, 2023 at 06:07:04PM +0200, Joel Granados wrote: > > This is part of the general push to deprecate register_sysctl_paths and > > register_sysctl_table. The old way of doing this through > > register_sysctl_base and DECLARE_SYSCTL_BASE macro is replaced with a > > call to register_sysctl. The 5 base paths affected are: "kernel", "vm", > > "debug", "dev" and "fs". > > > > We remove the register_sysctl_base function and the DECLARE_SYSCTL_BASE > > macro since they are no longer needed. > > > > In order to quickly acertain that the paths did not actually change I > > executed `find /proc/sys/ | sha1sum` and made sure that the sha was the > > same before and after the commit. > > > > Signed-off-by: Joel Granados <j.granados@samsung.com> > > This patch results in the following warning, seen across almost > all architectures. > > sysctl table check failed: kernel/usermodehelper Not a file > sysctl table check failed: kernel/usermodehelper No proc_handler > sysctl table check failed: kernel/usermodehelper bogus .mode 0555 > sysctl table check failed: kernel/keys Not a file > sysctl table check failed: kernel/keys No proc_handler > sysctl table check failed: kernel/keys bogus .mode 0555 > CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-rc3-next-20230524 #1 > Stack : ffffffff 801aed28 80e44644 00000004 81946ba4 00000000 810d3db4 b782f641 > 810f0000 81269940 810f0000 810fa610 811bb193 00000001 810d3d58 00000000 > 00000000 00000000 810099d8 000000f2 00000001 000000f3 00000000 00000000 > ffffffff 00000002 00000000 fff80000 810f0000 810099d8 00000001 ffffffea > 8013bab4 8113bb14 8013caa8 80fe0000 00000000 807b9d54 00000000 81270000 > ... > Call Trace: > [<8010a558>] show_stack+0x38/0x118 > [<80d67edc>] dump_stack_lvl+0xa4/0xf0 > [<8039c8e0>] __register_sysctl_table+0x5b4/0x7a0 > [<811e55e4>] __register_sysctl_init+0x30/0x68 > [<811d5164>] sysctl_init_bases+0x24/0x88 > [<811e517c>] proc_root_init+0x94/0xa8 > [<811ccebc>] start_kernel+0x704/0x740 > > failed when register_sysctl kern_table to kernel > > Reverting this patch alone results in build failures. Reverting this patch > as well as the second patch in the series (to avoid the build failures) > fixes the problem. > > Guenter Thanks Guenter! The issue has been fixed on sysct-next, and I suppose the fix will get into linux-next as of tomorrow. Luis
diff --git a/fs/sysctls.c b/fs/sysctls.c index c701273c9432..228420f5fe1b 100644 --- a/fs/sysctls.c +++ b/fs/sysctls.c @@ -29,11 +29,14 @@ static struct ctl_table fs_shared_sysctls[] = { { } }; -DECLARE_SYSCTL_BASE(fs, fs_shared_sysctls); - static int __init init_fs_sysctls(void) { - return register_sysctl_base(fs); + /* + * We do not check the return code for register_sysctl because the + * original call to register_sysctl_base always returned 0. + */ + register_sysctl("fs", fs_shared_sysctls); + return 0; } early_initcall(init_fs_sysctls); diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 218e56a26fb0..653b66c762b1 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -197,20 +197,6 @@ struct ctl_path { #ifdef CONFIG_SYSCTL -#define DECLARE_SYSCTL_BASE(_name, _table) \ -static struct ctl_table _name##_base_table[] = { \ - { \ - .procname = #_name, \ - .mode = 0555, \ - .child = _table, \ - }, \ - { }, \ -} - -extern int __register_sysctl_base(struct ctl_table *base_table); - -#define register_sysctl_base(_name) __register_sysctl_base(_name##_base_table) - void proc_sys_poll_notify(struct ctl_table_poll *poll); extern void setup_sysctl_set(struct ctl_table_set *p, @@ -247,15 +233,6 @@ extern struct ctl_table sysctl_mount_point[]; #else /* CONFIG_SYSCTL */ -#define DECLARE_SYSCTL_BASE(_name, _table) - -static inline int __register_sysctl_base(struct ctl_table *base_table) -{ - return 0; -} - -#define register_sysctl_base(table) __register_sysctl_base(table) - static inline void register_sysctl_init(const char *path, struct ctl_table *table) { } diff --git a/kernel/sysctl.c b/kernel/sysctl.c index bfe53e835524..f784b0fe5689 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2348,17 +2348,12 @@ static struct ctl_table dev_table[] = { { } }; -DECLARE_SYSCTL_BASE(kernel, kern_table); -DECLARE_SYSCTL_BASE(vm, vm_table); -DECLARE_SYSCTL_BASE(debug, debug_table); -DECLARE_SYSCTL_BASE(dev, dev_table); - int __init sysctl_init_bases(void) { - register_sysctl_base(kernel); - register_sysctl_base(vm); - register_sysctl_base(debug); - register_sysctl_base(dev); + register_sysctl("kernel", kern_table); + register_sysctl("vm", vm_table); + register_sysctl("debug", debug_table); + register_sysctl("dev", dev_table); return 0; }