Debian Codegraph @

templates/man2/memfd_secret.2.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:31+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "memfd_secret"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid ""
50 "memfd_secret - create an anonymous RAM-based file to access secret memory "
51 "regions"
52 msgstr ""
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "LIBRARY"
59 msgstr ""
60
61 #. type: Plain text
62 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
63 #: opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "Standard C library (I<libc>,\\ I<-lc>)"
65 msgstr ""
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "SYNOPSIS"
72 msgstr ""
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid ""
79 "B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n"
80 "B<#include E<lt>unistd.hE<gt>>\n"
81 msgstr ""
82
83 #. type: Plain text
84 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
85 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
86 #, no-wrap
87 msgid "B<int syscall(SYS_memfd_secret, unsigned int >I<flags>B<);>\n"
88 msgstr ""
89
90 #. type: Plain text
91 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
92 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
93 msgid ""
94 "I<Note>: glibc provides no wrapper for B<memfd_secret>(), necessitating the "
95 "use of B<syscall>(2)."
96 msgstr ""
97
98 #. type: SH
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 #, no-wrap
102 msgid "DESCRIPTION"
103 msgstr ""
104
105 #. type: Plain text
106 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
107 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
108 msgid ""
109 "B<memfd_secret>() creates an anonymous RAM-based file and returns a file "
110 "descriptor that refers to it. The file provides a way to create and access "
111 "memory regions with stronger protection than usual RAM-based files and "
112 "anonymous memory mappings. Once all open references to the file are closed, "
113 "it is automatically released. The initial size of the file is set to 0. "
114 "Following the call, the file size should be set using B<ftruncate>(2)."
115 msgstr ""
116
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 msgid ""
121 "The memory areas backing the file created with B<memfd_secret>(2) are "
122 "visible only to the processes that have access to the file descriptor. The "
123 "memory region is removed from the kernel page tables and only the page "
124 "tables of the processes holding the file descriptor map the corresponding "
125 "physical memory. (Thus, the pages in the region can't be accessed by the "
126 "kernel itself, so that, for example, pointers to the region can't be passed "
127 "to system calls.)"
128 msgstr ""
129
130 #. type: Plain text
131 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
132 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
133 msgid ""
134 "The following values may be bitwise ORed in I<flags> to control the behavior "
135 "of B<memfd_secret>():"
136 msgstr ""
137
138 #. type: TP
139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
141 #, no-wrap
142 msgid "B<FD_CLOEXEC>"
143 msgstr ""
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid ""
149 "Set the close-on-exec flag on the new file descriptor, which causes the "
150 "region to be removed from the process on B<execve>(2). See the description "
151 "of the B<O_CLOEXEC> flag in B<open>(2)"
152 msgstr ""
153
154 #. type: Plain text
155 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
156 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
157 msgid ""
158 "As its return value, B<memfd_secret>() returns a new file descriptor that "
159 "refers to an anonymous file. This file descriptor is opened for both "
160 "reading and writing (B<O_RDWR>) and B<O_LARGEFILE> is set for the file "
161 "descriptor."
162 msgstr ""
163
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 msgid ""
168 "With respect to B<fork>(2) and B<execve>(2), the usual semantics apply for "
169 "the file descriptor created by B<memfd_secret>(). A copy of the file "
170 "descriptor is inherited by the child produced by B<fork>(2) and refers to "
171 "the same file. The file descriptor is preserved across B<execve>(2), unless "
172 "the close-on-exec flag has been set."
173 msgstr ""
174
175 #. type: Plain text
176 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
177 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
178 msgid ""
179 "The memory region is locked into memory in the same way as with B<mlock>(2), "
180 "so that it will never be written into swap, and hibernation is inhibited for "
181 "as long as any B<memfd_secret>() descriptions exist. However the "
182 "implementation of B<memfd_secret>() will not try to populate the whole "
183 "range during the B<mmap>(2) call that attaches the region into the "
184 "process's address space; instead, the pages are only actually allocated as "
185 "they are faulted in. The amount of memory allowed for memory mappings of "
186 "the file descriptor obeys the same rules as B<mlock>(2) and cannot exceed "
187 "B<RLIMIT_MEMLOCK>."
188 msgstr ""
189
190 #. type: SH
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 #, no-wrap
194 msgid "RETURN VALUE"
195 msgstr ""
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid ""
201 "On success, B<memfd_secret>() returns a new file descriptor. On error, -1 "
202 "is returned and I<errno> is set to indicate the error."
203 msgstr ""
204
205 #. type: SH
206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
208 #, no-wrap
209 msgid "ERRORS"
210 msgstr ""
211
212 #. type: TP
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 #, no-wrap
216 msgid "B<EINVAL>"
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 msgid "I<flags> included unknown bits."
223 msgstr ""
224
225 #. type: TP
226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
228 #, no-wrap
229 msgid "B<EMFILE>"
230 msgstr ""
231
232 #. type: Plain text
233 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
234 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
235 msgid ""
236 "The per-process limit on the number of open file descriptors has been "
237 "reached."
238 msgstr ""
239
240 #. type: Plain text
241 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
242 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
243 msgid ""
244 "The system-wide limit on the total number of open files has been reached."
245 msgstr ""
246
247 #. type: TP
248 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
249 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
250 #, no-wrap
251 msgid "B<ENOMEM>"
252 msgstr ""
253
254 #. type: Plain text
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 msgid "There was insufficient memory to create a new anonymous file."
258 msgstr ""
259
260 #. type: TP
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 #, no-wrap
264 msgid "B<ENOSYS>"
265 msgstr ""
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid ""
271 "B<memfd_secret>() is not implemented on this architecture, or has not been "
272 "enabled on the kernel command-line with B<secretmem_enable>=1."
273 msgstr ""
274
275 #. type: SH
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 #, no-wrap
279 msgid "STANDARDS"
280 msgstr ""
281
282 #. type: Plain text
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 msgid "Linux."
286 msgstr ""
287
288 #. type: SH
289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
291 #, no-wrap
292 msgid "HISTORY"
293 msgstr ""
294
295 #. type: Plain text
296 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
297 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
298 msgid "Linux 5.14."
299 msgstr ""
300
301 #. commit b758fe6df50daf68fef089d8f3c1cd49fc794ed2
302 #. type: Plain text
303 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
304 #: opensuse-tumbleweed
305 msgid ""
306 "Before Linux 6.5, B<memfd_secret>() was disabled by default and only "
307 "available if the system administrator turned it on using "
308 "\"secretmem.enable=y\" kernel parameter."
309 msgstr ""
310
311 #. type: SH
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 #, no-wrap
315 msgid "NOTES"
316 msgstr ""
317
318 #. type: Plain text
319 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
320 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
321 msgid ""
322 "The B<memfd_secret>() system call is designed to allow a user-space process "
323 "to create a range of memory that is inaccessible to anybody else - kernel "
324 "included. There is no 100% guarantee that kernel won't be able to access "
325 "memory ranges backed by B<memfd_secret>() in any circumstances, but "
326 "nevertheless, it is much harder to exfiltrate data from these regions."
327 msgstr ""
328
329 #. type: Plain text
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 msgid "B<memfd_secret>() provides the following protections:"
333 msgstr ""
334
335 #. type: IP
336 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
337 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
338 #, no-wrap
339 msgid "\\[bu]"
340 msgstr ""
341
342 #. type: Plain text
343 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
344 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
345 msgid ""
346 "Enhanced protection (in conjunction with all the other in-kernel attack "
347 "prevention systems) against ROP attacks. Absence of any in-kernel "
348 "primitive for accessing memory backed by B<memfd_secret>() means that one-"
349 "gadget ROP attack can't work to perform data exfiltration. The attacker "
350 "would need to find enough ROP gadgets to reconstruct the missing page table "
351 "entries, which significantly increases difficulty of the attack, especially "
352 "when other protections like the kernel stack size limit and address space "
353 "layout randomization are in place."
354 msgstr ""
355
356 #. type: Plain text
357 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
358 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
359 msgid ""
360 "Prevent cross-process user-space memory exposures. Once a region for a "
361 "B<memfd_secret>() memory mapping is allocated, the user can't accidentally "
362 "pass it into the kernel to be transmitted somewhere. The memory pages in "
363 "this region cannot be accessed via the direct map and they are disallowed in "
364 "get_user_pages."
365 msgstr ""
366
367 #. type: Plain text
368 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
369 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
370 msgid ""
371 "Harden against exploited kernel flaws. In order to access memory areas "
372 "backed by B<memfd_secret>(), a kernel-side attack would need to either walk "
373 "the page tables and create new ones, or spawn a new privileged user-space "
374 "process to perform secrets exfiltration using B<ptrace>(2)."
375 msgstr ""
376
377 #. type: Plain text
378 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
379 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
380 msgid ""
381 "To prevent potential data leaks of memory regions backed by "
382 "B<memfd_secret>() from a hybernation image, hybernation is prevented when "
383 "there are active B<memfd_secret>() users."
384 msgstr ""
385
386 #. type: SH
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 #, no-wrap
390 msgid "SEE ALSO"
391 msgstr ""
392
393 #. type: Plain text
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 msgid ""
397 "B<fcntl>(2), B<ftruncate>(2), B<mlock>(2), B<memfd_create>(2), B<mmap>(2), "
398 "B<setrlimit>(2)"
399 msgstr ""
400
401 #. type: TH
402 #: debian-trixie
403 #, no-wrap
404 msgid "2024-05-02"
405 msgstr ""
406
407 #. type: TH
408 #: debian-trixie
409 #, no-wrap
410 msgid "Linux man-pages 6.9.1"
411 msgstr ""
412
413 #. type: Plain text
414 #: debian-trixie
415 msgid "Standard C library (I<libc>, I<-lc>)"
416 msgstr ""
417
418 #. type: Plain text
419 #: debian-trixie fedora-44 fedora-rawhide
420 msgid ""
421 "The way B<memfd_secret>() allocates and locks the memory may impact overall "
422 "system performance, therefore the system call is disabled by default and "
423 "only available if the system administrator turned it on using "
424 "\"secretmem.enable=y\" kernel parameter."
425 msgstr ""
426
427 #. type: TH
428 #: fedora-44 fedora-rawhide
429 #, no-wrap
430 msgid "2024-07-23"
431 msgstr ""
432
433 #. type: TH
434 #: fedora-44 fedora-rawhide
435 #, no-wrap
436 msgid "Linux man-pages 6.13"
437 msgstr ""
438
439 #. type: TH
440 #: mageia-cauldron
441 #, no-wrap
442 msgid "Linux man-pages 6.17"
443 msgstr ""
444
445 #. type: TH
446 #: opensuse-leap-16-1 opensuse-tumbleweed
447 #, no-wrap
448 msgid "Linux man-pages (unreleased)"
449 msgstr ""