/openbmc/linux/include/uapi/linux/ |
H A D | memfd.h | 9183df25fe7b194563db3fec6dc3202a5855839c Fri Aug 08 16:25:29 CDT 2014 David Herrmann <dh.herrmann@gmail.com> shm: add memfd_create() syscall
memfd_create() is similar to mmap(MAP_ANON), but returns a file-descriptor that you can pass to mmap(). It can support sealing and avoids any connection to user-visible mount-points. Thus, it's not subject to quotas on mounted file-systems, but can be used like malloc()'ed memory, but with a file-descriptor to it.
memfd_create() returns the raw shmem file, so calls like ftruncate() can be used to modify the underlying inode. Also calls like fstat() will return proper information and mark the file as regular file. If you want sealing, you can specify MFD_ALLOW_SEALING. Otherwise, sealing is not supported (like on all other regular files).
Compared to O_TMPFILE, it does not require a tmpfs mount-point and is not subject to a filesystem size limit. It is still properly accounted to memcg limits, though, and to the same overcommit or no-overcommit accounting as all user memory.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Hugh Dickins <hughd@google.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Ryan Lortie <desrt@desrt.ca> Cc: Lennart Poettering <lennart@poettering.net> Cc: Daniel Mack <zonque@gmail.com> Cc: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
/openbmc/linux/arch/ia64/include/uapi/asm/ |
H A D | unistd.h | diff 703e6a6ed6088705e48ca9d0e4567962ebddca36 Mon Aug 18 12:29:52 CDT 2014 Tony Luck <tony.luck@intel.com> [IA64] Wire up memfd_create() system call
Yet another system call. This one added by:
commit 9183df25fe7b194563db3fec6dc3202a5855839c shm: add memfd_create() syscall
Signed-off-by: Tony Luck <tony.luck@intel.com>
|
/openbmc/linux/arch/ia64/include/asm/ |
H A D | unistd.h | diff 703e6a6ed6088705e48ca9d0e4567962ebddca36 Mon Aug 18 12:29:52 CDT 2014 Tony Luck <tony.luck@intel.com> [IA64] Wire up memfd_create() system call
Yet another system call. This one added by:
commit 9183df25fe7b194563db3fec6dc3202a5855839c shm: add memfd_create() syscall
Signed-off-by: Tony Luck <tony.luck@intel.com>
|
/openbmc/linux/arch/ia64/kernel/ |
H A D | entry.S | diff 703e6a6ed6088705e48ca9d0e4567962ebddca36 Mon Aug 18 12:29:52 CDT 2014 Tony Luck <tony.luck@intel.com> [IA64] Wire up memfd_create() system call
Yet another system call. This one added by:
commit 9183df25fe7b194563db3fec6dc3202a5855839c shm: add memfd_create() syscall
Signed-off-by: Tony Luck <tony.luck@intel.com>
|
/openbmc/linux/kernel/ |
H A D | sys_ni.c | diff 9183df25fe7b194563db3fec6dc3202a5855839c Fri Aug 08 16:25:29 CDT 2014 David Herrmann <dh.herrmann@gmail.com> shm: add memfd_create() syscall
memfd_create() is similar to mmap(MAP_ANON), but returns a file-descriptor that you can pass to mmap(). It can support sealing and avoids any connection to user-visible mount-points. Thus, it's not subject to quotas on mounted file-systems, but can be used like malloc()'ed memory, but with a file-descriptor to it.
memfd_create() returns the raw shmem file, so calls like ftruncate() can be used to modify the underlying inode. Also calls like fstat() will return proper information and mark the file as regular file. If you want sealing, you can specify MFD_ALLOW_SEALING. Otherwise, sealing is not supported (like on all other regular files).
Compared to O_TMPFILE, it does not require a tmpfs mount-point and is not subject to a filesystem size limit. It is still properly accounted to memcg limits, though, and to the same overcommit or no-overcommit accounting as all user memory.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Hugh Dickins <hughd@google.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Ryan Lortie <desrt@desrt.ca> Cc: Lennart Poettering <lennart@poettering.net> Cc: Daniel Mack <zonque@gmail.com> Cc: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
/openbmc/linux/include/linux/ |
H A D | syscalls.h | diff 9183df25fe7b194563db3fec6dc3202a5855839c Fri Aug 08 16:25:29 CDT 2014 David Herrmann <dh.herrmann@gmail.com> shm: add memfd_create() syscall
memfd_create() is similar to mmap(MAP_ANON), but returns a file-descriptor that you can pass to mmap(). It can support sealing and avoids any connection to user-visible mount-points. Thus, it's not subject to quotas on mounted file-systems, but can be used like malloc()'ed memory, but with a file-descriptor to it.
memfd_create() returns the raw shmem file, so calls like ftruncate() can be used to modify the underlying inode. Also calls like fstat() will return proper information and mark the file as regular file. If you want sealing, you can specify MFD_ALLOW_SEALING. Otherwise, sealing is not supported (like on all other regular files).
Compared to O_TMPFILE, it does not require a tmpfs mount-point and is not subject to a filesystem size limit. It is still properly accounted to memcg limits, though, and to the same overcommit or no-overcommit accounting as all user memory.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Hugh Dickins <hughd@google.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Ryan Lortie <desrt@desrt.ca> Cc: Lennart Poettering <lennart@poettering.net> Cc: Daniel Mack <zonque@gmail.com> Cc: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
/openbmc/linux/mm/ |
H A D | shmem.c | diff 9183df25fe7b194563db3fec6dc3202a5855839c Fri Aug 08 16:25:29 CDT 2014 David Herrmann <dh.herrmann@gmail.com> shm: add memfd_create() syscall
memfd_create() is similar to mmap(MAP_ANON), but returns a file-descriptor that you can pass to mmap(). It can support sealing and avoids any connection to user-visible mount-points. Thus, it's not subject to quotas on mounted file-systems, but can be used like malloc()'ed memory, but with a file-descriptor to it.
memfd_create() returns the raw shmem file, so calls like ftruncate() can be used to modify the underlying inode. Also calls like fstat() will return proper information and mark the file as regular file. If you want sealing, you can specify MFD_ALLOW_SEALING. Otherwise, sealing is not supported (like on all other regular files).
Compared to O_TMPFILE, it does not require a tmpfs mount-point and is not subject to a filesystem size limit. It is still properly accounted to memcg limits, though, and to the same overcommit or no-overcommit accounting as all user memory.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Hugh Dickins <hughd@google.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Ryan Lortie <desrt@desrt.ca> Cc: Lennart Poettering <lennart@poettering.net> Cc: Daniel Mack <zonque@gmail.com> Cc: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|