github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/pkg/sentry/seccheck/metadata_arm64.go (about) 1 // Copyright 2022 The gVisor 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 //go:build arm64 16 // +build arm64 17 18 package seccheck 19 20 // archInit registers syscall trace points metadata. 21 // Keep them sorted by syscall number. 22 func archInit() { 23 addSyscallPoint(19, "eventfd2", nil) 24 addSyscallPoint(23, "dup", []FieldDesc{ 25 { 26 ID: FieldSyscallPath, 27 Name: "fd_path", 28 }, 29 }) 30 addSyscallPoint(24, "dup3", []FieldDesc{ 31 { 32 ID: FieldSyscallPath, 33 Name: "fd_path", 34 }, 35 }) 36 addSyscallPoint(25, "fcntl", []FieldDesc{ 37 { 38 ID: FieldSyscallPath, 39 Name: "fd_path", 40 }, 41 }) 42 43 addSyscallPoint(26, "inotify_init1", nil) 44 addSyscallPoint(27, "inotify_add_watch", []FieldDesc{ 45 { 46 ID: FieldSyscallPath, 47 Name: "fd_path", 48 }, 49 }) 50 addSyscallPoint(28, "inotify_rm_watch", []FieldDesc{ 51 { 52 ID: FieldSyscallPath, 53 Name: "fd_path", 54 }, 55 }) 56 addSyscallPoint(49, "chdir", nil) 57 addSyscallPoint(50, "fchdir", []FieldDesc{ 58 { 59 ID: FieldSyscallPath, 60 Name: "fd_path", 61 }, 62 }) 63 addSyscallPoint(51, "chroot", nil) 64 addSyscallPoint(56, "openat", []FieldDesc{ 65 { 66 ID: FieldSyscallPath, 67 Name: "fd_path", 68 }, 69 }) 70 addSyscallPoint(57, "close", []FieldDesc{ 71 { 72 ID: FieldSyscallPath, 73 Name: "fd_path", 74 }, 75 }) 76 addSyscallPoint(59, "pipe2", nil) 77 addSyscallPoint(63, "read", []FieldDesc{ 78 { 79 ID: FieldSyscallPath, 80 Name: "fd_path", 81 }, 82 }) 83 addSyscallPoint(64, "write", []FieldDesc{ 84 { 85 ID: FieldSyscallPath, 86 Name: "fd_path", 87 }, 88 }) 89 addSyscallPoint(65, "readv", []FieldDesc{ 90 { 91 ID: FieldSyscallPath, 92 Name: "fd_path", 93 }, 94 }) 95 addSyscallPoint(66, "writev", []FieldDesc{ 96 { 97 ID: FieldSyscallPath, 98 Name: "fd_path", 99 }, 100 }) 101 addSyscallPoint(67, "pread64", []FieldDesc{ 102 { 103 ID: FieldSyscallPath, 104 Name: "fd_path", 105 }, 106 }) 107 addSyscallPoint(68, "pwrite64", []FieldDesc{ 108 { 109 ID: FieldSyscallPath, 110 Name: "fd_path", 111 }, 112 }) 113 addSyscallPoint(69, "preadv", []FieldDesc{ 114 { 115 ID: FieldSyscallPath, 116 Name: "fd_path", 117 }, 118 }) 119 addSyscallPoint(70, "pwritev", []FieldDesc{ 120 { 121 ID: FieldSyscallPath, 122 Name: "fd_path", 123 }, 124 }) 125 addSyscallPoint(74, "signalfd4", []FieldDesc{ 126 { 127 ID: FieldSyscallPath, 128 Name: "fd_path", 129 }, 130 }) 131 addSyscallPoint(85, "timerfd_create", nil) 132 addSyscallPoint(86, "timerfd_settime", []FieldDesc{ 133 { 134 ID: FieldSyscallPath, 135 Name: "fd_path", 136 }, 137 }) 138 addSyscallPoint(87, "timerfd_gettime", []FieldDesc{ 139 { 140 ID: FieldSyscallPath, 141 Name: "fd_path", 142 }, 143 }) 144 addSyscallPoint(144, "setgid", nil) 145 addSyscallPoint(146, "setuid", nil) 146 addSyscallPoint(147, "setresuid", nil) 147 addSyscallPoint(149, "setresgid", nil) 148 addSyscallPoint(157, "setsid", nil) 149 addSyscallPoint(198, "socket", nil) 150 addSyscallPoint(199, "socketpair", nil) 151 addSyscallPoint(200, "bind", []FieldDesc{ 152 { 153 ID: FieldSyscallPath, 154 Name: "fd_path", 155 }, 156 }) 157 addSyscallPoint(202, "accept", []FieldDesc{ 158 { 159 ID: FieldSyscallPath, 160 Name: "fd_path", 161 }, 162 }) 163 addSyscallPoint(203, "connect", []FieldDesc{ 164 { 165 ID: FieldSyscallPath, 166 Name: "fd_path", 167 }, 168 }) 169 addSyscallPoint(220, "clone", nil) 170 addSyscallPoint(221, "execve", []FieldDesc{ 171 { 172 ID: FieldSyscallExecveEnvv, 173 Name: "envv", 174 }, 175 }) 176 addSyscallPoint(242, "accept4", []FieldDesc{ 177 { 178 ID: FieldSyscallPath, 179 Name: "fd_path", 180 }, 181 }) 182 addSyscallPoint(261, "prlimit64", nil) 183 addSyscallPoint(281, "execveat", []FieldDesc{ 184 { 185 ID: FieldSyscallPath, 186 Name: "fd_path", 187 }, 188 { 189 ID: FieldSyscallExecveEnvv, 190 Name: "envv", 191 }, 192 }) 193 addSyscallPoint(286, "preadv2", []FieldDesc{ 194 { 195 ID: FieldSyscallPath, 196 Name: "fd_path", 197 }, 198 }) 199 addSyscallPoint(287, "pwritev2", []FieldDesc{ 200 { 201 ID: FieldSyscallPath, 202 Name: "fd_path", 203 }, 204 }) 205 206 const lastSyscallInTable = 441 207 for i := 0; i <= lastSyscallInTable; i++ { 208 addRawSyscallPoint(uintptr(i)) 209 } 210 }