Lines Matching +full:0 +full:x32
30 #define SYS_READ 0
37 /* x32-only system call numbers (without X32_BIT) */
42 #define X32_BIT 0x40000000
45 static bool with_x32; /* x32 supported on this kernel? */
80 unsigned int level = sh ? sh->indent : 0; in offset()
96 } while (0)
100 sh->indent = 0; \
104 } while (0)
118 register long long arg2 asm("rsi") = 0; in probe_syscall()
119 register long long arg3 asm("rdx") = 0; in probe_syscall()
120 register long long arg4 asm("r10") = 0; in probe_syscall()
121 register long long arg5 asm("r8") = 0; in probe_syscall()
122 register long long arg6 asm("r9") = 0; in probe_syscall()
148 const char * const type = (start & X32_BIT) ? "x32" : "x64"; in syscall_str()
152 * Improve readability by stripping the x32 bit, but round in syscall_str()
155 if (lsb < 0) in syscall_str()
173 unsigned int err = 0; in _check_for()
213 return check_for(msb, nr, nr, 0); in check_zero()
223 * supports x32. Tell them. This can also be used to conditionalize
224 * tests based on existence or nonexistence of x32.
231 run("Checking for x32 by calling x32 getpid()\n"); in test_x32()
232 ret = probe_syscall(0, SYS_GETPID | X32_BIT); in test_x32()
236 info("x32 is supported\n"); in test_x32()
239 info("x32 is not supported\n"); in test_x32()
242 …fail("x32 getpid() returned %lld, but it should have returned either %lld or -ENOSYS\n", ret, (lon… in test_x32()
275 * Syscalls 512-547 are "x32" syscalls. They are in test_syscalls_with_x32()
276 * intended to be called with the x32 (0x40000000) bit in test_syscalls_with_x32()
277 * set. Calling them without the x32 bit set is in test_syscalls_with_x32()
280 run("Checking x32 syscalls as 64 bit\n"); in test_syscalls_with_x32()
283 run("Checking some common syscalls as x32\n"); in test_syscalls_with_x32()
287 run("Checking some x32 syscalls as x32\n"); in test_syscalls_with_x32()
291 run("Checking some 64-bit syscalls as x32\n"); in test_syscalls_with_x32()
299 run("Checking for absence of x32 system calls\n"); in test_syscalls_without_x32()
300 check_for(msb, 0 | X32_BIT, 999 | X32_BIT, -ENOSYS); in test_syscalls_without_x32()
306 0, 1, -1, X32_BIT-1, X32_BIT, X32_BIT-1, -X32_BIT, INT_MAX, in test_syscall_numbering()
316 for (size_t i = 0; i < sizeof(msbs)/sizeof(msbs[0]); i++) { in test_syscall_numbering()
318 run("Checking system calls with msb = %d (0x%x)\n", in test_syscall_numbering()
339 if (ptrace(PTRACE_TRACEME, 0, 0, 0)) { in syscall_numbering_tracee()
382 regs.orig_rax = regs.orig_rax | 0xffffffff00000000ULL; in mess_with_syscall()
401 pid_t wpid = waitpid(testpid, &wstatus, 0); in syscall_numbering_tracer()
402 if (wpid < 0 && errno != EINTR) in syscall_numbering_tracer()
417 while (waitpid(testpid, &wstatus, 0) != testpid || !WIFEXITED(wstatus)) in syscall_numbering_tracer()
428 if (testpid < 0) { in test_traced_syscall_numbering()
430 } else if (testpid == 0) { in test_traced_syscall_numbering()
432 _exit(0); in test_traced_syscall_numbering()
446 setvbuf(stdout, NULL, _IONBF, 0); in main()
452 if (nullfd < 0) { in main()
460 MAP_ANONYMOUS|MAP_SHARED, 0, 0); in main()
476 return 0; in main()