From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 4 01:16:09 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CCE7130 for ; Mon, 4 Aug 2014 01:16:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D60C827DB for ; Mon, 4 Aug 2014 01:16:08 +0000 (UTC) Received: from kib (uid 1100) (envelope-from kib@FreeBSD.org) id 5569 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 04 Aug 2014 01:16:08 +0000 From: Konstantin Belousov Date: Mon, 4 Aug 2014 01:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269496 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53deded8.5569.28b919c5@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2014 01:16:09 -0000 Author: kib Date: Mon Aug 4 01:16:08 2014 New Revision: 269496 URL: http://svnweb.freebsd.org/changeset/base/269496 Log: MFC r269189: Initialize zfs vnode v_hash when the vnode is allocated. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:14:27 2014 (r269495) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:16:08 2014 (r269496) @@ -2077,8 +2077,6 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla err = vn_lock(*vpp, flags); if (err != 0) *vpp = NULL; - else - (*vpp)->v_hash = ino; return (err); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:14:27 2014 (r269495) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:16:08 2014 (r269496) @@ -1228,9 +1228,10 @@ again: vnode_t *vp = ZTOV(zp); err = insmntque(vp, zfsvfs->z_vfs); - if (err == 0) + if (err == 0) { + vp->v_hash = obj_num; VOP_UNLOCK(vp, 0); - else { + } else { zp->z_vnode = NULL; zfs_znode_dmu_fini(zp); zfs_znode_free(zp); From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 4 04:00:49 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 479F717F for ; Mon, 4 Aug 2014 04:00:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E27927EE for ; Mon, 4 Aug 2014 04:00:49 +0000 (UTC) Received: from gjb (uid 1237) (envelope-from gjb@FreeBSD.org) id 53fb by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 04 Aug 2014 04:00:48 +0000 From: Glen Barber Date: Mon, 4 Aug 2014 04:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269499 - in stable/9/share/man: man4 man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53df0571.53fb.40f9196@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2014 04:00:49 -0000 Author: gjb Date: Mon Aug 4 04:00:48 2014 New Revision: 269499 URL: http://svnweb.freebsd.org/changeset/base/269499 Log: MFC r269290, r269291, r269293: r269290: acpi_wmi(4): Remove trailing comma from standalone Xref. r269291: hptiop(4): Remove trailing comma from ending Xref. r269293: kernel_mount(9): Remove trailing comma from ending Xref. Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man4/acpi_wmi.4 stable/9/share/man/man4/hptiop.4 stable/9/share/man/man9/kernel_mount.9 Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man4/acpi_wmi.4 ============================================================================== --- stable/9/share/man/man4/acpi_wmi.4 Mon Aug 4 03:59:48 2014 (r269498) +++ stable/9/share/man/man4/acpi_wmi.4 Mon Aug 4 04:00:48 2014 (r269499) @@ -74,7 +74,7 @@ GUID IN {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI .Ed .Sh SEE ALSO -.Xr acpi 4 , +.Xr acpi 4 .Sh HISTORY The .Nm Modified: stable/9/share/man/man4/hptiop.4 ============================================================================== --- stable/9/share/man/man4/hptiop.4 Mon Aug 4 03:59:48 2014 (r269498) +++ stable/9/share/man/man4/hptiop.4 Mon Aug 4 04:00:48 2014 (r269499) @@ -126,7 +126,7 @@ The driver has only been tested on the i386 and amd64 platforms. .Sh SEE ALSO .Xr cam 4 , -.Xr hptmv 4 , +.Xr hptmv 4 .Sh HISTORY The .Nm Modified: stable/9/share/man/man9/kernel_mount.9 ============================================================================== --- stable/9/share/man/man9/kernel_mount.9 Mon Aug 4 03:59:48 2014 (r269498) +++ stable/9/share/man/man9/kernel_mount.9 Mon Aug 4 04:00:48 2014 (r269499) @@ -194,7 +194,7 @@ must come in pairs, e.g., .Ed .Sh SEE ALSO .Xr VFS 9 , -.Xr VFS_MOUNT 9 , +.Xr VFS_MOUNT 9 .Sh HISTORY The .Fn kernel_mount From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 4 15:36:25 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 539ABA13 for ; Mon, 4 Aug 2014 15:36:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F4F82056 for ; Mon, 4 Aug 2014 15:36:25 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 54f7 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 04 Aug 2014 15:36:24 +0000 From: Mark Johnston Date: Mon, 4 Aug 2014 15:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269521 - in stable/9: cddl/contrib/opensolaris/lib/libdtrace/common cddl/lib/libdtrace sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys sys/cd... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53dfa878.54f7.4b5a27a8@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2014 15:36:25 -0000 Author: markj Date: Mon Aug 4 15:36:23 2014 New Revision: 269521 URL: http://svnweb.freebsd.org/changeset/base/269521 Log: MFC r256571: Add a function, memstr, which can be used to convert a buffer of null-separated strings to a single string. This can be used to print the full arguments of a process using execsnoop (from the DTrace toolkit) or with the following one-liner: dtrace -n 'syscall::execve:return {trace(curpsinfo->pr_psargs);}' Note that this relies on the process arguments being cached via the struct proc, which means that it will not work for argvs longer than kern.ps_arg_cache_limit. However, the following rather non-portable script can be used to extract any argv at exec time: fbt::kern_execve:entry { printf("%s", memstr(args[1]->begin_argv, ' ', args[1]->begin_envv - args[1]->begin_argv)); } The debug.dtrace.memstr_max sysctl limits the maximum argument size to memstr(). Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c stable/9/cddl/lib/libdtrace/psinfo.d stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) stable/9/cddl/lib/libdtrace/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Mon Aug 4 15:36:23 2014 (r269521) @@ -311,6 +311,10 @@ static const dt_ident_t _dtrace_globals[ &dt_idops_func, "void(@)" }, { "memref", DT_IDENT_FUNC, 0, DIF_SUBR_MEMREF, DT_ATTR_STABCMN, DT_VERS_1_1, &dt_idops_func, "uintptr_t *(void *, size_t)" }, +#if !defined(sun) +{ "memstr", DT_IDENT_FUNC, 0, DIF_SUBR_MEMSTR, DT_ATTR_STABCMN, DT_VERS_1_0, + &dt_idops_func, "string(void *, char, size_t)" }, +#endif { "min", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MIN, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@)" }, { "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN, Modified: stable/9/cddl/lib/libdtrace/psinfo.d ============================================================================== --- stable/9/cddl/lib/libdtrace/psinfo.d Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/cddl/lib/libdtrace/psinfo.d Mon Aug 4 15:36:23 2014 (r269521) @@ -56,7 +56,8 @@ translator psinfo_t < struct proc *T > { pr_gid = T->p_ucred->cr_rgid; pr_egid = T->p_ucred->cr_groups[0]; pr_addr = 0; - pr_psargs = stringof(T->p_args->ar_args); + pr_psargs = (T->p_args->ar_args == 0) ? "" : + memstr(T->p_args->ar_args, ' ', T->p_args->ar_length); pr_arglen = T->p_args->ar_length; }; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Aug 4 15:36:23 2014 (r269521) @@ -185,6 +185,9 @@ hrtime_t dtrace_deadman_interval = NANOS hrtime_t dtrace_deadman_timeout = (hrtime_t)10 * NANOSEC; hrtime_t dtrace_deadman_user = (hrtime_t)30 * NANOSEC; hrtime_t dtrace_unregister_defunct_reap = (hrtime_t)60 * NANOSEC; +#if !defined(sun) +int dtrace_memstr_max = 4096; +#endif /* * DTrace External Variables @@ -4921,6 +4924,45 @@ inetout: regs[rd] = (uintptr_t)end + 1; break; } +#if !defined(sun) + case DIF_SUBR_MEMSTR: { + char *str = (char *)mstate->dtms_scratch_ptr; + uintptr_t mem = tupregs[0].dttk_value; + char c = tupregs[1].dttk_value; + size_t size = tupregs[2].dttk_value; + uint8_t n; + int i; + + regs[rd] = 0; + + if (size == 0) + break; + + if (!dtrace_canload(mem, size - 1, mstate, vstate)) + break; + + if (!DTRACE_INSCRATCH(mstate, size)) { + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOSCRATCH); + break; + } + + if (dtrace_memstr_max != 0 && size > dtrace_memstr_max) { + *flags |= CPU_DTRACE_ILLOP; + break; + } + + for (i = 0; i < size - 1; i++) { + n = dtrace_load8(mem++); + str[i] = (n == 0) ? c : n; + } + str[size - 1] = 0; + + regs[rd] = (uintptr_t)str; + mstate->dtms_scratch_ptr += size; + break; + } +#endif + case DIF_SUBR_TYPEREF: { uintptr_t size = 4 * sizeof(uintptr_t); uintptr_t *typeref = (uintptr_t *) P2ROUNDUP(mstate->dtms_scratch_ptr, sizeof(uintptr_t)); @@ -9103,6 +9145,9 @@ dtrace_difo_validate_helper(dtrace_difo_ subr == DIF_SUBR_NTOHL || subr == DIF_SUBR_NTOHLL || subr == DIF_SUBR_MEMREF || +#if !defined(sun) + subr == DIF_SUBR_MEMSTR || +#endif subr == DIF_SUBR_TYPEREF) break; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon Aug 4 15:36:23 2014 (r269521) @@ -311,8 +311,9 @@ typedef enum dtrace_probespec { #define DIF_SUBR_SX_SHARED_HELD 48 #define DIF_SUBR_SX_EXCLUSIVE_HELD 49 #define DIF_SUBR_SX_ISEXCLUSIVE 50 +#define DIF_SUBR_MEMSTR 51 -#define DIF_SUBR_MAX 50 /* max subroutine value */ +#define DIF_SUBR_MAX 51 /* max subroutine value */ typedef uint32_t dif_instr_t; Modified: stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c Mon Aug 4 15:36:23 2014 (r269521) @@ -89,3 +89,6 @@ SYSCTL_LONG(_kern_dtrace, OID_AUTO, dof_ SYSCTL_LONG(_kern_dtrace, OID_AUTO, helper_actions_max, CTLFLAG_RW, &dtrace_helper_actions_max, 0, "maximum number of allowed helper actions"); + +SYSCTL_INT(_kern_dtrace, OID_AUTO, memstr_max, CTLFLAG_RW, &dtrace_memstr_max, + 0, "largest allowed argument to memstr(), 0 indicates no limit"); From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 4 21:41:01 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCB761EF for ; Mon, 4 Aug 2014 21:41:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A10C12F4D for ; Mon, 4 Aug 2014 21:41:01 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 5d1d by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 04 Aug 2014 21:41:01 +0000 From: Mark Johnston Date: Mon, 4 Aug 2014 21:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269532 - in stable/9/sys/cddl: contrib/opensolaris/uts/intel/dtrace dev/dtrace/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53dffded.5d1d.70321ffb@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2014 21:41:01 -0000 Author: markj Date: Mon Aug 4 21:41:01 2014 New Revision: 269532 URL: http://svnweb.freebsd.org/changeset/base/269532 Log: MFC r256822: When fetching function arguments out of a frame on amd64, explicitly select the register based on the argument index rather than relying on the fields in struct reg to be in the right order. This assumption is incorrect on FreeBSD and generally led to bogus argument values for the sixth argument of PID and USDT probes; the first five are passed directly to dtrace_probe() via the fasttrap trap handler and so were correctly handled. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Aug 4 21:41:00 2014 (r269531) +++ stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Aug 4 21:41:01 2014 (r269532) @@ -273,7 +273,20 @@ fasttrap_anarg(struct reg *rp, int funct * registers. */ if (argno < 6) - return ((&rp->r_rdi)[argno]); + switch (argno) { + case 0: + return (rp->r_rdi); + case 1: + return (rp->r_rsi); + case 2: + return (rp->r_rdx); + case 3: + return (rp->r_rcx); + case 4: + return (rp->r_r8); + case 5: + return (rp->r_r9); + } stack = (uintptr_t *)rp->r_rsp; DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); Modified: stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Mon Aug 4 21:41:00 2014 (r269531) +++ stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Mon Aug 4 21:41:01 2014 (r269532) @@ -367,7 +367,27 @@ dtrace_getarg(int arg, int aframes) sizeof (uintptr_t)); if (arg <= inreg) { - stack = (uintptr_t *)&rp->r_rdi; + switch (arg) { + case 0: + stack = (uintptr_t *)&rp->r_rdi; + break; + case 1: + stack = (uintptr_t *)&rp->r_rsi; + break; + case 2: + stack = (uintptr_t *)&rp->r_rdx; + break; + case 3: + stack = (uintptr_t *)&rp->r_rcx; + break; + case 4: + stack = (uintptr_t *)&rp->r_r8; + break; + case 5: + stack = (uintptr_t *)&rp->r_r9; + break; + } + arg = 0; } else { stack = (uintptr_t *)(rp->r_rsp); arg -= inreg; From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 5 00:25:19 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDE66DBF for ; Tue, 5 Aug 2014 00:25:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3B7B20FE for ; Tue, 5 Aug 2014 00:25:19 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 5b0d by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 05 Aug 2014 00:25:19 +0000 From: Mark Johnston Date: Tue, 5 Aug 2014 00:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269544 - stable/9/sys/cddl/dev/sdt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e0246f.5b0d.121998b@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2014 00:25:20 -0000 Author: markj Date: Tue Aug 5 00:25:19 2014 New Revision: 269544 URL: http://svnweb.freebsd.org/changeset/base/269544 Log: MFC r267706: Allow creation of SDT probes from a module in which no providers are defined. This ensures that the sdt:zfs:: probes appear despite the fact the sdt provider is defined in the kernel rather than in zfs.ko. Modified: stable/9/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/9/sys/cddl/dev/sdt/sdt.c Tue Aug 5 00:07:21 2014 (r269543) +++ stable/9/sys/cddl/dev/sdt/sdt.c Tue Aug 5 00:25:19 2014 (r269544) @@ -259,27 +259,28 @@ sdt_kld_load(void *arg __unused, struct struct sdt_probe **probe, **p_begin, **p_end; struct sdt_argtype **argtype, **a_begin, **a_end; - if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, NULL)) - return; - for (prov = begin; prov < end; prov++) - sdt_create_provider(*prov); + if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, + NULL) == 0) { + for (prov = begin; prov < end; prov++) + sdt_create_provider(*prov); + } if (linker_file_lookup_set(lf, "sdt_probes_set", &p_begin, &p_end, - NULL)) - return; - for (probe = p_begin; probe < p_end; probe++) { - (*probe)->sdtp_lf = lf; - sdt_create_probe(*probe); - TAILQ_INIT(&(*probe)->argtype_list); + NULL) == 0) { + for (probe = p_begin; probe < p_end; probe++) { + (*probe)->sdtp_lf = lf; + sdt_create_probe(*probe); + TAILQ_INIT(&(*probe)->argtype_list); + } } if (linker_file_lookup_set(lf, "sdt_argtypes_set", &a_begin, &a_end, - NULL)) - return; - for (argtype = a_begin; argtype < a_end; argtype++) { - (*argtype)->probe->n_args++; - TAILQ_INSERT_TAIL(&(*argtype)->probe->argtype_list, *argtype, - argtype_entry); + NULL) == 0) { + for (argtype = a_begin; argtype < a_end; argtype++) { + (*argtype)->probe->n_args++; + TAILQ_INSERT_TAIL(&(*argtype)->probe->argtype_list, + *argtype, argtype_entry); + } } } From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 5 01:03:12 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78CD182C for ; Tue, 5 Aug 2014 01:03:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F6D5250D for ; Tue, 5 Aug 2014 01:03:12 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 5987 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 05 Aug 2014 01:03:12 +0000 From: Mark Johnston Date: Tue, 5 Aug 2014 01:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269547 - stable/9/sys/dev/sound/pci/hda X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e02d50.5987.243d6b4a@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2014 01:03:12 -0000 Author: markj Date: Tue Aug 5 01:03:11 2014 New Revision: 269547 URL: http://svnweb.freebsd.org/changeset/base/269547 Log: MFC r268584: Add a headphone redirection quirk for the Lenovo G580. Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c stable/9/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Tue Aug 5 01:03:10 2014 (r269546) +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Tue Aug 5 01:03:11 2014 (r269547) @@ -346,7 +346,8 @@ hdac_pin_patch(struct hdaa_widget *w) (subid == LENOVO_X1_SUBVENDOR || subid == LENOVO_X220_SUBVENDOR || subid == LENOVO_T420_SUBVENDOR || - subid == LENOVO_T520_SUBVENDOR)) { + subid == LENOVO_T520_SUBVENDOR || + subid == LENOVO_G580_SUBVENDOR)) { switch (nid) { case 25: patch = "as=1 seq=15"; Modified: stable/9/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.h Tue Aug 5 01:03:10 2014 (r269546) +++ stable/9/sys/dev/sound/pci/hda/hdac.h Tue Aug 5 01:03:11 2014 (r269547) @@ -232,6 +232,7 @@ #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) +#define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 5 01:53:15 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A7AE615 for ; Tue, 5 Aug 2014 01:53:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B4B32925 for ; Tue, 5 Aug 2014 01:53:15 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 5bb0 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 05 Aug 2014 01:53:14 +0000 From: Mark Johnston Date: Tue, 5 Aug 2014 01:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269556 - in stable/9/sys/cddl: contrib/opensolaris/uts/common/sys dev/dtrace/amd64 dev/dtrace/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e0390a.5bb0.1dedde7a@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2014 01:53:15 -0000 Author: markj Date: Tue Aug 5 01:53:14 2014 New Revision: 269556 URL: http://svnweb.freebsd.org/changeset/base/269556 Log: MFC r267759, r267761 r267759: Fix a couple of bugs on amd64 when fetching probe arguments beyond the first five for probes entered through a UD fault (i.e. FBT probes). Specifically, handle the fact that dtrace_invop_callsite must be 16 byte-aligned and thus may not immediately follow the call to dtrace_invop() in dtrace_invop_start(). Also fetch register arguments and the stack pointer through a struct trapframe instead of a struct reg. r267761: Fix some bugs when fetching probe arguments in i386. Firstly ensure that the 4 byte-aligned dtrace_invop_callsite can be found and that it immediately follows the call to dtrace_invop(). Secondly, fix some pointer arithmetic to account for differences between struct i386_frame and illumos' struct frame. Finally, ensure that dtrace_getarg() isn't inlined. It works by following a fixed number of frame pointers to the probe site, so inlining breaks it. PR: 191260 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S stable/9/sys/cddl/dev/dtrace/i386/dtrace_isa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Tue Aug 5 01:49:30 2014 (r269555) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Tue Aug 5 01:53:14 2014 (r269556) @@ -1268,7 +1268,11 @@ typedef struct dtrace_toxrange { uintptr_t dtt_limit; /* limit of toxic range */ } dtrace_toxrange_t; +#if defined(sun) extern uint64_t dtrace_getarg(int, int); +#else +extern uint64_t __noinline dtrace_getarg(int, int); +#endif extern greg_t dtrace_getfp(void); extern int dtrace_getipl(void); extern uintptr_t dtrace_caller(int); Modified: stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Tue Aug 5 01:49:30 2014 (r269555) +++ stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Tue Aug 5 01:53:14 2014 (r269556) @@ -349,7 +349,8 @@ dtrace_getarg(int arg, int aframes) for (i = 1; i <= aframes; i++) { fp = fp->f_frame; - if (fp->f_retaddr == (long)dtrace_invop_callsite) { + if (P2ROUNDUP(fp->f_retaddr, 16) == + (long)dtrace_invop_callsite) { /* * In the case of amd64, we will use the pointer to the * regs structure that was pushed when we took the @@ -363,33 +364,33 @@ dtrace_getarg(int arg, int aframes) * we're seeking is passed in regsiters, we can just * load it directly. */ - struct reg *rp = (struct reg *)((uintptr_t)&fp[1] + - sizeof (uintptr_t)); + struct trapframe *tf = + (struct trapframe *)((uintptr_t)&fp[1]); if (arg <= inreg) { switch (arg) { case 0: - stack = (uintptr_t *)&rp->r_rdi; + stack = (uintptr_t *)&tf->tf_rdi; break; case 1: - stack = (uintptr_t *)&rp->r_rsi; + stack = (uintptr_t *)&tf->tf_rsi; break; case 2: - stack = (uintptr_t *)&rp->r_rdx; + stack = (uintptr_t *)&tf->tf_rdx; break; case 3: - stack = (uintptr_t *)&rp->r_rcx; + stack = (uintptr_t *)&tf->tf_rcx; break; case 4: - stack = (uintptr_t *)&rp->r_r8; + stack = (uintptr_t *)&tf->tf_r8; break; case 5: - stack = (uintptr_t *)&rp->r_r9; + stack = (uintptr_t *)&tf->tf_r9; break; } arg = 0; } else { - stack = (uintptr_t *)(rp->r_rsp); + stack = (uintptr_t *)(tf->tf_rsp); arg -= inreg; } goto load; Modified: stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S ============================================================================== --- stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S Tue Aug 5 01:49:30 2014 (r269555) +++ stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S Tue Aug 5 01:53:14 2014 (r269556) @@ -49,14 +49,8 @@ * dtrace_invop wants us to do. */ call dtrace_invop - - /* - * We pushed 3 times for the arguments to dtrace_invop, - * so we need to increment the stack pointer to get rid of - * those values. - */ - addl $12, %esp ALTENTRY(dtrace_invop_callsite) + addl $12, %esp cmpl $DTRACE_INVOP_PUSHL_EBP, %eax je invop_push cmpl $DTRACE_INVOP_POPL_EBP, %eax Modified: stable/9/sys/cddl/dev/dtrace/i386/dtrace_isa.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/i386/dtrace_isa.c Tue Aug 5 01:49:30 2014 (r269555) +++ stable/9/sys/cddl/dev/dtrace/i386/dtrace_isa.c Tue Aug 5 01:53:14 2014 (r269556) @@ -413,7 +413,8 @@ dtrace_getarg(int arg, int aframes) for (i = 1; i <= aframes; i++) { fp = fp->f_frame; - if (fp->f_retaddr == (long)dtrace_invop_callsite) { + if (P2ROUNDUP(fp->f_retaddr, 4) == + (long)dtrace_invop_callsite) { /* * If we pass through the invalid op handler, we will * use the pointer that it passed to the stack as the @@ -422,7 +423,7 @@ dtrace_getarg(int arg, int aframes) * beyond the EIP/RIP that was pushed when the trap was * taken -- hence the "+ 1" below. */ - stack = ((uintptr_t **)&fp[1])[1] + 1; + stack = ((uintptr_t **)&fp[1])[0] + 1; goto load; } @@ -438,7 +439,7 @@ dtrace_getarg(int arg, int aframes) */ arg++; - stack = (uintptr_t *)&fp[1]; + stack = (uintptr_t *)fp + 2; load: DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 5 16:30:13 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F06DB409 for ; Tue, 5 Aug 2014 16:30:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1BBC24E8 for ; Tue, 5 Aug 2014 16:30:13 +0000 (UTC) Received: from marius (uid 1018) (envelope-from marius@FreeBSD.org) id 5c73 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 05 Aug 2014 16:30:13 +0000 From: Marius Strobl Date: Tue, 5 Aug 2014 16:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269593 - stable/9/sys/x86/x86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e10695.5c73.3129f311@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2014 16:30:14 -0000 Author: marius Date: Tue Aug 5 16:30:13 2014 New Revision: 269593 URL: http://svnweb.freebsd.org/changeset/base/269593 Log: MFC: r260457 The changes in r233781 (MFCed to stable/9 in r235515) attempted to make logging during a machine check exception more readable. In practice they prevented all logging during a machine check exception on at least some systems. Specifically, when an uncorrected ECC error is detected in a DIMM on a Nehalem/Westmere class machine, all CPUs receive a machine check exception, but only CPUs on the same package as the memory controller for the erroring DIMM log an error. The CPUs on the other package would complete the scan of their machine check banks and panic before the first set of CPUs could log an error. The end result was a clearer display during the panic (no interleaved messages), but a crashdump without any useful info about the error that occurred. To handle this case, make all CPUs spin in the machine check handler once they have completed their scan of their machine check banks until at least one machine check error is logged. I tried using a DELAY() instead so that the CPUs would not potentially hang forever, but that was not reliable in testing. While here, don't clear MCIP from MSR_MCG_STATUS before invoking panic. Only clear it if the machine check handler does not panic and returns to the interrupted thread. MFC: r263113 Correct type for malloc(). Submitted by: "Conrad Meyer" MFC: r269052, r269239, r269242 Intel desktop Haswell CPUs may report benign corrected parity errors (see HSD131 erratum in [1]) at a considerable rate. So filter these (default), unless logging is enabled. Unfortunately, there really is no better way to reasonably implement suppressing these errors than to just skipping them in mca_log(). Given that they are reported for bank 0, they'd need to be masked in MSR_MC0_CTL. However, P6 family processors require that register to be set to either all 0s or all 1s, disabling way more than the one error in question when using all 0s there. Alternatively, it could be masked for the corresponding CMCI, but that still wouldn't keep the periodic scanner from detecting these spurious errors. Apart from that, register contents of MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel Architectures Developer's Manual nor in the Haswell datasheets. Note that while HSD131 actually is only about C0-stepping as of revision 014 of the Intel desktop 4th generation processor family specification update, these corrected errors also have been observed with D0-stepping aka "Haswell Refresh". 1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf Reviewed by: jhb Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sys/x86/x86/mca.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/x86/x86/mca.c ============================================================================== --- stable/9/sys/x86/x86/mca.c Tue Aug 5 16:04:22 2014 (r269592) +++ stable/9/sys/x86/x86/mca.c Tue Aug 5 16:30:13 2014 (r269593) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -84,7 +85,7 @@ struct mca_internal { static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); -static int mca_count; /* Number of records stored. */ +static volatile int mca_count; /* Number of records stored. */ static int mca_banks; /* Number of per-CPU register banks. */ static SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, @@ -100,6 +101,11 @@ TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10 SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, "Administrative toggle for logging of level one TLB parity (L1TP) errors"); +static int intel6h_HSD131; +TUNABLE_INT("hw.mca.intel6h_hsd131", &intel6h_HSD131); +SYSCTL_INT(_hw_mca, OID_AUTO, intel6h_HSD131, CTLFLAG_RDTUN, &intel6h_HSD131, 0, + "Administrative toggle for logging of spurious corrected errors"); + int workaround_erratum383; SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); @@ -243,12 +249,34 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } +static int __nonnull(1) +mca_mute(const struct mca_record *rec) +{ + + /* + * Skip spurious corrected parity errors generated by desktop Haswell + * (see HSD131 erratum) unless reporting is enabled. + * Note that these errors also have been observed with D0-stepping, + * while the revision 014 desktop Haswell specification update only + * talks about C0-stepping. + */ + if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && + rec->mr_cpu_id == 0x306c3 && rec->mr_bank == 0 && + rec->mr_status == 0x90000040000f0005 && !intel6h_HSD131) + return (1); + + return (0); +} + /* Dump details about a single machine check. */ static void __nonnull(1) mca_log(const struct mca_record *rec) { uint16_t mca_error; + if (mca_mute(rec)) + return; + printf("MCA: Bank %d, Status 0x%016llx\n", rec->mr_bank, (long long)rec->mr_status); printf("MCA: Global Cap 0x%016llx, Status 0x%016llx\n", @@ -699,8 +727,8 @@ cmci_setup(void) { int i; - cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **), - M_MCA, M_WAITOK); + cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state *), M_MCA, + M_WAITOK); for (i = 0; i <= mp_maxid; i++) cmc_state[i] = malloc(sizeof(struct cmc_state) * mca_banks, M_MCA, M_WAITOK | M_ZERO); @@ -733,7 +761,8 @@ mca_setup(uint64_t mcg_cap) TASK_INIT(&mca_refill_task, 0, mca_refill, NULL); mca_fill_freelist(); SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, - "count", CTLFLAG_RD, &mca_count, 0, "Record count"); + "count", CTLFLAG_RD, (int *)(uintptr_t)&mca_count, 0, + "Record count"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "interval", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &mca_ticks, 0, sysctl_positive_int, "I", @@ -939,7 +968,7 @@ void mca_intr(void) { uint64_t mcg_status; - int recoverable; + int old_count, recoverable; if (!(cpu_feature & CPUID_MCA)) { /* @@ -953,15 +982,27 @@ mca_intr(void) } /* Scan the banks and check for any non-recoverable errors. */ + old_count = mca_count; recoverable = mca_scan(MCE); mcg_status = rdmsr(MSR_MCG_STATUS); if (!(mcg_status & MCG_STATUS_RIPV)) recoverable = 0; + if (!recoverable) { + /* + * Wait for at least one error to be logged before + * panic'ing. Some errors will assert a machine check + * on all CPUs, but only certain CPUs will find a valid + * bank to log. + */ + while (mca_count == old_count) + cpu_spinwait(); + + panic("Unrecoverable machine check exception"); + } + /* Clear MCIP. */ wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP); - if (!recoverable) - panic("Unrecoverable machine check exception"); } #ifdef DEV_APIC From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 6 17:40:12 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EE2C96D for ; Wed, 6 Aug 2014 17:40:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53CB22C93 for ; Wed, 6 Aug 2014 17:40:12 +0000 (UTC) Received: from wblock (uid 1265) (envelope-from wblock@FreeBSD.org) id 5bbe by svn.freebsd.org (DragonFly Mail Agent v0.9+); Wed, 06 Aug 2014 17:40:12 +0000 From: Warren Block Date: Wed, 6 Aug 2014 17:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269633 - stable/9/sbin/setkey X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e2687c.5bbe.6478ee63@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2014 17:40:12 -0000 Author: wblock (doc committer) Date: Wed Aug 6 17:40:11 2014 New Revision: 269633 URL: http://svnweb.freebsd.org/changeset/base/269633 Log: MFC r269091: Fix spelling of Camellia algorithm. While here, replace blank lines between examples with actual .Pp breaks. Modified: stable/9/sbin/setkey/setkey.8 Directory Properties: stable/9/sbin/setkey/ (props changed) Modified: stable/9/sbin/setkey/setkey.8 ============================================================================== --- stable/9/sbin/setkey/setkey.8 Wed Aug 6 17:38:35 2014 (r269632) +++ stable/9/sbin/setkey/setkey.8 Wed Aug 6 17:40:11 2014 (r269633) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2006 +.Dd July 25, 2014 .Dt SETKEY 8 .Os .\" @@ -514,7 +514,7 @@ the SA from the key exchange daemon. A value of .Li default tells the kernel to use the system wide default protocol -e.g.\& the one from the +e.g.,\& the one from the .Li esp_trans_deflev sysctl variable, when the kernel processes the packet. A value of @@ -626,7 +626,7 @@ des-deriv 64 ipsec-ciph-des-derived-01 3des-deriv 192 no document rijndael-cbc 128/192/256 rfc3602 aes-ctr 160/224/288 draft-ietf-ipsec-ciph-aes-ctr-03 -camllia-cbc 128/192/256 rfc4312 +camellia-cbc 128/192/256 rfc4312 .Ed .Pp Note that the first 128/192/256 bits of a key for @@ -655,47 +655,46 @@ des-cbc encryption algorithm. .Bd -literal -offset add 3ffe:501:4819::1 3ffe:501:481d::1 esp 123457 -E des-cbc 0x3ffe05014819ffff ; - +.Pp .Ed .\" Add an authentication SA between two FQDN specified hosts: .Bd -literal -offset add -6 myhost.example.com yourhost.example.com ah 123456 -A hmac-sha1 "AH SA configuration!" ; - +.Pp .Ed Use both ESP and AH between two numerically specified hosts: .Bd -literal -offset add 10.0.11.41 10.0.11.33 esp 0x10001 -E des-cbc 0x3ffe05014819ffff -A hmac-md5 "authentication!!" ; - +.Pp .Ed Get the SA information associated with first example above: .Bd -literal -offset get 3ffe:501:4819::1 3ffe:501:481d::1 ah 123456 ; - +.Pp .Ed Flush all entries from the database: .Bd -literal -offset flush ; - +.Pp .Ed Dump the ESP entries from the database: .Bd -literal -offset dump esp ; - +.Pp .Ed Add a security policy between two networks that uses ESP in tunnel mode: .Bd -literal -offset spdadd 10.0.11.41/32[21] 10.0.11.33/32[any] any -P out ipsec esp/tunnel/192.168.0.1-192.168.1.2/require ; - +.Pp .Ed Use TCP MD5 between two numerically specified hosts: .Bd -literal -offset add 10.1.10.34 10.1.10.36 tcp 0x1000 -A tcp-md5 "TCP-MD5 BGP secret" ; - .Ed .\" .Sh SEE ALSO From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 6 22:15:02 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F36D215 for ; Wed, 6 Aug 2014 22:15:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA2032133 for ; Wed, 6 Aug 2014 22:15:01 +0000 (UTC) Received: from jfv (uid 1110) (envelope-from jfv@FreeBSD.org) id 5308 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Wed, 06 Aug 2014 22:15:01 +0000 From: Jack F Vogel Date: Wed, 6 Aug 2014 22:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269647 - stable/9/sys/dev/e1000 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e2a8e5.5308.70e442e7@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2014 22:15:02 -0000 Author: jfv Date: Wed Aug 6 22:15:01 2014 New Revision: 269647 URL: http://svnweb.freebsd.org/changeset/base/269647 Log: MFC of the r267935 - Shared code update - em driver support for i218 devices - igb brought up to the 2.4.0 level Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.c stable/9/sys/dev/e1000/e1000_80003es2lan.h stable/9/sys/dev/e1000/e1000_82542.c stable/9/sys/dev/e1000/e1000_82571.c stable/9/sys/dev/e1000/e1000_82571.h stable/9/sys/dev/e1000/e1000_82575.c stable/9/sys/dev/e1000/e1000_82575.h stable/9/sys/dev/e1000/e1000_api.c stable/9/sys/dev/e1000/e1000_api.h stable/9/sys/dev/e1000/e1000_defines.h stable/9/sys/dev/e1000/e1000_hw.h stable/9/sys/dev/e1000/e1000_i210.c stable/9/sys/dev/e1000/e1000_i210.h stable/9/sys/dev/e1000/e1000_ich8lan.c stable/9/sys/dev/e1000/e1000_ich8lan.h stable/9/sys/dev/e1000/e1000_mac.c stable/9/sys/dev/e1000/e1000_mac.h stable/9/sys/dev/e1000/e1000_manage.c stable/9/sys/dev/e1000/e1000_mbx.c stable/9/sys/dev/e1000/e1000_mbx.h stable/9/sys/dev/e1000/e1000_nvm.c stable/9/sys/dev/e1000/e1000_osdep.h stable/9/sys/dev/e1000/e1000_phy.c stable/9/sys/dev/e1000/e1000_phy.h stable/9/sys/dev/e1000/e1000_regs.h stable/9/sys/dev/e1000/e1000_vf.c stable/9/sys/dev/e1000/e1000_vf.h stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/e1000/if_igb.h Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- stable/9/sys/dev/e1000/e1000_80003es2lan.c Wed Aug 6 21:27:15 2014 (r269646) +++ stable/9/sys/dev/e1000/e1000_80003es2lan.c Wed Aug 6 22:15:01 2014 (r269647) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -32,16 +32,12 @@ ******************************************************************************/ /*$FreeBSD$*/ -/* - * 80003ES2LAN Gigabit Ethernet Controller (Copper) +/* 80003ES2LAN Gigabit Ethernet Controller (Copper) * 80003ES2LAN Gigabit Ethernet Controller (Serdes) */ #include "e1000_api.h" -static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw); -static s32 e1000_init_nvm_params_80003es2lan(struct e1000_hw *hw); -static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw); static s32 e1000_acquire_phy_80003es2lan(struct e1000_hw *hw); static void e1000_release_phy_80003es2lan(struct e1000_hw *hw); static s32 e1000_acquire_nvm_80003es2lan(struct e1000_hw *hw); @@ -71,14 +67,12 @@ static s32 e1000_read_kmrn_reg_80003es2 u16 *data); static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, u16 data); -static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw); static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw); static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); static s32 e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw); static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw); -/* - * A table for the GG82563 cable length where the range is defined +/* A table for the GG82563 cable length where the range is defined * with a lower bound at "index" and the upper bound at * "index + 5". */ @@ -95,13 +89,13 @@ static const u16 e1000_gg82563_cable_len static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_init_phy_params_80003es2lan"); if (hw->phy.media_type != e1000_media_type_copper) { phy->type = e1000_phy_none; - goto out; + return E1000_SUCCESS; } else { phy->ops.power_up = e1000_power_up_phy_copper; phy->ops.power_down = e1000_power_down_phy_copper_80003es2lan; @@ -133,12 +127,9 @@ static s32 e1000_init_phy_params_80003es ret_val = e1000_get_phy_id(hw); /* Verify phy id */ - if (phy->id != GG82563_E_PHY_ID) { - ret_val = -E1000_ERR_PHY; - goto out; - } + if (phy->id != GG82563_E_PHY_ID) + return -E1000_ERR_PHY; -out: return ret_val; } @@ -176,8 +167,7 @@ static s32 e1000_init_nvm_params_80003es size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> E1000_EECD_SIZE_EX_SHIFT); - /* - * Added to a constant, "size" becomes the left-shift value + /* Added to a constant, "size" becomes the left-shift value * for setting word_size. */ size += NVM_WORD_SIZE_BASE_SHIFT; @@ -234,8 +224,8 @@ static s32 e1000_init_mac_params_80003es /* FWSM register */ mac->has_fwsm = TRUE; /* ARC supported; valid only if manageability features are enabled. */ - mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) & - E1000_FWSM_MODE_MASK) ? TRUE : FALSE; + mac->arc_subsystem_valid = !!(E1000_READ_REG(hw, E1000_FWSM) & + E1000_FWSM_MODE_MASK); /* Adaptive IFS not supported */ mac->adaptive_ifs = FALSE; @@ -377,14 +367,13 @@ static s32 e1000_acquire_nvm_80003es2lan ret_val = e1000_acquire_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); if (ret_val) - goto out; + return ret_val; ret_val = e1000_acquire_nvm_generic(hw); if (ret_val) e1000_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); -out: return ret_val; } @@ -415,23 +404,20 @@ static s32 e1000_acquire_swfw_sync_80003 u32 swfw_sync; u32 swmask = mask; u32 fwmask = mask << 16; - s32 ret_val = E1000_SUCCESS; - s32 i = 0, timeout = 50; + s32 i = 0; + s32 timeout = 50; DEBUGFUNC("e1000_acquire_swfw_sync_80003es2lan"); while (i < timeout) { - if (e1000_get_hw_semaphore_generic(hw)) { - ret_val = -E1000_ERR_SWFW_SYNC; - goto out; - } + if (e1000_get_hw_semaphore_generic(hw)) + return -E1000_ERR_SWFW_SYNC; swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); if (!(swfw_sync & (fwmask | swmask))) break; - /* - * Firmware currently using resource (fwmask) + /* Firmware currently using resource (fwmask) * or other software thread using resource (swmask) */ e1000_put_hw_semaphore_generic(hw); @@ -441,8 +427,7 @@ static s32 e1000_acquire_swfw_sync_80003 if (i == timeout) { DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); - ret_val = -E1000_ERR_SWFW_SYNC; - goto out; + return -E1000_ERR_SWFW_SYNC; } swfw_sync |= swmask; @@ -450,8 +435,7 @@ static s32 e1000_acquire_swfw_sync_80003 e1000_put_hw_semaphore_generic(hw); -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -497,14 +481,13 @@ static s32 e1000_read_phy_reg_gg82563_80 ret_val = e1000_acquire_phy_80003es2lan(hw); if (ret_val) - goto out; + return ret_val; /* Select Configuration Page */ if ((offset & MAX_PHY_REG_ADDRESS) < GG82563_MIN_ALT_REG) { page_select = GG82563_PHY_PAGE_SELECT; } else { - /* - * Use Alternative Page Select register to access + /* Use Alternative Page Select register to access * registers 30 and 31 */ page_select = GG82563_PHY_PAGE_SELECT_ALT; @@ -514,12 +497,11 @@ static s32 e1000_read_phy_reg_gg82563_80 ret_val = e1000_write_phy_reg_mdic(hw, page_select, temp); if (ret_val) { e1000_release_phy_80003es2lan(hw); - goto out; + return ret_val; } - if (hw->dev_spec._80003es2lan.mdic_wa_enable == TRUE) { - /* - * The "ready" bit in the MDIC register may be incorrectly set + if (hw->dev_spec._80003es2lan.mdic_wa_enable) { + /* The "ready" bit in the MDIC register may be incorrectly set * before the device has completed the "Page Select" MDI * transaction. So we wait 200us after each MDI command... */ @@ -529,9 +511,8 @@ static s32 e1000_read_phy_reg_gg82563_80 ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { - ret_val = -E1000_ERR_PHY; e1000_release_phy_80003es2lan(hw); - goto out; + return -E1000_ERR_PHY; } usec_delay(200); @@ -549,7 +530,6 @@ static s32 e1000_read_phy_reg_gg82563_80 e1000_release_phy_80003es2lan(hw); -out: return ret_val; } @@ -572,14 +552,13 @@ static s32 e1000_write_phy_reg_gg82563_8 ret_val = e1000_acquire_phy_80003es2lan(hw); if (ret_val) - goto out; + return ret_val; /* Select Configuration Page */ if ((offset & MAX_PHY_REG_ADDRESS) < GG82563_MIN_ALT_REG) { page_select = GG82563_PHY_PAGE_SELECT; } else { - /* - * Use Alternative Page Select register to access + /* Use Alternative Page Select register to access * registers 30 and 31 */ page_select = GG82563_PHY_PAGE_SELECT_ALT; @@ -589,12 +568,11 @@ static s32 e1000_write_phy_reg_gg82563_8 ret_val = e1000_write_phy_reg_mdic(hw, page_select, temp); if (ret_val) { e1000_release_phy_80003es2lan(hw); - goto out; + return ret_val; } - if (hw->dev_spec._80003es2lan.mdic_wa_enable == TRUE) { - /* - * The "ready" bit in the MDIC register may be incorrectly set + if (hw->dev_spec._80003es2lan.mdic_wa_enable) { + /* The "ready" bit in the MDIC register may be incorrectly set * before the device has completed the "Page Select" MDI * transaction. So we wait 200us after each MDI command... */ @@ -604,9 +582,8 @@ static s32 e1000_write_phy_reg_gg82563_8 ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { - ret_val = -E1000_ERR_PHY; e1000_release_phy_80003es2lan(hw); - goto out; + return -E1000_ERR_PHY; } usec_delay(200); @@ -624,7 +601,6 @@ static s32 e1000_write_phy_reg_gg82563_8 e1000_release_phy_80003es2lan(hw); -out: return ret_val; } @@ -655,7 +631,6 @@ static s32 e1000_write_nvm_80003es2lan(s static s32 e1000_get_cfg_done_80003es2lan(struct e1000_hw *hw) { s32 timeout = PHY_CFG_TIMEOUT; - s32 ret_val = E1000_SUCCESS; u32 mask = E1000_NVM_CFG_DONE_PORT_0; DEBUGFUNC("e1000_get_cfg_done_80003es2lan"); @@ -671,12 +646,10 @@ static s32 e1000_get_cfg_done_80003es2la } if (!timeout) { DEBUGOUT("MNG configuration cycle has not completed.\n"); - ret_val = -E1000_ERR_RESET; - goto out; + return -E1000_ERR_RESET; } -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -688,33 +661,32 @@ out: **/ static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 phy_data; bool link; DEBUGFUNC("e1000_phy_force_speed_duplex_80003es2lan"); if (!(hw->phy.ops.read_reg)) - goto out; + return E1000_SUCCESS; - /* - * Clear Auto-Crossover to force MDI manually. M88E1000 requires MDI + /* Clear Auto-Crossover to force MDI manually. M88E1000 requires MDI * forced whenever speed and duplex are forced. */ ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); if (ret_val) - goto out; + return ret_val; phy_data &= ~GG82563_PSCR_CROSSOVER_MODE_AUTO; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL, phy_data); if (ret_val) - goto out; + return ret_val; DEBUGOUT1("GG82563 PSCR: %X\n", phy_data); ret_val = hw->phy.ops.read_reg(hw, PHY_CONTROL, &phy_data); if (ret_val) - goto out; + return ret_val; e1000_phy_force_speed_duplex_setup(hw, &phy_data); @@ -723,7 +695,7 @@ static s32 e1000_phy_force_speed_duplex_ ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL, phy_data); if (ret_val) - goto out; + return ret_val; usec_delay(1); @@ -733,32 +705,30 @@ static s32 e1000_phy_force_speed_duplex_ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT, 100000, &link); if (ret_val) - goto out; + return ret_val; if (!link) { - /* - * We didn't get link. + /* We didn't get link. * Reset the DSP and cross our fingers. */ ret_val = e1000_phy_reset_dsp_generic(hw); if (ret_val) - goto out; + return ret_val; } /* Try once more */ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT, 100000, &link); if (ret_val) - goto out; + return ret_val; } ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &phy_data); if (ret_val) - goto out; + return ret_val; - /* - * Resetting the phy means we need to verify the TX_CLK corresponds + /* Resetting the phy means we need to verify the TX_CLK corresponds * to the link speed. 10Mbps -> 2.5MHz, else 25MHz. */ phy_data &= ~GG82563_MSCR_TX_CLK_MASK; @@ -767,15 +737,13 @@ static s32 e1000_phy_force_speed_duplex_ else phy_data |= GG82563_MSCR_TX_CLK_100MBPS_25; - /* - * In addition, we must re-enable CRS on Tx for both half and full + /* In addition, we must re-enable CRS on Tx for both half and full * duplex. */ phy_data |= GG82563_MSCR_ASSERT_CRS_ON_TX; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, phy_data); -out: return ret_val; } @@ -789,32 +757,29 @@ out: static s32 e1000_get_cable_length_80003es2lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 phy_data, index; DEBUGFUNC("e1000_get_cable_length_80003es2lan"); if (!(hw->phy.ops.read_reg)) - goto out; + return E1000_SUCCESS; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_DSP_DISTANCE, &phy_data); if (ret_val) - goto out; + return ret_val; index = phy_data & GG82563_DSPD_CABLE_LENGTH; - if (index >= GG82563_CABLE_LENGTH_TABLE_SIZE - 5) { - ret_val = -E1000_ERR_PHY; - goto out; - } + if (index >= GG82563_CABLE_LENGTH_TABLE_SIZE - 5) + return -E1000_ERR_PHY; phy->min_cable_length = e1000_gg82563_cable_length_table[index]; phy->max_cable_length = e1000_gg82563_cable_length_table[index + 5]; phy->cable_length = (phy->min_cable_length + phy->max_cable_length) / 2; -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -855,11 +820,11 @@ static s32 e1000_reset_hw_80003es2lan(st { u32 ctrl; s32 ret_val; + u16 kum_reg_data; DEBUGFUNC("e1000_reset_hw_80003es2lan"); - /* - * Prevent the PCI-E bus from sticking if there is no TLP connection + /* Prevent the PCI-E bus from sticking if there is no TLP connection * on the last TLP read/write transaction when MAC is reset. */ ret_val = e1000_disable_pcie_master_generic(hw); @@ -878,23 +843,30 @@ static s32 e1000_reset_hw_80003es2lan(st ctrl = E1000_READ_REG(hw, E1000_CTRL); ret_val = e1000_acquire_phy_80003es2lan(hw); + if (ret_val) + return ret_val; + DEBUGOUT("Issuing a global reset to MAC\n"); E1000_WRITE_REG(hw, E1000_CTRL, ctrl | E1000_CTRL_RST); e1000_release_phy_80003es2lan(hw); + /* Disable IBIST slave mode (far-end loopback) */ + e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + &kum_reg_data); + kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; + e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + kum_reg_data); + ret_val = e1000_get_auto_rd_done_generic(hw); if (ret_val) /* We don't want to continue accessing MAC registers. */ - goto out; + return ret_val; /* Clear any pending interrupt events. */ E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); E1000_READ_REG(hw, E1000_ICR); - ret_val = e1000_check_alt_mac_addr_generic(hw); - -out: - return ret_val; + return e1000_check_alt_mac_addr_generic(hw); } /** @@ -917,9 +889,9 @@ static s32 e1000_init_hw_80003es2lan(str /* Initialize identification LED */ ret_val = mac->ops.id_led_init(hw); + /* An error is not fatal and we should not stop init due to this */ if (ret_val) DEBUGOUT("Error initializing identification LED\n"); - /* This is not fatal and we should not stop init due to this */ /* Disabling VLAN filtering */ DEBUGOUT("Initializing the IEEE VLAN\n"); @@ -935,6 +907,8 @@ static s32 e1000_init_hw_80003es2lan(str /* Setup link and flow control */ ret_val = mac->ops.setup_link(hw); + if (ret_val) + return ret_val; /* Disable IBIST slave mode (far-end loopback) */ e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, @@ -945,14 +919,14 @@ static s32 e1000_init_hw_80003es2lan(str /* Set the transmit descriptor write-back policy */ reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0)); - reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) | - E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC; + reg_data = ((reg_data & ~E1000_TXDCTL_WTHRESH) | + E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC); E1000_WRITE_REG(hw, E1000_TXDCTL(0), reg_data); /* ...for both queues. */ reg_data = E1000_READ_REG(hw, E1000_TXDCTL(1)); - reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) | - E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC; + reg_data = ((reg_data & ~E1000_TXDCTL_WTHRESH) | + E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC); E1000_WRITE_REG(hw, E1000_TXDCTL(1), reg_data); /* Enable retransmit on late collisions */ @@ -979,18 +953,16 @@ static s32 e1000_init_hw_80003es2lan(str /* default to TRUE to enable the MDIC W/A */ hw->dev_spec._80003es2lan.mdic_wa_enable = TRUE; - ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET >> - E1000_KMRNCTRLSTA_OFFSET_SHIFT, - &i); + ret_val = + e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_OFFSET >> + E1000_KMRNCTRLSTA_OFFSET_SHIFT, &i); if (!ret_val) { if ((i & E1000_KMRNCTRLSTA_OPMODE_MASK) == E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO) hw->dev_spec._80003es2lan.mdic_wa_enable = FALSE; } - /* - * Clear all of the statistics registers (clear on read). It is + /* Clear all of the statistics registers (clear on read). It is * important that we do this after we have tried to establish link * because the symbol error count will increment wildly if there * is no link. @@ -1037,6 +1009,13 @@ static void e1000_initialize_hw_bits_800 reg |= (1 << 28); E1000_WRITE_REG(hw, E1000_TARC(1), reg); + /* Disable IPv6 extension header parsing because some malformed + * IPv6 headers can hang the Rx. + */ + reg = E1000_READ_REG(hw, E1000_RFCTL); + reg |= (E1000_RFCTL_IPV6_EX_DIS | E1000_RFCTL_NEW_IPV6_EXT_DIS); + E1000_WRITE_REG(hw, E1000_RFCTL, reg); + return; } @@ -1050,14 +1029,14 @@ static s32 e1000_copper_link_setup_gg825 { struct e1000_phy_info *phy = &hw->phy; s32 ret_val; - u32 ctrl_ext; + u32 reg; u16 data; DEBUGFUNC("e1000_copper_link_setup_gg82563_80003es2lan"); ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &data); if (ret_val) - goto out; + return ret_val; data |= GG82563_MSCR_ASSERT_CRS_ON_TX; /* Use 25MHz for both link down and 1000Base-T for Tx clock. */ @@ -1065,10 +1044,9 @@ static s32 e1000_copper_link_setup_gg825 ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, data); if (ret_val) - goto out; + return ret_val; - /* - * Options: + /* Options: * MDI/MDI-X = 0 (default) * 0 - Auto for all speeds * 1 - MDI mode @@ -1077,7 +1055,7 @@ static s32 e1000_copper_link_setup_gg825 */ ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_SPEC_CTRL, &data); if (ret_val) - goto out; + return ret_val; data &= ~GG82563_PSCR_CROSSOVER_MODE_MASK; @@ -1094,8 +1072,7 @@ static s32 e1000_copper_link_setup_gg825 break; } - /* - * Options: + /* Options: * disable_polarity_correction = 0 (default) * Automatic Correction for Reversed Cable Polarity * 0 - Disabled @@ -1107,90 +1084,86 @@ static s32 e1000_copper_link_setup_gg825 ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL, data); if (ret_val) - goto out; + return ret_val; /* SW Reset the PHY so all changes take effect */ ret_val = hw->phy.ops.commit(hw); if (ret_val) { DEBUGOUT("Error Resetting the PHY\n"); - goto out; + return ret_val; } /* Bypass Rx and Tx FIFO's */ - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL, - E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS | - E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS); + reg = E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL; + data = (E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS | + E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS); + ret_val = e1000_write_kmrn_reg_80003es2lan(hw, reg, data); if (ret_val) - goto out; + return ret_val; - ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, &data); + reg = E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE; + ret_val = e1000_read_kmrn_reg_80003es2lan(hw, reg, &data); if (ret_val) - goto out; + return ret_val; data |= E1000_KMRNCTRLSTA_OPMODE_E_IDLE; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, data); + ret_val = e1000_write_kmrn_reg_80003es2lan(hw, reg, data); if (ret_val) - goto out; + return ret_val; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_SPEC_CTRL_2, &data); if (ret_val) - goto out; + return ret_val; data &= ~GG82563_PSCR2_REVERSE_AUTO_NEG; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL_2, data); if (ret_val) - goto out; + return ret_val; - ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT); - ctrl_ext &= ~(E1000_CTRL_EXT_LINK_MODE_MASK); - E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext); + reg = E1000_READ_REG(hw, E1000_CTRL_EXT); + reg &= ~E1000_CTRL_EXT_LINK_MODE_MASK; + E1000_WRITE_REG(hw, E1000_CTRL_EXT, reg); ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_PWR_MGMT_CTRL, &data); if (ret_val) - goto out; + return ret_val; - /* - * Do not init these registers when the HW is in IAMT mode, since the + /* Do not init these registers when the HW is in IAMT mode, since the * firmware will have already initialized them. We only initialize * them if the HW is not in IAMT mode. */ - if (!(hw->mac.ops.check_mng_mode(hw))) { + if (!hw->mac.ops.check_mng_mode(hw)) { /* Enable Electrical Idle on the PHY */ data |= GG82563_PMCR_ENABLE_ELECTRICAL_IDLE; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_PWR_MGMT_CTRL, data); if (ret_val) - goto out; + return ret_val; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, &data); if (ret_val) - goto out; + return ret_val; data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, data); if (ret_val) - goto out; + return ret_val; } - /* - * Workaround: Disable padding in Kumeran interface in the MAC + /* Workaround: Disable padding in Kumeran interface in the MAC * and in the PHY to avoid CRC errors. */ ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_INBAND_CTRL, &data); if (ret_val) - goto out; + return ret_val; data |= GG82563_ICR_DIS_PADDING; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_INBAND_CTRL, data); if (ret_val) - goto out; + return ret_val; -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -1213,42 +1186,42 @@ static s32 e1000_setup_copper_link_80003 ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); E1000_WRITE_REG(hw, E1000_CTRL, ctrl); - /* - * Set the mac to wait the maximum time between each + /* Set the mac to wait the maximum time between each * iteration and increase the max iterations when * polling the phy; this fixes erroneous timeouts at 10Mbps. */ ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 4), 0xFFFF); if (ret_val) - goto out; + return ret_val; ret_val = e1000_read_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), ®_data); if (ret_val) - goto out; + return ret_val; reg_data |= 0x3F; ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), reg_data); if (ret_val) - goto out; - ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, ®_data); + return ret_val; + ret_val = + e1000_read_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, + ®_data); if (ret_val) - goto out; + return ret_val; reg_data |= E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, reg_data); + ret_val = + e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, + reg_data); if (ret_val) - goto out; + return ret_val; ret_val = e1000_copper_link_setup_gg82563_80003es2lan(hw); if (ret_val) - goto out; - - ret_val = e1000_setup_copper_link_generic(hw); + return ret_val; -out: - return ret_val; + return e1000_setup_copper_link_generic(hw); } /** @@ -1271,7 +1244,7 @@ static s32 e1000_cfg_on_link_up_80003es2 ret_val = e1000_get_speed_and_duplex_copper_generic(hw, &speed, &duplex); if (ret_val) - goto out; + return ret_val; if (speed == SPEED_1000) ret_val = e1000_cfg_kmrn_1000_80003es2lan(hw); @@ -1279,7 +1252,6 @@ static s32 e1000_cfg_on_link_up_80003es2 ret_val = e1000_cfg_kmrn_10_100_80003es2lan(hw, duplex); } -out: return ret_val; } @@ -1293,7 +1265,7 @@ out: **/ static s32 e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u32 tipg; u32 i = 0; u16 reg_data, reg_data2; @@ -1301,11 +1273,12 @@ static s32 e1000_cfg_kmrn_10_100_80003es DEBUGFUNC("e1000_configure_kmrn_for_10_100"); reg_data = E1000_KMRNCTRLSTA_HD_CTRL_10_100_DEFAULT; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, - reg_data); + ret_val = + e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, + reg_data); if (ret_val) - goto out; + return ret_val; /* Configure Transmit Inter-Packet Gap */ tipg = E1000_READ_REG(hw, E1000_TIPG); @@ -1317,12 +1290,12 @@ static s32 e1000_cfg_kmrn_10_100_80003es ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); if (ret_val) - goto out; + return ret_val; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data2); if (ret_val) - goto out; + return ret_val; i++; } while ((reg_data != reg_data2) && (i < GG82563_MAX_KMRN_RETRY)); @@ -1331,11 +1304,7 @@ static s32 e1000_cfg_kmrn_10_100_80003es else reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - reg_data); - -out: - return ret_val; + return hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); } /** @@ -1347,7 +1316,7 @@ out: **/ static s32 e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 reg_data, reg_data2; u32 tipg; u32 i = 0; @@ -1355,10 +1324,12 @@ static s32 e1000_cfg_kmrn_1000_80003es2l DEBUGFUNC("e1000_configure_kmrn_for_1000"); reg_data = E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, reg_data); + ret_val = + e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, + reg_data); if (ret_val) - goto out; + return ret_val; /* Configure Transmit Inter-Packet Gap */ tipg = E1000_READ_REG(hw, E1000_TIPG); @@ -1370,21 +1341,18 @@ static s32 e1000_cfg_kmrn_1000_80003es2l ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); if (ret_val) - goto out; + return ret_val; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data2); if (ret_val) - goto out; + return ret_val; i++; } while ((reg_data != reg_data2) && (i < GG82563_MAX_KMRN_RETRY)); reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - reg_data); -out: - return ret_val; + return hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); } /** @@ -1401,13 +1369,13 @@ static s32 e1000_read_kmrn_reg_80003es2l u16 *data) { u32 kmrnctrlsta; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_read_kmrn_reg_80003es2lan"); ret_val = e1000_acquire_mac_csr_80003es2lan(hw); if (ret_val) - goto out; + return ret_val; kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN; @@ -1421,7 +1389,6 @@ static s32 e1000_read_kmrn_reg_80003es2l e1000_release_mac_csr_80003es2lan(hw); -out: return ret_val; } @@ -1439,13 +1406,13 @@ static s32 e1000_write_kmrn_reg_80003es2 u16 data) { u32 kmrnctrlsta; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_write_kmrn_reg_80003es2lan"); ret_val = e1000_acquire_mac_csr_80003es2lan(hw); if (ret_val) - goto out; + return ret_val; kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & E1000_KMRNCTRLSTA_OFFSET) | data; @@ -1456,7 +1423,6 @@ static s32 e1000_write_kmrn_reg_80003es2 e1000_release_mac_csr_80003es2lan(hw); -out: return ret_val; } @@ -1466,23 +1432,19 @@ out: **/ static s32 e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_read_mac_addr_80003es2lan"); - /* - * If there's an alternate MAC address place it in RAR0 + /* If there's an alternate MAC address place it in RAR0 * so that it will override the Si installed default perm * address. */ ret_val = e1000_check_alt_mac_addr_generic(hw); if (ret_val) - goto out; - - ret_val = e1000_read_mac_addr_generic(hw); + return ret_val; -out: - return ret_val; + return e1000_read_mac_addr_generic(hw); } /** Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.h ============================================================================== --- stable/9/sys/dev/e1000/e1000_80003es2lan.h Wed Aug 6 21:27:15 2014 (r269646) +++ stable/9/sys/dev/e1000/e1000_80003es2lan.h Wed Aug 6 22:15:01 2014 (r269647) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -51,34 +51,32 @@ #define E1000_KMRNCTRLSTA_OPMODE_MASK 0x000C #define E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO 0x0004 -#define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gigabit Carry Extend Padding */ +#define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gig Carry Extend Padding */ #define DEFAULT_TCTL_EXT_GCEX_80003ES2LAN 0x00010000 #define DEFAULT_TIPG_IPGT_1000_80003ES2LAN 0x8 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Thu Aug 7 00:32:23 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD4A1CA1 for ; Thu, 7 Aug 2014 00:32:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 938C622B3 for ; Thu, 7 Aug 2014 00:32:23 +0000 (UTC) Received: from mckusick (uid 740) (envelope-from mckusick@FreeBSD.org) id 5727 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Thu, 07 Aug 2014 00:32:23 +0000 From: Kirk McKusick Date: Thu, 7 Aug 2014 00:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269652 - stable/9/sbin/restore X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e2c917.5727.6e347a@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2014 00:32:23 -0000 Author: mckusick Date: Thu Aug 7 00:32:23 2014 New Revision: 269652 URL: http://svnweb.freebsd.org/changeset/base/269652 Log: MFC of r269303: When restoring a UFS dump onto a ZFS filesystem, an assertion in restore was failing because ZFS was reporting a blocksize that was not a multiple of 1024. Replace restore's failed assertion with code that writes restored files in a blocksize that works for restore (a multiple of 1024) despite being non-optimal for ZFS. Submitted by: Dmitry Morozovsky Tested by: Dmitry Morozovsky Modified: stable/9/sbin/restore/tape.c Directory Properties: stable/9/sbin/restore/ (props changed) Modified: stable/9/sbin/restore/tape.c ============================================================================== --- stable/9/sbin/restore/tape.c Wed Aug 6 23:33:16 2014 (r269651) +++ stable/9/sbin/restore/tape.c Thu Aug 7 00:32:23 2014 (r269652) @@ -260,9 +260,11 @@ setup(void) fssize = TP_BSIZE; if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE) fssize = stbuf.st_blksize; - if (((fssize - 1) & fssize) != 0) { - fprintf(stderr, "bad block size %ld\n", fssize); - done(1); + if (((TP_BSIZE - 1) & stbuf.st_blksize) != 0) { + fprintf(stderr, "Warning: filesystem with non-multiple-of-%d " + "blocksize (%d);\n", TP_BSIZE, stbuf.st_blksize); + fssize = roundup(fssize, TP_BSIZE); + fprintf(stderr, "\twriting using blocksize %ld\n", fssize); } if (spcl.c_volume != 1) { fprintf(stderr, "Tape is not volume 1 of the dump\n"); From owner-svn-src-stable-9@FreeBSD.ORG Thu Aug 7 12:19:43 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42974852 for ; Thu, 7 Aug 2014 12:19:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A1912075 for ; Thu, 7 Aug 2014 12:19:43 +0000 (UTC) Received: from pluknet (uid 1244) (envelope-from pluknet@FreeBSD.org) id 5338 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Thu, 07 Aug 2014 12:19:43 +0000 From: Sergey Kandaurov Date: Thu, 7 Aug 2014 12:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269663 - stable/9/sys/amd64/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e36edf.5338.47e0424e@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2014 12:19:43 -0000 Author: pluknet Date: Thu Aug 7 12:19:42 2014 New Revision: 269663 URL: http://svnweb.freebsd.org/changeset/base/269663 Log: Fix amd64 LINT. hyperv is not in stable/9, thus partially revert MFC r257277. Modified: stable/9/sys/amd64/conf/NOTES Modified: stable/9/sys/amd64/conf/NOTES ============================================================================== --- stable/9/sys/amd64/conf/NOTES Thu Aug 7 11:44:30 2014 (r269662) +++ stable/9/sys/amd64/conf/NOTES Thu Aug 7 12:19:42 2014 (r269663) @@ -472,8 +472,6 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device -device hyperv # HyperV drivers - # Xen HVM Guest Optimizations options XENHVM # Xen HVM kernel infrastructure device xenpci # Xen HVM Hypervisor services driver From owner-svn-src-stable-9@FreeBSD.ORG Thu Aug 7 18:37:16 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A821DDF0 for ; Thu, 7 Aug 2014 18:37:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D62D24E8 for ; Thu, 7 Aug 2014 18:37:16 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 2e5b by svn.freebsd.org (DragonFly Mail Agent v0.9+); Thu, 07 Aug 2014 18:37:16 +0000 From: Mark Johnston Date: Thu, 7 Aug 2014 18:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269681 - stable/9/libexec/rtld-elf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e3c75c.2e5b.7de5a63a@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2014 18:37:16 -0000 Author: markj Date: Thu Aug 7 18:37:15 2014 New Revision: 269681 URL: http://svnweb.freebsd.org/changeset/base/269681 Log: MFC r265456, r265578: Add a postinit debugger hook to rtld. This will be used by dtrace(1) to halt the victim process before its entry point is called, at which point probes and DOF data are registered with the kernel. The r_debug_state hook cannot be used for this purpose, as it is called before the program's init routines are invoked and in particular before DOF data is registered (via drti.o). Modified: stable/9/libexec/rtld-elf/Symbol.map stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/Symbol.map ============================================================================== --- stable/9/libexec/rtld-elf/Symbol.map Thu Aug 7 18:36:47 2014 (r269680) +++ stable/9/libexec/rtld-elf/Symbol.map Thu Aug 7 18:37:15 2014 (r269681) @@ -30,4 +30,5 @@ FBSDprivate_1.0 { _rtld_atfork_post; _rtld_addr_phdr; _rtld_get_stack_prot; + _r_debug_postinit; }; Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Thu Aug 7 18:36:47 2014 (r269680) +++ stable/9/libexec/rtld-elf/rtld.c Thu Aug 7 18:37:15 2014 (r269681) @@ -161,6 +161,7 @@ static bool matched_symbol(SymLook *, co const unsigned long); void r_debug_state(struct r_debug *, struct link_map *) __noinline; +void _r_debug_postinit(struct link_map *) __noinline; /* * Data declarations. @@ -635,6 +636,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ if (obj_main->crt_no_init) preinit_main(); objlist_call_init(&initlist, &lockstate); + _r_debug_postinit(&obj_main->linkmap); objlist_clear(&initlist); dbg("loading filtees"); for (obj = obj_list->next; obj != NULL; obj = obj->next) { @@ -3501,7 +3503,20 @@ r_debug_state(struct r_debug* rd, struct * even when marked __noinline. However, gdb depends on those * calls being made. */ - __asm __volatile("" : : : "memory"); + __compiler_membar(); +} + +/* + * A function called after init routines have completed. This can be used to + * break before a program's entry routine is called, and can be used when + * main is not available in the symbol table. + */ +void +_r_debug_postinit(struct link_map *m) +{ + + /* See r_debug_state(). */ + __compiler_membar(); } /* From owner-svn-src-stable-9@FreeBSD.ORG Thu Aug 7 21:06:49 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E44D849 for ; Thu, 7 Aug 2014 21:06:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 822EE271E for ; Thu, 7 Aug 2014 21:06:49 +0000 (UTC) Received: from jkim (uid 1068) (envelope-from jkim@FreeBSD.org) id 2127 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Thu, 07 Aug 2014 21:06:42 +0000 From: Jung-uk Kim Date: Thu, 7 Aug 2014 21:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269687 - in stable: 8/crypto/openssl 8/crypto/openssl/apps 8/crypto/openssl/crypto 8/crypto/openssl/crypto/asn1 8/crypto/openssl/crypto/bio 8/crypto/openssl/crypto/bn 8/crypto/openssl/... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e3ea62.2127.2e1d63e6@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2014 21:06:49 -0000 Author: jkim Date: Thu Aug 7 21:06:34 2014 New Revision: 269687 URL: http://svnweb.freebsd.org/changeset/base/269687 Log: Merge OpenSSL 0.9.8zb. Added: stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod - copied unchanged from r269672, vendor-crypto/openssl/dist-0.9.8/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod stable/9/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 (contents, props changed) Deleted: stable/9/crypto/openssl/crypto/pkcs7/bio_ber.c stable/9/crypto/openssl/crypto/pkcs7/dec.c stable/9/crypto/openssl/crypto/pkcs7/des.pem stable/9/crypto/openssl/crypto/pkcs7/doc stable/9/crypto/openssl/crypto/pkcs7/enc.c stable/9/crypto/openssl/crypto/pkcs7/es1.pem stable/9/crypto/openssl/crypto/pkcs7/example.c stable/9/crypto/openssl/crypto/pkcs7/example.h stable/9/crypto/openssl/crypto/pkcs7/info.pem stable/9/crypto/openssl/crypto/pkcs7/infokey.pem stable/9/crypto/openssl/crypto/pkcs7/p7/ stable/9/crypto/openssl/crypto/pkcs7/server.pem stable/9/crypto/openssl/crypto/pkcs7/sign.c stable/9/crypto/openssl/crypto/pkcs7/t/ stable/9/crypto/openssl/crypto/pkcs7/verify.c stable/9/crypto/openssl/demos/eay/ stable/9/crypto/openssl/demos/maurice/ Modified: stable/9/crypto/openssl/CHANGES stable/9/crypto/openssl/FAQ stable/9/crypto/openssl/Makefile stable/9/crypto/openssl/NEWS stable/9/crypto/openssl/README stable/9/crypto/openssl/apps/apps.c stable/9/crypto/openssl/apps/ca.c stable/9/crypto/openssl/apps/crl2p7.c stable/9/crypto/openssl/apps/ocsp.c stable/9/crypto/openssl/apps/s_server.c stable/9/crypto/openssl/apps/speed.c stable/9/crypto/openssl/crypto/asn1/a_object.c stable/9/crypto/openssl/crypto/asn1/asn1_lib.c stable/9/crypto/openssl/crypto/asn1/asn_mime.c stable/9/crypto/openssl/crypto/asn1/asn_pack.c stable/9/crypto/openssl/crypto/asn1/evp_asn1.c stable/9/crypto/openssl/crypto/asn1/t_x509.c stable/9/crypto/openssl/crypto/asn1/tasn_enc.c stable/9/crypto/openssl/crypto/bio/bio_lib.c stable/9/crypto/openssl/crypto/bn/bn_gf2m.c stable/9/crypto/openssl/crypto/bn/bn_lib.c stable/9/crypto/openssl/crypto/bn/bn_sqr.c stable/9/crypto/openssl/crypto/conf/conf_api.c stable/9/crypto/openssl/crypto/conf/conf_def.c stable/9/crypto/openssl/crypto/ec/ec_lib.c stable/9/crypto/openssl/crypto/ec/ecp_smpl.c stable/9/crypto/openssl/crypto/idea/ideatest.c stable/9/crypto/openssl/crypto/objects/obj_dat.c stable/9/crypto/openssl/crypto/ocsp/ocsp_ht.c stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/9/crypto/openssl/crypto/opensslv.h stable/9/crypto/openssl/crypto/pkcs7/Makefile stable/9/crypto/openssl/crypto/rsa/rsa_eay.c stable/9/crypto/openssl/crypto/ui/ui_lib.c stable/9/crypto/openssl/doc/apps/asn1parse.pod stable/9/crypto/openssl/doc/apps/ca.pod stable/9/crypto/openssl/doc/apps/crl.pod stable/9/crypto/openssl/doc/apps/dhparam.pod stable/9/crypto/openssl/doc/apps/dsa.pod stable/9/crypto/openssl/doc/apps/ecparam.pod stable/9/crypto/openssl/doc/apps/gendsa.pod stable/9/crypto/openssl/doc/apps/genrsa.pod stable/9/crypto/openssl/doc/apps/rsa.pod stable/9/crypto/openssl/doc/apps/s_client.pod stable/9/crypto/openssl/doc/apps/s_server.pod stable/9/crypto/openssl/doc/apps/verify.pod stable/9/crypto/openssl/doc/apps/x509.pod stable/9/crypto/openssl/doc/apps/x509v3_config.pod stable/9/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod stable/9/crypto/openssl/doc/crypto/BIO_f_base64.pod stable/9/crypto/openssl/doc/crypto/BIO_push.pod stable/9/crypto/openssl/doc/crypto/ERR_get_error.pod stable/9/crypto/openssl/doc/crypto/RSA_set_method.pod stable/9/crypto/openssl/doc/crypto/RSA_sign.pod stable/9/crypto/openssl/doc/crypto/des.pod stable/9/crypto/openssl/doc/crypto/err.pod stable/9/crypto/openssl/doc/crypto/pem.pod stable/9/crypto/openssl/doc/crypto/ui.pod stable/9/crypto/openssl/doc/fingerprints.txt stable/9/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_client_cert_cb.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod stable/9/crypto/openssl/doc/ssl/SSL_get_version.pod stable/9/crypto/openssl/doc/ssl/SSL_shutdown.pod stable/9/crypto/openssl/doc/ssl/d2i_SSL_SESSION.pod stable/9/crypto/openssl/openssl.spec stable/9/crypto/openssl/ssl/d1_both.c stable/9/crypto/openssl/ssl/d1_clnt.c stable/9/crypto/openssl/ssl/d1_srvr.c stable/9/crypto/openssl/ssl/s23_lib.c stable/9/crypto/openssl/ssl/s23_srvr.c stable/9/crypto/openssl/ssl/s3_clnt.c stable/9/crypto/openssl/ssl/s3_pkt.c stable/9/crypto/openssl/ssl/s3_srvr.c stable/9/crypto/openssl/ssl/ssl_ciph.c stable/9/crypto/openssl/ssl/ssl_stat.c stable/9/crypto/openssl/ssl/t1_lib.c stable/9/crypto/openssl/util/mkerr.pl stable/9/secure/lib/libcrypto/Makefile stable/9/secure/lib/libcrypto/Makefile.inc stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/9/secure/lib/libcrypto/man/BIO_f_md.3 stable/9/secure/lib/libcrypto/man/BIO_f_null.3 stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/9/secure/lib/libcrypto/man/BIO_find_type.3 stable/9/secure/lib/libcrypto/man/BIO_new.3 stable/9/secure/lib/libcrypto/man/BIO_push.3 stable/9/secure/lib/libcrypto/man/BIO_read.3 stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 stable/9/secure/lib/libcrypto/man/BIO_s_file.3 stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 stable/9/secure/lib/libcrypto/man/BIO_s_null.3 stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 stable/9/secure/lib/libcrypto/man/BN_add.3 stable/9/secure/lib/libcrypto/man/BN_add_word.3 stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 stable/9/secure/lib/libcrypto/man/BN_cmp.3 stable/9/secure/lib/libcrypto/man/BN_copy.3 stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/9/secure/lib/libcrypto/man/BN_new.3 stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 stable/9/secure/lib/libcrypto/man/BN_rand.3 stable/9/secure/lib/libcrypto/man/BN_set_bit.3 stable/9/secure/lib/libcrypto/man/BN_swap.3 stable/9/secure/lib/libcrypto/man/BN_zero.3 stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/9/secure/lib/libcrypto/man/DH_generate_key.3 stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DH_new.3 stable/9/secure/lib/libcrypto/man/DH_set_method.3 stable/9/secure/lib/libcrypto/man/DH_size.3 stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DSA_new.3 stable/9/secure/lib/libcrypto/man/DSA_set_method.3 stable/9/secure/lib/libcrypto/man/DSA_sign.3 stable/9/secure/lib/libcrypto/man/DSA_size.3 stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 stable/9/secure/lib/libcrypto/man/ERR_error_string.3 stable/9/secure/lib/libcrypto/man/ERR_get_error.3 stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 stable/9/secure/lib/libcrypto/man/ERR_put_error.3 stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/9/secure/lib/libcrypto/man/PKCS12_create.3 stable/9/secure/lib/libcrypto/man/PKCS12_parse.3 stable/9/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_sign.3 stable/9/secure/lib/libcrypto/man/PKCS7_verify.3 stable/9/secure/lib/libcrypto/man/RAND_add.3 stable/9/secure/lib/libcrypto/man/RAND_bytes.3 stable/9/secure/lib/libcrypto/man/RAND_cleanup.3 stable/9/secure/lib/libcrypto/man/RAND_egd.3 stable/9/secure/lib/libcrypto/man/RAND_load_file.3 stable/9/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/9/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/9/secure/lib/libcrypto/man/RSA_check_key.3 stable/9/secure/lib/libcrypto/man/RSA_generate_key.3 stable/9/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/RSA_new.3 stable/9/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/9/secure/lib/libcrypto/man/RSA_print.3 stable/9/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_set_method.3 stable/9/secure/lib/libcrypto/man/RSA_sign.3 stable/9/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/9/secure/lib/libcrypto/man/RSA_size.3 stable/9/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/9/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/9/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/9/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/9/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/9/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/9/secure/lib/libcrypto/man/X509_new.3 stable/9/secure/lib/libcrypto/man/bio.3 stable/9/secure/lib/libcrypto/man/blowfish.3 stable/9/secure/lib/libcrypto/man/bn.3 stable/9/secure/lib/libcrypto/man/bn_internal.3 stable/9/secure/lib/libcrypto/man/buffer.3 stable/9/secure/lib/libcrypto/man/crypto.3 stable/9/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/9/secure/lib/libcrypto/man/d2i_DHparams.3 stable/9/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/9/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_X509.3 stable/9/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/9/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/9/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/9/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/9/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/9/secure/lib/libcrypto/man/des.3 stable/9/secure/lib/libcrypto/man/dh.3 stable/9/secure/lib/libcrypto/man/dsa.3 stable/9/secure/lib/libcrypto/man/ecdsa.3 stable/9/secure/lib/libcrypto/man/engine.3 stable/9/secure/lib/libcrypto/man/err.3 stable/9/secure/lib/libcrypto/man/evp.3 stable/9/secure/lib/libcrypto/man/hmac.3 stable/9/secure/lib/libcrypto/man/lh_stats.3 stable/9/secure/lib/libcrypto/man/lhash.3 stable/9/secure/lib/libcrypto/man/md5.3 stable/9/secure/lib/libcrypto/man/mdc2.3 stable/9/secure/lib/libcrypto/man/pem.3 stable/9/secure/lib/libcrypto/man/rand.3 stable/9/secure/lib/libcrypto/man/rc4.3 stable/9/secure/lib/libcrypto/man/ripemd.3 stable/9/secure/lib/libcrypto/man/rsa.3 stable/9/secure/lib/libcrypto/man/sha.3 stable/9/secure/lib/libcrypto/man/threads.3 stable/9/secure/lib/libcrypto/man/ui.3 stable/9/secure/lib/libcrypto/man/ui_compat.3 stable/9/secure/lib/libcrypto/man/x509.3 stable/9/secure/lib/libssl/Makefile.man stable/9/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/9/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/9/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/9/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_free.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/9/secure/lib/libssl/man/SSL_CTX_new.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/9/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/9/secure/lib/libssl/man/SSL_SESSION_free.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/9/secure/lib/libssl/man/SSL_accept.3 stable/9/secure/lib/libssl/man/SSL_alert_type_string.3 stable/9/secure/lib/libssl/man/SSL_clear.3 stable/9/secure/lib/libssl/man/SSL_connect.3 stable/9/secure/lib/libssl/man/SSL_do_handshake.3 stable/9/secure/lib/libssl/man/SSL_free.3 stable/9/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/9/secure/lib/libssl/man/SSL_get_ciphers.3 stable/9/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/9/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/9/secure/lib/libssl/man/SSL_get_error.3 stable/9/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/9/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_get_fd.3 stable/9/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/9/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/9/secure/lib/libssl/man/SSL_get_rbio.3 stable/9/secure/lib/libssl/man/SSL_get_session.3 stable/9/secure/lib/libssl/man/SSL_get_verify_result.3 stable/9/secure/lib/libssl/man/SSL_get_version.3 stable/9/secure/lib/libssl/man/SSL_library_init.3 stable/9/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/9/secure/lib/libssl/man/SSL_new.3 stable/9/secure/lib/libssl/man/SSL_pending.3 stable/9/secure/lib/libssl/man/SSL_read.3 stable/9/secure/lib/libssl/man/SSL_rstate_string.3 stable/9/secure/lib/libssl/man/SSL_session_reused.3 stable/9/secure/lib/libssl/man/SSL_set_bio.3 stable/9/secure/lib/libssl/man/SSL_set_connect_state.3 stable/9/secure/lib/libssl/man/SSL_set_fd.3 stable/9/secure/lib/libssl/man/SSL_set_session.3 stable/9/secure/lib/libssl/man/SSL_set_shutdown.3 stable/9/secure/lib/libssl/man/SSL_set_verify_result.3 stable/9/secure/lib/libssl/man/SSL_shutdown.3 stable/9/secure/lib/libssl/man/SSL_state_string.3 stable/9/secure/lib/libssl/man/SSL_want.3 stable/9/secure/lib/libssl/man/SSL_write.3 stable/9/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/9/secure/lib/libssl/man/ssl.3 stable/9/secure/usr.bin/openssl/man/CA.pl.1 stable/9/secure/usr.bin/openssl/man/asn1parse.1 stable/9/secure/usr.bin/openssl/man/ca.1 stable/9/secure/usr.bin/openssl/man/ciphers.1 stable/9/secure/usr.bin/openssl/man/crl.1 stable/9/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/9/secure/usr.bin/openssl/man/dgst.1 stable/9/secure/usr.bin/openssl/man/dhparam.1 stable/9/secure/usr.bin/openssl/man/dsa.1 stable/9/secure/usr.bin/openssl/man/dsaparam.1 stable/9/secure/usr.bin/openssl/man/ec.1 stable/9/secure/usr.bin/openssl/man/ecparam.1 stable/9/secure/usr.bin/openssl/man/enc.1 stable/9/secure/usr.bin/openssl/man/errstr.1 stable/9/secure/usr.bin/openssl/man/gendsa.1 stable/9/secure/usr.bin/openssl/man/genrsa.1 stable/9/secure/usr.bin/openssl/man/nseq.1 stable/9/secure/usr.bin/openssl/man/ocsp.1 stable/9/secure/usr.bin/openssl/man/openssl.1 stable/9/secure/usr.bin/openssl/man/passwd.1 stable/9/secure/usr.bin/openssl/man/pkcs12.1 stable/9/secure/usr.bin/openssl/man/pkcs7.1 stable/9/secure/usr.bin/openssl/man/pkcs8.1 stable/9/secure/usr.bin/openssl/man/rand.1 stable/9/secure/usr.bin/openssl/man/req.1 stable/9/secure/usr.bin/openssl/man/rsa.1 stable/9/secure/usr.bin/openssl/man/rsautl.1 stable/9/secure/usr.bin/openssl/man/s_client.1 stable/9/secure/usr.bin/openssl/man/s_server.1 stable/9/secure/usr.bin/openssl/man/s_time.1 stable/9/secure/usr.bin/openssl/man/sess_id.1 stable/9/secure/usr.bin/openssl/man/smime.1 stable/9/secure/usr.bin/openssl/man/speed.1 stable/9/secure/usr.bin/openssl/man/spkac.1 stable/9/secure/usr.bin/openssl/man/verify.1 stable/9/secure/usr.bin/openssl/man/version.1 stable/9/secure/usr.bin/openssl/man/x509.1 stable/9/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/9/crypto/openssl/ (props changed) Changes in other areas also in this revision: Added: stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod - copied unchanged from r269672, vendor-crypto/openssl/dist-0.9.8/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod stable/8/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 (contents, props changed) Deleted: stable/8/crypto/openssl/crypto/pkcs7/bio_ber.c stable/8/crypto/openssl/crypto/pkcs7/dec.c stable/8/crypto/openssl/crypto/pkcs7/des.pem stable/8/crypto/openssl/crypto/pkcs7/doc stable/8/crypto/openssl/crypto/pkcs7/enc.c stable/8/crypto/openssl/crypto/pkcs7/es1.pem stable/8/crypto/openssl/crypto/pkcs7/example.c stable/8/crypto/openssl/crypto/pkcs7/example.h stable/8/crypto/openssl/crypto/pkcs7/info.pem stable/8/crypto/openssl/crypto/pkcs7/infokey.pem stable/8/crypto/openssl/crypto/pkcs7/p7/ stable/8/crypto/openssl/crypto/pkcs7/server.pem stable/8/crypto/openssl/crypto/pkcs7/sign.c stable/8/crypto/openssl/crypto/pkcs7/t/ stable/8/crypto/openssl/crypto/pkcs7/verify.c stable/8/crypto/openssl/demos/eay/ stable/8/crypto/openssl/demos/maurice/ Modified: stable/8/crypto/openssl/CHANGES stable/8/crypto/openssl/FAQ stable/8/crypto/openssl/Makefile stable/8/crypto/openssl/NEWS stable/8/crypto/openssl/README stable/8/crypto/openssl/apps/apps.c stable/8/crypto/openssl/apps/ca.c stable/8/crypto/openssl/apps/crl2p7.c stable/8/crypto/openssl/apps/ocsp.c stable/8/crypto/openssl/apps/s_server.c stable/8/crypto/openssl/apps/speed.c stable/8/crypto/openssl/crypto/asn1/a_object.c stable/8/crypto/openssl/crypto/asn1/asn1_lib.c stable/8/crypto/openssl/crypto/asn1/asn_mime.c stable/8/crypto/openssl/crypto/asn1/asn_pack.c stable/8/crypto/openssl/crypto/asn1/evp_asn1.c stable/8/crypto/openssl/crypto/asn1/t_x509.c stable/8/crypto/openssl/crypto/asn1/tasn_enc.c stable/8/crypto/openssl/crypto/bio/bio_lib.c stable/8/crypto/openssl/crypto/bn/bn_gf2m.c stable/8/crypto/openssl/crypto/bn/bn_lib.c stable/8/crypto/openssl/crypto/bn/bn_sqr.c stable/8/crypto/openssl/crypto/conf/conf_api.c stable/8/crypto/openssl/crypto/conf/conf_def.c stable/8/crypto/openssl/crypto/ec/ec_lib.c stable/8/crypto/openssl/crypto/ec/ecp_smpl.c stable/8/crypto/openssl/crypto/idea/ideatest.c stable/8/crypto/openssl/crypto/objects/obj_dat.c stable/8/crypto/openssl/crypto/ocsp/ocsp_ht.c stable/8/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/8/crypto/openssl/crypto/opensslv.h stable/8/crypto/openssl/crypto/pkcs7/Makefile stable/8/crypto/openssl/crypto/rsa/rsa_eay.c stable/8/crypto/openssl/crypto/ui/ui_lib.c stable/8/crypto/openssl/doc/apps/asn1parse.pod stable/8/crypto/openssl/doc/apps/ca.pod stable/8/crypto/openssl/doc/apps/crl.pod stable/8/crypto/openssl/doc/apps/dhparam.pod stable/8/crypto/openssl/doc/apps/dsa.pod stable/8/crypto/openssl/doc/apps/ecparam.pod stable/8/crypto/openssl/doc/apps/gendsa.pod stable/8/crypto/openssl/doc/apps/genrsa.pod stable/8/crypto/openssl/doc/apps/rsa.pod stable/8/crypto/openssl/doc/apps/s_client.pod stable/8/crypto/openssl/doc/apps/s_server.pod stable/8/crypto/openssl/doc/apps/verify.pod stable/8/crypto/openssl/doc/apps/x509.pod stable/8/crypto/openssl/doc/apps/x509v3_config.pod stable/8/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod stable/8/crypto/openssl/doc/crypto/BIO_f_base64.pod stable/8/crypto/openssl/doc/crypto/BIO_push.pod stable/8/crypto/openssl/doc/crypto/ERR_get_error.pod stable/8/crypto/openssl/doc/crypto/RSA_set_method.pod stable/8/crypto/openssl/doc/crypto/RSA_sign.pod stable/8/crypto/openssl/doc/crypto/des.pod stable/8/crypto/openssl/doc/crypto/err.pod stable/8/crypto/openssl/doc/crypto/pem.pod stable/8/crypto/openssl/doc/crypto/ui.pod stable/8/crypto/openssl/doc/fingerprints.txt stable/8/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_client_cert_cb.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod stable/8/crypto/openssl/doc/ssl/SSL_get_version.pod stable/8/crypto/openssl/doc/ssl/SSL_shutdown.pod stable/8/crypto/openssl/doc/ssl/d2i_SSL_SESSION.pod stable/8/crypto/openssl/openssl.spec stable/8/crypto/openssl/ssl/d1_both.c stable/8/crypto/openssl/ssl/d1_clnt.c stable/8/crypto/openssl/ssl/d1_srvr.c stable/8/crypto/openssl/ssl/s23_lib.c stable/8/crypto/openssl/ssl/s23_srvr.c stable/8/crypto/openssl/ssl/s3_clnt.c stable/8/crypto/openssl/ssl/s3_pkt.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/crypto/openssl/ssl/ssl_ciph.c stable/8/crypto/openssl/ssl/ssl_stat.c stable/8/crypto/openssl/ssl/t1_lib.c stable/8/crypto/openssl/util/mkerr.pl stable/8/secure/lib/libcrypto/Makefile stable/8/secure/lib/libcrypto/Makefile.inc stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/8/secure/lib/libcrypto/man/BIO_f_md.3 stable/8/secure/lib/libcrypto/man/BIO_f_null.3 stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/8/secure/lib/libcrypto/man/BIO_find_type.3 stable/8/secure/lib/libcrypto/man/BIO_new.3 stable/8/secure/lib/libcrypto/man/BIO_push.3 stable/8/secure/lib/libcrypto/man/BIO_read.3 stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 stable/8/secure/lib/libcrypto/man/BIO_s_file.3 stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 stable/8/secure/lib/libcrypto/man/BIO_s_null.3 stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 stable/8/secure/lib/libcrypto/man/BN_add.3 stable/8/secure/lib/libcrypto/man/BN_add_word.3 stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 stable/8/secure/lib/libcrypto/man/BN_cmp.3 stable/8/secure/lib/libcrypto/man/BN_copy.3 stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/8/secure/lib/libcrypto/man/BN_new.3 stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 stable/8/secure/lib/libcrypto/man/BN_rand.3 stable/8/secure/lib/libcrypto/man/BN_set_bit.3 stable/8/secure/lib/libcrypto/man/BN_swap.3 stable/8/secure/lib/libcrypto/man/BN_zero.3 stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/8/secure/lib/libcrypto/man/DH_generate_key.3 stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DH_new.3 stable/8/secure/lib/libcrypto/man/DH_set_method.3 stable/8/secure/lib/libcrypto/man/DH_size.3 stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DSA_new.3 stable/8/secure/lib/libcrypto/man/DSA_set_method.3 stable/8/secure/lib/libcrypto/man/DSA_sign.3 stable/8/secure/lib/libcrypto/man/DSA_size.3 stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 stable/8/secure/lib/libcrypto/man/ERR_error_string.3 stable/8/secure/lib/libcrypto/man/ERR_get_error.3 stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 stable/8/secure/lib/libcrypto/man/ERR_put_error.3 stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/8/secure/lib/libcrypto/man/PKCS12_create.3 stable/8/secure/lib/libcrypto/man/PKCS12_parse.3 stable/8/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_sign.3 stable/8/secure/lib/libcrypto/man/PKCS7_verify.3 stable/8/secure/lib/libcrypto/man/RAND_add.3 stable/8/secure/lib/libcrypto/man/RAND_bytes.3 stable/8/secure/lib/libcrypto/man/RAND_cleanup.3 stable/8/secure/lib/libcrypto/man/RAND_egd.3 stable/8/secure/lib/libcrypto/man/RAND_load_file.3 stable/8/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/8/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/8/secure/lib/libcrypto/man/RSA_check_key.3 stable/8/secure/lib/libcrypto/man/RSA_generate_key.3 stable/8/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/RSA_new.3 stable/8/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/8/secure/lib/libcrypto/man/RSA_print.3 stable/8/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_set_method.3 stable/8/secure/lib/libcrypto/man/RSA_sign.3 stable/8/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/8/secure/lib/libcrypto/man/RSA_size.3 stable/8/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/8/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/8/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/8/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/8/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/8/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/8/secure/lib/libcrypto/man/X509_new.3 stable/8/secure/lib/libcrypto/man/bio.3 stable/8/secure/lib/libcrypto/man/blowfish.3 stable/8/secure/lib/libcrypto/man/bn.3 stable/8/secure/lib/libcrypto/man/bn_internal.3 stable/8/secure/lib/libcrypto/man/buffer.3 stable/8/secure/lib/libcrypto/man/crypto.3 stable/8/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/8/secure/lib/libcrypto/man/d2i_DHparams.3 stable/8/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/8/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_X509.3 stable/8/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/8/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/8/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/8/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/8/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/8/secure/lib/libcrypto/man/des.3 stable/8/secure/lib/libcrypto/man/dh.3 stable/8/secure/lib/libcrypto/man/dsa.3 stable/8/secure/lib/libcrypto/man/ecdsa.3 stable/8/secure/lib/libcrypto/man/engine.3 stable/8/secure/lib/libcrypto/man/err.3 stable/8/secure/lib/libcrypto/man/evp.3 stable/8/secure/lib/libcrypto/man/hmac.3 stable/8/secure/lib/libcrypto/man/lh_stats.3 stable/8/secure/lib/libcrypto/man/lhash.3 stable/8/secure/lib/libcrypto/man/md5.3 stable/8/secure/lib/libcrypto/man/mdc2.3 stable/8/secure/lib/libcrypto/man/pem.3 stable/8/secure/lib/libcrypto/man/rand.3 stable/8/secure/lib/libcrypto/man/rc4.3 stable/8/secure/lib/libcrypto/man/ripemd.3 stable/8/secure/lib/libcrypto/man/rsa.3 stable/8/secure/lib/libcrypto/man/sha.3 stable/8/secure/lib/libcrypto/man/threads.3 stable/8/secure/lib/libcrypto/man/ui.3 stable/8/secure/lib/libcrypto/man/ui_compat.3 stable/8/secure/lib/libcrypto/man/x509.3 stable/8/secure/lib/libssl/Makefile.man stable/8/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/8/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/8/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/8/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_free.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/8/secure/lib/libssl/man/SSL_CTX_new.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/8/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/8/secure/lib/libssl/man/SSL_SESSION_free.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/8/secure/lib/libssl/man/SSL_accept.3 stable/8/secure/lib/libssl/man/SSL_alert_type_string.3 stable/8/secure/lib/libssl/man/SSL_clear.3 stable/8/secure/lib/libssl/man/SSL_connect.3 stable/8/secure/lib/libssl/man/SSL_do_handshake.3 stable/8/secure/lib/libssl/man/SSL_free.3 stable/8/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/8/secure/lib/libssl/man/SSL_get_ciphers.3 stable/8/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/8/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/8/secure/lib/libssl/man/SSL_get_error.3 stable/8/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/8/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_get_fd.3 stable/8/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/8/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/8/secure/lib/libssl/man/SSL_get_rbio.3 stable/8/secure/lib/libssl/man/SSL_get_session.3 stable/8/secure/lib/libssl/man/SSL_get_verify_result.3 stable/8/secure/lib/libssl/man/SSL_get_version.3 stable/8/secure/lib/libssl/man/SSL_library_init.3 stable/8/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/8/secure/lib/libssl/man/SSL_new.3 stable/8/secure/lib/libssl/man/SSL_pending.3 stable/8/secure/lib/libssl/man/SSL_read.3 stable/8/secure/lib/libssl/man/SSL_rstate_string.3 stable/8/secure/lib/libssl/man/SSL_session_reused.3 stable/8/secure/lib/libssl/man/SSL_set_bio.3 stable/8/secure/lib/libssl/man/SSL_set_connect_state.3 stable/8/secure/lib/libssl/man/SSL_set_fd.3 stable/8/secure/lib/libssl/man/SSL_set_session.3 stable/8/secure/lib/libssl/man/SSL_set_shutdown.3 stable/8/secure/lib/libssl/man/SSL_set_verify_result.3 stable/8/secure/lib/libssl/man/SSL_shutdown.3 stable/8/secure/lib/libssl/man/SSL_state_string.3 stable/8/secure/lib/libssl/man/SSL_want.3 stable/8/secure/lib/libssl/man/SSL_write.3 stable/8/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/8/secure/lib/libssl/man/ssl.3 stable/8/secure/usr.bin/openssl/man/CA.pl.1 stable/8/secure/usr.bin/openssl/man/asn1parse.1 stable/8/secure/usr.bin/openssl/man/ca.1 stable/8/secure/usr.bin/openssl/man/ciphers.1 stable/8/secure/usr.bin/openssl/man/crl.1 stable/8/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/8/secure/usr.bin/openssl/man/dgst.1 stable/8/secure/usr.bin/openssl/man/dhparam.1 stable/8/secure/usr.bin/openssl/man/dsa.1 stable/8/secure/usr.bin/openssl/man/dsaparam.1 stable/8/secure/usr.bin/openssl/man/ec.1 stable/8/secure/usr.bin/openssl/man/ecparam.1 stable/8/secure/usr.bin/openssl/man/enc.1 stable/8/secure/usr.bin/openssl/man/errstr.1 stable/8/secure/usr.bin/openssl/man/gendsa.1 stable/8/secure/usr.bin/openssl/man/genrsa.1 stable/8/secure/usr.bin/openssl/man/nseq.1 stable/8/secure/usr.bin/openssl/man/ocsp.1 stable/8/secure/usr.bin/openssl/man/openssl.1 stable/8/secure/usr.bin/openssl/man/passwd.1 stable/8/secure/usr.bin/openssl/man/pkcs12.1 stable/8/secure/usr.bin/openssl/man/pkcs7.1 stable/8/secure/usr.bin/openssl/man/pkcs8.1 stable/8/secure/usr.bin/openssl/man/rand.1 stable/8/secure/usr.bin/openssl/man/req.1 stable/8/secure/usr.bin/openssl/man/rsa.1 stable/8/secure/usr.bin/openssl/man/rsautl.1 stable/8/secure/usr.bin/openssl/man/s_client.1 stable/8/secure/usr.bin/openssl/man/s_server.1 stable/8/secure/usr.bin/openssl/man/s_time.1 stable/8/secure/usr.bin/openssl/man/sess_id.1 stable/8/secure/usr.bin/openssl/man/smime.1 stable/8/secure/usr.bin/openssl/man/speed.1 stable/8/secure/usr.bin/openssl/man/spkac.1 stable/8/secure/usr.bin/openssl/man/verify.1 stable/8/secure/usr.bin/openssl/man/version.1 stable/8/secure/usr.bin/openssl/man/x509.1 stable/8/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/8/crypto/openssl/ (props changed) Modified: stable/9/crypto/openssl/CHANGES ============================================================================== --- stable/9/crypto/openssl/CHANGES Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/CHANGES Thu Aug 7 21:06:34 2014 (r269687) @@ -2,6 +2,53 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8za and 0.9.8zb [6 Aug 2014] + + *) OpenSSL DTLS clients enabling anonymous (EC)DH ciphersuites are subject + to a denial of service attack. A malicious server can crash the client + with a null pointer dereference (read) by specifying an anonymous (EC)DH + ciphersuite and sending carefully crafted handshake messages. + + Thanks to Felix Gröbert (Google) for discovering and researching this + issue. + (CVE-2014-3510) + [Emilia Käsper] + + *) By sending carefully crafted DTLS packets an attacker could cause openssl + to leak memory. This can be exploited through a Denial of Service attack. + Thanks to Adam Langley for discovering and researching this issue. + (CVE-2014-3507) + [Adam Langley] + + *) An attacker can force openssl to consume large amounts of memory whilst + processing DTLS handshake messages. This can be exploited through a + Denial of Service attack. + Thanks to Adam Langley for discovering and researching this issue. + (CVE-2014-3506) + [Adam Langley] + + *) An attacker can force an error condition which causes openssl to crash + whilst processing DTLS packets due to memory being freed twice. This + can be exploited through a Denial of Service attack. + Thanks to Adam Langley and Wan-Teh Chang for discovering and researching + this issue. + (CVE-2014-3505) + [Adam Langley] + + *) A flaw in OBJ_obj2txt may cause pretty printing functions such as + X509_name_oneline, X509_name_print_ex et al. to leak some information + from the stack. Applications may be affected if they echo pretty printing + output to the attacker. + + Thanks to Ivan Fratric (Google) for discovering this issue. + (CVE-2014-3508) + [Emilia Käsper, and Steve Henson] + + *) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.) + for corner cases. (Certain input points at infinity could lead to + bogus results, with non-infinity inputs mapped to infinity too.) + [Bodo Moeller] + Changes between 0.9.8y and 0.9.8za [5 Jun 2014] *) Fix for SSL/TLS MITM flaw. An attacker using a carefully crafted Modified: stable/9/crypto/openssl/FAQ ============================================================================== --- stable/9/crypto/openssl/FAQ Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/FAQ Thu Aug 7 21:06:34 2014 (r269687) @@ -113,11 +113,6 @@ that came with the version of OpenSSL yo documentation is included in each OpenSSL distribution under the docs directory. -For information on parts of libcrypto that are not yet documented, you -might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's -predecessor, at . Much -of this still applies to OpenSSL. - There is some documentation about certificate extensions and PKCS#12 in doc/openssl.txt Modified: stable/9/crypto/openssl/Makefile ============================================================================== --- stable/9/crypto/openssl/Makefile Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/Makefile Thu Aug 7 21:06:34 2014 (r269687) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8za +VERSION=0.9.8zb MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: stable/9/crypto/openssl/NEWS ============================================================================== --- stable/9/crypto/openssl/NEWS Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/NEWS Thu Aug 7 21:06:34 2014 (r269687) @@ -5,6 +5,22 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8za and OpenSSL 0.9.8zb [6 Aug 2014]: + + o Fix for CVE-2014-3510 + o Fix for CVE-2014-3507 + o Fix for CVE-2014-3506 + o Fix for CVE-2014-3505 + o Fix for CVE-2014-3508 + + Known issues in OpenSSL 0.9.8za: + + o Compilation failure of s3_pkt.c on some platforms due to missing + include. Fixed in 0.9.8zb-dev. + o FIPS capable link failure with missing symbol BN_consttime_swap. + Fixed in 0.9.8zb-dev. Workaround is to compile with no-ec: the EC + algorithms are not FIPS approved in OpenSSL 0.9.8 anyway. + Major changes between OpenSSL 0.9.8y and OpenSSL 0.9.8za [5 Jun 2014]: o Fix for CVE-2014-0224 Modified: stable/9/crypto/openssl/README ============================================================================== --- stable/9/crypto/openssl/README Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/README Thu Aug 7 21:06:34 2014 (r269687) @@ -1,5 +1,5 @@ - OpenSSL 0.9.8za 5 Jun 2014 + OpenSSL 0.9.8zb 6 Aug 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/9/crypto/openssl/apps/apps.c ============================================================================== --- stable/9/crypto/openssl/apps/apps.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/apps.c Thu Aug 7 21:06:34 2014 (r269687) @@ -362,6 +362,8 @@ int chopup_args(ARGS *arg, char *buf, in { arg->count=20; arg->data=(char **)OPENSSL_malloc(sizeof(char *)*arg->count); + if (arg->data == NULL) + return 0; } for (i=0; icount; i++) arg->data[i]=NULL; @@ -1429,6 +1431,8 @@ char *make_config_name() len=strlen(t)+strlen(OPENSSL_CONF)+2; p=OPENSSL_malloc(len); + if (p == NULL) + return NULL; BUF_strlcpy(p,t,len); #ifndef OPENSSL_SYS_VMS BUF_strlcat(p,"/",len); Modified: stable/9/crypto/openssl/apps/ca.c ============================================================================== --- stable/9/crypto/openssl/apps/ca.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/ca.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1582,12 +1582,14 @@ static int certify(X509 **xret, char *in { ok=0; BIO_printf(bio_err,"Signature verification problems....\n"); + ERR_print_errors(bio_err); goto err; } if (i == 0) { ok=0; BIO_printf(bio_err,"Signature did not match the certificate request\n"); + ERR_print_errors(bio_err); goto err; } else @@ -2751,6 +2753,9 @@ char *make_revocation_str(int rev_type, revtm = X509_gmtime_adj(NULL, 0); + if (!revtm) + return NULL; + i = revtm->length + 1; if (reason) i += strlen(reason) + 1; Modified: stable/9/crypto/openssl/apps/crl2p7.c ============================================================================== --- stable/9/crypto/openssl/apps/crl2p7.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/crl2p7.c Thu Aug 7 21:06:34 2014 (r269687) @@ -142,7 +142,13 @@ int MAIN(int argc, char **argv) { if (--argc < 1) goto bad; if(!certflst) certflst = sk_new_null(); - sk_push(certflst,*(++argv)); + if (!certflst) + goto end; + if (!sk_push(certflst,*(++argv))) + { + sk_free(certflst); + goto end; + } } else { Modified: stable/9/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/9/crypto/openssl/apps/ocsp.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/ocsp.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1344,7 +1344,7 @@ OCSP_RESPONSE *process_responder(BIO *er } resp = query_responder(err, cbio, path, req, req_timeout); if (!resp) - BIO_printf(bio_err, "Error querying OCSP responsder\n"); + BIO_printf(bio_err, "Error querying OCSP responder\n"); end: if (ctx) SSL_CTX_free(ctx); Modified: stable/9/crypto/openssl/apps/s_server.c ============================================================================== --- stable/9/crypto/openssl/apps/s_server.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/s_server.c Thu Aug 7 21:06:34 2014 (r269687) @@ -583,7 +583,7 @@ static int MS_CALLBACK ssl_servername_cb if (servername) { - if (strcmp(servername,p->servername)) + if (strcasecmp(servername,p->servername)) return p->extension_error; if (ctx2) { @@ -1095,6 +1095,14 @@ bad: sv_usage(); goto end; } +#ifndef OPENSSL_NO_DTLS1 + if (www && socket_type == SOCK_DGRAM) + { + BIO_printf(bio_err, + "Can't use -HTTP, -www or -WWW with DTLS\n"); + goto end; + } +#endif SSL_load_error_strings(); OpenSSL_add_ssl_algorithms(); @@ -1922,8 +1930,10 @@ again: #ifdef CHARSET_EBCDIC ascii2ebcdic(buf,buf,i); #endif - write(fileno(stdout),buf, - (unsigned int)i); + if (write(fileno(stdout),buf, + (unsigned int)i) != i) + goto err; + if (SSL_pending(con)) goto again; break; case SSL_ERROR_WANT_WRITE: Modified: stable/9/crypto/openssl/apps/speed.c ============================================================================== --- stable/9/crypto/openssl/apps/speed.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/speed.c Thu Aug 7 21:06:34 2014 (r269687) @@ -2767,7 +2767,11 @@ static int do_multi(int multi) fds=malloc(multi*sizeof *fds); for(n=0 ; n < multi ; ++n) { - pipe(fd); + if (pipe(fd) == -1) + { + fprintf(stderr, "pipe failure\n"); + exit(1); + } fflush(stdout); fflush(stderr); if(fork()) @@ -2779,7 +2783,11 @@ static int do_multi(int multi) { close(fd[0]); close(1); - dup(fd[1]); + if (dup(fd[1]) == -1) + { + fprintf(stderr, "dup failed\n"); + exit(1); + } close(fd[1]); mr=1; usertime=0; Modified: stable/9/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/a_object.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/a_object.c Thu Aug 7 21:06:34 2014 (r269687) @@ -285,16 +285,28 @@ err: ASN1_OBJECT_free(ret); return(NULL); } + ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) { ASN1_OBJECT *ret=NULL; const unsigned char *p; - int i; - /* Sanity check OID encoding: can't have leading 0x80 in - * subidentifiers, see: X.690 8.19.2 + int i, length; + + /* Sanity check OID encoding. + * Need at least one content octet. + * MSB must be clear in the last octet. + * can't have leading 0x80 in subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp; i < len; i++, p++) + if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || + p[len - 1] & 0x80) + { + ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); + return NULL; + } + /* Now 0 < len <= INT_MAX, so the cast is safe. */ + length = (int)len; + for (i = 0; i < length; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { @@ -313,20 +325,20 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT else ret=(*a); p= *pp; - if ((ret->data == NULL) || (ret->length < len)) + if ((ret->data == NULL) || (ret->length < length)) { if (ret->data != NULL) OPENSSL_free(ret->data); - ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1); + ret->data=(unsigned char *)OPENSSL_malloc(length); ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; if (ret->data == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } } - memcpy(ret->data,p,(int)len); - ret->length=(int)len; + memcpy(ret->data,p,length); + ret->length=length; ret->sn=NULL; ret->ln=NULL; /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */ - p+=len; + p+=length; if (a != NULL) (*a)=ret; *pp=p; Modified: stable/9/crypto/openssl/crypto/asn1/asn1_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/asn1_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/asn1_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -131,6 +131,9 @@ int ASN1_get_object(const unsigned char *pclass=xclass; if (!asn1_get_length(&p,&inf,plength,(int)max)) goto err; + if (inf && !(ret & V_ASN1_CONSTRUCTED)) + goto err; + #if 0 fprintf(stderr,"p=%d + *plength=%ld > omax=%ld + *pp=%d (%d > %d)\n", (int)p,*plength,omax,(int)*pp,(int)(p+ *plength), Modified: stable/9/crypto/openssl/crypto/asn1/asn_mime.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/asn_mime.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/asn_mime.c Thu Aug 7 21:06:34 2014 (r269687) @@ -595,6 +595,8 @@ static STACK_OF(MIME_HEADER) *mime_parse int len, state, save_state = 0; headers = sk_MIME_HEADER_new(mime_hdr_cmp); + if (!headers) + return NULL; while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { /* If whitespace at line start then continuation line */ if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME; Modified: stable/9/crypto/openssl/crypto/asn1/asn_pack.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/asn_pack.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/asn_pack.c Thu Aug 7 21:06:34 2014 (r269687) @@ -134,15 +134,23 @@ ASN1_STRING *ASN1_pack_string(void *obj, if (!(octmp->length = i2d(obj, NULL))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR); - return NULL; + goto err; } if (!(p = OPENSSL_malloc (octmp->length))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } octmp->data = p; i2d (obj, &p); return octmp; + err: + if (!oct || !*oct) + { + ASN1_STRING_free(octmp); + if (oct) + *oct = NULL; + } + return NULL; } #endif Modified: stable/9/crypto/openssl/crypto/asn1/evp_asn1.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/evp_asn1.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/evp_asn1.c Thu Aug 7 21:06:34 2014 (r269687) @@ -66,7 +66,11 @@ int ASN1_TYPE_set_octetstring(ASN1_TYPE ASN1_STRING *os; if ((os=M_ASN1_OCTET_STRING_new()) == NULL) return(0); - if (!M_ASN1_OCTET_STRING_set(os,data,len)) return(0); + if (!M_ASN1_OCTET_STRING_set(os,data,len)) + { + M_ASN1_OCTET_STRING_free(os); + return 0; + } ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,os); return(1); } Modified: stable/9/crypto/openssl/crypto/asn1/t_x509.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/t_x509.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/t_x509.c Thu Aug 7 21:06:34 2014 (r269687) @@ -465,6 +465,8 @@ int X509_NAME_print(BIO *bp, X509_NAME * l=80-2-obase; b=X509_NAME_oneline(name,NULL,0); + if (!b) + return 0; if (!*b) { OPENSSL_free(b); Modified: stable/9/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/tasn_enc.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/tasn_enc.c Thu Aug 7 21:06:34 2014 (r269687) @@ -453,9 +453,14 @@ static int asn1_set_seq_out(STACK_OF(ASN { derlst = OPENSSL_malloc(sk_ASN1_VALUE_num(sk) * sizeof(*derlst)); + if (!derlst) + return 0; tmpdat = OPENSSL_malloc(skcontlen); - if (!derlst || !tmpdat) + if (!tmpdat) + { + OPENSSL_free(derlst); return 0; + } } } /* If not sorting just output each item */ Modified: stable/9/crypto/openssl/crypto/bio/bio_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/bio/bio_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/bio/bio_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -132,8 +132,8 @@ int BIO_free(BIO *a) CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data); - if ((a->method == NULL) || (a->method->destroy == NULL)) return(1); - a->method->destroy(a); + if ((a->method != NULL) && (a->method->destroy != NULL)) + a->method->destroy(a); OPENSSL_free(a); return(1); } Modified: stable/9/crypto/openssl/crypto/bn/bn_gf2m.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_gf2m.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/bn/bn_gf2m.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1095,3 +1095,54 @@ int BN_GF2m_arr2poly(const unsigned int return 1; } +/* + * Constant-time conditional swap of a and b. + * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. + * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, + * and that no more than nwords are used by either a or b. + * a and b cannot be the same number + */ +void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) + { + BN_ULONG t; + int i; + + bn_wcheck_size(a, nwords); + bn_wcheck_size(b, nwords); + + assert(a != b); + assert((condition & (condition - 1)) == 0); + assert(sizeof(BN_ULONG) >= sizeof(int)); + + condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; + + t = (a->top^b->top) & condition; + a->top ^= t; + b->top ^= t; + +#define BN_CONSTTIME_SWAP(ind) \ + do { \ + t = (a->d[ind] ^ b->d[ind]) & condition; \ + a->d[ind] ^= t; \ + b->d[ind] ^= t; \ + } while (0) + + + switch (nwords) { + default: + for (i = 10; i < nwords; i++) + BN_CONSTTIME_SWAP(i); + /* Fallthrough */ + case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ + case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ + case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ + case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ + case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ + case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ + case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ + case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ + case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ + case 1: BN_CONSTTIME_SWAP(0); + } +#undef BN_CONSTTIME_SWAP +} Modified: stable/9/crypto/openssl/crypto/bn/bn_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/bn/bn_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -320,6 +320,15 @@ static BN_ULONG *bn_expand_internal(cons BNerr(BN_F_BN_EXPAND_INTERNAL,ERR_R_MALLOC_FAILURE); return(NULL); } +#ifdef PURIFY + /* Valgrind complains in BN_consttime_swap because we process the whole + * array even if it's not initialised yet. This doesn't matter in that + * function - what's important is constant time operation (we're not + * actually going to use the data) + */ + memset(a, 0, sizeof(BN_ULONG)*words); +#endif + #if 1 B=b->d; /* Check if the previous number needs to be copied */ @@ -824,55 +833,3 @@ int bn_cmp_part_words(const BN_ULONG *a, } return bn_cmp_words(a,b,cl); } - -/* - * Constant-time conditional swap of a and b. - * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. - * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, - * and that no more than nwords are used by either a or b. - * a and b cannot be the same number - */ -void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) - { - BN_ULONG t; - int i; - - bn_wcheck_size(a, nwords); - bn_wcheck_size(b, nwords); - - assert(a != b); - assert((condition & (condition - 1)) == 0); - assert(sizeof(BN_ULONG) >= sizeof(int)); - - condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; - - t = (a->top^b->top) & condition; - a->top ^= t; - b->top ^= t; - -#define BN_CONSTTIME_SWAP(ind) \ - do { \ - t = (a->d[ind] ^ b->d[ind]) & condition; \ - a->d[ind] ^= t; \ - b->d[ind] ^= t; \ - } while (0) - - - switch (nwords) { - default: - for (i = 10; i < nwords; i++) - BN_CONSTTIME_SWAP(i); - /* Fallthrough */ - case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ - case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ - case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ - case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ - case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ - case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ - case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ - case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ - case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ - case 1: BN_CONSTTIME_SWAP(0); - } -#undef BN_CONSTTIME_SWAP -} Modified: stable/9/crypto/openssl/crypto/bn/bn_sqr.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_sqr.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/bn/bn_sqr.c Thu Aug 7 21:06:34 2014 (r269687) @@ -77,6 +77,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, B if (al <= 0) { r->top=0; + r->neg = 0; return 1; } Modified: stable/9/crypto/openssl/crypto/conf/conf_api.c ============================================================================== --- stable/9/crypto/openssl/crypto/conf/conf_api.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/conf/conf_api.c Thu Aug 7 21:06:34 2014 (r269687) @@ -294,7 +294,7 @@ CONF_VALUE *_CONF_new_section(CONF *conf v->value=(char *)sk; vv=(CONF_VALUE *)lh_insert(conf->data,v); - assert(vv == NULL); + OPENSSL_assert(vv == NULL); ok=1; err: if (!ok) Modified: stable/9/crypto/openssl/crypto/conf/conf_def.c ============================================================================== --- stable/9/crypto/openssl/crypto/conf/conf_def.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/conf/conf_def.c Thu Aug 7 21:06:34 2014 (r269687) @@ -324,7 +324,7 @@ again: p=eat_ws(conf, end); if (*p != ']') { - if (*p != '\0') + if (*p != '\0' && ss != p) { ss=p; goto again; Modified: stable/9/crypto/openssl/crypto/ec/ec_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/ec/ec_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ec/ec_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1010,7 +1010,7 @@ int EC_POINT_dbl(const EC_GROUP *group, int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx) { - if (group->meth->dbl == 0) + if (group->meth->invert == 0) { ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; Modified: stable/9/crypto/openssl/crypto/ec/ecp_smpl.c ============================================================================== --- stable/9/crypto/openssl/crypto/ec/ecp_smpl.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ec/ecp_smpl.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1540,9 +1540,8 @@ int ec_GFp_simple_make_affine(const EC_G int ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx) { BN_CTX *new_ctx = NULL; - BIGNUM *tmp0, *tmp1; - size_t pow2 = 0; - BIGNUM **heap = NULL; + BIGNUM *tmp, *tmp_Z; + BIGNUM **prod_Z = NULL; size_t i; int ret = 0; @@ -1557,124 +1556,104 @@ int ec_GFp_simple_points_make_affine(con } BN_CTX_start(ctx); - tmp0 = BN_CTX_get(ctx); - tmp1 = BN_CTX_get(ctx); - if (tmp0 == NULL || tmp1 == NULL) goto err; - - /* Before converting the individual points, compute inverses of all Z values. - * Modular inversion is rather slow, but luckily we can do with a single - * explicit inversion, plus about 3 multiplications per input value. - */ - - pow2 = 1; - while (num > pow2) - pow2 <<= 1; - /* Now pow2 is the smallest power of 2 satifsying pow2 >= num. - * We need twice that. */ - pow2 <<= 1; - - heap = OPENSSL_malloc(pow2 * sizeof heap[0]); - if (heap == NULL) goto err; - - /* The array is used as a binary tree, exactly as in heapsort: - * - * heap[1] - * heap[2] heap[3] - * heap[4] heap[5] heap[6] heap[7] - * heap[8]heap[9] heap[10]heap[11] heap[12]heap[13] heap[14] heap[15] - * - * We put the Z's in the last line; - * then we set each other node to the product of its two child-nodes (where - * empty or 0 entries are treated as ones); - * then we invert heap[1]; - * then we invert each other node by replacing it by the product of its - * parent (after inversion) and its sibling (before inversion). - */ - heap[0] = NULL; - for (i = pow2/2 - 1; i > 0; i--) - heap[i] = NULL; + tmp = BN_CTX_get(ctx); + tmp_Z = BN_CTX_get(ctx); + if (tmp == NULL || tmp_Z == NULL) goto err; + + prod_Z = OPENSSL_malloc(num * sizeof prod_Z[0]); + if (prod_Z == NULL) goto err; for (i = 0; i < num; i++) - heap[pow2/2 + i] = &points[i]->Z; - for (i = pow2/2 + num; i < pow2; i++) - heap[i] = NULL; - - /* set each node to the product of its children */ - for (i = pow2/2 - 1; i > 0; i--) - { - heap[i] = BN_new(); - if (heap[i] == NULL) goto err; - - if (heap[2*i] != NULL) + { + prod_Z[i] = BN_new(); + if (prod_Z[i] == NULL) goto err; + } + + /* Set each prod_Z[i] to the product of points[0]->Z .. points[i]->Z, + * skipping any zero-valued inputs (pretend that they're 1). */ + + if (!BN_is_zero(&points[0]->Z)) + { + if (!BN_copy(prod_Z[0], &points[0]->Z)) goto err; + } + else + { + if (group->meth->field_set_to_one != 0) { - if ((heap[2*i + 1] == NULL) || BN_is_zero(heap[2*i + 1])) - { - if (!BN_copy(heap[i], heap[2*i])) goto err; - } - else - { - if (BN_is_zero(heap[2*i])) - { - if (!BN_copy(heap[i], heap[2*i + 1])) goto err; - } - else - { - if (!group->meth->field_mul(group, heap[i], - heap[2*i], heap[2*i + 1], ctx)) goto err; - } - } + if (!group->meth->field_set_to_one(group, prod_Z[0], ctx)) goto err; + } + else + { + if (!BN_one(prod_Z[0])) goto err; } } - /* invert heap[1] */ - if (!BN_is_zero(heap[1])) + for (i = 1; i < num; i++) { - if (!BN_mod_inverse(heap[1], heap[1], &group->field, ctx)) + if (!BN_is_zero(&points[i]->Z)) { - ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); - goto err; + if (!group->meth->field_mul(group, prod_Z[i], prod_Z[i - 1], &points[i]->Z, ctx)) goto err; } + else + { + if (!BN_copy(prod_Z[i], prod_Z[i - 1])) goto err; + } + } + + /* Now use a single explicit inversion to replace every + * non-zero points[i]->Z by its inverse. */ + + if (!BN_mod_inverse(tmp, prod_Z[num - 1], &group->field, ctx)) + { + ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); + goto err; } if (group->meth->field_encode != 0) { - /* in the Montgomery case, we just turned R*H (representing H) + /* In the Montgomery case, we just turned R*H (representing H) * into 1/(R*H), but we need R*(1/H) (representing 1/H); - * i.e. we have need to multiply by the Montgomery factor twice */ - if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err; - if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err; + * i.e. we need to multiply by the Montgomery factor twice. */ + if (!group->meth->field_encode(group, tmp, tmp, ctx)) goto err; + if (!group->meth->field_encode(group, tmp, tmp, ctx)) goto err; } - /* set other heap[i]'s to their inverses */ - for (i = 2; i < pow2/2 + num; i += 2) + for (i = num - 1; i > 0; --i) { - /* i is even */ - if ((heap[i + 1] != NULL) && !BN_is_zero(heap[i + 1])) - { - if (!group->meth->field_mul(group, tmp0, heap[i/2], heap[i + 1], ctx)) goto err; - if (!group->meth->field_mul(group, tmp1, heap[i/2], heap[i], ctx)) goto err; - if (!BN_copy(heap[i], tmp0)) goto err; - if (!BN_copy(heap[i + 1], tmp1)) goto err; - } - else + /* Loop invariant: tmp is the product of the inverses of + * points[0]->Z .. points[i]->Z (zero-valued inputs skipped). */ + if (!BN_is_zero(&points[i]->Z)) { - if (!BN_copy(heap[i], heap[i/2])) goto err; + /* Set tmp_Z to the inverse of points[i]->Z (as product + * of Z inverses 0 .. i, Z values 0 .. i - 1). */ + if (!group->meth->field_mul(group, tmp_Z, prod_Z[i - 1], tmp, ctx)) goto err; + /* Update tmp to satisfy the loop invariant for i - 1. */ + if (!group->meth->field_mul(group, tmp, tmp, &points[i]->Z, ctx)) goto err; + /* Replace points[i]->Z by its inverse. */ + if (!BN_copy(&points[i]->Z, tmp_Z)) goto err; } } - /* we have replaced all non-zero Z's by their inverses, now fix up all the points */ + if (!BN_is_zero(&points[0]->Z)) + { + /* Replace points[0]->Z by its inverse. */ + if (!BN_copy(&points[0]->Z, tmp)) goto err; + } + + /* Finally, fix up the X and Y coordinates for all points. */ + for (i = 0; i < num; i++) { EC_POINT *p = points[i]; - + if (!BN_is_zero(&p->Z)) { /* turn (X, Y, 1/Z) into (X/Z^2, Y/Z^3, 1) */ - if (!group->meth->field_sqr(group, tmp1, &p->Z, ctx)) goto err; - if (!group->meth->field_mul(group, &p->X, &p->X, tmp1, ctx)) goto err; + if (!group->meth->field_sqr(group, tmp, &p->Z, ctx)) goto err; + if (!group->meth->field_mul(group, &p->X, &p->X, tmp, ctx)) goto err; + + if (!group->meth->field_mul(group, tmp, tmp, &p->Z, ctx)) goto err; + if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp, ctx)) goto err; - if (!group->meth->field_mul(group, tmp1, tmp1, &p->Z, ctx)) goto err; - if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp1, ctx)) goto err; - if (group->meth->field_set_to_one != 0) { if (!group->meth->field_set_to_one(group, &p->Z, ctx)) goto err; @@ -1688,20 +1667,19 @@ int ec_GFp_simple_points_make_affine(con } ret = 1; - + err: BN_CTX_end(ctx); if (new_ctx != NULL) BN_CTX_free(new_ctx); - if (heap != NULL) + if (prod_Z != NULL) { - /* heap[pow2/2] .. heap[pow2-1] have not been allocated locally! */ - for (i = pow2/2 - 1; i > 0; i--) + for (i = 0; i < num; i++) { - if (heap[i] != NULL) - BN_clear_free(heap[i]); + if (prod_Z[i] != NULL) + BN_clear_free(prod_Z[i]); } - OPENSSL_free(heap); + OPENSSL_free(prod_Z); } return ret; } Modified: stable/9/crypto/openssl/crypto/idea/ideatest.c ============================================================================== --- stable/9/crypto/openssl/crypto/idea/ideatest.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/idea/ideatest.c Thu Aug 7 21:06:34 2014 (r269687) @@ -199,10 +199,10 @@ static int cfb64_test(unsigned char *cfb } memcpy(cfb_tmp,cfb_iv,8); n=0; - idea_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)17,&eks, + idea_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)13,&eks, cfb_tmp,&n,IDEA_DECRYPT); - idea_cfb64_encrypt(&(cfb_buf1[17]),&(cfb_buf2[17]), - (long)CFB_TEST_SIZE-17,&dks, + idea_cfb64_encrypt(&(cfb_buf1[13]),&(cfb_buf2[13]), + (long)CFB_TEST_SIZE-13,&eks, cfb_tmp,&n,IDEA_DECRYPT); if (memcmp(plain,cfb_buf2,CFB_TEST_SIZE) != 0) { Modified: stable/9/crypto/openssl/crypto/objects/obj_dat.c ============================================================================== --- stable/9/crypto/openssl/crypto/objects/obj_dat.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/objects/obj_dat.c Thu Aug 7 21:06:34 2014 (r269687) @@ -444,11 +444,12 @@ int OBJ_obj2txt(char *buf, int buf_len, unsigned char *p; char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; - if ((a == NULL) || (a->data == NULL)) { - buf[0]='\0'; - return(0); - } + /* Ensure that, at every state, |buf| is NUL-terminated. */ + if (buf && buf_len > 0) + buf[0] = '\0'; + if ((a == NULL) || (a->data == NULL)) + return(0); if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) { @@ -527,9 +528,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i=(int)(l/40); l-=(long)(i*40); } - if (buf && (buf_len > 0)) + if (buf && (buf_len > 1)) { *buf++ = i + '0'; + *buf = '\0'; buf_len--; } n++; @@ -544,9 +546,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i = strlen(bndec); if (buf) { - if (buf_len > 0) + if (buf_len > 1) { *buf++ = '.'; + *buf = '\0'; buf_len--; } BUF_strlcpy(buf,bndec,buf_len); @@ -786,4 +789,3 @@ err: OPENSSL_free(buf); return(ok); } - Modified: stable/9/crypto/openssl/crypto/ocsp/ocsp_ht.c ============================================================================== --- stable/9/crypto/openssl/crypto/ocsp/ocsp_ht.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ocsp/ocsp_ht.c Thu Aug 7 21:06:34 2014 (r269687) @@ -464,6 +464,9 @@ OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, ctx = OCSP_sendreq_new(b, path, req, -1); + if (!ctx) + return NULL; + do { rv = OCSP_sendreq_nbio(&resp, ctx); Modified: stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -220,8 +220,19 @@ int OCSP_parse_url(char *url, char **pho if (!*ppath) goto mem_err; + p = host; + if(host[0] == '[') + { + /* ipv6 literal */ + host++; + p = strchr(host, ']'); + if(!p) goto parse_err; + *p = '\0'; + p++; + } + /* Look for optional ':' for port number */ - if ((p = strchr(host, ':'))) + if ((p = strchr(p, ':'))) { *p = 0; port = p + 1; Modified: stable/9/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/9/crypto/openssl/crypto/opensslv.h Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/opensslv.h Thu Aug 7 21:06:34 2014 (r269687) @@ -25,11 +25,11 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x009081afL +#define OPENSSL_VERSION_NUMBER 0x009081bfL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8za-fips 5 Jun 2014" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8zb-fips 6 Aug 2014" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8za-freebsd 5 Jun 2014" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8zb-freebsd 6 Aug 2014" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: stable/9/crypto/openssl/crypto/pkcs7/Makefile ============================================================================== --- stable/9/crypto/openssl/crypto/pkcs7/Makefile Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/pkcs7/Makefile Thu Aug 7 21:06:34 2014 (r269687) @@ -39,20 +39,6 @@ test: all: lib -testapps: enc dec sign verify - -enc: enc.o lib - $(CC) $(CFLAGS) -o enc enc.o $(PEX_LIBS) $(LIB) $(EX_LIBS) - -dec: dec.o lib - $(CC) $(CFLAGS) -o dec dec.o $(PEX_LIBS) $(LIB) $(EX_LIBS) - -sign: sign.o lib - $(CC) $(CFLAGS) -o sign sign.o $(PEX_LIBS) $(LIB) $(EX_LIBS) - -verify: verify.o example.o lib - $(CC) $(CFLAGS) -o verify verify.o $(PEX_LIBS) example.o $(LIB) $(EX_LIBS) - lib: $(LIBOBJ) $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. Modified: stable/9/crypto/openssl/crypto/rsa/rsa_eay.c ============================================================================== --- stable/9/crypto/openssl/crypto/rsa/rsa_eay.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/rsa/rsa_eay.c Thu Aug 7 21:06:34 2014 (r269687) @@ -457,7 +457,7 @@ static int RSA_eay_private_encrypt(int f if (padding == RSA_X931_PADDING) { BN_sub(f, rsa->n, ret); - if (BN_cmp(ret, f)) + if (BN_cmp(ret, f) > 0) res = f; else res = ret; Modified: stable/9/crypto/openssl/crypto/ui/ui_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/ui/ui_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ui/ui_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -897,9 +897,9 @@ int UI_set_result(UI *ui, UI_STRING *uis break; } } + } default: break; } - } return 0; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Fri Aug 8 14:53:00 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D4FB3BB for ; Fri, 8 Aug 2014 14:53:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E25842D3C for ; Fri, 8 Aug 2014 14:52:59 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 23fd by svn.freebsd.org (DragonFly Mail Agent v0.9+); Fri, 08 Aug 2014 14:52:59 +0000 From: Mark Johnston Date: Fri, 8 Aug 2014 14:52:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269719 - stable/9/lib/librtld_db X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e4e44b.23fd.793bc297@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 14:53:00 -0000 Author: markj Date: Fri Aug 8 14:52:59 2014 New Revision: 269719 URL: http://svnweb.freebsd.org/changeset/base/269719 Log: MFC r265629, r265630 MFC r265629: Handle the different event types properly in rd_event_addr(). In particular, with r265456 _r_debug_postinit can be used for RD_POSTINIT events. rtld(1) uses r_debug_state for dl state transitions, so we use its address for RD_DLACTIVITY events. MFC r265630: Fix the rd_event_addr prototype and slightly clarify the use of the "event" parameter. Modified: stable/9/lib/librtld_db/librtld_db.3 stable/9/lib/librtld_db/rtld_db.c stable/9/lib/librtld_db/rtld_db.h Directory Properties: stable/9/lib/librtld_db/ (props changed) Modified: stable/9/lib/librtld_db/librtld_db.3 ============================================================================== --- stable/9/lib/librtld_db/librtld_db.3 Fri Aug 8 14:48:26 2014 (r269718) +++ stable/9/lib/librtld_db/librtld_db.3 Fri Aug 8 14:52:59 2014 (r269719) @@ -48,7 +48,7 @@ .Fc .Ft rd_err_e .Fo rd_event_addr -.Fa "rd_agent_t *rdap, rd_notify_t *notify" +.Fa "rd_agent_t *rdap, rd_event_e event, rd_notify_t *notify" .Fc .Ft rd_err_e .Fo rd_event_enable @@ -142,10 +142,10 @@ enables reporting of events. This function always returns RD_OK. .Pp .Fn rd_event_addr -returns the event address in the +returns the event address corresponding to the .Ft event parameter. -At the moment we only report RD_NOTIFY_BPT events. +At the moment we only report events of type RD_NOTIFY_BPT. .Pp .Fn rd_event_getmsg returns the message associated with the latest event. Modified: stable/9/lib/librtld_db/rtld_db.c ============================================================================== --- stable/9/lib/librtld_db/rtld_db.c Fri Aug 8 14:48:26 2014 (r269718) +++ stable/9/lib/librtld_db/rtld_db.c Fri Aug 8 14:52:59 2014 (r269719) @@ -81,20 +81,40 @@ rd_errstr(rd_err_e rderr) } rd_err_e -rd_event_addr(rd_agent_t *rdap, rd_event_e event __unused, rd_notify_t *notify) +rd_event_addr(rd_agent_t *rdap, rd_event_e event, rd_notify_t *notify) { - DPRINTF("%s rdap %p notify %p\n", __func__, rdap, notify); + rd_err_e ret; - notify->type = RD_NOTIFY_BPT; - notify->u.bptaddr = rdap->rda_addr; + DPRINTF("%s rdap %p event %d notify %p\n", __func__, rdap, event, + notify); - return (RD_OK); + ret = RD_OK; + switch (event) { + case RD_NONE: + break; + case RD_PREINIT: + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_preinit_addr; + break; + case RD_POSTINIT: + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_postinit_addr; + break; + case RD_DLACTIVITY: + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_dlactivity_addr; + break; + default: + ret = RD_ERR; + break; + } + return (ret); } rd_err_e rd_event_enable(rd_agent_t *rdap __unused, int onoff) { - DPRINTF("%s onoff %d\n", __func__, onoff); + DPRINTF("%s onoff %d\n", __func__, onoff); return (RD_OK); } @@ -220,7 +240,15 @@ rd_reset(rd_agent_t *rdap) &sym) < 0) return (RD_ERR); DPRINTF("found r_debug_state at 0x%lx\n", (unsigned long)sym.st_value); - rdap->rda_addr = sym.st_value; + rdap->rda_preinit_addr = sym.st_value; + rdap->rda_dlactivity_addr = sym.st_value; + + if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "_r_debug_postinit", + &sym) < 0) + return (RD_ERR); + DPRINTF("found _r_debug_postinit at 0x%lx\n", + (unsigned long)sym.st_value); + rdap->rda_postinit_addr = sym.st_value; return (RD_OK); } Modified: stable/9/lib/librtld_db/rtld_db.h ============================================================================== --- stable/9/lib/librtld_db/rtld_db.h Fri Aug 8 14:48:26 2014 (r269718) +++ stable/9/lib/librtld_db/rtld_db.h Fri Aug 8 14:52:59 2014 (r269719) @@ -51,7 +51,9 @@ typedef enum { typedef struct rd_agent { struct proc_handle *rda_php; - uintptr_t rda_addr; /* address of r_debug_state */ + uintptr_t rda_dlactivity_addr; + uintptr_t rda_preinit_addr; + uintptr_t rda_postinit_addr; } rd_agent_t; typedef struct rd_loadobj { From owner-svn-src-stable-9@FreeBSD.ORG Fri Aug 8 14:56:04 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADFD466E for ; Fri, 8 Aug 2014 14:56:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83E092D69 for ; Fri, 8 Aug 2014 14:56:04 +0000 (UTC) Received: from joerg (uid 548) (envelope-from joerg@FreeBSD.org) id 243c by svn.freebsd.org (DragonFly Mail Agent v0.9+); Fri, 08 Aug 2014 14:56:04 +0000 From: Joerg Wunsch Date: Fri, 8 Aug 2014 14:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269721 - stable/9/sys/dev/usb/serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e4e504.243c.4a12602c@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 14:56:04 -0000 Author: joerg Date: Fri Aug 8 14:56:04 2014 New Revision: 269721 URL: http://svnweb.freebsd.org/changeset/base/269721 Log: MFC r269470: Avoid divide-by-zero panic when setting baudrate to 0. Modified: stable/9/sys/dev/usb/serial/umcs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/umcs.c ============================================================================== --- stable/9/sys/dev/usb/serial/umcs.c Fri Aug 8 14:53:01 2014 (r269720) +++ stable/9/sys/dev/usb/serial/umcs.c Fri Aug 8 14:56:04 2014 (r269721) @@ -1083,7 +1083,10 @@ umcs7840_calc_baudrate(uint32_t rate, ui for (i = 0; i < umcs7840_baudrate_divisors_len - 1 && !(rate > umcs7840_baudrate_divisors[i] && rate <= umcs7840_baudrate_divisors[i + 1]); ++i); - *divisor = umcs7840_baudrate_divisors[i + 1] / rate; + if (rate == 0) + *divisor = 1; /* XXX */ + else + *divisor = umcs7840_baudrate_divisors[i + 1] / rate; /* 0x00 .. 0x70 */ *clk = i << MCS7840_DEV_SPx_CLOCK_SHIFT; return (0); From owner-svn-src-stable-9@FreeBSD.ORG Fri Aug 8 15:21:42 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB35CFA8 for ; Fri, 8 Aug 2014 15:21:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8157D214D for ; Fri, 8 Aug 2014 15:21:42 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 2113 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Fri, 08 Aug 2014 15:21:42 +0000 From: Mark Johnston Date: Fri, 8 Aug 2014 15:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269723 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e4eb06.2113.45f27a88@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 15:21:42 -0000 Author: markj Date: Fri Aug 8 15:21:42 2014 New Revision: 269723 URL: http://svnweb.freebsd.org/changeset/base/269723 Log: MFC r265631: Re-apply r248644. This fixes an annoying problem which caused dtrace -c to fail to attach to stripped binaries. With the _r_debug_postinit symbol, dtrace(1) can now set a breakpoint in the victim process after it has registered its DOF table(s) with the kernel. r_debug_state cannot be used for this purpose since it is called before DOF is made available, in which case dtrace(1) cannot create USDT probes before the program begins execution. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Aug 8 15:04:02 2014 (r269722) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Aug 8 15:21:42 2014 (r269723) @@ -1136,7 +1136,7 @@ alloc: #if defined(sun) dtp->dt_prcmode = DT_PROC_STOP_PREINIT; #else - dtp->dt_prcmode = DT_PROC_STOP_MAIN; + dtp->dt_prcmode = DT_PROC_STOP_POSTINIT; #endif dtp->dt_linkmode = DT_LINK_KERNEL; dtp->dt_linktype = DT_LTYP_ELF; From owner-svn-src-stable-9@FreeBSD.ORG Sat Aug 9 15:00:06 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A2462C0 for ; Sat, 9 Aug 2014 15:00:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A6E62500 for ; Sat, 9 Aug 2014 15:00:06 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 205c by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sat, 09 Aug 2014 15:00:05 +0000 From: Mark Johnston Date: Sat, 9 Aug 2014 15:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269755 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e63776.205c.3b274869@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2014 15:00:06 -0000 Author: markj Date: Sat Aug 9 15:00:05 2014 New Revision: 269755 URL: http://svnweb.freebsd.org/changeset/base/269755 Log: MFC r265308: If the traced process stops because it received a signal, libproc needs to ensure that the signal is forwarded when proc_continue() is called. Modified: stable/9/lib/libproc/libproc.h stable/9/lib/libproc/proc_bkpt.c stable/9/lib/libproc/proc_util.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/libproc.h ============================================================================== --- stable/9/lib/libproc/libproc.h Sat Aug 9 15:00:03 2014 (r269754) +++ stable/9/lib/libproc/libproc.h Sat Aug 9 15:00:05 2014 (r269755) @@ -102,6 +102,7 @@ typedef struct lwpstatus { #define PR_FAULTED 2 #define PR_SYSENTRY 3 #define PR_SYSEXIT 4 +#define PR_SIGNALLED 5 int pr_what; #define FLTBPT -1 } lwpstatus_t; Modified: stable/9/lib/libproc/proc_bkpt.c ============================================================================== --- stable/9/lib/libproc/proc_bkpt.c Sat Aug 9 15:00:03 2014 (r269754) +++ stable/9/lib/libproc/proc_bkpt.c Sat Aug 9 15:00:05 2014 (r269755) @@ -49,13 +49,6 @@ __FBSDID("$FreeBSD$"); #error "Add support for your architecture" #endif -static void -proc_cont(struct proc_handle *phdl) -{ - - ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0); -} - static int proc_stop(struct proc_handle *phdl) { @@ -81,7 +74,7 @@ proc_bkptset(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; - int ret = 0; + int ret = 0, stopped; *saved = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || @@ -92,9 +85,12 @@ proc_bkptset(struct proc_handle *phdl, u DPRINTFX("adding breakpoint at 0x%lx", address); - if (phdl->status != PS_STOP) + stopped = 0; + if (phdl->status != PS_STOP) { if (proc_stop(phdl) != 0) return (-1); + stopped = 1; + } /* * Read the original instruction. @@ -129,9 +125,9 @@ proc_bkptset(struct proc_handle *phdl, u } done: - if (phdl->status != PS_STOP) + if (stopped) /* Restart the process if we had to stop it. */ - proc_cont(phdl); + proc_continue(phdl); return (ret); } @@ -142,7 +138,7 @@ proc_bkptdel(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; - int ret = 0; + int ret = 0, stopped; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || phdl->status == PS_IDLE) { @@ -152,9 +148,12 @@ proc_bkptdel(struct proc_handle *phdl, u DPRINTFX("removing breakpoint at 0x%lx", address); - if (phdl->status != PS_STOP) + stopped = 0; + if (phdl->status != PS_STOP) { if (proc_stop(phdl) != 0) return (-1); + stopped = 1; + } /* * Overwrite the breakpoint instruction that we setup previously. @@ -171,9 +170,9 @@ proc_bkptdel(struct proc_handle *phdl, u ret = -1; } - if (phdl->status != PS_STOP) + if (stopped) /* Restart the process if we had to stop it. */ - proc_cont(phdl); + proc_continue(phdl); return (ret); } Modified: stable/9/lib/libproc/proc_util.c ============================================================================== --- stable/9/lib/libproc/proc_util.c Sat Aug 9 15:00:03 2014 (r269754) +++ stable/9/lib/libproc/proc_util.c Sat Aug 9 15:00:05 2014 (r269755) @@ -35,10 +35,9 @@ #include #include #include -#include -#include #include #include +#include #include "_libproc.h" int @@ -59,11 +58,14 @@ proc_clearflags(struct proc_handle *phdl int proc_continue(struct proc_handle *phdl) { + int pending = 0; if (phdl == NULL) return (-1); - if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t) 1, 0) != 0) + if (phdl->status == PS_STOP && WSTOPSIG(phdl->wstat) != SIGTRAP) + pending = WSTOPSIG(phdl->wstat); + if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t)1, pending) != 0) return (-1); phdl->status = PS_RUN; @@ -208,12 +210,16 @@ proc_getlwpstatus(struct proc_handle *ph return (NULL); siginfo = &lwpinfo.pl_siginfo; if (lwpinfo.pl_event == PL_EVENT_SIGNAL && - (lwpinfo.pl_flags & PL_FLAG_SI) && - siginfo->si_signo == SIGTRAP && - (siginfo->si_code == TRAP_BRKPT || - siginfo->si_code == TRAP_TRACE)) { - psp->pr_why = PR_FAULTED; - psp->pr_what = FLTBPT; + (lwpinfo.pl_flags & PL_FLAG_SI) != 0) { + if (siginfo->si_signo == SIGTRAP && + (siginfo->si_code == TRAP_BRKPT || + siginfo->si_code == TRAP_TRACE)) { + psp->pr_why = PR_FAULTED; + psp->pr_what = FLTBPT; + } else { + psp->pr_why = PR_SIGNALLED; + psp->pr_what = siginfo->si_signo; + } } else if (lwpinfo.pl_flags & PL_FLAG_SCE) { psp->pr_why = PR_SYSENTRY; } else if (lwpinfo.pl_flags & PL_FLAG_SCX) { From owner-svn-src-stable-9@FreeBSD.ORG Sat Aug 9 15:03:57 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 538A6754 for ; Sat, 9 Aug 2014 15:03:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 290D02538 for ; Sat, 9 Aug 2014 15:03:57 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 249a by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sat, 09 Aug 2014 15:03:57 +0000 From: Mark Johnston Date: Sat, 9 Aug 2014 15:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269757 - stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e6385d.249a.7aa58f91@svn.freebsd.org> X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2014 15:03:57 -0000 Author: markj Date: Sat Aug 9 15:03:56 2014 New Revision: 269757 URL: http://svnweb.freebsd.org/changeset/base/269757 Log: MFC r259211: Correct the check for errors from proc_rwmem(). Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Aug 9 15:03:47 2014 (r269756) +++ stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Aug 9 15:03:56 2014 (r269757) @@ -75,7 +75,7 @@ proc_ops(int op, proc_t *p, void *kaddr, uio.uio_td = curthread; uio.uio_rw = op; PHOLD(p); - if (proc_rwmem(p, &uio) < 0) { + if (proc_rwmem(p, &uio) != 0) { PRELE(p); return (-1); }