Path: blob/master/arch/parisc/include/asm/compat_rt_sigframe.h
10818 views
#include<linux/compat.h>1#include<linux/compat_siginfo.h>2#include<asm/compat_ucontext.h>34#ifndef _ASM_PARISC_COMPAT_RT_SIGFRAME_H5#define _ASM_PARISC_COMPAT_RT_SIGFRAME_H67/* In a deft move of uber-hackery, we decide to carry the top half of all8* 64-bit registers in a non-portable, non-ABI, hidden structure.9* Userspace can read the hidden structure if it *wants* but is never10* guaranteed to be in the same place. Infact the uc_sigmask from the11* ucontext_t structure may push the hidden register file downards12*/13struct compat_regfile {14/* Upper half of all the 64-bit registers that were truncated15on a copy to a 32-bit userspace */16compat_int_t rf_gr[32];17compat_int_t rf_iasq[2];18compat_int_t rf_iaoq[2];19compat_int_t rf_sar;20};2122#define COMPAT_SIGRETURN_TRAMP 423#define COMPAT_SIGRESTARTBLOCK_TRAMP 524#define COMPAT_TRAMP_SIZE (COMPAT_SIGRETURN_TRAMP + COMPAT_SIGRESTARTBLOCK_TRAMP)2526struct compat_rt_sigframe {27/* XXX: Must match trampoline size in arch/parisc/kernel/signal.c28Secondary to that it must protect the ERESTART_RESTARTBLOCK29trampoline we left on the stack (we were bad and didn't30change sp so we could run really fast.) */31compat_uint_t tramp[COMPAT_TRAMP_SIZE];32compat_siginfo_t info;33struct compat_ucontext uc;34/* Hidden location of truncated registers, *must* be last. */35struct compat_regfile regs;36};3738/*39* The 32-bit ABI wants at least 48 bytes for a function call frame:40* 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of41* which Linux/parisc uses is sp-20 for the saved return pointer...)42* Then, the stack pointer must be rounded to a cache line (64 bytes).43*/44#define SIGFRAME32 6445#define FUNCTIONCALLFRAME32 4846#define PARISC_RT_SIGFRAME_SIZE32 \47(((sizeof(struct compat_rt_sigframe) + FUNCTIONCALLFRAME32) + SIGFRAME32) & -SIGFRAME32)4849#endif505152