Searched refs:ptrace (Results 1 - 200 of 998) sorted by relevance

12345

/linux-4.1.27/arch/x86/um/os-Linux/
H A Dprctl.c6 #include <sys/ptrace.h>
7 #include <asm/ptrace.h>
11 return ptrace(PTRACE_ARCH_PRCTL, pid, (unsigned long) addr, code); os_arch_prctl()
H A Dregisters.c8 #include <sys/ptrace.h>
17 if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) save_fp_registers()
24 if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) restore_fp_registers()
33 if (ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs) < 0) save_fpx_registers()
40 if (ptrace(PTRACE_SETFPXREGS, pid, 0, fp_regs) < 0) restore_fpx_registers()
66 err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs); arch_init_registers()
H A Dtls.c4 #include <sys/ptrace.h>
51 ret = ptrace(PTRACE_SET_THREAD_AREA, pid, info->entry_number, os_set_thread_area()
62 ret = ptrace(PTRACE_GET_THREAD_AREA, pid, info->entry_number, os_get_thread_area()
H A Dmcontext.c3 #include <asm/ptrace.h>
4 #include <sysdep/ptrace.h>
/linux-4.1.27/arch/cris/include/asm/
H A Dptrace.h4 #include <uapi/asm/ptrace.h>
7 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
H A Dprocessor.h14 #include <asm/ptrace.h>
/linux-4.1.27/arch/x86/um/
H A Dbugs_64.c7 #include <sysdep/ptrace.h>
H A Dptrace_user.c11 if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0) ptrace_getregs()
18 if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0) ptrace_setregs()
H A Dfault.c6 #include <sysdep/ptrace.h>
H A Dsysrq_32.c10 #include <asm/ptrace.h>
H A Dsysrq_64.c12 #include <asm/ptrace.h>
H A Dbugs_32.c9 #include <sysdep/ptrace.h>
/linux-4.1.27/arch/score/kernel/
H A DMakefile7 obj-y += entry.o irq.o process.o ptrace.o \
/linux-4.1.27/arch/openrisc/kernel/
H A DMakefile8 traps.o time.o irq.o entry.o ptrace.o signal.o \
H A Dptrace.c2 * OpenRISC ptrace.c
26 #include <linux/ptrace.h>
79 * Set the thread state from a regset passed in via ptrace
147 * Called by kernel/ptrace.c when detaching..
H A Dasm-offsets.c32 #include <linux/ptrace.h>
47 DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); main()
/linux-4.1.27/arch/powerpc/include/asm/
H A Dsignal.h6 #include <uapi/asm/ptrace.h>
H A Dperf_event.h26 #include <asm/ptrace.h>
H A Dpmc.h23 #include <asm/ptrace.h>
/linux-4.1.27/arch/microblaze/include/uapi/asm/
H A Dsigcontext.h12 /* FIXME should be linux/ptrace.h */
13 #include <asm/ptrace.h>
H A Dptrace.h59 /* pt_regs offsets used by gdbserver etc in ptrace syscalls */
/linux-4.1.27/arch/um/os-Linux/
H A Dregisters.c9 #include <sys/ptrace.h>
10 #include <sysdep/ptrace.h>
18 err = ptrace(PTRACE_GETREGS, pid, 0, regs->gp); save_registers()
28 err = ptrace(PTRACE_SETREGS, pid, 0, regs->gp); restore_registers()
43 err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs); init_registers()
H A Dstart_up.c36 ptrace(PTRACE_TRACEME, 0, 0, 0) < 0) { ptrace_child()
37 perror("ptrace"); ptrace_child()
125 if (ptrace(PTRACE_CONT, pid, 0, 0) < 0) { stop_ptraced_child()
126 perror("stop_ptraced_child : ptrace failed"); stop_ptraced_child()
157 " Turns off syscall emulation patch for ptrace (SYSEMU) on.\n"
159 " behaviour of ptrace() and helps reducing host context switch rate.\n"
169 non_fatal("Checking syscall emulation patch for ptrace..."); check_sysemu()
173 if (ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0) check_sysemu()
183 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) check_sysemu()
191 n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_RET_OFFSET, os_getpid()); check_sysemu()
205 non_fatal("Checking advanced syscall emulation patch for ptrace..."); check_sysemu()
208 if ((ptrace(PTRACE_OLDSETOPTIONS, pid, 0, check_sysemu()
214 if (ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0) check_sysemu()
227 n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_RET_OFFSET, check_sysemu()
263 non_fatal("Checking that ptrace can change system call numbers..."); check_ptrace()
266 if ((ptrace(PTRACE_OLDSETOPTIONS, pid, 0, check_ptrace()
271 if (ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) check_ptrace()
272 fatal_perror("check_ptrace : ptrace failed"); check_ptrace()
283 syscall = ptrace(PTRACE_PEEKUSER, pid, PT_SYSCALL_NR_OFFSET, check_ptrace()
286 n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, check_ptrace()
H A Dprocess.c13 #include <sys/ptrace.h>
112 ptrace(PTRACE_KILL, pid); os_kill_ptraced_process()
113 ptrace(PTRACE_CONT, pid); os_kill_ptraced_process()
/linux-4.1.27/arch/x86/mm/kmemcheck/
H A Derror.h4 #include <linux/ptrace.h>
/linux-4.1.27/arch/x86/um/shared/sysdep/
H A Dsyscalls_32.h7 #include <sysdep/ptrace.h>
H A Dptrace_user.h19 * x86_64 FC3 doesn't define this in /usr/include/linux/ptrace.h even though
20 * it's defined in the kernel's include/linux/ptrace.h. Additionally, use the
H A Dptrace_32.h13 /* syscall emulation path in ptrace */
H A Dptrace_64.h29 /* Also defined in asm/ptrace-x86_64.h, but not in libc headers. So, these
33 /* These aren't defined in ptrace.h, but exist in struct user_regs_struct,
34 * which is what x86_64 ptrace actually uses.
H A Dstub_32.h9 #include <asm/ptrace.h>
/linux-4.1.27/arch/arm64/include/asm/xen/
H A Devents.h4 #include <asm/ptrace.h>
/linux-4.1.27/arch/c6x/kernel/
H A DMakefile7 obj-y := process.o traps.o irq.o signal.o ptrace.o
H A Dptrace.c13 #include <linux/ptrace.h>
23 * Called by kernel/ptrace.c when detaching.
140 * Perform ptrace request
/linux-4.1.27/arch/cris/arch-v10/kernel/
H A DMakefile9 process.o setup.o signal.o traps.o time.o ptrace.o \
H A Dptrace.c10 #include <linux/ptrace.h>
59 * Called by kernel/ptrace.c when detaching.
71 * Note that this implementation of ptrace behaves differently from vanilla
72 * ptrace. Contrary to what the man page says, in the PTRACE_PEEKTEXT,
75 * (in user space) where the result of the ptrace call is written (instead of
186 if (!(current->ptrace & PT_PTRACED)) do_syscall_trace()
191 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) do_syscall_trace()
/linux-4.1.27/arch/cris/arch-v32/kernel/
H A DMakefile9 process.o ptrace.o setup.o signal.o traps.o time.o \
/linux-4.1.27/arch/cris/kernel/
H A DMakefile9 obj-y := process.o traps.o irq.o ptrace.o setup.o time.o sys_cris.o
H A Dptrace.c2 * linux/arch/cris/kernel/ptrace.c
17 #include <linux/ptrace.h>
/linux-4.1.27/arch/m32r/kernel/
H A DMakefile8 m32r_ksyms.o sys_m32r.o signal.o ptrace.o
/linux-4.1.27/include/linux/
H A Dptrace.h9 #include <uapi/linux/ptrace.h>
14 * The owner ship rules for task->ptrace which holds the ptrace
15 * flags is simple. When a task is running it owns it's task->ptrace
16 * flags. When the a task is stopped the ptracer owns task->ptrace.
80 * process_vm_writev or ptrace (and should use the real credentials).
91 if (unlikely(child->ptrace)) ptrace_unlink()
113 if (unlikely(task->ptrace)) ptrace_parent()
119 * ptrace_event_enabled - test whether a ptrace event is enabled
129 return task->ptrace & PT_EVENT_FLAG(event); ptrace_event_enabled()
133 * ptrace_event - possibly stop for a ptrace event notification
138 * to the ptrace parent.
149 if ((current->ptrace & (PT_PTRACED|PT_SEIZED)) == PT_PTRACED) ptrace_event()
155 * ptrace_event_pid - possibly stop for a ptrace event notification
160 * to the ptrace parent. @pid is reported as the pid_t seen from the
161 * the ptrace parent's pid namespace.
186 * ptrace_init_task - initialize ptrace state for a new child
188 * @ptrace: true if child should be ptrace'd by parent's tracer
191 * list. @ptrace is false in the normal case, and true to ptrace @child.
195 static inline void ptrace_init_task(struct task_struct *child, bool ptrace) ptrace_init_task() argument
200 child->ptrace = 0; ptrace_init_task()
203 if (unlikely(ptrace) && current->ptrace) { ptrace_init_task()
204 child->ptrace = current->ptrace; ptrace_init_task()
207 if (child->ptrace & PT_SEIZED) ptrace_init_task()
217 * ptrace_release_task - final ptrace-related cleanup of a zombie being reaped
254 * <asm/ptrace.h> should define the following things inside #ifdef __KERNEL__.
348 * @code: current->exit_code value ptrace will stop with
349 * @info: siginfo_t pointer (or %NULL) for signal ptrace will stop with
360 * This is guaranteed to be invoked once before a task stops for ptrace and
361 * may include arch-specific operations necessary prior to a ptrace stop.
368 * arch_ptrace_stop - Do machine-specific work before stopping for ptrace
369 * @code: current->exit_code value ptrace will stop with
370 * @info: siginfo_t pointer (or %NULL) for signal ptrace will stop with
375 * ptrace stops. On ia64, register backing store gets written back to user
H A Dtracehook.h22 * user debugging or tracing facility (such as ptrace). The interfaces
50 #include <linux/ptrace.h>
56 * ptrace report for syscall entry and exit looks identical.
60 int ptrace = current->ptrace; ptrace_report_syscall() local
62 if (!(ptrace & PT_PTRACED)) ptrace_report_syscall()
65 ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); ptrace_report_syscall()
H A Derrno.h9 * codes, signal_pending() MUST be set. Note that ptrace can observe these
/linux-4.1.27/arch/frv/include/asm/
H A Dptrace.h0 /* ptrace.h: ptrace() relevant definitions
15 #include <uapi/asm/ptrace.h>
/linux-4.1.27/arch/mn10300/include/asm/
H A Dptrace.h1 /* MN10300 Exception frame layout and ptrace constants
14 #include <uapi/asm/ptrace.h>
H A Duser.h15 #include <linux/ptrace.h>
25 * returned from the ptrace(3,...) function.
H A Dkprobes.h25 #include <linux/ptrace.h>
/linux-4.1.27/arch/x86/include/asm/
H A Dmath_emu.h4 #include <asm/ptrace.h>
H A Dsighandling.h5 #include <linux/ptrace.h>
H A Dkmemcheck.h5 #include <asm/ptrace.h>
H A Duser.h25 * extended register state through ptrace and core-dump (NT_X86_XSTATE note)
44 * ptrace interface, they must ensure that the xsave_hdr.xstate_bv
H A Dvm86.h5 #include <asm/ptrace.h>
13 * at the end of the structure. Look at ptrace.h to see the "normal"
H A Dptrace.h6 #include <uapi/asm/ptrace.h>
157 #include <asm-generic/ptrace.h>
238 * because the usual ptrace stops run off the signal delivery path which
242 * So force IRET path after a ptrace stop.
H A Dkgdb.h20 * Linux's register image is defined by struct pt_regs in ptrace.h.
/linux-4.1.27/arch/sparc/include/asm/
H A Dperf_event.h5 #include <asm/ptrace.h>
H A Dvisasm.h10 #include <asm/ptrace.h>
/linux-4.1.27/arch/um/include/shared/
H A Darch.h9 #include <sysdep/ptrace.h>
H A Dirq_kern.h10 #include <asm/ptrace.h>
H A Dirq_user.h9 #include <sysdep/ptrace.h>
H A Dregisters.h9 #include <sysdep/ptrace.h>
H A Dptrace_user.h9 #include <sys/ptrace.h>
15 /* syscall emulation path in ptrace */
H A Das-layout.h38 #include <sysdep/ptrace.h>
/linux-4.1.27/arch/um/include/shared/skas/
H A Dskas.h9 #include <sysdep/ptrace.h>
/linux-4.1.27/arch/avr32/kernel/
H A DMakefile9 obj-y += setup.o traps.o ocd.o ptrace.o
/linux-4.1.27/arch/blackfin/include/asm/
H A Dpseudo_instructions.h13 #include <asm/ptrace.h>
H A Dptrace.h9 #include <uapi/asm/ptrace.h>
39 #include <asm-generic/ptrace.h>
H A Dsyscall.h23 #include <asm/ptrace.h>
71 * Assume the ptrace layout doesn't change -- r5 is first in memory, syscall_get_arguments()
72 * then r4, ..., then r0. So we simply reverse the ptrace register syscall_get_arguments()
H A Dfixed_code.h16 #include <linux/ptrace.h>
H A Dkgdb.h11 #include <linux/ptrace.h>
24 * Linux's register image is defined by struct pt_regs in ptrace.h.
/linux-4.1.27/arch/hexagon/kernel/
H A DMakefile6 obj-y += process.o trampoline.o reset.o ptrace.o vdso.o
/linux-4.1.27/arch/m68k/include/asm/
H A Dptrace.h4 #include <uapi/asm/ptrace.h>
/linux-4.1.27/arch/arm/include/asm/xen/
H A Devents.h4 #include <asm/ptrace.h>
/linux-4.1.27/arch/alpha/include/asm/
H A Dptrace.h4 #include <uapi/asm/ptrace.h>
/linux-4.1.27/security/apparmor/
H A Dipc.c16 #include <linux/ptrace.h>
24 /* call back to audit ptrace fields */ audit_cb()
33 * aa_audit_ptrace - do auditing for ptrace
66 /* TODO: currently only based on capability, not extended ptrace aa_may_ptrace()
78 * aa_ptrace - do ptrace permission check and auditing
81 * @mode: ptrace mode either PTRACE_MODE_READ || PTRACE_MODE_ATTACH
89 * tracer can ptrace tracee when aa_ptrace()
/linux-4.1.27/include/uapi/linux/
H A Dptrace.h3 /* ptrace.h */
4 /* structs and defines to help the user use the ptrace system call. */
33 * Generic ptrace interface that exports the architecture specific regsets
44 * ret = ptrace(PTRACE_GETREGSET/PTRACE_SETREGSET, pid, NT_XXX_TYPE, &iov);
96 #include <asm/ptrace.h>
/linux-4.1.27/arch/um/include/asm/
H A Dptrace-generic.h11 #include <asm/ptrace-abi.h>
12 #include <sysdep/ptrace.h>
H A Dstacktrace.h5 #include <linux/ptrace.h>
H A Dprocessor-generic.h13 #include <asm/ptrace.h>
/linux-4.1.27/arch/um/kernel/
H A Dexec.c9 #include <linux/ptrace.h>
45 current->ptrace &= ~PT_DTRACE; start_thread()
H A Dsignal.c7 #include <linux/ptrace.h>
28 if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED)) handle_signal()
103 if (current->ptrace & PT_DTRACE) kern_do_signal()
H A Dptrace.c7 #include <linux/ptrace.h>
14 child->ptrace |= PT_DTRACE; user_enable_single_step()
24 child->ptrace &= ~PT_DTRACE; user_disable_single_step()
33 * Called by kernel/ptrace.c when detaching..
150 int ptraced = current->ptrace; syscall_trace_leave()
H A DMakefile14 physmem.o process.o ptrace.o reboot.o sigio.o \
/linux-4.1.27/arch/um/kernel/skas/
H A Dsyscall.c7 #include <linux/ptrace.h>
9 #include <sysdep/ptrace.h>
/linux-4.1.27/arch/unicore32/include/asm/
H A Dptrace.h2 * linux/arch/unicore32/include/asm/ptrace.h
15 #include <uapi/asm/ptrace.h>
H A Dsuspend.h18 #include <asm/ptrace.h>
H A Dirqflags.h17 #include <asm/ptrace.h>
H A Dprocessor.h24 #include <asm/ptrace.h>
/linux-4.1.27/arch/m32r/include/asm/
H A Dptrace.h2 * linux/include/asm-m32r/ptrace.h
16 #include <uapi/asm/ptrace.h>
/linux-4.1.27/arch/unicore32/kernel/
H A DMakefile6 obj-y := dma.o elf.o entry.o process.o ptrace.o
H A Dptrace.c2 * linux/arch/unicore32/kernel/ptrace.c
15 #include <linux/ptrace.h>
54 * Called by kernel/ptrace.c when detaching..
121 if (!(current->ptrace & PT_PTRACED)) syscall_trace()
135 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) syscall_trace()
/linux-4.1.27/arch/microblaze/include/asm/
H A Dptrace.h11 #include <uapi/asm/ptrace.h>
H A Dentry.h17 #include <asm/ptrace.h>
H A Dsyscall.h7 #include <asm/ptrace.h>
/linux-4.1.27/arch/microblaze/kernel/
H A DMakefile19 platform.o process.o prom.o ptrace.o \
H A Dstacktrace.c16 #include <linux/ptrace.h>
H A Dptrace.c2 * `ptrace' system call
8 * derived from arch/v850/kernel/ptrace.c
13 * Derived from arch/mips/kernel/ptrace.c:
30 #include <linux/ptrace.h>
57 * care to save/restore almost all registers for ptrace'd reg_save_addr()
/linux-4.1.27/arch/score/include/asm/
H A Dptrace.h4 #include <uapi/asm/ptrace.h>
/linux-4.1.27/arch/sh/include/asm/
H A Dkgdb.h5 #include <asm/ptrace.h>
H A Dkprobes.h7 #include <linux/ptrace.h>
H A Dptrace.h13 #include <uapi/asm/ptrace.h>
116 #include <asm-generic/ptrace.h>
H A Dsyscall_64.h7 #include <asm/ptrace.h>
/linux-4.1.27/arch/parisc/include/asm/
H A Dptrace.h7 #include <uapi/asm/ptrace.h>
H A Dsyscall.h9 #include <asm/ptrace.h>
/linux-4.1.27/arch/frv/kernel/
H A DMakefile11 process.o traps.o ptrace.o signal.o dma.o \
/linux-4.1.27/arch/m68k/kernel/
H A DMakefile16 obj-y := entry.o irq.o m68k_ksyms.o module.o process.o ptrace.o
H A Dptrace.c2 * linux/arch/m68k/kernel/ptrace.c
5 * Taken from linux/kernel/ptrace.c and modified for M680x0.
6 * linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
18 #include <linux/ptrace.h>
134 * Called by kernel/ptrace.c when detaching..
276 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) syscall_trace()
/linux-4.1.27/arch/arm/include/asm/
H A Dstacktrace.h4 #include <asm/ptrace.h>
H A Duser.h5 #include <asm/ptrace.h>
54 from the ptrace(3,...) function. */
56 /* ptrace does not yet supply these. Someday.... */
86 * are ignored by the ptrace system call and the signal handler.
/linux-4.1.27/arch/arm/kernel/
H A Dperf_regs.c7 #include <asm/ptrace.h>
/linux-4.1.27/arch/arc/include/uapi/asm/
H A Dsigcontext.h12 #include <asm/ptrace.h>
H A Delf.h12 #include <asm/ptrace.h> /* for user_regs_struct */
/linux-4.1.27/arch/frv/include/uapi/asm/
H A Dptrace.h0 /* ptrace.h: ptrace() relevant definitions
50 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
/linux-4.1.27/tools/testing/selftests/breakpoints/
H A Dbreakpoint_test.c10 #include <sys/ptrace.h>
43 ret = ptrace(PTRACE_POKEUSER, child_pid, set_breakpoint_addr()
86 dr7 = ptrace(PTRACE_PEEKUSER, child_pid, toggle_breakpoint()
106 ret = ptrace(PTRACE_POKEUSER, child_pid, toggle_breakpoint()
207 ret = ptrace(PTRACE_TRACEME, 0, NULL, 0); trigger_tests()
274 child_nr_tests = ptrace(PTRACE_PEEKDATA, child_pid, check_success()
278 if (ptrace(PTRACE_POKEDATA, child_pid, &trapped, 1)) { check_success()
296 ptrace(PTRACE_CONT, child_pid, NULL, 0); launch_instruction_breakpoints()
318 ptrace(PTRACE_CONT, child_pid, NULL, 0); launch_watchpoints()
366 ptrace(PTRACE_CONT, child_pid, NULL, 0); launch_tests()
370 ptrace(PTRACE_CONT, child_pid, NULL, 0); launch_tests()
373 ptrace(PTRACE_CONT, child_pid, NULL, 0); launch_tests()
/linux-4.1.27/arch/blackfin/kernel/
H A Dptrace.c2 * linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
14 #include <linux/ptrace.h>
101 pr_warning("ptrace: ignore syscfg write of %#lx\n", data); put_reg()
257 pr_debug("ptrace: PEEKDATA\n"); arch_ptrace()
265 pr_debug("ptrace: PEEKTEXT at addr 0x%08lx + %i\n", addr, to_copy); arch_ptrace()
268 pr_debug("ptrace: user address is valid\n"); arch_ptrace()
302 pr_debug("ptrace: copied size %d [0x%08lx]\n", copied, tmp); arch_ptrace()
310 pr_debug("ptrace: PTRACE_PEEKDATA\n"); arch_ptrace()
317 pr_debug("ptrace: POKETEXT at addr 0x%08lx + %i bytes %lx\n", arch_ptrace()
321 pr_debug("ptrace: user address is valid\n"); arch_ptrace()
342 pr_debug("ptrace: copied size %d\n", copied); arch_ptrace()
363 pr_debug("ptrace: PEEKUSR reg %li with %#lx = %i\n", addr, data, ret); arch_ptrace()
368 pr_debug("ptrace: POKEUSR reg %li with %li = %i\n", addr, data, ret); arch_ptrace()
372 pr_debug("ptrace: PTRACE_GETREGS\n"); arch_ptrace()
379 pr_debug("ptrace: PTRACE_SETREGS\n"); arch_ptrace()
H A DMakefile8 entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o \
H A Dsys_bfin.c25 #include <asm/ptrace.h>
/linux-4.1.27/arch/s390/kernel/
H A Dcompat_ptrace.h4 #include <asm/ptrace.h> /* needed for NUM_CR_WORDS */
29 * itself as there is no "official" ptrace interface for hardware
38 is returned from the ptrace(3,...) function. */
H A DMakefile32 obj-y += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o
H A Dmcount.S11 #include <asm/ptrace.h>
/linux-4.1.27/arch/sh/kernel/
H A Dperf_callchain.c15 #include <asm/ptrace.h>
H A Dptrace.c1 #include <linux/ptrace.h>
H A DMakefile17 process_$(BITS).o ptrace.o ptrace_$(BITS).o \
H A Dstacktrace.c17 #include <asm/ptrace.h>
/linux-4.1.27/arch/tile/kernel/
H A DMakefile7 pci-dma.o proc.o process.o ptrace.o reboot.o \
H A Dptrace.c18 #include <linux/ptrace.h>
43 * Called by kernel/ptrace.c when detaching..
217 /* Support TILE-specific ptrace options. */ arch_ptrace()
223 unsigned int flags = child->ptrace; arch_ptrace()
226 child->ptrace = flags; arch_ptrace()
/linux-4.1.27/arch/unicore32/include/uapi/asm/
H A Dsigcontext.h15 #include <asm/ptrace.h>
H A Dptrace.h2 * linux/arch/unicore32/include/asm/ptrace.h
/linux-4.1.27/arch/mips/sgi-ip32/
H A Dip32-berr.c16 #include <asm/ptrace.h>
/linux-4.1.27/arch/mn10300/kernel/
H A DMakefile10 ptrace.o setup.o time.o sys_mn10300.o io.o \
/linux-4.1.27/arch/parisc/kernel/
H A DMakefile9 ptrace.o hardware.o inventory.o drivers.o \
H A Dpa7300lc.c11 #include <asm/ptrace.h>
/linux-4.1.27/arch/c6x/include/asm/
H A Dptrace.h14 #include <uapi/asm/ptrace.h>
/linux-4.1.27/arch/cris/include/arch-v32/arch/
H A Dirqflags.h5 #include <arch/ptrace.h>
H A Dptrace.h4 /* Register numbers in the ptrace system call interface */
52 * ptrace but is also the frame format used in the kernel prologue/epilogues
H A Delf.h18 #include <asm/ptrace.h>
/linux-4.1.27/arch/cris/include/uapi/asm/
H A Dsigcontext.h6 #include <asm/ptrace.h>
/linux-4.1.27/arch/arc/include/asm/
H A Dbug.h14 #include <asm/ptrace.h>
H A Dunaligned.h15 #include <asm/ptrace.h>
/linux-4.1.27/arch/arc/kernel/
H A DMakefile11 obj-y := arcksyms.o setup.o irq.o time.o reset.o ptrace.o entry.o process.o
/linux-4.1.27/arch/xtensa/include/asm/
H A Dptrace.h2 * include/asm-xtensa/ptrace.h
13 #include <uapi/asm/ptrace.h>
H A Dtraps.h13 #include <asm/ptrace.h>
/linux-4.1.27/arch/xtensa/include/uapi/asm/
H A Dptrace.h2 * include/asm-xtensa/ptrace.h
69 /* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */
/linux-4.1.27/arch/xtensa/kernel/
H A Dptrace.c20 #include <linux/ptrace.h>
28 #include <asm/ptrace.h>
35 child->ptrace |= PT_SINGLESTEP; user_enable_single_step()
40 child->ptrace &= ~PT_SINGLESTEP; user_disable_single_step()
44 * Called by kernel/ptrace.c when detaching to disable single stepping.
325 ptrace_notify(SIGTRAP|((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); do_syscall_trace()
341 && (current->ptrace & PT_PTRACED)) do_syscall_trace_enter()
352 && (current->ptrace & PT_PTRACED)) do_syscall_trace_leave()
H A DMakefile8 ptrace.o setup.o signal.o stacktrace.o syscall.o time.o traps.o \
H A Dasm-offsets.c21 #include <linux/ptrace.h>
25 #include <asm/ptrace.h>
72 DEFINE(TASK_PTRACE, offsetof (struct task_struct, ptrace)); main()
/linux-4.1.27/kernel/
H A Dptrace.c2 * linux/kernel/ptrace.c
6 * Common interfaces for "ptrace()" which we do not want
17 #include <linux/ptrace.h>
32 * ptrace a task: make the debugger its new parent and
33 * move it to the ptrace list.
48 * Remove @child from the ptrace list, move it back to the original parent,
74 BUG_ON(!child->ptrace); __ptrace_unlink()
76 child->ptrace = 0; __ptrace_unlink()
145 WARN_ON(!task->ptrace || task->parent != current); ptrace_unfreeze_traced()
156 * ptrace_check_attach - check whether ptracee is ready for ptrace operation
161 * ptrace operations. If @ignore_state is %false, @child also should be in
184 if (child->ptrace && child->parent == current) { ptrace_check_attach()
227 WARN(1, "denying ptrace access check without PTRACE_MODE_*CREDS\n"); __ptrace_may_access()
232 * This check is used both for attaching with ptrace __ptrace_may_access()
325 * under ptrace. ptrace_attach()
341 if (task->ptrace) ptrace_attach()
350 task->ptrace = flags; ptrace_attach()
402 * Should be used by all ptrace implementations for PTRACE_TRACEME.
410 if (!current->ptrace) { ptrace_traceme()
418 current->ptrace = PT_PTRACED; ptrace_traceme()
451 * children self-reap, then this child was prevented by ptrace and we must
494 WARN_ON(!child->ptrace || child->exit_state); ptrace_detach()
509 * Detach all tasks we were using ptrace on. Called with tasklist held
517 if (unlikely(p->ptrace & PT_EXITKILL)) exit_ptrace()
583 flags = child->ptrace; ptrace_setoptions()
586 child->ptrace = flags; ptrace_setoptions()
825 bool seized = child->ptrace & PT_SEIZED; ptrace_request()
939 * wait(2) or ptrace(2). If an async event (e.g. group ptrace_request()
1055 SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, SYSCALL_DEFINE4()
1078 * a ptrace attach. SYSCALL_DEFINE4()
1201 COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid, COMPAT_SYSCALL_DEFINE4()
1222 * a ptrace attach. COMPAT_SYSCALL_DEFINE4()
H A Dexit.c27 #include <linux/ptrace.h>
354 * ptrace or page migration (get_task_mm()). Mark owner as NULL.
532 if (!p->ptrace && reparent_leader()
568 BUG_ON((!t->ptrace) != (t->parent == father)); for_each_thread()
569 if (likely(!t->ptrace)) for_each_thread()
601 if (unlikely(tsk->ptrace)) { exit_notify()
918 eligible_child(struct wait_opts *wo, bool ptrace, struct task_struct *p) eligible_child() argument
927 if (ptrace || (wo->wo_flags & __WALL)) eligible_child()
1127 static int *task_stopped_code(struct task_struct *p, bool ptrace) task_stopped_code() argument
1129 if (ptrace) { task_stopped_code()
1143 * @ptrace: is the wait for ptrace
1159 int ptrace, struct task_struct *p) wait_task_stopped()
1167 * Traditionally we see ptrace'd stopped tasks regardless of options. wait_task_stopped()
1169 if (!ptrace && !(wo->wo_flags & WUNTRACED)) wait_task_stopped()
1172 if (!task_stopped_code(p, ptrace)) wait_task_stopped()
1178 p_code = task_stopped_code(p, ptrace); wait_task_stopped()
1204 why = ptrace ? CLD_TRAPPED : CLD_STOPPED; wait_task_stopped()
1297 static int wait_consider_task(struct wait_opts *wo, int ptrace, wait_consider_task() argument
1311 ret = eligible_child(wo, ptrace, p); wait_consider_task()
1331 * ptrace == 0 means we are the natural parent. In this case wait_consider_task()
1334 if (likely(!ptrace)) wait_consider_task()
1339 if (likely(!ptrace) && unlikely(p->ptrace)) { wait_consider_task()
1346 * a single stop can be reported twice as group and ptrace stop. wait_consider_task()
1352 ptrace = 1; wait_consider_task()
1364 if (unlikely(ptrace) || likely(!p->ptrace)) wait_consider_task()
1372 * When !@ptrace: wait_consider_task()
1382 * When @ptrace: wait_consider_task()
1388 if (likely(!ptrace) || (wo->wo_flags & (WCONTINUED | WEXITED))) wait_consider_task()
1399 * Wait for stopped. Depending on @ptrace, different stopped state wait_consider_task()
1402 ret = wait_task_stopped(wo, ptrace, p); wait_consider_task()
1158 wait_task_stopped(struct wait_opts *wo, int ptrace, struct task_struct *p) wait_task_stopped() argument
/linux-4.1.27/arch/um/os-Linux/skas/
H A Dprocess.c34 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) ptrace_dump_regs()
65 err = ptrace(PTRACE_CONT, pid, 0, 0); wait_stub_done()
100 err = ptrace(PTRACE_CONT, pid, 0, SIGSEGV); get_skas_faultinfo()
145 err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, handle_trap()
153 err = ptrace(PTRACE_SYSCALL, pid, 0, 0); handle_trap()
185 ptrace(PTRACE_TRACEME, 0, 0, 0); userspace_tramp()
294 if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL, start_userspace()
343 if (ptrace(PTRACE_SETREGS, pid, 0, regs->gp)) userspace()
355 if (ptrace(op, pid, 0, 0)) { userspace()
356 printk(UM_KERN_ERR "userspace - ptrace continue " userspace()
369 if (ptrace(PTRACE_GETREGS, pid, 0, regs->gp)) { userspace()
386 ptrace(PTRACE_GETSIGINFO, pid, 0, (struct siginfo *)&si); userspace()
503 err = ptrace(PTRACE_CONT, pid, 0, 0); copy_context_skas0()
532 if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL, copy_context_skas0()
/linux-4.1.27/security/yama/
H A Dyama_lsm.c17 #include <linux/ptrace.h>
29 /* describe a ptrace relationship for potential exception */
66 * @tracer: the task_struct of the process doing the ptrace
242 * @tracer: the task_struct of the process attempting ptrace
277 * @child: task that current task is attempting to ptrace
278 * @mode: ptrace attach mode
280 * Returns 0 if following the ptrace is allowed, -ve on error.
294 /* require ptrace target be a child of ptracer on attach */ yama_ptrace_access_check()
323 "ptrace of pid %d was attempted by: %s (pid %d)\n", yama_ptrace_access_check()
334 * Returns 0 if following the ptrace is allowed, -ve on error.
/linux-4.1.27/arch/blackfin/include/uapi/asm/
H A Dptrace.h90 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
92 #define PTRACE_SETREGS 13 /* ptrace signal */
104 * Offsets used by 'ptrace' system call interface.
/linux-4.1.27/arch/metag/include/uapi/asm/
H A Dsigcontext.h4 #include <asm/ptrace.h>
/linux-4.1.27/include/trace/events/
H A Dsyscalls.h10 #include <asm/ptrace.h>
/linux-4.1.27/include/trace/
H A Dsyscall.h9 #include <asm/ptrace.h>
/linux-4.1.27/arch/powerpc/platforms/chrp/
H A Dsmp.c19 #include <asm/ptrace.h>
/linux-4.1.27/arch/mips/include/asm/
H A Dstacktrace.h4 #include <asm/ptrace.h>
H A Dbranch.h13 #include <asm/ptrace.h>
/linux-4.1.27/arch/openrisc/include/uapi/asm/
H A Dptrace.h24 * This is the layout of the regset returned by the GETREGSET ptrace call
H A Dsigcontext.h22 #include <asm/ptrace.h>
H A Delf.h33 #include <asm/ptrace.h>
/linux-4.1.27/arch/parisc/math-emu/
H A Dmath-emu.h24 #include <asm/ptrace.h>
/linux-4.1.27/arch/powerpc/kernel/
H A Dstacktrace.c16 #include <asm/ptrace.h>
H A Dsys_ppc32.c40 #include <linux/ptrace.h>
45 #include <asm/ptrace.h>
/linux-4.1.27/arch/arm64/kernel/
H A Dperf_regs.c8 #include <asm/ptrace.h>
H A DMakefile16 entry-fpsimd.o process.o ptrace.o setup.o signal.o \
H A Ddebug-monitors.c25 #include <linux/ptrace.h>
248 * ptrace will disable single step unless explicitly single_step_handler()
377 TRAP_BRKPT, "ptrace BRK handler"); debug_traps_init()
421 /* ptrace API */ user_enable_single_step()
/linux-4.1.27/arch/avr32/include/asm/
H A Dptrace.h11 #include <uapi/asm/ptrace.h>
/linux-4.1.27/arch/alpha/kernel/
H A Dasm-offsets.c10 #include <linux/ptrace.h>
/linux-4.1.27/samples/bpf/
H A Dtracex4_kern.c7 #include <linux/ptrace.h>
/linux-4.1.27/arch/tile/include/uapi/asm/
H A Dptrace.h87 /* Support TILE-specific ptrace options, with events starting at 16. */
92 * Flag bits in pt_regs.flags that are part of the ptrace API.
/linux-4.1.27/arch/s390/include/uapi/asm/
H A Dptrace.h11 * Offsets in the user_regs_struct. They are used for the ptrace
53 * A nasty fact of life that the ptrace api
294 * The following structures are used only for the ptrace interface, don't
296 * ptrace interface. In particular stay away from it for in-kernel PER.
389 * S/390 specific non posix ptrace requests. I chose unusual values so
390 * they are unlikely to clash with future ptrace definitions.
407 * not overlap with any of the number assigned in <linux/ptrace.h>.
450 * itself as there is no "official" ptrace interface for hardware
/linux-4.1.27/arch/mn10300/include/uapi/asm/
H A Dptrace.h1 /* MN10300 Exception frame layout and ptrace constants
78 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
/linux-4.1.27/arch/arm64/include/asm/
H A Dfpsimd.h19 #include <asm/ptrace.h>
29 * relied upon in the ptrace FP/SIMD accessors.
H A Dptrace.h2 * Based on arch/arm/include/asm/ptrace.h
22 #include <uapi/asm/ptrace.h>
28 /* AArch32-specific ptrace requests */
H A Dkgdb.h25 #include <linux/ptrace.h>
/linux-4.1.27/drivers/connector/
H A Dcn_proc.c31 #include <linux/ptrace.h>
203 ev->event_data.ptrace.process_pid = task->pid; proc_ptrace_connector()
204 ev->event_data.ptrace.process_tgid = task->tgid; proc_ptrace_connector()
206 ev->event_data.ptrace.tracer_pid = current->pid; proc_ptrace_connector()
207 ev->event_data.ptrace.tracer_tgid = current->tgid; proc_ptrace_connector()
209 ev->event_data.ptrace.tracer_pid = 0; proc_ptrace_connector()
210 ev->event_data.ptrace.tracer_tgid = 0; proc_ptrace_connector()
/linux-4.1.27/arch/s390/include/asm/
H A Dptrace.h9 #include <uapi/asm/ptrace.h>
100 * Simplified per_info structure used to decode the ptrace user space ABI.
145 * These are defined as per linux/ptrace.h, which see.
/linux-4.1.27/arch/openrisc/include/asm/
H A Dptrace.h23 #include <uapi/asm/ptrace.h>
86 * Offsets used by 'ptrace' system call interface.
/linux-4.1.27/arch/cris/include/arch-v10/arch/
H A Dptrace.h10 /* Register numbers in the ptrace system call interface */
54 * ptrace but is also the frame format used in the kernel prologue/epilogues
H A Dprocessor.h64 * anymore, so switch frame-types (see ptrace.h)
/linux-4.1.27/arch/m32r/include/uapi/asm/
H A Dptrace.h2 * linux/include/asm-m32r/ptrace.h
110 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
/linux-4.1.27/drivers/s390/char/
H A Dsclp_quiesce.c16 #include <asm/ptrace.h>
/linux-4.1.27/drivers/oprofile/
H A Dtimer_int.c19 #include <asm/ptrace.h>
/linux-4.1.27/arch/x86/include/uapi/asm/
H A Dptrace-abi.h66 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
H A Dptrace.h5 #include <asm/ptrace-abi.h>
/linux-4.1.27/arch/x86/um/asm/
H A Dptrace.h8 #include <asm/ptrace-generic.h>
/linux-4.1.27/arch/sh/oprofile/
H A Dbacktrace.c21 #include <asm/ptrace.h>
/linux-4.1.27/arch/sparc/kernel/
H A Dkstack.h6 #include <asm/ptrace.h>
H A Dsigutil_64.c9 #include <asm/ptrace.h>
H A Dstacktrace.c6 #include <asm/ptrace.h>
/linux-4.1.27/arch/sparc/lib/
H A DVISsave.S11 #include <asm/ptrace.h>
H A Dlocks.S9 #include <asm/ptrace.h>
/linux-4.1.27/arch/tile/include/asm/
H A Dkprobes.h21 #include <linux/ptrace.h>
H A Dpmc.h18 #include <linux/ptrace.h>
/linux-4.1.27/arch/metag/kernel/
H A Dperf_callchain.c11 #include <asm/ptrace.h>
/linux-4.1.27/arch/sh/kernel/cpu/irq/
H A Dimask.c10 #include <linux/ptrace.h>
/linux-4.1.27/arch/mips/rb532/
H A Dtime.c23 #include <linux/ptrace.h>
/linux-4.1.27/arch/nios2/include/uapi/asm/
H A Delf.h23 #include <linux/ptrace.h>
H A Dptrace.h20 * Register numbers used by 'ptrace' system call interface.
/linux-4.1.27/arch/parisc/include/uapi/asm/
H A Dptrace.h38 * not overlap with any of the number assigned in <linux/ptrace.h>.
/linux-4.1.27/arch/powerpc/include/uapi/asm/
H A Dptrace.h16 * the PT_* values below. This simplifies arch/powerpc/kernel/ptrace.c.
58 * Offsets used by 'ptrace' system call interface.
146 * ptrace interface. This allows signal handling and ptrace to use the same
/linux-4.1.27/arch/arm64/include/uapi/asm/
H A Dptrace.h2 * Based on arch/arm/include/asm/ptrace.h

Completed in 5918 milliseconds

12345