Documentation
¶
Overview ¶
msyscall is a package for the raw syscall handling for memfd_create and related syscalls. Used by github.com/justincormack/go-memfd
Index ¶
Constants ¶
View Source
const ( MFD_CLOEXEC uint = 1 MFD_ALLOW_SEALING uint = 2 F_ADD_SEALS int = (f_LINUX_SPECIFIC_BASE + 9) F_GET_SEALS int = (f_LINUX_SPECIFIC_BASE + 10) F_SEAL_SEAL int = 0x0001 F_SEAL_SHRINK int = 0x0002 F_SEAL_GROW int = 0x0004 F_SEAL_WRITE int = 0x0008 )
Linux kernel constants
View Source
const ( // SYS_FCNTL is the fcntl syscall to use for this architecture SYS_FCNTL = syscall.SYS_FCNTL // SYS_MEMFD_CREATE is the syscall number for this architecture SYS_MEMFD_CREATE = 319 )
Variables ¶
This section is empty.
Functions ¶
func FcntlCloexec ¶
FcntlCloexec clears the cloexec flag (0 arg) or sets it (1), useful just before we exec another process.
func FcntlSeals ¶
FcntlSeals calls the raw fcntl syscall to get the current seals it will return EINVAL if the file does not support sealing
func FcntlSetSeals ¶
FcntlSetSeals calls the raw fcntl syscall to set the specified seals it will return EINVAL if the file does not support sealing, or an error if already sealed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.