Debian Codegraph @

po/ro/man7/pkeys.7.po

raw
1 # Romanian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Remus-Gabriel Chelu <[email protected]>, 2024, 2025.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.22.0\n"
8 "POT-Creation-Date: 2026-06-05 06:35+0200\n"
9 "PO-Revision-Date: 2024-07-01 22:39+0200\n"
10 "Last-Translator: Remus-Gabriel Chelu <[email protected]>\n"
11 "Language-Team: Romanian <[email protected]>\n"
12 "Language: ro\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
17 "20)) ? 1 : 2;\n"
18 "X-Generator: Poedit 3.4.3\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "pkeys"
25 msgstr "pkeys"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 februarie 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "Pagini de manual de Linux 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "NUME"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "pkeys - overview of Memory Protection Keys"
51 msgstr "pkeys - prezentare generală a cheilor de protecție a memoriei"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "DESCRIPTION"
58 msgstr "DESCRIERE"
59
60 #. type: Plain text
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 msgid ""
64 "Memory Protection Keys (pkeys) are an extension to existing page-based "
65 "memory permissions. Normal page permissions using page tables require "
66 "expensive system calls and TLB invalidations when changing permissions. "
67 "Memory Protection Keys provide a mechanism for changing protections without "
68 "requiring modification of the page tables on every permission change."
69 msgstr ""
70 "Cheile de protecție a memoriei (pkeys) sunt o extensie a permisiunilor de "
71 "memorie existente bazate pe pagini. Permisiunile normale de pagini care "
72 "utilizează tabele de pagini necesită apeluri de sistem costisitoare și "
73 "invalidări ale TLB (Translation Lookaside Buffer) atunci când se schimbă "
74 "permisiunile. Cheile de protecție a memoriei oferă un mecanism de modificare "
75 "a protecțiilor fără a necesita modificarea tabelelor de pagini la fiecare "
76 "modificare a permisiunilor."
77
78 #. type: Plain text
79 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
80 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
81 msgid ""
82 "To use pkeys, software must first \"tag\" a page in the page tables with a "
83 "pkey. After this tag is in place, an application only has to change the "
84 "contents of a register in order to remove write access, or all access to a "
85 "tagged page."
86 msgstr ""
87 "Pentru a utiliza B<pkeys>, software-ul trebuie mai întâi să „eticheteze” o "
88 "pagină din tabelele de pagini cu o cheie de protecție „pkey”. După ce "
89 "această etichetă este plasată, o aplicație trebuie doar să modifice "
90 "conținutul unui registru pentru a elimina accesul la scriere sau tot accesul "
91 "la o pagină etichetată."
92
93 #. type: Plain text
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 msgid ""
97 "Protection keys work in conjunction with the existing B<PROT_READ>, "
98 "B<PROT_WRITE>, and B<PROT_EXEC> permissions passed to system calls such as "
99 "B<mprotect>(2) and B<mmap>(2), but always act to further restrict these "
100 "traditional permission mechanisms."
101 msgstr ""
102 "Cheile de protecție funcționează împreună cu permisiunile existente "
103 "B<PROT_READ>, B<PROT_WRITE> și B<PROT_EXEC> transmise apelurilor de sistem, "
104 "cum ar fi B<mprotect>(2) și B<mmap>(2), dar acționează întotdeauna pentru a "
105 "restricționa și mai mult aceste mecanisme tradiționale de permisiune."
106
107 #. type: Plain text
108 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
109 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
110 msgid ""
111 "If a process performs an access that violates pkey restrictions, it receives "
112 "a B<SIGSEGV> signal. See B<sigaction>(2) for details of the information "
113 "available with that signal."
114 msgstr ""
115 "În cazul în care un proces efectuează un acces care încalcă restricțiile "
116 "cheii de protecție, acesta primește un semnal B<SIGSEGV>. A se vedea "
117 "B<sigaction>(2) pentru detalii privind informațiile disponibile cu acest "
118 "semnal."
119
120 #. type: Plain text
121 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
122 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
123 msgid ""
124 "To use the pkeys feature, the processor must support it, and the kernel must "
125 "contain support for the feature on a given processor. As of early 2016 only "
126 "future Intel x86 processors are supported, and this hardware supports 16 "
127 "protection keys in each process. However, pkey 0 is used as the default "
128 "key, so a maximum of 15 are available for actual application use. The "
129 "default key is assigned to any memory region for which a pkey has not been "
130 "explicitly assigned via B<pkey_mprotect>(2)."
131 msgstr ""
132 "Pentru a utiliza caracteristica B<pkeys>, procesorul trebuie să o accepte, "
133 "iar nucleul trebuie să conțină suport pentru această caracteristică pe un "
134 "anumit procesor. De la începutul anului 2016 sunt acceptate doar viitoarele "
135 "procesoare Intel x86, iar acest hardware suportă 16 chei de protecție în "
136 "fiecare proces. Cu toate acestea, „pkey 0” este utilizată drept cheie "
137 "implicită, astfel încât sunt disponibile maximum 15 pentru utilizarea "
138 "efectivă a aplicațiilor. Cheia implicită este atribuită oricărei regiuni de "
139 "memorie pentru care nu a fost atribuită în mod explicit o cheie de protecție "
140 "prin B<pkey_mprotect>(2)."
141
142 #. type: Plain text
143 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
144 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
145 msgid ""
146 "Protection keys have the potential to add a layer of security and "
147 "reliability to applications. But they have not been primarily designed as a "
148 "security feature. For instance, WRPKRU is a completely unprivileged "
149 "instruction, so pkeys are useless in any case that an attacker controls the "
150 "PKRU register or can execute arbitrary instructions."
151 msgstr ""
152 "Cheile de protecție au potențialul de a adăuga un nivel de securitate și "
153 "fiabilitate la aplicații. Dar ele nu au fost concepute în primul rând ca o "
154 "caracteristică de securitate. De exemplu, WRPKRU este o instrucțiune complet "
155 "neprivilegiată, astfel încât cheile de protecție sunt inutile în orice caz "
156 "în care un atacator controlează registrul PKRU sau poate executa "
157 "instrucțiuni arbitrare."
158
159 #. type: Plain text
160 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
161 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
162 msgid ""
163 "Applications should be very careful to ensure that they do not \"leak\" "
164 "protection keys. For instance, before calling B<pkey_free>(2), the "
165 "application should be sure that no memory has that pkey assigned. If the "
166 "application left the freed pkey assigned, a future user of that pkey might "
167 "inadvertently change the permissions of an unrelated data structure, which "
168 "could impact security or stability. The kernel currently allows in-use "
169 "pkeys to have B<pkey_free>(2) called on them because it would have "
170 "processor or memory performance implications to perform the additional "
171 "checks needed to disallow it. Implementation of the necessary checks is "
172 "left up to applications. Applications may implement these checks by "
173 "searching the I</proc/>pidI</smaps> file for memory regions with the pkey "
174 "assigned. Further details can be found in B<proc>(5)."
175 msgstr ""
176 "Aplicațiile trebuie să fie foarte atente pentru a se asigura că nu „li se "
177 "scurg” cheile de protecție.De exemplu, înainte de a apela B<pkey_free>(2), "
178 "aplicația ar trebui să se asigure că nu există nicio memorie care să aibă "
179 "atribuită acea cheie de protecție „pkey”. În cazul în care aplicația a lăsat "
180 "atribuită cheia de protecție eliberată, un viitor utilizator al acelei chei "
181 "de protecție ar putea modifica din greșeală permisiunile unei structuri de "
182 "date nerelaționată, ceea ce ar putea avea un impact asupra securității sau "
183 "stabilității. În prezent, nucleul permite ca B<pkey_free>(2) să fie apelat "
184 "pentru cheile de acces în uz, deoarece efectuarea verificărilor suplimentare "
185 "necesare pentru a interzice acest lucru ar avea implicații asupra "
186 "performanței procesorului sau a memoriei. Implementarea verificărilor "
187 "necesare este lăsată la latitudinea aplicațiilor. Aplicațiile pot pune în "
188 "aplicare aceste verificări prin căutarea în fișierul I</proc/>pidI</smaps> a "
189 "regiunilor de memorie cărora le-a fost atribuită cheia „pkey”. Mai multe "
190 "detalii pot fi găsite în B<proc>(5)."
191
192 #. type: Plain text
193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
195 msgid ""
196 "Any application wanting to use protection keys needs to be able to function "
197 "without them. They might be unavailable because the hardware that the "
198 "application runs on does not support them, the kernel code does not contain "
199 "support, the kernel support has been disabled, or because the keys have all "
200 "been allocated, perhaps by a library the application is using. It is "
201 "recommended that applications wanting to use protection keys should simply "
202 "call B<pkey_alloc>(2) and test whether the call succeeds, instead of "
203 "attempting to detect support for the feature in any other way."
204 msgstr ""
205 "Orice aplicație care dorește să utilizeze chei de protecție trebuie să poată "
206 "funcționa fără acestea. Acestea ar putea fi indisponibile deoarece hardware-"
207 "ul pe care rulează aplicația nu le acceptă, codul nucleului nu conține "
208 "suport, suportul nucleului a fost dezactivat sau deoarece toate cheile au "
209 "fost alocate, poate de către o bibliotecă pe care o utilizează aplicația. Se "
210 "recomandă ca aplicațiile care doresc să utilizeze chei de protecție să "
211 "apeleze pur și simplu B<pkey_alloc>(2) și să testeze dacă apelul reușește, "
212 "în loc să încerce să detecteze suportul pentru această caracteristică în "
213 "orice alt mod."
214
215 #. type: Plain text
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 msgid ""
219 "Although unnecessary, hardware support for protection keys may be enumerated "
220 "with the I<cpuid> instruction. Details of how to do this can be found in "
221 "the Intel Software Developers Manual. The kernel performs this enumeration "
222 "and exposes the information in I</proc/cpuinfo> under the \"flags\" field. "
223 "The string \"pku\" in this field indicates hardware support for protection "
224 "keys and the string \"ospke\" indicates that the kernel contains and has "
225 "enabled protection keys support."
226 msgstr ""
227 "Deși nu este necesar, suportul hardware pentru cheile de protecție poate fi "
228 "enumerat cu instrucțiunea I<cpuid>. Detalii despre cum se face acest lucru "
229 "pot fi găsite în „Intel Software Developers Manual”. Nucleul efectuează "
230 "această enumerare și expune informațiile în I</proc/cpuinfo> sub câmpul "
231 "„flags”. Șirul „pku” din acest câmp indică suportul hardware pentru chei de "
232 "protecție, iar șirul „ospke” indică faptul că nucleul conține și a activat "
233 "suportul pentru chei de protecție."
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 msgid ""
239 "Applications using threads and protection keys should be especially "
240 "careful. Threads inherit the protection key rights of the parent at the "
241 "time of the B<clone>(2), system call. Applications should either ensure "
242 "that their own permissions are appropriate for child threads at the time "
243 "when B<clone>(2) is called, or ensure that each child thread can perform "
244 "its own initialization of protection key rights."
245 msgstr ""
246 "Aplicațiile care utilizează fire de execuție și chei de protecție trebuie să "
247 "fie deosebit de atente. Firele moștenesc drepturile cheilor de protecție ale "
248 "părintelui în momentul apelului de sistem B<clone>(2). Aplicațiile ar trebui "
249 "fie să se asigure că propriile permisiuni sunt adecvate pentru firele-copil "
250 "în momentul în care se apelează B<clone>(2), fie să se asigure că fiecare "
251 "fir-copil poate efectua propria inițializare a drepturilor cheilor de "
252 "protecție."
253
254 #. type: SS
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 #, no-wrap
258 msgid "Signal Handler Behavior"
259 msgstr "Comportamentul gestionarului de semnale"
260
261 #. type: Plain text
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 msgid ""
265 "Each time a signal handler is invoked (including nested signals), the thread "
266 "is temporarily given a new, default set of protection key rights that "
267 "override the rights from the interrupted context. This means that "
268 "applications must re-establish their desired protection key rights upon "
269 "entering a signal handler if the desired rights differ from the defaults. "
270 "The rights of any interrupted context are restored when the signal handler "
271 "returns."
272 msgstr ""
273 "De fiecare dată când este invocat un gestionar de semnal (inclusiv semnalele "
274 "imbricate), firului i se atribuie temporar un set nou, implicit, de drepturi "
275 "de cheie de protecție care înlocuiesc drepturile din contextul întrerupt. "
276 "Acest lucru înseamnă că aplicațiile trebuie să restabilească din nou "
277 "drepturile de cheie de protecție dorite la intrarea într-un gestionar de "
278 "semnal dacă drepturile dorite diferă de cele implicite. Drepturile oricărui "
279 "context întrerupt sunt restabilite la returnarea gestionarului de semnal."
280
281 #. type: Plain text
282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
284 msgid ""
285 "This signal behavior is unusual and is due to the fact that the x86 PKRU "
286 "register (which stores protection key access rights) is managed with the "
287 "same hardware mechanism (XSAVE) that manages floating-point registers. The "
288 "signal behavior is the same as that of floating-point registers."
289 msgstr ""
290 "Acest comportament al semnalului este neobișnuit și se datorează faptului că "
291 "registrul x86 PKRU (care stochează drepturile de acces la cheia de "
292 "protecție) este gestionat cu același mecanism hardware (XSAVE) care "
293 "gestionează registrele în virgulă mobilă. Comportamentul semnalului este "
294 "același cu cel al registrelor în virgulă mobilă."
295
296 #. type: SS
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid "Protection Keys system calls"
301 msgstr "Apeluri de sistem cu chei de protecție"
302
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 "The Linux kernel implements the following pkey-related system calls: "
308 "B<pkey_mprotect>(2), B<pkey_alloc>(2), and B<pkey_free>(2)."
309 msgstr ""
310 "Nucleul Linux implementează următoarele apeluri de sistem legate de chei de "
311 "protecție: B<pkey_mprotect>(2), B<pkey_alloc>(2) și B<pkey_free>(2)."
312
313 #. type: Plain text
314 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
315 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
316 msgid ""
317 "The Linux pkey system calls are available only if the kernel was configured "
318 "and built with the B<CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS> option."
319 msgstr ""
320 "Apelurile de sistem Linux pentru pkey sunt disponibile numai dacă nucleul a "
321 "fost configurat și construit cu opțiunea "
322 "B<CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS>."
323
324 #. type: SH
325 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
326 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
327 #, no-wrap
328 msgid "EXAMPLES"
329 msgstr "EXEMPLE"
330
331 #. type: Plain text
332 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
333 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
334 msgid ""
335 "The program below allocates a page of memory with read and write "
336 "permissions. It then writes some data to the memory and successfully reads "
337 "it back. After that, it attempts to allocate a protection key and disallows "
338 "access to the page by using the WRPKRU instruction. It then tries to access "
339 "the page, which we now expect to cause a fatal signal to the application."
340 msgstr ""
341 "Programul de mai jos alocă o pagină de memorie cu permisiuni de citire și "
342 "scriere. Apoi scrie câteva date în memorie și le citește cu succes înapoi. "
343 "După aceea, încearcă să aloce o cheie de protecție și interzice accesul la "
344 "pagină prin utilizarea instrucțiunii WRPKRU. Apoi încearcă să acceseze "
345 "pagina, ceea ce ne așteptăm acum să provoace un semnal fatal pentru "
346 "aplicație."
347
348 #. type: Plain text
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 #, no-wrap
352 msgid ""
353 "$B< ./a.out>\n"
354 "buffer contains: 73\n"
355 "about to read buffer again...\n"
356 "Segmentation fault (core dumped)\n"
357 msgstr ""
358 "$B< ./a.out>\n"
359 "memoria tampon conține: 73\n"
360 "pe cale de a citi din nou memoria tampon...\n"
361 "Eroare de segmentare (conținutul memoriei a fost descărcat)\n"
362
363 #. type: SS
364 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
365 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
366 #, no-wrap
367 msgid "Program source"
368 msgstr "Sursa programului"
369
370 #. type: Plain text
371 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
372 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
373 #, no-wrap
374 msgid ""
375 "#define _GNU_SOURCE\n"
376 "#include E<lt>err.hE<gt>\n"
377 "#include E<lt>unistd.hE<gt>\n"
378 "#include E<lt>stdio.hE<gt>\n"
379 "#include E<lt>stdlib.hE<gt>\n"
380 "#include E<lt>sys/mman.hE<gt>\n"
381 "\\&\n"
382 "int\n"
383 "main(void)\n"
384 "{\n"
385 " int status;\n"
386 " int pkey;\n"
387 " int *buffer;\n"
388 "\\&\n"
389 " /*\n"
390 " * Allocate one page of memory.\n"
391 " */\n"
392 " buffer = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE,\n"
393 " MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);\n"
394 " if (buffer == MAP_FAILED)\n"
395 " err(EXIT_FAILURE, \"mmap\");\n"
396 "\\&\n"
397 " /*\n"
398 " * Put some random data into the page (still OK to touch).\n"
399 " */\n"
400 " *buffer = __LINE__;\n"
401 " printf(\"buffer contains: %d\\[rs]n\", *buffer);\n"
402 "\\&\n"
403 " /*\n"
404 " * Allocate a protection key:\n"
405 " */\n"
406 " pkey = pkey_alloc(0, 0);\n"
407 " if (pkey == -1)\n"
408 " err(EXIT_FAILURE, \"pkey_alloc\");\n"
409 "\\&\n"
410 " /*\n"
411 " * Disable access to any memory with \"pkey\" set,\n"
412 " * even though there is none right now.\n"
413 " */\n"
414 " status = pkey_set(pkey, PKEY_DISABLE_ACCESS);\n"
415 " if (status)\n"
416 " err(EXIT_FAILURE, \"pkey_set\");\n"
417 "\\&\n"
418 " /*\n"
419 " * Set the protection key on \"buffer\".\n"
420 " * Note that it is still read/write as far as mprotect() is\n"
421 " * concerned and the previous pkey_set() overrides it.\n"
422 " */\n"
423 " status = pkey_mprotect(buffer, getpagesize(),\n"
424 " PROT_READ | PROT_WRITE, pkey);\n"
425 " if (status == -1)\n"
426 " err(EXIT_FAILURE, \"pkey_mprotect\");\n"
427 "\\&\n"
428 " printf(\"about to read buffer again...\\[rs]n\");\n"
429 "\\&\n"
430 " /*\n"
431 " * This will crash, because we have disallowed access.\n"
432 " */\n"
433 " printf(\"buffer contains: %d\\[rs]n\", *buffer);\n"
434 "\\&\n"
435 " status = pkey_free(pkey);\n"
436 " if (status == -1)\n"
437 " err(EXIT_FAILURE, \"pkey_free\");\n"
438 "\\&\n"
439 " exit(EXIT_SUCCESS);\n"
440 "}\n"
441 msgstr ""
442 "#define _GNU_SOURCE\n"
443 "#include E<lt>err.hE<gt>\n"
444 "#include E<lt>unistd.hE<gt>\n"
445 "#include E<lt>stdio.hE<gt>\n"
446 "#include E<lt>stdlib.hE<gt>\n"
447 "#include E<lt>sys/mman.hE<gt>\n"
448 "\\&\n"
449 "int\n"
450 "main(void)\n"
451 "{\n"
452 " int status;\n"
453 " int pkey;\n"
454 " int *buffer;\n"
455 "\\&\n"
456 " /*\n"
457 " * Alocă o pagină de memorie.\n"
458 " */\n"
459 " buffer = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE,\n"
460 " MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);\n"
461 " if (buffer == MAP_FAILED)\n"
462 " err(EXIT_FAILURE, \"mmap\");\n"
463 "\\&\n"
464 " /*\n"
465 " * Introduce niște date aleatorii în pagină (întotdeauna în regulă pentru a le accesa).\n"
466 " */\n"
467 " *buffer = __LINE__;\n"
468 " printf(\"memoria tampon conține: %d\\[rs]n\", *buffer);\n"
469 "\\&\n"
470 " /*\n"
471 " * Alocă o cheie de protecție:\n"
472 " */\n"
473 " pkey = pkey_alloc(0, 0);\n"
474 " if (pkey == -1)\n"
475 " err(EXIT_FAILURE, \"pkey_alloc\");\n"
476 "\\&\n"
477 " /*\n"
478 " * Dezactivează accesul la orice memorie cu „pkey” stabilită,\n"
479 " * chiar dacă nu există niciuna în acest moment.\n"
480 " */\n"
481 " status = pkey_set(pkey, PKEY_DISABLE_ACCESS);\n"
482 " if (status)\n"
483 " err(EXIT_FAILURE, \"pkey_set\");\n"
484 "\\&\n"
485 " /*\n"
486 " * Stabilește cheia de protecție pe „memorie tampon”.\n"
487 " * Rețineți că este în continuare de citire/scriere în ceea ce privește mprotect(),\n"
488 " * iar precedentul pkey_set() are prioritate față de acesta.\n"
489 " */\n"
490 " status = pkey_mprotect(buffer, getpagesize(),\n"
491 " PROT_READ | PROT_WRITE, pkey);\n"
492 " if (status == -1)\n"
493 " err(EXIT_FAILURE, \"pkey_mprotect\");\n"
494 "\\&\n"
495 " printf(\"pe cale de a citi din nou memoria tampon...\\[rs]n\");\n"
496 "\\&\n"
497 " /*\n"
498 " * Aceasta se va prăbuși, deoarece am interzis accesul.\n"
499 " */\n"
500 " printf(\"memoria tampon conține: %d\\[rs]n\", *buffer);\n"
501 "\\&\n"
502 " status = pkey_free(pkey);\n"
503 " if (status == -1)\n"
504 " err(EXIT_FAILURE, \"pkey_free\");\n"
505 "\\&\n"
506 " exit(EXIT_SUCCESS);\n"
507 "}\n"
508
509 #. type: SH
510 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
511 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
512 #, no-wrap
513 msgid "SEE ALSO"
514 msgstr "CONSULTAȚI ȘI"
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 "B<pkey_alloc>(2), B<pkey_free>(2), B<pkey_mprotect>(2), B<sigaction>(2)"
520 msgstr ""
521 "B<pkey_alloc>(2), B<pkey_free>(2), B<pkey_mprotect>(2), B<sigaction>(2)"
522
523 #. type: TH
524 #: debian-trixie fedora-44 fedora-rawhide
525 #, no-wrap
526 msgid "2024-06-15"
527 msgstr "15 iunie 2024"
528
529 #. type: TH
530 #: debian-trixie
531 #, no-wrap
532 msgid "Linux man-pages 6.9.1"
533 msgstr "Pagini de manual de Linux 6.9.1"
534
535 #. type: TH
536 #: fedora-44 fedora-rawhide
537 #, no-wrap
538 msgid "Linux man-pages 6.13"
539 msgstr "Pagini de manual de Linux 6.13"
540
541 #. type: TH
542 #: mageia-cauldron
543 #, no-wrap
544 msgid "Linux man-pages 6.17"
545 msgstr "Pagini de manual de Linux 6.17"
546
547 #. type: TH
548 #: opensuse-leap-16-1 opensuse-tumbleweed
549 #, no-wrap
550 msgid "Linux man-pages (unreleased)"
551 msgstr "Pagini de manual Linux (nepublicate)"