/* * `ptrace' system call * * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> * Copyright (C) 2007-2009 PetaLogix * Copyright (C) 2004-2007 John Williams <john.williams@petalogix.com> * * derived from arch/v850/kernel/ptrace.c * * Copyright (C) 2002,03 NEC Electronics Corporation * Copyright (C) 2002,03 Miles Bader <miles@gnu.org> * * Derived from arch/mips/kernel/ptrace.c: * * Copyright (C) 1992 Ross Biro * Copyright (C) Linus Torvalds * Copyright (C) 1994, 95, 96, 97, 98, 2000 Ralf Baechle * Copyright (C) 1996 David S. Miller * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com * Copyright (C) 1999 MIPS Technologies, Inc. * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this * archive for more details.
*/
/* Returns the address where the register at REG_OFFS in P is stashed away. */ static microblaze_reg_t *reg_save_addr(unsigned reg_offs, struct task_struct *t)
{ struct pt_regs *regs;
/* * Three basic cases: * * (1) A register normally saved before calling the scheduler, is * available in the kernel entry pt_regs structure at the top * of the kernel stack. The kernel trap/irq exit path takes * care to save/restore almost all registers for ptrace'd * processes. * * (2) A call-clobbered register, where the process P entered the * kernel via [syscall] trap, is not stored anywhere; that's * OK, because such registers are not expected to be preserved * when the trap returns anyway (so we don't actually bother to * test for this case). * * (3) A few registers not used at all by the kernel, and so * normally never saved except by context-switches, are in the * context switch state.
*/
/* Register saved during kernel entry (or not available). */
regs = task_pt_regs(t);
asmlinkage unsignedlong do_syscall_trace_enter(struct pt_regs *regs)
{ unsignedlong ret = 0;
secure_computing_strict(regs->r12);
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
ptrace_report_syscall_entry(regs)) /* * Tracing decided this syscall should not happen. * We'll return a bogus call number to get an ENOSYS * error, but leave the original number in regs->regs[0].
*/
ret = -1L;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.