Debian Codegraph @

po/pt_BR/man2/mprotect.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:31+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 "mprotect"
26 msgstr "mprotect"
27
28 #. type: TH
29 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
30 #: opensuse-tumbleweed
31 #, no-wrap
32 msgid "2026-02-11"
33 msgstr "11 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 #, fuzzy
53 #| msgid "mprotect - control allowable accesses to a region of memory"
54 msgid "mprotect, pkey_mprotect - set protection on a region of memory"
55 msgstr "mprotect - controla acessos permitidos em uma região da memória"
56
57 #. type: SH
58 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
59 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
60 #, no-wrap
61 msgid "LIBRARY"
62 msgstr "BIBLIOTECA"
63
64 #. type: Plain text
65 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
66 #: opensuse-leap-16-1 opensuse-tumbleweed
67 msgid "Standard C library (I<libc>,\\ I<-lc>)"
68 msgstr "Biblioteca C Padrão (I<libc>,\\ I<-lc>)"
69
70 #. type: SH
71 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
72 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
73 #, no-wrap
74 msgid "SYNOPSIS"
75 msgstr "SINOPSE"
76
77 #. type: Plain text
78 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
79 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
80 #, no-wrap
81 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
82 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
86 #: opensuse-tumbleweed
87 #, fuzzy, no-wrap
88 #| msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
89 msgid ""
90 "B<int mprotect(>size_t size;\n"
91 "B< void >I<addr>B<[>I<size>B<], size_t >I<size>B<, int >I<prot>B<);>\n"
92 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
93
94 #. type: Plain text
95 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
96 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
97 #, no-wrap
98 msgid ""
99 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
100 "B<#include E<lt>sys/mman.hE<gt>>\n"
101 msgstr ""
102
103 #. type: Plain text
104 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
105 #: opensuse-tumbleweed
106 #, fuzzy, no-wrap
107 #| msgid "B<int pkey_mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<, int >I<pkey>B<);>\n"
108 msgid ""
109 "B<int pkey_mprotect(>size_t size;\n"
110 "B< void >I<addr>B<[>I<size>B<], size_t >I<size>B<, int >I<prot>B<, int >I<pkey>B<);>\n"
111 msgstr "B<int pkey_mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<, int >I<pkey>B<);>\n"
112
113 #. type: SH
114 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
115 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
116 #, no-wrap
117 msgid "DESCRIPTION"
118 msgstr "DESCRIÇÃO"
119
120 #. type: Plain text
121 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
122 #: opensuse-tumbleweed
123 msgid ""
124 "B<mprotect>() changes the access protections for the calling process's "
125 "memory pages containing any part of the address range in the interval "
126 "[I<addr>, I<addr>+I<size>-1]. I<addr> must be aligned to a page boundary."
127 msgstr ""
128
129 #. type: Plain text
130 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
131 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
132 msgid ""
133 "If the calling process tries to access memory in a manner that violates the "
134 "protections, then the kernel generates a B<SIGSEGV> signal for the process."
135 msgstr ""
136
137 #. type: Plain text
138 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
139 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
140 msgid ""
141 "I<prot> is a combination of the following access flags: B<PROT_NONE> or a "
142 "bitwise OR of the other values in the following list:"
143 msgstr ""
144
145 #. type: TP
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 #, no-wrap
149 msgid "B<PROT_NONE>"
150 msgstr "B<PROT_NONE>"
151
152 #. type: Plain text
153 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
154 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
155 msgid "The memory cannot be accessed at all."
156 msgstr "A memória não pode ser acessada para nada."
157
158 #. type: TP
159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
161 #, no-wrap
162 msgid "B<PROT_READ>"
163 msgstr "B<PROT_READ>"
164
165 #. type: Plain text
166 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
167 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
168 msgid "The memory can be read."
169 msgstr "A memória pode ser lida."
170
171 #. type: TP
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 #, no-wrap
175 msgid "B<PROT_WRITE>"
176 msgstr "B<PROT_WRITE>"
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 "The memory can be read."
183 msgid "The memory can be modified."
184 msgstr "A memória pode ser lida."
185
186 #. type: TP
187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
189 #, no-wrap
190 msgid "B<PROT_EXEC>"
191 msgstr "B<PROT_EXEC>"
192
193 #. type: Plain text
194 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
195 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
196 #, fuzzy
197 #| msgid "The memory can be read."
198 msgid "The memory can be executed."
199 msgstr "A memória pode ser lida."
200
201 #. type: TP
202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
204 #, no-wrap
205 msgid "B<PROT_SEM> (since Linux 2.5.7)"
206 msgstr ""
207
208 #. type: Plain text
209 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
210 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
211 msgid ""
212 "The memory can be used for atomic operations. This flag was introduced as "
213 "part of the B<futex>(2) implementation (in order to guarantee the ability "
214 "to perform atomic operations required by commands such as B<FUTEX_WAIT>), "
215 "but is not currently used in on any architecture."
216 msgstr ""
217
218 #. type: TP
219 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
220 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
221 #, no-wrap
222 msgid "B<PROT_SAO> (since Linux 2.6.26)"
223 msgstr ""
224
225 #. commit aba46c5027cb59d98052231b36efcbbde9c77a1d
226 #. commit ef3d3246a0d06be622867d21af25f997aeeb105f
227 #. type: Plain text
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 msgid ""
231 "The memory should have strong access ordering. This feature is specific to "
232 "the PowerPC architecture (version 2.06 of the architecture specification "
233 "adds the SAO CPU feature, and it is available on POWER 7 or PowerPC A2, for "
234 "example)."
235 msgstr ""
236
237 #. type: Plain text
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 msgid ""
241 "Additionally (since Linux 2.6.0), I<prot> can have one of the following "
242 "flags set:"
243 msgstr ""
244
245 #. mm/mmap.c:
246 #. vm_flags |= calc_vm_prot_bits(prot, pkey) | calc_vm_flag_bits(flags) |
247 #. mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
248 #. And calc_vm_flag_bits converts only GROWSDOWN/DENYWRITE/LOCKED.
249 #. type: TP
250 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
251 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
252 #, no-wrap
253 msgid "B<PROT_GROWSUP>"
254 msgstr "B<PROT_GROWSUP>"
255
256 #. #-#-#-#-# archlinux: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
257 #. The VMA is one that was marked with VM_GROWSUP by the kernel
258 #. when the stack was created. Note that (unlike VM_GROWSDOWN),
259 #. there is no mmap() flag (analogous to MAP_GROWSDOWN) for
260 #. creating a VMA that is marked VM_GROWSUP.
261 #. type: Plain text
262 #. #-#-#-#-# debian-trixie: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
263 #. The VMA is one that was marked with VM_GROWSUP by the kernel
264 #. when the stack was created. Note that (unlike VM_GROWSDOWN),
265 #. there is no mmap() flag (analogous to MAP_GROWSDOWN) for
266 #. creating a VMA that is marked VM_GROWSUP.
267 #. type: Plain text
268 #. #-#-#-#-# debian-unstable: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
269 #. The VMA is one that was marked with VM_GROWSUP by the kernel
270 #. when the stack was created. Note that (unlike VM_GROWSDOWN),
271 #. there is no mmap() flag (analogous to MAP_GROWSDOWN) for
272 #. creating a VMA that is marked VM_GROWSUP.
273 #. type: Plain text
274 #. #-#-#-#-# fedora-44: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
275 #. The VMA is one that was marked with VM_GROWSUP by the kernel
276 #. when the stack was created. Note that (unlike VM_GROWSDOWN),
277 #. there is no mmap() flag (analogous to MAP_GROWSDOWN) for
278 #. creating a VMA that is marked VM_GROWSUP.
279 #. type: Plain text
280 #. #-#-#-#-# fedora-rawhide: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
281 #. The VMA is one that was marked with VM_GROWSUP by the kernel
282 #. when the stack was created. Note that (unlike VM_GROWSDOWN),
283 #. there is no mmap() flag (analogous to MAP_GROWSDOWN) for
284 #. creating a VMA that is marked VM_GROWSUP.
285 #. type: Plain text
286 #. #-#-#-#-# mageia-cauldron: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
287 #. The VMA is one that was marked with VM_GROWSUP by the kernel
288 #. when the stack was created. Note that (unlike VM_GROWSDOWN),
289 #. there is no mmap() flag (analogous to MAP_GROWSDOWN) for
290 #. creating a VMA that is marked VM_GROWSUP.
291 #. type: Plain text
292 #. #-#-#-#-# opensuse-leap-16-1: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
293 #. The VMA is one that was marked with VM_GROWSUP by the kernel
294 #. when the stack was created. Note that (unlike VM_GROWSDOWN),
295 #. there is no mmap() flag (analogous to MAP_GROWSDOWN) for
296 #. creating a VMA that is marked VM_GROWSUP.
297 #. type: Plain text
298 #. #-#-#-#-# opensuse-tumbleweed: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
299 #. The VMA is one that was marked with VM_GROWSUP by the kernel
300 #. when the stack was created. Note that (unlike VM_GROWSDOWN),
301 #. there is no mmap() flag (analogous to MAP_GROWSDOWN) for
302 #. creating a VMA that is marked VM_GROWSUP.
303 #. type: Plain text
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 msgid ""
307 "Apply the protection mode up to the end of a mapping that grows upwards. "
308 "(Such mappings are created for the stack area on architectures\\[em]for "
309 "example, HP-PARISC\\[em]that have an upwardly growing stack.)"
310 msgstr ""
311
312 #. type: TP
313 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
314 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
315 #, no-wrap
316 msgid "B<PROT_GROWSDOWN>"
317 msgstr "B<PROT_GROWSDOWN>"
318
319 #. type: Plain text
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 msgid ""
323 "Apply the protection mode down to the beginning of a mapping that grows "
324 "downward (which should be a stack segment or a segment mapped with the "
325 "B<MAP_GROWSDOWN> flag set)."
326 msgstr ""
327
328 #. type: Plain text
329 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
330 #: opensuse-leap-16-1 opensuse-tumbleweed
331 msgid ""
332 "Like B<mprotect>(), B<pkey_mprotect>() changes the protection on the pages "
333 "specified by I<addr> and I<size>. The I<pkey> argument specifies the "
334 "protection key (see B<pkeys>(7)) to assign to the memory. The protection "
335 "key must be allocated with B<pkey_alloc>(2) before it is passed to "
336 "B<pkey_mprotect>(). For an example of the use of this system call, see "
337 "B<pkeys>(7)."
338 msgstr ""
339
340 #. type: SH
341 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
342 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
343 #, no-wrap
344 msgid "RETURN VALUE"
345 msgstr "VALOR DE RETORNO"
346
347 #. type: Plain text
348 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
349 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
350 #, fuzzy
351 #| msgid ""
352 #| "On success, B<mprotect> returns zero. On error, -1 is returned, and "
353 #| "I<errno> is set appropriately."
354 msgid ""
355 "On success, B<mprotect>() and B<pkey_mprotect>() return zero. On error, "
356 "these system calls return -1, and I<errno> is set to indicate the error."
357 msgstr ""
358 "Em caso de sucesso, B<mprotect> devolve 0. Caso contrário, -1 é devolvido e "
359 "I<errno> é selecionado adequadamente."
360
361 #. type: SH
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 #, no-wrap
365 msgid "ERRORS"
366 msgstr "ERROS"
367
368 #. type: TP
369 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
370 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
371 #, no-wrap
372 msgid "B<EACCES>"
373 msgstr "B<EACCES>"
374
375 #. type: Plain text
376 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
377 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
378 msgid ""
379 "The memory cannot be given the specified access. This can happen, for "
380 "example, if you B<mmap>(2) a file to which you have read-only access, then "
381 "ask B<mprotect>() to mark it B<PROT_WRITE>."
382 msgstr ""
383 "A memória não pode fornecer o acesso especificado. Isto pode acontecer por "
384 "exemplo, se você executar um B<mmap>(2) em um arquivo que tem acesso de "
385 "leitura somente, então solicite à B<mprotect>() e ele a marcará "
386 "B<PROT_WRITE>."
387
388 #. type: TP
389 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
390 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
391 #, no-wrap
392 msgid "B<EINVAL>"
393 msgstr "B<EINVAL>"
394
395 #. type: Plain text
396 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
397 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
398 #, fuzzy
399 #| msgid "I<addr> is not a valid pointer, or not a multiple of PAGESIZE."
400 msgid ""
401 "I<addr> is not a valid pointer, or not a multiple of the system page size."
402 msgstr ""
403 "I<addr> não é um ponteiro válido, ou não é um multiplo do tamanhao da página "
404 "da memória."
405
406 #. type: Plain text
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 msgid ""
410 "(B<pkey_mprotect>()) I<pkey> has not been allocated with B<pkey_alloc>(2)"
411 msgstr ""
412
413 #. type: Plain text
414 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
415 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
416 msgid "Both B<PROT_GROWSUP> and B<PROT_GROWSDOWN> were specified in I<prot>."
417 msgstr ""
418
419 #. type: Plain text
420 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
421 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
422 msgid "Invalid flags specified in I<prot>."
423 msgstr ""
424
425 #. type: Plain text
426 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
427 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
428 msgid ""
429 "(PowerPC architecture) B<PROT_SAO> was specified in I<prot>, but SAO "
430 "hardware feature is not available."
431 msgstr ""
432
433 #. type: TP
434 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
435 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
436 #, no-wrap
437 msgid "B<ENOMEM>"
438 msgstr "B<ENOMEM>"
439
440 #. type: Plain text
441 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
442 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
443 msgid "Internal kernel structures could not be allocated."
444 msgstr "Estruturas internas do kernel não podem ser alocadas."
445
446 #. type: Plain text
447 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
448 #: opensuse-leap-16-1 opensuse-tumbleweed
449 msgid ""
450 "Addresses in the range [I<addr>, I<addr>+I<size>-1] are invalid for the "
451 "address space of the process, or specify one or more pages that are not "
452 "mapped. (Before Linux 2.4.19, the error B<EFAULT> was incorrectly produced "
453 "for these cases.)"
454 msgstr ""
455
456 #. I.e., the number of VMAs would exceed the 64 kB maximum
457 #. type: Plain text
458 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
459 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
460 msgid ""
461 "Changing the protection of a memory region would result in the total number "
462 "of mappings with distinct attributes (e.g., read versus read/write "
463 "protection) exceeding the allowed maximum. (For example, making the "
464 "protection of a range B<PROT_READ> in the middle of a region currently "
465 "protected as B<PROT_READ|PROT_WRITE> would result in three mappings: two "
466 "read/write mappings at each end and a read-only mapping in the middle.)"
467 msgstr ""
468
469 #. type: SH
470 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
471 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
472 #, no-wrap
473 msgid "VERSIONS"
474 msgstr "VERSÕES"
475
476 #. #-#-#-#-# archlinux: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
477 #. SVr4 defines an additional error
478 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
479 #. type: Plain text
480 #. #-#-#-#-# debian-trixie: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
481 #. SVr4 defines an additional error
482 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
483 #. type: Plain text
484 #. #-#-#-#-# debian-unstable: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
485 #. SVr4 defines an additional error
486 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
487 #. type: Plain text
488 #. #-#-#-#-# fedora-44: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
489 #. SVr4 defines an additional error
490 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
491 #. type: Plain text
492 #. #-#-#-#-# fedora-rawhide: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
493 #. SVr4 defines an additional error
494 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
495 #. type: Plain text
496 #. #-#-#-#-# mageia-cauldron: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
497 #. SVr4 defines an additional error
498 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
499 #. type: Plain text
500 #. #-#-#-#-# opensuse-leap-16-1: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
501 #. SVr4 defines an additional error
502 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
503 #. type: Plain text
504 #. #-#-#-#-# opensuse-tumbleweed: mprotect.2.pot (PACKAGE VERSION) #-#-#-#-#
505 #. SVr4 defines an additional error
506 #. code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
507 #. type: Plain text
508 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
509 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
510 msgid ""
511 "POSIX says that the behavior of B<mprotect>() is unspecified if it is "
512 "applied to a region of memory that was not obtained via B<mmap>(2)."
513 msgstr ""
514
515 #. type: Plain text
516 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
517 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
518 msgid ""
519 "On Linux, it is always permissible to call B<mprotect>() on any address in "
520 "a process's address space (except for the kernel vsyscall area). In "
521 "particular, it can be used to change existing code mappings to be writable."
522 msgstr ""
523
524 #. type: Plain text
525 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
526 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
527 msgid ""
528 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> depends on "
529 "processor architecture, kernel version, and process state. If "
530 "B<READ_IMPLIES_EXEC> is set in the process's personality flags (see "
531 "B<personality>(2)), specifying B<PROT_READ> will implicitly add B<PROT_EXEC>."
532 msgstr ""
533
534 #. type: Plain text
535 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
536 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
537 msgid ""
538 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
539 "B<PROT_READ>."
540 msgstr ""
541
542 #. type: Plain text
543 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
544 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
545 msgid ""
546 "POSIX.1 says that an implementation may permit access other than that "
547 "specified in I<prot>, but at a minimum can allow write access only if "
548 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
549 "has been set."
550 msgstr ""
551
552 #. type: Plain text
553 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
554 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
555 msgid ""
556 "Applications should be careful when mixing use of B<mprotect>() and "
557 "B<pkey_mprotect>(). On x86, when B<mprotect>() is used with I<prot> set to "
558 "B<PROT_EXEC> a pkey may be allocated and set on the memory implicitly by the "
559 "kernel, but only when the pkey was 0 previously."
560 msgstr ""
561
562 #. type: Plain text
563 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
564 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
565 msgid ""
566 "On systems that do not support protection keys in hardware, "
567 "B<pkey_mprotect>() may still be used, but I<pkey> must be set to -1. When "
568 "called this way, the operation of B<pkey_mprotect>() is equivalent to "
569 "B<mprotect>()."
570 msgstr ""
571
572 #. type: SH
573 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
574 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
575 #, no-wrap
576 msgid "STANDARDS"
577 msgstr "PADRÕES"
578
579 #. type: TP
580 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
581 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
582 #, fuzzy, no-wrap
583 #| msgid "mprotect"
584 msgid "B<mprotect>()"
585 msgstr "mprotect"
586
587 #. type: Plain text
588 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
589 #: opensuse-tumbleweed
590 msgid "POSIX.1-2024."
591 msgstr "POSIX.1-2024."
592
593 #. type: TP
594 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
595 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
596 #, fuzzy, no-wrap
597 #| msgid "mprotect"
598 msgid "B<pkey_mprotect>()"
599 msgstr "mprotect"
600
601 #. type: Plain text
602 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
603 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
604 msgid "Linux."
605 msgstr "Linux."
606
607 #. type: SH
608 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
609 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
610 #, no-wrap
611 msgid "HISTORY"
612 msgstr "HISTÓRICO"
613
614 #. type: Plain text
615 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
616 #: opensuse-tumbleweed
617 #, fuzzy
618 #| msgid "SVr4, 4.3BSD, POSIX.1-2001."
619 msgid "SVr4, SUSv1, POSIX.1-1996."
620 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
621
622 #. type: Plain text
623 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
624 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
625 #, fuzzy
626 #| msgid "Since glibc 2.12:"
627 msgid "Linux 4.9, glibc 2.27."
628 msgstr "Desde o glibc 2.12:"
629
630 #. type: SH
631 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
632 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
633 #, no-wrap
634 msgid "NOTES"
635 msgstr "NOTAS"
636
637 #. type: SH
638 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
639 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
640 #, no-wrap
641 msgid "EXAMPLES"
642 msgstr "EXEMPLOS"
643
644 #. sigaction.2 refers to this example
645 #. type: Plain text
646 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
647 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
648 msgid ""
649 "The program below demonstrates the use of B<mprotect>(). The program "
650 "allocates four pages of memory, makes the third of these pages read-only, "
651 "and then executes a loop that walks upward through the allocated region "
652 "modifying bytes."
653 msgstr ""
654
655 #. type: Plain text
656 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
657 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
658 msgid ""
659 "An example of what we might see when running the program is the following:"
660 msgstr ""
661
662 #. type: Plain text
663 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
664 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
665 #, no-wrap
666 msgid ""
667 "$B< ./a.out>\n"
668 "Start of region: 0x804c000\n"
669 "Got SIGSEGV at address: 0x804e000\n"
670 msgstr ""
671
672 #. type: SS
673 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
674 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
675 #, no-wrap
676 msgid "Program source"
677 msgstr "Fonte do programa"
678
679 #. type: Plain text
680 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
681 #: opensuse-tumbleweed
682 #, no-wrap
683 msgid ""
684 "#include E<lt>err.hE<gt>\n"
685 "#include E<lt>malloc.hE<gt>\n"
686 "#include E<lt>signal.hE<gt>\n"
687 "#include E<lt>stdio.hE<gt>\n"
688 "#include E<lt>stdlib.hE<gt>\n"
689 "#include E<lt>sys/mman.hE<gt>\n"
690 "#include E<lt>unistd.hE<gt>\n"
691 "\\&\n"
692 "static char *buffer;\n"
693 "\\&\n"
694 "static void\n"
695 "handler(int sig, siginfo_t *si, void *unused)\n"
696 "{\n"
697 " /* Note: calling printf() from a signal handler is not safe\n"
698 " (and should not be done in production programs), since\n"
699 " printf() is not async-signal-safe; see signal-safety(7).\n"
700 " Nevertheless, we use printf() here as a simple way of\n"
701 " showing that the handler was called. */\n"
702 "\\&\n"
703 " printf(\"Got SIGSEGV at address: %p\\[rs]n\", si-E<gt>si_addr);\n"
704 " exit(EXIT_FAILURE);\n"
705 "}\n"
706 "\\&\n"
707 "int\n"
708 "main(void)\n"
709 "{\n"
710 " int pagesize;\n"
711 " struct sigaction sa;\n"
712 "\\&\n"
713 " sa.sa_flags = SA_SIGINFO;\n"
714 " sigemptyset(&sa.sa_mask);\n"
715 " sa.sa_sigaction = handler;\n"
716 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
717 " err(EXIT_FAILURE, \"sigaction\");\n"
718 "\\&\n"
719 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
720 " if (pagesize == -1)\n"
721 " err(EXIT_FAILURE, \"sysconf\");\n"
722 "\\&\n"
723 " /* Allocate a buffer aligned on a page boundary;\n"
724 " initial protection is PROT_READ | PROT_WRITE. */\n"
725 "\\&\n"
726 " buffer = memalign(pagesize, 4 * pagesize);\n"
727 " if (buffer == NULL)\n"
728 " err(EXIT_FAILURE, \"memalign\");\n"
729 "\\&\n"
730 " printf(\"Start of region: %p\\[rs]n\", buffer);\n"
731 "\\&\n"
732 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
733 " PROT_READ) == -1)\n"
734 " err(EXIT_FAILURE, \"mprotect\");\n"
735 "\\&\n"
736 " for (char *p = buffer ; ; )\n"
737 " *(p++) = \\[aq]a\\[aq];\n"
738 "\\&\n"
739 " printf(\"Loop completed\\[rs]n\"); /* Should never happen */\n"
740 " exit(EXIT_SUCCESS);\n"
741 "}\n"
742 msgstr ""
743
744 #. SRC END
745 #. type: SH
746 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
747 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
748 #, no-wrap
749 msgid "SEE ALSO"
750 msgstr "VEJA TAMBÉM"
751
752 #. type: Plain text
753 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
754 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
755 msgid "B<mmap>(2), B<sysconf>(3), B<pkeys>(7)"
756 msgstr "B<mmap>(2), B<sysconf>(3), B<pkeys>(7)"
757
758 #. type: TH
759 #: debian-trixie
760 #, no-wrap
761 msgid "2024-06-15"
762 msgstr "15 junho 2024"
763
764 #. type: TH
765 #: debian-trixie
766 #, no-wrap
767 msgid "Linux man-pages 6.9.1"
768 msgstr "Linux man-pages 6.9.1"
769
770 #. type: Plain text
771 #: debian-trixie
772 msgid "Standard C library (I<libc>, I<-lc>)"
773 msgstr "Biblioteca C Padrão (I<libc>, I<-lc>)"
774
775 #. type: Plain text
776 #: debian-trixie
777 #, fuzzy, no-wrap
778 #| msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
779 msgid "B<int mprotect(void >I<addr>B<[.>I<len>B<], size_t >I<len>B<, int >I<prot>B<);>\n"
780 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
781
782 #. type: Plain text
783 #: debian-trixie
784 #, fuzzy, no-wrap
785 #| msgid "B<int pkey_mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<, int >I<pkey>B<);>\n"
786 msgid "B<int pkey_mprotect(void >I<addr>B<[.>I<len>B<], size_t >I<len>B<, int >I<prot>B<, int >I<pkey>B<);>\n"
787 msgstr "B<int pkey_mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<, int >I<pkey>B<);>\n"
788
789 #. type: Plain text
790 #: debian-trixie
791 msgid ""
792 "B<mprotect>() changes the access protections for the calling process's "
793 "memory pages containing any part of the address range in the interval "
794 "[I<addr>,\\ I<addr>+I<len>-1]. I<addr> must be aligned to a page boundary."
795 msgstr ""
796
797 #. type: Plain text
798 #: debian-trixie
799 msgid ""
800 "Like B<mprotect>(), B<pkey_mprotect>() changes the protection on the pages "
801 "specified by I<addr> and I<len>. The I<pkey> argument specifies the "
802 "protection key (see B<pkeys>(7)) to assign to the memory. The protection "
803 "key must be allocated with B<pkey_alloc>(2) before it is passed to "
804 "B<pkey_mprotect>(). For an example of the use of this system call, see "
805 "B<pkeys>(7)."
806 msgstr ""
807
808 #. type: Plain text
809 #: debian-trixie
810 msgid ""
811 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
812 "address space of the process, or specify one or more pages that are not "
813 "mapped. (Before Linux 2.4.19, the error B<EFAULT> was incorrectly produced "
814 "for these cases.)"
815 msgstr ""
816
817 #. type: Plain text
818 #: debian-trixie fedora-44 fedora-rawhide
819 msgid "POSIX.1-2008."
820 msgstr "POSIX.1-2008."
821
822 #. type: Plain text
823 #: debian-trixie fedora-44 fedora-rawhide
824 msgid "POSIX.1-2001, SVr4."
825 msgstr "POSIX.1-2001, SVr4."
826
827 #. type: Plain text
828 #: debian-trixie fedora-44 fedora-rawhide
829 #, no-wrap
830 msgid ""
831 "#include E<lt>malloc.hE<gt>\n"
832 "#include E<lt>signal.hE<gt>\n"
833 "#include E<lt>stdio.hE<gt>\n"
834 "#include E<lt>stdlib.hE<gt>\n"
835 "#include E<lt>sys/mman.hE<gt>\n"
836 "#include E<lt>unistd.hE<gt>\n"
837 "\\&\n"
838 "#define handle_error(msg) \\[rs]\n"
839 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
840 "\\&\n"
841 "static char *buffer;\n"
842 "\\&\n"
843 "static void\n"
844 "handler(int sig, siginfo_t *si, void *unused)\n"
845 "{\n"
846 " /* Note: calling printf() from a signal handler is not safe\n"
847 " (and should not be done in production programs), since\n"
848 " printf() is not async-signal-safe; see signal-safety(7).\n"
849 " Nevertheless, we use printf() here as a simple way of\n"
850 " showing that the handler was called. */\n"
851 "\\&\n"
852 " printf(\"Got SIGSEGV at address: %p\\[rs]n\", si-E<gt>si_addr);\n"
853 " exit(EXIT_FAILURE);\n"
854 "}\n"
855 "\\&\n"
856 "int\n"
857 "main(void)\n"
858 "{\n"
859 " int pagesize;\n"
860 " struct sigaction sa;\n"
861 "\\&\n"
862 " sa.sa_flags = SA_SIGINFO;\n"
863 " sigemptyset(&sa.sa_mask);\n"
864 " sa.sa_sigaction = handler;\n"
865 " if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
866 " handle_error(\"sigaction\");\n"
867 "\\&\n"
868 " pagesize = sysconf(_SC_PAGE_SIZE);\n"
869 " if (pagesize == -1)\n"
870 " handle_error(\"sysconf\");\n"
871 "\\&\n"
872 " /* Allocate a buffer aligned on a page boundary;\n"
873 " initial protection is PROT_READ | PROT_WRITE. */\n"
874 "\\&\n"
875 " buffer = memalign(pagesize, 4 * pagesize);\n"
876 " if (buffer == NULL)\n"
877 " handle_error(\"memalign\");\n"
878 "\\&\n"
879 " printf(\"Start of region: %p\\[rs]n\", buffer);\n"
880 "\\&\n"
881 " if (mprotect(buffer + pagesize * 2, pagesize,\n"
882 " PROT_READ) == -1)\n"
883 " handle_error(\"mprotect\");\n"
884 "\\&\n"
885 " for (char *p = buffer ; ; )\n"
886 " *(p++) = \\[aq]a\\[aq];\n"
887 "\\&\n"
888 " printf(\"Loop completed\\[rs]n\"); /* Should never happen */\n"
889 " exit(EXIT_SUCCESS);\n"
890 "}\n"
891 msgstr ""
892
893 #. type: TH
894 #: fedora-44 fedora-rawhide
895 #, no-wrap
896 msgid "2024-11-17"
897 msgstr "17 novembro 2024"
898
899 #. type: TH
900 #: fedora-44 fedora-rawhide
901 #, no-wrap
902 msgid "Linux man-pages 6.13"
903 msgstr "Linux man-pages 6.13"
904
905 #. type: Plain text
906 #: fedora-44 fedora-rawhide
907 #, fuzzy, no-wrap
908 #| msgid "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
909 msgid "B<int mprotect(void >I<addr>B<[.>I<size>B<], size_t >I<size>B<, int >I<prot>B<);>\n"
910 msgstr "B<int mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
911
912 #. type: Plain text
913 #: fedora-44 fedora-rawhide
914 #, fuzzy, no-wrap
915 #| msgid "B<int pkey_mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<, int >I<pkey>B<);>\n"
916 msgid "B<int pkey_mprotect(void >I<addr>B<[.>I<size>B<], size_t >I<size>B<, int >I<prot>B<, int >I<pkey>B<);>\n"
917 msgstr "B<int pkey_mprotect(void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<, int >I<pkey>B<);>\n"
918
919 #. type: Plain text
920 #: fedora-44 fedora-rawhide
921 msgid ""
922 "B<mprotect>() changes the access protections for the calling process's "
923 "memory pages containing any part of the address range in the interval "
924 "[I<addr>,\\ I<addr>+I<size>-1]. I<addr> must be aligned to a page boundary."
925 msgstr ""
926
927 #. type: TH
928 #: mageia-cauldron
929 #, no-wrap
930 msgid "Linux man-pages 6.17"
931 msgstr "Linux man-pages 6.17"
932
933 #. type: TH
934 #: opensuse-leap-16-1 opensuse-tumbleweed
935 #, no-wrap
936 msgid "Linux man-pages (unreleased)"
937 msgstr "Linux man-pages (não lançado)"