github.com/inspektor-gadget/inspektor-gadget@v0.28.1/pkg/utils/syscalls/syscalls_arm64.go (about) 1 // Copyright 2023 The Inspektor Gadget authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package syscalls 16 17 // This is updated to kernel 6.6-rc2 18 var syscallsNameToNumber = map[string]int{ 19 "accept": 202, 20 "accept4": 242, 21 "acct": 89, 22 "add_key": 217, 23 "adjtimex": 171, 24 "bind": 200, 25 "bpf": 280, 26 "brk": 214, 27 "cachestat": 451, 28 "capget": 90, 29 "capset": 91, 30 "chdir": 49, 31 "chroot": 51, 32 "clock_adjtime": 266, 33 "clock_getres": 114, 34 "clock_gettime": 113, 35 "clock_nanosleep": 115, 36 "clock_settime": 112, 37 "clone": 220, 38 "clone3": 435, 39 "close": 57, 40 "close_range": 436, 41 "connect": 203, 42 "copy_file_range": 285, 43 "delete_module": 106, 44 "dup": 23, 45 "dup3": 24, 46 "epoll_create1": 20, 47 "epoll_ctl": 21, 48 "epoll_pwait": 22, 49 "epoll_pwait2": 441, 50 "eventfd2": 19, 51 "execve": 221, 52 "execveat": 281, 53 "exit": 93, 54 "exit_group": 94, 55 "faccessat": 48, 56 "faccessat2": 439, 57 "fadvise64": 223, 58 "fallocate": 47, 59 "fanotify_init": 262, 60 "fanotify_mark": 263, 61 "fchdir": 50, 62 "fchmod": 52, 63 "fchmodat": 53, 64 "fchown": 55, 65 "fchownat": 54, 66 "fcntl": 25, 67 "fdatasync": 83, 68 "fgetxattr": 10, 69 "finit_module": 273, 70 "flistxattr": 13, 71 "flock": 32, 72 "fremovexattr": 16, 73 "fsconfig": 431, 74 "fsetxattr": 7, 75 "fsmount": 432, 76 "fsopen": 430, 77 "fspick": 433, 78 "fstat": 80, 79 "fstatfs": 44, 80 "fsync": 82, 81 "ftruncate": 46, 82 "futex": 98, 83 "futex_waitv": 449, 84 "get_mempolicy": 236, 85 "get_robust_list": 100, 86 "getcpu": 168, 87 "getcwd": 17, 88 "getdents64": 61, 89 "getegid": 177, 90 "geteuid": 175, 91 "getgid": 176, 92 "getgroups": 158, 93 "getitimer": 102, 94 "getpeername": 205, 95 "getpgid": 155, 96 "getpid": 172, 97 "getppid": 173, 98 "getpriority": 141, 99 "getrandom": 278, 100 "getresgid": 150, 101 "getresuid": 148, 102 "getrlimit": 163, 103 "getrusage": 165, 104 "getsid": 156, 105 "getsockname": 204, 106 "getsockopt": 209, 107 "gettid": 178, 108 "gettimeofday": 169, 109 "getuid": 174, 110 "getxattr": 8, 111 "init_module": 105, 112 "inotify_add_watch": 27, 113 "inotify_init1": 26, 114 "inotify_rm_watch": 28, 115 "io_cancel": 3, 116 "io_destroy": 1, 117 "io_getevents": 4, 118 "io_pgetevents": 292, 119 "io_setup": 0, 120 "io_submit": 2, 121 "io_uring_enter": 426, 122 "io_uring_register": 427, 123 "io_uring_setup": 425, 124 "ioctl": 29, 125 "ioprio_get": 31, 126 "ioprio_set": 30, 127 "kcmp": 272, 128 "kexec_file_load": 294, 129 "kexec_load": 104, 130 "keyctl": 219, 131 "kill": 129, 132 "landlock_add_rule": 445, 133 "landlock_create_ruleset": 444, 134 "landlock_restrict_self": 446, 135 "lgetxattr": 9, 136 "linkat": 37, 137 "listen": 201, 138 "listxattr": 11, 139 "llistxattr": 12, 140 "lookup_dcookie": 18, 141 "lremovexattr": 15, 142 "lseek": 62, 143 "lsetxattr": 6, 144 "madvise": 233, 145 "mbind": 235, 146 "membarrier": 283, 147 "memfd_create": 279, 148 "memfd_secret": 447, 149 "migrate_pages": 238, 150 "mincore": 232, 151 "mkdirat": 34, 152 "mknodat": 33, 153 "mlock": 228, 154 "mlock2": 284, 155 "mlockall": 230, 156 "mmap": 222, 157 "mount": 40, 158 "mount_setattr": 442, 159 "move_mount": 429, 160 "move_pages": 239, 161 "mprotect": 226, 162 "mq_getsetattr": 185, 163 "mq_notify": 184, 164 "mq_open": 180, 165 "mq_timedreceive": 183, 166 "mq_timedsend": 182, 167 "mq_unlink": 181, 168 "mremap": 216, 169 "msgctl": 187, 170 "msgget": 186, 171 "msgrcv": 188, 172 "msgsnd": 189, 173 "msync": 227, 174 "munlock": 229, 175 "munlockall": 231, 176 "munmap": 215, 177 "name_to_handle_at": 264, 178 "nanosleep": 101, 179 "newfstatat": 79, 180 "nfsservctl": 42, 181 "open_by_handle_at": 265, 182 "open_tree": 428, 183 "openat": 56, 184 "openat2": 437, 185 "perf_event_open": 241, 186 "personality": 92, 187 "pidfd_getfd": 438, 188 "pidfd_open": 434, 189 "pidfd_send_signal": 424, 190 "pipe2": 59, 191 "pivot_root": 41, 192 "pkey_alloc": 289, 193 "pkey_free": 290, 194 "pkey_mprotect": 288, 195 "ppoll": 73, 196 "prctl": 167, 197 "pread64": 67, 198 "preadv": 69, 199 "preadv2": 286, 200 "prlimit64": 261, 201 "process_madvise": 440, 202 "process_mrelease": 448, 203 "process_vm_readv": 270, 204 "process_vm_writev": 271, 205 "pselect6": 72, 206 "ptrace": 117, 207 "pwrite64": 68, 208 "pwritev": 70, 209 "pwritev2": 287, 210 "quotactl": 60, 211 "quotactl_fd": 443, 212 "read": 63, 213 "readahead": 213, 214 "readlinkat": 78, 215 "readv": 65, 216 "reboot": 142, 217 "recvfrom": 207, 218 "recvmmsg": 243, 219 "recvmsg": 212, 220 "remap_file_pages": 234, 221 "removexattr": 14, 222 "renameat": 38, 223 "renameat2": 276, 224 "request_key": 218, 225 "restart_syscall": 128, 226 "rseq": 293, 227 "rt_sigaction": 134, 228 "rt_sigpending": 136, 229 "rt_sigprocmask": 135, 230 "rt_sigqueueinfo": 138, 231 "rt_sigreturn": 139, 232 "rt_sigsuspend": 133, 233 "rt_sigtimedwait": 137, 234 "rt_tgsigqueueinfo": 240, 235 "sched_get_priority_max": 125, 236 "sched_get_priority_min": 126, 237 "sched_getaffinity": 123, 238 "sched_getattr": 275, 239 "sched_getparam": 121, 240 "sched_getscheduler": 120, 241 "sched_rr_get_interval": 127, 242 "sched_setaffinity": 122, 243 "sched_setattr": 274, 244 "sched_setparam": 118, 245 "sched_setscheduler": 119, 246 "sched_yield": 124, 247 "seccomp": 277, 248 "semctl": 191, 249 "semget": 190, 250 "semop": 193, 251 "semtimedop": 192, 252 "sendfile": 71, 253 "sendmmsg": 269, 254 "sendmsg": 211, 255 "sendto": 206, 256 "set_mempolicy": 237, 257 "set_mempolicy_home_node": 450, 258 "set_robust_list": 99, 259 "set_tid_address": 96, 260 "setdomainname": 162, 261 "setfsgid": 152, 262 "setfsuid": 151, 263 "setgid": 144, 264 "setgroups": 159, 265 "sethostname": 161, 266 "setitimer": 103, 267 "setns": 268, 268 "setpgid": 154, 269 "setpriority": 140, 270 "setregid": 143, 271 "setresgid": 149, 272 "setresuid": 147, 273 "setreuid": 145, 274 "setrlimit": 164, 275 "setsid": 157, 276 "setsockopt": 208, 277 "settimeofday": 170, 278 "setuid": 146, 279 "setxattr": 5, 280 "shmat": 196, 281 "shmctl": 195, 282 "shmdt": 197, 283 "shmget": 194, 284 "shutdown": 210, 285 "sigaltstack": 132, 286 "signalfd4": 74, 287 "socket": 198, 288 "socketpair": 199, 289 "splice": 76, 290 "statfs": 43, 291 "statx": 291, 292 "swapoff": 225, 293 "swapon": 224, 294 "symlinkat": 36, 295 "sync": 81, 296 "sync_file_range": 84, 297 "syncfs": 267, 298 "sysinfo": 179, 299 "syslog": 116, 300 "tee": 77, 301 "tgkill": 131, 302 "timer_create": 107, 303 "timer_delete": 111, 304 "timer_getoverrun": 109, 305 "timer_gettime": 108, 306 "timer_settime": 110, 307 "timerfd_create": 85, 308 "timerfd_gettime": 87, 309 "timerfd_settime": 86, 310 "times": 153, 311 "tkill": 130, 312 "truncate": 45, 313 "umask": 166, 314 "umount2": 39, 315 "uname": 160, 316 "unlinkat": 35, 317 "unshare": 97, 318 "userfaultfd": 282, 319 "utimensat": 88, 320 "vhangup": 58, 321 "vmsplice": 75, 322 "wait4": 260, 323 "waitid": 95, 324 "write": 64, 325 "writev": 66, 326 } 327 328 var syscallsNumberToName = map[int]string{ 329 202: "accept", 330 242: "accept4", 331 89: "acct", 332 217: "add_key", 333 171: "adjtimex", 334 200: "bind", 335 280: "bpf", 336 214: "brk", 337 451: "cachestat", 338 90: "capget", 339 91: "capset", 340 49: "chdir", 341 51: "chroot", 342 266: "clock_adjtime", 343 114: "clock_getres", 344 113: "clock_gettime", 345 115: "clock_nanosleep", 346 112: "clock_settime", 347 220: "clone", 348 435: "clone3", 349 57: "close", 350 436: "close_range", 351 203: "connect", 352 285: "copy_file_range", 353 106: "delete_module", 354 23: "dup", 355 24: "dup3", 356 20: "epoll_create1", 357 21: "epoll_ctl", 358 22: "epoll_pwait", 359 441: "epoll_pwait2", 360 19: "eventfd2", 361 221: "execve", 362 281: "execveat", 363 93: "exit", 364 94: "exit_group", 365 48: "faccessat", 366 439: "faccessat2", 367 223: "fadvise64", 368 47: "fallocate", 369 262: "fanotify_init", 370 263: "fanotify_mark", 371 50: "fchdir", 372 52: "fchmod", 373 53: "fchmodat", 374 55: "fchown", 375 54: "fchownat", 376 25: "fcntl", 377 83: "fdatasync", 378 10: "fgetxattr", 379 273: "finit_module", 380 13: "flistxattr", 381 32: "flock", 382 16: "fremovexattr", 383 431: "fsconfig", 384 7: "fsetxattr", 385 432: "fsmount", 386 430: "fsopen", 387 433: "fspick", 388 80: "fstat", 389 44: "fstatfs", 390 82: "fsync", 391 46: "ftruncate", 392 98: "futex", 393 449: "futex_waitv", 394 236: "get_mempolicy", 395 100: "get_robust_list", 396 168: "getcpu", 397 17: "getcwd", 398 61: "getdents64", 399 177: "getegid", 400 175: "geteuid", 401 176: "getgid", 402 158: "getgroups", 403 102: "getitimer", 404 205: "getpeername", 405 155: "getpgid", 406 172: "getpid", 407 173: "getppid", 408 141: "getpriority", 409 278: "getrandom", 410 150: "getresgid", 411 148: "getresuid", 412 163: "getrlimit", 413 165: "getrusage", 414 156: "getsid", 415 204: "getsockname", 416 209: "getsockopt", 417 178: "gettid", 418 169: "gettimeofday", 419 174: "getuid", 420 8: "getxattr", 421 105: "init_module", 422 27: "inotify_add_watch", 423 26: "inotify_init1", 424 28: "inotify_rm_watch", 425 3: "io_cancel", 426 1: "io_destroy", 427 4: "io_getevents", 428 292: "io_pgetevents", 429 0: "io_setup", 430 2: "io_submit", 431 426: "io_uring_enter", 432 427: "io_uring_register", 433 425: "io_uring_setup", 434 29: "ioctl", 435 31: "ioprio_get", 436 30: "ioprio_set", 437 272: "kcmp", 438 294: "kexec_file_load", 439 104: "kexec_load", 440 219: "keyctl", 441 129: "kill", 442 445: "landlock_add_rule", 443 444: "landlock_create_ruleset", 444 446: "landlock_restrict_self", 445 9: "lgetxattr", 446 37: "linkat", 447 201: "listen", 448 11: "listxattr", 449 12: "llistxattr", 450 18: "lookup_dcookie", 451 15: "lremovexattr", 452 62: "lseek", 453 6: "lsetxattr", 454 233: "madvise", 455 235: "mbind", 456 283: "membarrier", 457 279: "memfd_create", 458 447: "memfd_secret", 459 238: "migrate_pages", 460 232: "mincore", 461 34: "mkdirat", 462 33: "mknodat", 463 228: "mlock", 464 284: "mlock2", 465 230: "mlockall", 466 222: "mmap", 467 40: "mount", 468 442: "mount_setattr", 469 429: "move_mount", 470 239: "move_pages", 471 226: "mprotect", 472 185: "mq_getsetattr", 473 184: "mq_notify", 474 180: "mq_open", 475 183: "mq_timedreceive", 476 182: "mq_timedsend", 477 181: "mq_unlink", 478 216: "mremap", 479 187: "msgctl", 480 186: "msgget", 481 188: "msgrcv", 482 189: "msgsnd", 483 227: "msync", 484 229: "munlock", 485 231: "munlockall", 486 215: "munmap", 487 264: "name_to_handle_at", 488 101: "nanosleep", 489 79: "newfstatat", 490 42: "nfsservctl", 491 265: "open_by_handle_at", 492 428: "open_tree", 493 56: "openat", 494 437: "openat2", 495 241: "perf_event_open", 496 92: "personality", 497 438: "pidfd_getfd", 498 434: "pidfd_open", 499 424: "pidfd_send_signal", 500 59: "pipe2", 501 41: "pivot_root", 502 289: "pkey_alloc", 503 290: "pkey_free", 504 288: "pkey_mprotect", 505 73: "ppoll", 506 167: "prctl", 507 67: "pread64", 508 69: "preadv", 509 286: "preadv2", 510 261: "prlimit64", 511 440: "process_madvise", 512 448: "process_mrelease", 513 270: "process_vm_readv", 514 271: "process_vm_writev", 515 72: "pselect6", 516 117: "ptrace", 517 68: "pwrite64", 518 70: "pwritev", 519 287: "pwritev2", 520 60: "quotactl", 521 443: "quotactl_fd", 522 63: "read", 523 213: "readahead", 524 78: "readlinkat", 525 65: "readv", 526 142: "reboot", 527 207: "recvfrom", 528 243: "recvmmsg", 529 212: "recvmsg", 530 234: "remap_file_pages", 531 14: "removexattr", 532 38: "renameat", 533 276: "renameat2", 534 218: "request_key", 535 128: "restart_syscall", 536 293: "rseq", 537 134: "rt_sigaction", 538 136: "rt_sigpending", 539 135: "rt_sigprocmask", 540 138: "rt_sigqueueinfo", 541 139: "rt_sigreturn", 542 133: "rt_sigsuspend", 543 137: "rt_sigtimedwait", 544 240: "rt_tgsigqueueinfo", 545 125: "sched_get_priority_max", 546 126: "sched_get_priority_min", 547 123: "sched_getaffinity", 548 275: "sched_getattr", 549 121: "sched_getparam", 550 120: "sched_getscheduler", 551 127: "sched_rr_get_interval", 552 122: "sched_setaffinity", 553 274: "sched_setattr", 554 118: "sched_setparam", 555 119: "sched_setscheduler", 556 124: "sched_yield", 557 277: "seccomp", 558 191: "semctl", 559 190: "semget", 560 193: "semop", 561 192: "semtimedop", 562 71: "sendfile", 563 269: "sendmmsg", 564 211: "sendmsg", 565 206: "sendto", 566 237: "set_mempolicy", 567 450: "set_mempolicy_home_node", 568 99: "set_robust_list", 569 96: "set_tid_address", 570 162: "setdomainname", 571 152: "setfsgid", 572 151: "setfsuid", 573 144: "setgid", 574 159: "setgroups", 575 161: "sethostname", 576 103: "setitimer", 577 268: "setns", 578 154: "setpgid", 579 140: "setpriority", 580 143: "setregid", 581 149: "setresgid", 582 147: "setresuid", 583 145: "setreuid", 584 164: "setrlimit", 585 157: "setsid", 586 208: "setsockopt", 587 170: "settimeofday", 588 146: "setuid", 589 5: "setxattr", 590 196: "shmat", 591 195: "shmctl", 592 197: "shmdt", 593 194: "shmget", 594 210: "shutdown", 595 132: "sigaltstack", 596 74: "signalfd4", 597 198: "socket", 598 199: "socketpair", 599 76: "splice", 600 43: "statfs", 601 291: "statx", 602 225: "swapoff", 603 224: "swapon", 604 36: "symlinkat", 605 81: "sync", 606 84: "sync_file_range", 607 267: "syncfs", 608 179: "sysinfo", 609 116: "syslog", 610 77: "tee", 611 131: "tgkill", 612 107: "timer_create", 613 111: "timer_delete", 614 109: "timer_getoverrun", 615 108: "timer_gettime", 616 110: "timer_settime", 617 85: "timerfd_create", 618 87: "timerfd_gettime", 619 86: "timerfd_settime", 620 153: "times", 621 130: "tkill", 622 45: "truncate", 623 166: "umask", 624 39: "umount2", 625 160: "uname", 626 35: "unlinkat", 627 97: "unshare", 628 282: "userfaultfd", 629 88: "utimensat", 630 58: "vhangup", 631 75: "vmsplice", 632 260: "wait4", 633 95: "waitid", 634 64: "write", 635 66: "writev", 636 }