Debian Codegraph @

po/ko/man2/ptrace.2.po

raw
1 # Korean translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # 정강훈 <[email protected]>, 2000.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n\n"
8 "POT-Creation-Date: 2026-06-05 06:38+0200\n"
9 "PO-Revision-Date: 2000-09-21 08:57+0900\n"
10 "Last-Translator: 정강훈 <[email protected]>\n"
11 "Language-Team: Korean <[email protected]>\n"
12 "Language: ko\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=1; plural=0;\n"
17
18 #. type: TH
19 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
20 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
21 #, no-wrap
22 msgid "ptrace"
23 msgstr "ptrace"
24
25 #. type: TH
26 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
27 #: opensuse-tumbleweed
28 #, no-wrap
29 msgid "2026-02-10"
30 msgstr "2026년 2월 10일"
31
32 #. type: TH
33 #: archlinux debian-unstable
34 #, no-wrap
35 msgid "Linux man-pages 6.18"
36 msgstr "Linux man-pages 6.18"
37
38 #. type: SH
39 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
40 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
41 #, no-wrap
42 msgid "NAME"
43 msgstr "이름"
44
45 #. type: Plain text
46 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
47 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
48 msgid "ptrace - process trace"
49 msgstr "ptrace - 프로세스 추적"
50
51 #. type: SH
52 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
53 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
54 #, no-wrap
55 msgid "LIBRARY"
56 msgstr "라이브러리"
57
58 #. type: Plain text
59 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
60 #: opensuse-leap-16-1 opensuse-tumbleweed
61 msgid "Standard C library (I<libc>,\\ I<-lc>)"
62 msgstr "표준 C 라이브러리 (I<libc>,\\ I<-lc>)"
63
64 #. type: SH
65 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
66 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
67 #, no-wrap
68 msgid "SYNOPSIS"
69 msgstr "요약"
70
71 #. type: Plain text
72 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
73 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
74 #, no-wrap
75 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
76 msgstr "B<#include E<lt>sys/ptrace.hE<gt>>\n"
77
78 #. type: Plain text
79 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
80 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
81 #, fuzzy, no-wrap
82 #| msgid ""
83 #| "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<,>\n"
84 #| "B< void *>I<addr>B<, void *>I<data>B<);>\n"
85 msgid ""
86 "B<long ptrace(enum __ptrace_request >I<op>B<, pid_t >I<pid>B<,>\n"
87 "B< void *>I<addr>B<, void *>I<data>B<);>\n"
88 msgstr ""
89 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<,>\n"
90 "B< void *>I<addr>B<, void *>I<data>B<);>\n"
91
92 #. type: SH
93 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
94 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
95 #, no-wrap
96 msgid "DESCRIPTION"
97 msgstr "설명"
98
99 #. type: Plain text
100 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
101 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
102 #, fuzzy
103 #| msgid ""
104 #| "The B<ptrace> system call provides a means by which a parent process may "
105 #| "observe and control the execution of another process, and examine and "
106 #| "change its core image and registers. It is primarily used to implement "
107 #| "breakpoint debugging and system call tracing."
108 msgid ""
109 "The B<ptrace>() system call provides a means by which one process (the "
110 "\"tracer\") may observe and control the execution of another process (the "
111 "\"tracee\"), and examine and change the tracee's memory and registers. It "
112 "is primarily used to implement breakpoint debugging and system call tracing."
113 msgstr ""
114 "B<ptrace> 시스템 콜은 부모 프로세스가 다른 프로세스의 실행을 관찰하거나 제어"
115 "하는 수단을 제공한다. 그리고 해당 프로세스의 코어 이미지와 레지스터들을 검사"
116 "하고 바꿀수 있는 수단도 제공한다. 이 함수는 우선 breakpoint 디버깅과 시스템 "
117 "콜 추적을 수행하는데 사용된다."
118
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 msgid ""
123 "A tracee first needs to be attached to the tracer. Attachment and "
124 "subsequent commands are per thread: in a multithreaded process, every thread "
125 "can be individually attached to a (potentially different) tracer, or left "
126 "not attached and thus not debugged. Therefore, \"tracee\" always means "
127 "\"(one) thread\", never \"a (possibly multithreaded) process\". Ptrace "
128 "commands are always sent to a specific tracee using a call of the form"
129 msgstr ""
130
131 #. type: Plain text
132 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
133 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
134 #, no-wrap
135 msgid "ptrace(PTRACE_foo, pid, ...)\n"
136 msgstr "ptrace(PTRACE_foo, pid, ...)\n"
137
138 #. type: Plain text
139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
141 msgid "where I<pid> is the thread ID of the corresponding Linux thread."
142 msgstr ""
143
144 #. type: Plain text
145 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
146 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
147 msgid ""
148 "(Note that in this page, a \"multithreaded process\" means a thread group "
149 "consisting of threads created using the B<clone>(2) B<CLONE_THREAD> flag.)"
150 msgstr ""
151
152 #. type: Plain text
153 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
154 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
155 #, fuzzy
156 #| msgid ""
157 #| "The parent can initiate a trace by calling B<fork>(2) and having the "
158 #| "resulting child do a PTRACE_TRACEME, followed (typically) by an "
159 #| "B<exec>(2). Alternatively, the parent may commence trace of an existing "
160 #| "process using PTRACE_ATTACH."
161 msgid ""
162 "A process can initiate a trace by calling B<fork>(2) and having the "
163 "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an "
164 "B<execve>(2). Alternatively, one process may commence tracing another "
165 "process using B<PTRACE_ATTACH> or B<PTRACE_SEIZE>."
166 msgstr ""
167 "부모 프로세스는 B<fork>(2)를 호출하여 추적을 시작할수 있으며 B<exec>(2)다음"
168 "에 (전형적으로) PTRACE_TRACEME를 하는 결과 자식 프로세스를 가질수 있다. 선택"
169 "적으로, 부모 프로세스는 PTRACE_ATTACH를 사용하여 존재하는 프로세스의 추적을 "
170 "시작할수 있다."
171
172 #. type: Plain text
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 #, fuzzy
176 #| msgid ""
177 #| "While being traced, the child will stop each time a signal is delivered, "
178 #| "even if the signal is being ignored. (The exception is SIGKILL, which "
179 #| "has its usual effect.) The parent will be notified at its next "
180 #| "B<wait>(2) and may inspect and modify the child process while it is "
181 #| "stopped. The parent then causes the child to continue, optionally "
182 #| "ignoring the delivered signal (or even delivering a different signal "
183 #| "instead)."
184 msgid ""
185 "While being traced, the tracee will stop each time a signal is delivered, "
186 "even if the signal is being ignored. (An exception is B<SIGKILL>, which has "
187 "its usual effect.) The tracer will be notified at its next call to "
188 "B<waitpid>(2) (or one of the related \"wait\" system calls); that call will "
189 "return a I<status> value containing information that indicates the cause of "
190 "the stop in the tracee. While the tracee is stopped, the tracer can use "
191 "various ptrace operations to inspect and modify the tracee. The tracer then "
192 "causes the tracee to continue, optionally ignoring the delivered signal (or "
193 "even delivering a different signal instead)."
194 msgstr ""
195 "프로세스를 추적하는 동안, 비록 신호가 무시된다 할지라도 신호가 도착할때마다 "
196 "자식 프로세스는 멈출것이다. (예외는 SIGKILL이며 이 신호는 자신의 원래 효과"
197 "를 가진다.) 부모 프로세스는 다음 B<wait>(2)에서 인식되며 멈추는 동안 자식 프"
198 "로세스를 수정 한다. 그리고 부모 프로세스는 자식 프로세스가 계속하도록 야기하"
199 "며 옵션으로 전달된 신호를 무시할수 있다.(또는 다른 신호가 대신 전달된다 할지"
200 "라도)"
201
202 #. type: Plain text
203 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
204 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
205 msgid ""
206 "If the B<PTRACE_O_TRACEEXEC> option is not in effect, all successful calls "
207 "to B<execve>(2) by the traced process will cause it to be sent a B<SIGTRAP> "
208 "signal, giving the parent a chance to gain control before the new program "
209 "begins execution."
210 msgstr ""
211
212 #. type: Plain text
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 #, fuzzy
216 #| msgid ""
217 #| "When the parent is finished tracing, it can terminate the child with "
218 #| "PTRACE_KILL or cause it to continue executing in a normal, untraced mode "
219 #| "via PTRACE_DETACH."
220 msgid ""
221 "When the tracer is finished tracing, it can cause the tracee to continue "
222 "executing in a normal, untraced mode via B<PTRACE_DETACH>."
223 msgstr ""
224 "부모 프로세스가 추적을 마칠때, 부모는 PTRACE_KILL를 가진 자식 프로세스를 종료"
225 "시키거나 PTRACE_DETACH를 통해 추적을 안하는 모드에서 보통 실행을 계속하도록 "
226 "한다."
227
228 #. type: Plain text
229 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
230 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
231 #, fuzzy
232 #| msgid "The value of I<request> determines the action to be performed:"
233 msgid "The value of I<op> determines the operation to be performed:"
234 msgstr "I<request>의 값은 행해져야할 행동을 결정한다:"
235
236 #. type: TP
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, no-wrap
240 msgid "B<PTRACE_TRACEME>"
241 msgstr "B<PTRACE_TRACEME>"
242
243 #. type: Plain text
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 msgid ""
247 "Indicate that this process is to be traced by its parent. A process "
248 "probably shouldn't make this operation if its parent isn't expecting to "
249 "trace it. (I<pid>, I<addr>, and I<data> are ignored.)"
250 msgstr ""
251
252 #. type: Plain text
253 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
254 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
255 #, fuzzy
256 #| msgid ""
257 #| "The above request is used only by the child process; the rest are used "
258 #| "only by the parent. In the following requests, I<pid> specifies the "
259 #| "child process to be acted on. For requests other than PTRACE_KILL, the "
260 #| "child process must be stopped."
261 msgid ""
262 "The B<PTRACE_TRACEME> operation is used only by the tracee; the remaining "
263 "operations are used only by the tracer. In the following operations, I<pid> "
264 "specifies the thread ID of the tracee to be acted on. For operations other "
265 "than B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, B<PTRACE_INTERRUPT>, and "
266 "B<PTRACE_KILL>, the tracee must be stopped."
267 msgstr ""
268 "위의 request는 자식 프로세스에 의해서만 사용된다.; 나머지는 부모에 의해서만 "
269 "사용된다. 다음 request 들중에, I<pid>는 작동하는 자식 프로세스를 가리킨다. "
270 "PTRACE_KILL외 다른 request들을 위해서 자식 프로세스는 멈추어져야 한다."
271
272 #. type: TP
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 #, fuzzy, no-wrap
276 #| msgid "B<PTRACE_EVENT_EXIT>"
277 msgid "B<PTRACE_PEEKTEXT>"
278 msgstr "B<PTRACE_EVENT_EXIT>"
279
280 #. type: TQ
281 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
282 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
283 #, fuzzy, no-wrap
284 #| msgid "B<PTRACE_PEEKUSER>"
285 msgid "B<PTRACE_PEEKDATA>"
286 msgstr "B<PTRACE_PEEKUSER>"
287
288 #. type: Plain text
289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
291 #, fuzzy
292 #| msgid ""
293 #| "Reads a word at the location I<addr> in the child's memory, returning the "
294 #| "word as the result of the B<ptrace> call. Linux does not have separate "
295 #| "text and data address spaces, so the two requests are currently "
296 #| "equivalent. (I<data> is ignored.)"
297 msgid ""
298 "Read a word at the address I<addr> in the tracee's memory, returning the "
299 "word as the result of the B<ptrace>() call. Linux does not have separate "
300 "text and data address spaces, so these two operations are currently "
301 "equivalent. (I<data> is ignored; but see NOTES.)"
302 msgstr ""
303 "자식 프로세스 메모리의 I<addr>위치의 워드(word)를 읽고 B<ptrace> 콜의 결과로"
304 "써 워드를 반환한다. 리눅스는 text와 data 주소 공간을 분리하지 않는다. 그래"
305 "서 두개의 request는 현재 같다.(I<data>는 무시된다.)"
306
307 #. type: TP
308 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
309 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
310 #, no-wrap
311 msgid "B<PTRACE_PEEKUSER>"
312 msgstr "B<PTRACE_PEEKUSER>"
313
314 #. PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
315 #. and that is the name that seems common on other systems.
316 #. type: Plain text
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 #, fuzzy
320 #| msgid ""
321 #| "Reads a word at offset I<addr> in the child's B<USER> area, which holds "
322 #| "the registers and other information about the process (see E<lt>linux/"
323 #| "user.hE<gt> and E<lt>sys/user.hE<gt>). The word is returned as the "
324 #| "result of the B<ptrace> call. Typically the offset must be word-aligned, "
325 #| "though this might vary by architecture. (I<data> is ignored.)"
326 msgid ""
327 "Read a word at offset I<addr> in the tracee's USER area, which holds the "
328 "registers and other information about the process (see I<E<lt>sys/"
329 "user.hE<gt>>). The word is returned as the result of the B<ptrace>() "
330 "call. Typically, the offset must be word-aligned, though this might vary by "
331 "architecture. See NOTES. (I<data> is ignored; but see NOTES.)"
332 msgstr ""
333 "레지스터와 프로세스에 관한 다른 정보를 가지고 있는 자식 프로세스의 B<USER> 공"
334 "간에 있는 변위 I<addr> 의 워드를 읽는다. (E<lt>linux/user.hE<gt> 와 "
335 "E<lt>sys/user.hE<gt> 를 참조해라.) word는 B<ptrace> 시스템 콜의 결과로써 반"
336 "환된다. 전형적으로 변위는 아키텍쳐에 의해 바뀐다 할지라도, 워드-정렬이어야 "
337 "한다. (I<data>는 무시된다.)"
338
339 #. type: TP
340 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
341 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
342 #, fuzzy, no-wrap
343 #| msgid "B<PTRACE_POKEUSER>"
344 msgid "B<PTRACE_POKETEXT>"
345 msgstr "B<PTRACE_POKEUSER>"
346
347 #. type: TQ
348 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
349 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
350 #, fuzzy, no-wrap
351 #| msgid "B<PTRACE_POKEUSER>"
352 msgid "B<PTRACE_POKEDATA>"
353 msgstr "B<PTRACE_POKEUSER>"
354
355 #. type: Plain text
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 #, fuzzy
359 #| msgid ""
360 #| "Copies a word from location I<data> in the parent's memory to location "
361 #| "I<addr> in the child's memory. As above, the two requests are currently "
362 #| "equivalent."
363 msgid ""
364 "Copy the word I<data> to the address I<addr> in the tracee's memory. As for "
365 "B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two operations are "
366 "currently equivalent."
367 msgstr ""
368 "부모 프로세스 메모리에 있는 위치 I<data>에서 자식 프로세스 메모리에 있는 위"
369 "치 I<addr>으로 word를 복사한다. 위처럼, 두 request는 현재 같다."
370
371 #. type: TP
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 #, no-wrap
375 msgid "B<PTRACE_POKEUSER>"
376 msgstr "B<PTRACE_POKEUSER>"
377
378 #. PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
379 #. and that is the name that seems common on other systems.
380 #. FIXME In the preceding sentence, which modifications are disallowed,
381 #. and when they are disallowed, how does user space discover that fact?
382 #. type: Plain text
383 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
384 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
385 #, fuzzy
386 #| msgid ""
387 #| "Copies a word from location I<data> in the parent's memory to offset "
388 #| "I<addr> in the child's B<USER> area. As above, the offset must typically "
389 #| "be word-aligned. In order to maintain the integrity of the kernel, some "
390 #| "modifications to the B<USER> area are disallowed."
391 msgid ""
392 "Copy the word I<data> to offset I<addr> in the tracee's USER area. As for "
393 "B<PTRACE_PEEKUSER>, the offset must typically be word-aligned. In order to "
394 "maintain the integrity of the kernel, some modifications to the USER area "
395 "are disallowed."
396 msgstr ""
397 "부모 프로세스 메모리에 있는 위치 I<data>에서 자식 프로세스의 I<addr> B<USER> "
398 "영역으로 word를 복사한다. 위처럼, 변위는 전형적으로 워드-정렬이어야 한다. 커"
399 "널의 무결성을 유지하기 위해, B<USER> 영역에 대한 수정은 허용되지 않는다."
400
401 #. type: TP
402 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
403 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
404 #, fuzzy, no-wrap
405 #| msgid "B<PTRACE_TRACEME>"
406 msgid "B<PTRACE_GETREGS>"
407 msgstr "B<PTRACE_TRACEME>"
408
409 #. type: TQ
410 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
411 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
412 #, fuzzy, no-wrap
413 #| msgid "B<PTRACE_MODE_FSCREDS>"
414 msgid "B<PTRACE_GETFPREGS>"
415 msgstr "B<PTRACE_MODE_FSCREDS>"
416
417 #. type: Plain text
418 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
419 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
420 msgid ""
421 "Copy the tracee's general-purpose or floating-point registers, respectively, "
422 "to the address I<data> in the tracer. See I<E<lt>sys/user.hE<gt>> for "
423 "information on the format of this data. (I<addr> is ignored.) Note that "
424 "SPARC systems have the meaning of I<data> and I<addr> reversed; that is, "
425 "I<data> is ignored and the registers are copied to the address I<addr>. "
426 "B<PTRACE_GETREGS> and B<PTRACE_GETFPREGS> are not present on all "
427 "architectures."
428 msgstr ""
429
430 #. type: TP
431 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
432 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
433 #, no-wrap
434 msgid "B<PTRACE_GETREGSET> (since Linux 2.6.34)"
435 msgstr ""
436
437 #. type: Plain text
438 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
439 #: opensuse-leap-16-1 opensuse-tumbleweed
440 msgid ""
441 "Read the tracee's registers. I<addr> specifies, in an architecture-"
442 "dependent way, the type of registers to be read. B<NT_PRSTATUS> (with "
443 "numerical value 1) usually results in reading of general-purpose "
444 "registers. If the CPU has, for example, floating-point and/or vector "
445 "registers, they can be retrieved by setting I<addr> to the corresponding "
446 "B<NT_foo> constant. I<data> points to a B<struct iovec>, which describes "
447 "the destination buffer's location and size. On return, the kernel modifies "
448 "B<iov.len> to indicate the actual number of bytes returned."
449 msgstr ""
450
451 #. type: TP
452 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
453 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
454 #, fuzzy, no-wrap
455 #| msgid "B<PTRACE_TRACEME>"
456 msgid "B<PTRACE_SETREGS>"
457 msgstr "B<PTRACE_TRACEME>"
458
459 #. type: TQ
460 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
461 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
462 #, fuzzy, no-wrap
463 #| msgid "B<PTRACE_MODE_FSCREDS>"
464 msgid "B<PTRACE_SETFPREGS>"
465 msgstr "B<PTRACE_MODE_FSCREDS>"
466
467 #. FIXME . In the preceding sentence, which modifications are disallowed,
468 #. and when they are disallowed, how does user space discover that fact?
469 #. type: Plain text
470 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
471 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
472 msgid ""
473 "Modify the tracee's general-purpose or floating-point registers, "
474 "respectively, from the address I<data> in the tracer. As for "
475 "B<PTRACE_POKEUSER>, some general-purpose register modifications may be "
476 "disallowed. (I<addr> is ignored.) Note that SPARC systems have the meaning "
477 "of I<data> and I<addr> reversed; that is, I<data> is ignored and the "
478 "registers are copied from the address I<addr>. B<PTRACE_SETREGS> and "
479 "B<PTRACE_SETFPREGS> are not present on all architectures."
480 msgstr ""
481
482 #. type: TP
483 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
484 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
485 #, no-wrap
486 msgid "B<PTRACE_SETREGSET> (since Linux 2.6.34)"
487 msgstr ""
488
489 #. type: Plain text
490 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
491 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
492 msgid ""
493 "Modify the tracee's registers. The meaning of I<addr> and I<data> is "
494 "analogous to B<PTRACE_GETREGSET>."
495 msgstr ""
496
497 #. type: TP
498 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
499 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
500 #, no-wrap
501 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
502 msgstr ""
503
504 #. type: Plain text
505 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
506 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
507 msgid ""
508 "Retrieve information about the signal that caused the stop. Copy a "
509 "I<siginfo_t> structure (see B<sigaction>(2)) from the tracee to the address "
510 "I<data> in the tracer. (I<addr> is ignored.)"
511 msgstr ""
512
513 #. type: TP
514 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
515 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
516 #, no-wrap
517 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
518 msgstr ""
519
520 #. type: Plain text
521 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
522 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
523 msgid ""
524 "Set signal information: copy a I<siginfo_t> structure from the address "
525 "I<data> in the tracer to the tracee. This will affect only signals that "
526 "would normally be delivered to the tracee and were caught by the tracer. It "
527 "may be difficult to tell these normal signals from synthetic signals "
528 "generated by B<ptrace>() itself. (I<addr> is ignored.)"
529 msgstr ""
530
531 #. type: TP
532 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
533 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
534 #, no-wrap
535 msgid "B<PTRACE_PEEKSIGINFO> (since Linux 3.10)"
536 msgstr ""
537
538 #. commit 84c751bd4aebbaae995fe32279d3dba48327bad4
539 #. type: Plain text
540 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
541 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
542 msgid ""
543 "Retrieve I<siginfo_t> structures without removing signals from a queue. "
544 "I<addr> points to a I<ptrace_peeksiginfo_args> structure that specifies the "
545 "ordinal position from which copying of signals should start, and the number "
546 "of signals to copy. I<siginfo_t> structures are copied into the buffer "
547 "pointed to by I<data>. The return value contains the number of copied "
548 "signals (zero indicates that there is no signal corresponding to the "
549 "specified ordinal position). Within the returned I<siginfo> structures, the "
550 "I<si_code> field includes information (B<__SI_CHLD>, B<__SI_FAULT>, etc.) "
551 "that are not otherwise exposed to user space."
552 msgstr ""
553
554 #. type: Plain text
555 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
556 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
557 #, no-wrap
558 msgid ""
559 "struct ptrace_peeksiginfo_args {\n"
560 " u64 off; /* Ordinal position in queue at which\n"
561 " to start copying signals */\n"
562 " u32 flags; /* PTRACE_PEEKSIGINFO_SHARED or 0 */\n"
563 " s32 nr; /* Number of signals to copy */\n"
564 "};\n"
565 msgstr ""
566
567 #. type: Plain text
568 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
569 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
570 msgid ""
571 "Currently, there is only one flag, B<PTRACE_PEEKSIGINFO_SHARED>, for dumping "
572 "signals from the process-wide signal queue. If this flag is not set, "
573 "signals are read from the per-thread queue of the specified thread."
574 msgstr ""
575
576 #. type: TP
577 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
578 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
579 #, no-wrap
580 msgid "B<PTRACE_GETSIGMASK> (since Linux 3.11)"
581 msgstr ""
582
583 #. commit 29000caecbe87b6b66f144f72111f0d02fbbf0c1
584 #. type: Plain text
585 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
586 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
587 msgid ""
588 "Place a copy of the mask of blocked signals (see B<sigprocmask>(2)) in the "
589 "buffer pointed to by I<data>, which should be a pointer to a buffer of type "
590 "I<sigset_t>. The I<addr> argument contains the size of the buffer pointed "
591 "to by I<data> (i.e., I<sizeof(sigset_t)>)."
592 msgstr ""
593
594 #. type: TP
595 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
596 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
597 #, no-wrap
598 msgid "B<PTRACE_SETSIGMASK> (since Linux 3.11)"
599 msgstr ""
600
601 #. type: Plain text
602 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
603 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
604 msgid ""
605 "Change the mask of blocked signals (see B<sigprocmask>(2)) to the value "
606 "specified in the buffer pointed to by I<data>, which should be a pointer to "
607 "a buffer of type I<sigset_t>. The I<addr> argument contains the size of the "
608 "buffer pointed to by I<data> (i.e., I<sizeof(sigset_t)>)."
609 msgstr ""
610
611 #. type: TP
612 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
613 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
614 #, no-wrap
615 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
616 msgstr ""
617
618 #. type: Plain text
619 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
620 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
621 msgid ""
622 "Set ptrace options from I<data>. (I<addr> is ignored.) I<data> is "
623 "interpreted as a bit mask of options, which are specified by the following "
624 "flags:"
625 msgstr ""
626
627 #. type: TP
628 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
629 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
630 #, no-wrap
631 msgid "B<PTRACE_O_EXITKILL> (since Linux 3.8)"
632 msgstr ""
633
634 #. commit 992fb6e170639b0849bace8e49bf31bd37c4123
635 #. type: Plain text
636 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
637 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
638 msgid ""
639 "Send a B<SIGKILL> signal to the tracee if the tracer exits. This option is "
640 "useful for ptrace jailers that want to ensure that tracees can never escape "
641 "the tracer's control."
642 msgstr ""
643
644 #. type: TP
645 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
646 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
647 #, no-wrap
648 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
649 msgstr ""
650
651 #. type: Plain text
652 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
653 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
654 msgid ""
655 "Stop the tracee at the next B<clone>(2) and automatically start tracing the "
656 "newly cloned process, which will start with a B<SIGSTOP>, or "
657 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used. A B<waitpid>(2) by the "
658 "tracer will return a I<status> value such that"
659 msgstr ""
660
661 #. type: Plain text
662 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
663 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
664 #, no-wrap
665 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
666 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
667
668 #. type: Plain text
669 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
670 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
671 msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
672 msgstr ""
673
674 #. type: Plain text
675 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
676 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
677 msgid ""
678 "This option may not catch B<clone>(2) calls in all cases. If the tracee "
679 "calls B<clone>(2) with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will "
680 "be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
681 "tracee calls B<clone>(2) with the exit signal set to B<SIGCHLD>, "
682 "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
683 msgstr ""
684
685 #. type: TP
686 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
687 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
688 #, no-wrap
689 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
690 msgstr ""
691
692 #. type: Plain text
693 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
694 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
695 msgid ""
696 "Stop the tracee at the next B<execve>(2). A B<waitpid>(2) by the tracer "
697 "will return a I<status> value such that"
698 msgstr ""
699
700 #. type: Plain text
701 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
702 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
703 #, no-wrap
704 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
705 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
706
707 #. type: Plain text
708 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
709 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
710 msgid ""
711 "If the execing thread is not a thread group leader, the thread ID is reset "
712 "to thread group leader's ID before this stop. Since Linux 3.0, the former "
713 "thread ID can be retrieved with B<PTRACE_GETEVENTMSG>."
714 msgstr ""
715
716 #. type: TP
717 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
718 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
719 #, no-wrap
720 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
721 msgstr ""
722
723 #. type: Plain text
724 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
725 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
726 msgid ""
727 "Stop the tracee at exit. A B<waitpid>(2) by the tracer will return a "
728 "I<status> value such that"
729 msgstr ""
730
731 #. type: Plain text
732 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
733 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
734 #, no-wrap
735 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
736 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
737
738 #. type: Plain text
739 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
740 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
741 msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
742 msgstr ""
743
744 #. type: Plain text
745 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
746 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
747 msgid ""
748 "The tracee is stopped early during process exit, when registers are still "
749 "available, allowing the tracer to see where the exit occurred, whereas the "
750 "normal exit notification is done after the process is finished exiting. "
751 "Even though context is available, the tracer cannot prevent the exit from "
752 "happening at this point."
753 msgstr ""
754
755 #. type: TP
756 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
757 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
758 #, no-wrap
759 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
760 msgstr ""
761
762 #. type: Plain text
763 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
764 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
765 msgid ""
766 "Stop the tracee at the next B<fork>(2) and automatically start tracing the "
767 "newly forked process, which will start with a B<SIGSTOP>, or "
768 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used. A B<waitpid>(2) by the "
769 "tracer will return a I<status> value such that"
770 msgstr ""
771
772 #. type: Plain text
773 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
774 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
775 #, no-wrap
776 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
777 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
778
779 #. type: TP
780 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
781 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
782 #, no-wrap
783 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
784 msgstr ""
785
786 #. type: Plain text
787 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
788 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
789 msgid ""
790 "When delivering system call traps, set bit 7 in the signal number (i.e., "
791 "deliver I<SIGTRAP|0x80>). This makes it easy for the tracer to distinguish "
792 "normal traps from those caused by a system call."
793 msgstr ""
794
795 #. type: TP
796 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
797 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
798 #, no-wrap
799 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
800 msgstr ""
801
802 #. type: Plain text
803 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
804 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
805 msgid ""
806 "Stop the tracee at the next B<vfork>(2) and automatically start tracing the "
807 "newly vforked process, which will start with a B<SIGSTOP>, or "
808 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used. A B<waitpid>(2) by the "
809 "tracer will return a I<status> value such that"
810 msgstr ""
811
812 #. type: Plain text
813 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
814 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
815 #, no-wrap
816 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
817 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
818
819 #. type: TP
820 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
821 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
822 #, no-wrap
823 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
824 msgstr ""
825
826 #. type: Plain text
827 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
828 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
829 msgid ""
830 "Stop the tracee at the completion of the next B<vfork>(2). A B<waitpid>(2) "
831 "by the tracer will return a I<status> value such that"
832 msgstr ""
833
834 #. type: Plain text
835 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
836 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
837 #, no-wrap
838 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
839 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
840
841 #. type: Plain text
842 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
843 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
844 msgid ""
845 "The PID of the new process can (since Linux 2.6.18) be retrieved with "
846 "B<PTRACE_GETEVENTMSG>."
847 msgstr ""
848
849 #. type: TP
850 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
851 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
852 #, no-wrap
853 msgid "B<PTRACE_O_TRACESECCOMP> (since Linux 3.5)"
854 msgstr ""
855
856 #. type: Plain text
857 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
858 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
859 msgid ""
860 "Stop the tracee when a B<seccomp>(2) B<SECCOMP_RET_TRACE> rule is "
861 "triggered. A B<waitpid>(2) by the tracer will return a I<status> value "
862 "such that"
863 msgstr ""
864
865 #. type: Plain text
866 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
867 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
868 #, no-wrap
869 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_SECCOMPE<lt>E<lt>8))\n"
870 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_SECCOMPE<lt>E<lt>8))\n"
871
872 #. type: Plain text
873 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
874 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
875 msgid ""
876 "While this triggers a B<PTRACE_EVENT> stop, it is similar to a syscall-enter-"
877 "stop. For details, see the note on B<PTRACE_EVENT_SECCOMP> below. The "
878 "seccomp event message data (from the B<SECCOMP_RET_DATA> portion of the "
879 "seccomp filter rule) can be retrieved with B<PTRACE_GETEVENTMSG>."
880 msgstr ""
881
882 #. type: TP
883 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
884 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
885 #, no-wrap
886 msgid "B<PTRACE_O_SUSPEND_SECCOMP> (since Linux 4.3)"
887 msgstr ""
888
889 #. commit 13c4a90119d28cfcb6b5bdd820c233b86c2b0237
890 #. type: Plain text
891 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
892 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
893 msgid ""
894 "Suspend the tracee's seccomp protections. This applies regardless of mode, "
895 "and can be used when the tracee has not yet installed seccomp filters. That "
896 "is, a valid use case is to suspend a tracee's seccomp protections before "
897 "they are installed by the tracee, let the tracee install the filters, and "
898 "then clear this flag when the filters should be resumed. Setting this "
899 "option requires that the tracer have the B<CAP_SYS_ADMIN> capability, not "
900 "have any seccomp protections installed, and not have "
901 "B<PTRACE_O_SUSPEND_SECCOMP> set on itself."
902 msgstr ""
903
904 #. type: TP
905 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
906 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
907 #, no-wrap
908 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
909 msgstr ""
910
911 #. type: Plain text
912 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
913 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
914 msgid ""
915 "Retrieve a message (as an I<unsigned long>) about the ptrace event that "
916 "just happened, placing it at the address I<data> in the tracer. For "
917 "B<PTRACE_EVENT_EXIT>, this is the tracee's exit status. For "
918 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and "
919 "B<PTRACE_EVENT_CLONE>, this is the PID of the new process. For "
920 "B<PTRACE_EVENT_SECCOMP>, this is the B<seccomp>(2) filter's "
921 "B<SECCOMP_RET_DATA> associated with the triggered rule. (I<addr> is "
922 "ignored.)"
923 msgstr ""
924
925 #. type: TP
926 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
927 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
928 #, no-wrap
929 msgid "B<PTRACE_CONT>"
930 msgstr "B<PTRACE_CONT>"
931
932 #. type: Plain text
933 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
934 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
935 #, fuzzy
936 #| msgid ""
937 #| "Restarts the stopped child process. If I<data> is non-zero and not "
938 #| "SIGSTOP, it is interpreted as a signal to be delivered to the child; "
939 #| "otherwise, no signal is delivered. Thus, for example, the parent can "
940 #| "control whether a signal sent to the child is delivered or not. (I<addr> "
941 #| "is ignored.)"
942 msgid ""
943 "Restart the stopped tracee process. If I<data> is nonzero, it is "
944 "interpreted as the number of a signal to be delivered to the tracee; "
945 "otherwise, no signal is delivered. Thus, for example, the tracer can "
946 "control whether a signal sent to the tracee is delivered or not. (I<addr> "
947 "is ignored.)"
948 msgstr ""
949 "중지된 자식 프로세스를 다시 시작한다. 만일 I<data>가 0도 SIGSTOP도 아니라면, "
950 "이것은 자식에게 전달되어야 하는 신호로써 해석된다.; 그렇지 않으면, 어떤 신호"
951 "도 전달되지 않는다. 예를 들어, 부모 프로세스는 자식에게 보내진 신호가 전달될"
952 "지 아닐지를 제어할수 있다. (I<addr>는 무시된다.)"
953
954 #. type: TP
955 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
956 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
957 #, fuzzy, no-wrap
958 #| msgid "B<PTRACE_KILL>"
959 msgid "B<PTRACE_SYSCALL>"
960 msgstr "B<PTRACE_KILL>"
961
962 #. type: TQ
963 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
964 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
965 #, fuzzy, no-wrap
966 #| msgid "PTRACE_SYSCALL, PTRACE_SINGLESTEP"
967 msgid "B<PTRACE_SINGLESTEP>"
968 msgstr "PTRACE_SYSCALL, PTRACE_SINGLESTEP"
969
970 #. type: Plain text
971 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
972 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
973 #, fuzzy
974 #| msgid ""
975 #| "Restarts the stopped child as for PTRACE_CONT, but arranges for the child "
976 #| "to be stopped at the next entry to or exit from a system call, or after "
977 #| "execution of a single instruction, respectively. (The child will also, "
978 #| "as usual, be stopped upon receipt of a signal.) From the parent's "
979 #| "perspective, the child will appear to have been stopped by receipt of a "
980 #| "SIGTRAP. So, for PTRACE_SYSCALL, for example, the idea is to inspect the "
981 #| "arguments to the system call at the first stop, then do another "
982 #| "PTRACE_SYSCALL and inspect the return value of the system call at the "
983 #| "second stop. (I<addr> is ignored.)"
984 msgid ""
985 "Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee "
986 "to be stopped at the next entry to or exit from a system call, or after "
987 "execution of a single instruction, respectively. (The tracee will also, as "
988 "usual, be stopped upon receipt of a signal.) From the tracer's perspective, "
989 "the tracee will appear to have been stopped by receipt of a B<SIGTRAP>. So, "
990 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
991 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
992 "inspect the return value of the system call at the second stop. The I<data> "
993 "argument is treated as for B<PTRACE_CONT>. (I<addr> is ignored.)"
994 msgstr ""
995 "PTRACE_CONT처럼 중지된 자식의 프로세스를 다시 시작한다. 그러나 자식을 다음 엔"
996 "트리에서 중지하도록 재배열 하거나 시스템 콜에서 종료하거나 단일 명령어 실행후"
997 "에 종료한다.(보통처럼, 자식은 또한 신호를 받는 즉시 종료한다.) 부모 프로세스"
998 "의 관점에서, 자식 프로세스는 SIGTRAP을 받아 종료된것처럼 보일 것이다. 예를 들"
999 "어 PTRACE_SYSCALL를 위한 생각은 처음 중지시 시스템 콜을 위한 인자들을 조사하"
1000 "고 그리고 다른 PTRACE_SYSCALL을 하고 두번째 중지시에 시스템 콜의 반환값을 조"
1001 "사하는 것이다.(I<addr>는 무시된다.)"
1002
1003 #. type: TP
1004 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1005 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1006 #, no-wrap
1007 msgid "B<PTRACE_SET_SYSCALL> (since Linux 2.6.16)"
1008 msgstr ""
1009
1010 #. commit 3f471126ee53feb5e9b210ea2f525ed3bb9b7a7f
1011 #. As of 4.19-rc2
1012 #. commit 27aa55c5e5123fa8b8ad0156559d34d7edff58ca
1013 #. see change_syscall in tools/testing/selftests/seccomp/seccomp_bpf.c
1014 #. and also strace's linux/*/set_scno.c files.
1015 #. type: Plain text
1016 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1017 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1018 msgid ""
1019 "When in syscall-enter-stop, change the number of the system call that is "
1020 "about to be executed to the number specified in the I<data> argument. The "
1021 "I<addr> argument is ignored. This operation is currently supported only on "
1022 "arm (and arm64, though only for backwards compatibility), but most other "
1023 "architectures have other means of accomplishing this (usually by changing "
1024 "the register that the userland code passed the system call number in)."
1025 msgstr ""
1026
1027 #. type: TP
1028 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1029 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1030 #, fuzzy, no-wrap
1031 #| msgid "B<PTRACE_TRACEME>"
1032 msgid "B<PTRACE_SYSEMU>"
1033 msgstr "B<PTRACE_TRACEME>"
1034
1035 #. type: TQ
1036 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1037 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1038 #, no-wrap
1039 msgid "B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
1040 msgstr ""
1041
1042 #. As at 3.7
1043 #. type: Plain text
1044 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1045 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1046 msgid ""
1047 "For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, "
1048 "which will not be executed. See the documentation on syscall-stops below. "
1049 "For B<PTRACE_SYSEMU_SINGLESTEP>, do the same but also singlestep if not a "
1050 "system call. This call is used by programs like User Mode Linux that want "
1051 "to emulate all the tracee's system calls. The I<data> argument is treated "
1052 "as for B<PTRACE_CONT>. The I<addr> argument is ignored. These operations "
1053 "are currently supported only on x86."
1054 msgstr ""
1055
1056 #. type: TP
1057 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1058 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1059 #, no-wrap
1060 msgid "B<PTRACE_LISTEN> (since Linux 3.4)"
1061 msgstr ""
1062
1063 #. type: Plain text
1064 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1065 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1066 msgid ""
1067 "Restart the stopped tracee, but prevent it from executing. The resulting "
1068 "state of the tracee is similar to a process which has been stopped by a "
1069 "B<SIGSTOP> (or other stopping signal). See the \"group-stop\" subsection "
1070 "for additional information. B<PTRACE_LISTEN> works only on tracees attached "
1071 "by B<PTRACE_SEIZE>."
1072 msgstr ""
1073
1074 #. type: TP
1075 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1076 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1077 #, no-wrap
1078 msgid "B<PTRACE_KILL>"
1079 msgstr "B<PTRACE_KILL>"
1080
1081 #. type: Plain text
1082 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1083 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1084 #, fuzzy
1085 #| msgid ""
1086 #| "Sends the child a SIGKILL to terminate it. (I<addr> and I<data> are "
1087 #| "ignored.)"
1088 msgid ""
1089 "Send the tracee a B<SIGKILL> to terminate it. (I<addr> and I<data> are "
1090 "ignored.)"
1091 msgstr ""
1092 "종료하도록 하기 위해 SIGKILL을 자식에게 보낸다.(I<addr>와 I<data>는 무시된"
1093 "다.)"
1094
1095 #. #-#-#-#-# archlinux: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1096 #. [Note from Denys Vlasenko:
1097 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
1098 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
1099 #. type: Plain text
1100 #. #-#-#-#-# debian-trixie: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1101 #. [Note from Denys Vlasenko:
1102 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
1103 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
1104 #. type: Plain text
1105 #. #-#-#-#-# debian-unstable: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1106 #. [Note from Denys Vlasenko:
1107 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
1108 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
1109 #. type: Plain text
1110 #. #-#-#-#-# fedora-44: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1111 #. [Note from Denys Vlasenko:
1112 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
1113 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
1114 #. type: Plain text
1115 #. #-#-#-#-# fedora-rawhide: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1116 #. [Note from Denys Vlasenko:
1117 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
1118 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
1119 #. type: Plain text
1120 #. #-#-#-#-# mageia-cauldron: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1121 #. [Note from Denys Vlasenko:
1122 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
1123 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
1124 #. type: Plain text
1125 #. #-#-#-#-# opensuse-leap-16-1: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1126 #. [Note from Denys Vlasenko:
1127 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
1128 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
1129 #. type: Plain text
1130 #. #-#-#-#-# opensuse-tumbleweed: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1131 #. [Note from Denys Vlasenko:
1132 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
1133 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
1134 #. type: Plain text
1135 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1136 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1137 msgid ""
1138 "I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> "
1139 "directly using B<kill>(2) or B<tgkill>(2). The problem with B<PTRACE_KILL> "
1140 "is that it requires the tracee to be in signal-delivery-stop, otherwise it "
1141 "may not work (i.e., may complete successfully but won't kill the tracee). "
1142 "By contrast, sending a B<SIGKILL> directly has no such limitation."
1143 msgstr ""
1144
1145 #. type: TP
1146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1148 #, no-wrap
1149 msgid "B<PTRACE_INTERRUPT> (since Linux 3.4)"
1150 msgstr ""
1151
1152 #. type: Plain text
1153 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1154 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1155 msgid ""
1156 "Stop a tracee. If the tracee is running or sleeping in kernel space and "
1157 "B<PTRACE_SYSCALL> is in effect, the system call is interrupted and syscall-"
1158 "exit-stop is reported. (The interrupted system call is restarted when the "
1159 "tracee is restarted.) If the tracee was already stopped by a signal and "
1160 "B<PTRACE_LISTEN> was sent to it, the tracee stops with B<PTRACE_EVENT_STOP> "
1161 "and I<WSTOPSIG(status)> returns the stop signal. If any other ptrace-stop "
1162 "is generated at the same time (for example, if a signal is sent to the "
1163 "tracee), this ptrace-stop happens. If none of the above applies (for "
1164 "example, if the tracee is running in user space), it stops with "
1165 "B<PTRACE_EVENT_STOP> with I<WSTOPSIG(status)> == B<SIGTRAP>. "
1166 "B<PTRACE_INTERRUPT> only works on tracees attached by B<PTRACE_SEIZE>."
1167 msgstr ""
1168
1169 #. type: TP
1170 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1171 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1172 #, no-wrap
1173 msgid "B<PTRACE_ATTACH>"
1174 msgstr "B<PTRACE_ATTACH>"
1175
1176 #. #-#-#-#-# archlinux: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1177 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
1178 #. "I think it isn't true in non-ancient 2.4 and in Linux 2.6/3.x.
1179 #. Basically, it's not true for any Linux in practical use.
1180 #. the behavior of the tracee is as if it had done a
1181 #. .BR PTRACE_TRACEME .
1182 #. The calling process actually becomes the parent of the tracee
1183 #. process for most purposes (e.g., it will receive
1184 #. notification of tracee events and appears in
1185 #. .BR ps (1)
1186 #. output as the tracee's parent), but a
1187 #. .BR getppid (2)
1188 #. by the tracee will still return the PID of the original parent.
1189 #. type: Plain text
1190 #. #-#-#-#-# debian-trixie: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1191 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
1192 #. "I think it isn't true in non-ancient 2.4 and in Linux 2.6/3.x.
1193 #. Basically, it's not true for any Linux in practical use.
1194 #. ; the behavior of the tracee is as if it had done a
1195 #. .BR PTRACE_TRACEME .
1196 #. The calling process actually becomes the parent of the tracee
1197 #. process for most purposes (e.g., it will receive
1198 #. notification of tracee events and appears in
1199 #. .BR ps (1)
1200 #. output as the tracee's parent), but a
1201 #. .BR getppid (2)
1202 #. by the tracee will still return the PID of the original parent.
1203 #. type: Plain text
1204 #. #-#-#-#-# debian-unstable: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1205 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
1206 #. "I think it isn't true in non-ancient 2.4 and in Linux 2.6/3.x.
1207 #. Basically, it's not true for any Linux in practical use.
1208 #. the behavior of the tracee is as if it had done a
1209 #. .BR PTRACE_TRACEME .
1210 #. The calling process actually becomes the parent of the tracee
1211 #. process for most purposes (e.g., it will receive
1212 #. notification of tracee events and appears in
1213 #. .BR ps (1)
1214 #. output as the tracee's parent), but a
1215 #. .BR getppid (2)
1216 #. by the tracee will still return the PID of the original parent.
1217 #. type: Plain text
1218 #. #-#-#-#-# fedora-44: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1219 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
1220 #. "I think it isn't true in non-ancient 2.4 and in Linux 2.6/3.x.
1221 #. Basically, it's not true for any Linux in practical use.
1222 #. ; the behavior of the tracee is as if it had done a
1223 #. .BR PTRACE_TRACEME .
1224 #. The calling process actually becomes the parent of the tracee
1225 #. process for most purposes (e.g., it will receive
1226 #. notification of tracee events and appears in
1227 #. .BR ps (1)
1228 #. output as the tracee's parent), but a
1229 #. .BR getppid (2)
1230 #. by the tracee will still return the PID of the original parent.
1231 #. type: Plain text
1232 #. #-#-#-#-# fedora-rawhide: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1233 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
1234 #. "I think it isn't true in non-ancient 2.4 and in Linux 2.6/3.x.
1235 #. Basically, it's not true for any Linux in practical use.
1236 #. ; the behavior of the tracee is as if it had done a
1237 #. .BR PTRACE_TRACEME .
1238 #. The calling process actually becomes the parent of the tracee
1239 #. process for most purposes (e.g., it will receive
1240 #. notification of tracee events and appears in
1241 #. .BR ps (1)
1242 #. output as the tracee's parent), but a
1243 #. .BR getppid (2)
1244 #. by the tracee will still return the PID of the original parent.
1245 #. type: Plain text
1246 #. #-#-#-#-# mageia-cauldron: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1247 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
1248 #. "I think it isn't true in non-ancient 2.4 and in Linux 2.6/3.x.
1249 #. Basically, it's not true for any Linux in practical use.
1250 #. the behavior of the tracee is as if it had done a
1251 #. .BR PTRACE_TRACEME .
1252 #. The calling process actually becomes the parent of the tracee
1253 #. process for most purposes (e.g., it will receive
1254 #. notification of tracee events and appears in
1255 #. .BR ps (1)
1256 #. output as the tracee's parent), but a
1257 #. .BR getppid (2)
1258 #. by the tracee will still return the PID of the original parent.
1259 #. type: Plain text
1260 #. #-#-#-#-# opensuse-leap-16-1: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1261 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
1262 #. "I think it isn't true in non-ancient 2.4 and in Linux 2.6/3.x.
1263 #. Basically, it's not true for any Linux in practical use.
1264 #. the behavior of the tracee is as if it had done a
1265 #. .BR PTRACE_TRACEME .
1266 #. The calling process actually becomes the parent of the tracee
1267 #. process for most purposes (e.g., it will receive
1268 #. notification of tracee events and appears in
1269 #. .BR ps (1)
1270 #. output as the tracee's parent), but a
1271 #. .BR getppid (2)
1272 #. by the tracee will still return the PID of the original parent.
1273 #. type: Plain text
1274 #. #-#-#-#-# opensuse-tumbleweed: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
1275 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
1276 #. "I think it isn't true in non-ancient 2.4 and in Linux 2.6/3.x.
1277 #. Basically, it's not true for any Linux in practical use.
1278 #. the behavior of the tracee is as if it had done a
1279 #. .BR PTRACE_TRACEME .
1280 #. The calling process actually becomes the parent of the tracee
1281 #. process for most purposes (e.g., it will receive
1282 #. notification of tracee events and appears in
1283 #. .BR ps (1)
1284 #. output as the tracee's parent), but a
1285 #. .BR getppid (2)
1286 #. by the tracee will still return the PID of the original parent.
1287 #. type: Plain text
1288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1290 msgid ""
1291 "Attach to the process specified in I<pid>, making it a tracee of the calling "
1292 "process. The tracee is sent a B<SIGSTOP>, but will not necessarily have "
1293 "stopped by the completion of this call; use B<waitpid>(2) to wait for the "
1294 "tracee to stop. See the \"Attaching and detaching\" subsection for "
1295 "additional information. (I<addr> and I<data> are ignored.)"
1296 msgstr ""
1297
1298 #. type: Plain text
1299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1301 msgid ""
1302 "Permission to perform a B<PTRACE_ATTACH> is governed by a ptrace access mode "
1303 "B<PTRACE_MODE_ATTACH_REALCREDS> check; see below."
1304 msgstr ""
1305
1306 #. type: TP
1307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1309 #, no-wrap
1310 msgid "B<PTRACE_SEIZE> (since Linux 3.4)"
1311 msgstr ""
1312
1313 #
1314 #
1315 #
1316 #. Noted by Dmitry Levin:
1317 #. PTRACE_SEIZE was introduced by commit v3.1-rc1~308^2~28, but
1318 #. it had to be used along with a temporary flag PTRACE_SEIZE_DEVEL,
1319 #. which was removed later by commit v3.4-rc1~109^2~20.
1320 #. That is, [before] v3.4 we had a test mode of PTRACE_SEIZE API,
1321 #. which was not compatible with the current PTRACE_SEIZE API introduced
1322 #. in Linux 3.4.
1323 #. type: Plain text
1324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1326 msgid ""
1327 "Attach to the process specified in I<pid>, making it a tracee of the calling "
1328 "process. Unlike B<PTRACE_ATTACH>, B<PTRACE_SEIZE> does not stop the "
1329 "process. Group-stops are reported as B<PTRACE_EVENT_STOP> and "
1330 "I<WSTOPSIG(status)> returns the stop signal. Automatically attached "
1331 "children stop with B<PTRACE_EVENT_STOP> and I<WSTOPSIG(status)> returns "
1332 "B<SIGTRAP> instead of having B<SIGSTOP> signal delivered to them. "
1333 "B<execve>(2) does not deliver an extra B<SIGTRAP>. Only a B<PTRACE_SEIZE>d "
1334 "process can accept B<PTRACE_INTERRUPT> and B<PTRACE_LISTEN> commands. The "
1335 "\"seized\" behavior just described is inherited by children that are "
1336 "automatically attached using B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, "
1337 "and B<PTRACE_O_TRACECLONE>. I<addr> must be zero. I<data> contains a bit "
1338 "mask of ptrace options to activate immediately."
1339 msgstr ""
1340
1341 #. type: Plain text
1342 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1343 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1344 msgid ""
1345 "Permission to perform a B<PTRACE_SEIZE> is governed by a ptrace access mode "
1346 "B<PTRACE_MODE_ATTACH_REALCREDS> check; see below."
1347 msgstr ""
1348
1349 #. type: TP
1350 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1351 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1352 #, no-wrap
1353 msgid "B<PTRACE_SECCOMP_GET_FILTER> (since Linux 4.4)"
1354 msgstr ""
1355
1356 #. commit f8e529ed941ba2bbcbf310b575d968159ce7e895
1357 #. type: Plain text
1358 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1359 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1360 msgid ""
1361 "This operation allows the tracer to dump the tracee's classic BPF filters."
1362 msgstr ""
1363
1364 #. type: Plain text
1365 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1366 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1367 msgid ""
1368 "I<addr> is an integer specifying the index of the filter to be dumped. The "
1369 "most recently installed filter has the index 0. If I<addr> is greater than "
1370 "the number of installed filters, the operation fails with the error "
1371 "B<ENOENT>."
1372 msgstr ""
1373
1374 #. type: Plain text
1375 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1376 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1377 msgid ""
1378 "I<data> is either a pointer to a I<struct sock_filter> array that is large "
1379 "enough to store the BPF program, or NULL if the program is not to be stored."
1380 msgstr ""
1381
1382 #. type: Plain text
1383 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1384 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1385 msgid ""
1386 "Upon success, the return value is the number of instructions in the BPF "
1387 "program. If I<data> was NULL, then this return value can be used to "
1388 "correctly size the I<struct sock_filter> array passed in a subsequent call."
1389 msgstr ""
1390
1391 #. type: Plain text
1392 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1393 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1394 msgid ""
1395 "This operation fails with the error B<EACCES> if the caller does not have "
1396 "the B<CAP_SYS_ADMIN> capability or if the caller is in strict or filter "
1397 "seccomp mode. If the filter referred to by I<addr> is not a classic BPF "
1398 "filter, the operation fails with the error B<EMEDIUMTYPE>."
1399 msgstr ""
1400
1401 #. type: Plain text
1402 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1403 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1404 msgid ""
1405 "This operation is available if the kernel was configured with both the "
1406 "B<CONFIG_SECCOMP_FILTER> and the B<CONFIG_CHECKPOINT_RESTORE> options."
1407 msgstr ""
1408
1409 #. type: TP
1410 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1411 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1412 #, no-wrap
1413 msgid "B<PTRACE_DETACH>"
1414 msgstr "B<PTRACE_DETACH>"
1415
1416 #. type: Plain text
1417 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1418 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1419 #, fuzzy
1420 #| msgid ""
1421 #| "Restarts the stopped child as for PTRACE_CONT, but first detaches from "
1422 #| "the process, undoing the reparenting effect of PTRACE_ATTACH, and the "
1423 #| "effects of PTRACE_TRACEME. Although perhaps not intended, under Linux a "
1424 #| "traced child can be detached in this way regardless of which method was "
1425 #| "used to initiate tracing. (I<addr> is ignored.)"
1426 msgid ""
1427 "Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it. "
1428 "Under Linux, a tracee can be detached in this way regardless of which method "
1429 "was used to initiate tracing. (I<addr> is ignored.)"
1430 msgstr ""
1431 "PTRACE_CONT처럼 중지된 자식을 다시 시작한다. 그러나 우선 프로세스에서 분리하"
1432 "고 PTRACE_ATTACH의 재 부모화 효과와 PTRACE_TRACEME의 결과를 원래대로 되돌린"
1433 "다. 비록 의도하지 않았다 할지라도, 리눅스에서 추적되는 자식은 추적을 시작할"
1434 "때 사용된 방법에 관계없이 이 방식으로 분리될수 있다. (I<addr>는 무시된다.)"
1435
1436 #. type: TP
1437 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1438 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1439 #, no-wrap
1440 msgid "B<PTRACE_GET_THREAD_AREA> (since Linux 2.6.0)"
1441 msgstr ""
1442
1443 #. type: Plain text
1444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1446 msgid ""
1447 "This operation performs a similar task to B<get_thread_area>(2). It reads "
1448 "the TLS entry in the GDT whose index is given in I<addr>, placing a copy of "
1449 "the entry into the I<struct user_desc> pointed to by I<data>. (By contrast "
1450 "with B<get_thread_area>(2), the I<entry_number> of the I<struct user_desc> "
1451 "is ignored.)"
1452 msgstr ""
1453
1454 #. type: TP
1455 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1456 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1457 #, no-wrap
1458 msgid "B<PTRACE_SET_THREAD_AREA> (since Linux 2.6.0)"
1459 msgstr ""
1460
1461 #. type: Plain text
1462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1464 msgid ""
1465 "This operation performs a similar task to B<set_thread_area>(2). It sets "
1466 "the TLS entry in the GDT whose index is given in I<addr>, assigning it the "
1467 "data supplied in the I<struct user_desc> pointed to by I<data>. (By "
1468 "contrast with B<set_thread_area>(2), the I<entry_number> of the I<struct "
1469 "user_desc> is ignored; in other words, this ptrace operation can't be used "
1470 "to allocate a free TLS entry.)"
1471 msgstr ""
1472
1473 #. type: TP
1474 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1475 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1476 #, no-wrap
1477 msgid "B<PTRACE_GET_SYSCALL_INFO> (since Linux 5.3)"
1478 msgstr ""
1479
1480 #. commit 201766a20e30f982ccfe36bebfad9602c3ff574a
1481 #. type: Plain text
1482 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1483 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1484 msgid ""
1485 "Retrieve information about the system call that caused the stop. The "
1486 "information is placed into the buffer pointed by the I<data> argument, which "
1487 "should be a pointer to a buffer of type I<struct ptrace_syscall_info>. The "
1488 "I<addr> argument contains the size of the buffer pointed to by the I<data> "
1489 "argument (i.e., I<sizeof(struct ptrace_syscall_info)>). The return value "
1490 "contains the number of bytes available to be written by the kernel. If the "
1491 "size of the data to be written by the kernel exceeds the size specified by "
1492 "the I<addr> argument, the output data is truncated."
1493 msgstr ""
1494
1495 #. type: Plain text
1496 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1497 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1498 msgid "The I<ptrace_syscall_info> structure contains the following fields:"
1499 msgstr ""
1500
1501 #. type: Plain text
1502 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1503 #: opensuse-tumbleweed
1504 #, no-wrap
1505 msgid ""
1506 "struct ptrace_syscall_info {\n"
1507 " __u8 op; /* Type of system call stop */\n"
1508 " __u8 reserved; /* Reserved for future use, must be zero */\n"
1509 " __u16 flags; /* Reserved for future use, must be zero */\n"
1510 " __u32 arch; /* AUDIT_ARCH_* value; see seccomp(2) */\n"
1511 " __u64 instruction_pointer; /* CPU instruction pointer */\n"
1512 " __u64 stack_pointer; /* CPU stack pointer */\n"
1513 " union {\n"
1514 " struct { /* op == PTRACE_SYSCALL_INFO_ENTRY */\n"
1515 " __u64 nr; /* System call number */\n"
1516 " __u64 args[6]; /* System call arguments */\n"
1517 " } entry;\n"
1518 " struct { /* op == PTRACE_SYSCALL_INFO_EXIT */\n"
1519 " __s64 rval; /* System call return value */\n"
1520 " __u8 is_error; /* System call error flag;\n"
1521 " Boolean: does rval contain\n"
1522 " an error value (-ERRCODE) or\n"
1523 " a nonerror return value? */\n"
1524 " } exit;\n"
1525 " struct { /* op == PTRACE_SYSCALL_INFO_SECCOMP */\n"
1526 " __u64 nr; /* System call number */\n"
1527 " __u64 args[6]; /* System call arguments */\n"
1528 " __u32 ret_data; /* SECCOMP_RET_DATA portion\n"
1529 " of SECCOMP_RET_TRACE\n"
1530 " return value */\n"
1531 " } seccomp;\n"
1532 " };\n"
1533 "};\n"
1534 msgstr ""
1535
1536 #. type: Plain text
1537 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1538 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1539 msgid ""
1540 "The I<op>, I<arch>, I<instruction_pointer>, and I<stack_pointer> fields are "
1541 "defined for all kinds of ptrace system call stops. The rest of the "
1542 "structure is a union; one should read only those fields that are meaningful "
1543 "for the kind of system call stop specified by the I<op> field."
1544 msgstr ""
1545
1546 #. type: Plain text
1547 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1548 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1549 msgid ""
1550 "The I<op> field has one of the following values (defined in I<E<lt>linux/"
1551 "ptrace.hE<gt>>) indicating what type of stop occurred and which part of the "
1552 "union is filled:"
1553 msgstr ""
1554
1555 #. type: TP
1556 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1557 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1558 #, no-wrap
1559 msgid "B<PTRACE_SYSCALL_INFO_ENTRY>"
1560 msgstr "B<PTRACE_SYSCALL_INFO_ENTRY>"
1561
1562 #. type: Plain text
1563 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1564 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1565 msgid ""
1566 "The I<entry> component of the union contains information relating to a "
1567 "system call entry stop."
1568 msgstr ""
1569
1570 #. type: TP
1571 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1572 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1573 #, no-wrap
1574 msgid "B<PTRACE_SYSCALL_INFO_EXIT>"
1575 msgstr "B<PTRACE_SYSCALL_INFO_EXIT>"
1576
1577 #. type: Plain text
1578 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1579 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1580 msgid ""
1581 "The I<exit> component of the union contains information relating to a system "
1582 "call exit stop."
1583 msgstr ""
1584
1585 #. type: TP
1586 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1587 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1588 #, no-wrap
1589 msgid "B<PTRACE_SYSCALL_INFO_SECCOMP>"
1590 msgstr "B<PTRACE_SYSCALL_INFO_SECCOMP>"
1591
1592 #. type: Plain text
1593 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1594 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1595 msgid ""
1596 "The I<seccomp> component of the union contains information relating to a "
1597 "B<PTRACE_EVENT_SECCOMP> stop."
1598 msgstr ""
1599
1600 #. type: TP
1601 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1602 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1603 #, no-wrap
1604 msgid "B<PTRACE_SYSCALL_INFO_NONE>"
1605 msgstr "B<PTRACE_SYSCALL_INFO_NONE>"
1606
1607 #. type: Plain text
1608 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1609 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1610 msgid "No component of the union contains relevant information."
1611 msgstr ""
1612
1613 #. type: Plain text
1614 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1615 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1616 msgid ""
1617 "In case of system call entry or exit stops, the data returned by "
1618 "B<PTRACE_GET_SYSCALL_INFO> is limited to type B<PTRACE_SYSCALL_INFO_NONE> "
1619 "unless B<PTRACE_O_TRACESYSGOOD> option is set before the corresponding "
1620 "system call stop has occurred."
1621 msgstr ""
1622
1623 #. type: TP
1624 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1625 #: opensuse-tumbleweed
1626 #, fuzzy, no-wrap
1627 #| msgid "B<PR_SPEC_DISABLE_NOEXEC> (since Linux 5.1)"
1628 msgid "B<PTRACE_SET_SYSCALL_INFO> (since Linux 6.16)"
1629 msgstr "B<PR_SPEC_DISABLE_NOEXEC> ((리눅스 5.1 이후))"
1630
1631 #. commit 26bb32768fe6552de044f782a58b3272073fbfc0
1632 #. type: Plain text
1633 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1634 #: opensuse-tumbleweed
1635 msgid ""
1636 "Modify information about the system call that caused the stop. The I<data> "
1637 "argument is a pointer to I<struct ptrace_syscall_info> that specifies the "
1638 "system call information to be set. The I<addr> argument should be set to "
1639 "I<sizeof(struct ptrace_syscall_info)>. Only the I<nr>, I<args>, and I<rval> "
1640 "fields can be modified."
1641 msgstr ""
1642
1643 #. type: SS
1644 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1645 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1646 #, no-wrap
1647 msgid "Death under ptrace"
1648 msgstr ""
1649
1650 #. type: Plain text
1651 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1652 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1653 msgid ""
1654 "When a (possibly multithreaded) process receives a killing signal (one whose "
1655 "disposition is set to B<SIG_DFL> and whose default action is to kill the "
1656 "process), all threads exit. Tracees report their death to their tracer(s). "
1657 "Notification of this event is delivered via B<waitpid>(2)."
1658 msgstr ""
1659
1660 #. type: Plain text
1661 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1662 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1663 msgid ""
1664 "Note that the killing signal will first cause signal-delivery-stop (on one "
1665 "tracee only), and only after it is injected by the tracer (or after it was "
1666 "dispatched to a thread which isn't traced), will death from the signal "
1667 "happen on I<all> tracees within a multithreaded process. (The term \"signal-"
1668 "delivery-stop\" is explained below.)"
1669 msgstr ""
1670
1671 #. type: Plain text
1672 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1673 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1674 msgid ""
1675 "B<SIGKILL> does not generate signal-delivery-stop and therefore the tracer "
1676 "can't suppress it. B<SIGKILL> kills even within system calls (syscall-exit-"
1677 "stop is not generated prior to death by B<SIGKILL>). The net effect is that "
1678 "B<SIGKILL> always kills the process (all its threads), even if some threads "
1679 "of the process are ptraced."
1680 msgstr ""
1681
1682 #. type: Plain text
1683 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1684 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1685 msgid ""
1686 "When the tracee calls B<_exit>(2), it reports its death to its tracer. "
1687 "Other threads are not affected."
1688 msgstr ""
1689
1690 #. type: Plain text
1691 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1692 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1693 msgid ""
1694 "When any thread executes B<exit_group>(2), every tracee in its thread group "
1695 "reports its death to its tracer."
1696 msgstr ""
1697
1698 #. type: Plain text
1699 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1700 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1701 msgid ""
1702 "If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen "
1703 "before actual death. This applies to exits via B<exit>(2), "
1704 "B<exit_group>(2), and signal deaths (except B<SIGKILL>, depending on the "
1705 "kernel version; see BUGS below), and when threads are torn down on "
1706 "B<execve>(2) in a multithreaded process."
1707 msgstr ""
1708
1709 #. type: Plain text
1710 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1711 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1712 msgid ""
1713 "The tracer cannot assume that the ptrace-stopped tracee exists. There are "
1714 "many scenarios when the tracee may die while stopped (such as B<SIGKILL>). "
1715 "Therefore, the tracer must be prepared to handle an B<ESRCH> error on any "
1716 "ptrace operation. Unfortunately, the same error is returned if the tracee "
1717 "exists but is not ptrace-stopped (for commands which require a stopped "
1718 "tracee), or if it is not traced by the process which issued the ptrace "
1719 "call. The tracer needs to keep track of the stopped/running state of the "
1720 "tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it "
1721 "knows that the tracee has been observed to enter ptrace-stop. Note that "
1722 "there is no guarantee that I<waitpid(WNOHANG)> will reliably report the "
1723 "tracee's death status if a ptrace operation returned B<ESRCH>. "
1724 "I<waitpid(WNOHANG)> may return 0 instead. In other words, the tracee may be "
1725 "\"not yet fully dead\", but already refusing ptrace operations."
1726 msgstr ""
1727
1728 #. type: Plain text
1729 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1730 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1731 msgid ""
1732 "The tracer can't assume that the tracee I<always> ends its life by reporting "
1733 "I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this "
1734 "does not occur. For example, if a thread other than thread group leader "
1735 "does an B<execve>(2), it disappears; its PID will never be seen again, and "
1736 "any subsequent ptrace stops will be reported under the thread group leader's "
1737 "PID."
1738 msgstr ""
1739
1740 #. type: SS
1741 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1742 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1743 #, no-wrap
1744 msgid "Stopped states"
1745 msgstr ""
1746
1747 #. type: Plain text
1748 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1749 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1750 msgid ""
1751 "A tracee can be in two states: running or stopped. For the purposes of "
1752 "ptrace, a tracee which is blocked in a system call (such as B<read>(2), "
1753 "B<pause>(2), etc.) is nevertheless considered to be running, even if the "
1754 "tracee is blocked for a long time. The state of the tracee after "
1755 "B<PTRACE_LISTEN> is somewhat of a gray area: it is not in any ptrace-stop "
1756 "(ptrace commands won't work on it, and it will deliver B<waitpid>(2) "
1757 "notifications), but it also may be considered \"stopped\" because it is not "
1758 "executing instructions (is not scheduled), and if it was in group-stop "
1759 "before B<PTRACE_LISTEN>, it will not respond to signals until B<SIGCONT> is "
1760 "received."
1761 msgstr ""
1762
1763 #. type: Plain text
1764 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1765 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1766 msgid ""
1767 "There are many kinds of states when the tracee is stopped, and in ptrace "
1768 "discussions they are often conflated. Therefore, it is important to use "
1769 "precise terms."
1770 msgstr ""
1771
1772 #. type: Plain text
1773 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1774 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1775 msgid ""
1776 "In this manual page, any stopped state in which the tracee is ready to "
1777 "accept ptrace commands from the tracer is called I<ptrace-stop>. Ptrace-"
1778 "stops can be further subdivided into I<signal-delivery-stop>, I<group-stop>, "
1779 "I<syscall-stop>, I<PTRACE_EVENT stops>, and so on. These stopped states are "
1780 "described in detail below."
1781 msgstr ""
1782
1783 #. type: Plain text
1784 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1785 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1786 msgid ""
1787 "When the running tracee enters ptrace-stop, it notifies its tracer using "
1788 "B<waitpid>(2) (or one of the other \"wait\" system calls). Most of this "
1789 "manual page assumes that the tracer waits with:"
1790 msgstr ""
1791
1792 #. type: Plain text
1793 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1794 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1795 #, no-wrap
1796 msgid "pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
1797 msgstr "pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
1798
1799 #. Denys Vlasenko:
1800 #. Do we require __WALL usage, or will just using 0 be ok? (With 0,
1801 #. I am not 100% sure there aren't ugly corner cases.) Are the
1802 #. rules different if user wants to use waitid? Will waitid require
1803 #. WEXITED?
1804 #. type: Plain text
1805 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1806 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1807 msgid ""
1808 "Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 "
1809 "and I<WIFSTOPPED(status)> true."
1810 msgstr ""
1811
1812 #. type: Plain text
1813 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1814 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1815 msgid ""
1816 "The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, "
1817 "but implies their functionality."
1818 msgstr ""
1819
1820 #. type: Plain text
1821 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1822 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1823 msgid ""
1824 "Setting the B<WCONTINUED> flag when calling B<waitpid>(2) is not "
1825 "recommended: the \"continued\" state is per-process and consuming it can "
1826 "confuse the real parent of the tracee."
1827 msgstr ""
1828
1829 #. type: Plain text
1830 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1831 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1832 msgid ""
1833 "Use of the B<WNOHANG> flag may cause B<waitpid>(2) to return 0 (\"no wait "
1834 "results available yet\") even if the tracer knows there should be a "
1835 "notification. Example:"
1836 msgstr ""
1837
1838 #. type: Plain text
1839 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1840 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1841 #, no-wrap
1842 msgid ""
1843 "errno = 0;\n"
1844 "ptrace(PTRACE_CONT, pid, 0L, 0L);\n"
1845 "if (errno == ESRCH) {\n"
1846 " /* tracee is dead */\n"
1847 " r = waitpid(tracee, &status, __WALL | WNOHANG);\n"
1848 " /* r can still be 0 here! */\n"
1849 "}\n"
1850 msgstr ""
1851
1852 #. type: Plain text
1853 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1854 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1855 msgid ""
1856 "The following kinds of ptrace-stops exist: signal-delivery-stops, group-"
1857 "stops, B<PTRACE_EVENT> stops, syscall-stops. They all are reported by "
1858 "B<waitpid>(2) with I<WIFSTOPPED(status)> true. They may be differentiated "
1859 "by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in "
1860 "that value, by querying B<PTRACE_GETSIGINFO>. (Note: the "
1861 "I<WSTOPSIG(status)> macro can't be used to perform this examination, because "
1862 "it returns the value I<(statusE<gt>E<gt>8)\\ &\\ 0xff>.)"
1863 msgstr ""
1864
1865 #. type: SS
1866 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1867 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1868 #, no-wrap
1869 msgid "Signal-delivery-stop"
1870 msgstr ""
1871
1872 #. type: Plain text
1873 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1874 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1875 msgid ""
1876 "When a (possibly multithreaded) process receives any signal except "
1877 "B<SIGKILL>, the kernel selects an arbitrary thread which handles the "
1878 "signal. (If the signal is generated with B<tgkill>(2), the target thread "
1879 "can be explicitly selected by the caller.) If the selected thread is "
1880 "traced, it enters signal-delivery-stop. At this point, the signal is not "
1881 "yet delivered to the process, and can be suppressed by the tracer. If the "
1882 "tracer doesn't suppress the signal, it passes the signal to the tracee in "
1883 "the next ptrace restart operation. This second step of signal delivery is "
1884 "called I<signal injection> in this manual page. Note that if the signal is "
1885 "blocked, signal-delivery-stop doesn't happen until the signal is unblocked, "
1886 "with the usual exception that B<SIGSTOP> can't be blocked."
1887 msgstr ""
1888
1889 #. type: Plain text
1890 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1891 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1892 msgid ""
1893 "Signal-delivery-stop is observed by the tracer as B<waitpid>(2) returning "
1894 "with I<WIFSTOPPED(status)> true, with the signal returned by "
1895 "I<WSTOPSIG(status)>. If the signal is B<SIGTRAP>, this may be a different "
1896 "kind of ptrace-stop; see the \"Syscall-stops\" and \"execve\" sections below "
1897 "for details. If I<WSTOPSIG(status)> returns a stopping signal, this may be "
1898 "a group-stop; see below."
1899 msgstr ""
1900
1901 #. type: SS
1902 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1903 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1904 #, no-wrap
1905 msgid "Signal injection and suppression"
1906 msgstr ""
1907
1908 #. type: Plain text
1909 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1910 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1911 msgid ""
1912 "After signal-delivery-stop is observed by the tracer, the tracer should "
1913 "restart the tracee with the call"
1914 msgstr ""
1915
1916 #. type: Plain text
1917 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1918 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1919 #, no-wrap
1920 msgid "ptrace(PTRACE_restart, pid, 0, sig)\n"
1921 msgstr "ptrace(PTRACE_restart, pid, 0, sig)\n"
1922
1923 #. type: Plain text
1924 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1925 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1926 msgid ""
1927 "where B<PTRACE_restart> is one of the restarting ptrace operations. If "
1928 "I<sig> is 0, then a signal is not delivered. Otherwise, the signal I<sig> "
1929 "is delivered. This operation is called I<signal injection> in this manual "
1930 "page, to distinguish it from signal-delivery-stop."
1931 msgstr ""
1932
1933 #. type: Plain text
1934 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1935 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1936 msgid ""
1937 "The I<sig> value may be different from the I<WSTOPSIG(status)> value: the "
1938 "tracer can cause a different signal to be injected."
1939 msgstr ""
1940
1941 #. type: Plain text
1942 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1943 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1944 msgid ""
1945 "Note that a suppressed signal still causes system calls to return "
1946 "prematurely. In this case, system calls will be restarted: the tracer will "
1947 "observe the tracee to reexecute the interrupted system call (or "
1948 "B<restart_syscall>(2) system call for a few system calls which use a "
1949 "different mechanism for restarting) if the tracer uses B<PTRACE_SYSCALL>. "
1950 "Even system calls (such as B<poll>(2)) which are not restartable after "
1951 "signal are restarted after signal is suppressed; however, kernel bugs exist "
1952 "which cause some system calls to fail with B<EINTR> even though no "
1953 "observable signal is injected to the tracee."
1954 msgstr ""
1955
1956 #. type: Plain text
1957 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1958 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1959 msgid ""
1960 "Restarting ptrace commands issued in ptrace-stops other than signal-delivery-"
1961 "stop are not guaranteed to inject a signal, even if I<sig> is nonzero. No "
1962 "error is reported; a nonzero I<sig> may simply be ignored. Ptrace users "
1963 "should not try to \"create a new signal\" this way: use B<tgkill>(2) "
1964 "instead."
1965 msgstr ""
1966
1967 #. type: Plain text
1968 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1969 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1970 msgid ""
1971 "The fact that signal injection operations may be ignored when restarting the "
1972 "tracee after ptrace stops that are not signal-delivery-stops is a cause of "
1973 "confusion among ptrace users. One typical scenario is that the tracer "
1974 "observes group-stop, mistakes it for signal-delivery-stop, restarts the "
1975 "tracee with"
1976 msgstr ""
1977
1978 #. type: Plain text
1979 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1980 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1981 #, no-wrap
1982 msgid "ptrace(PTRACE_restart, pid, 0, stopsig)\n"
1983 msgstr "ptrace(PTRACE_restart, pid, 0, stopsig)\n"
1984
1985 #. type: Plain text
1986 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1987 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1988 msgid ""
1989 "with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and "
1990 "the tracee continues to run."
1991 msgstr ""
1992
1993 #. type: Plain text
1994 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1995 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1996 msgid ""
1997 "The B<SIGCONT> signal has a side effect of waking up (all threads of) a "
1998 "group-stopped process. This side effect happens before signal-delivery-"
1999 "stop. The tracer can't suppress this side effect (it can only suppress "
2000 "signal injection, which only causes the B<SIGCONT> handler to not be "
2001 "executed in the tracee, if such a handler is installed). In fact, waking up "
2002 "from group-stop may be followed by signal-delivery-stop for signal(s) "
2003 "I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> was "
2004 "delivered. In other words, B<SIGCONT> may be not the first signal observed "
2005 "by the tracee after it was sent."
2006 msgstr ""
2007
2008 #. type: Plain text
2009 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2010 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2011 msgid ""
2012 "Stopping signals cause (all threads of) a process to enter group-stop. This "
2013 "side effect happens after signal injection, and therefore can be suppressed "
2014 "by the tracer."
2015 msgstr ""
2016
2017 #
2018 #. In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
2019 #. there is:
2020 #. /* The debugger continued. Ignore SIGSTOP. */
2021 #. if (signr == SIGSTOP)
2022 #. continue;
2023 #. type: Plain text
2024 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2025 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2026 msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
2027 msgstr ""
2028
2029 #. type: Plain text
2030 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2031 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2032 msgid ""
2033 "B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which "
2034 "corresponds to the delivered signal. B<PTRACE_SETSIGINFO> may be used to "
2035 "modify it. If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the "
2036 "I<si_signo> field and the I<sig> parameter in the restarting command must "
2037 "match, otherwise the result is undefined."
2038 msgstr ""
2039
2040 #. type: SS
2041 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2042 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2043 #, no-wrap
2044 msgid "Group-stop"
2045 msgstr ""
2046
2047 #. type: Plain text
2048 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2049 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2050 msgid ""
2051 "When a (possibly multithreaded) process receives a stopping signal, all "
2052 "threads stop. If some threads are traced, they enter a group-stop. Note "
2053 "that the stopping signal will first cause signal-delivery-stop (on one "
2054 "tracee only), and only after it is injected by the tracer (or after it was "
2055 "dispatched to a thread which isn't traced), will group-stop be initiated on "
2056 "I<all> tracees within the multithreaded process. As usual, every tracee "
2057 "reports its group-stop separately to the corresponding tracer."
2058 msgstr ""
2059
2060 #. type: Plain text
2061 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2062 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2063 msgid ""
2064 "Group-stop is observed by the tracer as B<waitpid>(2) returning with "
2065 "I<WIFSTOPPED(status)> true, with the stopping signal available via "
2066 "I<WSTOPSIG(status)>. The same result is returned by some other classes of "
2067 "ptrace-stops, therefore the recommended practice is to perform the call"
2068 msgstr ""
2069
2070 #. type: Plain text
2071 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2072 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2073 #, no-wrap
2074 msgid "ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
2075 msgstr "ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
2076
2077 #. type: Plain text
2078 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2079 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2080 msgid ""
2081 "The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, "
2082 "B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals. If "
2083 "the tracer sees something else, it can't be a group-stop. Otherwise, the "
2084 "tracer needs to call B<PTRACE_GETSIGINFO>. If B<PTRACE_GETSIGINFO> fails "
2085 "with B<EINVAL>, then it is definitely a group-stop. (Other failure codes "
2086 "are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed "
2087 "the tracee.)"
2088 msgstr ""
2089
2090 #. type: Plain text
2091 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2092 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2093 msgid ""
2094 "If tracee was attached using B<PTRACE_SEIZE>, group-stop is indicated by "
2095 "B<PTRACE_EVENT_STOP>: I<statusE<gt>E<gt>16 == PTRACE_EVENT_STOP>. This "
2096 "allows detection of group-stops without requiring an extra "
2097 "B<PTRACE_GETSIGINFO> call."
2098 msgstr ""
2099
2100 #. type: Plain text
2101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2103 msgid ""
2104 "As of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until "
2105 "it restarts or kills it, the tracee will not run, and will not send "
2106 "notifications (except B<SIGKILL> death) to the tracer, even if the tracer "
2107 "enters into another B<waitpid>(2) call."
2108 msgstr ""
2109
2110 #. type: Plain text
2111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2113 msgid ""
2114 "The kernel behavior described in the previous paragraph causes a problem "
2115 "with transparent handling of stopping signals. If the tracer restarts the "
2116 "tracee after group-stop, the stopping signal is effectively ignored\\[em]the "
2117 "tracee doesn't remain stopped, it runs. If the tracer doesn't restart the "
2118 "tracee before entering into the next B<waitpid>(2), future B<SIGCONT> "
2119 "signals will not be reported to the tracer; this would cause the B<SIGCONT> "
2120 "signals to have no effect on the tracee."
2121 msgstr ""
2122
2123 #. type: Plain text
2124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2126 msgid ""
2127 "Since Linux 3.4, there is a method to overcome this problem: instead of "
2128 "B<PTRACE_CONT>, a B<PTRACE_LISTEN> command can be used to restart a tracee "
2129 "in a way where it does not execute, but waits for a new event which it can "
2130 "report via B<waitpid>(2) (such as when it is restarted by a B<SIGCONT>)."
2131 msgstr ""
2132
2133 #. type: SS
2134 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2135 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2136 #, fuzzy, no-wrap
2137 #| msgid "PTRACE_CONT"
2138 msgid "PTRACE_EVENT stops"
2139 msgstr "PTRACE_CONT"
2140
2141 #. type: Plain text
2142 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2143 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2144 msgid ""
2145 "If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter ptrace-"
2146 "stops called B<PTRACE_EVENT> stops."
2147 msgstr ""
2148
2149 #. type: Plain text
2150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2152 msgid ""
2153 "B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2) returning "
2154 "with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP> (or "
2155 "for B<PTRACE_EVENT_STOP>, returns the stopping signal if tracee is in a "
2156 "group-stop). An additional bit is set in the higher byte of the status "
2157 "word: the value I<statusE<gt>E<gt>8> will be"
2158 msgstr ""
2159
2160 #. type: Plain text
2161 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2162 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2163 #, no-wrap
2164 msgid "((PTRACE_EVENT_fooE<lt>E<lt>8) | SIGTRAP).\n"
2165 msgstr "((PTRACE_EVENT_fooE<lt>E<lt>8) | SIGTRAP).\n"
2166
2167 #. type: Plain text
2168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2170 #, fuzzy
2171 #| msgid "The following options are available:"
2172 msgid "The following events exist:"
2173 msgstr "사용할 수 있는 옵션은 다음과 같다:"
2174
2175 #. type: TP
2176 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2177 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2178 #, no-wrap
2179 msgid "B<PTRACE_EVENT_VFORK>"
2180 msgstr "B<PTRACE_EVENT_VFORK>"
2181
2182 #. type: Plain text
2183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2185 msgid ""
2186 "Stop before return from B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> "
2187 "flag. When the tracee is continued after this stop, it will wait for child "
2188 "to exit/exec before continuing its execution (in other words, the usual "
2189 "behavior on B<vfork>(2))."
2190 msgstr ""
2191
2192 #. type: TP
2193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2195 #, no-wrap
2196 msgid "B<PTRACE_EVENT_FORK>"
2197 msgstr "B<PTRACE_EVENT_FORK>"
2198
2199 #. type: Plain text
2200 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2201 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2202 msgid ""
2203 "Stop before return from B<fork>(2) or B<clone>(2) with the exit signal set "
2204 "to B<SIGCHLD>."
2205 msgstr ""
2206
2207 #. type: TP
2208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2210 #, no-wrap
2211 msgid "B<PTRACE_EVENT_CLONE>"
2212 msgstr "B<PTRACE_EVENT_CLONE>"
2213
2214 #. type: Plain text
2215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2217 msgid "Stop before return from B<clone>(2)."
2218 msgstr ""
2219
2220 #. type: TP
2221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2223 #, no-wrap
2224 msgid "B<PTRACE_EVENT_VFORK_DONE>"
2225 msgstr "B<PTRACE_EVENT_VFORK_DONE>"
2226
2227 #. type: Plain text
2228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2230 msgid ""
2231 "Stop before return from B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> "
2232 "flag, but after the child unblocked this tracee by exiting or execing."
2233 msgstr ""
2234
2235 #. type: Plain text
2236 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2237 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2238 msgid ""
2239 "For all four stops described above, the stop occurs in the parent (i.e., the "
2240 "tracee), not in the newly created thread. B<PTRACE_GETEVENTMSG> can be used "
2241 "to retrieve the new thread's ID."
2242 msgstr ""
2243
2244 #. type: TP
2245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2247 #, no-wrap
2248 msgid "B<PTRACE_EVENT_EXEC>"
2249 msgstr "B<PTRACE_EVENT_EXEC>"
2250
2251 #. type: Plain text
2252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2254 msgid ""
2255 "Stop before return from B<execve>(2). Since Linux 3.0, "
2256 "B<PTRACE_GETEVENTMSG> returns the former thread ID."
2257 msgstr ""
2258
2259 #. type: TP
2260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2262 #, no-wrap
2263 msgid "B<PTRACE_EVENT_EXIT>"
2264 msgstr "B<PTRACE_EVENT_EXIT>"
2265
2266 #. type: Plain text
2267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2269 msgid ""
2270 "Stop before exit (including death from B<exit_group>(2)), signal death, or "
2271 "exit caused by B<execve>(2) in a multithreaded process. "
2272 "B<PTRACE_GETEVENTMSG> returns the exit status. Registers can be examined "
2273 "(unlike when \"real\" exit happens). The tracee is still alive; it needs to "
2274 "be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
2275 msgstr ""
2276
2277 #. type: TP
2278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2280 #, no-wrap
2281 msgid "B<PTRACE_EVENT_STOP>"
2282 msgstr "B<PTRACE_EVENT_STOP>"
2283
2284 #. type: Plain text
2285 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2286 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2287 msgid ""
2288 "Stop induced by B<PTRACE_INTERRUPT> command, or group-stop, or initial "
2289 "ptrace-stop when a new child is attached (only if attached using "
2290 "B<PTRACE_SEIZE>)."
2291 msgstr ""
2292
2293 #. type: TP
2294 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2295 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2296 #, no-wrap
2297 msgid "B<PTRACE_EVENT_SECCOMP>"
2298 msgstr "B<PTRACE_EVENT_SECCOMP>"
2299
2300 #. type: Plain text
2301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2303 msgid ""
2304 "Stop triggered by a B<seccomp>(2) rule on tracee syscall entry when "
2305 "B<PTRACE_O_TRACESECCOMP> has been set by the tracer. The seccomp event "
2306 "message data (from the B<SECCOMP_RET_DATA> portion of the seccomp filter "
2307 "rule) can be retrieved with B<PTRACE_GETEVENTMSG>. The semantics of this "
2308 "stop are described in detail in a separate section below."
2309 msgstr ""
2310
2311 #. type: Plain text
2312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2314 msgid ""
2315 "B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP> in "
2316 "I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
2317 msgstr ""
2318
2319 #. type: SS
2320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2322 #, no-wrap
2323 msgid "Syscall-stops"
2324 msgstr ""
2325
2326 #. type: Plain text
2327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2329 msgid ""
2330 "If the tracee was restarted by B<PTRACE_SYSCALL> or B<PTRACE_SYSEMU>, the "
2331 "tracee enters syscall-enter-stop just prior to entering any system call "
2332 "(which will not be executed if the restart was using B<PTRACE_SYSEMU>, "
2333 "regardless of any change made to registers at this point or how the tracee "
2334 "is restarted after this stop). No matter which method caused the syscall-"
2335 "entry-stop, if the tracer restarts the tracee with B<PTRACE_SYSCALL>, the "
2336 "tracee enters syscall-exit-stop when the system call is finished, or if it "
2337 "is interrupted by a signal. (That is, signal-delivery-stop never happens "
2338 "between syscall-enter-stop and syscall-exit-stop; it happens I<after> "
2339 "syscall-exit-stop.). If the tracee is continued using any other method "
2340 "(including B<PTRACE_SYSEMU>), no syscall-exit-stop occurs. Note that all "
2341 "mentions B<PTRACE_SYSEMU> apply equally to B<PTRACE_SYSEMU_SINGLESTEP>."
2342 msgstr ""
2343
2344 #. type: Plain text
2345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2347 msgid ""
2348 "However, even if the tracee was continued using B<PTRACE_SYSCALL>, it is not "
2349 "guaranteed that the next stop will be a syscall-exit-stop. Other "
2350 "possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop "
2351 "(including seccomp stops), exit (if it entered B<_exit>(2) or "
2352 "B<exit_group>(2)), be killed by B<SIGKILL>, or die silently (if it is a "
2353 "thread group leader, the B<execve>(2) happened in another thread, and that "
2354 "thread is not traced by the same tracer; this situation is discussed later)."
2355 msgstr ""
2356
2357 #. type: Plain text
2358 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2359 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2360 msgid ""
2361 "Syscall-enter-stop and syscall-exit-stop are observed by the tracer as "
2362 "B<waitpid>(2) returning with I<WIFSTOPPED(status)> true, and "
2363 "I<WSTOPSIG(status)> giving B<SIGTRAP>. If the B<PTRACE_O_TRACESYSGOOD> "
2364 "option was set by the tracer, then I<WSTOPSIG(status)> will give the value "
2365 "I<(SIGTRAP\\ |\\ 0x80)>."
2366 msgstr ""
2367
2368 #. type: Plain text
2369 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2370 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2371 msgid ""
2372 "Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> "
2373 "by querying B<PTRACE_GETSIGINFO> for the following cases:"
2374 msgstr ""
2375
2376 #. type: TP
2377 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2378 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2379 #, no-wrap
2380 msgid "I<si_code> E<lt>= 0"
2381 msgstr "I<si_code> E<lt>= 0"
2382
2383 #. type: Plain text
2384 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2385 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2386 msgid ""
2387 "B<SIGTRAP> was delivered as a result of a user-space action, for example, a "
2388 "system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of "
2389 "a POSIX timer, change of state on a POSIX message queue, or completion of an "
2390 "asynchronous I/O operation."
2391 msgstr ""
2392
2393 #. type: TP
2394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2396 #, no-wrap
2397 msgid "I<si_code> == SI_KERNEL (0x80)"
2398 msgstr "I<si_code> == SI_KERNEL (0x80)"
2399
2400 #. type: Plain text
2401 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2402 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2403 msgid "B<SIGTRAP> was sent by the kernel."
2404 msgstr ""
2405
2406 #. type: TP
2407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2409 #, no-wrap
2410 msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
2411 msgstr ""
2412
2413 #. type: Plain text
2414 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2415 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2416 msgid "This is a syscall-stop."
2417 msgstr ""
2418
2419 #. type: Plain text
2420 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2421 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2422 msgid ""
2423 "However, syscall-stops happen very often (twice per system call), and "
2424 "performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat "
2425 "expensive."
2426 msgstr ""
2427
2428 #. type: Plain text
2429 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2430 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2431 msgid ""
2432 "Some architectures allow the cases to be distinguished by examining "
2433 "registers. For example, on x86, I<rax> == -B<ENOSYS> in syscall-enter-"
2434 "stop. Since B<SIGTRAP> (like any other signal) always happens I<after> "
2435 "syscall-exit-stop, and at this point I<rax> almost never contains "
2436 "-B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not syscall-"
2437 "enter-stop\"; in other words, it looks like a \"stray syscall-exit-stop\" "
2438 "and can be detected this way. But such detection is fragile and is best "
2439 "avoided."
2440 msgstr ""
2441
2442 #. type: Plain text
2443 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2444 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2445 msgid ""
2446 "Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to "
2447 "distinguish syscall-stops from other kinds of ptrace-stops, since it is "
2448 "reliable and does not incur a performance penalty."
2449 msgstr ""
2450
2451 #. type: Plain text
2452 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2453 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2454 msgid ""
2455 "Syscall-enter-stop and syscall-exit-stop are indistinguishable from each "
2456 "other by the tracer. The tracer needs to keep track of the sequence of "
2457 "ptrace-stops in order to not misinterpret syscall-enter-stop as syscall-exit-"
2458 "stop or vice versa. In general, a syscall-enter-stop is always followed by "
2459 "syscall-exit-stop, B<PTRACE_EVENT> stop, or the tracee's death; no other "
2460 "kinds of ptrace-stop can occur in between. However, note that seccomp stops "
2461 "(see below) can cause syscall-exit-stops, without preceding syscall-entry-"
2462 "stops. If seccomp is in use, care needs to be taken not to misinterpret "
2463 "such stops as syscall-entry-stops."
2464 msgstr ""
2465
2466 #. type: Plain text
2467 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2468 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2469 msgid ""
2470 "If after syscall-enter-stop, the tracer uses a restarting command other than "
2471 "B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
2472 msgstr ""
2473
2474 #. type: Plain text
2475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2477 msgid ""
2478 "B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, "
2479 "with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
2480 msgstr ""
2481
2482 #. type: SS
2483 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2484 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2485 #, no-wrap
2486 msgid "PTRACE_EVENT_SECCOMP stops (Linux 3.5 to Linux 4.7)"
2487 msgstr ""
2488
2489 #. type: Plain text
2490 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2491 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2492 msgid ""
2493 "The behavior of B<PTRACE_EVENT_SECCOMP> stops and their interaction with "
2494 "other kinds of ptrace stops has changed between kernel versions. This "
2495 "documents the behavior from their introduction until Linux 4.7 (inclusive). "
2496 "The behavior in later kernel versions is documented in the next section."
2497 msgstr ""
2498
2499 #. type: Plain text
2500 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2501 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2502 msgid ""
2503 "A B<PTRACE_EVENT_SECCOMP> stop occurs whenever a B<SECCOMP_RET_TRACE> rule "
2504 "is triggered. This is independent of which methods was used to restart the "
2505 "system call. Notably, seccomp still runs even if the tracee was restarted "
2506 "using B<PTRACE_SYSEMU> and this system call is unconditionally skipped."
2507 msgstr ""
2508
2509 #. type: Plain text
2510 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2511 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2512 msgid ""
2513 "Restarts from this stop will behave as if the stop had occurred right before "
2514 "the system call in question. In particular, both B<PTRACE_SYSCALL> and "
2515 "B<PTRACE_SYSEMU> will normally cause a subsequent syscall-entry-stop. "
2516 "However, if after the B<PTRACE_EVENT_SECCOMP> the system call number is "
2517 "negative, both the syscall-entry-stop and the system call itself will be "
2518 "skipped. This means that if the system call number is negative after a "
2519 "B<PTRACE_EVENT_SECCOMP> and the tracee is restarted using B<PTRACE_SYSCALL>, "
2520 "the next observed stop will be a syscall-exit-stop, rather than the syscall-"
2521 "entry-stop that might have been expected."
2522 msgstr ""
2523
2524 #. type: SS
2525 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2526 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2527 #, no-wrap
2528 msgid "PTRACE_EVENT_SECCOMP stops (since Linux 4.8)"
2529 msgstr ""
2530
2531 #. commit 93e35efb8de45393cf61ed07f7b407629bf698ea
2532 #. type: Plain text
2533 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2534 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2535 msgid ""
2536 "Starting with Linux 4.8, the B<PTRACE_EVENT_SECCOMP> stop was reordered to "
2537 "occur between syscall-entry-stop and syscall-exit-stop. Note that seccomp "
2538 "no longer runs (and no B<PTRACE_EVENT_SECCOMP> will be reported) if the "
2539 "system call is skipped due to B<PTRACE_SYSEMU>."
2540 msgstr ""
2541
2542 #. type: Plain text
2543 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2544 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2545 msgid ""
2546 "Functionally, a B<PTRACE_EVENT_SECCOMP> stop functions comparably to a "
2547 "syscall-entry-stop (i.e., continuations using B<PTRACE_SYSCALL> will cause "
2548 "syscall-exit-stops, the system call number may be changed and any other "
2549 "modified registers are visible to the to-be-executed system call as well). "
2550 "Note that there may be, but need not have been a preceding syscall-entry-"
2551 "stop."
2552 msgstr ""
2553
2554 #. type: Plain text
2555 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2556 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2557 msgid ""
2558 "After a B<PTRACE_EVENT_SECCOMP> stop, seccomp will be rerun, with a "
2559 "B<SECCOMP_RET_TRACE> rule now functioning the same as a "
2560 "B<SECCOMP_RET_ALLOW>. Specifically, this means that if registers are not "
2561 "modified during the B<PTRACE_EVENT_SECCOMP> stop, the system call will then "
2562 "be allowed."
2563 msgstr ""
2564
2565 #. type: SS
2566 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2567 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2568 #, fuzzy, no-wrap
2569 #| msgid "PTRACE_SYSCALL, PTRACE_SINGLESTEP"
2570 msgid "PTRACE_SINGLESTEP stops"
2571 msgstr "PTRACE_SYSCALL, PTRACE_SINGLESTEP"
2572
2573 #
2574 #. FIXME .
2575 #. document stops occurring with PTRACE_SINGLESTEP
2576 #. type: Plain text
2577 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2578 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2579 msgid "[Details of these kinds of stops are yet to be documented.]"
2580 msgstr ""
2581
2582 #. type: SS
2583 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2584 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2585 #, no-wrap
2586 msgid "Informational and restarting ptrace commands"
2587 msgstr ""
2588
2589 #. type: Plain text
2590 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2591 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2592 msgid ""
2593 "Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, "
2594 "B<PTRACE_TRACEME>, B<PTRACE_INTERRUPT>, and B<PTRACE_KILL>) require the "
2595 "tracee to be in a ptrace-stop, otherwise they fail with B<ESRCH>."
2596 msgstr ""
2597
2598 #. type: Plain text
2599 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2600 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2601 msgid ""
2602 "When the tracee is in ptrace-stop, the tracer can read and write data to the "
2603 "tracee using informational commands. These commands leave the tracee in "
2604 "ptrace-stopped state:"
2605 msgstr ""
2606
2607 #. type: Plain text
2608 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2609 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2610 #, no-wrap
2611 msgid ""
2612 "ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
2613 "ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
2614 "ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
2615 "ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
2616 "ptrace(PTRACE_GETREGSET, pid, NT_foo, &iov);\n"
2617 "ptrace(PTRACE_SETREGSET, pid, NT_foo, &iov);\n"
2618 "ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
2619 "ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
2620 "ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
2621 "ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
2622 msgstr ""
2623 "ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
2624 "ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
2625 "ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
2626 "ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
2627 "ptrace(PTRACE_GETREGSET, pid, NT_foo, &iov);\n"
2628 "ptrace(PTRACE_SETREGSET, pid, NT_foo, &iov);\n"
2629 "ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
2630 "ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
2631 "ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
2632 "ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
2633
2634 #. type: Plain text
2635 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2636 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2637 msgid ""
2638 "Note that some errors are not reported. For example, setting signal "
2639 "information (I<siginfo>) may have no effect in some ptrace-stops, yet the "
2640 "call may succeed (return 0 and not set I<errno>); querying "
2641 "B<PTRACE_GETEVENTMSG> may succeed and return some random value if current "
2642 "ptrace-stop is not documented as returning a meaningful event message."
2643 msgstr ""
2644
2645 #. type: Plain text
2646 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2647 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2648 msgid "The call"
2649 msgstr ""
2650
2651 #. type: Plain text
2652 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2653 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2654 #, no-wrap
2655 msgid "ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
2656 msgstr "ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
2657
2658 #. type: Plain text
2659 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2660 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2661 msgid ""
2662 "affects one tracee. The tracee's current flags are replaced. Flags are "
2663 "inherited by new tracees created and \"auto-attached\" via active "
2664 "B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> "
2665 "options."
2666 msgstr ""
2667
2668 #. type: Plain text
2669 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2670 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2671 msgid ""
2672 "Another group of commands makes the ptrace-stopped tracee run. They have "
2673 "the form:"
2674 msgstr ""
2675
2676 #. type: Plain text
2677 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2678 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2679 #, no-wrap
2680 msgid "ptrace(cmd, pid, 0, sig);\n"
2681 msgstr "ptrace(cmd, pid, 0, sig);\n"
2682
2683 #. type: Plain text
2684 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2685 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2686 msgid ""
2687 "where I<cmd> is B<PTRACE_CONT>, B<PTRACE_LISTEN>, B<PTRACE_DETACH>, "
2688 "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or "
2689 "B<PTRACE_SYSEMU_SINGLESTEP>. If the tracee is in signal-delivery-stop, "
2690 "I<sig> is the signal to be injected (if it is nonzero). Otherwise, I<sig> "
2691 "may be ignored. (When restarting a tracee from a ptrace-stop other than "
2692 "signal-delivery-stop, recommended practice is to always pass 0 in I<sig>.)"
2693 msgstr ""
2694
2695 #. type: SS
2696 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2697 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2698 #, no-wrap
2699 msgid "Attaching and detaching"
2700 msgstr ""
2701
2702 #. type: Plain text
2703 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2704 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2705 msgid "A thread can be attached to the tracer using the call"
2706 msgstr ""
2707
2708 #. type: Plain text
2709 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2710 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2711 #, no-wrap
2712 msgid "ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
2713 msgstr "ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
2714
2715 #. type: Plain text
2716 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2717 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2718 msgid "or"
2719 msgstr "또는"
2720
2721 #. type: Plain text
2722 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2723 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2724 #, no-wrap
2725 msgid "ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_flags);\n"
2726 msgstr "ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_flags);\n"
2727
2728 #
2729 #. FIXME Describe how to attach to a thread which is already group-stopped.
2730 #. type: Plain text
2731 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2732 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2733 msgid ""
2734 "B<PTRACE_ATTACH> sends B<SIGSTOP> to this thread. If the tracer wants this "
2735 "B<SIGSTOP> to have no effect, it needs to suppress it. Note that if other "
2736 "signals are concurrently sent to this thread during attach, the tracer may "
2737 "see the tracee enter signal-delivery-stop with other signal(s) first! The "
2738 "usual practice is to reinject these signals until B<SIGSTOP> is seen, then "
2739 "suppress B<SIGSTOP> injection. The design bug here is that a ptrace attach "
2740 "and a concurrently delivered B<SIGSTOP> may race and the concurrent "
2741 "B<SIGSTOP> may be lost."
2742 msgstr ""
2743
2744 #. type: Plain text
2745 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2746 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2747 msgid ""
2748 "Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this "
2749 "may cause a stray B<EINTR> return from the currently executing system call "
2750 "in the tracee, as described in the \"Signal injection and suppression\" "
2751 "section."
2752 msgstr ""
2753
2754 #. type: Plain text
2755 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2756 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2757 msgid ""
2758 "Since Linux 3.4, B<PTRACE_SEIZE> can be used instead of B<PTRACE_ATTACH>. "
2759 "B<PTRACE_SEIZE> does not stop the attached process. If you need to stop it "
2760 "after attach (or at any other time) without sending it any signals, use "
2761 "B<PTRACE_INTERRUPT> command."
2762 msgstr ""
2763
2764 #. type: Plain text
2765 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2766 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2767 msgid "The operation"
2768 msgstr ""
2769
2770 #. type: Plain text
2771 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2772 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2773 #, no-wrap
2774 msgid "ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
2775 msgstr "ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
2776
2777 #. type: Plain text
2778 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2779 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2780 msgid ""
2781 "turns the calling thread into a tracee. The thread continues to run "
2782 "(doesn't enter ptrace-stop). A common practice is to follow the "
2783 "B<PTRACE_TRACEME> with"
2784 msgstr ""
2785
2786 #. type: Plain text
2787 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2788 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2789 #, no-wrap
2790 msgid "raise(SIGSTOP);\n"
2791 msgstr "raise(SIGSTOP);\n"
2792
2793 #. type: Plain text
2794 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2795 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2796 msgid ""
2797 "and allow the parent (which is our tracer now) to observe our signal-"
2798 "delivery-stop."
2799 msgstr ""
2800
2801 #. type: Plain text
2802 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2803 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2804 msgid ""
2805 "If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or "
2806 "B<PTRACE_O_TRACECLONE> options are in effect, then children created by, "
2807 "respectively, B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> flag, "
2808 "B<fork>(2) or B<clone>(2) with the exit signal set to B<SIGCHLD>, and "
2809 "other kinds of B<clone>(2), are automatically attached to the same tracer "
2810 "which traced their parent. B<SIGSTOP> is delivered to the children, causing "
2811 "them to enter signal-delivery-stop after they exit the system call which "
2812 "created them."
2813 msgstr ""
2814
2815 #. type: Plain text
2816 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2817 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2818 msgid "Detaching of the tracee is performed by:"
2819 msgstr ""
2820
2821 #. type: Plain text
2822 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2823 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2824 #, no-wrap
2825 msgid "ptrace(PTRACE_DETACH, pid, 0, sig);\n"
2826 msgstr "ptrace(PTRACE_DETACH, pid, 0, sig);\n"
2827
2828 #. type: Plain text
2829 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2830 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2831 msgid ""
2832 "B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee "
2833 "to be in ptrace-stop. If the tracee is in signal-delivery-stop, a signal "
2834 "can be injected. Otherwise, the I<sig> parameter may be silently ignored."
2835 msgstr ""
2836
2837 #. FIXME Describe how to detach from a group-stopped tracee so that it
2838 #. doesn't run, but continues to wait for SIGCONT.
2839 #. type: Plain text
2840 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2841 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2842 msgid ""
2843 "If the tracee is running when the tracer wants to detach it, the usual "
2844 "solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to "
2845 "the correct thread), wait for the tracee to stop in signal-delivery-stop for "
2846 "B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection). A design "
2847 "bug is that this can race with concurrent B<SIGSTOP>s. Another complication "
2848 "is that the tracee may enter other ptrace-stops and needs to be restarted "
2849 "and waited for again, until B<SIGSTOP> is seen. Yet another complication is "
2850 "to be sure that the tracee is not already ptrace-stopped, because no signal "
2851 "delivery happens while it is\\[em]not even B<SIGSTOP>."
2852 msgstr ""
2853
2854 #. type: Plain text
2855 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2856 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2857 msgid ""
2858 "If the tracer dies, all tracees are automatically detached and restarted, "
2859 "unless they were in group-stop. Handling of restart from group-stop is "
2860 "currently buggy, but the \"as planned\" behavior is to leave tracee stopped "
2861 "and waiting for B<SIGCONT>. If the tracee is restarted from signal-delivery-"
2862 "stop, the pending signal is injected."
2863 msgstr ""
2864
2865 #. type: SS
2866 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2867 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2868 #, no-wrap
2869 msgid "execve(2) under ptrace"
2870 msgstr ""
2871
2872 #
2873 #. clone(2) CLONE_THREAD says:
2874 #. If any of the threads in a thread group performs an execve(2),
2875 #. then all threads other than the thread group leader are terminated,
2876 #. and the new program is executed in the thread group leader.
2877 #. In Linux 3.1 sources, see fs/exec.c::de_thread()
2878 #. type: Plain text
2879 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2880 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2881 msgid ""
2882 "When one thread in a multithreaded process calls B<execve>(2), the kernel "
2883 "destroys all other threads in the process, and resets the thread ID of the "
2884 "execing thread to the thread group ID (process ID). (Or, to put things "
2885 "another way, when a multithreaded process does an B<execve>(2), at "
2886 "completion of the call, it appears as though the B<execve>(2) occurred in "
2887 "the thread group leader, regardless of which thread did the B<execve>(2).) "
2888 "This resetting of the thread ID looks very confusing to tracers:"
2889 msgstr ""
2890
2891 #. type: IP
2892 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2893 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2894 #, no-wrap
2895 msgid "\\[bu]"
2896 msgstr "\\[bu]"
2897
2898 #. type: Plain text
2899 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2900 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2901 msgid ""
2902 "All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the "
2903 "B<PTRACE_O_TRACEEXIT> option was turned on. Then all other threads except "
2904 "the thread group leader report death as if they exited via B<_exit>(2) with "
2905 "exit code 0."
2906 msgstr ""
2907
2908 #. type: Plain text
2909 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2910 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2911 msgid ""
2912 "The execing tracee changes its thread ID while it is in the B<execve>(2). "
2913 "(Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed "
2914 "into ptrace calls, is the tracee's thread ID.) That is, the tracee's thread "
2915 "ID is reset to be the same as its process ID, which is the same as the "
2916 "thread group leader's thread ID."
2917 msgstr ""
2918
2919 #. type: Plain text
2920 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2921 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2922 msgid ""
2923 "Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> "
2924 "option was turned on."
2925 msgstr ""
2926
2927 #. type: Plain text
2928 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2929 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2930 msgid ""
2931 "If the thread group leader has reported its B<PTRACE_EVENT_EXIT> stop by "
2932 "this time, it appears to the tracer that the dead thread leader \"reappears "
2933 "from nowhere\". (Note: the thread group leader does not report death via "
2934 "I<WIFEXITED(status)> until there is at least one other live thread. This "
2935 "eliminates the possibility that the tracer will see it dying and then "
2936 "reappearing.) If the thread group leader was still alive, for the tracer "
2937 "this may look as if thread group leader returns from a different system call "
2938 "than it entered, or even \"returned from a system call even though it was "
2939 "not in any system call\". If the thread group leader was not traced (or was "
2940 "traced by a different tracer), then during B<execve>(2) it will appear as "
2941 "if it has become a tracee of the tracer of the execing tracee."
2942 msgstr ""
2943
2944 #. type: Plain text
2945 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2946 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2947 msgid ""
2948 "All of the above effects are the artifacts of the thread ID change in the "
2949 "tracee."
2950 msgstr ""
2951
2952 #. type: Plain text
2953 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2954 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2955 msgid ""
2956 "The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with "
2957 "this situation. First, it enables B<PTRACE_EVENT_EXEC> stop, which occurs "
2958 "before B<execve>(2) returns. In this stop, the tracer can use "
2959 "B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID. (This "
2960 "feature was introduced in Linux 3.0.) Second, the B<PTRACE_O_TRACEEXEC> "
2961 "option disables legacy B<SIGTRAP> generation on B<execve>(2)."
2962 msgstr ""
2963
2964 #. type: Plain text
2965 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2966 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2967 msgid ""
2968 "When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is "
2969 "guaranteed that except this tracee and the thread group leader, no other "
2970 "threads from the process are alive."
2971 msgstr ""
2972
2973 #. type: Plain text
2974 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2975 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2976 msgid ""
2977 "On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should "
2978 "clean up all its internal data structures describing the threads of this "
2979 "process, and retain only one data structure\\[em]one which describes the "
2980 "single still running tracee, with"
2981 msgstr ""
2982
2983 #. type: Plain text
2984 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2985 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2986 #, no-wrap
2987 msgid "thread ID == thread group ID == process ID.\n"
2988 msgstr "thread ID == thread group ID == process ID.\n"
2989
2990 #. type: Plain text
2991 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
2992 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
2993 msgid "Example: two threads call B<execve>(2) at the same time:"
2994 msgstr ""
2995
2996 #. type: Plain text
2997 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
2998 #: opensuse-tumbleweed
2999 #, no-wrap
3000 msgid ""
3001 "*** we get syscall-enter-stop in thread 1: **\n"
3002 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
3003 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
3004 "*** we get syscall-enter-stop in thread 2: **\n"
3005 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
3006 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
3007 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
3008 "*** we get syscall-exit-stop for PID0: **\n"
3009 "PID0 E<lt>...\\& execve resumedE<gt> ) = 0\n"
3010 msgstr ""
3011
3012 #. type: Plain text
3013 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3014 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3015 msgid ""
3016 "If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing "
3017 "tracee, and if the tracee was B<PTRACE_ATTACH>ed rather that "
3018 "B<PTRACE_SEIZE>d, the kernel delivers an extra B<SIGTRAP> to the tracee "
3019 "after B<execve>(2) returns. This is an ordinary signal (similar to one "
3020 "which can be generated by I<kill -TRAP>), not a special kind of ptrace-"
3021 "stop. Employing B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set "
3022 "to 0 (I<SI_USER>). This signal may be blocked by signal mask, and thus may "
3023 "be delivered (much) later."
3024 msgstr ""
3025
3026 #. type: Plain text
3027 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3028 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3029 msgid ""
3030 "Usually, the tracer (for example, B<strace>(1)) would not want to show this "
3031 "extra post-execve B<SIGTRAP> signal to the user, and would suppress its "
3032 "delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing "
3033 "signal). However, determining I<which> B<SIGTRAP> to suppress is not easy. "
3034 "Setting the B<PTRACE_O_TRACEEXEC> option or using B<PTRACE_SEIZE> and thus "
3035 "suppressing this extra B<SIGTRAP> is the recommended approach."
3036 msgstr ""
3037
3038 #. type: SS
3039 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3040 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3041 #, no-wrap
3042 msgid "Real parent"
3043 msgstr ""
3044
3045 #. type: Plain text
3046 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3047 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3048 msgid ""
3049 "The ptrace API (ab)uses the standard UNIX parent/child signaling over "
3050 "B<waitpid>(2). This used to cause the real parent of the process to stop "
3051 "receiving several kinds of B<waitpid>(2) notifications when the child "
3052 "process is traced by some other process."
3053 msgstr ""
3054
3055 #. type: Plain text
3056 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3057 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3058 msgid ""
3059 "Many of these bugs have been fixed, but as of Linux 2.6.38 several still "
3060 "exist; see BUGS below."
3061 msgstr ""
3062
3063 #. type: Plain text
3064 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3065 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3066 msgid "As of Linux 2.6.38, the following is believed to work correctly:"
3067 msgstr ""
3068
3069 #. type: Plain text
3070 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3071 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3072 msgid ""
3073 "exit/death by signal is reported first to the tracer, then, when the tracer "
3074 "consumes the B<waitpid>(2) result, to the real parent (to the real parent "
3075 "only when the whole multithreaded process exits). If the tracer and the "
3076 "real parent are the same process, the report is sent only once."
3077 msgstr ""
3078
3079 #. type: SH
3080 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3081 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3082 #, no-wrap
3083 msgid "RETURN VALUE"
3084 msgstr "반환값"
3085
3086 #. type: Plain text
3087 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3088 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3089 msgid ""
3090 "On success, the B<PTRACE_PEEK*> operations return the requested data (but "
3091 "see NOTES), the B<PTRACE_SECCOMP_GET_FILTER> operation returns the number of "
3092 "instructions in the BPF program, the B<PTRACE_GET_SYSCALL_INFO> operation "
3093 "returns the number of bytes available to be written by the kernel, and other "
3094 "operations return zero."
3095 msgstr ""
3096
3097 #. type: Plain text
3098 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3099 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3100 #, fuzzy
3101 #| msgid ""
3102 #| "On success, PTRACE_PEEK* requests return the requested data, while other "
3103 #| "requests return zero. On error, all requests return -1, and I<errno>(3) "
3104 #| "is set appropriately. Since the value returned by a successful "
3105 #| "PTRACE_PEEK* request may be -1, the caller must check I<errno> after such "
3106 #| "requests to determine whether or not an error occurred."
3107 msgid ""
3108 "On error, all operations return -1, and I<errno> is set to indicate the "
3109 "error. Since the value returned by a successful B<PTRACE_PEEK*> operation "
3110 "may be -1, the caller must clear I<errno> before the call, and then check it "
3111 "afterward to determine whether or not an error occurred."
3112 msgstr ""
3113 "성공시, PTRACE_PEEK* request들은 다른 request들이 0을 반환하는 동안에 요구된 "
3114 "데이터를 반환한다. 실패시, 모든 request들은 -1을 반환하며 I<errno>(3)는 적당"
3115 "한 값으로 설정된다. PTRACE_PEEK* request가 성공시 반환되는 값이 -1일수도 있"
3116 "기 때문에, 호출자는 request 후에 에러가 발생했는지 아닌지를 결정하기 위해 "
3117 "I<errno> 를 검사해야 한다."
3118
3119 #. type: SH
3120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3122 #, no-wrap
3123 msgid "ERRORS"
3124 msgstr "에러"
3125
3126 #. type: TP
3127 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3128 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3129 #, no-wrap
3130 msgid "B<EBUSY>"
3131 msgstr "B<EBUSY>"
3132
3133 #. type: Plain text
3134 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3135 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3136 msgid ""
3137 "(i386 only) There was an error with allocating or freeing a debug register."
3138 msgstr ""
3139
3140 #. type: TP
3141 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3142 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3143 #, no-wrap
3144 msgid "B<EFAULT>"
3145 msgstr "B<EFAULT>"
3146
3147 #. type: Plain text
3148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3150 #, fuzzy
3151 #| msgid ""
3152 #| "There was an attempt to read from or write to an invalid area in the "
3153 #| "parent's or child's memory, probably because the area wasn't mapped or "
3154 #| "accessible. Unfortunately, under Linux, different variations of this "
3155 #| "fault will return EIO or EFAULT more or less arbitrarily."
3156 msgid ""
3157 "There was an attempt to read from or write to an invalid area in the "
3158 "tracer's or the tracee's memory, probably because the area wasn't mapped or "
3159 "accessible. Unfortunately, under Linux, different variations of this fault "
3160 "will return B<EIO> or B<EFAULT> more or less arbitrarily."
3161 msgstr ""
3162 "부모나 자식의 메모리에 있는 유효하지 않은 영역에서 읽거나 쓸려고 하는 시도가 "
3163 "있었다. 아마도 영역이 대응되지 않았거나 접근할수 없기 때문이다. 불행하게도, "
3164 "리눅스에서 이 에러에 관한 다른 변형은 약간 애매하게 EIO 나 EFAULT를 반환한다."
3165
3166 #. type: TP
3167 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3168 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3169 #, no-wrap
3170 msgid "B<EINVAL>"
3171 msgstr "B<EINVAL>"
3172
3173 #. type: Plain text
3174 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3175 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3176 msgid "An attempt was made to set an invalid option."
3177 msgstr ""
3178
3179 #. type: TP
3180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3182 #, no-wrap
3183 msgid "B<EIO>"
3184 msgstr "B<EIO>"
3185
3186 #. type: Plain text
3187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3189 #, fuzzy
3190 #| msgid ""
3191 #| "I<request> is invalid, or an attempt was made to read from or write to an "
3192 #| "invalid area in the parent's or child's memory, or there was a word-"
3193 #| "alignment violation, or an invalid signal was specified during a restart "
3194 #| "request."
3195 msgid ""
3196 "I<op> is invalid, or an attempt was made to read from or write to an invalid "
3197 "area in the tracer's or the tracee's memory, or there was a word-alignment "
3198 "violation, or an invalid signal was specified during a restart operation."
3199 msgstr ""
3200 "I<request> 가 무효하거나 부모나 자식의 메모리에 있는 유효하지 않는 영역에서 "
3201 "읽거나 영역으로 쓸려고 하는 시도가 발생했다. 또는 워드-정렬 위반이 있거나 유"
3202 "효하지 않는 신호가 reqeust 재시작동안 지정됐다."
3203
3204 #. type: TP
3205 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3206 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3207 #, no-wrap
3208 msgid "B<EPERM>"
3209 msgstr "B<EPERM>"
3210
3211 #. type: Plain text
3212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3214 #, fuzzy
3215 #| msgid ""
3216 #| "The specified process cannot be traced. This could be because the parent "
3217 #| "has insufficient privileges; non-root processes cannot trace processes "
3218 #| "that they cannot send signals to or those running setuid/setgid programs, "
3219 #| "for obvious reasons. Alternatively, the process may already be being "
3220 #| "traced, or be B<init> (pid 1)."
3221 msgid ""
3222 "The specified process cannot be traced. This could be because the tracer "
3223 "has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
3224 "unprivileged processes cannot trace processes that they cannot send signals "
3225 "to or those running set-user-ID/set-group-ID programs, for obvious reasons. "
3226 "Alternatively, the process may already be being traced, or (before Linux "
3227 "2.6.26) be B<init>(1) (PID 1)."
3228 msgstr ""
3229 "지정된 프로세스는 추적될수 없다. 이것은 부모 프로세스가 충분한 우선권을 가지"
3230 "고 있지 않기 때문이다; 비-루트 프로세스들은 신호를 보낼수 없거나 setuid/"
3231 "setgid로 돌아가는 프로그램의 프로세스들을 추적할수 없다. 선택적으로, 프로세"
3232 "스가 이미 추적되고 있거나 B<init>이다. (pid 1)."
3233
3234 #. type: TP
3235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3237 #, no-wrap
3238 msgid "B<ESRCH>"
3239 msgstr "B<ESRCH>"
3240
3241 #. type: Plain text
3242 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3243 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3244 #, fuzzy
3245 #| msgid ""
3246 #| "The specified process does not exist, or is not currently being traced by "
3247 #| "the caller, or is not stopped (for requests that require that)."
3248 msgid ""
3249 "The specified process does not exist, or is not currently being traced by "
3250 "the caller, or is not stopped (for operations that require a stopped tracee)."
3251 msgstr ""
3252 "지정된 프로세스가 존재하지 않거나, 현재 호출자에 의해 추적되지 않거나 충지되"
3253 "지 않았다. (추적을 요구하는 request들 때문에)"
3254
3255 #. type: SH
3256 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3257 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3258 #, no-wrap
3259 msgid "STANDARDS"
3260 msgstr "표준"
3261
3262 #. type: Plain text
3263 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3264 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3265 msgid "None."
3266 msgstr ""
3267
3268 #. type: SH
3269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3271 #, no-wrap
3272 msgid "HISTORY"
3273 msgstr "이력"
3274
3275 #. type: Plain text
3276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3278 msgid "SVr4, 4.3BSD."
3279 msgstr "SVr4, 4.3BSD."
3280
3281 #. See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
3282 #. type: Plain text
3283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3285 #, fuzzy
3286 #| msgid "B<init>(8), the process with pid 1, may not be traced."
3287 msgid ""
3288 "Before Linux 2.6.26, B<init>(1), the process with PID 1, may not be traced."
3289 msgstr "pid 1인 프로세스 B<init>(8)는 추적되지 않는다."
3290
3291 #. type: SH
3292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3294 #, no-wrap
3295 msgid "NOTES"
3296 msgstr "주의"
3297
3298 #. type: Plain text
3299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3301 #, fuzzy
3302 #| msgid ""
3303 #| "Although arguments to B<ptrace> are interpreted according to the "
3304 #| "prototype given, GNU libc currently declares B<ptrace> as a variadic "
3305 #| "function with only the I<request> argument fixed. This means that "
3306 #| "unneeded trailing arguments may be omitted, though doing so makes use of "
3307 #| "undocumented B<gcc(1)> behavior."
3308 msgid ""
3309 "Although arguments to B<ptrace>() are interpreted according to the "
3310 "prototype given, glibc currently declares B<ptrace>() as a variadic "
3311 "function with only the I<op> argument fixed. It is recommended to always "
3312 "supply four arguments, even if the requested operation does not use them, "
3313 "setting unused/ignored arguments to I<0L> or I<(void\\ *)\\ 0>."
3314 msgstr ""
3315 "B<ptrace> 의 인자가 주어진 원형에 따라 해석됨에도 불구하고, GNU libc는 현재 "
3316 "I<request>인자만이 고정된 가변 함수로써 B<ptrace> 를 선언한다. 이것은 비록 "
3317 "문서화되지 않은 B<gcc(1)> 행동을 사용한다 할지라도 불필요한 추적 인자들은 생"
3318 "략했다는 것을 의미한다."
3319
3320 #. type: Plain text
3321 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3322 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3323 msgid ""
3324 "A tracees parent continues to be the tracer even if that tracer calls "
3325 "B<execve>(2)."
3326 msgstr ""
3327
3328 #. See http://lkml.org/lkml/2008/5/8/375
3329 #. type: Plain text
3330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3332 msgid ""
3333 "The layout of the contents of memory and the USER area are quite operating-"
3334 "system- and architecture-specific. The offset supplied, and the data "
3335 "returned, might not entirely match with the definition of I<struct user>."
3336 msgstr ""
3337
3338 #. type: Plain text
3339 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3340 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3341 #, fuzzy
3342 #| msgid ""
3343 #| "The size of a \"word\" is determined by the OS variant (e.g., for 32-bit "
3344 #| "Linux it's 32 bits, etc.)."
3345 msgid ""
3346 "The size of a \"word\" is determined by the operating-system variant (e.g., "
3347 "for 32-bit Linux it is 32 bits)."
3348 msgstr ""
3349 "\"word\"의 크기는 OS에 의해 결정된다.(즉, 32-bit 리눅스에서 word는 32 bits이"
3350 "다.)"
3351
3352 #. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
3353 #. type: Plain text
3354 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3355 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3356 #, fuzzy
3357 #| msgid ""
3358 #| "This page documents the way the B<ptrace> call works currently in Linux. "
3359 #| "Its behavior differs noticeably on other flavors of Unix. In any case, "
3360 #| "use of B<ptrace> is highly OS- and architecture-specific."
3361 msgid ""
3362 "This page documents the way the B<ptrace>() call works currently in Linux. "
3363 "Its behavior differs significantly on other flavors of UNIX. In any case, "
3364 "use of B<ptrace>() is highly specific to the operating system and "
3365 "architecture."
3366 msgstr ""
3367 "이 페이지는 B<ptrace> 콜이 현재 리눅스에서 작동되는 방법을 문서화 했다. 이 "
3368 "함수의 행동은 Unix의 성향에 따라 상당히 다르다. 어떤 경우, B<ptrace> 의 사용"
3369 "은 OS와 아키텍쳐에 매우 의존적이다."
3370
3371 #. type: SS
3372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3374 #, no-wrap
3375 msgid "Ptrace access mode checking"
3376 msgstr ""
3377
3378 #. type: Plain text
3379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3381 msgid ""
3382 "Various parts of the kernel-user-space API (not just B<ptrace>() "
3383 "operations), require so-called \"ptrace access mode\" checks, whose outcome "
3384 "determines whether an operation is permitted (or, in a few cases, causes a "
3385 "\"read\" operation to return sanitized data). These checks are performed in "
3386 "cases where one process can inspect sensitive information about, or in some "
3387 "cases modify the state of, another process. The checks are based on factors "
3388 "such as the credentials and capabilities of the two processes, whether or "
3389 "not the \"target\" process is dumpable, and the results of checks performed "
3390 "by any enabled Linux Security Module (LSM)\\[em]for example, SELinux, Yama, "
3391 "or Smack\\[em]and by the commoncap LSM (which is always invoked)."
3392 msgstr ""
3393
3394 #. commit 006ebb40d3d65338bd74abb03b945f8d60e362bd
3395 #. type: Plain text
3396 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3397 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3398 msgid ""
3399 "Prior to Linux 2.6.27, all access checks were of a single type. Since Linux "
3400 "2.6.27, two access mode levels are distinguished:"
3401 msgstr ""
3402
3403 #. type: TP
3404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3406 #, no-wrap
3407 msgid "B<PTRACE_MODE_READ>"
3408 msgstr "B<PTRACE_MODE_READ>"
3409
3410 #. type: Plain text
3411 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3412 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3413 msgid ""
3414 "For \"read\" operations or other operations that are less dangerous, such "
3415 "as: B<get_robust_list>(2); B<kcmp>(2); reading I</proc/>pidI</auxv>, I</proc/"
3416 ">pidI</environ>, or I</proc/>pidI</stat>; or B<readlink>(2) of a I</proc/"
3417 ">pidI</ns/*> file."
3418 msgstr ""
3419
3420 #. type: TP
3421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3423 #, no-wrap
3424 msgid "B<PTRACE_MODE_ATTACH>"
3425 msgstr "B<PTRACE_MODE_ATTACH>"
3426
3427 #
3428 #
3429 #. #-#-#-#-# archlinux: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
3430 #. Regarding the above description of the distinction between
3431 #. PTRACE_MODE_READ and PTRACE_MODE_ATTACH, Stephen Smalley notes:
3432 #. That was the intent when the distinction was introduced, but it doesn't
3433 #. appear to have been properly maintained, e.g., there is now a common
3434 #. helper lock_trace() that is used for
3435 #. /proc/pid/{stack,syscall,personality} but checks PTRACE_MODE_ATTACH, and
3436 #. PTRACE_MODE_ATTACH is also used in timerslack_ns_write/show(). Likely
3437 #. should review and make them consistent. There was also some debate
3438 #. about proper handling of /proc/pid/fd. Arguably that one might belong
3439 #. back in the _ATTACH camp.
3440 #. type: Plain text
3441 #. #-#-#-#-# debian-trixie: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
3442 #. Regarding the above description of the distinction between
3443 #. PTRACE_MODE_READ and PTRACE_MODE_ATTACH, Stephen Smalley notes:
3444 #. That was the intent when the distinction was introduced, but it doesn't
3445 #. appear to have been properly maintained, e.g. there is now a common
3446 #. helper lock_trace() that is used for
3447 #. /proc/pid/{stack,syscall,personality} but checks PTRACE_MODE_ATTACH, and
3448 #. PTRACE_MODE_ATTACH is also used in timerslack_ns_write/show(). Likely
3449 #. should review and make them consistent. There was also some debate
3450 #. about proper handling of /proc/pid/fd. Arguably that one might belong
3451 #. back in the _ATTACH camp.
3452 #. type: Plain text
3453 #. #-#-#-#-# debian-unstable: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
3454 #. Regarding the above description of the distinction between
3455 #. PTRACE_MODE_READ and PTRACE_MODE_ATTACH, Stephen Smalley notes:
3456 #. That was the intent when the distinction was introduced, but it doesn't
3457 #. appear to have been properly maintained, e.g., there is now a common
3458 #. helper lock_trace() that is used for
3459 #. /proc/pid/{stack,syscall,personality} but checks PTRACE_MODE_ATTACH, and
3460 #. PTRACE_MODE_ATTACH is also used in timerslack_ns_write/show(). Likely
3461 #. should review and make them consistent. There was also some debate
3462 #. about proper handling of /proc/pid/fd. Arguably that one might belong
3463 #. back in the _ATTACH camp.
3464 #. type: Plain text
3465 #. #-#-#-#-# fedora-44: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
3466 #. Regarding the above description of the distinction between
3467 #. PTRACE_MODE_READ and PTRACE_MODE_ATTACH, Stephen Smalley notes:
3468 #. That was the intent when the distinction was introduced, but it doesn't
3469 #. appear to have been properly maintained, e.g. there is now a common
3470 #. helper lock_trace() that is used for
3471 #. /proc/pid/{stack,syscall,personality} but checks PTRACE_MODE_ATTACH, and
3472 #. PTRACE_MODE_ATTACH is also used in timerslack_ns_write/show(). Likely
3473 #. should review and make them consistent. There was also some debate
3474 #. about proper handling of /proc/pid/fd. Arguably that one might belong
3475 #. back in the _ATTACH camp.
3476 #. type: Plain text
3477 #. #-#-#-#-# fedora-rawhide: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
3478 #. Regarding the above description of the distinction between
3479 #. PTRACE_MODE_READ and PTRACE_MODE_ATTACH, Stephen Smalley notes:
3480 #. That was the intent when the distinction was introduced, but it doesn't
3481 #. appear to have been properly maintained, e.g. there is now a common
3482 #. helper lock_trace() that is used for
3483 #. /proc/pid/{stack,syscall,personality} but checks PTRACE_MODE_ATTACH, and
3484 #. PTRACE_MODE_ATTACH is also used in timerslack_ns_write/show(). Likely
3485 #. should review and make them consistent. There was also some debate
3486 #. about proper handling of /proc/pid/fd. Arguably that one might belong
3487 #. back in the _ATTACH camp.
3488 #. type: Plain text
3489 #. #-#-#-#-# mageia-cauldron: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
3490 #. Regarding the above description of the distinction between
3491 #. PTRACE_MODE_READ and PTRACE_MODE_ATTACH, Stephen Smalley notes:
3492 #. That was the intent when the distinction was introduced, but it doesn't
3493 #. appear to have been properly maintained, e.g., there is now a common
3494 #. helper lock_trace() that is used for
3495 #. /proc/pid/{stack,syscall,personality} but checks PTRACE_MODE_ATTACH, and
3496 #. PTRACE_MODE_ATTACH is also used in timerslack_ns_write/show(). Likely
3497 #. should review and make them consistent. There was also some debate
3498 #. about proper handling of /proc/pid/fd. Arguably that one might belong
3499 #. back in the _ATTACH camp.
3500 #. type: Plain text
3501 #. #-#-#-#-# opensuse-leap-16-1: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
3502 #. Regarding the above description of the distinction between
3503 #. PTRACE_MODE_READ and PTRACE_MODE_ATTACH, Stephen Smalley notes:
3504 #. That was the intent when the distinction was introduced, but it doesn't
3505 #. appear to have been properly maintained, e.g., there is now a common
3506 #. helper lock_trace() that is used for
3507 #. /proc/pid/{stack,syscall,personality} but checks PTRACE_MODE_ATTACH, and
3508 #. PTRACE_MODE_ATTACH is also used in timerslack_ns_write/show(). Likely
3509 #. should review and make them consistent. There was also some debate
3510 #. about proper handling of /proc/pid/fd. Arguably that one might belong
3511 #. back in the _ATTACH camp.
3512 #. type: Plain text
3513 #. #-#-#-#-# opensuse-tumbleweed: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
3514 #. Regarding the above description of the distinction between
3515 #. PTRACE_MODE_READ and PTRACE_MODE_ATTACH, Stephen Smalley notes:
3516 #. That was the intent when the distinction was introduced, but it doesn't
3517 #. appear to have been properly maintained, e.g., there is now a common
3518 #. helper lock_trace() that is used for
3519 #. /proc/pid/{stack,syscall,personality} but checks PTRACE_MODE_ATTACH, and
3520 #. PTRACE_MODE_ATTACH is also used in timerslack_ns_write/show(). Likely
3521 #. should review and make them consistent. There was also some debate
3522 #. about proper handling of /proc/pid/fd. Arguably that one might belong
3523 #. back in the _ATTACH camp.
3524 #. type: Plain text
3525 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3526 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3527 msgid ""
3528 "For \"write\" operations, or other operations that are more dangerous, such "
3529 "as: ptrace attaching (B<PTRACE_ATTACH>) to another process or calling "
3530 "B<process_vm_writev>(2). (B<PTRACE_MODE_ATTACH> was effectively the default "
3531 "before Linux 2.6.27.)"
3532 msgstr ""
3533
3534 #. commit caaee6234d05a58c5b4d05e7bf766131b810a657
3535 #. type: Plain text
3536 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3537 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3538 msgid ""
3539 "Since Linux 4.5, the above access mode checks are combined (ORed) with one "
3540 "of the following modifiers:"
3541 msgstr ""
3542
3543 #. type: TP
3544 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3545 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3546 #, no-wrap
3547 msgid "B<PTRACE_MODE_FSCREDS>"
3548 msgstr "B<PTRACE_MODE_FSCREDS>"
3549
3550 #. type: Plain text
3551 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3552 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3553 msgid ""
3554 "Use the caller's filesystem UID and GID (see B<credentials>(7)) or "
3555 "effective capabilities for LSM checks."
3556 msgstr ""
3557
3558 #. type: TP
3559 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3560 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3561 #, no-wrap
3562 msgid "B<PTRACE_MODE_REALCREDS>"
3563 msgstr "B<PTRACE_MODE_REALCREDS>"
3564
3565 #. type: Plain text
3566 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3567 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3568 msgid ""
3569 "Use the caller's real UID and GID or permitted capabilities for LSM checks. "
3570 "This was effectively the default before Linux 4.5."
3571 msgstr ""
3572
3573 #. type: Plain text
3574 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3575 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3576 msgid ""
3577 "Because combining one of the credential modifiers with one of the "
3578 "aforementioned access modes is typical, some macros are defined in the "
3579 "kernel sources for the combinations:"
3580 msgstr ""
3581
3582 #. type: TP
3583 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3584 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3585 #, no-wrap
3586 msgid "B<PTRACE_MODE_READ_FSCREDS>"
3587 msgstr "B<PTRACE_MODE_READ_FSCREDS>"
3588
3589 #. type: Plain text
3590 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3591 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3592 msgid "Defined as B<PTRACE_MODE_READ | PTRACE_MODE_FSCREDS>."
3593 msgstr ""
3594
3595 #. type: TP
3596 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3597 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3598 #, no-wrap
3599 msgid "B<PTRACE_MODE_READ_REALCREDS>"
3600 msgstr "B<PTRACE_MODE_READ_REALCREDS>"
3601
3602 #. type: Plain text
3603 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3604 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3605 msgid "Defined as B<PTRACE_MODE_READ | PTRACE_MODE_REALCREDS>."
3606 msgstr ""
3607
3608 #. type: TP
3609 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3610 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3611 #, no-wrap
3612 msgid "B<PTRACE_MODE_ATTACH_FSCREDS>"
3613 msgstr "B<PTRACE_MODE_ATTACH_FSCREDS>"
3614
3615 #. type: Plain text
3616 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3617 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3618 msgid "Defined as B<PTRACE_MODE_ATTACH | PTRACE_MODE_FSCREDS>."
3619 msgstr ""
3620
3621 #. type: TP
3622 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3623 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3624 #, no-wrap
3625 msgid "B<PTRACE_MODE_ATTACH_REALCREDS>"
3626 msgstr "B<PTRACE_MODE_ATTACH_REALCREDS>"
3627
3628 #. type: Plain text
3629 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3630 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3631 msgid "Defined as B<PTRACE_MODE_ATTACH | PTRACE_MODE_REALCREDS>."
3632 msgstr ""
3633
3634 #. type: Plain text
3635 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3636 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3637 msgid "One further modifier can be ORed with the access mode:"
3638 msgstr ""
3639
3640 #. type: TP
3641 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3642 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3643 #, no-wrap
3644 msgid "B<PTRACE_MODE_NOAUDIT> (since Linux 3.3)"
3645 msgstr ""
3646
3647 #. commit 69f594a38967f4540ce7a29b3fd214e68a8330bd
3648 #. Just for /proc/pid/stat
3649 #. type: Plain text
3650 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3651 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3652 msgid ""
3653 "Don't audit this access mode check. This modifier is employed for ptrace "
3654 "access mode checks (such as checks when reading I</proc/>pidI</stat>) that "
3655 "merely cause the output to be filtered or sanitized, rather than causing an "
3656 "error to be returned to the caller. In these cases, accessing the file is "
3657 "not a security violation and there is no reason to generate a security audit "
3658 "record. This modifier suppresses the generation of such an audit record for "
3659 "the particular access check."
3660 msgstr ""
3661
3662 #. type: Plain text
3663 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3664 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3665 msgid ""
3666 "Note that all of the B<PTRACE_MODE_*> constants described in this subsection "
3667 "are kernel-internal, and not visible to user space. The constant names are "
3668 "mentioned here in order to label the various kinds of ptrace access mode "
3669 "checks that are performed for various system calls and accesses to various "
3670 "pseudofiles (e.g., under I</proc>). These names are used in other manual "
3671 "pages to provide a simple shorthand for labeling the different kernel checks."
3672 msgstr ""
3673
3674 #. type: Plain text
3675 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3676 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3677 msgid ""
3678 "The algorithm employed for ptrace access mode checking determines whether "
3679 "the calling process is allowed to perform the corresponding action on the "
3680 "target process. (In the case of opening I</proc/>pid files, the \"calling "
3681 "process\" is the one opening the file, and the process with the "
3682 "corresponding PID is the \"target process\".) The algorithm is as follows:"
3683 msgstr ""
3684
3685 #. type: IP
3686 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3687 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3688 #, no-wrap
3689 msgid "(1)"
3690 msgstr "(1)"
3691
3692 #. type: Plain text
3693 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3694 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3695 msgid ""
3696 "If the calling thread and the target thread are in the same thread group, "
3697 "access is always allowed."
3698 msgstr ""
3699
3700 #. type: IP
3701 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3702 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3703 #, no-wrap
3704 msgid "(2)"
3705 msgstr "(2)"
3706
3707 #. type: Plain text
3708 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3709 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3710 msgid ""
3711 "If the access mode specifies B<PTRACE_MODE_FSCREDS>, then, for the check in "
3712 "the next step, employ the caller's filesystem UID and GID. (As noted in "
3713 "B<credentials>(7), the filesystem UID and GID almost always have the same "
3714 "values as the corresponding effective IDs.)"
3715 msgstr ""
3716
3717 #. type: Plain text
3718 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3719 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3720 msgid ""
3721 "Otherwise, the access mode specifies B<PTRACE_MODE_REALCREDS>, so use the "
3722 "caller's real UID and GID for the checks in the next step. (Most APIs that "
3723 "check the caller's UID and GID use the effective IDs. For historical "
3724 "reasons, the B<PTRACE_MODE_REALCREDS> check uses the real IDs instead.)"
3725 msgstr ""
3726
3727 #. type: IP
3728 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3729 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3730 #, no-wrap
3731 msgid "(3)"
3732 msgstr "(3)"
3733
3734 #. type: Plain text
3735 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3736 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3737 msgid "Deny access if I<neither> of the following is true:"
3738 msgstr ""
3739
3740 #. type: Plain text
3741 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3742 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3743 msgid ""
3744 "The real, effective, and saved-set user IDs of the target match the caller's "
3745 "user ID, I<and> the real, effective, and saved-set group IDs of the target "
3746 "match the caller's group ID."
3747 msgstr ""
3748
3749 #. type: Plain text
3750 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3751 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3752 msgid ""
3753 "The caller has the B<CAP_SYS_PTRACE> capability in the user namespace of the "
3754 "target."
3755 msgstr ""
3756
3757 #. type: IP
3758 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3759 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3760 #, no-wrap
3761 msgid "(4)"
3762 msgstr "(4)"
3763
3764 #. type: Plain text
3765 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3766 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3767 msgid ""
3768 "Deny access if the target process \"dumpable\" attribute has a value other "
3769 "than 1 (B<SUID_DUMP_USER>; see the discussion of B<PR_SET_DUMPABLE> in "
3770 "B<prctl>(2)), and the caller does not have the B<CAP_SYS_PTRACE> capability "
3771 "in the user namespace of the target process."
3772 msgstr ""
3773
3774 #. type: IP
3775 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3776 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3777 #, no-wrap
3778 msgid "(5)"
3779 msgstr "(5)"
3780
3781 #. (in cap_ptrace_access_check()):
3782 #. type: Plain text
3783 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3784 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3785 msgid ""
3786 "The kernel LSM I<security_ptrace_access_check>() interface is invoked to "
3787 "see if ptrace access is permitted. The results depend on the LSM(s). The "
3788 "implementation of this interface in the commoncap LSM performs the following "
3789 "steps:"
3790 msgstr ""
3791
3792 #. type: IP
3793 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3794 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3795 #, no-wrap
3796 msgid "(5.1)"
3797 msgstr "(5.1)"
3798
3799 #. type: Plain text
3800 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3801 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3802 msgid ""
3803 "If the access mode includes B<PTRACE_MODE_FSCREDS>, then use the caller's "
3804 "I<effective> capability set in the following check; otherwise (the access "
3805 "mode specifies B<PTRACE_MODE_REALCREDS>, so) use the caller's I<permitted> "
3806 "capability set."
3807 msgstr ""
3808
3809 #. type: IP
3810 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3811 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3812 #, no-wrap
3813 msgid "(5.2)"
3814 msgstr "(5.2)"
3815
3816 #. type: Plain text
3817 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3818 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3819 msgid ""
3820 "The caller and the target process are in the same user namespace, and the "
3821 "caller's capabilities are a superset of the target process's I<permitted> "
3822 "capabilities."
3823 msgstr ""
3824
3825 #. type: Plain text
3826 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3827 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3828 msgid ""
3829 "The caller has the B<CAP_SYS_PTRACE> capability in the target process's user "
3830 "namespace."
3831 msgstr ""
3832
3833 #. type: Plain text
3834 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3835 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3836 msgid ""
3837 "Note that the commoncap LSM does not distinguish between B<PTRACE_MODE_READ> "
3838 "and B<PTRACE_MODE_ATTACH>."
3839 msgstr ""
3840
3841 #. type: IP
3842 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3843 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3844 #, no-wrap
3845 msgid "(6)"
3846 msgstr "(6)"
3847
3848 #
3849 #. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
3850 #. type: Plain text
3851 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3852 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3853 msgid ""
3854 "If access has not been denied by any of the preceding steps, then access is "
3855 "allowed."
3856 msgstr ""
3857
3858 #. type: SS
3859 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3860 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3861 #, no-wrap
3862 msgid "/proc/sys/kernel/yama/ptrace_scope"
3863 msgstr "/proc/sys/kernel/yama/ptrace_scope"
3864
3865 #. commit 2d514487faf188938a4ee4fb3464eeecfbdcf8eb
3866 #. type: Plain text
3867 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3868 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3869 msgid ""
3870 "On systems with the Yama Linux Security Module (LSM) installed (i.e., the "
3871 "kernel was configured with B<CONFIG_SECURITY_YAMA>), the I</proc/sys/kernel/"
3872 "yama/ptrace_scope> file (available since Linux 3.4) can be used to restrict "
3873 "the ability to trace a process with B<ptrace>() (and thus also the ability "
3874 "to use tools such as B<strace>(1) and B<gdb>(1)). The goal of such "
3875 "restrictions is to prevent attack escalation whereby a compromised process "
3876 "can ptrace-attach to other sensitive processes (e.g., a GPG agent or an SSH "
3877 "session) owned by the user in order to gain additional credentials that may "
3878 "exist in memory and thus expand the scope of the attack."
3879 msgstr ""
3880
3881 #. type: Plain text
3882 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3883 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3884 msgid "More precisely, the Yama LSM limits two types of operations:"
3885 msgstr ""
3886
3887 #. type: Plain text
3888 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3889 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3890 msgid ""
3891 "Any operation that performs a ptrace access mode B<PTRACE_MODE_ATTACH> "
3892 "check\\[em]for example, B<ptrace>() B<PTRACE_ATTACH>. (See the \"Ptrace "
3893 "access mode checking\" discussion above.)"
3894 msgstr ""
3895
3896 #. type: Plain text
3897 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3898 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3899 msgid "B<ptrace>() B<PTRACE_TRACEME>."
3900 msgstr "B<ptrace>() B<PTRACE_TRACEME>."
3901
3902 #. type: Plain text
3903 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3904 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3905 msgid ""
3906 "A process that has the B<CAP_SYS_PTRACE> capability can update the I</proc/"
3907 "sys/kernel/yama/ptrace_scope> file with one of the following values:"
3908 msgstr ""
3909
3910 #. type: TP
3911 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3912 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3913 #, no-wrap
3914 msgid "0 (\"classic ptrace permissions\")"
3915 msgstr ""
3916
3917 #. type: Plain text
3918 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3919 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3920 msgid ""
3921 "No additional restrictions on operations that perform B<PTRACE_MODE_ATTACH> "
3922 "checks (beyond those imposed by the commoncap and other LSMs)."
3923 msgstr ""
3924
3925 #. type: Plain text
3926 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3927 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3928 msgid "The use of B<PTRACE_TRACEME> is unchanged."
3929 msgstr ""
3930
3931 #. type: TP
3932 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3933 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3934 #, no-wrap
3935 msgid "1 (\"restricted ptrace\") [default value]"
3936 msgstr ""
3937
3938 #. type: Plain text
3939 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3940 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3941 msgid ""
3942 "When performing an operation that requires a B<PTRACE_MODE_ATTACH> check, "
3943 "the calling process must either have the B<CAP_SYS_PTRACE> capability in the "
3944 "user namespace of the target process or it must have a predefined "
3945 "relationship with the target process. By default, the predefined "
3946 "relationship is that the target process must be a descendant of the caller."
3947 msgstr ""
3948
3949 #. type: Plain text
3950 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
3951 #: opensuse-tumbleweed
3952 msgid ""
3953 "A target process can employ the B<prctl>(2) B<PR_SET_PTRACER> operation to "
3954 "declare an additional PID that is allowed to perform B<PTRACE_MODE_ATTACH> "
3955 "operations on the target. See the kernel source file I<Documentation/admin-"
3956 "guide/LSM/Yama.rst> for further details."
3957 msgstr ""
3958
3959 #. type: TP
3960 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3961 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3962 #, no-wrap
3963 msgid "2 (\"admin-only attach\")"
3964 msgstr ""
3965
3966 #. type: Plain text
3967 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3968 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3969 msgid ""
3970 "Only processes with the B<CAP_SYS_PTRACE> capability in the user namespace "
3971 "of the target process may perform B<PTRACE_MODE_ATTACH> operations or trace "
3972 "children that employ B<PTRACE_TRACEME>."
3973 msgstr ""
3974
3975 #. type: TP
3976 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3977 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3978 #, no-wrap
3979 msgid "3 (\"no attach\")"
3980 msgstr ""
3981
3982 #. type: Plain text
3983 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3984 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3985 msgid ""
3986 "No process may perform B<PTRACE_MODE_ATTACH> operations or trace children "
3987 "that employ B<PTRACE_TRACEME>."
3988 msgstr ""
3989
3990 #. type: Plain text
3991 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
3992 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
3993 msgid "Once this value has been written to the file, it cannot be changed."
3994 msgstr ""
3995
3996 #
3997 #. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
3998 #. type: Plain text
3999 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4000 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4001 msgid ""
4002 "With respect to values 1 and 2, note that creating a new user namespace "
4003 "effectively removes the protection offered by Yama. This is because a "
4004 "process in the parent user namespace whose effective UID matches the UID of "
4005 "the creator of a child namespace has all capabilities (including "
4006 "B<CAP_SYS_PTRACE>) when performing operations within the child user "
4007 "namespace (and further-removed descendants of that namespace). "
4008 "Consequently, when a process tries to use user namespaces to sandbox itself, "
4009 "it inadvertently weakens the protections offered by the Yama LSM."
4010 msgstr ""
4011
4012 #. type: SS
4013 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4014 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4015 #, no-wrap
4016 msgid "C library/kernel differences"
4017 msgstr ""
4018
4019 #. type: Plain text
4020 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4021 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4022 msgid ""
4023 "At the system call level, the B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>, and "
4024 "B<PTRACE_PEEKUSER> operations have a different API: they store the result at "
4025 "the address specified by the I<data> parameter, and the return value is the "
4026 "error flag. The glibc wrapper function provides the API given in "
4027 "DESCRIPTION above, with the result being returned via the function return "
4028 "value."
4029 msgstr ""
4030
4031 #. type: SH
4032 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4033 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4034 #, no-wrap
4035 msgid "BUGS"
4036 msgstr "버그"
4037
4038 #. type: Plain text
4039 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4040 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4041 msgid ""
4042 "On hosts with Linux 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared "
4043 "with a different value than the one for Linux 2.4. This leads to "
4044 "applications compiled with Linux 2.6 kernel headers failing when run on "
4045 "Linux 2.4. This can be worked around by redefining B<PTRACE_SETOPTIONS> to "
4046 "B<PTRACE_OLDSETOPTIONS>, if that is defined."
4047 msgstr ""
4048
4049 #. type: Plain text
4050 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4051 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4052 msgid ""
4053 "Group-stop notifications are sent to the tracer, but not to real parent. "
4054 "Last confirmed on 2.6.38.6."
4055 msgstr ""
4056
4057 #. #-#-#-#-# archlinux: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
4058 #. Note from Denys Vlasenko:
4059 #. Here "exits" means any kind of death - _exit, exit_group,
4060 #. signal death. Signal death and exit_group cases are trivial,
4061 #. though: since signal death and exit_group kill all other threads
4062 #. too, "until all other threads exit" thing happens rather soon
4063 #. in these cases. Therefore, only _exit presents observably
4064 #. puzzling behavior to ptrace users: thread leader _exit's,
4065 #. but WIFEXITED isn't reported! We are trying to explain here
4066 #. why it is so.
4067 #. FIXME . need to test/verify this scenario
4068 #. type: Plain text
4069 #. #-#-#-#-# debian-trixie: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
4070 #. Note from Denys Vlasenko:
4071 #. Here "exits" means any kind of death - _exit, exit_group,
4072 #. signal death. Signal death and exit_group cases are trivial,
4073 #. though: since signal death and exit_group kill all other threads
4074 #. too, "until all other threads exit" thing happens rather soon
4075 #. in these cases. Therefore, only _exit presents observably
4076 #. puzzling behavior to ptrace users: thread leader _exit's,
4077 #. but WIFEXITED isn't reported! We are trying to explain here
4078 #. why it is so.
4079 #. FIXME . need to test/verify this scenario
4080 #. type: Plain text
4081 #. #-#-#-#-# debian-unstable: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
4082 #. Note from Denys Vlasenko:
4083 #. Here "exits" means any kind of death - _exit, exit_group,
4084 #. signal death. Signal death and exit_group cases are trivial,
4085 #. though: since signal death and exit_group kill all other threads
4086 #. too, "until all other threads exit" thing happens rather soon
4087 #. in these cases. Therefore, only _exit presents observably
4088 #. puzzling behavior to ptrace users: thread leader _exit's,
4089 #. but WIFEXITED isn't reported! We are trying to explain here
4090 #. why it is so.
4091 #. FIXME . need to test/verify this scenario
4092 #. type: Plain text
4093 #. #-#-#-#-# fedora-44: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
4094 #. Note from Denys Vlasenko:
4095 #. Here "exits" means any kind of death - _exit, exit_group,
4096 #. signal death. Signal death and exit_group cases are trivial,
4097 #. though: since signal death and exit_group kill all other threads
4098 #. too, "until all other threads exit" thing happens rather soon
4099 #. in these cases. Therefore, only _exit presents observably
4100 #. puzzling behavior to ptrace users: thread leader _exit's,
4101 #. but WIFEXITED isn't reported! We are trying to explain here
4102 #. why it is so.
4103 #. FIXME . need to test/verify this scenario
4104 #. type: Plain text
4105 #. #-#-#-#-# fedora-rawhide: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
4106 #. Note from Denys Vlasenko:
4107 #. Here "exits" means any kind of death - _exit, exit_group,
4108 #. signal death. Signal death and exit_group cases are trivial,
4109 #. though: since signal death and exit_group kill all other threads
4110 #. too, "until all other threads exit" thing happens rather soon
4111 #. in these cases. Therefore, only _exit presents observably
4112 #. puzzling behavior to ptrace users: thread leader _exit's,
4113 #. but WIFEXITED isn't reported! We are trying to explain here
4114 #. why it is so.
4115 #. FIXME . need to test/verify this scenario
4116 #. type: Plain text
4117 #. #-#-#-#-# mageia-cauldron: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
4118 #. Note from Denys Vlasenko:
4119 #. Here "exits" means any kind of death - _exit, exit_group,
4120 #. signal death. Signal death and exit_group cases are trivial,
4121 #. though: since signal death and exit_group kill all other threads
4122 #. too, "until all other threads exit" thing happens rather soon
4123 #. in these cases. Therefore, only _exit presents observably
4124 #. puzzling behavior to ptrace users: thread leader _exit's,
4125 #. but WIFEXITED isn't reported! We are trying to explain here
4126 #. why it is so.
4127 #. FIXME . need to test/verify this scenario
4128 #. type: Plain text
4129 #. #-#-#-#-# opensuse-leap-16-1: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
4130 #. Note from Denys Vlasenko:
4131 #. Here "exits" means any kind of death - _exit, exit_group,
4132 #. signal death. Signal death and exit_group cases are trivial,
4133 #. though: since signal death and exit_group kill all other threads
4134 #. too, "until all other threads exit" thing happens rather soon
4135 #. in these cases. Therefore, only _exit presents observably
4136 #. puzzling behavior to ptrace users: thread leader _exit's,
4137 #. but WIFEXITED isn't reported! We are trying to explain here
4138 #. why it is so.
4139 #. FIXME . need to test/verify this scenario
4140 #. type: Plain text
4141 #. #-#-#-#-# opensuse-tumbleweed: ptrace.2.pot (PACKAGE VERSION) #-#-#-#-#
4142 #. Note from Denys Vlasenko:
4143 #. Here "exits" means any kind of death - _exit, exit_group,
4144 #. signal death. Signal death and exit_group cases are trivial,
4145 #. though: since signal death and exit_group kill all other threads
4146 #. too, "until all other threads exit" thing happens rather soon
4147 #. in these cases. Therefore, only _exit presents observably
4148 #. puzzling behavior to ptrace users: thread leader _exit's,
4149 #. but WIFEXITED isn't reported! We are trying to explain here
4150 #. why it is so.
4151 #. FIXME . need to test/verify this scenario
4152 #. type: Plain text
4153 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4154 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4155 msgid ""
4156 "If a thread group leader is traced and exits by calling B<_exit>(2), a "
4157 "B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the "
4158 "subsequent B<WIFEXITED> notification will not be delivered until all other "
4159 "threads exit. As explained above, if one of other threads calls "
4160 "B<execve>(2), the death of the thread group leader will I<never> be "
4161 "reported. If the execed thread is not traced by this tracer, the tracer "
4162 "will never know that B<execve>(2) happened. One possible workaround is to "
4163 "B<PTRACE_DETACH> the thread group leader instead of restarting it in this "
4164 "case. Last confirmed on 2.6.38.6."
4165 msgstr ""
4166
4167 #. type: Plain text
4168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4170 msgid ""
4171 "A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before "
4172 "actual signal death. This may be changed in the future; B<SIGKILL> is meant "
4173 "to always immediately kill tasks even under ptrace. Last confirmed on Linux "
4174 "3.13."
4175 msgstr ""
4176
4177 #. type: Plain text
4178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4180 msgid ""
4181 "Some system calls return with B<EINTR> if a signal was sent to a tracee, but "
4182 "delivery was suppressed by the tracer. (This is very typical operation: it "
4183 "is usually done by debuggers on every attach, in order to not introduce a "
4184 "bogus B<SIGSTOP>). As of Linux 3.2.9, the following system calls are "
4185 "affected (this list is likely incomplete): B<epoll_wait>(2), and B<read>(2) "
4186 "from an B<inotify>(7) file descriptor. The usual symptom of this bug is "
4187 "that when you attach to a quiescent process with the command"
4188 msgstr ""
4189
4190 #. type: Plain text
4191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4193 #, fuzzy, no-wrap
4194 #| msgid "ptrace - process trace"
4195 msgid "strace -p E<lt>process-IDE<gt>\n"
4196 msgstr "ptrace - 프로세스 추적"
4197
4198 #. type: Plain text
4199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4201 msgid "then, instead of the usual and expected one-line output such as"
4202 msgstr ""
4203
4204 #. type: Plain text
4205 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
4206 #: opensuse-tumbleweed
4207 #, no-wrap
4208 msgid "restart_syscall(E<lt>...\\& resuming interrupted call ...E<gt>_\n"
4209 msgstr ""
4210
4211 #. type: Plain text
4212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4214 #, no-wrap
4215 msgid "select(6, [5], NULL, [5], NULL_\n"
4216 msgstr "select(6, [5], NULL, [5], NULL_\n"
4217
4218 #. type: Plain text
4219 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4220 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4221 msgid ""
4222 "('_' denotes the cursor position), you observe more than one line. For "
4223 "example:"
4224 msgstr ""
4225
4226 #. type: Plain text
4227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4229 #, no-wrap
4230 msgid ""
4231 " clock_gettime(CLOCK_MONOTONIC, {15370, 690928118}) = 0\n"
4232 " epoll_wait(4,_\n"
4233 msgstr ""
4234 " clock_gettime(CLOCK_MONOTONIC, {15370, 690928118}) = 0\n"
4235 " epoll_wait(4,_\n"
4236
4237 #. type: Plain text
4238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4240 msgid ""
4241 "What is not visible here is that the process was blocked in "
4242 "B<epoll_wait>(2) before B<strace>(1) has attached to it. Attaching caused "
4243 "B<epoll_wait>(2) to return to user space with the error B<EINTR>. In this "
4244 "particular case, the program reacted to B<EINTR> by checking the current "
4245 "time, and then executing B<epoll_wait>(2) again. (Programs which do not "
4246 "expect such \"stray\" B<EINTR> errors may behave in an unintended way upon "
4247 "an B<strace>(1) attach.)"
4248 msgstr ""
4249
4250 #. type: Plain text
4251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4253 msgid ""
4254 "Contrary to the normal rules, the glibc wrapper for B<ptrace>() can set "
4255 "I<errno> to zero."
4256 msgstr ""
4257
4258 #. type: SH
4259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4261 #, no-wrap
4262 msgid "SEE ALSO"
4263 msgstr "추가 참조"
4264
4265 #. type: Plain text
4266 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
4267 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
4268 msgid ""
4269 "B<gdb>(1), B<ltrace>(1), B<strace>(1), B<clone>(2), B<execve>(2), "
4270 "B<fork>(2), B<gettid>(2), B<prctl>(2), B<seccomp>(2), B<sigaction>(2), "
4271 "B<tgkill>(2), B<vfork>(2), B<waitpid>(2), B<exec>(3), B<capabilities>(7), "
4272 "B<signal>(7)"
4273 msgstr ""
4274 "B<gdb>(1), B<ltrace>(1), B<strace>(1), B<clone>(2), B<execve>(2), "
4275 "B<fork>(2), B<gettid>(2), B<prctl>(2), B<seccomp>(2), B<sigaction>(2), "
4276 "B<tgkill>(2), B<vfork>(2), B<waitpid>(2), B<exec>(3), B<capabilities>(7), "
4277 "B<signal>(7)"
4278
4279 #. type: TH
4280 #: debian-trixie
4281 #, no-wrap
4282 msgid "2024-05-02"
4283 msgstr "2024년 5월 2일"
4284
4285 #. type: TH
4286 #: debian-trixie
4287 #, no-wrap
4288 msgid "Linux man-pages 6.9.1"
4289 msgstr "Linux man-pages 6.9.1"
4290
4291 #. type: Plain text
4292 #: debian-trixie
4293 msgid "Standard C library (I<libc>, I<-lc>)"
4294 msgstr "표준 C 라이브러리 (I<libc>, I<-lc>)"
4295
4296 #. type: Plain text
4297 #: debian-trixie
4298 msgid ""
4299 "Read the tracee's registers. I<addr> specifies, in an architecture-"
4300 "dependent way, the type of registers to be read. B<NT_PRSTATUS> (with "
4301 "numerical value 1) usually results in reading of general-purpose "
4302 "registers. If the CPU has, for example, floating-point and/or vector "
4303 "registers, they can be retrieved by setting I<addr> to the corresponding "
4304 "B<NT_foo> constant. I<data> points to a B<struct iovec>, which describes "
4305 "the destination buffer's location and length. On return, the kernel "
4306 "modifies B<iov.len> to indicate the actual number of bytes returned."
4307 msgstr ""
4308
4309 #. type: Plain text
4310 #: debian-trixie fedora-44 fedora-rawhide
4311 #, no-wrap
4312 msgid ""
4313 "struct ptrace_syscall_info {\n"
4314 " __u8 op; /* Type of system call stop */\n"
4315 " __u32 arch; /* AUDIT_ARCH_* value; see seccomp(2) */\n"
4316 " __u64 instruction_pointer; /* CPU instruction pointer */\n"
4317 " __u64 stack_pointer; /* CPU stack pointer */\n"
4318 " union {\n"
4319 " struct { /* op == PTRACE_SYSCALL_INFO_ENTRY */\n"
4320 " __u64 nr; /* System call number */\n"
4321 " __u64 args[6]; /* System call arguments */\n"
4322 " } entry;\n"
4323 " struct { /* op == PTRACE_SYSCALL_INFO_EXIT */\n"
4324 " __s64 rval; /* System call return value */\n"
4325 " __u8 is_error; /* System call error flag;\n"
4326 " Boolean: does rval contain\n"
4327 " an error value (-ERRCODE) or\n"
4328 " a nonerror return value? */\n"
4329 " } exit;\n"
4330 " struct { /* op == PTRACE_SYSCALL_INFO_SECCOMP */\n"
4331 " __u64 nr; /* System call number */\n"
4332 " __u64 args[6]; /* System call arguments */\n"
4333 " __u32 ret_data; /* SECCOMP_RET_DATA portion\n"
4334 " of SECCOMP_RET_TRACE\n"
4335 " return value */\n"
4336 " } seccomp;\n"
4337 " };\n"
4338 "};\n"
4339 msgstr ""
4340
4341 #. type: Plain text
4342 #: debian-trixie fedora-44 fedora-rawhide
4343 #, no-wrap
4344 msgid ""
4345 "*** we get syscall-enter-stop in thread 1: **\n"
4346 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
4347 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
4348 "*** we get syscall-enter-stop in thread 2: **\n"
4349 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
4350 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
4351 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
4352 "*** we get syscall-exit-stop for PID0: **\n"
4353 "PID0 E<lt>... execve resumedE<gt> ) = 0\n"
4354 msgstr ""
4355
4356 #. commit 90bb766440f2147486a2acc3e793d7b8348b0c22
4357 #. type: Plain text
4358 #: debian-trixie fedora-44 fedora-rawhide
4359 msgid ""
4360 "A target process can employ the B<prctl>(2) B<PR_SET_PTRACER> operation to "
4361 "declare an additional PID that is allowed to perform B<PTRACE_MODE_ATTACH> "
4362 "operations on the target. See the kernel source file I<Documentation/admin-"
4363 "guide/LSM/Yama.rst> (or I<Documentation/security/Yama.txt> before Linux "
4364 "4.13) for further details."
4365 msgstr ""
4366
4367 #. type: Plain text
4368 #: debian-trixie fedora-44 fedora-rawhide
4369 #, no-wrap
4370 msgid "restart_syscall(E<lt>... resuming interrupted call ...E<gt>_\n"
4371 msgstr ""
4372
4373 #. type: TH
4374 #: fedora-44 fedora-rawhide
4375 #, no-wrap
4376 msgid "2024-11-17"
4377 msgstr "2024년 11월 17일"
4378
4379 #. type: TH
4380 #: fedora-44 fedora-rawhide
4381 #, no-wrap
4382 msgid "Linux man-pages 6.13"
4383 msgstr "Linux man-pages 6.13"
4384
4385 #. type: TH
4386 #: mageia-cauldron
4387 #, no-wrap
4388 msgid "Linux man-pages 6.17"
4389 msgstr "Linux man-pages 6.17"
4390
4391 #. type: TH
4392 #: opensuse-leap-16-1 opensuse-tumbleweed
4393 #, no-wrap
4394 msgid "Linux man-pages (unreleased)"
4395 msgstr "Linux man-pages (미공개)"