github.com/kubiko/snapd@v0.0.0-20201013125620-d4f3094d9ddf/cmd/snap-confine/README.syscalls (about)

     1  To get all the syscalls, grab all the linux-libc-dev packages for all the
     2  architectures (eg, amd64, arm64, armhf, i386, powerpc, ppc64el) and put then
     3  in a directory. Then:
     4  
     5  mkdir extracted
     6  for i in ./*deb ; do
     7      dpkg-deb -x $i ./extracted
     8  done
     9  
    10  for i in `find . -name "unistd*.h"|grep gnu` ; do egrep '^#define .*_NR_([a-z0-9_\-]*)' $i | awk '{print $2}' | sed 's/.*_NR_//' ; done|sort -u
    11  
    12  NOTE: syscall() isn't actually a syscall, it is a glibc wrapping to reference
    13  a syscall by number (therefore, it should be omitted from filter policy). ARM
    14  OABI did define this, but it has been obsoleted in EABI.
    15  
    16  For example, on Ubuntu 16.04 with the 4.4.0-16.32 Linux kernel, these are the
    17  syscalls:
    18  accept
    19  accept4
    20  access
    21  acct
    22  add_key
    23  adjtimex
    24  afs_syscall
    25  alarm
    26  arch_prctl
    27  arm_fadvise64_64
    28  arm_sync_file_range
    29  bdflush
    30  bind
    31  bpf
    32  break
    33  breakpoint
    34  brk
    35  cacheflush
    36  capget
    37  capset
    38  chdir
    39  chmod
    40  chown
    41  chown32
    42  chroot
    43  clock_adjtime
    44  clock_getres
    45  clock_gettime
    46  clock_nanosleep
    47  clock_settime
    48  clone
    49  close
    50  connect
    51  creat
    52  create_module
    53  delete_module
    54  dup
    55  dup2
    56  dup3
    57  epoll_create
    58  epoll_create1
    59  epoll_ctl
    60  epoll_ctl_old
    61  epoll_pwait
    62  epoll_wait
    63  epoll_wait_old
    64  eventfd
    65  eventfd2
    66  execve
    67  execveat
    68  exit
    69  exit_group
    70  faccessat
    71  fadvise64
    72  fadvise64_64
    73  fallocate
    74  fanotify_init
    75  fanotify_mark
    76  fchdir
    77  fchmod
    78  fchmodat
    79  fchown
    80  fchown32
    81  fchownat
    82  fcntl
    83  fcntl64
    84  fdatasync
    85  fgetxattr
    86  finit_module
    87  flistxattr
    88  flock
    89  fork
    90  fremovexattr
    91  fsetxattr
    92  fstat
    93  fstat64
    94  fstatat64
    95  fstatfs
    96  fstatfs64
    97  fsync
    98  ftime
    99  ftruncate
   100  ftruncate64
   101  futex
   102  futimesat
   103  getcpu
   104  getcwd
   105  getdents
   106  getdents64
   107  getegid
   108  getegid32
   109  geteuid
   110  geteuid32
   111  getgid
   112  getgid32
   113  getgroups
   114  getgroups32
   115  getitimer
   116  get_kernel_syms
   117  get_mempolicy
   118  getpeername
   119  getpgid
   120  getpgrp
   121  getpid
   122  getpmsg
   123  getppid
   124  getpriority
   125  getrandom
   126  getresgid
   127  getresgid32
   128  getresuid
   129  getresuid32
   130  getrlimit
   131  get_robust_list
   132  getrusage
   133  getsid
   134  getsockname
   135  getsockopt
   136  get_thread_area
   137  gettid
   138  gettimeofday
   139  getuid
   140  getuid32
   141  getxattr
   142  gtty
   143  idle
   144  init_module
   145  inotify_add_watch
   146  inotify_init
   147  inotify_init1
   148  inotify_rm_watch
   149  io_cancel
   150  ioctl
   151  io_destroy
   152  io_getevents
   153  ioperm
   154  iopl
   155  ioprio_get
   156  ioprio_set
   157  io_setup
   158  io_submit
   159  ipc
   160  kcmp
   161  kexec_file_load
   162  kexec_load
   163  keyctl
   164  kill
   165  lchown
   166  lchown32
   167  lgetxattr
   168  link
   169  linkat
   170  listen
   171  listxattr
   172  llistxattr
   173  _llseek
   174  lock
   175  lookup_dcookie
   176  lremovexattr
   177  lseek
   178  lsetxattr
   179  lstat
   180  lstat64
   181  madvise
   182  mbind
   183  membarrier
   184  memfd_create
   185  migrate_pages
   186  mincore
   187  mkdir
   188  mkdirat
   189  mknod
   190  mknodat
   191  mlock
   192  mlock2
   193  mlockall
   194  mmap
   195  mmap2
   196  modify_ldt
   197  mount
   198  move_pages
   199  mprotect
   200  mpx
   201  mq_getsetattr
   202  mq_notify
   203  mq_open
   204  mq_timedreceive
   205  mq_timedsend
   206  mq_unlink
   207  mremap
   208  msgctl
   209  msgget
   210  msgrcv
   211  msgsnd
   212  msync
   213  multiplexer
   214  munlock
   215  munlockall
   216  munmap
   217  name_to_handle_at
   218  nanosleep
   219  newfstatat
   220  _newselect
   221  nfsservctl
   222  nice
   223  oldfstat
   224  oldlstat
   225  oldolduname
   226  oldstat
   227  olduname
   228  open
   229  openat
   230  open_by_handle_at
   231  pause
   232  pciconfig_iobase
   233  pciconfig_read
   234  pciconfig_write
   235  perf_event_open
   236  personality
   237  pipe
   238  pipe2
   239  pivot_root
   240  poll
   241  ppoll
   242  prctl
   243  pread64
   244  preadv
   245  prlimit64
   246  process_vm_readv
   247  process_vm_writev
   248  prof
   249  profil
   250  pselect6
   251  ptrace
   252  putpmsg
   253  pwrite64
   254  pwritev
   255  query_module
   256  quotactl
   257  read
   258  readahead
   259  readdir
   260  readlink
   261  readlinkat
   262  readv
   263  reboot
   264  recv
   265  recvfrom
   266  recvmmsg
   267  recvmsg
   268  remap_file_pages
   269  removexattr
   270  rename
   271  renameat
   272  renameat2
   273  request_key
   274  restart_syscall
   275  rmdir
   276  rtas
   277  rt_sigaction
   278  rt_sigpending
   279  rt_sigprocmask
   280  rt_sigqueueinfo
   281  rt_sigreturn
   282  rt_sigsuspend
   283  rt_sigtimedwait
   284  rt_tgsigqueueinfo
   285  s390_pci_mmio_read
   286  s390_pci_mmio_write
   287  s390_runtime_instr
   288  sched_getaffinity
   289  sched_getattr
   290  sched_getparam
   291  sched_get_priority_max
   292  sched_get_priority_min
   293  sched_getscheduler
   294  sched_rr_get_interval
   295  sched_setaffinity
   296  sched_setattr
   297  sched_setparam
   298  sched_setscheduler
   299  sched_yield
   300  seccomp
   301  security
   302  select
   303  semctl
   304  semget
   305  semop
   306  semtimedop
   307  send
   308  sendfile
   309  sendfile64
   310  sendmmsg
   311  sendmsg
   312  sendto
   313  setdomainname
   314  setfsgid
   315  setfsgid32
   316  setfsuid
   317  setfsuid32
   318  setgid
   319  setgid32
   320  setgroups
   321  setgroups32
   322  sethostname
   323  setitimer
   324  set_mempolicy
   325  setns
   326  setpgid
   327  setpriority
   328  setregid
   329  setregid32
   330  setresgid
   331  setresgid32
   332  setresuid
   333  setresuid32
   334  setreuid
   335  setreuid32
   336  setrlimit
   337  set_robust_list
   338  setsid
   339  setsockopt
   340  set_thread_area
   341  set_tid_address
   342  settimeofday
   343  set_tls
   344  setuid
   345  setuid32
   346  setxattr
   347  sgetmask
   348  shmat
   349  shmctl
   350  shmdt
   351  shmget
   352  shutdown
   353  sigaction
   354  sigaltstack
   355  signal
   356  signalfd
   357  signalfd4
   358  sigpending
   359  sigprocmask
   360  sigreturn
   361  sigsuspend
   362  socket
   363  socketcall
   364  socketpair
   365  splice
   366  spu_create
   367  spu_run
   368  ssetmask
   369  stat
   370  stat64
   371  statfs
   372  statfs64
   373  stime
   374  stty
   375  subpage_prot
   376  swapcontext
   377  swapoff
   378  swapon
   379  switch_endian
   380  symlink
   381  symlinkat
   382  sync
   383  sync_file_range
   384  sync_file_range2
   385  syncfs
   386  syscall
   387  _sysctl
   388  sys_debug_setcontext
   389  sysfs
   390  sysinfo
   391  syslog
   392  tee
   393  tgkill
   394  time
   395  timer_create
   396  timer_delete
   397  timerfd
   398  timerfd_create
   399  timerfd_gettime
   400  timerfd_settime
   401  timer_getoverrun
   402  timer_gettime
   403  timer_settime
   404  times
   405  tkill
   406  truncate
   407  truncate64
   408  tuxcall
   409  ugetrlimit
   410  ulimit
   411  umask
   412  umount
   413  umount2
   414  uname
   415  unlink
   416  unlinkat
   417  unshare
   418  uselib
   419  userfaultfd
   420  usr26
   421  usr32
   422  ustat
   423  utime
   424  utimensat
   425  utimes
   426  vfork
   427  vhangup
   428  vm86
   429  vm86old
   430  vmsplice
   431  vserver
   432  wait4
   433  waitid
   434  waitpid
   435  write
   436  writev