From owner-svn-src-stable-10@freebsd.org Sun Oct 22 21:12:00 2017 Return-Path: Delivered-To: svn-src-stable-10@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 D4C67E362D8; Sun, 22 Oct 2017 21:12:00 +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 A3D6B74FF5; Sun, 22 Oct 2017 21:12: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 v9MLBx2F063708; Sun, 22 Oct 2017 21:11:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9MLBxHw063707; Sun, 22 Oct 2017 21:11:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710222111.v9MLBxHw063707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 22 Oct 2017 21: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: r324872 - stable/10/usr.bin/bsdcat/tests X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/10/usr.bin/bsdcat/tests X-SVN-Commit-Revision: 324872 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-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Oct 2017 21:12:01 -0000 Author: ngie Date: Sun Oct 22 21:11:59 2017 New Revision: 324872 URL: https://svnweb.freebsd.org/changeset/base/324872 Log: Install missing test input file missed in r324418 While here, remove an unnecessary PACKAGE variable definition (only applies to ^/stable/11+). This is a direct commit to ^/stable/10 Modified: stable/10/usr.bin/bsdcat/tests/Makefile Modified: stable/10/usr.bin/bsdcat/tests/Makefile ============================================================================== --- stable/10/usr.bin/bsdcat/tests/Makefile Sun Oct 22 21:00:59 2017 (r324871) +++ stable/10/usr.bin/bsdcat/tests/Makefile Sun Oct 22 21:11:59 2017 (r324872) @@ -1,7 +1,5 @@ # $FreeBSD$ -PACKAGE= tests - _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive ATF_TESTS_SH+= functional_test @@ -61,6 +59,7 @@ CLEANFILES+= list.h list.h.tmp FILES+= test_empty.gz.uu FILES+= test_empty.lz4.uu FILES+= test_empty.xz.uu +FILES+= test_empty.zst.uu FILES+= test_expand.Z.uu FILES+= test_expand.bz2.uu FILES+= test_expand.gz.uu From owner-svn-src-stable-10@freebsd.org Wed Oct 25 01:07:13 2017 Return-Path: Delivered-To: svn-src-stable-10@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 4C5C4E39D89; Wed, 25 Oct 2017 01:07:13 +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 0F43A776A0; Wed, 25 Oct 2017 01:07: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 v9P17C3x059112; Wed, 25 Oct 2017 01:07:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9P17CdW059111; Wed, 25 Oct 2017 01:07:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201710250107.v9P17CdW059111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 25 Oct 2017 01:07:12 +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: r324966 - stable/10/sys/kern X-SVN-Group: stable-10 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/10/sys/kern X-SVN-Commit-Revision: 324966 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-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2017 01:07:13 -0000 Author: markj Date: Wed Oct 25 01:07:12 2017 New Revision: 324966 URL: https://svnweb.freebsd.org/changeset/base/324966 Log: MFC r324704: Fix a racy VI_DOOMED check in MNT_VNODE_FOREACH_ALL(). Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Wed Oct 25 00:51:00 2017 (r324965) +++ stable/10/sys/kern/vfs_subr.c Wed Oct 25 01:07:12 2017 (r324966) @@ -4868,12 +4868,18 @@ __mnt_vnode_next_all(struct vnode **mvp, struct mount kern_yield(PRI_USER); MNT_ILOCK(mp); KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); - vp = TAILQ_NEXT(*mvp, v_nmntvnodes); - while (vp != NULL && (vp->v_type == VMARKER || - (vp->v_iflag & VI_DOOMED) != 0)) - vp = TAILQ_NEXT(vp, v_nmntvnodes); - - /* Check if we are done */ + for (vp = TAILQ_NEXT(*mvp, v_nmntvnodes); vp != NULL; + vp = TAILQ_NEXT(vp, v_nmntvnodes)) { + /* Allow a racy peek at VI_DOOMED to save a lock acquisition. */ + if (vp->v_type == VMARKER || (vp->v_iflag & VI_DOOMED) != 0) + continue; + VI_LOCK(vp); + if ((vp->v_iflag & VI_DOOMED) != 0) { + VI_UNLOCK(vp); + continue; + } + break; + } if (vp == NULL) { __mnt_vnode_markerfree_all(mvp, mp); /* MNT_IUNLOCK(mp); -- done in above function */ @@ -4882,7 +4888,6 @@ __mnt_vnode_next_all(struct vnode **mvp, struct mount } TAILQ_REMOVE(&mp->mnt_nvnodelist, *mvp, v_nmntvnodes); TAILQ_INSERT_AFTER(&mp->mnt_nvnodelist, vp, *mvp, v_nmntvnodes); - VI_LOCK(vp); MNT_IUNLOCK(mp); return (vp); } @@ -4895,14 +4900,20 @@ __mnt_vnode_first_all(struct vnode **mvp, struct mount *mvp = malloc(sizeof(struct vnode), M_VNODE_MARKER, M_WAITOK | M_ZERO); MNT_ILOCK(mp); MNT_REF(mp); + (*mvp)->v_mount = mp; (*mvp)->v_type = VMARKER; - vp = TAILQ_FIRST(&mp->mnt_nvnodelist); - while (vp != NULL && (vp->v_type == VMARKER || - (vp->v_iflag & VI_DOOMED) != 0)) - vp = TAILQ_NEXT(vp, v_nmntvnodes); - - /* Check if we are done */ + TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) { + /* Allow a racy peek at VI_DOOMED to save a lock acquisition. */ + if (vp->v_type == VMARKER || (vp->v_iflag & VI_DOOMED) != 0) + continue; + VI_LOCK(vp); + if ((vp->v_iflag & VI_DOOMED) != 0) { + VI_UNLOCK(vp); + continue; + } + break; + } if (vp == NULL) { MNT_REL(mp); MNT_IUNLOCK(mp); @@ -4910,13 +4921,10 @@ __mnt_vnode_first_all(struct vnode **mvp, struct mount *mvp = NULL; return (NULL); } - (*mvp)->v_mount = mp; TAILQ_INSERT_AFTER(&mp->mnt_nvnodelist, vp, *mvp, v_nmntvnodes); - VI_LOCK(vp); MNT_IUNLOCK(mp); return (vp); } - void __mnt_vnode_markerfree_all(struct vnode **mvp, struct mount *mp) From owner-svn-src-stable-10@freebsd.org Fri Oct 27 14:23:54 2017 Return-Path: Delivered-To: svn-src-stable-10@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 7CB2CE46779; Fri, 27 Oct 2017 14:23:54 +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 4A14167249; Fri, 27 Oct 2017 14:23:54 +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 v9RENrGG093705; Fri, 27 Oct 2017 14:23:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9RENrjh093704; Fri, 27 Oct 2017 14:23:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201710271423.v9RENrjh093704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 27 Oct 2017 14:23:53 +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: r325037 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 325037 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-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Oct 2017 14:23:54 -0000 Author: markj Date: Fri Oct 27 14:23:53 2017 New Revision: 325037 URL: https://svnweb.freebsd.org/changeset/base/325037 Log: MFC r324809: Free the right address range if kmem_back() fails in memguard_alloc(). Modified: stable/10/sys/vm/memguard.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/memguard.c ============================================================================== --- stable/10/sys/vm/memguard.c Fri Oct 27 14:22:56 2017 (r325036) +++ stable/10/sys/vm/memguard.c Fri Oct 27 14:23:53 2017 (r325037) @@ -284,7 +284,7 @@ v2sizev(vm_offset_t va) void * memguard_alloc(unsigned long req_size, int flags) { - vm_offset_t addr; + vm_offset_t addr, origaddr; u_long size_p, size_v; int do_guard, rv; @@ -328,7 +328,7 @@ memguard_alloc(unsigned long req_size, int flags) for (;;) { if (vmem_xalloc(memguard_arena, size_v, 0, 0, 0, memguard_cursor, VMEM_ADDR_MAX, - M_BESTFIT | M_NOWAIT, &addr) == 0) + M_BESTFIT | M_NOWAIT, &origaddr) == 0) break; /* * The map has no space. This may be due to @@ -343,11 +343,12 @@ memguard_alloc(unsigned long req_size, int flags) memguard_wrap++; memguard_cursor = memguard_base; } + addr = origaddr; if (do_guard) addr += PAGE_SIZE; rv = kmem_back(kmem_object, addr, size_p, flags); if (rv != KERN_SUCCESS) { - vmem_xfree(memguard_arena, addr, size_v); + vmem_xfree(memguard_arena, origaddr, size_v); memguard_fail_pgs++; addr = (vm_offset_t)NULL; goto out; From owner-svn-src-stable-10@freebsd.org Sat Oct 28 07:06:58 2017 Return-Path: Delivered-To: svn-src-stable-10@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 781DBE5D94C; Sat, 28 Oct 2017 07:06:58 +0000 (UTC) (envelope-from se@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 457B065E8D; Sat, 28 Oct 2017 07:06:58 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9S76vPg013292; Sat, 28 Oct 2017 07:06:57 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9S76vdK013290; Sat, 28 Oct 2017 07:06:57 GMT (envelope-from se@FreeBSD.org) Message-Id: <201710280706.v9S76vdK013290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sat, 28 Oct 2017 07:06:57 +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: r325053 - in stable/10/share/man: man5 man8 X-SVN-Group: stable-10 X-SVN-Commit-Author: se X-SVN-Commit-Paths: in stable/10/share/man: man5 man8 X-SVN-Commit-Revision: 325053 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-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Oct 2017 07:06:58 -0000 Author: se Date: Sat Oct 28 07:06:57 2017 New Revision: 325053 URL: https://svnweb.freebsd.org/changeset/base/325053 Log: MFC 324721: Add references to sysrc(8) to SEE ALSO. MFC 324823: Mention sysrc(8) as scripting interface for config files. Modified: stable/10/share/man/man5/rc.conf.5 stable/10/share/man/man8/rc.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Sat Oct 28 07:06:30 2017 (r325052) +++ stable/10/share/man/man5/rc.conf.5 Sat Oct 28 07:06:57 2017 (r325053) @@ -64,6 +64,9 @@ is used to override settings in .Pa /etc/rc.conf for historical reasons. .Pp +The sysrc(8) command provides a scripting interface to modify system +config files. +.Pp In addition to .Pa /etc/rc.conf.local you can also place smaller configuration files for each @@ -4693,6 +4696,7 @@ configuration file. .Xr swapon 8 , .Xr sysctl 8 , .Xr syslogd 8 , +.Xr sysrc 8 , .Xr timed 8 , .Xr unbound 8 , .Xr usbconfig 8 , Modified: stable/10/share/man/man8/rc.8 ============================================================================== --- stable/10/share/man/man8/rc.8 Sat Oct 28 07:06:30 2017 (r325052) +++ stable/10/share/man/man8/rc.8 Sat Oct 28 07:06:57 2017 (r325053) @@ -91,6 +91,9 @@ The .Nm rc.d/ directories contain scripts which will be automatically executed at boot time and shutdown time. +.Pp +The sysrc(8) command provides a scripting interface to modify system +config files. .Ss Operation of Nm .Bl -enum .It @@ -557,7 +560,8 @@ is unnecessary, but is often included. .Xr rcorder 8 , .Xr rc.subr 8 , .Xr reboot 8 , -.Xr savecore 8 +.Xr savecore 8 , +.Xr sysrc 8 .Sh HISTORY The .Nm