4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
29 /* All Rights Reserved */
31 #include <sys/types.h>
32 #include <sys/param.h>
33 #include <sys/sysmacros.h>
34 #include <sys/signal.h>
35 #include <sys/systm.h>
38 #include <sys/class.h>
40 #include <sys/procfs.h>
44 #include <sys/archsystm.h>
45 #include <sys/vmparam.h>
46 #include <sys/prsystm.h>
47 #include <sys/reboot.h>
48 #include <sys/uadmin.h>
50 #include <sys/vnode.h>
52 #include <sys/session.h>
53 #include <sys/ucontext.h>
56 #include <sys/cmn_err.h>
57 #include <sys/debugreg.h>
58 #include <sys/thread.h>
59 #include <sys/vtrace.h>
60 #include <sys/consdev.h>
62 #include <sys/regset.h>
64 #include <sys/privregs.h>
66 #include <sys/stack.h>
73 #include <vm/seg_kmem.h>
74 #include <vm/seg_map.h>
75 #include <vm/seg_vn.h>
79 #include <sys/corectl.h>
80 #include <sys/modctl.h>
81 #include <sys/tuneable.h>
83 #include <sys/bootconf.h>
84 #include <sys/dumphdr.h>
85 #include <sys/promif.h>
86 #include <sys/systeminfo.h>
88 #include <sys/contract_impl.h>
89 #include <sys/x86_archext.h>
92 * Construct the execution environment for the user's signal
93 * handler and arrange for control to be given to it on return
94 * to userland. The library code now calls setcontext() to
95 * clean up after the signal handler, so sigret() is no longer
98 * (The various 'volatile' declarations are need to ensure that values
99 * are correct on the error return from on_fault().)
105 * An amd64 signal frame looks like this on the stack:
108 * <128 bytes of untouched stack space>
109 * <a siginfo_t [optional]>
113 * new %rsp: <return address (deliberately invalid)>
115 * The signal number and siginfo_t pointer are only pushed onto the stack in
116 * order to allow stack backtraces. The actual signal handling code expects the
117 * arguments in registers.
127 sendsig(int sig
, k_siginfo_t
*sip
, void (*hdlr
)())
129 volatile int minstacksz
;
134 volatile struct regs
*rp
;
136 volatile proc_t
*p
= ttoproc(curthread
);
137 struct as
*as
= p
->p_as
;
138 klwp_t
*lwp
= ttolwp(curthread
);
139 ucontext_t
*volatile tuc
= NULL
;
142 volatile int watched
;
145 * This routine is utterly dependent upon STACK_ALIGN being
146 * 16 and STACK_ENTRY_ALIGN being 8. Let's just acknowledge
147 * that and require it.
150 #if STACK_ALIGN != 16 || STACK_ENTRY_ALIGN != 8
151 #error "sendsig() amd64 did not find the expected stack alignments"
158 * Since we're setting up to run the signal handler we have to
159 * arrange that the stack at entry to the handler is (only)
160 * STACK_ENTRY_ALIGN (i.e. 8) byte aligned so that when the handler
161 * executes its push of %rbp, the stack realigns to STACK_ALIGN
162 * (i.e. 16) correctly.
164 * The new sp will point to the sigframe and the ucontext_t. The
165 * above means that sp (and thus sigframe) will be 8-byte aligned,
166 * but not 16-byte aligned. ucontext_t, however, contains %xmm regs
167 * which must be 16-byte aligned. Because of this, for correct
168 * alignment, sigframe must be a multiple of 8-bytes in length, but
169 * not 16-bytes. This will place ucontext_t at a nice 16-byte boundary.
172 /* LINTED: logical expression always true: op "||" */
173 ASSERT((sizeof (struct sigframe
) % 16) == 8);
175 minstacksz
= sizeof (struct sigframe
) + SA(sizeof (*uc
));
177 minstacksz
+= SA(sizeof (siginfo_t
));
178 ASSERT((minstacksz
& (STACK_ENTRY_ALIGN
- 1ul)) == 0);
181 * Figure out whether we will be handling this signal on
182 * an alternate stack specified by the user. Then allocate
183 * and validate the stack requirements for the signal handler
184 * context. on_fault will catch any faults.
186 newstack
= sigismember(&PTOU(curproc
)->u_sigonstack
, sig
) &&
187 !(lwp
->lwp_sigaltstack
.ss_flags
& (SS_ONSTACK
|SS_DISABLE
));
190 fp
= (caddr_t
)(SA((uintptr_t)lwp
->lwp_sigaltstack
.ss_sp
) +
191 SA(lwp
->lwp_sigaltstack
.ss_size
) - STACK_ALIGN
);
194 * Drop below the 128-byte reserved region of the stack frame
195 * we're interrupting.
197 fp
= (caddr_t
)rp
->r_sp
- STACK_RESERVE
;
201 * Force proper stack pointer alignment, even in the face of a
202 * misaligned stack pointer from user-level before the signal.
204 fp
= (caddr_t
)((uintptr_t)fp
& ~(STACK_ENTRY_ALIGN
- 1ul));
207 * Most of the time during normal execution, the stack pointer
208 * is aligned on a STACK_ALIGN (i.e. 16 byte) boundary. However,
209 * (for example) just after a call instruction (which pushes
210 * the return address), the callers stack misaligns until the
211 * 'push %rbp' happens in the callee prolog. So while we should
212 * expect the stack pointer to be always at least STACK_ENTRY_ALIGN
213 * aligned, we should -not- expect it to always be STACK_ALIGN aligned.
214 * We now adjust to ensure that the new sp is aligned to
215 * STACK_ENTRY_ALIGN but not to STACK_ALIGN.
217 sp
= fp
- minstacksz
;
218 if (((uintptr_t)sp
& (STACK_ALIGN
- 1ul)) == 0) {
219 sp
-= STACK_ENTRY_ALIGN
;
220 minstacksz
= fp
- sp
;
224 * Now, make sure the resulting signal frame address is sane
226 if (sp
>= as
->a_userlimit
|| fp
>= as
->a_userlimit
) {
228 printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
229 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
230 printf("sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
231 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
232 printf("sp above USERLIMIT\n");
237 watched
= watch_disable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
245 fp
-= SA(sizeof (siginfo_t
));
246 uzero(fp
, sizeof (siginfo_t
));
247 if (SI_FROMUSER(sip
) &&
248 (zoneid
= p
->p_zone
->zone_id
) != GLOBAL_ZONEID
&&
249 zoneid
!= sip
->si_zoneid
) {
250 k_siginfo_t sani_sip
= *sip
;
252 sani_sip
.si_pid
= p
->p_zone
->zone_zsched
->p_pid
;
254 sani_sip
.si_ctid
= -1;
255 sani_sip
.si_zoneid
= zoneid
;
256 copyout_noerr(&sani_sip
, fp
, sizeof (sani_sip
));
258 copyout_noerr(sip
, fp
, sizeof (*sip
));
259 sip_addr
= (siginfo_t
*)fp
;
261 if (sig
== SIGPROF
&&
262 curthread
->t_rprof
!= NULL
&&
263 curthread
->t_rprof
->rp_anystate
) {
265 * We stand on our head to deal with
266 * the real time profiling signal.
267 * Fill in the stuff that doesn't fit
268 * in a normal k_siginfo structure.
270 int i
= sip
->si_nsysarg
;
274 (ulong_t
*)&(sip_addr
->si_sysarg
[i
]),
275 (ulong_t
)lwp
->lwp_arg
[i
]);
276 copyout_noerr(curthread
->t_rprof
->rp_state
,
278 sizeof (curthread
->t_rprof
->rp_state
));
284 * save the current context on the user stack directly after the
285 * sigframe. Since sigframe is 8-byte-but-not-16-byte aligned,
286 * and since sizeof (struct sigframe) is 24, this guarantees
287 * 16-byte alignment for ucontext_t and its %xmm registers.
289 uc
= (ucontext_t
*)(sp
+ sizeof (struct sigframe
));
290 tuc
= kmem_alloc(sizeof (*tuc
), KM_SLEEP
);
292 savecontext(tuc
, &lwp
->lwp_sigoldmask
);
295 copyout_noerr(tuc
, uc
, sizeof (*tuc
));
296 kmem_free(tuc
, sizeof (*tuc
));
299 lwp
->lwp_oldcontext
= (uintptr_t)uc
;
302 lwp
->lwp_sigaltstack
.ss_flags
|= SS_ONSTACK
;
304 copyout_noerr(&lwp
->lwp_sigaltstack
,
305 (stack_t
*)lwp
->lwp_ustack
, sizeof (stack_t
));
309 * Set up signal handler return and stack linkage
312 struct sigframe frame
;
315 * ensure we never return "normally"
317 frame
.retaddr
= (caddr_t
)(uintptr_t)-1L;
319 frame
.sip
= sip_addr
;
320 copyout_noerr(&frame
, sp
, sizeof (frame
));
325 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
328 * Set up user registers for execution of signal handler.
330 rp
->r_sp
= (greg_t
)sp
;
331 rp
->r_pc
= (greg_t
)hdlr
;
332 rp
->r_ps
= PSL_USER
| (rp
->r_ps
& PS_IOPL
);
335 rp
->r_rsi
= (uintptr_t)sip_addr
;
336 rp
->r_rdx
= (uintptr_t)uc
;
338 if ((rp
->r_cs
& 0xffff) != UCS_SEL
||
339 (rp
->r_ss
& 0xffff) != UDS_SEL
) {
341 * Try our best to deliver the signal.
348 * Don't set lwp_eosys here. sendsig() is called via psig() after
349 * lwp_eosys is handled, so setting it here would affect the next
357 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
359 kmem_free(tuc
, sizeof (*tuc
));
361 printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
362 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
363 printf("on fault, sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
364 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
369 #ifdef _SYSCALL32_IMPL
372 * An i386 SVR4/ABI signal frame looks like this on the stack:
375 * <a siginfo32_t [optional]>
377 * <pointer to that ucontext32_t>
378 * <pointer to that siginfo32_t>
380 * new %esp: <return address (deliberately invalid)>
390 sendsig32(int sig
, k_siginfo_t
*sip
, void (*hdlr
)())
392 volatile int minstacksz
;
397 volatile struct regs
*rp
;
399 volatile proc_t
*p
= ttoproc(curthread
);
400 klwp_t
*lwp
= ttolwp(curthread
);
401 ucontext32_t
*volatile tuc
= NULL
;
403 siginfo32_t
*sip_addr
;
404 volatile int watched
;
409 minstacksz
= SA32(sizeof (struct sigframe32
)) + SA32(sizeof (*uc
));
411 minstacksz
+= SA32(sizeof (siginfo32_t
));
412 ASSERT((minstacksz
& (STACK_ALIGN32
- 1)) == 0);
415 * Figure out whether we will be handling this signal on
416 * an alternate stack specified by the user. Then allocate
417 * and validate the stack requirements for the signal handler
418 * context. on_fault will catch any faults.
420 newstack
= sigismember(&PTOU(curproc
)->u_sigonstack
, sig
) &&
421 !(lwp
->lwp_sigaltstack
.ss_flags
& (SS_ONSTACK
|SS_DISABLE
));
424 fp
= (caddr_t
)(SA32((uintptr_t)lwp
->lwp_sigaltstack
.ss_sp
) +
425 SA32(lwp
->lwp_sigaltstack
.ss_size
) - STACK_ALIGN32
);
426 } else if ((rp
->r_ss
& 0xffff) != UDS_SEL
) {
429 * If the stack segment selector is -not- pointing at
430 * the UDS_SEL descriptor and we have an LDT entry for
431 * it instead, add the base address to find the effective va.
433 if ((ldt
= p
->p_ldt
) != NULL
)
434 fp
= (caddr_t
)rp
->r_sp
+
435 USEGD_GETBASE(&ldt
[SELTOIDX(rp
->r_ss
)]);
437 fp
= (caddr_t
)rp
->r_sp
;
439 fp
= (caddr_t
)rp
->r_sp
;
442 * Force proper stack pointer alignment, even in the face of a
443 * misaligned stack pointer from user-level before the signal.
444 * Don't use the SA32() macro because that rounds up, not down.
446 fp
= (caddr_t
)((uintptr_t)fp
& ~(STACK_ALIGN32
- 1));
447 sp
= fp
- minstacksz
;
450 * Make sure lwp hasn't trashed its stack
452 if (sp
>= (caddr_t
)(uintptr_t)USERLIMIT32
||
453 fp
>= (caddr_t
)(uintptr_t)USERLIMIT32
) {
455 printf("sendsig32: bad signal stack cmd=%s, pid=%d, sig=%d\n",
456 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
457 printf("sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
458 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
459 printf("sp above USERLIMIT\n");
464 watched
= watch_disable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
473 siginfo_kto32(sip
, &si32
);
474 if (SI_FROMUSER(sip
) &&
475 (zoneid
= p
->p_zone
->zone_id
) != GLOBAL_ZONEID
&&
476 zoneid
!= sip
->si_zoneid
) {
477 si32
.si_pid
= p
->p_zone
->zone_zsched
->p_pid
;
480 si32
.si_zoneid
= zoneid
;
482 fp
-= SA32(sizeof (si32
));
483 uzero(fp
, sizeof (si32
));
484 copyout_noerr(&si32
, fp
, sizeof (si32
));
485 sip_addr
= (siginfo32_t
*)fp
;
487 if (sig
== SIGPROF
&&
488 curthread
->t_rprof
!= NULL
&&
489 curthread
->t_rprof
->rp_anystate
) {
491 * We stand on our head to deal with
492 * the real-time profiling signal.
493 * Fill in the stuff that doesn't fit
494 * in a normal k_siginfo structure.
496 int i
= sip
->si_nsysarg
;
499 suword32_noerr(&(sip_addr
->si_sysarg
[i
]),
500 (uint32_t)lwp
->lwp_arg
[i
]);
501 copyout_noerr(curthread
->t_rprof
->rp_state
,
503 sizeof (curthread
->t_rprof
->rp_state
));
508 /* save the current context on the user stack */
509 fp
-= SA32(sizeof (*tuc
));
510 uc
= (ucontext32_t
*)fp
;
511 tuc
= kmem_alloc(sizeof (*tuc
), KM_SLEEP
);
513 savecontext32(tuc
, &lwp
->lwp_sigoldmask
);
516 copyout_noerr(tuc
, uc
, sizeof (*tuc
));
517 kmem_free(tuc
, sizeof (*tuc
));
520 lwp
->lwp_oldcontext
= (uintptr_t)uc
;
523 lwp
->lwp_sigaltstack
.ss_flags
|= SS_ONSTACK
;
524 if (lwp
->lwp_ustack
) {
527 stk32
.ss_sp
= (caddr32_t
)(uintptr_t)
528 lwp
->lwp_sigaltstack
.ss_sp
;
529 stk32
.ss_size
= (size32_t
)
530 lwp
->lwp_sigaltstack
.ss_size
;
531 stk32
.ss_flags
= (int32_t)
532 lwp
->lwp_sigaltstack
.ss_flags
;
533 copyout_noerr(&stk32
,
534 (stack32_t
*)lwp
->lwp_ustack
, sizeof (stk32
));
539 * Set up signal handler arguments
542 struct sigframe32 frame32
;
544 frame32
.sip
= (caddr32_t
)(uintptr_t)sip_addr
;
545 frame32
.ucp
= (caddr32_t
)(uintptr_t)uc
;
547 frame32
.retaddr
= 0xffffffff; /* never return! */
548 copyout_noerr(&frame32
, sp
, sizeof (frame32
));
553 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
555 rp
->r_sp
= (greg_t
)(uintptr_t)sp
;
556 rp
->r_pc
= (greg_t
)(uintptr_t)hdlr
;
557 rp
->r_ps
= PSL_USER
| (rp
->r_ps
& PS_IOPL
);
559 if ((rp
->r_cs
& 0xffff) != U32CS_SEL
||
560 (rp
->r_ss
& 0xffff) != UDS_SEL
) {
562 * Try our best to deliver the signal.
564 rp
->r_cs
= U32CS_SEL
;
569 * Don't set lwp_eosys here. sendsig() is called via psig() after
570 * lwp_eosys is handled, so setting it here would affect the next
578 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
580 kmem_free(tuc
, sizeof (*tuc
));
582 printf("sendsig32: bad signal stack cmd=%s pid=%d, sig=%d\n",
583 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
584 printf("on fault, sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
585 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
590 #endif /* _SYSCALL32_IMPL */
592 #elif defined(__i386)
595 * An i386 SVR4/ABI signal frame looks like this on the stack:
598 * <a siginfo32_t [optional]>
600 * <pointer to that ucontext32_t>
601 * <pointer to that siginfo32_t>
603 * new %esp: <return address (deliberately invalid)>
613 sendsig(int sig
, k_siginfo_t
*sip
, void (*hdlr
)())
615 volatile int minstacksz
;
622 volatile proc_t
*p
= ttoproc(curthread
);
623 klwp_t
*lwp
= ttolwp(curthread
);
624 ucontext_t
*volatile tuc
= NULL
;
627 volatile int watched
;
632 minstacksz
= SA(sizeof (struct sigframe
)) + SA(sizeof (*uc
));
634 minstacksz
+= SA(sizeof (siginfo_t
));
635 ASSERT((minstacksz
& (STACK_ALIGN
- 1ul)) == 0);
638 * Figure out whether we will be handling this signal on
639 * an alternate stack specified by the user. Then allocate
640 * and validate the stack requirements for the signal handler
641 * context. on_fault will catch any faults.
643 newstack
= sigismember(&PTOU(curproc
)->u_sigonstack
, sig
) &&
644 !(lwp
->lwp_sigaltstack
.ss_flags
& (SS_ONSTACK
|SS_DISABLE
));
647 fp
= (caddr_t
)(SA((uintptr_t)lwp
->lwp_sigaltstack
.ss_sp
) +
648 SA(lwp
->lwp_sigaltstack
.ss_size
) - STACK_ALIGN
);
649 } else if ((rp
->r_ss
& 0xffff) != UDS_SEL
) {
652 * If the stack segment selector is -not- pointing at
653 * the UDS_SEL descriptor and we have an LDT entry for
654 * it instead, add the base address to find the effective va.
656 if ((ldt
= p
->p_ldt
) != NULL
)
657 fp
= (caddr_t
)rp
->r_sp
+
658 USEGD_GETBASE(&ldt
[SELTOIDX(rp
->r_ss
)]);
660 fp
= (caddr_t
)rp
->r_sp
;
662 fp
= (caddr_t
)rp
->r_sp
;
665 * Force proper stack pointer alignment, even in the face of a
666 * misaligned stack pointer from user-level before the signal.
667 * Don't use the SA() macro because that rounds up, not down.
669 fp
= (caddr_t
)((uintptr_t)fp
& ~(STACK_ALIGN
- 1ul));
670 sp
= fp
- minstacksz
;
673 * Make sure lwp hasn't trashed its stack.
675 if (sp
>= (caddr_t
)USERLIMIT
|| fp
>= (caddr_t
)USERLIMIT
) {
677 printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
678 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
679 printf("sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
680 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
681 printf("sp above USERLIMIT\n");
686 watched
= watch_disable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
694 fp
-= SA(sizeof (siginfo_t
));
695 uzero(fp
, sizeof (siginfo_t
));
696 if (SI_FROMUSER(sip
) &&
697 (zoneid
= p
->p_zone
->zone_id
) != GLOBAL_ZONEID
&&
698 zoneid
!= sip
->si_zoneid
) {
699 k_siginfo_t sani_sip
= *sip
;
701 sani_sip
.si_pid
= p
->p_zone
->zone_zsched
->p_pid
;
703 sani_sip
.si_ctid
= -1;
704 sani_sip
.si_zoneid
= zoneid
;
705 copyout_noerr(&sani_sip
, fp
, sizeof (sani_sip
));
707 copyout_noerr(sip
, fp
, sizeof (*sip
));
708 sip_addr
= (siginfo_t
*)fp
;
710 if (sig
== SIGPROF
&&
711 curthread
->t_rprof
!= NULL
&&
712 curthread
->t_rprof
->rp_anystate
) {
714 * We stand on our head to deal with
715 * the real time profiling signal.
716 * Fill in the stuff that doesn't fit
717 * in a normal k_siginfo structure.
719 int i
= sip
->si_nsysarg
;
722 suword32_noerr(&(sip_addr
->si_sysarg
[i
]),
723 (uint32_t)lwp
->lwp_arg
[i
]);
724 copyout_noerr(curthread
->t_rprof
->rp_state
,
726 sizeof (curthread
->t_rprof
->rp_state
));
731 /* save the current context on the user stack */
732 fp
-= SA(sizeof (*tuc
));
733 uc
= (ucontext_t
*)fp
;
734 tuc
= kmem_alloc(sizeof (*tuc
), KM_SLEEP
);
735 savecontext(tuc
, &lwp
->lwp_sigoldmask
);
736 copyout_noerr(tuc
, uc
, sizeof (*tuc
));
737 kmem_free(tuc
, sizeof (*tuc
));
740 lwp
->lwp_oldcontext
= (uintptr_t)uc
;
743 lwp
->lwp_sigaltstack
.ss_flags
|= SS_ONSTACK
;
745 copyout_noerr(&lwp
->lwp_sigaltstack
,
746 (stack_t
*)lwp
->lwp_ustack
, sizeof (stack_t
));
750 * Set up signal handler arguments
753 struct sigframe frame
;
755 frame
.sip
= sip_addr
;
758 frame
.retaddr
= (void (*)())0xffffffff; /* never return! */
759 copyout_noerr(&frame
, sp
, sizeof (frame
));
764 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
766 rp
->r_sp
= (greg_t
)sp
;
767 rp
->r_pc
= (greg_t
)hdlr
;
768 rp
->r_ps
= PSL_USER
| (rp
->r_ps
& PS_IOPL
);
770 if ((rp
->r_cs
& 0xffff) != UCS_SEL
||
771 (rp
->r_ss
& 0xffff) != UDS_SEL
) {
777 * Don't set lwp_eosys here. sendsig() is called via psig() after
778 * lwp_eosys is handled, so setting it here would affect the next
786 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
788 kmem_free(tuc
, sizeof (*tuc
));
790 printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
791 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
792 printf("on fault, sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
793 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);