Linux-Seccomp

 view release on metacpan or  search on metacpan

libseccomp/src/arch-x86-syscalls.c  view on Meta::CPAN

/**
 * Enhanced Seccomp x86 Syscall Table
 *
 * Copyright (c) 2012 Red Hat <pmoore@redhat.com>
 * Author: Paul Moore <paul@paul-moore.com>
 */

/*
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of version 2.1 of the GNU Lesser General Public License as
 * published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, see <http://www.gnu.org/licenses>.
 */

#include <string.h>

#include <seccomp.h>

#include "arch.h"
#include "arch-x86.h"

/* NOTE: based on Linux 4.5-rc4 */
const struct arch_syscall_def x86_syscall_table[] = { \
	{ "_llseek", 140 },
	{ "_newselect", 142 },
	{ "_sysctl", 149 },
	{ "accept", __PNR_accept },
	{ "accept4", 364 },
	{ "access", 33 },
	{ "acct", 51 },
	{ "add_key", 286 },
	{ "adjtimex", 124 },
	{ "afs_syscall", 137 },
	{ "alarm", 27 },
	{ "arm_fadvise64_64", __PNR_arm_fadvise64_64 },
	{ "arm_sync_file_range", __PNR_arm_sync_file_range },
	{ "arch_prctl", __PNR_arch_prctl },
	{ "bdflush", 134 },
	{ "bind", 361 },
	{ "bpf", 357 },
	{ "break", 17 },
	{ "breakpoint", __PNR_breakpoint },
	{ "brk", 45 },
	{ "cachectl", __PNR_cachectl },
	{ "cacheflush", __PNR_cacheflush },
	{ "capget", 184 },
	{ "capset", 185 },
	{ "chdir", 12 },
	{ "chmod", 15 },
	{ "chown", 182 },
	{ "chown32", 212 },
	{ "chroot", 61 },
	{ "clock_adjtime", 343 },
	{ "clock_getres", 266 },
	{ "clock_gettime", 265 },
	{ "clock_nanosleep", 267 },
	{ "clock_settime", 264 },
	{ "clone", 120 },
	{ "close", 6 },
	{ "connect", 362 },
	{ "copy_file_range", 377 },
	{ "creat", 8 },
	{ "create_module", 127 },
	{ "delete_module", 129 },
	{ "dup", 41 },
	{ "dup2", 63 },
	{ "dup3", 330 },
	{ "epoll_create", 254 },
	{ "epoll_create1", 329 },
	{ "epoll_ctl", 255 },
	{ "epoll_ctl_old", __PNR_epoll_ctl_old },
	{ "epoll_pwait", 319 },
	{ "epoll_wait", 256 },
	{ "epoll_wait_old", __PNR_epoll_wait_old },
	{ "eventfd", 323 },
	{ "eventfd2", 328 },
	{ "execve", 11 },
	{ "execveat", 358 },
	{ "exit", 1 },
	{ "exit_group", 252 },
	{ "faccessat", 307 },
	{ "fadvise64", 250 },
	{ "fadvise64_64", 272 },
	{ "fallocate", 324 },
	{ "fanotify_init", 338 },
	{ "fanotify_mark", 339 },
	{ "fchdir", 133 },
	{ "fchmod", 94 },
	{ "fchmodat", 306 },
	{ "fchown", 95 },
	{ "fchown32", 207 },
	{ "fchownat", 298 },
	{ "fcntl", 55 },
	{ "fcntl64", 221 },
	{ "fdatasync", 148 },
	{ "fgetxattr", 231 },
	{ "finit_module", 350 },
	{ "flistxattr", 234 },
	{ "flock", 143 },
	{ "fork", 2 },
	{ "fremovexattr", 237 },
	{ "fsetxattr", 228 },
	{ "fstat", 108 },
	{ "fstat64", 197 },
	{ "fstatat64", 300 },
	{ "fstatfs", 100 },
	{ "fstatfs64", 269 },
	{ "fsync", 118 },
	{ "ftime", 35 },
	{ "ftruncate", 93 },
	{ "ftruncate64", 194 },
	{ "futex", 240 },
	{ "futimesat", 299 },
	{ "get_kernel_syms", 130 },
	{ "get_mempolicy", 275 },
	{ "get_robust_list", 312 },
	{ "get_thread_area", 244 },
	{ "getcpu", 318 },
	{ "getcwd", 183 },
	{ "getdents", 141 },
	{ "getdents64", 220 },
	{ "getegid", 50 },
	{ "getegid32", 202 },
	{ "geteuid", 49 },
	{ "geteuid32", 201 },
	{ "getgid", 47 },
	{ "getgid32", 200 },
	{ "getgroups", 80 },
	{ "getgroups32", 205 },
	{ "getitimer", 105 },
	{ "getpeername", 368 },
	{ "getpgid", 132 },
	{ "getpgrp", 65 },
	{ "getpid", 20 },
	{ "getpmsg", 188 },
	{ "getppid", 64 },
	{ "getpriority", 96 },
	{ "getrandom", 355 },
	{ "getresgid", 171 },
	{ "getresgid32", 211 },
	{ "getresuid", 165 },
	{ "getresuid32", 209 },
	{ "getrlimit", 76 },
	{ "getrusage", 77 },
	{ "getsid", 147 },
	{ "getsockname", 367 },
	{ "getsockopt", 365 },
	{ "gettid", 224 },
	{ "gettimeofday", 78 },
	{ "getuid", 24 },
	{ "getuid32", 199 },
	{ "getxattr", 229 },
	{ "gtty", 32 },
	{ "idle", 112 },
	{ "init_module", 128 },
	{ "inotify_add_watch", 292 },
	{ "inotify_init", 291 },
	{ "inotify_init1", 332 },
	{ "inotify_rm_watch", 293 },
	{ "io_cancel", 249 },
	{ "io_destroy", 246 },
	{ "io_getevents", 247 },
	{ "io_setup", 245 },
	{ "io_submit", 248 },
	{ "ioctl", 54 },
	{ "ioperm", 101 },
	{ "iopl", 110 },
	{ "ioprio_get", 290 },
	{ "ioprio_set", 289 },
	{ "ipc", 117 },
	{ "kcmp", 349 },
	{ "kexec_file_load", __PNR_kexec_file_load },
	{ "kexec_load", 283 },
	{ "keyctl", 288 },
	{ "kill", 37 },
	{ "lchown", 16 },
	{ "lchown32", 198 },
	{ "lgetxattr", 230 },
	{ "link", 9 },
	{ "linkat", 303 },
	{ "listen", 363 },
	{ "listxattr", 232 },
	{ "llistxattr", 233 },
	{ "lock", 53 },
	{ "lookup_dcookie", 253 },
	{ "lremovexattr", 236 },
	{ "lseek", 19 },
	{ "lsetxattr", 227 },
	{ "lstat", 107 },
	{ "lstat64", 196 },
	{ "madvise", 219 },
	{ "mbind", 274 },
	{ "membarrier", 375 },
	{ "memfd_create", 356 },
	{ "migrate_pages", 294 },
	{ "mincore", 218 },
	{ "mkdir", 39 },
	{ "mkdirat", 296 },
	{ "mknod", 14 },
	{ "mknodat", 297 },
	{ "mlock", 150 },
	{ "mlock2", 376 },
	{ "mlockall", 152 },
	{ "mmap", 90 },
	{ "mmap2", 192 },
	{ "modify_ldt", 123 },
	{ "mount", 21 },
	{ "move_pages", 317 },
	{ "mprotect", 125 },
	{ "mpx", 56 },
	{ "mq_getsetattr", 282 },
	{ "mq_notify", 281 },
	{ "mq_open", 277 },
	{ "mq_timedreceive", 280 },
	{ "mq_timedsend", 279 },
	{ "mq_unlink", 278 },
	{ "mremap", 163 },
	{ "msgctl", __PNR_msgctl },
	{ "msgget", __PNR_msgget },
	{ "msgrcv", __PNR_msgrcv },
	{ "msgsnd", __PNR_msgsnd },
	{ "msync", 144 },
	{ "multiplexer", __PNR_multiplexer },
	{ "munlock", 151 },
	{ "munlockall", 153 },
	{ "munmap", 91 },
	{ "name_to_handle_at", 341 },
	{ "nanosleep", 162 },
	{ "newfstatat", __PNR_newfstatat },
	{ "nfsservctl", 169 },
	{ "nice", 34 },
	{ "oldfstat", 28 },
	{ "oldlstat", 84 },
	{ "oldolduname", 59 },
	{ "oldstat", 18 },
	{ "olduname", 109 },
	{ "oldwait4", __PNR_oldwait4 },



( run in 1.104 second using v1.01-cache-2.11-cpan-71847e10f99 )