OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / prctl.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl)
4 .\" and Copyright (C) 2002 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\" and Copyright Guillem Jover <guillem@hadrons.org>
6 .\"
7 .\" Permission is granted to make and distribute verbatim copies of this
8 .\" manual provided the copyright notice and this permission notice are
9 .\" preserved on all copies.
10 .\"
11 .\" Permission is granted to copy and distribute modified versions of this
12 .\" manual under the conditions for verbatim copying, provided that the
13 .\" entire resulting derived work is distributed under the terms of a
14 .\" permission notice identical to this one.
15 .\"
16 .\" Since the Linux kernel and libraries are constantly changing, this
17 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
18 .\" responsibility for errors or omissions, or for damages resulting from
19 .\" the use of the information contained herein.  The author(s) may not
20 .\" have taken the same level of care in the production of this manual,
21 .\" which is licensed free of charge, as they might when working
22 .\" professionally.
23 .\"
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
26 .\"
27 .\" Modified Thu Nov 11 04:19:42 MET 1999, aeb: added PR_GET_PDEATHSIG
28 .\" Modified 27 Jun 02, Michael Kerrisk
29 .\"     Added PR_SET_DUMPABLE, PR_GET_DUMPABLE,
30 .\"     PR_SET_KEEPCAPS, PR_GET_KEEPCAPS
31 .\" Modified 2006-08-30 Guillem Jover <guillem@hadrons.org>
32 .\"     Updated Linux versions where the options where introduced.
33 .\"     Added PR_SET_TIMING, PR_GET_TIMING, PR_SET_NAME, PR_GET_NAME,
34 .\"     PR_SET_UNALIGN, PR_GET_UNALIGN, PR_SET_FPEMU, PR_GET_FPEMU,
35 .\"     PR_SET_FPEXC, PR_GET_FPEXC
36 .\" 2008-04-29 Serge Hallyn, Document PR_CAPBSET_READ and PR_CAPBSET_DROP
37 .\" 2008-06-13 Erik Bosman, <ejbosman@cs.vu.nl>
38 .\"     Document PR_GET_TSC and PR_SET_TSC.
39 .\" 2008-06-15 mtk, Document PR_SET_SECCOMP, PR_GET_SECCOMP
40 .\"
41 .\" Japanese Version Copyright (c) 1998-1999 HANATAKA Shinya
42 .\"         all rights reserved.
43 .\" Translated 1999-04-03, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
44 .\" Updated 2002-12-20, Kentaro Shirakata <argrath@ub32.org>
45 .\" Updated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
46 .\" Updated 2005-10-07, Akihiro MOTOKI
47 .\" Updated 2007-01-08, Akihiro MOTOKI, LDP v2.43
48 .\" Updated 2007-10-12, Akihiro MOTOKI, LDP v2.66
49 .\" Updated 2008-08-12, Akihiro MOTOKI, LDP v3.05
50 .\"
51 .\"WORD:        capability      ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£
52 .\"WORD:        keep capabilities       ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£ÊÝ»ý
53 .\"
54 .TH PRCTL 2 2008-07-16 "Linux" "Linux Programmer's Manual"
55 .\"O .SH NAME
56 .SH Ì¾Á°
57 .\"O prctl \- operations on a process
58 prctl \- ¥×¥í¥»¥¹¤ÎÁàºî¤ò¹Ô¤Ê¤¦
59 .\"O .SH SYNOPSIS
60 .SH ½ñ¼°
61 .nf
62 .B #include <sys/prctl.h>
63 .sp
64 .BI "int prctl(int " option ", unsigned long " arg2 ", unsigned long " arg3 ,
65 .BI "          unsigned long " arg4 ", unsigned long " arg5 );
66 .fi
67 .\"O .SH DESCRIPTION
68 .SH ÀâÌÀ
69 .\"O .BR prctl ()
70 .\"O is called with a first argument describing what to do
71 .\"O (with values defined in \fI<linux/prctl.h>\fP), and further
72 .\"O arguments with a significance depending on the first one.
73 .\"O The first argument can be:
74 .BR prctl ()
75 ¤ÎÆ°ºî¤ÏºÇ½é¤Î°ú¤­¿ô¤Ë¤è¤Ã¤Æ·èÄꤵ¤ì¤ë (¤³¤ÎÃͤÏ
76 \fI<linux/prctl.h>\fP ¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë)¡£
77 »Ä¤ê¤Î°ú¤­¿ô¤ÏºÇ½é¤Î°ú¤­¿ô¤Ë¤è¤Ã¤ÆÊѲ½¤¹¤ë¡£
78 °ìÈÖÌܤΰú¤­¿ô¤È¤·¤Æ°Ê²¼¤Î¤â¤Î¤ò»ØÄê¤Ç¤­¤ë:
79 .TP
80 .\"O .BR PR_CAPBSET_READ " (since Linux 2.6.25)
81 .BR PR_CAPBSET_READ " (Linux 2.6.25 °Ê¹ß)"
82 .\"O Return (as the function result) 1 if the capability specified in
83 .\"O .I arg2
84 .\"O is in the calling thread's capability bounding set,
85 .\"O or 0 if it is not.
86 .\"O (The capability constants are defined in
87 .\"O .IR <linux/capability.h> .)
88 .\"O The capability bounding set dictates
89 .\"O whether the process can receive the capability through a
90 .\"O file's permitted capability set on a subsequent call to
91 .\"O .BR execve (2).
92 ¤Ç»ØÄꤵ¤ì¤¿¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£
93 ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¥»¥Ã¥È (capability bounding set) ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
94 (´Ø¿ô¤ÎÊÖ¤êÃͤȤ·¤Æ) 1 ¤òÊÖ¤·¡¢¤½¤¦¤Ç¤Ê¤¤¾ì¹ç 0 ¤òÊÖ¤¹
95 (¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£Äê¿ô¤Ï
96 .I <linux/capability.h>
97 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë)¡£
98 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¥Ð¥¦¥ó¥Ç¥£¥ó¥°¥»¥Ã¥È¤Ï¡¢
99 .BR execve (2)
100 ¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¡¢¥Õ¥¡¥¤¥ë¤Îµö²Ä (permitted) ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ÎÃæ¤Ç
101 ¤½¤Î¥×¥í¥»¥¹¤¬³ÍÆÀ¤Ç¤­¤ë¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò»Ø¼¨¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
102
103 .\"O If the capability specified in
104 .\"O .I arg2
105 .\"O is not valid, then the call fails with the error
106 .\"O .BR EINVAL .
107 .I arg2
108 ¤Ë»ØÄꤵ¤ì¤¿¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬Í­¸ú¤Ç¤Ê¤¤¾ì¹ç¡¢
109 ¸Æ¤Ó½Ð¤·¤Ï¥¨¥é¡¼
110 .B EINVAL
111 ¤Ç¼ºÇÔ¤¹¤ë¡£
112 .TP
113 .\"O .BR PR_CAPBSET_DROP " (since Linux 2.6.25)"
114 .BR PR_CAPBSET_DROP " (Linux 2.6.25 °Ê¹ß)"
115 .\"O If the calling thread has the
116 .\"O .B CAP_SETPCAP
117 .\"O capability, then drop the capability specified by
118 .\"O .I arg2
119 .\"O from the calling thread's capability bounding set.
120 .\"O Any children of the calling thread will inherit the newly
121 .\"O reduced bounding set.
122 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤¬¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£
123 .B CAP_SETPCAP
124 ¤ò»ý¤Ã¤Æ¤¤¤ë¾ì¹ç¡¢
125 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¥Ð¥¦¥ó¥Ç¥£¥ó¥°¥»¥Ã¥È¤«¤é
126 .I arg2
127 ¤Ç»ØÄꤵ¤ì¤¿¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò³°¤¹¡£
128 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î»Ò¥×¥í¥»¥¹¤ÏÊѹ¹¸å¤Î¥Ð¥¦¥ó¥Ç¥£¥ó¥°¥»¥Ã¥È¤ò
129 ·Ñ¾µ¤¹¤ë¡£
130
131 .\"O The call fails with the error:
132 .\"O .B EPERM
133 .\"O if the calling thread does not have the
134 .\"O.BR CAP_SETPCAP ;
135 .\"O .BR EINVAL
136 .\"O if
137 .\"O .I arg2
138 .\"O does not represent a valid capability; or
139 .\"O .BR EINVAL
140 .\"O if file capabilities are not enabled in the kernel,
141 .\"O in which case bounding sets are not supported.
142 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤¬
143 .B CAP_SETPCAP
144 ¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¸Æ¤Ó½Ð¤·¤Ï¥¨¥é¡¼
145 .B EPERM
146 ¤Ç¼ºÇÔ¤¹¤ë¡£
147 .I arg2
148 ¤Ë»ØÄꤵ¤ì¤¿¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬Í­¸ú¤Ç¤Ê¤¤¾ì¹ç¡¢
149 .B EINVAL
150 ¤Ç¼ºÇÔ¤¹¤ë¡£
151 ¥Õ¥¡¥¤¥ë¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬¥«¡¼¥Í¥ë¤ÇÍ­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç
152 (¤³¤Î¾ì¹ç¤Ë¤Ï¥Ð¥¦¥ó¥Ç¥£¥ó¥°¥»¥Ã¥È¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Ê¤¤)¡¢
153 .B EINVAL
154 ¤Ç¼ºÇÔ¤¹¤ë¡£
155 .TP
156 .\"O .BR PR_SET_DUMPABLE " (since Linux 2.3.20)"
157 .BR PR_SET_DUMPABLE " (Linux 2.3.20 °Ê¹ß)"
158 .\"O Set the state of the flag determining whether core dumps are produced
159 .\"O for this process upon delivery of a signal whose default behavior is
160 .\"O to produce a core dump.
161 .\"O (Normally this flag is set for a process by default, but it is cleared
162 .\"O when a set-user-ID or set-group-ID program is executed and also by
163 .\"O various system calls that manipulate process UIDs and GIDs).
164 .\"O In kernels up to and including 2.6.12,
165 .\"O .I arg2
166 .\"O must be either 0 (process is not dumpable) or 1 (process is dumpable).
167 (Linux 2.3.20 °Ê¹ß)
168 ¥Ç¥Õ¥©¥ë¥È¤Î¿¶¤ëÉñ¤¤¤Ç¤Ï¥³¥¢¥À¥ó¥×¤ò°ú¤­µ¯¤³¤¹¤è¤¦¤Ê¥·¥°¥Ê¥ë¤ò¼õ¿®¤·¤¿¤È¤­¤Ë¡¢
169 ¥³¥¢¥À¥ó¥×¤¹¤ë¤«¤É¤¦¤«¤ò·èÄꤹ¤ë¥Õ¥é¥°¤òÀßÄꤹ¤ë
170 (Ä̾盧¤Î¥Õ¥é¥°¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤¬¡¢
171 set-user-ID ¤¢¤ë¤¤¤Ï set-group-ID ¥×¥í¥°¥é¥à¤¬¼Â¹Ô¤µ¤ì¤¿¤ê¡¢
172 ¤µ¤Þ¤¶¤Þ¤Ê¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ë¤è¤Ã¤Æ¥×¥í¥»¥¹¤Î UID ¤ä GID ¤¬Áàºî¤µ¤ì¤¿¤È¤­¤Ë
173 ¥¯¥ê¥¢¤µ¤ì¤ë)¡£
174 2.6.12 °ÊÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢
175 .I arg2
176 ¤Ï 0 (¥×¥í¥»¥¹¤Ï¥À¥ó¥×ÉÔ²Ä) ¤¢¤ë¤¤¤Ï 1 (¥×¥í¥»¥¹¤Ï¥À¥ó¥×²Äǽ) ¤Î
177 ¤É¤Á¤é¤«¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
178 .\"O Between kernels 2.6.13 and 2.6.17, the value 2 was also permitted,
179 .\"O which caused any binary which normally would not be dumped
180 .\"O to be dumped readable by root only;
181 .\"O for security reasons, this feature has been removed.
182 2.6.13 ¤«¤é 2.6.17 ¤Þ¤Ç¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢ÃÍ 2 ¤âǧ¤á¤é¤ì¤Æ¤¤¤¿¡£
183 ¤³¤ÎÃͤò»ØÄꤹ¤ë¤È¡¢Ä̾ï¤Ï¥À¥ó¥×¤µ¤ì¤Ê¤¤¥Ð¥¤¥Ê¥ê¤¬ root ¤À¤±¤¬
184 Æɤ߹þ¤ß²Äǽ¤Ê·Á¤Ç¥À¥ó¥×¤µ¤ì¤¿¡£
185 ¥»¥­¥å¥ê¥Æ¥£¾å¤ÎÍýͳ¤«¤é¡¢¤³¤Îµ¡Ç½¤Ïºï½ü¤µ¤ì¤¿
186 .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
187 .\" Subject:    Fix prctl privilege escalation (CVE-2006-2451)
188 .\" From:       Marcel Holtmann <marcel () holtmann ! org>
189 .\" Date:       2006-07-12 11:12:00
190 .\"O (See also the description of
191 .\"O .I /proc/sys/fs/suid_dumpable
192 .\"O in
193 .\"O .BR proc (5).)
194 .RB ( proc (5)
195 ¤Î
196 .I /proc/sys/fs/suid_dumpable
197 ¤ÎÀâÌÀ¤â»²¾È)¡£
198 .TP
199 .\"O .BR PR_GET_DUMPABLE " (since Linux 2.3.20)"
200 .BR PR_GET_DUMPABLE " (Linux 2.3.20 °Ê¹ß)"
201 .\"O Return (as the function result) the current state of the calling
202 .\"O process's dumpable flag.
203 (Linux 2.3.20 °Ê¹ß)
204 ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Ë¤ª¤±¤ë¥À¥ó¥×²Äǽ¥Õ¥é¥°¤Î
205 ¸½ºß¤Î¾õÂÖ¤ò (´Ø¿ô¤ÎÊÖ¤êÃͤȤ·¤Æ) ÊÖ¤¹¡£
206 .\"O .\" Since Linux 2.6.13, the dumpable flag can have the value 2,
207 .\"O .\" but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
208 .\"O .\" flags has a nonzero value.  This was fixed in 2.6.14.
209 .\" [Í×½¤Àµ] Linux 2.6.13 °Ê¹ß¤Ç¤Ï¡¢¥À¥ó¥×²Äǽ¥Õ¥é¥°¤ÏÃÍ 2 ¤ò¤È¤ë¤³¤È¤¬
210 .\" ¤Ç¤­¤ë¤¬¡¢2.6.13 ¤Ç¤Ï PR_GET_DUMPABLE ¤Ï¥À¥ó¥×²Äǽ¥Õ¥é¥°¤¬ 0 °Ê³°¤Î
211 .\" Ãͤξì¹ç 1 ¤òÊÖ¤¹¤À¤±¤Ç¤¢¤ë¡£¤³¤ì¤Ï 2.6.14 ¤Ç½¤Àµ¤µ¤ì¤¿¡£
212 .TP
213 .\"O .BR PR_SET_ENDIAN " (since Linux 2.6.18, PowerPC only)"
214 .BR PR_SET_ENDIAN " (Linux 2.6.18 °Ê¹ß¡¢PowerPC ¤Î¤ß)"
215 .\"O Set the endian-ness of the calling process to the value given
216 .\"O in \fIarg2\fP, which should be one of the following:
217 .\"O .\" Respectively 0, 1, 2
218 .\"O .BR PR_ENDIAN_BIG ,
219 .\"O .BR PR_ENDIAN_LITTLE ,
220 .\"O or
221 .\"O .B PR_ENDIAN_PPC_LITTLE
222 .\"O (PowerPC pseudo little endian).
223 ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¥¨¥ó¥Ç¥£¥¢¥óÀßÄê (endian-ness) ¤ò
224 \fIarg2\fP ¤Ç»ØÄꤵ¤ì¤¿ÃͤËÀßÄꤹ¤ë¡£
225 »ØÄê¤Ç¤­¤ëÃͤÏ
226 .\" ¤½¤ì¤¾¤ì 0, 1, 2
227 .BR PR_ENDIAN_BIG ,
228 .BR PR_ENDIAN_LITTLE ,
229 .B PR_ENDIAN_PPC_LITTLE
230 (PowerPC µ¼»÷¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó)
231 ¤Î¤¤¤º¤ì¤«°ì¤Ä¤Ç¤¢¤ë¡£
232 .TP
233 .\"O .BR PR_GET_ENDIAN " (since Linux 2.6.18, PowerPC only)"
234 .BR PR_GET_ENDIAN " (Linux 2.6.18 °Ê¹ß¡¢PowerPC ¤Î¤ß)"
235 .\"O Return the endian-ness of the calling process,
236 .\"O in the location pointed to by
237 .\"O .IR "(int\ *) arg2" .
238 ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¥¨¥ó¥Ç¥£¥¢¥óÀßÄê (endian-ness) ¤ò
239 .I "(int\ *) arg2"
240 ¤¬»Ø¤¹¾ì½ê¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
241 .TP
242 .\"O .BR PR_SET_FPEMU " (since Linux 2.4.18, 2.5.9, only on ia64)"
243 .BR PR_SET_FPEMU " (Linux 2.4.18 °Ê¹ß, 2.5.9, ia64 ¤Î¤ß)"
244 .\"O Set floating-point emulation control bits to \fIarg2\fP.
245 .\"O Pass \fBPR_FPEMU_NOPRINT\fP to silently emulate fp operations accesses, or
246 .\"O \fBPR_FPEMU_SIGFPE\fP to not emulate fp operations and send
247 .\"O .B SIGFPE
248 .\"O instead.
249 ÉâÆ°¾®¿ôÅÀ¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó (floating-point emulation) À©¸æ¥Ó¥Ã¥È¤ò
250 \fIarg2\fP ¤Ç»ØÄꤵ¤ì¤¿ÃͤËÀßÄꤹ¤ë¡£
251 »ØÄê¤Ç¤­¤ëÃͤϠ\fBPR_FPEMU_NOPRINT\fP (ÉâÆ°¾®¿ôÅÀÌ¿Îᥢ¥¯¥»¥¹¤òÌۤäÆ
252 ¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë) ¤« \fBPR_FPEMU_SIGFPE\fP (ÉâÆ°¾®¿ôÅÀÌ¿Îá¤ò¥¨¥ß¥å¥ì¡¼¥È¤»¤º¡¢
253 Âå¤ï¤ê¤Ë
254 .B SIGFPE
255 ¤òÁ÷¤ë) ¤Ç¤¢¤ë¡£
256 .TP
257 .\"O .BR PR_GET_FPEMU " (since Linux 2.4.18, 2.5.9, only on ia64)"
258 .BR PR_GET_FPEMU " (Linux 2.4.18 °Ê¹ß, 2.5.9, ia64 ¤Î¤ß)"
259 .\"O Return floating-point emulation control bits,
260 .\"O in the location pointed to by
261 .\"O .IR "(int\ *) arg2" .
262 ÉâÆ°¾®¿ôÅÀ¥¨¥ß¥å¥ì¡¼¥·¥ç¥óÀ©¸æ¥Ó¥Ã¥È¤ÎÃͤò
263 .I "(int\ *) arg2"
264 ¤¬»Ø¤¹¾ì½ê¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
265 .TP
266 .\"O .BR PR_SET_FPEXC " (since Linux 2.4.21, 2.5.32, only on PowerPC)"
267 .BR PR_SET_FPEXC " (Linux 2.4.21 ¤ª¤è¤Ó 2.5.32 °Ê¹ß¡¢PowerPC ¤Î¤ß)"
268 .\"O Set floating-point exception mode to \fIarg2\fP.
269 .\"O Pass \fBPR_FP_EXC_SW_ENABLE\fP to use FPEXC for FP exception enables,
270 .\"O \fBPR_FP_EXC_DIV\fP for floating-point divide by zero,
271 .\"O \fBPR_FP_EXC_OVF\fP for floating-point overflow,
272 .\"O \fBPR_FP_EXC_UND\fP for floating-point underflow,
273 .\"O \fBPR_FP_EXC_RES\fP for floating-point inexact result,
274 .\"O \fBPR_FP_EXC_INV\fP for floating-point invalid operation,
275 .\"O \fBPR_FP_EXC_DISABLED\fP for FP exceptions disabled,
276 .\"O \fBPR_FP_EXC_NONRECOV\fP for async nonrecoverable exception mode,
277 .\"O \fBPR_FP_EXC_ASYNC\fP for async recoverable exception mode,
278 .\"O \fBPR_FP_EXC_PRECISE\fP for precise exception mode.
279 ÉâÆ°¾®¿ôÅÀÎã³°¥â¡¼¥É (floating-point exception mode) ¤ò
280 \fIarg2\fP ¤Ç»ØÄꤵ¤ì¤¿ÃͤËÀßÄꤹ¤ë¡£
281 »ØÄê¤Ç¤­¤ë¤Î¤Ï°Ê²¼¤ÎÃͤǤ¢¤ë:
282 \fBPR_FP_EXC_SW_ENABLE\fP (FPEXC ¤ÇÉâÆ°¾®¿ôÅÀÎã³°¤òÍ­¸ú¤Ë¤¹¤ë)¡¢
283 \fBPR_FP_EXC_DIV\fP (0 ½ü»»)¡¢
284 \fBPR_FP_EXC_OVF\fP (¥ª¡¼¥Ð¡¼¥Õ¥í¡¼)¡¢
285 \fBPR_FP_EXC_UND\fP (¥¢¥ó¥À¡¼¥Õ¥í¡¼)¡¢
286 \fBPR_FP_EXC_RES\fP (ÉÔÀµ³Î¤Ê·ë²Ì (inexact result))¡¢
287 \fBPR_FP_EXC_INV\fP (ÉÔÀµ¤ÊÌ¿Îá (invalid operation))¡¢
288 \fBPR_FP_EXC_DISABLED\fP (ÉâÆ°¾®¿ôÅÀÎã³°¤ò̵¸ú¤Ë¤¹¤ë)¡¢
289 \fBPR_FP_EXC_NONRECOV\fP (async nonrecoverable exception mode)¡¢
290 \fBPR_FP_EXC_ASYNC\fP (async recoverable exception mode)¡¢
291 \fBPR_FP_EXC_PRECISE\fP (precise exception mode)¡£
292 .TP
293 .\"O .BR PR_GET_FPEXC " (since Linux 2.4.21, 2.5.32, only on PowerPC)"
294 .BR PR_GET_FPEXC "(Linux 2.4.21 ¤ª¤è¤Ó 2.5.32 °Ê¹ß¡¢PowerPC ¤Î¤ß)"
295 .\"O Return floating-point exception mode,
296 .\"O in the location pointed to by
297 .\"O .IR "(int\ *) arg2" .
298 ÉâÆ°¾®¿ôÅÀÎã³°¥â¡¼¥É¤ÎÃͤò
299 .I "(int\ *) arg2"
300 ¤¬»Ø¤¹¾ì½ê¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
301 .TP
302 .\"O .BR PR_SET_KEEPCAPS " (since Linux 2.2.18)"
303 .BR PR_SET_KEEPCAPS " (Linux 2.2.18 °Ê¹ß)"
304 .\"O Set the state of the thread's "keep capabilities" flag,
305 .\"O which determines whether the threads's effective and permitted
306 .\"O capability sets are cleared when a change is made to the threads's user IDs
307 .\"O such that the threads's real UID, effective UID, and saved set-user-ID
308 .\"O all become nonzero when at least one of them previously had the value 0.
309 .\"O (By default, these credential sets are cleared).
310 .\"O .I arg2
311 .\"O must be either 0 (capabilities are cleared) or 1 (capabilities are kept).
312 .\"O This value will be reset to 0 on subsequent calls to
313 .\"O .BR execve (2).
314 ¥¹¥ì¥Ã¥É¤Î¡Ö¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£ÊÝ»ý¡×¥Õ¥é¥°¤òÀßÄꤹ¤ë¡£
315 ¤³¤Î¥Õ¥é¥°¤Ï¡¢¥¹¥ì¥Ã¥É¤Î¼Â UID¡¢¼Â¸ú UID¡¢Êݸ set-user-ID ¤Î¤¦¤Á¾¯¤Ê¤¯¤È¤â
316 °ì¤Ä¤¬ 0 ¤Ç¤¢¤Ã¤¿¾õÂÖ¤«¤é¡¢¤³¤ì¤éÁ´¤Æ¤¬ 0 °Ê³°¤ËÊѹ¹¤µ¤ì¤¿¤È¤­¡¢
317 ¥¹¥ì¥Ã¥É¤Î¼Â¸ú/µö²Ä¤Î¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£½¸¹ç¤¬¥¯¥ê¥¢¤µ¤ì¤ë¤«¤É¤¦¤«¤ò·èÄꤹ¤ë
318 (¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¤³¤ì¤é¤Î¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£½¸¹ç¤Ï¥¯¥ê¥¢¤µ¤ì¤ë)¡£
319 .I arg2
320 ¤Ï 0 (¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò¥¯¥ê¥¢¤¹¤ë) ¤¢¤ë¤¤¤Ï 1 (¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤òÊÝ»ý¤¹¤ë) ¤Î
321 ¤É¤Á¤é¤«¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
322 .BR execve (2)
323 ¤¬¸Æ¤Ó½Ð¤µ¤ì¤ë¤È¡¢¤³¤ÎÃͤϠ0 ¤Ë¥ê¥»¥Ã¥È¤µ¤ì¤ë¡£
324 .TP
325 .\"O .BR PR_GET_KEEPCAPS " (since Linux 2.2.18)"
326 .BR PR_GET_KEEPCAPS " (Linux 2.2.18 °Ê¹ß)"
327 .\"O Return (as the function result) the current state of the calling threads's
328 .\"O "keep capabilities" flag.
329 ¸Æ¤Ó½Ð¤·¸µ¥¹¥ì¥Ã¥É¤Ë¤ª¤±¤ë¡Ö¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£ÊÝ»ý¡×¥Õ¥é¥°¤Î
330 ¸½ºß¤Î¾õÂÖ¤ò (´Ø¿ô¤ÎÊÖ¤êÃͤȤ·¤Æ) ÊÖ¤¹¡£
331 .TP
332 .\"O .BR PR_SET_NAME " (since Linux 2.6.9)"
333 .BR PR_SET_NAME " (Linux 2.6.9 °Ê¹ß)"
334 .\"O Set the process name for the calling process,
335 .\"O using the value in the location pointed to by
336 .\"O .IR "(char\ *) arg2" .
337 .\"O The name can be up to 16 bytes long,
338 .\"O .\" TASK_COMM_LEN in include/linux/sched.h
339 .\"O and should be null-terminated if it contains fewer bytes.
340 ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹Ì¾¤ò
341 .I "(char\ *) arg2"
342 ¤¬»Ø¤¹¾ì½ê¤Ë³ÊǼ¤µ¤ì¤¿Ãͤò»È¤Ã¤ÆÀßÄꤹ¤ë¡£
343 ̾Á°¤ÏºÇÂç¤Ç 16 ¥Ð¥¤¥È¤Ç¤¢¤ê¡¢
344 .\" TASK_COMM_LEN in include/linux/sched.h
345 ¤½¤ì¤è¤ê¾¯¤Ê¤¤¥Ð¥¤¥È¿ô¤Î¾ì¹ç¤Ï NULL ¤Ç½ªÃ¼¤¹¤Ù¤­¤Ç¤¢¤ë¡£
346 .TP
347 .\"O .BR PR_GET_NAME " (since Linux 2.6.11)"
348 .BR PR_GET_NAME " (Linux 2.6.11 °Ê¹ß)"
349 .\"O Return the process name for the calling process,
350 .\"O in the buffer pointed to by
351 .\"O .IR "(char\ *) arg2" .
352 .\"O The buffer should allow space for up to 16 bytes;
353 .\"O the returned string will be null-terminated if it is shorter than that.
354 ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹Ì¾¤ò
355 .I "(char\ *) arg2"
356 ¤¬»Ø¤¹¾ì½ê¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
357 ¥Ð¥Ã¥Õ¥¡¤ÏºÇÂç¤Ç 16 ¥Ð¥¤¥È¤ò³ÊǼ¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤Ù¤­¤Ç¤¢¤ë¡£
358 ÊÖ¤µ¤ì¤ëʸ»úÎó¤Ï¡¢Ä¹¤µ¤¬ 16 ¥Ð¥¤¥È¤è¤êû¤¤¾ì¹ç¤Ï NULL ½ªÃ¼¤µ¤ì¤ë¡£
359 .TP
360 .\"O .BR PR_SET_PDEATHSIG " (since Linux 2.1.57)"
361 .BR PR_SET_PDEATHSIG " (Linux 2.1.57 °Ê¹ß)"
362 .\"O Set the parent process death signal
363 .\"O of the calling process to \fIarg2\fP (either a signal value
364 .\"O in the range 1..maxsig, or 0 to clear).
365 .\"O This is the signal that the calling process will get when its
366 .\"O parent dies.
367 .\"O This value is cleared for the child of a
368 .\"O .BR fork (2).
369 ¿Æ¥×¥í¥»¥¹»àË´¥·¥°¥Ê¥ë (parent process death signal) ¤ò \fIarg2\fP ¤ËÀßÄꤹ¤ë
370 (ÀßÄê¤Ç¤­¤ë¥·¥°¥Ê¥ëÃͤÎÈϰϤϠ1..maxsig ¤Ç¤¢¤ê¡¢0 ¤ÏÄÌÃΤβò½ü¤Ç¤¢¤ë)¡£
371 ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¿Æ¥×¥í¥»¥¹¤¬»à¤ó¤ÀºÝ¤Ë¡¢¤³¤³¤ÇÀßÄꤷ¤¿Ãͤ¬
372 ¥·¥°¥Ê¥ë¤È¤·¤ÆÄÌÃΤµ¤ì¤ë¡£¤³¤ÎÃͤÏ
373 .BR fork (2)
374 ¤Î»Ò¥×¥í¥»¥¹¤Ç¤Ï²ò½ü¤µ¤ì¤ë¡£
375 .TP
376 .\"O .BR PR_GET_PDEATHSIG " (since Linux 2.3.15)"
377 .BR PR_GET_PDEATHSIG " (Linux 2.3.15 °Ê¹ß)"
378 .\"O Return the current value of the parent process death signal,
379 .\"O in the location pointed to by
380 .\"O .IR "(int\ *) arg2" .
381 ¿Æ¥×¥í¥»¥¹»àË´¥·¥°¥Ê¥ë¤Î¸½ºß¤ÎÃͤò
382 .I "(int\ *) arg2"
383 ¤¬»Ø¤¹¾ì½ê¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
384 .TP
385 .\"O .BR PR_SET_SECCOMP " (since Linux 2.6.23)"
386 .BR PR_SET_SECCOMP " (Linux 2.6.23 °Ê¹ß)"
387 .\" See http://thread.gmane.org/gmane.linux.kernel/542632
388 .\" [PATCH 0 of 2] seccomp updates
389 .\" andrea@cpushare.com
390 .\"O Set the secure computing mode for the calling thread.
391 .\"O In the current implementation,
392 .\"O .IR arg2
393 .\"O must be 1.
394 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î secure computing ¥â¡¼¥É¤òÀßÄꤹ¤ë¡£
395 ¸½ºß¤Î¼ÂÁõ¤Ç¤Ï¡¢
396 .I arg2
397 ¤Ï 1 ¤Ë¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
398 .\"O After the secure computing mode has been set to 1,
399 .\"O the only system calls that the thread is permitted to make are
400 .\"O .BR read (2),
401 .\"O .BR write (2),
402 .\"O .BR _exit (2),
403 .\"O and
404 .\"O .BR sigreturn (2).
405 .\"O Other system calls result in the delivery of a
406 .\"O .BR SIGKILL
407 .\"O signal.
408 secure computing ¥â¡¼¥É¤ò 1 ¤ËÀßÄꤹ¤ë¤È¡¢
409 ¤½¤Î¥¹¥ì¥Ã¥É¤¬¸Æ¤Ó½Ð¤·¤òµö²Ä¤µ¤ì¤ë¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
410 .BR read (2),
411 .BR write (2),
412 .BR _exit (2),
413 .BR sigreturn (2)
414 ¤À¤±¤Ë¤Ê¤ë¡£
415 ¤½¤ì°Ê³°¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò¸Æ¤Ó½Ð¤¹¤È¡¢¥·¥°¥Ê¥ë
416 .B SIGKILL
417 ¤¬ÇÛÁ÷¤µ¤ì¤ë¡£
418 .\"O Secure computing mode is useful for number-crunching applications
419 .\"O that may need to execute untrusted byte code,
420 .\"O perhaps obtained by reading from a pipe or socket.
421 .\"O This operation is only available
422 .\"O if the kernel is configured with CONFIG_SECCOMP enabled.
423 ¥Ñ¥¤¥×¤ä¥½¥±¥Ã¥È¤«¤éÆɤ߹þ¤ó¤À¡¢¿®Íê¤Ç¤­¤Ê¤¤¥Ð¥¤¥È¥³¡¼¥É¤ò¼Â¹Ô¤¹¤ë
424 ɬÍפ¬¤¢¤ëÂçÎ̤α黻¤ò¹Ô¤¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë¤ª¤¤¤Æ¡¢
425 secure computing ¥â¡¼¥É¤ÏÌòΩ¤Ä¡£
426 ¤³¤ÎÁàºî¤ÏÍøÍѤǤ­¤ë¤Î¤Ï¡¢¥«¡¼¥Í¥ë¤¬ CONFIG_SECCOMP ¤òÍ­¸ú¤Ë¤·¤Æ
427 ºîÀ®¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤À¤±¤Ç¤¢¤ë¡£
428 .TP
429 .\"O .BR PR_GET_SECCOMP " (since Linux 2.6.23)"
430 .BR PR_GET_SECCOMP " (Linux 2.6.23 °Ê¹ß)"
431 .\"O Return the secure computing mode of the calling thread.
432 .\"O Not very useful for the current implementation (mode equals 1),
433 .\"O but may be useful for other possible future modes:
434 .\"O if the caller is not in secure computing mode, this operation returns 0;
435 .\"O if the caller is in secure computing mode, then the
436 .\"O .BR prctl ()
437 .\"O call will cause a
438 .\"O .B SIGKILL
439 .\"O signal to be sent to the process.
440 .\"O This operation is only available
441 .\"O if the kernel is configured with CONFIG_SECCOMP enabled.
442 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î secure computing ¥â¡¼¥É¤òÊÖ¤¹¡£
443 ¸½ºß¤Î¼ÂÁõ (¥â¡¼¥É¤Ï 1 ¸ÇÄê) ¤Ï¤¢¤Þ¤êÌò¤ËΩ¤¿¤Ê¤¤¤¬¡¢
444 ¾­Í辤Υ⡼¥É¤¬¼ÂÁõ¤µ¤ì¤ë¤ÈÌòΩ¤Ä¤è¤¦¤Ë¤Ê¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
445 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤¬ secure computing ¥â¡¼¥É¤Ç¤Ê¤«¤Ã¤¿¾ì¹ç¡¢
446 ¤³¤ÎÁàºî¤Ï 0 ¤òÊÖ¤¹¡£
447 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤¬ secure computing ¥â¡¼¥É¤Î¾ì¹ç¡¢
448 .BR prctl ()
449 ¤ò¸Æ¤Ó½Ð¤¹¤È¥·¥°¥Ê¥ë
450 .B SIGKILL
451 ¤¬¤½¤Î¥×¥í¥»¥¹¤ËÁ÷¿®¤µ¤ì¤ë¡£
452 ¤³¤ÎÁàºî¤¬ÍøÍѤǤ­¤ë¤Î¤Ï¡¢¥«¡¼¥Í¥ë¤¬ CONFIG_SECCOMP ¤òÍ­¸ú¤Ë¤·¤Æ
453 ºîÀ®¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤À¤±¤Ç¤¢¤ë¡£
454 .TP
455 .\"O .BR PR_SET_SECUREBITS " (since Linux 2.6.26)"
456 .BR PR_SET_SECUREBITS " (Linux 2.6.26 °Ê¹ß)"
457 .\"O Set the "securebits" flags of the calling thread to the value supplied in
458 .\"O .IR arg2 .
459 .\"O See
460 .\"O .BR capabilities (7).
461 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î "securebits" ¥Õ¥é¥°¤ò
462 .I arg2
463 ¤ÇÅϤµ¤ì¤¿ÃͤËÀßÄꤹ¤ë¡£
464 .BR capabilities (7)
465 »²¾È¡£
466 .TP
467 .\"O .BR PR_GET_SECUREBITS " (since Linux 2.6.26)"
468 .BR PR_GET_SECUREBITS " (Linux 2.6.26 °Ê¹ß)"
469 .\"O Return (as the function result)
470 .\"O the "securebits" flags of the calling thread.
471 .\"O See
472 .\"O .BR capabilities (7).
473 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î "securebits" ¥Õ¥é¥°¤ò
474 (´Ø¿ô¤ÎÊÖ¤êÃͤȤ·¤Æ) ÊÖ¤¹¡£
475 .BR capabilities (7)
476 »²¾È¡£
477 .TP
478 .\"O .BR PR_SET_TIMING " (since Linux 2.6.0-test4)"
479 .BR PR_SET_TIMING " (Linux 2.6.0-test4 °Ê¹ß)"
480 .\"O Set whether to use (normal, traditional) statistical process timing or
481 .\"O accurate timestamp based process timing, by passing
482 .\"O .B PR_TIMING_STATISTICAL
483 .\"O .\" 0
484 .\"O or
485 .\"O .B PR_TIMING_TIMESTAMP
486 .\"O .\" 1
487 .\"O to \fIarg2\fP.
488 .\"O .B PR_TIMING_TIMESTAMP
489 .\"O is not currently implemented
490 .\"O (attempting to set this mode will yield the error
491 .\"O .BR EINVAL ).
492 .\"O .\" PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
493 .\"O .\" and looking at the patch history, it appears
494 .\"O .\" that it never did anything.
495 (Ä̾ï¤Î¡¢ÅÁÅýŪ¤Ë»È¤ï¤ì¤Æ¤­¤¿) Åý·×Ū¤Ê¥×¥í¥»¥¹¥¿¥¤¥ß¥ó¥°¤ò»ÈÍѤ¹¤ë¤«¡¢
496 Àµ³Î¤Ê¥¿¥¤¥à¥¹¥¿¥ó¥×¤Ë´ð¤Å¤¯¥×¥í¥»¥¹¥¿¥¤¥ß¥ó¥°¤ò»ÈÍѤ¹¤ë¤«¤òÀßÄꤹ¤ë¡£
497 \fIarg2\fP ¤Ë»ØÄê¤Ç¤­¤ëÃͤÏ
498 .B PR_TIMING_STATISTICAL
499 .\" 0
500 ¤«
501 .B PR_TIMING_TIMESTAMP
502 .\" 1
503 ¤Ç¤¢¤ë¡£
504 .B PR_TIMING_TIMESTAMP
505 ¤Ï¸½ºß¤Î¤È¤³¤í¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤
506 (¤³¤Î¥â¡¼¥É¤ËÀßÄꤷ¤è¤¦¤È¤¹¤ë¤È¥¨¥é¡¼
507 .B EINVAL
508 ¤¬µ¯¤³¤ë¤³¤È¤À¤í¤¦)¡£
509 .\" 2.6.26-rc8 ¤Ç¤Ï PR_TIMING_TIMESTAMP ¤Ï²¿¤â¤·¤Ê¤¤¡£
510 .\" ¥Ñ¥Ã¥Á¤ÎÍúÎò¤ò¸«¤¿¤¬¡¢²áµî¤Ë¤â²¿¤«¤ò¤·¤¿¤³¤È¤â¤Ê¤¤¡£
511 .TP
512 .\"O .BR PR_GET_TIMING " (since Linux 2.6.0-test4)"
513 .BR PR_GET_TIMING " (Linux 2.6.0-test4 °Ê¹ß)"
514 .\"O Return (as the function result) which process timing method is currently
515 .\"O in use.
516 ¸½ºß»ÈÍÑÃæ¤Î¥×¥í¥»¥¹¥¿¥¤¥ß¥ó¥°¤ò·è¤á¤ëÊýË¡¤òÊÖ¤¹¡£
517 .TP
518 .\"O .BR PR_SET_TSC " (since Linux 2.6.26, x86 only)"
519 .BR PR_SET_TSC " (Linux 2.6.26 °Ê¹ß, x86 ¤Î¤ß)"
520 .\"O Set the state of the flag determining whether the timestamp counter
521 .\"O can be read by the process.
522 .\"O Pass
523 .\"O .B PR_TSC_ENABLE
524 .\"O to
525 .\"O .I arg2
526 .\"O to allow it to be read, or
527 .\"O .B PR_TSC_SIGSEGV
528 .\"O to generate a
529 .\"O .B SIGSEGV
530 .\"O when the process tries to read the timestamp counter.
531 ¤½¤Î¥×¥í¥»¥¹¤¬¥¿¥¤¥à¥¹¥¿¥ó¥×¡¦¥«¥¦¥ó¥¿¤òÆɤ߽Ф»¤ë¤«¤ò·èÄꤹ¤ë
532 ¥Õ¥é¥°¤Î¾õÂÖ¤òÀßÄꤹ¤ë¡£
533 Æɤ߽Ф·¤òµö²Ä¤¹¤ë¾ì¹ç¤Ï
534 .I arg2
535 ¤Ë
536 .B PR_TSC_ENABLE
537 ¤ò¡¢¤½¤Î¥×¥í¥»¥¹¤¬¥¿¥¤¥à¥¹¥¿¥ó¥×¡¦¥«¥¦¥ó¥¿¤òÆɤ߽Ф½¤¦¤È¤·¤¿ºÝ¤Ë
538 .B SIGSEGV
539 ¤òȯÀ¸¤µ¤»¤ë¾ì¹ç¤Ë¤Ï
540 .B PR_TSC_SIGSEGV
541 ¤òÅϤ¹¡£
542 .TP
543 .\"O .BR PR_GET_TSC " (since Linux 2.6.26, x86 only)"
544 .BR PR_GET_TSC " (Linux 2.6.26 °Ê¹ß, x86 ¤Î¤ß)"
545 .\"O Return the state of the flag determining whether the timestamp counter
546 .\"O can be read,
547 .\"O in the location pointed to by
548 .\"O .IR "(int\ *) arg2" .
549 ¤½¤Î¥×¥í¥»¥¹¤¬¥¿¥¤¥à¥¹¥¿¥ó¥×¡¦¥«¥¦¥ó¥¿¤òÆɤ߽Ф»¤ë¤«¤ò·èÄꤹ¤ë
550 ¥Õ¥é¥°¤Î¾õÂÖ¤ò
551 .I "(int\ *) arg2"
552 ¤¬»Ø¤¹¾ì½ê¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
553 .TP
554 .B PR_SET_UNALIGN
555 .\"O (Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15;
556 .\"O PowerPC, since Linux 2.6.18; Alpha, since Linux 2.6.22)
557 (ia64 ¤Ç¤Ï Linux 2.3.48 °Ê¹ß;
558 parisc ¤Ç¤Ï Linux 2.6.15 °Ê¹ß;
559 PowerPC ¤Ç¤Ï Linux 2.6.18 °Ê¹ß;
560 Alpha ¤Ç¤Ï¡¡Linux 2.6.22 °Ê¹ß;
561 ¤³¤ì¤é¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Î¤ß)
562 .\"O Set unaligned access control bits to \fIarg2\fP.
563 .\"O Pass
564 .\"O \fBPR_UNALIGN_NOPRINT\fP to silently fix up unaligned user accesses,
565 .\"O or \fBPR_UNALIGN_SIGBUS\fP to generate
566 .\"O .B SIGBUS
567 .\"O on unaligned user access.
568 unaligned ¥¢¥¯¥»¥¹À©¸æ¥Ó¥Ã¥È¤ò \fIarg2\fP ¤Ç»ØÄꤵ¤ì¤¿ÃͤËÀßÄꤹ¤ë¡£
569 »ØÄê¤Ç¤­¤ëÃͤϠ\fBPR_UNALIGN_NOPRINT\fP (unaligned ¤Ê¥æ¡¼¥¶¥¢¥¯¥»¥¹¤òÌۤäÆ
570 ½¤Àµ¤¹¤ë) ¤« \fBPR_UNALIGN_SIGBUS\fP (unaligned ¤Ê¥æ¡¼¥¶¥¢¥¯¥»¥¹¤¬¤¢¤Ã¤¿¾ì¹ç
571 .B SIGBUS
572 ¤òÀ¸À®¤¹¤ë) ¤Ç¤¢¤ë¡£
573 .TP
574 .B PR_GET_UNALIGN
575 .\"O (see
576 .\"O .B PR_SET_UNALIGN
577 .\"O for information on versions and architectures)
578 (¥Ð¡¼¥¸¥ç¥ó¤È¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Î¾ðÊó¤Ï
579 .B PR_SET_UNALIGN
580 »²¾È)
581 .\"O Return unaligned access control bits, in the location pointed to by
582 .\"O .IR "(int\ *) arg2" .
583 unaligned ¥¢¥¯¥»¥¹À©¸æ¥Ó¥Ã¥È¤ÎÃͤò
584 .I "(int\ *) arg2"
585 ¤¬»Ø¤¹¾ì½ê¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
586 .\"O .SH "RETURN VALUE"
587 .SH ÊÖ¤êÃÍ
588 .\"O On success,
589 .\"O .BR PR_GET_DUMPABLE ,
590 .\"O .BR PR_GET_KEEPCAPS ,
591 .\"O .BR PR_CAPBSET_READ ,
592 .\"O .BR PR_GET_TIMING ,
593 .\"O .BR PR_GET_SECUREBITS ,
594 .\"O and (if it returns)
595 .\"O .BR PR_GET_SECCOMP
596 .\"O return the nonnegative values described above.
597 À®¸ù¤¹¤ë¤È¡¢
598 .BR PR_GET_DUMPABLE ,
599 .BR PR_GET_KEEPCAPS ,
600 .BR PR_CAPBSET_READ ,
601 .BR PR_GET_TIMING ,
602 .BR PR_GET_SECUREBITS ,
603 .BR PR_GET_SECCOMP
604 ¤Ï¾å½Ò¤ÎÉé¤Ç¤Ê¤¤ÃͤòÊÖ¤¹
605 .RB ( PR_GET_SECCOMP
606 ¤ÏÊÖ¤é¤Ê¤¤¾ì¹ç¤â¤¢¤ë)¡£
607 .\"O All other
608 .\"O .I option
609 .\"O values return 0 on success.
610 .I option
611 ¤¬Â¾¤ÎÃͤξì¹ç¤ÏÀ®¸ù»þ¤Ë 0 ¤òÊÖ¤¹¡£
612 .\"O On error, \-1 is returned, and
613 .\"O .I errno
614 .\"O is set appropriately.
615 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
616 .I errno
617 ¤ËŬÀÚ¤ÊÃͤòÀßÄꤹ¤ë¡£
618 .\"O .SH ERRORS
619 .SH ¥¨¥é¡¼
620 .TP
621 .B EFAULT
622 .\"O .I arg2
623 .\"O is an invalid address.
624 .I arg2
625 ¤¬ÉÔÀµ¤Ê¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
626 .TP
627 .B EINVAL
628 .\"O The value of
629 .\"O .I option
630 .\"O is not recognized
631 .I option
632 ¤ÎÃͤ¬Íý²ò¤Ç¤­¤Ê¤¤¡£
633 .TP
634 .B EINVAL
635 .\"O .I arg2
636 .\"O is not valid value for this
637 .\"O .IR option .
638 .I arg2
639 ¤¬»ØÄꤵ¤ì¤¿
640 .I option
641 ¤ÇÍ­¸ú¤ÊÃͤǤϤʤ¤¡£
642 .TP
643 .B EINVAL
644 .\"O .I option
645 .\"O is
646 .\"O .BR PR_SET_SECCOMP
647 .\"O or
648 .\"O .BR PR_SET_SECCOMP ,
649 .\"O and the kernel was not configured with
650 .\"O .BR CONFIG_SECCOMP .
651 .I option
652 ¤¬
653 .BR PR_SET_SECCOMP
654 ¤«
655 .BR PR_GET_SECCOMP
656 ¤À¤¬¡¢¥«¡¼¥Í¥ë¤¬
657 .B CONFIG_SECCOMP
658 ¤òÍ­¸ú¤Ë¤·¤ÆºîÀ®¤µ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¡£
659 .TP
660 .B EPERM
661 .\"O .I option
662 .\"O is
663 .\"O .BR PR_SET_SECUREBITS ,
664 .\"O and the caller does not have the
665 .\"O .B CAP_SETPCAP
666 .\"O capability,
667 .\"O or tried to unset a "locked" flag,
668 .\"O or tried to set a flag whose corresponding locked flag was set
669 .\"O (see
670 .\"O .BR capabilities (7)).
671 .I option
672 ¤¬
673 .B PR_SET_SECUREBITS
674 ¤Ç¡¢¸Æ¤Ó½Ð¤·¸µ¤¬¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£
675 .B CAP_SETPCAP
676 ¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£
677 ¤Þ¤¿¤Ï¡¢"locked" ¥Õ¥é¥°¤ò²ò½ü¤·¤è¤¦¤È¤·¤¿¡£
678 ¤Þ¤¿¤Ï¡¢locked ¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¥Õ¥é¥°¤ò¥»¥Ã¥È¤·¤è¤¦¤È¤·¤¿
679 .RB ( capabilities (7)
680 »²¾È)¡£
681 .TP
682 .B EPERM
683 .\"O .I option
684 .\"O is
685 .\"O .BR PR_SET_KEEPCAPS ,
686 .\"O and the callers's
687 .\"O .B SECURE_KEEP_CAPS_LOCKED
688 .\"O flag is set
689 .\"O (see
690 .\"O .BR capabilities (7)).
691 .I option
692 ¤¬
693 .B PR_SET_KEEPCAPS
694 ¤Ç¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¥Õ¥é¥°
695 .B SECURE_KEEP_CAPS_LOCKED
696 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë
697 .RB ( capabilities (7)
698 »²¾È)¡£
699 .TP
700 .B EPERM
701 .\"O .I option
702 .\"O is
703 .\"O .BR PR_CAPBSET_DROP ,
704 .\"O and the caller does not have the
705 .\"O .B CAP_SETPCAP
706 .\"O capability.
707 .I option
708 ¤¬
709 .B PR_CAPBSET_DROP
710 ¤Ç¡¢¸Æ¤Ó½Ð¤·¸µ¤¬¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£
711 .B CAP_SETPCAP
712 ¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£
713 .\" The following can't actually happen, because prctl() in
714 .\" seccomp mode will cause SIGKILL.
715 .\" .TP
716 .\" .B EPERM
717 .\" .I option
718 .\" is
719 .\" .BR PR_SET_SECCOMP ,
720 .\" and secure computing mode is already 1.
721 .\"O .SH VERSIONS
722 .SH ¥Ð¡¼¥¸¥ç¥ó
723 .\"O The
724 .\"O .BR prctl ()
725 .\"O system call was introduced in Linux 2.1.57.
726 .\"O .\" The library interface was added in glibc 2.0.6
727 .BR prctl ()
728 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux 2.1.57 ¤ÇƳÆþ¤µ¤ì¤¿¡£
729 .\" ¥é¥¤¥Ö¥é¥ê¡¦¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ï glibc 2.0.6 ¤ÇÄɲ䵤줿¡£
730 .\"O .SH "CONFORMING TO"
731 .SH ½àµò
732 .\"O This call is Linux-specific.
733 .\"O IRIX has a
734 .\"O .BR prctl ()
735 .\"O system call (also introduced in Linux 2.1.44
736 .\"O as irix_prctl on the MIPS architecture),
737 .\"O with prototype
738 ¤³¤Î¥³¡¼¥ë¤Ï Linux ÆÃÍ­¤Ç¤¢¤ë¡£
739 IRIX ¤Ë¤Ï
740 .BR prctl ()
741 ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤¬¤¢¤ë¤¬ (MIPS ¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ë¤ª¤¤¤Æ
742 irix_prctl ¤È¤·¤Æ Linux 2.1.44 ¤ÇƱÍͤËƳÆþ¤µ¤ì¤¿)¡¢
743 ¤½¤Î¥×¥í¥È¥¿¥¤¥×¤Ï
744 .sp
745 .BI "ptrdiff_t prctl(int " option ", int " arg2 ", int " arg3 );
746 .sp
747 .\"O and options to get the maximum number of processes per user,
748 .\"O get the maximum number of processors the calling process can use,
749 .\"O find out whether a specified process is currently blocked,
750 .\"O get or set the maximum stack size, etc.
751 ¤Ç¤¢¤ë¡£¥æ¡¼¥¶¡¼Åö¤ê¤Î¥×¥í¥»¥¹ºÇÂç¿ô¤ò¼èÆÀ¤¹¤ë¥ª¥×¥·¥ç¥ó¡¢
752 ¥×¥í¥»¥¹¤Î»ÈÍѤǤ­¤ëºÇÂç¥×¥í¥Ã¥µ¡¼¿ô¤ò¼èÆÀ¤¹¤ë¥ª¥×¥·¥ç¥ó¡¢
753 ¸½ºßÆÃÄê¤Î¥×¥í¥»¥¹¤¬Ää»ß(block)¤µ¤»¤é¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«Ä´¤Ù¤ë¥ª¥×¥·¥ç¥ó¡¢
754 ¥¹¥¿¥Ã¥¯¥µ¥¤¥º¤ÎºÇÂçÃͤμèÆÀ¤äÀßÄê¤ò¹Ô¤Ê¤¦¥ª¥×¥·¥ç¥ó¤Ê¤É¤¬¤¢¤ë¡£
755 .\"O .SH "SEE ALSO"
756 .SH ´ØÏ¢¹àÌÜ
757 .BR signal (2),
758 .BR core (5)