~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/parisc/kernel/signal32.h

Version: ~ [ linux-5.2 ] ~ [ linux-5.1.16 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.57 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.132 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.184 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.184 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* 
  2  *    Copyright (C) 2001 Matthew Wilcox <willy at parisc-linux.org>
  3  *    Copyright (C) 2003 Carlos O'Donell <carlos at parisc-linux.org>
  4  *
  5  *    This program is free software; you can redistribute it and/or modify
  6  *    it under the terms of the GNU General Public License as published by
  7  *    the Free Software Foundation; either version 2 of the License, or
  8  *    (at your option) any later version.
  9  *
 10  *    This program is distributed in the hope that it will be useful,
 11  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  *    GNU General Public License for more details.
 14  *
 15  *    You should have received a copy of the GNU General Public License
 16  *    along with this program; if not, write to the Free Software
 17  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 18  */
 19 #ifndef _PARISC64_KERNEL_SIGNAL32_H
 20 #define _PARISC64_KERNEL_SIGNAL32_H
 21 
 22 #include <linux/compat.h>
 23 
 24 /* 32-bit ucontext as seen from an 64-bit kernel */
 25 struct compat_ucontext {
 26         compat_uint_t uc_flags;
 27         compat_uptr_t uc_link;
 28         compat_stack_t uc_stack;        /* struct compat_sigaltstack (12 bytes)*/
 29         /* FIXME: Pad out to get uc_mcontext to start at an 8-byte aligned boundary */
 30         compat_uint_t pad[1];
 31         struct compat_sigcontext uc_mcontext;
 32         compat_sigset_t uc_sigmask;     /* mask last for extensibility */
 33 };
 34 
 35 /* ELF32 signal handling */
 36 
 37 int copy_siginfo_to_user32 (compat_siginfo_t __user *to, const siginfo_t *from);
 38 int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from);
 39 
 40 /* In a deft move of uber-hackery, we decide to carry the top half of all
 41  * 64-bit registers in a non-portable, non-ABI, hidden structure.
 42  * Userspace can read the hidden structure if it *wants* but is never
 43  * guaranteed to be in the same place. In fact the uc_sigmask from the
 44  * ucontext_t structure may push the hidden register file downards
 45  */
 46 struct compat_regfile {
 47         /* Upper half of all the 64-bit registers that were truncated
 48            on a copy to a 32-bit userspace */
 49         compat_int_t rf_gr[32];
 50         compat_int_t rf_iasq[2];
 51         compat_int_t rf_iaoq[2];
 52         compat_int_t rf_sar;
 53 };
 54 
 55 #define COMPAT_SIGRETURN_TRAMP 4
 56 #define COMPAT_SIGRESTARTBLOCK_TRAMP 5
 57 #define COMPAT_TRAMP_SIZE (COMPAT_SIGRETURN_TRAMP + \
 58                                 COMPAT_SIGRESTARTBLOCK_TRAMP)
 59 
 60 struct compat_rt_sigframe {
 61         /* XXX: Must match trampoline size in arch/parisc/kernel/signal.c
 62                 Secondary to that it must protect the ERESTART_RESTARTBLOCK
 63                 trampoline we left on the stack (we were bad and didn't
 64                 change sp so we could run really fast.) */
 65         compat_uint_t tramp[COMPAT_TRAMP_SIZE];
 66         compat_siginfo_t info;
 67         struct compat_ucontext uc;
 68         /* Hidden location of truncated registers, *must* be last. */
 69         struct compat_regfile regs;
 70 };
 71 
 72 /*
 73  * The 32-bit ABI wants at least 48 bytes for a function call frame:
 74  * 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of
 75  * which Linux/parisc uses is sp-20 for the saved return pointer...)
 76  * Then, the stack pointer must be rounded to a cache line (64 bytes).
 77  */
 78 #define SIGFRAME32              64
 79 #define FUNCTIONCALLFRAME32     48
 80 #define PARISC_RT_SIGFRAME_SIZE32 (((sizeof(struct compat_rt_sigframe) + FUNCTIONCALLFRAME32) + SIGFRAME32) & -SIGFRAME32)
 81 
 82 void sigset_32to64(sigset_t *s64, compat_sigset_t *s32);
 83 void sigset_64to32(compat_sigset_t *s32, sigset_t *s64);
 84 long restore_sigcontext32(struct compat_sigcontext __user *sc, 
 85                 struct compat_regfile __user *rf,
 86                 struct pt_regs *regs);
 87 long setup_sigcontext32(struct compat_sigcontext __user *sc, 
 88                 struct compat_regfile __user *rf,
 89                 struct pt_regs *regs, int in_syscall);
 90 
 91 #endif
 92 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp