github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/openbsd/sysctl.txt (about) 1 # Copyright 2020 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 include <sys/types.h> 5 include <sys/ucred.h> 6 include <sys/mount.h> 7 include <sys/socket.h> 8 include <sys/sysctl.h> 9 include <ddb/db_var.h> 10 11 # CPU_CONSDEV 12 # XXX can includes be made conditional based on the architecture? 13 include <amd64/cpu.h> 14 15 sysctl$ddb(name ptr[in, ctl_ddb], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 16 sysctl$fs(name ptr[in, ctl_fs], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 17 sysctl$hw(name ptr[in, ctl_hw], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 18 sysctl$kern(name ptr[in, ctl_kern], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 19 sysctl$machdep(name ptr[in, ctl_machdep], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 20 # XXX sysctl$net_inet_route not supported? 21 sysctl$net_inet_ah(name ptr[in, ctl_net_inet_ah], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 22 # XXX sysctl$net_inet_bpf not supported? 23 sysctl$net_inet_carp(name ptr[in, ctl_net_inet_carp], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 24 sysctl$net_inet_divert(name ptr[in, ctl_net_inet_divert], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 25 sysctl$net_inet_esp(name ptr[in, ctl_net_inet_esp], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 26 sysctl$net_inet_etherip(name ptr[in, ctl_net_inet_etherip], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 27 sysctl$net_inet_gre(name ptr[in, ctl_net_inet_gre], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 28 sysctl$net_inet_icmp(name ptr[in, ctl_net_inet_icmp], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 29 sysctl$net_inet_ip(name ptr[in, ctl_net_inet_ip], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 30 sysctl$net_inet_ipcomp(name ptr[in, ctl_net_inet_ipcomp], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 31 sysctl$net_inet_ipip(name ptr[in, ctl_net_inet_ipip], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 32 sysctl$net_inet_tcp(name ptr[in, ctl_net_inet_tcp], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 33 sysctl$net_inet_udp(name ptr[in, ctl_net_inet_udp], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 34 sysctl$net_inet6_icmp6(name ptr[in, ctl_net_inet6_icmp6], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 35 sysctl$net_inet6_ip6(name ptr[in, ctl_net_inet6_ip6], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 36 # XXX sysctl$net_key not supported? 37 sysctl$net_mpls(name ptr[in, ctl_net_mpls], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 38 sysctl$net_pipex(name ptr[in, ctl_net_pipex], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 39 sysctl$vfs_ffs(name ptr[in, ctl_vfs_ffs], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 40 sysctl$vfs_nfs(name ptr[in, ctl_vfs_nfs], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 41 sysctl$vfs_fuse(name ptr[in, ctl_vfs_fuse], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 42 sysctl$vm(name ptr[in, ctl_vm], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 43 sysctl$vm_swapencrypt(name ptr[in, ctl_vm_swapencrypt], namelen bytesize4[name], oldp buffer[inout], oldlenp ptr[inout, len[oldp, int64]], newp buffer[in], newlen len[newp]) 44 45 ctl_ddb { 46 n1 const[CTL_DDB, int32] 47 n2 flags[ctl_ddb_flags, int32] 48 } 49 50 ctl_ddb_flags = DBCTL_CONSOLE, DBCTL_LOG, DBCTL_MAXLINE, DBCTL_MAXWIDTH, DBCTL_PANIC, DBCTL_RADIX, DBCTL_TABSTOP, DBCTL_TRIGGER 51 52 ctl_fs { 53 n1 const[CTL_FS, int32] 54 n2 flags[ctl_fs_flags, int32] 55 } 56 57 ctl_fs_flags = FS_POSIX_SETUID 58 59 ctl_hw { 60 n1 const[CTL_HW, int32] 61 n2 flags[ctl_hw_flags, int32] 62 } 63 64 ctl_hw_flags = HW_ALLOWPOWERDOWN, HW_BYTEORDER, HW_CPUSPEED, HW_DISKCOUNT, HW_DISKNAMES, HW_DISKSTATS, HW_MACHINE, HW_MODEL, HW_NCPU, HW_NCPUFOUND, HW_NCPUONLINE, HW_PAGESIZE, HW_PERFPOLICY, HW_PHYSMEM, HW_PHYSMEM64, HW_PRODUCT, HW_SENSORS, HW_SETPERF, HW_SMT, HW_USERMEM, HW_USERMEM64, HW_UUID, HW_VENDOR, HW_VERSION 65 66 ctl_kern { 67 n1 const[CTL_KERN, int32] 68 n2 flags[ctl_kern_flags, int32] 69 } 70 71 ctl_kern_flags = KERN_ALLOWDT, KERN_ALLOWKMEM, KERN_ARGMAX, KERN_AUDIO, KERN_BOOTTIME, KERN_CACHEPCT, KERN_CCPU, KERN_CLOCKRATE, KERN_CONSDEV, KERN_CPTIME, KERN_CPTIME2, KERN_CPUSTATS, KERN_DOMAINNAME, KERN_FILE, KERN_FORKSTAT, KERN_FSCALE, KERN_FSYNC, KERN_GLOBAL_PTRACE, KERN_HOSTID, KERN_HOSTNAME, KERN_INTRCNT, KERN_JOB_CONTROL, KERN_MALLOCSTATS, KERN_MAXCLUSTERS, KERN_MAXFILES, KERN_MAXLOCKSPERUID, KERN_MAXPARTITIONS, KERN_MAXPROC, KERN_MAXTHREAD, KERN_MAXVNODES, KERN_MBSTAT, KERN_MSGBUF, KERN_MSGBUFSIZE, KERN_NCHSTATS, KERN_NFILES, KERN_NGROUPS, KERN_NOSUIDCOREDUMP, KERN_NPROCS, KERN_NTHREADS, KERN_NUMVNODES, KERN_OSRELEASE, KERN_OSREV, KERN_OSTYPE, KERN_OSVERSION, KERN_PFSTATUS, KERN_POOL_DEBUG, KERN_POSIX1, KERN_PROC, KERN_PROC_ARGS, KERN_PROC_CWD, KERN_PROC_NOBROADCASTKILL, KERN_PROC_VMMAP, KERN_PROF, KERN_RAWPARTITION, KERN_SAVED_IDS, KERN_SECURELVL, KERN_SEMINFO, KERN_SHMINFO, KERN_SOMAXCONN, KERN_SOMINCONN, KERN_SPLASSERT, KERN_STACKGAPRANDOM, KERN_SYSVIPC_INFO, KERN_SYSVMSG, KERN_SYSVSEM, KERN_SYSVSHM, KERN_TIMECOUNTER, KERN_TTY, KERN_TTYCOUNT, KERN_UTC_OFFSET, KERN_VERSION, KERN_WATCHDOG, KERN_WITNESS, KERN_WXABORT 72 73 ctl_machdep { 74 n1 const[CTL_MACHDEP, int32] 75 n2 flags[ctl_machdep_flags, int32] 76 } 77 78 ctl_machdep_flags = CPU_CONSDEV 79 80 ctl_net_inet_ah { 81 n1 const[CTL_NET, int32] 82 n2 const[PF_INET, int32] 83 # CTL_IPPROTO_NAMES 84 n3 const[51, int32] 85 n4 flags[ctl_net_inet_ah_flags, int32] 86 } 87 88 # AHCTL_NAMES = enable, stats 89 ctl_net_inet_ah_flags = 1, 2 90 91 ctl_net_inet_carp { 92 n1 const[CTL_NET, int32] 93 n2 const[PF_INET, int32] 94 # CTL_IPPROTO_NAMES 95 n3 const[112, int32] 96 n4 flags[ctl_net_inet_carp_flags, int32] 97 } 98 99 # CARPCTL_NAMES = allow, preempt, log, stats 100 ctl_net_inet_carp_flags = 1, 2, 3, 4 101 102 ctl_net_inet_divert { 103 n1 const[CTL_NET, int32] 104 n2 const[PF_INET, int32] 105 # CTL_IPPROTO_NAMES 106 n3 const[258, int32] 107 n4 flags[ctl_net_inet_divert_flags, int32] 108 } 109 110 # DIVERTCTL_NAMES = recvspace, sendspace, stats 111 ctl_net_inet_divert_flags = 1, 2, 3 112 113 ctl_net_inet_esp { 114 n1 const[CTL_NET, int32] 115 n2 const[PF_INET, int32] 116 # CTL_IPPROTO_NAMES 117 n3 const[50, int32] 118 n4 flags[ctl_net_inet_esp_flags, int32] 119 } 120 121 # ESPCTL_NAMES = enable, udpencap, udpencap_port, stats 122 ctl_net_inet_esp_flags = 1, 2, 3, 4 123 124 ctl_net_inet_etherip { 125 n1 const[CTL_NET, int32] 126 n2 const[PF_INET, int32] 127 # CTL_IPPROTO_NAMES 128 n3 const[97, int32] 129 n4 flags[ctl_net_inet_etherip_flags, int32] 130 } 131 132 # ETHERIPCTL_NAMES = allow, stats 133 ctl_net_inet_etherip_flags = 1, 2 134 135 ctl_net_inet_gre { 136 n1 const[CTL_NET, int32] 137 n2 const[PF_INET, int32] 138 # CTL_IPPROTO_NAMES 139 n3 const[47, int32] 140 n4 flags[ctl_net_inet_gre_flags, int32] 141 } 142 143 # GRECTL_NAMES = allow, wccp 144 ctl_net_inet_gre_flags = 1, 2 145 146 ctl_net_inet_icmp { 147 n1 const[CTL_NET, int32] 148 n2 const[PF_INET, int32] 149 # CTL_IPPROTO_NAMES 150 n3 const[1, int32] 151 n4 flags[ctl_net_inet_icmp_flags, int32] 152 } 153 154 # ICMPCTL_NAMES = maskrepl, bmcastecho, errppslimit, rediraccept, redirtimeout, tstamprepl, stats 155 ctl_net_inet_icmp_flags = 1, 2, 3, 4, 5, 6, 7 156 157 ctl_net_inet_ip { 158 n1 const[CTL_NET, int32] 159 n2 const[PF_INET, int32] 160 # CTL_IPPROTO_NAMES 161 n3 const[0, int32] 162 n4 flags[ctl_net_inet_ip_flags, int32] 163 } 164 165 # IPCTL_NAMES = forwarding, redirect, ttl, sourceroute, directed-broadcast, portfirst, portlast, porthifirst, porthilast, maxqueue, encdebug, ipsecstat, ipsec-expire-acquire, ipsec-invalid-life, ipsec-pfs, ipsec-soft-allocs, ipsec-allocs, ipsec-soft-bytes, ipsec-bytes, ipsec-timeout, ipsec-soft-timeout, ipsec-soft-firstuse, ipsec-firstuse, ipsec-enc-alg, ipsec-auth-alg, mtudisc, mtudisctimeout, ipsec-comp-alg, ifq, mforwarding, multipath, stats, mrtproto, mrtstats, arpqueued, mrtmfc, mrtvif, arptimeout, arpdown, arpq 166 ctl_net_inet_ip_flags = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 167 168 ctl_net_inet_ipcomp { 169 n1 const[CTL_NET, int32] 170 n2 const[PF_INET, int32] 171 # CTL_IPPROTO_NAMES 172 n3 const[108, int32] 173 n4 flags[ctl_net_inet_ipcomp_flags, int32] 174 } 175 176 # IPCOMPCTL_NAMES = enable 177 ctl_net_inet_ipcomp_flags = 1 178 179 ctl_net_inet_ipip { 180 n1 const[CTL_NET, int32] 181 n2 const[PF_INET, int32] 182 # CTL_IPPROTO_NAMES 183 n3 const[4, int32] 184 n4 flags[ctl_net_inet_ipip_flags, int32] 185 } 186 187 # IPIPCTL_NAMES = allow 188 ctl_net_inet_ipip_flags = 1 189 190 ctl_net_inet_tcp { 191 n1 const[CTL_NET, int32] 192 n2 const[PF_INET, int32] 193 # CTL_IPPROTO_NAMES 194 n3 const[6, int32] 195 n4 flags[ctl_net_inet_tcp_flags, int32] 196 } 197 198 # IPIPCTL_NAMES = rfc1323, keepinittime, keepidle, keepintvl, slowhz, baddynamic, NULL, NULL, ident, sack, mssdflt, rstppslimit, ackonpush, ecn, syncachelimit, synbucketlimit, rfc3390, reasslimit, drop, sackholelimit, stats, always_keepalive, synuselimit, rootonly, synhashsize, 199 ctl_net_inet_tcp_flags = 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 200 201 ctl_net_inet_udp { 202 n1 const[CTL_NET, int32] 203 n2 const[PF_INET, int32] 204 # CTL_IPPROTO_NAMES 205 n3 const[17, int32] 206 n4 flags[ctl_net_inet_udp_flags, int32] 207 } 208 209 # UDPCTL_NAMES = checksum, baddynamic, recvspace, sendspace, stats, rootonly 210 ctl_net_inet_udp_flags = 1, 2, 3, 4, 5, 6 211 212 ctl_net_inet6_icmp6 { 213 n1 const[CTL_NET, int32] 214 n2 const[PF_INET6, int32] 215 # CTL_IPPROTO_NAMES 216 n3 const[58, int32] 217 n4 flags[ctl_net_inet6_icmp6_flags, int32] 218 } 219 220 # ICMPV6CTL_NAMES = NULL, NULL, NULL, redirtimeout, NULL, NULL, NULL, NULL, nd6_delay, nd6_umaxtries, nd6_mmaxtries, NULL, NULL, NULL, errppslimit, nd6_maxnudhint, mtudisc_hiwat, mtudisc_lowat, nd6_debug 221 ctl_net_inet6_icmp6_flags = 3, 8, 9, 10, 14, 15, 16, 17, 18 222 223 ctl_net_inet6_ip6 { 224 n1 const[CTL_NET, int32] 225 n2 const[PF_INET6, int32] 226 # CTL_IPPROTO_NAMES 227 n3 const[41, int32] 228 n4 flags[ctl_net_inet6_ip6_flags, int32] 229 } 230 231 # IPV6CTL_NAMES = forwarding, redirect, hlim, forwsrcrt, mrtproto, maxfragpackets, sourcecheck, sourcecheck_logint, log_interval, hdrnestlimit, dad_count, auto_flowlabel, defmcasthlim, use_deprecated, maxfrags, mforwarding, multipath, multicast_mtudisc, neighborgcthresh, maxdynroutes, dad_pending, mtudisctimeout, ifq, mrtmif, mrtmfc, soiikey 232 ctl_net_inet6_ip6_flags = 1, 2, 3, 5, 8, 9, 10, 11, 14, 15, 16, 17, 18, 21, 41, 42, 43, 44, 45, 48, 49, 50, 51, 52, 53, 54 233 234 ctl_net_mpls { 235 n1 const[CTL_NET, int32] 236 n2 const[PF_MPLS, int32] 237 n3 flags[ctl_net_mpls_flags, int32] 238 } 239 240 # MPLSCTL_NAMES = ttl, ifq, mapttl_ip, mapttl_ip6 241 ctl_net_mpls_flags = 2, 3, 5, 6 242 243 ctl_net_pipex { 244 n1 const[CTL_NET, int32] 245 n2 const[PF_PIPEX, int32] 246 n3 flags[ctl_net_pipex_flags, int32] 247 } 248 249 # PIPEXCTL_NAMES = enable, inq, outq 250 ctl_net_pipex_flags = 1, 2, 3 251 252 ctl_vfs_ffs { 253 n1 const[CTL_VFS, int32] 254 n2 const[1, int32] 255 n3 flags[ctl_vfs_ffs_flags, int32] 256 } 257 258 # FFS_NAMES = max_softdeps, sd_tickdelay, sd_worklist_push, sd_blk_limit_push, sd_ino_limit_push, sd_blk_limit_hit, sd_ino_limit_hit, sd_sync_limit_hit, sd_indir_blk_ptrs, sd_inode_bitmap, sd_direct_blk_ptrs, sd_dir_entry, dirhash_dirsize, dirhash_maxmem, dirhash_mem 259 ctl_vfs_ffs_flags = 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 260 261 ctl_vfs_nfs { 262 n1 const[CTL_VFS, int32] 263 n2 const[2, int32] 264 n3 flags[ctl_vfs_nfs_flags, int32] 265 } 266 267 # FS_NFS_NAMES = nfsstats, iothreads 268 ctl_vfs_nfs_flags = 1, 2 269 270 ctl_vfs_fuse { 271 n1 const[CTL_VFS, int32] 272 n2 const[18, int32] 273 n3 flags[ctl_vfs_fuse_flags, int32] 274 } 275 276 # FUSEFS_NAMES = fusefs_open_devices, fusefs_fbufs_in, fusefs_fbufs_wait, fusefs_pool_pages 277 ctl_vfs_fuse_flags = 1, 2, 3, 4 278 279 ctl_vm { 280 n1 const[CTL_VM, int32] 281 n2 flags[ctl_vm_flags, int32] 282 } 283 284 # CTL_VM_NAMES = vmmeter, loadavg, psstrings, uvmexp, swapencrypt, nkmempages, anonmin, vtextmin, vnodemin, maxslp, uspace, malloc_conf 285 ctl_vm_flags = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 286 287 ctl_vm_swapencrypt { 288 n1 const[CTL_VM, int32] 289 n2 const[VM_SWAPENCRYPT, int32] 290 n3 flags[ctl_vm_swapencrypt_flags, int32] 291 } 292 293 # CTL_SWPENC_NAMES = enable, keyscreated, keysdeleted 294 ctl_vm_swapencrypt_flags = 0, 1, 2