1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19#ifndef _PARISC64_KERNEL_SIGNAL32_H
20#define _PARISC64_KERNEL_SIGNAL32_H
21
22#include <linux/compat.h>
23
24typedef compat_uptr_t compat_sighandler_t;
25
26typedef struct compat_sigaltstack {
27 compat_uptr_t ss_sp;
28 compat_int_t ss_flags;
29 compat_size_t ss_size;
30} compat_stack_t;
31
32
33
34
35struct compat_sigaction {
36 compat_sighandler_t sa_handler;
37 compat_uint_t sa_flags;
38 compat_sigset_t sa_mask;
39};
40
41
42struct compat_ucontext {
43 compat_uint_t uc_flags;
44 compat_uptr_t uc_link;
45 compat_stack_t uc_stack;
46
47 compat_uint_t pad[1];
48 struct compat_sigcontext uc_mcontext;
49 compat_sigset_t uc_sigmask;
50};
51
52
53
54struct k_sigaction32 {
55 struct compat_sigaction sa;
56};
57
58typedef struct compat_siginfo {
59 int si_signo;
60 int si_errno;
61 int si_code;
62
63 union {
64 int _pad[((128/sizeof(int)) - 3)];
65
66
67 struct {
68 unsigned int _pid;
69 unsigned int _uid;
70 } _kill;
71
72
73 struct {
74 compat_timer_t _tid;
75 int _overrun;
76 char _pad[sizeof(unsigned int) - sizeof(int)];
77 compat_sigval_t _sigval;
78 int _sys_private;
79 } _timer;
80
81
82 struct {
83 unsigned int _pid;
84 unsigned int _uid;
85 compat_sigval_t _sigval;
86 } _rt;
87
88
89 struct {
90 unsigned int _pid;
91 unsigned int _uid;
92 int _status;
93 compat_clock_t _utime;
94 compat_clock_t _stime;
95 } _sigchld;
96
97
98 struct {
99 unsigned int _addr;
100 } _sigfault;
101
102
103 struct {
104 int _band;
105 int _fd;
106 } _sigpoll;
107 } _sifields;
108} compat_siginfo_t;
109
110int copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from);
111int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from);
112
113
114
115
116
117
118
119struct compat_regfile {
120
121
122 compat_int_t rf_gr[32];
123 compat_int_t rf_iasq[2];
124 compat_int_t rf_iaoq[2];
125 compat_int_t rf_sar;
126};
127
128#define COMPAT_SIGRETURN_TRAMP 4
129#define COMPAT_SIGRESTARTBLOCK_TRAMP 5
130#define COMPAT_TRAMP_SIZE (COMPAT_SIGRETURN_TRAMP + \
131 COMPAT_SIGRESTARTBLOCK_TRAMP)
132
133struct compat_rt_sigframe {
134
135
136
137
138 compat_uint_t tramp[COMPAT_TRAMP_SIZE];
139 compat_siginfo_t info;
140 struct compat_ucontext uc;
141
142 struct compat_regfile regs;
143};
144
145
146
147
148
149
150
151#define SIGFRAME32 64
152#define FUNCTIONCALLFRAME32 48
153#define PARISC_RT_SIGFRAME_SIZE32 (((sizeof(struct compat_rt_sigframe) + FUNCTIONCALLFRAME32) + SIGFRAME32) & -SIGFRAME32)
154
155void sigset_32to64(sigset_t *s64, compat_sigset_t *s32);
156void sigset_64to32(compat_sigset_t *s32, sigset_t *s64);
157int do_sigaltstack32 (const compat_stack_t __user *uss32,
158 compat_stack_t __user *uoss32, unsigned long sp);
159long restore_sigcontext32(struct compat_sigcontext __user *sc,
160 struct compat_regfile __user *rf,
161 struct pt_regs *regs);
162long setup_sigcontext32(struct compat_sigcontext __user *sc,
163 struct compat_regfile __user *rf,
164 struct pt_regs *regs, int in_syscall);
165
166#endif
167