/freebsd/tools/test/stress2/misc/ |
H A D | syzkaller67.sh | 47 #include <sys/syscall.h> 54 syscall(SYS_mmap, 0x10000000, 0x1000000, 7, 0x1012, -1, 0); 56 syscall(SYS_munmap, 0x10ffa000, 0x3000); 57 syscall(SYS_mmap, 0x10ffd000, 0x1000, 4, 0x1010, -1, 0); 58 syscall(SYS_mmap, 0x10ffc000, 0x1000, 0, 0x1010, -1, 0); 59 syscall(SYS_mmap, 0x10ffc000, 0x1000, 0, 0x1010, -1, 0); 60 syscall(SYS_mprotect, 0x10ffe000, 0x2000, 7); 61 syscall(SYS_mprotect, 0x10ffd000, 0x3000, 0); 62 syscall(SYS_fork); 63 res = syscall(SYS_fork); [all …]
|
H A D | syscall5.sh | 29 # Call syscall4.sh with syscall number as argument. 36 syscall=`grep SYS_MAXSYSCALL /usr/include/sys/syscall.h | awk '{print $NF}'` 37 syscall=$((syscall - 1)) 49 syscall=`ls -l $last | awk '{print $NF}'` 50 syscall=$((syscall - 1)) 52 s) syscall="$OPTARG" ;; 61 [ $syscall -gt $esyscall ] || 62 { echo "$syscall must be greater than $esyscall"; exit 1; } 73 n=$syscall 78 name=`grep -w "$n$" /usr/include/sys/syscall.h | awk '{print $2}' | [all …]
|
H A D | syzkaller4.sh | 40 #include <sys/syscall.h> 264 syscall(SYS___semctl, 0, 0ul, 0xaul, 0x20000040ul); 287 syscall(SYS_connect, -1, 0x20000340ul, 0x10ul); 290 res = syscall(SYS_semget, 0ul, 0ul, 0x284ul); 295 res = syscall(SYS_socket, 0x1cul, 1ul, 0ul); 300 syscall(SYS_listen, r[1], 0); 303 res = syscall(SYS_fstat, r[1], 0x20000080ul); 323 syscall(SYS___semctl, r[0], 0ul, 0xaul, 0x20000180ul); 326 res = syscall(SYS_socket, 0x1cul, 1ul, 0x84ul); 331 syscall(SYS_connect, r[3], 0ul, 0ul); [all …]
|
H A D | syzkaller8.sh | 40 #include <sys/syscall.h> 81 syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x1012ul, -1, 0ul); 84 syscall(SYS___getcwd, 0x20000000ul, 0xc7ul); 85 res = syscall(SYS_socket, 0x1cul, 3ul, 0x3a); 88 res = syscall(SYS_fcntl, r[0], 1ul, -1); 91 syscall(SYS_close, r[1]); 92 syscall(SYS_mprotect, 0x20000000ul, 0x4000ul, 1ul); 94 syscall(SYS_freebsd12_shm_open, 0x20000000ul, 0x200ul, 0ul); 95 res = syscall(SYS_freebsd10_pipe, 0x20000080ul); 98 syscall(SYS_mmap, 0x20d43000ul, 0x200000ul, 3ul, 0x12ul, r[2], 0ul);
|
H A D | syzkaller66.sh | 18 # --- syscall (0, FreeBSD ELF64, syscall), rip = 0x823c81a6a, rsp = 0x8210ed3c8, rbp = 0x8210ed3e0 … 50 #include <sys/syscall.h> 109 res = syscall(SYS_socket, 2ul, 1ul, 0); 117 syscall(SYS_bind, r[0], 0x200001c0ul, 0x10ul); 118 syscall(SYS_listen, r[0], 0); 119 res = syscall(SYS_socket, 2ul, 1ul, 0); 127 syscall(SYS_connect, r[1], 0x200000c0ul, 0x10ul); 135 syscall(SYS_sendmsg, r[1], 0x20002580ul, 0x20104ul); 136 syscall(SYS_shutdown, r[1], 1ul); 142 syscall(SYS_connect, r[1], 0x200000c0ul, 0x10ul); [all …]
|
H A D | syzkaller7.sh | 52 #include <sys/syscall.h> 113 res = syscall(SYS_open, 0x20001180, 0x8240, 0); 116 res = syscall(SYS_socketpair, 1, 1, 0, 0x20000100); 122 res = syscall(SYS_open, 0x20000480, 0x80000000000206, 0); 125 res = syscall(SYS_dup, r[3]); 131 syscall(SYS_pwritev, r[4], 0x20000100, 1, 0); 135 syscall(SYS_pwritev, r[3], 0x20002e80, 1, 0xbf24); 140 syscall(SYS_setsockopt, r[2], 0, 2, 0x200004c0, 0x20); 141 syscall(SYS_fcntl, r[4], 4, 0x10044); 142 syscall(SYS_read, r[4], 0x20000000, 0x6d999); [all …]
|
H A D | syzkaller73.sh | 33 #include <sys/syscall.h> 383 res = syscall(SYS_socket, /*domain=AF_INET6*/ 0x1cul, 390 syscall(SYS_setsockopt, /*fd=*/r[0], /*level=*/0xffff, 401 syscall(SYS_bind, /*fd=*/r[0], /*addr=*/0x20000140ul, /*addrlen=*/0x1cul); 422 syscall(SYS_aio_writev, /*iocb=*/0x20000500ul); 431 syscall(SYS_connect, /*fd=*/r[0], /*addr=*/0x20000180ul, 436 syscall(SYS_sendto, /*fd=*/r[0], /*buf=*/0x20000200ul, /*len=*/0xff66ul, 440 syscall(SYS_sendmsg, /*fd=*/r[0], /*msg=*/0ul, /*f=*/0ul); 443 syscall(SYS_socket, /*domain=AF_INET*/ 2ul, /*type=SOCK_STREAM*/ 1ul, 447 res = syscall(SYS_socket, /*domain=*/2ul, /*type=SOCK_SEQPACKET*/ 5ul, [all …]
|
H A D | syzkaller44.sh | 18 # --- syscall (0, FreeBSD ELF64, nosys), rip = 0x800380a4a, rsp = 0x7fffffffe9b8, rbp = 0x7fffffffe… 48 #include <sys/syscall.h> 55 syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul); 57 res = syscall(SYS_socket, 0x1cul, 1ul, 0x84); 61 syscall(SYS_setsockopt, r[0], 0x84, 0x1c, 0x20000140ul, 4ul); 68 syscall(SYS_bind, r[0], 0x20000080ul, 0x1cul); 69 res = syscall(SYS_socket, 0x1cul, 1ul, 0x84); 73 syscall(SYS_setsockopt, r[1], 0x84, 0x1c, 0x20000140ul, 4ul); 80 syscall(SYS_bind, r[1], 0x20000080ul, 0x1cul); 81 syscall(SYS_listen, r[1], 0);
|
H A D | syzkaller54.sh | 15 # --- syscall (0, FreeBSD ELF64, nosys), rip = 0x82317b7da, rsp = 0x826544f48, rbp = 0x826544f70 --- 47 #include <sys/syscall.h> 250 res = syscall(SYS_socket, 0x1cul, 1ul, 0x84); 255 syscall(SYS_connect, r[0], 0ul, 0ul); 258 res = syscall(SYS_socket, 0x1cul, 1ul, 0x84); 263 syscall(SYS_sendto, -1, 0ul, 0ul, 0ul, 0ul, 0ul); 266 syscall(SYS_dup2, r[1], -1); 269 res = syscall(SYS_dup2, -1, -1); 274 res = syscall(SYS_dup2, -1, r[2]); 279 syscall(SYS_sendmsg, r[3], 0ul, 0ul); [all …]
|
H A D | syzkaller71.sh | 20 # --- syscall (1, FreeBSD ELF64, exit), rip = 0x824db2f4a, rsp = 0x8211862b8, rbp = 0x8211862d0 --- 52 #include <sys/syscall.h> 113 res = syscall(SYS_socket, 0x1cul, 1ul, 0x84); 123 syscall(SYS_bind, r[0], 0x20000040ul, 0x1cul); 131 syscall(SYS_connect, r[0], 0x20000180ul, 0x1cul); 133 syscall(SYS_setsockopt, r[0], 0x84, 0x1b, 0x20000300ul, 4ul); 135 syscall(SYS_sendto, r[0], 0x20000480ul, 0xfffffe5cul, 0x188ul, 0ul, 0ul); 141 syscall(SYS_setsockopt, r[0], 0x84, 0x21, 0x200000c0ul, 0x10ul); 142 syscall(SYS_shutdown, r[0], 0ul); 143 syscall(SYS_writev, r[0], 0ul, 0ul); [all …]
|
H A D | syzkaller55.sh | 47 #include <sys/syscall.h> 108 res = syscall(SYS_socket, 0x1cul, 1ul, 0x84); 117 syscall(SYS_bind, r[0], 0x20000000ul, 0x1cul); 125 syscall(SYS_connect, r[0], 0x20000080ul, 0x1cul); 150 syscall(SYS_aio_read, 0x20000400ul); 152 syscall(SYS_sendto, r[0], 0x200000c0ul, 1ul, 0ul, 0ul, 0ul); 153 syscall(SYS_shutdown, r[0], 0ul); 154 res = syscall(SYS_socket, 0x1cul, 5ul, 0x84); 167 syscall(SYS_sendmsg, r[0], 0x200003c0ul, 0ul); 168 res = syscall(SYS_dup2, r[0], r[1]); [all …]
|
H A D | syzkaller75.sh | 22 # --- syscall (0, FreeBSD ELF64, syscall), rip = 0x82438d7fa, rsp = 0x824847f68, rbp = 0x824847f90 … 56 #include <sys/syscall.h> 260 res = syscall(SYS_openat, /*fd=*/0xffffff9c, /*file=*/0x200000000200ul, 285 syscall(SYS_aio_write, /*iocb=*/0x200000000240ul); 288 syscall(SYS_mlockall, /*flags=MCL_FUTURE*/ 2ul); 292 res = syscall(SYS_open, /*file=*/0x200000000100ul, 300 syscall(SYS_preadv, /*fd=*/r[1], /*vec=*/0x200000001780ul, 305 syscall( 312 res = syscall( 320 syscall(SYS_mmap, /*addr=*/0x200000000000ul, /*len=*/0x200000ul, [all …]
|
H A D | syzkaller52.sh | 17 # --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8226f27aa, rsp = 0x82803ef48, rbp = 0x82803ef70 --- 52 #include <sys/syscall.h> 335 syscall(SYS_sigsuspend, 0x20000000ul); 338 syscall(SYS_setgid, 0); 341 syscall(SYS_getgroups, 0ul, 0ul); 344 syscall(SYS_setegid, 0); 347 res = syscall(SYS_shmget, 0ul, 0x2000ul, 0x420ul, 0x20ffd000ul); 352 res = syscall(SYS_getpid); 375 syscall(SYS_shmctl, r[0], 1ul, 0x20000200ul); 378 syscall(SYS_getgid); [all …]
|
/freebsd/sys/tools/syscalls/core/ |
H A D | syscall.lua | 14 local syscall = {} 16 syscall.__index = syscall 18 syscall.known_flags = util.set { 41 function syscall:processThr() 52 function syscall:processCap() 65 if not syscall.known_flags[k] and not 74 function syscall:processChangesAbi() 105 function syscall:processFlags() 127 function syscall:processPrefix() 140 function syscall:validate(prev) [all …]
|
/freebsd/share/man/man9/ |
H A D | SYSCALL_MODULE.9 | 34 .Nd syscall kernel module declaration macro 45 macro declares a new syscall. 57 where the syscall is allocated. 64 the syscall and the number of arguments this function needs (see 78 The syscall number assigned to the module can be retrieved using the 89 A minimal example for a syscall module can be found in 90 .Pa /usr/share/examples/kld/syscall/module/syscall.c . 94 .Pa /usr/share/examples/kld/syscall/module/syscall.c
|
H A D | syscall_helper_register.9 | 31 .Nd kernel syscall registration routines 58 which specifies the parameters for syscall registration: 75 This flag prevents the syscall from being unregistered. 81 In new code, syscall implementation functions shall be named 85 For legacy syscall functions named without "sys_" prefixes, the "COMPAT" 92 This flag indicates that the syscall is allowed in capability mode. 114 call will fail and the syscall will not be registered if: 122 The specified syscall number, 130 The specified syscall number,
|
/freebsd/contrib/ofed/libmlx4/ |
H A D | mmio.h | 7 #include <sys/syscall.h> 13 return syscall(__NR_s390_pci_mmio_write, mmio_addr, &val, sizeof(val)); in mmio_writeb() 19 return syscall(__NR_s390_pci_mmio_write, mmio_addr, &val, sizeof(val)); in mmio_writew() 25 return syscall(__NR_s390_pci_mmio_write, mmio_addr, &val, sizeof(val)); in mmio_writel() 31 return syscall(__NR_s390_pci_mmio_write, mmio_addr, &val, sizeof(val)); in mmio_writeq() 38 return syscall(__NR_s390_pci_mmio_write, mmio_addr, val, length); in mmio_write() 43 return syscall(__NR_s390_pci_mmio_read, mmio_addr, val, sizeof(*val)); in mmio_readb() 48 return syscall(__NR_s390_pci_mmio_read, mmio_addr, val, sizeof(*val)); in mmio_readw() 53 return syscall(__NR_s390_pci_mmio_read, mmio_addr, val, sizeof(*val)); in mmio_readl() 58 return syscall(__NR_s390_pci_mmio_read, mmio_addr, val, sizeof(*val)); in mmio_readq() [all …]
|
/freebsd/contrib/capsicum-test/ |
H A D | syscalls.h | 13 /* Map umount2 (Linux) syscall to unmount (FreeBSD) syscall */ 77 #include <sys/syscall.h> 144 #include <sys/syscall.h> 159 return syscall(__NR_getdents, fd, dirp, count); in getdents_() 167 * the cached value on pdfork(), so directly syscall. */ 169 return syscall(__NR_getpid); in getpid_() 173 return syscall(__NR_execveat, fd, path, argv, envp, flags); in execveat() 178 * filesystem. Bypass this and go directly to the execveat(2) syscall. 187 static inline gid_t getegid_(void) { return syscall(__NR_getegid); } in getegid_() 188 static inline gid_t getgid_(void) { return syscall(__NR_getgid); } in getgid_() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_linux.cpp | 33 // For mips64, syscall(__NR_stat) fills the buffer in the 'struct kernel_stat' 37 // syscall(__NR_stat64) and struct kernel_stat64. 71 # include <sys/syscall.h> 245 return internal_syscall(SYSCALL(mmap), (uptr)addr, length, prot, flags, fd, in internal_mmap() 250 return internal_syscall(SYSCALL(mmap2), addr, length, prot, flags, fd, in internal_mmap() 257 return internal_syscall(SYSCALL(munmap), (uptr)addr, length); in internal_munmap() 263 return internal_syscall(SYSCALL(mremap), (uptr)old_address, old_size, in internal_mremap() 269 return internal_syscall(SYSCALL(mprotect), (uptr)addr, length, prot); in internal_mprotect() 273 return internal_syscall(SYSCALL(madvise), addr, length, advice); in internal_madvise() 276 uptr internal_close(fd_t fd) { return internal_syscall(SYSCALL(close), fd); } in internal_close() [all …]
|
H A D | sanitizer_syscall_linux_x86_64.inc | 13 #define SYSCALL(name) __NR_ ## name 17 asm volatile("syscall" : "=a"(retval) : "a"(nr) : "rcx", "r11", 25 asm volatile("syscall" : "=a"(retval) : "a"(nr), "D"((u64)arg1) : 33 asm volatile("syscall" : "=a"(retval) : "a"(nr), "D"((u64)arg1), 41 asm volatile("syscall" : "=a"(retval) : "a"(nr), "D"((u64)arg1), 50 "syscall" : "=a"(retval) : "a"(nr), "D"((u64)arg1), 62 "syscall" : "=a"(retval) : "a"(nr), "D"((u64)arg1), 76 "syscall" : "=a"(retval) : "a"(nr), "D"((u64)arg1),
|
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/docsExamples/ |
H A D | specopen.d | 40 syscall::open:entry, 41 syscall::open64:entry 55 syscall::open:return, 56 syscall::open64:return 63 syscall::open:return, 64 syscall::open64:return 71 syscall::open:return, 72 syscall::open64:return
|
/freebsd/cddl/usr.sbin/dwatch/libexec/ |
H A D | sendrecv | 17 syscall::recvfrom:return, \ 18 syscall::recvmsg:return, \ 19 syscall::sendmsg:entry, \ 20 syscall::sendto:entry )} ;; 23 syscall::sendmsg:entry, \ 24 syscall::sendto:entry )} ;; 27 syscall::recvfrom:return, \ 28 syscall::recvmsg:return )} ;; 30 : ${PROBE:=syscall::$PROFILE:return} ;; 32 : ${PROBE:=syscall::$PROFILE:entry} [all …]
|
/freebsd/tools/regression/security/cap_test/ |
H A D | cap_test.h | 67 #define CHECK_SYSCALL_SUCCEEDS(syscall, ...) do { \ argument 68 if (syscall(__VA_ARGS__) < 0) \ 70 __func__, __LINE__, #syscall); \ 74 #define CHECK_SYSCALL_FAILS(expected_errno, syscall, ...) do { \ argument 75 if (syscall(__VA_ARGS__) < 0) { \ 78 __func__, __LINE__, #syscall); \ 81 __func__, __LINE__, #syscall); \ 86 #define CHECK_SYSCALL_FAILS_BUT_NOT_WITH(bad_errno, syscall, ...) do { \ argument 87 if (syscall(__VA_ARGS__) < 0) { \ 90 __func__, __LINE__, #syscall); \ [all …]
|
/freebsd/crypto/openssh/ |
H A D | sandbox-seccomp-filter.c | 50 #include <sys/syscall.h> 105 /* load and test syscall argument, low word */ \ 110 /* load and test syscall argument, high word */ \ 116 /* reload syscall number; all rules expect it in accumulator */ \ 119 /* Allow if syscall argument contains only values in mask */ 122 /* load, mask and test syscall argument, low word */ \ 127 /* load, mask and test syscall argument, high word */ \ 134 /* reload syscall number; all rules expect it in accumulator */ \ 137 /* Deny unless syscall argument contains only values in mask */ 140 /* load, mask and test syscall argument, low word */ \ [all …]
|
/freebsd/stand/uboot/ |
H A D | glue.c | 145 if (!syscall(API_GETC, NULL, &c)) in ub_getc() 156 if (!syscall(API_TSTC, NULL, &t)) in ub_tstc() 166 syscall(API_PUTC, NULL, &c); in ub_putc() 173 syscall(API_PUTS, NULL, s); in ub_puts() 186 syscall(API_RESET, NULL); in ub_reset() 204 if (!syscall(API_GET_SYS_INFO, &err, &si)) in ub_get_sys_info() 220 syscall(API_UDELAY, NULL, &usec); in ub_udelay() 228 if (!syscall(API_GET_TIMER, NULL, &cur, &base)) in ub_get_timer() 266 if (!syscall(API_DEV_ENUM, NULL, di)) in ub_dev_enum() 280 if (!syscall(API_DEV_ENUM, NULL, di)) in ub_dev_enum() [all …]
|