runtime

package
v0.0.0-...-9ccd474 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERR_CONT_EXEC_EXECUTOR                 = 2
	ERR_EXEC_BRK                           = 3
	ERR_EXEC_PAGESIZE                      = 4
	ERR_EXEC_PDEATHSIG                     = 5
	ERR_EXEC_PERSONALITY_ADDR_NO_RANDOMIZE = 6
	ERR_EXEC_CLEAR_CAPS                    = 7
	ERR_EXEC_CLONE                         = 8
	ERR_EXEC_CLOSE                         = 9
	ERR_EXEC_SIGMASK                       = 10
	ERR_EXEC_SYSCONF_CLK_TCK               = 11
	ERR_EXEC_NO_NEW_PRIVS                  = 12
	ERR_EXEC_FCNTL_CLOEXEC                 = 13
	ERR_EXEC_FCNTL_GETFD                   = 14
	ERR_EXEC_SETRLIMIT_DATA                = 15
	ERR_EXEC_SETRLIMIT_NOFILE              = 16
	ERR_EXEC_SETRLIMIT_STACK               = 17
	ERR_EXEC_EPOLL_CREATE                  = 18
	ERR_EXEC_EPOLL_WAIT                    = 19
	ERR_EXEC_EPOLL_ADD                     = 20
	ERR_EXEC_EPOLL_MOD                     = 21
	ERR_EXEC_EPOLL_DEL                     = 22
	ERR_EXEC_RECVMMSG                      = 23
	ERR_EXEC_MSG_LEN                       = 24
	ERR_EXEC_MSG_CTRUNC                    = 25
	ERR_EXEC_OP                            = 26
	ERR_EXEC_ID_RANGE                      = 27
	ERR_EXEC_CMSG_OP_MISMATCH              = 28
	ERR_EXEC_CMSG_LEVEL                    = 29
	ERR_EXEC_CMSG_TYPE                     = 30
	ERR_EXEC_CMSG_LEN                      = 31
	ERR_EXEC_CMSG_NXTHDR                   = 32
	ERR_EXEC_CREATE_PROCESS_BAD_STATE      = 33
	ERR_EXEC_WAIT_PROCESS_BAD_STATE        = 34
	ERR_EXEC_SEND                          = 35
	ERR_EXEC_SEND_ALIGN                    = 36
	ERR_EXEC_POLL_OTHER_EVENTS             = 37
	ERR_EXEC_POLL_OTHER_ID                 = 38
	ERR_EXEC_KILL                          = 39
	ERR_EXEC_WAITPID                       = 40
	ERR_EXEC_PRCTL_NOT_DUMPABLE            = 41
	ERR_EXEC_PRLIMIT_CPU                   = 42
	ERR_EXEC_PROCSTAT_OPEN                 = 43
	ERR_EXEC_PROCSTAT_READ                 = 44
	ERR_EXEC_PROCSTAT_PARSE                = 45
	ERR_EXEC_FSTAT                         = 46
)
View Source
const (
	ERR_RT_READ                  = 4
	ERR_RT_READ8                 = 5
	ERR_RT_WRITE                 = 6
	ERR_RT_WRITE8                = 7
	ERR_RT_DEBUG                 = 8
	ERR_RT_DEBUG8                = 9
	ERR_RT_MPROTECT              = 10
	ERR_RT_MREMAP                = 11
	ERR_RT_CLOCK_GETTIME         = 12
	ERR_RT_PPOLL                 = 13
	ERR_EXECHILD_DUP2            = 14
	ERR_EXECHILD_EXEC_LOADER     = 15
	ERR_LOAD_PDEATHSIG           = 16
	ERR_LOAD_SETRLIMIT_NOFILE    = 17
	ERR_LOAD_SETRLIMIT_NPROC     = 18
	ERR_LOAD_PRCTL_NOT_DUMPABLE  = 19
	ERR_LOAD_PERSONALITY_DEFAULT = 20
	ERR_LOAD_READ_INFO           = 21
	ERR_LOAD_READ_TEXT           = 22
	ERR_LOAD_MAGIC_1             = 23
	ERR_LOAD_MAGIC_2             = 24
	ERR_LOAD_MMAP_VECTOR         = 25
	ERR_LOAD_MMAP_TEXT           = 26
	ERR_LOAD_MMAP_STACK          = 27
	ERR_LOAD_MMAP_HEAP           = 28
	ERR_LOAD_MPROTECT_VECTOR     = 29
	ERR_LOAD_MPROTECT_HEAP       = 30
	ERR_LOAD_MREMAP_HEAP         = 31
	ERR_LOAD_CLOSE_TEXT          = 32
	ERR_LOAD_CLOSE_STATE         = 33
	ERR_LOAD_MUNMAP_STACK        = 34
	ERR_LOAD_MUNMAP_LOADER       = 35
	ERR_LOAD_SIGACTION           = 36
	ERR_LOAD_SECCOMP             = 37
	ERR_LOAD_ARG_ENV             = 38
	ERR_LOAD_NO_VDSO             = 39
	ERR_LOAD_FCNTL_INPUT         = 40
	ERR_LOAD_FCNTL_OUTPUT        = 41
	ERR_LOAD_NO_CLOCK_GETTIME    = 42
	ERR_LOAD_CLOCK_GETTIME       = 43
)

Variables

View Source
var ExecutorErrors = [...]Error{
	{},
	{},

	{"ERR_CONT_EXEC_EXECUTOR", "runtime container", "failed to execute executor"},
	{"ERR_EXEC_BRK", "runtime executor", "brk call failed"},
	{"ERR_EXEC_PAGESIZE", "runtime executor", "sysconf PAGESIZE call failed"},
	{"ERR_EXEC_PDEATHSIG", "runtime executor", "failed to set process death signal"},
	{"ERR_EXEC_PERSONALITY_ADDR_NO_RANDOMIZE", "runtime executor", "failed to change personality to ADDR_NO_RANDOMIZE"},
	{"ERR_EXEC_CLEAR_CAPS", "runtime executor", "failed to clear capabilities"},
	{"ERR_EXEC_CLONE", "runtime executor", "clone call failed"},
	{"ERR_EXEC_CLOSE", "runtime executor", "file descriptor close error"},
	{"ERR_EXEC_SIGMASK", "runtime executor", "pthread_sigmask: failed to set mask"},
	{"ERR_EXEC_SYSCONF_CLK_TCK", "runtime executor", "sysconf CLK_TCK call failed"},
	{"ERR_EXEC_NO_NEW_PRIVS", "runtime executor", "prctl: failed to PR_SET_NO_NEW_PRIVS"},
	{"ERR_EXEC_FCNTL_CLOEXEC", "runtime executor", "fcntl: failed to add close-on-exec flag"},
	{"ERR_EXEC_FCNTL_GETFD", "runtime executor", "fcntl: failed to get file descriptor flags"},
	{"ERR_EXEC_SETRLIMIT_DATA", "runtime executor", "setrlimit: failed to set DATA limit"},
	{"ERR_EXEC_SETRLIMIT_NOFILE", "runtime executor", "setrlimit: failed to set NOFILE limit"},
	{"ERR_EXEC_SETRLIMIT_STACK", "runtime executor", "setrlimit: failed to set STACK limit"},
	{"ERR_EXEC_EPOLL_CREATE", "runtime executor", "epoll_create call failed"},
	{"ERR_EXEC_EPOLL_WAIT", "runtime executor", "epoll_wait call failed"},
	{"ERR_EXEC_EPOLL_ADD", "runtime executor", "epoll_ctl ADD call failed"},
	{"ERR_EXEC_EPOLL_MOD", "runtime executor", "epoll_ctl MOD call failed"},
	{"ERR_EXEC_EPOLL_DEL", "runtime executor", "epoll_ctl DEL call failed"},
	{"ERR_EXEC_RECVMMSG", "runtime executor", "recvmmsg call failed"},
	{"ERR_EXEC_MSG_LEN", "runtime executor", "received control message with unexpected length"},
	{"ERR_EXEC_MSG_CTRUNC", "runtime executor", "received truncated control message"},
	{"ERR_EXEC_OP", "runtime executor", "received message with unknown op type"},
	{"ERR_EXEC_ID_RANGE", "runtime executor", "process index out of bounds"},
	{"ERR_EXEC_CMSG_OP_MISMATCH", "runtime executor", "op type and control message expectation mismatch"},
	{"ERR_EXEC_CMSG_LEVEL", "runtime executor", "unexpected control message: not at socket level"},
	{"ERR_EXEC_CMSG_TYPE", "runtime executor", "unexpected control message type: no file descriptors"},
	{"ERR_EXEC_CMSG_LEN", "runtime executor", "unexpected control message length"},
	{"ERR_EXEC_CMSG_NXTHDR", "runtime executor", "multiple control message headers per recvmsg"},
	{"ERR_EXEC_CREATE_PROCESS_BAD_STATE", "runtime executor", "process index already in use"},
	{"ERR_EXEC_WAIT_PROCESS_BAD_STATE", "runtime executor", "event from pidfd with nonexistent process state"},
	{"ERR_EXEC_SEND", "runtime executor", "send call failed"},
	{"ERR_EXEC_SEND_ALIGN", "runtime executor", "sent unexpected number of bytes"},
	{"ERR_EXEC_POLL_OTHER_EVENTS", "runtime executor", "unexpected poll events"},
	{"ERR_EXEC_POLL_OTHER_ID", "runtime executor", "unknown poll event data"},
	{"ERR_EXEC_KILL", "runtime executor", "kill call failed"},
	{"ERR_EXEC_WAITPID", "runtime reaper", "waitpid call failed"},
	{"ERR_EXEC_PRCTL_NOT_DUMPABLE", "runtime executor", "prctl: failed to set not dumpable"},
	{"ERR_EXEC_PRLIMIT_CPU", "runtime executor", "prlimit CPU call failed"},
	{"ERR_EXEC_PROCSTAT_OPEN", "runtime executor", "failed to open /proc/<pid>/stat"},
	{"ERR_EXEC_PROCSTAT_READ", "runtime executor", "failed to read /proc/<pid>/stat"},
	{"ERR_EXEC_PROCSTAT_PARSE", "runtime executor", "/proc/<pid>/stat parse error"},
	{"ERR_EXEC_FSTAT", "runtime executor", "fstat call failed"},
}
View Source
var ProcessErrors = [...]Error{
	{},
	{},
	{},
	{},

	{"ERR_RT_READ", "process runtime", "read call failed"},
	{"ERR_RT_READ8", "process runtime", "failed to read 8 bytes at once"},
	{"ERR_RT_WRITE", "process runtime", "write call failed"},
	{"ERR_RT_WRITE8", "process runtime", "failed to write 8 bytes at once"},
	{"ERR_RT_DEBUG", "process runtime", "debug: write call failed"},
	{"ERR_RT_DEBUG8", "process runtime", "debug: failed to write 8 bytes at once"},
	{"ERR_RT_MPROTECT", "process runtime", "mprotect call failed"},
	{"ERR_RT_MREMAP", "process runtime", "mremap call failed"},
	{"ERR_RT_CLOCK_GETTIME", "process runtime", "clock_gettime call failed"},
	{"ERR_RT_PPOLL", "process runtime", "ppoll call failed"},
	{"ERR_EXECHILD_DUP2", "process executor", "child: dup2 call failed"},
	{"ERR_EXECHILD_EXEC_LOADER", "process executor", "child: failed to execute loader"},
	{"ERR_LOAD_PDEATHSIG", "process loader", "failed to set process death signal"},
	{"ERR_LOAD_SETRLIMIT_NOFILE", "process loader", "child: setrlimit: failed to set NOFILE limit"},
	{"ERR_LOAD_SETRLIMIT_NPROC", "process loader", "child: setrlimit: failed to set NPROC limit"},
	{"ERR_LOAD_PRCTL_NOT_DUMPABLE", "process loader", "prctl: failed to set not dumpable"},
	{"ERR_LOAD_PERSONALITY_DEFAULT", "process loader", "failed to set default personality"},
	{"ERR_LOAD_READ_INFO", "process loader", "failed to read image info from input fd"},
	{"ERR_LOAD_READ_TEXT", "process loader", "failed to read text section of image"},
	{"ERR_LOAD_MAGIC_1", "process loader", "magic number #1 mismatch"},
	{"ERR_LOAD_MAGIC_2", "process loader", "magic number #2 mismatch"},
	{"ERR_LOAD_MMAP_VECTOR", "process loader", "failed to allocate import vector via mmap"},
	{"ERR_LOAD_MMAP_TEXT", "process loader", "failed to mmap text section of image"},
	{"ERR_LOAD_MMAP_STACK", "process loader", "failed to mmap stack section of image"},
	{"ERR_LOAD_MMAP_HEAP", "process loader", "failed to mmap globals/memory section of image"},
	{"ERR_LOAD_MPROTECT_VECTOR", "process loader", "mprotect: import vector write-protection failed"},
	{"ERR_LOAD_MPROTECT_HEAP", "process loader", "mprotect: globals/memory protection failed"},
	{"ERR_LOAD_MREMAP_HEAP", "process loader", "failed to mremap globals/memory section of image"},
	{"ERR_LOAD_CLOSE_TEXT", "process loader", "failed to close program text fd"},
	{"ERR_LOAD_CLOSE_STATE", "process loader", "failed to close program state fd"},
	{"ERR_LOAD_MUNMAP_STACK", "process loader", "failed to munmap initial stack"},
	{"ERR_LOAD_MUNMAP_LOADER", "process loader", "failed to munmap loader .text and .rodata"},
	{"ERR_LOAD_SIGACTION", "process loader", "sigaction call failed"},
	{"ERR_LOAD_SECCOMP", "process loader", "seccomp call failed"},
	{"ERR_LOAD_ARG_ENV", "process loader", "loader executed with wrong number of arguments or environment variables"},
	{"ERR_LOAD_NO_VDSO", "process loader", "vdso address not found in auxiliary vector"},
	{"ERR_LOAD_FCNTL_INPUT", "process loader", "failed to set input file flags"},
	{"ERR_LOAD_FCNTL_OUTPUT", "process loader", "failed to set output file flags"},
	{"ERR_LOAD_NO_CLOCK_GETTIME", "process loader", "clock_gettime not found in vDSO ELF"},
	{"ERR_LOAD_CLOCK_GETTIME", "process loader", "clock_gettime call failed"},
}

Functions

func ExecutorError

func ExecutorError(code int) error

func ProcessError

func ProcessError(code int) error

Types

type Error

type Error struct {
	Define string
	Subsys string
	Text   string
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Subsystem

func (e *Error) Subsystem() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL