android_kernel_samsung_msm8976/include/uapi
David Herrmann 10f3a4935d 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>
Signed-off-by: Angelo G. Del Regno <kholk11@gmail.com>
2020-10-08 05:52:36 -07:00
..
asm-generic allow O_TMPFILE to work with O_WRONLY 2018-12-03 11:52:37 +01:00
drm
linux shm: add memfd_create() syscall 2020-10-08 05:52:36 -07:00
media Import latest Samsung release 2017-04-18 03:43:52 +02:00
mtd
rdma
scsi BACKPORT: sg: relax 16 byte cdb restriction 2017-04-22 23:03:02 +02:00
sound ASoC: wcd9335: Add support to enable vbat feature 2015-08-14 06:25:40 -07:00
video
xen
Kbuild