From owner-svn-src-stable@freebsd.org Sun Sep 3 06:43:09 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E57F2E1E4A8; Sun, 3 Sep 2017 06:43:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE5CD84A94; Sun, 3 Sep 2017 06:43:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v836h8UB035337; Sun, 3 Sep 2017 06:43:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v836h8o9035336; Sun, 3 Sep 2017 06:43:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201709030643.v836h8o9035336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 3 Sep 2017 06:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323137 - stable/11/usr.sbin/acpi/acpidump X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/usr.sbin/acpi/acpidump X-SVN-Commit-Revision: 323137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 06:43:10 -0000 Author: mav Date: Sun Sep 3 06:43:08 2017 New Revision: 323137 URL: https://svnweb.freebsd.org/changeset/base/323137 Log: MFC r323045: Fix flags field decoding in ACPI_NFIT_CONTROL_REGION. It looked like incomplete copy/paste, printing absolute garbage. While there, print ValidFields field ax hex, since it is a bitmask. Modified: stable/11/usr.sbin/acpi/acpidump/acpi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- stable/11/usr.sbin/acpi/acpidump/acpi.c Sat Sep 2 23:39:51 2017 (r323136) +++ stable/11/usr.sbin/acpi/acpidump/acpi.c Sun Sep 3 06:43:08 2017 (r323137) @@ -1277,7 +1277,7 @@ acpi_print_nfit(ACPI_NFIT_HEADER *nfit) (u_int)ctlreg->SubsystemDeviceId); printf("\tSubsystemRevisionId=%u\n", (u_int)ctlreg->SubsystemRevisionId); - printf("\tValidFields=%u\n", (u_int)ctlreg->ValidFields); + printf("\tValidFields=0x%02x\n", (u_int)ctlreg->ValidFields); printf("\tManufacturingLocation=%u\n", (u_int)ctlreg->ManufacturingLocation); printf("\tManufacturingDate=%u\n", @@ -1300,8 +1300,7 @@ acpi_print_nfit(ACPI_NFIT_HEADER *nfit) #define PRINTFLAG(var, flag) printflag((var), ACPI_NFIT_## flag, #flag) printf("\tFlags="); - PRINTFLAG(mmap->Flags, ADD_ONLINE_ONLY); - PRINTFLAG(mmap->Flags, PROXIMITY_VALID); + PRINTFLAG(ctlreg->Flags, CONTROL_BUFFERED); PRINTFLAG_END(); #undef PRINTFLAG From owner-svn-src-stable@freebsd.org Sun Sep 3 09:03:31 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 358C8E0106E; Sun, 3 Sep 2017 09:03:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02B256362D; Sun, 3 Sep 2017 09:03:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8393UwU093465; Sun, 3 Sep 2017 09:03:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8393UOS093464; Sun, 3 Sep 2017 09:03:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709030903.v8393UOS093464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Sep 2017 09:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323139 - stable/11/sys/dev/ppc X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/ppc X-SVN-Commit-Revision: 323139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 09:03:31 -0000 Author: kib Date: Sun Sep 3 09:03:29 2017 New Revision: 323139 URL: https://svnweb.freebsd.org/changeset/base/323139 Log: MFC r322947: Add PCI Id for MosChip MCS9900. Modified: stable/11/sys/dev/ppc/ppc_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ppc/ppc_pci.c ============================================================================== --- stable/11/sys/dev/ppc/ppc_pci.c Sun Sep 3 08:32:33 2017 (r323138) +++ stable/11/sys/dev/ppc/ppc_pci.c Sun Sep 3 09:03:29 2017 (r323139) @@ -91,6 +91,7 @@ static struct pci_id pci_ids[] = { { 0xc1101415, "Oxford Semiconductor OXPCIe952 Parallel port", 0x10 }, { 0x98059710, "NetMos NM9805 1284 Printer port", 0x10 }, { 0x98659710, "MosChip MCS9865 1284 Printer port", 0x10 }, + { 0x99009710, "MosChip MCS9900 PCIe to Peripheral Controller", 0x10 }, { 0x99019710, "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0xffff } }; From owner-svn-src-stable@freebsd.org Sun Sep 3 09:05:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDD9CE011E0; Sun, 3 Sep 2017 09:05:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C84D63796; Sun, 3 Sep 2017 09:05:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8395mA1093603; Sun, 3 Sep 2017 09:05:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8395m78093602; Sun, 3 Sep 2017 09:05:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709030905.v8395m78093602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Sep 2017 09:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323140 - stable/11/sys/geom X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/geom X-SVN-Commit-Revision: 323140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 09:05:49 -0000 Author: kib Date: Sun Sep 3 09:05:48 2017 New Revision: 323140 URL: https://svnweb.freebsd.org/changeset/base/323140 Log: MFC r322948: Let g_access() log the actual error number. PR: 221855 Modified: stable/11/sys/geom/geom_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/geom_subr.c ============================================================================== --- stable/11/sys/geom/geom_subr.c Sun Sep 3 09:03:29 2017 (r323139) +++ stable/11/sys/geom/geom_subr.c Sun Sep 3 09:05:48 2017 (r323140) @@ -914,8 +914,8 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int return (EPERM); /* If we try to open more but provider is error'ed: fail */ else if ((dcr > 0 || dcw > 0 || dce > 0) && pp->error != 0) { - printf("%s(%d): provider %s has error\n", - __func__, __LINE__, pp->name); + printf("%s(%d): provider %s has error %d set\n", + __func__, __LINE__, pp->name, pp->error); return (pp->error); } From owner-svn-src-stable@freebsd.org Sun Sep 3 09:09:30 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45199E013CB; Sun, 3 Sep 2017 09:09:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1261663A01; Sun, 3 Sep 2017 09:09:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8399TSv093916; Sun, 3 Sep 2017 09:09:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8399TbY093914; Sun, 3 Sep 2017 09:09:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709030909.v8399TbY093914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Sep 2017 09:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323141 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 323141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 09:09:30 -0000 Author: kib Date: Sun Sep 3 09:09:28 2017 New Revision: 323141 URL: https://svnweb.freebsd.org/changeset/base/323141 Log: MFC r322721: Allow vinvalbuf() to operate with the shared vnode lock. Modified: stable/11/sys/kern/vfs_subr.c stable/11/sys/sys/vnode.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Sun Sep 3 09:05:48 2017 (r323140) +++ stable/11/sys/kern/vfs_subr.c Sun Sep 3 09:09:28 2017 (r323141) @@ -1628,9 +1628,13 @@ bufobj_invalbuf(struct bufobj *bo, int flags, int slpf #ifdef INVARIANTS BO_LOCK(bo); - if ((flags & (V_ALT | V_NORMAL | V_CLEANONLY | V_VMIO)) == 0 && - (bo->bo_dirty.bv_cnt > 0 || bo->bo_clean.bv_cnt > 0)) + if ((flags & (V_ALT | V_NORMAL | V_CLEANONLY | V_VMIO | + V_ALLOWCLEAN)) == 0 && (bo->bo_dirty.bv_cnt > 0 || + bo->bo_clean.bv_cnt > 0)) panic("vinvalbuf: flush failed"); + if ((flags & (V_ALT | V_NORMAL | V_CLEANONLY | V_VMIO)) == 0 && + bo->bo_dirty.bv_cnt > 0) + panic("vinvalbuf: flush dirty failed"); BO_UNLOCK(bo); #endif return (0); Modified: stable/11/sys/sys/vnode.h ============================================================================== --- stable/11/sys/sys/vnode.h Sun Sep 3 09:05:48 2017 (r323140) +++ stable/11/sys/sys/vnode.h Sun Sep 3 09:09:28 2017 (r323141) @@ -398,6 +398,7 @@ extern int vttoif_tab[]; #define V_NORMAL 0x0004 /* vinvalbuf: invalidate only regular bufs */ #define V_CLEANONLY 0x0008 /* vinvalbuf: invalidate only clean bufs */ #define V_VMIO 0x0010 /* vinvalbuf: called during pageout */ +#define V_ALLOWCLEAN 0x0020 /* vinvalbuf: allow clean buffers after flush */ #define REVOKEALL 0x0001 /* vop_revoke: revoke all aliases */ #define V_WAIT 0x0001 /* vn_start_write: sleep for suspend */ #define V_NOWAIT 0x0002 /* vn_start_write: don't sleep for suspend */ From owner-svn-src-stable@freebsd.org Sun Sep 3 09:12:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71AC2E015FA; Sun, 3 Sep 2017 09:12:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EAAE63D84; Sun, 3 Sep 2017 09:12:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v839C3E4096951; Sun, 3 Sep 2017 09:12:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v839C2uX096945; Sun, 3 Sep 2017 09:12:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709030912.v839C2uX096945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Sep 2017 09:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323142 - stable/11/sys/fs/nfsclient X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/fs/nfsclient X-SVN-Commit-Revision: 323142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 09:12:04 -0000 Author: kib Date: Sun Sep 3 09:12:02 2017 New Revision: 323142 URL: https://svnweb.freebsd.org/changeset/base/323142 Log: MFC r322722: Do not drop NFS vnode lock when performing consistency checks. Modified: stable/11/sys/fs/nfsclient/nfs_clbio.c stable/11/sys/fs/nfsclient/nfs_clnode.c stable/11/sys/fs/nfsclient/nfs_clport.c stable/11/sys/fs/nfsclient/nfs_clsubs.c stable/11/sys/fs/nfsclient/nfs_clvnops.c stable/11/sys/fs/nfsclient/nfsnode.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clbio.c Sun Sep 3 09:09:28 2017 (r323141) +++ stable/11/sys/fs/nfsclient/nfs_clbio.c Sun Sep 3 09:12:02 2017 (r323142) @@ -365,20 +365,13 @@ nfs_bioread_check_cons(struct vnode *vp, struct thread int error = 0; struct vattr vattr; struct nfsnode *np = VTONFS(vp); - int old_lock; + bool old_lock; /* - * Grab the exclusive lock before checking whether the cache is - * consistent. - * XXX - We can make this cheaper later (by acquiring cheaper locks). - * But for now, this suffices. + * Ensure the exclusove access to the node before checking + * whether the cache is consistent. */ - old_lock = ncl_upgrade_vnlock(vp); - if (vp->v_iflag & VI_DOOMED) { - error = EBADF; - goto out; - } - + old_lock = ncl_excl_start(vp); mtx_lock(&np->n_mtx); if (np->n_flag & NMODIFIED) { mtx_unlock(&np->n_mtx); @@ -386,9 +379,7 @@ nfs_bioread_check_cons(struct vnode *vp, struct thread if (vp->v_type != VDIR) panic("nfs: bioread, not dir"); ncl_invaldir(vp); - error = ncl_vinvalbuf(vp, V_SAVE, td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - error = EBADF; + error = ncl_vinvalbuf(vp, V_SAVE | V_ALLOWCLEAN, td, 1); if (error != 0) goto out; } @@ -404,16 +395,14 @@ nfs_bioread_check_cons(struct vnode *vp, struct thread mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, cred); if (error) - return (error); + goto out; mtx_lock(&np->n_mtx); if ((np->n_flag & NSIZECHANGED) || (NFS_TIMESPEC_COMPARE(&np->n_mtime, &vattr.va_mtime))) { mtx_unlock(&np->n_mtx); if (vp->v_type == VDIR) ncl_invaldir(vp); - error = ncl_vinvalbuf(vp, V_SAVE, td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - error = EBADF; + error = ncl_vinvalbuf(vp, V_SAVE | V_ALLOWCLEAN, td, 1); if (error != 0) goto out; mtx_lock(&np->n_mtx); @@ -423,7 +412,7 @@ nfs_bioread_check_cons(struct vnode *vp, struct thread mtx_unlock(&np->n_mtx); } out: - ncl_downgrade_vnlock(vp, old_lock); + ncl_excl_finish(vp, old_lock); return (error); } @@ -608,8 +597,6 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int iof while (error == NFSERR_BAD_COOKIE) { ncl_invaldir(vp); error = ncl_vinvalbuf(vp, 0, td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - return (EBADF); /* * Yuck! The directory has been modified on the @@ -933,8 +920,6 @@ ncl_write(struct vop_write_args *ap) KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); error = ncl_vinvalbuf(vp, V_SAVE | ((ioflag & IO_VMIO) != 0 ? V_VMIO : 0), td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - error = EBADF; if (error != 0) return (error); } else @@ -1016,9 +1001,6 @@ ncl_write(struct vop_write_args *ap) KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); error = ncl_vinvalbuf(vp, V_SAVE | ((ioflag & IO_VMIO) != 0 ? V_VMIO : 0), td, 1); - if (error == 0 && - (vp->v_iflag & VI_DOOMED) != 0) - error = EBADF; if (error != 0) return (error); wouldcommit = biosize; @@ -1336,7 +1318,7 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thre struct nfsnode *np = VTONFS(vp); struct nfsmount *nmp = VFSTONFS(vp->v_mount); int error = 0, slpflag, slptimeo; - int old_lock = 0; + bool old_lock; ASSERT_VOP_LOCKED(vp, "ncl_vinvalbuf"); @@ -1352,16 +1334,9 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thre slptimeo = 0; } - old_lock = ncl_upgrade_vnlock(vp); - if (vp->v_iflag & VI_DOOMED) { - /* - * Since vgonel() uses the generic vinvalbuf() to flush - * dirty buffers and it does not call this function, it - * is safe to just return OK when VI_DOOMED is set. - */ - ncl_downgrade_vnlock(vp, old_lock); - return (0); - } + old_lock = ncl_excl_start(vp); + if (old_lock) + flags |= V_ALLOWCLEAN; /* * Now, flush as required. @@ -1400,7 +1375,7 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thre np->n_flag &= ~NMODIFIED; mtx_unlock(&np->n_mtx); out: - ncl_downgrade_vnlock(vp, old_lock); + ncl_excl_finish(vp, old_lock); return error; } Modified: stable/11/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clnode.c Sun Sep 3 09:09:28 2017 (r323141) +++ stable/11/sys/fs/nfsclient/nfs_clnode.c Sun Sep 3 09:12:02 2017 (r323142) @@ -141,6 +141,9 @@ ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize * happened to return an error no special casing is needed). */ mtx_init(&np->n_mtx, "NEWNFSnode lock", NULL, MTX_DEF | MTX_DUPOK); + lockinit(&np->n_excl, PVFS, "nfsupg", VLKTIMEOUT, LK_NOSHARE | + LK_CANRECURSE); + /* * NFS supports recursive and shared locking. */ @@ -167,6 +170,7 @@ ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize *npp = NULL; FREE((caddr_t)np->n_fhp, M_NFSFH); mtx_destroy(&np->n_mtx); + lockdestroy(&np->n_excl); uma_zfree(newnfsnode_zone, np); return (error); } @@ -332,6 +336,7 @@ ncl_reclaim(struct vop_reclaim_args *ap) if (np->n_v4 != NULL) FREE((caddr_t)np->n_v4, M_NFSV4NODE); mtx_destroy(&np->n_mtx); + lockdestroy(&np->n_excl); uma_zfree(newnfsnode_zone, vp->v_data); vp->v_data = NULL; return (0); Modified: stable/11/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clport.c Sun Sep 3 09:09:28 2017 (r323141) +++ stable/11/sys/fs/nfsclient/nfs_clport.c Sun Sep 3 09:12:02 2017 (r323142) @@ -230,6 +230,8 @@ nfscl_nget(struct mount *mntp, struct vnode *dvp, stru * happened to return an error no special casing is needed). */ mtx_init(&np->n_mtx, "NEWNFSnode lock", NULL, MTX_DEF | MTX_DUPOK); + lockinit(&np->n_excl, PVFS, "nfsupg", VLKTIMEOUT, LK_NOSHARE | + LK_CANRECURSE); /* * Are we getting the root? If so, make sure the vnode flags @@ -271,6 +273,7 @@ nfscl_nget(struct mount *mntp, struct vnode *dvp, stru if (error != 0) { *npp = NULL; mtx_destroy(&np->n_mtx); + lockdestroy(&np->n_excl); FREE((caddr_t)nfhp, M_NFSFH); if (np->n_v4 != NULL) FREE((caddr_t)np->n_v4, M_NFSV4NODE); Modified: stable/11/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clsubs.c Sun Sep 3 09:09:28 2017 (r323141) +++ stable/11/sys/fs/nfsclient/nfs_clsubs.c Sun Sep 3 09:12:02 2017 (r323142) @@ -135,30 +135,33 @@ ncl_dircookie_unlock(struct nfsnode *np) mtx_unlock(&np->n_mtx); } -int -ncl_upgrade_vnlock(struct vnode *vp) +bool +ncl_excl_start(struct vnode *vp) { - int old_lock; + struct nfsnode *np; + int vn_lk; - ASSERT_VOP_LOCKED(vp, "ncl_upgrade_vnlock"); - old_lock = NFSVOPISLOCKED(vp); - if (old_lock != LK_EXCLUSIVE) { - KASSERT(old_lock == LK_SHARED, - ("ncl_upgrade_vnlock: wrong old_lock %d", old_lock)); - /* Upgrade to exclusive lock, this might block */ - NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); - } - return (old_lock); + ASSERT_VOP_LOCKED(vp, "ncl_excl_start"); + vn_lk = NFSVOPISLOCKED(vp); + if (vn_lk == LK_EXCLUSIVE) + return (false); + KASSERT(vn_lk == LK_SHARED, + ("ncl_excl_start: wrong vnode lock %d", vn_lk)); + /* Ensure exclusive access, this might block */ + np = VTONFS(vp); + lockmgr(&np->n_excl, LK_EXCLUSIVE, NULL); + return (true); } void -ncl_downgrade_vnlock(struct vnode *vp, int old_lock) +ncl_excl_finish(struct vnode *vp, bool old_lock) { - if (old_lock != LK_EXCLUSIVE) { - KASSERT(old_lock == LK_SHARED, ("wrong old_lock %d", old_lock)); - /* Downgrade from exclusive lock. */ - NFSVOPLOCK(vp, LK_DOWNGRADE | LK_RETRY); - } + struct nfsnode *np; + + if (!old_lock) + return; + np = VTONFS(vp); + lockmgr(&np->n_excl, LK_RELEASE, NULL); } #ifdef NFS_ACDEBUG Modified: stable/11/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clvnops.c Sun Sep 3 09:09:28 2017 (r323141) +++ stable/11/sys/fs/nfsclient/nfs_clvnops.c Sun Sep 3 09:12:02 2017 (r323142) @@ -522,8 +522,6 @@ nfs_open(struct vop_open_args *ap) if (np->n_flag & NMODIFIED) { mtx_unlock(&np->n_mtx); error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - return (EBADF); if (error == EINTR || error == EIO) { if (NFS_ISV4(vp)) (void) nfsrpc_close(vp, 0, ap->a_td); @@ -560,8 +558,6 @@ nfs_open(struct vop_open_args *ap) np->n_direofoffset = 0; mtx_unlock(&np->n_mtx); error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - return (EBADF); if (error == EINTR || error == EIO) { if (NFS_ISV4(vp)) (void) nfsrpc_close(vp, 0, ap->a_td); @@ -582,8 +578,6 @@ nfs_open(struct vop_open_args *ap) if (np->n_directio_opens == 0) { mtx_unlock(&np->n_mtx); error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - return (EBADF); if (error) { if (NFS_ISV4(vp)) (void) nfsrpc_close(vp, 0, ap->a_td); @@ -724,8 +718,6 @@ nfs_close(struct vop_close_args *ap) } } else { error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - return (EBADF); } mtx_lock(&np->n_mtx); } @@ -944,9 +936,7 @@ nfs_setattr(struct vop_setattr_args *ap) mtx_unlock(&np->n_mtx); error = ncl_vinvalbuf(vp, vap->va_size == 0 ? 0 : V_SAVE, td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - error = EBADF; - if (error != 0) { + if (error != 0) { vnode_pager_setsize(vp, tsize); return (error); } @@ -973,8 +963,6 @@ nfs_setattr(struct vop_setattr_args *ap) (np->n_flag & NMODIFIED) && vp->v_type == VREG) { mtx_unlock(&np->n_mtx); error = ncl_vinvalbuf(vp, V_SAVE, td, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - return (EBADF); if (error == EINTR || error == EIO) return (error); } else @@ -1678,9 +1666,7 @@ nfs_remove(struct vop_remove_args *ap) * unnecessary delayed writes later. */ error = ncl_vinvalbuf(vp, 0, cnp->cn_thread, 1); - if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) - error = EBADF; - else if (error != EINTR && error != EIO) + if (error != EINTR && error != EIO) /* Do the rpc */ error = nfs_removerpc(dvp, vp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_cred, cnp->cn_thread); @@ -3091,10 +3077,6 @@ nfs_advlock(struct vop_advlock_args *ap) if ((np->n_flag & NMODIFIED) || ret || np->n_change != va.va_filerev) { (void) ncl_vinvalbuf(vp, V_SAVE, td, 1); - if ((vp->v_iflag & VI_DOOMED) != 0) { - NFSVOPUNLOCK(vp, 0); - return (EBADF); - } np->n_attrstamp = 0; KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); ret = VOP_GETATTR(vp, &va, cred); Modified: stable/11/sys/fs/nfsclient/nfsnode.h ============================================================================== --- stable/11/sys/fs/nfsclient/nfsnode.h Sun Sep 3 09:09:28 2017 (r323141) +++ stable/11/sys/fs/nfsclient/nfsnode.h Sun Sep 3 09:12:02 2017 (r323142) @@ -92,6 +92,8 @@ struct nfs_accesscache { */ struct nfsnode { struct mtx n_mtx; /* Protects all of these members */ + struct lock n_excl; /* Exclusive helper for shared + vnode lock */ u_quad_t n_size; /* Current size of file */ u_quad_t n_brev; /* Modify rev when cached */ u_quad_t n_lrev; /* Modify rev for lease */ @@ -184,8 +186,8 @@ int ncl_removeit(struct sillyrename *, struct vnode *) int ncl_nget(struct mount *, u_int8_t *, int, struct nfsnode **, int); nfsuint64 *ncl_getcookie(struct nfsnode *, off_t, int); void ncl_invaldir(struct vnode *); -int ncl_upgrade_vnlock(struct vnode *); -void ncl_downgrade_vnlock(struct vnode *, int); +bool ncl_excl_start(struct vnode *); +void ncl_excl_finish(struct vnode *, bool old_lock); void ncl_dircookie_lock(struct nfsnode *); void ncl_dircookie_unlock(struct nfsnode *); From owner-svn-src-stable@freebsd.org Sun Sep 3 09:14:08 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0460DE01738; Sun, 3 Sep 2017 09:14:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4E6A63F54; Sun, 3 Sep 2017 09:14:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v839E6le097739; Sun, 3 Sep 2017 09:14:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v839E6Ft097738; Sun, 3 Sep 2017 09:14:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709030914.v839E6Ft097738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Sep 2017 09:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323143 - stable/11/sys/i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/i386/i386 X-SVN-Commit-Revision: 323143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 09:14:08 -0000 Author: kib Date: Sun Sep 3 09:14:06 2017 New Revision: 323143 URL: https://svnweb.freebsd.org/changeset/base/323143 Log: MFC r322926: Trim excessive 'extern'. Modified: stable/11/sys/i386/i386/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/i386/trap.c ============================================================================== --- stable/11/sys/i386/i386/trap.c Sun Sep 3 09:12:02 2017 (r323142) +++ stable/11/sys/i386/i386/trap.c Sun Sep 3 09:14:06 2017 (r323143) @@ -107,8 +107,8 @@ PMC_SOFT_DEFINE( , , page_fault, write); #include #endif -extern void trap(struct trapframe *frame); -extern void syscall(struct trapframe *frame); +void trap(struct trapframe *frame); +void syscall(struct trapframe *frame); static int trap_pfault(struct trapframe *, int, vm_offset_t); static void trap_fatal(struct trapframe *, vm_offset_t); From owner-svn-src-stable@freebsd.org Sun Sep 3 09:15:14 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 752ACE0181E; Sun, 3 Sep 2017 09:15:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4230F64168; Sun, 3 Sep 2017 09:15:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v839FDUO097959; Sun, 3 Sep 2017 09:15:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v839FD9A097958; Sun, 3 Sep 2017 09:15:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709030915.v839FD9A097958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Sep 2017 09:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323144 - stable/11/sys/i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/i386/i386 X-SVN-Commit-Revision: 323144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 09:15:14 -0000 Author: kib Date: Sun Sep 3 09:15:13 2017 New Revision: 323144 URL: https://svnweb.freebsd.org/changeset/base/323144 Log: MFC r322927: Use ANSI C declaration for trap_pfault(). Style. Modified: stable/11/sys/i386/i386/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/i386/trap.c ============================================================================== --- stable/11/sys/i386/i386/trap.c Sun Sep 3 09:14:06 2017 (r323143) +++ stable/11/sys/i386/i386/trap.c Sun Sep 3 09:15:13 2017 (r323144) @@ -751,17 +751,18 @@ out: } static int -trap_pfault(frame, usermode, eva) - struct trapframe *frame; - int usermode; - vm_offset_t eva; +trap_pfault(struct trapframe *frame, int usermode, vm_offset_t eva) { + struct thread *td; + struct proc *p; vm_offset_t va; vm_map_t map; - int rv = 0; + int rv; vm_prot_t ftype; - struct thread *td = curthread; - struct proc *p = td->td_proc; + + td = curthread; + p = td->td_proc; + rv = 0; if (__predict_false((td->td_pflags & TDP_NOFAULTING) != 0)) { /* From owner-svn-src-stable@freebsd.org Sun Sep 3 09:16:25 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1857FE01947; Sun, 3 Sep 2017 09:16:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D93386429F; Sun, 3 Sep 2017 09:16:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v839GOSf098053; Sun, 3 Sep 2017 09:16:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v839GOhL098052; Sun, 3 Sep 2017 09:16:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709030916.v839GOhL098052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Sep 2017 09:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323145 - stable/11/sys/i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/i386/i386 X-SVN-Commit-Revision: 323145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 09:16:25 -0000 Author: kib Date: Sun Sep 3 09:16:23 2017 New Revision: 323145 URL: https://svnweb.freebsd.org/changeset/base/323145 Log: MFC r322928: Remove unused code. Modified: stable/11/sys/i386/i386/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/i386/trap.c ============================================================================== --- stable/11/sys/i386/i386/trap.c Sun Sep 3 09:15:13 2017 (r323144) +++ stable/11/sys/i386/i386/trap.c Sun Sep 3 09:16:23 2017 (r323145) @@ -731,16 +731,6 @@ kernel_trctrap: KASSERT((read_eflags() & PSL_I) != 0, ("interrupts disabled")); trapsignal(td, &ksi); -#ifdef DEBUG - if (type <= MAX_TRAP_MSG) { - uprintf("fatal process exception: %s", - trap_msg[type]); - if ((type == T_PAGEFLT) || (type == T_PROTFLT)) - uprintf(", fault VA = 0x%lx", (u_long)eva); - uprintf("\n"); - } -#endif - user: userret(td, frame); KASSERT(PCB_USER_FPU(td->td_pcb), From owner-svn-src-stable@freebsd.org Sun Sep 3 09:18:41 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 028CDE01A93; Sun, 3 Sep 2017 09:18:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D25D964418; Sun, 3 Sep 2017 09:18:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v839IeDV098189; Sun, 3 Sep 2017 09:18:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v839IebZ098188; Sun, 3 Sep 2017 09:18:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709030918.v839IebZ098188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 3 Sep 2017 09:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323146 - stable/11/sys/i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/i386/i386 X-SVN-Commit-Revision: 323146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 09:18:41 -0000 Author: kib Date: Sun Sep 3 09:18:39 2017 New Revision: 323146 URL: https://svnweb.freebsd.org/changeset/base/323146 Log: MFC r322929: Simplify i386 trap(). Modified: stable/11/sys/i386/i386/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/i386/trap.c ============================================================================== --- stable/11/sys/i386/i386/trap.c Sun Sep 3 09:16:23 2017 (r323145) +++ stable/11/sys/i386/i386/trap.c Sun Sep 3 09:18:39 2017 (r323146) @@ -178,41 +178,45 @@ trap(struct trapframe *frame) #ifdef KDTRACE_HOOKS struct reg regs; #endif - struct thread *td = curthread; - struct proc *p = td->td_proc; + ksiginfo_t ksi; + struct thread *td; + struct proc *p; #ifdef KDB register_t dr6; #endif - int i = 0, ucode = 0; + int signo, ucode; u_int type; - register_t addr = 0; + register_t addr; vm_offset_t eva; - ksiginfo_t ksi; #ifdef POWERFAIL_NMI static int lastalert = 0; #endif + td = curthread; + p = td->td_proc; + signo = 0; + ucode = 0; + addr = 0; + PCPU_INC(cnt.v_trap); type = frame->tf_trapno; #ifdef SMP /* Handler for NMI IPIs used for stopping CPUs. */ - if (type == T_NMI) { - if (ipi_nmi_handler() == 0) - goto out; - } + if (type == T_NMI && ipi_nmi_handler() == 0) + return; #endif /* SMP */ #ifdef KDB if (kdb_active) { kdb_reenter(); - goto out; + return; } #endif if (type == T_RESERVED) { trap_fatal(frame, 0); - goto out; + return; } if (type == T_NMI) { @@ -226,18 +230,18 @@ trap(struct trapframe *frame) */ if (pmc_intr != NULL && (*pmc_intr)(PCPU_GET(cpuid), frame) != 0) - goto out; + return; #endif #ifdef STACK if (stack_nmi_handler(frame) != 0) - goto out; + return; #endif } if (type == T_MCHK) { mca_intr(); - goto out; + return; } #ifdef KDTRACE_HOOKS @@ -250,7 +254,7 @@ trap(struct trapframe *frame) */ if ((type == T_PROTFLT || type == T_PAGEFLT) && dtrace_trap_func != NULL && (*dtrace_trap_func)(frame, type)) - goto out; + return; #endif if ((frame->tf_eflags & PSL_I) == 0) { @@ -312,7 +316,7 @@ trap(struct trapframe *frame) switch (type) { case T_PRIVINFLT: /* privileged instruction fault */ - i = SIGILL; + signo = SIGILL; ucode = ILL_PRVOPC; break; @@ -324,66 +328,64 @@ trap(struct trapframe *frame) fill_frame_regs(frame, ®s); if (dtrace_pid_probe_ptr != NULL && dtrace_pid_probe_ptr(®s) == 0) - goto out; + return; } #endif user_trctrap_out: frame->tf_eflags &= ~PSL_T; - i = SIGTRAP; + signo = SIGTRAP; ucode = (type == T_TRCTRAP ? TRAP_TRACE : TRAP_BRKPT); break; case T_ARITHTRAP: /* arithmetic trap */ ucode = npxtrap_x87(); if (ucode == -1) - goto userout; - i = SIGFPE; + return; + signo = SIGFPE; break; - /* - * The following two traps can happen in - * vm86 mode, and, if so, we want to handle - * them specially. - */ + /* + * The following two traps can happen in vm86 mode, + * and, if so, we want to handle them specially. + */ case T_PROTFLT: /* general protection fault */ case T_STKFLT: /* stack fault */ if (frame->tf_eflags & PSL_VM) { - i = vm86_emulate((struct vm86frame *)frame); - if (i == SIGTRAP) { + signo = vm86_emulate((struct vm86frame *)frame); + if (signo == SIGTRAP) { type = T_TRCTRAP; load_dr6(rdr6() | 0x4000); goto user_trctrap_out; } - if (i == 0) + if (signo == 0) goto user; break; } - i = SIGBUS; + signo = SIGBUS; ucode = (type == T_PROTFLT) ? BUS_OBJERR : BUS_ADRERR; break; case T_SEGNPFLT: /* segment not present fault */ - i = SIGBUS; + signo = SIGBUS; ucode = BUS_ADRERR; break; case T_TSSFLT: /* invalid TSS fault */ - i = SIGBUS; + signo = SIGBUS; ucode = BUS_OBJERR; break; case T_ALIGNFLT: - i = SIGBUS; + signo = SIGBUS; ucode = BUS_ADRALN; break; case T_DOUBLEFLT: /* double fault */ default: - i = SIGBUS; + signo = SIGBUS; ucode = BUS_OBJERR; break; case T_PAGEFLT: /* page fault */ - - i = trap_pfault(frame, TRUE, eva); + signo = trap_pfault(frame, TRUE, eva); #if defined(I586_CPU) && !defined(NO_F00F_HACK) - if (i == -2) { + if (signo == -2) { /* * The f00f hack workaround has triggered, so * treat the fault as an illegal instruction @@ -393,52 +395,50 @@ user_trctrap_out: /* Proceed as in that case. */ ucode = ILL_PRVOPC; - i = SIGILL; + signo = SIGILL; break; } #endif - if (i == -1) - goto userout; - if (i == 0) + if (signo == -1) + return; + if (signo == 0) goto user; - if (i == SIGSEGV) + if (signo == SIGSEGV) ucode = SEGV_MAPERR; - else { - if (prot_fault_translation == 0) { - /* - * Autodetect. - * This check also covers the images - * without the ABI-tag ELF note. - */ - if (SV_CURPROC_ABI() == SV_ABI_FREEBSD - && p->p_osrel >= P_OSREL_SIGSEGV) { - i = SIGSEGV; - ucode = SEGV_ACCERR; - } else { - i = SIGBUS; - ucode = BUS_PAGE_FAULT; - } - } else if (prot_fault_translation == 1) { - /* - * Always compat mode. - */ - i = SIGBUS; - ucode = BUS_PAGE_FAULT; - } else { - /* - * Always SIGSEGV mode. - */ - i = SIGSEGV; + else if (prot_fault_translation == 0) { + /* + * Autodetect. This check also covers + * the images without the ABI-tag ELF + * note. + */ + if (SV_CURPROC_ABI() == SV_ABI_FREEBSD && + p->p_osrel >= P_OSREL_SIGSEGV) { + signo = SIGSEGV; ucode = SEGV_ACCERR; + } else { + signo = SIGBUS; + ucode = BUS_PAGE_FAULT; } + } else if (prot_fault_translation == 1) { + /* + * Always compat mode. + */ + signo = SIGBUS; + ucode = BUS_PAGE_FAULT; + } else { + /* + * Always SIGSEGV mode. + */ + signo = SIGSEGV; + ucode = SEGV_ACCERR; } addr = eva; break; case T_DIVIDE: /* integer divide fault */ ucode = FPE_INTDIV; - i = SIGFPE; + signo = SIGFPE; break; #ifdef DEV_ISA @@ -452,21 +452,21 @@ user_trctrap_out: sysbeep(880, hz); lastalert = time_second; } - goto userout; + return; #else /* !POWERFAIL_NMI */ nmi_handle_intr(type, frame); - goto out; + return; #endif /* POWERFAIL_NMI */ #endif /* DEV_ISA */ case T_OFLOW: /* integer overflow fault */ ucode = FPE_INTOVF; - i = SIGFPE; + signo = SIGFPE; break; case T_BOUND: /* bounds check fault */ ucode = FPE_FLTSUB; - i = SIGFPE; + signo = SIGFPE; break; case T_DNA: @@ -474,32 +474,31 @@ user_trctrap_out: ("kernel FPU ctx has leaked")); /* transparent fault (due to context switch "late") */ if (npxdna()) - goto userout; + return; uprintf("pid %d killed due to lack of floating point\n", p->p_pid); - i = SIGKILL; + signo = SIGKILL; ucode = 0; break; case T_FPOPFLT: /* FPU operand fetch fault */ ucode = ILL_COPROC; - i = SIGILL; + signo = SIGILL; break; case T_XMMFLT: /* SIMD floating-point exception */ ucode = npxtrap_sse(); if (ucode == -1) - goto userout; - i = SIGFPE; + return; + signo = SIGFPE; break; #ifdef KDTRACE_HOOKS case T_DTRACE_RET: enable_intr(); fill_frame_regs(frame, ®s); - if (dtrace_return_probe_ptr != NULL && - dtrace_return_probe_ptr(®s) == 0) - goto out; - goto userout; + if (dtrace_return_probe_ptr != NULL) + dtrace_return_probe_ptr(®s); + return; #endif } } else { @@ -510,13 +509,13 @@ user_trctrap_out: switch (type) { case T_PAGEFLT: /* page fault */ (void) trap_pfault(frame, FALSE, eva); - goto out; + return; case T_DNA: if (PCB_USER_FPU(td->td_pcb)) panic("Unregistered use of FPU in kernel"); if (npxdna()) - goto out; + return; break; case T_ARITHTRAP: /* arithmetic trap */ @@ -527,7 +526,7 @@ user_trctrap_out: * handler registration seems to be overkill */ trap_fatal(frame, 0); - goto out; + return; /* * The following two traps can happen in @@ -537,18 +536,18 @@ user_trctrap_out: case T_PROTFLT: /* general protection fault */ case T_STKFLT: /* stack fault */ if (frame->tf_eflags & PSL_VM) { - i = vm86_emulate((struct vm86frame *)frame); - if (i == SIGTRAP) { + signo = vm86_emulate((struct vm86frame *)frame); + if (signo == SIGTRAP) { type = T_TRCTRAP; load_dr6(rdr6() | 0x4000); goto kernel_trctrap; } - if (i != 0) + if (signo != 0) /* * returns to original process */ vm86_trap((struct vm86frame *)frame); - goto out; + return; } /* FALL THROUGH */ case T_SEGNPFLT: /* segment not present fault */ @@ -571,7 +570,7 @@ user_trctrap_out: kern_psignal(p, SIGBUS); PROC_UNLOCK(p); #endif - goto out; + return; } if (td->td_intr_nesting_level != 0) @@ -589,27 +588,26 @@ user_trctrap_out: */ if (frame->tf_eip == (int)doreti_iret) { frame->tf_eip = (int)doreti_iret_fault; - goto out; + return; } if (type == T_STKFLT) break; if (frame->tf_eip == (int)doreti_popl_ds) { frame->tf_eip = (int)doreti_popl_ds_fault; - goto out; + return; } if (frame->tf_eip == (int)doreti_popl_es) { frame->tf_eip = (int)doreti_popl_es_fault; - goto out; + return; } if (frame->tf_eip == (int)doreti_popl_fs) { frame->tf_eip = (int)doreti_popl_fs_fault; - goto out; + return; } if (curpcb->pcb_onfault != NULL) { - frame->tf_eip = - (int)curpcb->pcb_onfault; - goto out; + frame->tf_eip = (int)curpcb->pcb_onfault; + return; } break; @@ -625,7 +623,7 @@ user_trctrap_out: */ if (frame->tf_eflags & PSL_NT) { frame->tf_eflags &= ~PSL_NT; - goto out; + return; } break; @@ -638,7 +636,7 @@ kernel_trctrap: * silently until the syscall handler has * saved the flags. */ - goto out; + return; } if (frame->tf_eip == (int)IDTVEC(lcall_syscall) + 1) { /* @@ -646,7 +644,7 @@ kernel_trctrap: * flags. Stop single stepping it. */ frame->tf_eflags &= ~PSL_T; - goto out; + return; } /* * Ignore debug register trace traps due to @@ -665,7 +663,7 @@ kernel_trctrap: * processor doesn't */ load_dr6(rdr6() & ~0xf); - goto out; + return; } /* * FALLTHROUGH (TRCTRAP kernel mode, kernel address) @@ -680,7 +678,7 @@ kernel_trctrap: dr6 = rdr6(); load_dr6(dr6 & ~0x4000); if (kdb_trap(type, dr6, frame)) - goto out; + return; #endif break; @@ -692,24 +690,24 @@ kernel_trctrap: sysbeep(880, hz); lastalert = time_second; } - goto out; + return; #else /* !POWERFAIL_NMI */ nmi_handle_intr(type, frame); - goto out; + return; #endif /* POWERFAIL_NMI */ #endif /* DEV_ISA */ } trap_fatal(frame, eva); - goto out; + return; } /* Translate fault for emulators (e.g. Linux) */ - if (*p->p_sysent->sv_transtrap) - i = (*p->p_sysent->sv_transtrap)(i, type); + if (*p->p_sysent->sv_transtrap != NULL) + signo = (*p->p_sysent->sv_transtrap)(signo, type); ksiginfo_init_trap(&ksi); - ksi.ksi_signo = i; + ksi.ksi_signo = signo; ksi.ksi_code = ucode; ksi.ksi_addr = (void *)addr; ksi.ksi_trapno = type; @@ -717,8 +715,8 @@ kernel_trctrap: uprintf("pid %d comm %s: signal %d err %x code %d type %d " "addr 0x%x esp 0x%08x eip 0x%08x " "<%02x %02x %02x %02x %02x %02x %02x %02x>\n", - p->p_pid, p->p_comm, i, frame->tf_err, ucode, type, addr, - frame->tf_esp, frame->tf_eip, + p->p_pid, p->p_comm, signo, frame->tf_err, ucode, type, + addr, frame->tf_esp, frame->tf_eip, fubyte((void *)(frame->tf_eip + 0)), fubyte((void *)(frame->tf_eip + 1)), fubyte((void *)(frame->tf_eip + 2)), @@ -735,9 +733,6 @@ user: userret(td, frame); KASSERT(PCB_USER_FPU(td->td_pcb), ("Return from trap with kernel FPU ctx leaked")); -userout: -out: - return; } static int From owner-svn-src-stable@freebsd.org Sun Sep 3 16:45:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B042E13F64; Sun, 3 Sep 2017 16:45:20 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAF9A715BA; Sun, 3 Sep 2017 16:45:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v83GjJtd081946; Sun, 3 Sep 2017 16:45:19 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v83GjJY2081945; Sun, 3 Sep 2017 16:45:19 GMT (envelope-from des@FreeBSD.org) Message-Id: <201709031645.v83GjJY2081945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 3 Sep 2017 16:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323148 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: des X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 323148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2017 16:45:20 -0000 Author: des Date: Sun Sep 3 16:45:18 2017 New Revision: 323148 URL: https://svnweb.freebsd.org/changeset/base/323148 Log: MFH (r314888): silence aliasing warning in nvme.h Approved by: imp Modified: stable/11/sys/dev/nvme/nvme.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme.h ============================================================================== --- stable/11/sys/dev/nvme/nvme.h Sun Sep 3 09:41:40 2017 (r323147) +++ stable/11/sys/dev/nvme/nvme.h Sun Sep 3 16:45:18 2017 (r323148) @@ -919,7 +919,8 @@ void nvme_ns_rw_cmd(struct nvme_command *cmd, uint32_t { cmd->opc = rwcmd; cmd->nsid = nsid; - *(uint64_t *)&cmd->cdw10 = lba; + cmd->cdw10 = lba & 0xffffffffu; + cmd->cdw11 = lba >> 32; cmd->cdw12 = count-1; cmd->cdw13 = 0; cmd->cdw14 = 0; From owner-svn-src-stable@freebsd.org Mon Sep 4 08:38:36 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10AF6E1C305; Mon, 4 Sep 2017 08:38:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D19586B01D; Mon, 4 Sep 2017 08:38:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v848cYUD067966; Mon, 4 Sep 2017 08:38:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v848cYvB067965; Mon, 4 Sep 2017 08:38:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709040838.v848cYvB067965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 4 Sep 2017 08:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323152 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 323152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Sep 2017 08:38:36 -0000 Author: kib Date: Mon Sep 4 08:38:34 2017 New Revision: 323152 URL: https://svnweb.freebsd.org/changeset/base/323152 Log: MFC r323102: Add serial comma. Modified: stable/11/libexec/rtld-elf/rtld.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.1 ============================================================================== --- stable/11/libexec/rtld-elf/rtld.1 Mon Sep 4 05:34:36 2017 (r323151) +++ stable/11/libexec/rtld-elf/rtld.1 Mon Sep 4 08:38:34 2017 (r323152) @@ -351,7 +351,7 @@ execution environments. The verification only uses Unix .Dv DACs , ignores -.Dv ACLs +.Dv ACLs , and is naturally prone to race conditions. Environments which rely on such restrictions are weak and breakable on their own. From owner-svn-src-stable@freebsd.org Mon Sep 4 08:41:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B92CBE1C603; Mon, 4 Sep 2017 08:41:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87EF26B363; Mon, 4 Sep 2017 08:41:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v848fpeK071653; Mon, 4 Sep 2017 08:41:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v848fpm9071652; Mon, 4 Sep 2017 08:41:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709040841.v848fpm9071652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 4 Sep 2017 08:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323153 - stable/11/sys/ufs/ffs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/ufs/ffs X-SVN-Commit-Revision: 323153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Sep 2017 08:41:52 -0000 Author: kib Date: Mon Sep 4 08:41:51 2017 New Revision: 323153 URL: https://svnweb.freebsd.org/changeset/base/323153 Log: MFC r322757, r322883: Avoid dereferencing potentially freed workitem in softdep_count_dependencies(). Modified: stable/11/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_softdep.c Mon Sep 4 08:38:34 2017 (r323152) +++ stable/11/sys/ufs/ffs/ffs_softdep.c Mon Sep 4 08:41:51 2017 (r323153) @@ -13911,12 +13911,36 @@ softdep_count_dependencies(bp, wantcount) struct newblk *newblk; struct mkdir *mkdir; struct diradd *dap; + struct vnode *vp; + struct mount *mp; int i, retval; retval = 0; - if ((wk = LIST_FIRST(&bp->b_dep)) == NULL) + if (LIST_EMPTY(&bp->b_dep)) return (0); - ump = VFSTOUFS(wk->wk_mp); + vp = bp->b_vp; + + /* + * The ump mount point is stable after we get a correct + * pointer, since bp is locked and this prevents unmount from + * proceed. But to get to it, we cannot dereference bp->b_dep + * head wk_mp, because we do not yet own SU ump lock and + * workitem might be freed while dereferenced. + */ +retry: + if (vp->v_type == VCHR) { + VI_LOCK(vp); + mp = vp->v_type == VCHR ? vp->v_rdev->si_mountpt : NULL; + VI_UNLOCK(vp); + if (mp == NULL) + goto retry; + } else if (vp->v_type == VREG) { + mp = vp->v_mount; + } else { + return (0); + } + ump = VFSTOUFS(mp); + ACQUIRE_LOCK(ump); LIST_FOREACH(wk, &bp->b_dep, wk_list) { switch (wk->wk_type) { From owner-svn-src-stable@freebsd.org Mon Sep 4 21:58:36 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F4ACE20DCB; Mon, 4 Sep 2017 21:58:36 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AFAC636DB; Mon, 4 Sep 2017 21:58:36 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v84LwZju092241; Mon, 4 Sep 2017 21:58:35 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v84LwZvs092239; Mon, 4 Sep 2017 21:58:35 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709042158.v84LwZvs092239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 4 Sep 2017 21:58:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323164 - in stable/11: share/mk sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in stable/11: share/mk sys/conf X-SVN-Commit-Revision: 323164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Sep 2017 21:58:36 -0000 Author: rlibby Date: Mon Sep 4 21:58:35 2017 New Revision: 323164 URL: https://svnweb.freebsd.org/changeset/base/323164 Log: MFC r303188,r303190,r303271,r303438,r303453: Warn flags for gcc 6.1 r303188 (by br): Add warn flags for GCC 6.1 compiler. r303190 (by br): Add GCC 6.1 warn flags for kernel as well. r303271 (by br): Fix style. r303438 (by br): o Add warn flags required to build modules with GCC 6.1; o Sort GCC 4.8 warn flags. r303453 (by br): Normalise the CWARNFLAGS inter-word spacing: remove all leading and trailing space, and convert multiple consecutive spaces to single space. Approved by: markj (mentor) Modified: stable/11/share/mk/bsd.sys.mk stable/11/sys/conf/kern.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.sys.mk ============================================================================== --- stable/11/share/mk/bsd.sys.mk Mon Sep 4 21:17:50 2017 (r323163) +++ stable/11/share/mk/bsd.sys.mk Mon Sep 4 21:58:35 2017 (r323164) @@ -114,9 +114,32 @@ CWARNFLAGS+= -Wno-format # GCC 5.2.0 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50200 -CWARNFLAGS+= -Wno-error=unused-function -Wno-error=enum-compare -Wno-error=logical-not-parentheses -Wno-error=bool-compare -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=clobbered -Wno-error=cast-align -Wno-error=extra -Wno-error=attributes -Wno-error=inline -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=strict-aliasing -Wno-error=address +CWARNFLAGS+= -Wno-error=address \ + -Wno-error=array-bounds \ + -Wno-error=attributes \ + -Wno-error=bool-compare \ + -Wno-error=cast-align \ + -Wno-error=clobbered \ + -Wno-error=enum-compare \ + -Wno-error=extra \ + -Wno-error=inline \ + -Wno-error=logical-not-parentheses \ + -Wno-error=strict-aliasing \ + -Wno-error=uninitialized \ + -Wno-error=unused-but-set-variable \ + -Wno-error=unused-function \ + -Wno-error=unused-value .endif +# GCC 6.1.0 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 +CWARNFLAGS+= -Wno-error=misleading-indentation \ + -Wno-error=nonnull-compare \ + -Wno-error=shift-negative-value \ + -Wno-error=tautological-compare \ + -Wno-error=unused-const-variable +.endif + # How to handle FreeBSD custom printf format specifiers. .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ @@ -170,7 +193,7 @@ CFLAGS+= ${SSP_CFLAGS} # Allow user-specified additional warning flags, plus compiler and file # specific flag overrides, unless we've overriden this... .if ${MK_WARNS} != "no" -CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${COMPILER_TYPE}} +CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}} CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} .endif Modified: stable/11/sys/conf/kern.mk ============================================================================== --- stable/11/sys/conf/kern.mk Mon Sep 4 21:17:50 2017 (r323163) +++ stable/11/sys/conf/kern.mk Mon Sep 4 21:58:35 2017 (r323164) @@ -48,11 +48,24 @@ CLANG_NO_IAS34= -no-integrated-as .if ${COMPILER_VERSION} >= 40800 # Catch-all for all the things that are in our tree, but for which we're # not yet ready for this compiler. -CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \ - -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \ - -Wno-error=array-bounds -Wno-error=address \ - -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes \ - -Wno-error=strict-overflow -Wno-error=overflow +CWARNEXTRA?= -Wno-error=address \ + -Wno-error=aggressive-loop-optimizations \ + -Wno-error=array-bounds \ + -Wno-error=attributes \ + -Wno-error=cast-qual \ + -Wno-error=enum-compare \ + -Wno-error=inline \ + -Wno-error=maybe-uninitialized \ + -Wno-error=overflow \ + -Wno-error=sequence-point \ + -Wno-error=strict-overflow \ + -Wno-error=unused-but-set-variable +.if ${COMPILER_VERSION} >= 60100 +CWARNEXTRA+= -Wno-error=misleading-indentation \ + -Wno-error=nonnull-compare \ + -Wno-error=shift-overflow \ + -Wno-error=tautological-compare +.endif .else # For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. CWARNEXTRA?= -Wno-uninitialized @@ -202,7 +215,7 @@ CFLAGS+= -fstack-protector CFLAGS+= -gdwarf-2 .endif -CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}} +CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${.IMPSRC:T}} CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC:T}} # Tell bmake not to mistake standard targets for things to be searched for From owner-svn-src-stable@freebsd.org Tue Sep 5 00:44:06 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13271E05525; Tue, 5 Sep 2017 00:44:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3BEB67D7A; Tue, 5 Sep 2017 00:44:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v850i5G1060818; Tue, 5 Sep 2017 00:44:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v850i55Z060817; Tue, 5 Sep 2017 00:44:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709050044.v850i55Z060817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Sep 2017 00:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323167 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 323167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 00:44:06 -0000 Author: emaste Date: Tue Sep 5 00:44:04 2017 New Revision: 323167 URL: https://svnweb.freebsd.org/changeset/base/323167 Log: MFC r308789 (glebius): If FreeBSD source tree is a subproject of a bigger project, then .git or .hg may reside above FreeBSD sources root. Provide function findvcs() that will climb up and seek for presence of a VCS directory. Modified: stable/11/sys/conf/newvers.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Tue Sep 5 00:11:06 2017 (r323166) +++ stable/11/sys/conf/newvers.sh Tue Sep 5 00:44:04 2017 (r323167) @@ -51,6 +51,28 @@ fi RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" +# +# findvcs dir +# Looks up directory dir at world root and up the filesystem +# +findvcs() +{ + local savedir + + savedir=$(pwd) + cd ${SYSDIR}/.. + while [ $(pwd) != "/" ]; do + if [ -d "./$1" ]; then + VCSDIR=$(pwd)"/$1" + cd ${savedir} + return 0 + fi + cd .. + done + cd ${savedir} + return 1 +} + if [ -z "${SYSDIR}" ]; then SYSDIR=$(dirname $0)/.. fi @@ -154,19 +176,20 @@ for dir in /usr/bin /usr/local/bin; do p4_cmd=${dir}/p4 fi done -if [ -d "${SYSDIR}/../.git" ] ; then + +if findvcs .git; then for dir in /usr/bin /usr/local/bin; do if [ -x "${dir}/git" ] ; then - git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git" + git_cmd="${dir}/git --git-dir=${VCSDIR}" break fi done fi -if [ -d "${SYSDIR}/../.hg" ] ; then +if findvcs .hg; then for dir in /usr/bin /usr/local/bin; do if [ -x "${dir}/hg" ] ; then - hg_cmd="${dir}/hg -R ${SYSDIR}/.." + hg_cmd="${dir}/hg -R ${VCSDIR}" break fi done @@ -213,7 +236,7 @@ if [ -n "$git_cmd" ] ; then if [ -n "$git_b" ] ; then git="${git}(${git_b})" fi - if $git_cmd --work-tree=${SYSDIR}/.. diff-index \ + if $git_cmd --work-tree=${VCSDIR}/.. diff-index \ --name-only HEAD | read dummy; then git="${git}-dirty" modified=true From owner-svn-src-stable@freebsd.org Tue Sep 5 00:46:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C1B5E05718; Tue, 5 Sep 2017 00:46:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18CCC6801D; Tue, 5 Sep 2017 00:46:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v850kpDG060957; Tue, 5 Sep 2017 00:46:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v850kpRW060956; Tue, 5 Sep 2017 00:46:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709050046.v850kpRW060956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Sep 2017 00:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323168 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 323168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 00:46:52 -0000 Author: emaste Date: Tue Sep 5 00:46:50 2017 New Revision: 323168 URL: https://svnweb.freebsd.org/changeset/base/323168 Log: MFC r322798: newvers.sh: accommodate `git worktree` newvers.sh looks for a .vcs subdirectory (e.g. .git, .svn) to determine which vcs info tool to run (e.g., git rev-parse, svn info). (As of r308789 in head / r323167 in stable/11 if a .vcs subdirectory is not found at ${TOPDIR} then newvers.sh walks up successive parent directories, testing for the .vcs subdirectory at each step. This is done in case the FreeBSD source is built in a subdirectory as part of some larger project, but either way newvers.sh still tests for the .vcs subdirectory.) However, when using git worktree there is no .git subdirectory but rather a plain text .git file which contains a reference to the main working tree. Change findvcs() to test that the .vcs entry exists, regardless of type. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Tue Sep 5 00:44:04 2017 (r323167) +++ stable/11/sys/conf/newvers.sh Tue Sep 5 00:46:50 2017 (r323168) @@ -62,7 +62,7 @@ findvcs() savedir=$(pwd) cd ${SYSDIR}/.. while [ $(pwd) != "/" ]; do - if [ -d "./$1" ]; then + if [ -e "./$1" ]; then VCSDIR=$(pwd)"/$1" cd ${savedir} return 0 From owner-svn-src-stable@freebsd.org Tue Sep 5 13:40:12 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64A68E09FB5; Tue, 5 Sep 2017 13:40:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31EF76B024; Tue, 5 Sep 2017 13:40:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v85DeBs4075504; Tue, 5 Sep 2017 13:40:11 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v85DeBXR075503; Tue, 5 Sep 2017 13:40:11 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709051340.v85DeBXR075503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Sep 2017 13:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323179 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323179 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 13:40:12 -0000 Author: markj Date: Tue Sep 5 13:40:10 2017 New Revision: 323179 URL: https://svnweb.freebsd.org/changeset/base/323179 Log: MFC r322987: Synchronize page laundering with pmap_extract_and_hold(). Modified: stable/11/sys/vm/vm_pageout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_pageout.c ============================================================================== --- stable/11/sys/vm/vm_pageout.c Tue Sep 5 12:57:45 2017 (r323178) +++ stable/11/sys/vm/vm_pageout.c Tue Sep 5 13:40:10 2017 (r323179) @@ -401,6 +401,8 @@ vm_pageout_cluster(vm_page_t m) */ vm_page_assert_unbusied(m); KASSERT(m->hold_count == 0, ("page %p is held", m)); + + pmap_remove_write(m); vm_page_unlock(m); mc[vm_pageout_page_count] = pb = ps = m; @@ -443,6 +445,7 @@ more: ib = 0; break; } + pmap_remove_write(p); vm_page_unlock(p); mc[--page_base] = pb = p; ++pageout_count; @@ -468,6 +471,7 @@ more: vm_page_unlock(p); break; } + pmap_remove_write(p); vm_page_unlock(p); mc[page_base + pageout_count] = ps = p; ++pageout_count; @@ -512,8 +516,8 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags, VM_OBJECT_ASSERT_WLOCKED(object); /* - * Initiate I/O. Bump the vm_page_t->busy counter and - * mark the pages read-only. + * Initiate I/O. Mark the pages busy and verify that they're valid + * and read-only. * * We do not have to fixup the clean/dirty bits here... we can * allow the pager to do it after the I/O completes. @@ -525,8 +529,9 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags, KASSERT(mc[i]->valid == VM_PAGE_BITS_ALL, ("vm_pageout_flush: partially invalid page %p index %d/%d", mc[i], i, count)); + KASSERT((mc[i]->aflags & PGA_WRITEABLE) == 0, + ("vm_pageout_flush: writeable page %p", mc[i])); vm_page_sbusy(mc[i]); - pmap_remove_write(mc[i]); } vm_object_pip_add(object, count); From owner-svn-src-stable@freebsd.org Tue Sep 5 13:52:17 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70487E0AB3F; Tue, 5 Sep 2017 13:52:17 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39E7A6D506; Tue, 5 Sep 2017 13:52:17 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v85DqG7m082216; Tue, 5 Sep 2017 13:52:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v85DqFI2081588; Tue, 5 Sep 2017 13:52:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709051352.v85DqFI2081588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Sep 2017 13:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323180 - in stable/11: . cddl/contrib/opensolaris/cmd/lockstat share/man/man4 sys/dev/ksyms sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11: . cddl/contrib/opensolaris/cmd/lockstat share/man/man4 sys/dev/ksyms sys/sys X-SVN-Commit-Revision: 323180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 13:52:17 -0000 Author: markj Date: Tue Sep 5 13:52:15 2017 New Revision: 323180 URL: https://svnweb.freebsd.org/changeset/base/323180 Log: MFC r321963: Rework and simplify the ksyms implementation. Deleted: stable/11/sys/sys/ksyms.h Modified: stable/11/ObsoleteFiles.inc stable/11/cddl/contrib/opensolaris/cmd/lockstat/sym.c stable/11/share/man/man4/ksyms.4 stable/11/sys/dev/ksyms/ksyms.c Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Tue Sep 5 13:40:10 2017 (r323179) +++ stable/11/ObsoleteFiles.inc Tue Sep 5 13:52:15 2017 (r323180) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170802: ksyms(4) ioctl interface was removed +OLD_FILES+=usr/include/sys/ksyms.h # 20170620: remove stale manpage OLD_FILES+=usr/share/man/man2/cap_rights_get.2.gz # 20170610: chown-f_test replaced by chown_test Modified: stable/11/cddl/contrib/opensolaris/cmd/lockstat/sym.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/lockstat/sym.c Tue Sep 5 13:40:10 2017 (r323179) +++ stable/11/cddl/contrib/opensolaris/cmd/lockstat/sym.c Tue Sep 5 13:52:15 2017 (r323180) @@ -48,7 +48,6 @@ #include #else #include -#include #include #include #include Modified: stable/11/share/man/man4/ksyms.4 ============================================================================== --- stable/11/share/man/man4/ksyms.4 Tue Sep 5 13:40:10 2017 (r323179) +++ stable/11/share/man/man4/ksyms.4 Tue Sep 5 13:52:15 2017 (r323180) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 5, 2009 +.Dd August 2, 2017 .Dt KSYMS 4 .Os .Sh NAME @@ -69,24 +69,6 @@ driver does not block the loading or unloading of modu while the .Pa /dev/ksyms file is open but may contain stale data. -.Sh IOCTLS -The -.Xr ioctl 2 -command codes below are defined in -.Aq Pa sys/ksyms.h . -.Pp -The (third) argument to the -.Xr ioctl 2 -should be a pointer to the type indicated. -.Bl -tag -width indent -offset indent -.It Dv KIOCGSIZE (size_t) -Returns the total size of the current symbol table. -This can be used when allocating a buffer to make a copy of -the kernel symbol table. -.It Dv KIOCGADDR (void *) -Returns the address of the kernel symbol table mapped in -the process memory. -.El .Sh FILES .Bl -tag -width /dev/ksymsX .It Pa /dev/ksyms @@ -112,7 +94,6 @@ This may occur if the kernel was in the process of loa unloading a module. .El .Sh SEE ALSO -.Xr ioctl 2 , .Xr nlist 3 , .Xr elf 5 , .Xr kldload 8 @@ -152,12 +133,3 @@ file once at a time. The process must close the .Pa /dev/ksyms before it is allowed to open it again. -.Pp -The -.Nm -driver uses the calling process' memory address space to store the snapshot. -.Xr ioctl 2 -can be used to get the memory address where the symbol table is stored to -save kernel memory. -.Xr mmap 2 -may also be used but it will map it to another address. Modified: stable/11/sys/dev/ksyms/ksyms.c ============================================================================== --- stable/11/sys/dev/ksyms/ksyms.c Tue Sep 5 13:40:10 2017 (r323179) +++ stable/11/sys/dev/ksyms/ksyms.c Tue Sep 5 13:52:15 2017 (r323180) @@ -32,16 +32,15 @@ #include #include -#include #include #include #include #include -#include #include #include #include #include +#include #include #include @@ -49,7 +48,7 @@ #include #include #include -#include +#include #include "linker_if.h" @@ -68,18 +67,14 @@ static d_open_t ksyms_open; static d_read_t ksyms_read; -static d_close_t ksyms_close; -static d_ioctl_t ksyms_ioctl; -static d_mmap_t ksyms_mmap; +static d_mmap_single_t ksyms_mmap_single; static struct cdevsw ksyms_cdevsw = { .d_version = D_VERSION, .d_flags = D_TRACKCLOSE, .d_open = ksyms_open, - .d_close = ksyms_close, .d_read = ksyms_read, - .d_ioctl = ksyms_ioctl, - .d_mmap = ksyms_mmap, + .d_mmap_single = ksyms_mmap_single, .d_name = KSYMS_DNAME }; @@ -87,11 +82,12 @@ struct ksyms_softc { LIST_ENTRY(ksyms_softc) sc_list; vm_offset_t sc_uaddr; size_t sc_usize; - pmap_t sc_pmap; + vm_object_t sc_obj; + vm_size_t sc_objsz; struct proc *sc_proc; }; -static struct mtx ksyms_mtx; +static struct sx ksyms_mtx; static struct cdev *ksyms_dev; static LIST_HEAD(, ksyms_softc) ksyms_list = LIST_HEAD_INITIALIZER(ksyms_list); @@ -112,6 +108,7 @@ struct tsizes { }; struct toffsets { + struct ksyms_softc *to_sc; vm_offset_t to_symoff; vm_offset_t to_stroff; unsigned to_stridx; @@ -155,11 +152,25 @@ ksyms_size_calc(struct tsizes *ts) (void)linker_file_foreach(ksyms_size_permod, ts); } -#define KSYMS_EMIT(src, des, sz) do { \ - copyout(src, (void *)des, sz); \ - des += sz; \ -} while (0) +static int +ksyms_emit(struct ksyms_softc *sc, void *buf, off_t off, size_t sz) +{ + struct iovec iov; + struct uio uio; + iov.iov_base = buf; + iov.iov_len = sz; + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + uio.uio_offset = off; + uio.uio_resid = (ssize_t)sz; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_rw = UIO_WRITE; + uio.uio_td = curthread; + + return (uiomove_object(sc->sc_obj, sc->sc_objsz, &uio)); +} + #define SYMBLKSZ (256 * sizeof(Elf_Sym)) /* @@ -170,24 +181,24 @@ static int ksyms_add(linker_file_t lf, void *arg) { char *buf; + struct ksyms_softc *sc; struct toffsets *to; const Elf_Sym *symtab; Elf_Sym *symp; caddr_t strtab; - long symsz; - size_t strsz, numsyms; + size_t len, numsyms, strsz, symsz; linker_symval_t symval; - int i, nsyms, len; + int error, i, nsyms; + buf = malloc(SYMBLKSZ, M_KSYMS, M_WAITOK); to = arg; + sc = to->to_sc; MOD_SLOCK; numsyms = LINKER_SYMTAB_GET(lf, &symtab); strsz = LINKER_STRTAB_GET(lf, &strtab); symsz = numsyms * sizeof(Elf_Sym); - buf = malloc(SYMBLKSZ, M_KSYMS, M_WAITOK); - while (symsz > 0) { len = min(SYMBLKSZ, symsz); bcopy(symtab, buf, len); @@ -213,7 +224,13 @@ ksyms_add(linker_file_t lf, void *arg) return (ENXIO); } to->to_resid -= len; - KSYMS_EMIT(buf, to->to_symoff, len); + error = ksyms_emit(sc, buf, to->to_symoff, len); + to->to_symoff += len; + if (error != 0) { + MOD_SUNLOCK; + free(buf, M_KSYMS); + return (error); + } symtab += nsyms; symsz -= len; @@ -224,10 +241,11 @@ ksyms_add(linker_file_t lf, void *arg) if (strsz > to->to_resid) return (ENXIO); to->to_resid -= strsz; - KSYMS_EMIT(strtab, to->to_stroff, strsz); + error = ksyms_emit(sc, strtab, to->to_stroff, strsz); + to->to_stroff += strsz; to->to_stridx += strsz; - return (0); + return (error); } /* @@ -236,11 +254,11 @@ ksyms_add(linker_file_t lf, void *arg) * 0 on success, otherwise error. */ static int -ksyms_snapshot(struct tsizes *ts, vm_offset_t uaddr, size_t resid) +ksyms_snapshot(struct ksyms_softc *sc, struct tsizes *ts) { - struct ksyms_hdr *hdr; struct toffsets to; - int error = 0; + struct ksyms_hdr *hdr; + int error; hdr = malloc(sizeof(*hdr), M_KSYMS, M_WAITOK | M_ZERO); @@ -334,39 +352,41 @@ ksyms_snapshot(struct tsizes *ts, vm_offset_t uaddr, s /* Copy shstrtab into the header. */ bcopy(ksyms_shstrtab, hdr->kh_shstrtab, sizeof(ksyms_shstrtab)); - to.to_symoff = uaddr + hdr->kh_shdr[SHDR_SYMTAB].sh_offset; - to.to_stroff = uaddr + hdr->kh_shdr[SHDR_STRTAB].sh_offset; + to.to_sc = sc; + to.to_symoff = hdr->kh_shdr[SHDR_SYMTAB].sh_offset; + to.to_stroff = hdr->kh_shdr[SHDR_STRTAB].sh_offset; to.to_stridx = 0; - if (sizeof(struct ksyms_hdr) > resid) { - free(hdr, M_KSYMS); - return (ENXIO); - } - to.to_resid = resid - sizeof(struct ksyms_hdr); + to.to_resid = sc->sc_objsz - sizeof(struct ksyms_hdr); /* emit header */ - copyout(hdr, (void *)uaddr, sizeof(struct ksyms_hdr)); - + error = ksyms_emit(sc, hdr, 0, sizeof(*hdr)); free(hdr, M_KSYMS); + if (error != 0) + return (error); /* Add symbol and string tables for each kernel module. */ error = linker_file_foreach(ksyms_add, &to); - + if (error != 0) + return (error); if (to.to_resid != 0) return (ENXIO); - - return (error); + return (0); } static void ksyms_cdevpriv_dtr(void *data) { struct ksyms_softc *sc; + vm_object_t obj; sc = (struct ksyms_softc *)data; - mtx_lock(&ksyms_mtx); + sx_xlock(&ksyms_mtx); LIST_REMOVE(sc, sc_list); - mtx_unlock(&ksyms_mtx); + sx_xunlock(&ksyms_mtx); + obj = sc->sc_obj; + if (obj != NULL) + vm_object_deallocate(obj); free(sc, M_KSYMS); } @@ -375,34 +395,31 @@ ksyms_open(struct cdev *dev, int flags, int fmt __unus { struct tsizes ts; struct ksyms_softc *sc; - size_t total_elf_sz; + vm_size_t elfsz; int error, try; /* * Limit one open() per process. The process must close() * before open()'ing again. */ - mtx_lock(&ksyms_mtx); + sx_xlock(&ksyms_mtx); LIST_FOREACH(sc, &ksyms_list, sc_list) { if (sc->sc_proc == td->td_proc) { - mtx_unlock(&ksyms_mtx); + sx_xunlock(&ksyms_mtx); return (EBUSY); } } - sc = malloc(sizeof(*sc), M_KSYMS, M_NOWAIT | M_ZERO); - if (sc == NULL) { - mtx_unlock(&ksyms_mtx); - return (ENOMEM); - } + sc = malloc(sizeof(*sc), M_KSYMS, M_WAITOK | M_ZERO); sc->sc_proc = td->td_proc; - sc->sc_pmap = &td->td_proc->p_vmspace->vm_pmap; LIST_INSERT_HEAD(&ksyms_list, sc, sc_list); - mtx_unlock(&ksyms_mtx); + sx_xunlock(&ksyms_mtx); error = devfs_set_cdevpriv(sc, ksyms_cdevpriv_dtr); - if (error != 0) - goto failed; + if (error != 0) { + ksyms_cdevpriv_dtr(sc); + return (error); + } /* * MOD_SLOCK doesn't work here (because of a lock reversal with @@ -412,32 +429,20 @@ ksyms_open(struct cdev *dev, int flags, int fmt __unus * time. */ for (try = 0; try < 3; try++) { - /* - * Map a buffer in the calling process memory space and - * create a snapshot of the kernel symbol table in it. - */ - - /* Compute the size of buffer needed. */ ksyms_size_calc(&ts); - total_elf_sz = sizeof(struct ksyms_hdr) + ts.ts_symsz + - ts.ts_strsz; + elfsz = sizeof(struct ksyms_hdr) + ts.ts_symsz + ts.ts_strsz; - error = copyout_map(td, &sc->sc_uaddr, (vm_size_t)total_elf_sz); - if (error != 0) - break; - sc->sc_usize = total_elf_sz; + sc->sc_obj = vm_object_allocate(OBJT_DEFAULT, + OFF_TO_IDX(round_page(elfsz))); + sc->sc_objsz = elfsz; - error = ksyms_snapshot(&ts, sc->sc_uaddr, total_elf_sz); + error = ksyms_snapshot(sc, &ts); if (error == 0) - /* successful snapshot */ - return (0); + break; - /* Snapshot failed, unmap the memory and try again. */ - (void)copyout_unmap(td, sc->sc_uaddr, sc->sc_usize); + vm_object_deallocate(sc->sc_obj); + sc->sc_obj = NULL; } - -failed: - ksyms_cdevpriv_dtr(sc); return (error); } @@ -445,125 +450,38 @@ static int ksyms_read(struct cdev *dev, struct uio *uio, int flags __unused) { struct ksyms_softc *sc; - char *buf; - off_t off; - size_t len, sz; - vm_size_t ubase; int error; error = devfs_get_cdevpriv((void **)&sc); if (error != 0) return (error); - - off = uio->uio_offset; - len = uio->uio_resid; - - if (off < 0 || off > sc->sc_usize) - return (EFAULT); - - if (len > sc->sc_usize - off) - len = sc->sc_usize - off; - if (len == 0) - return (0); - - /* - * Since the snapshot buffer is in the user space we have to copy it - * in to the kernel and then back out. The extra copy saves valuable - * kernel memory. - */ - buf = malloc(PAGE_SIZE, M_KSYMS, M_WAITOK); - ubase = sc->sc_uaddr + off; - - while (len) { - sz = min(PAGE_SIZE, len); - if (copyin((void *)ubase, buf, sz) != 0) - error = EFAULT; - else - error = uiomove(buf, sz, uio); - if (error != 0) - break; - - len -= sz; - ubase += sz; - } - free(buf, M_KSYMS); - - return (error); + return (uiomove_object(sc->sc_obj, sc->sc_objsz, uio)); } static int -ksyms_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int32_t flag __unused, - struct thread *td __unused) +ksyms_mmap_single(struct cdev *dev, vm_ooffset_t *offset, vm_size_t size, + vm_object_t *objp, int nprot) { struct ksyms_softc *sc; + vm_object_t obj; int error; error = devfs_get_cdevpriv((void **)&sc); if (error != 0) return (error); - switch (cmd) { - case KIOCGSIZE: - /* - * Return the size (in bytes) of the symbol table - * snapshot. - */ - *(size_t *)data = sc->sc_usize; - break; - case KIOCGADDR: - /* - * Return the address of the symbol table snapshot. - * XXX - compat32 version of this? - */ - *(void **)data = (void *)sc->sc_uaddr; - break; - default: - error = ENOTTY; - break; - } + if (*offset < 0 || *offset >= round_page(sc->sc_objsz) || + size > round_page(sc->sc_objsz) - *offset || + (nprot & ~PROT_READ) != 0) + return (EINVAL); - return (error); -} - -static int -ksyms_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, - int prot __unused, vm_memattr_t *memattr __unused) -{ - struct ksyms_softc *sc; - int error; - - error = devfs_get_cdevpriv((void **)&sc); - if (error != 0) - return (error); - - /* - * XXX mmap() will actually map the symbol table into the process - * address space again. - */ - if (offset > round_page(sc->sc_usize) || - (*paddr = pmap_extract(sc->sc_pmap, - (vm_offset_t)sc->sc_uaddr + offset)) == 0) - return (-1); - + obj = sc->sc_obj; + vm_object_reference(obj); + *objp = obj; return (0); } static int -ksyms_close(struct cdev *dev, int flags __unused, int fmt __unused, - struct thread *td) -{ - struct ksyms_softc *sc; - int error; - - error = devfs_get_cdevpriv((void **)&sc); - if (error != 0) - return (error); - - /* Unmap the buffer from the process address space. */ - return (copyout_unmap(td, sc->sc_uaddr, sc->sc_usize)); -} - -static int ksyms_modevent(module_t mod __unused, int type, void *data __unused) { int error; @@ -571,7 +489,7 @@ ksyms_modevent(module_t mod __unused, int type, void * error = 0; switch (type) { case MOD_LOAD: - mtx_init(&ksyms_mtx, "KSyms mtx", NULL, MTX_DEF); + sx_init(&ksyms_mtx, "KSyms mtx"); ksyms_dev = make_dev(&ksyms_cdevsw, 0, UID_ROOT, GID_WHEEL, 0400, KSYMS_DNAME); break; @@ -579,7 +497,7 @@ ksyms_modevent(module_t mod __unused, int type, void * if (!LIST_EMPTY(&ksyms_list)) return (EBUSY); destroy_dev(ksyms_dev); - mtx_destroy(&ksyms_mtx); + sx_destroy(&ksyms_mtx); break; case MOD_SHUTDOWN: break; From owner-svn-src-stable@freebsd.org Tue Sep 5 13:54:28 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EFE5E0ADB4; Tue, 5 Sep 2017 13:54:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65D4B6DB8B; Tue, 5 Sep 2017 13:54:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v85DsR4b083446; Tue, 5 Sep 2017 13:54:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v85DsRiU083445; Tue, 5 Sep 2017 13:54:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709051354.v85DsRiU083445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Sep 2017 13:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323181 - stable/11/sys/dev/md X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/dev/md X-SVN-Commit-Revision: 323181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 13:54:28 -0000 Author: markj Date: Tue Sep 5 13:54:27 2017 New Revision: 323181 URL: https://svnweb.freebsd.org/changeset/base/323181 Log: MFC r319934: Don't call vm_pager_page_unswapped() when writing or deleting a dirty page. Modified: stable/11/sys/dev/md/md.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/md/md.c ============================================================================== --- stable/11/sys/dev/md/md.c Tue Sep 5 13:52:15 2017 (r323180) +++ stable/11/sys/dev/md/md.c Tue Sep 5 13:54:27 2017 (r323181) @@ -1073,8 +1073,10 @@ mdstart_swap(struct md_s *sc, struct bio *bp) } m->valid = VM_PAGE_BITS_ALL; - vm_page_dirty(m); - vm_pager_page_unswapped(m); + if (m->dirty != VM_PAGE_BITS_ALL) { + vm_page_dirty(m); + vm_pager_page_unswapped(m); + } } else if (bp->bio_cmd == BIO_DELETE) { if (len == PAGE_SIZE || m->valid == VM_PAGE_BITS_ALL) rv = VM_PAGER_OK; @@ -1091,10 +1093,12 @@ mdstart_swap(struct md_s *sc, struct bio *bp) /* Page is valid. */ if (len != PAGE_SIZE) { pmap_zero_page_area(m, offs, len); - vm_page_dirty(m); - } - vm_pager_page_unswapped(m); - if (len == PAGE_SIZE) { + if (m->dirty != VM_PAGE_BITS_ALL) { + vm_page_dirty(m); + vm_pager_page_unswapped(m); + } + } else { + vm_pager_page_unswapped(m); md_swap_page_free(m); m = NULL; } From owner-svn-src-stable@freebsd.org Tue Sep 5 13:55:15 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86094E0AEAF; Tue, 5 Sep 2017 13:55:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E9A96DE2D; Tue, 5 Sep 2017 13:55:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v85DtEYd083564; Tue, 5 Sep 2017 13:55:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v85DtELr083563; Tue, 5 Sep 2017 13:55:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201709051355.v85DtELr083563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Sep 2017 13:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323182 - stable/11/sys/dev/md X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/dev/md X-SVN-Commit-Revision: 323182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 13:55:15 -0000 Author: markj Date: Tue Sep 5 13:55:14 2017 New Revision: 323182 URL: https://svnweb.freebsd.org/changeset/base/323182 Log: MFC r319933: Free the request page if an I/O error occurs while reading from swap. Modified: stable/11/sys/dev/md/md.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/md/md.c ============================================================================== --- stable/11/sys/dev/md/md.c Tue Sep 5 13:54:27 2017 (r323181) +++ stable/11/sys/dev/md/md.c Tue Sep 5 13:55:14 2017 (r323182) @@ -1027,7 +1027,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp) rv = vm_pager_get_pages(sc->object, &m, 1, NULL, NULL); if (rv == VM_PAGER_ERROR) { - vm_page_xunbusy(m); + md_swap_page_free(m); break; } else if (rv == VM_PAGER_FAIL) { /* @@ -1057,7 +1057,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp) rv = vm_pager_get_pages(sc->object, &m, 1, NULL, NULL); if (rv == VM_PAGER_ERROR) { - vm_page_xunbusy(m); + md_swap_page_free(m); break; } else if (rv == VM_PAGER_FAIL) pmap_zero_page(m); @@ -1084,7 +1084,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp) rv = vm_pager_get_pages(sc->object, &m, 1, NULL, NULL); if (rv == VM_PAGER_ERROR) { - vm_page_xunbusy(m); + md_swap_page_free(m); break; } else if (rv == VM_PAGER_FAIL) { md_swap_page_free(m); From owner-svn-src-stable@freebsd.org Tue Sep 5 15:21:35 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A867CE0E4CA; Tue, 5 Sep 2017 15:21:35 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6620F82168; Tue, 5 Sep 2017 15:21:35 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v85FLY92019675; Tue, 5 Sep 2017 15:21:34 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v85FLY8q019674; Tue, 5 Sep 2017 15:21:34 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709051521.v85FLY8q019674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Tue, 5 Sep 2017 15:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323186 - stable/11/tests/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/tests/sys/kern X-SVN-Commit-Revision: 323186 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 15:21:35 -0000 Author: rlibby Date: Tue Sep 5 15:21:34 2017 New Revision: 323186 URL: https://svnweb.freebsd.org/changeset/base/323186 Log: MFC r316397 (by bde): Remove the unportable -msse4 here too after fixing crc32_sse42.c to not depend on it. This should have been part of r315983. Note, r315983 was MFC'd to stable/11 in r317149. Approved by: markj (mentor) Modified: stable/11/tests/sys/kern/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/kern/Makefile ============================================================================== --- stable/11/tests/sys/kern/Makefile Tue Sep 5 15:19:14 2017 (r323185) +++ stable/11/tests/sys/kern/Makefile Tue Sep 5 15:21:34 2017 (r323186) @@ -29,7 +29,7 @@ LIBADD.mqueue_test+= rt ${MACHINE_ARCH} == "i386" || \ ${MACHINE_ARCH} == "aarch64" ATF_TESTS_C+= libkern_crc32 -CFLAGS.libkern_crc32+= -msse4 -DUSERSPACE_TESTING +CFLAGS.libkern_crc32+= -DUSERSPACE_TESTING .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/x86/crc32_sse42.c .else From owner-svn-src-stable@freebsd.org Tue Sep 5 16:59:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38A23E127BE; Tue, 5 Sep 2017 16:59:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D78D171FAF; Tue, 5 Sep 2017 16:59:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v85GxJOs058603; Tue, 5 Sep 2017 16:59:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v85GxJKT058602; Tue, 5 Sep 2017 16:59:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201709051659.v85GxJKT058602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 5 Sep 2017 16:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323187 - stable/11/lib/libcompiler_rt X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/lib/libcompiler_rt X-SVN-Commit-Revision: 323187 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 16:59:21 -0000 Author: dim Date: Tue Sep 5 16:59:19 2017 New Revision: 323187 URL: https://svnweb.freebsd.org/changeset/base/323187 Log: MFC r323001: In compiler-rt, a few assembler implementations for i386 floating point conversion functions use SSE2 instructions, but these are not guarded by #ifdef __SSE2__, and there is no implementation using general purpose registers. For these functions, use the generic C variants instead, otherwise they will cause SIGILL on older processors. Reported by: bsdpr@phoe.frmug.org PR: 221733 Modified: stable/11/lib/libcompiler_rt/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libcompiler_rt/Makefile.inc ============================================================================== --- stable/11/lib/libcompiler_rt/Makefile.inc Tue Sep 5 15:21:34 2017 (r323186) +++ stable/11/lib/libcompiler_rt/Makefile.inc Tue Sep 5 16:59:19 2017 (r323187) @@ -55,18 +55,12 @@ SRCF+= fixunsxfsi SRCF+= fixunsxfti SRCF+= fixxfdi SRCF+= fixxfti -SRCF+= floatdidf -SRCF+= floatdisf SRCF+= floatditf -SRCF+= floatdixf SRCF+= floatsitf SRCF+= floattidf SRCF+= floattisf SRCF+= floattixf -SRCF+= floatundidf -SRCF+= floatundisf SRCF+= floatunditf -SRCF+= floatundixf SRCF+= floatunsidf SRCF+= floatunsisf SRCF+= floatuntidf @@ -122,6 +116,23 @@ SRCF+= udivmodti4 SRCF+= udivti3 SRCF+= umoddi3 SRCF+= umodti3 + +# Avoid using SSE2 instructions on i386. +.if ${MACHINE_CPUARCH} == "i386" +SRCS+= floatdidf.c +SRCS+= floatdisf.c +SRCS+= floatdixf.c +SRCS+= floatundidf.c +SRCS+= floatundisf.c +SRCS+= floatundixf.c +.else +SRCF+= floatdidf +SRCF+= floatdisf +SRCF+= floatdixf +SRCF+= floatundidf +SRCF+= floatundisf +SRCF+= floatundixf +.endif # __cpu_model support, only used on x86 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" From owner-svn-src-stable@freebsd.org Tue Sep 5 17:12:16 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A623E1340C; Tue, 5 Sep 2017 17:12:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 824B374DCB; Tue, 5 Sep 2017 17:12:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v85HCCtA066599; Tue, 5 Sep 2017 17:12:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v85HCCm0066598; Tue, 5 Sep 2017 17:12:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201709051712.v85HCCm0066598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 5 Sep 2017 17:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323188 - stable/11/lib/libcompiler_rt X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/lib/libcompiler_rt X-SVN-Commit-Revision: 323188 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 17:12:16 -0000 Author: dim Date: Tue Sep 5 17:12:12 2017 New Revision: 323188 URL: https://svnweb.freebsd.org/changeset/base/323188 Log: MFC r323014: Follow-up to r323001: if the actually selected CPUTYPE is capable of SSE2 instructions, we can use them. Suggested by: jkim PR: 221733 Modified: stable/11/lib/libcompiler_rt/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libcompiler_rt/Makefile.inc ============================================================================== --- stable/11/lib/libcompiler_rt/Makefile.inc Tue Sep 5 16:59:19 2017 (r323187) +++ stable/11/lib/libcompiler_rt/Makefile.inc Tue Sep 5 17:12:12 2017 (r323188) @@ -117,8 +117,8 @@ SRCF+= udivti3 SRCF+= umoddi3 SRCF+= umodti3 -# Avoid using SSE2 instructions on i386. -.if ${MACHINE_CPUARCH} == "i386" +# Avoid using SSE2 instructions on i386, if unsupported. +.if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2) SRCS+= floatdidf.c SRCS+= floatdisf.c SRCS+= floatdixf.c From owner-svn-src-stable@freebsd.org Tue Sep 5 17:32:17 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33531E1492A; Tue, 5 Sep 2017 17:32:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B2267D844; Tue, 5 Sep 2017 17:32:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v85HWFwV073066; Tue, 5 Sep 2017 17:32:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v85HWFEE073065; Tue, 5 Sep 2017 17:32:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201709051732.v85HWFEE073065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 5 Sep 2017 17:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323189 - stable/10/lib/libcompiler_rt X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/10/lib/libcompiler_rt X-SVN-Commit-Revision: 323189 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 17:32:17 -0000 Author: dim Date: Tue Sep 5 17:32:14 2017 New Revision: 323189 URL: https://svnweb.freebsd.org/changeset/base/323189 Log: MFC r323001: In compiler-rt, a few assembler implementations for i386 floating point conversion functions use SSE2 instructions, but these are not guarded by #ifdef __SSE2__, and there is no implementation using general purpose registers. For these functions, use the generic C variants instead, otherwise they will cause SIGILL on older processors. Approved by: re (kib) Reported by: bsdpr@phoe.frmug.org PR: 221733 MFC r323014: Follow-up to r323001: if the actually selected CPUTYPE is capable of SSE2 instructions, we can use them. Suggested by: jkim PR: 221733 Modified: stable/10/lib/libcompiler_rt/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcompiler_rt/Makefile ============================================================================== --- stable/10/lib/libcompiler_rt/Makefile Tue Sep 5 17:12:12 2017 (r323188) +++ stable/10/lib/libcompiler_rt/Makefile Tue Sep 5 17:32:14 2017 (r323189) @@ -65,15 +65,9 @@ SRCF= absvdi2 \ fixunsxfti \ fixxfdi \ fixxfti \ - floatdidf \ - floatdisf \ - floatdixf \ floattidf \ floattisf \ floattixf \ - floatundidf \ - floatundisf \ - floatundixf \ floatunsidf \ floatunsisf \ floatuntidf \ @@ -125,6 +119,23 @@ SRCF= absvdi2 \ udivti3 \ umoddi3 \ umodti3 + +# Avoid using SSE2 instructions on i386, if unsupported. +.if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2) +SRCS+= floatdidf.c +SRCS+= floatdisf.c +SRCS+= floatdixf.c +SRCS+= floatundidf.c +SRCS+= floatundisf.c +SRCS+= floatundixf.c +.else +SRCF+= floatdidf +SRCF+= floatdisf +SRCF+= floatdixf +SRCF+= floatundidf +SRCF+= floatundisf +SRCF+= floatundixf +.endif # These are already shipped by libc.a on arm and mips .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" From owner-svn-src-stable@freebsd.org Tue Sep 5 17:35:35 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BF51E14C3F; Tue, 5 Sep 2017 17:35:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB2747E37C; Tue, 5 Sep 2017 17:35:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v85HZY9v075390; Tue, 5 Sep 2017 17:35:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v85HZYQY075389; Tue, 5 Sep 2017 17:35:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201709051735.v85HZYQY075389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 5 Sep 2017 17:35:34 +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: r323190 - stable/9/lib/libcompiler_rt X-SVN-Group: stable-9 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/9/lib/libcompiler_rt X-SVN-Commit-Revision: 323190 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 17:35:35 -0000 Author: dim Date: Tue Sep 5 17:35:33 2017 New Revision: 323190 URL: https://svnweb.freebsd.org/changeset/base/323190 Log: MFC r323001: In compiler-rt, a few assembler implementations for i386 floating point conversion functions use SSE2 instructions, but these are not guarded by #ifdef __SSE2__, and there is no implementation using general purpose registers. For these functions, use the generic C variants instead, otherwise they will cause SIGILL on older processors. Reported by: bsdpr@phoe.frmug.org PR: 221733 MFC r323014: Follow-up to r323001: if the actually selected CPUTYPE is capable of SSE2 instructions, we can use them. Suggested by: jkim Modified: stable/9/lib/libcompiler_rt/Makefile Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libcompiler_rt/ (props changed) Modified: stable/9/lib/libcompiler_rt/Makefile ============================================================================== --- stable/9/lib/libcompiler_rt/Makefile Tue Sep 5 17:32:14 2017 (r323189) +++ stable/9/lib/libcompiler_rt/Makefile Tue Sep 5 17:35:33 2017 (r323190) @@ -65,15 +65,9 @@ SRCF= absvdi2 \ fixunsxfti \ fixxfdi \ fixxfti \ - floatdidf \ - floatdisf \ - floatdixf \ floattidf \ floattisf \ floattixf \ - floatundidf \ - floatundisf \ - floatundixf \ floatunsidf \ floatunsisf \ floatuntidf \ @@ -125,6 +119,23 @@ SRCF= absvdi2 \ udivti3 \ umoddi3 \ umodti3 + +# Avoid using SSE2 instructions on i386, if unsupported. +.if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2) +SRCS+= floatdidf.c +SRCS+= floatdisf.c +SRCS+= floatdixf.c +SRCS+= floatundidf.c +SRCS+= floatundisf.c +SRCS+= floatundixf.c +.else +SRCF+= floatdidf +SRCF+= floatdisf +SRCF+= floatdixf +SRCF+= floatundidf +SRCF+= floatundisf +SRCF+= floatundixf +.endif # These are already shipped by libc.a on arm and mips .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" From owner-svn-src-stable@freebsd.org Wed Sep 6 01:38:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22ABCE06E47; Wed, 6 Sep 2017 01:38:03 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFAD334C5; Wed, 6 Sep 2017 01:38:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v861c2pP072302; Wed, 6 Sep 2017 01:38:02 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v861c25i072301; Wed, 6 Sep 2017 01:38:02 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709060138.v861c25i072301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 6 Sep 2017 01:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323199 - stable/11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 01:38:03 -0000 Author: cy Date: Wed Sep 6 01:38:01 2017 New Revision: 323199 URL: https://svnweb.freebsd.org/changeset/base/323199 Log: MFC r322073: Fix matchcing of NATed ICMP queries (resolving NATed MTU discovery). Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Tue Sep 5 22:08:43 2017 (r323198) +++ stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Wed Sep 6 01:38:01 2017 (r323199) @@ -4100,13 +4100,8 @@ ipf_nat_inlookup(fin, flags, p, src, mapdst) dport = htons(fin->fin_data[1]); break; case IPPROTO_ICMP : - if (flags & IPN_ICMPERR) { - sport = fin->fin_data[1]; - dport = 0; - } else { - dport = fin->fin_data[1]; - sport = 0; - } + sport = 0; + dport = fin->fin_data[1]; break; default : sport = 0; @@ -4426,8 +4421,6 @@ ipf_nat_outlookup(fin, flags, p, src, dst) ifp = fin->fin_ifp; sflags = flags & IPN_TCPUDPICMP; - sport = 0; - dport = 0; switch (p) { @@ -4437,12 +4430,12 @@ ipf_nat_outlookup(fin, flags, p, src, dst) dport = htons(fin->fin_data[1]); break; case IPPROTO_ICMP : - if (flags & IPN_ICMPERR) - sport = fin->fin_data[1]; - else - dport = fin->fin_data[1]; + sport = 0; + dport = fin->fin_data[1]; break; default : + sport = 0; + dport = 0; break; } From owner-svn-src-stable@freebsd.org Wed Sep 6 02:03:23 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADB10E07CEF; Wed, 6 Sep 2017 02:03:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CF0F68321; Wed, 6 Sep 2017 02:03:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8623M3e084185; Wed, 6 Sep 2017 02:03:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8623MOx084184; Wed, 6 Sep 2017 02:03:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709060203.v8623MOx084184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Sep 2017 02:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323201 - stable/11/sys/mips/cavium X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/mips/cavium X-SVN-Commit-Revision: 323201 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 02:03:23 -0000 Author: emaste Date: Wed Sep 6 02:03:22 2017 New Revision: 323201 URL: https://svnweb.freebsd.org/changeset/base/323201 Log: MFC r323039: octeon_ebt3000_cf: eliminate string literal warning Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/mips/cavium/octeon_ebt3000_cf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/mips/cavium/octeon_ebt3000_cf.c ============================================================================== --- stable/11/sys/mips/cavium/octeon_ebt3000_cf.c Wed Sep 6 01:55:40 2017 (r323200) +++ stable/11/sys/mips/cavium/octeon_ebt3000_cf.c Wed Sep 6 02:03:22 2017 (r323201) @@ -682,7 +682,8 @@ static void cf_attach_geom (void *arg, int flag) cf_priv = (struct cf_priv *) arg; cf_priv->cf_geom = g_new_geomf(&g_cf_class, "cf%d", device_get_unit(cf_priv->dev)); cf_priv->cf_geom->softc = cf_priv; - cf_priv->cf_provider = g_new_providerf(cf_priv->cf_geom, cf_priv->cf_geom->name); + cf_priv->cf_provider = g_new_providerf(cf_priv->cf_geom, "%s", + cf_priv->cf_geom->name); cf_priv->cf_provider->sectorsize = cf_priv->drive_param.sector_size; cf_priv->cf_provider->mediasize = cf_priv->drive_param.nr_sectors * cf_priv->cf_provider->sectorsize; g_error_provider(cf_priv->cf_provider, 0); From owner-svn-src-stable@freebsd.org Wed Sep 6 02:04:16 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14D73E07DDC; Wed, 6 Sep 2017 02:04:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95096686AB; Wed, 6 Sep 2017 02:04:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8624Em1084271; Wed, 6 Sep 2017 02:04:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8624EVp084270; Wed, 6 Sep 2017 02:04:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709060204.v8624EVp084270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Sep 2017 02:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323202 - stable/11/sys/mips/rmi X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/mips/rmi X-SVN-Commit-Revision: 323202 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 02:04:16 -0000 Author: emaste Date: Wed Sep 6 02:04:14 2017 New Revision: 323202 URL: https://svnweb.freebsd.org/changeset/base/323202 Log: MFC r323040: xls_ehci: eliminate string literal warning Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/mips/rmi/xls_ehci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/mips/rmi/xls_ehci.c ============================================================================== --- stable/11/sys/mips/rmi/xls_ehci.c Wed Sep 6 02:03:22 2017 (r323201) +++ stable/11/sys/mips/rmi/xls_ehci.c Wed Sep 6 02:04:14 2017 (r323202) @@ -130,7 +130,7 @@ ehci_xls_attach(device_t self) device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); device_set_desc(sc->sc_bus.bdev, xlr_usb_dev_desc); - sprintf(sc->sc_vendor, xlr_vendor_desc); + strlcpy(sc->sc_vendor, xlr_vendor_desc, sizeof(sc->sc_vendor)); err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, From owner-svn-src-stable@freebsd.org Wed Sep 6 02:05:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15045E07EEF; Wed, 6 Sep 2017 02:05:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8428068AE7; Wed, 6 Sep 2017 02:05:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8625Jqd084367; Wed, 6 Sep 2017 02:05:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8625J0Y084366; Wed, 6 Sep 2017 02:05:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709060205.v8625J0Y084366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Sep 2017 02:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323203 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 323203 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 02:05:21 -0000 Author: emaste Date: Wed Sep 6 02:05:19 2017 New Revision: 323203 URL: https://svnweb.freebsd.org/changeset/base/323203 Log: MFC r323010: hv_vss.4: Fix spelling of 'responsibility' PR: 221300 Submitted by: Fabian Keil Obtained from: ElectroBSD Modified: stable/11/share/man/man4/hv_vss.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/hv_vss.4 ============================================================================== --- stable/11/share/man/man4/hv_vss.4 Wed Sep 6 02:04:14 2017 (r323202) +++ stable/11/share/man/man4/hv_vss.4 Wed Sep 6 02:05:19 2017 (r323203) @@ -66,7 +66,7 @@ VM, and sends the result back to Hyper-V host. .Pp Generally, .Xr hv_vss_daemon 8 -takes the responsiblity to freeze/thaw UFS file system, +takes the responsibility to freeze/thaw UFS file system, and it is automatically launched after system boots. When Hyper-V host wants to take a snapshot of the .Fx From owner-svn-src-stable@freebsd.org Wed Sep 6 02:06:53 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27177E07FDE; Wed, 6 Sep 2017 02:06:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2FE2695B1; Wed, 6 Sep 2017 02:06:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8626paW084491; Wed, 6 Sep 2017 02:06:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8626pmg084489; Wed, 6 Sep 2017 02:06:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709060206.v8626pmg084489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Sep 2017 02:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323204 - in stable/11/sys/dev/usb: . quirk X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11/sys/dev/usb: . quirk X-SVN-Commit-Revision: 323204 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 02:06:53 -0000 Author: emaste Date: Wed Sep 6 02:06:51 2017 New Revision: 323204 URL: https://svnweb.freebsd.org/changeset/base/323204 Log: MFC r323011: usb: Add external "Intenso Memory" disk quirk PR: 221852 Submitted by: Fabian Keil Obtained from: ElectroBSD Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/11/sys/dev/usb/quirk/usb_quirk.c Wed Sep 6 02:05:19 2017 (r323203) +++ stable/11/sys/dev/usb/quirk/usb_quirk.c Wed Sep 6 02:06:51 2017 (r323204) @@ -235,6 +235,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK UQ_MSC_FORCE_PROTO_RBC), USB_QUIRK(INSYSTEM, STORAGE_V2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC), + USB_QUIRK(INTENSO, MEMORY_BOX, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), USB_QUIRK(IODATA, IU_CD2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(IODATA, DVR_UEH8, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Wed Sep 6 02:05:19 2017 (r323203) +++ stable/11/sys/dev/usb/usbdevs Wed Sep 6 02:06:51 2017 (r323204) @@ -60,6 +60,7 @@ vendor UNKNOWN2 0x0105 Unknown vendor vendor EGALAX2 0x0123 eGalax, Inc. vendor CHIPSBANK 0x0204 Chipsbank Microelectronics Co. vendor HUMAX 0x02ad HUMAX +vendor INTENSO 0x2109 INTENSO vendor LTS 0x0386 LTS vendor BWCT 0x03da Bernd Walter Computer Technology vendor AOX 0x03e8 AOX @@ -2468,6 +2469,9 @@ product INSYSTEM ISD110 0x0200 IDE Adapter ISD110 product INSYSTEM ISD105 0x0202 IDE Adapter ISD105 product INSYSTEM USBCABLE 0x081a USB cable product INSYSTEM STORAGE_V2 0x5701 USB Storage Adapter V2 + +/* Intenso products */ +product INTENSO MEMORY_BOX 0x0701 External disk /* Intel products */ product INTEL EASYPC_CAMERA 0x0110 Easy PC Camera From owner-svn-src-stable@freebsd.org Wed Sep 6 02:07:45 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1E48E0808C; Wed, 6 Sep 2017 02:07:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7CAE69947; Wed, 6 Sep 2017 02:07:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8627i1B084591; Wed, 6 Sep 2017 02:07:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8627iGH084590; Wed, 6 Sep 2017 02:07:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709060207.v8627iGH084590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Sep 2017 02:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323205 - stable/11/sys/mips/atheros X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/mips/atheros X-SVN-Commit-Revision: 323205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 02:07:46 -0000 Author: emaste Date: Wed Sep 6 02:07:44 2017 New Revision: 323205 URL: https://svnweb.freebsd.org/changeset/base/323205 Log: MFC r323022: arge: correct bzero sizeof (pointed-to object, not pointer) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/mips/atheros/if_arge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/mips/atheros/if_arge.c ============================================================================== --- stable/11/sys/mips/atheros/if_arge.c Wed Sep 6 02:06:51 2017 (r323204) +++ stable/11/sys/mips/atheros/if_arge.c Wed Sep 6 02:07:44 2017 (r323205) @@ -2130,7 +2130,7 @@ arge_tx_ring_init(struct arge_softc *sc) sc->arge_cdata.arge_tx_cnt = 0; rd = &sc->arge_rdata; - bzero(rd->arge_tx_ring, sizeof(rd->arge_tx_ring)); + bzero(rd->arge_tx_ring, sizeof(*rd->arge_tx_ring)); for (i = 0; i < ARGE_TX_RING_COUNT; i++) { if (i == ARGE_TX_RING_COUNT - 1) addr = ARGE_TX_RING_ADDR(sc, 0); @@ -2189,7 +2189,7 @@ arge_rx_ring_init(struct arge_softc *sc) sc->arge_cdata.arge_rx_cons = 0; rd = &sc->arge_rdata; - bzero(rd->arge_rx_ring, sizeof(rd->arge_rx_ring)); + bzero(rd->arge_rx_ring, sizeof(*rd->arge_rx_ring)); for (i = 0; i < ARGE_RX_RING_COUNT; i++) { rxd = &sc->arge_cdata.arge_rxdesc[i]; if (rxd->rx_m != NULL) { From owner-svn-src-stable@freebsd.org Wed Sep 6 06:51:53 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8939E172BD; Wed, 6 Sep 2017 06:51:53 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5257564A8A; Wed, 6 Sep 2017 06:51:53 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v866pqYq000390; Wed, 6 Sep 2017 06:51:52 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v866pqui000389; Wed, 6 Sep 2017 06:51:52 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709060651.v866pqui000389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Wed, 6 Sep 2017 06:51:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323207 - stable/11/sys/dev/xen/netfront X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/sys/dev/xen/netfront X-SVN-Commit-Revision: 323207 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 06:51:54 -0000 Author: rlibby Date: Wed Sep 6 06:51:52 2017 New Revision: 323207 URL: https://svnweb.freebsd.org/changeset/base/323207 Log: MFC r320517: netfront.c: avoid gcc variably-modified warning Modified: stable/11/sys/dev/xen/netfront/netfront.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/11/sys/dev/xen/netfront/netfront.c Wed Sep 6 03:19:52 2017 (r323206) +++ stable/11/sys/dev/xen/netfront/netfront.c Wed Sep 6 06:51:52 2017 (r323207) @@ -74,8 +74,8 @@ __FBSDID("$FreeBSD$"); /* Features supported by all backends. TSO and LRO can be negotiated */ #define XN_CSUM_FEATURES (CSUM_TCP | CSUM_UDP) -#define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE) -#define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE) +#define NET_TX_RING_SIZE __CONST_RING_SIZE(netif_tx, PAGE_SIZE) +#define NET_RX_RING_SIZE __CONST_RING_SIZE(netif_rx, PAGE_SIZE) #define NET_RX_SLOTS_MIN (XEN_NETIF_NR_SLOTS_MIN + 1) From owner-svn-src-stable@freebsd.org Wed Sep 6 06:57:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A174E1747B; Wed, 6 Sep 2017 06:57:20 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FEB365D51; Wed, 6 Sep 2017 06:57:19 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v866vIZo002971; Wed, 6 Sep 2017 06:57:18 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v866vIro002970; Wed, 6 Sep 2017 06:57:18 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709060657.v866vIro002970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Wed, 6 Sep 2017 06:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323208 - stable/11/sys/dev/hptmv X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/sys/dev/hptmv X-SVN-Commit-Revision: 323208 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 06:57:20 -0000 Author: rlibby Date: Wed Sep 6 06:57:18 2017 New Revision: 323208 URL: https://svnweb.freebsd.org/changeset/base/323208 Log: MFC r320714: hptmv: avoid gcc variably-modified warning Modified: stable/11/sys/dev/hptmv/vdevice.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hptmv/vdevice.h ============================================================================== --- stable/11/sys/dev/hptmv/vdevice.h Wed Sep 6 06:51:52 2017 (r323207) +++ stable/11/sys/dev/hptmv/vdevice.h Wed Sep 6 06:57:18 2017 (r323208) @@ -77,8 +77,8 @@ typedef struct _VDevice } VDevice; -#define ARRAY_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(RaidArray)) -#define DISK_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(Device)) +#define ARRAY_VDEV_SIZE (offsetof(VDevice, u) + sizeof(RaidArray)) +#define DISK_VDEV_SIZE (offsetof(VDevice, u) + sizeof(Device)) #define Map2pVDevice(pDev) ((PVDevice)((UINT_PTR)pDev - (UINT)(UINT_PTR)&((PVDevice)0)->u.disk)) From owner-svn-src-stable@freebsd.org Wed Sep 6 07:04:30 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3289E17941; Wed, 6 Sep 2017 07:04:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0486779A; Wed, 6 Sep 2017 07:04:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8674Tt4007043; Wed, 6 Sep 2017 07:04:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8674T9C007041; Wed, 6 Sep 2017 07:04:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709060704.v8674T9C007041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 6 Sep 2017 07:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323209 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323209 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 07:04:31 -0000 Author: kib Date: Wed Sep 6 07:04:29 2017 New Revision: 323209 URL: https://svnweb.freebsd.org/changeset/base/323209 Log: MFC r323017: Make the swap_pager_full variable static. PR: 221356 Modified: stable/11/sys/vm/swap_pager.c stable/11/sys/vm/swap_pager.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Wed Sep 6 06:57:18 2017 (r323208) +++ stable/11/sys/vm/swap_pager.c Wed Sep 6 07:04:29 2017 (r323209) @@ -314,7 +314,7 @@ swap_release_by_cred(vm_ooffset_t decr, struct ucred * #define SWM_FREE 0x02 /* free, period */ #define SWM_POP 0x04 /* pop out */ -int swap_pager_full = 2; /* swap space exhaustion (task killing) */ +static int swap_pager_full = 2; /* swap space exhaustion (task killing) */ static int swap_pager_almost_full = 1; /* swap space exhaustion (w/hysteresis)*/ static int nsw_rcount; /* free read buffers */ static int nsw_wcount_sync; /* limit write buffers / synchronous */ Modified: stable/11/sys/vm/swap_pager.h ============================================================================== --- stable/11/sys/vm/swap_pager.h Wed Sep 6 06:57:18 2017 (r323208) +++ stable/11/sys/vm/swap_pager.h Wed Sep 6 07:04:29 2017 (r323209) @@ -73,7 +73,6 @@ struct swdevt { #ifdef _KERNEL -extern int swap_pager_full; extern int swap_pager_avail; struct xswdev; From owner-svn-src-stable@freebsd.org Wed Sep 6 07:07:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F053E17ADA; Wed, 6 Sep 2017 07:07:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8BE6681BA; Wed, 6 Sep 2017 07:06:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8676wmb007196; Wed, 6 Sep 2017 07:06:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8676wCX007195; Wed, 6 Sep 2017 07:06:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709060706.v8676wCX007195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 6 Sep 2017 07:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323210 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 323210 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 07:07:00 -0000 Author: kib Date: Wed Sep 6 07:06:58 2017 New Revision: 323210 URL: https://svnweb.freebsd.org/changeset/base/323210 Log: MFC r323018: Adjust interface of swapon_check_swzone() to its actual usage. PR: 221356 Modified: stable/11/sys/vm/swap_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Wed Sep 6 07:04:29 2017 (r323209) +++ stable/11/sys/vm/swap_pager.c Wed Sep 6 07:06:58 2017 (r323210) @@ -2071,13 +2071,14 @@ done: /* * Check that the total amount of swap currently configured does not * exceed half the theoretical maximum. If it does, print a warning - * message and return -1; otherwise, return 0. + * message. */ -static int -swapon_check_swzone(unsigned long npages) +static void +swapon_check_swzone(void) { - unsigned long maxpages; + unsigned long maxpages, npages; + npages = swap_total / PAGE_SIZE; /* absolute maximum we can handle assuming 100% efficiency */ maxpages = uma_zone_get_max(swap_zone) * SWAP_META_PAGES; @@ -2088,9 +2089,7 @@ swapon_check_swzone(unsigned long npages) npages, maxpages / 2); printf("warning: increase kern.maxswzone " "or reduce amount of swap.\n"); - return (-1); } - return (0); } static void @@ -2158,7 +2157,7 @@ swaponsomething(struct vnode *vp, void *id, u_long nbl nswapdev++; swap_pager_avail += nblks - 2; swap_total += (vm_ooffset_t)nblks * PAGE_SIZE; - swapon_check_swzone(swap_total / PAGE_SIZE); + swapon_check_swzone(); swp_sizecheck(); mtx_unlock(&sw_dev_mtx); } From owner-svn-src-stable@freebsd.org Wed Sep 6 07:08:54 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E99EE17C5C; Wed, 6 Sep 2017 07:08:54 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07F7D6892C; Wed, 6 Sep 2017 07:08:53 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8678q9Z007349; Wed, 6 Sep 2017 07:08:52 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8678qIw007343; Wed, 6 Sep 2017 07:08:52 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709060708.v8678qIw007343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Wed, 6 Sep 2017 07:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323211 - stable/11/sys/dev/ixl X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/sys/dev/ixl X-SVN-Commit-Revision: 323211 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 07:08:54 -0000 Author: rlibby Date: Wed Sep 6 07:08:52 2017 New Revision: 323211 URL: https://svnweb.freebsd.org/changeset/base/323211 Log: MFC r320977: ixl: gcc build errors Modified: stable/11/sys/dev/ixl/i40e_prototype.h stable/11/sys/dev/ixl/if_ixlv.c stable/11/sys/dev/ixl/ixl.h stable/11/sys/dev/ixl/ixl_pf.h stable/11/sys/dev/ixl/ixl_pf_main.c stable/11/sys/dev/ixl/ixl_txrx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ixl/i40e_prototype.h ============================================================================== --- stable/11/sys/dev/ixl/i40e_prototype.h Wed Sep 6 07:06:58 2017 (r323210) +++ stable/11/sys/dev/ixl/i40e_prototype.h Wed Sep 6 07:08:52 2017 (r323211) @@ -538,6 +538,4 @@ enum i40e_status_code i40e_read_phy_register(struct i4 enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, u8 page, u16 reg, u8 phy_addr, u16 value); u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num); -enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw, - u32 time, u32 interval); #endif /* _I40E_PROTOTYPE_H_ */ Modified: stable/11/sys/dev/ixl/if_ixlv.c ============================================================================== --- stable/11/sys/dev/ixl/if_ixlv.c Wed Sep 6 07:06:58 2017 (r323210) +++ stable/11/sys/dev/ixl/if_ixlv.c Wed Sep 6 07:08:52 2017 (r323211) @@ -1075,7 +1075,7 @@ retry_send: if (error == ETIMEDOUT) { if (!send_api_ver_retried) { /* Resend message, one more time */ - send_api_ver_retried++; + send_api_ver_retried = true; device_printf(dev, "%s: Timeout while verifying API version on first" " try!\n", __func__); Modified: stable/11/sys/dev/ixl/ixl.h ============================================================================== --- stable/11/sys/dev/ixl/ixl.h Wed Sep 6 07:06:58 2017 (r323210) +++ stable/11/sys/dev/ixl/ixl.h Wed Sep 6 07:08:52 2017 (r323211) @@ -664,8 +664,7 @@ struct ixl_sysctl_info { char *description; }; -static uint8_t ixl_bcast_addr[ETHER_ADDR_LEN] = - {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; +extern const uint8_t ixl_bcast_addr[ETHER_ADDR_LEN]; /********************************************************************* * TXRX Function prototypes Modified: stable/11/sys/dev/ixl/ixl_pf.h ============================================================================== --- stable/11/sys/dev/ixl/ixl_pf.h Wed Sep 6 07:06:58 2017 (r323210) +++ stable/11/sys/dev/ixl/ixl_pf.h Wed Sep 6 07:08:52 2017 (r323211) @@ -168,16 +168,9 @@ struct ixl_pf { "\nExecutes a \"Get Link Status\" command on the Admin Queue, and displays" \ " the response." \ -static char *ixl_fc_string[6] = { - "None", - "Rx", - "Tx", - "Full", - "Priority", - "Default" -}; +extern const char * const ixl_fc_string[6]; -static MALLOC_DEFINE(M_IXL, "ixl", "ixl driver allocations"); +MALLOC_DECLARE(M_IXL); /*** Functions / Macros ***/ /* Adjust the level here to 10 or over to print stats messages */ @@ -299,8 +292,8 @@ int ixl_rebuild_hw_structs_after_reset(struct ixl_pf * void ixl_set_queue_rx_itr(struct ixl_queue *); void ixl_set_queue_tx_itr(struct ixl_queue *); -void ixl_add_filter(struct ixl_vsi *, u8 *, s16 vlan); -void ixl_del_filter(struct ixl_vsi *, u8 *, s16 vlan); +void ixl_add_filter(struct ixl_vsi *, const u8 *, s16 vlan); +void ixl_del_filter(struct ixl_vsi *, const u8 *, s16 vlan); void ixl_reconfigure_filters(struct ixl_vsi *vsi); int ixl_disable_rings(struct ixl_vsi *); @@ -331,7 +324,7 @@ void ixl_init_filters(struct ixl_vsi *); void ixl_add_hw_filters(struct ixl_vsi *, int, int); void ixl_del_hw_filters(struct ixl_vsi *, int); struct ixl_mac_filter * - ixl_find_filter(struct ixl_vsi *, u8 *, s16); + ixl_find_filter(struct ixl_vsi *, const u8 *, s16); void ixl_add_mc_filter(struct ixl_vsi *, u8 *); void ixl_free_mac_filters(struct ixl_vsi *vsi); void ixl_update_vsi_stats(struct ixl_vsi *); Modified: stable/11/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- stable/11/sys/dev/ixl/ixl_pf_main.c Wed Sep 6 07:06:58 2017 (r323210) +++ stable/11/sys/dev/ixl/ixl_pf_main.c Wed Sep 6 07:08:52 2017 (r323211) @@ -89,6 +89,20 @@ static int ixl_sysctl_qrx_tail_handler(SYSCTL_HANDLER_ extern int ixl_enable_iwarp; #endif +const uint8_t ixl_bcast_addr[ETHER_ADDR_LEN] = + {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; + +const char * const ixl_fc_string[6] = { + "None", + "Rx", + "Tx", + "Full", + "Priority", + "Default" +}; + +MALLOC_DEFINE(M_IXL, "ixl", "ixl driver allocations"); + void ixl_debug_core(struct ixl_pf *pf, enum ixl_dbg_mask mask, char *fmt, ...) { @@ -3193,7 +3207,7 @@ ixl_reconfigure_filters(struct ixl_vsi *vsi) ** This routine adds macvlan filters */ void -ixl_add_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 vlan) +ixl_add_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan) { struct ixl_mac_filter *f, *tmp; struct ixl_pf *pf; @@ -3239,7 +3253,7 @@ ixl_add_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 v } void -ixl_del_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 vlan) +ixl_del_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan) { struct ixl_mac_filter *f; @@ -3264,7 +3278,7 @@ ixl_del_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 v ** Find the filter with both matching mac addr and vlan id */ struct ixl_mac_filter * -ixl_find_filter(struct ixl_vsi *vsi, u8 *macaddr, s16 vlan) +ixl_find_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan) { struct ixl_mac_filter *f; bool match = FALSE; Modified: stable/11/sys/dev/ixl/ixl_txrx.c ============================================================================== --- stable/11/sys/dev/ixl/ixl_txrx.c Wed Sep 6 07:06:58 2017 (r323210) +++ stable/11/sys/dev/ixl/ixl_txrx.c Wed Sep 6 07:08:52 2017 (r323211) @@ -63,8 +63,6 @@ static inline void ixl_rx_input(struct rx_ring *, stru struct mbuf *, u8); static inline bool ixl_tso_detect_sparse(struct mbuf *mp); -static int ixl_tx_setup_offload(struct ixl_queue *que, - struct mbuf *mp, u32 *cmd, u32 *off); static inline u32 ixl_get_tx_head(struct ixl_queue *que); #ifdef DEV_NETMAP From owner-svn-src-stable@freebsd.org Wed Sep 6 07:10:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D86FEE17D48; Wed, 6 Sep 2017 07:10:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69C8F6924B; Wed, 6 Sep 2017 07:10:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8679x6P007455; Wed, 6 Sep 2017 07:09:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8679x4S007454; Wed, 6 Sep 2017 07:09:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709060709.v8679x4S007454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 6 Sep 2017 07:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323212 - stable/11/sys/dev/ixgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/ixgbe X-SVN-Commit-Revision: 323212 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 07:10:01 -0000 Author: kib Date: Wed Sep 6 07:09:59 2017 New Revision: 323212 URL: https://svnweb.freebsd.org/changeset/base/323212 Log: MFC r323024: Only make the if_ix module depend on netmap when netmap is configured. Modified: stable/11/sys/dev/ixgbe/if_ix.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/11/sys/dev/ixgbe/if_ix.c Wed Sep 6 07:08:52 2017 (r323211) +++ stable/11/sys/dev/ixgbe/if_ix.c Wed Sep 6 07:09:59 2017 (r323212) @@ -243,7 +243,9 @@ DRIVER_MODULE(ix, pci, ix_driver, ix_devclass, 0, 0); MODULE_DEPEND(ix, pci, 1, 1, 1); MODULE_DEPEND(ix, ether, 1, 1, 1); +#ifdef DEV_NETMAP MODULE_DEPEND(ix, netmap, 1, 1, 1); +#endif /* * TUNEABLE PARAMETERS: From owner-svn-src-stable@freebsd.org Wed Sep 6 07:15:24 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53A26E18024; Wed, 6 Sep 2017 07:15:24 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8435F6A686; Wed, 6 Sep 2017 07:15:23 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v867FMBi011240; Wed, 6 Sep 2017 07:15:22 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v867FMWc011236; Wed, 6 Sep 2017 07:15:22 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709060715.v867FMWc011236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Wed, 6 Sep 2017 07:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323213 - in stable/11/sys: dev/qlnx/qlnxe modules/qlnx modules/qlnx/qlnxe X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in stable/11/sys: dev/qlnx/qlnxe modules/qlnx modules/qlnx/qlnxe X-SVN-Commit-Revision: 323213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 07:15:24 -0000 Author: rlibby Date: Wed Sep 6 07:15:21 2017 New Revision: 323213 URL: https://svnweb.freebsd.org/changeset/base/323213 Log: MFC r321106: qlnx: gcc build errors Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_hw.h stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c stable/11/sys/modules/qlnx/Makefile stable/11/sys/modules/qlnx/qlnxe/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_hw.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_hw.h Wed Sep 6 07:09:59 2017 (r323212) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_hw.h Wed Sep 6 07:15:21 2017 (r323213) @@ -90,15 +90,6 @@ enum _dmae_cmd_crc_mask { #define DMAE_MAX_CLIENTS 32 /** -* @brief ecore_gtt_init - Initialize GTT windows -* -* @param p_hwfn -* @param p_ptt -*/ -void ecore_gtt_init(struct ecore_hwfn *p_hwfn, - struct ecore_ptt *p_ptt); - -/** * @brief ecore_ptt_invalidate - Forces all ptt entries to be re-configured * * @param p_hwfn Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Wed Sep 6 07:09:59 2017 (r323212) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Wed Sep 6 07:15:21 2017 (r323213) @@ -534,12 +534,13 @@ qlnx_get_regs(qlnx_host_t *ha, qlnx_get_regs_t *regs) return (rval); } +extern char qlnx_name_str[]; +extern char qlnx_ver_str[]; + static int qlnx_drv_info(qlnx_host_t *ha, qlnx_drvinfo_t *drv_info) { int i; - extern char qlnx_name_str[]; - extern char qlnx_ver_str[]; bzero(drv_info, sizeof(qlnx_drvinfo_t)); Modified: stable/11/sys/modules/qlnx/Makefile ============================================================================== --- stable/11/sys/modules/qlnx/Makefile Wed Sep 6 07:09:59 2017 (r323212) +++ stable/11/sys/modules/qlnx/Makefile Wed Sep 6 07:15:21 2017 (r323213) @@ -32,6 +32,8 @@ # $FreeBSD$ # +SYSDIR?=${SRCTOP}/sys +.include "${SYSDIR}/conf/kern.opts.mk" SUBDIR=qlnxe Modified: stable/11/sys/modules/qlnx/qlnxe/Makefile ============================================================================== --- stable/11/sys/modules/qlnx/qlnxe/Makefile Wed Sep 6 07:09:59 2017 (r323212) +++ stable/11/sys/modules/qlnx/qlnxe/Makefile Wed Sep 6 07:15:21 2017 (r323213) @@ -50,7 +50,7 @@ SRCS+= device_if.h SRCS+= bus_if.h SRCS+= pci_if.h -CWARNEXTRA += -Wno-cast-qual +.include #CFLAGS += -DQLNX_DEBUG CFLAGS += -DECORE_PACKAGE @@ -65,6 +65,4 @@ CFLAGS += -DECORE_CONFIG_DIRECT_HWFN #CFLAGS += -DQLNX_MAX_COALESCE #CFLAGS += -DQLNX_RCV_IN_TASKQ - -.include - +CWARNFLAGS+= -Wno-cast-qual From owner-svn-src-stable@freebsd.org Wed Sep 6 07:19:24 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03127E1824A; Wed, 6 Sep 2017 07:19:24 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F2C36B4C0; Wed, 6 Sep 2017 07:19:23 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v867JM1U011422; Wed, 6 Sep 2017 07:19:22 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v867JMfq011421; Wed, 6 Sep 2017 07:19:22 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709060719.v867JMfq011421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Wed, 6 Sep 2017 07:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323214 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 323214 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 07:19:24 -0000 Author: rlibby Date: Wed Sep 6 07:19:22 2017 New Revision: 323214 URL: https://svnweb.freebsd.org/changeset/base/323214 Log: MFC r321376: linuxkpi compiler.h: avoid gcc -Wunused-value in dummy expressions Modified: stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Wed Sep 6 07:15:21 2017 (r323213) +++ stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Wed Sep 6 07:19:22 2017 (r323214) @@ -40,13 +40,13 @@ #define __force #define __nocast #define __iomem -#define __chk_user_ptr(x) 0 -#define __chk_io_ptr(x) 0 +#define __chk_user_ptr(x) ((void)0) +#define __chk_io_ptr(x) ((void)0) #define __builtin_warning(x, y...) (1) #define __acquires(x) #define __releases(x) -#define __acquire(x) 0 -#define __release(x) 0 +#define __acquire(x) do { } while (0) +#define __release(x) do { } while (0) #define __cond_lock(x,c) (c) #define __bitwise #define __devinitdata From owner-svn-src-stable@freebsd.org Wed Sep 6 10:21:30 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89DABE1F27A; Wed, 6 Sep 2017 10:21:30 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DC9873780; Wed, 6 Sep 2017 10:21:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v86ALSvx087269; Wed, 6 Sep 2017 10:21:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v86ALSvx087268; Wed, 6 Sep 2017 10:21:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201709061021.v86ALSvx087268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 6 Sep 2017 10:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323216 - stable/11/sys/netipsec X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netipsec X-SVN-Commit-Revision: 323216 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 10:21:30 -0000 Author: ae Date: Wed Sep 6 10:21:28 2017 New Revision: 323216 URL: https://svnweb.freebsd.org/changeset/base/323216 Log: MFC r323086: Fix possible double releasing for SA reference. This is missing part of r318734. When crypto subsystem returns error the xform code handles an error independently. PR: 221849 Modified: stable/11/sys/netipsec/udpencap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netipsec/udpencap.c ============================================================================== --- stable/11/sys/netipsec/udpencap.c Wed Sep 6 09:19:54 2017 (r323215) +++ stable/11/sys/netipsec/udpencap.c Wed Sep 6 10:21:28 2017 (r323216) @@ -120,7 +120,7 @@ udp_ipsec_input(struct mbuf *m, int off, int af) struct udphdr *udp; struct ip *ip; uint32_t spi; - int error, hlen; + int hlen; /* * Just return if packet doesn't have enough data. @@ -205,10 +205,7 @@ udp_ipsec_input(struct mbuf *m, int off, int af) * will do this anyway, so don't touch them here. */ ESPSTAT_INC(esps_input); - error = (*sav->tdb_xform->xf_input)(m, sav, hlen, off); - if (error != 0) - key_freesav(&sav); - + (*sav->tdb_xform->xf_input)(m, sav, hlen, off); return (EINPROGRESS); /* Consumed by IPsec. */ } From owner-svn-src-stable@freebsd.org Wed Sep 6 13:10:35 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6704FE02613; Wed, 6 Sep 2017 13:10:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3226B7CCA0; Wed, 6 Sep 2017 13:10:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v86DAYMw054875; Wed, 6 Sep 2017 13:10:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v86DAXZe054869; Wed, 6 Sep 2017 13:10:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709061310.v86DAXZe054869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 6 Sep 2017 13:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323218 - in stable/11: share/man/man4 sys/conf sys/dev/mlx5/mlx5_ib sys/modules sys/modules/mlx5ib X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/conf sys/dev/mlx5/mlx5_ib sys/modules sys/modules/mlx5ib X-SVN-Commit-Revision: 323218 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 13:10:35 -0000 Author: hselasky Date: Wed Sep 6 13:10:33 2017 New Revision: 323218 URL: https://svnweb.freebsd.org/changeset/base/323218 Log: MFC r322810 and r322830: Add new mlx5ib(4) driver to the kernel source tree which supports Remote DMA over Converged Ethernet, RoCE, for the ConnectX-4 series of PCI express network cards. There is currently no user-space support and this driver only supports kernel side non-routable RoCE V1. The krping kernel module can be used to test this driver. Full user-space support including RoCE V2 will be added as part of the ongoing upgrade to ibcore from Linux 4.9. Otherwise this driver is feature equivalent to mlx4ib(4). The mlx5ib(4) kernel module will only be built when WITH_OFED=YES is specified. Sponsored by: Mellanox Technologies Added: stable/11/share/man/man4/mlx5ib.4 - copied unchanged from r322810, head/share/man/man4/mlx5ib.4 stable/11/sys/dev/mlx5/mlx5_ib/ - copied from r322810, head/sys/dev/mlx5/mlx5_ib/ stable/11/sys/modules/mlx5ib/ - copied from r322810, head/sys/modules/mlx5ib/ Modified: stable/11/share/man/man4/Makefile stable/11/sys/conf/files stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Wed Sep 6 11:47:59 2017 (r323217) +++ stable/11/share/man/man4/Makefile Wed Sep 6 13:10:33 2017 (r323218) @@ -906,6 +906,7 @@ MAN+= iser.4 .if ${MK_OFED} != "no" MAN+= mlx4ib.4 +MAN+= mlx5ib.4 .endif .if ${MK_TESTS} != "no" Copied: stable/11/share/man/man4/mlx5ib.4 (from r322810, head/share/man/man4/mlx5ib.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man4/mlx5ib.4 Wed Sep 6 13:10:33 2017 (r323218, copy of r322810, head/share/man/man4/mlx5ib.4) @@ -0,0 +1,124 @@ +.\" Copyright (c) 2017 Mellanox Technologies +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 23, 2017 +.Dt MLX5IB 4 +.Os +.Sh NAME +.Nm mlx5ib +.Nd "Mellanox ConnectX-4 and ConnectX-4 LX based 100Gb, 50Gb, 40Gb, 25Gb and 10Gb network adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place these lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options COMPAT_LINUXKPI" +.Cd "device mlx5" +.Cd "device mlx5ib" +.Ed +.Pp +To load the driver as a module at run-time, +run this command as root: +.Bd -literal -offset indent +kldload mlx5ib +.Ed +.Pp +To load the driver as a +module at boot time, place this line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mlx5ib_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for infiniband and Remote DMA over Converged Ethernet, +RoCE, for PCI Express network adapters based on ConnectX-4 and ConnectX-4 LX. +.br +For further hardware information and questions related to hardware +requirements, see +.Pa http://www.mellanox.com/ . +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports 100Gb, 50Gb, 40Gb, 25Gb and 10Gb network adapters. +ConnectX-4 supports: 10/20/25/40/50/56/100Gb/s speeds. +ConnectX-4 LX supports: 10/25/40/50Gb/s speeds (and reduced power consumption): +.Pp +.Bl -bullet -compact +.It +Mellanox MCX455A-ECAT +.It +Mellanox MCX456A-ECAT +.It +Mellanox MCX415A-CCAT +.It +Mellanox MCX416A-CCAT +.It +Mellanox MCX455A-FCAT +.It +Mellanox MCX456A-FCAT +.It +Mellanox MCX415A-BCAT +.It +Mellanox MCX416A-BCAT +.It +Mellanox MCX4131A-GCAT +.It +Mellanox MCX4131A-BCAT +.It +Mellanox MCX4121A-ACAT +.It +Mellanox MCX4111A-ACAT +.It +Mellanox MCX4121A-XCAT +.It +Mellanox MCX4111A-XCAT +.El +.Sh SUPPORT +For general information and support, +go to the Mellanox support website at: +.Pa http://www.mellanox.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd-drivers@mellanox.com . +.Sh SEE ALSO +.Xr mlx5en 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.x . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Mellanox Technologies . Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Wed Sep 6 11:47:59 2017 (r323217) +++ stable/11/sys/conf/files Wed Sep 6 13:10:33 2017 (r323218) @@ -4287,6 +4287,27 @@ ofed/drivers/net/mlx4/en_tx.c optional mlxen \ no-depend obj-prefix "mlx4_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +dev/mlx5/mlx5_ib/mlx5_ib_ah.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_cq.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_mad.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_main.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_mem.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_mr.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_qp.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_roce.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_srq.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" + dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Sep 6 13:10:33 2017 (r323218) @@ -856,7 +856,7 @@ static struct ib_ucontext *mlx5_ib_alloc_ucontext(stru else if (reqlen == sizeof(struct mlx5_ib_alloc_ucontext_req_v2)) ver = 2; else { - mlx5_ib_err(dev, "request malformed, reqlen: %ld\n", reqlen); + mlx5_ib_err(dev, "request malformed, reqlen: %ld\n", (long)reqlen); return ERR_PTR(-EINVAL); } Modified: stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/11/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c Wed Sep 6 13:10:33 2017 (r323218) @@ -29,6 +29,8 @@ #include #include "mlx5_ib.h" +CTASSERT(sizeof(uintptr_t) == sizeof(unsigned long)); + /* @umem: umem object to scan * @addr: ib virtual address requested by the user * @count: number of PAGE_SIZE pages covered by umem @@ -40,7 +42,7 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr, int *count, int *shift, int *ncont, int *order) { - uintptr_t tmp; + unsigned long tmp; unsigned long m; int i, k; u64 base = 0; Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Wed Sep 6 11:47:59 2017 (r323217) +++ stable/11/sys/modules/Makefile Wed Sep 6 13:10:33 2017 (r323218) @@ -246,6 +246,7 @@ SUBDIR= \ ${_mlxen} \ ${_mlx5} \ ${_mlx5en} \ + ${_mlx5ib} \ ${_mly} \ mmc \ mmcsd \ @@ -663,6 +664,7 @@ _iwnfw= iwnfw .if ${MK_OFED} != "no" || defined(ALL_MODULES) _mlx4= mlx4 _mlx4ib= mlx4ib +_mlx5ib= mlx5ib _mlxen= mlxen .endif _mlx5= mlx5 From owner-svn-src-stable@freebsd.org Wed Sep 6 15:33:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CC01E0840F; Wed, 6 Sep 2017 15:33:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF34F778DD; Wed, 6 Sep 2017 15:33:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v86FXOhW015871; Wed, 6 Sep 2017 15:33:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v86FXNRc015857; Wed, 6 Sep 2017 15:33:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201709061533.v86FXNRc015857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 6 Sep 2017 15:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323223 - in stable/10: share/man/man4 sys/conf sys/dev/mlx5/mlx5_ib sys/modules sys/modules/mlx5ib X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/10: share/man/man4 sys/conf sys/dev/mlx5/mlx5_ib sys/modules sys/modules/mlx5ib X-SVN-Commit-Revision: 323223 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 15:33:27 -0000 Author: hselasky Date: Wed Sep 6 15:33:23 2017 New Revision: 323223 URL: https://svnweb.freebsd.org/changeset/base/323223 Log: MFC r322810 and r322830: Add new mlx5ib(4) driver to the kernel source tree which supports Remote DMA over Converged Ethernet, RoCE, for the ConnectX-4 series of PCI express network cards. There is currently no user-space support and this driver only supports kernel side non-routable RoCE V1. The krping kernel module can be used to test this driver. Full user-space support including RoCE V2 will be added as part of the ongoing upgrade to ibcore from Linux 4.9. Otherwise this driver is feature equivalent to mlx4ib(4). The mlx5ib(4) kernel module will only be built when WITH_OFED=YES is specified. Approved by: re (marius) Sponsored by: Mellanox Technologies Added: stable/10/share/man/man4/mlx5ib.4 - copied unchanged from r322810, head/share/man/man4/mlx5ib.4 stable/10/sys/dev/mlx5/mlx5_ib/ - copied from r322810, head/sys/dev/mlx5/mlx5_ib/ stable/10/sys/modules/mlx5ib/ - copied from r322810, head/sys/modules/mlx5ib/ Modified: stable/10/share/man/man4/Makefile stable/10/sys/conf/files stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib.h stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_ah.c stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_mad.c stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c stable/10/sys/modules/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Wed Sep 6 15:07:53 2017 (r323222) +++ stable/10/share/man/man4/Makefile Wed Sep 6 15:33:23 2017 (r323223) @@ -868,6 +868,7 @@ MAN+= iscsi_initiator.4 .if ${MK_OFED} != "no" MAN+= mlx4ib.4 +MAN+= mlx5ib.4 .endif .if ${MK_TESTS} != "no" Copied: stable/10/share/man/man4/mlx5ib.4 (from r322810, head/share/man/man4/mlx5ib.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/mlx5ib.4 Wed Sep 6 15:33:23 2017 (r323223, copy of r322810, head/share/man/man4/mlx5ib.4) @@ -0,0 +1,124 @@ +.\" Copyright (c) 2017 Mellanox Technologies +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 23, 2017 +.Dt MLX5IB 4 +.Os +.Sh NAME +.Nm mlx5ib +.Nd "Mellanox ConnectX-4 and ConnectX-4 LX based 100Gb, 50Gb, 40Gb, 25Gb and 10Gb network adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place these lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options COMPAT_LINUXKPI" +.Cd "device mlx5" +.Cd "device mlx5ib" +.Ed +.Pp +To load the driver as a module at run-time, +run this command as root: +.Bd -literal -offset indent +kldload mlx5ib +.Ed +.Pp +To load the driver as a +module at boot time, place this line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mlx5ib_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for infiniband and Remote DMA over Converged Ethernet, +RoCE, for PCI Express network adapters based on ConnectX-4 and ConnectX-4 LX. +.br +For further hardware information and questions related to hardware +requirements, see +.Pa http://www.mellanox.com/ . +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports 100Gb, 50Gb, 40Gb, 25Gb and 10Gb network adapters. +ConnectX-4 supports: 10/20/25/40/50/56/100Gb/s speeds. +ConnectX-4 LX supports: 10/25/40/50Gb/s speeds (and reduced power consumption): +.Pp +.Bl -bullet -compact +.It +Mellanox MCX455A-ECAT +.It +Mellanox MCX456A-ECAT +.It +Mellanox MCX415A-CCAT +.It +Mellanox MCX416A-CCAT +.It +Mellanox MCX455A-FCAT +.It +Mellanox MCX456A-FCAT +.It +Mellanox MCX415A-BCAT +.It +Mellanox MCX416A-BCAT +.It +Mellanox MCX4131A-GCAT +.It +Mellanox MCX4131A-BCAT +.It +Mellanox MCX4121A-ACAT +.It +Mellanox MCX4111A-ACAT +.It +Mellanox MCX4121A-XCAT +.It +Mellanox MCX4111A-XCAT +.El +.Sh SUPPORT +For general information and support, +go to the Mellanox support website at: +.Pa http://www.mellanox.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd-drivers@mellanox.com . +.Sh SEE ALSO +.Xr mlx5en 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.x . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Mellanox Technologies . Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed Sep 6 15:07:53 2017 (r323222) +++ stable/10/sys/conf/files Wed Sep 6 15:33:23 2017 (r323223) @@ -3933,6 +3933,27 @@ ofed/drivers/net/mlx4/en_tx.c optional mlxen \ no-depend obj-prefix "mlx4_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +dev/mlx5/mlx5_ib/mlx5_ib_ah.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_cq.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_mad.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_main.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_mem.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_mr.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_qp.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_roce.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_srq.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" + dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Wed Aug 23 12:09:37 2017 (r322810) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Wed Sep 6 15:33:23 2017 (r323223) @@ -653,6 +653,7 @@ void mlx5_ib_free_srq_wqe(struct mlx5_ib_srq *srq, int int mlx5_MAD_IFC(struct mlx5_ib_dev *dev, int ignore_mkey, int ignore_bkey, u8 port, struct ib_wc *in_wc, struct ib_grh *in_grh, void *in_mad, void *response_mad); +int mlx5_ib_resolve_grh(const struct ib_ah_attr *ah_attr, u8 *mac, int *is_mcast); struct ib_ah *create_ib_ah(struct mlx5_ib_dev *dev, struct ib_ah_attr *ah_attr, struct mlx5_ib_ah *ah, enum rdma_link_layer ll); struct ib_ah *mlx5_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr); @@ -681,13 +682,13 @@ int mlx5_ib_post_recv(struct ib_qp *ibqp, struct ib_re struct ib_recv_wr **bad_wr); void *mlx5_get_send_wqe(struct mlx5_ib_qp *qp, int n); struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev, - struct ib_cq_init_attr *attr, + int entries, int vector, struct ib_ucontext *context, struct ib_udata *udata); int mlx5_ib_destroy_cq(struct ib_cq *cq); int mlx5_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc); int mlx5_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags); -int mlx5_ib_modify_cq(struct ib_cq *cq, struct ib_cq_attr *attr, int cq_attr_mask); +int mlx5_ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period); int mlx5_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata); struct ib_mr *mlx5_ib_get_dma_mr(struct ib_pd *pd, int acc); struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_ah.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_ah.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_ah.c Wed Sep 6 15:33:23 2017 (r323223) @@ -29,6 +29,27 @@ #define IPV6_DEFAULT_HOPLIMIT 64 +int mlx5_ib_resolve_grh(const struct ib_ah_attr *ah_attr, u8 *mac, int *is_mcast) +{ + struct in6_addr in6; + + if (is_mcast != NULL) + *is_mcast = 0; + + memcpy(&in6, ah_attr->grh.dgid.raw, sizeof in6); + if (rdma_link_local_addr(&in6)) { + rdma_get_ll_mac(&in6, mac); + } else if (rdma_is_multicast_addr(&in6)) { + rdma_get_mcast_mac(&in6, mac); + if (is_mcast != NULL) + *is_mcast = 1; + } else { + return -EINVAL; + } + return 0; +} + + struct ib_ah *create_ib_ah(struct mlx5_ib_dev *dev, struct ib_ah_attr *ah_attr, struct mlx5_ib_ah *ah, enum rdma_link_layer ll) @@ -54,7 +75,7 @@ struct ib_ah *create_ib_ah(struct mlx5_ib_dev *dev, if (err) return ERR_PTR(err); - memcpy(ah->av.rmac, ah_attr->dmac, sizeof(ah_attr->dmac)); + mlx5_ib_resolve_grh(ah_attr, ah->av.rmac, NULL); ah->av.udp_sport = mlx5_get_roce_udp_sport( dev, ah_attr->port_num, Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Wed Sep 6 15:33:23 2017 (r323223) @@ -25,6 +25,7 @@ * $FreeBSD$ */ +#include #include #include #include @@ -822,15 +823,13 @@ static void destroy_cq_kernel(struct mlx5_ib_dev *dev, } struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev, - struct ib_cq_init_attr *attr, + int entries, int vector, struct ib_ucontext *context, struct ib_udata *udata) { struct mlx5_create_cq_mbox_in *cqb = NULL; struct mlx5_ib_dev *dev = to_mdev(ibdev); struct mlx5_ib_cq *cq; - int entries = attr->cqe; - int vector = attr->comp_vector; int uninitialized_var(index); int uninitialized_var(inlen); int cqe_size; @@ -1006,13 +1005,11 @@ void mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, spin_unlock_irq(&cq->lock); } -int mlx5_ib_modify_cq(struct ib_cq *cq, struct ib_cq_attr *attr, int cq_attr_mask) +int mlx5_ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period) { struct mlx5_modify_cq_mbox_in *in; struct mlx5_ib_dev *dev = to_mdev(cq->device); struct mlx5_ib_cq *mcq = to_mcq(cq); - u16 cq_count = attr->moderation.cq_count; - u16 cq_period = attr->moderation.cq_period; int err; u32 fsel = 0; @@ -1022,7 +1019,7 @@ int mlx5_ib_modify_cq(struct ib_cq *cq, struct ib_cq_a return -ENOMEM; in->cqn = cpu_to_be32(mcq->mcq.cqn); - if (cq_attr_mask & IB_CQ_MODERATION) { + if (1) { if (MLX5_CAP_GEN(dev->mdev, cq_moderation)) { fsel |= (MLX5_CQ_MODIFY_PERIOD | MLX5_CQ_MODIFY_COUNT); if (cq_period & 0xf000) { Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c Wed Sep 6 15:33:23 2017 (r323223) @@ -25,6 +25,7 @@ * $FreeBSD$ */ +#include #include #include #include @@ -42,6 +43,7 @@ int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *conte struct mlx5_db *db) { struct mlx5_ib_user_db_page *page; + struct ib_umem_chunk *chunk; int err = 0; mutex_lock(&context->db_page_mutex); @@ -69,7 +71,9 @@ int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *conte list_add(&page->list, &context->db_page_list); found: - db->dma = sg_dma_address(page->umem->sg_head.sgl) + (virt & ~PAGE_MASK); + chunk = list_entry(page->umem->chunk_list.next, + struct ib_umem_chunk, list); + db->dma = sg_dma_address(chunk->page_list) + (virt & ~PAGE_MASK); db->u.user_page = page; ++page->refcnt; Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_mad.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_mad.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_mad.c Wed Sep 6 15:33:23 2017 (r323223) @@ -31,6 +31,25 @@ #include "mlx5_ib.h" #include +#define MAX_U32 0xffffffffULL +#define MAX_U16 0xffffUL + +/* Counters should be saturate once they reach their maximum value */ +#define ASSIGN_32BIT_COUNTER(counter, value) do { \ + if ((value) > MAX_U32) \ + counter = cpu_to_be32(MAX_U32); \ + else \ + counter = cpu_to_be32(value); \ +} while (0) + +/* Counters should be saturate once they reach their maximum value */ +#define ASSIGN_16BIT_COUNTER(counter, value) do { \ + if ((value) > MAX_U16) \ + counter = cpu_to_be16(MAX_U16); \ + else \ + counter = cpu_to_be16(value); \ +} while (0) + enum { MLX5_IB_VENDOR_CLASS1 = 0x9, MLX5_IB_VENDOR_CLASS2 = 0xa Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Sep 6 15:33:23 2017 (r323223) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -47,16 +48,17 @@ #include "mlx5_ib.h" #include -#include #define DRIVER_NAME "mlx5_ib" #define DRIVER_VERSION "3.2-rc1" #define DRIVER_RELDATE "May 2016" +#undef MODULE_VERSION +#include + MODULE_AUTHOR("Eli Cohen "); MODULE_DESCRIPTION("Mellanox Connect-IB HCA IB driver"); MODULE_LICENSE("Dual BSD/GPL"); -MODULE_DEPEND(mlx5ib, linuxkpi, 1, 1, 1); MODULE_DEPEND(mlx5ib, mlx5, 1, 1, 1); MODULE_DEPEND(mlx5ib, ibcore, 1, 1, 1); MODULE_VERSION(mlx5ib, 1); @@ -856,7 +858,7 @@ static struct ib_ucontext *mlx5_ib_alloc_ucontext(stru else if (reqlen == sizeof(struct mlx5_ib_alloc_ucontext_req_v2)) ver = 2; else { - mlx5_ib_err(dev, "request malformed, reqlen: %ld\n", reqlen); + mlx5_ib_err(dev, "request malformed, reqlen: %ld\n", (long)reqlen); return ERR_PTR(-EINVAL); } @@ -1573,7 +1575,6 @@ static int create_dev_resources(struct mlx5_ib_resourc struct ib_srq_init_attr attr; struct mlx5_ib_dev *dev; int ret = 0; - struct ib_cq_init_attr cq_attr = { .cqe = 1 }; dev = container_of(devr, struct mlx5_ib_dev, devr); @@ -1586,7 +1587,7 @@ static int create_dev_resources(struct mlx5_ib_resourc devr->p0->uobject = NULL; atomic_set(&devr->p0->usecnt, 0); - devr->c0 = mlx5_ib_create_cq(&dev->ib_dev, &cq_attr, NULL, NULL); + devr->c0 = mlx5_ib_create_cq(&dev->ib_dev, 1, 0, NULL, NULL); if (IS_ERR(devr->c0)) { ret = PTR_ERR(devr->c0); goto error1; @@ -2098,7 +2099,6 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) dev->ib_dev.query_device = mlx5_ib_query_device; dev->ib_dev.query_port = mlx5_ib_query_port; dev->ib_dev.get_link_layer = mlx5_ib_port_link_layer; - dev->ib_dev.get_netdev = mlx5_ib_get_netdev; dev->ib_dev.query_gid = mlx5_ib_query_gid; dev->ib_dev.query_pkey = mlx5_ib_query_pkey; dev->ib_dev.modify_device = mlx5_ib_modify_device; Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c Wed Sep 6 15:33:23 2017 (r323223) @@ -29,6 +29,8 @@ #include #include "mlx5_ib.h" +CTASSERT(sizeof(uintptr_t) == sizeof(unsigned long)); + /* @umem: umem object to scan * @addr: ib virtual address requested by the user * @count: number of PAGE_SIZE pages covered by umem @@ -40,9 +42,10 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr, int *count, int *shift, int *ncont, int *order) { - uintptr_t tmp; + struct ib_umem_chunk *chunk; + unsigned long tmp; unsigned long m; - int i, k; + int i, j, k; u64 base = 0; int p = 0; int skip; @@ -50,7 +53,6 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr u64 len; u64 pfn; struct scatterlist *sg; - int entry; unsigned long page_shift = ilog2(umem->page_size); addr = addr >> page_shift; @@ -60,7 +62,9 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr mask = skip - 1; i = 0; - for_each_sg(umem->sg_head.sgl, sg, umem->nmap, entry) { + list_for_each_entry(chunk, &umem->chunk_list, list) { + for (j = 0; j < chunk->nmap; j++) { + sg = chunk->page_list + j; len = sg_dma_len(sg) >> page_shift; pfn = sg_dma_address(sg) >> page_shift; for (k = 0; k < len; k++) { @@ -85,6 +89,7 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr p++; i++; } + } } if (i) { @@ -124,17 +129,19 @@ static void __mlx5_ib_populate_pas(struct mlx5_ib_dev __be64 *pas, int access_flags) { unsigned long umem_page_shift = ilog2(umem->page_size); + struct ib_umem_chunk *chunk; int shift = page_shift - umem_page_shift; int mask = (1 << shift) - 1; - int i, k; + int i, j, k; u64 cur = 0; u64 base; int len; struct scatterlist *sg; - int entry; i = 0; - for_each_sg(umem->sg_head.sgl, sg, umem->nmap, entry) { + list_for_each_entry(chunk, &umem->chunk_list, list) { + for (j = 0; j < chunk->nmap; j++) { + sg = chunk->page_list + j; len = sg_dma_len(sg) >> umem_page_shift; base = sg_dma_address(sg); for (k = 0; k < len; k++) { @@ -152,6 +159,7 @@ static void __mlx5_ib_populate_pas(struct mlx5_ib_dev (base + (k << umem_page_shift))); i++; } + } } } Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c Wed Sep 6 15:33:23 2017 (r323223) @@ -25,7 +25,7 @@ * $FreeBSD$ */ - +#include #include #include #include Modified: stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c Wed Aug 23 12:09:37 2017 (r322810) +++ stable/10/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c Wed Sep 6 15:33:23 2017 (r323223) @@ -1591,7 +1591,9 @@ static int mlx5_set_path(struct mlx5_ib_dev *dev, cons &gid_type); if (err) return err; - memcpy(path->rmac, ah->dmac, sizeof(ah->dmac)); + err = mlx5_ib_resolve_grh(ah, path->rmac, NULL); + if (err) + return err; path->udp_sport = mlx5_get_roce_udp_sport(dev, port, ah->grh.sgid_index, 0); @@ -2079,20 +2081,14 @@ int mlx5_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp enum ib_qp_state cur_state, new_state; int err = -EINVAL; int port; - enum rdma_link_layer ll = IB_LINK_LAYER_UNSPECIFIED; mutex_lock(&qp->mutex); cur_state = attr_mask & IB_QP_CUR_STATE ? attr->cur_qp_state : qp->state; new_state = attr_mask & IB_QP_STATE ? attr->qp_state : cur_state; - if (!(cur_state == new_state && cur_state == IB_QPS_RESET)) { - port = attr_mask & IB_QP_PORT ? attr->port_num : qp->port; - ll = dev->ib_dev.get_link_layer(&dev->ib_dev, port); - } - if (!ignored_ts_check(ibqp->qp_type) && - !ib_modify_qp_is_ok(cur_state, new_state, ibqp->qp_type, attr_mask, ll)) + !ib_modify_qp_is_ok(cur_state, new_state, ibqp->qp_type, attr_mask)) goto out; if ((attr_mask & IB_QP_PORT) && Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Wed Sep 6 15:07:53 2017 (r323222) +++ stable/10/sys/modules/Makefile Wed Sep 6 15:33:23 2017 (r323223) @@ -225,6 +225,7 @@ SUBDIR= \ ${_mlxen} \ ${_mlx5} \ ${_mlx5en} \ + ${_mlx5ib} \ ${_mly} \ mmc \ mmcsd \ @@ -762,6 +763,7 @@ _mly= mly .if ${MK_OFED} != "no" || defined(ALL_MODULES) _mlx4= mlx4 _mlx4ib= mlx4ib +_mlx5ib= mlx5ib _mlxen= mlxen _mthca= mthca .endif From owner-svn-src-stable@freebsd.org Wed Sep 6 16:09:23 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B455FE09F29; Wed, 6 Sep 2017 16:09:23 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-pg0-f46.google.com (mail-pg0-f46.google.com [74.125.83.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D07B83452; Wed, 6 Sep 2017 16:09:22 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-pg0-f46.google.com with SMTP id d8so15988623pgt.4; Wed, 06 Sep 2017 09:09:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=XoIv+A7eDimQBD/WXSaYE5EHm0mzKm9YZEafdWYhl5s=; b=oWQ6oAklMjsmbp78jFQ8PfwXGNRyjiy2m5o+pEh0gJeX20FClt/3TQSsdAk5XKW6F0 wiGRxKkXvI2j4xdW1cHG81Z+CDFem5UpgnviMh5olDG+vkL4uBYXYdaDgjP4sbJOtNVP gJr+cCk0wuTZEuTpupKWOuyRoIRF9X5uP6odknp6/xpSuyS310JZnaVsZ1aY1Wdi0gDY r7Grz/oYQWSjnWnSMMPMCRWVnFLH4pjn8zBOmdnnnAd2qfCTHloJeXBsfA892hlUJ2ui qktro2Asov/5GOWRD971bol62qoe6P/Pad65lIOECavurSI7kXLKDrwGXGgTo9XY06wX 4nUg== X-Gm-Message-State: AHPjjUh2/yRzVFIFvt76Z46+372S50p5WmXoGsuk3ZrA3TQfETOzV06l 92lUiw/EYqCJm6nHjwThUg== X-Received: by 10.98.74.156 with SMTP id c28mr7737804pfj.266.1504713825927; Wed, 06 Sep 2017 09:03:45 -0700 (PDT) Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com. [209.85.192.178]) by smtp.gmail.com with ESMTPSA id k186sm250393pga.46.2017.09.06.09.03.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Sep 2017 09:03:45 -0700 (PDT) Received: by mail-pf0-f178.google.com with SMTP id g13so13471039pfm.2; Wed, 06 Sep 2017 09:03:45 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5JRkOTfFP0TMMPCREAg5zIdth/+CKcxqT4O3/ViSEniWuFvgnPd9KODyKbU93QSJvj5L3rcduUKNF0RpbofSo= X-Received: by 10.99.6.210 with SMTP id 201mr8424662pgg.416.1504713824826; Wed, 06 Sep 2017 09:03:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.207.193 with HTTP; Wed, 6 Sep 2017 09:03:44 -0700 (PDT) In-Reply-To: <201709060657.v866vIro002970@repo.freebsd.org> References: <201709060657.v866vIro002970@repo.freebsd.org> From: Ryan Libby Date: Wed, 6 Sep 2017 09:03:44 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323208 - stable/11/sys/dev/hptmv To: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 16:09:23 -0000 On Tue, Sep 5, 2017 at 11:57 PM, Ryan Libby wrote: > Author: rlibby > Date: Wed Sep 6 06:57:18 2017 > New Revision: 323208 > URL: https://svnweb.freebsd.org/changeset/base/323208 > > Log: > MFC r320714: > > hptmv: avoid gcc variably-modified warning > PR: 211540 > Modified: > stable/11/sys/dev/hptmv/vdevice.h > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/sys/dev/hptmv/vdevice.h > ============================================================================== > --- stable/11/sys/dev/hptmv/vdevice.h Wed Sep 6 06:51:52 2017 (r323207) > +++ stable/11/sys/dev/hptmv/vdevice.h Wed Sep 6 06:57:18 2017 (r323208) > @@ -77,8 +77,8 @@ typedef struct _VDevice > > } VDevice; > > -#define ARRAY_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(RaidArray)) > -#define DISK_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(Device)) > +#define ARRAY_VDEV_SIZE (offsetof(VDevice, u) + sizeof(RaidArray)) > +#define DISK_VDEV_SIZE (offsetof(VDevice, u) + sizeof(Device)) > > #define Map2pVDevice(pDev) ((PVDevice)((UINT_PTR)pDev - (UINT)(UINT_PTR)&((PVDevice)0)->u.disk)) > > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-stable@freebsd.org Wed Sep 6 17:09:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE5CBE0CA92; Wed, 6 Sep 2017 17:09:04 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 269C56C48F; Wed, 6 Sep 2017 17:09:04 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1dpdos-0008ku-NA; Wed, 06 Sep 2017 20:08:54 +0300 Date: Wed, 6 Sep 2017 20:08:54 +0300 From: Slawa Olhovchenkov To: Marius Strobl Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r323081 - stable/10/sys/conf Message-ID: <20170906170854.GC9110@zxy.spb.ru> References: <201709010016.v810G3YB099686@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201709010016.v810G3YB099686@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 17:09:04 -0000 On Fri, Sep 01, 2017 at 12:16:03AM +0000, Marius Strobl wrote: > Author: marius > Date: Fri Sep 1 00:16:03 2017 > New Revision: 323081 > URL: https://svnweb.freebsd.org/changeset/base/323081 > > Log: > Update stable/10 to BETA3 in preparation for 10.4-BETA3 builds. > > Approved by: re (implicit) > > Modified: > stable/10/sys/conf/newvers.sh NETAMP still not working on ix card. From owner-svn-src-stable@freebsd.org Wed Sep 6 19:04:15 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4653EE11883; Wed, 6 Sep 2017 19:04:15 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 84CA0647D8; Wed, 6 Sep 2017 19:04:14 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id v86J4BNK051976 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Sep 2017 21:04:11 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id v86J4AJK051975; Wed, 6 Sep 2017 21:04:10 +0200 (CEST) (envelope-from marius) Date: Wed, 6 Sep 2017 21:04:10 +0200 From: Marius Strobl To: Slawa Olhovchenkov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r323081 - stable/10/sys/conf Message-ID: <20170906190410.GD95883@alchemy.franken.de> References: <201709010016.v810G3YB099686@repo.freebsd.org> <20170906170854.GC9110@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170906170854.GC9110@zxy.spb.ru> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 19:04:15 -0000 On Wed, Sep 06, 2017 at 08:08:54PM +0300, Slawa Olhovchenkov wrote: > On Fri, Sep 01, 2017 at 12:16:03AM +0000, Marius Strobl wrote: > > > Author: marius > > Date: Fri Sep 1 00:16:03 2017 > > New Revision: 323081 > > URL: https://svnweb.freebsd.org/changeset/base/323081 > > > > Log: > > Update stable/10 to BETA3 in preparation for 10.4-BETA3 builds. > > > > Approved by: re (implicit) > > > > Modified: > > stable/10/sys/conf/newvers.sh > > NETAMP still not working on ix card. Yeah, erj@ intended to update ixgbe(4) in stable/10 but apparently has dropped the ball on it. I've no idea whether that update would actually fix netmap(4) support, though; regarding that problem he said that at Intel, they don't have much capability or time for netmap(4) testing. Marius From owner-svn-src-stable@freebsd.org Wed Sep 6 20:01:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 606FCE14106; Wed, 6 Sep 2017 20:01:21 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7E367158E; Wed, 6 Sep 2017 20:01:20 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v86K1JV8024733; Wed, 6 Sep 2017 20:01:19 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v86K1Jri024732; Wed, 6 Sep 2017 20:01:19 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709062001.v86K1Jri024732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 6 Sep 2017 20:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323231 - stable/10/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/10/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 323231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 20:01:21 -0000 Author: cy Date: Wed Sep 6 20:01:19 2017 New Revision: 323231 URL: https://svnweb.freebsd.org/changeset/base/323231 Log: MFC r322073: Fix matchcing of NATed ICMP queries (resolving NATed MTU discovery). Approved by: re (kib) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Wed Sep 6 17:19:48 2017 (r323230) +++ stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Wed Sep 6 20:01:19 2017 (r323231) @@ -4105,13 +4105,8 @@ ipf_nat_inlookup(fin, flags, p, src, mapdst) dport = htons(fin->fin_data[1]); break; case IPPROTO_ICMP : - if (flags & IPN_ICMPERR) { - sport = fin->fin_data[1]; - dport = 0; - } else { - dport = fin->fin_data[1]; - sport = 0; - } + sport = 0; + dport = fin->fin_data[1]; break; default : sport = 0; @@ -4431,8 +4426,6 @@ ipf_nat_outlookup(fin, flags, p, src, dst) ifp = fin->fin_ifp; sflags = flags & IPN_TCPUDPICMP; - sport = 0; - dport = 0; switch (p) { @@ -4442,12 +4435,12 @@ ipf_nat_outlookup(fin, flags, p, src, dst) dport = htons(fin->fin_data[1]); break; case IPPROTO_ICMP : - if (flags & IPN_ICMPERR) - sport = fin->fin_data[1]; - else - dport = fin->fin_data[1]; + sport = 0; + dport = fin->fin_data[1]; break; default : + sport = 0; + dport = 0; break; } From owner-svn-src-stable@freebsd.org Thu Sep 7 05:01:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8520AE06A4E; Thu, 7 Sep 2017 05:01:04 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24D6B6387A; Thu, 7 Sep 2017 05:01:04 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v87513Zc046275; Thu, 7 Sep 2017 05:01:03 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v87513Pm046274; Thu, 7 Sep 2017 05:01:03 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709070501.v87513Pm046274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Thu, 7 Sep 2017 05:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323255 - stable/11/sys/contrib/ena-com X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/sys/contrib/ena-com X-SVN-Commit-Revision: 323255 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 05:01:04 -0000 Author: rlibby Date: Thu Sep 7 05:01:02 2017 New Revision: 323255 URL: https://svnweb.freebsd.org/changeset/base/323255 Log: MFC r321864 (by mw): Merge ena-com 1.1.4.2 Modified: stable/11/sys/contrib/ena-com/ena_plat.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ena-com/ena_plat.h ============================================================================== --- stable/11/sys/contrib/ena-com/ena_plat.h Thu Sep 7 04:29:57 2017 (r323254) +++ stable/11/sys/contrib/ena-com/ena_plat.h Thu Sep 7 05:01:02 2017 (r323255) @@ -139,21 +139,12 @@ extern struct ena_bus_space ebs; #define MAX_ERRNO 4095 #define IS_ERR_VALUE(x) unlikely((x) <= (unsigned long)MAX_ERRNO) -#define WARN_ON(condition) \ - do { \ - int __ret_warn_on = !!(condition); \ - if (unlikely(__ret_warn_on)) \ - printf("%s %s", __FUNCTION__, __FILE__); \ - unlikely(__ret_warn_on); \ - } while (0) - #define ENA_ASSERT(cond, format, arg...) \ do { \ if (unlikely(!(cond))) { \ ena_trc_err( \ "Assert failed on %s:%s:%d:" format, \ __FILE__, __func__, __LINE__, ##arg); \ - WARN_ON(cond); \ } \ } while (0) From owner-svn-src-stable@freebsd.org Thu Sep 7 05:41:15 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31DBDE08993; Thu, 7 Sep 2017 05:41:15 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C86C56C523; Thu, 7 Sep 2017 05:41:14 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v875fDdn065878; Thu, 7 Sep 2017 05:41:13 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v875fDDV065877; Thu, 7 Sep 2017 05:41:13 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709070541.v875fDDV065877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Thu, 7 Sep 2017 05:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323256 - stable/11/sys/boot/i386/boot2 X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: stable/11/sys/boot/i386/boot2 X-SVN-Commit-Revision: 323256 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 05:41:15 -0000 Author: rlibby Date: Thu Sep 7 05:41:13 2017 New Revision: 323256 URL: https://svnweb.freebsd.org/changeset/base/323256 Log: MFC r322329: i386/boot2: -fno-asynchronous-unwind-tables for gcc Modified: stable/11/sys/boot/i386/boot2/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/i386/boot2/Makefile ============================================================================== --- stable/11/sys/boot/i386/boot2/Makefile Thu Sep 7 05:01:02 2017 (r323255) +++ stable/11/sys/boot/i386/boot2/Makefile Thu Sep 7 05:41:13 2017 (r323256) @@ -39,6 +39,7 @@ CFLAGS= -fomit-frame-pointer \ -Winline CFLAGS.gcc+= -Os \ + -fno-asynchronous-unwind-tables \ -fno-guess-branch-probability \ -fno-unit-at-a-time \ --param max-inline-insns-single=100 From owner-svn-src-stable@freebsd.org Thu Sep 7 09:03:14 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EC80E12E9D; Thu, 7 Sep 2017 09:03:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 001787C463; Thu, 7 Sep 2017 09:03:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8793CmN047607; Thu, 7 Sep 2017 09:03:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8793CLU047606; Thu, 7 Sep 2017 09:03:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201709070903.v8793CLU047606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Sep 2017 09:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323262 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 323262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 09:03:14 -0000 Author: kib Date: Thu Sep 7 09:03:12 2017 New Revision: 323262 URL: https://svnweb.freebsd.org/changeset/base/323262 Log: MFC r323054: The nvme module should explicitly declare dependency on the cam. Modified: stable/11/sys/dev/nvme/nvme.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme.c ============================================================================== --- stable/11/sys/dev/nvme/nvme.c Thu Sep 7 07:30:24 2017 (r323261) +++ stable/11/sys/dev/nvme/nvme.c Thu Sep 7 09:03:12 2017 (r323262) @@ -78,6 +78,7 @@ static driver_t nvme_pci_driver = { DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, nvme_modevent, 0); MODULE_VERSION(nvme, 1); +MODULE_DEPEND(nvme, cam, 1, 1, 1); static struct _pcsid { From owner-svn-src-stable@freebsd.org Thu Sep 7 12:50:23 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47AF0E1CB6F; Thu, 7 Sep 2017 12:50:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FDA466547; Thu, 7 Sep 2017 12:50:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v87CoLpN036741; Thu, 7 Sep 2017 12:50:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v87CoLEd036740; Thu, 7 Sep 2017 12:50:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201709071250.v87CoLEd036740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 7 Sep 2017 12:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323264 - stable/11/sys/dev/ntb X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/ntb X-SVN-Commit-Revision: 323264 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 12:50:23 -0000 Author: mav Date: Thu Sep 7 12:50:21 2017 New Revision: 323264 URL: https://svnweb.freebsd.org/changeset/base/323264 Log: MFC r323047: Make ntb_set_ctx() always generate fake link event. It allows application driver get initial link state without racing with hardware interrupts, thanks to the context rmlock held here. Modified: stable/11/sys/dev/ntb/ntb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ntb/ntb.c ============================================================================== --- stable/11/sys/dev/ntb/ntb.c Thu Sep 7 10:56:50 2017 (r323263) +++ stable/11/sys/dev/ntb/ntb.c Thu Sep 7 12:50:21 2017 (r323264) @@ -264,6 +264,13 @@ ntb_set_ctx(device_t ntb, void *ctx, const struct ntb_ } nc->ctx = ctx; nc->ctx_ops = ctx_ops; + + /* + * If applicaiton driver asks for link events, generate fake one now + * to let it update link state without races while we hold the lock. + */ + if (ctx_ops->link_event != NULL) + ctx_ops->link_event(ctx); rm_wunlock(&nc->ctx_lock); return (0); From owner-svn-src-stable@freebsd.org Thu Sep 7 12:51:40 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E027E1CC77; Thu, 7 Sep 2017 12:51:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A68C669AD; Thu, 7 Sep 2017 12:51:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v87CpdJ2038462; Thu, 7 Sep 2017 12:51:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v87CpdvX038461; Thu, 7 Sep 2017 12:51:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201709071251.v87CpdvX038461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 7 Sep 2017 12:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323265 - stable/11/sys/dev/ntb X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/ntb X-SVN-Commit-Revision: 323265 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 12:51:40 -0000 Author: mav Date: Thu Sep 7 12:51:39 2017 New Revision: 323265 URL: https://svnweb.freebsd.org/changeset/base/323265 Log: MFC r323046: Make ntb_transport(4) ready receive early link events. Those events may be reported as soon as callback is registered, if the link is enabled by hardware or some other application. While there, clean link_is_up variable on link down event. Modified: stable/11/sys/dev/ntb/ntb_transport.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ntb/ntb_transport.c ============================================================================== --- stable/11/sys/dev/ntb/ntb_transport.c Thu Sep 7 12:50:21 2017 (r323264) +++ stable/11/sys/dev/ntb/ntb_transport.c Thu Sep 7 12:51:39 2017 (r323265) @@ -442,12 +442,12 @@ ntb_transport_attach(device_t dev) callout_init(&nt->link_work, 0); callout_init(&nt->link_watchdog, 0); TASK_INIT(&nt->link_cleanup, 0, ntb_transport_link_cleanup_work, nt); + nt->link_is_up = false; rc = ntb_set_ctx(dev, nt, &ntb_transport_ops); if (rc != 0) goto err; - nt->link_is_up = false; ntb_link_enable(dev, NTB_SPEED_AUTO, NTB_WIDTH_AUTO); if (enable_xeon_watchdog != 0) @@ -1274,6 +1274,9 @@ ntb_transport_link_cleanup(struct ntb_transport_ctx *n struct ntb_transport_qp *qp; int i; + callout_drain(&nt->link_work); + nt->link_is_up = 0; + /* Pass along the info to any clients */ for (i = 0; i < nt->qp_count; i++) { if ((nt->qp_bitmap & (1 << i)) != 0) { @@ -1282,9 +1285,6 @@ ntb_transport_link_cleanup(struct ntb_transport_ctx *n callout_drain(&qp->link_work); } } - - if (!nt->link_is_up) - callout_drain(&nt->link_work); /* * The scratchpad registers keep the values if the remote side From owner-svn-src-stable@freebsd.org Thu Sep 7 19:23:09 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC63DE0A221; Thu, 7 Sep 2017 19:23:09 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 736BE7F3DF; Thu, 7 Sep 2017 19:23:09 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v87JN8V1001706; Thu, 7 Sep 2017 19:23:08 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v87JN8RS001705; Thu, 7 Sep 2017 19:23:08 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709071923.v87JN8RS001705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Thu, 7 Sep 2017 19:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323281 - in stable: 10/contrib/file/src 11/contrib/file/src X-SVN-Group: stable-11 X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in stable: 10/contrib/file/src 11/contrib/file/src X-SVN-Commit-Revision: 323281 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 19:23:10 -0000 Author: gordon Date: Thu Sep 7 19:23:08 2017 New Revision: 323281 URL: https://svnweb.freebsd.org/changeset/base/323281 Log: MFC r323278: Fix an incorrectly used conditional causing buffer overflow. Reported by: Thomas Jarosch of Intra2net AG Reviewed by: emaste, jhb Approved by: re (marius) Security: CVE-2017-1000249 Modified: stable/11/contrib/file/src/readelf.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/file/src/readelf.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/file/src/readelf.c ============================================================================== --- stable/11/contrib/file/src/readelf.c Thu Sep 7 19:15:31 2017 (r323280) +++ stable/11/contrib/file/src/readelf.c Thu Sep 7 19:23:08 2017 (r323281) @@ -509,7 +509,7 @@ do_bid_note(struct magic_set *ms, unsigned char *nbuf, size_t noff, size_t doff, int *flags) { if (namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 && - type == NT_GNU_BUILD_ID && (descsz >= 4 || descsz <= 20)) { + type == NT_GNU_BUILD_ID && (descsz >= 4 && descsz <= 20)) { uint8_t desc[20]; const char *btype; uint32_t i; From owner-svn-src-stable@freebsd.org Thu Sep 7 19:23:10 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99237E0A227; Thu, 7 Sep 2017 19:23:10 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0EC27F3E3; Thu, 7 Sep 2017 19:23:09 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v87JN8T6001712; Thu, 7 Sep 2017 19:23:08 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v87JN89l001711; Thu, 7 Sep 2017 19:23:08 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201709071923.v87JN89l001711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Thu, 7 Sep 2017 19:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323281 - in stable: 10/contrib/file/src 11/contrib/file/src X-SVN-Group: stable-10 X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in stable: 10/contrib/file/src 11/contrib/file/src X-SVN-Commit-Revision: 323281 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 19:23:10 -0000 Author: gordon Date: Thu Sep 7 19:23:08 2017 New Revision: 323281 URL: https://svnweb.freebsd.org/changeset/base/323281 Log: MFC r323278: Fix an incorrectly used conditional causing buffer overflow. Reported by: Thomas Jarosch of Intra2net AG Reviewed by: emaste, jhb Approved by: re (marius) Security: CVE-2017-1000249 Modified: stable/10/contrib/file/src/readelf.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/file/src/readelf.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/file/src/readelf.c ============================================================================== --- stable/10/contrib/file/src/readelf.c Thu Sep 7 19:15:31 2017 (r323280) +++ stable/10/contrib/file/src/readelf.c Thu Sep 7 19:23:08 2017 (r323281) @@ -509,7 +509,7 @@ do_bid_note(struct magic_set *ms, unsigned char *nbuf, size_t noff, size_t doff, int *flags) { if (namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 && - type == NT_GNU_BUILD_ID && (descsz >= 4 || descsz <= 20)) { + type == NT_GNU_BUILD_ID && (descsz >= 4 && descsz <= 20)) { uint8_t desc[20]; const char *btype; uint32_t i; From owner-svn-src-stable@freebsd.org Thu Sep 7 19:57:33 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0025CE0C2CA; Thu, 7 Sep 2017 19:57:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A54F725FC; Thu, 7 Sep 2017 19:57:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v87JvVdg014161; Thu, 7 Sep 2017 19:57:31 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v87JvVdM014160; Thu, 7 Sep 2017 19:57:31 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201709071957.v87JvVdM014160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 7 Sep 2017 19:57:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323284 - stable/11/tests/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/tests/sys/netinet X-SVN-Commit-Revision: 323284 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 19:57:33 -0000 Author: asomers Date: Thu Sep 7 19:57:31 2017 New Revision: 323284 URL: https://svnweb.freebsd.org/changeset/base/323284 Log: MFC r322255: tests/sys/netinet/fibs_test: skip selected tests when firewalls are enabled Some tests send packets over epair(4) interfaces. Firewalls can cause spurious failures. Reviewed by: ngie Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D11917 Modified: stable/11/tests/sys/netinet/fibs_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/netinet/fibs_test.sh ============================================================================== --- stable/11/tests/sys/netinet/fibs_test.sh Thu Sep 7 19:52:04 2017 (r323283) +++ stable/11/tests/sys/netinet/fibs_test.sh Thu Sep 7 19:57:31 2017 (r323284) @@ -766,6 +766,12 @@ get_epair() { local EPAIRD + if (which pfctl && pfctl -s info | grep -q 'Status: Enabled') || + [ `sysctl -n net.inet.ip.fw.enable` = "1" ] || + (which ipf && ipf -V); then + atf_skip "firewalls interfere with this test" + fi + if EPAIRD=`ifconfig epair create`; then # Record the epair device so we can clean it up later echo ${EPAIRD} >> "ifaces_to_cleanup" From owner-svn-src-stable@freebsd.org Thu Sep 7 20:18:59 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93484E0D562; Thu, 7 Sep 2017 20:18:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCA7566618; Thu, 7 Sep 2017 20:18:58 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v87KIv8V023749; Thu, 7 Sep 2017 20:18:57 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v87KIvwk023748; Thu, 7 Sep 2017 20:18:57 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201709072018.v87KIvwk023748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 7 Sep 2017 20:18:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323285 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 323285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 20:18:59 -0000 Author: asomers Date: Thu Sep 7 20:18:57 2017 New Revision: 323285 URL: https://svnweb.freebsd.org/changeset/base/323285 Log: MFC r322546: Fix some ZFS debugging messages sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Be more careful about the use of provider names vs vdev names in ZFS_LOG statements. Sponsored by: Spectra Logic Corp Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Sep 7 19:57:31 2017 (r323284) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Sep 7 20:18:57 2017 (r323285) @@ -745,7 +745,7 @@ vdev_geom_open_by_guids(vdev_t *vd) ZFS_LOG(1, "Attach by guid [%ju:%ju] succeeded, provider %s.", (uintmax_t)spa_guid(vd->vdev_spa), - (uintmax_t)vd->vdev_guid, vd->vdev_path); + (uintmax_t)vd->vdev_guid, cp->provider->name); } else { ZFS_LOG(1, "Search by guid [%ju:%ju] failed.", (uintmax_t)spa_guid(vd->vdev_spa), @@ -847,12 +847,12 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t * VERIFY(tsd_set(zfs_geom_probe_vdev_key, NULL) == 0); if (cp == NULL) { - ZFS_LOG(1, "Provider %s not found.", vd->vdev_path); + ZFS_LOG(1, "Vdev %s not found.", vd->vdev_path); error = ENOENT; } else if (cp->provider->sectorsize > VDEV_PAD_SIZE || !ISP2(cp->provider->sectorsize)) { ZFS_LOG(1, "Provider %s has unsupported sectorsize.", - vd->vdev_path); + cp->provider->name); vdev_geom_close_locked(vd); error = EINVAL; @@ -870,7 +870,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t * } if (error != 0) { printf("ZFS WARNING: Unable to open %s for writing (error=%d).\n", - vd->vdev_path, error); + cp->provider->name, error); vdev_geom_close_locked(vd); cp = NULL; } From owner-svn-src-stable@freebsd.org Thu Sep 7 23:28:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1E2FE17208; Thu, 7 Sep 2017 23:28:37 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07BC4709A7; Thu, 7 Sep 2017 23:28:36 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v87NSafG000792; Thu, 7 Sep 2017 23:28:36 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v87NSapG000791; Thu, 7 Sep 2017 23:28:36 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709072328.v87NSapG000791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 7 Sep 2017 23:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323291 - stable/10/bin/date X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/bin/date X-SVN-Commit-Revision: 323291 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 23:28:38 -0000 Author: marius Date: Thu Sep 7 23:28:35 2017 New Revision: 323291 URL: https://svnweb.freebsd.org/changeset/base/323291 Log: MFC: r321293 date: avoid crash on invalid time PR: 220828 Approved by: re (kib) Modified: stable/10/bin/date/date.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/date/date.c ============================================================================== --- stable/10/bin/date/date.c Thu Sep 7 21:43:39 2017 (r323290) +++ stable/10/bin/date/date.c Thu Sep 7 23:28:35 2017 (r323291) @@ -85,7 +85,7 @@ main(int argc, char *argv[]) int set_timezone; struct vary *v; const struct vary *badv; - struct tm lt; + struct tm *lt; struct stat sb; v = NULL; @@ -174,8 +174,10 @@ main(int argc, char *argv[]) if (*argv && **argv == '+') format = *argv + 1; - lt = *localtime(&tval); - badv = vary_apply(v, <); + lt = localtime(&tval); + if (lt == NULL) + errx(1, "invalid time"); + badv = vary_apply(v, lt); if (badv) { fprintf(stderr, "%s: Cannot apply date adjustment\n", badv->arg); @@ -191,7 +193,7 @@ main(int argc, char *argv[]) */ setlocale(LC_TIME, "C"); - (void)strftime(buf, sizeof(buf), format, <); + (void)strftime(buf, sizeof(buf), format, lt); (void)printf("%s\n", buf); if (fflush(stdout)) err(1, "stdout"); @@ -210,6 +212,8 @@ setthetime(const char *fmt, const char *p, int jflag, int century; lt = localtime(&tval); + if (lt == NULL) + errx(1, "invalid time"); lt->tm_isdst = -1; /* divine correct DST */ if (fmt != NULL) { From owner-svn-src-stable@freebsd.org Fri Sep 8 00:11:12 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37B75E1994C; Fri, 8 Sep 2017 00:11:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A561A7DC1A; Fri, 8 Sep 2017 00:11:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v880BATp016920; Fri, 8 Sep 2017 00:11:10 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v880BAfn016917; Fri, 8 Sep 2017 00:11:10 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709080011.v880BAfn016917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 8 Sep 2017 00:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323292 - stable/11/sys/dev/e1000 X-SVN-Group: stable-11 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/11/sys/dev/e1000 X-SVN-Commit-Revision: 323292 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 00:11:12 -0000 Author: marius Date: Fri Sep 8 00:11:10 2017 New Revision: 323292 URL: https://svnweb.freebsd.org/changeset/base/323292 Log: - Ever since the workaround for the silicon bug of TSO4 causing MAC hangs was committed in r295133, CSUM_TSO gets always disabled by em(4) on the first invocation of em_init_locked() given that at that point no link is established, yet. In turn, this causes CSUM_TSO also to be off when em(4) is used as a parent device for vlan(4), i. e. besides IFCAP_TSO4, also IFCAP_VLAN_HWTSO effectively doesn't work. In head an attempt to fix this was made with r308345, but that revision had several problems on its own. One of which was that r308345 caused IFCAP_TSO4 to also be cleared from both the interface capability and capability enable bits. Thus, once a link switched from gigabit to a lower speed, TSO no longer could be enabled, even not via ifconfig(8). So this change moves the aforementioned WAR to em_update_link_status() like r308345 did, but only alters the hardware assist bits accordingly, leaving IFCAP_TSO4 flags alone. Still, this isn't the only problem r308345 had. Another one is that there just is no way to atomically flush TSO-using descriptors already queued at the point in time a link speed switch to below GbE occurs. Thus, such in-flight descriptors still may hang the MAC. Moreover, at least currently there also is no way of triggering a reconfiguration of vlan(4) when the state of IFCAP_VLAN_HWTSO support changes at runtime, causing vlan(4) to continue employing TSO. Last but not least, testing shows that - despite all the WARs for TSO-related silicon bugs in em(4) - at least 82579 still may hang at gigabit speed with IFCAP_TSO4 enabled. Therefore, this change further removes IFCAP_TSO4 and IFCAP_VLAN_HWTSO from interface capability enable bits as set by em(4). While at it, the use of CSUM_TCP is replaced with CSUM_IP_TSO as em(4) only implements support for IFCAP_TSO4 but not IFCAP_TSO6 (although in principle available with a subset of the supported MACs). At the bottom line, this change allows IFCAP_TSO4 and IFCAP_VLAN_HWTSO to be used again with em(4), but these hardware offloading capabilities now need to be explicitly enabled via ifconfig(8). Beware that it's only considered safe to do so (and also only may work) in environments where the link speed is not to be expected to change from GbE. Moreover, em(4) appears to still be missing some more TSO workarounds for at least some models, specifically the 82579 (I could not find an errata sheet and "specification update" respectively for these latter, though, and the generic ICH8 one doesn't list any TSO related bugs). - Let igb_tso_setup() handle EtherType protocols that are unsupported or for which support hasn't been compiled in gracefully instead of calling panic(9). - Make em_allocate_{legacy,msix}() and lem_allocate_irq() match their prototypes WRT static. This is a direct commit to stable/11 as corresponding code is no longer present in head. Modified: stable/11/sys/dev/e1000/if_em.c stable/11/sys/dev/e1000/if_igb.c stable/11/sys/dev/e1000/if_lem.c Modified: stable/11/sys/dev/e1000/if_em.c ============================================================================== --- stable/11/sys/dev/e1000/if_em.c Thu Sep 7 23:28:35 2017 (r323291) +++ stable/11/sys/dev/e1000/if_em.c Fri Sep 8 00:11:10 2017 (r323292) @@ -376,11 +376,6 @@ MODULE_DEPEND(em, netmap, 1, 1, 1); #define MAX_INTS_PER_SEC 8000 #define DEFAULT_ITR (1000000000/(MAX_INTS_PER_SEC * 256)) -/* Allow common code without TSO */ -#ifndef CSUM_TSO -#define CSUM_TSO 0 -#endif - #define TSO_WORKAROUND 4 static SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD, 0, "EM driver parameters"); @@ -1400,18 +1395,10 @@ em_init_locked(struct adapter *adapter) E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN); /* Set hardware offload abilities */ - if_clearhwassist(ifp); if (if_getcapenable(ifp) & IFCAP_TXCSUM) if_sethwassistbits(ifp, CSUM_TCP | CSUM_UDP, 0); - /* - ** There have proven to be problems with TSO when not - ** at full gigabit speed, so disable the assist automatically - ** when at lower speeds. -jfv - */ - if (if_getcapenable(ifp) & IFCAP_TSO4) { - if (adapter->link_speed == SPEED_1000) - if_sethwassistbits(ifp, CSUM_TSO, 0); - } + else + if_sethwassistbits(ifp, 0, CSUM_TCP | CSUM_UDP); /* Configure for OS presence */ em_init_manageability(adapter); @@ -1926,7 +1913,7 @@ em_xmit(struct tx_ring *txr, struct mbuf **m_headp) bool do_tso, tso_desc, remap = TRUE; m_head = *m_headp; - do_tso = (m_head->m_pkthdr.csum_flags & CSUM_TSO); + do_tso = m_head->m_pkthdr.csum_flags & CSUM_IP_TSO; tso_desc = FALSE; ip_off = poff = 0; @@ -2113,7 +2100,7 @@ retry: m_head = *m_headp; /* Do hardware assists */ - if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { + if (m_head->m_pkthdr.csum_flags & CSUM_IP_TSO) { em_tso_setup(txr, m_head, ip_off, ip, tp, &txd_upper, &txd_lower); /* we need to make a final sentinel transmit desc */ @@ -2419,6 +2406,19 @@ em_update_link_status(struct adapter *adapter) if (link_check && (adapter->link_active == 0)) { e1000_get_speed_and_duplex(hw, &adapter->link_speed, &adapter->link_duplex); + + /* + ** There have proven to be problems with TSO when not at full + ** gigabit speed, so disable the assist automatically when at + ** lower speeds. -jfv + */ + if (if_getcapenable(ifp) & IFCAP_TSO4) { + if (adapter->link_speed == SPEED_1000) + if_sethwassistbits(ifp, CSUM_IP_TSO, 0); + else + if_sethwassistbits(ifp, 0, CSUM_IP_TSO); + } + /* Check if we must disable SPEED_MODE bit on PCI-E */ if ((adapter->link_speed != SPEED_1000) && ((hw->mac.type == e1000_82571) || @@ -2555,7 +2555,7 @@ em_allocate_pci_resources(struct adapter *adapter) * Setup the Legacy or MSI Interrupt handler * **********************************************************************/ -int +static int em_allocate_legacy(struct adapter *adapter) { device_t dev = adapter->dev; @@ -2612,7 +2612,7 @@ em_allocate_legacy(struct adapter *adapter) * for TX, RX, and Link. * **********************************************************************/ -int +static int em_allocate_msix(struct adapter *adapter) { device_t dev = adapter->dev; @@ -3225,12 +3225,9 @@ em_setup_interface(device_t dev, struct adapter *adapt ether_ifattach(ifp, adapter->hw.mac.addr); - if_setcapabilities(ifp, 0); - if_setcapenable(ifp, 0); + if_setcapabilities(ifp, IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM); + if_setcapenable(ifp, if_getcapabilities(ifp)); - - if_setcapabilitiesbit(ifp, IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | - IFCAP_TSO4, 0); /* * Tell the upper layer(s) we * support full VLAN capability @@ -3238,7 +3235,25 @@ em_setup_interface(device_t dev, struct adapter *adapt if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | IFCAP_VLAN_MTU, 0); - if_setcapenable(ifp, if_getcapabilities(ifp)); + if_setcapenablebit(ifp, IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU, 0); + + /* + * We don't enable IFCAP_{TSO4,VLAN_HWTSO} by default because: + * - Although the silicon bug of TSO only working at gigabit speed is + * worked around in em_update_link_status() by selectively setting + * CSUM_IP_TSO, we cannot atomically flush already queued TSO-using + * descriptors. Thus, such descriptors may still cause the MAC to + * hang and, consequently, TSO is only safe to be used in setups + * where the link isn't expected to switch from gigabit to lower + * speeds. + * - Similarly, there's currently no way to trigger a reconfiguration + * of vlan(4) when the state of IFCAP_VLAN_HWTSO support changes at + * runtime. Therefore, IFCAP_VLAN_HWTSO also only is safe to use + * when link speed changes are not to be expected. + * - Despite all the workarounds for TSO-related silicon bugs, at + * least 82579 still may hang at gigabit speed with IFCAP_TSO4. + */ + if_setcapabilitiesbit(ifp, IFCAP_TSO4 | IFCAP_VLAN_HWTSO, 0); /* ** Don't turn this on by default, if vlans are Modified: stable/11/sys/dev/e1000/if_igb.c ============================================================================== --- stable/11/sys/dev/e1000/if_igb.c Thu Sep 7 23:28:35 2017 (r323291) +++ stable/11/sys/dev/e1000/if_igb.c Fri Sep 8 00:11:10 2017 (r323292) @@ -3833,9 +3833,10 @@ igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, break; #endif default: - panic("%s: CSUM_TSO but no supported IP version (0x%04x)", - __func__, ntohs(eh_type)); - break; + device_printf(adapter->dev, + "CSUM_TSO but no supported IP version (0x%04x)", + ntohs(eh_type)); + return (ENXIO); } ctxd = txr->next_avail_desc; Modified: stable/11/sys/dev/e1000/if_lem.c ============================================================================== --- stable/11/sys/dev/e1000/if_lem.c Thu Sep 7 23:28:35 2017 (r323291) +++ stable/11/sys/dev/e1000/if_lem.c Fri Sep 8 00:11:10 2017 (r323292) @@ -2316,7 +2316,7 @@ lem_allocate_pci_resources(struct adapter *adapter) * Setup the Legacy or MSI Interrupt handler * **********************************************************************/ -int +static int lem_allocate_irq(struct adapter *adapter) { device_t dev = adapter->dev; From owner-svn-src-stable@freebsd.org Fri Sep 8 00:11:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1EC5E199D3; Fri, 8 Sep 2017 00:11:37 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 446EC7DDAB; Fri, 8 Sep 2017 00:11:37 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v880BaKd017710; Fri, 8 Sep 2017 00:11:36 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v880BZuw017707; Fri, 8 Sep 2017 00:11:35 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709080011.v880BZuw017707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 8 Sep 2017 00:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323293 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/dev/e1000 X-SVN-Commit-Revision: 323293 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 00:11:38 -0000 Author: marius Date: Fri Sep 8 00:11:35 2017 New Revision: 323293 URL: https://svnweb.freebsd.org/changeset/base/323293 Log: - Ever since the workaround for the silicon bug of TSO4 causing MAC hangs was committed in r295133 (MFCed to stable/10 in r295287), CSUM_TSO gets always disabled by em(4) on the first invocation of em_init_locked() as at that point no link is established, yet. In turn, this causes CSUM_TSO also to be off when em(4) is used as a parent device for vlan(4), i. e. besides IFCAP_TSO4, IFCAP_VLAN_HWTSO effectively doesn't work either. In head an attempt to fix this was made with r308345, but that revision had several problems on its own. One of which was that r308345 caused IFCAP_TSO4 to also be cleared from both the interface capability and capability enable bits. Thus, once a link switched from gigabit to a lower speed, TSO no longer could be enabled, even not via ifconfig(8). So this change moves the aforementioned WAR to em_update_link_status() like r308345 did, but only alters the hardware assist bits accordingly, leaving IFCAP_TSO4 flags alone. Still, this isn't the only problem r308345 had. Another one is that there just is no way to atomically flush TSO-using descriptors already queued at the point in time a link speed switch to below GbE occurs. Thus, such in-flight descriptors still may hang the MAC. Moreover, at least currently there also is no way of triggering a reconfiguration of vlan(4) when the state of IFCAP_VLAN_HWTSO support changes at runtime, causing vlan(4) to continue employing TSO. Last but not least, testing shows that - despite all the WARs for TSO-related silicon bugs in em(4) - at least 82579 still may hang at gigabit speed with IFCAP_TSO4 enabled. Therefore, this change further removes IFCAP_TSO4 and IFCAP_VLAN_HWTSO from interface capability enable bits as set by em(4). While at it, the use of CSUM_TCP is replaced with CSUM_IP_TSO as em(4) only implements support for IFCAP_TSO4 but not IFCAP_TSO6 (although in principle available with a subset of the supported MACs). At the bottom line, this change allows IFCAP_TSO4 and IFCAP_VLAN_HWTSO to be used again with em(4), but these hardware offloading capabilities now need to be explicitly enabled via ifconfig(8). Beware that it's only considered safe to do so (and also only may work) in environments where the link speed is not to be expected to change from GbE. Moreover, em(4) appears to still be missing some more TSO workarounds for at least some models, specifically the 82579 (I could not find an errata sheet and "specification update" respectively for these latter, though, and the generic ICH8 one doesn't list any TSO related bugs). - Let igb_tso_setup() handle EtherType protocols that are unsupported or for which support hasn't been compiled in gracefully instead of calling panic(9). - Make em_allocate_{legacy,msix}() and lem_allocate_irq() match their prototypes WRT static. This is a direct commit to stable/10 as corresponding code is no longer present in head. Approved by: re (gjb, kib) Modified: stable/10/sys/dev/e1000/if_em.c stable/10/sys/dev/e1000/if_igb.c stable/10/sys/dev/e1000/if_lem.c Modified: stable/10/sys/dev/e1000/if_em.c ============================================================================== --- stable/10/sys/dev/e1000/if_em.c Fri Sep 8 00:11:10 2017 (r323292) +++ stable/10/sys/dev/e1000/if_em.c Fri Sep 8 00:11:35 2017 (r323293) @@ -371,11 +371,6 @@ MODULE_DEPEND(em, ether, 1, 1, 1); #define MAX_INTS_PER_SEC 8000 #define DEFAULT_ITR (1000000000/(MAX_INTS_PER_SEC * 256)) -/* Allow common code without TSO */ -#ifndef CSUM_TSO -#define CSUM_TSO 0 -#endif - #define TSO_WORKAROUND 4 static SYSCTL_NODE(_hw, OID_AUTO, em, CTLFLAG_RD, 0, "EM driver parameters"); @@ -1406,18 +1401,10 @@ em_init_locked(struct adapter *adapter) E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN); /* Set hardware offload abilities */ - ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); - /* - ** There have proven to be problems with TSO when not - ** at full gigabit speed, so disable the assist automatically - ** when at lower speeds. -jfv - */ - if (ifp->if_capenable & IFCAP_TSO4) { - if (adapter->link_speed == SPEED_1000) - ifp->if_hwassist |= CSUM_TSO; - } + else + ifp->if_hwassist &= ~(CSUM_TCP | CSUM_UDP); /* Configure for OS presence */ em_init_manageability(adapter); @@ -1933,7 +1920,7 @@ em_xmit(struct tx_ring *txr, struct mbuf **m_headp) bool do_tso, tso_desc, remap = TRUE; m_head = *m_headp; - do_tso = (m_head->m_pkthdr.csum_flags & CSUM_TSO); + do_tso = m_head->m_pkthdr.csum_flags & CSUM_IP_TSO; tso_desc = FALSE; ip_off = poff = 0; @@ -2120,7 +2107,7 @@ retry: m_head = *m_headp; /* Do hardware assists */ - if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { + if (m_head->m_pkthdr.csum_flags & CSUM_IP_TSO) { em_tso_setup(txr, m_head, ip_off, ip, tp, &txd_upper, &txd_lower); /* we need to make a final sentinel transmit desc */ @@ -2465,6 +2452,19 @@ em_update_link_status(struct adapter *adapter) if (link_check && (adapter->link_active == 0)) { e1000_get_speed_and_duplex(hw, &adapter->link_speed, &adapter->link_duplex); + + /* + ** There have proven to be problems with TSO when not at full + ** gigabit speed, so disable the assist automatically when at + ** lower speeds. -jfv + */ + if (ifp->if_capenable & IFCAP_TSO4) { + if (adapter->link_speed == SPEED_1000) + ifp->if_hwassist |= CSUM_IP_TSO; + else + ifp->if_hwassist &= ~CSUM_IP_TSO; + } + /* Check if we must disable SPEED_MODE bit on PCI-E */ if ((adapter->link_speed != SPEED_1000) && ((hw->mac.type == e1000_82571) || @@ -2601,7 +2601,7 @@ em_allocate_pci_resources(struct adapter *adapter) * Setup the Legacy or MSI Interrupt handler * **********************************************************************/ -int +static int em_allocate_legacy(struct adapter *adapter) { device_t dev = adapter->dev; @@ -2658,7 +2658,7 @@ em_allocate_legacy(struct adapter *adapter) * for TX, RX, and Link. * **********************************************************************/ -int +static int em_allocate_msix(struct adapter *adapter) { device_t dev = adapter->dev; @@ -3270,11 +3270,9 @@ em_setup_interface(device_t dev, struct adapter *adapt ether_ifattach(ifp, adapter->hw.mac.addr); - ifp->if_capabilities = ifp->if_capenable = 0; + ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM; + ifp->if_capenable = ifp->if_capabilities; - - ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM; - ifp->if_capabilities |= IFCAP_TSO4; /* * Tell the upper layer(s) we * support full VLAN capability @@ -3283,7 +3281,26 @@ em_setup_interface(device_t dev, struct adapter *adapt ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | IFCAP_VLAN_MTU; - ifp->if_capenable = ifp->if_capabilities; + ifp->if_capenable |= IFCAP_VLAN_HWTAGGING + | IFCAP_VLAN_MTU; + + /* + * We don't enable IFCAP_{TSO4,VLAN_HWTSO} by default because: + * - Although the silicon bug of TSO only working at gigabit speed is + * worked around in em_update_link_status() by selectively setting + * CSUM_IP_TSO, we cannot atomically flush already queued TSO-using + * descriptors. Thus, such descriptors may still cause the MAC to + * hang and, consequently, TSO is only safe to be used in setups + * where the link isn't expected to switch from gigabit to lower + * speeds. + * - Similarly, there's currently no way to trigger a reconfiguration + * of vlan(4) when the state of IFCAP_VLAN_HWTSO support changes at + * runtime. Therefore, IFCAP_VLAN_HWTSO also only is safe to use + * when link speed changes are not to be expected. + * - Despite all the workarounds for TSO-related silicon bugs, at + * least 82579 still may hang at gigabit speed with IFCAP_TSO4. + */ + ifp->if_capabilities |= IFCAP_TSO4 | IFCAP_VLAN_HWTSO; /* ** Don't turn this on by default, if vlans are Modified: stable/10/sys/dev/e1000/if_igb.c ============================================================================== --- stable/10/sys/dev/e1000/if_igb.c Fri Sep 8 00:11:10 2017 (r323292) +++ stable/10/sys/dev/e1000/if_igb.c Fri Sep 8 00:11:35 2017 (r323293) @@ -3737,9 +3737,10 @@ igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, break; #endif default: - panic("%s: CSUM_TSO but no supported IP version (0x%04x)", - __func__, ntohs(eh_type)); - break; + device_printf(adapter->dev, + "CSUM_TSO but no supported IP version (0x%04x)", + ntohs(eh_type)); + return (ENXIO); } ctxd = txr->next_avail_desc; Modified: stable/10/sys/dev/e1000/if_lem.c ============================================================================== --- stable/10/sys/dev/e1000/if_lem.c Fri Sep 8 00:11:10 2017 (r323292) +++ stable/10/sys/dev/e1000/if_lem.c Fri Sep 8 00:11:35 2017 (r323293) @@ -2336,7 +2336,7 @@ lem_allocate_pci_resources(struct adapter *adapter) * Setup the Legacy or MSI Interrupt handler * **********************************************************************/ -int +static int lem_allocate_irq(struct adapter *adapter) { device_t dev = adapter->dev; From owner-svn-src-stable@freebsd.org Fri Sep 8 00:12:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 990A9E19A99; Fri, 8 Sep 2017 00:12:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4657D7DF1C; Fri, 8 Sep 2017 00:12:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v880BxsD020736; Fri, 8 Sep 2017 00:11:59 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v880BxZB020735; Fri, 8 Sep 2017 00:11:59 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201709080011.v880BxZB020735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Fri, 8 Sep 2017 00:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323294 - stable/10/sys/conf X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/conf X-SVN-Commit-Revision: 323294 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 00:12:01 -0000 Author: marius Date: Fri Sep 8 00:11:58 2017 New Revision: 323294 URL: https://svnweb.freebsd.org/changeset/base/323294 Log: Update stable/10 to BETA4 in preparation for 10.4-BETA4 builds. Approved by: re (implicit) Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Fri Sep 8 00:11:35 2017 (r323293) +++ stable/10/sys/conf/newvers.sh Fri Sep 8 00:11:58 2017 (r323294) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.4" -BRANCH="BETA3" +BRANCH="BETA4" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@freebsd.org Fri Sep 8 04:32:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65061E019DC; Fri, 8 Sep 2017 04:32:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6B627024E; Fri, 8 Sep 2017 04:32:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v884W2AM026475; Fri, 8 Sep 2017 04:32:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v884W2Lb026474; Fri, 8 Sep 2017 04:32:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201709080432.v884W2Lb026474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 8 Sep 2017 04:32:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323296 - stable/11/usr.sbin/bootparamd/bootparamd X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/usr.sbin/bootparamd/bootparamd X-SVN-Commit-Revision: 323296 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 04:32:04 -0000 Author: ngie Date: Fri Sep 8 04:32:02 2017 New Revision: 323296 URL: https://svnweb.freebsd.org/changeset/base/323296 Log: MFC r322636: Don't leak bpf on early return when YP isn't defined (NIS support) Modified: stable/11/usr.sbin/bootparamd/bootparamd/bootparamd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bootparamd/bootparamd/bootparamd.c ============================================================================== --- stable/11/usr.sbin/bootparamd/bootparamd/bootparamd.c Fri Sep 8 01:06:35 2017 (r323295) +++ stable/11/usr.sbin/bootparamd/bootparamd/bootparamd.c Fri Sep 8 04:32:02 2017 (r323296) @@ -239,6 +239,8 @@ int blen; warnx("could not close %s", bootpfile); return(1); #else + if (fclose(bpf)) + warnx("could not close %s", bootpfile); return(0); /* ENOTSUP */ #endif } From owner-svn-src-stable@freebsd.org Fri Sep 8 04:33:26 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E657E01C28; Fri, 8 Sep 2017 04:33:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22AE17067F; Fri, 8 Sep 2017 04:33:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v884XPni028905; Fri, 8 Sep 2017 04:33:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v884XP5S028904; Fri, 8 Sep 2017 04:33:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201709080433.v884XP5S028904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 8 Sep 2017 04:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323297 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 323297 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 04:33:26 -0000 Author: ngie Date: Fri Sep 8 04:33:24 2017 New Revision: 323297 URL: https://svnweb.freebsd.org/changeset/base/323297 Log: MFC r322633: Honor NO_RTLD for rtld-elf, similar to what's done in libexec/Makefile, with libexec/rtld-elf/... for MK_{LIB32,LIBSOFT}. Modified: stable/11/Makefile.libcompat Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.libcompat ============================================================================== --- stable/11/Makefile.libcompat Fri Sep 8 04:32:02 2017 (r323296) +++ stable/11/Makefile.libcompat Fri Sep 8 04:33:24 2017 (r323297) @@ -161,7 +161,7 @@ build${libcompat}: .PHONY .endfor ${_+_}cd ${.CURDIR}; \ ${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries -.if ${libcompat} == "32" +.if ${libcompat} == "32" && !defined(NO_RTLD) .for _t in obj all ${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIBCOMPATWMAKE} \ -DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t} @@ -174,7 +174,7 @@ distribute${libcompat} install${libcompat}: .PHONY .for _dir in ${_LC_LIBDIRS.yes} ${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATIMAKE} ${.TARGET:S/${libcompat}$//} .endfor -.if ${libcompat} == "32" +.if ${libcompat} == "32" && !defined(NO_RTLD) ${_+_}cd ${.CURDIR}/libexec/rtld-elf; \ PROG=ld-elf32.so.1 ${LIBCOMPATIMAKE} ${.TARGET:S/32$//} ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATIMAKE} \ From owner-svn-src-stable@freebsd.org Fri Sep 8 04:35:46 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98F8DE01DC9; Fri, 8 Sep 2017 04:35:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40DFA70D70; Fri, 8 Sep 2017 04:35:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v884ZjV9029069; Fri, 8 Sep 2017 04:35:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v884Zj1S029067; Fri, 8 Sep 2017 04:35:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201709080435.v884Zj1S029067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 8 Sep 2017 04:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323298 - stable/11/lib/msun/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/msun/tests X-SVN-Commit-Revision: 323298 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 04:35:46 -0000 Author: ngie Date: Fri Sep 8 04:35:44 2017 New Revision: 323298 URL: https://svnweb.freebsd.org/changeset/base/323298 Log: MFC r321456,r321484,r321486: r321456: Convert lib/msun/trig_test from TAP to ATF format Only expose :accuracy and :reduction if !i386, similar to before, but more holistically to avoid future -Wunused issue with the unused functions. r321484: Only test ld_pi_odd with LDBL_MANT_DIG == 64 to fix the build The empty (unimplemented) test inputs for sparc64 trigger a -Wtype-limits build failure because nitems of an empty array is always false, i.e., deadcode. MFC with: r321455 r321486: Re-add #endif accidentally deleted in r321484 MFC with: r321455, r321484 Modified: stable/11/lib/msun/tests/Makefile stable/11/lib/msun/tests/trig_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/tests/Makefile ============================================================================== --- stable/11/lib/msun/tests/Makefile Fri Sep 8 04:33:24 2017 (r323297) +++ stable/11/lib/msun/tests/Makefile Fri Sep 8 04:35:44 2017 (r323298) @@ -70,7 +70,7 @@ TAP_TESTS_C+= nan_test TAP_TESTS_C+= nearbyint_test TAP_TESTS_C+= next_test TAP_TESTS_C+= rem_test -TAP_TESTS_C+= trig_test +ATF_TESTS_C+= trig_test .if !empty(PROG) && !empty(TAP_TESTS_C:M${PROG}) CFLAGS+= -O0 Modified: stable/11/lib/msun/tests/trig_test.c ============================================================================== --- stable/11/lib/msun/tests/trig_test.c Fri Sep 8 04:33:24 2017 (r323297) +++ stable/11/lib/msun/tests/trig_test.c Fri Sep 8 04:35:44 2017 (r323298) @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "test-utils.h" #pragma STDC FENV_ACCESS ON @@ -63,9 +65,9 @@ __FBSDID("$FreeBSD$"); */ #define test(func, x, result, exceptmask, excepts) do { \ volatile long double _d = x; \ - assert(feclearexcept(FE_ALL_EXCEPT) == 0); \ - assert(fpequal((func)(_d), (result))); \ - assert(((void)(func), fetestexcept(exceptmask) == (excepts))); \ + ATF_CHECK(feclearexcept(FE_ALL_EXCEPT) == 0); \ + ATF_CHECK(fpequal((func)(_d), (result))); \ + ATF_CHECK(((void)(func), fetestexcept(exceptmask) == (excepts))); \ } while (0) #define testall(prefix, x, result, exceptmask, excepts) do { \ @@ -79,13 +81,16 @@ __FBSDID("$FreeBSD$"); test(prefix##f, x, (float)result, exceptmask, excepts); \ } while (0) -/* - * Test special cases in sin(), cos(), and tan(). - */ -static void -run_special_tests(void) +ATF_TC(special); +ATF_TC_HEAD(special, tc) { + atf_tc_set_md_var(tc, "descr", + "test special cases in sin(), cos(), and tan()"); +} +ATF_TC_BODY(special, tc) +{ + /* Values at 0 should be exact. */ testall(tan, 0.0, 0.0, ALL_STD_EXCEPT, 0); testall(tan, -0.0, -0.0, ALL_STD_EXCEPT, 0); @@ -108,12 +113,16 @@ run_special_tests(void) testall(cos, NAN, NAN, ALL_STD_EXCEPT, 0); } -/* - * Tests to ensure argument reduction for large arguments is accurate. - */ -static void -run_reduction_tests(void) +#ifndef __i386__ +ATF_TC(reduction); +ATF_TC_HEAD(reduction, tc) { + + atf_tc_set_md_var(tc, "descr", + "tests to ensure argument reduction for large arguments is accurate"); +} +ATF_TC_BODY(reduction, tc) +{ /* floats very close to odd multiples of pi */ static const float f_pi_odd[] = { 85563208.0f, @@ -147,78 +156,77 @@ run_reduction_tests(void) 9.8477555741888350649e+4314L, 1.6061597222105160737e+4326L, }; -#elif LDBL_MANT_DIG == 113 - static const long double ld_pi_odd[] = { - /* XXX */ - }; #endif unsigned i; for (i = 0; i < nitems(f_pi_odd); i++) { - assert(fabs(sinf(f_pi_odd[i])) < FLT_EPSILON); - assert(cosf(f_pi_odd[i]) == -1.0); - assert(fabs(tan(f_pi_odd[i])) < FLT_EPSILON); + ATF_CHECK(fabs(sinf(f_pi_odd[i])) < FLT_EPSILON); + ATF_CHECK(cosf(f_pi_odd[i]) == -1.0); + ATF_CHECK(fabs(tan(f_pi_odd[i])) < FLT_EPSILON); - assert(fabs(sinf(-f_pi_odd[i])) < FLT_EPSILON); - assert(cosf(-f_pi_odd[i]) == -1.0); - assert(fabs(tanf(-f_pi_odd[i])) < FLT_EPSILON); + ATF_CHECK(fabs(sinf(-f_pi_odd[i])) < FLT_EPSILON); + ATF_CHECK(cosf(-f_pi_odd[i]) == -1.0); + ATF_CHECK(fabs(tanf(-f_pi_odd[i])) < FLT_EPSILON); - assert(fabs(sinf(f_pi_odd[i] * 2)) < FLT_EPSILON); - assert(cosf(f_pi_odd[i] * 2) == 1.0); - assert(fabs(tanf(f_pi_odd[i] * 2)) < FLT_EPSILON); + ATF_CHECK(fabs(sinf(f_pi_odd[i] * 2)) < FLT_EPSILON); + ATF_CHECK(cosf(f_pi_odd[i] * 2) == 1.0); + ATF_CHECK(fabs(tanf(f_pi_odd[i] * 2)) < FLT_EPSILON); - assert(fabs(sinf(-f_pi_odd[i] * 2)) < FLT_EPSILON); - assert(cosf(-f_pi_odd[i] * 2) == 1.0); - assert(fabs(tanf(-f_pi_odd[i] * 2)) < FLT_EPSILON); + ATF_CHECK(fabs(sinf(-f_pi_odd[i] * 2)) < FLT_EPSILON); + ATF_CHECK(cosf(-f_pi_odd[i] * 2) == 1.0); + ATF_CHECK(fabs(tanf(-f_pi_odd[i] * 2)) < FLT_EPSILON); } for (i = 0; i < nitems(d_pi_odd); i++) { - assert(fabs(sin(d_pi_odd[i])) < 2 * DBL_EPSILON); - assert(cos(d_pi_odd[i]) == -1.0); - assert(fabs(tan(d_pi_odd[i])) < 2 * DBL_EPSILON); + ATF_CHECK(fabs(sin(d_pi_odd[i])) < 2 * DBL_EPSILON); + ATF_CHECK(cos(d_pi_odd[i]) == -1.0); + ATF_CHECK(fabs(tan(d_pi_odd[i])) < 2 * DBL_EPSILON); - assert(fabs(sin(-d_pi_odd[i])) < 2 * DBL_EPSILON); - assert(cos(-d_pi_odd[i]) == -1.0); - assert(fabs(tan(-d_pi_odd[i])) < 2 * DBL_EPSILON); + ATF_CHECK(fabs(sin(-d_pi_odd[i])) < 2 * DBL_EPSILON); + ATF_CHECK(cos(-d_pi_odd[i]) == -1.0); + ATF_CHECK(fabs(tan(-d_pi_odd[i])) < 2 * DBL_EPSILON); - assert(fabs(sin(d_pi_odd[i] * 2)) < 2 * DBL_EPSILON); - assert(cos(d_pi_odd[i] * 2) == 1.0); - assert(fabs(tan(d_pi_odd[i] * 2)) < 2 * DBL_EPSILON); + ATF_CHECK(fabs(sin(d_pi_odd[i] * 2)) < 2 * DBL_EPSILON); + ATF_CHECK(cos(d_pi_odd[i] * 2) == 1.0); + ATF_CHECK(fabs(tan(d_pi_odd[i] * 2)) < 2 * DBL_EPSILON); - assert(fabs(sin(-d_pi_odd[i] * 2)) < 2 * DBL_EPSILON); - assert(cos(-d_pi_odd[i] * 2) == 1.0); - assert(fabs(tan(-d_pi_odd[i] * 2)) < 2 * DBL_EPSILON); + ATF_CHECK(fabs(sin(-d_pi_odd[i] * 2)) < 2 * DBL_EPSILON); + ATF_CHECK(cos(-d_pi_odd[i] * 2) == 1.0); + ATF_CHECK(fabs(tan(-d_pi_odd[i] * 2)) < 2 * DBL_EPSILON); } -#if LDBL_MANT_DIG > 53 +#if LDBL_MANT_DIG == 64 /* XXX: || LDBL_MANT_DIG == 113 */ for (i = 0; i < nitems(ld_pi_odd); i++) { - assert(fabsl(sinl(ld_pi_odd[i])) < LDBL_EPSILON); - assert(cosl(ld_pi_odd[i]) == -1.0); - assert(fabsl(tanl(ld_pi_odd[i])) < LDBL_EPSILON); + ATF_CHECK(fabsl(sinl(ld_pi_odd[i])) < LDBL_EPSILON); + ATF_CHECK(cosl(ld_pi_odd[i]) == -1.0); + ATF_CHECK(fabsl(tanl(ld_pi_odd[i])) < LDBL_EPSILON); - assert(fabsl(sinl(-ld_pi_odd[i])) < LDBL_EPSILON); - assert(cosl(-ld_pi_odd[i]) == -1.0); - assert(fabsl(tanl(-ld_pi_odd[i])) < LDBL_EPSILON); + ATF_CHECK(fabsl(sinl(-ld_pi_odd[i])) < LDBL_EPSILON); + ATF_CHECK(cosl(-ld_pi_odd[i]) == -1.0); + ATF_CHECK(fabsl(tanl(-ld_pi_odd[i])) < LDBL_EPSILON); - assert(fabsl(sinl(ld_pi_odd[i] * 2)) < LDBL_EPSILON); - assert(cosl(ld_pi_odd[i] * 2) == 1.0); - assert(fabsl(tanl(ld_pi_odd[i] * 2)) < LDBL_EPSILON); + ATF_CHECK(fabsl(sinl(ld_pi_odd[i] * 2)) < LDBL_EPSILON); + ATF_CHECK(cosl(ld_pi_odd[i] * 2) == 1.0); + ATF_CHECK(fabsl(tanl(ld_pi_odd[i] * 2)) < LDBL_EPSILON); - assert(fabsl(sinl(-ld_pi_odd[i] * 2)) < LDBL_EPSILON); - assert(cosl(-ld_pi_odd[i] * 2) == 1.0); - assert(fabsl(tanl(-ld_pi_odd[i] * 2)) < LDBL_EPSILON); + ATF_CHECK(fabsl(sinl(-ld_pi_odd[i] * 2)) < LDBL_EPSILON); + ATF_CHECK(cosl(-ld_pi_odd[i] * 2) == 1.0); + ATF_CHECK(fabsl(tanl(-ld_pi_odd[i] * 2)) < LDBL_EPSILON); } #endif } -/* - * Tests the accuracy of these functions over the primary range. - */ -static void -run_accuracy_tests(void) +ATF_TC(accuracy); +ATF_TC_HEAD(accuracy, tc) { + atf_tc_set_md_var(tc, "descr", + "tests the accuracy of these functions over the primary range"); +} +ATF_TC_BODY(accuracy, tc) +{ + /* For small args, sin(x) = tan(x) = x, and cos(x) = 1. */ testall(sin, 0xd.50ee515fe4aea16p-114L, 0xd.50ee515fe4aea16p-114L, ALL_STD_EXCEPT, FE_INEXACT); @@ -256,25 +264,17 @@ run_accuracy_tests(void) * - tests for large numbers that get reduced to hi+lo with lo!=0 */ } +#endif -int -main(void) +ATF_TP_ADD_TCS(tp) { - printf("1..3\n"); + ATF_TP_ADD_TC(tp, special); - run_special_tests(); - printf("ok 1 - trig\n"); - #ifndef __i386__ - run_reduction_tests(); + ATF_TP_ADD_TC(tp, accuracy); + ATF_TP_ADD_TC(tp, reduction); #endif - printf("ok 2 - trig\n"); -#ifndef __i386__ - run_accuracy_tests(); -#endif - printf("ok 3 - trig\n"); - - return (0); + return (atf_no_error()); } From owner-svn-src-stable@freebsd.org Fri Sep 8 04:37:51 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A4D5E01F4D; Fri, 8 Sep 2017 04:37:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E98AB71563; Fri, 8 Sep 2017 04:37:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v884bnaP029200; Fri, 8 Sep 2017 04:37:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v884bnIh029199; Fri, 8 Sep 2017 04:37:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201709080437.v884bnIh029199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 8 Sep 2017 04:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323299 - stable/11/lib/msun/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/msun/tests X-SVN-Commit-Revision: 323299 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 04:37:51 -0000 Author: ngie Date: Fri Sep 8 04:37:49 2017 New Revision: 323299 URL: https://svnweb.freebsd.org/changeset/base/323299 Log: MFC r321455: Raise WARNS to 1 This will enable warnings with the msun tests. Modified: stable/11/lib/msun/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/tests/Makefile ============================================================================== --- stable/11/lib/msun/tests/Makefile Fri Sep 8 04:35:44 2017 (r323298) +++ stable/11/lib/msun/tests/Makefile Fri Sep 8 04:37:49 2017 (r323299) @@ -4,8 +4,6 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libm -WARNS?= 0 - # All architectures on FreeBSD have fenv.h CFLAGS+= -DHAVE_FENV_H @@ -85,6 +83,8 @@ IGNORE_PRAGMA= SRCS.ilogb2_test= ilogb_test.c LIBADD+= m + +WARNS?= 1 # Copied from lib/msun/Makefile .if ${MACHINE_CPUARCH} == "i386" From owner-svn-src-stable@freebsd.org Fri Sep 8 04:40:01 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33187E020DE; Fri, 8 Sep 2017 04:40:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D01171E7A; Fri, 8 Sep 2017 04:40:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v884dxjJ029338; Fri, 8 Sep 2017 04:39:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v884dxm9029337; Fri, 8 Sep 2017 04:39:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201709080439.v884dxm9029337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 8 Sep 2017 04:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323300 - stable/11/tests/sys/geom/class/gate X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/tests/sys/geom/class/gate X-SVN-Commit-Revision: 323300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 04:40:01 -0000 Author: ngie Date: Fri Sep 8 04:39:59 2017 New Revision: 323300 URL: https://svnweb.freebsd.org/changeset/base/323300 Log: MFC r321702,r321703: r321702: Load geom_gate(4) if necessary before running tests; skip if it can't be loaded The test code prior to r311893 loaded geom_gate at test start if necessary and skipped the tests if it couldn't be loaded. The ATF-ifcation of this test done in r311893 unfortunately dropped this functionality. This change restores the geom_gate module load and skips the test(s) if unavailable in an ATF-like way. PR: 220164 r321703: Remove superfluous `exit 0` added in r321702 atf_skip triggers equivalent functionality, which means the `exit 0` is unreachable code. PR: 220164 MFC with: r321702 Modified: stable/11/tests/sys/geom/class/gate/ggate_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/geom/class/gate/ggate_test.sh ============================================================================== --- stable/11/tests/sys/geom/class/gate/ggate_test.sh Fri Sep 8 04:37:49 2017 (r323299) +++ stable/11/tests/sys/geom/class/gate/ggate_test.sh Fri Sep 8 04:39:59 2017 (r323300) @@ -16,6 +16,8 @@ ggated_head() ggated_body() { + load_ggate + us=$(alloc_ggate_dev) work=$(alloc_md) src=$(alloc_md) @@ -57,6 +59,8 @@ ggatel_file_head() ggatel_file_body() { + load_ggate + us=$(alloc_ggate_dev) echo src work >> ${PLAINFILES} @@ -91,6 +95,8 @@ ggatel_md_head() ggatel_md_body() { + load_ggate + us=$(alloc_ggate_dev) work=$(alloc_md) src=$(alloc_md) @@ -193,6 +199,18 @@ common_cleanup() rm md.devs fi true +} + +load_ggate() +{ + local class=gate + + # If the geom class isn't already loaded, try loading it. + if ! kldstat -q -m g_${class}; then + if ! geom ${class} load; then + atf_skip "could not load module for geom class=${class}" + fi + fi } # Bug 204616: ggatel(8) creates /dev/ggate* asynchronously if `ggatel create` From owner-svn-src-stable@freebsd.org Fri Sep 8 04:45:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25730E02501; Fri, 8 Sep 2017 04:45:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2B9772F61; Fri, 8 Sep 2017 04:45:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v884jJuE033193; Fri, 8 Sep 2017 04:45:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v884jJWs033192; Fri, 8 Sep 2017 04:45:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201709080445.v884jJWs033192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 8 Sep 2017 04:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323301 - stable/11/lib/libprocstat X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/lib/libprocstat X-SVN-Commit-Revision: 323301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 04:45:20 -0000 Author: ngie Date: Fri Sep 8 04:45:18 2017 New Revision: 323301 URL: https://svnweb.freebsd.org/changeset/base/323301 Log: MFC r321704,r321705,r321706: r321704: Add sys/socket.h to SYNOPSIS for libprocstat(3) sys/socket.h is required for procstat_get_socket_info(3), added in r221807. PR: 217884 r321705: libprocstat(3): fix reference (typo) to procstat_freeenvv in description for procstat_getargv(3) PR: 217884 r321706: libprocstat(3): fix arguments list for procstat_getargv(3) and procstat_getenvv(3) Neither libcall takes a fourth argument (`char *errbuf`). PR: 217884 Modified: stable/11/lib/libprocstat/libprocstat.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libprocstat/libprocstat.3 ============================================================================== --- stable/11/lib/libprocstat/libprocstat.3 Fri Sep 8 04:39:59 2017 (r323300) +++ stable/11/lib/libprocstat/libprocstat.3 Fri Sep 8 04:45:18 2017 (r323301) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2015 +.Dd July 29, 2017 .Dt LIBPROCSTAT 3 .Os .Sh NAME @@ -64,6 +64,7 @@ .Sh SYNOPSIS .In sys/param.h .In sys/queue.h +.In sys/socket.h .In libprocstat.h .Ft void .Fn procstat_close "struct procstat *procstat" @@ -149,7 +150,6 @@ .Fa "struct procstat *procstat" .Fa "const struct kinfo_proc *kp" .Fa "size_t nchr" -.Fa "char *errbuf" .Fc .Ft "Elf_Auxinfo *" .Fo procstat_getauxv @@ -162,7 +162,6 @@ .Fa "struct procstat *procstat" .Fa "const struct kinfo_proc *kp" .Fa "size_t nchr" -.Fa "char *errbuf" .Fc .Ft "struct filestat_list *" .Fo procstat_getfiles @@ -352,7 +351,7 @@ function is similar to .Fn procstat_getargv but returns the vector of environment strings. The caller may free the allocated memory with a subsequent -.Fn procstat_freeenv +.Fn procstat_freeenvv function call. .Pp The From owner-svn-src-stable@freebsd.org Fri Sep 8 04:46:57 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB8A3E02671; Fri, 8 Sep 2017 04:46:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D38173696; Fri, 8 Sep 2017 04:46:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v884ku5X033347; Fri, 8 Sep 2017 04:46:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v884ktbV033343; Fri, 8 Sep 2017 04:46:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201709080446.v884ktbV033343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 8 Sep 2017 04:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323302 - in stable/11: bin sbin usr.bin usr.sbin X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/11: bin sbin usr.bin usr.sbin X-SVN-Commit-Revision: 323302 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 04:46:58 -0000 Author: ngie Date: Fri Sep 8 04:46:55 2017 New Revision: 323302 URL: https://svnweb.freebsd.org/changeset/base/323302 Log: MFC r320701: Remove SUBDIR ordering/uniquifying in *bin/Makefile After the addition of SUBDIR.yes, uniquifying/ordering the SUBDIRs doesn't make a whole lot of sense, and it's in effect a half measure. Ordering SUBDIR (after adding SUBDIR.yes to it) in bsd.subdir.mk is a separate change that warrants more discussion/testing, because while the SUBDIR_PARALLEL work largely fixed dependency ordering for SUBDIRs, there might be downstream FreeBSD consumers that rely on the SUBDIR ordering. Modified: stable/11/bin/Makefile stable/11/sbin/Makefile stable/11/usr.bin/Makefile stable/11/usr.sbin/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/Makefile ============================================================================== --- stable/11/bin/Makefile Fri Sep 8 04:45:18 2017 (r323301) +++ stable/11/bin/Makefile Fri Sep 8 04:46:55 2017 (r323302) @@ -47,8 +47,6 @@ SUBDIR.${MK_TESTS}+= tests .include -SUBDIR:= ${SUBDIR:O} - SUBDIR_PARALLEL= .include Modified: stable/11/sbin/Makefile ============================================================================== --- stable/11/sbin/Makefile Fri Sep 8 04:45:18 2017 (r323301) +++ stable/11/sbin/Makefile Fri Sep 8 04:46:55 2017 (r323302) @@ -93,8 +93,6 @@ SUBDIR.${MK_TESTS}+= tests .include -SUBDIR:= ${SUBDIR:O} - SUBDIR_PARALLEL= .include Modified: stable/11/usr.bin/Makefile ============================================================================== --- stable/11/usr.bin/Makefile Fri Sep 8 04:45:18 2017 (r323301) +++ stable/11/usr.bin/Makefile Fri Sep 8 04:46:55 2017 (r323302) @@ -311,8 +311,6 @@ SUBDIR+= mkesdb_static .include -SUBDIR:= ${SUBDIR:O:u} - SUBDIR_PARALLEL= .include Modified: stable/11/usr.sbin/Makefile ============================================================================== --- stable/11/usr.sbin/Makefile Fri Sep 8 04:45:18 2017 (r323301) +++ stable/11/usr.sbin/Makefile Fri Sep 8 04:46:55 2017 (r323302) @@ -217,8 +217,6 @@ SUBDIR.${MK_TESTS}+= tests .include -SUBDIR:= ${SUBDIR:O} - SUBDIR_PARALLEL= .include From owner-svn-src-stable@freebsd.org Fri Sep 8 04:48:26 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93A57E0279A; Fri, 8 Sep 2017 04:48:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39B4273CF6; Fri, 8 Sep 2017 04:48:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v884mPZw033463; Fri, 8 Sep 2017 04:48:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v884mPcI033462; Fri, 8 Sep 2017 04:48:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201709080448.v884mPcI033462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 8 Sep 2017 04:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323303 - stable/11/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/share/mk X-SVN-Commit-Revision: 323303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 04:48:26 -0000 Author: ngie Date: Fri Sep 8 04:48:25 2017 New Revision: 323303 URL: https://svnweb.freebsd.org/changeset/base/323303 Log: MFC r321952: Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS. Modified: stable/11/share/mk/src.opts.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Fri Sep 8 04:46:55 2017 (r323302) +++ stable/11/share/mk/src.opts.mk Fri Sep 8 04:48:25 2017 (r323303) @@ -362,6 +362,10 @@ MK_ATM:= no MK_BLUETOOTH:= no .endif +.if ${MK_NLS} == "no" +MK_NLS_CATALOGS:= no +.endif + .if ${MK_OPENSSL} == "no" MK_OPENSSH:= no MK_KERBEROS:= no From owner-svn-src-stable@freebsd.org Fri Sep 8 04:51:18 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63F30E02A4D; Fri, 8 Sep 2017 04:51:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A45A07469C; Fri, 8 Sep 2017 04:51:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v884pGux036464; Fri, 8 Sep 2017 04:51:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v884pGhH036463; Fri, 8 Sep 2017 04:51:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201709080451.v884pGhH036463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 8 Sep 2017 04:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323304 - stable/11/share/man/man5 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/share/man/man5 X-SVN-Commit-Revision: 323304 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 04:51:18 -0000 Author: ngie Date: Fri Sep 8 04:51:16 2017 New Revision: 323304 URL: https://svnweb.freebsd.org/changeset/base/323304 Log: Regenerate src.conf(5) based on recent changes to src.opts.mk, etc. Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Fri Sep 8 04:48:25 2017 (r323303) +++ stable/11/share/man/man5/src.conf.5 Fri Sep 8 04:51:16 2017 (r323304) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd August 16, 2017 +.Dd September 7, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1150,6 +1150,12 @@ and remove entries. .It Va WITHOUT_NLS Set to not build NLS catalogs. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_NLS_CATALOGS +.El .It Va WITHOUT_NLS_CATALOGS Set to not build NLS catalog support for .Xr csh 1 . @@ -1237,6 +1243,42 @@ and related files. Set to not build .Xr ppp 8 and related programs. +.It Va WITHOUT_PROFILE +Set to not build profiled libraries for use with +.Xr gprof 8 . +.Pp +This is a default setting on +mips/mips64el and mips/mips64. +.It Va WITH_PROFILE +Set to build profiled libraries for use with +.Xr gprof 8 . +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITHOUT_PROFILE +Set to not build profiled libraries for use with +.Xr gprof 8 . +.Pp +This is a default setting on +mips/mips64el. +.It Va WITH_PROFILE +Set to build profiled libraries for use with +.Xr gprof 8 . +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITHOUT_PROFILE +Set to not build profiled libraries for use with +.Xr gprof 8 . +.Pp +This is a default setting on +mips/mips64. +.It Va WITH_PROFILE +Set to build profiled libraries for use with +.Xr gprof 8 . +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_PROFILE Set to not build profiled libraries for use with .Xr gprof 8 . From owner-svn-src-stable@freebsd.org Fri Sep 8 20:41:50 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E34DE09933; Fri, 8 Sep 2017 20:41:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46ABF6A2CB; Fri, 8 Sep 2017 20:41:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v88KfnPC022072; Fri, 8 Sep 2017 20:41:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v88KfnAT022071; Fri, 8 Sep 2017 20:41:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709082041.v88KfnAT022071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 8 Sep 2017 20:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323331 - stable/10/sys/cddl/contrib/opensolaris/common/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/common/zfs X-SVN-Commit-Revision: 323331 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 20:41:50 -0000 Author: emaste Date: Fri Sep 8 20:41:49 2017 New Revision: 323331 URL: https://svnweb.freebsd.org/changeset/base/323331 Log: MFC r323002: zfs: do not advertise unsupported hash algorithms illumos 4185 ("add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R") was intentionally merged only partially in r289422, without adding support for skein, sha512 and edonr on FreeBSD. Support for skein and sha512 was added later on (in head), but none of these are supported in stable/10. Prior to this commit zfs(8) correctly rejected these algorithms, but with an error message that claimed support: fk@r500 ~ $zfs set checksum=edonr tank cannot set property for 'tank': 'checksum' must be one of 'on | off | fletcher2 | fletcher4 | sha256 | sha512 | skein | edonr' (This commit removes sha512 and skein in addition to edonr from the merge of head's r323002.) PR: 204055 Submitted by: Fabian Keil Approved by: re (kib) Obtained from: ElectroBSD Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Fri Sep 8 20:20:35 2017 (r323330) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Fri Sep 8 20:41:49 2017 (r323331) @@ -241,12 +241,12 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_CHECKSUM, "checksum", ZIO_CHECKSUM_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | fletcher2 | fletcher4 | sha256 | sha512 | " - "skein | edonr", "CHECKSUM", checksum_table); + "on | off | fletcher2 | fletcher4 | sha256", + "CHECKSUM", checksum_table); zprop_register_index(ZFS_PROP_DEDUP, "dedup", ZIO_CHECKSUM_OFF, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | verify | sha256[,verify], sha512[,verify], " - "skein[,verify], edonr,verify", "DEDUP", dedup_table); + "on | off | verify | sha256[,verify]", + "DEDUP", dedup_table); zprop_register_index(ZFS_PROP_COMPRESSION, "compression", ZIO_COMPRESS_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, From owner-svn-src-stable@freebsd.org Fri Sep 8 21:02:16 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF681E0A792; Fri, 8 Sep 2017 21:02:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0C346AB76; Fri, 8 Sep 2017 21:02:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v88L2FEB028660; Fri, 8 Sep 2017 21:02:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v88L2FnM028658; Fri, 8 Sep 2017 21:02:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709082102.v88L2FnM028658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 8 Sep 2017 21:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323332 - in stable/10/usr.sbin/pw: . tests X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/10/usr.sbin/pw: . tests X-SVN-Commit-Revision: 323332 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 21:02:17 -0000 Author: emaste Date: Fri Sep 8 21:02:15 2017 New Revision: 323332 URL: https://svnweb.freebsd.org/changeset/base/323332 Log: MFC r322678: pw useradd: Validate the user name before creating the entry Previouly it was possible to create users with spaces in the name with: pw useradd -u 1234 -g 1234 -n 'test user' The "-g 1234" is relevant, without it the name was already rejected as expected: [fk@test ~]$ sudo pw useradd -u 1234 -n 'test user' pw: invalid character ` ' at position 4 in userid/group name Bug unintentionally found with a salt config without explicit name entry: test user: user.present: - uid: 1234 - gid: 1234 - fullname: Test user - shell: /usr/local/bin/bash - home: /home/test - groups: - wheel - salt "Luckily" salt modules rarely bother with input validation either ... PR: 221416 Submitted by: Fabian Keil Approved by: re (kib) Obtained from: ElectroBSD Modified: stable/10/usr.sbin/pw/pw_user.c stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Fri Sep 8 20:41:49 2017 (r323331) +++ stable/10/usr.sbin/pw/pw_user.c Fri Sep 8 21:02:15 2017 (r323332) @@ -1204,7 +1204,7 @@ pw_user_add(int argc, char **argv, char *arg1) if (arg1[strspn(arg1, "0123456789")] == '\0') id = pw_checkid(arg1, UID_MAX); else - name = arg1; + name = pw_checkname(arg1, 0); } while ((ch = getopt(argc, argv, args)) != -1) { @@ -1216,7 +1216,7 @@ pw_user_add(int argc, char **argv, char *arg1) quiet = true; break; case 'n': - name = optarg; + name = pw_checkname(optarg, 0); break; case 'u': userid = optarg; Modified: stable/10/usr.sbin/pw/tests/pw_useradd_test.sh ============================================================================== --- stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Fri Sep 8 20:41:49 2017 (r323331) +++ stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Fri Sep 8 21:02:15 2017 (r323332) @@ -176,6 +176,43 @@ user_add_name_too_long_body() { ${PW} useradd name_very_vert_very_very_very_long } +atf_test_case user_add_name_with_spaces +user_add_name_with_spaces_body() { + populate_etc_skel + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} useradd 'test user' + atf_check -s exit:1 -o empty grep "^test user:.*" $HOME/master.passwd + # Try again with -n which uses a slightly different code path. + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} useradd -n 'test user' + atf_check -s exit:1 -o empty grep "^test user:.*" $HOME/master.passwd +} + +atf_test_case user_add_name_with_spaces_and_gid_specified +user_add_name_with_spaces_and_gid_specified_body() { + populate_etc_skel + gid=12345 + user_name="test user" + # pw useradd should fail because of the space in the user + # name, not because the group doesn't exist. + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} useradd "${user_name}" -g ${gid} + atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd + # Try again with -n which uses a slightly different code path. + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} useradd -n "${user_name}" -g ${gid} + atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd + # Make sure the user isn't added even if the group exists + atf_check -s exit:0 ${PW} groupadd blafasel -g ${gid} + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} useradd "${user_name}" -g ${gid} + atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd + # Try again with the -n option. + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} useradd -n "${user_name}" -g ${gid} + atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd +} + atf_test_case user_add_expiration user_add_expiration_body() { populate_etc_skel @@ -415,6 +452,8 @@ atf_init_test_cases() { atf_add_test_case user_add_password_expiration_date_month atf_add_test_case user_add_password_expiration_date_relative atf_add_test_case user_add_name_too_long + atf_add_test_case user_add_name_with_spaces + atf_add_test_case user_add_name_with_spaces_and_gid_specified atf_add_test_case user_add_expiration atf_add_test_case user_add_invalid_user_entry atf_add_test_case user_add_invalid_group_entry From owner-svn-src-stable@freebsd.org Fri Sep 8 21:16:25 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1459CE0B2DC; Fri, 8 Sep 2017 21:16:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D43936B212; Fri, 8 Sep 2017 21:16:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v88LGNwC035048; Fri, 8 Sep 2017 21:16:23 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v88LGNQ8035046; Fri, 8 Sep 2017 21:16:23 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709082116.v88LGNQ8035046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 8 Sep 2017 21:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323333 - in stable/10/usr.sbin/pw: . tests X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/10/usr.sbin/pw: . tests X-SVN-Commit-Revision: 323333 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 21:16:25 -0000 Author: emaste Date: Fri Sep 8 21:16:23 2017 New Revision: 323333 URL: https://svnweb.freebsd.org/changeset/base/323333 Log: MFC r322677: pw usermod: handle empty secondary group lists (-G '') "pw usermod someuser -G ''" is supposed make sure that someuser doesn't have any secondary group memberships. Previouly it was a nop because split_groups() only intitialised "groups" if at least one group was specified. As a result the existing secondary group memberships were kept. PR: 221417 Submitted by: Fabian Keil Approved by: re (kib) Obtained from: ElectroBSD Relnotes: yes Modified: stable/10/usr.sbin/pw/pw_user.c stable/10/usr.sbin/pw/tests/pw_usermod_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Fri Sep 8 21:02:15 2017 (r323332) +++ stable/10/usr.sbin/pw/pw_user.c Fri Sep 8 21:16:23 2017 (r323333) @@ -1089,10 +1089,10 @@ split_groups(StringList **groups, char *groupsstr) char *p; char tok[] = ", \t"; + if (*groups == NULL) + *groups = sl_init(); for (p = strtok(groupsstr, tok); p != NULL; p = strtok(NULL, tok)) { grp = group_from_name_or_id(p); - if (*groups == NULL) - *groups = sl_init(); sl_add(*groups, newstr(grp->gr_name)); } } Modified: stable/10/usr.sbin/pw/tests/pw_usermod_test.sh ============================================================================== --- stable/10/usr.sbin/pw/tests/pw_usermod_test.sh Fri Sep 8 21:02:15 2017 (r323332) +++ stable/10/usr.sbin/pw/tests/pw_usermod_test.sh Fri Sep 8 21:16:23 2017 (r323333) @@ -128,6 +128,9 @@ user_mod_nogroups_body() { atf_check -s exit:0 ${PW} usermod foo -G test3,test4 atf_check -s exit:0 -o inline:"test3\ntest4\n" \ awk -F\: '$4 == "foo" { print $1 }' ${HOME}/group + atf_check -s exit:0 ${PW} usermod foo -G "" + atf_check -s exit:0 -o empty \ + awk -F\: '$4 == "foo" { print $1 }' ${HOME}/group } atf_test_case user_mod_rename From owner-svn-src-stable@freebsd.org Sat Sep 9 00:33:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D3C9E14B53; Sat, 9 Sep 2017 00:33:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD21371350; Sat, 9 Sep 2017 00:33:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v890XKO7016997; Sat, 9 Sep 2017 00:33:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v890XKCr016996; Sat, 9 Sep 2017 00:33:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709090033.v890XKCr016996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 9 Sep 2017 00:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323336 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 323336 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Sep 2017 00:33:21 -0000 Author: emaste Date: Sat Sep 9 00:33:19 2017 New Revision: 323336 URL: https://svnweb.freebsd.org/changeset/base/323336 Log: MFC r322374: bsdinstall: record DHCP config after obtaining lease Previously we added an ifconfig_$INTERFACE line to rc.conf for each unsuccessful DCHP attempt. PR: 219515 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Fri Sep 8 22:04:28 2017 (r323335) +++ stable/11/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Sep 9 00:33:19 2017 (r323336) @@ -48,8 +48,6 @@ esac dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 if [ $? -eq $DIALOG_OK ]; then - echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net - if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 err=$( dhclient $INTERFACE 2>&1 ) @@ -59,6 +57,7 @@ if [ $? -eq $DIALOG_OK ]; then exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" fi fi + echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net exit 0 fi From owner-svn-src-stable@freebsd.org Sat Sep 9 01:23:31 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A81E5E178C4; Sat, 9 Sep 2017 01:23:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7526172CB4; Sat, 9 Sep 2017 01:23:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v891NUrR036972; Sat, 9 Sep 2017 01:23:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v891NUi9036971; Sat, 9 Sep 2017 01:23:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709090123.v891NUi9036971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 9 Sep 2017 01:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323337 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 323337 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Sep 2017 01:23:31 -0000 Author: emaste Date: Sat Sep 9 01:23:30 2017 New Revision: 323337 URL: https://svnweb.freebsd.org/changeset/base/323337 Log: MFC r322374: bsdinstall: record DHCP config after obtaining lease Previously we added an ifconfig_$INTERFACE line to rc.conf for each unsuccessful DCHP attempt. PR: 219515 Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Sep 9 00:33:19 2017 (r323336) +++ stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Sat Sep 9 01:23:30 2017 (r323337) @@ -48,8 +48,6 @@ esac dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 if [ $? -eq $DIALOG_OK ]; then - echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net - if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 err=$( dhclient $INTERFACE 2>&1 ) @@ -59,6 +57,7 @@ if [ $? -eq $DIALOG_OK ]; then exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" fi fi + echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net exit 0 fi From owner-svn-src-stable@freebsd.org Sat Sep 9 14:30:18 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2A55E19AB2; Sat, 9 Sep 2017 14:30:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF93B6B208; Sat, 9 Sep 2017 14:30:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v89EUGD1056452; Sat, 9 Sep 2017 14:30:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v89EUGnV056451; Sat, 9 Sep 2017 14:30:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709091430.v89EUGnV056451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 9 Sep 2017 14:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r323366 - stable/10/sys/compat/linux X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/compat/linux X-SVN-Commit-Revision: 323366 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Sep 2017 14:30:18 -0000 Author: emaste Date: Sat Sep 9 14:30:16 2017 New Revision: 323366 URL: https://svnweb.freebsd.org/changeset/base/323366 Log: MFC r320069: Add ZFS to Linux statfs ftype PR: 220086 Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/compat/linux/linux_stats.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_stats.c ============================================================================== --- stable/10/sys/compat/linux/linux_stats.c Sat Sep 9 13:18:32 2017 (r323365) +++ stable/10/sys/compat/linux/linux_stats.c Sat Sep 9 14:30:16 2017 (r323366) @@ -351,6 +351,7 @@ struct l_statfs { #define LINUX_NTFS_SUPER_MAGIC 0x5346544EL #define LINUX_PROC_SUPER_MAGIC 0x9fa0L #define LINUX_UFS_SUPER_MAGIC 0x00011954L /* XXX - UFS_MAGIC in Linux */ +#define LINUX_ZFS_SUPER_MAGIC 0x2FC12FC1 #define LINUX_DEVFS_SUPER_MAGIC 0x1373L #define LINUX_SHMFS_MAGIC 0x01021994 @@ -360,6 +361,7 @@ bsd_to_linux_ftype(const char *fstypename) int i; static struct {const char *bsd_name; long linux_type;} b2l_tbl[] = { {"ufs", LINUX_UFS_SUPER_MAGIC}, + {"zfs", LINUX_ZFS_SUPER_MAGIC}, {"cd9660", LINUX_ISOFS_SUPER_MAGIC}, {"nfs", LINUX_NFS_SUPER_MAGIC}, {"ext2fs", LINUX_EXT2_SUPER_MAGIC},