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>
82 #include <sys/bootconf.h>
83 #include <sys/dumphdr.h>
84 #include <sys/promif.h>
85 #include <sys/systeminfo.h>
87 #include <sys/contract_impl.h>
88 #include <sys/x86_archext.h>
91 * Construct the execution environment for the user's signal
92 * handler and arrange for control to be given to it on return
93 * to userland. The library code now calls setcontext() to
94 * clean up after the signal handler, so sigret() is no longer
97 * (The various 'volatile' declarations are need to ensure that values
98 * are correct on the error return from on_fault().)
104 * An amd64 signal frame looks like this on the stack:
107 * <128 bytes of untouched stack space>
108 * <a siginfo_t [optional]>
112 * new %rsp: <return address (deliberately invalid)>
114 * The signal number and siginfo_t pointer are only pushed onto the stack in
115 * order to allow stack backtraces. The actual signal handling code expects the
116 * arguments in registers.
126 sendsig(int sig
, k_siginfo_t
*sip
, void (*hdlr
)())
128 volatile int minstacksz
;
133 volatile struct regs
*rp
;
135 volatile proc_t
*p
= ttoproc(curthread
);
136 struct as
*as
= p
->p_as
;
137 klwp_t
*lwp
= ttolwp(curthread
);
138 ucontext_t
*volatile tuc
= NULL
;
141 volatile int watched
;
144 * This routine is utterly dependent upon STACK_ALIGN being
145 * 16 and STACK_ENTRY_ALIGN being 8. Let's just acknowledge
146 * that and require it.
149 #if STACK_ALIGN != 16 || STACK_ENTRY_ALIGN != 8
150 #error "sendsig() amd64 did not find the expected stack alignments"
157 * Since we're setting up to run the signal handler we have to
158 * arrange that the stack at entry to the handler is (only)
159 * STACK_ENTRY_ALIGN (i.e. 8) byte aligned so that when the handler
160 * executes its push of %rbp, the stack realigns to STACK_ALIGN
161 * (i.e. 16) correctly.
163 * The new sp will point to the sigframe and the ucontext_t. The
164 * above means that sp (and thus sigframe) will be 8-byte aligned,
165 * but not 16-byte aligned. ucontext_t, however, contains %xmm regs
166 * which must be 16-byte aligned. Because of this, for correct
167 * alignment, sigframe must be a multiple of 8-bytes in length, but
168 * not 16-bytes. This will place ucontext_t at a nice 16-byte boundary.
171 /* LINTED: logical expression always true: op "||" */
172 ASSERT((sizeof (struct sigframe
) % 16) == 8);
174 minstacksz
= sizeof (struct sigframe
) + SA(sizeof (*uc
));
176 minstacksz
+= SA(sizeof (siginfo_t
));
177 ASSERT((minstacksz
& (STACK_ENTRY_ALIGN
- 1ul)) == 0);
180 * Figure out whether we will be handling this signal on
181 * an alternate stack specified by the user. Then allocate
182 * and validate the stack requirements for the signal handler
183 * context. on_fault will catch any faults.
185 newstack
= sigismember(&PTOU(curproc
)->u_sigonstack
, sig
) &&
186 !(lwp
->lwp_sigaltstack
.ss_flags
& (SS_ONSTACK
|SS_DISABLE
));
189 fp
= (caddr_t
)(SA((uintptr_t)lwp
->lwp_sigaltstack
.ss_sp
) +
190 SA(lwp
->lwp_sigaltstack
.ss_size
) - STACK_ALIGN
);
193 * Drop below the 128-byte reserved region of the stack frame
194 * we're interrupting.
196 fp
= (caddr_t
)rp
->r_sp
- STACK_RESERVE
;
200 * Force proper stack pointer alignment, even in the face of a
201 * misaligned stack pointer from user-level before the signal.
203 fp
= (caddr_t
)((uintptr_t)fp
& ~(STACK_ENTRY_ALIGN
- 1ul));
206 * Most of the time during normal execution, the stack pointer
207 * is aligned on a STACK_ALIGN (i.e. 16 byte) boundary. However,
208 * (for example) just after a call instruction (which pushes
209 * the return address), the callers stack misaligns until the
210 * 'push %rbp' happens in the callee prolog. So while we should
211 * expect the stack pointer to be always at least STACK_ENTRY_ALIGN
212 * aligned, we should -not- expect it to always be STACK_ALIGN aligned.
213 * We now adjust to ensure that the new sp is aligned to
214 * STACK_ENTRY_ALIGN but not to STACK_ALIGN.
216 sp
= fp
- minstacksz
;
217 if (((uintptr_t)sp
& (STACK_ALIGN
- 1ul)) == 0) {
218 sp
-= STACK_ENTRY_ALIGN
;
219 minstacksz
= fp
- sp
;
223 * Now, make sure the resulting signal frame address is sane
225 if (sp
>= as
->a_userlimit
|| fp
>= as
->a_userlimit
) {
227 printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
228 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
229 printf("sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
230 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
231 printf("sp above USERLIMIT\n");
236 watched
= watch_disable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
244 fp
-= SA(sizeof (siginfo_t
));
245 uzero(fp
, sizeof (siginfo_t
));
246 if (SI_FROMUSER(sip
) &&
247 (zoneid
= p
->p_zone
->zone_id
) != GLOBAL_ZONEID
&&
248 zoneid
!= sip
->si_zoneid
) {
249 k_siginfo_t sani_sip
= *sip
;
251 sani_sip
.si_pid
= p
->p_zone
->zone_zsched
->p_pid
;
253 sani_sip
.si_ctid
= -1;
254 sani_sip
.si_zoneid
= zoneid
;
255 copyout_noerr(&sani_sip
, fp
, sizeof (sani_sip
));
257 copyout_noerr(sip
, fp
, sizeof (*sip
));
258 sip_addr
= (siginfo_t
*)fp
;
260 if (sig
== SIGPROF
&&
261 curthread
->t_rprof
!= NULL
&&
262 curthread
->t_rprof
->rp_anystate
) {
264 * We stand on our head to deal with
265 * the real time profiling signal.
266 * Fill in the stuff that doesn't fit
267 * in a normal k_siginfo structure.
269 int i
= sip
->si_nsysarg
;
273 (ulong_t
*)&(sip_addr
->si_sysarg
[i
]),
274 (ulong_t
)lwp
->lwp_arg
[i
]);
275 copyout_noerr(curthread
->t_rprof
->rp_state
,
277 sizeof (curthread
->t_rprof
->rp_state
));
283 * save the current context on the user stack directly after the
284 * sigframe. Since sigframe is 8-byte-but-not-16-byte aligned,
285 * and since sizeof (struct sigframe) is 24, this guarantees
286 * 16-byte alignment for ucontext_t and its %xmm registers.
288 uc
= (ucontext_t
*)(sp
+ sizeof (struct sigframe
));
289 tuc
= kmem_alloc(sizeof (*tuc
), KM_SLEEP
);
291 savecontext(tuc
, &lwp
->lwp_sigoldmask
);
294 copyout_noerr(tuc
, uc
, sizeof (*tuc
));
295 kmem_free(tuc
, sizeof (*tuc
));
298 lwp
->lwp_oldcontext
= (uintptr_t)uc
;
301 lwp
->lwp_sigaltstack
.ss_flags
|= SS_ONSTACK
;
303 copyout_noerr(&lwp
->lwp_sigaltstack
,
304 (stack_t
*)lwp
->lwp_ustack
, sizeof (stack_t
));
308 * Set up signal handler return and stack linkage
311 struct sigframe frame
;
314 * ensure we never return "normally"
316 frame
.retaddr
= (caddr_t
)(uintptr_t)-1L;
318 frame
.sip
= sip_addr
;
319 copyout_noerr(&frame
, sp
, sizeof (frame
));
324 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
327 * Set up user registers for execution of signal handler.
329 rp
->r_sp
= (greg_t
)sp
;
330 rp
->r_pc
= (greg_t
)hdlr
;
331 rp
->r_ps
= PSL_USER
| (rp
->r_ps
& PS_IOPL
);
334 rp
->r_rsi
= (uintptr_t)sip_addr
;
335 rp
->r_rdx
= (uintptr_t)uc
;
337 if ((rp
->r_cs
& 0xffff) != UCS_SEL
||
338 (rp
->r_ss
& 0xffff) != UDS_SEL
) {
340 * Try our best to deliver the signal.
347 * Don't set lwp_eosys here. sendsig() is called via psig() after
348 * lwp_eosys is handled, so setting it here would affect the next
356 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
358 kmem_free(tuc
, sizeof (*tuc
));
360 printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
361 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
362 printf("on fault, sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
363 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
368 #ifdef _SYSCALL32_IMPL
371 * An i386 SVR4/ABI signal frame looks like this on the stack:
374 * <a siginfo32_t [optional]>
376 * <pointer to that ucontext32_t>
377 * <pointer to that siginfo32_t>
379 * new %esp: <return address (deliberately invalid)>
389 sendsig32(int sig
, k_siginfo_t
*sip
, void (*hdlr
)())
391 volatile int minstacksz
;
396 volatile struct regs
*rp
;
398 volatile proc_t
*p
= ttoproc(curthread
);
399 klwp_t
*lwp
= ttolwp(curthread
);
400 ucontext32_t
*volatile tuc
= NULL
;
402 siginfo32_t
*sip_addr
;
403 volatile int watched
;
408 minstacksz
= SA32(sizeof (struct sigframe32
)) + SA32(sizeof (*uc
));
410 minstacksz
+= SA32(sizeof (siginfo32_t
));
411 ASSERT((minstacksz
& (STACK_ALIGN32
- 1)) == 0);
414 * Figure out whether we will be handling this signal on
415 * an alternate stack specified by the user. Then allocate
416 * and validate the stack requirements for the signal handler
417 * context. on_fault will catch any faults.
419 newstack
= sigismember(&PTOU(curproc
)->u_sigonstack
, sig
) &&
420 !(lwp
->lwp_sigaltstack
.ss_flags
& (SS_ONSTACK
|SS_DISABLE
));
423 fp
= (caddr_t
)(SA32((uintptr_t)lwp
->lwp_sigaltstack
.ss_sp
) +
424 SA32(lwp
->lwp_sigaltstack
.ss_size
) - STACK_ALIGN32
);
425 } else if ((rp
->r_ss
& 0xffff) != UDS_SEL
) {
428 * If the stack segment selector is -not- pointing at
429 * the UDS_SEL descriptor and we have an LDT entry for
430 * it instead, add the base address to find the effective va.
432 if ((ldt
= p
->p_ldt
) != NULL
)
433 fp
= (caddr_t
)rp
->r_sp
+
434 USEGD_GETBASE(&ldt
[SELTOIDX(rp
->r_ss
)]);
436 fp
= (caddr_t
)rp
->r_sp
;
438 fp
= (caddr_t
)rp
->r_sp
;
441 * Force proper stack pointer alignment, even in the face of a
442 * misaligned stack pointer from user-level before the signal.
443 * Don't use the SA32() macro because that rounds up, not down.
445 fp
= (caddr_t
)((uintptr_t)fp
& ~(STACK_ALIGN32
- 1));
446 sp
= fp
- minstacksz
;
449 * Make sure lwp hasn't trashed its stack
451 if (sp
>= (caddr_t
)(uintptr_t)USERLIMIT32
||
452 fp
>= (caddr_t
)(uintptr_t)USERLIMIT32
) {
454 printf("sendsig32: bad signal stack cmd=%s, pid=%d, sig=%d\n",
455 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
456 printf("sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
457 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
458 printf("sp above USERLIMIT\n");
463 watched
= watch_disable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
472 siginfo_kto32(sip
, &si32
);
473 if (SI_FROMUSER(sip
) &&
474 (zoneid
= p
->p_zone
->zone_id
) != GLOBAL_ZONEID
&&
475 zoneid
!= sip
->si_zoneid
) {
476 si32
.si_pid
= p
->p_zone
->zone_zsched
->p_pid
;
479 si32
.si_zoneid
= zoneid
;
481 fp
-= SA32(sizeof (si32
));
482 uzero(fp
, sizeof (si32
));
483 copyout_noerr(&si32
, fp
, sizeof (si32
));
484 sip_addr
= (siginfo32_t
*)fp
;
486 if (sig
== SIGPROF
&&
487 curthread
->t_rprof
!= NULL
&&
488 curthread
->t_rprof
->rp_anystate
) {
490 * We stand on our head to deal with
491 * the real-time profiling signal.
492 * Fill in the stuff that doesn't fit
493 * in a normal k_siginfo structure.
495 int i
= sip
->si_nsysarg
;
498 suword32_noerr(&(sip_addr
->si_sysarg
[i
]),
499 (uint32_t)lwp
->lwp_arg
[i
]);
500 copyout_noerr(curthread
->t_rprof
->rp_state
,
502 sizeof (curthread
->t_rprof
->rp_state
));
507 /* save the current context on the user stack */
508 fp
-= SA32(sizeof (*tuc
));
509 uc
= (ucontext32_t
*)fp
;
510 tuc
= kmem_alloc(sizeof (*tuc
), KM_SLEEP
);
512 savecontext32(tuc
, &lwp
->lwp_sigoldmask
);
515 copyout_noerr(tuc
, uc
, sizeof (*tuc
));
516 kmem_free(tuc
, sizeof (*tuc
));
519 lwp
->lwp_oldcontext
= (uintptr_t)uc
;
522 lwp
->lwp_sigaltstack
.ss_flags
|= SS_ONSTACK
;
523 if (lwp
->lwp_ustack
) {
526 stk32
.ss_sp
= (caddr32_t
)(uintptr_t)
527 lwp
->lwp_sigaltstack
.ss_sp
;
528 stk32
.ss_size
= (size32_t
)
529 lwp
->lwp_sigaltstack
.ss_size
;
530 stk32
.ss_flags
= (int32_t)
531 lwp
->lwp_sigaltstack
.ss_flags
;
532 copyout_noerr(&stk32
,
533 (stack32_t
*)lwp
->lwp_ustack
, sizeof (stk32
));
538 * Set up signal handler arguments
541 struct sigframe32 frame32
;
543 frame32
.sip
= (caddr32_t
)(uintptr_t)sip_addr
;
544 frame32
.ucp
= (caddr32_t
)(uintptr_t)uc
;
546 frame32
.retaddr
= 0xffffffff; /* never return! */
547 copyout_noerr(&frame32
, sp
, sizeof (frame32
));
552 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
554 rp
->r_sp
= (greg_t
)(uintptr_t)sp
;
555 rp
->r_pc
= (greg_t
)(uintptr_t)hdlr
;
556 rp
->r_ps
= PSL_USER
| (rp
->r_ps
& PS_IOPL
);
558 if ((rp
->r_cs
& 0xffff) != U32CS_SEL
||
559 (rp
->r_ss
& 0xffff) != UDS_SEL
) {
561 * Try our best to deliver the signal.
563 rp
->r_cs
= U32CS_SEL
;
568 * Don't set lwp_eosys here. sendsig() is called via psig() after
569 * lwp_eosys is handled, so setting it here would affect the next
577 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
579 kmem_free(tuc
, sizeof (*tuc
));
581 printf("sendsig32: bad signal stack cmd=%s pid=%d, sig=%d\n",
582 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
583 printf("on fault, sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
584 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
589 #endif /* _SYSCALL32_IMPL */
591 #elif defined(__i386)
594 * An i386 SVR4/ABI signal frame looks like this on the stack:
597 * <a siginfo32_t [optional]>
599 * <pointer to that ucontext32_t>
600 * <pointer to that siginfo32_t>
602 * new %esp: <return address (deliberately invalid)>
612 sendsig(int sig
, k_siginfo_t
*sip
, void (*hdlr
)())
614 volatile int minstacksz
;
621 volatile proc_t
*p
= ttoproc(curthread
);
622 klwp_t
*lwp
= ttolwp(curthread
);
623 ucontext_t
*volatile tuc
= NULL
;
626 volatile int watched
;
631 minstacksz
= SA(sizeof (struct sigframe
)) + SA(sizeof (*uc
));
633 minstacksz
+= SA(sizeof (siginfo_t
));
634 ASSERT((minstacksz
& (STACK_ALIGN
- 1ul)) == 0);
637 * Figure out whether we will be handling this signal on
638 * an alternate stack specified by the user. Then allocate
639 * and validate the stack requirements for the signal handler
640 * context. on_fault will catch any faults.
642 newstack
= sigismember(&PTOU(curproc
)->u_sigonstack
, sig
) &&
643 !(lwp
->lwp_sigaltstack
.ss_flags
& (SS_ONSTACK
|SS_DISABLE
));
646 fp
= (caddr_t
)(SA((uintptr_t)lwp
->lwp_sigaltstack
.ss_sp
) +
647 SA(lwp
->lwp_sigaltstack
.ss_size
) - STACK_ALIGN
);
648 } else if ((rp
->r_ss
& 0xffff) != UDS_SEL
) {
651 * If the stack segment selector is -not- pointing at
652 * the UDS_SEL descriptor and we have an LDT entry for
653 * it instead, add the base address to find the effective va.
655 if ((ldt
= p
->p_ldt
) != NULL
)
656 fp
= (caddr_t
)rp
->r_sp
+
657 USEGD_GETBASE(&ldt
[SELTOIDX(rp
->r_ss
)]);
659 fp
= (caddr_t
)rp
->r_sp
;
661 fp
= (caddr_t
)rp
->r_sp
;
664 * Force proper stack pointer alignment, even in the face of a
665 * misaligned stack pointer from user-level before the signal.
666 * Don't use the SA() macro because that rounds up, not down.
668 fp
= (caddr_t
)((uintptr_t)fp
& ~(STACK_ALIGN
- 1ul));
669 sp
= fp
- minstacksz
;
672 * Make sure lwp hasn't trashed its stack.
674 if (sp
>= (caddr_t
)USERLIMIT
|| fp
>= (caddr_t
)USERLIMIT
) {
676 printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
677 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
678 printf("sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
679 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);
680 printf("sp above USERLIMIT\n");
685 watched
= watch_disable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
693 fp
-= SA(sizeof (siginfo_t
));
694 uzero(fp
, sizeof (siginfo_t
));
695 if (SI_FROMUSER(sip
) &&
696 (zoneid
= p
->p_zone
->zone_id
) != GLOBAL_ZONEID
&&
697 zoneid
!= sip
->si_zoneid
) {
698 k_siginfo_t sani_sip
= *sip
;
700 sani_sip
.si_pid
= p
->p_zone
->zone_zsched
->p_pid
;
702 sani_sip
.si_ctid
= -1;
703 sani_sip
.si_zoneid
= zoneid
;
704 copyout_noerr(&sani_sip
, fp
, sizeof (sani_sip
));
706 copyout_noerr(sip
, fp
, sizeof (*sip
));
707 sip_addr
= (siginfo_t
*)fp
;
709 if (sig
== SIGPROF
&&
710 curthread
->t_rprof
!= NULL
&&
711 curthread
->t_rprof
->rp_anystate
) {
713 * We stand on our head to deal with
714 * the real time profiling signal.
715 * Fill in the stuff that doesn't fit
716 * in a normal k_siginfo structure.
718 int i
= sip
->si_nsysarg
;
721 suword32_noerr(&(sip_addr
->si_sysarg
[i
]),
722 (uint32_t)lwp
->lwp_arg
[i
]);
723 copyout_noerr(curthread
->t_rprof
->rp_state
,
725 sizeof (curthread
->t_rprof
->rp_state
));
730 /* save the current context on the user stack */
731 fp
-= SA(sizeof (*tuc
));
732 uc
= (ucontext_t
*)fp
;
733 tuc
= kmem_alloc(sizeof (*tuc
), KM_SLEEP
);
734 savecontext(tuc
, &lwp
->lwp_sigoldmask
);
735 copyout_noerr(tuc
, uc
, sizeof (*tuc
));
736 kmem_free(tuc
, sizeof (*tuc
));
739 lwp
->lwp_oldcontext
= (uintptr_t)uc
;
742 lwp
->lwp_sigaltstack
.ss_flags
|= SS_ONSTACK
;
744 copyout_noerr(&lwp
->lwp_sigaltstack
,
745 (stack_t
*)lwp
->lwp_ustack
, sizeof (stack_t
));
749 * Set up signal handler arguments
752 struct sigframe frame
;
754 frame
.sip
= sip_addr
;
757 frame
.retaddr
= (void (*)())0xffffffff; /* never return! */
758 copyout_noerr(&frame
, sp
, sizeof (frame
));
763 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
765 rp
->r_sp
= (greg_t
)sp
;
766 rp
->r_pc
= (greg_t
)hdlr
;
767 rp
->r_ps
= PSL_USER
| (rp
->r_ps
& PS_IOPL
);
769 if ((rp
->r_cs
& 0xffff) != UCS_SEL
||
770 (rp
->r_ss
& 0xffff) != UDS_SEL
) {
776 * Don't set lwp_eosys here. sendsig() is called via psig() after
777 * lwp_eosys is handled, so setting it here would affect the next
785 watch_enable_addr((caddr_t
)sp
, minstacksz
, S_WRITE
);
787 kmem_free(tuc
, sizeof (*tuc
));
789 printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
790 PTOU(p
)->u_comm
, p
->p_pid
, sig
);
791 printf("on fault, sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
792 (void *)sp
, (void *)hdlr
, (uintptr_t)upc
);