OSDN Git Service

LDP: Update draft based on the previous commit (linux_module)
authorAkihiro Motoki <amotoki@gmail.com>
Sun, 28 Mar 2021 09:44:42 +0000 (18:44 +0900)
committerAkihiro Motoki <amotoki@gmail.com>
Mon, 29 Mar 2021 14:15:23 +0000 (23:15 +0900)
manual/LDP_man-pages/draft/man2/create_module.2
manual/LDP_man-pages/draft/man2/delete_module.2
manual/LDP_man-pages/draft/man2/get_kernel_syms.2
manual/LDP_man-pages/draft/man2/init_module.2
manual/LDP_man-pages/draft/man2/query_module.2

index dd1f27e..86f1c4d 100644 (file)
@@ -26,8 +26,7 @@ create_module \- ローダーブルモジュールのエントリーを作成す
 \fBcaddr_t create_module(const char *\fP\fIname\fP\fB, size_t \fP\fIsize\fP\fB);\fP
 .fi
 .PP
-\fINote\fP: No declaration of this system call is provided in glibc headers;
-see NOTES.
+\fI注意\fP: このシステムコールの宣言は glibc のヘッダーでは提供されていない。「注意」を参照。
 .SH 説明
 \fI注意\fP: このシステムコールが存在するのは、カーネル 2.6 より前の Linux だけである。
 .PP
@@ -60,12 +59,10 @@ see NOTES.
 .SH 準拠
 \fBcreate_module\fP()  は Linux 固有である。
 .SH 注意
-This obsolete system call is not supported by glibc.  No declaration is
-provided in glibc headers, but, through a quirk of history, glibc versions
-before 2.23 did export an ABI for this system call.  Therefore, in order to
-employ this system call, it was sufficient to manually declare the interface
-in your code; alternatively, you could invoke the system call using
-\fBsyscall\fP(2).
+この廃止されたシステムコールは glibc ではサポートされていない。 glibc ヘッダーでは宣言は提供されていないが、紆余曲折があり、 バージョン
+2.23 より前の glibc ではこのシステムコールに対する ABI
+が公開されていた。そのため、このシステムコールを利用するには、自分のコードの中で手動でインターフェースを宣言すればよかった。 \fBsyscall\fP(2)
+を使ってシステムコールを起動できた。
 .SH 関連項目
 \fBdelete_module\fP(2), \fBinit_module\fP(2), \fBquery_module\fP(2)
 .SH この文書について
index 1f2460f..ca04fc6 100644 (file)
@@ -39,8 +39,7 @@ delete_module \- カーネルモジュールをアンロードする
 \fBint delete_module(const char *\fP\fIname\fP\fB, int \fP\fIflags\fP\fB);\fP
 .fi
 .PP
-\fINote\fP: No declaration of this system call is provided in glibc headers;
-see NOTES.
+\fI注意\fP: このシステムコールの宣言は glibc のヘッダーでは提供されていない。「注意」を参照。
 .SH 説明
 \fBdelete_module\fP() システムコールは、 \fIname\fP で特定される未使用のロード可能なモジュールのエントリーを削除しようとする。
 モジュールに \fIexit\fP 関数がある場合、 モジュールをアンロードする前にこの関数が実行される。 \fIflags\fP
@@ -79,10 +78,8 @@ see NOTES.
 .RE
 .RE
 .PP
-The \fBO_TRUNC\fP flag has one further effect on the rules described above.  By
-default, if a module has an \fIinit\fP function but no \fIexit\fP function, then
-an attempt to remove the module fails.  However, if \fBO_TRUNC\fP was
-specified, this requirement is bypassed.
+\fBO_TRUNC\fP フラグには上記のルールに加えてもう一つの効果がある。 デフォルトでは、 モジュールに \fIinit\fP 関数があるが \fIexit\fP
+関数がない場合、 そのモジュールを削除しようとすると失敗する。 しかし、 \fBO_TRUNC\fP が指定された場合、 この要件はスキップされる。
 .PP
 \fBO_TRUNC\fP フラグの使用は危険である! カーネルが \fBCONFIG_MODULE_FORCE_UNLOAD\fP で作成されていない場合、
 このフラグは黙って無視される (通常は \fBCONFIG_MODULE_FORCE_UNLOAD\fP は有効になっている)。
@@ -111,12 +108,10 @@ specified, this requirement is bypassed.
 .SH 準拠
 \fBdelete_module\fP()  は Linux 固有である。
 .SH 注意
-The \fBdelete_module\fP()  system call is not supported by glibc.  No
-declaration is provided in glibc headers, but, through a quirk of history,
-glibc versions before 2.23 did export an ABI for this system call.
-Therefore, in order to employ this system call, it is (before glibc 2.23)
-sufficient to manually declare the interface in your code; alternatively,
-you can invoke the system call using \fBsyscall\fP(2).
+\fBdelete_module\fP() システムコールは glibc ではサポートされていない。 glibc ヘッダーでは宣言は提供されていないが、
+紆余曲折があり、 バージョン 2.23 より前の glibc ではこのシステムコールに対する ABI が公開されていた。
+そのため、このシステムコールを利用するには、 (glibc 2.23 より前では) 自分のコードの中で手動でインターフェースを宣言すればよかった。
+\fBsyscall\fP(2) を使ってシステムコールを起動できる。
 .PP
 \fIflags\fP に \fBO_NONBLOCK\fP が指定されていない場合に起こる可能性がある割り込み不可のスリープは望ましくないと考えられている。
 なぜなら、 スリープしているプロセスは kill できない状態 (unkillable state) のままになるからである。 Linux 3.7
index 3954473..af27bbd 100644 (file)
@@ -28,8 +28,7 @@ get_kernel_syms \- 公開されているカーネルやモジュールのシン
 \fBint get_kernel_syms(struct kernel_sym *\fP\fItable\fP\fB);\fP
 .fi
 .PP
-\fINote\fP: No declaration of this system call is provided in glibc headers;
-see NOTES.
+\fI注意\fP: このシステムコールの宣言は glibc のヘッダーでは提供されていない。「注意」を参照。
 .SH 説明
 \fB注意\fP: このシステムコールが存在するのは、カーネル 2.6 より前の Linux だけである。
 .PP
@@ -63,12 +62,10 @@ struct kernel_sym {
 .SH 準拠
 \fBget_kernel_syms\fP()  は Linux 固有である。
 .SH 注意
-This obsolete system call is not supported by glibc.  No declaration is
-provided in glibc headers, but, through a quirk of history, glibc versions
-before 2.23 did export an ABI for this system call.  Therefore, in order to
-employ this system call, it was sufficient to manually declare the interface
-in your code; alternatively, you could invoke the system call using
-\fBsyscall\fP(2).
+この廃止されたシステムコールは glibc ではサポートされていない。 glibc ヘッダーでは宣言は提供されていないが、紆余曲折があり、 バージョン
+2.23 より前の glibc ではこのシステムコールに対する ABI
+が公開されていた。そのため、このシステムコールを利用するには、自分のコードの中で手動でインターフェースを宣言すればよかった。 \fBsyscall\fP(2)
+を使ってシステムコールを起動できた。
 .SH バグ
 \fItable\fP 用に確保したバッファーの大きさを伝える方法がない。 プログラムがシンボルテーブルの大きさを問い合わせた後に、カーネルに
 シンボルが追加されると、メモリーの内容が破壊されることになる。
index 7112b76..0d6e5d6 100644 (file)
@@ -91,12 +91,10 @@ init_module, finit_module \- カーネルモジュールをロードする
 このハッシュはシンボルに対応する関数の引き数と返り値の型を基づいて計算される。 この場合、
 シンボルのバージョンハッシュは十分に信頼できると考えられているため、  "vermagic" 文字列内のカーネルのバージョン番号は無視される。
 .PP
-Using the \fBMODULE_INIT_IGNORE_VERMAGIC\fP flag indicates that the "vermagic"
-string is to be ignored, and the \fBMODULE_INIT_IGNORE_MODVERSIONS\fP flag
-indicates that the symbol version hashes are to be ignored.  If the kernel
-is built to permit forced loading (i.e., configured with
-\fBCONFIG_MODULE_FORCE_LOAD\fP), then loading continues, otherwise it fails
-with the error \fBENOEXEC\fP as expected for malformed modules.
+\fBMODULE_INIT_IGNORE_VERMAGIC\fP フラグは "vermagic" 文字列を無視することを意味し、
+\fBMODULE_INIT_IGNORE_MODVERSIONS\fP フラグはシンボルのバージョンハッシュを無視することを意味する。
+カーネルが強制ロードを許可するように作成されている場合 (\fBCONFIG_MODULE_FORCE_LOAD\fP が有効になっている場合)、
+モジュールのロードは継続され、 そうでない場合は不正なモジュールに対して返るのと同じエラー \fBENOEXEC\fP で失敗する。
 .SH 返り値
 成功の場合、これらのシステムコールは 0 を返す。エラーの場合 \-1 が返され、 \fIerrno\fP に適切な値が設定される。
 .SH エラー
@@ -168,12 +166,11 @@ ELF イメージである。
 .SH 準拠
 \fBinit_module\fP() と \fBfinit_module\fP() は Linux 固有である。
 .SH 注意
-The \fBinit_module\fP()  system call is not supported by glibc.  No declaration
-is provided in glibc headers, but, through a quirk of history, glibc
-versions before 2.23 did export an ABI for this system call.  Therefore, in
-order to employ this system call, it is (before glibc 2.23) sufficient to
-manually declare the interface in your code; alternatively, you can invoke
-the system call using \fBsyscall\fP(2).
+\fBinit_module\fP() システムコールは glibc ではサポートされていない。 glibc
+ヘッダーでは宣言は提供されていないが、紆余曲折があり、バージョン 2.23 より前の glibc ではこのシステムコールに対する ABI
+を公開されていた。 そのため、 (glibc 2.23 より前では)
+このシステムコールを利用するには、自分のコードの中で手動でインターフェースを宣言すればよかった。 \fBsyscall\fP(2)
+を使ってシステムコールを起動できる。
 .PP
 glibc は \fBfinit_module\fP() に対するラッパー関数を提供していない。 \fBsyscall\fP(2) を使って呼び出すこと。
 .PP
index 6d13018..e43e924 100644 (file)
@@ -29,8 +29,7 @@ query_module \- モジュールに関連する各種の情報をカーネルに
 \fB                 size_t \fP\fIbufsize\fP\fB, size_t *\fP\fIret\fP\fB);\fP
 .fi
 .PP
-\fINote\fP: No declaration of this system call is provided in glibc headers;
-see NOTES.
+\fI注意\fP: このシステムコールの宣言は glibc のヘッダーでは提供されていない。「注意」を参照。
 .SH 説明
 \fI注意\fP: このシステムコールが存在するのは、カーネル 2.6 より前の Linux だけである。
 .PP