arch: remove compat_alloc_user_space
[linux-2.6-microblaze.git] / arch / sparc / kernel / signal_64.c
index a0eec62..2a78d2a 100644 (file)
@@ -406,10 +406,10 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs)
        err |= copy_to_user(&sf->mask, sigmask_to_save(), sizeof(sigset_t));
 
        if (!wsaved) {
-               err |= copy_in_user((u64 __user *)sf,
-                                   (u64 __user *)(regs->u_regs[UREG_FP] +
-                                                  STACK_BIAS),
-                                   sizeof(struct reg_window));
+               err |= raw_copy_in_user((u64 __user *)sf,
+                                       (u64 __user *)(regs->u_regs[UREG_FP] +
+                                          STACK_BIAS),
+                                       sizeof(struct reg_window));
        } else {
                struct reg_window *rp;
 
@@ -556,3 +556,39 @@ void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long
        user_enter();
 }
 
+/*
+ * Compile-time assertions for siginfo_t offsets. Check NSIG* as well, as
+ * changes likely come with new fields that should be added below.
+ */
+static_assert(NSIGILL  == 11);
+static_assert(NSIGFPE  == 15);
+static_assert(NSIGSEGV == 9);
+static_assert(NSIGBUS  == 5);
+static_assert(NSIGTRAP == 6);
+static_assert(NSIGCHLD == 6);
+static_assert(NSIGSYS  == 2);
+static_assert(sizeof(siginfo_t) == 128);
+static_assert(__alignof__(siginfo_t) == 8);
+static_assert(offsetof(siginfo_t, si_signo)    == 0x00);
+static_assert(offsetof(siginfo_t, si_errno)    == 0x04);
+static_assert(offsetof(siginfo_t, si_code)     == 0x08);
+static_assert(offsetof(siginfo_t, si_pid)      == 0x10);
+static_assert(offsetof(siginfo_t, si_uid)      == 0x14);
+static_assert(offsetof(siginfo_t, si_tid)      == 0x10);
+static_assert(offsetof(siginfo_t, si_overrun)  == 0x14);
+static_assert(offsetof(siginfo_t, si_status)   == 0x18);
+static_assert(offsetof(siginfo_t, si_utime)    == 0x20);
+static_assert(offsetof(siginfo_t, si_stime)    == 0x28);
+static_assert(offsetof(siginfo_t, si_value)    == 0x18);
+static_assert(offsetof(siginfo_t, si_int)      == 0x18);
+static_assert(offsetof(siginfo_t, si_ptr)      == 0x18);
+static_assert(offsetof(siginfo_t, si_addr)     == 0x10);
+static_assert(offsetof(siginfo_t, si_trapno)   == 0x18);
+static_assert(offsetof(siginfo_t, si_addr_lsb) == 0x18);
+static_assert(offsetof(siginfo_t, si_lower)    == 0x20);
+static_assert(offsetof(siginfo_t, si_upper)    == 0x28);
+static_assert(offsetof(siginfo_t, si_pkey)     == 0x20);
+static_assert(offsetof(siginfo_t, si_perf_data)        == 0x18);
+static_assert(offsetof(siginfo_t, si_perf_type)        == 0x20);
+static_assert(offsetof(siginfo_t, si_band)     == 0x10);
+static_assert(offsetof(siginfo_t, si_fd)       == 0x14);