1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

all arch: remove system call sys_sysctl

Posted at

カーネルのcommit logを見てたら、全アーキテクチャに関わる修正があった。なんだろうこれ?というメモ。

TL;DR:ある機能を削除する事は難しい

これ、最初の段階からすると、10年がかりですね。本当に関係者の方々、ありがとうございます、お疲れ様でした。

時系列に並べていくと…

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

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.

sys_sysctlは廃止予定なので、コンパイル対象外にし始めます。残りのユーザー空間コードをキャッチし、更なるsysctlクリーンアップに向けて道を開くはずです。

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

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

より侵略的なクリーンアップに向けて、core binary sysctl logicを独自のファイルへ分離します。

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

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.

このsystem callは導入された時点から非推奨であり、Linuxディストリビューションの調査では、CONFIG_SYSCTL_SYSCALLを有効にするディストリビューションはもう見つかりません。これに対して気に掛ける誰がいるかどうかを検出する唯一の方法は、カーネル内のいくつかのdefconfigでCONFIG_SYSCTL_SYSCALLを有効にすることです。ただし、これはカーネルのdefconfigの414中31にしか現れません。そのため、私はこのシンボルの存在は、必要ではなく、含まれても無害と考えます。

sysctl system callのユーザーがいないように見えるため、このコードを削除します。procの内部カーネルマウントの数少ない使用方法が削除されます。proc filesystemが更に単純化されることを期待しています。

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

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: system call sys_sysctlを削除する。
commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call")以来、sys_sysctl は実質無効であった: 入力に関わらずエラーを返す。

sysctl system callを利用するユーザーに対して長年警告を続け、更なるユーザーはいないものと確信した。このインターフェイスを使用しているユーザーがいても、コードに対する不満や修正をしていない場合は、おそらくそうするつもりはないはずであり、警告する意味はもう無い。
そこで、sys_sysctlを全アーキテクチャで完全に削除します。

結論:ある機能を削除する事は難しい

これ、最初の段階からすると、10年がかりですね。本当に関係者の方々、ありがとうございます、お疲れ様でした。

  • 2009/09/27 deprecate予定なので、コンパイル対象外にできるようにコンフィグレーションに追加。
  • 2009/11/06 機能をクリーンアップのために分離。この時点でdeprecated.
  • 2019/11/26 削除するための機能無効化
  • 2020/08/16 機能完全削除

「本当にこのコードを消していいのか?」をどうやって確定させるのか、ということを含めて、難しいものだなあと考えさせられました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?