Debian Codegraph @

po/pt_BR/man2/ptrace.2.po

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