Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5547765pxb; Mon, 14 Feb 2022 01:32:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRITkvXryoUXQDyf1PRWOfLCZFn7hOsgAl8//hCLiOInctVS66NGpICB2CeHLhyve7qcQC X-Received: by 2002:a17:906:4fcb:: with SMTP id i11mr10692029ejw.269.1644831120261; Mon, 14 Feb 2022 01:32:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644831120; cv=none; d=google.com; s=arc-20160816; b=Omlad2QVHAjanrGAWs8RfgOGctVXlPFc1to3qBROO+w2M8QwIkrf3RhQaCah45eu1+ NEbZc5sXR5mynX3Mo0g4QmCKtS7PV5IDY2gI2nmKqCmvR6X66KwgPCGO7F1KDU8weZh5 HjmzSFK4HjU8nz+2FVR7Ex+wL8dF2yVKIcK/PxTKFgZRx6HyPgmKzFxAaWKOumYkPKFN c3K2VezzV2NxDgmWfJ8QtyEK32oQtiEoj8ZWhgahQw/AhX84myExhctExuxEFFhFLMcg Pgbctq5VPc96zl63737YM7ANgfbN5ThtXKmT+3SNgZHK/UriyR8hL5s6y21ZVPJEpSkH juBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KnKCC7oMagFCvCCjM7qG97XmzNcP6hM32qMyVum/dto=; b=NRk6+IDOBEFxGx6Ap5PK0+Qgi1LF8nPoKx9Yu6awet9bssZZZgvIBHF3PftS0M1Jrv qsDIshhZwgRlAgVGonICopxoh4GpVB87NZIZFi91+dGtL9eZOeZu0NE3gwq+G7SzNQ2t bLpOoLk9gAUPDOGmijwNngJU1Fu1yv72fL7U48WkjAX8ECVc0eRcJflY2//hT/yFPdHK ohKgSgOT7JEJCZgL7IT6OYbTZWWcEFuGpteBof+qBIAsxHu7fxxigw6jBCuRFxZHHsqF UWPeZDujv6VxV76aiKlS7HCz+9n2h9iyACRc+On0jzYGHPzbaGtV3tAyjOzaiDDXgnLn P1Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MBIsTxnu; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1si1738912eje.459.2022.02.14.01.31.37; Mon, 14 Feb 2022 01:32:00 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=MBIsTxnu; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238374AbiBMVLB (ORCPT + 99 others); Sun, 13 Feb 2022 16:11:01 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238366AbiBMVLA (ORCPT ); Sun, 13 Feb 2022 16:11:00 -0500 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1B7653736; Sun, 13 Feb 2022 13:10:53 -0800 (PST) Received: by mail-yb1-xb2f.google.com with SMTP id y6so40658328ybc.5; Sun, 13 Feb 2022 13:10:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KnKCC7oMagFCvCCjM7qG97XmzNcP6hM32qMyVum/dto=; b=MBIsTxnulA1MrNZ+IsfyQOaRrtwl2q4GUdFP2YSW/j/CQ7Uo5Oyds++JXr0KB6K9x+ VvreKfnZ4OI7eVME/n17ninBX9E56yUSQQ2R5qj1lIXf8yPQQYP0ERc5X1WpaRPHcP6q QBrvTrlTGLyZ33s8yg3ouAySmVx67aNQvEXNDL9nOKXi0E+hnuwldGSabx914lYBnHX/ z3iO9qpTjoXA7zxlL3mje/Z58DspXjcEz6W1Er/cCM6QtpZm7+Fqnit3iBgWOcMGkzpT 3G/s1CZFbveKF+K2Tz9XNltXXoekdReLddn9QZCT9+yQ8vWU3HTdGuaU+22FP9LRB0Wd ZMIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KnKCC7oMagFCvCCjM7qG97XmzNcP6hM32qMyVum/dto=; b=kL8AVBJqWXh3lXFDbx9yqD6X9xDvT1XimpC2m/NKAM2qNi07YZFWCwHpm2qo/kL/0E R86nAwjUqFirs7Mbn00PuTfyAvZMNTaXb4Tmqr4le9YkcER7kF/AXGIh6FeOe/aT1G7e ZTArl7nbQUT73ayfORRJdqKAwF2crtlF7njI146ESkaBudGZP/BXPKgCWOiT5EEKLcBC WOtU0bh8VHkF0f7LV8BKIajZx/3y35AshHlaLmjOlmmFiTKNuOT030OoysIxV5s8MWQh Qf8TAfsOHVAZJjvDzEE/shc3pWafxDGz4ytJQt/eZwHVnRrZ1aZRJkOsBV/FqJKztCNI ZTBA== X-Gm-Message-State: AOAM531bBJsuxNhaiHvBMOqAa91tMKYM66wfOLgdrO237RTk6kvI8Z1u Lrf/IUL/qVyXcu6CeFtz/E9dQ97BNY/20A0V9Xk= X-Received: by 2002:a05:6902:124f:: with SMTP id t15mr11084809ybu.640.1644786652734; Sun, 13 Feb 2022 13:10:52 -0800 (PST) MIME-Version: 1.0 References: <20220121221021.60533b009c357d660791476e@linux-foundation.org> <20220122061228.nmuo75sDn%akpm@linux-foundation.org> In-Reply-To: From: Tong Zhang Date: Sun, 13 Feb 2022 13:10:42 -0800 Message-ID: Subject: Re: [PATCH v2] Fix regression due to "fs: move binfmt_misc sysctl to its own file" To: Ido Schimmel Cc: Domenico Andreoli , Luis Chamberlain , "Eric W. Biederman" , David Airlie , Andrew Morton , amir73il@gmail.com, Andy Shevchenko , Arnd Bergmann , bcrl@kvack.org, benh@kernel.crashing.org, clemens@ladisch.de, crope@iki.fi, dgilbert@interlog.com, Greg KH , jack@suse.cz, jani.nikula@intel.com, Jani Nikula , "James E.J. Bottomley" , jlbec@evilplan.org, john.ogness@linutronix.de, Joonas Lahtinen , Joseph Qi , julia.lawall@inria.fr, Kees Cook , kernel@tuxforce.de, Linux Memory Management List , Mark Fasheh , "Martin K. Petersen" , mm-commits@vger.kernel.org, nixiaoming@huawei.com, penguin-kernel@i-love.sakura.ne.jp, peterz@infradead.org, Phillip Potter , Paul Turner , pmladek@suse.com, rafael@kernel.org, Rodrigo Vivi , rostedt@goodmis.org, senozhatsky@chromium.org, sre@kernel.org, steve@sk2.org, Suren Baghdasaryan , Linus Torvalds , tytso@mit.edu, Al Viro , wangqing@vivo.com, Iurii Zaikin , open list , regressions@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 13, 2022 at 7:34 AM Ido Schimmel wrote: > > On Wed, Feb 09, 2022 at 08:49:20AM +0100, Domenico Andreoli wrote: > > fs/binfmt_misc.c | 6 +----- > > fs/file_table.c | 2 ++ > > 2 files changed, 3 insertions(+), 5 deletions(-) > > > > Index: b/fs/binfmt_misc.c > > =================================================================== > > --- a/fs/binfmt_misc.c > > +++ b/fs/binfmt_misc.c > > @@ -817,20 +817,16 @@ static struct file_system_type bm_fs_typ > > }; > > MODULE_ALIAS_FS("binfmt_misc"); > > > > -static struct ctl_table_header *binfmt_misc_header; > > - > > static int __init init_misc_binfmt(void) > > { > > int err = register_filesystem(&bm_fs_type); > > if (!err) > > insert_binfmt(&misc_format); > > - binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc"); > > - return 0; > > + return err; > > } > > > > static void __exit exit_misc_binfmt(void) > > { > > - unregister_sysctl_table(binfmt_misc_header); > > unregister_binfmt(&misc_format); > > unregister_filesystem(&bm_fs_type); > > } > > Index: b/fs/file_table.c > > =================================================================== > > --- a/fs/file_table.c > > +++ b/fs/file_table.c > > @@ -119,6 +119,8 @@ static struct ctl_table fs_stat_sysctls[ > > static int __init init_fs_stat_sysctls(void) > > { > > register_sysctl_init("fs", fs_stat_sysctls); > > + if (IS_ENABLED(CONFIG_BINFMT_MISC)) > > + register_sysctl_mount_point("fs/binfmt_misc"); > > Hi, > > kmemleak complains about this: > > # cat /sys/kernel/debug/kmemleak > unreferenced object 0xffff8881045fea88 (size 96): > comm "swapper/0", pid 1, jiffies 4294669355 (age 167.804s) > hex dump (first 32 bytes): > e0 c8 07 88 ff ff ff ff 00 00 00 00 01 00 00 00 ................ > 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [] __register_sysctl_table+0x117/0x1150 > [] init_fs_stat_sysctls+0x30/0x33 > [] do_one_initcall+0x108/0x690 > [] kernel_init_freeable+0x45a/0x4de > [] kernel_init+0x1f/0x220 > [] ret_from_fork+0x1f/0x30 > > > return 0; > > } > > fs_initcall(init_fs_stat_sysctls); > > Hi Ido, Thanks for the report. This is a known issue. The fix is proposed here. https://lore.kernel.org/all/YgRbEG21AUrLSFKX@bombadil.infradead.org/ Thanks, - Tong