From owner-svn-src-user@FreeBSD.ORG Tue May 28 15:05:04 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1DF46898; Tue, 28 May 2013 15:05:04 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0D837FD; Tue, 28 May 2013 15:05:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4SF54ua016667; Tue, 28 May 2013 15:05:04 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4SF4wPr016576; Tue, 28 May 2013 15:04:58 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201305281504.r4SF4wPr016576@svn.freebsd.org> From: Attilio Rao Date: Tue, 28 May 2013 15:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251062 - in user/attilio/vmobj-readlock: . lib/libc/amd64/gen lib/libc/arm/gen lib/libc/gen lib/libc/i386/gen lib/libc/ia64/gen lib/libc/mips/gen lib/libc/powerpc/gen lib/libc/powerpc6... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2013 15:05:04 -0000 Author: attilio Date: Tue May 28 15:04:58 2013 New Revision: 251062 URL: http://svnweb.freebsd.org/changeset/base/251062 Log: Merge from vmcontention. Modified: user/attilio/vmobj-readlock/Makefile.inc1 user/attilio/vmobj-readlock/lib/libc/amd64/gen/getcontextx.c user/attilio/vmobj-readlock/lib/libc/arm/gen/getcontextx.c user/attilio/vmobj-readlock/lib/libc/gen/Symbol.map user/attilio/vmobj-readlock/lib/libc/i386/gen/getcontextx.c user/attilio/vmobj-readlock/lib/libc/ia64/gen/getcontextx.c user/attilio/vmobj-readlock/lib/libc/mips/gen/getcontextx.c user/attilio/vmobj-readlock/lib/libc/powerpc/gen/getcontextx.c user/attilio/vmobj-readlock/lib/libc/powerpc64/gen/getcontextx.c user/attilio/vmobj-readlock/lib/libc/sparc64/gen/getcontextx.c user/attilio/vmobj-readlock/lib/libc/sys/cap_rights_limit.2 user/attilio/vmobj-readlock/lib/libthr/thread/thr_sig.c user/attilio/vmobj-readlock/lib/msun/ld80/s_exp2l.c user/attilio/vmobj-readlock/share/man/man4/aacraid.4 user/attilio/vmobj-readlock/sys/amd64/amd64/exception.S user/attilio/vmobj-readlock/sys/amd64/amd64/machdep.c user/attilio/vmobj-readlock/sys/amd64/amd64/trap.c user/attilio/vmobj-readlock/sys/amd64/ia32/ia32_signal.c user/attilio/vmobj-readlock/sys/i386/i386/exception.s user/attilio/vmobj-readlock/sys/i386/i386/machdep.c user/attilio/vmobj-readlock/sys/netinet/sctputil.c user/attilio/vmobj-readlock/sys/sys/ucontext.h user/attilio/vmobj-readlock/tools/regression/lib/msun/test-cexp.c user/attilio/vmobj-readlock/tools/tools/makeroot/makeroot.8 user/attilio/vmobj-readlock/usr.sbin/lpr/common_source/common.c user/attilio/vmobj-readlock/usr.sbin/lpr/common_source/lp.cdefs.h user/attilio/vmobj-readlock/usr.sbin/rtsold/rtsold.8 Directory Properties: user/attilio/vmobj-readlock/ (props changed) user/attilio/vmobj-readlock/lib/libc/ (props changed) user/attilio/vmobj-readlock/share/man/man4/ (props changed) user/attilio/vmobj-readlock/sys/ (props changed) user/attilio/vmobj-readlock/usr.sbin/rtsold/ (props changed) Modified: user/attilio/vmobj-readlock/Makefile.inc1 ============================================================================== --- user/attilio/vmobj-readlock/Makefile.inc1 Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/Makefile.inc1 Tue May 28 15:04:58 2013 (r251062) @@ -983,9 +983,16 @@ buildkernel: .endif @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 3.2: building everything" + @echo ">>> stage 3.2: building the kernel" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ + cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} kernel-all -DNO_MODULES_OBJ + @echo +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) + @echo "--------------------------------------------------------------" + @echo ">>> stage 3.3: building the modules" + @echo "--------------------------------------------------------------" + cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} modules-all -DNO_MODULES_OBJ +.endif @echo "--------------------------------------------------------------" @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" @echo "--------------------------------------------------------------" Modified: user/attilio/vmobj-readlock/lib/libc/amd64/gen/getcontextx.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/amd64/gen/getcontextx.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/amd64/gen/getcontextx.c Tue May 28 15:04:58 2013 (r251062) @@ -57,14 +57,12 @@ __getcontextx_size(void) } int -__fillcontextx(char *ctx) +__fillcontextx2(char *ctx) { struct amd64_get_xfpustate xfpu; ucontext_t *ucp; ucp = (ucontext_t *)ctx; - if (getcontext(ucp) == -1) - return (-1); if (xstate_sz != 0) { xfpu.addr = (char *)(ucp + 1); xfpu.len = xstate_sz; @@ -80,6 +78,18 @@ __fillcontextx(char *ctx) return (0); } +int +__fillcontextx(char *ctx) +{ + ucontext_t *ucp; + + ucp = (ucontext_t *)ctx; + if (getcontext(ucp) == -1) + return (-1); + __fillcontextx2(ctx); + return (0); +} + __weak_reference(__getcontextx, getcontextx); ucontext_t * Modified: user/attilio/vmobj-readlock/lib/libc/arm/gen/getcontextx.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/arm/gen/getcontextx.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/arm/gen/getcontextx.c Tue May 28 15:04:58 2013 (r251062) @@ -40,6 +40,13 @@ __getcontextx_size(void) } int +__fillcontextx2(char *ctx) +{ + + return (0); +} + +int __fillcontextx(char *ctx) { ucontext_t *ucp; Modified: user/attilio/vmobj-readlock/lib/libc/gen/Symbol.map ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/gen/Symbol.map Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/gen/Symbol.map Tue May 28 15:04:58 2013 (r251062) @@ -529,5 +529,6 @@ FBSDprivate_1.0 { __elf_aux_vector; __pthread_map_stacks_exec; __fillcontextx; + __fillcontextx2; __getcontextx_size; }; Modified: user/attilio/vmobj-readlock/lib/libc/i386/gen/getcontextx.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/i386/gen/getcontextx.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/i386/gen/getcontextx.c Tue May 28 15:04:58 2013 (r251062) @@ -89,14 +89,12 @@ __getcontextx_size(void) } int -__fillcontextx(char *ctx) +__fillcontextx2(char *ctx) { struct i386_get_xfpustate xfpu; ucontext_t *ucp; ucp = (ucontext_t *)ctx; - if (getcontext(ucp) == -1) - return (-1); if (xstate_sz != 0) { xfpu.addr = (char *)(ucp + 1); xfpu.len = xstate_sz; @@ -112,6 +110,18 @@ __fillcontextx(char *ctx) return (0); } +int +__fillcontextx(char *ctx) +{ + ucontext_t *ucp; + + ucp = (ucontext_t *)ctx; + if (getcontext(ucp) == -1) + return (-1); + __fillcontextx2(ctx); + return (0); +} + __weak_reference(__getcontextx, getcontextx); ucontext_t * Modified: user/attilio/vmobj-readlock/lib/libc/ia64/gen/getcontextx.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/ia64/gen/getcontextx.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/ia64/gen/getcontextx.c Tue May 28 15:04:58 2013 (r251062) @@ -40,6 +40,13 @@ __getcontextx_size(void) } int +__fillcontextx2(char *ctx) +{ + + return (0); +} + +int __fillcontextx(char *ctx) { ucontext_t *ucp; Modified: user/attilio/vmobj-readlock/lib/libc/mips/gen/getcontextx.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/mips/gen/getcontextx.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/mips/gen/getcontextx.c Tue May 28 15:04:58 2013 (r251062) @@ -40,6 +40,13 @@ __getcontextx_size(void) } int +__fillcontextx2(char *ctx) +{ + + return (0); +} + +int __fillcontextx(char *ctx) { ucontext_t *ucp; Modified: user/attilio/vmobj-readlock/lib/libc/powerpc/gen/getcontextx.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/powerpc/gen/getcontextx.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/powerpc/gen/getcontextx.c Tue May 28 15:04:58 2013 (r251062) @@ -40,6 +40,13 @@ __getcontextx_size(void) } int +__fillcontextx2(char *ctx) +{ + + return (0); +} + +int __fillcontextx(char *ctx) { ucontext_t *ucp; Modified: user/attilio/vmobj-readlock/lib/libc/powerpc64/gen/getcontextx.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/powerpc64/gen/getcontextx.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/powerpc64/gen/getcontextx.c Tue May 28 15:04:58 2013 (r251062) @@ -40,6 +40,13 @@ __getcontextx_size(void) } int +__fillcontextx2(char *ctx) +{ + + return (0); +} + +int __fillcontextx(char *ctx) { ucontext_t *ucp; Modified: user/attilio/vmobj-readlock/lib/libc/sparc64/gen/getcontextx.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/sparc64/gen/getcontextx.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/sparc64/gen/getcontextx.c Tue May 28 15:04:58 2013 (r251062) @@ -40,6 +40,13 @@ __getcontextx_size(void) } int +__fillcontextx2(char *ctx) +{ + + return (0); +} + +int __fillcontextx(char *ctx) { ucontext_t *ucp; Modified: user/attilio/vmobj-readlock/lib/libc/sys/cap_rights_limit.2 ============================================================================== --- user/attilio/vmobj-readlock/lib/libc/sys/cap_rights_limit.2 Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libc/sys/cap_rights_limit.2 Tue May 28 15:04:58 2013 (r251062) @@ -77,7 +77,9 @@ The following rights may be specified in .Bl -tag -width CAP_EXTATTR_DELETE .It Dv CAP_ACCEPT Permit -.Xr accept 2 . +.Xr accept 2 +and +.Xr accept4 2 . .It Dv CAP_ACL_CHECK Permit checking of an ACL on a file descriptor; there is no cross-reference for this system call. Modified: user/attilio/vmobj-readlock/lib/libthr/thread/thr_sig.c ============================================================================== --- user/attilio/vmobj-readlock/lib/libthr/thread/thr_sig.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/libthr/thread/thr_sig.c Tue May 28 15:04:58 2013 (r251062) @@ -205,9 +205,9 @@ handle_signal(struct sigaction *actp, in curthread->in_sigsuspend = 0; /* - * if thread is in deferred cancellation mode, disable cancellation + * If thread is in deferred cancellation mode, disable cancellation * in signal handler. - * if user signal handler calls a cancellation point function, e.g, + * If user signal handler calls a cancellation point function, e.g, * it calls write() to write data to file, because write() is a * cancellation point, the thread is immediately cancelled if * cancellation is pending, to avoid this problem while thread is in @@ -229,7 +229,7 @@ handle_signal(struct sigaction *actp, in * We have already reset cancellation point flags, so if user's code * longjmp()s out of its signal handler, wish its jmpbuf was set * outside of a cancellation point, in most cases, this would be - * true. however, ther is no way to save cancel_enable in jmpbuf, + * true. However, there is no way to save cancel_enable in jmpbuf, * so after setjmps() returns once more, the user code may need to * re-set cancel_enable flag by calling pthread_setcancelstate(). */ @@ -323,8 +323,13 @@ check_deferred_signal(struct pthread *cu return; #if defined(__amd64__) || defined(__i386__) - uc = alloca(__getcontextx_size()); - __fillcontextx((char *)uc); + int uc_len; + uc_len = __getcontextx_size(); + uc = alloca(uc_len); + getcontext(uc); + if (curthread->deferred_siginfo.si_signo == 0) + return; + __fillcontextx2((char *)uc); #else ucontext_t ucv; uc = &ucv; Modified: user/attilio/vmobj-readlock/lib/msun/ld80/s_exp2l.c ============================================================================== --- user/attilio/vmobj-readlock/lib/msun/ld80/s_exp2l.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/lib/msun/ld80/s_exp2l.c Tue May 28 15:04:58 2013 (r251062) @@ -36,25 +36,31 @@ __FBSDID("$FreeBSD$"); #include "fpmath.h" #include "math.h" +#include "math_private.h" #define TBLBITS 7 #define TBLSIZE (1 << TBLBITS) #define BIAS (LDBL_MAX_EXP - 1) -#define EXPMASK (BIAS + LDBL_MAX_EXP) static volatile long double huge = 0x1p10000L, twom10000 = 0x1p-10000L; +static const union IEEEl2bits +P1 = LD80C(0xb17217f7d1cf79ac, -1, 6.93147180559945309429e-1L); + static const double - redux = 0x1.8p63 / TBLSIZE, - P1 = 0x1.62e42fefa39efp-1, - P2 = 0x1.ebfbdff82c58fp-3, - P3 = 0x1.c6b08d7049fap-5, - P4 = 0x1.3b2ab6fba4da5p-7, - P5 = 0x1.5d8804780a736p-10, - P6 = 0x1.430918835e33dp-13; +redux = 0x1.8p63 / TBLSIZE, +/* + * Domain [-0.00390625, 0.00390625], range ~[-1.7079e-23, 1.7079e-23] + * |exp(x) - p(x)| < 2**-75.6 + */ +P2 = 2.4022650695910072e-1, /* 0x1ebfbdff82c58f.0p-55 */ +P3 = 5.5504108664816879e-2, /* 0x1c6b08d7049e1a.0p-57 */ +P4 = 9.6181291055695180e-3, /* 0x13b2ab6fa8321a.0p-59 */ +P5 = 1.3333563089183052e-3, /* 0x15d8806f67f251.0p-62 */ +P6 = 1.5413361552277414e-4; /* 0x1433ddacff3441.0p-65 */ static const double tbl[TBLSIZE * 2] = { 0x1.6a09e667f3bcdp-1, -0x1.bdd3413b2648p-55, @@ -187,8 +193,8 @@ static const double tbl[TBLSIZE * 2] = { 0x1.68155d44ca973p+0, 0x1.038ae44f74p-57, }; -/* - * exp2l(x): compute the base 2 exponential of x +/** + * Compute the base 2 exponential of x for Intel 80-bit format. * * Accuracy: Peak error < 0.511 ulp. * @@ -204,7 +210,7 @@ static const double tbl[TBLSIZE * 2] = { * with |z| <= 2**-(TBLBITS+1). * * We compute exp2(i/TBLSIZE) via table lookup and exp2(z) via a - * degree-6 minimax polynomial with maximum error under 2**-69. + * degree-6 minimax polynomial with maximum error under 2**-75.6. * The table entries each have 104 bits of accuracy, encoded as * a pair of double precision values. */ @@ -219,30 +225,22 @@ exp2l(long double x) /* Filter out exceptional cases. */ u.e = x; hx = u.xbits.expsign; - ix = hx & EXPMASK; + ix = hx & 0x7fff; if (ix >= BIAS + 14) { /* |x| >= 16384 or x is NaN */ if (ix == BIAS + LDBL_MAX_EXP) { - if (u.xbits.man != 1ULL << 63 || (hx & 0x8000) == 0) - return (x + x); /* x is +Inf or NaN */ - else - return (0.0); /* x is -Inf */ + if (hx & 0x8000 && u.xbits.man == 1ULL << 63) + return (0.0L); /* x is -Inf */ + return (x + x); /* x is +Inf, NaN or unsupported */ } if (x >= 16384) return (huge * huge); /* overflow */ if (x <= -16446) return (twom10000 * twom10000); /* underflow */ - } else if (ix <= BIAS - 66) { /* |x| < 0x1p-66 */ - return (1.0 + x); + } else if (ix <= BIAS - 66) { /* |x| < 0x1p-65 (includes pseudos) */ + return (1.0L + x); /* 1 with inexact */ } -#ifdef __i386__ - /* - * The default precision on i386 is 53 bits, so long doubles are - * broken. Call exp2() to get an accurate (double precision) result. - */ - if (fpgetprec() != FP_PE) - return (exp2(x)); -#endif + ENTERI(); /* * Reduce x, computing z, i0, and k. The low bits of x + redux @@ -266,26 +264,25 @@ exp2l(long double x) z = x - u.e; v.xbits.man = 1ULL << 63; if (k >= LDBL_MIN_EXP) { - v.xbits.expsign = LDBL_MAX_EXP - 1 + k; + v.xbits.expsign = BIAS + k; twopk = v.e; } else { - v.xbits.expsign = LDBL_MAX_EXP - 1 + k + 10000; + v.xbits.expsign = BIAS + k + 10000; twopkp10000 = v.e; } /* Compute r = exp2l(y) = exp2lt[i0] * p(z). */ long double t_hi = tbl[i0]; long double t_lo = tbl[i0 + 1]; - /* XXX This gives > 1 ulp errors outside of FE_TONEAREST mode */ - r = t_lo + (t_hi + t_lo) * z * (P1 + z * (P2 + z * (P3 + z * (P4 + r = t_lo + (t_hi + t_lo) * z * (P1.e + z * (P2 + z * (P3 + z * (P4 + z * (P5 + z * P6))))) + t_hi; /* Scale by 2**k. */ if (k >= LDBL_MIN_EXP) { if (k == LDBL_MAX_EXP) - return (r * 2.0 * 0x1p16383L); - return (r * twopk); + RETURNI(r * 2.0 * 0x1p16383L); + RETURNI(r * twopk); } else { - return (r * twopkp10000 * twom10000); + RETURNI(r * twopkp10000 * twom10000); } } Modified: user/attilio/vmobj-readlock/share/man/man4/aacraid.4 ============================================================================== --- user/attilio/vmobj-readlock/share/man/man4/aacraid.4 Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/share/man/man4/aacraid.4 Tue May 28 15:04:58 2013 (r251062) @@ -53,10 +53,10 @@ The driver provides support for the Adaptec by PMC RAID controllers, including Series 6/7/8 and upcoming families. .Pp -The RAID containers are handled via the +The RAID containers are handled via the .Nm aacraidp0 bus. -The physical buses are represented by the +The physical buses are represented by the .Nm aacraidp? devices (beginning with aacraidp1). These devices enable the SCSI pass-thru interface and allows devices connected @@ -135,5 +135,4 @@ and are also queued for retrieval by a m .An Scott Long .Aq scottl@FreeBSD.org .Sh BUGS -.Pp The controller is not actually paused on suspend/resume. Modified: user/attilio/vmobj-readlock/sys/amd64/amd64/exception.S ============================================================================== --- user/attilio/vmobj-readlock/sys/amd64/amd64/exception.S Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/sys/amd64/amd64/exception.S Tue May 28 15:04:58 2013 (r251062) @@ -818,6 +818,10 @@ doreti_iret_fault: .globl ds_load_fault ds_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) + testl $PSL_I,TF_RFLAGS(%rsp) + jz 1f + sti +1: movq %rsp,%rdi call trap movw $KUDSEL,TF_DS(%rsp) @@ -827,6 +831,10 @@ ds_load_fault: .globl es_load_fault es_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) + testl $PSL_I,TF_RFLAGS(%rsp) + jz 1f + sti +1: movq %rsp,%rdi call trap movw $KUDSEL,TF_ES(%rsp) @@ -835,6 +843,10 @@ es_load_fault: ALIGN_TEXT .globl fs_load_fault fs_load_fault: + testl $PSL_I,TF_RFLAGS(%rsp) + jz 1f + sti +1: movl $T_PROTFLT,TF_TRAPNO(%rsp) movq %rsp,%rdi call trap @@ -846,6 +858,10 @@ fs_load_fault: gs_load_fault: popfq movl $T_PROTFLT,TF_TRAPNO(%rsp) + testl $PSL_I,TF_RFLAGS(%rsp) + jz 1f + sti +1: movq %rsp,%rdi call trap movw $KUG32SEL,TF_GS(%rsp) @@ -855,6 +871,10 @@ gs_load_fault: .globl fsbase_load_fault fsbase_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) + testl $PSL_I,TF_RFLAGS(%rsp) + jz 1f + sti +1: movq %rsp,%rdi call trap movq PCPU(CURTHREAD),%r8 @@ -866,6 +886,10 @@ fsbase_load_fault: .globl gsbase_load_fault gsbase_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) + testl $PSL_I,TF_RFLAGS(%rsp) + jz 1f + sti +1: movq %rsp,%rdi call trap movq PCPU(CURTHREAD),%r8 Modified: user/attilio/vmobj-readlock/sys/amd64/amd64/machdep.c ============================================================================== --- user/attilio/vmobj-readlock/sys/amd64/amd64/machdep.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/sys/amd64/amd64/machdep.c Tue May 28 15:04:58 2013 (r251062) @@ -2278,7 +2278,7 @@ get_fpcontext(struct thread *td, mcontex size_t max_len, len; mcp->mc_ownedfp = fpugetregs(td); - bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate, + bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate[0], sizeof(mcp->mc_fpstate)); mcp->mc_fpformat = fpuformat(); if (!use_xsave || xfpusave_len == 0) Modified: user/attilio/vmobj-readlock/sys/amd64/amd64/trap.c ============================================================================== --- user/attilio/vmobj-readlock/sys/amd64/amd64/trap.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/sys/amd64/amd64/trap.c Tue May 28 15:04:58 2013 (r251062) @@ -617,10 +617,10 @@ trap(struct trapframe *frame) ksi.ksi_addr = (void *)addr; if (uprintf_signal) { uprintf("pid %d comm %s: signal %d err %lx code %d type %d " - "addr 0x%lx rip 0x%lx " + "addr 0x%lx rsp 0x%lx rip 0x%lx " "<%02x %02x %02x %02x %02x %02x %02x %02x>\n", p->p_pid, p->p_comm, i, frame->tf_err, ucode, type, addr, - frame->tf_rip, + frame->tf_rsp, frame->tf_rip, fubyte((void *)(frame->tf_rip + 0)), fubyte((void *)(frame->tf_rip + 1)), fubyte((void *)(frame->tf_rip + 2)), Modified: user/attilio/vmobj-readlock/sys/amd64/ia32/ia32_signal.c ============================================================================== --- user/attilio/vmobj-readlock/sys/amd64/ia32/ia32_signal.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/sys/amd64/ia32/ia32_signal.c Tue May 28 15:04:58 2013 (r251062) @@ -101,7 +101,7 @@ ia32_get_fpcontext(struct thread *td, st * for now, it should be irrelevant for most applications. */ mcp->mc_ownedfp = fpugetregs(td); - bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate, + bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate[0], sizeof(mcp->mc_fpstate)); mcp->mc_fpformat = fpuformat(); if (!use_xsave || xfpusave_len == 0) @@ -112,7 +112,7 @@ ia32_get_fpcontext(struct thread *td, st len = max_len; bzero(xfpusave + max_len, len - max_len); } - mcp->mc_flags |= _MC_HASFPXSTATE; + mcp->mc_flags |= _MC_IA32_HASFPXSTATE; mcp->mc_xfpustate_len = len; bcopy(get_pcb_user_save_td(td) + 1, xfpusave, len); } @@ -187,7 +187,6 @@ ia32_get_mcontext(struct thread *td, str mcp->mc_xfpustate = 0; mcp->mc_xfpustate_len = 0; bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); - set_pcb_flags(pcb, PCB_FULL_IRET); return (0); } Modified: user/attilio/vmobj-readlock/sys/i386/i386/exception.s ============================================================================== --- user/attilio/vmobj-readlock/sys/i386/i386/exception.s Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/sys/i386/i386/exception.s Tue May 28 15:04:58 2013 (r251062) @@ -422,6 +422,7 @@ doreti_popl_es_fault: pushl %fs .globl doreti_popl_fs_fault doreti_popl_fs_fault: + sti movl $0,TF_ERR(%esp) /* XXX should be the error code */ movl $T_PROTFLT,TF_TRAPNO(%esp) jmp alltraps_with_regs_pushed Modified: user/attilio/vmobj-readlock/sys/i386/i386/machdep.c ============================================================================== --- user/attilio/vmobj-readlock/sys/i386/i386/machdep.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/sys/i386/i386/machdep.c Tue May 28 15:04:58 2013 (r251062) @@ -3488,7 +3488,7 @@ get_fpcontext(struct thread *td, mcontex bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); #else mcp->mc_ownedfp = npxgetregs(td); - bcopy(&td->td_pcb->pcb_user_save, &mcp->mc_fpstate, + bcopy(&td->td_pcb->pcb_user_save, &mcp->mc_fpstate[0], sizeof(mcp->mc_fpstate)); mcp->mc_fpformat = npxformat(); #endif Modified: user/attilio/vmobj-readlock/sys/netinet/sctputil.c ============================================================================== --- user/attilio/vmobj-readlock/sys/netinet/sctputil.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/sys/netinet/sctputil.c Tue May 28 15:04:58 2013 (r251062) @@ -3536,8 +3536,8 @@ sctp_ulp_notify(uint32_t notification, s if (stcb->sctp_socket->so_rcv.sb_state & SBS_CANTRCVMORE) { return; } - if (stcb && ((stcb->asoc.state & SCTP_STATE_COOKIE_WAIT) || - (stcb->asoc.state & SCTP_STATE_COOKIE_ECHOED))) { + if ((stcb->asoc.state & SCTP_STATE_COOKIE_WAIT) || + (stcb->asoc.state & SCTP_STATE_COOKIE_ECHOED)) { if ((notification == SCTP_NOTIFY_INTERFACE_DOWN) || (notification == SCTP_NOTIFY_INTERFACE_UP) || (notification == SCTP_NOTIFY_INTERFACE_CONFIRMED)) { @@ -3611,16 +3611,16 @@ sctp_ulp_notify(uint32_t notification, s break; } case SCTP_NOTIFY_ASSOC_LOC_ABORTED: - if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || - ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { + if (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || + ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED)) { sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, 0, so_locked); } else { sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 0, so_locked); } break; case SCTP_NOTIFY_ASSOC_REM_ABORTED: - if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || - ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { + if (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || + ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED)) { sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, 1, so_locked); } else { sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 1, so_locked); Modified: user/attilio/vmobj-readlock/sys/sys/ucontext.h ============================================================================== --- user/attilio/vmobj-readlock/sys/sys/ucontext.h Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/sys/sys/ucontext.h Tue May 28 15:04:58 2013 (r251062) @@ -80,7 +80,8 @@ int swapcontext(ucontext_t *, const ucon #if __BSD_VISIBLE int __getcontextx_size(void); -int __fillcontextx(char *ctx); +int __fillcontextx(char *ctx) __returns_twice; +int __fillcontextx2(char *ctx); #endif __END_DECLS Modified: user/attilio/vmobj-readlock/tools/regression/lib/msun/test-cexp.c ============================================================================== --- user/attilio/vmobj-readlock/tools/regression/lib/msun/test-cexp.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/tools/regression/lib/msun/test-cexp.c Tue May 28 15:04:58 2013 (r251062) @@ -110,7 +110,7 @@ cpackl(long double x, long double y) /* Various finite non-zero numbers to test. */ static const float finites[] = -{ -42.0e20, -1.0 -1.0e-10, -0.0, 0.0, 1.0e-10, 1.0, 42.0e20 }; +{ -42.0e20, -1.0, -1.0e-10, -0.0, 0.0, 1.0e-10, 1.0, 42.0e20 }; /* * Determine whether x and y are equal, with two special rules: @@ -228,21 +228,35 @@ test_inf(void) int i; /* cexp(x + inf i) = NaN + NaNi and raises invalid */ - /* cexp(inf + yi) = 0 + 0yi */ - /* cexp(-inf + yi) = inf + inf yi (except y=0) */ for (i = 0; i < N(finites); i++) { testall(cpackl(finites[i], INFINITY), cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 1); - /* XXX shouldn't raise an inexact exception */ - testall(cpackl(-INFINITY, finites[i]), - cpackl(0.0, 0.0 * finites[i]), - ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); - if (finites[i] == 0) - continue; - testall(cpackl(INFINITY, finites[i]), - cpackl(INFINITY, INFINITY * finites[i]), - ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); } + /* cexp(-inf + yi) = 0 * (cos(y) + sin(y)i) */ + /* XXX shouldn't raise an inexact exception */ + testall(cpackl(-INFINITY, M_PI_4), cpackl(0.0, 0.0), + ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); + testall(cpackl(-INFINITY, 3 * M_PI_4), cpackl(-0.0, 0.0), + ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); + testall(cpackl(-INFINITY, 5 * M_PI_4), cpackl(-0.0, -0.0), + ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); + testall(cpackl(-INFINITY, 7 * M_PI_4), cpackl(0.0, -0.0), + ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); + testall(cpackl(-INFINITY, 0.0), cpackl(0.0, 0.0), + ALL_STD_EXCEPT, 0, 1); + testall(cpackl(-INFINITY, -0.0), cpackl(0.0, -0.0), + ALL_STD_EXCEPT, 0, 1); + /* cexp(inf + yi) = inf * (cos(y) + sin(y)i) (except y=0) */ + /* XXX shouldn't raise an inexact exception */ + testall(cpackl(INFINITY, M_PI_4), cpackl(INFINITY, INFINITY), + ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); + testall(cpackl(INFINITY, 3 * M_PI_4), cpackl(-INFINITY, INFINITY), + ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); + testall(cpackl(INFINITY, 5 * M_PI_4), cpackl(-INFINITY, -INFINITY), + ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); + testall(cpackl(INFINITY, 7 * M_PI_4), cpackl(INFINITY, -INFINITY), + ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); + /* cexp(inf + 0i) = inf + 0i */ testall(cpackl(INFINITY, 0.0), cpackl(INFINITY, 0.0), ALL_STD_EXCEPT, 0, 1); testall(cpackl(INFINITY, -0.0), cpackl(INFINITY, -0.0), Modified: user/attilio/vmobj-readlock/tools/tools/makeroot/makeroot.8 ============================================================================== --- user/attilio/vmobj-readlock/tools/tools/makeroot/makeroot.8 Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/tools/tools/makeroot/makeroot.8 Tue May 28 15:04:58 2013 (r251062) @@ -108,8 +108,6 @@ The argument is passed directly to .Xr makefs 8 . .El -.Sh EXAMPLES -.Dl $ makeroot.sh -k keys -K ctsrd -p extras/etc/master.passwd -g extras/etc/group -e extras/mdroot.mtree -e demo/demo.mtree -e extras/ctsrd.mtree -s 26112k -f demo.files cheribsd-demo.img /path/to/dist .Sh FILES .Bl -tag -width METALOG -compact .It Pa METALOG @@ -118,6 +116,8 @@ argument is passed directly to directory. This file is generated by installworld, distribution, and installkernel. .El +.Sh EXAMPLES +.Dl $ makeroot.sh -k keys -K ctsrd -p extras/etc/master.passwd -g extras/etc/group -e extras/mdroot.mtree -e demo/demo.mtree -e extras/ctsrd.mtree -s 26112k -f demo.files cheribsd-demo.img /path/to/dist .Sh SEE ALSO .Xr mtree 5 , .Xr makefs 8 , Modified: user/attilio/vmobj-readlock/usr.sbin/lpr/common_source/common.c ============================================================================== --- user/attilio/vmobj-readlock/usr.sbin/lpr/common_source/common.c Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/usr.sbin/lpr/common_source/common.c Tue May 28 15:04:58 2013 (r251062) @@ -757,16 +757,22 @@ fatal(const struct printer *pp, const ch /* * Close all file descriptors from START on up. - * This is a horrific kluge, since getdtablesize() might return - * ``infinity'', in which case we will be spending a long time - * closing ``files'' which were never open. Perhaps it would - * be better to close the first N fds, for some small value of N. */ void closeallfds(int start) { - int stop = getdtablesize(); - for (; start < stop; start++) - close(start); + int stop; + + if (USE_CLOSEFROM) /* The faster, modern solution */ + closefrom(start); + else { + /* This older logic can be pretty awful on some OS's. The + * getdtablesize() might return ``infinity'', and then this + * will waste a lot of time closing file descriptors which + * had never been open()-ed. */ + stop = getdtablesize(); + for (; start < stop; start++) + close(start); + } } Modified: user/attilio/vmobj-readlock/usr.sbin/lpr/common_source/lp.cdefs.h ============================================================================== --- user/attilio/vmobj-readlock/usr.sbin/lpr/common_source/lp.cdefs.h Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/usr.sbin/lpr/common_source/lp.cdefs.h Tue May 28 15:04:58 2013 (r251062) @@ -1,6 +1,6 @@ /*- * ------+---------+---------+---------+---------+---------+---------+---------* - * Copyright (c) 2003 - Garance Alistair Drosehn . + * Copyright (c) 2003,2013 - Garance Alistair Drosehn . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,6 +56,21 @@ #endif /* + * FreeBSD added a closefrom() routine in release 8.0. When compiling + * `lpr' on other platforms you might want to include bsd-closefrom.c + * from the portable-openssh project. + */ +#ifndef USE_CLOSEFROM +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +# define USE_CLOSEFROM 1 +# endif +#endif +/* The macro USE_CLOSEFROM must be defined with a value of 0 or 1. */ +#ifndef USE_CLOSEFROM +# define USE_CLOSEFROM 0 +#endif + +/* * __unused is a compiler-specific trick which can be used to avoid * warnings about a variable which is defined but never referenced. * Some lpr files use this, so define a null version if it was not Modified: user/attilio/vmobj-readlock/usr.sbin/rtsold/rtsold.8 ============================================================================== --- user/attilio/vmobj-readlock/usr.sbin/rtsold/rtsold.8 Tue May 28 14:44:37 2013 (r251061) +++ user/attilio/vmobj-readlock/usr.sbin/rtsold/rtsold.8 Tue May 28 15:04:58 2013 (r251062) @@ -161,9 +161,9 @@ will dump the current internal state int The options are as follows: .Bl -tag -width indent .It Fl a -Autoprobe outgoing interface. +Autoprobe outgoing interfaces. .Nm -will try to find non-loopback, non-point-to-point, IPv6-capable interfaces +will try to find any non-loopback, non-point-to-point, IPv6-capable interfaces and send router solicitation messages on all of them. .It Fl d Enable debugging. @@ -256,10 +256,10 @@ If not, it will be .Sh FILES .Bl -tag -width /var/run/rtsold.dump -compact .It Pa /var/run/rtsold.pid -the pid of the currently running +The PID of the currently running .Nm . .It Pa /var/run/rtsold.dump -dumps internal state on. +Internal state dump file. .El .\" .Sh EXIT STATUS