Message ID | 20230331084502.155284-1-wangkefeng.wang@huawei.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 b10csp411009vqo; Fri, 31 Mar 2023 01:42:24 -0700 (PDT) X-Google-Smtp-Source: AKy350b0e9xWP0IlOP9EJ8OsxAMOZLawY4RC00b6Cau+QdEIeG/4IFPPtveKF/YjwrOIyHaiix/2 X-Received: by 2002:a17:90b:1809:b0:237:bf05:40b with SMTP id lw9-20020a17090b180900b00237bf05040bmr31128886pjb.20.1680252144159; Fri, 31 Mar 2023 01:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680252144; cv=none; d=google.com; s=arc-20160816; b=WMn2jXwYOFemMVrOkxC2yM7ROUJEfRh25xxfV6iGZSLk5AS94YSiy/Ts4LFI/GqwXN rqXN4iK7RU2G3ljzwVpYpKy1a7MFsW7ISK7Xf3oRCUulmHheEtRxQSuqpAFeL5h6kRRM hgGFMTJst+4t5GhPMF1bChHCe1nBxsiOTjJ6rZ8H/dL21OBFAfI9Txomppip+erQAUzk VBSShgyHqQo24anCu0JnNieZUP4kmsHMVahuaqZZxmQq4gUaew7d4jA6+/dgW8GkhIqf pqGAwnzOmDLsUsgpEwc3izrDvccosm4mPDyj9KZqf6svYq3O/MaLGzI1UMGCLd7qURLp PrjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=k/6ep9MMfxmdhcIXTV9erMNspxkSmBJF4WuXB4C+R5M=; b=AWQrHe8ZyeRQiJYvUv3NZDqrpch4Il6Ho1Cpk6vgybHm9CKm5fnsecloDfjXAElwqZ 1s4B0yKY/riBQ6+cpIDvsxjhODR2iAINTC/9GYbga7NahLYfy7GdGrCZMu0RqLtQqr3c 16tKSUOc5vOjtaDLeGX5V8kWmMxGSkA0zVLxMiRysgIE/djM8kP54IuJ3qwdV0F/tuiI BHc4BbAVUUNK5OICTItCMOQG7q/UX1/bRjabvNU1zTYoWo083LPLZIFs4dROxFhekzW1 LV4GS60Iu7vkWGUAhxNcI6nTi3YRKN1SQfPyxFKCx8bG987di7o+/Mi98aZ7H31xv5qe OWyw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf15-20020a17090b0b0f00b00237413f8c6esi5930259pjb.154.2023.03.31.01.42.11; Fri, 31 Mar 2023 01:42:24 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231422AbjCaI0H (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 31 Mar 2023 04:26:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231293AbjCaIZx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 31 Mar 2023 04:25:53 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C010A1D84F; Fri, 31 Mar 2023 01:25:43 -0700 (PDT) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PntZ63ZxnzgZTg; Fri, 31 Mar 2023 16:22:22 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 31 Mar 2023 16:25:41 +0800 From: Kefeng Wang <wangkefeng.wang@huawei.com> To: Luis Chamberlain <mcgrof@kernel.org> CC: <linux-fsdevel@vger.kernel.org>, Andrew Morton <akpm@linux-foundation.org>, <linux-kernel@vger.kernel.org>, Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, Kefeng Wang <wangkefeng.wang@huawei.com> Subject: [PATCH] fs: fix sysctls.c built Date: Fri, 31 Mar 2023 16:45:02 +0800 Message-ID: <20230331084502.155284-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1761872072596591678?= X-GMAIL-MSGID: =?utf-8?q?1761872072596591678?= |
Series |
fs: fix sysctls.c built
|
|
Commit Message
Kefeng Wang
March 31, 2023, 8:45 a.m. UTC
'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=",
or it won't be built as it is overwrited.
Fixes: ab171b952c6e ("fs: move namespace sysctls and declare fs base directory")
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
fs/Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks. On 2023/3/31 16:45, Kefeng Wang wrote: > 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", > or it won't be built as it is overwrited. > > Fixes: ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> > --- > fs/Makefile | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/Makefile b/fs/Makefile > index 05f89b5c962f..8d4736fcc766 100644 > --- a/fs/Makefile > +++ b/fs/Makefile > @@ -6,7 +6,6 @@ > # Rewritten to use lists instead of if-statements. > # > > -obj-$(CONFIG_SYSCTL) += sysctls.o > > obj-y := open.o read_write.o file_table.o super.o \ > char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ > @@ -50,7 +49,7 @@ obj-$(CONFIG_FS_MBCACHE) += mbcache.o > obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o > obj-$(CONFIG_NFS_COMMON) += nfs_common/ > obj-$(CONFIG_COREDUMP) += coredump.o > -obj-$(CONFIG_SYSCTL) += drop_caches.o > +obj-$(CONFIG_SYSCTL) += drop_caches.o sysctls.o > > obj-$(CONFIG_FHANDLE) += fhandle.o > obj-y += iomap/
On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote: > /proc/sys/fs/overflowuid and overflowgid will be lost without > building this file, kindly ping, any comments, thanks. > > > On 2023/3/31 16:45, Kefeng Wang wrote: > > 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", > > or it won't be built as it is overwrited. > > > > Fixes: ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> > > --- > > fs/Makefile | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/fs/Makefile b/fs/Makefile > > index 05f89b5c962f..8d4736fcc766 100644 > > --- a/fs/Makefile > > +++ b/fs/Makefile > > @@ -6,7 +6,6 @@ > > # Rewritten to use lists instead of if-statements. > > # > > -obj-$(CONFIG_SYSCTL) += sysctls.o > > obj-y := open.o read_write.o file_table.o super.o \ > > char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ > > @@ -50,7 +49,7 @@ obj-$(CONFIG_FS_MBCACHE) += mbcache.o > > obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o > > obj-$(CONFIG_NFS_COMMON) += nfs_common/ > > obj-$(CONFIG_COREDUMP) += coredump.o > > -obj-$(CONFIG_SYSCTL) += drop_caches.o > > +obj-$(CONFIG_SYSCTL) += drop_caches.o sysctls.o > > obj-$(CONFIG_FHANDLE) += fhandle.o > > obj-y += iomap/ Given the description in ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") you probably want to move this earlier.
On 2023/4/12 17:19, Christian Brauner wrote: > On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote: >> /proc/sys/fs/overflowuid and overflowgid will be lost without >> building this file, kindly ping, any comments, thanks. >> >> >> On 2023/3/31 16:45, Kefeng Wang wrote: >>> 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", >>> or it won't be built as it is overwrited. ... > Given the description in > ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > you probably want to move this earlier. Oh, missing that part, but the /proc/sys/fs/overflowuid and overflowgid are lost after it, is it expected? Luis, could you take a look? thanks. >
On Thu, Apr 13, 2023 at 09:34:54AM +0800, Kefeng Wang wrote: > > > On 2023/4/12 17:19, Christian Brauner wrote: > > On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote: > > > /proc/sys/fs/overflowuid and overflowgid will be lost without > > > building this file, kindly ping, any comments, thanks. > > > > > > > > > On 2023/3/31 16:45, Kefeng Wang wrote: > > > > 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", > > > > or it won't be built as it is overwrited. > > ... > > > Given the description in > > ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > > you probably want to move this earlier. > > Oh, missing that part, but the /proc/sys/fs/overflowuid and overflowgid are > lost after it, is it expected? Luis, could you take a look? thanks. No, /proc/sys/fs/overflow{g,u}id need to be there of course. What I mean is something like the following (similar to how net/core/ does it): UNTESTED --- fs/Makefile | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/fs/Makefile b/fs/Makefile index 05f89b5c962f..dfaea8a28d92 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -6,17 +6,19 @@ # Rewritten to use lists instead of if-statements. # -obj-$(CONFIG_SYSCTL) += sysctls.o - -obj-y := open.o read_write.o file_table.o super.o \ - char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ - ioctl.o readdir.o select.o dcache.o inode.o \ - attr.o bad_inode.o file.o filesystems.o namespace.o \ - seq_file.o xattr.o libfs.o fs-writeback.o \ - pnode.o splice.o sync.o utimes.o d_path.o \ - stack.o fs_struct.o statfs.o fs_pin.o nsfs.o \ - fs_types.o fs_context.o fs_parser.o fsopen.o init.o \ - kernel_read_file.o mnt_idmapping.o remap_range.o +obj-y := fs_types.o +obj-$(CONFIG_SYSCTL) += sysctls.o +obj-y += open.o read_write.o file_table.o super.o \ + char_dev.o stat.o exec.o pipe.o namei.o \ + fcntl.o ioctl.o readdir.o select.o dcache.o \ + inode.o attr.o bad_inode.o file.o \ + filesystems.o namespace.o seq_file.o \ + xattr.o libfs.o fs-writeback.o pnode.o \ + splice.o sync.o utimes.o d_path.o stack.o \ + fs_struct.o statfs.o fs_pin.o nsfs.o \ + fs_types.o fs_context.o fs_parser.o \ + fsopen.o init.o kernel_read_file.o \ + mnt_idmapping.o remap_range.o ifeq ($(CONFIG_BLOCK),y) obj-y += buffer.o mpage.o -- 2.34.1
On 2023/4/13 16:35, Christian Brauner wrote: > On Thu, Apr 13, 2023 at 09:34:54AM +0800, Kefeng Wang wrote: >> >> >> On 2023/4/12 17:19, Christian Brauner wrote: >>> On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote: >>>> /proc/sys/fs/overflowuid and overflowgid will be lost without >>>> building this file, kindly ping, any comments, thanks. >>>> >>>> >>>> On 2023/3/31 16:45, Kefeng Wang wrote: >>>>> 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", >>>>> or it won't be built as it is overwrited. >> >> ... >> >>> Given the description in >>> ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") >>> you probably want to move this earlier. >> >> Oh, missing that part, but the /proc/sys/fs/overflowuid and overflowgid are >> lost after it, is it expected? Luis, could you take a look? thanks. > > No, /proc/sys/fs/overflow{g,u}id need to be there of course. What I mean > is something like the following (similar to how net/core/ does it): > Thanks for your explanation, > UNTESTED Will try, > --- > fs/Makefile | 24 +++++++++++++----------- > 1 file changed, 13 insertions(+), 11 deletions(-) > > diff --git a/fs/Makefile b/fs/Makefile > index 05f89b5c962f..dfaea8a28d92 100644 > --- a/fs/Makefile > +++ b/fs/Makefile > @@ -6,17 +6,19 @@ > # Rewritten to use lists instead of if-statements. > # > > -obj-$(CONFIG_SYSCTL) += sysctls.o > - > -obj-y := open.o read_write.o file_table.o super.o \ > - char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ > - ioctl.o readdir.o select.o dcache.o inode.o \ > - attr.o bad_inode.o file.o filesystems.o namespace.o \ > - seq_file.o xattr.o libfs.o fs-writeback.o \ > - pnode.o splice.o sync.o utimes.o d_path.o \ > - stack.o fs_struct.o statfs.o fs_pin.o nsfs.o \ > - fs_types.o fs_context.o fs_parser.o fsopen.o init.o \ > - kernel_read_file.o mnt_idmapping.o remap_range.o > +obj-y := fs_types.o > +obj-$(CONFIG_SYSCTL) += sysctls.o > +obj-y += open.o read_write.o file_table.o super.o \ > + char_dev.o stat.o exec.o pipe.o namei.o \ > + fcntl.o ioctl.o readdir.o select.o dcache.o \ > + inode.o attr.o bad_inode.o file.o \ > + filesystems.o namespace.o seq_file.o \ > + xattr.o libfs.o fs-writeback.o pnode.o \ > + splice.o sync.o utimes.o d_path.o stack.o \ > + fs_struct.o statfs.o fs_pin.o nsfs.o \ > + fs_types.o fs_context.o fs_parser.o \ drop this fs_types.o ? > + fsopen.o init.o kernel_read_file.o \ > + mnt_idmapping.o remap_range.o > > ifeq ($(CONFIG_BLOCK),y) > obj-y += buffer.o mpage.o > -- > 2.34.1 >
On Thu, Apr 13, 2023 at 05:45:20PM +0800, Kefeng Wang wrote: > > > On 2023/4/13 16:35, Christian Brauner wrote: > > On Thu, Apr 13, 2023 at 09:34:54AM +0800, Kefeng Wang wrote: > > > > > > > > > On 2023/4/12 17:19, Christian Brauner wrote: > > > > On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote: > > > > > /proc/sys/fs/overflowuid and overflowgid will be lost without > > > > > building this file, kindly ping, any comments, thanks. > > > > > > > > > > > > > > > On 2023/3/31 16:45, Kefeng Wang wrote: > > > > > > 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", > > > > > > or it won't be built as it is overwrited. > > > > > > ... > > > > > > > Given the description in > > > > ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > > > > you probably want to move this earlier. > > > > > > Oh, missing that part, but the /proc/sys/fs/overflowuid and overflowgid are > > > lost after it, is it expected? Luis, could you take a look? thanks. > > > > No, /proc/sys/fs/overflow{g,u}id need to be there of course. What I mean > > is something like the following (similar to how net/core/ does it): > > > > Thanks for your explanation, > > > UNTESTED > > Will try, > > > --- > > fs/Makefile | 24 +++++++++++++----------- > > 1 file changed, 13 insertions(+), 11 deletions(-) > > > > diff --git a/fs/Makefile b/fs/Makefile > > index 05f89b5c962f..dfaea8a28d92 100644 > > --- a/fs/Makefile > > +++ b/fs/Makefile > > @@ -6,17 +6,19 @@ > > # Rewritten to use lists instead of if-statements. > > # > > > > -obj-$(CONFIG_SYSCTL) += sysctls.o > > - > > -obj-y := open.o read_write.o file_table.o super.o \ > > - char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ > > - ioctl.o readdir.o select.o dcache.o inode.o \ > > - attr.o bad_inode.o file.o filesystems.o namespace.o \ > > - seq_file.o xattr.o libfs.o fs-writeback.o \ > > - pnode.o splice.o sync.o utimes.o d_path.o \ > > - stack.o fs_struct.o statfs.o fs_pin.o nsfs.o \ > > - fs_types.o fs_context.o fs_parser.o fsopen.o init.o \ > > - kernel_read_file.o mnt_idmapping.o remap_range.o > > +obj-y := fs_types.o > > +obj-$(CONFIG_SYSCTL) += sysctls.o > > +obj-y += open.o read_write.o file_table.o super.o \ > > + char_dev.o stat.o exec.o pipe.o namei.o \ > > + fcntl.o ioctl.o readdir.o select.o dcache.o \ > > + inode.o attr.o bad_inode.o file.o \ > > + filesystems.o namespace.o seq_file.o \ > > + xattr.o libfs.o fs-writeback.o pnode.o \ > > + splice.o sync.o utimes.o d_path.o stack.o \ > > + fs_struct.o statfs.o fs_pin.o nsfs.o \ > > + fs_types.o fs_context.o fs_parser.o \ > > drop this fs_types.o ? Yes.
On Wed, Apr 12, 2023 at 11:19:56AM +0200, Christian Brauner wrote: > On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote: > > /proc/sys/fs/overflowuid and overflowgid will be lost without > > building this file, kindly ping, any comments, thanks. > > > > > > On 2023/3/31 16:45, Kefeng Wang wrote: > > > 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", > > > or it won't be built as it is overwrited. > > > > > > Fixes: ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> > > > --- > > > fs/Makefile | 3 +-- > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > > > diff --git a/fs/Makefile b/fs/Makefile > > > index 05f89b5c962f..8d4736fcc766 100644 > > > --- a/fs/Makefile > > > +++ b/fs/Makefile > > > @@ -6,7 +6,6 @@ > > > # Rewritten to use lists instead of if-statements. > > > # > > > -obj-$(CONFIG_SYSCTL) += sysctls.o > > > obj-y := open.o read_write.o file_table.o super.o \ > > > char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ > > > @@ -50,7 +49,7 @@ obj-$(CONFIG_FS_MBCACHE) += mbcache.o > > > obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o > > > obj-$(CONFIG_NFS_COMMON) += nfs_common/ > > > obj-$(CONFIG_COREDUMP) += coredump.o > > > -obj-$(CONFIG_SYSCTL) += drop_caches.o > > > +obj-$(CONFIG_SYSCTL) += drop_caches.o sysctls.o > > > obj-$(CONFIG_FHANDLE) += fhandle.o > > > obj-y += iomap/ > > Given the description in > ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > you probably want to move this earlier. I was being *way* too cautious and I was wrong, so I'll take Kefang's patch as I can verify now that order does not matter and his patch is correct. I've corrected the documentation and clarified this on sysctl-next and so reflected on linux-next too with these two patches: sysctl: clarify register_sysctl_init() base directory order https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=8ae59580f2b0529b6dd1a1cda6b838cfb268cb87 proc_sysctl: move helper which creates required subdirectories https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=f4c09b14073513efd581459520a01c4c88cb24d7 proc_sysctl: update docs for __register_sysctl_table() https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=d59d91edd67ec4cef62f26249510fe08b291ae72 proc_sysctl: enhance documentation https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=eb472aa0678fd03321093bffeb9c7fd7f5035844 And so something we can do eventually is do away with all the base stuff. For now it's fine, it's not creating an issue. Luis
On Thu, Apr 13, 2023 at 10:06:35AM -0700, Luis Chamberlain wrote: > On Wed, Apr 12, 2023 at 11:19:56AM +0200, Christian Brauner wrote: > > On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote: > > > /proc/sys/fs/overflowuid and overflowgid will be lost without > > > building this file, kindly ping, any comments, thanks. > > > > > > > > > On 2023/3/31 16:45, Kefeng Wang wrote: > > > > 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", > > > > or it won't be built as it is overwrited. > > > > > > > > Fixes: ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > > > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> > > > > --- > > > > fs/Makefile | 3 +-- > > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > > > > > diff --git a/fs/Makefile b/fs/Makefile > > > > index 05f89b5c962f..8d4736fcc766 100644 > > > > --- a/fs/Makefile > > > > +++ b/fs/Makefile > > > > @@ -6,7 +6,6 @@ > > > > # Rewritten to use lists instead of if-statements. > > > > # > > > > -obj-$(CONFIG_SYSCTL) += sysctls.o > > > > obj-y := open.o read_write.o file_table.o super.o \ > > > > char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ > > > > @@ -50,7 +49,7 @@ obj-$(CONFIG_FS_MBCACHE) += mbcache.o > > > > obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o > > > > obj-$(CONFIG_NFS_COMMON) += nfs_common/ > > > > obj-$(CONFIG_COREDUMP) += coredump.o > > > > -obj-$(CONFIG_SYSCTL) += drop_caches.o > > > > +obj-$(CONFIG_SYSCTL) += drop_caches.o sysctls.o > > > > obj-$(CONFIG_FHANDLE) += fhandle.o > > > > obj-y += iomap/ > > > > Given the description in > > ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > > you probably want to move this earlier. > > I was being *way* too cautious and I was wrong, so I'll take Kefang's patch as > I can verify now that order does not matter and his patch is correct. > I've corrected the documentation and clarified this on sysctl-next and > so reflected on linux-next too with these two patches: > > sysctl: clarify register_sysctl_init() base directory order > https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=8ae59580f2b0529b6dd1a1cda6b838cfb268cb87 > > proc_sysctl: move helper which creates required subdirectories > https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=f4c09b14073513efd581459520a01c4c88cb24d7 > > proc_sysctl: update docs for __register_sysctl_table() > https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=d59d91edd67ec4cef62f26249510fe08b291ae72 > > proc_sysctl: enhance documentation > https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=eb472aa0678fd03321093bffeb9c7fd7f5035844 > > And so something we can do eventually is do away with all the base stuff. > For now it's fine, it's not creating an issue. Come to think of it all the above patches except the one that moves code ("proc_sysctl: move helper which creates required subdirectories") are stable fix candidates prior to Kefeng's patch. I'll also update Kefeng's patch to mention stable down to v5.17 and update the other patches with the respective stable tag as well. Luis
On Thu, Apr 13, 2023 at 11:46:24AM -0700, Luis Chamberlain wrote: > On Thu, Apr 13, 2023 at 10:06:35AM -0700, Luis Chamberlain wrote: > > On Wed, Apr 12, 2023 at 11:19:56AM +0200, Christian Brauner wrote: > > > On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote: > > > > /proc/sys/fs/overflowuid and overflowgid will be lost without > > > > building this file, kindly ping, any comments, thanks. > > > > > > > > > > > > On 2023/3/31 16:45, Kefeng Wang wrote: > > > > > 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", > > > > > or it won't be built as it is overwrited. > > > > > > > > > > Fixes: ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > > > > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> > > > > > --- > > > > > fs/Makefile | 3 +-- > > > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > > > > > > > diff --git a/fs/Makefile b/fs/Makefile > > > > > index 05f89b5c962f..8d4736fcc766 100644 > > > > > --- a/fs/Makefile > > > > > +++ b/fs/Makefile > > > > > @@ -6,7 +6,6 @@ > > > > > # Rewritten to use lists instead of if-statements. > > > > > # > > > > > -obj-$(CONFIG_SYSCTL) += sysctls.o > > > > > obj-y := open.o read_write.o file_table.o super.o \ > > > > > char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ > > > > > @@ -50,7 +49,7 @@ obj-$(CONFIG_FS_MBCACHE) += mbcache.o > > > > > obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o > > > > > obj-$(CONFIG_NFS_COMMON) += nfs_common/ > > > > > obj-$(CONFIG_COREDUMP) += coredump.o > > > > > -obj-$(CONFIG_SYSCTL) += drop_caches.o > > > > > +obj-$(CONFIG_SYSCTL) += drop_caches.o sysctls.o > > > > > obj-$(CONFIG_FHANDLE) += fhandle.o > > > > > obj-y += iomap/ > > > > > > Given the description in > > > ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") > > > you probably want to move this earlier. > > > > I was being *way* too cautious and I was wrong, so I'll take Kefang's patch as > > I can verify now that order does not matter and his patch is correct. > > I've corrected the documentation and clarified this on sysctl-next and > > so reflected on linux-next too with these two patches: > > > > sysctl: clarify register_sysctl_init() base directory order > > https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=8ae59580f2b0529b6dd1a1cda6b838cfb268cb87 > > > > proc_sysctl: move helper which creates required subdirectories > > https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=f4c09b14073513efd581459520a01c4c88cb24d7 > > > > proc_sysctl: update docs for __register_sysctl_table() > > https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=d59d91edd67ec4cef62f26249510fe08b291ae72 > > > > proc_sysctl: enhance documentation > > https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=eb472aa0678fd03321093bffeb9c7fd7f5035844 > > > > And so something we can do eventually is do away with all the base stuff. > > For now it's fine, it's not creating an issue. > > Come to think of it all the above patches except the one that moves code > ("proc_sysctl: move helper which creates required subdirectories") are > stable fix candidates prior to Kefeng's patch. I'll also update Kefeng's > patch to mention stable down to v5.17 and update the other patches with > the respective stable tag as well. OK pushed to sysctl-next and updated the patches above also to refer to stable and Cc you guys. Finally, a good reason or value to having Cc on the commit log. It just tmeans you (Christian and Kefeng) will be be CC'd once this trickles to stable kernel trees too. Luis
On 2023/4/14 3:43, Luis Chamberlain wrote: > On Thu, Apr 13, 2023 at 11:46:24AM -0700, Luis Chamberlain wrote: >> On Thu, Apr 13, 2023 at 10:06:35AM -0700, Luis Chamberlain wrote: >>> On Wed, Apr 12, 2023 at 11:19:56AM +0200, Christian Brauner wrote: >>>> On Tue, Apr 11, 2023 at 12:14:44PM +0800, Kefeng Wang wrote: >>>>> /proc/sys/fs/overflowuid and overflowgid will be lost without >>>>> building this file, kindly ping, any comments, thanks. >>>>> >>>>> ... >>>> >>>> Given the description in >>>> ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") >>>> you probably want to move this earlier. >>> >>> I was being *way* too cautious and I was wrong, so I'll take Kefang's patch as >>> I can verify now that order does not matter and his patch is correct. >>> I've corrected the documentation and clarified this on sysctl-next and >>> so reflected on linux-next too with these two patches: >>> >>> sysctl: clarify register_sysctl_init() base directory order >>> https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=8ae59580f2b0529b6dd1a1cda6b838cfb268cb87 >>> >>> proc_sysctl: move helper which creates required subdirectories >>> https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=f4c09b14073513efd581459520a01c4c88cb24d7 >>> >>> proc_sysctl: update docs for __register_sysctl_table() >>> https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=d59d91edd67ec4cef62f26249510fe08b291ae72 >>> >>> proc_sysctl: enhance documentation >>> https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?h=sysctl-next-20230413&id=eb472aa0678fd03321093bffeb9c7fd7f5035844 >>> >>> And so something we can do eventually is do away with all the base stuff. >>> For now it's fine, it's not creating an issue. >> >> Come to think of it all the above patches except the one that moves code >> ("proc_sysctl: move helper which creates required subdirectories") are >> stable fix candidates prior to Kefeng's patch. I'll also update Kefeng's >> patch to mention stable down to v5.17 and update the other patches with >> the respective stable tag as well. Thanks for your detail explanation. > > OK pushed to sysctl-next and updated the patches above also to refer to > stable and Cc you guys. Finally, a good reason or value to having Cc on > the commit log. It just tmeans you (Christian and Kefeng) will be be CC'd > once this trickles to stable kernel trees too. > > Luis
diff --git a/fs/Makefile b/fs/Makefile index 05f89b5c962f..8d4736fcc766 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -6,7 +6,6 @@ # Rewritten to use lists instead of if-statements. # -obj-$(CONFIG_SYSCTL) += sysctls.o obj-y := open.o read_write.o file_table.o super.o \ char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ @@ -50,7 +49,7 @@ obj-$(CONFIG_FS_MBCACHE) += mbcache.o obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o obj-$(CONFIG_NFS_COMMON) += nfs_common/ obj-$(CONFIG_COREDUMP) += coredump.o -obj-$(CONFIG_SYSCTL) += drop_caches.o +obj-$(CONFIG_SYSCTL) += drop_caches.o sysctls.o obj-$(CONFIG_FHANDLE) += fhandle.o obj-y += iomap/