2 * irixsig.c: WHEEE, IRIX signals! YOW, am I compatable or what?!?!
4 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
6 * $Id: irixsig.c,v 1.11 1998/03/26 07:39:09 ralf Exp $
9 #include <linux/kernel.h>
10 #include <linux/sched.h>
12 #include <linux/errno.h>
13 #include <linux/smp.h>
14 #include <linux/smp_lock.h>
15 #include <linux/time.h>
17 #include <asm/ptrace.h>
18 #include <asm/uaccess.h>
20 asmlinkage
int sys_wait4(pid_t pid
, unsigned long *stat_addr
,
21 int options
, unsigned long *ru
);
25 #define _S(nr) (1<<((nr)-1))
27 #define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
34 u32 rmask
, cp0_status
;
38 u32 usedfp
, fpcsr
, fpeir
, sstk_flags
;
40 u64 cp0_cause
, cp0_badvaddr
, _unused0
;
48 static inline void dump_irix5_sigctx(struct sigctx_irix5
*c
)
52 printk("misc: rmask[%08lx] status[%08lx] pc[%08lx]\n",
53 (unsigned long) c
->rmask
,
54 (unsigned long) c
->cp0_status
,
55 (unsigned long) c
->pc
);
57 for(i
= 0; i
< 16; i
++)
58 printk("[%d]<%08lx> ", i
, (unsigned long) c
->regs
[i
]);
60 for(i
= 16; i
< 32; i
++)
61 printk("[%d]<%08lx> ", i
, (unsigned long) c
->regs
[i
]);
63 for(i
= 0; i
< 16; i
++)
64 printk("[%d]<%08lx> ", i
, (unsigned long) c
->fpregs
[i
]);
66 for(i
= 16; i
< 32; i
++)
67 printk("[%d]<%08lx> ", i
, (unsigned long) c
->fpregs
[i
]);
68 printk("misc: usedfp[%d] fpcsr[%08lx] fpeir[%08lx] stk_flgs[%08lx]\n",
69 (int) c
->usedfp
, (unsigned long) c
->fpcsr
,
70 (unsigned long) c
->fpeir
, (unsigned long) c
->sstk_flags
);
71 printk("misc: hi[%08lx] lo[%08lx] cause[%08lx] badvaddr[%08lx]\n",
72 (unsigned long) c
->hi
, (unsigned long) c
->lo
,
73 (unsigned long) c
->cp0_cause
, (unsigned long) c
->cp0_badvaddr
);
74 printk("misc: sigset<0>[%08lx] sigset<1>[%08lx] sigset<2>[%08lx] "
75 "sigset<3>[%08lx]\n", (unsigned long) c
->sigset
.sig
[0],
76 (unsigned long) c
->sigset
.sig
[1],
77 (unsigned long) c
->sigset
.sig
[2],
78 (unsigned long) c
->sigset
.sig
[3]);
82 static void setup_irix_frame(struct k_sigaction
*ka
, struct pt_regs
*regs
,
83 int signr
, sigset_t
*oldmask
)
86 struct sigctx_irix5
*ctx
;
90 sp
-= sizeof(struct sigctx_irix5
);
92 ctx
= (struct sigctx_irix5
*) sp
;
93 if (!access_ok(VERIFY_WRITE
, ctx
, sizeof(*ctx
)))
96 __put_user(0, &ctx
->weird_fpu_thing
);
97 __put_user(~(0x00000001), &ctx
->rmask
);
98 __put_user(0, &ctx
->regs
[0]);
99 for(i
= 1; i
< 32; i
++)
100 __put_user((u64
) regs
->regs
[i
], &ctx
->regs
[i
]);
102 __put_user((u64
) regs
->hi
, &ctx
->hi
);
103 __put_user((u64
) regs
->lo
, &ctx
->lo
);
104 __put_user((u64
) regs
->cp0_epc
, &ctx
->pc
);
105 __put_user(current
->used_math
, &ctx
->usedfp
);
106 __put_user((u64
) regs
->cp0_cause
, &ctx
->cp0_cause
);
107 __put_user((u64
) regs
->cp0_badvaddr
, &ctx
->cp0_badvaddr
);
109 __put_user(0, &ctx
->sstk_flags
); /* XXX sigstack unimp... todo... */
111 __copy_to_user(&ctx
->sigset
, oldmask
, sizeof(irix_sigset_t
));
114 dump_irix5_sigctx(ctx
);
117 regs
->regs
[5] = 0; /* XXX sigcode XXX */
118 regs
->regs
[4] = (unsigned long) signr
;
119 regs
->regs
[6] = regs
->regs
[29] = sp
;
120 regs
->regs
[7] = (unsigned long) ka
->sa
.sa_handler
;
121 regs
->regs
[25] = regs
->cp0_epc
= current
->tss
.irix_trampoline
;
131 setup_irix_rt_frame(struct k_sigaction
* ka
, struct pt_regs
*regs
,
132 int signr
, sigset_t
*oldmask
, siginfo_t
*info
)
135 printk("Aiee: setup_tr_frame wants to be written");
140 static inline void handle_signal(unsigned long sig
, struct k_sigaction
*ka
,
141 siginfo_t
*info
, sigset_t
*oldset
, struct pt_regs
* regs
)
143 if (ka
->sa
.sa_flags
& SA_SIGINFO
)
144 setup_irix_rt_frame(ka
, regs
, sig
, oldset
, info
);
146 setup_irix_frame(ka
, regs
, sig
, oldset
);
148 if (ka
->sa
.sa_flags
& SA_ONESHOT
)
149 ka
->sa
.sa_handler
= SIG_DFL
;
150 if (!(ka
->sa
.sa_flags
& SA_NODEFER
)) {
151 spin_lock_irq(¤t
->sigmask_lock
);
152 sigorsets(¤t
->blocked
,¤t
->blocked
,&ka
->sa
.sa_mask
);
153 sigaddset(¤t
->blocked
,sig
);
154 recalc_sigpending(current
);
155 spin_unlock_irq(¤t
->sigmask_lock
);
159 static inline void syscall_restart(struct pt_regs
*regs
, struct k_sigaction
*ka
)
161 switch(regs
->regs
[0]) {
163 regs
->regs
[2] = EINTR
;
166 if(!(ka
->sa
.sa_flags
& SA_RESTART
)) {
167 regs
->regs
[2] = EINTR
;
171 case ERESTARTNOINTR
: /* Userland will reload $v0. */
175 regs
->regs
[0] = 0; /* Don't deal with this again. */
178 asmlinkage
int do_irix_signal(sigset_t
*oldset
, struct pt_regs
*regs
)
180 struct k_sigaction
*ka
;
184 oldset
= ¤t
->blocked
;
189 spin_lock_irq(¤t
->sigmask_lock
);
190 signr
= dequeue_signal(¤t
->blocked
, &info
);
191 spin_unlock_irq(¤t
->sigmask_lock
);
196 if ((current
->flags
& PF_PTRACED
) && signr
!= SIGKILL
) {
197 /* Let the debugger run. */
198 current
->exit_code
= signr
;
199 current
->state
= TASK_STOPPED
;
200 notify_parent(current
, SIGCHLD
);
203 /* We're back. Did the debugger cancel the sig? */
204 if (!(signr
= current
->exit_code
))
206 current
->exit_code
= 0;
208 /* The debugger continued. Ignore SIGSTOP. */
209 if (signr
== SIGSTOP
)
212 /* Update the siginfo structure. Is this good? */
213 if (signr
!= info
.si_signo
) {
214 info
.si_signo
= signr
;
216 info
.si_code
= SI_USER
;
217 info
.si_pid
= current
->p_pptr
->pid
;
218 info
.si_uid
= current
->p_pptr
->uid
;
221 /* If the (new) signal is now blocked, requeue it. */
222 if (sigismember(¤t
->blocked
, signr
)) {
223 send_sig_info(signr
, &info
, current
);
228 ka
= ¤t
->sig
->action
[signr
-1];
229 if (ka
->sa
.sa_handler
== SIG_IGN
) {
230 if (signr
!= SIGCHLD
)
232 /* Check for SIGCHLD: it's special. */
233 while (sys_wait4(-1, NULL
, WNOHANG
, NULL
) > 0)
238 if (ka
->sa
.sa_handler
== SIG_DFL
) {
239 int exit_code
= signr
;
241 /* Init gets no signals it doesn't want. */
242 if (current
->pid
== 1)
246 case SIGCONT
: case SIGCHLD
: case SIGWINCH
:
249 case SIGTSTP
: case SIGTTIN
: case SIGTTOU
:
250 if (is_orphaned_pgrp(current
->pgrp
))
255 current
->state
= TASK_STOPPED
;
256 current
->exit_code
= signr
;
257 if (!(current
->p_pptr
->sig
->action
[SIGCHLD
-1].sa
.sa_flags
& SA_NOCLDSTOP
))
258 notify_parent(current
, SIGCHLD
);
262 case SIGQUIT
: case SIGILL
: case SIGTRAP
:
263 case SIGABRT
: case SIGFPE
: case SIGSEGV
:
266 && current
->binfmt
->core_dump
267 && current
->binfmt
->core_dump(signr
, regs
))
274 sigaddset(¤t
->signal
, signr
);
275 current
->flags
|= PF_SIGNALED
;
282 syscall_restart(regs
, ka
);
283 /* Whee! Actually deliver the signal. */
284 handle_signal(signr
, ka
, &info
, oldset
, regs
);
289 * Who's code doesn't conform to the restartable syscall convention
290 * dies here!!! The li instruction, a single machine instruction,
291 * must directly be followed by the syscall instruction.
294 if (regs
->regs
[2] == ERESTARTNOHAND
||
295 regs
->regs
[2] == ERESTARTSYS
||
296 regs
->regs
[2] == ERESTARTNOINTR
) {
303 asmlinkage
unsigned long irix_sigreturn(struct pt_regs
*regs
)
305 struct sigctx_irix5
*context
, *magic
;
306 unsigned long umask
, mask
;
308 int sig
, i
, base
= 0;
311 if(regs
->regs
[2] == 1000)
314 context
= (struct sigctx_irix5
*) regs
->regs
[base
+ 4];
315 magic
= (struct sigctx_irix5
*) regs
->regs
[base
+ 5];
316 sig
= (int) regs
->regs
[base
+ 6];
318 printk("[%s:%d] IRIX sigreturn(scp[%p],ucp[%p],sig[%d])\n",
319 current
->comm
, current
->pid
, context
, magic
, sig
);
323 if (!access_ok(VERIFY_READ
, context
, sizeof(struct sigctx_irix5
)))
327 dump_irix5_sigctx(context
);
330 __get_user(regs
->cp0_epc
, &context
->pc
);
331 umask
= context
->rmask
; mask
= 2;
332 for (i
= 1; i
< 32; i
++, mask
<<= 1) {
334 __get_user(regs
->regs
[i
], &context
->regs
[i
]);
336 __get_user(regs
->hi
, &context
->hi
);
337 __get_user(regs
->lo
, &context
->lo
);
339 if ((umask
& 1) && context
->usedfp
) {
340 fregs
= (u64
*) ¤t
->tss
.fpu
;
341 for(i
= 0; i
< 32; i
++)
342 fregs
[i
] = (u64
) context
->fpregs
[i
];
343 __get_user(current
->tss
.fpu
.hard
.control
, &context
->fpcsr
);
346 /* XXX do sigstack crapola here... XXX */
348 if (__copy_from_user(&blocked
, &context
->sigset
, sizeof(blocked
)))
351 sigdelsetmask(&blocked
, ~_BLOCKABLE
);
352 spin_lock_irq(¤t
->sigmask_lock
);
353 current
->blocked
= blocked
;
354 recalc_sigpending(current
);
355 spin_unlock_irq(¤t
->sigmask_lock
);
358 * Don't let your children do this ...
360 __asm__
__volatile__(
362 "j\tret_from_sys_call"
375 struct sigact_irix5
{
377 void (*handler
)(int);
383 static inline void dump_sigact_irix5(struct sigact_irix5
*p
)
385 printk("<f[%d] hndlr[%08lx] msk[%08lx]>", p
->flags
,
386 (unsigned long) p
->handler
,
387 (unsigned long) p
->sigset
[0]);
392 irix_sigaction(int sig
, const struct sigaction
*act
,
393 struct sigaction
*oact
, unsigned long trampoline
)
395 struct k_sigaction new_ka
, old_ka
;
399 printk(" (%d,%s,%s,%08lx) ", sig
, (!new ? "0" : "NEW"),
400 (!old
? "0" : "OLD"), trampoline
);
402 dump_sigact_irix5(new); printk(" ");
407 if (verify_area(VERIFY_READ
, act
, sizeof(*act
)) ||
408 __get_user(new_ka
.sa
.sa_handler
, &act
->sa_handler
) ||
409 __get_user(new_ka
.sa
.sa_flags
, &act
->sa_flags
))
412 __copy_from_user(&mask
, &act
->sa_mask
, sizeof(sigset_t
));
413 new_ka
.ka_restorer
= NULL
;
417 * Hmmm... methinks IRIX libc always passes a valid trampoline
418 * value for all invocations of sigaction. Will have to
419 * investigate. POSIX POSIX, die die die...
421 current
->tss
.irix_trampoline
= trampoline
;
423 /* XXX Implement SIG_SETMASK32 for IRIX compatibility */
424 ret
= do_sigaction(sig
, act
? &new_ka
: NULL
, oact
? &old_ka
: NULL
);
427 if (verify_area(VERIFY_WRITE
, oact
, sizeof(*oact
)) ||
428 __put_user(old_ka
.sa
.sa_handler
, &oact
->sa_handler
) ||
429 __put_user(old_ka
.sa
.sa_flags
, &oact
->sa_flags
))
431 __copy_to_user(&old_ka
.sa
.sa_mask
, &oact
->sa_mask
,
438 asmlinkage
int irix_sigpending(irix_sigset_t
*set
)
441 if (verify_area(VERIFY_WRITE
, set
, sizeof(*set
)) < 0)
444 /* fill in "set" with signals pending but blocked. */
445 spin_lock_irq(¤t
->sigmask_lock
);
446 __put_user(current
->blocked
.sig
[0] & current
->signal
.sig
[0],
448 __put_user(current
->blocked
.sig
[1] & current
->signal
.sig
[1],
450 __put_user(current
->blocked
.sig
[2] & current
->signal
.sig
[2],
452 __put_user(current
->blocked
.sig
[3] & current
->signal
.sig
[3],
454 spin_unlock_irq(¤t
->sigmask_lock
);
459 asmlinkage
int irix_sigprocmask(int how
, irix_sigset_t
*new, irix_sigset_t
*old
)
461 sigset_t oldbits
, newbits
;
466 error
= verify_area(VERIFY_READ
, new, sizeof(*new));
469 __copy_from_user(&newbits
, new, sizeof(unsigned long)*4);
470 sigdelsetmask(&newbits
, ~_BLOCKABLE
);
472 spin_lock_irq(¤t
->sigmask_lock
);
473 oldbits
= current
->blocked
;
477 sigorsets(&newbits
, &oldbits
, &newbits
);
481 sigandsets(&newbits
, &oldbits
, &newbits
);
488 siginitset(&newbits
, newbits
.sig
[0]);
494 recalc_sigpending(current
);
495 spin_unlock_irq(¤t
->sigmask_lock
);
498 error
= verify_area(VERIFY_WRITE
, old
, sizeof(*old
));
501 __copy_to_user(old
, ¤t
->blocked
, sizeof(unsigned long)*4);
507 asmlinkage
int irix_sigsuspend(struct pt_regs
*regs
)
509 sigset_t
*uset
, saveset
, newset
;
511 uset
= (sigset_t
*) regs
->regs
[4];
512 if (copy_from_user(&newset
, uset
, sizeof(sigset_t
)))
514 sigdelsetmask(&newset
, ~_BLOCKABLE
);
516 spin_lock_irq(¤t
->sigmask_lock
);
517 saveset
= current
->blocked
;
518 current
->blocked
= newset
;
519 spin_unlock_irq(¤t
->sigmask_lock
);
521 regs
->regs
[2] = -EINTR
;
523 current
->state
= TASK_INTERRUPTIBLE
;
525 if (do_irix_signal(&saveset
, regs
))
530 /* hate hate hate... */
531 struct irix5_siginfo
{
532 int sig
, code
, error
;
534 char unused
[128 - (3 * 4)]; /* Safety net. */
540 int utime
, status
, stime
;
545 unsigned long fault_addr
;
552 unsigned long sigval
;
556 static inline unsigned long timespectojiffies(struct timespec
*value
)
558 unsigned long sec
= (unsigned) value
->tv_sec
;
559 long nsec
= value
->tv_nsec
;
561 if (sec
> (LONG_MAX
/ HZ
))
563 nsec
+= 1000000000L / HZ
- 1;
564 nsec
/= 1000000000L / HZ
;
565 return HZ
* sec
+ nsec
;
568 asmlinkage
int irix_sigpoll_sys(unsigned long *set
, struct irix5_siginfo
*info
,
571 long expire
= MAX_SCHEDULE_TIMEOUT
;
573 int i
, sig
, error
, timeo
= 0;
577 printk("[%s:%d] irix_sigpoll_sys(%p,%p,%p)\n",
578 current
->comm
, current
->pid
, set
, info
, tp
);
581 /* Must always specify the signal set. */
585 error
= verify_area(VERIFY_READ
, set
, sizeof(kset
));
589 __copy_from_user(&kset
, set
, sizeof(set
));
593 if (info
&& clear_user(info
, sizeof(*info
))) {
599 error
= verify_area(VERIFY_READ
, tp
, sizeof(*tp
));
602 if(!tp
->tv_sec
&& !tp
->tv_nsec
) {
606 expire
= timespectojiffies(tp
)+(tp
->tv_sec
||tp
->tv_nsec
);
612 current
->state
= TASK_INTERRUPTIBLE
;
613 expire
= schedule_timeout(expire
);
616 tmp
|= (current
->signal
.sig
[i
] & kset
.sig
[i
]);
624 if (signal_pending(current
))
630 for(sig
= 1; i
<= 65 /* IRIX_NSIG */; sig
++) {
631 if (sigismember (&kset
, sig
))
633 if (sigismember (¤t
->signal
, sig
)) {
634 /* XXX need more than this... */
642 /* Should not get here, but do something sane if we do. */
650 /* This is here because of irix5_siginfo definition. */
655 extern int getrusage(struct task_struct
*, int, struct rusage
*);
663 #define W_MASK (W_EXITED | W_TRAPPED | W_STOPPED | W_CONT | W_NOHANG)
665 asmlinkage
int irix_waitsys(int type
, int pid
, struct irix5_siginfo
*info
,
666 int options
, struct rusage
*ru
)
669 struct wait_queue wait
= { current
, NULL
};
670 struct task_struct
*p
;
677 retval
= verify_area(VERIFY_WRITE
, info
, sizeof(*info
));
681 retval
= verify_area(VERIFY_WRITE
, ru
, sizeof(*ru
));
685 if(options
& ~(W_MASK
)) {
689 if(type
!= P_PID
&& type
!= P_PGID
&& type
!= P_ALL
) {
693 add_wait_queue(¤t
->wait_chldexit
, &wait
);
696 for(p
= current
->p_cptr
; p
; p
= p
->p_osptr
) {
697 if((type
== P_PID
) && p
->pid
!= pid
)
699 if((type
== P_PGID
) && p
->pgrp
!= pid
)
701 if((p
->exit_signal
!= SIGCHLD
))
708 if (!(options
& (W_TRAPPED
|W_STOPPED
)) &&
709 !(p
->flags
& PF_PTRACED
))
712 getrusage(p
, RUSAGE_BOTH
, ru
);
713 __put_user(SIGCHLD
, &info
->sig
);
714 __put_user(0, &info
->code
);
715 __put_user(p
->pid
, &info
->stuff
.procinfo
.pid
);
716 __put_user((p
->exit_code
>> 8) & 0xff,
717 &info
->stuff
.procinfo
.procdata
.child
.status
);
718 __put_user(p
->times
.tms_utime
, &info
->stuff
.procinfo
.procdata
.child
.utime
);
719 __put_user(p
->times
.tms_stime
, &info
->stuff
.procinfo
.procdata
.child
.stime
);
724 current
->times
.tms_cutime
+= p
->times
.tms_utime
+ p
->times
.tms_cutime
;
725 current
->times
.tms_cstime
+= p
->times
.tms_stime
+ p
->times
.tms_cstime
;
727 getrusage(p
, RUSAGE_BOTH
, ru
);
728 __put_user(SIGCHLD
, &info
->sig
);
729 __put_user(1, &info
->code
); /* CLD_EXITED */
730 __put_user(p
->pid
, &info
->stuff
.procinfo
.pid
);
731 __put_user((p
->exit_code
>> 8) & 0xff,
732 &info
->stuff
.procinfo
.procdata
.child
.status
);
733 __put_user(p
->times
.tms_utime
,
734 &info
->stuff
.procinfo
.procdata
.child
.utime
);
735 __put_user(p
->times
.tms_stime
,
736 &info
->stuff
.procinfo
.procdata
.child
.stime
);
738 if (p
->p_opptr
!= p
->p_pptr
) {
740 p
->p_pptr
= p
->p_opptr
;
742 notify_parent(p
, SIGCHLD
);
752 if(options
& W_NOHANG
)
754 retval
= -ERESTARTSYS
;
755 if(signal_pending(current
))
757 current
->state
= TASK_INTERRUPTIBLE
;
763 remove_wait_queue(¤t
->wait_chldexit
, &wait
);
770 struct irix5_context
{
774 struct { u32 sp
, size
, flags
; } stack
;
780 u32 weird_graphics_thing
;
783 asmlinkage
int irix_getcontext(struct pt_regs
*regs
)
785 int error
, i
, base
= 0;
786 struct irix5_context
*ctx
;
790 if(regs
->regs
[2] == 1000)
792 ctx
= (struct irix5_context
*) regs
->regs
[base
+ 4];
795 printk("[%s:%d] irix_getcontext(%p)\n",
796 current
->comm
, current
->pid
, ctx
);
799 error
= verify_area(VERIFY_WRITE
, ctx
, sizeof(*ctx
));
802 __put_user(current
->tss
.irix_oldctx
, &ctx
->link
);
804 __copy_to_user(&ctx
->sigmask
, ¤t
->blocked
, sizeof(irix_sigset_t
));
806 /* XXX Do sigstack stuff someday... */
807 __put_user(0, &ctx
->stack
.sp
);
808 __put_user(0, &ctx
->stack
.size
);
809 __put_user(0, &ctx
->stack
.flags
);
811 __put_user(0, &ctx
->weird_graphics_thing
);
812 __put_user(0, &ctx
->regs
[0]);
813 for(i
= 1; i
< 32; i
++)
814 __put_user(regs
->regs
[i
], &ctx
->regs
[i
]);
815 __put_user(regs
->lo
, &ctx
->regs
[32]);
816 __put_user(regs
->hi
, &ctx
->regs
[33]);
817 __put_user(regs
->cp0_cause
, &ctx
->regs
[34]);
818 __put_user(regs
->cp0_epc
, &ctx
->regs
[35]);
821 if(!current
->used_math
) {
825 printk("Wheee, no code for saving IRIX FPU context yet.\n");
827 __put_user(flags
, &ctx
->flags
);
835 asmlinkage
unsigned long irix_setcontext(struct pt_regs
*regs
)
838 struct irix5_context
*ctx
;
841 if(regs
->regs
[2] == 1000)
843 ctx
= (struct irix5_context
*) regs
->regs
[base
+ 4];
846 printk("[%s:%d] irix_setcontext(%p)\n",
847 current
->comm
, current
->pid
, ctx
);
850 error
= verify_area(VERIFY_READ
, ctx
, sizeof(*ctx
));
854 if(ctx
->flags
& 0x02) {
855 /* XXX sigstack garbage, todo... */
856 printk("Wheee, cannot do sigstack stuff in setcontext\n");
859 if(ctx
->flags
& 0x04) {
862 /* XXX extra control block stuff... todo... */
863 for(i
= 1; i
< 32; i
++)
864 regs
->regs
[i
] = ctx
->regs
[i
];
865 regs
->lo
= ctx
->regs
[32];
866 regs
->hi
= ctx
->regs
[33];
867 regs
->cp0_epc
= ctx
->regs
[35];
870 if(ctx
->flags
& 0x08) {
871 /* XXX fpu context, blah... */
872 printk("Wheee, cannot restore FPU context yet...\n");
874 current
->tss
.irix_oldctx
= ctx
->link
;
875 error
= regs
->regs
[2];
882 struct irix_sigstack
{ unsigned long sp
; int status
; };
884 asmlinkage
int irix_sigstack(struct irix_sigstack
*new, struct irix_sigstack
*old
)
890 printk("[%s:%d] irix_sigstack(%p,%p)\n",
891 current
->comm
, current
->pid
, new, old
);
894 error
= verify_area(VERIFY_READ
, new, sizeof(*new));
900 error
= verify_area(VERIFY_WRITE
, old
, sizeof(*old
));
910 struct irix_sigaltstack
{ unsigned long sp
; int size
; int status
; };
912 asmlinkage
int irix_sigaltstack(struct irix_sigaltstack
*new,
913 struct irix_sigaltstack
*old
)
919 printk("[%s:%d] irix_sigaltstack(%p,%p)\n",
920 current
->comm
, current
->pid
, new, old
);
923 error
= verify_area(VERIFY_READ
, new, sizeof(*new));
929 error
= verify_area(VERIFY_WRITE
, old
, sizeof(*old
));
942 struct irix_procset
{
943 int cmd
, ltype
, lid
, rtype
, rid
;
946 asmlinkage
int irix_sigsendset(struct irix_procset
*pset
, int sig
)
951 error
= verify_area(VERIFY_READ
, pset
, sizeof(*pset
));
955 printk("[%s:%d] irix_sigsendset([%d,%d,%d,%d,%d],%d)\n",
956 current
->comm
, current
->pid
,
957 pset
->cmd
, pset
->ltype
, pset
->lid
, pset
->rtype
, pset
->rid
,