OSDN Git Service

Complete fanotify_mark.2, utimensat.2, iconv.1
[linuxjm/LDP_man-pages.git] / draft / man2 / prctl.2
index 562bd9a..2c003e7 100644 (file)
@@ -177,14 +177,11 @@ ID の変更が行われた場合、「ケーパビリティ保持」フラグ
 .TP 
 \fBPR_SET_NAME\fP (Linux 2.6.9 以降)
 .\" TASK_COMM_LEN in include/linux/sched.h
-Set the name of the calling thread, using the value in the location pointed
-to by \fI(char\ *) arg2\fP.  The name can be up to 16 bytes long, including the
-terminating null byte.  (If the length of the string, including the
-terminating null byte, exceeds 16 bytes, the string is silently truncated.)
-This is the same attribute that can be set via \fBpthread_setname_np\fP(3)  and
-retrieved using \fBpthread_getname_np\fP(3).  The attribute is likewise
-accessible via \fI/proc/self/task/[tid]/comm\fP, where \fItid\fP is the name of
-the calling thread.
+呼び出し元スレッドのプロセス名を \fI(char\ *) arg2\fP が指す場所に格納された値を使って設定する。 名前は終端の NULL
+バイトを含めて最大で 16 バイトである (終端の NULL バイトを含めた文字列の長さが 16 バイトを超える場合、 文字列は黙って切り詰められる)。
+これは、 \fBpthread_setname_np\fP(3) で設定でき、 \fBpthread_getname_np\fP(3)
+で取得できるのと同じ属性である。 同様に、 \fItid\fP が呼び出し元スレッドの ID の場合、 この属性は
+\fI/proc/self/task/[tid]/comm\fP 経由でもアクセス可能である。
 .TP 
 \fBPR_GET_NAME\fP (Linux 2.6.11 以降)
 呼び出し元スレッドの名前を \fI(char\ *) arg2\fP が指す場所に格納して返す。 バッファは最大で 16
@@ -236,27 +233,22 @@ effectively disabled for the calling process.
 .\" See http://thread.gmane.org/gmane.linux.kernel/542632
 .\" [PATCH 0 of 2] seccomp updates
 .\" andrea@cpushare.com
-Set the secure computing (seccomp) mode for the calling thread, to limit the
-available system calls.  The more recent \fBseccomp\fP(2)  system call provides
-a superset of the functionality of \fBPR_SET_SECCOMP\fP.
+呼び出したスレッドのセキュアコンピューティング (seccomp) モードを設定する。 最近の \fBseccomp\fP(2) システムコールは
+\fBPR_SET_SECCOMP\fP の上位互換の機能を提供する。
 
-The seccomp mode is selected via \fIarg2\fP.  (The seccomp constants are
-defined in \fI<linux/seccomp.h>\fP.)
+seccomp モードは \fIarg2\fP で指定できる (seccomp 定数は \fI<linux/seccomp.h>\fP
+で定義されている)。
 
-With \fIarg2\fP set to \fBSECCOMP_MODE_STRICT\fP, the only system calls that the
-thread is permitted to make are \fBread\fP(2), \fBwrite\fP(2), \fB_exit\fP(2), and
-\fBsigreturn\fP(2).  Other system calls result in the delivery of a \fBSIGKILL\fP
-signal.  Strict secure computing mode is useful for number\-crunching
-applications that may need to execute untrusted byte code, perhaps obtained
-by reading from a pipe or socket.  This operation is available only if the
-kernel is configured with \fBCONFIG_SECCOMP\fP enabled.
+\fIarg2\fP を \fBSECCOMP_MODE_STRICT\fP に設定すると、 そのスレッドが呼び出しを許可されるシステムコールは
+\fBread\fP(2), \fBwrite\fP(2), \fB_exit\fP(2), \fBsigreturn\fP(2) だけになる。
+それ以外のシステムコールを呼び出すと、シグナル \fBSIGKILL\fP が配送される。 パイプやソケットから読み込んだ、
+信頼できないバイトコードを実行する必要がある大量の演算を行うアプリケーションにおいて、 strict secure computing モードは役立つ。
+この操作は利用できるのは、 カーネルが \fBCONFIG_SECCOMP\fP を有効にして作成されている場合だけである。
 
-With \fIarg2\fP set to \fBSECCOMP_MODE_FILTER\fP (since Linux 3.5), the system
-calls allowed are defined by a pointer to a Berkeley Packet Filter passed in
-\fIarg3\fP.  This argument is a pointer to \fIstruct sock_fprog\fP; it can be
-designed to filter arbitrary system calls and system call arguments.  This
-mode is available only if the kernel is configured with
-\fBCONFIG_SECCOMP_FILTER\fP enabled.
+\fIarg2\fP を \fBSECCOMP_MODE_FILTER\fP (Linux 3.5 以降) に設定すると、 許可されるシステムコールは
+\fIarg3\fP で渡された Berkeley Packet Filter へのポインターで定義される。 この引き数は \fIstruct
+sock_fprog\fP へのポインターである。 これは任意のシステムコールやシステムコール引き数をフィルタリングするために設計された。
+このモードはカーネルで \fBCONFIG_SECCOMP_FILTER\fP が有効になっている場合にのみ利用可能である。
 
 \fBSECCOMP_MODE_FILTER\fP フィルターで \fBfork\fP(2) が許可されている場合、 seccomp モードは \fBfork\fP(2)
 で作成された子プロセスに継承される。 \fBexecve\fP(2) が許可されている場合、 seccomp モードは \fBexecve\fP(2)
@@ -266,18 +258,14 @@ mode is available only if the kernel is configured with
 詳しい情報は、カーネルソースファイル \fIDocumentation/prctl/seccomp_filter.txt\fP を参照。
 .TP 
 \fBPR_GET_SECCOMP\fP (Linux 2.6.23 以降)
-Return (as the function result)  the secure computing mode of the calling
-thread.  If the caller is not in secure computing mode, this operation
-returns 0; if the caller is in strict secure computing mode, then the
-\fBprctl\fP()  call will cause a \fBSIGKILL\fP signal to be sent to the process.
-If the caller is in filter mode, and this system call is allowed by the
-seccomp filters, it returns 2; otherwise, the process is killed with a
-\fBSIGKILL\fP signal.  This operation is available only if the kernel is
-configured with \fBCONFIG_SECCOMP\fP enabled.
+呼び出したスレッドの secure computing モードを (関数の結果として) 返す。 呼び出したスレッドが secure computing
+モードでなかった場合、 この操作は 0 を返し、 呼び出したスレッドが strict secure computing モードの場合、
+\fBprctl\fP()  を呼び出すとシグナル \fBSIGKILL\fP がそのプロセスに送信される。 呼び出したスレッドがフィルタモードで、
+このシステムコールが seccomp フィルタにより許可されている場合、 2 を返し、 そうでない場合プロセスは \fBSIGKILL\fP シグナルで
+kill されづ。 この操作が利用できるのは、カーネルが \fBCONFIG_SECCOMP\fP を有効にして作成されている場合だけである。
 
-Since Linux 3.8, the \fISeccomp\fP field of the \fI/proc/[pid]/status\fP file
-provides a method of obtaining the same information, without the risk that
-the process is killed; see \fBproc\fP(5).
+Linux 3.8 以降では、 \fI/proc/[pid]/status\fP の \fIseccomp\fP フィールドからも同じ情報を取得できる。
+この方法の場合はプロセスが kill される危険はない。 \fBproc\fP(5) を参照。
 .TP 
 \fBPR_SET_SECUREBITS\fP (Linux 2.6.26 以降)
 呼び出したスレッドの "securebits" フラグを \fIarg2\fP で渡された値に設定する。 \fBcapabilities\fP(7)  参照。
@@ -483,7 +471,7 @@ Return the current per\-process machine check kill policy.  All unused
 この動作は、 システム管理者が、 システムで動作するすべてのプロセスが行う、 普通でないシンボリックリンクの変更を監視するのを楽にする。
 .RE
 .TP 
-\fBPR_MPX_ENABLE_MANAGEMENT\fP, \fBPR_MPX_DISABLE_MANAGEMENT\fP (since Linux 3.19
+\fBPR_MPX_ENABLE_MANAGEMENT\fP, \fBPR_MPX_DISABLE_MANAGEMENT\fP (Linux 3.19 以降
 .\" commit fe3d197f84319d3bce379a9c0dc17b1f48ad358c
 .\" See also http://lwn.net/Articles/582712/
 .\" See also https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler
@@ -529,8 +517,7 @@ The child of a \fBfork\fP(2)  inherits the state of MPX management.  During
 \fBPR_MPX_DISABLE_MANAGEMENT\fP had been called.
 
 .\"
-For further information on Intel MPX, see the kernel source file
-\fIDocumentation/x86/intel_mpx.txt\fP.
+Intel MPX についての詳しい情報は、カーネルソースファイル \fIDocumentation/x86/intel_mpx.txt\fP を参照。
 .SH 返り値
 成功すると、 \fBPR_GET_DUMPABLE\fP, \fBPR_GET_KEEPCAPS\fP, \fBPR_GET_NO_NEW_PRIVS\fP,
 \fBPR_GET_THP_DISABLE\fP, \fBPR_CAPBSET_READ\fP, \fBPR_GET_TIMING\fP,
@@ -543,9 +530,8 @@ For further information on Intel MPX, see the kernel source file
 \fIarg2\fP が不正なアドレスである。
 .TP 
 \fBEFAULT\fP
-\fIoption\fP is \fBPR_SET_SECCOMP\fP, \fIarg2\fP is \fBSECCOMP_MODE_FILTER\fP, the
-system was built with \fBCONFIG_SECCOMP_FILTER\fP, and \fIarg3\fP is an invalid
-address.
+\fIoption\fP が \fBPR_SET_SECCOMP\fP で、 \fIarg2\fP が \fBSECCOMP_MODE_FILTER\fP で、 カーネルが
+\fBCONFIG_SECCOMP_FILTER\fP を有効にして作成されており、 \fIarg3\fP が無効なアドレスである。
 .TP 
 \fBEINVAL\fP
 \fIoption\fP の値が理解できない。
@@ -562,8 +548,8 @@ address.
 を有効にして作成されていなかった。
 .TP 
 \fBEINVAL\fP
-\fIoption\fP is \fBPR_SET_SECCOMP\fP, \fIarg2\fP is \fBSECCOMP_MODE_FILTER\fP, and the
-kernel was not configured with \fBCONFIG_SECCOMP_FILTER\fP.
+\fIoption\fP が \fBPR_SET_SECCOMP\fP で、 \fIarg2\fP が \fBSECCOMP_MODE_FILTER\fP で、 カーネルが
+\fBCONFIG_SECCOMP\fP を有効にして作成されていなかった。
 .TP 
 \fBEINVAL\fP
 \fIoption\fP が \fBPR_SET_MM\fP で、以下のいずれかが真である。
@@ -646,9 +632,8 @@ PID のいずれでもない。
 で渡されたファイルディスクリプタが有効ではない。
 .TP 
 \fBENXIO\fP
-\fIoption\fP was \fBPR_MPX_ENABLE_MANAGEMENT\fP or \fBPR_MPX_DISABLE_MANAGEMENT\fP
-and the kernel or the CPU does not support MPX management.  Check that the
-kernel and processor have MPX support.
+\fIoption\fP が \fBPR_MPX_ENABLE_MANAGEMENT\fP か \fBPR_MPX_DISABLE_MANAGEMENT\fP で、
+カーネルか CPU が MPX の管理をサポートしていない。 カーネルとプロセスが MPX をサポートしているか確認すること。
 .SH バージョン
 .\" The library interface was added in glibc 2.0.6
 \fBprctl\fP()  システムコールは Linux 2.1.57 で導入された。