/* * Signal handling * * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> * Copyright (C) 2008-2009 PetaLogix * Copyright (C) 2003,2004 John Williams <jwilliams@itee.uq.edu.au> * Copyright (C) 2001 NEC Corporation * Copyright (C) 2001 Miles Bader <miles@gnu.org> * Copyright (C) 1999,2000 Niibe Yutaka & Kaz Kojima * Copyright (C) 1991,1992 Linus Torvalds * * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson * * This file was derived from the sh version, arch/sh/kernel/signal.c * * 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.
*/
/* * Do a signal return; undo the signal stack.
*/ struct sigframe { struct sigcontext sc; unsignedlong extramask[_NSIG_WORDS-1]; unsignedlong tramp[2]; /* signal trampoline */
};
/* Set up to return from userspace. If provided, use a stub
already in userspace. */ /* minus 8 is offset to cater for "rtsd r15,8" */ /* addi r12, r0, __NR_sigreturn */
err |= __put_user(0x31800000 | __NR_rt_sigreturn ,
frame->tramp + 0); /* brki r14, 0x8 */
err |= __put_user(0xb9cc0008, frame->tramp + 1);
/* Return from sighandler will jump to the tramp.
Negative 8 offset because return is rtsd r15, 8 */
regs->r15 = ((unsignedlong)frame->tramp)-8;
/* * Note that 'init' is a special process: it doesn't get signals it doesn't * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. * * Note that we go through the signals twice: once to check the signals that * the kernel can handle, and then we build all the user-level signal handling * stack-frames in one go after that.
*/ staticvoid do_signal(struct pt_regs *regs, int in_syscall)
{ struct ksignal ksig;
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.