linux/include/uapi/linux/memfd.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _UAPI_LINUX_MEMFD_H
#define _UAPI_LINUX_MEMFD_H

#include <asm-generic/hugetlb_encode.h>

/* flags for memfd_create(2) (unsigned int) */
#define MFD_CLOEXEC
#define MFD_ALLOW_SEALING
#define MFD_HUGETLB
/* not executable and sealed to prevent changing to executable. */
#define MFD_NOEXEC_SEAL
/* executable */
#define MFD_EXEC

/*
 * Huge page size encoding when MFD_HUGETLB is specified, and a huge page
 * size other than the default is desired.  See hugetlb_encode.h.
 * All known huge page size encodings are provided here.  It is the
 * responsibility of the application to know which sizes are supported on
 * the running system.  See mmap(2) man page for details.
 */
#define MFD_HUGE_SHIFT
#define MFD_HUGE_MASK

#define MFD_HUGE_64KB
#define MFD_HUGE_512KB
#define MFD_HUGE_1MB
#define MFD_HUGE_2MB
#define MFD_HUGE_8MB
#define MFD_HUGE_16MB
#define MFD_HUGE_32MB
#define MFD_HUGE_256MB
#define MFD_HUGE_512MB
#define MFD_HUGE_1GB
#define MFD_HUGE_2GB
#define MFD_HUGE_16GB

#endif /* _UAPI_LINUX_MEMFD_H */