Home
last modified time | relevance | path

Searched refs:ptrace (Results 1 – 25 of 843) sorted by relevance

12345678910>>...34

/OK3568_Linux_fs/kernel/tools/testing/selftests/powerpc/ptrace/
H A DMakefile2 TEST_GEN_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
3 ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \
4 ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \
5 perf-hwbreak ptrace-syscall
12 $(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: child.h
13 $(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
15 $(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
H A D.gitignore2 ptrace-gpr
3 ptrace-tm-gpr
4 ptrace-tm-spd-gpr
5 ptrace-tar
6 ptrace-tm-tar
7 ptrace-tm-spd-tar
8 ptrace-vsx
9 ptrace-tm-vsx
10 ptrace-tm-spd-vsx
11 ptrace-tm-spr
[all …]
H A Dptrace.h64 ret = ptrace(PTRACE_ATTACH, child, NULL, NULL); in start_trace()
81 ret = ptrace(PTRACE_DETACH, child, NULL, NULL); in stop_trace()
93 ret = ptrace(PTRACE_CONT, child, NULL, NULL); in cont_trace()
112 ret = ptrace(PTRACE_GETREGSET, child, type, &iov); in ptrace_read_regs()
132 ret = ptrace(PTRACE_SETREGSET, child, type, &iov); in ptrace_write_regs()
154 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_TAR, &iov); in show_tar_registers()
162 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_PPR, &iov); in show_tar_registers()
170 ret = ptrace(PTRACE_GETREGSET, child, NT_PPC_DSCR, &iov); in show_tar_registers()
202 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_TAR, &iov); in write_tar_registers()
209 ret = ptrace(PTRACE_SETREGSET, child, NT_PPC_PPR, &iov); in write_tar_registers()
[all …]
H A Dptrace-hwbreak.c53 if (ptrace(PPC_PTRACE_GETHWDBGINFO, child_pid, NULL, dbginfo)) { in get_dbginfo()
120 if (ptrace(PTRACE_TRACEME, 0, NULL, 0)) { in test_workload()
211 ptrace(PTRACE_GETSIGINFO, child_pid, NULL, &siginfo); in check_success()
228 ptrace(PTRACE_SINGLESTEP, child_pid, NULL, 0); in check_success()
235 if (ptrace(PTRACE_SET_DEBUGREG, child_pid, 0, wp_addr)) { in ptrace_set_debugreg()
243 int wh = ptrace(PPC_PTRACE_SETHWDEBUG, child_pid, 0, info); in ptrace_sethwdebug()
254 if (ptrace(PPC_PTRACE_DELHWDEBUG, child_pid, 0, wh) < 0) { in ptrace_delhwdebug()
276 ptrace(PTRACE_CONT, child_pid, NULL, 0); in test_set_debugreg()
286 ptrace(PTRACE_CONT, child_pid, NULL, 0); in test_set_debugreg()
297 ptrace(PTRACE_CONT, child_pid, NULL, 0); in test_set_debugreg()
[all …]
H A Dptrace-syscall.c74 if (ptrace(PTRACE_TRACEME, 0, 0, 0) != 0) in test_ptrace_syscall_restart()
92 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
96 if (ptrace(PTRACE_GETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
127 if (ptrace(PTRACE_SETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
130 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
134 if (ptrace(PTRACE_GETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
170 if (ptrace(PTRACE_SETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
173 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
177 if (ptrace(PTRACE_GETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
203 if (ptrace(PTRACE_CONT, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
/OK3568_Linux_fs/yocto/poky/meta/recipes-extended/psmisc/psmisc/
H A D0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch7 pt_regs struct from kernel APIs in asm/ptrace.h
20 #include <asm/ptrace.h>
35 - regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R0, 0);
36 - regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R3, 0);
37 - regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R4, 0);
38 - regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R5, 0);
39 - regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_ORIG_R3, 0);
40 + regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R0, 0);
41 + regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R3, 0);
42 + regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R4, 0);
[all …]
/OK3568_Linux_fs/kernel/arch/powerpc/kernel/ptrace/
H A DMakefile8 obj-y += ptrace.o ptrace-view.o
10 obj-$(CONFIG_VSX) += ptrace-vsx.o
12 obj-y += ptrace-novsx.o
14 obj-$(CONFIG_ALTIVEC) += ptrace-altivec.o
15 obj-$(CONFIG_SPE) += ptrace-spe.o
16 obj-$(CONFIG_PPC_TRANSACTIONAL_MEM) += ptrace-tm.o
17 obj-$(CONFIG_PPC_ADV_DEBUG_REGS) += ptrace-adv.o
19 obj-y += ptrace-noadv.o
/OK3568_Linux_fs/kernel/tools/perf/arch/x86/tests/
H A Dbp-modify.c40 int err = ptrace(PTRACE_TRACEME, 0, NULL, NULL); in spawn_child()
81 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1()
88 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1()
95 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1()
101 if (ptrace(PTRACE_CONT, child, NULL, NULL)) { in bp_modify1()
112 rip = ptrace(PTRACE_PEEKUSER, child, in bp_modify1()
123 if (ptrace(PTRACE_DETACH, child, NULL, NULL)) { in bp_modify1()
158 if (ptrace(PTRACE_POKEUSER, child, in bp_modify2()
165 if (ptrace(PTRACE_POKEUSER, child, in bp_modify2()
171 if (!ptrace(PTRACE_POKEUSER, child, in bp_modify2()
[all …]
/OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/
H A Dadd_ppc64le.patch1 --- a/sysdeps/linux-gnu/ppc/ptrace.h
2 +++ b/sysdeps/linux-gnu/ppc/ptrace.h
7 +#include <asm/ptrace.h>
8 #include <sys/ptrace.h>
17 #include <sys/ptrace.h>
18 #include <asm/ptrace.h>
30 - if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0)
32 + if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0){
/OK3568_Linux_fs/kernel/tools/testing/selftests/x86/
H A Dptrace_syscall.c183 if (ptrace(PTRACE_TRACEME, 0, 0, 0) != 0) in test_ptrace_syscall_restart()
204 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
208 if (ptrace(PTRACE_GETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
232 if (ptrace(PTRACE_SETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
235 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
239 if (ptrace(PTRACE_GETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
264 if (ptrace(PTRACE_SETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
267 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
271 if (ptrace(PTRACE_GETREGS, chld, 0, &regs) != 0) in test_ptrace_syscall_restart()
283 if (ptrace(PTRACE_CONT, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
[all …]
H A Dfsgsbase.c461 if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) != 0) in test_ptrace_write_gs_read_base()
476 base = ptrace(PTRACE_PEEKUSER, child, base_offset, NULL); in test_ptrace_write_gs_read_base()
487 if (ptrace(PTRACE_POKEUSER, child, gs_offset, 0x7) != 0) in test_ptrace_write_gs_read_base()
491 base = ptrace(PTRACE_PEEKUSER, child, base_offset, NULL); in test_ptrace_write_gs_read_base()
501 ptrace(PTRACE_CONT, child, NULL, NULL); in test_ptrace_write_gs_read_base()
521 if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) != 0) in test_ptrace_write_gsbase()
535 gs = ptrace(PTRACE_PEEKUSER, child, gs_offset, NULL); in test_ptrace_write_gsbase()
543 if (ptrace(PTRACE_POKEUSER, child, base_offset, 0xFF) != 0) in test_ptrace_write_gsbase()
546 gs = ptrace(PTRACE_PEEKUSER, child, gs_offset, NULL); in test_ptrace_write_gsbase()
547 base = ptrace(PTRACE_PEEKUSER, child, base_offset, NULL); in test_ptrace_write_gsbase()
[all …]
H A Dfsgsbase_restore.c162 if (ptrace(PTRACE_TRACEME, 0, 0, 0) != 0) in main()
190 if (ptrace(PTRACE_GETREGS, chld, NULL, &regs) != 0) in main()
208 if (ptrace(PTRACE_SETREGS, chld, NULL, &regs2) != 0) in main()
210 if (ptrace(PTRACE_CONT, chld, NULL, NULL) != 0) in main()
218 if (ptrace(PTRACE_SETREGS, chld, NULL, &regs) != 0) in main()
220 if (ptrace(PTRACE_DETACH, chld, NULL, NULL) != 0) in main()
/OK3568_Linux_fs/kernel/arch/x86/um/os-Linux/
H A Dregisters.c23 if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) in save_i387_registers()
36 if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in save_fp_registers()
46 if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) in restore_i387_registers()
58 if (ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in restore_fp_registers()
70 if (ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs) < 0) in save_fpx_registers()
77 if (ptrace(PTRACE_SETFPXREGS, pid, 0, fp_regs) < 0) in restore_fpx_registers()
103 err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs); in arch_init_registers()
137 if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) == 0) in arch_init_registers()
/OK3568_Linux_fs/kernel/include/linux/
H A Dptrace.h97 if (unlikely(child->ptrace)) in ptrace_unlink()
119 if (unlikely(task->ptrace)) in ptrace_parent()
135 return task->ptrace & PT_EVENT_FLAG(event); in ptrace_event_enabled()
155 if ((current->ptrace & (PT_PTRACED|PT_SEIZED)) == PT_PTRACED) in ptrace_event()
201 static inline void ptrace_init_task(struct task_struct *child, bool ptrace) in ptrace_init_task() argument
206 child->ptrace = 0; in ptrace_init_task()
209 if (unlikely(ptrace) && current->ptrace) { in ptrace_init_task()
210 child->ptrace = current->ptrace; in ptrace_init_task()
213 if (child->ptrace & PT_SEIZED) in ptrace_init_task()
H A Dtracehook.h60 int ptrace = current->ptrace; in ptrace_report_syscall() local
62 if (!(ptrace & PT_PTRACED)) in ptrace_report_syscall()
66 ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); in ptrace_report_syscall()
/OK3568_Linux_fs/kernel/arch/um/os-Linux/
H A Dstart_up.c36 ptrace(PTRACE_TRACEME, 0, 0, 0) < 0) { in ptrace_child()
125 if (ptrace(PTRACE_CONT, pid, 0, 0) < 0) { in stop_ptraced_child()
173 if (ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0) in check_sysemu()
183 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) in check_sysemu()
191 n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_RET_OFFSET, os_getpid()); in check_sysemu()
208 if ((ptrace(PTRACE_OLDSETOPTIONS, pid, 0, in check_sysemu()
214 if (ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0) in check_sysemu()
227 n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_RET_OFFSET, in check_sysemu()
266 if ((ptrace(PTRACE_OLDSETOPTIONS, pid, 0, in check_ptrace()
271 if (ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) in check_ptrace()
[all …]
/OK3568_Linux_fs/kernel/tools/testing/selftests/breakpoints/
H A Dbreakpoint_test.c46 ret = ptrace(PTRACE_POKEUSER, child_pid, in set_breakpoint_addr()
88 dr7 = ptrace(PTRACE_PEEKUSER, child_pid, in toggle_breakpoint()
108 ret = ptrace(PTRACE_POKEUSER, child_pid, in toggle_breakpoint()
209 ret = ptrace(PTRACE_TRACEME, 0, NULL, 0); in trigger_tests()
276 child_nr_tests = ptrace(PTRACE_PEEKDATA, child_pid, in check_success()
280 if (ptrace(PTRACE_POKEDATA, child_pid, &trapped, 1)) in check_success()
299 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_instruction_breakpoints()
321 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_watchpoints()
377 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests()
381 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests()
[all …]
/OK3568_Linux_fs/buildroot/package/gdb/11.2/
H A D0010-The-signal-definitions-of-musl-and-gdb-collide.patch18 gdb/nat/aarch64-sve-linux-ptrace.h | 2 +-
22 diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h
24 --- a/gdb/nat/aarch64-sve-linux-ptrace.h
25 +++ b/gdb/nat/aarch64-sve-linux-ptrace.h
27 #include <sys/ptrace.h>
28 #include <asm/ptrace.h>
/OK3568_Linux_fs/buildroot/package/gdb/10.2/
H A D0010-The-signal-definitions-of-musl-and-gdb-collide.patch18 gdb/nat/aarch64-sve-linux-ptrace.h | 2 +-
22 diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h
24 --- a/gdb/nat/aarch64-sve-linux-ptrace.h
25 +++ b/gdb/nat/aarch64-sve-linux-ptrace.h
27 #include <sys/ptrace.h>
28 #include <asm/ptrace.h>
/OK3568_Linux_fs/buildroot/package/gdb/12.1/
H A D0010-The-signal-definitions-of-musl-and-gdb-collide.patch18 gdb/nat/aarch64-sve-linux-ptrace.h | 2 +-
22 diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h
24 --- a/gdb/nat/aarch64-sve-linux-ptrace.h
25 +++ b/gdb/nat/aarch64-sve-linux-ptrace.h
27 #include <sys/ptrace.h>
28 #include <asm/ptrace.h>
/OK3568_Linux_fs/kernel/arch/um/os-Linux/skas/
H A Dprocess.c37 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) in ptrace_dump_regs()
68 err = ptrace(PTRACE_CONT, pid, 0, 0); in wait_stub_done()
102 err = ptrace(PTRACE_CONT, pid, 0, SIGSEGV); in get_skas_faultinfo()
144 err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, in handle_trap()
152 err = ptrace(PTRACE_SYSCALL, pid, 0, 0); in handle_trap()
199 ptrace(PTRACE_TRACEME, 0, 0, 0); in userspace_tramp()
314 if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL, in start_userspace()
358 if (ptrace(PTRACE_SETREGS, pid, 0, regs->gp)) { in userspace()
376 if (ptrace(op, pid, 0, 0)) { in userspace()
390 if (ptrace(PTRACE_GETREGS, pid, 0, regs->gp)) { in userspace()
[all …]
/OK3568_Linux_fs/kernel/Documentation/admin-guide/LSM/
H A DYama.rst26 exist and remain possible if ptrace is allowed to operate as before.
27 Since ptrace is not commonly used by non-developers and non-admins, system
31 specifically disallow such ptrace attachment (e.g. ssh-agent), but many
32 do not. A more general solution is to only allow ptrace directly from a
44 to ptrace each other. If a process wishes to entirely disable these ptrace
51 0 - classic ptrace permissions:
58 1 - restricted ptrace:
68 only processes with ``CAP_SYS_PTRACE`` may use ptrace, either with
72 no processes may use ptrace with ``PTRACE_ATTACH`` nor via
/OK3568_Linux_fs/kernel/tools/testing/selftests/arm64/fp/
H A DMakefile4 TEST_GEN_PROGS := sve-ptrace sve-probe-vls
11 sve-ptrace: sve-ptrace.o sve-ptrace-asm.o
/OK3568_Linux_fs/buildroot/package/valgrind/
H A D0002-Define-PTRACE_GETSIGINFO-on-PowerPC-when-not-availab.patch15 coregrind/vgdb-invoker-ptrace.c | 6 ++++++
18 diff --git a/coregrind/vgdb-invoker-ptrace.c b/coregrind/vgdb-invoker-ptrace.c
20 --- a/coregrind/vgdb-invoker-ptrace.c
21 +++ b/coregrind/vgdb-invoker-ptrace.c
/OK3568_Linux_fs/kernel/kernel/
H A Dexit.c591 if (!p->ptrace && in reparent_leader()
627 BUG_ON((!t->ptrace) != (rcu_access_pointer(t->parent) == father)); in forget_original_parent()
628 if (likely(!t->ptrace)) in forget_original_parent()
662 if (unlikely(tsk->ptrace)) { in exit_notify()
953 eligible_child(struct wait_opts *wo, bool ptrace, struct task_struct *p) in eligible_child() argument
962 if (ptrace || (wo->wo_flags & __WALL)) in eligible_child()
1114 static int *task_stopped_code(struct task_struct *p, bool ptrace) in task_stopped_code() argument
1116 if (ptrace) { in task_stopped_code()
1145 int ptrace, struct task_struct *p) in wait_task_stopped() argument
1155 if (!ptrace && !(wo->wo_flags & WUNTRACED)) in wait_task_stopped()
[all …]

12345678910>>...34