[LINUX] all arch: remove system call sys_sysctl

Looking at the kernel commit log, there were fixes for all architectures. What is this? Note that.

TL; DR: Difficult to remove a feature

This has taken 10 years from the beginning. Thank you to everyone involved and thank you for your hard work.

If you arrange them in chronological order ...

[PATCH] sysctl: Allow /proc/sys without sys_sysctl ( 2006/09/27 )

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/kernel/sysctl.c?id=b89a81712f486e4f7a606987413e387605fdeaf4

Since sys_sysctl is deprecated start allow it to be compiled out. This should catch any remaining user space code that cares, and paves the way for further sysctl cleanups.

Since sys_sysctl is deprecated, we will start excluding it from compilation. It should catch the rest of the userspace code and pave the way for further sysctl cleanup.

sysctl: Separate the binary sysctl logic into it's own file. ( 2006/11/06)

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=61a47c1ad3a4dc

In preparation for more invasive cleanups separate the core binary sysctl logic into it's own file.

Separate the core binary sysctl logic into its own file for more invasive cleanup.

sysctl: Remove the sysctl system call ( 2019/11/26 )

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=61a47c1ad3a4dc

This system call has been deprecated almost since it was introduced, and in a survey of the linux distributions I can no longer find any of them that enable CONFIG_SYSCTL_SYSCALL. The only indication that I can find that anyone might care is that a few of the defconfigs in the kernel enable CONFIG_SYSCTL_SYSCALL. However this appears in only 31 of 414 defconfigs in the kernel, so I suspect this symbols presence is simply because it is harmless to include rather than because it is necessary.

As there appear to be no users of the sysctl system call, remove the code. As this removes one of the few uses of the internal kernel mount of proc I hope this allows for even more simplifications of the proc filesystem.

This system call has been deprecated since it was introduced, and a survey of Linux distributions no longer finds a distribution that enables CONFIG_SYSCTL_SYSCALL. The only way to find out who cares about this is to enable CONFIG_SYSCTL_SYSCALL in some defconfigs in the kernel. However, this only appears in 31 of 414 in the kernel defconfig. Therefore, I consider the existence of this symbol to be unnecessary and harmless to include.

It looks like there are no users of sysctl system call, so remove this code. The few uses of proc's internal kernel mount have been removed. I hope the proc filesystem will be further simplified.

all arch: remove system call sys_sysctl (2020/08/16 )

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=88db0aa2421666d2f73486d15b239a4521983d55

all arch: remove system call sys_sysctl Since commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"), sys_sysctl is actually unavailable: any input can only return an error.

We have been warning about people using the sysctl system call for years and believe there are no more users. Even if there are users of this interface if they have not complained or fixed their code by now they probably are not going to, so there is no point in warning them any longer.

So completely remove sys_sysctl on all architectures.

all arch: Remove system call sys_sysctl. Since commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"), sys_sysctl has been virtually invalid: returns an error regardless of input.

After years of warning users of sysctl system calls, I was convinced that there were no more users. If you're using this interface and haven't complained or fixed your code, you probably wouldn't do it, and there's no point in warning you anymore. Therefore, remove sys_sysctl completely on all architectures.

Conclusion: It's difficult to remove a feature

This has taken 10 years from the beginning. Thank you to everyone involved and thank you for your hard work.

--2009/09/27 Deprecate is planned, so add it to the configuration so that it can be excluded from compilation. --2009 / 11/06 Separated functions for cleanup. At this point deprecated. --2019/11/26 Disable function to remove --2020/08/16 Complete removal of functions

It made me think that it was difficult, including how to confirm "Is it really okay to erase this code?"

Recommended Posts

all arch: remove system call sys_sysctl
What is a system call