17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate * CDDL HEADER START
37c478bd9Sstevel@tonic-gate *
47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5a3c55825Sraf * Common Development and Distribution License (the "License").
6a3c55825Sraf * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate *
87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate * and limitations under the License.
127c478bd9Sstevel@tonic-gate *
137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate *
197c478bd9Sstevel@tonic-gate * CDDL HEADER END
207c478bd9Sstevel@tonic-gate */
21a3c55825Sraf
227c478bd9Sstevel@tonic-gate /*
23bdf0047cSRoger A. Faulkner * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
247c478bd9Sstevel@tonic-gate * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate */
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gate /* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
287c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
297c478bd9Sstevel@tonic-gate /* All Rights Reserved */
307c478bd9Sstevel@tonic-gate
31*ed093b41SRobert Mustacchi /*
32*ed093b41SRobert Mustacchi * Copyright 2023 Oxide Computer Company
33*ed093b41SRobert Mustacchi */
34*ed093b41SRobert Mustacchi
357c478bd9Sstevel@tonic-gate #include <sys/types.h>
367c478bd9Sstevel@tonic-gate #include <sys/param.h>
377c478bd9Sstevel@tonic-gate #include <sys/sysmacros.h>
387c478bd9Sstevel@tonic-gate #include <sys/signal.h>
397c478bd9Sstevel@tonic-gate #include <sys/systm.h>
407c478bd9Sstevel@tonic-gate #include <sys/user.h>
417c478bd9Sstevel@tonic-gate #include <sys/mman.h>
427c478bd9Sstevel@tonic-gate #include <sys/class.h>
437c478bd9Sstevel@tonic-gate #include <sys/proc.h>
447c478bd9Sstevel@tonic-gate #include <sys/procfs.h>
457c478bd9Sstevel@tonic-gate #include <sys/buf.h>
467c478bd9Sstevel@tonic-gate #include <sys/kmem.h>
477c478bd9Sstevel@tonic-gate #include <sys/cred.h>
487c478bd9Sstevel@tonic-gate #include <sys/archsystm.h>
497c478bd9Sstevel@tonic-gate #include <sys/vmparam.h>
507c478bd9Sstevel@tonic-gate #include <sys/prsystm.h>
517c478bd9Sstevel@tonic-gate #include <sys/reboot.h>
527c478bd9Sstevel@tonic-gate #include <sys/uadmin.h>
537c478bd9Sstevel@tonic-gate #include <sys/vfs.h>
547c478bd9Sstevel@tonic-gate #include <sys/vnode.h>
557c478bd9Sstevel@tonic-gate #include <sys/file.h>
567c478bd9Sstevel@tonic-gate #include <sys/session.h>
577c478bd9Sstevel@tonic-gate #include <sys/ucontext.h>
587c478bd9Sstevel@tonic-gate #include <sys/dnlc.h>
597c478bd9Sstevel@tonic-gate #include <sys/var.h>
607c478bd9Sstevel@tonic-gate #include <sys/cmn_err.h>
617c478bd9Sstevel@tonic-gate #include <sys/debugreg.h>
627c478bd9Sstevel@tonic-gate #include <sys/thread.h>
637c478bd9Sstevel@tonic-gate #include <sys/vtrace.h>
647c478bd9Sstevel@tonic-gate #include <sys/consdev.h>
657c478bd9Sstevel@tonic-gate #include <sys/psw.h>
667c478bd9Sstevel@tonic-gate #include <sys/regset.h>
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gate #include <sys/privregs.h>
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gate #include <sys/stack.h>
717c478bd9Sstevel@tonic-gate #include <sys/swap.h>
727c478bd9Sstevel@tonic-gate #include <vm/hat.h>
737c478bd9Sstevel@tonic-gate #include <vm/anon.h>
747c478bd9Sstevel@tonic-gate #include <vm/as.h>
757c478bd9Sstevel@tonic-gate #include <vm/page.h>
767c478bd9Sstevel@tonic-gate #include <vm/seg.h>
777c478bd9Sstevel@tonic-gate #include <vm/seg_kmem.h>
787c478bd9Sstevel@tonic-gate #include <vm/seg_map.h>
797c478bd9Sstevel@tonic-gate #include <vm/seg_vn.h>
807c478bd9Sstevel@tonic-gate #include <sys/exec.h>
817c478bd9Sstevel@tonic-gate #include <sys/acct.h>
827c478bd9Sstevel@tonic-gate #include <sys/core.h>
837c478bd9Sstevel@tonic-gate #include <sys/corectl.h>
847c478bd9Sstevel@tonic-gate #include <sys/modctl.h>
857c478bd9Sstevel@tonic-gate #include <sys/tuneable.h>
867c478bd9Sstevel@tonic-gate #include <c2/audit.h>
877c478bd9Sstevel@tonic-gate #include <sys/bootconf.h>
887c478bd9Sstevel@tonic-gate #include <sys/dumphdr.h>
897c478bd9Sstevel@tonic-gate #include <sys/promif.h>
907c478bd9Sstevel@tonic-gate #include <sys/systeminfo.h>
917c478bd9Sstevel@tonic-gate #include <sys/kdi.h>
927c478bd9Sstevel@tonic-gate #include <sys/contract_impl.h>
937c478bd9Sstevel@tonic-gate #include <sys/x86_archext.h>
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate /*
967c478bd9Sstevel@tonic-gate * Construct the execution environment for the user's signal
977c478bd9Sstevel@tonic-gate * handler and arrange for control to be given to it on return
987c478bd9Sstevel@tonic-gate * to userland. The library code now calls setcontext() to
997c478bd9Sstevel@tonic-gate * clean up after the signal handler, so sigret() is no longer
1007c478bd9Sstevel@tonic-gate * needed.
1017c478bd9Sstevel@tonic-gate *
1027c478bd9Sstevel@tonic-gate * (The various 'volatile' declarations are need to ensure that values
1037c478bd9Sstevel@tonic-gate * are correct on the error return from on_fault().)
1047c478bd9Sstevel@tonic-gate */
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gate /*
1087c478bd9Sstevel@tonic-gate * An amd64 signal frame looks like this on the stack:
1097c478bd9Sstevel@tonic-gate *
1107c478bd9Sstevel@tonic-gate * old %rsp:
1117c478bd9Sstevel@tonic-gate * <128 bytes of untouched stack space>
1127c478bd9Sstevel@tonic-gate * <a siginfo_t [optional]>
1137c478bd9Sstevel@tonic-gate * <a ucontext_t>
114*ed093b41SRobert Mustacchi * <a ucontext_t's xsave state>
115*ed093b41SRobert Mustacchi * <siginfo_t *> ---+
116*ed093b41SRobert Mustacchi * <signal number> | sigframe
117*ed093b41SRobert Mustacchi * new %rsp: <return address (deliberately invalid)> ---+
1187c478bd9Sstevel@tonic-gate *
1197c478bd9Sstevel@tonic-gate * The signal number and siginfo_t pointer are only pushed onto the stack in
1207c478bd9Sstevel@tonic-gate * order to allow stack backtraces. The actual signal handling code expects the
1217c478bd9Sstevel@tonic-gate * arguments in registers.
1227c478bd9Sstevel@tonic-gate */
1237c478bd9Sstevel@tonic-gate
1247c478bd9Sstevel@tonic-gate struct sigframe {
1257c478bd9Sstevel@tonic-gate caddr_t retaddr;
1267c478bd9Sstevel@tonic-gate long signo;
1277c478bd9Sstevel@tonic-gate siginfo_t *sip;
1287c478bd9Sstevel@tonic-gate };
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gate int
sendsig(int sig,k_siginfo_t * sip,void (* hdlr)())1317c478bd9Sstevel@tonic-gate sendsig(int sig, k_siginfo_t *sip, void (*hdlr)())
1327c478bd9Sstevel@tonic-gate {
133*ed093b41SRobert Mustacchi volatile size_t minstacksz;
134*ed093b41SRobert Mustacchi boolean_t newstack;
135*ed093b41SRobert Mustacchi size_t xsave_size;
136*ed093b41SRobert Mustacchi int ret;
1377c478bd9Sstevel@tonic-gate label_t ljb;
1387c478bd9Sstevel@tonic-gate volatile caddr_t sp;
1397c478bd9Sstevel@tonic-gate caddr_t fp;
1407c478bd9Sstevel@tonic-gate volatile struct regs *rp;
1417c478bd9Sstevel@tonic-gate volatile greg_t upc;
1427c478bd9Sstevel@tonic-gate volatile proc_t *p = ttoproc(curthread);
143a0de58d6SRoger A. Faulkner struct as *as = p->p_as;
1447c478bd9Sstevel@tonic-gate klwp_t *lwp = ttolwp(curthread);
1457c478bd9Sstevel@tonic-gate ucontext_t *volatile tuc = NULL;
1467c478bd9Sstevel@tonic-gate ucontext_t *uc;
1477c478bd9Sstevel@tonic-gate siginfo_t *sip_addr;
1487c478bd9Sstevel@tonic-gate volatile int watched;
1497c478bd9Sstevel@tonic-gate
1507c478bd9Sstevel@tonic-gate /*
1517c478bd9Sstevel@tonic-gate * This routine is utterly dependent upon STACK_ALIGN being
1527c478bd9Sstevel@tonic-gate * 16 and STACK_ENTRY_ALIGN being 8. Let's just acknowledge
1537c478bd9Sstevel@tonic-gate * that and require it.
1547c478bd9Sstevel@tonic-gate */
1557c478bd9Sstevel@tonic-gate
1567c478bd9Sstevel@tonic-gate #if STACK_ALIGN != 16 || STACK_ENTRY_ALIGN != 8
1577c478bd9Sstevel@tonic-gate #error "sendsig() amd64 did not find the expected stack alignments"
1587c478bd9Sstevel@tonic-gate #endif
1597c478bd9Sstevel@tonic-gate
1607c478bd9Sstevel@tonic-gate rp = lwptoregs(lwp);
1617c478bd9Sstevel@tonic-gate upc = rp->r_pc;
1627c478bd9Sstevel@tonic-gate
1637c478bd9Sstevel@tonic-gate /*
1647c478bd9Sstevel@tonic-gate * Since we're setting up to run the signal handler we have to
1657c478bd9Sstevel@tonic-gate * arrange that the stack at entry to the handler is (only)
1667c478bd9Sstevel@tonic-gate * STACK_ENTRY_ALIGN (i.e. 8) byte aligned so that when the handler
1677c478bd9Sstevel@tonic-gate * executes its push of %rbp, the stack realigns to STACK_ALIGN
1687c478bd9Sstevel@tonic-gate * (i.e. 16) correctly.
1697c478bd9Sstevel@tonic-gate *
1707c478bd9Sstevel@tonic-gate * The new sp will point to the sigframe and the ucontext_t. The
1717c478bd9Sstevel@tonic-gate * above means that sp (and thus sigframe) will be 8-byte aligned,
1727c478bd9Sstevel@tonic-gate * but not 16-byte aligned. ucontext_t, however, contains %xmm regs
1737c478bd9Sstevel@tonic-gate * which must be 16-byte aligned. Because of this, for correct
1747c478bd9Sstevel@tonic-gate * alignment, sigframe must be a multiple of 8-bytes in length, but
1757c478bd9Sstevel@tonic-gate * not 16-bytes. This will place ucontext_t at a nice 16-byte boundary.
176*ed093b41SRobert Mustacchi *
177*ed093b41SRobert Mustacchi * When we move onto the xsave state, right now, we don't guarantee any
178*ed093b41SRobert Mustacchi * alignment of the resulting data, but we will ensure that the
179*ed093b41SRobert Mustacchi * resulting sp does have proper alignment. This will ensure that the
180*ed093b41SRobert Mustacchi * guarantee on the ucontex_t is not violated.
1817c478bd9Sstevel@tonic-gate */
1827c478bd9Sstevel@tonic-gate
183*ed093b41SRobert Mustacchi CTASSERT((sizeof (struct sigframe) % 16) == 8);
1847c478bd9Sstevel@tonic-gate
1857c478bd9Sstevel@tonic-gate minstacksz = sizeof (struct sigframe) + SA(sizeof (*uc));
1867c478bd9Sstevel@tonic-gate if (sip != NULL)
1877c478bd9Sstevel@tonic-gate minstacksz += SA(sizeof (siginfo_t));
188*ed093b41SRobert Mustacchi
189*ed093b41SRobert Mustacchi if (fpu_xsave_enabled()) {
190*ed093b41SRobert Mustacchi xsave_size = SA(fpu_signal_size(lwp));
191*ed093b41SRobert Mustacchi minstacksz += xsave_size;
192*ed093b41SRobert Mustacchi } else {
193*ed093b41SRobert Mustacchi xsave_size = 0;
194*ed093b41SRobert Mustacchi }
195*ed093b41SRobert Mustacchi
1967c478bd9Sstevel@tonic-gate ASSERT((minstacksz & (STACK_ENTRY_ALIGN - 1ul)) == 0);
1977c478bd9Sstevel@tonic-gate
1987c478bd9Sstevel@tonic-gate /*
1997c478bd9Sstevel@tonic-gate * Figure out whether we will be handling this signal on
2007c478bd9Sstevel@tonic-gate * an alternate stack specified by the user. Then allocate
2017c478bd9Sstevel@tonic-gate * and validate the stack requirements for the signal handler
2027c478bd9Sstevel@tonic-gate * context. on_fault will catch any faults.
2037c478bd9Sstevel@tonic-gate */
204ae115bc7Smrj newstack = sigismember(&PTOU(curproc)->u_sigonstack, sig) &&
2057c478bd9Sstevel@tonic-gate !(lwp->lwp_sigaltstack.ss_flags & (SS_ONSTACK|SS_DISABLE));
2067c478bd9Sstevel@tonic-gate
2077c478bd9Sstevel@tonic-gate if (newstack) {
2087c478bd9Sstevel@tonic-gate fp = (caddr_t)(SA((uintptr_t)lwp->lwp_sigaltstack.ss_sp) +
2097c478bd9Sstevel@tonic-gate SA(lwp->lwp_sigaltstack.ss_size) - STACK_ALIGN);
2107c478bd9Sstevel@tonic-gate } else {
2117c478bd9Sstevel@tonic-gate /*
2127c478bd9Sstevel@tonic-gate * Drop below the 128-byte reserved region of the stack frame
2137c478bd9Sstevel@tonic-gate * we're interrupting.
2147c478bd9Sstevel@tonic-gate */
2157c478bd9Sstevel@tonic-gate fp = (caddr_t)rp->r_sp - STACK_RESERVE;
2167c478bd9Sstevel@tonic-gate }
2177c478bd9Sstevel@tonic-gate
218a3c55825Sraf /*
219a3c55825Sraf * Force proper stack pointer alignment, even in the face of a
220a3c55825Sraf * misaligned stack pointer from user-level before the signal.
221a3c55825Sraf */
222a3c55825Sraf fp = (caddr_t)((uintptr_t)fp & ~(STACK_ENTRY_ALIGN - 1ul));
223a3c55825Sraf
2247c478bd9Sstevel@tonic-gate /*
2257c478bd9Sstevel@tonic-gate * Most of the time during normal execution, the stack pointer
2267c478bd9Sstevel@tonic-gate * is aligned on a STACK_ALIGN (i.e. 16 byte) boundary. However,
2277c478bd9Sstevel@tonic-gate * (for example) just after a call instruction (which pushes
2287c478bd9Sstevel@tonic-gate * the return address), the callers stack misaligns until the
2297c478bd9Sstevel@tonic-gate * 'push %rbp' happens in the callee prolog. So while we should
2307c478bd9Sstevel@tonic-gate * expect the stack pointer to be always at least STACK_ENTRY_ALIGN
2317c478bd9Sstevel@tonic-gate * aligned, we should -not- expect it to always be STACK_ALIGN aligned.
2327c478bd9Sstevel@tonic-gate * We now adjust to ensure that the new sp is aligned to
2337c478bd9Sstevel@tonic-gate * STACK_ENTRY_ALIGN but not to STACK_ALIGN.
2347c478bd9Sstevel@tonic-gate */
2357c478bd9Sstevel@tonic-gate sp = fp - minstacksz;
2367c478bd9Sstevel@tonic-gate if (((uintptr_t)sp & (STACK_ALIGN - 1ul)) == 0) {
2377c478bd9Sstevel@tonic-gate sp -= STACK_ENTRY_ALIGN;
2387c478bd9Sstevel@tonic-gate minstacksz = fp - sp;
2397c478bd9Sstevel@tonic-gate }
2407c478bd9Sstevel@tonic-gate
2417c478bd9Sstevel@tonic-gate /*
2427c478bd9Sstevel@tonic-gate * Now, make sure the resulting signal frame address is sane
2437c478bd9Sstevel@tonic-gate */
244a0de58d6SRoger A. Faulkner if (sp >= as->a_userlimit || fp >= as->a_userlimit) {
2457c478bd9Sstevel@tonic-gate #ifdef DEBUG
2467c478bd9Sstevel@tonic-gate printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
2477c478bd9Sstevel@tonic-gate PTOU(p)->u_comm, p->p_pid, sig);
2487c478bd9Sstevel@tonic-gate printf("sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
2497c478bd9Sstevel@tonic-gate (void *)sp, (void *)hdlr, (uintptr_t)upc);
250a3c55825Sraf printf("sp above USERLIMIT\n");
2517c478bd9Sstevel@tonic-gate #endif
2527c478bd9Sstevel@tonic-gate return (0);
2537c478bd9Sstevel@tonic-gate }
2547c478bd9Sstevel@tonic-gate
2557c478bd9Sstevel@tonic-gate watched = watch_disable_addr((caddr_t)sp, minstacksz, S_WRITE);
2567c478bd9Sstevel@tonic-gate
2577c478bd9Sstevel@tonic-gate if (on_fault(&ljb))
2587c478bd9Sstevel@tonic-gate goto badstack;
2597c478bd9Sstevel@tonic-gate
2607c478bd9Sstevel@tonic-gate if (sip != NULL) {
2617c478bd9Sstevel@tonic-gate zoneid_t zoneid;
2627c478bd9Sstevel@tonic-gate
2637c478bd9Sstevel@tonic-gate fp -= SA(sizeof (siginfo_t));
2647c478bd9Sstevel@tonic-gate uzero(fp, sizeof (siginfo_t));
2657c478bd9Sstevel@tonic-gate if (SI_FROMUSER(sip) &&
2667c478bd9Sstevel@tonic-gate (zoneid = p->p_zone->zone_id) != GLOBAL_ZONEID &&
2677c478bd9Sstevel@tonic-gate zoneid != sip->si_zoneid) {
2687c478bd9Sstevel@tonic-gate k_siginfo_t sani_sip = *sip;
2697c478bd9Sstevel@tonic-gate
2707c478bd9Sstevel@tonic-gate sani_sip.si_pid = p->p_zone->zone_zsched->p_pid;
2717c478bd9Sstevel@tonic-gate sani_sip.si_uid = 0;
2727c478bd9Sstevel@tonic-gate sani_sip.si_ctid = -1;
2737c478bd9Sstevel@tonic-gate sani_sip.si_zoneid = zoneid;
2747c478bd9Sstevel@tonic-gate copyout_noerr(&sani_sip, fp, sizeof (sani_sip));
2757c478bd9Sstevel@tonic-gate } else
2767c478bd9Sstevel@tonic-gate copyout_noerr(sip, fp, sizeof (*sip));
2777c478bd9Sstevel@tonic-gate sip_addr = (siginfo_t *)fp;
2787c478bd9Sstevel@tonic-gate
2797c478bd9Sstevel@tonic-gate if (sig == SIGPROF &&
2807c478bd9Sstevel@tonic-gate curthread->t_rprof != NULL &&
2817c478bd9Sstevel@tonic-gate curthread->t_rprof->rp_anystate) {
2827c478bd9Sstevel@tonic-gate /*
2837c478bd9Sstevel@tonic-gate * We stand on our head to deal with
2847c478bd9Sstevel@tonic-gate * the real time profiling signal.
2857c478bd9Sstevel@tonic-gate * Fill in the stuff that doesn't fit
2867c478bd9Sstevel@tonic-gate * in a normal k_siginfo structure.
2877c478bd9Sstevel@tonic-gate */
2887c478bd9Sstevel@tonic-gate int i = sip->si_nsysarg;
2897c478bd9Sstevel@tonic-gate
2907c478bd9Sstevel@tonic-gate while (--i >= 0)
2917c478bd9Sstevel@tonic-gate sulword_noerr(
2927c478bd9Sstevel@tonic-gate (ulong_t *)&(sip_addr->si_sysarg[i]),
2937c478bd9Sstevel@tonic-gate (ulong_t)lwp->lwp_arg[i]);
2947c478bd9Sstevel@tonic-gate copyout_noerr(curthread->t_rprof->rp_state,
2957c478bd9Sstevel@tonic-gate sip_addr->si_mstate,
2967c478bd9Sstevel@tonic-gate sizeof (curthread->t_rprof->rp_state));
2977c478bd9Sstevel@tonic-gate }
2987c478bd9Sstevel@tonic-gate } else
2997c478bd9Sstevel@tonic-gate sip_addr = NULL;
3007c478bd9Sstevel@tonic-gate
301*ed093b41SRobert Mustacchi no_fault();
302*ed093b41SRobert Mustacchi
3037c478bd9Sstevel@tonic-gate /*
304*ed093b41SRobert Mustacchi * Save the current context on the user stack directly after the
305*ed093b41SRobert Mustacchi * sigframe. Since sigframe is 8-byte-but-not-16-byte aligned, and since
306*ed093b41SRobert Mustacchi * sizeof (struct sigframe) is 24, this guarantees 16-byte alignment for
307*ed093b41SRobert Mustacchi * ucontext_t and its %xmm registers. The xsave state part of the
308*ed093b41SRobert Mustacchi * ucontext_t may be inbetween these two. However, we have ensured that
309*ed093b41SRobert Mustacchi * the size of the stack space is 16-byte aligned as the actual size may
310*ed093b41SRobert Mustacchi * vary.
3117c478bd9Sstevel@tonic-gate */
3127c478bd9Sstevel@tonic-gate tuc = kmem_alloc(sizeof (*tuc), KM_SLEEP);
313*ed093b41SRobert Mustacchi if (xsave_size != 0) {
314*ed093b41SRobert Mustacchi tuc->uc_xsave = (unsigned long)(sp + sizeof (struct sigframe));
315*ed093b41SRobert Mustacchi }
316*ed093b41SRobert Mustacchi uc = (ucontext_t *)(sp + sizeof (struct sigframe) + xsave_size);
317*ed093b41SRobert Mustacchi ret = savecontext(tuc, &lwp->lwp_sigoldmask, SAVECTXT_F_EXTD |
318*ed093b41SRobert Mustacchi SAVECTXT_F_ONFAULT);
319*ed093b41SRobert Mustacchi if (ret != 0)
320*ed093b41SRobert Mustacchi goto postfault;
3213ce2fcdcSRobert Mustacchi if (on_fault(&ljb))
3223ce2fcdcSRobert Mustacchi goto badstack;
3237c478bd9Sstevel@tonic-gate copyout_noerr(tuc, uc, sizeof (*tuc));
3247c478bd9Sstevel@tonic-gate kmem_free(tuc, sizeof (*tuc));
3257c478bd9Sstevel@tonic-gate tuc = NULL;
3267c478bd9Sstevel@tonic-gate
3277c478bd9Sstevel@tonic-gate lwp->lwp_oldcontext = (uintptr_t)uc;
3287c478bd9Sstevel@tonic-gate
3297c478bd9Sstevel@tonic-gate if (newstack) {
3307c478bd9Sstevel@tonic-gate lwp->lwp_sigaltstack.ss_flags |= SS_ONSTACK;
3317c478bd9Sstevel@tonic-gate if (lwp->lwp_ustack)
3327c478bd9Sstevel@tonic-gate copyout_noerr(&lwp->lwp_sigaltstack,
3337c478bd9Sstevel@tonic-gate (stack_t *)lwp->lwp_ustack, sizeof (stack_t));
3347c478bd9Sstevel@tonic-gate }
3357c478bd9Sstevel@tonic-gate
3367c478bd9Sstevel@tonic-gate /*
3377c478bd9Sstevel@tonic-gate * Set up signal handler return and stack linkage
3387c478bd9Sstevel@tonic-gate */
3397c478bd9Sstevel@tonic-gate {
3407c478bd9Sstevel@tonic-gate struct sigframe frame;
3417c478bd9Sstevel@tonic-gate
3427c478bd9Sstevel@tonic-gate /*
3437c478bd9Sstevel@tonic-gate * ensure we never return "normally"
3447c478bd9Sstevel@tonic-gate */
3457c478bd9Sstevel@tonic-gate frame.retaddr = (caddr_t)(uintptr_t)-1L;
3467c478bd9Sstevel@tonic-gate frame.signo = sig;
3477c478bd9Sstevel@tonic-gate frame.sip = sip_addr;
3487c478bd9Sstevel@tonic-gate copyout_noerr(&frame, sp, sizeof (frame));
3497c478bd9Sstevel@tonic-gate }
3507c478bd9Sstevel@tonic-gate
3517c478bd9Sstevel@tonic-gate no_fault();
3527c478bd9Sstevel@tonic-gate if (watched)
3537c478bd9Sstevel@tonic-gate watch_enable_addr((caddr_t)sp, minstacksz, S_WRITE);
3547c478bd9Sstevel@tonic-gate
3557c478bd9Sstevel@tonic-gate /*
3567c478bd9Sstevel@tonic-gate * Set up user registers for execution of signal handler.
3577c478bd9Sstevel@tonic-gate */
3587c478bd9Sstevel@tonic-gate rp->r_sp = (greg_t)sp;
3597c478bd9Sstevel@tonic-gate rp->r_pc = (greg_t)hdlr;
3607c478bd9Sstevel@tonic-gate rp->r_ps = PSL_USER | (rp->r_ps & PS_IOPL);
3617c478bd9Sstevel@tonic-gate
3627c478bd9Sstevel@tonic-gate rp->r_rdi = sig;
3637c478bd9Sstevel@tonic-gate rp->r_rsi = (uintptr_t)sip_addr;
3647c478bd9Sstevel@tonic-gate rp->r_rdx = (uintptr_t)uc;
3657c478bd9Sstevel@tonic-gate
3667c478bd9Sstevel@tonic-gate if ((rp->r_cs & 0xffff) != UCS_SEL ||
3677c478bd9Sstevel@tonic-gate (rp->r_ss & 0xffff) != UDS_SEL) {
3687c478bd9Sstevel@tonic-gate /*
3697c478bd9Sstevel@tonic-gate * Try our best to deliver the signal.
3707c478bd9Sstevel@tonic-gate */
3717c478bd9Sstevel@tonic-gate rp->r_cs = UCS_SEL;
3727c478bd9Sstevel@tonic-gate rp->r_ss = UDS_SEL;
3737c478bd9Sstevel@tonic-gate }
3747c478bd9Sstevel@tonic-gate
3757c478bd9Sstevel@tonic-gate /*
3767c478bd9Sstevel@tonic-gate * Don't set lwp_eosys here. sendsig() is called via psig() after
3777c478bd9Sstevel@tonic-gate * lwp_eosys is handled, so setting it here would affect the next
3787c478bd9Sstevel@tonic-gate * system call.
3797c478bd9Sstevel@tonic-gate */
3807c478bd9Sstevel@tonic-gate return (1);
3817c478bd9Sstevel@tonic-gate
3827c478bd9Sstevel@tonic-gate badstack:
3837c478bd9Sstevel@tonic-gate no_fault();
384*ed093b41SRobert Mustacchi postfault:
3857c478bd9Sstevel@tonic-gate if (watched)
3867c478bd9Sstevel@tonic-gate watch_enable_addr((caddr_t)sp, minstacksz, S_WRITE);
3877c478bd9Sstevel@tonic-gate if (tuc)
3887c478bd9Sstevel@tonic-gate kmem_free(tuc, sizeof (*tuc));
3897c478bd9Sstevel@tonic-gate #ifdef DEBUG
3907c478bd9Sstevel@tonic-gate printf("sendsig: bad signal stack cmd=%s, pid=%d, sig=%d\n",
3917c478bd9Sstevel@tonic-gate PTOU(p)->u_comm, p->p_pid, sig);
3927c478bd9Sstevel@tonic-gate printf("on fault, sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
3937c478bd9Sstevel@tonic-gate (void *)sp, (void *)hdlr, (uintptr_t)upc);
3947c478bd9Sstevel@tonic-gate #endif
3957c478bd9Sstevel@tonic-gate return (0);
3967c478bd9Sstevel@tonic-gate }
3977c478bd9Sstevel@tonic-gate
3987c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32_IMPL
3997c478bd9Sstevel@tonic-gate
4007c478bd9Sstevel@tonic-gate /*
4017c478bd9Sstevel@tonic-gate * An i386 SVR4/ABI signal frame looks like this on the stack:
4027c478bd9Sstevel@tonic-gate *
4037c478bd9Sstevel@tonic-gate * old %esp:
4047c478bd9Sstevel@tonic-gate * <a siginfo32_t [optional]>
4057c478bd9Sstevel@tonic-gate * <a ucontext32_t>
406*ed093b41SRobert Mustacchi * <a ucontext32_t's xsave state>
4077c478bd9Sstevel@tonic-gate * <pointer to that ucontext32_t>
4087c478bd9Sstevel@tonic-gate * <pointer to that siginfo32_t>
4097c478bd9Sstevel@tonic-gate * <signo>
4107c478bd9Sstevel@tonic-gate * new %esp: <return address (deliberately invalid)>
4117c478bd9Sstevel@tonic-gate */
4127c478bd9Sstevel@tonic-gate struct sigframe32 {
4137c478bd9Sstevel@tonic-gate caddr32_t retaddr;
4147c478bd9Sstevel@tonic-gate uint32_t signo;
4157c478bd9Sstevel@tonic-gate caddr32_t sip;
4167c478bd9Sstevel@tonic-gate caddr32_t ucp;
4177c478bd9Sstevel@tonic-gate };
4187c478bd9Sstevel@tonic-gate
4197c478bd9Sstevel@tonic-gate int
sendsig32(int sig,k_siginfo_t * sip,void (* hdlr)())4207c478bd9Sstevel@tonic-gate sendsig32(int sig, k_siginfo_t *sip, void (*hdlr)())
4217c478bd9Sstevel@tonic-gate {
422*ed093b41SRobert Mustacchi volatile size_t minstacksz;
423*ed093b41SRobert Mustacchi boolean_t newstack;
424*ed093b41SRobert Mustacchi size_t xsave_size;
425*ed093b41SRobert Mustacchi int ret;
4267c478bd9Sstevel@tonic-gate label_t ljb;
4277c478bd9Sstevel@tonic-gate volatile caddr_t sp;
4287c478bd9Sstevel@tonic-gate caddr_t fp;
4297c478bd9Sstevel@tonic-gate volatile struct regs *rp;
4307c478bd9Sstevel@tonic-gate volatile greg_t upc;
4317c478bd9Sstevel@tonic-gate volatile proc_t *p = ttoproc(curthread);
4327c478bd9Sstevel@tonic-gate klwp_t *lwp = ttolwp(curthread);
4337c478bd9Sstevel@tonic-gate ucontext32_t *volatile tuc = NULL;
4347c478bd9Sstevel@tonic-gate ucontext32_t *uc;
4357c478bd9Sstevel@tonic-gate siginfo32_t *sip_addr;
4367c478bd9Sstevel@tonic-gate volatile int watched;
4377c478bd9Sstevel@tonic-gate
4387c478bd9Sstevel@tonic-gate rp = lwptoregs(lwp);
4397c478bd9Sstevel@tonic-gate upc = rp->r_pc;
4407c478bd9Sstevel@tonic-gate
4417c478bd9Sstevel@tonic-gate minstacksz = SA32(sizeof (struct sigframe32)) + SA32(sizeof (*uc));
4427c478bd9Sstevel@tonic-gate if (sip != NULL)
4437c478bd9Sstevel@tonic-gate minstacksz += SA32(sizeof (siginfo32_t));
444*ed093b41SRobert Mustacchi
445*ed093b41SRobert Mustacchi if (fpu_xsave_enabled()) {
446*ed093b41SRobert Mustacchi xsave_size = SA32(fpu_signal_size(lwp));
447*ed093b41SRobert Mustacchi minstacksz += xsave_size;
448*ed093b41SRobert Mustacchi } else {
449*ed093b41SRobert Mustacchi xsave_size = 0;
450*ed093b41SRobert Mustacchi }
4517c478bd9Sstevel@tonic-gate ASSERT((minstacksz & (STACK_ALIGN32 - 1)) == 0);
4527c478bd9Sstevel@tonic-gate
4537c478bd9Sstevel@tonic-gate /*
4547c478bd9Sstevel@tonic-gate * Figure out whether we will be handling this signal on
4557c478bd9Sstevel@tonic-gate * an alternate stack specified by the user. Then allocate
4567c478bd9Sstevel@tonic-gate * and validate the stack requirements for the signal handler
4577c478bd9Sstevel@tonic-gate * context. on_fault will catch any faults.
4587c478bd9Sstevel@tonic-gate */
459ae115bc7Smrj newstack = sigismember(&PTOU(curproc)->u_sigonstack, sig) &&
4607c478bd9Sstevel@tonic-gate !(lwp->lwp_sigaltstack.ss_flags & (SS_ONSTACK|SS_DISABLE));
4617c478bd9Sstevel@tonic-gate
4627c478bd9Sstevel@tonic-gate if (newstack) {
4637c478bd9Sstevel@tonic-gate fp = (caddr_t)(SA32((uintptr_t)lwp->lwp_sigaltstack.ss_sp) +
4647c478bd9Sstevel@tonic-gate SA32(lwp->lwp_sigaltstack.ss_size) - STACK_ALIGN32);
4657c478bd9Sstevel@tonic-gate } else if ((rp->r_ss & 0xffff) != UDS_SEL) {
4667c478bd9Sstevel@tonic-gate user_desc_t *ldt;
4677c478bd9Sstevel@tonic-gate /*
4687c478bd9Sstevel@tonic-gate * If the stack segment selector is -not- pointing at
4697c478bd9Sstevel@tonic-gate * the UDS_SEL descriptor and we have an LDT entry for
4707c478bd9Sstevel@tonic-gate * it instead, add the base address to find the effective va.
4717c478bd9Sstevel@tonic-gate */
4727c478bd9Sstevel@tonic-gate if ((ldt = p->p_ldt) != NULL)
4737c478bd9Sstevel@tonic-gate fp = (caddr_t)rp->r_sp +
4747c478bd9Sstevel@tonic-gate USEGD_GETBASE(&ldt[SELTOIDX(rp->r_ss)]);
4757c478bd9Sstevel@tonic-gate else
4767c478bd9Sstevel@tonic-gate fp = (caddr_t)rp->r_sp;
4777c478bd9Sstevel@tonic-gate } else
4787c478bd9Sstevel@tonic-gate fp = (caddr_t)rp->r_sp;
479a3c55825Sraf
480a3c55825Sraf /*
481a3c55825Sraf * Force proper stack pointer alignment, even in the face of a
482a3c55825Sraf * misaligned stack pointer from user-level before the signal.
483a3c55825Sraf * Don't use the SA32() macro because that rounds up, not down.
484a3c55825Sraf */
485a3c55825Sraf fp = (caddr_t)((uintptr_t)fp & ~(STACK_ALIGN32 - 1));
4867c478bd9Sstevel@tonic-gate sp = fp - minstacksz;
4877c478bd9Sstevel@tonic-gate
4887c478bd9Sstevel@tonic-gate /*
4897c478bd9Sstevel@tonic-gate * Make sure lwp hasn't trashed its stack
4907c478bd9Sstevel@tonic-gate */
491a3c55825Sraf if (sp >= (caddr_t)(uintptr_t)USERLIMIT32 ||
4927c478bd9Sstevel@tonic-gate fp >= (caddr_t)(uintptr_t)USERLIMIT32) {
4937c478bd9Sstevel@tonic-gate #ifdef DEBUG
4947c478bd9Sstevel@tonic-gate printf("sendsig32: bad signal stack cmd=%s, pid=%d, sig=%d\n",
4957c478bd9Sstevel@tonic-gate PTOU(p)->u_comm, p->p_pid, sig);
4967c478bd9Sstevel@tonic-gate printf("sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
4977c478bd9Sstevel@tonic-gate (void *)sp, (void *)hdlr, (uintptr_t)upc);
498a3c55825Sraf printf("sp above USERLIMIT\n");
4997c478bd9Sstevel@tonic-gate #endif
5007c478bd9Sstevel@tonic-gate return (0);
5017c478bd9Sstevel@tonic-gate }
5027c478bd9Sstevel@tonic-gate
5037c478bd9Sstevel@tonic-gate watched = watch_disable_addr((caddr_t)sp, minstacksz, S_WRITE);
5047c478bd9Sstevel@tonic-gate
5057c478bd9Sstevel@tonic-gate if (on_fault(&ljb))
5067c478bd9Sstevel@tonic-gate goto badstack;
5077c478bd9Sstevel@tonic-gate
5087c478bd9Sstevel@tonic-gate if (sip != NULL) {
5097c478bd9Sstevel@tonic-gate siginfo32_t si32;
5107c478bd9Sstevel@tonic-gate zoneid_t zoneid;
5117c478bd9Sstevel@tonic-gate
5127c478bd9Sstevel@tonic-gate siginfo_kto32(sip, &si32);
5137c478bd9Sstevel@tonic-gate if (SI_FROMUSER(sip) &&
5147c478bd9Sstevel@tonic-gate (zoneid = p->p_zone->zone_id) != GLOBAL_ZONEID &&
5157c478bd9Sstevel@tonic-gate zoneid != sip->si_zoneid) {
5167c478bd9Sstevel@tonic-gate si32.si_pid = p->p_zone->zone_zsched->p_pid;
5177c478bd9Sstevel@tonic-gate si32.si_uid = 0;
5187c478bd9Sstevel@tonic-gate si32.si_ctid = -1;
5197c478bd9Sstevel@tonic-gate si32.si_zoneid = zoneid;
5207c478bd9Sstevel@tonic-gate }
5217c478bd9Sstevel@tonic-gate fp -= SA32(sizeof (si32));
5227c478bd9Sstevel@tonic-gate uzero(fp, sizeof (si32));
5237c478bd9Sstevel@tonic-gate copyout_noerr(&si32, fp, sizeof (si32));
5247c478bd9Sstevel@tonic-gate sip_addr = (siginfo32_t *)fp;
5257c478bd9Sstevel@tonic-gate
5267c478bd9Sstevel@tonic-gate if (sig == SIGPROF &&
5277c478bd9Sstevel@tonic-gate curthread->t_rprof != NULL &&
5287c478bd9Sstevel@tonic-gate curthread->t_rprof->rp_anystate) {
5297c478bd9Sstevel@tonic-gate /*
5307c478bd9Sstevel@tonic-gate * We stand on our head to deal with
5317c478bd9Sstevel@tonic-gate * the real-time profiling signal.
5327c478bd9Sstevel@tonic-gate * Fill in the stuff that doesn't fit
5337c478bd9Sstevel@tonic-gate * in a normal k_siginfo structure.
5347c478bd9Sstevel@tonic-gate */
5357c478bd9Sstevel@tonic-gate int i = sip->si_nsysarg;
5367c478bd9Sstevel@tonic-gate
5377c478bd9Sstevel@tonic-gate while (--i >= 0)
5387c478bd9Sstevel@tonic-gate suword32_noerr(&(sip_addr->si_sysarg[i]),
5397c478bd9Sstevel@tonic-gate (uint32_t)lwp->lwp_arg[i]);
5407c478bd9Sstevel@tonic-gate copyout_noerr(curthread->t_rprof->rp_state,
5417c478bd9Sstevel@tonic-gate sip_addr->si_mstate,
5427c478bd9Sstevel@tonic-gate sizeof (curthread->t_rprof->rp_state));
5437c478bd9Sstevel@tonic-gate }
5447c478bd9Sstevel@tonic-gate } else
5457c478bd9Sstevel@tonic-gate sip_addr = NULL;
546*ed093b41SRobert Mustacchi no_fault();
5477c478bd9Sstevel@tonic-gate
5487c478bd9Sstevel@tonic-gate /* save the current context on the user stack */
549*ed093b41SRobert Mustacchi tuc = kmem_alloc(sizeof (*tuc), KM_SLEEP);
5507c478bd9Sstevel@tonic-gate fp -= SA32(sizeof (*tuc));
5517c478bd9Sstevel@tonic-gate uc = (ucontext32_t *)fp;
552*ed093b41SRobert Mustacchi if (xsave_size != 0) {
553*ed093b41SRobert Mustacchi fp -= xsave_size;
554*ed093b41SRobert Mustacchi tuc->uc_xsave = (int32_t)(uintptr_t)fp;
555*ed093b41SRobert Mustacchi }
556*ed093b41SRobert Mustacchi ret = savecontext32(tuc, &lwp->lwp_sigoldmask, SAVECTXT_F_EXTD |
557*ed093b41SRobert Mustacchi SAVECTXT_F_ONFAULT);
558*ed093b41SRobert Mustacchi if (ret != 0)
559*ed093b41SRobert Mustacchi goto postfault;
5603ce2fcdcSRobert Mustacchi if (on_fault(&ljb))
5613ce2fcdcSRobert Mustacchi goto badstack;
5627c478bd9Sstevel@tonic-gate copyout_noerr(tuc, uc, sizeof (*tuc));
5637c478bd9Sstevel@tonic-gate kmem_free(tuc, sizeof (*tuc));
5647c478bd9Sstevel@tonic-gate tuc = NULL;
5657c478bd9Sstevel@tonic-gate
5667c478bd9Sstevel@tonic-gate lwp->lwp_oldcontext = (uintptr_t)uc;
5677c478bd9Sstevel@tonic-gate
5687c478bd9Sstevel@tonic-gate if (newstack) {
5697c478bd9Sstevel@tonic-gate lwp->lwp_sigaltstack.ss_flags |= SS_ONSTACK;
5707c478bd9Sstevel@tonic-gate if (lwp->lwp_ustack) {
5717c478bd9Sstevel@tonic-gate stack32_t stk32;
5727c478bd9Sstevel@tonic-gate
5737c478bd9Sstevel@tonic-gate stk32.ss_sp = (caddr32_t)(uintptr_t)
5747c478bd9Sstevel@tonic-gate lwp->lwp_sigaltstack.ss_sp;
5757c478bd9Sstevel@tonic-gate stk32.ss_size = (size32_t)
5767c478bd9Sstevel@tonic-gate lwp->lwp_sigaltstack.ss_size;
5777c478bd9Sstevel@tonic-gate stk32.ss_flags = (int32_t)
5787c478bd9Sstevel@tonic-gate lwp->lwp_sigaltstack.ss_flags;
5797c478bd9Sstevel@tonic-gate copyout_noerr(&stk32,
5807c478bd9Sstevel@tonic-gate (stack32_t *)lwp->lwp_ustack, sizeof (stk32));
5817c478bd9Sstevel@tonic-gate }
5827c478bd9Sstevel@tonic-gate }
5837c478bd9Sstevel@tonic-gate
5847c478bd9Sstevel@tonic-gate /*
5857c478bd9Sstevel@tonic-gate * Set up signal handler arguments
5867c478bd9Sstevel@tonic-gate */
5877c478bd9Sstevel@tonic-gate {
5887c478bd9Sstevel@tonic-gate struct sigframe32 frame32;
5897c478bd9Sstevel@tonic-gate
5907c478bd9Sstevel@tonic-gate frame32.sip = (caddr32_t)(uintptr_t)sip_addr;
5917c478bd9Sstevel@tonic-gate frame32.ucp = (caddr32_t)(uintptr_t)uc;
5927c478bd9Sstevel@tonic-gate frame32.signo = sig;
5937c478bd9Sstevel@tonic-gate frame32.retaddr = 0xffffffff; /* never return! */
5947c478bd9Sstevel@tonic-gate copyout_noerr(&frame32, sp, sizeof (frame32));
5957c478bd9Sstevel@tonic-gate }
5967c478bd9Sstevel@tonic-gate
5977c478bd9Sstevel@tonic-gate no_fault();
5987c478bd9Sstevel@tonic-gate if (watched)
5997c478bd9Sstevel@tonic-gate watch_enable_addr((caddr_t)sp, minstacksz, S_WRITE);
6007c478bd9Sstevel@tonic-gate
6017c478bd9Sstevel@tonic-gate rp->r_sp = (greg_t)(uintptr_t)sp;
6027c478bd9Sstevel@tonic-gate rp->r_pc = (greg_t)(uintptr_t)hdlr;
6037c478bd9Sstevel@tonic-gate rp->r_ps = PSL_USER | (rp->r_ps & PS_IOPL);
6047c478bd9Sstevel@tonic-gate
6057c478bd9Sstevel@tonic-gate if ((rp->r_cs & 0xffff) != U32CS_SEL ||
6067c478bd9Sstevel@tonic-gate (rp->r_ss & 0xffff) != UDS_SEL) {
6077c478bd9Sstevel@tonic-gate /*
6087c478bd9Sstevel@tonic-gate * Try our best to deliver the signal.
6097c478bd9Sstevel@tonic-gate */
6107c478bd9Sstevel@tonic-gate rp->r_cs = U32CS_SEL;
6117c478bd9Sstevel@tonic-gate rp->r_ss = UDS_SEL;
6127c478bd9Sstevel@tonic-gate }
6137c478bd9Sstevel@tonic-gate
6147c478bd9Sstevel@tonic-gate /*
6157c478bd9Sstevel@tonic-gate * Don't set lwp_eosys here. sendsig() is called via psig() after
6167c478bd9Sstevel@tonic-gate * lwp_eosys is handled, so setting it here would affect the next
6177c478bd9Sstevel@tonic-gate * system call.
6187c478bd9Sstevel@tonic-gate */
6197c478bd9Sstevel@tonic-gate return (1);
6207c478bd9Sstevel@tonic-gate
6217c478bd9Sstevel@tonic-gate badstack:
6227c478bd9Sstevel@tonic-gate no_fault();
623*ed093b41SRobert Mustacchi postfault:
6247c478bd9Sstevel@tonic-gate if (watched)
6257c478bd9Sstevel@tonic-gate watch_enable_addr((caddr_t)sp, minstacksz, S_WRITE);
6267c478bd9Sstevel@tonic-gate if (tuc)
6277c478bd9Sstevel@tonic-gate kmem_free(tuc, sizeof (*tuc));
6287c478bd9Sstevel@tonic-gate #ifdef DEBUG
6297c478bd9Sstevel@tonic-gate printf("sendsig32: bad signal stack cmd=%s pid=%d, sig=%d\n",
6307c478bd9Sstevel@tonic-gate PTOU(p)->u_comm, p->p_pid, sig);
6317c478bd9Sstevel@tonic-gate printf("on fault, sigsp = 0x%p, action = 0x%p, upc = 0x%lx\n",
6327c478bd9Sstevel@tonic-gate (void *)sp, (void *)hdlr, (uintptr_t)upc);
6337c478bd9Sstevel@tonic-gate #endif
6347c478bd9Sstevel@tonic-gate return (0);
6357c478bd9Sstevel@tonic-gate }
6367c478bd9Sstevel@tonic-gate
6377c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32_IMPL */
638