2 * irixsig.c: WHEEE, IRIX signals! YOW, am I compatable or what?!?!
4 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
5 * Copyright (C) 1997 - 2000 Ralf Baechle (ralf@gnu.org)
6 * Copyright (C) 2000 Silicon Graphics, Inc.
8 #include <linux/kernel.h>
9 #include <linux/sched.h>
11 #include <linux/errno.h>
12 #include <linux/smp.h>
13 #include <linux/smp_lock.h>
14 #include <linux/time.h>
16 #include <asm/ptrace.h>
17 #include <asm/uaccess.h>
19 asmlinkage
int sys_wait4(pid_t pid
, unsigned long *stat_addr
,
20 int options
, unsigned long *ru
);
21 extern asmlinkage
void syscall_trace(void);
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
[4] = (unsigned long) signr
;
118 regs
->regs
[5] = 0; /* XXX sigcode XXX */
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
= (unsigned long) ka
->sa
.sa_restorer
;
125 if (signr
== SIGSEGV
)
126 ka
->sa
.sa_handler
= SIG_DFL
;
127 force_sig(SIGSEGV
, current
);
131 setup_irix_rt_frame(struct k_sigaction
* ka
, struct pt_regs
*regs
,
132 int signr
, sigset_t
*oldmask
, siginfo_t
*info
)
134 printk("Aiee: setup_tr_frame wants to be written");
138 static inline void handle_signal(unsigned long sig
, struct k_sigaction
*ka
,
139 siginfo_t
*info
, sigset_t
*oldset
, struct pt_regs
* regs
)
141 if (ka
->sa
.sa_flags
& SA_SIGINFO
)
142 setup_irix_rt_frame(ka
, regs
, sig
, oldset
, info
);
144 setup_irix_frame(ka
, regs
, sig
, oldset
);
146 if (ka
->sa
.sa_flags
& SA_ONESHOT
)
147 ka
->sa
.sa_handler
= SIG_DFL
;
148 if (!(ka
->sa
.sa_flags
& SA_NODEFER
)) {
149 spin_lock_irq(¤t
->sigmask_lock
);
150 sigorsets(¤t
->blocked
,¤t
->blocked
,&ka
->sa
.sa_mask
);
151 sigaddset(¤t
->blocked
,sig
);
152 recalc_sigpending(current
);
153 spin_unlock_irq(¤t
->sigmask_lock
);
157 static inline void syscall_restart(struct pt_regs
*regs
, struct k_sigaction
*ka
)
159 switch(regs
->regs
[0]) {
161 regs
->regs
[2] = EINTR
;
164 if(!(ka
->sa
.sa_flags
& SA_RESTART
)) {
165 regs
->regs
[2] = EINTR
;
169 case ERESTARTNOINTR
: /* Userland will reload $v0. */
173 regs
->regs
[0] = 0; /* Don't deal with this again. */
176 asmlinkage
int do_irix_signal(sigset_t
*oldset
, struct pt_regs
*regs
)
178 struct k_sigaction
*ka
;
182 oldset
= ¤t
->blocked
;
187 spin_lock_irq(¤t
->sigmask_lock
);
188 signr
= dequeue_signal(¤t
->blocked
, &info
);
189 spin_unlock_irq(¤t
->sigmask_lock
);
194 if ((current
->ptrace
& PT_PTRACED
) && signr
!= SIGKILL
) {
195 /* Let the debugger run. */
196 current
->exit_code
= signr
;
197 current
->state
= TASK_STOPPED
;
198 notify_parent(current
, SIGCHLD
);
201 /* We're back. Did the debugger cancel the sig? */
202 if (!(signr
= current
->exit_code
))
204 current
->exit_code
= 0;
206 /* The debugger continued. Ignore SIGSTOP. */
207 if (signr
== SIGSTOP
)
210 /* Update the siginfo structure. Is this good? */
211 if (signr
!= info
.si_signo
) {
212 info
.si_signo
= signr
;
214 info
.si_code
= SI_USER
;
215 info
.si_pid
= current
->p_pptr
->pid
;
216 info
.si_uid
= current
->p_pptr
->uid
;
219 /* If the (new) signal is now blocked, requeue it. */
220 if (sigismember(¤t
->blocked
, signr
)) {
221 send_sig_info(signr
, &info
, current
);
226 ka
= ¤t
->sig
->action
[signr
-1];
227 if (ka
->sa
.sa_handler
== SIG_IGN
) {
228 if (signr
!= SIGCHLD
)
230 /* Check for SIGCHLD: it's special. */
231 while (sys_wait4(-1, NULL
, WNOHANG
, NULL
) > 0)
236 if (ka
->sa
.sa_handler
== SIG_DFL
) {
237 int exit_code
= signr
;
239 /* Init gets no signals it doesn't want. */
240 if (current
->pid
== 1)
244 case SIGCONT
: case SIGCHLD
: case SIGWINCH
:
247 case SIGTSTP
: case SIGTTIN
: case SIGTTOU
:
248 if (is_orphaned_pgrp(current
->pgrp
))
253 current
->state
= TASK_STOPPED
;
254 current
->exit_code
= signr
;
255 if (!(current
->p_pptr
->sig
->action
[SIGCHLD
-1].sa
.sa_flags
& SA_NOCLDSTOP
))
256 notify_parent(current
, SIGCHLD
);
260 case SIGQUIT
: case SIGILL
: case SIGTRAP
:
261 case SIGABRT
: case SIGFPE
: case SIGSEGV
:
262 if (do_coredump(signr
, regs
))
267 sigaddset(¤t
->pending
.signal
, signr
);
268 recalc_sigpending(current
);
269 current
->flags
|= PF_SIGNALED
;
276 syscall_restart(regs
, ka
);
277 /* Whee! Actually deliver the signal. */
278 handle_signal(signr
, ka
, &info
, oldset
, regs
);
283 * Who's code doesn't conform to the restartable syscall convention
284 * dies here!!! The li instruction, a single machine instruction,
285 * must directly be followed by the syscall instruction.
288 if (regs
->regs
[2] == ERESTARTNOHAND
||
289 regs
->regs
[2] == ERESTARTSYS
||
290 regs
->regs
[2] == ERESTARTNOINTR
) {
298 irix_sigreturn(struct pt_regs
*regs
)
300 struct sigctx_irix5
*context
, *magic
;
301 unsigned long umask
, mask
;
303 int sig
, i
, base
= 0;
306 if(regs
->regs
[2] == 1000)
309 context
= (struct sigctx_irix5
*) regs
->regs
[base
+ 4];
310 magic
= (struct sigctx_irix5
*) regs
->regs
[base
+ 5];
311 sig
= (int) regs
->regs
[base
+ 6];
313 printk("[%s:%d] IRIX sigreturn(scp[%p],ucp[%p],sig[%d])\n",
314 current
->comm
, current
->pid
, context
, magic
, sig
);
318 if (!access_ok(VERIFY_READ
, context
, sizeof(struct sigctx_irix5
)))
322 dump_irix5_sigctx(context
);
325 __get_user(regs
->cp0_epc
, &context
->pc
);
326 umask
= context
->rmask
; mask
= 2;
327 for (i
= 1; i
< 32; i
++, mask
<<= 1) {
329 __get_user(regs
->regs
[i
], &context
->regs
[i
]);
331 __get_user(regs
->hi
, &context
->hi
);
332 __get_user(regs
->lo
, &context
->lo
);
334 if ((umask
& 1) && context
->usedfp
) {
335 fregs
= (u64
*) ¤t
->thread
.fpu
;
336 for(i
= 0; i
< 32; i
++)
337 fregs
[i
] = (u64
) context
->fpregs
[i
];
338 __get_user(current
->thread
.fpu
.hard
.control
, &context
->fpcsr
);
341 /* XXX do sigstack crapola here... XXX */
343 if (__copy_from_user(&blocked
, &context
->sigset
, sizeof(blocked
)))
346 sigdelsetmask(&blocked
, ~_BLOCKABLE
);
347 spin_lock_irq(¤t
->sigmask_lock
);
348 current
->blocked
= blocked
;
349 recalc_sigpending(current
);
350 spin_unlock_irq(¤t
->sigmask_lock
);
353 * Don't let your children do this ...
355 if (current
->ptrace
& PT_TRACESYS
)
357 __asm__
__volatile__(
359 "j\tret_from_sys_call"
365 force_sig(SIGSEGV
, current
);
368 struct sigact_irix5
{
370 void (*handler
)(int);
376 static inline void dump_sigact_irix5(struct sigact_irix5
*p
)
378 printk("<f[%d] hndlr[%08lx] msk[%08lx]>", p
->flags
,
379 (unsigned long) p
->handler
,
380 (unsigned long) p
->sigset
[0]);
385 irix_sigaction(int sig
, const struct sigaction
*act
,
386 struct sigaction
*oact
, void *trampoline
)
388 struct k_sigaction new_ka
, old_ka
;
392 printk(" (%d,%s,%s,%08lx) ", sig
, (!new ? "0" : "NEW"),
393 (!old
? "0" : "OLD"), trampoline
);
395 dump_sigact_irix5(new); printk(" ");
400 if (verify_area(VERIFY_READ
, act
, sizeof(*act
)) ||
401 __get_user(new_ka
.sa
.sa_handler
, &act
->sa_handler
) ||
402 __get_user(new_ka
.sa
.sa_flags
, &act
->sa_flags
))
405 __copy_from_user(&mask
, &act
->sa_mask
, sizeof(sigset_t
));
408 * Hmmm... methinks IRIX libc always passes a valid trampoline
409 * value for all invocations of sigaction. Will have to
410 * investigate. POSIX POSIX, die die die...
412 new_ka
.sa
.sa_restorer
= trampoline
;
415 /* XXX Implement SIG_SETMASK32 for IRIX compatibility */
416 ret
= do_sigaction(sig
, act
? &new_ka
: NULL
, oact
? &old_ka
: NULL
);
419 if (verify_area(VERIFY_WRITE
, oact
, sizeof(*oact
)) ||
420 __put_user(old_ka
.sa
.sa_handler
, &oact
->sa_handler
) ||
421 __put_user(old_ka
.sa
.sa_flags
, &oact
->sa_flags
))
423 __copy_to_user(&old_ka
.sa
.sa_mask
, &oact
->sa_mask
,
430 asmlinkage
int irix_sigpending(irix_sigset_t
*set
)
432 return do_sigpending(set
, sizeof(*set
));
435 asmlinkage
int irix_sigprocmask(int how
, irix_sigset_t
*new, irix_sigset_t
*old
)
437 sigset_t oldbits
, newbits
;
441 error
= verify_area(VERIFY_READ
, new, sizeof(*new));
444 __copy_from_user(&newbits
, new, sizeof(unsigned long)*4);
445 sigdelsetmask(&newbits
, ~_BLOCKABLE
);
447 spin_lock_irq(¤t
->sigmask_lock
);
448 oldbits
= current
->blocked
;
452 sigorsets(&newbits
, &oldbits
, &newbits
);
456 sigandsets(&newbits
, &oldbits
, &newbits
);
463 siginitset(&newbits
, newbits
.sig
[0]);
469 recalc_sigpending(current
);
470 spin_unlock_irq(¤t
->sigmask_lock
);
473 error
= verify_area(VERIFY_WRITE
, old
, sizeof(*old
));
476 __copy_to_user(old
, ¤t
->blocked
, sizeof(unsigned long)*4);
482 asmlinkage
int irix_sigsuspend(struct pt_regs
*regs
)
484 sigset_t
*uset
, saveset
, newset
;
486 uset
= (sigset_t
*) regs
->regs
[4];
487 if (copy_from_user(&newset
, uset
, sizeof(sigset_t
)))
489 sigdelsetmask(&newset
, ~_BLOCKABLE
);
491 spin_lock_irq(¤t
->sigmask_lock
);
492 saveset
= current
->blocked
;
493 current
->blocked
= newset
;
494 recalc_sigpending(current
);
495 spin_unlock_irq(¤t
->sigmask_lock
);
497 regs
->regs
[2] = -EINTR
;
499 current
->state
= TASK_INTERRUPTIBLE
;
501 if (do_irix_signal(&saveset
, regs
))
506 /* hate hate hate... */
507 struct irix5_siginfo
{
508 int sig
, code
, error
;
510 char unused
[128 - (3 * 4)]; /* Safety net. */
516 int utime
, status
, stime
;
521 unsigned long fault_addr
;
528 unsigned long sigval
;
532 static inline unsigned long timespectojiffies(struct timespec
*value
)
534 unsigned long sec
= (unsigned) value
->tv_sec
;
535 long nsec
= value
->tv_nsec
;
537 if (sec
> (LONG_MAX
/ HZ
))
539 nsec
+= 1000000000L / HZ
- 1;
540 nsec
/= 1000000000L / HZ
;
541 return HZ
* sec
+ nsec
;
544 asmlinkage
int irix_sigpoll_sys(unsigned long *set
, struct irix5_siginfo
*info
,
547 long expire
= MAX_SCHEDULE_TIMEOUT
;
549 int i
, sig
, error
, timeo
= 0;
552 printk("[%s:%d] irix_sigpoll_sys(%p,%p,%p)\n",
553 current
->comm
, current
->pid
, set
, info
, tp
);
556 /* Must always specify the signal set. */
560 error
= verify_area(VERIFY_READ
, set
, sizeof(kset
));
564 __copy_from_user(&kset
, set
, sizeof(set
));
568 if (info
&& clear_user(info
, sizeof(*info
))) {
574 error
= verify_area(VERIFY_READ
, tp
, sizeof(*tp
));
577 if(!tp
->tv_sec
&& !tp
->tv_nsec
) {
581 expire
= timespectojiffies(tp
)+(tp
->tv_sec
||tp
->tv_nsec
);
587 current
->state
= TASK_INTERRUPTIBLE
;
588 expire
= schedule_timeout(expire
);
591 tmp
|= (current
->pending
.signal
.sig
[i
] & kset
.sig
[i
]);
599 if (signal_pending(current
))
605 for(sig
= 1; i
<= 65 /* IRIX_NSIG */; sig
++) {
606 if (sigismember (&kset
, sig
))
608 if (sigismember (¤t
->pending
.signal
, sig
)) {
609 /* XXX need more than this... */
617 /* Should not get here, but do something sane if we do. */
624 /* This is here because of irix5_siginfo definition. */
629 extern int getrusage(struct task_struct
*, int, struct rusage
*);
637 #define W_MASK (W_EXITED | W_TRAPPED | W_STOPPED | W_CONT | W_NOHANG)
639 asmlinkage
int irix_waitsys(int type
, int pid
, struct irix5_siginfo
*info
,
640 int options
, struct rusage
*ru
)
643 DECLARE_WAITQUEUE(wait
, current
);
644 struct task_struct
*p
;
650 retval
= verify_area(VERIFY_WRITE
, info
, sizeof(*info
));
654 retval
= verify_area(VERIFY_WRITE
, ru
, sizeof(*ru
));
658 if (options
& ~(W_MASK
)) {
662 if (type
!= P_PID
&& type
!= P_PGID
&& type
!= P_ALL
) {
666 add_wait_queue(¤t
->wait_chldexit
, &wait
);
669 current
->state
= TASK_INTERRUPTIBLE
;
670 read_lock(&tasklist_lock
);
671 for (p
= current
->p_cptr
; p
; p
= p
->p_osptr
) {
672 if ((type
== P_PID
) && p
->pid
!= pid
)
674 if ((type
== P_PGID
) && p
->pgrp
!= pid
)
676 if ((p
->exit_signal
!= SIGCHLD
))
683 if (!(options
& (W_TRAPPED
|W_STOPPED
)) &&
684 !(p
->ptrace
& PT_PTRACED
))
687 getrusage(p
, RUSAGE_BOTH
, ru
);
688 __put_user(SIGCHLD
, &info
->sig
);
689 __put_user(0, &info
->code
);
690 __put_user(p
->pid
, &info
->stuff
.procinfo
.pid
);
691 __put_user((p
->exit_code
>> 8) & 0xff,
692 &info
->stuff
.procinfo
.procdata
.child
.status
);
693 __put_user(p
->times
.tms_utime
, &info
->stuff
.procinfo
.procdata
.child
.utime
);
694 __put_user(p
->times
.tms_stime
, &info
->stuff
.procinfo
.procdata
.child
.stime
);
699 current
->times
.tms_cutime
+= p
->times
.tms_utime
+ p
->times
.tms_cutime
;
700 current
->times
.tms_cstime
+= p
->times
.tms_stime
+ p
->times
.tms_cstime
;
702 getrusage(p
, RUSAGE_BOTH
, ru
);
703 __put_user(SIGCHLD
, &info
->sig
);
704 __put_user(1, &info
->code
); /* CLD_EXITED */
705 __put_user(p
->pid
, &info
->stuff
.procinfo
.pid
);
706 __put_user((p
->exit_code
>> 8) & 0xff,
707 &info
->stuff
.procinfo
.procdata
.child
.status
);
708 __put_user(p
->times
.tms_utime
,
709 &info
->stuff
.procinfo
.procdata
.child
.utime
);
710 __put_user(p
->times
.tms_stime
,
711 &info
->stuff
.procinfo
.procdata
.child
.stime
);
713 if (p
->p_opptr
!= p
->p_pptr
) {
715 p
->p_pptr
= p
->p_opptr
;
717 notify_parent(p
, SIGCHLD
);
725 read_unlock(&tasklist_lock
);
728 if (options
& W_NOHANG
)
730 retval
= -ERESTARTSYS
;
731 if (signal_pending(current
))
733 current
->state
= TASK_INTERRUPTIBLE
;
739 current
->state
= TASK_RUNNING
;
740 remove_wait_queue(¤t
->wait_chldexit
, &wait
);
746 struct irix5_context
{
750 struct { u32 sp
, size
, flags
; } stack
;
756 u32 weird_graphics_thing
;
759 asmlinkage
int irix_getcontext(struct pt_regs
*regs
)
761 int error
, i
, base
= 0;
762 struct irix5_context
*ctx
;
765 if (regs
->regs
[2] == 1000)
767 ctx
= (struct irix5_context
*) regs
->regs
[base
+ 4];
770 printk("[%s:%d] irix_getcontext(%p)\n",
771 current
->comm
, current
->pid
, ctx
);
774 error
= verify_area(VERIFY_WRITE
, ctx
, sizeof(*ctx
));
777 __put_user(current
->thread
.irix_oldctx
, &ctx
->link
);
779 __copy_to_user(&ctx
->sigmask
, ¤t
->blocked
, sizeof(irix_sigset_t
));
781 /* XXX Do sigstack stuff someday... */
782 __put_user(0, &ctx
->stack
.sp
);
783 __put_user(0, &ctx
->stack
.size
);
784 __put_user(0, &ctx
->stack
.flags
);
786 __put_user(0, &ctx
->weird_graphics_thing
);
787 __put_user(0, &ctx
->regs
[0]);
788 for (i
= 1; i
< 32; i
++)
789 __put_user(regs
->regs
[i
], &ctx
->regs
[i
]);
790 __put_user(regs
->lo
, &ctx
->regs
[32]);
791 __put_user(regs
->hi
, &ctx
->regs
[33]);
792 __put_user(regs
->cp0_cause
, &ctx
->regs
[34]);
793 __put_user(regs
->cp0_epc
, &ctx
->regs
[35]);
796 if(!current
->used_math
) {
800 printk("Wheee, no code for saving IRIX FPU context yet.\n");
802 __put_user(flags
, &ctx
->flags
);
809 asmlinkage
unsigned long irix_setcontext(struct pt_regs
*regs
)
812 struct irix5_context
*ctx
;
814 if(regs
->regs
[2] == 1000)
816 ctx
= (struct irix5_context
*) regs
->regs
[base
+ 4];
819 printk("[%s:%d] irix_setcontext(%p)\n",
820 current
->comm
, current
->pid
, ctx
);
823 error
= verify_area(VERIFY_READ
, ctx
, sizeof(*ctx
));
827 if (ctx
->flags
& 0x02) {
828 /* XXX sigstack garbage, todo... */
829 printk("Wheee, cannot do sigstack stuff in setcontext\n");
832 if (ctx
->flags
& 0x04) {
835 /* XXX extra control block stuff... todo... */
836 for(i
= 1; i
< 32; i
++)
837 regs
->regs
[i
] = ctx
->regs
[i
];
838 regs
->lo
= ctx
->regs
[32];
839 regs
->hi
= ctx
->regs
[33];
840 regs
->cp0_epc
= ctx
->regs
[35];
843 if (ctx
->flags
& 0x08) {
844 /* XXX fpu context, blah... */
845 printk("Wheee, cannot restore FPU context yet...\n");
847 current
->thread
.irix_oldctx
= ctx
->link
;
848 error
= regs
->regs
[2];
854 struct irix_sigstack
{ unsigned long sp
; int status
; };
856 asmlinkage
int irix_sigstack(struct irix_sigstack
*new, struct irix_sigstack
*old
)
861 printk("[%s:%d] irix_sigstack(%p,%p)\n",
862 current
->comm
, current
->pid
, new, old
);
865 error
= verify_area(VERIFY_READ
, new, sizeof(*new));
871 error
= verify_area(VERIFY_WRITE
, old
, sizeof(*old
));
881 struct irix_sigaltstack
{ unsigned long sp
; int size
; int status
; };
883 asmlinkage
int irix_sigaltstack(struct irix_sigaltstack
*new,
884 struct irix_sigaltstack
*old
)
889 printk("[%s:%d] irix_sigaltstack(%p,%p)\n",
890 current
->comm
, current
->pid
, new, old
);
893 error
= verify_area(VERIFY_READ
, new, sizeof(*new));
899 error
= verify_area(VERIFY_WRITE
, old
, sizeof(*old
));
911 struct irix_procset
{
912 int cmd
, ltype
, lid
, rtype
, rid
;
915 asmlinkage
int irix_sigsendset(struct irix_procset
*pset
, int sig
)
919 error
= verify_area(VERIFY_READ
, pset
, sizeof(*pset
));
923 printk("[%s:%d] irix_sigsendset([%d,%d,%d,%d,%d],%d)\n",
924 current
->comm
, current
->pid
,
925 pset
->cmd
, pset
->ltype
, pset
->lid
, pset
->rtype
, pset
->rid
,