Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. |
| 5 | * |
| 6 | * Copyright (C) 1991, 1992 Linus Torvalds |
Martin Michlmayr | dda73d0 | 2006-02-18 15:21:30 +0000 | [diff] [blame] | 7 | * Copyright (C) 1994 - 2000, 2006 Ralf Baechle |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
| 9 | */ |
Ralf Baechle | 02416dc | 2005-06-15 13:00:12 +0000 | [diff] [blame] | 10 | #include <linux/cache.h> |
Ralf Baechle | 431dc80 | 2007-02-13 00:05:11 +0000 | [diff] [blame] | 11 | #include <linux/compat.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <linux/sched.h> |
| 13 | #include <linux/mm.h> |
| 14 | #include <linux/smp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | #include <linux/kernel.h> |
| 16 | #include <linux/signal.h> |
| 17 | #include <linux/syscalls.h> |
| 18 | #include <linux/errno.h> |
| 19 | #include <linux/wait.h> |
| 20 | #include <linux/ptrace.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #include <linux/suspend.h> |
| 22 | #include <linux/compiler.h> |
Atsushi Nemoto | faea623 | 2007-04-16 23:19:44 +0900 | [diff] [blame] | 23 | #include <linux/uaccess.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | |
Ralf Baechle | e50c0a8 | 2005-05-31 11:49:19 +0000 | [diff] [blame] | 25 | #include <asm/abi.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | #include <asm/asm.h> |
Ralf Baechle | 431dc80 | 2007-02-13 00:05:11 +0000 | [diff] [blame] | 27 | #include <asm/compat-signal.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | #include <linux/bitops.h> |
| 29 | #include <asm/cacheflush.h> |
| 30 | #include <asm/sim.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | #include <asm/ucontext.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | #include <asm/fpu.h> |
Ralf Baechle | 02416dc | 2005-06-15 13:00:12 +0000 | [diff] [blame] | 33 | #include <asm/war.h> |
David Daney | d814c28 | 2010-02-18 16:13:05 -0800 | [diff] [blame] | 34 | #include <asm/vdso.h> |
David Howells | b81947c | 2012-03-28 18:30:02 +0100 | [diff] [blame] | 35 | #include <asm/dsp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | |
Franck Bui-Huu | 36a1f2c | 2007-02-05 15:24:22 +0100 | [diff] [blame] | 37 | #include "signal-common.h" |
| 38 | |
Ralf Baechle | 137f6f3 | 2009-11-24 19:35:41 +0000 | [diff] [blame] | 39 | static int (*save_fp_context32)(struct sigcontext32 __user *sc); |
| 40 | static int (*restore_fp_context32)(struct sigcontext32 __user *sc); |
| 41 | |
| 42 | extern asmlinkage int _save_fp_context32(struct sigcontext32 __user *sc); |
| 43 | extern asmlinkage int _restore_fp_context32(struct sigcontext32 __user *sc); |
| 44 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | /* |
| 46 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... |
| 47 | */ |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 48 | #define __NR_O32_restart_syscall 4253 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | /* 32-bit compatibility types */ |
| 51 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | typedef unsigned int __sighandler32_t; |
| 53 | typedef void (*vfptr_t)(void); |
| 54 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | struct ucontext32 { |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 56 | u32 uc_flags; |
| 57 | s32 uc_link; |
Al Viro | ea536ad | 2012-12-23 03:13:40 -0500 | [diff] [blame] | 58 | compat_stack_t uc_stack; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | struct sigcontext32 uc_mcontext; |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 60 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | }; |
| 62 | |
Ralf Baechle | dd02f06 | 2007-02-13 00:50:57 +0000 | [diff] [blame] | 63 | struct sigframe32 { |
| 64 | u32 sf_ass[4]; /* argument save space for o32 */ |
David Daney | d814c28 | 2010-02-18 16:13:05 -0800 | [diff] [blame] | 65 | u32 sf_pad[2]; /* Was: signal trampoline */ |
Ralf Baechle | dd02f06 | 2007-02-13 00:50:57 +0000 | [diff] [blame] | 66 | struct sigcontext32 sf_sc; |
Atsushi Nemoto | 755f21b | 2007-02-14 14:41:01 +0900 | [diff] [blame] | 67 | compat_sigset_t sf_mask; |
Ralf Baechle | dd02f06 | 2007-02-13 00:50:57 +0000 | [diff] [blame] | 68 | }; |
| 69 | |
Franck Bui-Huu | c0b9bae | 2007-02-05 15:24:21 +0100 | [diff] [blame] | 70 | struct rt_sigframe32 { |
| 71 | u32 rs_ass[4]; /* argument save space for o32 */ |
David Daney | d814c28 | 2010-02-18 16:13:05 -0800 | [diff] [blame] | 72 | u32 rs_pad[2]; /* Was: signal trampoline */ |
Franck Bui-Huu | c0b9bae | 2007-02-05 15:24:21 +0100 | [diff] [blame] | 73 | compat_siginfo_t rs_info; |
| 74 | struct ucontext32 rs_uc; |
| 75 | }; |
| 76 | |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 77 | /* |
Paul Burton | b2ead52 | 2014-01-27 15:23:02 +0000 | [diff] [blame] | 78 | * Thread saved context copy to/from a signal context presumed to be on the |
| 79 | * user stack, and therefore accessed with appropriate macros from uaccess.h. |
| 80 | */ |
| 81 | static int copy_fp_to_sigcontext32(struct sigcontext32 __user *sc) |
| 82 | { |
| 83 | int i; |
| 84 | int err = 0; |
| 85 | int inc = test_thread_flag(TIF_32BIT_FPREGS) ? 2 : 1; |
| 86 | |
Paul Burton | 6bbfd65 | 2014-01-27 15:23:04 +0000 | [diff] [blame] | 87 | for (i = 0; i < NUM_FPU_REGS; i += inc) { |
Paul Burton | b2ead52 | 2014-01-27 15:23:02 +0000 | [diff] [blame] | 88 | err |= |
| 89 | __put_user(get_fpr64(¤t->thread.fpu.fpr[i], 0), |
| 90 | &sc->sc_fpregs[i]); |
| 91 | } |
| 92 | err |= __put_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); |
| 93 | |
| 94 | return err; |
| 95 | } |
| 96 | |
| 97 | static int copy_fp_from_sigcontext32(struct sigcontext32 __user *sc) |
| 98 | { |
| 99 | int i; |
| 100 | int err = 0; |
| 101 | int inc = test_thread_flag(TIF_32BIT_FPREGS) ? 2 : 1; |
| 102 | u64 fpr_val; |
| 103 | |
Paul Burton | 6bbfd65 | 2014-01-27 15:23:04 +0000 | [diff] [blame] | 104 | for (i = 0; i < NUM_FPU_REGS; i += inc) { |
Paul Burton | b2ead52 | 2014-01-27 15:23:02 +0000 | [diff] [blame] | 105 | err |= __get_user(fpr_val, &sc->sc_fpregs[i]); |
| 106 | set_fpr64(¤t->thread.fpu.fpr[i], 0, fpr_val); |
| 107 | } |
| 108 | err |= __get_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); |
| 109 | |
| 110 | return err; |
| 111 | } |
| 112 | |
| 113 | /* |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 114 | * sigcontext handlers |
| 115 | */ |
Paul Burton | 16f77de | 2014-06-18 15:00:46 +0100 | [diff] [blame^] | 116 | static int protected_save_fp_context32(struct sigcontext32 __user *sc) |
Atsushi Nemoto | faea623 | 2007-04-16 23:19:44 +0900 | [diff] [blame] | 117 | { |
| 118 | int err; |
| 119 | while (1) { |
| 120 | lock_fpu_owner(); |
Paul Burton | ff3aa5f | 2014-01-27 15:23:03 +0000 | [diff] [blame] | 121 | if (is_fpu_owner()) { |
| 122 | err = save_fp_context32(sc); |
| 123 | unlock_fpu_owner(); |
| 124 | } else { |
| 125 | unlock_fpu_owner(); |
| 126 | err = copy_fp_to_sigcontext32(sc); |
| 127 | } |
Atsushi Nemoto | faea623 | 2007-04-16 23:19:44 +0900 | [diff] [blame] | 128 | if (likely(!err)) |
| 129 | break; |
| 130 | /* touch the sigcontext and try again */ |
| 131 | err = __put_user(0, &sc->sc_fpregs[0]) | |
| 132 | __put_user(0, &sc->sc_fpregs[31]) | |
| 133 | __put_user(0, &sc->sc_fpc_csr); |
| 134 | if (err) |
| 135 | break; /* really bad sigcontext */ |
| 136 | } |
| 137 | return err; |
| 138 | } |
| 139 | |
Paul Burton | 16f77de | 2014-06-18 15:00:46 +0100 | [diff] [blame^] | 140 | static int protected_restore_fp_context32(struct sigcontext32 __user *sc) |
Atsushi Nemoto | faea623 | 2007-04-16 23:19:44 +0900 | [diff] [blame] | 141 | { |
David Daney | c726b82 | 2011-01-24 14:51:34 -0800 | [diff] [blame] | 142 | int err, tmp __maybe_unused; |
Atsushi Nemoto | faea623 | 2007-04-16 23:19:44 +0900 | [diff] [blame] | 143 | while (1) { |
| 144 | lock_fpu_owner(); |
Paul Burton | ff3aa5f | 2014-01-27 15:23:03 +0000 | [diff] [blame] | 145 | if (is_fpu_owner()) { |
| 146 | err = restore_fp_context32(sc); |
| 147 | unlock_fpu_owner(); |
| 148 | } else { |
| 149 | unlock_fpu_owner(); |
| 150 | err = copy_fp_from_sigcontext32(sc); |
| 151 | } |
Atsushi Nemoto | faea623 | 2007-04-16 23:19:44 +0900 | [diff] [blame] | 152 | if (likely(!err)) |
| 153 | break; |
| 154 | /* touch the sigcontext and try again */ |
| 155 | err = __get_user(tmp, &sc->sc_fpregs[0]) | |
| 156 | __get_user(tmp, &sc->sc_fpregs[31]) | |
| 157 | __get_user(tmp, &sc->sc_fpc_csr); |
| 158 | if (err) |
| 159 | break; /* really bad sigcontext */ |
| 160 | } |
| 161 | return err; |
| 162 | } |
| 163 | |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 164 | static int setup_sigcontext32(struct pt_regs *regs, |
| 165 | struct sigcontext32 __user *sc) |
| 166 | { |
| 167 | int err = 0; |
| 168 | int i; |
Atsushi Nemoto | 53dc802 | 2007-03-10 01:07:45 +0900 | [diff] [blame] | 169 | u32 used_math; |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 170 | |
| 171 | err |= __put_user(regs->cp0_epc, &sc->sc_pc); |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 172 | |
| 173 | err |= __put_user(0, &sc->sc_regs[0]); |
| 174 | for (i = 1; i < 32; i++) |
| 175 | err |= __put_user(regs->regs[i], &sc->sc_regs[i]); |
| 176 | |
| 177 | err |= __put_user(regs->hi, &sc->sc_mdhi); |
| 178 | err |= __put_user(regs->lo, &sc->sc_mdlo); |
| 179 | if (cpu_has_dsp) { |
| 180 | err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp); |
| 181 | err |= __put_user(mfhi1(), &sc->sc_hi1); |
| 182 | err |= __put_user(mflo1(), &sc->sc_lo1); |
| 183 | err |= __put_user(mfhi2(), &sc->sc_hi2); |
| 184 | err |= __put_user(mflo2(), &sc->sc_lo2); |
| 185 | err |= __put_user(mfhi3(), &sc->sc_hi3); |
| 186 | err |= __put_user(mflo3(), &sc->sc_lo3); |
| 187 | } |
| 188 | |
Paul Burton | 16f77de | 2014-06-18 15:00:46 +0100 | [diff] [blame^] | 189 | used_math = !!used_math(); |
Atsushi Nemoto | 53dc802 | 2007-03-10 01:07:45 +0900 | [diff] [blame] | 190 | err |= __put_user(used_math, &sc->sc_used_math); |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 191 | |
Atsushi Nemoto | 53dc802 | 2007-03-10 01:07:45 +0900 | [diff] [blame] | 192 | if (used_math) { |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 193 | /* |
| 194 | * Save FPU state to signal context. Signal handler |
| 195 | * will "inherit" current FPU state. |
| 196 | */ |
Paul Burton | 16f77de | 2014-06-18 15:00:46 +0100 | [diff] [blame^] | 197 | err |= protected_save_fp_context32(sc); |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 198 | } |
| 199 | return err; |
| 200 | } |
| 201 | |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 202 | static int |
Paul Burton | 16f77de | 2014-06-18 15:00:46 +0100 | [diff] [blame^] | 203 | check_and_restore_fp_context32(struct sigcontext32 __user *sc) |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 204 | { |
| 205 | int err, sig; |
| 206 | |
| 207 | err = sig = fpcsr_pending(&sc->sc_fpc_csr); |
| 208 | if (err > 0) |
| 209 | err = 0; |
Paul Burton | 16f77de | 2014-06-18 15:00:46 +0100 | [diff] [blame^] | 210 | err |= protected_restore_fp_context32(sc); |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 211 | return err ?: sig; |
| 212 | } |
| 213 | |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 214 | static int restore_sigcontext32(struct pt_regs *regs, |
| 215 | struct sigcontext32 __user *sc) |
| 216 | { |
| 217 | u32 used_math; |
| 218 | int err = 0; |
| 219 | s32 treg; |
| 220 | int i; |
| 221 | |
| 222 | /* Always make any pending restarted system calls return -EINTR */ |
| 223 | current_thread_info()->restart_block.fn = do_no_restart_syscall; |
| 224 | |
| 225 | err |= __get_user(regs->cp0_epc, &sc->sc_pc); |
| 226 | err |= __get_user(regs->hi, &sc->sc_mdhi); |
| 227 | err |= __get_user(regs->lo, &sc->sc_mdlo); |
| 228 | if (cpu_has_dsp) { |
| 229 | err |= __get_user(treg, &sc->sc_hi1); mthi1(treg); |
| 230 | err |= __get_user(treg, &sc->sc_lo1); mtlo1(treg); |
| 231 | err |= __get_user(treg, &sc->sc_hi2); mthi2(treg); |
| 232 | err |= __get_user(treg, &sc->sc_lo2); mtlo2(treg); |
| 233 | err |= __get_user(treg, &sc->sc_hi3); mthi3(treg); |
| 234 | err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg); |
| 235 | err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK); |
| 236 | } |
| 237 | |
| 238 | for (i = 1; i < 32; i++) |
| 239 | err |= __get_user(regs->regs[i], &sc->sc_regs[i]); |
| 240 | |
| 241 | err |= __get_user(used_math, &sc->sc_used_math); |
| 242 | conditional_used_math(used_math); |
| 243 | |
Atsushi Nemoto | 53dc802 | 2007-03-10 01:07:45 +0900 | [diff] [blame] | 244 | if (used_math) { |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 245 | /* restore fpu context if we have used it before */ |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 246 | if (!err) |
Paul Burton | 16f77de | 2014-06-18 15:00:46 +0100 | [diff] [blame^] | 247 | err = check_and_restore_fp_context32(sc); |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 248 | } else { |
Paul Burton | 16f77de | 2014-06-18 15:00:46 +0100 | [diff] [blame^] | 249 | /* signal handler may have used FPU. Give it up. */ |
Atsushi Nemoto | 53dc802 | 2007-03-10 01:07:45 +0900 | [diff] [blame] | 250 | lose_fpu(0); |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 251 | } |
| 252 | |
Franck Bui-Huu | 9432a9b | 2007-02-05 15:24:25 +0100 | [diff] [blame] | 253 | return err; |
| 254 | } |
| 255 | |
| 256 | /* |
| 257 | * |
| 258 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 259 | extern void __put_sigset_unknown_nsig(void); |
| 260 | extern void __get_sigset_unknown_nsig(void); |
| 261 | |
Atsushi Nemoto | 9bbf28a3 | 2006-02-01 01:41:09 +0900 | [diff] [blame] | 262 | static inline int put_sigset(const sigset_t *kbuf, compat_sigset_t __user *ubuf) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 263 | { |
| 264 | int err = 0; |
| 265 | |
| 266 | if (!access_ok(VERIFY_WRITE, ubuf, sizeof(*ubuf))) |
| 267 | return -EFAULT; |
| 268 | |
| 269 | switch (_NSIG_WORDS) { |
| 270 | default: |
| 271 | __put_sigset_unknown_nsig(); |
| 272 | case 2: |
Ralf Baechle | 49a89ef | 2007-10-11 23:46:15 +0100 | [diff] [blame] | 273 | err |= __put_user(kbuf->sig[1] >> 32, &ubuf->sig[3]); |
| 274 | err |= __put_user(kbuf->sig[1] & 0xffffffff, &ubuf->sig[2]); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 275 | case 1: |
Ralf Baechle | 49a89ef | 2007-10-11 23:46:15 +0100 | [diff] [blame] | 276 | err |= __put_user(kbuf->sig[0] >> 32, &ubuf->sig[1]); |
| 277 | err |= __put_user(kbuf->sig[0] & 0xffffffff, &ubuf->sig[0]); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | } |
| 279 | |
| 280 | return err; |
| 281 | } |
| 282 | |
Atsushi Nemoto | 9c6031c | 2006-02-19 23:46:44 +0900 | [diff] [blame] | 283 | static inline int get_sigset(sigset_t *kbuf, const compat_sigset_t __user *ubuf) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 284 | { |
| 285 | int err = 0; |
| 286 | unsigned long sig[4]; |
| 287 | |
| 288 | if (!access_ok(VERIFY_READ, ubuf, sizeof(*ubuf))) |
| 289 | return -EFAULT; |
| 290 | |
| 291 | switch (_NSIG_WORDS) { |
| 292 | default: |
| 293 | __get_sigset_unknown_nsig(); |
| 294 | case 2: |
Ralf Baechle | 49a89ef | 2007-10-11 23:46:15 +0100 | [diff] [blame] | 295 | err |= __get_user(sig[3], &ubuf->sig[3]); |
| 296 | err |= __get_user(sig[2], &ubuf->sig[2]); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 297 | kbuf->sig[1] = sig[2] | (sig[3] << 32); |
| 298 | case 1: |
Ralf Baechle | 49a89ef | 2007-10-11 23:46:15 +0100 | [diff] [blame] | 299 | err |= __get_user(sig[1], &ubuf->sig[1]); |
| 300 | err |= __get_user(sig[0], &ubuf->sig[0]); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 301 | kbuf->sig[0] = sig[0] | (sig[1] << 32); |
| 302 | } |
| 303 | |
| 304 | return err; |
| 305 | } |
| 306 | |
| 307 | /* |
| 308 | * Atomically swap in the new signal mask, and wait for a signal. |
| 309 | */ |
| 310 | |
Al Viro | 1910f4a | 2012-12-25 16:25:18 -0500 | [diff] [blame] | 311 | asmlinkage int sys32_sigsuspend(compat_sigset_t __user *uset) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 312 | { |
Al Viro | 1910f4a | 2012-12-25 16:25:18 -0500 | [diff] [blame] | 313 | return compat_sys_rt_sigsuspend(uset, sizeof(compat_sigset_t)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 314 | } |
| 315 | |
Al Viro | aa58480 | 2012-12-25 18:55:27 -0500 | [diff] [blame] | 316 | SYSCALL_DEFINE3(32_sigaction, long, sig, const struct compat_sigaction __user *, act, |
| 317 | struct compat_sigaction __user *, oact) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 318 | { |
| 319 | struct k_sigaction new_ka, old_ka; |
| 320 | int ret; |
| 321 | int err = 0; |
| 322 | |
| 323 | if (act) { |
| 324 | old_sigset_t mask; |
Ralf Baechle | 77c728c | 2005-03-04 19:36:51 +0000 | [diff] [blame] | 325 | s32 handler; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 326 | |
| 327 | if (!access_ok(VERIFY_READ, act, sizeof(*act))) |
| 328 | return -EFAULT; |
Ralf Baechle | 77c728c | 2005-03-04 19:36:51 +0000 | [diff] [blame] | 329 | err |= __get_user(handler, &act->sa_handler); |
Atsushi Nemoto | 9bbf28a3 | 2006-02-01 01:41:09 +0900 | [diff] [blame] | 330 | new_ka.sa.sa_handler = (void __user *)(s64)handler; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 331 | err |= __get_user(new_ka.sa.sa_flags, &act->sa_flags); |
| 332 | err |= __get_user(mask, &act->sa_mask.sig[0]); |
| 333 | if (err) |
| 334 | return -EFAULT; |
| 335 | |
| 336 | siginitset(&new_ka.sa.sa_mask, mask); |
| 337 | } |
| 338 | |
| 339 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); |
| 340 | |
| 341 | if (!ret && oact) { |
| 342 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact))) |
Martin Michlmayr | 6254944 | 2006-02-18 20:06:32 +0000 | [diff] [blame] | 343 | return -EFAULT; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); |
| 345 | err |= __put_user((u32)(u64)old_ka.sa.sa_handler, |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 346 | &oact->sa_handler); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 347 | err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig); |
Martin Michlmayr | 6254944 | 2006-02-18 20:06:32 +0000 | [diff] [blame] | 348 | err |= __put_user(0, &oact->sa_mask.sig[1]); |
| 349 | err |= __put_user(0, &oact->sa_mask.sig[2]); |
| 350 | err |= __put_user(0, &oact->sa_mask.sig[3]); |
| 351 | if (err) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 352 | return -EFAULT; |
| 353 | } |
| 354 | |
| 355 | return ret; |
| 356 | } |
| 357 | |
Al Viro | ce39596 | 2013-10-13 17:23:53 -0400 | [diff] [blame] | 358 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 359 | { |
| 360 | int err; |
| 361 | |
| 362 | if (!access_ok (VERIFY_WRITE, to, sizeof(compat_siginfo_t))) |
| 363 | return -EFAULT; |
| 364 | |
| 365 | /* If you change siginfo_t structure, please be sure |
| 366 | this code is fixed accordingly. |
| 367 | It should never copy any pad contained in the structure |
| 368 | to avoid security leaks, but must copy the generic |
| 369 | 3 ints plus the relevant union member. |
| 370 | This routine must convert siginfo from 64bit to 32bit as well |
| 371 | at the same time. */ |
| 372 | err = __put_user(from->si_signo, &to->si_signo); |
| 373 | err |= __put_user(from->si_errno, &to->si_errno); |
| 374 | err |= __put_user((short)from->si_code, &to->si_code); |
| 375 | if (from->si_code < 0) |
| 376 | err |= __copy_to_user(&to->_sifields._pad, &from->_sifields._pad, SI_PAD_SIZE); |
| 377 | else { |
| 378 | switch (from->si_code >> 16) { |
Ralf Baechle | a982099 | 2005-02-16 21:24:16 +0000 | [diff] [blame] | 379 | case __SI_TIMER >> 16: |
| 380 | err |= __put_user(from->si_tid, &to->si_tid); |
| 381 | err |= __put_user(from->si_overrun, &to->si_overrun); |
| 382 | err |= __put_user(from->si_int, &to->si_int); |
| 383 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 384 | case __SI_CHLD >> 16: |
| 385 | err |= __put_user(from->si_utime, &to->si_utime); |
| 386 | err |= __put_user(from->si_stime, &to->si_stime); |
| 387 | err |= __put_user(from->si_status, &to->si_status); |
| 388 | default: |
| 389 | err |= __put_user(from->si_pid, &to->si_pid); |
| 390 | err |= __put_user(from->si_uid, &to->si_uid); |
| 391 | break; |
| 392 | case __SI_FAULT >> 16: |
Atsushi Nemoto | 5665a0a | 2006-02-02 01:26:34 +0900 | [diff] [blame] | 393 | err |= __put_user((unsigned long)from->si_addr, &to->si_addr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 394 | break; |
| 395 | case __SI_POLL >> 16: |
| 396 | err |= __put_user(from->si_band, &to->si_band); |
| 397 | err |= __put_user(from->si_fd, &to->si_fd); |
| 398 | break; |
| 399 | case __SI_RT >> 16: /* This is not generated by the kernel as of now. */ |
| 400 | case __SI_MESGQ >> 16: |
| 401 | err |= __put_user(from->si_pid, &to->si_pid); |
| 402 | err |= __put_user(from->si_uid, &to->si_uid); |
| 403 | err |= __put_user(from->si_int, &to->si_int); |
| 404 | break; |
| 405 | } |
| 406 | } |
| 407 | return err; |
| 408 | } |
| 409 | |
Thomas Bogendoerfer | 5d9a76c | 2008-08-17 16:49:25 +0200 | [diff] [blame] | 410 | int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) |
| 411 | { |
| 412 | memset(to, 0, sizeof *to); |
| 413 | |
| 414 | if (copy_from_user(to, from, 3*sizeof(int)) || |
| 415 | copy_from_user(to->_sifields._pad, |
| 416 | from->_sifields._pad, SI_PAD_SIZE32)) |
| 417 | return -EFAULT; |
| 418 | |
| 419 | return 0; |
| 420 | } |
| 421 | |
Franck Bui-Huu | f90080a | 2007-02-05 15:24:27 +0100 | [diff] [blame] | 422 | asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 423 | { |
Ralf Baechle | dd02f06 | 2007-02-13 00:50:57 +0000 | [diff] [blame] | 424 | struct sigframe32 __user *frame; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 425 | sigset_t blocked; |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 426 | int sig; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 427 | |
Ralf Baechle | dd02f06 | 2007-02-13 00:50:57 +0000 | [diff] [blame] | 428 | frame = (struct sigframe32 __user *) regs.regs[29]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 429 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
| 430 | goto badframe; |
Ralf Baechle | 431dc80 | 2007-02-13 00:05:11 +0000 | [diff] [blame] | 431 | if (__copy_conv_sigset_from_user(&blocked, &frame->sf_mask)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 432 | goto badframe; |
| 433 | |
Matt Fleming | 8598f3c | 2012-02-14 11:40:52 +0000 | [diff] [blame] | 434 | set_current_blocked(&blocked); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 435 | |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 436 | sig = restore_sigcontext32(®s, &frame->sf_sc); |
| 437 | if (sig < 0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 438 | goto badframe; |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 439 | else if (sig) |
| 440 | force_sig(sig, current); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 441 | |
| 442 | /* |
| 443 | * Don't let your children do this ... |
| 444 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 445 | __asm__ __volatile__( |
| 446 | "move\t$29, %0\n\t" |
| 447 | "j\tsyscall_exit" |
| 448 | :/* no outputs */ |
| 449 | :"r" (®s)); |
| 450 | /* Unreached */ |
| 451 | |
| 452 | badframe: |
| 453 | force_sig(SIGSEGV, current); |
| 454 | } |
| 455 | |
Franck Bui-Huu | f90080a | 2007-02-05 15:24:27 +0100 | [diff] [blame] | 456 | asmlinkage void sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 457 | { |
Atsushi Nemoto | 9bbf28a3 | 2006-02-01 01:41:09 +0900 | [diff] [blame] | 458 | struct rt_sigframe32 __user *frame; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 459 | sigset_t set; |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 460 | int sig; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 461 | |
Atsushi Nemoto | 9bbf28a3 | 2006-02-01 01:41:09 +0900 | [diff] [blame] | 462 | frame = (struct rt_sigframe32 __user *) regs.regs[29]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 463 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
| 464 | goto badframe; |
Ralf Baechle | 431dc80 | 2007-02-13 00:05:11 +0000 | [diff] [blame] | 465 | if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 466 | goto badframe; |
| 467 | |
Matt Fleming | 8598f3c | 2012-02-14 11:40:52 +0000 | [diff] [blame] | 468 | set_current_blocked(&set); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 469 | |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 470 | sig = restore_sigcontext32(®s, &frame->rs_uc.uc_mcontext); |
| 471 | if (sig < 0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 472 | goto badframe; |
Atsushi Nemoto | c6a2f46 | 2007-03-10 01:03:48 +0900 | [diff] [blame] | 473 | else if (sig) |
| 474 | force_sig(sig, current); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 475 | |
Al Viro | ea536ad | 2012-12-23 03:13:40 -0500 | [diff] [blame] | 476 | if (compat_restore_altstack(&frame->rs_uc.uc_stack)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 477 | goto badframe; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 478 | |
| 479 | /* |
| 480 | * Don't let your children do this ... |
| 481 | */ |
| 482 | __asm__ __volatile__( |
| 483 | "move\t$29, %0\n\t" |
| 484 | "j\tsyscall_exit" |
| 485 | :/* no outputs */ |
| 486 | :"r" (®s)); |
| 487 | /* Unreached */ |
| 488 | |
| 489 | badframe: |
| 490 | force_sig(SIGSEGV, current); |
| 491 | } |
| 492 | |
David Daney | d814c28 | 2010-02-18 16:13:05 -0800 | [diff] [blame] | 493 | static int setup_frame_32(void *sig_return, struct k_sigaction *ka, |
| 494 | struct pt_regs *regs, int signr, sigset_t *set) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 495 | { |
Ralf Baechle | dd02f06 | 2007-02-13 00:50:57 +0000 | [diff] [blame] | 496 | struct sigframe32 __user *frame; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 497 | int err = 0; |
| 498 | |
| 499 | frame = get_sigframe(ka, regs, sizeof(*frame)); |
| 500 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) |
| 501 | goto give_sigsegv; |
| 502 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 503 | err |= setup_sigcontext32(regs, &frame->sf_sc); |
Ralf Baechle | 431dc80 | 2007-02-13 00:05:11 +0000 | [diff] [blame] | 504 | err |= __copy_conv_sigset_to_user(&frame->sf_mask, set); |
| 505 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 506 | if (err) |
| 507 | goto give_sigsegv; |
| 508 | |
| 509 | /* |
| 510 | * Arguments to signal handler: |
| 511 | * |
| 512 | * a0 = signal number |
| 513 | * a1 = 0 (should be cause) |
| 514 | * a2 = pointer to struct sigcontext |
| 515 | * |
| 516 | * $25 and c0_epc point to the signal handler, $29 points to the |
| 517 | * struct sigframe. |
| 518 | */ |
| 519 | regs->regs[ 4] = signr; |
| 520 | regs->regs[ 5] = 0; |
| 521 | regs->regs[ 6] = (unsigned long) &frame->sf_sc; |
| 522 | regs->regs[29] = (unsigned long) frame; |
David Daney | d814c28 | 2010-02-18 16:13:05 -0800 | [diff] [blame] | 523 | regs->regs[31] = (unsigned long) sig_return; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 524 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; |
| 525 | |
Franck Bui-Huu | 722bb63 | 2007-02-05 15:24:24 +0100 | [diff] [blame] | 526 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 527 | current->comm, current->pid, |
Franck Bui-Huu | 722bb63 | 2007-02-05 15:24:24 +0100 | [diff] [blame] | 528 | frame, regs->cp0_epc, regs->regs[31]); |
| 529 | |
Ralf Baechle | 7b3e2fc | 2006-02-08 12:58:41 +0000 | [diff] [blame] | 530 | return 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 531 | |
| 532 | give_sigsegv: |
| 533 | force_sigsegv(signr, current); |
Ralf Baechle | 7b3e2fc | 2006-02-08 12:58:41 +0000 | [diff] [blame] | 534 | return -EFAULT; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 535 | } |
| 536 | |
David Daney | d814c28 | 2010-02-18 16:13:05 -0800 | [diff] [blame] | 537 | static int setup_rt_frame_32(void *sig_return, struct k_sigaction *ka, |
| 538 | struct pt_regs *regs, int signr, sigset_t *set, |
| 539 | siginfo_t *info) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 540 | { |
Atsushi Nemoto | 9bbf28a3 | 2006-02-01 01:41:09 +0900 | [diff] [blame] | 541 | struct rt_sigframe32 __user *frame; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 542 | int err = 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 543 | |
| 544 | frame = get_sigframe(ka, regs, sizeof(*frame)); |
| 545 | if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) |
| 546 | goto give_sigsegv; |
| 547 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 548 | /* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */ |
| 549 | err |= copy_siginfo_to_user32(&frame->rs_info, info); |
| 550 | |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 551 | /* Create the ucontext. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 552 | err |= __put_user(0, &frame->rs_uc.uc_flags); |
| 553 | err |= __put_user(0, &frame->rs_uc.uc_link); |
Al Viro | ea536ad | 2012-12-23 03:13:40 -0500 | [diff] [blame] | 554 | err |= __compat_save_altstack(&frame->rs_uc.uc_stack, regs->regs[29]); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 555 | err |= setup_sigcontext32(regs, &frame->rs_uc.uc_mcontext); |
Ralf Baechle | 431dc80 | 2007-02-13 00:05:11 +0000 | [diff] [blame] | 556 | err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 557 | |
| 558 | if (err) |
| 559 | goto give_sigsegv; |
| 560 | |
| 561 | /* |
| 562 | * Arguments to signal handler: |
| 563 | * |
| 564 | * a0 = signal number |
| 565 | * a1 = 0 (should be cause) |
| 566 | * a2 = pointer to ucontext |
| 567 | * |
| 568 | * $25 and c0_epc point to the signal handler, $29 points to |
| 569 | * the struct rt_sigframe32. |
| 570 | */ |
| 571 | regs->regs[ 4] = signr; |
| 572 | regs->regs[ 5] = (unsigned long) &frame->rs_info; |
| 573 | regs->regs[ 6] = (unsigned long) &frame->rs_uc; |
| 574 | regs->regs[29] = (unsigned long) frame; |
David Daney | d814c28 | 2010-02-18 16:13:05 -0800 | [diff] [blame] | 575 | regs->regs[31] = (unsigned long) sig_return; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 576 | regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; |
| 577 | |
Franck Bui-Huu | 722bb63 | 2007-02-05 15:24:24 +0100 | [diff] [blame] | 578 | DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 579 | current->comm, current->pid, |
Franck Bui-Huu | 722bb63 | 2007-02-05 15:24:24 +0100 | [diff] [blame] | 580 | frame, regs->cp0_epc, regs->regs[31]); |
| 581 | |
Ralf Baechle | 7b3e2fc | 2006-02-08 12:58:41 +0000 | [diff] [blame] | 582 | return 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 583 | |
| 584 | give_sigsegv: |
| 585 | force_sigsegv(signr, current); |
Ralf Baechle | 7b3e2fc | 2006-02-08 12:58:41 +0000 | [diff] [blame] | 586 | return -EFAULT; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 587 | } |
| 588 | |
Ralf Baechle | 151fd6a | 2007-02-15 11:40:37 +0000 | [diff] [blame] | 589 | /* |
| 590 | * o32 compatibility on 64-bit kernels, without DSP ASE |
| 591 | */ |
| 592 | struct mips_abi mips_abi_32 = { |
| 593 | .setup_frame = setup_frame_32, |
David Daney | d814c28 | 2010-02-18 16:13:05 -0800 | [diff] [blame] | 594 | .signal_return_offset = |
| 595 | offsetof(struct mips_vdso, o32_signal_trampoline), |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 596 | .setup_rt_frame = setup_rt_frame_32, |
David Daney | d814c28 | 2010-02-18 16:13:05 -0800 | [diff] [blame] | 597 | .rt_signal_return_offset = |
| 598 | offsetof(struct mips_vdso, o32_rt_signal_trampoline), |
Ralf Baechle | 151fd6a | 2007-02-15 11:40:37 +0000 | [diff] [blame] | 599 | .restart = __NR_O32_restart_syscall |
| 600 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 601 | |
Ralf Baechle | 137f6f3 | 2009-11-24 19:35:41 +0000 | [diff] [blame] | 602 | static int signal32_init(void) |
| 603 | { |
| 604 | if (cpu_has_fpu) { |
| 605 | save_fp_context32 = _save_fp_context32; |
| 606 | restore_fp_context32 = _restore_fp_context32; |
| 607 | } else { |
Paul Burton | b2ead52 | 2014-01-27 15:23:02 +0000 | [diff] [blame] | 608 | save_fp_context32 = copy_fp_to_sigcontext32; |
| 609 | restore_fp_context32 = copy_fp_from_sigcontext32; |
Ralf Baechle | 137f6f3 | 2009-11-24 19:35:41 +0000 | [diff] [blame] | 610 | } |
| 611 | |
| 612 | return 0; |
| 613 | } |
| 614 | |
| 615 | arch_initcall(signal32_init); |