/* * Access to user system call parameters and results * * 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. * * See asm-generic/syscall.h for descriptions of what we must do here. * * Copyright (C) 2012 Ralf Baechle <ralf@linux-mips.org>
*/
staticinlinevoid syscall_set_nr(struct task_struct *task, struct pt_regs *regs, int nr)
{ /* * New syscall number has to be assigned to regs[2] because * it is loaded from there unconditionally after return from * syscall_trace_enter() invocation. * * Consequently, if the syscall was indirect and nr != __NR_syscall, * then after this assignment the syscall will cease to be indirect.
*/
task_thread_info(task)->syscall = regs->regs[2] = nr;
}
staticinlinevoid mips_syscall_update_nr(struct task_struct *task, struct pt_regs *regs)
{ /* * v0 is the system call number, except for O32 ABI syscall(), where it * ends up in a0.
*/ if (mips_syscall_is_indirect(task, regs))
task_thread_info(task)->syscall = regs->regs[4]; else
task_thread_info(task)->syscall = regs->regs[2];
}
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.