android_kernel_google_msm/include
David Herrmann f47542dcc6 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.

Change-Id: Iaf959293e2c490523aeb46d56cc45b0e7bbe7bf5
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>
Signed-off-by: Angelo G. Del Regno <kholk11@gmail.com>
2020-03-01 11:35:55 +01:00
..
acpi
asm-generic asm-generic: add memfd_create system call to unistd.h 2020-03-01 11:35:54 +01:00
crypto Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
drm Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
keys KEYS: Permit in-place link replacement in keyring list 2016-10-29 23:12:12 +08:00
linux shm: add memfd_create() syscall 2020-03-01 11:35:55 +01:00
math-emu
media msm: vidc: Add support for Picture Order Count Type 2018-08-27 14:52:37 +00:00
misc
mtd
net netfilter updates for net-next (batch 3) 2019-01-03 13:59:01 +01:00
pcmcia
rdma
rxrpc
scsi
sound ASoC: msm: flush if prior and current backends rate not matching 2018-08-27 14:52:45 +00:00
target Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
trace Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
uapi/linux shm: add memfd_create() syscall 2020-03-01 11:35:55 +01:00
video remove compilation error by changing int to uint32_t 2018-08-27 14:52:44 +00:00
xen
Kbuild