Skip to contentSkip to conversation

fs: fix sysctls.c built

PATCH In review Kefeng Wang 3 participants 11 messages Mar 31, 2023 – Apr 14, 2023 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: fix sysctls.c built

'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")
---
 fs/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/Makefile +1 -2
index 05f89b5c962f..8d4736fcc766 100644
@@ -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/
Signature · 1 line
2.35.3
#1 lore raw

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

Quoted 30 lines · Kefeng Wang

'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")
---
  fs/Makefile | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
fs/Makefile +1 -2
index 05f89b5c962f..8d4736fcc766 100644
@@ -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/
#2 lore raw
Quoted 24 lines · Kefeng Wang

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

Quoted 19 lines · Kefeng Wang

'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")
---
  fs/Makefile | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
fs/Makefile +0 -1
index 05f89b5c962f..8d4736fcc766 100644
@@ -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 \
Quoted 8 lines

fs/Makefile obj-$(CONFIG_FS_MBCACHE) += mbcache.o · line 54

Quoted 8 lines
fs/Makefile +1 -1
@@ -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.

#3 lore raw
Quoted 8 lines · Christian Brauner
Quoted 7 lines · Kefeng Wang

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

Quoted 2 lines · Kefeng Wang

'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", or it won't be built as it is overwrited.

...

Quoted 3 lines

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.

Quoted 1 line
#4 lore raw
Quoted 12 lines · Kefeng Wang
Quoted 8 lines · Christian Brauner
Quoted 7 lines · Kefeng Wang

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

Quoted 2 lines · Kefeng Wang

'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", or it won't be built as it is overwrited.

Quoted 8 lines

...

Quoted 3 lines

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(-)
fs/Makefile +13 -11
index 05f89b5c962f..dfaea8a28d92 100644
@@ -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

#5 lore raw
Quoted 19 lines · Christian Brauner
Quoted 18 lines · Kefeng Wang
Quoted 8 lines · Christian Brauner
Quoted 7 lines · Kefeng Wang

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

Quoted 2 lines · Kefeng Wang

'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", or it won't be built as it is overwrited.

...

Quoted 3 lines

Given the description in
ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") you probably want to move this earlier.

Quoted 6 lines
Quoted 2 lines

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,

Quoted 1 line

UNTESTED

Will try,

Quoted 24 lines
---
  fs/Makefile | 24 +++++++++++++-----------
  1 file changed, 13 insertions(+), 11 deletions(-)
fs/Makefile +1 -11
index 05f89b5c962f..dfaea8a28d92 100644
@@ -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

fs/Makefile line 19

Quoted 10 lines
fs/Makefile +10 -0
+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 ?

Quoted 7 lines
fs/Makefile +2 -1
+                          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

#6 lore raw
Quoted 63 lines · Kefeng Wang
Quoted 19 lines · Christian Brauner
Quoted 18 lines · Kefeng Wang
Quoted 8 lines · Christian Brauner
Quoted 7 lines · Kefeng Wang

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

Quoted 2 lines · Kefeng Wang

'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", or it won't be built as it is overwrited.

...

Quoted 3 lines

Given the description in
ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") you probably want to move this earlier.

Quoted 6 lines
Quoted 2 lines

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,

Quoted 1 line

UNTESTED

Will try,

Quoted 28 lines
---
  fs/Makefile | 24 +++++++++++++-----------
  1 file changed, 13 insertions(+), 11 deletions(-)
fs/Makefile +5 -11
index 05f89b5c962f..dfaea8a28d92 100644
@@ -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 \
Quoted 8 lines

fs/Makefile line 19

Quoted 6 lines
fs/Makefile +6 -0
+                          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.

#7 lore raw
In reply to Christian Brauner
Quoted 29 lines · Christian Brauner
Quoted 28 lines · Kefeng Wang

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

Quoted 23 lines · Kefeng Wang

'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")
---
  fs/Makefile | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
fs/Makefile +0 -1
index 05f89b5c962f..8d4736fcc766 100644
@@ -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
Quoted 8 lines
Quoted 4 lines

fs/Makefile obj-$(CONFIG_FS_MBCACHE) += mbcache.o · line 55

Quoted 4 lines
fs/Makefile +1 -1
-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

#8 lore raw
Quoted 50 lines · Luis Chamberlain
Quoted 29 lines · Christian Brauner
Quoted 28 lines · Kefeng Wang

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

Quoted 23 lines · Kefeng Wang

'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")
---
  fs/Makefile | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
fs/Makefile +0 -1
index 05f89b5c962f..8d4736fcc766 100644
@@ -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
Quoted 8 lines
Quoted 4 lines

fs/Makefile obj-$(CONFIG_FS_MBCACHE) += mbcache.o · line 55

Quoted 4 lines
fs/Makefile +1 -1
-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

Quoted 8 lines

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

#9 lore raw
Quoted 57 lines · Luis Chamberlain
Quoted 56 lines · Luis Chamberlain
Quoted 29 lines · Christian Brauner
Quoted 28 lines · Kefeng Wang

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

Quoted 23 lines · Kefeng Wang

'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")
---
  fs/Makefile | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
fs/Makefile +0 -1
index 05f89b5c962f..8d4736fcc766 100644
@@ -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
Quoted 8 lines
Quoted 4 lines

fs/Makefile obj-$(CONFIG_FS_MBCACHE) += mbcache.o · line 55

Quoted 4 lines
fs/Makefile +1 -1
-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

Quoted 8 lines
Quoted 2 lines

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

#10 lore raw
Quoted 8 lines · Luis Chamberlain
Quoted 7 lines · Luis Chamberlain
Quoted 6 lines · Luis Chamberlain
Quoted 5 lines · Christian Brauner
Quoted 4 lines · Kefeng Wang

/proc/sys/fs/overflowuid and overflowgid will be lost without building this file, kindly ping, any comments, thanks.

...

Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 4 lines

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

Quoted 8 lines
Quoted 8 lines
Quoted 2 lines

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.

Quoted 7 lines

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