| /linux-6.15/arch/x86/um/shared/sysdep/ |
| H A D | stub_32.h | 16 static __always_inline long stub_syscall0(long syscall) in stub_syscall0() argument 20 __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall) in stub_syscall0() 26 static __always_inline long stub_syscall1(long syscall, long arg1) in stub_syscall1() argument 30 __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1) in stub_syscall1() 36 static __always_inline long stub_syscall2(long syscall, long arg1, long arg2) in stub_syscall2() argument 40 __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1), in stub_syscall2() 47 static __always_inline long stub_syscall3(long syscall, long arg1, long arg2, in stub_syscall3() argument 52 __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1), in stub_syscall3() 64 __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1), in stub_syscall4() 76 __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall), "b" (arg1), in stub_syscall5() [all …]
|
| H A D | stub_64.h | 20 static __always_inline long stub_syscall0(long syscall) in stub_syscall0() argument 26 : "0" (syscall) : __syscall_clobber ); in stub_syscall0() 31 static __always_inline long stub_syscall1(long syscall, long arg1) in stub_syscall1() argument 37 : "0" (syscall), "D" (arg1) : __syscall_clobber ); in stub_syscall1() 42 static __always_inline long stub_syscall2(long syscall, long arg1, long arg2) in stub_syscall2() argument 48 : "0" (syscall), "D" (arg1), "S" (arg2) : __syscall_clobber ); in stub_syscall2() 53 static __always_inline long stub_syscall3(long syscall, long arg1, long arg2, in stub_syscall3() argument 60 : "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3) in stub_syscall3() 73 : "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3), in stub_syscall4() 87 : "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3), in stub_syscall5() [all …]
|
| /linux-6.15/tools/perf/ |
| H A D | check-headers.sh | 201 check_2 tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl 202 check_2 tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl 204 check_2 tools/perf/arch/arm/entry/syscalls/syscall.tbl arch/arm/tools/syscall.tbl 205 check_2 tools/perf/arch/sh/entry/syscalls/syscall.tbl arch/sh/kernel/syscalls/syscall.tbl 206 check_2 tools/perf/arch/sparc/entry/syscalls/syscall.tbl arch/sparc/kernel/syscalls/syscall.tbl 207 check_2 tools/perf/arch/xtensa/entry/syscalls/syscall.tbl arch/xtensa/kernel/syscalls/syscall.tbl 208 check_2 tools/perf/arch/alpha/entry/syscalls/syscall.tbl arch/alpha/entry/syscalls/syscall.tbl 209 check_2 tools/perf/arch/parisc/entry/syscalls/syscall.tbl arch/parisc/entry/syscalls/syscall.tbl
|
| /linux-6.15/arch/mips/kernel/ |
| H A D | scall64-n32.S | 35 dsubu t0, v0, __NR_N32_Linux # check syscall number 39 ld t1, PT_EPC(sp) # skip syscall on return 45 sd a3, PT_R26(sp) # save a3 for syscall restarting 47 LONG_S v0, TI_SYSCALL($28) # Store syscall number 50 LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? 65 ld t1, PT_R2(sp) # syscall number 67 sd t1, PT_R0(sp) # save it for syscall restarting 79 bltz v0, 1f # seccomp failed? Skip syscall 82 ld v0, PT_R2(sp) # Restore syscall (maybe modified) 90 dsubu t2, v0, __NR_N32_Linux # check (new) syscall number
|
| H A D | scall64-n64.S | 42 ld t1, PT_EPC(sp) # skip syscall on return 47 sd a3, PT_R26(sp) # save a3 for syscall restarting 49 LONG_S v0, TI_SYSCALL($28) # Store syscall number 52 LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? 64 ld t2, (t0) # syscall routine 74 ld t1, PT_R2(sp) # syscall number 76 sd t1, PT_R0(sp) # save it for syscall restarting 89 bltz v0, 1f # seccomp failed? Skip syscall 92 ld v0, PT_R2(sp) # Restore syscall (maybe modified)
|
| H A D | scall32-o32.S | 32 lw t1, PT_EPC(sp) # skip syscall on return 37 sw a3, PT_R26(sp) # save a3 for syscall restarting 92 lw t0, TI_FLAGS($28) # syscall tracing enabled? 97 subu v0, v0, __NR_O32_Linux # check syscall number 104 lw t2, (t1) # syscall routine 115 lw t1, PT_R2(sp) # syscall number 117 sw t1, PT_R0(sp) # save it for syscall restarting 131 bltz v0, 1f # seccomp failed? Skip syscall 134 lw v0, PT_R2(sp) # Restore syscall (maybe modified) 184 subu t0, a0, __NR_O32_Linux # check syscall number [all …]
|
| H A D | scall64-o32.S | 34 ld t1, PT_EPC(sp) # skip syscall on return 36 dsubu t0, v0, __NR_O32_Linux # check syscall number 55 sd a3, PT_R26(sp) # save a3 for syscall restarting 92 LONG_S a0, TI_SYSCALL($28) # Save a0 as syscall number 99 LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? 114 ld t1, PT_R2(sp) # syscall number 116 sd t1, PT_R0(sp) # save it for syscall restarting 134 bltz v0, 1f # seccomp failed? Skip syscall 137 ld v0, PT_R2(sp) # Restore syscall (maybe modified) 196 subu t0, a0, __NR_O32_Linux # check syscall number [all …]
|
| /linux-6.15/arch/um/kernel/skas/ |
| H A D | syscall.c | 20 int syscall; in handle_syscall() local 33 syscall = UPT_SYSCALL_NR(r); in handle_syscall() 42 syscall == __NR_sched_yield) in handle_syscall() 45 if (syscall >= 0 && syscall < __NR_syscalls) { in handle_syscall() 46 unsigned long ret = EXECUTE_SYSCALL(syscall, regs); in handle_syscall()
|
| /linux-6.15/tools/testing/selftests/x86/ |
| H A D | fsgsbase.c | 140 if (syscall(SYS_arch_prctl, ARCH_SET_GS, value) != 0) in check_gs_value() 154 if (syscall(SYS_arch_prctl, ARCH_GET_GS, &base) != 0) in check_gs_value() 207 if (syscall(SYS_arch_prctl, ARCH_SET_GS, to_set) != 0) in do_remote_base() 229 if (syscall(SYS_arch_prctl, ARCH_SET_GS, 0) != 0) in load_gs() 293 syscall(SYS_futex, &ftx, FUTEX_WAKE, 0, NULL, NULL, 0); in test_wrbase() 295 syscall(SYS_futex, &ftx, FUTEX_WAIT, 1, NULL, NULL, 0); in test_wrbase() 353 if (syscall(SYS_arch_prctl, ARCH_SET_GS, local) != 0) in set_gs_and_switch_to() 379 syscall(SYS_futex, &ftx, FUTEX_WAKE, 0, NULL, NULL, 0); in set_gs_and_switch_to() 408 if (syscall(SYS_arch_prctl, ARCH_SET_GS, 0) != 0) in test_unexpected_base() 413 syscall(SYS_futex, &ftx, FUTEX_WAKE, 0, NULL, NULL, 0); in test_unexpected_base() [all …]
|
| /linux-6.15/tools/testing/selftests/filesystems/overlayfs/ |
| H A D | wrappers.h | 14 return syscall(__NR_fsopen, fsname, flags); in sys_fsopen() 20 return syscall(__NR_fsconfig, fd, cmd, key, value, aux); in sys_fsconfig() 26 return syscall(__NR_fsmount, fd, flags, attr_flags); in sys_fsmount() 32 return syscall(__NR_mount, src, tgt, fst, flags, data); in sys_mount() 43 return syscall(__NR_move_mount, from_dfd, from_pathname, to_dfd, in sys_move_mount() 61 return syscall(__NR_open_tree, dfd, filename, flags); in sys_open_tree()
|
| /linux-6.15/arch/powerpc/kernel/syscalls/ |
| H A D | Makefile | 7 syscall := $(src)/syscall.tbl macro 18 $(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 22 $(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE 26 $(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE 30 $(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE 34 $(kapi)/syscall_table_spu.h: $(syscall) $(systbl) FORCE
|
| /linux-6.15/tools/testing/selftests/bpf/prog_tests/ |
| H A D | map_ops.c | 13 (void)syscall(__NR_getpid); in map_update() 18 (void)syscall(__NR_getppid); in map_delete() 23 (void)syscall(__NR_getuid); in map_push() 28 (void)syscall(__NR_geteuid); in map_pop() 33 (void)syscall(__NR_getgid); in map_peek() 38 (void)syscall(__NR_gettid); in map_for_each_pass() 43 (void)syscall(__NR_getpgid); in map_for_each_fail()
|
| /linux-6.15/arch/s390/kernel/syscalls/ |
| H A D | Makefile | 7 syscall := $(src)/syscall.tbl macro 36 $(uapi)/unistd_32.h: $(syscall) $(systbl) FORCE 40 $(uapi)/unistd_64.h: $(syscall) $(systbl) FORCE 43 $(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE 47 $(kapi)/unistd_nr.h: $(syscall) $(systbl) FORCE
|
| /linux-6.15/Documentation/arch/powerpc/ |
| H A D | syscall64-abi.rst | 5 syscall chapter 10 The syscall is made with the sc instruction, and returns with execution 17 syscall calling sequence\ [1]_ matches the Power Architecture 64-bit ELF ABI 28 There is a maximum of 6 integer parameters to a syscall, passed in r3-r8. 34 clear, the syscall succeeded and r3 is the return value. When cr0.SO is set, 35 the syscall failed and r3 is the error value (that normally corresponds to 90 If the processor is in suspended state when a syscall is made, the syscall 91 will be performed as normal, and will return as normal. The syscall will be 105 transactional state and the syscall will proceed as in the case of a 106 suspended state syscall, and will resume the transactional state before [all …]
|
| /linux-6.15/arch/arm64/include/asm/ |
| H A D | Kbuild | 2 syscall-y += syscall_table_32.h 3 syscall-y += syscall_table_64.h 5 # arm32 syscall table used by lib/compat_audit.c: 6 syscall-y += unistd_32.h 8 syscall-y += unistd_compat_32.h
|
| /linux-6.15/samples/seccomp/ |
| H A D | bpf-direct.c | 65 int syscall; in emulator() local 73 syscall = ctx->uc_mcontext.gregs[REG_SYSCALL]; in emulator() 77 if (syscall != __NR_write) in emulator() 172 syscall(__NR_write, STDOUT_FILENO, in main() 174 bytes = syscall(__NR_read, STDIN_FILENO, buf, sizeof(buf)); in main() 175 syscall(__NR_write, STDOUT_FILENO, payload("HELLO, ")); in main() 176 syscall(__NR_write, STDOUT_FILENO, buf, bytes); in main() 177 syscall(__NR_write, STDERR_FILENO, in main()
|
| H A D | bpf-fancy.c | 97 syscall(__NR_write, STDOUT_FILENO, msg1, strlen(msg1)); in main() 98 bytes = syscall(__NR_read, STDIN_FILENO, buf, sizeof(buf)-1); in main() 100 syscall(__NR_write, STDERR_FILENO, msg2, strlen(msg2)); in main() 101 syscall(__NR_write, STDERR_FILENO, buf, bytes); in main() 103 syscall(__NR_write, STDERR_FILENO, msg2, strlen(msg2)+2); in main()
|
| /linux-6.15/include/linux/ |
| H A D | entry-common.h | 138 long syscall_trace_enter(struct pt_regs *regs, long syscall, 164 static __always_inline long syscall_enter_from_user_mode_work(struct pt_regs *regs, long syscall) in syscall_enter_from_user_mode_work() argument 169 syscall = syscall_trace_enter(regs, syscall, work); in syscall_enter_from_user_mode_work() 171 return syscall; in syscall_enter_from_user_mode_work() 191 static __always_inline long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall) in syscall_enter_from_user_mode() argument 199 ret = syscall_enter_from_user_mode_work(regs, syscall); in syscall_enter_from_user_mode()
|
| /linux-6.15/tools/testing/selftests/landlock/ |
| H A D | wrappers.h | 21 return syscall(__NR_landlock_create_ruleset, attr, size, flags); in landlock_create_ruleset() 31 return syscall(__NR_landlock_add_rule, ruleset_fd, rule_type, rule_attr, in landlock_add_rule() 40 return syscall(__NR_landlock_restrict_self, ruleset_fd, flags); in landlock_restrict_self() 46 return syscall(__NR_gettid); in sys_gettid()
|
| /linux-6.15/tools/testing/selftests/arm64/abi/ |
| H A D | Makefile | 4 TEST_GEN_PROGS := hwcap ptrace syscall-abi tpidr2 8 $(OUTPUT)/syscall-abi: syscall-abi.c syscall-abi-asm.S
|
| /linux-6.15/kernel/entry/ |
| H A D | common.c | 18 static inline void syscall_enter_audit(struct pt_regs *regs, long syscall) in syscall_enter_audit() argument 24 audit_syscall_entry(syscall, args[0], args[1], args[2], args[3]); in syscall_enter_audit() 28 long syscall_trace_enter(struct pt_regs *regs, long syscall, in syscall_trace_enter() argument 58 syscall = syscall_get_nr(current, regs); in syscall_trace_enter() 61 trace_sys_enter(regs, syscall); in syscall_trace_enter() 66 syscall = syscall_get_nr(current, regs); in syscall_trace_enter() 69 syscall_enter_audit(regs, syscall); in syscall_trace_enter() 71 return ret ? : syscall; in syscall_trace_enter()
|
| /linux-6.15/arch/powerpc/platforms/cell/ |
| H A D | spu_callbacks.c | 45 syscall_fn syscall; in spu_sys_callback() local 52 syscall = spu_syscall_table[s->nr_ret]; in spu_sys_callback() 56 syscall, in spu_sys_callback() 61 return syscall(s->parm[0], s->parm[1], s->parm[2], in spu_sys_callback()
|
| /linux-6.15/arch/arm/tools/ |
| H A D | Makefile | 14 syscall := $(src)/syscall.tbl macro 50 $(uapi)/unistd-%.h: $(syscall) $(syshdr) FORCE 53 $(kapi)/unistd-nr.h: $(syscall) $(sysnr) FORCE 56 $(gen)/calls-%.S: $(syscall) $(systbl) FORCE
|
| /linux-6.15/scripts/ |
| H A D | Makefile.asm-headers | 20 syscalltbl := $(srctree)/scripts/syscall.tbl 47 syscall-y := $(addprefix $(obj)/, $(syscall-y)) 52 unwanted := $(filter-out $(generic-y) $(generated-y) $(syscall-y),$(old-headers)) 73 all: $(generic-y) $(syscall-y) 90 targets := $(syscall-y)
|
| /linux-6.15/arch/microblaze/kernel/syscalls/ |
| H A D | Makefile | 7 syscall := $(src)/syscall.tbl macro 17 $(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 20 $(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE
|