From owner-svn-src-head@freebsd.org Sun Dec 3 01:56:05 2017 Return-Path: Delivered-To: svn-src-head@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 1306ADB9833; Sun, 3 Dec 2017 01:56:05 +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 E1AED64664; Sun, 3 Dec 2017 01:56:04 +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 vB31u4xv080658; Sun, 3 Dec 2017 01:56:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB31u4Ve080657; Sun, 3 Dec 2017 01:56:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712030156.vB31u4Ve080657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 3 Dec 2017 01:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326482 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 326482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 01:56:05 -0000 Author: emaste Date: Sun Dec 3 01:56:03 2017 New Revision: 326482 URL: https://svnweb.freebsd.org/changeset/base/326482 Log: lib/msun: remove trailing whitespace from e_pow.c Submitted by: Steve Kargl MFC after: 1 week Modified: head/lib/msun/src/e_pow.c Modified: head/lib/msun/src/e_pow.c ============================================================================== --- head/lib/msun/src/e_pow.c Sun Dec 3 00:24:22 2017 (r326481) +++ head/lib/msun/src/e_pow.c Sun Dec 3 01:56:03 2017 (r326482) @@ -4,7 +4,7 @@ * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. * * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ @@ -19,7 +19,7 @@ __FBSDID("$FreeBSD$"); * 1. Compute and return log2(x) in two pieces: * log2(x) = w1 + w2, * where w1 has 53-24 = 29 bit trailing zeros. - * 2. Perform y*log2(x) = n+y' by simulating multi-precision + * 2. Perform y*log2(x) = n+y' by simulating multi-precision * arithmetic, where |y'|<=0.5. * 3. Return x**y = 2**n*exp(y'*log2) * @@ -47,13 +47,13 @@ __FBSDID("$FreeBSD$"); * Accuracy: * pow(x,y) returns x**y nearly rounded. In particular * pow(integer,integer) - * always returns the correct integer provided it is + * always returns the correct integer provided it is * representable. * * Constants : - * The hexadecimal values are the intended ones for the following - * constants. The decimal values may be used, provided that the - * compiler will convert from decimal to binary accurately enough + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough * to produce the hexadecimal values shown. */ @@ -107,14 +107,14 @@ __ieee754_pow(double x, double y) ix = hx&0x7fffffff; iy = hy&0x7fffffff; /* y==zero: x**0 = 1 */ - if((iy|ly)==0) return one; + if((iy|ly)==0) return one; /* x==1: 1**y = 1, even if y is NaN */ if (hx==0x3ff00000 && lx == 0) return one; /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) || - iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) + iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) return (x+0.0)+(y+0.0); /* determine if y is an odd int when x < 0 @@ -123,7 +123,7 @@ __ieee754_pow(double x, double y) * yisint = 2 ... y is an even int */ yisint = 0; - if(hx<0) { + if(hx<0) { if(iy>=0x43400000) yisint = 2; /* even integer y */ else if(iy>=0x3ff00000) { k = (iy>>20)-0x3ff; /* exponent */ @@ -134,11 +134,11 @@ __ieee754_pow(double x, double y) j = iy>>(20-k); if((j<<(20-k))==iy) yisint = 2-(j&1); } - } - } + } + } /* special value of y */ - if(ly==0) { + if(ly==0) { if (iy==0x7ff00000) { /* y is +-inf */ if(((ix-0x3ff00000)|lx)==0) return one; /* (-1)**+-inf is 1 */ @@ -146,14 +146,14 @@ __ieee754_pow(double x, double y) return (hy>=0)? y: zero; else /* (|x|<1)**-,+inf = inf,0 */ return (hy<0)?-y: zero; - } + } if(iy==0x3ff00000) { /* y is +-1 */ if(hy<0) return one/x; else return x; } if(hy==0x40000000) return x*x; /* y is 2 */ if(hy==0x3fe00000) { /* y is 0.5 */ if(hx>=0) /* x >= +0 */ - return sqrt(x); + return sqrt(x); } } @@ -166,13 +166,13 @@ __ieee754_pow(double x, double y) if(hx<0) { if(((ix-0x3ff00000)|yisint)==0) { z = (z-z)/(z-z); /* (-1)**non-int is NaN */ - } else if(yisint==1) + } else if(yisint==1) z = -z; /* (x<0)**odd = -(|x|**odd) */ } return z; } } - + /* CYGNUS LOCAL + fdlibm-5.3 fix: This used to be n = (hx>>31)+1; but ANSI C says a right shift of a signed negative quantity is @@ -194,7 +194,7 @@ __ieee754_pow(double x, double y) /* over/underflow if x is not close to one */ if(ix<0x3fefffff) return (hy<0)? s*huge*huge:s*tiny*tiny; if(ix>0x3ff00000) return (hy>0)? s*huge*huge:s*tiny*tiny; - /* now |1-x| is tiny <= 2**-20, suffice to compute + /* now |1-x| is tiny <= 2**-20, suffice to compute log(x) by x-x^2/2+x^3/3-x^4/4 */ t = ax-one; /* t has 20 trailing zeros */ w = (t*t)*(0.5-t*(0.3333333333333333333333-t*0.25)); @@ -287,7 +287,7 @@ __ieee754_pow(double x, double y) n = ((n&0x000fffff)|0x00100000)>>(20-k); if(j<0) n = -n; p_h -= t; - } + } t = p_l+p_h; SET_LOW_WORD(t,0); u = t*lg2_h; From owner-svn-src-head@freebsd.org Sun Dec 3 02:23:30 2017 Return-Path: Delivered-To: svn-src-head@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 99B67DBB0ED; Sun, 3 Dec 2017 02:23:30 +0000 (UTC) (envelope-from kevans@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 4DB8365875; Sun, 3 Dec 2017 02:23:30 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB32NTGW092982; Sun, 3 Dec 2017 02:23:29 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB32NTt2092981; Sun, 3 Dec 2017 02:23:29 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201712030223.vB32NTt2092981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 3 Dec 2017 02:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326483 - head/usr.bin/grep/tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep/tests X-SVN-Commit-Revision: 326483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 02:23:30 -0000 Author: kevans Date: Sun Dec 3 02:23:29 2017 New Revision: 326483 URL: https://svnweb.freebsd.org/changeset/base/326483 Log: grep test: Fix copyright notice The copyright notice was erroneously introduced as one from the NetBSD foundation due to it being copied from a file in the NetBSD test suite, but this file itself is not derived from or supplied with the NetBSD test suite. MFC after: 3 days Modified: head/usr.bin/grep/tests/grep_freebsd_test.sh Modified: head/usr.bin/grep/tests/grep_freebsd_test.sh ============================================================================== --- head/usr.bin/grep/tests/grep_freebsd_test.sh Sun Dec 3 01:56:03 2017 (r326482) +++ head/usr.bin/grep/tests/grep_freebsd_test.sh Sun Dec 3 02:23:29 2017 (r326483) @@ -11,17 +11,17 @@ # 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 THE NETBSD FOUNDATION, INC. 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 THE FOUNDATION 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. +# THIS SOFTWARE IS PROVIDED BY THE 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 THE 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$ From owner-svn-src-head@freebsd.org Sun Dec 3 02:32:59 2017 Return-Path: Delivered-To: svn-src-head@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 3D008DBB60E; Sun, 3 Dec 2017 02:32:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 037A565E22; Sun, 3 Dec 2017 02:32:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 3A90DD67847; Sun, 3 Dec 2017 13:32:50 +1100 (AEDT) Date: Sun, 3 Dec 2017 13:32:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326482 - head/lib/msun/src In-Reply-To: <201712030156.vB31u4Ve080657@repo.freebsd.org> Message-ID: <20171203132056.J1062@besplex.bde.org> References: <201712030156.vB31u4Ve080657@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cK6QihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=m9lhJQrcvavDZqCawlwA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 02:32:59 -0000 On Sun, 3 Dec 2017, Ed Maste wrote: > Log: > lib/msun: remove trailing whitespace from e_pow.c > > Submitted by: Steve Kargl > MFC after: 1 week This undoes parts of r141296. Trailing whitespace was previously removed in r8880. This was warmly received, and r141296 backed out the change. Bruce From owner-svn-src-head@freebsd.org Sun Dec 3 04:54:20 2017 Return-Path: Delivered-To: svn-src-head@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 54A95DEDF3E; Sun, 3 Dec 2017 04:54:20 +0000 (UTC) (envelope-from imp@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 2E6206A6D2; Sun, 3 Dec 2017 04:54:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34sJ6E055993; Sun, 3 Dec 2017 04:54:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34sJ3J055991; Sun, 3 Dec 2017 04:54:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030454.vB34sJ3J055991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326484 - head/stand/ofw/libofw X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/ofw/libofw X-SVN-Commit-Revision: 326484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:54:20 -0000 Author: imp Date: Sun Dec 3 04:54:18 2017 New Revision: 326484 URL: https://svnweb.freebsd.org/changeset/base/326484 Log: Const poison the propname. It's never set and we often pass it const char *. Sponsored by: Netflix Modified: head/stand/ofw/libofw/openfirm.c head/stand/ofw/libofw/openfirm.h Modified: head/stand/ofw/libofw/openfirm.c ============================================================================== --- head/stand/ofw/libofw/openfirm.c Sun Dec 3 02:23:29 2017 (r326483) +++ head/stand/ofw/libofw/openfirm.c Sun Dec 3 04:54:18 2017 (r326484) @@ -242,7 +242,7 @@ OF_instance_to_package(ihandle_t instance) /* Get the length of a property of a package. */ int -OF_getproplen(phandle_t package, char *propname) +OF_getproplen(phandle_t package, const char *propname) { static struct { cell_t name; @@ -266,7 +266,7 @@ OF_getproplen(phandle_t package, char *propname) /* Get the value of a property of a package. */ int -OF_getprop(phandle_t package, char *propname, void *buf, int buflen) +OF_getprop(phandle_t package, const char *propname, void *buf, int buflen) { static struct { cell_t name; @@ -294,7 +294,7 @@ OF_getprop(phandle_t package, char *propname, void *bu /* Get the next property of a package. */ int -OF_nextprop(phandle_t package, char *previous, char *buf) +OF_nextprop(phandle_t package, const char *previous, char *buf) { static struct { cell_t name; @@ -321,7 +321,7 @@ OF_nextprop(phandle_t package, char *previous, char *b /* Set the value of a property of a package. */ /* XXX Has a bug on FirePower */ int -OF_setprop(phandle_t package, char *propname, void *buf, int len) +OF_setprop(phandle_t package, const char *propname, void *buf, int len) { static struct { cell_t name; Modified: head/stand/ofw/libofw/openfirm.h ============================================================================== --- head/stand/ofw/libofw/openfirm.h Sun Dec 3 02:23:29 2017 (r326483) +++ head/stand/ofw/libofw/openfirm.h Sun Dec 3 04:54:18 2017 (r326484) @@ -89,10 +89,10 @@ phandle_t OF_peer(phandle_t); phandle_t OF_child(phandle_t); phandle_t OF_parent(phandle_t); phandle_t OF_instance_to_package(ihandle_t); -int OF_getproplen(phandle_t, char *); -int OF_getprop(phandle_t, char *, void *, int); -int OF_nextprop(phandle_t, char *, char *); -int OF_setprop(phandle_t, char *, void *, int); +int OF_getproplen(phandle_t, const char *); +int OF_getprop(phandle_t, const char *, void *, int); +int OF_nextprop(phandle_t, const char *, char *); +int OF_setprop(phandle_t, const char *, void *, int); int OF_canon(const char *, char *, int); phandle_t OF_finddevice(const char *); int OF_instance_to_path(ihandle_t, char *, int); From owner-svn-src-head@freebsd.org Sun Dec 3 04:54:56 2017 Return-Path: Delivered-To: svn-src-head@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 2FBF9DEDFEB; Sun, 3 Dec 2017 04:54:56 +0000 (UTC) (envelope-from imp@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 F10A86A839; Sun, 3 Dec 2017 04:54:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34stXM056115; Sun, 3 Dec 2017 04:54:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34ssem056112; Sun, 3 Dec 2017 04:54:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030454.vB34ssem056112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: ofw/libofw powerpc/boot1.chrp X-SVN-Commit-Revision: 326486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:54:56 -0000 Author: imp Date: Sun Dec 3 04:54:54 2017 New Revision: 326486 URL: https://svnweb.freebsd.org/changeset/base/326486 Log: Include machine/md_var to pick up __syncicache prototype. Sponsored by: Netflix Modified: head/stand/ofw/libofw/elf_freebsd.c head/stand/ofw/libofw/ppc64_elf_freebsd.c head/stand/powerpc/boot1.chrp/boot1.c Modified: head/stand/ofw/libofw/elf_freebsd.c ============================================================================== --- head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:49 2017 (r326485) +++ head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:54 2017 (r326486) @@ -32,6 +32,9 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__powerpc__) +#include +#endif #include Modified: head/stand/ofw/libofw/ppc64_elf_freebsd.c ============================================================================== --- head/stand/ofw/libofw/ppc64_elf_freebsd.c Sun Dec 3 04:54:49 2017 (r326485) +++ head/stand/ofw/libofw/ppc64_elf_freebsd.c Sun Dec 3 04:54:54 2017 (r326486) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include Modified: head/stand/powerpc/boot1.chrp/boot1.c ============================================================================== --- head/stand/powerpc/boot1.chrp/boot1.c Sun Dec 3 04:54:49 2017 (r326485) +++ head/stand/powerpc/boot1.chrp/boot1.c Sun Dec 3 04:54:54 2017 (r326486) @@ -22,6 +22,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "paths.h" @@ -74,8 +75,6 @@ static int __puts(const char *s, putc_func_t *putc, vo static int __sputc(char c, void *arg); static char *__uitoa(char *buf, u_int val, int base); static char *__ultoa(char *buf, u_long val, int base); - -void __syncicache(void *, int); /* * Open Firmware interface functions From owner-svn-src-head@freebsd.org Sun Dec 3 04:55:01 2017 Return-Path: Delivered-To: svn-src-head@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 806CBDEE02D; Sun, 3 Dec 2017 04:55:01 +0000 (UTC) (envelope-from imp@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 34FEA6A897; Sun, 3 Dec 2017 04:55:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34t0bD056195; Sun, 3 Dec 2017 04:55:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34t0Xp056193; Sun, 3 Dec 2017 04:55:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34t0Xp056193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326487 - head/stand/ofw/libofw X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/ofw/libofw X-SVN-Commit-Revision: 326487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:01 -0000 Author: imp Date: Sun Dec 3 04:54:59 2017 New Revision: 326487 URL: https://svnweb.freebsd.org/changeset/base/326487 Log: Cast mdp (a vm_offset_t) to void * to match prototype. Sponsored by: Netflix Modified: head/stand/ofw/libofw/elf_freebsd.c head/stand/ofw/libofw/ppc64_elf_freebsd.c Modified: head/stand/ofw/libofw/elf_freebsd.c ============================================================================== --- head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:54 2017 (r326486) +++ head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:59 2017 (r326487) @@ -91,7 +91,7 @@ __elfN(ofw_exec)(struct preloaded_file *fp) if (dtbp != 0) { OF_quiesce(); ((int (*)(u_long, u_long, u_long, void *, u_long))entry)(dtbp, 0, 0, - mdp, sizeof(mdp)); + (void *)mdp, sizeof(mdp)); } else { OF_chain((void *)reloc, end - (char *)reloc, (void *)entry, (void *)mdp, 0xfb5d104d); Modified: head/stand/ofw/libofw/ppc64_elf_freebsd.c ============================================================================== --- head/stand/ofw/libofw/ppc64_elf_freebsd.c Sun Dec 3 04:54:54 2017 (r326486) +++ head/stand/ofw/libofw/ppc64_elf_freebsd.c Sun Dec 3 04:54:59 2017 (r326487) @@ -95,7 +95,7 @@ ppc64_ofw_elf_exec(struct preloaded_file *fp) if (dtbp != 0) { OF_quiesce(); ((int (*)(u_long, u_long, u_long, void *, u_long))entry)(dtbp, - 0, 0, mdp, 0xfb5d104d); + 0, 0, (void *)mdp, 0xfb5d104d); } else { OF_chain((void *)reloc, end - (char *)reloc, (void *)entry, (void *)mdp, 0xfb5d104d); From owner-svn-src-head@freebsd.org Sun Dec 3 04:55:06 2017 Return-Path: Delivered-To: svn-src-head@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 8BBD3DEE070; Sun, 3 Dec 2017 04:55:06 +0000 (UTC) (envelope-from imp@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 0D3916A978; Sun, 3 Dec 2017 04:55:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34t4A9056249; Sun, 3 Dec 2017 04:55:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34t4D5056248; Sun, 3 Dec 2017 04:55:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34t4D5056248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326488 - head/stand/ofw/libofw X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/ofw/libofw X-SVN-Commit-Revision: 326488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:06 -0000 Author: imp Date: Sun Dec 3 04:55:04 2017 New Revision: 326488 URL: https://svnweb.freebsd.org/changeset/base/326488 Log: e_entry can be smaller than a pointer. Cast it to an intptr_t before casting it to a uint64_t *. Modified: head/stand/ofw/libofw/ppc64_elf_freebsd.c Modified: head/stand/ofw/libofw/ppc64_elf_freebsd.c ============================================================================== --- head/stand/ofw/libofw/ppc64_elf_freebsd.c Sun Dec 3 04:54:59 2017 (r326487) +++ head/stand/ofw/libofw/ppc64_elf_freebsd.c Sun Dec 3 04:55:04 2017 (r326488) @@ -82,7 +82,7 @@ ppc64_ofw_elf_exec(struct preloaded_file *fp) if ((e->e_flags & 3) == 2) entry = e->e_entry; else - entry = *(uint64_t *)e->e_entry; + entry = *(uint64_t *)(intptr_t)e->e_entry; if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0) return (error); From owner-svn-src-head@freebsd.org Sun Dec 3 04:55:17 2017 Return-Path: Delivered-To: svn-src-head@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 70C46DEE0B3; Sun, 3 Dec 2017 04:55:17 +0000 (UTC) (envelope-from imp@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 843E16AB18; Sun, 3 Dec 2017 04:55:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34tEoW056357; Sun, 3 Dec 2017 04:55:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34tE3j056356; Sun, 3 Dec 2017 04:55:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34tE3j056356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326490 - head/stand/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/powerpc/ofw X-SVN-Commit-Revision: 326490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:18 -0000 Author: imp Date: Sun Dec 3 04:55:14 2017 New Revision: 326490 URL: https://svnweb.freebsd.org/changeset/base/326490 Log: Declare our strange brand of main(). Sponsored by: Netflix Modified: head/stand/powerpc/ofw/start.c Modified: head/stand/powerpc/ofw/start.c ============================================================================== --- head/stand/powerpc/ofw/start.c Sun Dec 3 04:55:09 2017 (r326489) +++ head/stand/powerpc/ofw/start.c Sun Dec 3 04:55:14 2017 (r326490) @@ -67,6 +67,8 @@ _start: \n\ 2: b startup \n\ "); +void main(int (*openfirm)(void *)); + void startup(void *vpd, int res, int (*openfirm)(void *), char *arg, int argl) { From owner-svn-src-head@freebsd.org Sun Dec 3 04:55:13 2017 Return-Path: Delivered-To: svn-src-head@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 08F31DEE095; Sun, 3 Dec 2017 04:55:13 +0000 (UTC) (envelope-from imp@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 53EBA6AA4E; Sun, 3 Dec 2017 04:55:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34t9n3056302; Sun, 3 Dec 2017 04:55:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34t9S7056301; Sun, 3 Dec 2017 04:55:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34t9S7056301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326489 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 326489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:13 -0000 Author: imp Date: Sun Dec 3 04:55:09 2017 New Revision: 326489 URL: https://svnweb.freebsd.org/changeset/base/326489 Log: Allow this file to be used in libsa without warning... Sponsored by: Netflix Modified: head/sys/sys/syslimits.h Modified: head/sys/sys/syslimits.h ============================================================================== --- head/sys/sys/syslimits.h Sun Dec 3 04:55:04 2017 (r326488) +++ head/sys/sys/syslimits.h Sun Dec 3 04:55:09 2017 (r326489) @@ -35,7 +35,7 @@ #ifndef _SYS_SYSLIMITS_H_ #define _SYS_SYSLIMITS_H_ -#if !defined(_KERNEL) && !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_) +#if !defined(_STANDALONE) && !defined(_KERNEL) && !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_) #ifndef _SYS_CDEFS_H_ #error this file needs sys/cdefs.h as a prerequisite #endif From owner-svn-src-head@freebsd.org Sun Dec 3 04:55:27 2017 Return-Path: Delivered-To: svn-src-head@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 18C94DEE14E; Sun, 3 Dec 2017 04:55:27 +0000 (UTC) (envelope-from imp@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 37FAA6ACC2; Sun, 3 Dec 2017 04:55:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34tNKK056466; Sun, 3 Dec 2017 04:55:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34tNqk056465; Sun, 3 Dec 2017 04:55:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34tNqk056465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326492 - head/stand/powerpc/kboot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/powerpc/kboot X-SVN-Commit-Revision: 326492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:27 -0000 Author: imp Date: Sun Dec 3 04:55:23 2017 New Revision: 326492 URL: https://svnweb.freebsd.org/changeset/base/326492 Log: Cast void * pointer to char * so the arg matches the %s format. Sponsored by: Netflix Modified: head/stand/powerpc/kboot/hostdisk.c Modified: head/stand/powerpc/kboot/hostdisk.c ============================================================================== --- head/stand/powerpc/kboot/hostdisk.c Sun Dec 3 04:55:19 2017 (r326491) +++ head/stand/powerpc/kboot/hostdisk.c Sun Dec 3 04:55:23 2017 (r326492) @@ -94,7 +94,7 @@ hostdisk_open(struct open_file *f, ...) if (desc->d_unit <= 0) { printf("hostdisk_open: couldn't open %s: %d\n", - desc->d_opendata, desc->d_unit); + (char *)desc->d_opendata, desc->d_unit); return (ENOENT); } From owner-svn-src-head@freebsd.org Sun Dec 3 04:54:51 2017 Return-Path: Delivered-To: svn-src-head@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 047D4DEDFE0; Sun, 3 Dec 2017 04:54:51 +0000 (UTC) (envelope-from imp@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 C562A6A830; Sun, 3 Dec 2017 04:54:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34snWj056059; Sun, 3 Dec 2017 04:54:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34snLh056056; Sun, 3 Dec 2017 04:54:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030454.vB34snLh056056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326485 - in head/stand: ofw/libofw sparc64/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: ofw/libofw sparc64/loader X-SVN-Commit-Revision: 326485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:54:51 -0000 Author: imp Date: Sun Dec 3 04:54:49 2017 New Revision: 326485 URL: https://svnweb.freebsd.org/changeset/base/326485 Log: Delcare md_load in libofw.h. Make all prototypes match for ofw provided md_load functions. Sponsored by: Netflix Modified: head/stand/ofw/libofw/libofw.h head/stand/sparc64/loader/main.c head/stand/sparc64/loader/metadata.c Modified: head/stand/ofw/libofw/libofw.h ============================================================================== --- head/stand/ofw/libofw/libofw.h Sun Dec 3 04:54:18 2017 (r326484) +++ head/stand/ofw/libofw/libofw.h Sun Dec 3 04:54:49 2017 (r326485) @@ -67,6 +67,10 @@ struct file_format; int ofw_elf_loadfile(char *, vm_offset_t, struct preloaded_file **); int ofw_elf_exec(struct preloaded_file *); +/* MD code implementing MI interfaces */ +vm_offset_t md_load(char *args, vm_offset_t *modulep, vm_offset_t *dtb); +vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb); + extern struct file_format ofw_elf; #ifdef __powerpc__ extern struct file_format ofw_elf64; Modified: head/stand/sparc64/loader/main.c ============================================================================== --- head/stand/sparc64/loader/main.c Sun Dec 3 04:54:18 2017 (r326484) +++ head/stand/sparc64/loader/main.c Sun Dec 3 04:54:49 2017 (r326485) @@ -101,7 +101,6 @@ static inline u_long itlb_get_data_sun4u(u_int, u_int) static int itlb_enter_sun4u(u_int, u_long data, vm_offset_t); static vm_offset_t itlb_va_to_pa_sun4u(vm_offset_t); static void itlb_relocate_locked0_sun4u(void); -extern vm_offset_t md_load(char *, vm_offset_t *, vm_offset_t *); static int sparc64_autoload(void); static ssize_t sparc64_readin(const int, vm_offset_t, const size_t); static ssize_t sparc64_copyin(const void *, vm_offset_t, size_t); Modified: head/stand/sparc64/loader/metadata.c ============================================================================== --- head/stand/sparc64/loader/metadata.c Sun Dec 3 04:54:18 2017 (r326484) +++ head/stand/sparc64/loader/metadata.c Sun Dec 3 04:54:49 2017 (r326485) @@ -275,7 +275,7 @@ md_copymodules(vm_offset_t addr) * - The kernel environment is copied into kernel space. * - Module metadata are formatted and placed in kernel space. */ -int +vm_offset_t md_load(char *args, vm_offset_t *modulep, vm_offset_t *dtbp) { struct preloaded_file *kfp; From owner-svn-src-head@freebsd.org Sun Dec 3 04:55:20 2017 Return-Path: Delivered-To: svn-src-head@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 7ABDADEE0E9; Sun, 3 Dec 2017 04:55:20 +0000 (UTC) (envelope-from imp@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 3363E6ABBF; Sun, 3 Dec 2017 04:55:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34tJA6056414; Sun, 3 Dec 2017 04:55:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34tJrh056413; Sun, 3 Dec 2017 04:55:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34tJrh056413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326491 - head/stand/powerpc X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/powerpc X-SVN-Commit-Revision: 326491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:21 -0000 Author: imp Date: Sun Dec 3 04:55:19 2017 New Revision: 326491 URL: https://svnweb.freebsd.org/changeset/base/326491 Log: Disconnet ps3 from the build. There's too many warnings to fix. Also, it's going to be removed soon anyway once the final lingering issues with kboot are resolved. Go ahead and disconnect it from the build a little early. Sponsored by: Netflix OK'd by: nathanw@ Modified: head/stand/powerpc/Makefile Modified: head/stand/powerpc/Makefile ============================================================================== --- head/stand/powerpc/Makefile Sun Dec 3 04:55:14 2017 (r326490) +++ head/stand/powerpc/Makefile Sun Dec 3 04:55:19 2017 (r326491) @@ -3,9 +3,6 @@ .include SUBDIR= boot1.chrp ofw uboot -.if ${MACHINE_ARCH} != "powerpcspe" -SUBDIR+= ps3 -.endif .if ${MK_FDT} == "yes" SUBDIR+= kboot .endif From owner-svn-src-head@freebsd.org Sun Dec 3 04:55:31 2017 Return-Path: Delivered-To: svn-src-head@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 4939ADEE193; Sun, 3 Dec 2017 04:55:31 +0000 (UTC) (envelope-from imp@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 4DC686AD98; Sun, 3 Dec 2017 04:55:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34tS4c056520; Sun, 3 Dec 2017 04:55:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34tS1r056519; Sun, 3 Dec 2017 04:55:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34tS1r056519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326493 - head/stand/powerpc/kboot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/powerpc/kboot X-SVN-Commit-Revision: 326493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:31 -0000 Author: imp Date: Sun Dec 3 04:55:28 2017 New Revision: 326493 URL: https://svnweb.freebsd.org/changeset/base/326493 Log: Provide a md_load64 prototype. Sponsored by: Netflix Modified: head/stand/powerpc/kboot/ppc64_elf_freebsd.c Modified: head/stand/powerpc/kboot/ppc64_elf_freebsd.c ============================================================================== --- head/stand/powerpc/kboot/ppc64_elf_freebsd.c Sun Dec 3 04:55:23 2017 (r326492) +++ head/stand/powerpc/kboot/ppc64_elf_freebsd.c Sun Dec 3 04:55:28 2017 (r326493) @@ -46,6 +46,8 @@ extern size_t szkerneltramp; extern int nkexec_segments; extern void * loaded_segments; +vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb); + int ppc64_elf_loadfile(char *filename, u_int64_t dest, struct preloaded_file **result) From owner-svn-src-head@freebsd.org Sun Dec 3 04:55:35 2017 Return-Path: Delivered-To: svn-src-head@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 DBD11DEE1A9; Sun, 3 Dec 2017 04:55:35 +0000 (UTC) (envelope-from imp@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 B67AD6AE6B; Sun, 3 Dec 2017 04:55:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34tXP0056573; Sun, 3 Dec 2017 04:55:33 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34tXEP056571; Sun, 3 Dec 2017 04:55:33 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34tXEP056571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326494 - in head: stand/zfs sys/cddl/boot/zfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: stand/zfs sys/cddl/boot/zfs X-SVN-Commit-Revision: 326494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:38 -0000 Author: imp Date: Sun Dec 3 04:55:33 2017 New Revision: 326494 URL: https://svnweb.freebsd.org/changeset/base/326494 Log: Mark two things as unused (since they are only sometimes used) and toss in a DECONST to remove a const in some tricky code that would require too extensive a change to unwind otherwise. Sponsored by: Netflix Modified: head/stand/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfssubr.c Modified: head/stand/zfs/zfsimpl.c ============================================================================== --- head/stand/zfs/zfsimpl.c Sun Dec 3 04:55:28 2017 (r326493) +++ head/stand/zfs/zfsimpl.c Sun Dec 3 04:55:33 2017 (r326494) @@ -43,7 +43,7 @@ struct zfsmount { objset_phys_t objset; uint64_t rootobj; }; -static struct zfsmount zfsmount; +static struct zfsmount zfsmount __unused; /* * List of all vdevs, chained through v_alllink. Modified: head/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- head/sys/cddl/boot/zfs/zfssubr.c Sun Dec 3 04:55:28 2017 (r326493) +++ head/sys/cddl/boot/zfs/zfssubr.c Sun Dec 3 04:55:33 2017 (r326494) @@ -250,7 +250,7 @@ zio_checksum_template_init(enum zio_checksum checksum, * all of the checksum context templates and deallocates any that were * initialized using the algorithm-specific template init function. */ -static void +static void __unused zio_checksum_templates_free(spa_t *spa) { for (enum zio_checksum checksum = 0; @@ -284,7 +284,7 @@ zio_checksum_verify(const spa_t *spa, const blkptr_t * return (EINVAL); if (spa != NULL) { - zio_checksum_template_init(checksum, (spa_t *) spa); + zio_checksum_template_init(checksum, __DECONST(spa_t *,spa)); ctx = spa->spa_cksum_tmpls[checksum]; } From owner-svn-src-head@freebsd.org Sun Dec 3 04:55:41 2017 Return-Path: Delivered-To: svn-src-head@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 98FE6DEE1EC; Sun, 3 Dec 2017 04:55:41 +0000 (UTC) (envelope-from imp@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 B9F136AF71; Sun, 3 Dec 2017 04:55:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB34tcMi056626; Sun, 3 Dec 2017 04:55:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB34tcN7056625; Sun, 3 Dec 2017 04:55:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712030455.vB34tcN7056625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 3 Dec 2017 04:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326495 - head/stand X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand X-SVN-Commit-Revision: 326495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 04:55:42 -0000 Author: imp Date: Sun Dec 3 04:55:38 2017 New Revision: 326495 URL: https://svnweb.freebsd.org/changeset/base/326495 Log: Now it's safe to bump WARNS to 1. Sponsored by: Netflix Modified: head/stand/defs.mk Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Sun Dec 3 04:55:33 2017 (r326494) +++ head/stand/defs.mk Sun Dec 3 04:55:38 2017 (r326495) @@ -2,7 +2,7 @@ .include -WARNS?=0 +WARNS?=1 .if !defined(__BOOT_DEFS_MK__) __BOOT_DEFS_MK__=${MFILE} From owner-svn-src-head@freebsd.org Sun Dec 3 09:35:44 2017 Return-Path: Delivered-To: svn-src-head@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 DA342DF5AA6; Sun, 3 Dec 2017 09:35:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 929B57262C; Sun, 3 Dec 2017 09:35:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 109D13C41F5; Sun, 3 Dec 2017 20:35:36 +1100 (AEDT) Date: Sun, 3 Dec 2017 20:35:35 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp In-Reply-To: <201712030454.vB34ssem056112@repo.freebsd.org> Message-ID: <20171203185027.T872@besplex.bde.org> References: <201712030454.vB34ssem056112@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cK6QihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=DNgnx3KX5R2QDtOBvDsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 09:35:45 -0000 On Sun, 3 Dec 2017, Warner Losh wrote: > Log: > Include machine/md_var to pick up __syncicache prototype. This is nonsense. machine/md_var.h is kernel-only, but on powerpc it declares __syncicache() which also exists in userland. This include is like including the kernel-only header sys/systm.h to declare printf() in userland. It is also an error to include machine/md_var.h in MI files in the kernel. Approx. 72 of the 305 includes of it in -current have this bug. The worst one is probably the one in altq_subr.c. altq_subr.c abuses the MD variable cpu_feature to test for CPUID_TSC. That is just the start of it layering violations and other bugs. > Modified: head/stand/ofw/libofw/elf_freebsd.c > ============================================================================== > --- head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:49 2017 (r326485) > +++ head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:54 2017 (r326486) > @@ -32,6 +32,9 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#if defined(__powerpc__) > +#include > +#endif Style bug (verbose spelling of 'ifdef'). Bruce From owner-svn-src-head@freebsd.org Sun Dec 3 11:03:56 2017 Return-Path: Delivered-To: svn-src-head@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 1602EDF76D2; Sun, 3 Dec 2017 11:03:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9F861749EF; Sun, 3 Dec 2017 11:03:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 91EA73CA111; Sun, 3 Dec 2017 22:03:53 +1100 (AEDT) Date: Sun, 3 Dec 2017 22:03:52 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp In-Reply-To: <201712030454.vB34ssem056112@repo.freebsd.org> Message-ID: <20171203203741.S1153@besplex.bde.org> References: <201712030454.vB34ssem056112@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=uyavkMrdAAAA:8 a=ssOL5SfDAAAA:8 a=Ylp_1M6H8KSTBkK9Dr4A:9 a=irLuLW4bKgVti8UA:21 a=Xz_e78OC_b3LScuZ:21 a=CjuIK1q_8ugA:10 a=j2_G595jqNHTxQgNwHU2:22 a=vkwYaAuEtClaY4KaWyJH:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 11:03:56 -0000 On Sat, 2 Dec 2017, Warner Losh wrote: > On Sat, Dec 2, 2017 at 7:18 PM, Eitan Adler wrote: > >> I'd like to remove floppy drive support from FreeBSD: No thanks. >> - The physical media is no longer produced Old media still exists. > There's still one company producing 3.5" floppies, though it's in super low > volume. And the media is still readily available. Supplier #2 near here still has 2 types of floppy drives in stock: 3.5 inch standard floppy drive and 3.5 inch USB floppy drive. You might be right about 5.25 inch media not being produced. On ebay the average price seems to be higher than new even for media that is guaranteed to have errors, so this media must be rare but needed. >> - Computers produced in the last 10-15 years don't have a floppy drive >> reader > > More like 8 years, but regardless of the actual year, that's also a weak > argument. No need to break the software to match. >> - There are still a few open bug reports relating to floppies(!) > > That would show it's still in use. More likely that the PRs are being handled properly by not closing old ones. >> - Its several thousand lines of code that could be removed > > Clang is much more than that. > >> Is there any reason to continue supporting floppy drives in FreeBSD 12.0+? > > That's a backwards question to project. > > However, to make your argument legit: > > Floppy support has been decaying for years. It hasn't worked well since > FreeBSD 6, and was completely broken sometime after FreeBSD 10 was > branched. We lost support for having two floppies on the same bus around > FreeBSD 7. And using fdcontrol to set the format became tricking between > FreeBSD 8 and 9. Floppies written today contain garbage due to ISA DMA > breakages post FreeBSD 10. They simply don't work at all in 11, and nobody > has stepped up to fix them. (I tried last summer, and gave up and got a > kyroflux.com board instead). Floppies used to be important, but not any I don't see many problems. -current i386 built last month worked perfectly for the following tests on hardware from 2003 with 1GB RAM (perhaps the DMA problem only affects amd64 with RAM above 4GB?): - compare 12 1440K floppies with their image backups - reformat one (using FreeBSD-~5 fdformat binary -- success show that the formatting ioctls are not broken) - write back original image to the reformatted one - verify last step under FreeBSD-5. > more. We've lost the only platform that required one to boot off floppies > (pc98) and the older x86 that required it doesn't run FreeBSD anymore > anyway. We never supported fdc on non x86 platforms, so those aren't a > consideration. > > We do have some floppy support in umass, but that should stay since USB > floppy drives are still a thing. > > Normally, I'd argue we might want to have a release where it's deprecated, > but it already was unusable in 11, and barely usable in 10 and has been a > shadow of its former self for much longer than that. I only noticed much breakage of special fd ioctls. The fd driver and utilities seem to be fully usable on some hardware in FreeBSD-current. Bruce From owner-svn-src-head@freebsd.org Sun Dec 3 12:14:38 2017 Return-Path: Delivered-To: svn-src-head@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 AF9A7DF9898; Sun, 3 Dec 2017 12:14:38 +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 38C4176B98; Sun, 3 Dec 2017 12:14:38 +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 vB3CEbvB040795; Sun, 3 Dec 2017 12:14:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB3CEYdU040767; Sun, 3 Dec 2017 12:14:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712031214.vB3CEYdU040767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 3 Dec 2017 12:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326496 - in head: . contrib/libc++/include contrib/llvm/include/llvm/Analysis contrib/llvm/include/llvm/CodeGen contrib/llvm/include/llvm/IR contrib/llvm/include/llvm/Support contrib/l... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: . contrib/libc++/include contrib/llvm/include/llvm/Analysis contrib/llvm/include/llvm/CodeGen contrib/llvm/include/llvm/IR contrib/llvm/include/llvm/Support contrib/llvm/lib/AsmParser contrib... X-SVN-Commit-Revision: 326496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 12:14:38 -0000 Author: dim Date: Sun Dec 3 12:14:34 2017 New Revision: 326496 URL: https://svnweb.freebsd.org/changeset/base/326496 Log: Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the upstream release_50 branch. This corresponds to 5.0.1 rc2. MFC after: 2 weeks Modified: head/ObsoleteFiles.inc head/contrib/libc++/include/algorithm head/contrib/libc++/include/deque head/contrib/libc++/include/functional head/contrib/libc++/include/list head/contrib/libc++/include/string head/contrib/libc++/include/type_traits head/contrib/libc++/include/vector head/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h head/contrib/llvm/include/llvm/IR/AutoUpgrade.h head/contrib/llvm/include/llvm/Support/FormatVariadic.h head/contrib/llvm/lib/AsmParser/LLParser.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp head/contrib/llvm/lib/IR/AutoUpgrade.cpp head/contrib/llvm/lib/IR/ConstantFold.cpp head/contrib/llvm/lib/Linker/IRMover.cpp head/contrib/llvm/lib/Linker/LinkModules.cpp head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td head/contrib/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp head/contrib/llvm/lib/Target/ARM/ARMCallLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp head/contrib/llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/AVR/AVRISelLowering.cpp head/contrib/llvm/lib/Target/AVR/AVRISelLowering.h head/contrib/llvm/lib/Target/AVR/AVRInstrInfo.cpp head/contrib/llvm/lib/Target/AVR/AVRInstrInfo.h head/contrib/llvm/lib/Target/AVR/AVRInstrInfo.td head/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.cpp head/contrib/llvm/lib/Target/AVR/AVRTargetMachine.cpp head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp head/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp head/contrib/llvm/lib/Target/Mips/MicroMipsDSPInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsMTInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsMTInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSchedule.td head/contrib/llvm/lib/Target/Mips/MipsScheduleGeneric.td head/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/tools/clang/include/clang/Basic/Attr.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/BareMetal.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/BareMetal.h head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp head/contrib/llvm/tools/clang/lib/Format/Format.cpp head/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h head/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp head/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp head/contrib/llvm/tools/lld/ELF/SyntheticSections.h head/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/lib/clang/headers/Makefile head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/lld/Config/Version.inc head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h head/lib/clang/include/llvm/Support/VCSRevision.h head/lib/libclang_rt/Makefile.inc head/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Dec 3 04:55:38 2017 (r326495) +++ head/ObsoleteFiles.inc Sun Dec 3 12:14:34 2017 (r326496) @@ -38,6 +38,123 @@ # xargs -n1 | sort | uniq -d; # done +# 20171203: new clang import which bumps version from 5.0.0 to 5.0.1. +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/esan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/5.0.0/include/sanitizer +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/5.0.0/include/adxintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/altivec.h +OLD_FILES+=usr/lib/clang/5.0.0/include/ammintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/arm_acle.h +OLD_FILES+=usr/lib/clang/5.0.0/include/arm_neon.h +OLD_FILES+=usr/lib/clang/5.0.0/include/armintr.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512pfintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avxintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/cpuid.h +OLD_FILES+=usr/lib/clang/5.0.0/include/emmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/htmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/immintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/5.0.0/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/5.0.0/include/mmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/module.modulemap +OLD_FILES+=usr/lib/clang/5.0.0/include/msa.h +OLD_FILES+=usr/lib/clang/5.0.0/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/opencl-c.h +OLD_FILES+=usr/lib/clang/5.0.0/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/s390intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/shaintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/smmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/vadefs.h +OLD_FILES+=usr/lib/clang/5.0.0/include/vecintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/x86intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xopintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/5.0.0/include +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-armhf.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/5.0.0/lib/freebsd +OLD_DIRS+=usr/lib/clang/5.0.0/lib +OLD_DIRS+=usr/lib/clang/5.0.0 # 20171118: Remove old etc casper files OLD_FILES+=etc/casper/system.dns OLD_FILES+=etc/casper/system.grp Modified: head/contrib/libc++/include/algorithm ============================================================================== --- head/contrib/libc++/include/algorithm Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/libc++/include/algorithm Sun Dec 3 12:14:34 2017 (r326496) @@ -3013,6 +3013,7 @@ template _UIntType __independent_bits_engine<_Engine, _UIntType>::__eval(true_type) { + const size_t _WRt = numeric_limits::digits; result_type _Sp = 0; for (size_t __k = 0; __k < __n0_; ++__k) { @@ -3021,7 +3022,7 @@ __independent_bits_engine<_Engine, _UIntType>::__eval( { __u = __e_() - _Engine::min(); } while (__u >= __y0_); - if (__w0_ < _WDt) + if (__w0_ < _WRt) _Sp <<= __w0_; else _Sp = 0; @@ -3034,7 +3035,7 @@ __independent_bits_engine<_Engine, _UIntType>::__eval( { __u = __e_() - _Engine::min(); } while (__u >= __y1_); - if (__w0_ < _WDt - 1) + if (__w0_ < _WRt - 1) _Sp <<= __w0_ + 1; else _Sp = 0; Modified: head/contrib/libc++/include/deque ============================================================================== --- head/contrib/libc++/include/deque Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/libc++/include/deque Sun Dec 3 12:14:34 2017 (r326496) @@ -1356,7 +1356,6 @@ class _LIBCPP_TEMPLATE_VIS deque (public) iterator insert(const_iterator __p, initializer_list __il) {return insert(__p, __il.begin(), __il.end());} #endif // _LIBCPP_CXX03_LANG - iterator insert(const_iterator __p, const value_type& __v); iterator insert(const_iterator __p, size_type __n, const value_type& __v); template @@ -2224,7 +2223,11 @@ deque<_Tp, _Allocator>::__append(_InpIter __f, _InpIte !__is_forward_iterator<_InpIter>::value>::type*) { for (; __f != __l; ++__f) +#ifdef _LIBCPP_CXX03_LANG push_back(*__f); +#else + emplace_back(*__f); +#endif } template Modified: head/contrib/libc++/include/functional ============================================================================== --- head/contrib/libc++/include/functional Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/libc++/include/functional Sun Dec 3 12:14:34 2017 (r326496) @@ -1597,9 +1597,11 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> return reinterpret_cast<__base*>(p); } - template ::value && - __invokable<_Fp&, _ArgTypes...>::value> - struct __callable; + template , function>::value>, + __invokable<_Fp&, _ArgTypes...> + >::value> + struct __callable; template struct __callable<_Fp, true> { @@ -1612,6 +1614,9 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> { static const bool value = false; }; + + template + using _EnableIfCallable = typename enable_if<__callable<_Fp>::value>::type; public: typedef _Rp result_type; @@ -1622,9 +1627,7 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> function(nullptr_t) _NOEXCEPT : __f_(0) {} function(const function&); function(function&&) _NOEXCEPT; - template::value && !is_same<_Fp, function>::value - >::type> + template> function(_Fp); #if _LIBCPP_STD_VER <= 14 @@ -1638,21 +1641,15 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> function(allocator_arg_t, const _Alloc&, const function&); template function(allocator_arg_t, const _Alloc&, function&&); - template::value>::type> + template> function(allocator_arg_t, const _Alloc& __a, _Fp __f); #endif function& operator=(const function&); function& operator=(function&&) _NOEXCEPT; function& operator=(nullptr_t) _NOEXCEPT; - template - typename enable_if - < - __callable::type>::value && - !is_same::type, function>::value, - function& - >::type - operator=(_Fp&&); + template> + function& operator=(_Fp&&); ~function(); @@ -1854,13 +1851,8 @@ function<_Rp(_ArgTypes...)>::operator=(nullptr_t) _NOE } template -template -typename enable_if -< - function<_Rp(_ArgTypes...)>::template __callable::type>::value && - !is_same::type, function<_Rp(_ArgTypes...)>>::value, - function<_Rp(_ArgTypes...)>& ->::type +template +function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f) { function(_VSTD::forward<_Fp>(__f)).swap(*this); Modified: head/contrib/libc++/include/list ============================================================================== --- head/contrib/libc++/include/list Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/libc++/include/list Sun Dec 3 12:14:34 2017 (r326496) @@ -992,6 +992,15 @@ class _LIBCPP_TEMPLATE_VIS list (public) void push_front(const value_type& __x); void push_back(const value_type& __x); +#ifndef _LIBCPP_CXX03_LANG + template + _LIBCPP_INLINE_VISIBILITY + void __emplace_back(_Arg&& __arg) { emplace_back(_VSTD::forward<_Arg>(__arg)); } +#else + _LIBCPP_INLINE_VISIBILITY + void __emplace_back(value_type const& __arg) { push_back(__arg); } +#endif + iterator insert(const_iterator __p, const value_type& __x); iterator insert(const_iterator __p, size_type __n, const value_type& __x); template @@ -1189,7 +1198,7 @@ list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, __get_db()->__insert_c(this); #endif for (; __f != __l; ++__f) - push_back(*__f); + __emplace_back(*__f); } template @@ -1202,7 +1211,7 @@ list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, co __get_db()->__insert_c(this); #endif for (; __f != __l; ++__f) - push_back(*__f); + __emplace_back(*__f); } template Modified: head/contrib/libc++/include/string ============================================================================== --- head/contrib/libc++/include/string Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/libc++/include/string Sun Dec 3 12:14:34 2017 (r326496) @@ -259,7 +259,7 @@ class basic_string (public) size_type find(value_type c, size_type pos = 0) const noexcept; size_type rfind(const basic_string& str, size_type pos = npos) const noexcept; - size_type ffind(basic_string_view sv, size_type pos = 0) const noexcept; + size_type rfind(basic_string_view sv, size_type pos = npos) const noexcept; size_type rfind(const value_type* s, size_type pos, size_type n) const noexcept; size_type rfind(const value_type* s, size_type pos = npos) const noexcept; size_type rfind(value_type c, size_type pos = npos) const noexcept; @@ -271,7 +271,7 @@ class basic_string (public) size_type find_first_of(value_type c, size_type pos = 0) const noexcept; size_type find_last_of(const basic_string& str, size_type pos = npos) const noexcept; - size_type find_last_of(basic_string_view sv, size_type pos = 0) const noexcept; + size_type find_last_of(basic_string_view sv, size_type pos = npos) const noexcept; size_type find_last_of(const value_type* s, size_type pos, size_type n) const noexcept; size_type find_last_of(const value_type* s, size_type pos = npos) const noexcept; size_type find_last_of(value_type c, size_type pos = npos) const noexcept; @@ -283,7 +283,7 @@ class basic_string (public) size_type find_first_not_of(value_type c, size_type pos = 0) const noexcept; size_type find_last_not_of(const basic_string& str, size_type pos = npos) const noexcept; - size_type find_last_not_of(basic_string_view sv, size_type pos = 0) const noexcept; + size_type find_last_not_of(basic_string_view sv, size_type pos = npos) const noexcept; size_type find_last_not_of(const value_type* s, size_type pos, size_type n) const noexcept; size_type find_last_not_of(const value_type* s, size_type pos = npos) const noexcept; size_type find_last_not_of(value_type c, size_type pos = npos) const noexcept; @@ -1147,7 +1147,7 @@ class _LIBCPP_TEMPLATE_VIS basic_string (public) _LIBCPP_INLINE_VISIBILITY size_type rfind(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY - size_type rfind(__self_view __sv, size_type __pos = 0) const _NOEXCEPT; + size_type rfind(__self_view __sv, size_type __pos = npos) const _NOEXCEPT; size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY size_type rfind(const value_type* __s, size_type __pos = npos) const _NOEXCEPT; @@ -1166,7 +1166,7 @@ class _LIBCPP_TEMPLATE_VIS basic_string (public) _LIBCPP_INLINE_VISIBILITY size_type find_last_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY - size_type find_last_of(__self_view __sv, size_type __pos = 0) const _NOEXCEPT; + size_type find_last_of(__self_view __sv, size_type __pos = npos) const _NOEXCEPT; size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY size_type find_last_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT; @@ -1186,7 +1186,7 @@ class _LIBCPP_TEMPLATE_VIS basic_string (public) _LIBCPP_INLINE_VISIBILITY size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY - size_type find_last_not_of(__self_view __sv, size_type __pos = 0) const _NOEXCEPT; + size_type find_last_not_of(__self_view __sv, size_type __pos = npos) const _NOEXCEPT; size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY size_type find_last_not_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT; Modified: head/contrib/libc++/include/type_traits ============================================================================== --- head/contrib/libc++/include/type_traits Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/libc++/include/type_traits Sun Dec 3 12:14:34 2017 (r326496) @@ -4339,8 +4339,8 @@ struct __invokable_r using _Result = decltype( _VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)); - static const bool value = - conditional< + using type = + typename conditional< !is_same<_Result, __nat>::value, typename conditional< is_void<_Ret>::value, @@ -4348,7 +4348,8 @@ struct __invokable_r is_convertible<_Result, _Ret> >::type, false_type - >::type::value; + >::type; + static const bool value = type::value; }; template Modified: head/contrib/libc++/include/vector ============================================================================== --- head/contrib/libc++/include/vector Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/libc++/include/vector Sun Dec 3 12:14:34 2017 (r326496) @@ -674,6 +674,17 @@ class _LIBCPP_TEMPLATE_VIS vector (public) const value_type* data() const _NOEXCEPT {return _VSTD::__to_raw_pointer(this->__begin_);} +#ifdef _LIBCPP_CXX03_LANG + _LIBCPP_INLINE_VISIBILITY + void __emplace_back(const value_type& __x) { push_back(__x); } +#else + template + _LIBCPP_INLINE_VISIBILITY + void __emplace_back(_Arg&& __arg) { + emplace_back(_VSTD::forward<_Arg>(__arg)); + } +#endif + _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x); #ifndef _LIBCPP_CXX03_LANG @@ -1128,7 +1139,7 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first __get_db()->__insert_c(this); #endif for (; __first != __last; ++__first) - push_back(*__first); + __emplace_back(*__first); } template @@ -1145,7 +1156,7 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first __get_db()->__insert_c(this); #endif for (; __first != __last; ++__first) - push_back(*__first); + __emplace_back(*__first); } template @@ -1365,7 +1376,7 @@ vector<_Tp, _Allocator>::assign(_InputIterator __first { clear(); for (; __first != __last; ++__first) - push_back(*__first); + __emplace_back(*__first); } template Modified: head/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h ============================================================================== --- head/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h Sun Dec 3 12:14:34 2017 (r326496) @@ -652,6 +652,12 @@ class TargetTransformInfoImplCRTPBase : public TargetT auto GTI = gep_type_begin(PointeeType, Operands); Type *TargetType; + + // Handle the case where the GEP instruction has a single operand, + // the basis, therefore TargetType is a nullptr. + if (Operands.empty()) + return !BaseGV ? TTI::TCC_Free : TTI::TCC_Basic; + for (auto I = Operands.begin(); I != Operands.end(); ++I, ++GTI) { TargetType = GTI.getIndexedType(); // We assume that the cost of Scalar GEP with constant index and the Modified: head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h ============================================================================== --- head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h Sun Dec 3 12:14:34 2017 (r326496) @@ -807,6 +807,14 @@ class MachineRegisterInfo { (public) return getReservedRegs().test(PhysReg); } + /// Returns true when the given register unit is considered reserved. + /// + /// Register units are considered reserved when for at least one of their + /// root registers, the root register and all super registers are reserved. + /// This currently iterates the register hierarchy and may be slower than + /// expected. + bool isReservedRegUnit(unsigned Unit) const; + /// isAllocatable - Returns true when PhysReg belongs to an allocatable /// register class and it hasn't been reserved. /// Modified: head/contrib/llvm/include/llvm/IR/AutoUpgrade.h ============================================================================== --- head/contrib/llvm/include/llvm/IR/AutoUpgrade.h Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/include/llvm/IR/AutoUpgrade.h Sun Dec 3 12:14:34 2017 (r326496) @@ -51,6 +51,8 @@ namespace llvm { /// module is modified. bool UpgradeModuleFlags(Module &M); + void UpgradeSectionAttributes(Module &M); + /// If the given TBAA tag uses the scalar TBAA format, create a new node /// corresponding to the upgrade to the struct-path aware TBAA format. /// Otherwise return the \p TBAANode itself. Modified: head/contrib/llvm/include/llvm/Support/FormatVariadic.h ============================================================================== --- head/contrib/llvm/include/llvm/Support/FormatVariadic.h Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/include/llvm/Support/FormatVariadic.h Sun Dec 3 12:14:34 2017 (r326496) @@ -94,6 +94,15 @@ class formatv_object_base { (public) Adapters.reserve(ParamCount); } + formatv_object_base(formatv_object_base const &rhs) = delete; + + formatv_object_base(formatv_object_base &&rhs) + : Fmt(std::move(rhs.Fmt)), + Adapters(), // Adapters are initialized by formatv_object + Replacements(std::move(rhs.Replacements)) { + Adapters.reserve(rhs.Adapters.size()); + }; + void format(raw_ostream &S) const { for (auto &R : Replacements) { if (R.Type == ReplacementType::Empty) @@ -147,6 +156,14 @@ template class formatv_object : publi formatv_object(StringRef Fmt, Tuple &&Params) : formatv_object_base(Fmt, std::tuple_size::value), Parameters(std::move(Params)) { + Adapters = apply_tuple(create_adapters(), Parameters); + } + + formatv_object(formatv_object const &rhs) = delete; + + formatv_object(formatv_object &&rhs) + : formatv_object_base(std::move(rhs)), + Parameters(std::move(rhs.Parameters)) { Adapters = apply_tuple(create_adapters(), Parameters); } }; Modified: head/contrib/llvm/lib/AsmParser/LLParser.cpp ============================================================================== --- head/contrib/llvm/lib/AsmParser/LLParser.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/AsmParser/LLParser.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -240,6 +240,7 @@ bool LLParser::ValidateEndOfModule() { UpgradeDebugInfo(*M); UpgradeModuleFlags(*M); + UpgradeSectionAttributes(*M); if (!Slots) return false; Modified: head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp ============================================================================== --- head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -264,7 +264,7 @@ Expected hasObjCCategoryInModule(BitstreamCursor if (convertToString(Record, 0, S)) return error("Invalid record"); // Check for the i386 and other (x86_64, ARM) conventions - if (S.find("__DATA, __objc_catlist") != std::string::npos || + if (S.find("__DATA,__objc_catlist") != std::string::npos || S.find("__OBJC,__category") != std::string::npos) return true; break; Modified: head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -621,6 +621,7 @@ void DwarfCompileUnit::constructAbstractSubprogramScop auto *SP = cast(Scope->getScopeNode()); DIE *ContextDIE; + DwarfCompileUnit *ContextCU = this; if (includeMinimalInlineScopes()) ContextDIE = &getUnitDie(); @@ -631,18 +632,23 @@ void DwarfCompileUnit::constructAbstractSubprogramScop else if (auto *SPDecl = SP->getDeclaration()) { ContextDIE = &getUnitDie(); getOrCreateSubprogramDIE(SPDecl); - } else + } else { ContextDIE = getOrCreateContextDIE(resolve(SP->getScope())); + // The scope may be shared with a subprogram that has already been + // constructed in another CU, in which case we need to construct this + // subprogram in the same CU. + ContextCU = DD->lookupCU(ContextDIE->getUnitDie()); + } // Passing null as the associated node because the abstract definition // shouldn't be found by lookup. - AbsDef = &createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, nullptr); - applySubprogramAttributesToDefinition(SP, *AbsDef); + AbsDef = &ContextCU->createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, nullptr); + ContextCU->applySubprogramAttributesToDefinition(SP, *AbsDef); - if (!includeMinimalInlineScopes()) - addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined); - if (DIE *ObjectPointer = createAndAddScopeChildren(Scope, *AbsDef)) - addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer); + if (!ContextCU->includeMinimalInlineScopes()) + ContextCU->addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined); + if (DIE *ObjectPointer = ContextCU->createAndAddScopeChildren(Scope, *AbsDef)) + ContextCU->addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer); } DIE *DwarfCompileUnit::constructImportedEntityDIE( Modified: head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h ============================================================================== --- head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h Sun Dec 3 12:14:34 2017 (r326496) @@ -283,7 +283,7 @@ class DwarfDebug : public DebugHandlerBase { // 0, referencing the comp_dir of all the type units that use it. MCDwarfDwoLineTable SplitTypeUnitFileTable; /// @} - + /// True iff there are multiple CUs in this module. bool SingleCU; bool IsDarwin; @@ -562,6 +562,9 @@ class DwarfDebug : public DebugHandlerBase { bool isLexicalScopeDIENull(LexicalScope *Scope); bool hasDwarfPubSections(bool includeMinimalInlineScopes) const; + + /// Find the matching DwarfCompileUnit for the given CU DIE. + DwarfCompileUnit *lookupCU(const DIE *Die) { return CUDieMap.lookup(Die); } }; } // End of namespace llvm Modified: head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -131,13 +131,12 @@ bool DwarfExpression::addMachineReg(const TargetRegist // Intersection between the bits we already emitted and the bits // covered by this subregister. - SmallBitVector Intersection(RegSize, false); - Intersection.set(Offset, Offset + Size); - Intersection ^= Coverage; + SmallBitVector CurSubReg(RegSize, false); + CurSubReg.set(Offset, Offset + Size); // If this sub-register has a DWARF number and we haven't covered // its range, emit a DWARF piece for it. - if (Reg >= 0 && Intersection.any()) { + if (Reg >= 0 && CurSubReg.test(Coverage)) { // Emit a piece for any gap in the coverage. if (Offset > CurPos) DwarfRegs.push_back({-1, Offset - CurPos, nullptr}); Modified: head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -269,8 +269,9 @@ void LiveIntervals::computeRegUnitRange(LiveRange &LR, // may share super-registers. That's OK because createDeadDefs() is // idempotent. It is very rare for a register unit to have multiple roots, so // uniquing super-registers is probably not worthwhile. - bool IsReserved = true; + bool IsReserved = false; for (MCRegUnitRootIterator Root(Unit, TRI); Root.isValid(); ++Root) { + bool IsRootReserved = true; for (MCSuperRegIterator Super(*Root, TRI, /*IncludeSelf=*/true); Super.isValid(); ++Super) { unsigned Reg = *Super; @@ -279,9 +280,12 @@ void LiveIntervals::computeRegUnitRange(LiveRange &LR, // A register unit is considered reserved if all its roots and all their // super registers are reserved. if (!MRI->isReserved(Reg)) - IsReserved = false; + IsRootReserved = false; } + IsReserved |= IsRootReserved; } + assert(IsReserved == MRI->isReservedRegUnit(Unit) && + "reserved computation mismatch"); // Now extend LR to reach all uses. // Ignore uses of reserved registers. We only track defs of those. @@ -924,7 +928,7 @@ class LiveIntervals::HMEditor { (public) // kill flags. This is wasteful. Eventually, LiveVariables will strip all kill // flags, and postRA passes will use a live register utility instead. LiveRange *getRegUnitLI(unsigned Unit) { - if (UpdateFlags) + if (UpdateFlags && !MRI.isReservedRegUnit(Unit)) return &LIS.getRegUnit(Unit); return LIS.getCachedRegUnit(Unit); } Modified: head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -601,3 +601,21 @@ void MachineRegisterInfo::setCalleeSavedRegs(ArrayRef< UpdatedCSRs.push_back(0); IsUpdatedCSRsInitialized = true; } + +bool MachineRegisterInfo::isReservedRegUnit(unsigned Unit) const { + const TargetRegisterInfo *TRI = getTargetRegisterInfo(); + for (MCRegUnitRootIterator Root(Unit, TRI); Root.isValid(); ++Root) { + bool IsRootReserved = true; + for (MCSuperRegIterator Super(*Root, TRI, /*IncludeSelf=*/true); + Super.isValid(); ++Super) { + unsigned Reg = *Super; + if (!isReserved(Reg)) { + IsRootReserved = false; + break; + } + } + if (IsRootReserved) + return true; + } + return false; +} Modified: head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -1316,6 +1316,8 @@ void MachineVerifier::checkLiveness(const MachineOpera // Check the cached regunit intervals. if (TargetRegisterInfo::isPhysicalRegister(Reg) && !isReserved(Reg)) { for (MCRegUnitIterator Units(Reg, TRI); Units.isValid(); ++Units) { + if (MRI->isReservedRegUnit(*Units)) + continue; if (const LiveRange *LR = LiveInts->getCachedRegUnit(*Units)) checkLivenessAtUse(MO, MONum, UseIdx, *LR, *Units); } Modified: head/contrib/llvm/lib/IR/AutoUpgrade.cpp ============================================================================== --- head/contrib/llvm/lib/IR/AutoUpgrade.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/IR/AutoUpgrade.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -2271,6 +2271,24 @@ bool llvm::UpgradeModuleFlags(Module &M) { } } } + // Upgrade Objective-C Image Info Section. Removed the whitespce in the + // section name so that llvm-lto will not complain about mismatching + // module flags that is functionally the same. + if (ID->getString() == "Objective-C Image Info Section") { + if (auto *Value = dyn_cast_or_null(Op->getOperand(2))) { + SmallVector ValueComp; + Value->getString().split(ValueComp, " "); + if (ValueComp.size() != 1) { + std::string NewValue; + for (auto &S : ValueComp) + NewValue += S.str(); + Metadata *Ops[3] = {Op->getOperand(0), Op->getOperand(1), + MDString::get(M.getContext(), NewValue)}; + ModFlags->setOperand(I, MDNode::get(M.getContext(), Ops)); + Changed = true; + } + } + } } // "Objective-C Class Properties" is recently added for Objective-C. We @@ -2285,6 +2303,35 @@ bool llvm::UpgradeModuleFlags(Module &M) { } return Changed; +} + +void llvm::UpgradeSectionAttributes(Module &M) { + auto TrimSpaces = [](StringRef Section) -> std::string { + SmallVector Components; + Section.split(Components, ','); + + SmallString<32> Buffer; + raw_svector_ostream OS(Buffer); + + for (auto Component : Components) + OS << ',' << Component.trim(); + + return OS.str().substr(1); + }; + + for (auto &GV : M.globals()) { + if (!GV.hasSection()) + continue; + + StringRef Section = GV.getSection(); + + if (!Section.startswith("__DATA, __objc_catlist")) + continue; + + // __DATA, __objc_catlist, regular, no_dead_strip + // __DATA,__objc_catlist,regular,no_dead_strip + GV.setSection(TrimSpaces(Section)); + } } static bool isOldLoopArgument(Metadata *MD) { Modified: head/contrib/llvm/lib/IR/ConstantFold.cpp ============================================================================== --- head/contrib/llvm/lib/IR/ConstantFold.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/IR/ConstantFold.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -2199,6 +2199,9 @@ Constant *llvm::ConstantFoldGetElementPtr(Type *Pointe Unknown = true; continue; } + if (!isa(Idxs[i - 1])) + // FIXME: add the support of cosntant vector index. + continue; if (InRangeIndex && i == *InRangeIndex + 1) { // If an index is marked inrange, we cannot apply this canonicalization to // the following index, as that will cause the inrange index to point to Modified: head/contrib/llvm/lib/Linker/IRMover.cpp ============================================================================== --- head/contrib/llvm/lib/Linker/IRMover.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/Linker/IRMover.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -640,6 +640,10 @@ GlobalValue *IRLinker::copyGlobalValueProto(const Glob } else { if (ForDefinition) NewGV = copyGlobalAliasProto(cast(SGV)); + else if (SGV->getValueType()->isFunctionTy()) + NewGV = + Function::Create(cast(TypeMap.get(SGV->getValueType())), + GlobalValue::ExternalLinkage, SGV->getName(), &DstM); else NewGV = new GlobalVariable( DstM, TypeMap.get(SGV->getValueType()), Modified: head/contrib/llvm/lib/Linker/LinkModules.cpp ============================================================================== --- head/contrib/llvm/lib/Linker/LinkModules.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/Linker/LinkModules.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -329,8 +329,18 @@ bool ModuleLinker::shouldLinkFromSource(bool &LinkFrom bool ModuleLinker::linkIfNeeded(GlobalValue &GV) { GlobalValue *DGV = getLinkedToGlobal(&GV); - if (shouldLinkOnlyNeeded() && !(DGV && DGV->isDeclaration())) - return false; + if (shouldLinkOnlyNeeded()) { + // Always import variables with appending linkage. + if (!GV.hasAppendingLinkage()) { + // Don't import globals unless they are referenced by the destination + // module. + if (!DGV) + return false; + // Don't import globals that are already defined in the destination module + if (!DGV->isDeclaration()) + return false; + } + } if (DGV && !GV.hasLocalLinkage() && !GV.hasAppendingLinkage()) { auto *DGVar = dyn_cast(DGV); Modified: head/contrib/llvm/lib/Support/Host.cpp ============================================================================== --- head/contrib/llvm/lib/Support/Host.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/Support/Host.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -208,6 +208,7 @@ StringRef sys::detail::getHostCPUNameForARM( .Case("0x06f", "krait") // APQ8064 .Case("0x201", "kryo") .Case("0x205", "kryo") + .Case("0xc00", "falkor") .Default("generic"); return "generic"; Modified: head/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp Sun Dec 3 04:55:38 2017 (r326495) +++ head/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp Sun Dec 3 12:14:34 2017 (r326496) @@ -220,27 +220,27 @@ static Optional getLoadInfo(const MachineIns default: return None; + case AArch64::LD1i64: + case AArch64::LD2i64: + DestRegIdx = 0; + BaseRegIdx = 3; + OffsetIdx = -1; + IsPrePost = false; + break; + case AArch64::LD1i8: case AArch64::LD1i16: case AArch64::LD1i32: - case AArch64::LD1i64: case AArch64::LD2i8: case AArch64::LD2i16: case AArch64::LD2i32: - case AArch64::LD2i64: case AArch64::LD3i8: case AArch64::LD3i16: case AArch64::LD3i32: + case AArch64::LD3i64: case AArch64::LD4i8: case AArch64::LD4i16: case AArch64::LD4i32: - DestRegIdx = 0; - BaseRegIdx = 3; - OffsetIdx = -1; - IsPrePost = false; - break; - - case AArch64::LD3i64: case AArch64::LD4i64: DestRegIdx = -1; BaseRegIdx = 3; @@ -264,23 +264,16 @@ static Optional getLoadInfo(const MachineIns case AArch64::LD1Rv4s: case AArch64::LD1Rv8h: case AArch64::LD1Rv16b: - case AArch64::LD1Twov1d: - case AArch64::LD1Twov2s: - case AArch64::LD1Twov4h: - case AArch64::LD1Twov8b: - case AArch64::LD2Twov2s: - case AArch64::LD2Twov4s: - case AArch64::LD2Twov8b: - case AArch64::LD2Rv1d: - case AArch64::LD2Rv2s: - case AArch64::LD2Rv4s: - case AArch64::LD2Rv8b: DestRegIdx = 0; BaseRegIdx = 1; OffsetIdx = -1; IsPrePost = false; break; + case AArch64::LD1Twov1d: + case AArch64::LD1Twov2s: + case AArch64::LD1Twov4h: + case AArch64::LD1Twov8b: case AArch64::LD1Twov2d: case AArch64::LD1Twov4s: case AArch64::LD1Twov8h: @@ -301,10 +294,17 @@ static Optional getLoadInfo(const MachineIns case AArch64::LD1Fourv4s: case AArch64::LD1Fourv8h: case AArch64::LD1Fourv16b: + case AArch64::LD2Twov2s: + case AArch64::LD2Twov4s: + case AArch64::LD2Twov8b: case AArch64::LD2Twov2d: case AArch64::LD2Twov4h: case AArch64::LD2Twov8h: case AArch64::LD2Twov16b: + case AArch64::LD2Rv1d: + case AArch64::LD2Rv2s: + case AArch64::LD2Rv4s: + case AArch64::LD2Rv8b: case AArch64::LD2Rv2d: case AArch64::LD2Rv4h: case AArch64::LD2Rv8h: @@ -345,32 +345,32 @@ static Optional getLoadInfo(const MachineIns IsPrePost = false; break; + case AArch64::LD1i64_POST: + case AArch64::LD2i64_POST: + DestRegIdx = 1; + BaseRegIdx = 4; + OffsetIdx = 5; + IsPrePost = true; + break; + case AArch64::LD1i8_POST: case AArch64::LD1i16_POST: case AArch64::LD1i32_POST: - case AArch64::LD1i64_POST: case AArch64::LD2i8_POST: case AArch64::LD2i16_POST: case AArch64::LD2i32_POST: - case AArch64::LD2i64_POST: case AArch64::LD3i8_POST: case AArch64::LD3i16_POST: case AArch64::LD3i32_POST: + case AArch64::LD3i64_POST: case AArch64::LD4i8_POST: case AArch64::LD4i16_POST: case AArch64::LD4i32_POST: - DestRegIdx = 1; - BaseRegIdx = 4; - OffsetIdx = 5; - IsPrePost = false; - break; - - case AArch64::LD3i64_POST: case AArch64::LD4i64_POST: DestRegIdx = -1; BaseRegIdx = 4; OffsetIdx = 5; - IsPrePost = false; + IsPrePost = true; break; case AArch64::LD1Onev1d_POST: @@ -389,23 +389,16 @@ static Optional getLoadInfo(const MachineIns case AArch64::LD1Rv4s_POST: case AArch64::LD1Rv8h_POST: case AArch64::LD1Rv16b_POST: - case AArch64::LD1Twov1d_POST: - case AArch64::LD1Twov2s_POST: - case AArch64::LD1Twov4h_POST: - case AArch64::LD1Twov8b_POST: - case AArch64::LD2Twov2s_POST: - case AArch64::LD2Twov4s_POST: - case AArch64::LD2Twov8b_POST: - case AArch64::LD2Rv1d_POST: - case AArch64::LD2Rv2s_POST: - case AArch64::LD2Rv4s_POST: - case AArch64::LD2Rv8b_POST: DestRegIdx = 1; BaseRegIdx = 2; OffsetIdx = 3; - IsPrePost = false; + IsPrePost = true; break; + case AArch64::LD1Twov1d_POST: + case AArch64::LD1Twov2s_POST: + case AArch64::LD1Twov4h_POST: + case AArch64::LD1Twov8b_POST: case AArch64::LD1Twov2d_POST: case AArch64::LD1Twov4s_POST: case AArch64::LD1Twov8h_POST: @@ -426,10 +419,17 @@ static Optional getLoadInfo(const MachineIns case AArch64::LD1Fourv4s_POST: case AArch64::LD1Fourv8h_POST: case AArch64::LD1Fourv16b_POST: + case AArch64::LD2Twov2s_POST: + case AArch64::LD2Twov4s_POST: + case AArch64::LD2Twov8b_POST: case AArch64::LD2Twov2d_POST: case AArch64::LD2Twov4h_POST: case AArch64::LD2Twov8h_POST: case AArch64::LD2Twov16b_POST: + case AArch64::LD2Rv1d_POST: + case AArch64::LD2Rv2s_POST: + case AArch64::LD2Rv4s_POST: + case AArch64::LD2Rv8b_POST: case AArch64::LD2Rv2d_POST: case AArch64::LD2Rv4h_POST: case AArch64::LD2Rv8h_POST: @@ -467,7 +467,7 @@ static Optional getLoadInfo(const MachineIns DestRegIdx = -1; BaseRegIdx = 2; OffsetIdx = 3; - IsPrePost = false; + IsPrePost = true; break; case AArch64::LDRBBroW: @@ -572,8 +572,12 @@ static Optional getLoadInfo(const MachineIns IsPrePost = true; break; - case AArch64::LDPDi: + case AArch64::LDNPDi: + case AArch64::LDNPQi: + case AArch64::LDNPSi: case AArch64::LDPQi: + case AArch64::LDPDi: + case AArch64::LDPSi: DestRegIdx = -1; BaseRegIdx = 2; OffsetIdx = 3; @@ -581,7 +585,6 @@ static Optional getLoadInfo(const MachineIns break; case AArch64::LDPSWi: - case AArch64::LDPSi: case AArch64::LDPWi: case AArch64::LDPXi: DestRegIdx = 0; @@ -592,18 +595,18 @@ static Optional getLoadInfo(const MachineIns case AArch64::LDPQpost: case AArch64::LDPQpre: + case AArch64::LDPDpost: + case AArch64::LDPDpre: + case AArch64::LDPSpost: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Dec 3 13:52:37 2017 Return-Path: Delivered-To: svn-src-head@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 E1749DFC363; Sun, 3 Dec 2017 13:52:37 +0000 (UTC) (envelope-from kp@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 A943A79C27; Sun, 3 Dec 2017 13:52:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB3DqaCh084855; Sun, 3 Dec 2017 13:52:36 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB3DqZF3084841; Sun, 3 Dec 2017 13:52:35 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201712031352.vB3DqZF3084841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 3 Dec 2017 13:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326497 - in head: etc/mtree tests/sys tests/sys/netipsec tests/sys/netipsec/tunnel X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in head: etc/mtree tests/sys tests/sys/netipsec tests/sys/netipsec/tunnel X-SVN-Commit-Revision: 326497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 13:52:38 -0000 Author: kp Date: Sun Dec 3 13:52:35 2017 New Revision: 326497 URL: https://svnweb.freebsd.org/changeset/base/326497 Log: Add IPSec tests in tunnel mode Some IPSec in tunnel mode allowing to test multiple IPSec configurations. These tests are reusing the jail/vnet scripts from pf tests for generating complex network. Submitted by: olivier@ Differential Revision: https://reviews.freebsd.org/D13017 Added: head/tests/sys/netipsec/ head/tests/sys/netipsec/Makefile (contents, props changed) head/tests/sys/netipsec/tunnel/ head/tests/sys/netipsec/tunnel/Makefile (contents, props changed) head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aes_gcm_128.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aes_gcm_256.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh (contents, props changed) head/tests/sys/netipsec/tunnel/empty.sh (contents, props changed) head/tests/sys/netipsec/tunnel/utils.subr (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Dec 3 12:14:34 2017 (r326496) +++ head/etc/mtree/BSD.tests.dist Sun Dec 3 13:52:35 2017 (r326497) @@ -478,6 +478,10 @@ .. netinet .. + netipsec + tunnel + .. + .. netpfil pf .. Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Sun Dec 3 12:14:34 2017 (r326496) +++ head/tests/sys/Makefile Sun Dec 3 13:52:35 2017 (r326497) @@ -13,6 +13,7 @@ TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= mac TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet +TESTS_SUBDIRS+= netipsec TESTS_SUBDIRS+= netpfil TESTS_SUBDIRS+= opencrypto TESTS_SUBDIRS+= posixshm Added: head/tests/sys/netipsec/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/Makefile Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/netipsec + +TESTS_SUBDIRS+= tunnel + +.include Added: head/tests/sys/netipsec/tunnel/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/Makefile Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/sys/netipsec/tunnel + +ATF_TESTS_SH+= empty \ + aes_cbc_128_hmac_sha1 \ + aes_cbc_256_hmac_sha2_256 \ + aes_gcm_128 \ + aes_gcm_256 \ + aesni_aes_cbc_128_hmac_sha1 \ + aesni_aes_cbc_256_hmac_sha2_256 \ + aesni_aes_gcm_128 \ + aesni_aes_gcm_256 + +${PACKAGE}FILES+= utils.subr + +.include Added: head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using aes-cbc-128-hmac-sha1' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v4_body() +{ + ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using aes-cbc-128-hmac-sha1' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v6_body() +{ + ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} Added: head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using aes-cbc-256-hmac-sha2-256' + atf_set require.user root + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni +} + +v4_body() +{ + ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using aes-cbc-256-hmac-sha2-256' + atf_set require.user root + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni +} + +v6_body() +{ + ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} Added: head/tests/sys/netipsec/tunnel/aes_gcm_128.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/aes_gcm_128.sh Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using aes-gcm-128' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v4_body() +{ + ist_test 4 aes-gcm-16 "12345678901234567890" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using aes-gcm-128' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v6_body() +{ + ist_test 6 aes-gcm-16 "12345678901234567890" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} Added: head/tests/sys/netipsec/tunnel/aes_gcm_256.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/aes_gcm_256.sh Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using aes-gcm-256' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v4_body() +{ + ist_test 4 aes-gcm-16 "123456789012345678901234567890123456" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using aes-gcm-256' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v6_body() +{ + ist_test 6 aes-gcm-16 "123456789012345678901234567890123456" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} Added: head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using aes-cbc-128-hmac-sha1 and AESNI' + atf_set require.user root + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni +} + +v4_body() +{ + ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using aes-cbc-128-hmac-sha1 and AESNI' + atf_set require.user root + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni +} + +v6_body() +{ + ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} Added: head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using aes-cbc-256-hmac-sha2-256 and AESNI' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v4_body() +{ + ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using aes-cbc-256-hmac-sha2-256 and AESNI' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v6_body() +{ + ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} Added: head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,48 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using aes-gcm-128 and AESNI' + atf_set require.user root + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni +} + +v4_body() +{ + ist_test 4 aes-gcm-16 "12345678901234567890" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using aes-gcm-128 and AESNI' + atf_set require.user root + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni +} + +v6_body() +{ + atf_expect_fail "PR 201447" + ist_test 6 aes-gcm-16 "12345678901234567890" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} Added: head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,48 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using aes-gcm-256 and AESNI' + atf_set require.user root + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni +} + +v4_body() +{ + ist_test 4 aes-gcm-16 "123456789012345678901234567890123456" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using aes-gcm-256 and AESNI' + atf_set require.user root + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni +} + +v6_body() +{ + atf_expect_fail "PR 201447" + ist_test 6 aes-gcm-16 "123456789012345678901234567890123456" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} Added: head/tests/sys/netipsec/tunnel/empty.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/empty.sh Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,44 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using NULL encryption' + atf_set require.user root +} + +v4_body() +{ + # Can't use filename "null" for this script: PR 223564 + ist_test 4 null "" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using NULL encryption' + atf_set require.user root +} + +v6_body() +{ + ist_test 6 null "" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} Added: head/tests/sys/netipsec/tunnel/utils.subr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/utils.subr Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,166 @@ +# $FreeBSD$ +# Utility functions (mainly from pf tests, should be merged one day) +## + +: ${TMPDIR=/tmp} + +ist_init() +{ + if [ "$(sysctl -i -n kern.features.vimage)" != 1 ]; then + atf_skip "This test requires VIMAGE" + fi +} + +pft_mkepair() +{ + ifname=$(ifconfig epair create) + echo $ifname >> created_interfaces.lst + echo ${ifname%a} +} + +pft_mkjail() +{ + jailname=$1 + shift + + vnet_interfaces= + for ifname in $@ + do + vnet_interfaces="${vnet_interfaces} vnet.interface=${ifname}" + done + jail -c name=${jailname} persist vnet ${vnet_interfaces} + + echo $jailname >> created_jails.lst +} + +ist_labsetup () +{ + epair_LAN_A=$(pft_mkepair) + ifconfig ${epair_LAN_A}a up + epair_PUB_A=$(pft_mkepair) + ifconfig ${epair_PUB_A}a up + epair_LAN_B=$(pft_mkepair) + ifconfig ${epair_LAN_B}a up + epair_PUB_B=$(pft_mkepair) + ifconfig ${epair_PUB_B}a up + + pft_mkjail hostA ${epair_LAN_A}a + pft_mkjail ipsecA ${epair_LAN_A}b ${epair_PUB_A}a + pft_mkjail router ${epair_PUB_A}b ${epair_PUB_B}b + pft_mkjail ipsecB ${epair_LAN_B}b ${epair_PUB_B}a + pft_mkjail hostB ${epair_LAN_B}a +} + +ist_v4_setup () +{ + jexec hostA ifconfig ${epair_LAN_A}a 192.0.2.1/30 up + jexec ipsecA ifconfig ${epair_LAN_A}b 192.0.2.2/30 up + jexec ipsecA ifconfig ${epair_PUB_A}a 198.51.100.2/30 up + jexec router ifconfig ${epair_PUB_A}b 198.51.100.1/30 up + jexec router ifconfig ${epair_PUB_B}b 198.51.100.6/30 up + jexec ipsecB ifconfig ${epair_PUB_B}a 198.51.100.7/30 up + jexec ipsecB ifconfig ${epair_LAN_B}b 203.0.113.2/30 up + jexec hostB ifconfig ${epair_LAN_B}a 203.0.113.1/30 up + jexec ipsecA sysctl net.inet.ip.forwarding=1 + jexec router sysctl net.inet.ip.forwarding=1 + jexec ipsecB sysctl net.inet.ip.forwarding=1 + jexec hostA route add default 192.0.2.2 + jexec ipsecA route add default 198.51.100.1 + jexec ipsecB route add default 198.51.100.6 + jexec hostB route add default 203.0.113.2 +} + +ist_v6_setup () +{ + jexec hostA ifconfig ${epair_LAN_A}a inet6 2001:db8:1::1/64 up no_dad + jexec ipsecA ifconfig ${epair_LAN_A}b inet6 2001:db8:1::2/64 up no_dad + jexec ipsecA ifconfig ${epair_PUB_A}a inet6 2001:db8:23::2/64 up no_dad + jexec router ifconfig ${epair_PUB_A}b inet6 2001:db8:23::3/64 up no_dad + jexec router ifconfig ${epair_PUB_B}b inet6 2001:db8:34::3/64 up no_dad + jexec ipsecB ifconfig ${epair_PUB_B}a inet6 2001:db8:34::2/64 up no_dad + jexec ipsecB ifconfig ${epair_LAN_B}b inet6 2001:db8:45::2/64 up no_dad + jexec hostB ifconfig ${epair_LAN_B}a inet6 2001:db8:45::1/64 up no_dad + jexec ipsecA sysctl net.inet6.ip6.forwarding=1 + jexec router sysctl net.inet6.ip6.forwarding=1 + jexec ipsecB sysctl net.inet6.ip6.forwarding=1 + jexec hostA route -6 add default 2001:db8:1::2 + jexec ipsecA route -6 add default 2001:db8:23::3 + jexec ipsecB route -6 add default 2001:db8:34::3 + jexec hostB route -6 add default 2001:db8:45::2 +} + +ist_setkey() +{ + jname=$1 + dir=$2 + afnet=$3 + enc_algo=$4 + enc_key=$5 + auth_algo=$6 + auth_key=$7 + + # Load + ( + printf "#arguments debug: ${jname} ${afnet} ${dir} ${enc_algo} " + printf "${enc_key} ${auth_algo} ${auth_key}\n" + printf "flush;\n" + printf "spdflush;\n" + if [ ${afnet} -eq 4 ]; then + SRC_LAN="192.0.2.0/24" + DST_LAN="203.0.113.0/24" + SRC_GW="198.51.100.2" + DST_GW="198.51.100.7" + else + SRC_LAN="2001:db8:1::/64" + DST_LAN="2001:db8:45::/64" + SRC_GW="2001:db8:23::2" + DST_GW="2001:db8:34::2" + fi + printf "spdadd ${SRC_LAN} ${DST_LAN} any -P " + [ ${dir} = "out" ] && printf "out" || printf "in" + printf " ipsec esp/tunnel/${SRC_GW}-${DST_GW}/require;\n" + printf "spdadd ${DST_LAN} ${SRC_LAN} any -P " + [ ${dir} = "out" ] && printf "in" || printf "out" + printf " ipsec esp/tunnel/${DST_GW}-${SRC_GW}/require;\n" + printf "add ${SRC_GW} ${DST_GW} esp 0x1000 -E ${enc_algo} \"${enc_key}\"" + [ -n "${auth_algo}" ] && printf " -A ${auth_algo} \"${auth_key}\";\n" || printf ";\n" + printf "add ${DST_GW} ${SRC_GW} esp 0x1001 -E ${enc_algo} \"${enc_key}\"" + [ -n "$auth_algo" ] && printf " -A ${auth_algo} \"${auth_key}\";\n" || printf ";\n" + ) > ${TMPDIR}/ipsec.${jname}.conf +} + +ist_test() +{ + ist_init + ist_labsetup + [ $1 -eq 4 ] && ist_v4_setup || ist_v6_setup + ist_setkey ipsecA out $@ + atf_check -s exit:0 -o ignore jexec ipsecA setkey -f ${TMPDIR}/ipsec.ipsecA.conf + ist_setkey ipsecB in $@ + atf_check -s exit:0 -o ignore jexec ipsecB setkey -f ${TMPDIR}/ipsec.ipsecB.conf + # Check ipsec tunnel + if [ $1 -eq 4 ]; then + atf_check -s exit:0 -o ignore jexec hostA ping -c 1 203.0.113.1 + else + atf_check -s exit:0 -o ignore jexec hostA ping6 -c 1 2001:db8:45::1 + fi +} +ist_cleanup() +{ + if [ -f created_jails.lst ]; then + for jailname in $(cat created_jails.lst) + do + jail -r ${jailname} + rm -f ${TMPDIR}/ipsec.${jailname}.conf + done + rm created_jails.lst + fi + + if [ -f created_interfaces.lst ]; then + for ifname in $(cat created_interfaces.lst) + do + ifconfig ${ifname} destroy + done + rm created_interfaces.lst + fi +} From owner-svn-src-head@freebsd.org Sun Dec 3 16:50:17 2017 Return-Path: Delivered-To: svn-src-head@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 BC84CDFFC93; Sun, 3 Dec 2017 16:50: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 960617E0FD; Sun, 3 Dec 2017 16:50: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 vB3GoGR2056430; Sun, 3 Dec 2017 16:50:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB3GoGDV056424; Sun, 3 Dec 2017 16:50:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712031650.vB3GoGDV056424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 3 Dec 2017 16:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326498 - in head: . cddl/contrib/opensolaris/lib/libdtrace/common lib/libproc lib/libproc/tests X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: . cddl/contrib/opensolaris/lib/libdtrace/common lib/libproc lib/libproc/tests X-SVN-Commit-Revision: 326498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 16:50:17 -0000 Author: markj Date: Sun Dec 3 16:50:16 2017 New Revision: 326498 URL: https://svnweb.freebsd.org/changeset/base/326498 Log: Add an envp argument to proc_create(). This is needed to support dtrace's -x setenv option. MFC after: 2 weeks Modified: head/ObsoleteFiles.inc head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c head/lib/libproc/Makefile head/lib/libproc/libproc.h head/lib/libproc/proc_create.c head/lib/libproc/tests/proc_test.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Dec 3 13:52:35 2017 (r326497) +++ head/ObsoleteFiles.inc Sun Dec 3 16:50:16 2017 (r326498) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20171203: libproc version bump +OLD_LIBS+=usr/lib/libproc.so.4 +OLD_LIBS+=usr/lib32/libproc.so.4 # 20171203: new clang import which bumps version from 5.0.0 to 5.0.1. OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/asan_interface.h Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Sun Dec 3 13:52:35 2017 (r326497) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Sun Dec 3 16:50:16 2017 (r326498) @@ -967,7 +967,7 @@ dt_proc_create(dtrace_hdl_t *dtp, const char *file, ch #ifdef illumos if ((dpr->dpr_proc = Pcreate(file, argv, &err, NULL, 0)) == NULL) { #else - if ((err = proc_create(file, argv, pcf, child_arg, + if ((err = proc_create(file, argv, NULL, pcf, child_arg, &dpr->dpr_proc)) != 0) { #endif return (dt_proc_error(dtp, dpr, Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Sun Dec 3 13:52:35 2017 (r326497) +++ head/lib/libproc/Makefile Sun Dec 3 16:50:16 2017 (r326498) @@ -37,7 +37,7 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libc CFLAGS+= -DNO_CTF .endif -SHLIB_MAJOR= 4 +SHLIB_MAJOR= 5 MAN= Modified: head/lib/libproc/libproc.h ============================================================================== --- head/lib/libproc/libproc.h Sun Dec 3 13:52:35 2017 (r326497) +++ head/lib/libproc/libproc.h Sun Dec 3 16:50:16 2017 (r326498) @@ -142,8 +142,8 @@ int proc_addr2sym(struct proc_handle *, uintptr_t, cha int proc_attach(pid_t pid, int flags, struct proc_handle **pphdl); int proc_continue(struct proc_handle *); int proc_clearflags(struct proc_handle *, int); -int proc_create(const char *, char * const *, proc_child_func *, void *, - struct proc_handle **); +int proc_create(const char *, char * const *, char * const *, + proc_child_func *, void *, struct proc_handle **); int proc_detach(struct proc_handle *, int); int proc_getflags(struct proc_handle *); int proc_name2sym(struct proc_handle *, const char *, const char *, Modified: head/lib/libproc/proc_create.c ============================================================================== --- head/lib/libproc/proc_create.c Sun Dec 3 13:52:35 2017 (r326497) +++ head/lib/libproc/proc_create.c Sun Dec 3 16:50:16 2017 (r326498) @@ -176,9 +176,10 @@ out: } int -proc_create(const char *file, char * const *argv, proc_child_func *pcf, - void *child_arg, struct proc_handle **pphdl) +proc_create(const char *file, char * const *argv, char * const *envp, + proc_child_func *pcf, void *child_arg, struct proc_handle **pphdl) { + extern char * const *environ; struct proc_handle *phdl; int error, status; pid_t pid; @@ -189,8 +190,7 @@ proc_create(const char *file, char * const *argv, proc error = 0; phdl = NULL; - /* Fork a new process. */ - if ((pid = vfork()) == -1) + if ((pid = fork()) == -1) error = errno; else if (pid == 0) { /* The child expects to be traced. */ @@ -200,18 +200,14 @@ proc_create(const char *file, char * const *argv, proc if (pcf != NULL) (*pcf)(child_arg); - /* Execute the specified file: */ + if (envp != NULL) + environ = envp; + execvp(file, argv); - /* Couldn't execute the file. */ _exit(2); /* NOTREACHED */ } else { - /* The parent owns the process handle. */ - error = proc_init(pid, 0, PS_IDLE, &phdl); - if (error != 0) - goto bad; - /* Wait for the child process to stop. */ if (waitpid(pid, &status, WUNTRACED) == -1) { error = errno; @@ -221,11 +217,15 @@ proc_create(const char *file, char * const *argv, proc /* Check for an unexpected status. */ if (!WIFSTOPPED(status)) { - error = EBUSY; + error = ENOENT; DPRINTFX("ERROR: child process %d status 0x%x", pid, status); goto bad; } - phdl->status = PS_STOP; + + /* The parent owns the process handle. */ + error = proc_init(pid, 0, PS_IDLE, &phdl); + if (error == 0) + phdl->status = PS_STOP; bad: if (error != 0 && phdl != NULL) { Modified: head/lib/libproc/tests/proc_test.c ============================================================================== --- head/lib/libproc/tests/proc_test.c Sun Dec 3 13:52:35 2017 (r326497) +++ head/lib/libproc/tests/proc_test.c Sun Dec 3 16:50:16 2017 (r326498) @@ -65,7 +65,7 @@ start_prog(const struct atf_tc *tc, bool sig) argv[1] = NULL; } - error = proc_create(argv[0], argv, NULL, NULL, &phdl); + error = proc_create(argv[0], argv, NULL, NULL, NULL, &phdl); ATF_REQUIRE_EQ_MSG(error, 0, "failed to run '%s'", target_prog_file); ATF_REQUIRE(phdl != NULL); From owner-svn-src-head@freebsd.org Sun Dec 3 16:57:31 2017 Return-Path: Delivered-To: svn-src-head@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 9113AE56103; Sun, 3 Dec 2017 16:57:31 +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 586927E820; Sun, 3 Dec 2017 16:57:31 +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 vB3GvUJB060575; Sun, 3 Dec 2017 16:57:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB3GvSlR060556; Sun, 3 Dec 2017 16:57:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712031657.vB3GvSlR060556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 3 Dec 2017 16:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326499 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env cddl/contrib/opensolaris/lib/libdtrace/common cddl/usr.sbin/dtrace/tests/common cddl/usr.sbin/dtrace/tests/com... X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env cddl/contrib/opensolaris/lib/libdtrace/common cddl/usr.sbin/dtrace/tests/common cddl/usr.sbin/dtrace/tests/common/probes cddl/usr.sbin/... X-SVN-Commit-Revision: 326499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 16:57:31 -0000 Author: markj Date: Sun Dec 3 16:57:28 2017 New Revision: 326499 URL: https://svnweb.freebsd.org/changeset/base/326499 Log: Complete support for dtrace's -x setenv option. This allows one to override the environment for processes created with dtrace -c. By default, the environment is inherited. This support was originally merged from illumos in r249367 but was lost when the commit was later reverted and then brought back piecemeal. Reported by: Samuel Lepetit MFC after: 2 weeks Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.setfromscript.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.unsetfromscript.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh.out (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh.out Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h head/cddl/usr.sbin/dtrace/tests/common/Makefile head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile head/etc/mtree/BSD.tests.dist Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.setfromscript.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.setfromscript.d Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,25 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#pragma D option setenv=balloon=something_bad_happens + +BEGIN +{ + exit(0); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.unsetfromscript.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.unsetfromscript.d Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,25 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#pragma D option unsetenv=rectalexambot + +BEGIN +{ + exit(0); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +# +# Check that the LD_NOLAZYLOAD variable is set to 1 as expected. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -q -Z -n doogle -c 'printenv LD_NOLAZYLOAD' + +exit $? Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh.out Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,2 @@ +1 + Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +# +# Reset an environment variable we already know to be set. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -q -Z -n doogle -xsetenv=LD_NOLAZYLOAD=0 -c 'printenv LD_NOLAZYLOAD' + +exit $? Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh.out Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,2 @@ +0 + Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +# +# Test setting a variable that we isn't already set. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -q -Z -n doogle -xsetenv=CORPORATIONS=PEOPLE -c 'printenv CORPORATIONS' + +exit $? Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh.out Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,2 @@ +PEOPLE + Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +# +# Test unsetting a variable we know to be set. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -q -Z -n doogle -xunsetenv=LD_NOLAZYLOAD -c 'printenv LD_NOLAZYLOAD' + +exit $? Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh.out ============================================================================== Binary file. No diff available. Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1,35 @@ +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +# +# Test invalid syntax to the unsetenv option. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -q -Z -n doogle -xunsetenv=ed=screven -c 'true' 2>&1 + +[[ $? -eq 1 ]] && exit 0 + +exit 1 Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh.out Sun Dec 3 16:57:28 2017 (r326499) @@ -0,0 +1 @@ +dtrace: failed to set -x unsetenv: Invalid value for specified option Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Dec 3 16:50:16 2017 (r326498) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Dec 3 16:57:28 2017 (r326499) @@ -1182,7 +1182,7 @@ alloc: #endif dtp->dt_provbuckets = _dtrace_strbuckets; dtp->dt_provs = calloc(dtp->dt_provbuckets, sizeof (dt_provider_t *)); - dt_proc_hash_create(dtp); + dt_proc_init(dtp); dtp->dt_vmax = DT_VERS_LATEST; dtp->dt_cpp_path = strdup(_dtrace_defcpp); dtp->dt_cpp_argv = malloc(sizeof (char *)); @@ -1199,12 +1199,13 @@ alloc: (void) uname(&dtp->dt_uts); if (dtp->dt_mods == NULL || dtp->dt_provs == NULL || - dtp->dt_procs == NULL || dtp->dt_ld_path == NULL || + dtp->dt_procs == NULL || dtp->dt_proc_env == NULL || + dtp->dt_ld_path == NULL || dtp->dt_cpp_path == NULL || #ifdef __FreeBSD__ dtp->dt_kmods == NULL || dtp->dt_objcopy_path == NULL || #endif - dtp->dt_cpp_path == NULL || dtp->dt_cpp_argv == NULL) + dtp->dt_cpp_argv == NULL) return (set_open_errno(dtp, errp, EDT_NOMEM)); for (i = 0; i < DTRACEOPT_MAX; i++) @@ -1631,7 +1632,7 @@ dtrace_close(dtrace_hdl_t *dtp) int i; if (dtp->dt_procs != NULL) - dt_proc_hash_destroy(dtp); + dt_proc_fini(dtp); while ((pgp = dt_list_next(&dtp->dt_programs)) != NULL) dt_program_destroy(dtp, pgp); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Sun Dec 3 16:50:16 2017 (r326498) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Sun Dec 3 16:57:28 2017 (r326499) @@ -25,6 +25,10 @@ */ /* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* * DTrace Process Control * * This file provides a set of routines that permit libdtrace and its clients @@ -504,7 +508,7 @@ dt_proc_control(void *arg) dt_proc_control_data_t *datap = arg; dtrace_hdl_t *dtp = datap->dpcd_hdl; dt_proc_t *dpr = datap->dpcd_proc; - dt_proc_hash_t *dph = dpr->dpr_hdl->dt_procs; + dt_proc_hash_t *dph = dtp->dt_procs; struct ps_prochandle *P = dpr->dpr_proc; int pid = dpr->dpr_pid; @@ -965,14 +969,18 @@ dt_proc_create(dtrace_hdl_t *dtp, const char *file, ch (void) pthread_cond_init(&dpr->dpr_cv, NULL); #ifdef illumos - if ((dpr->dpr_proc = Pcreate(file, argv, &err, NULL, 0)) == NULL) { + dpr->dpr_proc = Pxcreate(file, argv, dtp->dt_proc_env, &err, NULL, 0); + if (dpr->dpr_proc == NULL) { + return (dt_proc_error(dtp, dpr, + "failed to execute %s: %s\n", file, Pcreate_error(err))); + } #else - if ((err = proc_create(file, argv, NULL, pcf, child_arg, + if ((err = proc_create(file, argv, dtp->dt_proc_env, pcf, child_arg, &dpr->dpr_proc)) != 0) { -#endif return (dt_proc_error(dtp, dpr, "failed to execute %s: %s\n", file, Pcreate_error(err))); } +#endif dpr->dpr_hdl = dtp; #ifdef illumos @@ -1141,30 +1149,74 @@ dt_proc_unlock(dtrace_hdl_t *dtp, struct ps_prochandle } void -dt_proc_hash_create(dtrace_hdl_t *dtp) +dt_proc_init(dtrace_hdl_t *dtp) { + extern char **environ; + static char *envdef[] = { + "LD_NOLAZYLOAD=1", /* linker lazy loading hides funcs */ + NULL + }; + char **p; + int i; + if ((dtp->dt_procs = dt_zalloc(dtp, sizeof (dt_proc_hash_t) + - sizeof (dt_proc_t *) * _dtrace_pidbuckets - 1)) != NULL) { + sizeof (dt_proc_t *) * _dtrace_pidbuckets - 1)) == NULL) + return; - (void) pthread_mutex_init(&dtp->dt_procs->dph_lock, NULL); - (void) pthread_cond_init(&dtp->dt_procs->dph_cv, NULL); + (void) pthread_mutex_init(&dtp->dt_procs->dph_lock, NULL); + (void) pthread_cond_init(&dtp->dt_procs->dph_cv, NULL); - dtp->dt_procs->dph_hashlen = _dtrace_pidbuckets; - dtp->dt_procs->dph_lrulim = _dtrace_pidlrulim; + dtp->dt_procs->dph_hashlen = _dtrace_pidbuckets; + dtp->dt_procs->dph_lrulim = _dtrace_pidlrulim; + + /* + * Count how big our environment needs to be. + */ + for (i = 1, p = environ; *p != NULL; i++, p++) + continue; + for (p = envdef; *p != NULL; i++, p++) + continue; + + if ((dtp->dt_proc_env = dt_zalloc(dtp, sizeof (char *) * i)) == NULL) + return; + + for (i = 0, p = environ; *p != NULL; i++, p++) { + if ((dtp->dt_proc_env[i] = strdup(*p)) == NULL) + goto err; } + for (p = envdef; *p != NULL; i++, p++) { + if ((dtp->dt_proc_env[i] = strdup(*p)) == NULL) + goto err; + } + + return; + +err: + while (--i != 0) { + dt_free(dtp, dtp->dt_proc_env[i]); + } + dt_free(dtp, dtp->dt_proc_env); + dtp->dt_proc_env = NULL; } void -dt_proc_hash_destroy(dtrace_hdl_t *dtp) +dt_proc_fini(dtrace_hdl_t *dtp) { dt_proc_hash_t *dph = dtp->dt_procs; dt_proc_t *dpr; + char **p; while ((dpr = dt_list_next(&dph->dph_lrulist)) != NULL) dt_proc_destroy(dtp, dpr->dpr_proc); dtp->dt_procs = NULL; dt_free(dtp, dph); + + for (p = dtp->dt_proc_env; *p != NULL; p++) + dt_free(dtp, *p); + + dt_free(dtp, dtp->dt_proc_env); + dtp->dt_proc_env = NULL; } struct ps_prochandle * Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h Sun Dec 3 16:50:16 2017 (r326498) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h Sun Dec 3 16:57:28 2017 (r326499) @@ -24,11 +24,13 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + #ifndef _DT_PROC_H #define _DT_PROC_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -106,8 +108,8 @@ extern void dt_proc_lock(dtrace_hdl_t *, struct ps_pro extern void dt_proc_unlock(dtrace_hdl_t *, struct ps_prochandle *); extern dt_proc_t *dt_proc_lookup(dtrace_hdl_t *, struct ps_prochandle *, int); -extern void dt_proc_hash_create(dtrace_hdl_t *); -extern void dt_proc_hash_destroy(dtrace_hdl_t *); +extern void dt_proc_init(dtrace_hdl_t *); +extern void dt_proc_fini(dtrace_hdl_t *); #ifdef __cplusplus } Modified: head/cddl/usr.sbin/dtrace/tests/common/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/Makefile Sun Dec 3 16:50:16 2017 (r326498) +++ head/cddl/usr.sbin/dtrace/tests/common/Makefile Sun Dec 3 16:57:28 2017 (r326499) @@ -19,6 +19,7 @@ TESTS_SUBDIRS+= aggs \ drops \ dtraceUtil \ end \ + env \ enum \ error \ exit \ Modified: head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile Sun Dec 3 16:50:16 2017 (r326498) +++ head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile Sun Dec 3 16:57:28 2017 (r326499) @@ -35,5 +35,4 @@ CFILES= \ tst.probestar.c \ - .include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile Sun Dec 3 16:50:16 2017 (r326498) +++ head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile Sun Dec 3 16:57:28 2017 (r326499) @@ -70,7 +70,6 @@ ${PACKAGE}FILES= \ TESTEXES= \ tst.NoSpecBuffer.exe \ - CFILES= \ Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Dec 3 16:50:16 2017 (r326498) +++ head/etc/mtree/BSD.tests.dist Sun Dec 3 16:57:28 2017 (r326499) @@ -101,6 +101,8 @@ .. end .. + env + .. enum .. error From owner-svn-src-head@freebsd.org Sun Dec 3 18:21:00 2017 Return-Path: Delivered-To: svn-src-head@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 BB61BE5E2C1; Sun, 3 Dec 2017 18:21:00 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) (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 3CEE41E38; Sun, 3 Dec 2017 18:21:00 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22e.google.com with SMTP id l81so16704920lfl.6; Sun, 03 Dec 2017 10:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=BiDkJnTCtMFgQjlF8ScFY1FhIwjOj8xzbWqcgoUiG8A=; b=HDnxY+bwh4I6xcolwzhTg1wiY1uLequyTJpiXHMTvsjwY9ksHJv8GroqzZsnIY0euT 9VFpb6zJbqx8CU7p3t+YhflaR6cZnfoMLcZRarqtMkT5X1PitBO918TrDSN3ppCcowPl VTnsCbnftbnVx20mzXbOazKKnr9KeJG/6Xj1a3arCRKbr2zyjSuQAn7zCwkf6fo8zYvp DgswiUkf91WrLlrWWsJHjCpw53cVAPJprF6Ub4SA9XI8d3UhMWrfwDgeVQ2wMqn7+nVf GUjdT5dJmmqlBJlBhIphhxBG8iGisp5mf/k5nEjhGJNK249Z1SdZxSga19WN7shEYtx3 ix5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=BiDkJnTCtMFgQjlF8ScFY1FhIwjOj8xzbWqcgoUiG8A=; b=M4v8txUR2CI2d/KwG6APG+dXgwfID3hXXqGhosn49R/TDuXSa1tGwLDz+t0ZGyirNU E88W4UrA1KDnaFf+cyjzKILpeJ2B+qxreccaFWn111xNe5jKiiCaAaIdGbDUcfQpUEjc LWAb731LxJ1K84CBuB5UCbC9Vwua6TNwgjLvIX4M9T/sO7wf+XCJyJ58pkg3S/1oqj2d 0TiqMwj8XI5sX1UwUmeVR9dmH43skqHZygBhABEN+3LYJdZ2+OA9KbzAuptYXsjAQd9L ju+RHADuzDP8xVKOHGlSNeFdTElDW75uXYnRea22A6H5GF9giaRPo2FCDz+2/4OyBsz3 ZHfQ== X-Gm-Message-State: AJaThX5zV7kx6R7DPzcmhiIbzCfW8YMXA7w396n06SjdlDGbza/DQ5qH djpmIXUQ3PbsfU2xNIJKIlyHe7+bPUOLTP6k1Gs= X-Google-Smtp-Source: AGs4zMaYpm9Dk3mX3HEJ32U1YFg3AVEp+khe+Y6L91lKQ120+HjZyELXKMYCJbMSpQe14Orvh97aXV4gzOQN8jsFJZ4= X-Received: by 10.25.27.18 with SMTP id b18mr6160322lfb.177.1512325256716; Sun, 03 Dec 2017 10:20:56 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.76.19 with HTTP; Sun, 3 Dec 2017 10:20:56 -0800 (PST) In-Reply-To: <201712031352.vB3DqZF3084841@repo.freebsd.org> References: <201712031352.vB3DqZF3084841@repo.freebsd.org> From: Alan Somers Date: Sun, 3 Dec 2017 11:20:56 -0700 X-Google-Sender-Auth: qns-gEZsBogYj9eX5MknFFqbbNk Message-ID: Subject: Re: svn commit: r326497 - in head: etc/mtree tests/sys tests/sys/netipsec tests/sys/netipsec/tunnel To: Kristof Provost Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 18:21:00 -0000 On Sun, Dec 3, 2017 at 6:52 AM, Kristof Provost wrote: > Author: kp > Date: Sun Dec 3 13:52:35 2017 > New Revision: 326497 > URL: https://svnweb.freebsd.org/changeset/base/326497 > > Log: > Add IPSec tests in tunnel mode > > Some IPSec in tunnel mode allowing to test multiple IPSec > configurations. These tests are reusing the jail/vnet scripts from pf > tests for generating complex network. > > Submitted by: olivier@ > Differential Revision: https://reviews.freebsd.org/D13017 > > Added: > head/tests/sys/netipsec/ > head/tests/sys/netipsec/Makefile (contents, props changed) > head/tests/sys/netipsec/tunnel/ > head/tests/sys/netipsec/tunnel/Makefile (contents, props changed) > head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh (contents, > props changed) > head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh > (contents, props changed) > head/tests/sys/netipsec/tunnel/aes_gcm_128.sh (contents, props > changed) > head/tests/sys/netipsec/tunnel/aes_gcm_256.sh (contents, props > changed) > head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh > (contents, props changed) > head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh > (contents, props changed) > head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh (contents, props > changed) > head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh (contents, props > changed) > head/tests/sys/netipsec/tunnel/empty.sh (contents, props changed) > head/tests/sys/netipsec/tunnel/utils.subr (contents, props changed) > Modified: > head/etc/mtree/BSD.tests.dist > head/tests/sys/Makefile > > > Added: head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh > ============================================================ > ================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh Sun Dec > 3 13:52:35 2017 (r326497) > @@ -0,0 +1,47 @@ > +# $FreeBSD$ > + > +. $(atf_get_srcdir)/utils.subr > + > +atf_test_case "v4" "cleanup" > +v4_head() > +{ > + atf_set descr 'IPSec inet4 tunnel using aes-cbc-128-hmac-sha1' > + atf_set require.user root > + # Unload AESNI module if loaded > + kldstat -q -n aesni && kldunload aesni > +} > > It's not ok to use kldunload during the test heads. Everything in the head methods gets executed when you do "kyua list". Anything output gets interpreted by Kyua. In this case, if kldunload outputs anything at all, Kyua will consider it to be a syntax error, and it will skip the entire file. You should limit yourself to using just atf_set in the header. Move the kld commands into the test case bodies. -Alan From owner-svn-src-head@freebsd.org Sun Dec 3 18:35:09 2017 Return-Path: Delivered-To: svn-src-head@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 092EEE5E8C0; Sun, 3 Dec 2017 18:35:09 +0000 (UTC) (envelope-from kp@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 D6C542708; Sun, 3 Dec 2017 18:35:08 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB3IZ7l1004209; Sun, 3 Dec 2017 18:35:07 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB3IZ7K0004201; Sun, 3 Dec 2017 18:35:07 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201712031835.vB3IZ7K0004201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 3 Dec 2017 18:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326500 - head/tests/sys/netipsec/tunnel X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/netipsec/tunnel X-SVN-Commit-Revision: 326500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 18:35:09 -0000 Author: kp Date: Sun Dec 3 18:35:07 2017 New Revision: 326500 URL: https://svnweb.freebsd.org/changeset/base/326500 Log: tests: ipsec: Don't load/unload aesni.ko in the test header We can't kldunload in the test head as Kyua interprets any output from them. This would lead to syntax errors and skipping the entire file. Move the kld commands into the test case bodies. Pointed out by: asomers@ Modified: head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh head/tests/sys/netipsec/tunnel/aes_gcm_128.sh head/tests/sys/netipsec/tunnel/aes_gcm_256.sh head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh Modified: head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh Sun Dec 3 16:57:28 2017 (r326499) +++ head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh Sun Dec 3 18:35:07 2017 (r326500) @@ -7,12 +7,13 @@ v4_head() { atf_set descr 'IPSec inet4 tunnel using aes-cbc-128-hmac-sha1' atf_set require.user root - # Unload AESNI module if loaded - kldstat -q -n aesni && kldunload aesni } v4_body() { + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni + ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" } @@ -26,12 +27,13 @@ v6_head() { atf_set descr 'IPSec inet6 tunnel using aes-cbc-128-hmac-sha1' atf_set require.user root - # Unload AESNI module if loaded - kldstat -q -n aesni && kldunload aesni } v6_body() { + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni + ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" } Modified: head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh Sun Dec 3 16:57:28 2017 (r326499) +++ head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh Sun Dec 3 18:35:07 2017 (r326500) @@ -7,12 +7,13 @@ v4_head() { atf_set descr 'IPSec inet4 tunnel using aes-cbc-256-hmac-sha2-256' atf_set require.user root - # load AESNI module if not already - kldstat -q -n aesni || kldload aesni } v4_body() { + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni + ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012" } @@ -26,12 +27,13 @@ v6_head() { atf_set descr 'IPSec inet6 tunnel using aes-cbc-256-hmac-sha2-256' atf_set require.user root - # load AESNI module if not already - kldstat -q -n aesni || kldload aesni } v6_body() { + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni + ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012" } Modified: head/tests/sys/netipsec/tunnel/aes_gcm_128.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aes_gcm_128.sh Sun Dec 3 16:57:28 2017 (r326499) +++ head/tests/sys/netipsec/tunnel/aes_gcm_128.sh Sun Dec 3 18:35:07 2017 (r326500) @@ -7,12 +7,13 @@ v4_head() { atf_set descr 'IPSec inet4 tunnel using aes-gcm-128' atf_set require.user root - # Unload AESNI module if loaded - kldstat -q -n aesni && kldunload aesni } v4_body() { + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni + ist_test 4 aes-gcm-16 "12345678901234567890" } @@ -26,12 +27,13 @@ v6_head() { atf_set descr 'IPSec inet6 tunnel using aes-gcm-128' atf_set require.user root - # Unload AESNI module if loaded - kldstat -q -n aesni && kldunload aesni } v6_body() { + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni + ist_test 6 aes-gcm-16 "12345678901234567890" } Modified: head/tests/sys/netipsec/tunnel/aes_gcm_256.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aes_gcm_256.sh Sun Dec 3 16:57:28 2017 (r326499) +++ head/tests/sys/netipsec/tunnel/aes_gcm_256.sh Sun Dec 3 18:35:07 2017 (r326500) @@ -7,12 +7,13 @@ v4_head() { atf_set descr 'IPSec inet4 tunnel using aes-gcm-256' atf_set require.user root - # Unload AESNI module if loaded - kldstat -q -n aesni && kldunload aesni } v4_body() { + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni + ist_test 4 aes-gcm-16 "123456789012345678901234567890123456" } @@ -26,12 +27,13 @@ v6_head() { atf_set descr 'IPSec inet6 tunnel using aes-gcm-256' atf_set require.user root - # Unload AESNI module if loaded - kldstat -q -n aesni && kldunload aesni } v6_body() { + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni + ist_test 6 aes-gcm-16 "123456789012345678901234567890123456" } Modified: head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh Sun Dec 3 16:57:28 2017 (r326499) +++ head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh Sun Dec 3 18:35:07 2017 (r326500) @@ -7,12 +7,13 @@ v4_head() { atf_set descr 'IPSec inet4 tunnel using aes-cbc-128-hmac-sha1 and AESNI' atf_set require.user root - # load AESNI module if not already - kldstat -q -n aesni || kldload aesni } v4_body() { + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni + ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" } @@ -26,12 +27,13 @@ v6_head() { atf_set descr 'IPSec inet6 tunnel using aes-cbc-128-hmac-sha1 and AESNI' atf_set require.user root - # load AESNI module if not already - kldstat -q -n aesni || kldload aesni } v6_body() { + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni + ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" } Modified: head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh Sun Dec 3 16:57:28 2017 (r326499) +++ head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh Sun Dec 3 18:35:07 2017 (r326500) @@ -7,12 +7,13 @@ v4_head() { atf_set descr 'IPSec inet4 tunnel using aes-cbc-256-hmac-sha2-256 and AESNI' atf_set require.user root - # Unload AESNI module if loaded - kldstat -q -n aesni && kldunload aesni } v4_body() { + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni + ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012" } @@ -26,12 +27,13 @@ v6_head() { atf_set descr 'IPSec inet6 tunnel using aes-cbc-256-hmac-sha2-256 and AESNI' atf_set require.user root - # Unload AESNI module if loaded - kldstat -q -n aesni && kldunload aesni } v6_body() { + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni + ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012" } Modified: head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh Sun Dec 3 16:57:28 2017 (r326499) +++ head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh Sun Dec 3 18:35:07 2017 (r326500) @@ -7,12 +7,13 @@ v4_head() { atf_set descr 'IPSec inet4 tunnel using aes-gcm-128 and AESNI' atf_set require.user root - # load AESNI module if not already - kldstat -q -n aesni || kldload aesni } v4_body() { + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni + ist_test 4 aes-gcm-16 "12345678901234567890" } @@ -26,12 +27,13 @@ v6_head() { atf_set descr 'IPSec inet6 tunnel using aes-gcm-128 and AESNI' atf_set require.user root - # load AESNI module if not already - kldstat -q -n aesni || kldload aesni } v6_body() { + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni + atf_expect_fail "PR 201447" ist_test 6 aes-gcm-16 "12345678901234567890" } Modified: head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh Sun Dec 3 16:57:28 2017 (r326499) +++ head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh Sun Dec 3 18:35:07 2017 (r326500) @@ -7,12 +7,13 @@ v4_head() { atf_set descr 'IPSec inet4 tunnel using aes-gcm-256 and AESNI' atf_set require.user root - # load AESNI module if not already - kldstat -q -n aesni || kldload aesni } v4_body() { + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni + ist_test 4 aes-gcm-16 "123456789012345678901234567890123456" } @@ -26,12 +27,13 @@ v6_head() { atf_set descr 'IPSec inet6 tunnel using aes-gcm-256 and AESNI' atf_set require.user root - # load AESNI module if not already - kldstat -q -n aesni || kldload aesni } v6_body() { + # load AESNI module if not already + kldstat -q -n aesni || kldload aesni + atf_expect_fail "PR 201447" ist_test 6 aes-gcm-16 "123456789012345678901234567890123456" } From owner-svn-src-head@freebsd.org Sun Dec 3 18:36:02 2017 Return-Path: Delivered-To: svn-src-head@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 7C57DE5E95A; Sun, 3 Dec 2017 18:36:02 +0000 (UTC) (envelope-from srs0=cguf=c7=freebsd.org=kp@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45EA82883; Sun, 3 Dec 2017 18:36:02 +0000 (UTC) (envelope-from srs0=cguf=c7=freebsd.org=kp@codepro.be) Received: from [10.0.2.164] (ptr-8ripyygs3omapxtynip.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:2419:4e02:9caa:8c46:a76c:1c91]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 2780C42890; Sun, 3 Dec 2017 19:36:00 +0100 (CET) From: "Kristof Provost" To: "Alan Somers" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r326497 - in head: etc/mtree tests/sys tests/sys/netipsec tests/sys/netipsec/tunnel Date: Sun, 03 Dec 2017 19:35:59 +0100 X-Mailer: MailMate (2.0BETAr6099) Message-ID: In-Reply-To: References: <201712031352.vB3DqZF3084841@repo.freebsd.org> MIME-Version: 1.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 18:36:02 -0000 On 3 Dec 2017, at 19:20, Alan Somers wrote: > On Sun, Dec 3, 2017 at 6:52 AM, Kristof Provost wrote: > >> Author: kp >> Date: Sun Dec 3 13:52:35 2017 >> New Revision: 326497 >> URL: https://svnweb.freebsd.org/changeset/base/326497 >> >> Log: >> Add IPSec tests in tunnel mode >> >> Some IPSec in tunnel mode allowing to test multiple IPSec >> configurations. These tests are reusing the jail/vnet scripts from pf >> tests for generating complex network. >> >> Submitted by: olivier@ >> Differential Revision: https://reviews.freebsd.org/D13017 >> > It's not ok to use kldunload during the test heads. Everything in the > head methods gets executed when you do "kyua list". Anything output gets > interpreted by Kyua. In this case, if kldunload outputs anything at all, > Kyua will consider it to be a syntax error, and it will skip the entire > file. You should limit yourself to using just atf_set in the header. Move > the kld commands into the test case bodies. > Thanks. Done in r326500. Regards, Kristof From owner-svn-src-head@freebsd.org Sun Dec 3 19:26:15 2017 Return-Path: Delivered-To: svn-src-head@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 ABE0FE5FC90; Sun, 3 Dec 2017 19:26:15 +0000 (UTC) (envelope-from ed@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 772726353C; Sun, 3 Dec 2017 19:26:15 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB3JQEOH025296; Sun, 3 Dec 2017 19:26:14 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB3JQEai025295; Sun, 3 Dec 2017 19:26:14 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201712031926.vB3JQEai025295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sun, 3 Dec 2017 19:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326501 - head/sys/arm64/conf X-SVN-Group: head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: head/sys/arm64/conf X-SVN-Commit-Revision: 326501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 19:26:15 -0000 Author: ed Date: Sun Dec 3 19:26:14 2017 New Revision: 326501 URL: https://svnweb.freebsd.org/changeset/base/326501 Log: Make COMPAT_FREEBSD32 part of GENERIC on arm64. The cloudabi32.ko kernel modules can only be loaded on AMD64 and ARM64 by kernels built with COMPAT_FREEBSD32. Even though COMPAT_FREEBSD32 does not support the execution of native FreeBSD executables, do add it to GENERIC, to make cloudabi32.ko usable. According to size(1), this makes the kernel image approximately 0.7% larger. Reviewed by: andrew, imp, emaste Differential Revision: https://reviews.freebsd.org/D13311 Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Sun Dec 3 18:35:07 2017 (r326500) +++ head/sys/arm64/conf/GENERIC Sun Dec 3 19:26:14 2017 (r326501) @@ -52,6 +52,7 @@ options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization +options COMPAT_FREEBSD32 # Incomplete, but used by cloudabi32.ko. options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support From owner-svn-src-head@freebsd.org Sun Dec 3 20:36:40 2017 Return-Path: Delivered-To: svn-src-head@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 E8EB8E677EE; Sun, 3 Dec 2017 20:36:40 +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 72611672F0; Sun, 3 Dec 2017 20:36:37 +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 vB3KaaND058591; Sun, 3 Dec 2017 20:36:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB3KaaVS058555; Sun, 3 Dec 2017 20:36:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712032036.vB3KaaVS058555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 3 Dec 2017 20:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326502 - in head: . share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: . share/man/man7 X-SVN-Commit-Revision: 326502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 20:36:41 -0000 Author: markj Date: Sun Dec 3 20:36:36 2017 New Revision: 326502 URL: https://svnweb.freebsd.org/changeset/base/326502 Log: Document the sys/boot -> stand move in hier.7 and the top-level README. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D13353 Modified: head/README head/README.md head/share/man/man7/hier.7 Modified: head/README ============================================================================== --- head/README Sun Dec 3 19:26:14 2017 (r326501) +++ head/README Sun Dec 3 20:36:36 2017 (r326502) @@ -66,6 +66,8 @@ secure Cryptographic libraries and commands. share Shared resources. +stand Boot loader sources. + sys Kernel sources. tests Regression tests which can be run by Kyua. See tests/README Modified: head/README.md ============================================================================== --- head/README.md Sun Dec 3 19:26:14 2017 (r326501) +++ head/README.md Sun Dec 3 20:36:36 2017 (r326502) @@ -68,6 +68,8 @@ secure Cryptographic libraries and commands. share Shared resources. +stand Boot loader sources. + sys Kernel sources. tests Regression tests which can be run by Kyua. See tests/README Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Sun Dec 3 19:26:14 2017 (r326501) +++ head/share/man/man7/hier.7 Sun Dec 3 20:36:36 2017 (r326502) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 16, 2017 +.Dd December 3, 2017 .Dt HIER 7 .Os .Sh NAME @@ -644,6 +644,8 @@ build directory for files in .It Pa share/ source for files in .Pa /usr/share +.It Pa stand/ +boot loader source code .It Pa sys/ kernel source code .Bl -tag -width "opencrypto/" -compact From owner-svn-src-head@freebsd.org Sun Dec 3 21:17:08 2017 Return-Path: Delivered-To: svn-src-head@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 B80EBE68A0E for ; Sun, 3 Dec 2017 21:17:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (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 7A7056A22E for ; Sun, 3 Dec 2017 21:17:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id x28so8249625ita.0 for ; Sun, 03 Dec 2017 13:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ILOt0twH0E8paA3wLkpnYiwu9Mnf+0G8MeK1ZdeVJsw=; b=dh0X0Eh+PS9XLp+d1BTZTmrCrYB+t1u1IoOsCQK6H+cjaQF41jDHvywdNjx2GZk2jt XedM0fKhL5dxEA4uo4NkkHziTSQZVCO9aEt5mWhivYg4Mcn02lu0OuxUWIjZGF+J0GdB gtDTC7rqEUtSjHhJf5gTWZVLCPA4aYmjb8w7Vs9J3HyKguthTOdHlGCcys1J9MstIMx6 u6TVROWX0tlxp33bgPnLjzkjH7oFMOicfiss5R03obEheqPS5Ph9NkOugu2pTFKKH4qD FAKuH/wMx5UZR/yY+yjywumL3H4+ctnnqqTYZmmus+wVITVTSFqwn7f6dccmbp4BEqle sRJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ILOt0twH0E8paA3wLkpnYiwu9Mnf+0G8MeK1ZdeVJsw=; b=DgmVf9Ajo8TJ4YOUE9ddLEnZS8bs6fAoeM1STcTWDI5YaTu36EuJ6hSY+JV7BfJwbv qzdojFe+tfNp/v5ryaZvdvF+CliGO/9ECroIXxrfwvqABpunX4yzlFTyKe+9VNx89lbj NMeyfHIAirJoxOHvnqqRYWtHD/q5ksdvTRt145LKrBK3hRmhGE729ZRp38STjuuzRhD3 s22SaZTMKGjRnb4tajG6J4T9mkkVwMC1Wt5NbWVNcxgQsKOZpAwycEQ7yamdiwu0Yvnu wEBGtasm3PN5NoBUNf9heoyAjuVuGbGrhSKsaB/IfBzWCEztuw+3YnwZXOXu3H5Oy/jg WevA== X-Gm-Message-State: AKGB3mJ7ATm061gs5e72OmGtu8zOInaFiD0pdf1bXjkw2v1TEHLJKS4n 2ueArSN7epsaJXm07xmDHpVcMgYKb0pxlTx4jHy5UA== X-Google-Smtp-Source: AGs4zMbr878PITxdLjbIhMuWmr8Yd8IO7NPST4bDYrLwOIrblGdnkfVk7jpuexKXUZMWW1XNyW/F+dcIukbWwbZypkE= X-Received: by 10.107.52.140 with SMTP id b134mr9145678ioa.291.1512335827641; Sun, 03 Dec 2017 13:17:07 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Sun, 3 Dec 2017 13:17:07 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <20171203185027.T872@besplex.bde.org> References: <201712030454.vB34ssem056112@repo.freebsd.org> <20171203185027.T872@besplex.bde.org> From: Warner Losh Date: Sun, 3 Dec 2017 14:17:07 -0700 X-Google-Sender-Auth: qQWtuWX4LBwtwQ9V_JtGc0KpNMI Message-ID: Subject: Re: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp To: Bruce Evans Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 21:17:08 -0000 On Sun, Dec 3, 2017 at 2:35 AM, Bruce Evans wrote: > On Sun, 3 Dec 2017, Warner Losh wrote: > > Log: >> Include machine/md_var to pick up __syncicache prototype. >> > > This is nonsense. machine/md_var.h is kernel-only, but on powerpc > it declares __syncicache() which also exists in userland. This include > is like including the kernel-only header sys/systm.h to declare printf() > in userland. > Yea.... This is the sort of thing that should be defined in cpufunc.h or similar. I didn't feel like moving it, so I made one more bad place in the tree instead... So I agree with this feedback. > It is also an error to include machine/md_var.h in MI files in the > kernel. Approx. 72 of the 305 includes of it in -current have this > bug. The worst one is probably the one in altq_subr.c. altq_subr.c > abuses the MD variable cpu_feature to test for CPUID_TSC. That is just > the start of it layering violations and other bugs. There's a number of swamps in the tree, alas. This is one of them... I'm draining the boot loader and associated programs swamp, which is a big enough job as it is... Modified: head/stand/ofw/libofw/elf_freebsd.c >> ============================================================ >> ================== >> --- head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:49 2017 >> (r326485) >> +++ head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:54 2017 >> (r326486) >> @@ -32,6 +32,9 @@ __FBSDID("$FreeBSD$"); >> >> #include >> #include >> +#if defined(__powerpc__) >> +#include >> +#endif >> > > Style bug (verbose spelling of 'ifdef'). Agreed. It matches the style used elsewhere, but that's a poor excuse. Warner From owner-svn-src-head@freebsd.org Sun Dec 3 22:02:31 2017 Return-Path: Delivered-To: svn-src-head@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 C9B93E69BF6; Sun, 3 Dec 2017 22:02:31 +0000 (UTC) (envelope-from gnn@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 94A136B873; Sun, 3 Dec 2017 22:02:31 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB3M2UJZ099480; Sun, 3 Dec 2017 22:02:30 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB3M2UTs099478; Sun, 3 Dec 2017 22:02:30 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201712032202.vB3M2UTs099478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Sun, 3 Dec 2017 22:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326503 - in head/sys/dev: rtwn/usb usb X-SVN-Group: head X-SVN-Commit-Author: gnn X-SVN-Commit-Paths: in head/sys/dev: rtwn/usb usb X-SVN-Commit-Revision: 326503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 22:02:31 -0000 Author: gnn Date: Sun Dec 3 22:02:30 2017 New Revision: 326503 URL: https://svnweb.freebsd.org/changeset/base/326503 Log: Add support for RealTek 8812 over USB Tested with ALFA AWUS036ACH MFC after: 1 week Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h head/sys/dev/usb/usbdevs Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sun Dec 3 20:36:36 2017 (r326502) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sun Dec 3 22:02:30 2017 (r326503) @@ -134,6 +134,7 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = { RTWN_RTL8812AU_DEV(MELCO, WIU3866D), RTWN_RTL8812AU_DEV(NEC, WL900U), RTWN_RTL8812AU_DEV(PLANEX2, GW900D), + RTWN_RTL8812AU_DEV(REALTEK, RTL8812AU), RTWN_RTL8812AU_DEV(SENAO, EUB1200AC), RTWN_RTL8812AU_DEV(SITECOMEU, WLA7100), RTWN_RTL8812AU_DEV(TPLINK, T4U), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Dec 3 20:36:36 2017 (r326502) +++ head/sys/dev/usb/usbdevs Sun Dec 3 22:02:30 2017 (r326503) @@ -3886,6 +3886,7 @@ product REALTEK RTL8713 0x8713 RTL8713 product REALTEK RTL8188CU_COMBO 0x8754 RTL8188CU product REALTEK RTL8723BU 0xb720 RTL8723BU product REALTEK RTL8192SU 0xc512 RTL8192SU +product REALTEK RTL8812AU 0x8812 RTL8812AU Wireless Adapter /* RedOctane products */ product REDOCTANE DUMMY 0x0000 Dummy product From owner-svn-src-head@freebsd.org Mon Dec 4 01:00:24 2017 Return-Path: Delivered-To: svn-src-head@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 69E89E6EDDF; Mon, 4 Dec 2017 01:00:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 2A23371727; Mon, 4 Dec 2017 01:00:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id E3EEBD43139; Mon, 4 Dec 2017 11:33:08 +1100 (AEDT) Date: Mon, 4 Dec 2017 11:33:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: Bruce Evans , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp In-Reply-To: Message-ID: <20171204104127.B961@besplex.bde.org> References: <201712030454.vB34ssem056112@repo.freebsd.org> <20171203185027.T872@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=Wyca--nbhitMolgKySsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 01:00:24 -0000 On Sun, 3 Dec 2017, Warner Losh wrote: > On Sun, Dec 3, 2017 at 2:35 AM, Bruce Evans wrote: > >> On Sun, 3 Dec 2017, Warner Losh wrote: >> >> Log: >>> Include machine/md_var to pick up __syncicache prototype. >> >> This is nonsense. machine/md_var.h is kernel-only, but on powerpc >> it declares __syncicache() which also exists in userland. This include >> is like including the kernel-only header sys/systm.h to declare printf() >> in userland. > > Yea.... This is the sort of thing that should be defined in cpufunc.h or > similar. I didn't feel like moving it, so I made one more bad place in the > tree instead... So I agree with this feedback. Not cpufunc.h. I created it too (rgrimes committed it in 386BSD days). It is for turning CPU instructions into C functions (usually using inline asm function wrappers of single instructions, where the function name should be the same as the instrcution name to make it easier to rememember and inhibit use in MI code) so that even MD code doesn't need to use any inline asm. It was intened to be kernel-only, but even I abused it in userland for the inb() family of functions and later for rdtsc(). The inb() family later became a larger problem. inb() is a special case of bus_space_read_1() and shouldn't be used even to implement bus-space since that gives namespace pollution. Instead of fixing this, the readb() family of functions was added to cpufunc.h. readb() is essentially bus_space_read_1() misimplemented for dev/fb. It is now misused in a couple of other places. cpufunc.h is much more broken on non-x86 arches. On arm, it has lots of extern variables and only 2 inline asms. 1 of these is called by many C inline non-asms that don't belong in cpufunc.h because they can be built out of the main inline asm here and C definitions. Putting everything here gives namespace pollution. Other arches have more inline asms and not many extern variables, but have the pollution. Some have macros instead of inline functions. This requires less pollution but is more fragile. x86 has bogus non-asm wrappers only for a few functions like intr_disable(). There is a problem making the inline functions visible if they are in a different file. The correct way of including machine/cpu.h is to not explicitly include it, but depend on getting it as standard pollution in sys/systm.h. If the C parts were moved to different files, then sys/systm.h would still have to include all of the pollution for compatibility. Bruce From owner-svn-src-head@freebsd.org Mon Dec 4 01:14:13 2017 Return-Path: Delivered-To: svn-src-head@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 8E1C5E6F75C; Mon, 4 Dec 2017 01:14:13 +0000 (UTC) (envelope-from imp@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 5424772075; Mon, 4 Dec 2017 01:14:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB41ECOF078350; Mon, 4 Dec 2017 01:14:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB41ECVk078348; Mon, 4 Dec 2017 01:14:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712040114.vB41ECVk078348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 4 Dec 2017 01:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326504 - head/stand X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand X-SVN-Commit-Revision: 326504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 01:14:13 -0000 Author: imp Date: Mon Dec 4 01:14:12 2017 New Revision: 326504 URL: https://svnweb.freebsd.org/changeset/base/326504 Log: Switch to proper MK_LOADER_GELI tests. Submitted by: peter@ Modified: head/stand/Makefile.amd64 head/stand/Makefile.i386 Modified: head/stand/Makefile.amd64 ============================================================================== --- head/stand/Makefile.amd64 Sun Dec 3 22:02:30 2017 (r326503) +++ head/stand/Makefile.amd64 Mon Dec 4 01:14:12 2017 (r326504) @@ -11,7 +11,7 @@ SUBDIR+= ficl32 SUBDIR+= efi SUBDIR+= userboot -.if ${LOADER_GELI_SUPPORT:Uyes} == "yes" +.if ${MK_LOADER_GELI} == "yes" SUBDIR+= geli .endif Modified: head/stand/Makefile.i386 ============================================================================== --- head/stand/Makefile.i386 Sun Dec 3 22:02:30 2017 (r326503) +++ head/stand/Makefile.i386 Mon Dec 4 01:14:12 2017 (r326504) @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${LOADER_GELI_SUPPORT:Uyes} == "yes" +.if ${MK_LOADER_GELI} == "yes" SUBDIR+= geli .endif .if ${MK_ZFS} != "no" From owner-svn-src-head@freebsd.org Mon Dec 4 01:14:18 2017 Return-Path: Delivered-To: svn-src-head@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 85937E6F787; Mon, 4 Dec 2017 01:14:18 +0000 (UTC) (envelope-from imp@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 470C7720F9; Mon, 4 Dec 2017 01:14:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB41EHcY078403; Mon, 4 Dec 2017 01:14:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB41EHAD078402; Mon, 4 Dec 2017 01:14:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712040114.vB41EHAD078402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 4 Dec 2017 01:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326505 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 326505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 01:14:18 -0000 Author: imp Date: Mon Dec 4 01:14:17 2017 New Revision: 326505 URL: https://svnweb.freebsd.org/changeset/base/326505 Log: Remove the entire objdir tree to avoid picking up stale binaries from prior builds. Move GELI to building first. Sponsored by: Netflix Modified: head/tools/boot/universe.sh Modified: head/tools/boot/universe.sh ============================================================================== --- head/tools/boot/universe.sh Mon Dec 4 01:14:12 2017 (r326504) +++ head/tools/boot/universe.sh Mon Dec 4 01:14:17 2017 (r326505) @@ -26,6 +26,8 @@ dobuild() local opt=$3 echo -n "Building $ta ${opt} ... " + objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR") + rm -rf ${objdir} if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \ > $lf 2>&1; then echo "Fail (cleanup)" @@ -42,6 +44,16 @@ dobuild() top=$(make -V SRCTOP) cd $top/stand + +# Build without GELI +for i in \ + amd64/amd64 \ + i386/i386 \ + ; do + ta=${i##*/} + dobuild $ta _.boot.${ta}.no_geli.log "WITHOUT_LOADER_GEIL=yes" +done + # Default build for a goodly selection of architectures for i in \ amd64/amd64 \ @@ -73,13 +85,4 @@ for i in \ ; do ta=${i##*/} dobuild $ta _.boot.${ta}.firewire.log "MK_LOADER_FIREWIRE=yes" -done - -# Build without GELI -for i in \ - amd64/amd64 \ - i386/i386 \ - ; do - ta=${i##*/} - dobuild $ta _.boot.${ta}.no_geli.log "MK_LOADER_GELI=no" done From owner-svn-src-head@freebsd.org Mon Dec 4 01:16:27 2017 Return-Path: Delivered-To: svn-src-head@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 B6042E6F965; Mon, 4 Dec 2017 01:16:27 +0000 (UTC) (envelope-from allanjude@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 904CA72471; Mon, 4 Dec 2017 01:16:27 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB41GQ7N078527; Mon, 4 Dec 2017 01:16:26 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB41GQ41078524; Mon, 4 Dec 2017 01:16:26 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201712040116.vB41GQ41078524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 4 Dec 2017 01:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326506 - in head/sys/contrib/zstd/lib: common compress X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: in head/sys/contrib/zstd/lib: common compress X-SVN-Commit-Revision: 326506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 01:16:27 -0000 Author: allanjude Date: Mon Dec 4 01:16:26 2017 New Revision: 326506 URL: https://svnweb.freebsd.org/changeset/base/326506 Log: Use __has_builtin() to ensure clz and clzll builtins are available The existing check of the GCC version number is not sufficient This fixes the build on sparc64 in preparation for integrating ZSTD into the kernel for ZFS and Crash Dumps. Modified: head/sys/contrib/zstd/lib/common/bitstream.h head/sys/contrib/zstd/lib/common/zstd_internal.h head/sys/contrib/zstd/lib/compress/zstd_compress.h Modified: head/sys/contrib/zstd/lib/common/bitstream.h ============================================================================== --- head/sys/contrib/zstd/lib/common/bitstream.h Mon Dec 4 01:14:17 2017 (r326505) +++ head/sys/contrib/zstd/lib/common/bitstream.h Mon Dec 4 01:16:26 2017 (r326506) @@ -175,7 +175,7 @@ MEM_STATIC unsigned BIT_highbit32 (register U32 val) unsigned long r=0; _BitScanReverse ( &r, val ); return (unsigned) r; -# elif defined(__GNUC__) && (__GNUC__ >= 3) /* Use GCC Intrinsic */ +# elif defined(__GNUC__) && (__GNUC__ >= 3) && __has_builtin(__builtin_clz) /* Use GCC Intrinsic */ return 31 - __builtin_clz (val); # else /* Software version */ static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, Modified: head/sys/contrib/zstd/lib/common/zstd_internal.h ============================================================================== --- head/sys/contrib/zstd/lib/common/zstd_internal.h Mon Dec 4 01:14:17 2017 (r326505) +++ head/sys/contrib/zstd/lib/common/zstd_internal.h Mon Dec 4 01:16:26 2017 (r326506) @@ -327,7 +327,7 @@ MEM_STATIC U32 ZSTD_highbit32(U32 val) unsigned long r=0; _BitScanReverse(&r, val); return (unsigned)r; -# elif defined(__GNUC__) && (__GNUC__ >= 3) /* GCC Intrinsic */ +# elif defined(__GNUC__) && (__GNUC__ >= 3) && __has_builtin(__builtin_clz) /* GCC Intrinsic */ return 31 - __builtin_clz(val); # else /* Software version */ static const int DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 }; Modified: head/sys/contrib/zstd/lib/compress/zstd_compress.h ============================================================================== --- head/sys/contrib/zstd/lib/compress/zstd_compress.h Mon Dec 4 01:14:17 2017 (r326505) +++ head/sys/contrib/zstd/lib/compress/zstd_compress.h Mon Dec 4 01:16:26 2017 (r326506) @@ -203,7 +203,7 @@ static unsigned ZSTD_NbCommonBytes (register size_t va unsigned long r = 0; _BitScanReverse64( &r, val ); return (unsigned)(r>>3); -# elif defined(__GNUC__) && (__GNUC__ >= 4) +# elif defined(__GNUC__) && (__GNUC__ >= 4) && __has_builtin(__builtin_clzll) return (__builtin_clzll(val) >> 3); # else unsigned r; @@ -218,7 +218,7 @@ static unsigned ZSTD_NbCommonBytes (register size_t va unsigned long r = 0; _BitScanReverse( &r, (unsigned long)val ); return (unsigned)(r>>3); -# elif defined(__GNUC__) && (__GNUC__ >= 3) +# elif defined(__GNUC__) && (__GNUC__ >= 3) && __has_builtin(__builtin_clz) return (__builtin_clz((U32)val) >> 3); # else unsigned r; From owner-svn-src-head@freebsd.org Mon Dec 4 02:42:02 2017 Return-Path: Delivered-To: svn-src-head@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 0A348DBABD2; Mon, 4 Dec 2017 02:42:02 +0000 (UTC) (envelope-from allanjude@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 CBAEE74A96; Mon, 4 Dec 2017 02:42:01 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB42g0PV014419; Mon, 4 Dec 2017 02:42:00 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB42g0Uq014418; Mon, 4 Dec 2017 02:42:00 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201712040242.vB42g0Uq014418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 4 Dec 2017 02:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326507 - head/stand/i386/zfsboot X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/stand/i386/zfsboot X-SVN-Commit-Revision: 326507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 02:42:02 -0000 Author: allanjude Date: Mon Dec 4 02:42:00 2017 New Revision: 326507 URL: https://svnweb.freebsd.org/changeset/base/326507 Log: increase maximum size of zfsboot Previous to the switch from sys/boot to stand/ zfsboot (used for MBR) did not support GELI. Now that it is compiled with GELI, it is running out of space. zfsldr (which loads zfsboot) was modified to load 256kb in r304321 Modified: head/stand/i386/zfsboot/Makefile Modified: head/stand/i386/zfsboot/Makefile ============================================================================== --- head/stand/i386/zfsboot/Makefile Mon Dec 4 01:16:26 2017 (r326506) +++ head/stand/i386/zfsboot/Makefile Mon Dec 4 02:42:00 2017 (r326507) @@ -62,10 +62,10 @@ zfsldr.out: zfsldr.o CLEANFILES+= zfsboot2 zfsboot.ld zfsboot.ldr zfsboot.bin zfsboot.out \ zfsboot.o zfsboot.s zfsboot.s.tmp sio.o cons.o drv.o -# We currently allow 128k bytes for zfsboot - in practice it could be +# We currently allow 256k bytes for zfsboot - in practice it could be # any size up to 3.5Mb but keeping it fixed size simplifies zfsldr. # -BOOT2SIZE= 131072 +BOOT2SIZE= 262144 zfsboot2: zfsboot.ld @set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \ From owner-svn-src-head@freebsd.org Mon Dec 4 03:43:29 2017 Return-Path: Delivered-To: svn-src-head@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 09FD7DEBDF2; Mon, 4 Dec 2017 03:43:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 85F08766D8; Mon, 4 Dec 2017 03:43:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 9E924D61AA7; Mon, 4 Dec 2017 14:43:19 +1100 (AEDT) Date: Mon, 4 Dec 2017 14:43:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Allan Jude cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326506 - in head/sys/contrib/zstd/lib: common compress In-Reply-To: <201712040116.vB41GQ41078524@repo.freebsd.org> Message-ID: <20171204134316.O1755@besplex.bde.org> References: <201712040116.vB41GQ41078524@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=4F3b_KXgID9f6kN2jZ4A:9 a=j6TpNBZckAQal6ih:21 a=Y0zHFzzHz-yrQfB7:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 03:43:29 -0000 On Mon, 4 Dec 2017, Allan Jude wrote: > Log: > Use __has_builtin() to ensure clz and clzll builtins are available > > The existing check of the GCC version number is not sufficient It also checked a wrong version number, and still doesn't. > This fixes the build on sparc64 in preparation for integrating ZSTD into > the kernel for ZFS and Crash Dumps. This doesn't really work. __has_builtin() is a dummy (always 0) in at least gcc-4.2.1 and earlier versions of gcc, and is broken as designed in compilers that implement it. It just tells you if the compiler supports the builtin, but you don't want to know about the builtin unless the builtin will generate better code for the target arch than your alternative. Using __has_builtin() is especially wrong in the kernel and other pure freestanding cases. Then the builtin generates a libcall to nonexistent function unless the target arch supports a better inline alternative. Nonexistent functions are never better alternatives than yours. > Modified: head/sys/contrib/zstd/lib/common/bitstream.h > ============================================================================== > --- head/sys/contrib/zstd/lib/common/bitstream.h Mon Dec 4 01:14:17 2017 (r326505) > +++ head/sys/contrib/zstd/lib/common/bitstream.h Mon Dec 4 01:16:26 2017 (r326506) > @@ -175,7 +175,7 @@ MEM_STATIC unsigned BIT_highbit32 (register U32 val) > unsigned long r=0; > _BitScanReverse ( &r, val ); > return (unsigned) r; > -# elif defined(__GNUC__) && (__GNUC__ >= 3) /* Use GCC Intrinsic */ This version check is very broken. gcc-3.3.3 doesn't have __builtin_clz(), but passes the check. > +# elif defined(__GNUC__) && (__GNUC__ >= 3) && __has_builtin(__builtin_clz) /* Use GCC Intrinsic */ gcc-4.2.1 doesn't have __builtin_clz() on x86, but not __has_builtin(). sys/cdefs.h defines __has_builtin() as 0 unless __has_builtin is defined. The first part of the test is now usually just an obfuscation. It still uses a wrong version number and a redumdant test that __GNUC__ is defined, but when (__GNUC__ < 3), __has_builtin() is usually 0 and gives the same result of 0. It is only in the unusual (unsupported) case where the compiler doesn't pretend to be gcc but defines __has_builtin() that the first part of the check has an effect, and then its effect is to break the second part. sys/cdefs.h gives an example of a similar but presumably-correct version check. For using __builtin_unreachable(), it doesn't trust __has_builtin(), but checks that the version is >= 4.6. 4.6 is fine-grained enough to have a chance of being correct. > return 31 - __builtin_clz (val); I think this is only for userland, so it is not broken when the builtin reduce a libcall. The libcall is presumably to __clzdi2(). The kernel doesn't have this, but libgcc.a does. > # else /* Software version */ > static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, This is unreachable when the libcall is used. If optimizing this is actually important, then so not is pessimizing it on arches with the builtin implemented in hardware but __has_builtin() not implemented. Bruce From owner-svn-src-head@freebsd.org Mon Dec 4 08:08:57 2017 Return-Path: Delivered-To: svn-src-head@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 F2945DF3F2C; Mon, 4 Dec 2017 08:08:56 +0000 (UTC) (envelope-from mizhka@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 CC8BE7CEF1; Mon, 4 Dec 2017 08:08:56 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB488tfQ048465; Mon, 4 Dec 2017 08:08:55 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB488tjf048463; Mon, 4 Dec 2017 08:08:55 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201712040808.vB488tjf048463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Mon, 4 Dec 2017 08:08:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326508 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: mizhka X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 326508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 08:08:57 -0000 Author: mizhka Date: Mon Dec 4 08:08:55 2017 New Revision: 326508 URL: https://svnweb.freebsd.org/changeset/base/326508 Log: [mips] [vm] restore translation of freelist to flind for page allocation Commit r326346 moved domain iterators from physical layer to vm_page one, but it also removed translation of freelist to flind for vm_page_alloc_freelist() call. Before it expects VM_FREELIST_ parameter, but after it expect freelist index. On small WiFi boxes with few megabytes of RAM, there is only one freelist VM_FREELIST_LOWMEM (1) and there is no VM_FREELIST_DEFAULT(0) (see file sys/mips/include/vmparam.h). It results in freelist 1 with flind 0. At first, this commit renames flind to freelist in vm_page_alloc_freelist to avoid misunderstanding about input parameters. Then on physical layer it restores translation for correct handling of freelist parameter. Reported by: landonf Reviewed by: jeff Differential Revision: https://reviews.freebsd.org/D13351 Modified: head/sys/vm/vm_page.c head/sys/vm/vm_phys.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Dec 4 02:42:00 2017 (r326507) +++ head/sys/vm/vm_page.c Mon Dec 4 08:08:55 2017 (r326508) @@ -2043,7 +2043,7 @@ vm_page_alloc_check(vm_page_t m) * VM_ALLOC_ZERO prefer a zeroed page */ vm_page_t -vm_page_alloc_freelist(int flind, int req) +vm_page_alloc_freelist(int freelist, int req) { struct vm_domain_iterator vi; vm_page_t m; @@ -2056,7 +2056,7 @@ vm_page_alloc_freelist(int flind, int req) while (vm_domain_iterator_run(&vi, &domain) == 0) { if (vm_domain_iterator_isdone(&vi)) req |= wait; - m = vm_page_alloc_freelist_domain(domain, flind, req); + m = vm_page_alloc_freelist_domain(domain, freelist, req); if (m != NULL) break; } @@ -2066,7 +2066,7 @@ vm_page_alloc_freelist(int flind, int req) } vm_page_t -vm_page_alloc_freelist_domain(int domain, int flind, int req) +vm_page_alloc_freelist_domain(int domain, int freelist, int req) { vm_page_t m; u_int flags, free_count; @@ -2090,7 +2090,7 @@ again: vm_cnt.v_free_count > vm_cnt.v_interrupt_free_min) || (req_class == VM_ALLOC_INTERRUPT && vm_cnt.v_free_count > 0)) - m = vm_phys_alloc_freelist_pages(domain, flind, + m = vm_phys_alloc_freelist_pages(domain, freelist, VM_FREEPOOL_DIRECT, 0); if (m == NULL) { if (vm_page_alloc_fail(NULL, req)) Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Mon Dec 4 02:42:00 2017 (r326507) +++ head/sys/vm/vm_phys.c Mon Dec 4 08:08:55 2017 (r326508) @@ -603,10 +603,10 @@ vm_page_t vm_phys_alloc_pages(int domain, int pool, int order) { vm_page_t m; - int flind; + int freelist; - for (flind = 0; flind < vm_nfreelists; flind++) { - m = vm_phys_alloc_freelist_pages(domain, flind, pool, order); + for (freelist = 0; freelist < VM_NFREELIST; freelist++) { + m = vm_phys_alloc_freelist_pages(domain, freelist, pool, order); if (m != NULL) return (m); } @@ -621,22 +621,27 @@ vm_phys_alloc_pages(int domain, int pool, int order) * The free page queues must be locked. */ vm_page_t -vm_phys_alloc_freelist_pages(int domain, int flind, int pool, int order) +vm_phys_alloc_freelist_pages(int domain, int freelist, int pool, int order) { struct vm_freelist *alt, *fl; vm_page_t m; - int oind, pind; + int oind, pind, flind; KASSERT(domain >= 0 && domain < vm_ndomains, ("vm_phys_alloc_freelist_pages: domain %d is out of range", domain)); - KASSERT(flind < VM_NFREELIST, + KASSERT(freelist < VM_NFREELIST, ("vm_phys_alloc_freelist_pages: freelist %d is out of range", flind)); KASSERT(pool < VM_NFREEPOOL, ("vm_phys_alloc_freelist_pages: pool %d is out of range", pool)); KASSERT(order < VM_NFREEORDER, ("vm_phys_alloc_freelist_pages: order %d is out of range", order)); + + flind = vm_freelist_to_flind[freelist]; + /* Check if freelist is present */ + if (flind < 0) + return (NULL); mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); fl = &vm_phys_free_queues[domain][flind][pool][0]; From owner-svn-src-head@freebsd.org Mon Dec 4 08:50:02 2017 Return-Path: Delivered-To: svn-src-head@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 5051ADF4994; Mon, 4 Dec 2017 08:50:02 +0000 (UTC) (envelope-from tsoome@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 151BB7DDE1; Mon, 4 Dec 2017 08:50:02 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB48o15q064873; Mon, 4 Dec 2017 08:50:01 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB48o12C064872; Mon, 4 Dec 2017 08:50:01 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201712040850.vB48o12C064872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 4 Dec 2017 08:50:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326509 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 326509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 08:50:02 -0000 Author: tsoome Date: Mon Dec 4 08:50:00 2017 New Revision: 326509 URL: https://svnweb.freebsd.org/changeset/base/326509 Log: loader.efi: add note about iPXE into the efipart.c Commant update. Modified: head/stand/efi/libefi/efipart.c Modified: head/stand/efi/libefi/efipart.c ============================================================================== --- head/stand/efi/libefi/efipart.c Mon Dec 4 08:08:55 2017 (r326508) +++ head/stand/efi/libefi/efipart.c Mon Dec 4 08:50:00 2017 (r326509) @@ -260,6 +260,8 @@ efipart_hdd(EFI_DEVICE_PATH *dp) /* * We assume the block size 512 or greater power of 2. + * iPXE is known to insert stub BLOCK IO device with + * BlockSize 1. */ if (blkio->Media->BlockSize < 512 || !powerof2(blkio->Media->BlockSize)) { From owner-svn-src-head@freebsd.org Mon Dec 4 09:17:30 2017 Return-Path: Delivered-To: svn-src-head@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 520D3DF53CE; Mon, 4 Dec 2017 09:17: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 1158D7EC43; Mon, 4 Dec 2017 09:17: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 vB49HT5m077581; Mon, 4 Dec 2017 09:17:29 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49HS87077580; Mon, 4 Dec 2017 09:17:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201712040917.vB49HS87077580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 4 Dec 2017 09:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326510 - head/contrib/bsnmp/snmpd X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/contrib/bsnmp/snmpd X-SVN-Commit-Revision: 326510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:17:30 -0000 Author: ae Date: Mon Dec 4 09:17:28 2017 New Revision: 326510 URL: https://svnweb.freebsd.org/changeset/base/326510 Log: Fix format string warning with enabled DEBUGGING. MFC after: 1 week Modified: head/contrib/bsnmp/snmpd/config.c Modified: head/contrib/bsnmp/snmpd/config.c ============================================================================== --- head/contrib/bsnmp/snmpd/config.c Mon Dec 4 08:50:00 2017 (r326509) +++ head/contrib/bsnmp/snmpd/config.c Mon Dec 4 09:17:28 2017 (r326510) @@ -663,7 +663,7 @@ gettoken() printf("(EOL)"); break; case TOK_NUM: - printf("(NUM %llu)", numval); + printf("(NUM %ju)", (uintmax_t)numval); break; case TOK_STR: printf("(STR %.*s)", (int)strvallen, strval); From owner-svn-src-head@freebsd.org Mon Dec 4 09:48:56 2017 Return-Path: Delivered-To: svn-src-head@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 88843DF617C; Mon, 4 Dec 2017 09:48:56 +0000 (UTC) (envelope-from bapt@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 5323F80463; Mon, 4 Dec 2017 09:48:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49mtRA090575; Mon, 4 Dec 2017 09:48:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49mtp6090574; Mon, 4 Dec 2017 09:48:55 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712040948.vB49mtp6090574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 4 Dec 2017 09:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326518 - head/contrib/mdocml X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/contrib/mdocml X-SVN-Commit-Revision: 326518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:48:56 -0000 Author: bapt Date: Mon Dec 4 09:48:55 2017 New Revision: 326518 URL: https://svnweb.freebsd.org/changeset/base/326518 Log: Add Posix 2013 référence for manpages PR: 223930 Reported by: Mateusz Piotrowski MFC after: 2 days Modified: head/contrib/mdocml/st.in Modified: head/contrib/mdocml/st.in ============================================================================== --- head/contrib/mdocml/st.in Mon Dec 4 09:48:31 2017 (r326517) +++ head/contrib/mdocml/st.in Mon Dec 4 09:48:55 2017 (r326518) @@ -34,6 +34,7 @@ LINE("-p1003.1-96", "ISO/IEC 9945-1:1996 (\\(LqPOSIX.1 LINE("-p1003.1-2001", "IEEE Std 1003.1-2001 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2004", "IEEE Std 1003.1-2004 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2008", "IEEE Std 1003.1-2008 (\\(LqPOSIX.1\\(Rq)") +LINE("-p1003.1-2013", "IEEE Std 1003.1-2013 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1", "IEEE Std 1003.1 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1b", "IEEE Std 1003.1b (\\(LqPOSIX.1b\\(Rq)") LINE("-p1003.1b-93", "IEEE Std 1003.1b-1993 (\\(LqPOSIX.1b\\(Rq)") From owner-svn-src-head@freebsd.org Mon Dec 4 09:54:07 2017 Return-Path: Delivered-To: svn-src-head@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 BADBEDF6554 for ; Mon, 4 Dec 2017 09:54:07 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x22e.google.com (mail-yb0-x22e.google.com [IPv6:2607:f8b0:4002:c09::22e]) (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 7EF3B80B2A for ; Mon, 4 Dec 2017 09:54:07 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x22e.google.com with SMTP id k4so6361634ybc.1 for ; Mon, 04 Dec 2017 01:54:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=awV8iZWneCX5tJfqi+GwFbuSuy8oxur2v3XiA0B3SrM=; b=O2G2lA0kiq4RtVg1YOMGc0IGQ35gfyw7+mn8/javGrboR9Y5exF/QekEqoN8SpUoaj sq7cLppMZPoTA2gCM2CgSX2sOvxxnWTTpEkm/o5e566FUSbuMkp/zDMizE1GXhQuK5r2 2aGHQSIWy5qfqyxoZHPu/ZexqdLKgmtrVWcTYYBzAbsvHLUt0JkkSElATQw6LCficICb qsst3tq8nkrvr1JPRVuFTaxKCjncaQTfXlQc29WRuUejIO0TmcnVGtz8KNc9c25In23L DiZyEKjeRj4d9kFbY22yfxQcVnGPSjSEPwQ8Cr2YMdHYYEQQcmIuZoE77Vbkp1HjvE3V n8Mw== 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:cc:content-transfer-encoding; bh=awV8iZWneCX5tJfqi+GwFbuSuy8oxur2v3XiA0B3SrM=; b=ou3TP5s9NZ1VZDSSIIXkl+mKMs3dT319CFJFIsrBkNjw5VkvBoKIki1WRSXknyUtrT Y0ZtJDlgAZe7vuyTtfnGHhpusGNxtKRLRgvIUTnrJvvgq/9lBerRYHU5er4UQHjJT5GF X13Ccrg4wdXN7KwIyXLlYu/+jBxHsLZOXVeYPKbxwCntlTDhQksDdfVs1ADpAT4zO6VV Pj/6tJlK5mDVlIyNG5JQ1f1EnqcPZnGpU4daY7MHgVqxxCBwgMRTV9Q12fFvXaLkSpjQ y+wI9VxutE2YgBnzbcPUOEGlbHwjxVnaPQDtVdoxcogyEXui7ZUjQLjeGQl3Occz93eq ko1A== X-Gm-Message-State: AKGB3mKdWsxeMojL3aGx4XUYbt5+qWaP3AlloDbAeQYkBzURgnxp2haE iSNlRBL/46mQwCdXM0wzeX3+YFpkD7/e/pY4mQQuhA== X-Google-Smtp-Source: AGs4zMZXNYCGZCg21HVEs/zukO63RL2uVD0ihzLRLE2uHSwWjrS3UmPxNNHaRtJOWURGdBNjFKZbiFr03Vl+h6EV/Qw= X-Received: by 10.37.11.130 with SMTP id 124mr4013143ybl.226.1512381246226; Mon, 04 Dec 2017 01:54:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.85.17 with HTTP; Mon, 4 Dec 2017 01:53:35 -0800 (PST) In-Reply-To: <201712040948.vB49mtp6090574@repo.freebsd.org> References: <201712040948.vB49mtp6090574@repo.freebsd.org> From: Ed Schouten Date: Mon, 4 Dec 2017 10:53:35 +0100 Message-ID: Subject: Re: svn commit: r326518 - head/contrib/mdocml To: Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:54:07 -0000 2017-12-04 10:48 GMT+01:00 Baptiste Daroussin : > Log: > Add Posix 2013 r=C3=A9f=C3=A9rence for manpages I'm not sure that's correct. As far as I know, it's called "IEEE Std 1003.1-2008, 2013 Edition". The top of this page is a bit ambiguous about it: http://pubs.opengroup.org/onlinepubs/9699919799.2013edition/ But look at the top of the 2016 edition instead: http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/ --=20 Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-head@freebsd.org Mon Dec 4 09:57:26 2017 Return-Path: Delivered-To: svn-src-head@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 ED30EDF6656; Mon, 4 Dec 2017 09:57:26 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CACF880DCA; Mon, 4 Dec 2017 09:57:26 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 130A215CB5; Mon, 4 Dec 2017 09:57:26 +0000 (UTC) Date: Mon, 4 Dec 2017 10:57:25 +0100 From: Baptiste Daroussin To: Ed Schouten Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326518 - head/contrib/mdocml Message-ID: <20171204095725.p7izevji24cx44yf@ivaldir.net> References: <201712040948.vB49mtp6090574@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vxtimzytmbzbszcb" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:57:27 -0000 --vxtimzytmbzbszcb Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 04, 2017 at 10:53:35AM +0100, Ed Schouten wrote: > 2017-12-04 10:48 GMT+01:00 Baptiste Daroussin : > > Log: > > Add Posix 2013 r=E9f=E9rence for manpages >=20 > I'm not sure that's correct. As far as I know, it's called "IEEE Std > 1003.1-2008, 2013 Edition". >=20 > The top of this page is a bit ambiguous about it: > http://pubs.opengroup.org/onlinepubs/9699919799.2013edition/ > But look at the top of the 2016 edition instead: > http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/ >=20 hu I just have one thing to say here: why? seriously why? :) Bapt --vxtimzytmbzbszcb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlolG/wACgkQY4mL3PG3 PlpzKQ/9HJ/6dpRLqdTv7mW8bIBuns9RIMgmamiDSJjlMvE+KAEA6rWSViPhDT59 YwDn/ZAzXGdGf4XveWCIPcgcWK4W3Iei/xnfSmNa37mOkdRRu3x6oWsk34cRSrof 398eV9zQemTAHgfZsYqZL3h07Qnh9UTFuizuI8NkLU5r7H9OV4GIJsNmvkBVPZYV hfUAl5FdfUOTAtH4KNJrOIzRvMxirKHqmUZlTas2cfPlwHzgtbfQPd30GAHHAxGP aLBWJXtxI/4c4fhFFRncAuzpQYJJN02QqcMH8hqrpH/4oO0tF/iuTgh4vRxlYHvJ S7p8RKTkTDOxC7I12hb4Y7gzeWNHeI4UmeRDaeql72W0LKWwiexQ+Z6wx2FHHORd elnmAtajG3KB+4xl10BI0EatK9arHO+LkX3MQcjXOmjsqaa5qQVd9dPh+acCyBPT 9MgqnVueQl5GPP+9HROUiiZpQY+2wqdsmxCTmkX5AhdzJ4+rYPP6Ak3tXkR2PLcF 1yePjwNDNkHR0ODCW+rdg9p5f1myod95/dzVGs0GcwuSjV+DtRy7rLLiQEKH38iG bQgxUl4wjFHyKs1+VptHUQULhdqy4PsLPd7TP8R2JVCOkCFy7d7SDMLsSYEblKRi B2MTOx7pRad/G6ZCHGrpKL9DNyTKbZsF72UGPUWOm2y23Qeff8I= =Jd1i -----END PGP SIGNATURE----- --vxtimzytmbzbszcb-- From owner-svn-src-head@freebsd.org Mon Dec 4 09:58:40 2017 Return-Path: Delivered-To: svn-src-head@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 1AC74DF6734; Mon, 4 Dec 2017 09:58:40 +0000 (UTC) (envelope-from bapt@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 DC07880F48; Mon, 4 Dec 2017 09:58:39 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB49wdUt094863; Mon, 4 Dec 2017 09:58:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB49wdnB094862; Mon, 4 Dec 2017 09:58:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712040958.vB49wdnB094862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 4 Dec 2017 09:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326522 - head/contrib/mdocml X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/contrib/mdocml X-SVN-Commit-Revision: 326522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 09:58:40 -0000 Author: bapt Date: Mon Dec 4 09:58:38 2017 New Revision: 326522 URL: https://svnweb.freebsd.org/changeset/base/326522 Log: Properly name the 2013 edition Reported by: ed Modified: head/contrib/mdocml/st.in Modified: head/contrib/mdocml/st.in ============================================================================== --- head/contrib/mdocml/st.in Mon Dec 4 09:54:03 2017 (r326521) +++ head/contrib/mdocml/st.in Mon Dec 4 09:58:38 2017 (r326522) @@ -34,7 +34,7 @@ LINE("-p1003.1-96", "ISO/IEC 9945-1:1996 (\\(LqPOSIX.1 LINE("-p1003.1-2001", "IEEE Std 1003.1-2001 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2004", "IEEE Std 1003.1-2004 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2008", "IEEE Std 1003.1-2008 (\\(LqPOSIX.1\\(Rq)") -LINE("-p1003.1-2013", "IEEE Std 1003.1-2013 (\\(LqPOSIX.1\\(Rq)") +LINE("-p1003.1-2013", "IEEE Std 1003.1-2008, 2013 Edition (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1", "IEEE Std 1003.1 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1b", "IEEE Std 1003.1b (\\(LqPOSIX.1b\\(Rq)") LINE("-p1003.1b-93", "IEEE Std 1003.1b-1993 (\\(LqPOSIX.1b\\(Rq)") From owner-svn-src-head@freebsd.org Mon Dec 4 11:11:37 2017 Return-Path: Delivered-To: svn-src-head@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 112A8DF8A26 for ; Mon, 4 Dec 2017 11:11:37 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x22d.google.com (mail-yb0-x22d.google.com [IPv6:2607:f8b0:4002:c09::22d]) (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 C1D323F89 for ; Mon, 4 Dec 2017 11:11:36 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x22d.google.com with SMTP id s46so6411481ybi.8 for ; Mon, 04 Dec 2017 03:11:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ALkpg09vsL0gvkLZU0RNkGjplf1QiDxO4N024ddZZhE=; b=i8D1o5x/g+O0BKwC9ZI/JdvjQPTRY1tLFUH3hY9fJdQg7LXWONpW9WJ3SAaDwS9fgq 96lP+94LFNupMeUneCEMedhVGGXX4wrtLC1VVMIhxSryRUe3PqzTXFZKM9Iq01CxAo53 JBMOwfCkCtCQ8bbnHEVUlcEkRNZHPhgDLV+5kn28AdDypD6y849Ao5huRqCJ5OK6hZap IX/rckB/wwQbKoJJoiq6Md5YTGQ3mMICGlKtHCsCuILYa5fxNgiHwHU+cpbFAbMp2EaE zCk0VL7RV5EMICfiWTt272tvbNNbhdG99wBUv0w2mq1bcyt7kNBiINW+16z4Gco31ptf 6dBg== 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:cc; bh=ALkpg09vsL0gvkLZU0RNkGjplf1QiDxO4N024ddZZhE=; b=KgZAreRPflhSE6+xWfowLIXLCNpxDohRsvzv9tptMLXGSABbs8I32bT7uNdUaW/Op6 GcmO0G/STFTwF1FMibmxmLTZZpIGvqiihRIx5Wmqmg+azeCB2gNRvgxxAyZSeYtaV5IQ uwVSQ1pJrxKLXpbKdAx0CD7P0K4nFscoh2zLR18jIrfwIbnqxRtbYwlBSTPvfKHGCuNP Au5NNvEb0HpPt2yItwJOCuKUGVt8p+XnRZsAmt6SgOEbhEsm5I3Pd5deh9dKrmeSoy8r zwR5ah9X09rbaneMWrXeKb/71kry5LYd9bFq3/JflVLZOdhfZH7V+9xofHm04qyliBed p/WQ== X-Gm-Message-State: AKGB3mK3TMrAnk88T8KaGLwUHR1quLIoM5yS+6qHPZYWEYZRuzL0tLcB ACPUKsQwWFhRrOarr9yDallHwHxJ/H6grLljPMWj2A== X-Google-Smtp-Source: AGs4zMZh/DFi1quFUHoUG+9Iy9YqGYE9OtiQf0+m7DvBO8Z9x8FNX1bC/7beNyisFgsgKEPXrk3ytKkjVeD2d4fWXoY= X-Received: by 10.37.11.130 with SMTP id 124mr4127071ybl.226.1512385895879; Mon, 04 Dec 2017 03:11:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.85.17 with HTTP; Mon, 4 Dec 2017 03:11:05 -0800 (PST) In-Reply-To: <20171204095725.p7izevji24cx44yf@ivaldir.net> References: <201712040948.vB49mtp6090574@repo.freebsd.org> <20171204095725.p7izevji24cx44yf@ivaldir.net> From: Ed Schouten Date: Mon, 4 Dec 2017 12:11:05 +0100 Message-ID: Subject: Re: svn commit: r326518 - head/contrib/mdocml To: Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 11:11:37 -0000 2017-12-04 10:57 GMT+01:00 Baptiste Daroussin : > I just have one thing to say here: why? seriously why? :) It's just a branching thing. The 2013 and 2016 editions are the same as the 2008 standard, but have fixes for some of the errata. Think of the 2008 standard being "POSIX 7.0" and the 2013 and 2016 editions being 7.1 and 7.2, respectively. In the meantime, the POSIX folks are working on the 8th version of the standard. This is where some of the larger changes/additions may be done. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-head@freebsd.org Mon Dec 4 11:16:52 2017 Return-Path: Delivered-To: svn-src-head@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 C1BF6DF8C8C; Mon, 4 Dec 2017 11:16:52 +0000 (UTC) (envelope-from andrew@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 6D00C6353D; Mon, 4 Dec 2017 11:16:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4BGpZu031028; Mon, 4 Dec 2017 11:16:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4BGp64031027; Mon, 4 Dec 2017 11:16:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201712041116.vB4BGp64031027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 4 Dec 2017 11:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326524 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 326524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 11:16:52 -0000 Author: andrew Date: Mon Dec 4 11:16:51 2017 New Revision: 326524 URL: https://svnweb.freebsd.org/changeset/base/326524 Log: Print the correct value when freelist is out of range. Security: : Sponsored by: DARPA, AFRL Modified: head/sys/vm/vm_phys.c Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Mon Dec 4 10:05:59 2017 (r326523) +++ head/sys/vm/vm_phys.c Mon Dec 4 11:16:51 2017 (r326524) @@ -632,7 +632,7 @@ vm_phys_alloc_freelist_pages(int domain, int freelist, domain)); KASSERT(freelist < VM_NFREELIST, ("vm_phys_alloc_freelist_pages: freelist %d is out of range", - flind)); + freelist)); KASSERT(pool < VM_NFREEPOOL, ("vm_phys_alloc_freelist_pages: pool %d is out of range", pool)); KASSERT(order < VM_NFREEORDER, From owner-svn-src-head@freebsd.org Mon Dec 4 11:25:35 2017 Return-Path: Delivered-To: svn-src-head@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 7B18DDF9086; Mon, 4 Dec 2017 11:25:35 +0000 (UTC) (envelope-from andrew@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 4876F63C65; Mon, 4 Dec 2017 11:25:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4BPYN5036018; Mon, 4 Dec 2017 11:25:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4BPYsW036017; Mon, 4 Dec 2017 11:25:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201712041125.vB4BPYsW036017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 4 Dec 2017 11:25:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326525 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 326525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 11:25:35 -0000 Author: andrew Date: Mon Dec 4 11:25:34 2017 New Revision: 326525 URL: https://svnweb.freebsd.org/changeset/base/326525 Log: Use the module pointer to find the address we need to map to in the early arm64 boot sequence. This will be a virtual address in the kernel space after the kernel and any modules loaded by loader so we can use this to find the size of the kernel + modules. We can then add on a level 2 page for the module data and round up the size to be aligned to a level 2 page. This allows more than 8 MiB of modules to be loaded by loader, e.g. zfs.ko and opensolaris.ko. Reported by: Shawn Webb MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Mon Dec 4 11:16:51 2017 (r326524) +++ head/sys/arm64/arm64/locore.S Mon Dec 4 11:25:34 2017 (r326525) @@ -352,13 +352,13 @@ create_pagetables: /* Find the size of the kernel */ mov x6, #(KERNBASE) - ldr x7, .Lend - /* Find the end - begin */ - sub x8, x7, x6 + /* Find modulep - begin */ + sub x8, x0, x6 + /* Add a 2MiB page for the module data and round up */ + ldr x7, =(2 * L2_SIZE - 1) + add x8, x8, x7 /* Get the number of l2 pages to allocate, rounded down */ lsr x10, x8, #(L2_SHIFT) - /* Add 8 MiB for any rounding above and the module data */ - add x10, x10, #4 /* Create the kernel space L2 table */ mov x6, x26 From owner-svn-src-head@freebsd.org Mon Dec 4 12:33:47 2017 Return-Path: Delivered-To: svn-src-head@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 A4320DFB7A9; Mon, 4 Dec 2017 12:33:47 +0000 (UTC) (envelope-from bapt@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 6E8F366786; Mon, 4 Dec 2017 12:33:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4CXkQF068939; Mon, 4 Dec 2017 12:33:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4CXkYH068938; Mon, 4 Dec 2017 12:33:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712041233.vB4CXkYH068938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 4 Dec 2017 12:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326526 - head/usr.bin/man X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/man X-SVN-Commit-Revision: 326526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 12:33:47 -0000 Author: bapt Date: Mon Dec 4 12:33:46 2017 New Revision: 326526 URL: https://svnweb.freebsd.org/changeset/base/326526 Log: In case man(1) found a catpage to display skip looking ".so" which is manpage only. In case we are trying to read a catpage, the manpage variable is not defined. It results in the "cattool" having no arguments. In case the catpage is compressed, the cattool used is "zcat" which dies if the standard input is a terminal, meaning the function calling it is exiting as if there were no ".so" In case the catpage is uncompressed, the cattool used is "zcat -f" which waits reading standard input, making the man(1) command hang. PR: 223560 Reported by: wosch MFC after: 3 days Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Mon Dec 4 11:25:34 2017 (r326525) +++ head/usr.bin/man/man.sh Mon Dec 4 12:33:46 2017 (r326526) @@ -276,6 +276,9 @@ man_check_for_so() { local IFS line tstr unset IFS + if [ -n "$catpage" ]; then + return 0 + fi # We need to loop to accommodate multiple .so directives. while true From owner-svn-src-head@freebsd.org Mon Dec 4 12:44:52 2017 Return-Path: Delivered-To: svn-src-head@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 08898DFBC13; Mon, 4 Dec 2017 12:44:52 +0000 (UTC) (envelope-from yuripv@gmx.com) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6815166FA4; Mon, 4 Dec 2017 12:44:51 +0000 (UTC) (envelope-from yuripv@gmx.com) Received: from thor.xvoid.org ([85.173.23.68]) by mail.gmx.com (mrgmx002 [212.227.17.184]) with ESMTPSA (Nemesis) id 0LjIel-1ewYmN2vmR-00dWbC; Mon, 04 Dec 2017 13:44:48 +0100 Subject: Re: svn commit: r326518 - head/contrib/mdocml To: Ed Schouten , Baptiste Daroussin Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201712040948.vB49mtp6090574@repo.freebsd.org> From: Yuri Pankov Message-ID: <0e475880-70f4-4fde-ae49-8e14f1411efb@gmx.com> Date: Mon, 4 Dec 2017 15:44:47 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:HbFE09h2YS2hSsR5g+SO504Nu5n9tn7406LN1LBHugOQCDnTDRN vfa0QmfQCjGMfwFfxtNzGk9FaWP2ppn2yjTEpMmpWpR8kcUlf8PAGI41Vpv/XMRidSvsByj qxf9X/NczV7cdqwhjSxPxGryAHO/BeHnxHvzBBwz7g4KRWJnDQm3MSg/J6DtXk36sYVyRi0 fv7Qym2RTI8+Tar+/2PAA== X-UI-Out-Filterresults: notjunk:1;V01:K0:+SV8pZAtzpA=:2/P0UV04tVtB39x4ZWEfDj 0iosSD4Iu0EHhHXlnY78zJi+KRiG6/qD/xaz0htE0pzFgCtgLBNUmpfnQZWdJPnOKX11jB/04 TcBgEY/LuaB40WSNPPdagoBQEap3WdTL1OtdZLHQ6+4gY+qejpqVG5zn1OTwU9ORdLbPWAFfj vV1oLkHpXZMDBlNemEfjf5qOcaNQOagqoNs/h+0Z6VwhPT1qEWc/prUv+U5gvfbHCyF880So8 YQSLPho0aAaVYsbzi5LUQkktKwZMYx+Wc9IV97ARb5zsQZrM24TPwqtIghhMM6XpiWsg1CyQR n413JzgzqwNeK/fYH2rMR2MgOFwSyN64ef6Bt1JoTRP2UYx01mkqknrTQKRKVvOsaxSSfvNFu nG8F4kFQ7weB6M0xULUMAQ9z9aOk3TxEkrMiU1mQ3zkBeLrH2LegUZ5YTx4e7Zs+B3dCnpsbH dgZJaLGteUD7jFTreV41YwJBqJquXJk4cSUX8YpDHnOODbWqFiKh9+p/HqJ6tWtzcDKM0DSQK jOGIFYPmh/ZUOGQT2lBidNxtaWebdPjfBqy9QC0idMkfLwha+z4yE7GlfEd6sMwpQXetm5w61 cmE1YCak824jLW6+K0a7o8Hm93fWjnXTWSqQFkugfGucptAZ6MvCeIBGGh//vyAzGdmoPfvXB FZnR8hizBL0I6I8gSZfZMDde0kaOpE/gXwwDXTuMJ6Pv9k2t3Coy0lCWv7Sgtyl2DohCwblvs tvRkIzPdBc0ULnui7Pf4+7lA4l1AMzhLURhE141JiWT9vILqA9vbudpIf8BqBivwfsxwGUk1E ZWOecE22uZRqql7rPg10jmwsBoLMijbii0uQLRMdEVQwXDA1yI= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 12:44:52 -0000 On Mon, Dec 4, 2017 at 10:53:35AM +0100, Ed Schouten wrote: > 2017-12-04 10:48 GMT+01:00 Baptiste Daroussin : >> Log: >> Add Posix 2013 référence for manpages > > I'm not sure that's correct. As far as I know, it's called "IEEE Std > 1003.1-2008, 2013 Edition". > > The top of this page is a bit ambiguous about it: > http://pubs.opengroup.org/onlinepubs/9699919799.2013edition/ > But look at the top of the 2016 edition instead: > http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/ This is also missing an update to mdoc(7), see https://reviews.freebsd.org/D13349 (which isn't entirely correct as well given the Ed's comments). From owner-svn-src-head@freebsd.org Mon Dec 4 12:51:06 2017 Return-Path: Delivered-To: svn-src-head@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 BD4C3DFBCEC; Mon, 4 Dec 2017 12:51:06 +0000 (UTC) (envelope-from bapt@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 88232672A2; Mon, 4 Dec 2017 12:51:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4Cp586077117; Mon, 4 Dec 2017 12:51:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4Cp5aQ077116; Mon, 4 Dec 2017 12:51:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712041251.vB4Cp5aQ077116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 4 Dec 2017 12:51:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326527 - head/usr.bin/man X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/man X-SVN-Commit-Revision: 326527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 12:51:06 -0000 Author: bapt Date: Mon Dec 4 12:51:05 2017 New Revision: 326527 URL: https://svnweb.freebsd.org/changeset/base/326527 Log: Only skip looking for manpages if both man directory and cat directory are not existing. This allows man(1) to read catpages when no man directories are available at all PR: 223559 Reported by: wosch MFC after: 3 days Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Mon Dec 4 12:33:46 2017 (r326526) +++ head/usr.bin/man/man.sh Mon Dec 4 12:51:05 2017 (r326527) @@ -201,7 +201,7 @@ find_file() { catroot="$catroot/$3" fi - if [ ! -d "$manroot" ]; then + if [ ! -d "$manroot" -a ! -d "$catroot" ]; then return 1 fi decho " Searching directory $manroot" 2 From owner-svn-src-head@freebsd.org Mon Dec 4 13:28:57 2017 Return-Path: Delivered-To: svn-src-head@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 672D6DFCBAE; Mon, 4 Dec 2017 13:28:57 +0000 (UTC) (envelope-from manu@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 342D6686E7; Mon, 4 Dec 2017 13:28:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4DSu9A095669; Mon, 4 Dec 2017 13:28:56 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4DSuWS095668; Mon, 4 Dec 2017 13:28:56 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201712041328.vB4DSuWS095668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 4 Dec 2017 13:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326528 - head/sys/dts/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dts/arm X-SVN-Commit-Revision: 326528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 13:28:57 -0000 Author: manu Date: Mon Dec 4 13:28:56 2017 New Revision: 326528 URL: https://svnweb.freebsd.org/changeset/base/326528 Log: dts: arm: Remove imx6 related dts Everything should work with dts from sys/gnu/dts Discussed with: ian Deleted: head/sys/dts/arm/apalis-imx6.dts head/sys/dts/arm/imx6.dtsi head/sys/dts/arm/wandboard-dual.dts head/sys/dts/arm/wandboard-quad.dts head/sys/dts/arm/wandboard-solo.dts From owner-svn-src-head@freebsd.org Mon Dec 4 16:38:21 2017 Return-Path: Delivered-To: svn-src-head@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 CB357E5D208; Mon, 4 Dec 2017 16:38:21 +0000 (UTC) (envelope-from imp@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 98B076F0AA; Mon, 4 Dec 2017 16:38:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4GcKdq087529; Mon, 4 Dec 2017 16:38:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4GcK0q087528; Mon, 4 Dec 2017 16:38:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712041638.vB4GcK0q087528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 4 Dec 2017 16:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326535 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 326535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 16:38:21 -0000 Author: imp Date: Mon Dec 4 16:38:20 2017 New Revision: 326535 URL: https://svnweb.freebsd.org/changeset/base/326535 Log: Just use the last line of the output from getting .OBJDIR. The buildenv target prints other stuff too that needs to be ignored. Sponsored by: Netflix Modified: head/tools/boot/universe.sh Modified: head/tools/boot/universe.sh ============================================================================== --- head/tools/boot/universe.sh Mon Dec 4 15:28:07 2017 (r326534) +++ head/tools/boot/universe.sh Mon Dec 4 16:38:20 2017 (r326535) @@ -26,7 +26,7 @@ dobuild() local opt=$3 echo -n "Building $ta ${opt} ... " - objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR") + objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR" | tail -1) rm -rf ${objdir} if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \ > $lf 2>&1; then From owner-svn-src-head@freebsd.org Mon Dec 4 17:02:55 2017 Return-Path: Delivered-To: svn-src-head@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 3DD8AE5DC0F; Mon, 4 Dec 2017 17:02:55 +0000 (UTC) (envelope-from avg@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 0AC92700BA; Mon, 4 Dec 2017 17:02:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4H2seO000434; Mon, 4 Dec 2017 17:02:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4H2sar000433; Mon, 4 Dec 2017 17:02:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201712041702.vB4H2sar000433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 4 Dec 2017 17:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326537 - head/sys/amd64/vmm/amd X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/amd64/vmm/amd X-SVN-Commit-Revision: 326537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 17:02:55 -0000 Author: avg Date: Mon Dec 4 17:02:53 2017 New Revision: 326537 URL: https://svnweb.freebsd.org/changeset/base/326537 Log: amd-vi: clear event interrupt and overflow bits upon handling the interrupt This ensures that we can receive further event interrupts. See the description of the bits in the specification for MMIO Offset 2020h IOMMU Status Register. The bits are defined as set-by-hardware write-1-to-clear, same as all the bits in the status register. Discussed with: anish Modified: head/sys/amd64/vmm/amd/amdvi_hw.c Modified: head/sys/amd64/vmm/amd/amdvi_hw.c ============================================================================== --- head/sys/amd64/vmm/amd/amdvi_hw.c Mon Dec 4 16:47:19 2017 (r326536) +++ head/sys/amd64/vmm/amd/amdvi_hw.c Mon Dec 4 17:02:53 2017 (r326537) @@ -815,6 +815,7 @@ amdvi_event_intr(void *arg) softc->total_cmd, ctrl->cmd_tail, ctrl->cmd_head); amdvi_print_events(softc); + ctrl->status &= AMDVI_STATUS_EV_OF | AMDVI_STATUS_EV_INTR; } static void @@ -839,6 +840,7 @@ amdvi_free_evt_intr_res(device_t dev) static bool amdvi_alloc_intr_resources(struct amdvi_softc *softc) { + struct amdvi_ctrl *ctrl; device_t dev, pcib; uint64_t msi_addr; uint32_t msi_data, temp; @@ -902,6 +904,10 @@ amdvi_alloc_intr_resources(struct amdvi_softc *softc) amdvi_free_evt_intr_res(softc->dev); return (err); } + + /* Clear interrupt status bits. */ + ctrl = softc->ctrl; + ctrl->status &= AMDVI_STATUS_EV_OF | AMDVI_STATUS_EV_INTR; /* Configure MSI */ amdvi_pci_write(softc, msi_off + PCIR_MSI_ADDR, msi_addr); From owner-svn-src-head@freebsd.org Mon Dec 4 17:08:04 2017 Return-Path: Delivered-To: svn-src-head@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 EF3F9E5E110; Mon, 4 Dec 2017 17:08:04 +0000 (UTC) (envelope-from avg@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 BC2057079B; Mon, 4 Dec 2017 17:08:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4H83hH000636; Mon, 4 Dec 2017 17:08:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4H83vk000635; Mon, 4 Dec 2017 17:08:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201712041708.vB4H83vk000635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 4 Dec 2017 17:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326538 - head/sys/amd64/vmm/amd X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/amd64/vmm/amd X-SVN-Commit-Revision: 326538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 17:08:05 -0000 Author: avg Date: Mon Dec 4 17:08:03 2017 New Revision: 326538 URL: https://svnweb.freebsd.org/changeset/base/326538 Log: vmm/amd: add ivhd device with a higher order ivhd should attach after the root PCI bus and, thus, after the ACPI Host-PCI bridge off which the bus hangs. This is because ivhd changes PCI configuration of a PCI IOMMU device that is located on the root bus. If the bus attaches after ivhd it clears the MSI portion of the configuration. As a result IOMMU event interrupts would never be delivered. For regular ACPI devices the order is calculated as ACPI_DEV_BASE_ORDER + level * 10 where level is a depth of the device in the ACPI namespace. I expect the depth of the Host-PCI bridge to be two or three, so ACPI_DEV_BASE_ORDER + 10 * 10 should be a sufficiently safe order for ivhd. This should fix the setup of the AMD-Vi event interrupt when vmm is preloaded (as opposed to kldload-ed). Modified: head/sys/amd64/vmm/amd/ivrs_drv.c Modified: head/sys/amd64/vmm/amd/ivrs_drv.c ============================================================================== --- head/sys/amd64/vmm/amd/ivrs_drv.c Mon Dec 4 17:02:53 2017 (r326537) +++ head/sys/amd64/vmm/amd/ivrs_drv.c Mon Dec 4 17:08:03 2017 (r326538) @@ -324,7 +324,13 @@ ivhd_identify(driver_t *driver, device_t parent) continue; } - ivhd_devs[i] = BUS_ADD_CHILD(parent, 1, "ivhd", i); + /* + * Use a high order to ensure that this driver is probed after + * the Host-PCI bridge and the root PCI bus. + */ + ivhd_devs[i] = BUS_ADD_CHILD(parent, + ACPI_DEV_BASE_ORDER + 10 * 10, "ivhd", i); + /* * XXX: In case device was not destroyed before, add will fail. * locate the old device instance. From owner-svn-src-head@freebsd.org Mon Dec 4 17:10:53 2017 Return-Path: Delivered-To: svn-src-head@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 5E9E9E5E331; Mon, 4 Dec 2017 17:10:53 +0000 (UTC) (envelope-from avg@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 32DFC70BC4; Mon, 4 Dec 2017 17:10:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4HAqBI001695; Mon, 4 Dec 2017 17:10:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4HAqib001694; Mon, 4 Dec 2017 17:10:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201712041710.vB4HAqib001694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 4 Dec 2017 17:10:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326539 - head/sys/amd64/vmm/amd X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/amd64/vmm/amd X-SVN-Commit-Revision: 326539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 17:10:53 -0000 Author: avg Date: Mon Dec 4 17:10:52 2017 New Revision: 326539 URL: https://svnweb.freebsd.org/changeset/base/326539 Log: amd-vi: set iommu msi configuration using pci_enable_msi method This is better than directly changing PCI configuration space of the device because it makes the PCI bus aware of the configuration. Also, the change allows to drop a bunch of code that duplicated pci_enable_msi() functionality. I wonder if it's possible to further simplify the code by using pci_alloc_msi(). Modified: head/sys/amd64/vmm/amd/amdvi_hw.c Modified: head/sys/amd64/vmm/amd/amdvi_hw.c ============================================================================== --- head/sys/amd64/vmm/amd/amdvi_hw.c Mon Dec 4 17:08:03 2017 (r326538) +++ head/sys/amd64/vmm/amd/amdvi_hw.c Mon Dec 4 17:10:52 2017 (r326539) @@ -119,15 +119,6 @@ CTASSERT(sizeof(amdvi_dte) == 0x200000); static SLIST_HEAD (, amdvi_domain) dom_head; -static inline void -amdvi_pci_write(struct amdvi_softc *softc, int off, uint32_t data) -{ - - pci_cfgregwrite(PCI_RID2BUS(softc->pci_rid), - PCI_RID2SLOT(softc->pci_rid), PCI_RID2FUNC(softc->pci_rid), - off, data, 4); -} - static inline uint32_t amdvi_pci_read(struct amdvi_softc *softc, int off) { @@ -137,32 +128,6 @@ amdvi_pci_read(struct amdvi_softc *softc, int off) off, 4)); } -static int -amdvi_find_pci_cap(struct amdvi_softc *softc, uint8_t capability, int *off) -{ - uint32_t read; - uint8_t ptr; - - read = amdvi_pci_read(softc, PCIR_COMMAND); - if (((read >> 16) & PCIM_STATUS_CAPPRESENT) == 0) - return (ENXIO); - - /* Read the starting of capability pointer. */ - read = amdvi_pci_read(softc, PCIR_CAP_PTR); - ptr = read & 0xFF; - - while (ptr != 0) { - read = amdvi_pci_read(softc, ptr); - if ((read & 0xFF) == capability) { - *off = ptr; - return (0); - } - ptr = (read >> 8) & 0xFF; - } - - return (ENOENT); -} - #ifdef AMDVI_ATS_ENABLE /* XXX: Should be in pci.c */ /* @@ -837,36 +802,47 @@ amdvi_free_evt_intr_res(device_t dev) dev, 1, &softc->event_irq); } -static bool +static bool amdvi_alloc_intr_resources(struct amdvi_softc *softc) { struct amdvi_ctrl *ctrl; device_t dev, pcib; + device_t mmio_dev; uint64_t msi_addr; - uint32_t msi_data, temp; - int err, msi_off; + uint32_t msi_data; + int err; dev = softc->dev; pcib = device_get_parent(device_get_parent(dev)); + mmio_dev = pci_find_bsf(PCI_RID2BUS(softc->pci_rid), + PCI_RID2SLOT(softc->pci_rid), PCI_RID2FUNC(softc->pci_rid)); + if (device_is_attached(mmio_dev)) { + device_printf(dev, + "warning: IOMMU device is claimed by another driver %s\n", + device_get_driver(mmio_dev)->name); + } + softc->event_irq = -1; softc->event_rid = 0; + /* * Section 3.7.1 of IOMMU rev 2.0. With MSI, there is only one * interrupt. XXX: Enable MSI/X support. */ - err = PCIB_ALLOC_MSI(pcib, dev, 1, 1, &softc->event_irq); if (err) { device_printf(dev, "Couldn't find event MSI IRQ resource.\n"); return (ENOENT); } + err = bus_set_resource(dev, SYS_RES_IRQ, softc->event_rid, softc->event_irq, 1); if (err) { device_printf(dev, "Couldn't set event MSI resource.\n"); return (ENXIO); } + softc->event_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &softc->event_rid, RF_ACTIVE); if (!softc->event_res) { @@ -888,13 +864,6 @@ amdvi_alloc_intr_resources(struct amdvi_softc *softc) bus_describe_intr(dev, softc->event_res, softc->event_tag, "fault"); - err = amdvi_find_pci_cap(softc, PCIY_MSI, &msi_off); - if (err) { - device_printf(dev, "Couldn't find MSI capability, err = %d.\n", - err); - return (err); - } - err = PCIB_MAP_MSI(pcib, dev, softc->event_irq, &msi_addr, &msi_data); if (err) { @@ -909,17 +878,8 @@ amdvi_alloc_intr_resources(struct amdvi_softc *softc) ctrl = softc->ctrl; ctrl->status &= AMDVI_STATUS_EV_OF | AMDVI_STATUS_EV_INTR; - /* Configure MSI */ - amdvi_pci_write(softc, msi_off + PCIR_MSI_ADDR, msi_addr); - amdvi_pci_write(softc, msi_off + PCIR_MSI_ADDR_HIGH, - msi_addr >> 32); - amdvi_pci_write(softc, msi_off + PCIR_MSI_DATA_64BIT, msi_data); - /* Now enable MSI interrupt. */ - temp = amdvi_pci_read(softc, msi_off); - temp |= (PCIM_MSICTRL_MSI_ENABLE << 16); /* MSI enable. */ - amdvi_pci_write(softc, msi_off, temp); - + pci_enable_msi(mmio_dev, msi_addr, msi_data); return (0); } From owner-svn-src-head@freebsd.org Mon Dec 4 17:13:15 2017 Return-Path: Delivered-To: svn-src-head@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 4EAFEE5E662; Mon, 4 Dec 2017 17:13:15 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id F351270FD9; Mon, 4 Dec 2017 17:13:14 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from dhcp-10-248-109-248.eduroam.wireless.private.cam.ac.uk (global-5-142.nat-2.net.cam.ac.uk [131.111.5.142]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 155EA4E632; Mon, 4 Dec 2017 17:12:43 +0000 (UTC) From: Andrew Turner Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r326524 - head/sys/vm Date: Mon, 4 Dec 2017 17:12:42 +0000 References: <201712041116.vB4BGp64031027@repo.freebsd.org> To: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201712041116.vB4BGp64031027@repo.freebsd.org> Message-Id: <9B4431F8-2C83-4DAF-A4E8-F76F3E94E89C@fubar.geek.nz> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 17:13:15 -0000 > On 4 Dec 2017, at 11:16, Andrew Turner wrote: > > Author: andrew > Date: Mon Dec 4 11:16:51 2017 > New Revision: 326524 > URL: https://svnweb.freebsd.org/changeset/base/326524 > > Log: > Print the correct value when freelist is out of range. > > Security: : This was a build failure, not a security issue. Andrew From owner-svn-src-head@freebsd.org Mon Dec 4 17:15:01 2017 Return-Path: Delivered-To: svn-src-head@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 1FE39E5E75A; Mon, 4 Dec 2017 17:15:01 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDD6D7116F; Mon, 4 Dec 2017 17:15:00 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vB4HEwxL046936; Mon, 4 Dec 2017 09:14:58 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vB4HEwpd046935; Mon, 4 Dec 2017 09:14:58 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712041714.vB4HEwpd046935@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326535 - head/tools/boot In-Reply-To: <201712041638.vB4GcK0q087528@repo.freebsd.org> To: Warner Losh Date: Mon, 4 Dec 2017 09:14:58 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 17:15:01 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: imp > Date: Mon Dec 4 16:38:20 2017 > New Revision: 326535 > URL: https://svnweb.freebsd.org/changeset/base/326535 > > Log: > Just use the last line of the output from getting .OBJDIR. The > buildenv target prints other stuff too that needs to be ignored. > > Sponsored by: Netflix > > Modified: > head/tools/boot/universe.sh > > Modified: head/tools/boot/universe.sh > ============================================================================== > --- head/tools/boot/universe.sh Mon Dec 4 15:28:07 2017 (r326534) > +++ head/tools/boot/universe.sh Mon Dec 4 16:38:20 2017 (r326535) > @@ -26,7 +26,7 @@ dobuild() > local opt=$3 > > echo -n "Building $ta ${opt} ... " > - objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR") > + objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR" | tail -1) > rm -rf ${objdir} > if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \ > > $lf 2>&1; then We should probably find a better way than this, that is a very error prone mechanism to use. And given your gona run an rm -rf on the return value very dangerious if wrong. Something like adding a QUIET=true to buildenv so that it only outputs the desired value? Or having buildenv have options to directly output your desired .OBJDIR value? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Dec 4 17:25:57 2017 Return-Path: Delivered-To: svn-src-head@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 2F83AE5ED0D for ; Mon, 4 Dec 2017 17:25:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (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 E66307196F for ; Mon, 4 Dec 2017 17:25:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id p139so14614945itb.1 for ; Mon, 04 Dec 2017 09:25:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hmAC+sTGK2Ho02zF+d9NfERdgi3tE9f7FS58gWKeKWQ=; b=yBOd7d2d1wu67Z4WMS8z6mHiv4y2utAssfipdNhb7xtdhhCrRQj6ItGlnSbdeYCVeC 181xtMT6aV1czkuFWigaCHEGYf4kINy+uh/yv342wO+45C97fp2/hqawTKRWHK0nwJ7Q w0pcF0F6hLL9s10YbhybkOjoMR84zTe/mVRmRj1Y45bkhqtIpupkxSAHKjAY+99ILIAY itioo/4lG4Y2SGH71JF43sf0eFl934QvBJk6WcX/roIH9oTj5xeiLskWYCmH+iHDU+3a 6a6bnBsLgKxFPnNHKI0E3KPjjmJPq7o/S2O1kqWb+vX8wlm6SHupadHFFOW9yt2HPzh1 yFjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=hmAC+sTGK2Ho02zF+d9NfERdgi3tE9f7FS58gWKeKWQ=; b=D5LWGssf5BBVAmJLpcwWAMCMlCs16GoCOfF3/tIrvOTj8MiNHXKop2VWYnGepgbekW n11LHo2DCCG74s2BBQBEdmTQ+gMV+CqzMoCH0P/vMAm2BoXFkwb3X+hgp84tQ34RdBn/ WyZFRnjmkPBpsWyQqH/HlUOxgPxihyhxWjJt1hDhBWCVp9RBHXsMBHyrdUnRFL7M3sZ3 cjdiUMZpc81AsRd5fSn21AukVARtZCg0YBQlJuTZrd7nva1he1Mt9DzyxlftG4jozuHO BQyv6c/AiIcYO3e56ToQSNEkZyBJ0BxPMbfuFiD3JtqQAmkmtwrkntJSLzJMdzlYxqhM kH8w== X-Gm-Message-State: AKGB3mIp14pP3puqGarELR/YgC/CwwztlpXDWJIIrPCrhuyxSUcOTGbg 2PRNnG+M7qe/H1jXw/wLvdrujh3EqrkGpq1K0uWlAg== X-Google-Smtp-Source: AGs4zMag8i13J+lCRCkPeUZ4bFhiPKUgq5PehiAJEmDTQii5mUznic64kk9FstXa73RIyf0wgr2If2dbXnnBItkoWI4= X-Received: by 10.107.52.140 with SMTP id b134mr13164031ioa.291.1512408356163; Mon, 04 Dec 2017 09:25:56 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Mon, 4 Dec 2017 09:25:55 -0800 (PST) X-Originating-IP: [50.253.109.65] In-Reply-To: <201712041714.vB4HEwpd046935@pdx.rh.CN85.dnsmgr.net> References: <201712041638.vB4GcK0q087528@repo.freebsd.org> <201712041714.vB4HEwpd046935@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Mon, 4 Dec 2017 10:25:55 -0700 X-Google-Sender-Auth: C6QAgrwqzzf9ZbPEh0L7iS2hf1w Message-ID: Subject: Re: svn commit: r326535 - head/tools/boot To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 17:25:57 -0000 On Mon, Dec 4, 2017 at 10:14 AM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: imp > > Date: Mon Dec 4 16:38:20 2017 > > New Revision: 326535 > > URL: https://svnweb.freebsd.org/changeset/base/326535 > > > > Log: > > Just use the last line of the output from getting .OBJDIR. The > > buildenv target prints other stuff too that needs to be ignored. > > > > Sponsored by: Netflix > > > > Modified: > > head/tools/boot/universe.sh > > > > Modified: head/tools/boot/universe.sh > > ============================================================ > ================== > > --- head/tools/boot/universe.sh Mon Dec 4 15:28:07 2017 > (r326534) > > +++ head/tools/boot/universe.sh Mon Dec 4 16:38:20 2017 > (r326535) > > @@ -26,7 +26,7 @@ dobuild() > > local opt=$3 > > > > echo -n "Building $ta ${opt} ... " > > - objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V > .OBJDIR") > > + objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V > .OBJDIR" | tail -1) > > rm -rf ${objdir} > > if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean > cleandepend cleandir obj depend" \ > > > $lf 2>&1; then > > We should probably find a better way than this, > that is a very error prone mechanism to use. > > And given your gona run an rm -rf on the return value very dangerious > if wrong. > > > Something like adding a QUIET=true to buildenv so that it only outputs the > desired value? Or having buildenv have options to directly output your > desired .OBJDIR value? > This method works regardless of what noise is output, from none at all, to paragraphs of help. I'm content with the solution. This tool is primarily used by me for testing that changes to src/stand work on all the relevant environments. I'm OK with some fragility and sharp edges. While I wouldn't mind more knobs on the buildenv stuff, our current build system is somewhat overburdened with knobs so a new knob for a narrow use case isn't my first choice. I'd rather work around it in this case. I'd, of course, revisit this choice if there's other users that come forward. So far I think I'm the only one given the other bugs I had to fix in buildenv... Warner From owner-svn-src-head@freebsd.org Mon Dec 4 17:46:36 2017 Return-Path: Delivered-To: svn-src-head@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 D4BCFE5F74F; Mon, 4 Dec 2017 17:46:36 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C8D5A72885; Mon, 4 Dec 2017 17:46:34 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 5e6c0fc5; Mon, 4 Dec 2017 18:46:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=OymCLn8jVbWqUjDltR9RqIXjnKw=; b=W8L2iGyGlo8w0CGPJ6iuGvUswx0g 469FWUEPO9aAvWbyu0mH5uzPGuzBKRoPTY3unnjLZzStJ9jpLHfOLcBIhYkDxNwS t/SZuV2Se67AzmzNYV3/YA459k7zaROnoBJsMya/uVl/ltfx11L+NmtXdKKYMkQQ HD9C+aMp0giEPKY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=k7oyAmGAaNblfim1hE0z9M6H6C8F5mKvgU1Vz/Z7T0/x85rJfJXeA7UZ vvT1VQ8tXRFSnoZ0OJOHpj7m+2UdacwPX7Y//Bm1sHLzaPA4E7uIr5m3roOiGcLz yx5rhp5kFwn7mXOtQXHjZz+XsDDPgoRbRX1DuQpjTT5O2ZwxH6I= Received: from knuckles.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id faa1e1cc TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 4 Dec 2017 18:46:32 +0100 (CET) Date: Mon, 4 Dec 2017 18:46:32 +0100 From: Emmanuel Vadot To: Jeff Roberson Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326347 - in head/sys: kern sys vm Message-Id: <20171204184632.560fb4996235a9180a37be48@bidouilliste.com> In-Reply-To: <201711282340.vASNetfP044382@repo.freebsd.org> References: <201711282340.vASNetfP044382@repo.freebsd.org> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 17:46:36 -0000 On Tue, 28 Nov 2017 23:40:55 +0000 (UTC) Jeff Roberson wrote: > Author: jeff Hi Jeff, > Date: Tue Nov 28 23:40:54 2017 > New Revision: 326347 > URL: https://svnweb.freebsd.org/changeset/base/326347 > > Log: > Eliminate kmem_arena and kmem_object in preparation for further NUMA commits. > > The arena argument to kmem_*() is now only used in an assert. A follow-up > commit will remove the argument altogether before we freeze the API for the > next release. > > This replaces the hard limit on kmem size with a soft limit imposed by UMA. When > the soft limit is exceeded we periodically wakeup the UMA reclaim thread to > attempt to shrink KVA. On 32bit architectures this should behave much more > gracefully as we exhaust KVA. On 64bit the limits are likely never hit. > > Reviewed by: markj, kib (some objections) > Discussed with: alc > Tested by: pho > Sponsored by: Netflix / Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D13187 > > Modified: > head/sys/kern/kern_malloc.c > head/sys/kern/subr_vmem.c > head/sys/sys/vmem.h > head/sys/vm/memguard.c > head/sys/vm/uma.h > head/sys/vm/uma_core.c > head/sys/vm/uma_int.h > head/sys/vm/vm_kern.c > head/sys/vm/vm_map.c > head/sys/vm/vm_object.c > head/sys/vm/vm_object.h This seems to break USB (EHCI and OHCI) on Pine64 (arm64) The board just hang when plugin usb device, setting hw.usb.ehci.debug=3 this is what I have when plugging an usb stick : ehci_root_intr: port 1 changed ehci_set_hw_power: ehci_roothub_exec: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0001 ehci_roothub_exec: type=0x23 request=0x01 wLen=0x0000 wValue=0x0010 wIndex=0x0001 ehci_roothub_exec: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0001 ehci_roothub_exec: type=0x23 request=0x01 wLen=0x0000 wValue=0x0014 wIndex=0x0001 ehci_roothub_exec: type=0x23 request=0x03 wLen=0x0000 wValue=0x0004 wIndex=0x0001 ehci_roothub_exec: ehci after reset, status=0x00001005 ehci_roothub_exec: ehci port 1 reset, status = 0x00001005 ehci_roothub_exec: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0001 ehci_roothub_exec: type=0x23 request=0x01 wLen=0x0000 wValue=0x0014 wIndex=0x0001 ehci_roothub_exec: type=0xa3 request=0x00 wLen=0x0004 wValue=0x0000 wIndex=0x0001 ehci_ep_init: endpoint=0xfffffd00004f10f8, addr=0, endpt=0, mode=0 (1) If you have any idea on how to debug/resolve this, Cheers, -- Emmanuel Vadot From owner-svn-src-head@freebsd.org Mon Dec 4 20:45:16 2017 Return-Path: Delivered-To: svn-src-head@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 A6AA1E6A52D; Mon, 4 Dec 2017 20:45:16 +0000 (UTC) (envelope-from manu@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 7377978939; Mon, 4 Dec 2017 20:45:16 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4KjFZW092329; Mon, 4 Dec 2017 20:45:15 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4KjFnN092328; Mon, 4 Dec 2017 20:45:15 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201712042045.vB4KjFnN092328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 4 Dec 2017 20:45:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326542 - head/sys/arm/allwinner/clkng X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner/clkng X-SVN-Commit-Revision: 326542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 20:45:16 -0000 Author: manu Date: Mon Dec 4 20:45:15 2017 New Revision: 326542 URL: https://svnweb.freebsd.org/changeset/base/326542 Log: Allwinner: Add H5 compatible to aw_ccu Recent DTS (from Linux 4.14) specify a compatible "allwinner,sun50i-h5-ccu" for H5 SoC. Since we get the DTB from u-boot this wasn't noticed. Add the compatible so later version of u-boot will not fail for us. Modified: head/sys/arm/allwinner/clkng/aw_ccung.c Modified: head/sys/arm/allwinner/clkng/aw_ccung.c ============================================================================== --- head/sys/arm/allwinner/clkng/aw_ccung.c Mon Dec 4 20:22:26 2017 (r326541) +++ head/sys/arm/allwinner/clkng/aw_ccung.c Mon Dec 4 20:45:15 2017 (r326542) @@ -95,6 +95,7 @@ static struct ofw_compat_data compat_data[] = { #endif #if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) { "allwinner,sun8i-h3-ccu", H3_CCU }, + { "allwinner,sun50i-h5-ccu", H3_CCU }, { "allwinner,sun8i-h3-r-ccu", H3_R_CCU }, #endif #if defined(SOC_ALLWINNER_A31) From owner-svn-src-head@freebsd.org Mon Dec 4 21:50:28 2017 Return-Path: Delivered-To: svn-src-head@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 60B92E6BF3E; Mon, 4 Dec 2017 21:50:28 +0000 (UTC) (envelope-from rmacklem@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 3A97F7B417; Mon, 4 Dec 2017 21:50:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4LoR0L018654; Mon, 4 Dec 2017 21:50:27 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4LoR1c018653; Mon, 4 Dec 2017 21:50:27 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201712042150.vB4LoR1c018653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 4 Dec 2017 21:50:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326544 - head/sys/fs/nfsserver X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsserver X-SVN-Commit-Revision: 326544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 21:50:28 -0000 Author: rmacklem Date: Mon Dec 4 21:50:27 2017 New Revision: 326544 URL: https://svnweb.freebsd.org/changeset/base/326544 Log: Avoid the overhead of acquiring a lock in nfsrv_checkgetattr() when there are no write delegations issued. manu@ reported on the freebsd-current@ mailing list that there was a significant performance hit in nfsrv_checkgetattr() caused by the acquisition/release of a state lock, even when there were no write delegations issued. This patch add a count of outstanding issued write delegations to the NFSv4 server. This count allows nfsrv_checkgetattr() to return without acquiring any lock when the count is 0, avoiding the performance hit for the case where no write delegations are issued. Reported by: manu Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D13327 Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Mon Dec 4 21:12:05 2017 (r326543) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Mon Dec 4 21:50:27 2017 (r326544) @@ -95,6 +95,7 @@ static time_t nfsrvboottime; static int nfsrv_returnoldstateid = 0, nfsrv_clients = 0; static int nfsrv_clienthighwater = NFSRV_CLIENTHIGHWATER; static int nfsrv_nogsscallback = 0; +static volatile int nfsrv_writedelegcnt = 0; /* local functions */ static void nfsrv_dumpaclient(struct nfsclient *clp, @@ -1263,6 +1264,8 @@ nfsrv_freedeleg(struct nfsstate *stp) LIST_REMOVE(stp, ls_hash); LIST_REMOVE(stp, ls_list); LIST_REMOVE(stp, ls_file); + if ((stp->ls_flags & NFSLCK_DELEGWRITE) != 0) + nfsrv_writedelegcnt--; lfp = stp->ls_lfp; if (LIST_EMPTY(&lfp->lf_open) && LIST_EMPTY(&lfp->lf_lock) && LIST_EMPTY(&lfp->lf_deleg) && @@ -2907,6 +2910,7 @@ tryagain: new_deleg->ls_flags = (NFSLCK_DELEGWRITE | NFSLCK_READACCESS | NFSLCK_WRITEACCESS); *rflagsp |= NFSV4OPEN_WRITEDELEGATE; + nfsrv_writedelegcnt++; } else { new_deleg->ls_flags = (NFSLCK_DELEGREAD | NFSLCK_READACCESS); @@ -3037,6 +3041,7 @@ tryagain: new_deleg->ls_clp = clp; new_deleg->ls_filerev = filerev; new_deleg->ls_compref = nd->nd_compref; + nfsrv_writedelegcnt++; LIST_INSERT_HEAD(&lfp->lf_deleg, new_deleg, ls_file); LIST_INSERT_HEAD(NFSSTATEHASH(clp, new_deleg->ls_stateid), new_deleg, ls_hash); @@ -3094,6 +3099,7 @@ tryagain: new_deleg->ls_flags = (NFSLCK_DELEGWRITE | NFSLCK_READACCESS | NFSLCK_WRITEACCESS); *rflagsp |= NFSV4OPEN_WRITEDELEGATE; + nfsrv_writedelegcnt++; } else { new_deleg->ls_flags = (NFSLCK_DELEGREAD | NFSLCK_READACCESS); @@ -3170,6 +3176,7 @@ tryagain: NFSLCK_READACCESS | NFSLCK_WRITEACCESS); *rflagsp |= NFSV4OPEN_WRITEDELEGATE; + nfsrv_writedelegcnt++; } else { new_deleg->ls_flags = (NFSLCK_DELEGREAD | @@ -5299,6 +5306,8 @@ nfsrv_checkgetattr(struct nfsrv_descript *nd, vnode_t NFSCBGETATTR_ATTRBIT(attrbitp, &cbbits); if (!NFSNONZERO_ATTRBIT(&cbbits)) + goto out; + if (nfsrv_writedelegcnt == 0) goto out; /* From owner-svn-src-head@freebsd.org Tue Dec 5 01:47:43 2017 Return-Path: Delivered-To: svn-src-head@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 0697FE73745; Tue, 5 Dec 2017 01:47:43 +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 C781C3B6D; Tue, 5 Dec 2017 01:47:42 +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 vB51lfTX018705; Tue, 5 Dec 2017 01:47:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB51lf7Y018704; Tue, 5 Dec 2017 01:47:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712050147.vB51lf7Y018704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Dec 2017 01:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326547 - head/contrib/llvm/tools/lld/ELF X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 326547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 01:47:43 -0000 Author: emaste Date: Tue Dec 5 01:47:41 2017 New Revision: 326547 URL: https://svnweb.freebsd.org/changeset/base/326547 Log: lld: make -v behave similarly to GNU ld.bfd Previously, lld exited with an error status if the only option given to the command was -v. GNU linkers gracefully exit in that case. This patch makes lld behave like GNU. Note that even with this patch, lld's -v and --version options behave slightly differently than GNU linkers' counterparts. For example, if you run ld.bfd -v -v, the version string is printed out twice. But that is an edge case that I don't think we need to take care of. Fixes https://bugs.llvm.org/show_bug.cgi?id=31582 Obtained from: LLVM r319717 MFC after: 1 week Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/Driver.cpp Tue Dec 5 01:35:04 2017 (r326546) +++ head/contrib/llvm/tools/lld/ELF/Driver.cpp Tue Dec 5 01:47:41 2017 (r326547) @@ -345,9 +345,10 @@ void LinkerDriver::main(ArrayRef ArgsArr if (Args.hasArg(OPT_v) || Args.hasArg(OPT_version)) message(getLLDVersion() + " (compatible with GNU linkers)"); - // ld.bfd always exits after printing out the version string. - // ld.gold proceeds if a given option is -v. Because gold's behavior - // is more permissive than ld.bfd, we chose what gold does here. + // The behavior of -v or --version is a bit strange, but this is + // needed for compatibility with GNU linkers. + if (Args.hasArg(OPT_v) && !Args.hasArg(OPT_INPUT)) + return; if (Args.hasArg(OPT_version)) return; From owner-svn-src-head@freebsd.org Tue Dec 5 02:23:25 2017 Return-Path: Delivered-To: svn-src-head@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 11736DB9310; Tue, 5 Dec 2017 02:23:25 +0000 (UTC) (envelope-from bdrewery@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 D22936474D; Tue, 5 Dec 2017 02:23:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB52NNrv035439; Tue, 5 Dec 2017 02:23:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB52NNvM035438; Tue, 5 Dec 2017 02:23:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712050223.vB52NNvM035438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 02:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326549 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 326549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 02:23:25 -0000 Author: bdrewery Date: Tue Dec 5 02:23:23 2017 New Revision: 326549 URL: https://svnweb.freebsd.org/changeset/base/326549 Log: Rename DEPENDFILES_OBJS to DEPENDFILES. This is to be consistent with bsd.dep.mk using DEPENDFILES after r325677. Sponsored by: Dell EMC Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Dec 5 01:54:52 2017 (r326548) +++ head/sys/conf/kern.post.mk Tue Dec 5 02:23:23 2017 (r326549) @@ -209,9 +209,8 @@ kernel-depend: .depend SRCS= assym.s vnode_if.h ${BEFORE_DEPEND} ${CFILES} \ ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ ${MFILES:T:S/.m$/.h/} -DEPENDFILES= .depend .depend.* DEPENDOBJS+= ${SYSTEM_OBJS} genassym.o -DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:C/^/.depend./} +DEPENDFILES= ${DEPENDOBJS:O:u:C/^/.depend./} .if ${MAKE_VERSION} < 20160220 DEPEND_MP?= -MP .endif @@ -222,7 +221,7 @@ ${DEPENDOBJS}: .NOMETA # Unset these to avoid looping/statting on them later. .undef DEPENDSRCS .undef DEPENDOBJS -.undef DEPENDFILES_OBJS +.undef DEPENDFILES .endif # defined(_SKIP_DEPEND) DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF.depend.${.TARGET} DEPEND_CFLAGS+= -MT${.TARGET} @@ -233,7 +232,7 @@ DEPEND_CFLAGS+= -MT${.TARGET} DEPEND_CFLAGS_CONDITION= "${DEPENDOBJS:M${.TARGET}}" != "" CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS}:} .endif -.for __depend_obj in ${DEPENDFILES_OBJS} +.for __depend_obj in ${DEPENDFILES} .if ${MAKE_VERSION} < 20160220 .sinclude "${.OBJDIR}/${__depend_obj}" .else @@ -275,7 +274,7 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .endif # !exists(${_depfile}) .endfor -.NOPATH: .depend ${DEPENDFILES_OBJS} +.NOPATH: .depend ${DEPENDFILES} .depend: .PRECIOUS ${SRCS} @@ -306,7 +305,7 @@ ${_ILINKS}: # .depend needs include links so we remove them only together. kernel-cleandepend: .PHONY - rm -f ${DEPENDFILES} ${_ILINKS} + rm -f .depend .depend.* ${_ILINKS} kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } From owner-svn-src-head@freebsd.org Tue Dec 5 02:23:28 2017 Return-Path: Delivered-To: svn-src-head@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 88D1CDB9347; Tue, 5 Dec 2017 02:23:28 +0000 (UTC) (envelope-from bdrewery@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 55B5864755; Tue, 5 Dec 2017 02:23:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB52NR84035489; Tue, 5 Dec 2017 02:23:27 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB52NR9K035488; Tue, 5 Dec 2017 02:23:27 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712050223.vB52NR9K035488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 02:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326550 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 326550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 02:23:28 -0000 Author: bdrewery Date: Tue Dec 5 02:23:27 2017 New Revision: 326550 URL: https://svnweb.freebsd.org/changeset/base/326550 Log: DEPENDSRCS not used here. Sponsored by: Dell EMC Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Dec 5 02:23:23 2017 (r326549) +++ head/sys/conf/kern.post.mk Tue Dec 5 02:23:27 2017 (r326550) @@ -219,7 +219,6 @@ DEPEND_MP?= -MP ${DEPENDOBJS}: .NOMETA .depend: .NOMETA # Unset these to avoid looping/statting on them later. -.undef DEPENDSRCS .undef DEPENDOBJS .undef DEPENDFILES .endif # defined(_SKIP_DEPEND) From owner-svn-src-head@freebsd.org Tue Dec 5 02:23:31 2017 Return-Path: Delivered-To: svn-src-head@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 C52F3DB936C; Tue, 5 Dec 2017 02:23:31 +0000 (UTC) (envelope-from bdrewery@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 909E364792; Tue, 5 Dec 2017 02:23:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB52NUid035534; Tue, 5 Dec 2017 02:23:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB52NUfp035533; Tue, 5 Dec 2017 02:23:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712050223.vB52NUfp035533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 02:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326551 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 326551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 02:23:31 -0000 Author: bdrewery Date: Tue Dec 5 02:23:30 2017 New Revision: 326551 URL: https://svnweb.freebsd.org/changeset/base/326551 Log: Allow Makefiles to append to DEPENDSRCS. Sponsored by: Dell EMC Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Tue Dec 5 02:23:27 2017 (r326550) +++ head/share/mk/bsd.dep.mk Tue Dec 5 02:23:30 2017 (r326551) @@ -178,7 +178,7 @@ DEPEND_MP?= -MP # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. DEPEND_FILTER= C,/,_,g -DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} +DEPENDSRCS+= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} .if !empty(DEPENDSRCS) DEPENDOBJS+= ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,} .endif From owner-svn-src-head@freebsd.org Tue Dec 5 02:23:36 2017 Return-Path: Delivered-To: svn-src-head@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 0381DDB93AC; Tue, 5 Dec 2017 02:23:36 +0000 (UTC) (envelope-from bdrewery@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 34D2864833; Tue, 5 Dec 2017 02:23:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB52NXqT035580; Tue, 5 Dec 2017 02:23:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB52NXnp035579; Tue, 5 Dec 2017 02:23:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712050223.vB52NXnp035579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 02:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326552 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 326552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 02:23:36 -0000 Author: bdrewery Date: Tue Dec 5 02:23:33 2017 New Revision: 326552 URL: https://svnweb.freebsd.org/changeset/base/326552 Log: Fix DPSRCS not getting .depend.* files. Reported by: jhb MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Tue Dec 5 02:23:30 2017 (r326551) +++ head/share/mk/bsd.dep.mk Tue Dec 5 02:23:33 2017 (r326552) @@ -179,6 +179,7 @@ DEPEND_MP?= -MP # avoid collisions. DEPEND_FILTER= C,/,_,g DEPENDSRCS+= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} +DEPENDSRCS+= ${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} .if !empty(DEPENDSRCS) DEPENDOBJS+= ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,} .endif @@ -275,13 +276,12 @@ depend: beforedepend ${DEPENDFILE} afterdepend # Tell bmake not to look for generated files via .PATH .NOPATH: ${DEPENDFILE} ${DEPENDFILES} -DPSRCS+= ${SRCS} # A .depend file will only be generated if there are commands in # beforedepend/_EXTRADEPEND/afterdepend The _EXTRADEPEND target is # ignored if using meta+filemon since it handles all dependencies. The other # targets are kept as they be used for generating something. The target is # kept to allow 'make depend' to generate files. -${DEPENDFILE}: ${DPSRCS} +${DEPENDFILE}: ${SRCS} ${DPSRCS} .if !defined(_SKIP_DEPEND) .if exists(${.OBJDIR}/${DEPENDFILE}) || \ ((commands(beforedepend) || \ From owner-svn-src-head@freebsd.org Tue Dec 5 02:23:38 2017 Return-Path: Delivered-To: svn-src-head@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 E710BDB93E8; Tue, 5 Dec 2017 02:23:38 +0000 (UTC) (envelope-from bdrewery@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 2D2EE648B7; Tue, 5 Dec 2017 02:23:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB52NbLh035627; Tue, 5 Dec 2017 02:23:37 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB52NbHZ035626; Tue, 5 Dec 2017 02:23:37 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712050223.vB52NbHZ035626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 02:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326553 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 326553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 02:23:39 -0000 Author: bdrewery Date: Tue Dec 5 02:23:36 2017 New Revision: 326553 URL: https://svnweb.freebsd.org/changeset/base/326553 Log: native-xtools: Fix build without META_MODE for GCC archs. The initial kernel-toolchain is built with TARGET=MACHINE but we want GCC to have files generated for TARGET=NXB_TARGET instead later on. Just clean the files between building of the toolchain and nxb binaries which will let it rebuild when needed. Reported by: sbruno X-MFC-With: r325001 MFC after: 1 month Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Dec 5 02:23:33 2017 (r326552) +++ head/Makefile.inc1 Tue Dec 5 02:23:36 2017 (r326553) @@ -2274,6 +2274,8 @@ native-xtools: .PHONY # needed build tools are built. ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _includes MK_CLANG=no MK_GCC=no ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _libraries MK_CLANG=no MK_GCC=no + # Clean out improper TARGET=MACHINE files + ${_+_}cd ${.CURDIR}/gnu/usr.bin/cc/cc_tools; ${NXBTMAKE} cleandir .if !defined(NO_OBJWALK) ${_+_}cd ${.CURDIR}; ${NXBMAKE} _obj .endif From owner-svn-src-head@freebsd.org Tue Dec 5 03:55:12 2017 Return-Path: Delivered-To: svn-src-head@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 2998CDEFCD8; Tue, 5 Dec 2017 03:55:12 +0000 (UTC) (envelope-from eadler@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 E8E47687F3; Tue, 5 Dec 2017 03:55:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB53tAZR074049; Tue, 5 Dec 2017 03:55:10 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB53tApl074041; Tue, 5 Dec 2017 03:55:10 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712050355.vB53tApl074041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 5 Dec 2017 03:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee X-SVN-Commit-Revision: 326554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 03:55:12 -0000 Author: eadler Date: Tue Dec 5 03:55:10 2017 New Revision: 326554 URL: https://svnweb.freebsd.org/changeset/base/326554 Log: sponge(1): initial commit sponge(1) is a utility that reads input until complete, then opens the output file, then writes to it. This makes it useful in pipelines that read and write to the same file. Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations) Inspired by: https://joeyh.name/code/moreutils/ Added: head/usr.bin/sponge/ head/usr.bin/sponge/Makefile (contents, props changed) head/usr.bin/sponge/sponge.1 (contents, props changed) head/usr.bin/sponge/sponge.c (contents, props changed) head/usr.bin/sponge/tests/ head/usr.bin/sponge/tests/Makefile (contents, props changed) head/usr.bin/sponge/tests/Makefile.depend (contents, props changed) head/usr.bin/sponge/tests/sponge_test.sh (contents, props changed) Modified: head/.arclint head/usr.bin/tee/tee.1 Modified: head/.arclint ============================================================================== --- head/.arclint Tue Dec 5 02:23:36 2017 (r326553) +++ head/.arclint Tue Dec 5 03:55:10 2017 (r326554) @@ -9,7 +9,8 @@ "type": "spelling" }, "chmod": { - "type": "chmod" + "type": "chmod", + "exclude": "(/tests/)" }, "merge-conflict": { "type": "merge-conflict" Added: head/usr.bin/sponge/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sponge/Makefile Tue Dec 5 03:55:10 2017 (r326554) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +PROG= sponge + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + +.include Added: head/usr.bin/sponge/sponge.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sponge/sponge.1 Tue Dec 5 03:55:10 2017 (r326554) @@ -0,0 +1,75 @@ +.\" Eitan Adler. 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 THE REGENTS 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 THE REGENTS 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 November 1, 2017 +.Dt SPONGE 1 +.Os +.Sh NAME +.Nm sponge +.Nd buffer stdin and write to stdout +.Sh SYNOPSIS +.Nm +.Op Fl a +.Ar filename +.Sh DESCRIPTION +The +.Nm +utility reads standard in until complete, then opens +the output file and writes to it. +This makes it useful in pipelines that read a file and then write to it. +These options are available: +.Bl -tag -width indent +.It Fl a +Open +.Ar filename +in append mode. +.El +.Pp +If an attempt to allocate memory fails, +.Nm +fails without output. +The file is written even if earlier components +of the pipeline failed. +.Sh SEE ALSO +.Xr builtin 1 , +.Xr csh 1 , +.Xr getrusage 2 , +.Xr tee 1 , +.Xr wait 2 +.Sh EXIT STATUS +.Ex -std +.Sh EXAMPLES +A +.Pa file +can be be sorted "in place" by executing +.Cm sort file | sponge file +.Sh HISTORY +The +.Nm +utility was written by +.An Eitan Adler Aq Mt eadler@FreeBSD.org +and first appeared +in +.Fx 12.0 . Added: head/usr.bin/sponge/sponge.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sponge/sponge.c Tue Dec 5 03:55:10 2017 (r326554) @@ -0,0 +1,189 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2017 Eitan Adler + * + * 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 THE REGENTS 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 THE REGENTS 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_BUF_SIZE 16384 +#define DEFAULT_BUF_CNT 12 + +static int flag_append = 0; + +static void usage(void); +static void *safe_malloc(size_t size); +static void *safe_calloc(size_t count, size_t size); +static void *safe_reallocf(void *ptr, size_t size); + +static void * +safe_malloc(size_t size) +{ + void *ret; + + ret = malloc(size); + if (ret == NULL) { + err(1, "malloc failed"); + } + return (ret); +} + +static void * +safe_calloc(size_t count, size_t size) +{ + void *ret; + + ret = calloc(count, size); + if (ret == NULL) { + err(1, "calloc failed"); + } + return (ret); +} + +static void * +safe_reallocf(void *ptr, size_t size) +{ + void *ret; + + ret = reallocf(ptr, size); + if (ret == NULL) { + err(1, "reallocf failed"); + } + return (ret); +} + +static void +usage(void) +{ + fprintf(stderr, "usage: sponge [-a] filename\n"); +} + +int +main(int argc, char* argv[]) +{ + struct iovec *iov; + char *buf; + char *outfile; + ssize_t i; + size_t bufcnt; + size_t whichbuf; + size_t bufremain; + long maxiovec; + int fd; + int openflags = O_WRONLY; + int opt; + + while ((opt = getopt(argc, argv, "ah")) != -1) { + switch (opt) { + case 'a': + flag_append = 1; + break; + case 'h': + usage(); + exit(0); + case '?': + default: + usage(); + exit(1); + } + } + + if (optind < argc) { + outfile = argv[optind]; + } + + + bufcnt = DEFAULT_BUF_CNT; + whichbuf = 0; + iov = safe_calloc(bufcnt, sizeof(*iov)); + + for (;;) { + buf = safe_malloc(DEFAULT_BUF_SIZE); + i = read(STDIN_FILENO, buf, DEFAULT_BUF_SIZE); + if (whichbuf == bufcnt) { + bufcnt *= 2; + iov = safe_reallocf(iov, bufcnt * sizeof(*iov)); + } + if (i < 0) { + err(1, "read failed"); + } + if (i == 0) { + free(buf); + break; + } + iov[whichbuf].iov_base = buf; + iov[whichbuf].iov_len = i; + whichbuf++; + } + + if (outfile) { + if (flag_append) { + openflags |= O_APPEND; + } else { + openflags |= O_TRUNC; + } + fd = open(outfile, openflags); + } + else { + fd = STDOUT_FILENO; + } + + if (fd < 0) { + err(1, "failed to open"); + } + + maxiovec = sysconf(_SC_IOV_MAX); + if (maxiovec == -1) { + maxiovec = _XOPEN_IOV_MAX; + } + bufcnt = whichbuf; + bufremain = bufcnt; + + while (bufremain > 0) { + whichbuf = (bufremain < maxiovec) ? bufremain : maxiovec; + bufremain -= whichbuf; + + i = writev(fd, iov, whichbuf); + if (i < 0) { + err(1, "failed to write"); + } + } + + if (outfile) { + i = close(fd); + if (i < 0) { + err(1, "failed to close"); + } + } +} Added: head/usr.bin/sponge/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sponge/tests/Makefile Tue Dec 5 03:55:10 2017 (r326554) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +PACKAGE= ${TESTBASE}/usr.bin/sponge + +TESTSDIR= ${TESTSBASE}/usr.bin/sponge/tests + +ATF_TESTS_SH= cp_test + +.include Added: head/usr.bin/sponge/tests/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sponge/tests/Makefile.depend Tue Dec 5 03:55:10 2017 (r326554) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/atf/libatf-c \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/usr.bin/sponge/tests/sponge_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sponge/tests/sponge_test.sh Tue Dec 5 03:55:10 2017 (r326554) @@ -0,0 +1,48 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright 2017 Eitan Adler +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * 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 THE COPYRIGHT HOLDERS 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 THE COPYRIGHT +# OWNER 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. + +atf_test_case simple +simple_body() { + printf 'd\ne\na\n' >| x + printf 'a\nd\ne\n' >| y + sort x | sponge x + + atf_check -s exit:0 -o empty -e empty 'sort x | sponge x' + + if ! cmp -s x y; then + echo "x and y differ, but they should be equal" + diff -u x y + atf_fail "Original and copy do not match" + fi + +} + +atf_init_test_cases() { + atf_add_test_case simple +} Modified: head/usr.bin/tee/tee.1 ============================================================================== --- head/usr.bin/tee/tee.1 Tue Dec 5 02:23:36 2017 (r326553) +++ head/usr.bin/tee/tee.1 Tue Dec 5 03:55:10 2017 (r326554) @@ -72,6 +72,8 @@ utility takes the default action for all signals, except in the event of the .Fl i option. +.Sh SEE ALSO +.Xr sponge 1 .Sh EXIT STATUS .Ex -std .Sh STANDARDS From owner-svn-src-head@freebsd.org Tue Dec 5 03:56:53 2017 Return-Path: Delivered-To: svn-src-head@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 1A9BCDEFE70 for ; Tue, 5 Dec 2017 03:56:53 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (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 D4E236897E for ; Tue, 5 Dec 2017 03:56:52 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22b.google.com with SMTP id x199so7600099ywg.5 for ; Mon, 04 Dec 2017 19:56:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=TmFItnHI5nzhLi3omWqUIZ3Wcte+DdetNXqPpZJNJXA=; b=RgvbJCFDF9O3NnKbCEftCPBlgbAs+E0RHUJ933P5lCxeGlYFpQDm2yPaXSmaSlXGHS f0sEuvPi1TobqAY0mZsq2n7SKPYoSezDg2YKSbeLtoDf33EqBv6dF0rai8w/2L9t+dQx a1qtqLjCX7N3th49mtau2OhzdPT9VYVJcN3kE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=TmFItnHI5nzhLi3omWqUIZ3Wcte+DdetNXqPpZJNJXA=; b=LFvg1v5kN2iqeKXbLFSr7XPEwB55NyJrCOZ535FE9JUqIzA+1cw+S/LNsA4Mr0t7SO 6b1jqCNpRM4Up7xsB7vfwuhL4B7vBtAetSGxHA49g/Fh6hp0wOtRsY0suImvO8G/zwbq dXBTy0AmCj/nx8v9kvJEu/kn3q08YARwT0Qe6wYn5ODbPlU8h4Zhh4bSkIEHZ/p8w76Q Gvd4sTFSqh7vBdAyfjEC+57QSviXXl3VkFWQqQa+X37SlIgNNQUJ/8aVM6PhtH0HMP1c AC+M/c66Pkta/8/hCuO7aCNRZCXF8WOqta6mEHiJlYRYjUbL24JJwwA9HDTzkjJFlP16 hhiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=TmFItnHI5nzhLi3omWqUIZ3Wcte+DdetNXqPpZJNJXA=; b=SCmn30s91jlF9Tq4gcukExoIDuRkNfnA4ho7B+qKMel6R8lVNLIkHqt6XfSO7hQ+RX P2yHYmJLrFxZbGY4sf1QwSwUZWoizcFKbj9LtJea+3msMrGab/+IvIpklhDBQzo7djJr DBYOJ8giGS473XRugWKEso1kEZkpPAayHVeP7ydDIiDXFwcDp81vuIKqBZyu8tm82VAS LfgRp15EzlOve8WJOhEu71g9svK2KtZUJjP1E1PZmtONz8yoief4trI4nZq8RnjSGHYz CscX32LCtEFYswECGgahSJSAjeIcARIt6H25+m58liXwkARvXrqB+WYvIsXmRBWSLiKe o8pg== X-Gm-Message-State: AJaThX4aBPVehup2YcmNXR80zsTp3Z75efscmc9Bl5mdE+erpCMWohOd 0musGZDj138LNZyjkzIEDZ4w3X+/hXVqgHgrQuSyCIw9 X-Google-Smtp-Source: AGs4zMYwV4abArk9gJAmhb/iC/lqJrMRr90ukBIJgiAaaTjM3K663wfX2xiSAUKjWiKYki6y4lhtJ70OUKEIv69plyA= X-Received: by 10.129.118.14 with SMTP id r14mr12286589ywc.6.1512446211875; Mon, 04 Dec 2017 19:56:51 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.37.15.66 with HTTP; Mon, 4 Dec 2017 19:56:21 -0800 (PST) In-Reply-To: <201712050355.vB53tApl074041@repo.freebsd.org> References: <201712050355.vB53tApl074041@repo.freebsd.org> From: Eitan Adler Date: Mon, 4 Dec 2017 19:56:21 -0800 X-Google-Sender-Auth: 4MvdDHnKbFYfFNuxtKIZv4kYNg8 Message-ID: Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 03:56:53 -0000 On 4 December 2017 at 19:55, Eitan Adler wrote: > Author: eadler > Date: Tue Dec 5 03:55:10 2017 > New Revision: 326554 > URL: https://svnweb.freebsd.org/changeset/base/326554 Differential Revision: https://reviews.freebsd.org/D12900 Release Notes: yes bah! -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Tue Dec 5 03:57:52 2017 Return-Path: Delivered-To: svn-src-head@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 ABBDBDEFF82; Tue, 5 Dec 2017 03:57:52 +0000 (UTC) (envelope-from eadler@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 78EDC68AEF; Tue, 5 Dec 2017 03:57:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB53vpFF074179; Tue, 5 Dec 2017 03:57:51 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB53vpaG074178; Tue, 5 Dec 2017 03:57:51 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712050357.vB53vpaG074178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 5 Dec 2017 03:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326555 - head/usr.bin/sponge X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/sponge X-SVN-Commit-Revision: 326555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 03:57:52 -0000 Author: eadler Date: Tue Dec 5 03:57:51 2017 New Revision: 326555 URL: https://svnweb.freebsd.org/changeset/base/326555 Log: sponge(1) Minor commit for commit log Differential Revision: https://reviews.freebsd.org/D12900 RelNotes: yes Modified: head/usr.bin/sponge/sponge.c Modified: head/usr.bin/sponge/sponge.c ============================================================================== --- head/usr.bin/sponge/sponge.c Tue Dec 5 03:55:10 2017 (r326554) +++ head/usr.bin/sponge/sponge.c Tue Dec 5 03:57:51 2017 (r326555) @@ -25,6 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD$ + * */ #include From owner-svn-src-head@freebsd.org Tue Dec 5 04:22:37 2017 Return-Path: Delivered-To: svn-src-head@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 E962CDF3105; Tue, 5 Dec 2017 04:22:37 +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 A069B697A1; Tue, 5 Dec 2017 04:22:37 +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 vB54MaYj086571; Tue, 5 Dec 2017 04:22:36 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB54MZHI086561; Tue, 5 Dec 2017 04:22:35 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712050422.vB54MZHI086561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 5 Dec 2017 04:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326556 - in head: etc/mtree usr.bin/dc usr.bin/dc/tests X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: etc/mtree usr.bin/dc usr.bin/dc/tests X-SVN-Commit-Revision: 326556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 04:22:38 -0000 Author: asomers Date: Tue Dec 5 04:22:35 2017 New Revision: 326556 URL: https://svnweb.freebsd.org/changeset/base/326556 Log: dc(1): fix input of non-decimal fractional numbers Inputting fractional non-decimal numbers has never worked correctly in our OpenBSD-derived dc(1). It truncates the input to a number of decimal places equal to the number of hexadecimal (or whatever base) places given on the input. That's unacceptable, because many numbers require more precision to represent in base 10 than in their original bases. Fix this bug by using as many decimal places as needed to represent the input, up to the maximum of the global scale factor. This has one mildly surprising side effect: the scale of a number entered in non-decimal mode will no longer necessarily equal the number of hexadecimal (or whatever base) places given on the input. I think that's an acceptable behavior change, given that inputting fractional non-decimal numbers never worked in the first place, and the man page doesn't specify whether trailing zeros on the input should affect a number's scale. PR: 206230 Reported by: nibbana@gmx.us Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D13336 Added: head/usr.bin/dc/tests/ head/usr.bin/dc/tests/Makefile (contents, props changed) head/usr.bin/dc/tests/inout.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/dc/Makefile head/usr.bin/dc/bcode.c head/usr.bin/dc/bcode.h head/usr.bin/dc/extern.h head/usr.bin/dc/inout.c head/usr.bin/dc/mem.c Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Tue Dec 5 03:57:51 2017 (r326555) +++ head/etc/mtree/BSD.tests.dist Tue Dec 5 04:22:35 2017 (r326556) @@ -654,6 +654,8 @@ .. cut .. + dc + .. diff .. dirname Modified: head/usr.bin/dc/Makefile ============================================================================== --- head/usr.bin/dc/Makefile Tue Dec 5 03:57:51 2017 (r326555) +++ head/usr.bin/dc/Makefile Tue Dec 5 04:22:35 2017 (r326556) @@ -1,8 +1,13 @@ # $FreeBSD$ # $OpenBSD: Makefile,v 1.2 2006/11/26 11:31:09 deraadt Exp $ +.include + PROG= dc SRCS= dc.c bcode.c inout.c mem.c stack.c LIBADD= crypto + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/dc/bcode.c ============================================================================== --- head/usr.bin/dc/bcode.c Tue Dec 5 03:57:51 2017 (r326555) +++ head/usr.bin/dc/bcode.c Tue Dec 5 04:22:35 2017 (r326556) @@ -58,7 +58,6 @@ static __inline void unreadch(void); static __inline char *readline(void); static __inline void src_free(void); -static __inline u_int max(u_int, u_int); static u_long get_ulong(struct number *); static __inline void push_number(struct number *); @@ -326,18 +325,12 @@ pbn(const char *str, const BIGNUM *n) #endif -static __inline u_int -max(u_int a, u_int b) -{ - - return (a > b ? a : b); -} - static unsigned long factors[] = { 0, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }; +/* Multiply n by 10^s */ void scale_number(BIGNUM *n, int s) { @@ -411,6 +404,7 @@ split_number(const struct number *n, BIGNUM *i, BIGNUM } } +/* Change the scale of n to s. Reducing scale may truncate the mantissa */ void normalize(struct number *n, u_int s) { @@ -1067,8 +1061,6 @@ static void bdiv(void) { struct number *a, *b, *r; - BN_CTX *ctx; - u_int scale; a = pop_number(); if (a == NULL) @@ -1079,21 +1071,8 @@ bdiv(void) return; } - r = new_number(); - r->scale = bmachine.scale; - scale = max(a->scale, b->scale); + r = div_number(b, a, bmachine.scale); - if (BN_is_zero(a->number)) - warnx("divide by zero"); - else { - normalize(a, scale); - normalize(b, scale + r->scale); - - ctx = BN_CTX_new(); - bn_checkp(ctx); - bn_check(BN_div(r->number, NULL, b->number, a->number, ctx)); - BN_CTX_free(ctx); - } push_number(r); free_number(a); free_number(b); @@ -1681,7 +1660,7 @@ parse_number(void) unreadch(); push_number(readnumber(&bmachine.readstack[bmachine.readsp], - bmachine.ibase)); + bmachine.ibase, bmachine.scale)); } static void Modified: head/usr.bin/dc/bcode.h ============================================================================== --- head/usr.bin/dc/bcode.h Tue Dec 5 03:57:51 2017 (r326555) +++ head/usr.bin/dc/bcode.h Tue Dec 5 04:22:35 2017 (r326556) @@ -95,3 +95,10 @@ void negate(struct number *); void split_number(const struct number *, BIGNUM *, BIGNUM *); void bmul_number(struct number *, struct number *, struct number *, u_int scale); + +static __inline u_int +max(u_int a, u_int b) +{ + + return (a > b ? a : b); +} Modified: head/usr.bin/dc/extern.h ============================================================================== --- head/usr.bin/dc/extern.h Tue Dec 5 03:57:51 2017 (r326555) +++ head/usr.bin/dc/extern.h Tue Dec 5 04:22:35 2017 (r326556) @@ -24,7 +24,7 @@ /* inout.c */ void src_setstream(struct source *, FILE *); void src_setstring(struct source *, char *); -struct number *readnumber(struct source *, u_int); +struct number *readnumber(struct source *, u_int, u_int); void printnumber(FILE *, const struct number *, u_int); char *read_string(struct source *); void print_value(FILE *, const struct value *, const char *, u_int); @@ -33,6 +33,7 @@ void print_ascii(FILE *, const struct number *); /* mem.c */ struct number *new_number(void); void free_number(struct number *); +struct number *div_number(struct number *, struct number *, u_int scale); struct number *dup_number(const struct number *); void *bmalloc(size_t); void *breallocarray(void *, size_t, size_t); Modified: head/usr.bin/dc/inout.c ============================================================================== --- head/usr.bin/dc/inout.c Tue Dec 5 03:57:51 2017 (r326555) +++ head/usr.bin/dc/inout.c Tue Dec 5 04:22:35 2017 (r326556) @@ -183,12 +183,12 @@ printwrap(FILE *f, const char *p) } struct number * -readnumber(struct source *src, u_int base) +readnumber(struct source *src, u_int base, u_int bscale) { struct number *n; BN_ULONG v; - u_int i; int ch; + u_int iscale = 0; bool dot = false, sign = false; n = new_number(); @@ -213,15 +213,48 @@ readnumber(struct source *src, u_int base) break; } if (dot) - n->scale++; + iscale++; bn_check(BN_mul_word(n->number, base)); bn_check(BN_add_word(n->number, v)); } - if (base != 10) { - scale_number(n->number, n->scale); - for (i = 0; i < n->scale; i++) - BN_div_word(n->number, base); + if (base == 10) { + n->scale = iscale; + } else { + /* At this point, the desired result is n->number / base^iscale*/ + struct number *quotient, *divisor, *_n; + BIGNUM *base_n, *exponent; + BN_CTX *ctx; + + ctx = BN_CTX_new(); + base_n = BN_new(); + exponent = BN_new(); + divisor = new_number(); + bn_check(BN_zero(base_n)); + bn_check(BN_zero(exponent)); + + bn_check(BN_add_word(base_n, base)); + bn_check(BN_add_word(exponent, iscale)); + bn_check(BN_exp(divisor->number, base_n, exponent, ctx)); + divisor->scale = 0; + quotient = div_number(n, divisor, bscale); + _n = n; + n = quotient; + + /* + * Trim off trailing zeros to yield the smallest scale without + * loss of accuracy + */ + while ( n->scale > 0 && + BN_mod_word(n->number, 10) == 0) { + normalize(n, n->scale - 1); + } + + free_number(_n); + free_number(divisor); + BN_CTX_free(ctx); + BN_free(base_n); + BN_free(exponent); } if (sign) negate(n); Modified: head/usr.bin/dc/mem.c ============================================================================== --- head/usr.bin/dc/mem.c Tue Dec 5 03:57:51 2017 (r326555) +++ head/usr.bin/dc/mem.c Tue Dec 5 04:22:35 2017 (r326556) @@ -22,6 +22,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -46,6 +47,37 @@ free_number(struct number *n) BN_free(n->number); free(n); +} + +/* + * Divide dividend by divisor, returning the result. Retain bscale places of + * precision. + * The result must be freed when no longer in use + */ +struct number * +div_number(struct number *dividend, struct number *divisor, u_int bscale) +{ + struct number *quotient; + BN_CTX *ctx; + u_int scale; + + quotient = new_number(); + quotient->scale = bscale; + scale = max(divisor->scale, dividend->scale); + + if (BN_is_zero(divisor->number)) + warnx("divide by zero"); + else { + normalize(divisor, scale); + normalize(dividend, scale + quotient->scale); + + ctx = BN_CTX_new(); + bn_checkp(ctx); + bn_check(BN_div(quotient->number, NULL, dividend->number, + divisor->number, ctx)); + BN_CTX_free(ctx); + } + return (quotient); } struct number * Added: head/usr.bin/dc/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/dc/tests/Makefile Tue Dec 5 04:22:35 2017 (r326556) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= inout + +.include Added: head/usr.bin/dc/tests/inout.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/dc/tests/inout.sh Tue Dec 5 04:22:35 2017 (r326556) @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2017 Alan Somers +# 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 THE 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 THE 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$ + +atf_test_case base16_input +base16_input_head() +{ + atf_set "descr" "Input hexadecimal numbers" +} +base16_input_body() +{ + cat > input.dc << EOF +4k # set scale to 4 decimal places +16i # switch to base 16 +0 p +10 p +1 p +1. p # The '.' should have no effect +1.0 p # Unlike with decimal, should not change the result's scale +.8 p # Can input fractions +# Check that we can input fractions that need more scale in base 10 than in 16 +# See PR 206230 +.1 p +.10 p # Result should be .0625, with scale=4 +.01 p # Result should be truncated to scale=4 +8k # Increase scale to 8 places +.01 p # Result should be exact again +0.1 p # Leading zeros are ignored +00.1 p # Leading zeros are ignored +EOF +dc input.dc > output.txt +cat > expect.txt << EOF +0 +16 +1 +1 +1 +.5 +.0625 +.0625 +.0039 +.00390625 +.0625 +.0625 +EOF + atf_check cmp expect.txt output.txt +} + +atf_test_case base3_input +base3_input_head() +{ + atf_set "descr" "Input ternary numbers" +} +base3_input_body() +{ + cat > input.dc << EOF +4k # 4 digits of precision +3i # Base 3 input +0 p +1 p +10 p +.1 p # Repeating fractions get truncated +EOF +dc input.dc > output.txt +cat > expect.txt << EOF +0 +1 +3 +.3333 +EOF + atf_check cmp expect.txt output.txt +} + +atf_init_test_cases() +{ + atf_add_test_case base16_input + atf_add_test_case base3_input +} From owner-svn-src-head@freebsd.org Tue Dec 5 04:37:08 2017 Return-Path: Delivered-To: svn-src-head@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 6343DDF3AB2; Tue, 5 Dec 2017 04:37:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) (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 D845569E5B; Tue, 5 Dec 2017 04:37:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f48.google.com with SMTP id m11so15011109iti.1; Mon, 04 Dec 2017 20:37:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=rcgw9PaRfCyP3bwptkHfcT/uGD9irXys1iXUWgIQSiU=; b=NIt8K5xN1i8gG4oQO7wRNY1ACy7XMU5zVHp0f6a0bNrOia2iewZkH9gOcagBiR+VN9 9jKDoErYsGbmaRYGmPF1qPMltcH7Q4C71yoX1FUz6eAdwMEOAb2zWBYEbABQSfW2At/o WnC98aAzmySUGj+4MEv2hyedVWMK8qo+UkoJP+poV0REn5k4Kwd1lK/cEDX8RpTR7+gr DTr/9Ka2nmaz+/bdAQ0dNb336drW4VvNr3ygf1S2BKJ8MW5jDNHEq79f1KE2YxG1yeEP gOP5C3w0BqNg7Yc3gTc7sknMi8oU98sNYIy/kc75IKCWLFO8+6X+RJ9QT+jckKPfSWpq ABcA== X-Gm-Message-State: AKGB3mLCJCZuZDPl85br6wQFOg/AdHFJ/ESURMezHILO/8jRzxDRD2C+ FxTAIRnI46ZOgJxujdCbpygolNRM X-Google-Smtp-Source: AGs4zMa5BddNWLbFexA0IBrXEfrByBLpbAP4RvuO+yphZhtEIeL0R84qy6m8mrlXLEDMpq+ngc7azw== X-Received: by 10.36.16.208 with SMTP id 199mr17243097ity.0.1512448206807; Mon, 04 Dec 2017 20:30:06 -0800 (PST) Received: from mail-it0-f51.google.com (mail-it0-f51.google.com. [209.85.214.51]) by smtp.gmail.com with ESMTPSA id v129sm391583ioe.39.2017.12.04.20.30.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 20:30:06 -0800 (PST) Received: by mail-it0-f51.google.com with SMTP id 68so12157533ite.4; Mon, 04 Dec 2017 20:30:06 -0800 (PST) X-Received: by 10.36.69.4 with SMTP id y4mr8190966ita.75.1512448206414; Mon, 04 Dec 2017 20:30:06 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Mon, 4 Dec 2017 20:30:05 -0800 (PST) In-Reply-To: <201712050355.vB53tApl074041@repo.freebsd.org> References: <201712050355.vB53tApl074041@repo.freebsd.org> From: Conrad Meyer Date: Mon, 4 Dec 2017 20:30:05 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 04:37:08 -0000 On Mon, Dec 4, 2017 at 7:55 PM, Eitan Adler wrote: > Author: eadler > Date: Tue Dec 5 03:55:10 2017 > New Revision: 326554 > URL: https://svnweb.freebsd.org/changeset/base/326554 > > Log: > sponge(1): initial commit > > sponge(1) is a utility that reads input until > complete, then opens the output file, then > writes to it. This makes it useful in pipelines > that read and write to the same file. > > Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations) I don't recall reviewing this in any iteration, but I could be mistaken. Best, Conrad From owner-svn-src-head@freebsd.org Tue Dec 5 04:40:49 2017 Return-Path: Delivered-To: svn-src-head@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 34A4DDF3CCC; Tue, 5 Dec 2017 04:40:49 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) (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 A3B106A02A; Tue, 5 Dec 2017 04:40:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f45.google.com with SMTP id f143so12222352itb.0; Mon, 04 Dec 2017 20:40:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=6uVLrb91Oeemamd1UMP4OYX8iuJ5Vna+YgZJVrlyKuk=; b=sO14cKM/dXwYqzpmoK9zauIg7mpl4buhI3aY5Jv2HzlIGlOYQGLEfkhyb47V8DRZmo V8mgj832KQFqA7V9T2fEYy5/t/iB1XV5ETa832vn+f6JWUkuzmw7nN8+DXnRRqFVz7l6 5YgcJvNcwN2m+SiyLn/HWoQlHMnai3lSUuVjlKeF7kDpKoyTEsps5ijO8t4ZNLxHJuJ5 ib26XRj/vpuNDfJt3H3Dst9cfvWG9Llzcf7UEpn10C2vi83yhxE5xlA2mFUNPOg6WuI3 k0OjmZwLQXl85AbD8WkOWqifTSaLWklipiAi95KIFYec7/Q2Ns3RJpLcKl8S25mmFrHI onLw== X-Gm-Message-State: AKGB3mLlfaLGfctS6TcMSVr3Vm6AH9AMf1Iygu22b+mrMFxiil6LxKxo 3umNCtDVYHLWPRBawEYw3ts32bXn X-Google-Smtp-Source: AGs4zMZg8eC6btp2R4onGuwKpda0VdAmJErNqew/K4JhhzyHSQT2DpPMEbKhAyC0r8r/Y42QTj6hhA== X-Received: by 10.107.41.70 with SMTP id p67mr11761012iop.142.1512448847689; Mon, 04 Dec 2017 20:40:47 -0800 (PST) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com. [209.85.214.47]) by smtp.gmail.com with ESMTPSA id o137sm4802016ito.5.2017.12.04.20.40.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 20:40:47 -0800 (PST) Received: by mail-it0-f47.google.com with SMTP id x28so18392734ita.0; Mon, 04 Dec 2017 20:40:47 -0800 (PST) X-Received: by 10.36.192.2 with SMTP id u2mr16000769itf.119.1512448847457; Mon, 04 Dec 2017 20:40:47 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Mon, 4 Dec 2017 20:40:47 -0800 (PST) In-Reply-To: References: <201712050355.vB53tApl074041@repo.freebsd.org> From: Conrad Meyer Date: Mon, 4 Dec 2017 20:40:47 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 04:40:49 -0000 On Mon, Dec 4, 2017 at 8:30 PM, Conrad Meyer wrote: > On Mon, Dec 4, 2017 at 7:55 PM, Eitan Adler wrote: >> Author: eadler >> Date: Tue Dec 5 03:55:10 2017 >> New Revision: 326554 >> URL: https://svnweb.freebsd.org/changeset/base/326554 >> >> Log: >> sponge(1): initial commit >> >> sponge(1) is a utility that reads input until >> complete, then opens the output file, then >> writes to it. This makes it useful in pipelines >> that read and write to the same file. >> >> Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations) > > I don't recall reviewing this in any iteration, but I could be mistaken. > > Best, > Conrad In fact I don't think any of the listed reviewers approved the change, at least in phabricator. The "Reviewed by" line signifies not just giving feedback, but approval of the final (or near-final) change. Best, Conrad From owner-svn-src-head@freebsd.org Tue Dec 5 04:43:41 2017 Return-Path: Delivered-To: svn-src-head@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 5F562DF3F4F; Tue, 5 Dec 2017 04:43:41 +0000 (UTC) (envelope-from eadler@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 2BB8C6A404; Tue, 5 Dec 2017 04:43:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB54heus095192; Tue, 5 Dec 2017 04:43:40 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB54hdGf095188; Tue, 5 Dec 2017 04:43:39 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712050443.vB54hdGf095188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 5 Dec 2017 04:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326557 - in head: etc/mtree usr.bin usr.bin/sponge/tests X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: etc/mtree usr.bin usr.bin/sponge/tests X-SVN-Commit-Revision: 326557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 04:43:41 -0000 Author: eadler Date: Tue Dec 5 04:43:39 2017 New Revision: 326557 URL: https://svnweb.freebsd.org/changeset/base/326557 Log: sponge(1): fix my tests Reviewed by: kevans Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/Makefile head/usr.bin/sponge/tests/Makefile head/usr.bin/sponge/tests/sponge_test.sh Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Tue Dec 5 04:22:35 2017 (r326556) +++ head/etc/mtree/BSD.tests.dist Tue Dec 5 04:43:39 2017 (r326557) @@ -712,6 +712,8 @@ .. soelim .. + sponge + .. stat .. tail Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Dec 5 04:22:35 2017 (r326556) +++ head/usr.bin/Makefile Tue Dec 5 04:43:39 2017 (r326557) @@ -148,6 +148,7 @@ SUBDIR= alias \ soelim \ sort \ split \ + sponge \ stat \ stdbuf \ strings \ Modified: head/usr.bin/sponge/tests/Makefile ============================================================================== --- head/usr.bin/sponge/tests/Makefile Tue Dec 5 04:22:35 2017 (r326556) +++ head/usr.bin/sponge/tests/Makefile Tue Dec 5 04:43:39 2017 (r326557) @@ -1,9 +1,9 @@ # $FreeBSD$ -PACKAGE= ${TESTBASE}/usr.bin/sponge +PACKAGE= tests -TESTSDIR= ${TESTSBASE}/usr.bin/sponge/tests +TESTSDIR= ${TESTSBASE}/usr.bin/sponge -ATF_TESTS_SH= cp_test +ATF_TESTS_SH= sponge_test .include Modified: head/usr.bin/sponge/tests/sponge_test.sh ============================================================================== --- head/usr.bin/sponge/tests/sponge_test.sh Tue Dec 5 04:22:35 2017 (r326556) +++ head/usr.bin/sponge/tests/sponge_test.sh Tue Dec 5 04:43:39 2017 (r326557) @@ -33,7 +33,7 @@ simple_body() { printf 'a\nd\ne\n' >| y sort x | sponge x - atf_check -s exit:0 -o empty -e empty 'sort x | sponge x' + atf_check -s exit:0 -o empty -e empty -x 'sort x | sponge x' if ! cmp -s x y; then echo "x and y differ, but they should be equal" From owner-svn-src-head@freebsd.org Tue Dec 5 05:02:47 2017 Return-Path: Delivered-To: svn-src-head@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 B310BDF4906; Tue, 5 Dec 2017 05:02:47 +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 79CAF6AC48; Tue, 5 Dec 2017 05:02:47 +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 vB552kRP003362; Tue, 5 Dec 2017 05:02:46 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB552kWN003359; Tue, 5 Dec 2017 05:02:46 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201712050502.vB552kWN003359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 5 Dec 2017 05:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326558 - in head: . usr.sbin/fdformat X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: . usr.sbin/fdformat X-SVN-Commit-Revision: 326558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 05:02:47 -0000 Author: cy Date: Tue Dec 5 05:02:46 2017 New Revision: 326558 URL: https://svnweb.freebsd.org/changeset/base/326558 Log: fdformat is a sysadmin command and thus its man page should be in volume 8 instead of volume 1. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13370 Added: head/usr.sbin/fdformat/fdformat.8 - copied, changed from r326557, head/usr.sbin/fdformat/fdformat.1 Deleted: head/usr.sbin/fdformat/fdformat.1 Modified: head/ObsoleteFiles.inc head/usr.sbin/fdformat/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 5 04:43:39 2017 (r326557) +++ head/ObsoleteFiles.inc Tue Dec 5 05:02:46 2017 (r326558) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20171204: Move fdformat man page from volume 1 to volume 8. +OLD_FILES+=usr/share/man/man8/fdformat.1.gz # 20171203: libproc version bump OLD_LIBS+=usr/lib/libproc.so.4 OLD_LIBS+=usr/lib32/libproc.so.4 Modified: head/usr.sbin/fdformat/Makefile ============================================================================== --- head/usr.sbin/fdformat/Makefile Tue Dec 5 04:43:39 2017 (r326557) +++ head/usr.sbin/fdformat/Makefile Tue Dec 5 05:02:46 2017 (r326558) @@ -3,6 +3,7 @@ .PATH: ${.CURDIR:H}/fdread PROG= fdformat +MAN= fdformat.8 SRCS= fdformat.c fdutil.c CFLAGS+= -I${.CURDIR:H}/fdread Copied and modified: head/usr.sbin/fdformat/fdformat.8 (from r326557, head/usr.sbin/fdformat/fdformat.1) ============================================================================== --- head/usr.sbin/fdformat/fdformat.1 Tue Dec 5 04:43:39 2017 (r326557, copy source) +++ head/usr.sbin/fdformat/fdformat.8 Tue Dec 5 05:02:46 2017 (r326558) @@ -24,8 +24,8 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2001 -.Dt FDFORMAT 1 +.Dd December 4, 2017 +.Dt FDFORMAT 8 .Os .Sh NAME .Nm fdformat From owner-svn-src-head@freebsd.org Tue Dec 5 07:01:12 2017 Return-Path: Delivered-To: svn-src-head@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 588ADDF8A56; Tue, 5 Dec 2017 07:01:12 +0000 (UTC) (envelope-from delphij@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 257456DBD2; Tue, 5 Dec 2017 07:01:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB571BYm051649; Tue, 5 Dec 2017 07:01:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB571Bka051648; Tue, 5 Dec 2017 07:01:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712050701.vB571Bka051648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 5 Dec 2017 07:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326560 - head/usr.bin/gzip X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/usr.bin/gzip X-SVN-Commit-Revision: 326560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 07:01:12 -0000 Author: delphij Date: Tue Dec 5 07:01:10 2017 New Revision: 326560 URL: https://svnweb.freebsd.org/changeset/base/326560 Log: Create links for xzdiff. MFC after: 2 weeks Modified: head/usr.bin/gzip/Makefile Modified: head/usr.bin/gzip/Makefile ============================================================================== --- head/usr.bin/gzip/Makefile Tue Dec 5 06:43:58 2017 (r326559) +++ head/usr.bin/gzip/Makefile Tue Dec 5 07:01:10 2017 (r326560) @@ -20,11 +20,13 @@ MLINKS+= gzip.1 gunzip.1 \ gzip.1 gzcat.1 \ gzip.1 zcat.1 \ zdiff.1 zcmp.1 \ + zdiff.1 xzdiff.1 \ zmore.1 zless.1 LINKS+= ${BINDIR}/gzip ${BINDIR}/gunzip \ ${BINDIR}/gzip ${BINDIR}/gzcat \ ${BINDIR}/gzip ${BINDIR}/zcat \ + ${BINDIR}/zdiff ${BINDIR}/xzdiff \ ${BINDIR}/zdiff ${BINDIR}/zcmp HAS_TESTS= From owner-svn-src-head@freebsd.org Tue Dec 5 07:11:57 2017 Return-Path: Delivered-To: svn-src-head@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 57C70DF9031; Tue, 5 Dec 2017 07:11:57 +0000 (UTC) (envelope-from delphij@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 245B56E26E; Tue, 5 Dec 2017 07:11:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB57BuLc056801; Tue, 5 Dec 2017 07:11:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB57BuGx056800; Tue, 5 Dec 2017 07:11:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712050711.vB57BuGx056800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 5 Dec 2017 07:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326561 - head/usr.bin/su X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/usr.bin/su X-SVN-Commit-Revision: 326561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 07:11:57 -0000 Author: delphij Date: Tue Dec 5 07:11:56 2017 New Revision: 326561 URL: https://svnweb.freebsd.org/changeset/base/326561 Log: Use strlcpy(). MFC after: 2 weeks Modified: head/usr.bin/su/su.c Modified: head/usr.bin/su/su.c ============================================================================== --- head/usr.bin/su/su.c Tue Dec 5 07:01:10 2017 (r326560) +++ head/usr.bin/su/su.c Tue Dec 5 07:11:56 2017 (r326561) @@ -277,9 +277,9 @@ main(int argc, char *argv[]) if (asme) { if (pwd->pw_shell != NULL && *pwd->pw_shell != '\0') { /* must copy - pwd memory is recycled */ - shell = strncpy(shellbuf, pwd->pw_shell, + strlcpy(shellbuf, pwd->pw_shell, sizeof(shellbuf)); - shellbuf[sizeof(shellbuf) - 1] = '\0'; + shell = shellbuf; } else { shell = _PATH_BSHELL; From owner-svn-src-head@freebsd.org Tue Dec 5 07:13:39 2017 Return-Path: Delivered-To: svn-src-head@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 727E9DF913F; Tue, 5 Dec 2017 07:13:39 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27FB26E438; Tue, 5 Dec 2017 07:13:39 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:37a:f8d3:155b:2cc1:2db8]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 677DE30A5D; Mon, 4 Dec 2017 23:13:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1512458013; x=1512472413; bh=T7qxsIy8jK/ES+VlS/G4lyEkQfc7yLBJbTAd4j2rOwU=; h=Reply-To:Subject:To:References:From:Date:In-Reply-To; b=kB5a/avYP+jKVMu9mjFVk69/xN6mvcWYhDX1M+QdMbrGECtLXrIP3jhGCX3qtejV8 pQDAGc9iAxAbAs9kk5mT9zbAKzsfhcRUem7B3VEF46YoFUCICkSbbe/aFThCXhT1v2 VOkql1vf6Xq0OiPCeNsTFKWX65fcPbH1bPKv+6uk= Reply-To: d@delphij.net Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712050355.vB53tApl074041@repo.freebsd.org> From: Xin Li Message-ID: <5820aa2d-461b-479b-883a-6a4dfbf3d536@delphij.net> Date: Mon, 4 Dec 2017 23:13:29 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201712050355.vB53tApl074041@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="m5hDSFox32P6BnHdI2HdP50tp7L6fN5Rv" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 07:13:39 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --m5hDSFox32P6BnHdI2HdP50tp7L6fN5Rv Content-Type: multipart/mixed; boundary="nlqLrLHkQ4Fp6unQPibqV6FFP5Rm7pImO"; protected-headers="v1" From: Xin Li Reply-To: d@delphij.net To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <5820aa2d-461b-479b-883a-6a4dfbf3d536@delphij.net> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee References: <201712050355.vB53tApl074041@repo.freebsd.org> In-Reply-To: <201712050355.vB53tApl074041@repo.freebsd.org> --nlqLrLHkQ4Fp6unQPibqV6FFP5Rm7pImO Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/4/17 19:55, Eitan Adler wrote: > Added: head/usr.bin/sponge/sponge.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/sponge.1 Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,75 @@ > +.\" Eitan Adler. All rights reserved. > +.\" This doesn't seem right, have you missed a line? Cheers, --nlqLrLHkQ4Fp6unQPibqV6FFP5Rm7pImO-- --m5hDSFox32P6BnHdI2HdP50tp7L6fN5Rv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJaJkccAAoJEJW2GBstM+ns8rgP/iXG+SY3BdU76rlya0jPl3z6 fG0k6ddD09gUDK8kvAA2XN3JinV40U7k2OSYhyG6L+KGCsH+WzUOGjJzlOCQ8mGq V6CxS00Fid3n6dW6opKnkTPFENxhv1LAzaxUSo7gbxKiA+2Yvpg/otevEvNFDDeb +hlp9jxbc4t4VhMs96ysgjIUKm7zUyK04dD3X6Ynsno4d8Tu9k/AHhzvVa06Np8/ vmf8n7PV/LeDJz1H6xUbyq9Zjlq0GNa1LwhSM03YayrFjs6gCI7005KzMBT/3lAk xC9c3yKI47ELSt5DAuFFc5jB+RQ4A9CWUr2z7MXk2sNwfMXKnUmAJEVrHHrV2Bus 4uAiEbK18u/8wU7HArmlta/JZkRQtVWyTxeNd6tMmEfkRToXthRtZhpuwMIN9XuL 2Ws8Twqqcn1g69idLhkKDHiJGcWJgeCBiapI9HA/twygvtYQ7Mjmfs4czsk2bdAz oMAznY0fzTHOA82WpWSx+IPH1xNgqOqQRLMr9oO7L1A/x0M9tBhW0D5eO+FJhiuP FnK0KsG6I/HrMr3XsfPw7sEQhl4puyc7yjnqQW6MzJy3YHlI9CTA21Rt+BPSs0e/ LvgZLSWq/hwXFeJFqPf4vhstm0c0/V4cqol68VvW8YSOl8AdZBnQB+HifWTAoRiu sa5W7Mm6HH5xQaiOMQGA =9k0X -----END PGP SIGNATURE----- --m5hDSFox32P6BnHdI2HdP50tp7L6fN5Rv-- From owner-svn-src-head@freebsd.org Tue Dec 5 07:21:49 2017 Return-Path: Delivered-To: svn-src-head@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 05E33DF962D; Tue, 5 Dec 2017 07:21:49 +0000 (UTC) (envelope-from delphij@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 C6F4A6E8E9; Tue, 5 Dec 2017 07:21:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB57LlHM059353; Tue, 5 Dec 2017 07:21:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB57LlRS059352; Tue, 5 Dec 2017 07:21:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201712050721.vB57LlRS059352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 5 Dec 2017 07:21:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326562 - head/libexec/ftpd X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/libexec/ftpd X-SVN-Commit-Revision: 326562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 07:21:49 -0000 Author: delphij Date: Tue Dec 5 07:21:47 2017 New Revision: 326562 URL: https://svnweb.freebsd.org/changeset/base/326562 Log: Use strlcpy(). MFC after: 2 weeks Modified: head/libexec/ftpd/ftpd.c Modified: head/libexec/ftpd/ftpd.c ============================================================================== --- head/libexec/ftpd/ftpd.c Tue Dec 5 07:11:56 2017 (r326561) +++ head/libexec/ftpd/ftpd.c Tue Dec 5 07:21:47 2017 (r326562) @@ -1077,7 +1077,7 @@ user(char *name) } } if (logging) - strncpy(curname, name, sizeof(curname)-1); + strlcpy(curname, name, sizeof(curname)); pwok = 0; #ifdef USE_PAM From owner-svn-src-head@freebsd.org Tue Dec 5 08:25:19 2017 Return-Path: Delivered-To: svn-src-head@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 B2831DFC3F3; Tue, 5 Dec 2017 08:25:19 +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 8A0E27094D; Tue, 5 Dec 2017 08:25:19 +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 vB58PIIV087025; Tue, 5 Dec 2017 08:25:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB58PI1g087019; Tue, 5 Dec 2017 08:25:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712050825.vB58PI1g087019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 5 Dec 2017 08:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326563 - in head/contrib/ofed: infiniband-diags/build libibnetdisc opensm/complib opensm/libopensm opensm/libvendor opensm/opensm X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/contrib/ofed: infiniband-diags/build libibnetdisc opensm/complib opensm/libopensm opensm/libvendor opensm/opensm X-SVN-Commit-Revision: 326563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 08:25:19 -0000 Author: hselasky Date: Tue Dec 5 08:25:17 2017 New Revision: 326563 URL: https://svnweb.freebsd.org/changeset/base/326563 Log: Correctly prefix the infiniband include directory for buildworld. This fixes the OFED buildworld target, WITH_OFED=YES, when the include files are not already installed locally, but only in the temporary object directory. Found by: kib Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/infiniband-diags/build/Makefile.inc head/contrib/ofed/libibnetdisc/Makefile head/contrib/ofed/opensm/complib/Makefile head/contrib/ofed/opensm/libopensm/Makefile head/contrib/ofed/opensm/libvendor/Makefile head/contrib/ofed/opensm/opensm/Makefile Modified: head/contrib/ofed/infiniband-diags/build/Makefile.inc ============================================================================== --- head/contrib/ofed/infiniband-diags/build/Makefile.inc Tue Dec 5 07:21:47 2017 (r326562) +++ head/contrib/ofed/infiniband-diags/build/Makefile.inc Tue Dec 5 08:25:17 2017 (r326563) @@ -4,7 +4,7 @@ BINDIR?= /usr/bin SRCS+= ibdiag_common.c ibdiag_sa.c -CFLAGS+= -I${INCLUDEDIR}/infiniband +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -I${.CURDIR}/../../ CFLAGS+= -I${.CURDIR}/../../src Modified: head/contrib/ofed/libibnetdisc/Makefile ============================================================================== --- head/contrib/ofed/libibnetdisc/Makefile Tue Dec 5 07:21:47 2017 (r326562) +++ head/contrib/ofed/libibnetdisc/Makefile Tue Dec 5 08:25:17 2017 (r326563) @@ -27,7 +27,7 @@ ibnd_show_progress.3 LIBADD= osmcomp ibmad ibumad CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -I${.CURDIR} -CFLAGS+= -I${INCLUDEDIR}/infiniband +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband VERSION_MAP= ${.CURDIR}/libibnetdisc.map .include Modified: head/contrib/ofed/opensm/complib/Makefile ============================================================================== --- head/contrib/ofed/opensm/complib/Makefile Tue Dec 5 07:21:47 2017 (r326562) +++ head/contrib/ofed/opensm/complib/Makefile Tue Dec 5 08:25:17 2017 (r326563) @@ -27,7 +27,7 @@ cl_vector.c \ ib_statustext.c CFLAGS+= -I${.CURDIR}/.. -DHAVE_CONFIG_H=1 -CFLAGS+= -I${INCLUDEDIR}/infiniband +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband LIBADD= pthread VERSION_MAP= ${.CURDIR}/libosmcomp.map Modified: head/contrib/ofed/opensm/libopensm/Makefile ============================================================================== --- head/contrib/ofed/opensm/libopensm/Makefile Tue Dec 5 07:21:47 2017 (r326562) +++ head/contrib/ofed/opensm/libopensm/Makefile Tue Dec 5 08:25:17 2017 (r326563) @@ -14,7 +14,7 @@ osm_helper.c LIBADD= pthread CFLAGS+= -I${.CURDIR}/.. -DHAVE_CONFIG_H=1 -CFLAGS+= -I${INCLUDEDIR}/infiniband +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband VERSION_MAP= ${.CURDIR}/../opensm/libopensm.map .include Modified: head/contrib/ofed/opensm/libvendor/Makefile ============================================================================== --- head/contrib/ofed/opensm/libvendor/Makefile Tue Dec 5 07:21:47 2017 (r326562) +++ head/contrib/ofed/opensm/libvendor/Makefile Tue Dec 5 08:25:17 2017 (r326563) @@ -13,7 +13,7 @@ osm_vendor_ibumad_sa.c LIBADD= ibumad pthread CFLAGS+= -I${.CURDIR}/.. -DHAVE_CONFIG_H=1 -CFLAGS+= -I${INCLUDEDIR}/infiniband +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband VERSION_MAP= ${.CURDIR}/libosmvendor.map .include Modified: head/contrib/ofed/opensm/opensm/Makefile ============================================================================== --- head/contrib/ofed/opensm/opensm/Makefile Tue Dec 5 07:21:47 2017 (r326562) +++ head/contrib/ofed/opensm/opensm/Makefile Tue Dec 5 08:25:17 2017 (r326563) @@ -95,7 +95,7 @@ st.c MAN= opensm.8 CFLAGS+= -I${.CURDIR}/.. -DHAVE_CONFIG_H=1 -CFLAGS+= -I${INCLUDEDIR}/infiniband +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband LIBADD= opensm osmvendor osmcomp wrap pthread .include From owner-svn-src-head@freebsd.org Tue Dec 5 08:43:52 2017 Return-Path: Delivered-To: svn-src-head@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 C17CEDFCF58; Tue, 5 Dec 2017 08:43:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 4E250712C7; Tue, 5 Dec 2017 08:43:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vB58hjTj049702 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Dec 2017 10:43:46 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vB58hjTj049702 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vB58hj9c049701; Tue, 5 Dec 2017 10:43:45 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 5 Dec 2017 10:43:45 +0200 From: Konstantin Belousov To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee Message-ID: <20171205084345.GR2272@kib.kiev.ua> References: <201712050355.vB53tApl074041@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712050355.vB53tApl074041@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 08:43:52 -0000 On Tue, Dec 05, 2017 at 03:55:10AM +0000, Eitan Adler wrote: > Author: eadler > Date: Tue Dec 5 03:55:10 2017 > New Revision: 326554 > URL: https://svnweb.freebsd.org/changeset/base/326554 > > Log: > sponge(1): initial commit > > sponge(1) is a utility that reads input until > complete, then opens the output file, then > writes to it. This makes it useful in pipelines > that read and write to the same file. > > Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations) > Inspired by: https://joeyh.name/code/moreutils/ > > Added: > head/usr.bin/sponge/ > head/usr.bin/sponge/Makefile (contents, props changed) > head/usr.bin/sponge/sponge.1 (contents, props changed) > head/usr.bin/sponge/sponge.c (contents, props changed) > head/usr.bin/sponge/tests/ > head/usr.bin/sponge/tests/Makefile (contents, props changed) > head/usr.bin/sponge/tests/Makefile.depend (contents, props changed) > head/usr.bin/sponge/tests/sponge_test.sh (contents, props changed) > Modified: > head/.arclint > head/usr.bin/tee/tee.1 > > Modified: head/.arclint > ============================================================================== > --- head/.arclint Tue Dec 5 02:23:36 2017 (r326553) > +++ head/.arclint Tue Dec 5 03:55:10 2017 (r326554) > @@ -9,7 +9,8 @@ > "type": "spelling" > }, > "chmod": { > - "type": "chmod" > + "type": "chmod", > + "exclude": "(/tests/)" > }, > "merge-conflict": { > "type": "merge-conflict" > > Added: head/usr.bin/sponge/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/Makefile Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,8 @@ > +# $FreeBSD$ > + > +PROG= sponge > + > +HAS_TESTS= > +SUBDIR.${MK_TESTS}+= tests > + > +.include > > Added: head/usr.bin/sponge/sponge.1 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/sponge.1 Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,75 @@ > +.\" Eitan Adler. 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 THE REGENTS 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 THE REGENTS 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 November 1, 2017 > +.Dt SPONGE 1 > +.Os > +.Sh NAME > +.Nm sponge > +.Nd buffer stdin and write to stdout > +.Sh SYNOPSIS > +.Nm > +.Op Fl a > +.Ar filename > +.Sh DESCRIPTION > +The > +.Nm > +utility reads standard in until complete, then opens > +the output file and writes to it. > +This makes it useful in pipelines that read a file and then write to it. > +These options are available: > +.Bl -tag -width indent > +.It Fl a > +Open > +.Ar filename > +in append mode. > +.El > +.Pp > +If an attempt to allocate memory fails, > +.Nm > +fails without output. > +The file is written even if earlier components > +of the pipeline failed. > +.Sh SEE ALSO > +.Xr builtin 1 , > +.Xr csh 1 , > +.Xr getrusage 2 , > +.Xr tee 1 , > +.Xr wait 2 > +.Sh EXIT STATUS > +.Ex -std > +.Sh EXAMPLES > +A > +.Pa file > +can be be sorted "in place" by executing > +.Cm sort file | sponge file > +.Sh HISTORY > +The > +.Nm > +utility was written by > +.An Eitan Adler Aq Mt eadler@FreeBSD.org > +and first appeared > +in > +.Fx 12.0 . > > Added: head/usr.bin/sponge/sponge.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/sponge.c Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,189 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2017 Eitan Adler > + * > + * 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 THE REGENTS 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 THE REGENTS 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$ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define DEFAULT_BUF_SIZE 16384 > +#define DEFAULT_BUF_CNT 12 > + > +static int flag_append = 0; > + > +static void usage(void); > +static void *safe_malloc(size_t size); > +static void *safe_calloc(size_t count, size_t size); > +static void *safe_reallocf(void *ptr, size_t size); > + > +static void * > +safe_malloc(size_t size) > +{ > + void *ret; > + > + ret = malloc(size); > + if (ret == NULL) { > + err(1, "malloc failed"); > + } > + return (ret); > +} > + > +static void * > +safe_calloc(size_t count, size_t size) > +{ > + void *ret; > + > + ret = calloc(count, size); > + if (ret == NULL) { > + err(1, "calloc failed"); > + } > + return (ret); > +} > + > +static void * > +safe_reallocf(void *ptr, size_t size) > +{ > + void *ret; > + > + ret = reallocf(ptr, size); > + if (ret == NULL) { > + err(1, "reallocf failed"); > + } > + return (ret); > +} > + > +static void > +usage(void) > +{ > + fprintf(stderr, "usage: sponge [-a] filename\n"); > +} > + > +int > +main(int argc, char* argv[]) > +{ > + struct iovec *iov; > + char *buf; > + char *outfile; > + ssize_t i; > + size_t bufcnt; > + size_t whichbuf; > + size_t bufremain; > + long maxiovec; > + int fd; > + int openflags = O_WRONLY; > + int opt; > + > + while ((opt = getopt(argc, argv, "ah")) != -1) { > + switch (opt) { > + case 'a': > + flag_append = 1; > + break; > + case 'h': > + usage(); > + exit(0); > + case '?': > + default: > + usage(); > + exit(1); > + } > + } > + > + if (optind < argc) { > + outfile = argv[optind]; > + } > + > + > + bufcnt = DEFAULT_BUF_CNT; > + whichbuf = 0; > + iov = safe_calloc(bufcnt, sizeof(*iov)); > + > + for (;;) { > + buf = safe_malloc(DEFAULT_BUF_SIZE); > + i = read(STDIN_FILENO, buf, DEFAULT_BUF_SIZE); > + if (whichbuf == bufcnt) { > + bufcnt *= 2; > + iov = safe_reallocf(iov, bufcnt * sizeof(*iov)); > + } > + if (i < 0) { > + err(1, "read failed"); > + } > + if (i == 0) { > + free(buf); > + break; > + } > + iov[whichbuf].iov_base = buf; > + iov[whichbuf].iov_len = i; > + whichbuf++; > + } > + > + if (outfile) { > + if (flag_append) { > + openflags |= O_APPEND; > + } else { > + openflags |= O_TRUNC; > + } > + fd = open(outfile, openflags); > + } > + else { > + fd = STDOUT_FILENO; > + } > + > + if (fd < 0) { > + err(1, "failed to open"); > + } > + > + maxiovec = sysconf(_SC_IOV_MAX); > + if (maxiovec == -1) { > + maxiovec = _XOPEN_IOV_MAX; > + } > + bufcnt = whichbuf; > + bufremain = bufcnt; > + > + while (bufremain > 0) { > + whichbuf = (bufremain < maxiovec) ? bufremain : maxiovec; > + bufremain -= whichbuf; > + > + i = writev(fd, iov, whichbuf); > + if (i < 0) { > + err(1, "failed to write"); > + } > + } This loop is nonsensical. From owner-svn-src-head@freebsd.org Tue Dec 5 09:08:49 2017 Return-Path: Delivered-To: svn-src-head@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 C9A6ADFE146; Tue, 5 Dec 2017 09:08:49 +0000 (UTC) (envelope-from cperciva@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 9424271E52; Tue, 5 Dec 2017 09:08:49 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB598m64003989; Tue, 5 Dec 2017 09:08:48 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB598mDk003988; Tue, 5 Dec 2017 09:08:48 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712050908.vB598mDk003988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 5 Dec 2017 09:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326564 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 326564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 09:08:49 -0000 Author: cperciva Date: Tue Dec 5 09:08:48 2017 New Revision: 326564 URL: https://svnweb.freebsd.org/changeset/base/326564 Log: Resurrect r321659: Turn off ChallengeResponseAuthentication for EC2 AMIs. EC2 instances are normally launched with an SSH public key specified, which is then used for logging in (by default, as 'ec2-user'). Having ChallengeResponseAuthentication enabled (as FreeBSD's default sshd_config does) has no functional effect in a new EC2 instance, since you can't log in using a password until a password has been set -- but having this enabled results in alerts from automated scanning tools which can detect that sshd advertises support for keyboard-interactive logins (since they can't detect that accounts have no password set). EC2 users who want to use passwords to log in to their instances will need to set 'ChallengeResponseAuthentication yes' in FreeBSD 12.0 and later. Discussed with: gjb, gtetlow, emaste, des Requested by: Amazon X-MFC: No Relnotes: ChallengeResponseAuthentication is turned off by default in Amazon EC2 AMIs. Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Tue Dec 5 08:25:17 2017 (r326563) +++ head/release/tools/ec2.conf Tue Dec 5 09:08:48 2017 (r326564) @@ -81,6 +81,12 @@ vm_extra_pre_umount() { # Load the kernel module for the Amazon "Elastic Network Adapter" echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf + # Disable ChallengeResponseAuthentication according to EC2 + # requirements. + sed -i '' -e \ + 's/^#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' \ + ${DESTDIR}/etc/ssh/sshd_config + # The first time the AMI boots, the installed "first boot" scripts # should be allowed to run: # * ec2_configinit (download and process EC2 user-data) From owner-svn-src-head@freebsd.org Tue Dec 5 09:22:15 2017 Return-Path: Delivered-To: svn-src-head@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 C4139DFE9CA; Tue, 5 Dec 2017 09:22:15 +0000 (UTC) (envelope-from cperciva@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 90710727BA; Tue, 5 Dec 2017 09:22:15 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB59MEQJ009380; Tue, 5 Dec 2017 09:22:14 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB59MEBT009379; Tue, 5 Dec 2017 09:22:14 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712050922.vB59MEBT009379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 5 Dec 2017 09:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326565 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 326565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 09:22:15 -0000 Author: cperciva Date: Tue Dec 5 09:22:14 2017 New Revision: 326565 URL: https://svnweb.freebsd.org/changeset/base/326565 Log: Make EC2 instances use Amazon's NTP service for time synchronization. Since Amazon provides NTP servers within their network, this should be far superior to using the default NTP pools; and since the service is provided by Amazon there's very little risk in enabling it by default. (If someone is able to compromise Amazon's NTP servers and exploit them to attack EC2 instances, they would almost certainly be able to compromise EC2 instances even without ntpd running...) MFC after: 1 week Relnotes: EC2 instances now keep their clocks synchronized using the Amazon Time Sync Service (aka. NTP). Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Tue Dec 5 09:08:48 2017 (r326564) +++ head/release/tools/ec2.conf Tue Dec 5 09:22:14 2017 (r326565) @@ -9,7 +9,7 @@ export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient amazon-ssm-agent" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs" +export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" # Build with a 3 GB UFS partition; the growfs rc.d script will expand # the partition to fill the root disk after the EC2 instance is launched. @@ -86,6 +86,11 @@ vm_extra_pre_umount() { sed -i '' -e \ 's/^#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' \ ${DESTDIR}/etc/ssh/sshd_config + + # Use the NTP service provided by Amazon + sed -i '' -e 's/^pool/#pool/' \ + -e 's/^#server.*/server 169.254.169.123 iburst/' \ + ${DESTDIR}/etc/ntp.conf # The first time the AMI boots, the installed "first boot" scripts # should be allowed to run: From owner-svn-src-head@freebsd.org Tue Dec 5 10:43:11 2017 Return-Path: Delivered-To: svn-src-head@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 7B38AE5D34B for ; Tue, 5 Dec 2017 10:43:11 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x241.google.com (mail-yw0-x241.google.com [IPv6:2607:f8b0:4002:c05::241]) (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 40F7C751E8 for ; Tue, 5 Dec 2017 10:43:11 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x241.google.com with SMTP id w128so7929510ywa.1 for ; Tue, 05 Dec 2017 02:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SeI0Hx3YQ5Pk9FnVKN3kX3BCgjbSVv7HxGcMijtaKw8=; b=O6Kv+No3FjA9s/mGXCj/Are+cowYMkFN/wMGuAKWE5ie9GbE/FduC6yqWHoyjBqEas jBaHfaaADIL8ia3fTjhyT+E5c+MXsEUUDi8vDC86AxjSANLM/qiSVkPdaZ94ps67B5+q jO7agluvM+MJtB8loGWa0WRiKmKIJ5R+bk2FMQ+cMXjuHPW8/oT/E4BteDazlelEdJlw drh00BQyHWSrH2G2jCwL4SG2bbmwHzEUiyctKdNuS5zQqckxAb2BRapejUjmQF+Q0HkH Zl+MYlo00wZNvg2g+dHca57W/Ubqp4w9XsuDteHQP46eZnnUgzJq6R0qBi4Vm43XfFcZ IllA== 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:cc; bh=SeI0Hx3YQ5Pk9FnVKN3kX3BCgjbSVv7HxGcMijtaKw8=; b=L20qR/jYg8WV8vtaq9WmveCqCtVdjOifV8OQ2BCIGzbxN8H16H6dthxp5ZSqXlWNkb yFfdvUqE6dJHmqU2PaJC/48f1Ni8+SsPfApS2hoRm4LfebDy2XzS9SWgRbtYwgBBuF3W 3pjV3S6MrPDB95v1JciL72ncmAs4vcbtJ6PGWFBjGd4bZPKSRxpDp1MjpBNM4ltBd/ON TI8BW7Hune5vouGFgTm5fUFjQn6qatZ5cZyj21fFcm7o+5n4+ziS7iRQPlWLJGEJs+gR ItaaYmbfmyNaAgOQNDfuh/HF91gf8f79U6CkddIowTLjEtvYLG4jMlVm2lhAhHQpC5l3 p+1Q== X-Gm-Message-State: AJaThX7CAdDb7PGRrPVDFqqzgjinnDyIitTY1SUy1RDlYjErFUunRYBP drt2buWPUdmtLHXwY7xmLdlIbDwVilrbpQ2cKgi32w== X-Google-Smtp-Source: AGs4zMYmEaB4E7+9W8s5rxcxOdfc+azkJ5UQIplD0JFaVsLFpoVrVCFp/sAN6AEecQp5aNtii+vgATWNmDgGZFUrGvs= X-Received: by 10.13.224.69 with SMTP id j66mr11995615ywe.430.1512470590244; Tue, 05 Dec 2017 02:43:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.85.17 with HTTP; Tue, 5 Dec 2017 02:42:39 -0800 (PST) In-Reply-To: <201712050502.vB552kWN003359@repo.freebsd.org> References: <201712050502.vB552kWN003359@repo.freebsd.org> From: Ed Schouten Date: Tue, 5 Dec 2017 11:42:39 +0100 Message-ID: Subject: Re: svn commit: r326558 - in head: . usr.sbin/fdformat To: Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 10:43:11 -0000 2017-12-05 6:02 GMT+01:00 Cy Schubert : > +OLD_FILES+=usr/share/man/man8/fdformat.1.gz s/man8/man1/, right? :-) -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-head@freebsd.org Tue Dec 5 11:54:54 2017 Return-Path: Delivered-To: svn-src-head@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 AE87FE5FA2C; Tue, 5 Dec 2017 11:54:54 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D14177596; Tue, 5 Dec 2017 11:54:54 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1129) id 9B03CF04F; Tue, 5 Dec 2017 11:54:53 +0000 (UTC) Date: Tue, 5 Dec 2017 11:54:53 +0000 From: Li-Wen Hsu To: Eitan Adler Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee Message-ID: <20171205115453.GA87559@freefall.freebsd.org> References: <201712050355.vB53tApl074041@repo.freebsd.org> <20171205084345.GR2272@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20171205084345.GR2272@kib.kiev.ua> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 11:54:54 -0000 On Tue, Dec 05, 2017 at 10:43:45 +0200, Konstantin Belousov wrote: > On Tue, Dec 05, 2017 at 03:55:10AM +0000, Eitan Adler wrote: > > Author: eadler > > Date: Tue Dec 5 03:55:10 2017 > > New Revision: 326554 > > URL: https://svnweb.freebsd.org/changeset/base/326554 [...] > > Added: head/usr.bin/sponge/sponge.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/usr.bin/sponge/sponge.c Tue Dec 5 03:55:10 2017 (r326554) [...] > > + while (bufremain > 0) { > > + whichbuf =3D (bufremain < maxiovec) ? bufremain : maxiovec; > > + bufremain -=3D whichbuf; > > + > > + i =3D writev(fd, iov, whichbuf); > > + if (i < 0) { > > + err(1, "failed to write"); > > + } > > + } > This loop is nonsensical. Also breaks build: /usr/src/usr.bin/sponge/sponge.c:175:25: error: comparison of integers of d= ifferent signs: 'size_t' (aka 'unsigned long') and 'long' [-Werror,-Wsign-c= ompare] whichbuf =3D (bufremain < maxiovec) ? bufremain : maxiovec; ~~~~~~~~~ ^ ~~~~~~~~ 1 error generated. Ref: https://ci.freebsd.org/job/FreeBSD-head-amd64-build/6187/console Please check this. Thanks, Li-Wen --=20 Li-Wen Hsu https://lwhsu.org From owner-svn-src-head@freebsd.org Tue Dec 5 12:58:48 2017 Return-Path: Delivered-To: svn-src-head@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 A76B3E69197; Tue, 5 Dec 2017 12:58:48 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 804BB79741; Tue, 5 Dec 2017 12:58:48 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vB5CwkTW051357; Tue, 5 Dec 2017 04:58:46 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vB5CwjQN051356; Tue, 5 Dec 2017 04:58:45 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee In-Reply-To: To: cem@freebsd.org Date: Tue, 5 Dec 2017 04:58:45 -0800 (PST) CC: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 12:58:48 -0000 [ Charset UTF-8 unsupported, converting... ] > On Mon, Dec 4, 2017 at 7:55 PM, Eitan Adler wrote: > > Author: eadler > > Date: Tue Dec 5 03:55:10 2017 > > New Revision: 326554 > > URL: https://svnweb.freebsd.org/changeset/base/326554 > > > > Log: > > sponge(1): initial commit > > > > sponge(1) is a utility that reads input until > > complete, then opens the output file, then > > writes to it. This makes it useful in pipelines > > that read and write to the same file. > > > > Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations) > > I don't recall reviewing this in any iteration, but I could be mistaken. I do not see any of these names with checks in the reviewed by box, providing feedback in a review != reviewed by unless they have accepted it. Further more, why does freebsd need this in base? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Dec 5 13:02:48 2017 Return-Path: Delivered-To: svn-src-head@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 C0418E693DE; Tue, 5 Dec 2017 13:02:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 8AB2179B21; Tue, 5 Dec 2017 13:02:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B67EA2603A1; Tue, 5 Dec 2017 14:02:45 +0100 (CET) Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: rgrimes@freebsd.org, cem@freebsd.org Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> From: Hans Petter Selasky Message-ID: <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> Date: Tue, 5 Dec 2017 14:00:00 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 13:02:48 -0000 On 12/05/17 13:58, Rodney W. Grimes wrote: > Further more, why does freebsd need this in base? Hi, I think this is useful. It could replace the "-i " (intermediate) option for "sed" for example. It avoids creating temporary files when filtering files, right? --HPS From owner-svn-src-head@freebsd.org Tue Dec 5 13:11:32 2017 Return-Path: Delivered-To: svn-src-head@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 B8C0FE6964D; Tue, 5 Dec 2017 13:11:32 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF96779F4E; Tue, 5 Dec 2017 13:11:31 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vB5DBUai051428; Tue, 5 Dec 2017 05:11:30 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vB5DBUGV051427; Tue, 5 Dec 2017 05:11:30 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712051311.vB5DBUGV051427@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee In-Reply-To: <201712050355.vB53tApl074041@repo.freebsd.org> To: Eitan Adler Date: Tue, 5 Dec 2017 05:11:30 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 13:11:32 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: eadler > Date: Tue Dec 5 03:55:10 2017 > New Revision: 326554 > URL: https://svnweb.freebsd.org/changeset/base/326554 > > Log: > sponge(1): initial commit > > sponge(1) is a utility that reads input until > complete, then opens the output file, then > writes to it. This makes it useful in pipelines > that read and write to the same file. > > Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations) > Inspired by: https://joeyh.name/code/moreutils/ > > Added: > head/usr.bin/sponge/ > head/usr.bin/sponge/Makefile (contents, props changed) > head/usr.bin/sponge/sponge.1 (contents, props changed) > head/usr.bin/sponge/sponge.c (contents, props changed) > head/usr.bin/sponge/tests/ > head/usr.bin/sponge/tests/Makefile (contents, props changed) > head/usr.bin/sponge/tests/Makefile.depend (contents, props changed) > head/usr.bin/sponge/tests/sponge_test.sh (contents, props changed) > Modified: > head/.arclint > head/usr.bin/tee/tee.1 > > Modified: head/.arclint > ============================================================================== > --- head/.arclint Tue Dec 5 02:23:36 2017 (r326553) > +++ head/.arclint Tue Dec 5 03:55:10 2017 (r326554) > @@ -9,7 +9,8 @@ > "type": "spelling" > }, > "chmod": { > - "type": "chmod" > + "type": "chmod", > + "exclude": "(/tests/)" WHAT????? > }, > "merge-conflict": { > "type": "merge-conflict" > > Added: head/usr.bin/sponge/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/Makefile Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,8 @@ > +# $FreeBSD$ > + > +PROG= sponge > + > +HAS_TESTS= > +SUBDIR.${MK_TESTS}+= tests > + > +.include > > Added: head/usr.bin/sponge/sponge.1 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/sponge.1 Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,75 @@ > +.\" Eitan Adler. All rights reserved. This is not a proper form of copyright, it is missing the legal requirement of the word "copyright" and the required date. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd November 1, 2017 > +.Dt SPONGE 1 > +.Os > +.Sh NAME > +.Nm sponge > +.Nd buffer stdin and write to stdout > +.Sh SYNOPSIS > +.Nm > +.Op Fl a > +.Ar filename > +.Sh DESCRIPTION > +The > +.Nm > +utility reads standard in until complete, then opens Best way to format manual pages is to break lines at each clause of a sentance, this should of been broken at the , > +the output file and writes to it. > +This makes it useful in pipelines that read a file and then write to it. Break at and > +These options are available: > +.Bl -tag -width indent > +.It Fl a > +Open > +.Ar filename > +in append mode. > +.El > +.Pp > +If an attempt to allocate memory fails, > +.Nm > +fails without output. > +The file is written even if earlier components > +of the pipeline failed. > +.Sh SEE ALSO > +.Xr builtin 1 , > +.Xr csh 1 , > +.Xr getrusage 2 , > +.Xr tee 1 , > +.Xr wait 2 > +.Sh EXIT STATUS > +.Ex -std > +.Sh EXAMPLES > +A > +.Pa file > +can be be sorted "in place" by executing > +.Cm sort file | sponge file > +.Sh HISTORY > +The > +.Nm > +utility was written by > +.An Eitan Adler Aq Mt eadler@FreeBSD.org > +and first appeared > +in > +.Fx 12.0 . > > Added: head/usr.bin/sponge/sponge.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/sponge.c Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,189 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2017 Eitan Adler Now thats how a copyright should look. > + * > + * 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 THE REGENTS 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 THE REGENTS 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$ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define DEFAULT_BUF_SIZE 16384 > +#define DEFAULT_BUF_CNT 12 > + > +static int flag_append = 0; > + > +static void usage(void); > +static void *safe_malloc(size_t size); > +static void *safe_calloc(size_t count, size_t size); > +static void *safe_reallocf(void *ptr, size_t size); > + > +static void * > +safe_malloc(size_t size) > +{ > + void *ret; > + > + ret = malloc(size); > + if (ret == NULL) { > + err(1, "malloc failed"); > + } > + return (ret); > +} > + > +static void * > +safe_calloc(size_t count, size_t size) > +{ > + void *ret; > + > + ret = calloc(count, size); > + if (ret == NULL) { > + err(1, "calloc failed"); > + } > + return (ret); > +} > + > +static void * > +safe_reallocf(void *ptr, size_t size) > +{ > + void *ret; > + > + ret = reallocf(ptr, size); > + if (ret == NULL) { > + err(1, "reallocf failed"); > + } > + return (ret); > +} > + > +static void > +usage(void) > +{ > + fprintf(stderr, "usage: sponge [-a] filename\n"); > +} > + > +int > +main(int argc, char* argv[]) > +{ > + struct iovec *iov; > + char *buf; > + char *outfile; > + ssize_t i; > + size_t bufcnt; > + size_t whichbuf; > + size_t bufremain; > + long maxiovec; > + int fd; > + int openflags = O_WRONLY; > + int opt; > + > + while ((opt = getopt(argc, argv, "ah")) != -1) { > + switch (opt) { > + case 'a': > + flag_append = 1; > + break; > + case 'h': > + usage(); > + exit(0); > + case '?': > + default: > + usage(); > + exit(1); > + } > + } > + > + if (optind < argc) { > + outfile = argv[optind]; > + } > + > + > + bufcnt = DEFAULT_BUF_CNT; > + whichbuf = 0; > + iov = safe_calloc(bufcnt, sizeof(*iov)); > + > + for (;;) { > + buf = safe_malloc(DEFAULT_BUF_SIZE); > + i = read(STDIN_FILENO, buf, DEFAULT_BUF_SIZE); > + if (whichbuf == bufcnt) { > + bufcnt *= 2; > + iov = safe_reallocf(iov, bufcnt * sizeof(*iov)); > + } > + if (i < 0) { > + err(1, "read failed"); > + } > + if (i == 0) { > + free(buf); > + break; > + } > + iov[whichbuf].iov_base = buf; > + iov[whichbuf].iov_len = i; > + whichbuf++; > + } > + > + if (outfile) { > + if (flag_append) { > + openflags |= O_APPEND; > + } else { > + openflags |= O_TRUNC; > + } > + fd = open(outfile, openflags); > + } > + else { > + fd = STDOUT_FILENO; > + } > + > + if (fd < 0) { > + err(1, "failed to open"); > + } > + > + maxiovec = sysconf(_SC_IOV_MAX); > + if (maxiovec == -1) { > + maxiovec = _XOPEN_IOV_MAX; > + } > + bufcnt = whichbuf; > + bufremain = bufcnt; > + > + while (bufremain > 0) { > + whichbuf = (bufremain < maxiovec) ? bufremain : maxiovec; > + bufremain -= whichbuf; > + > + i = writev(fd, iov, whichbuf); > + if (i < 0) { > + err(1, "failed to write"); > + } > + } > + > + if (outfile) { > + i = close(fd); > + if (i < 0) { > + err(1, "failed to close"); > + } > + } > +} > > Added: head/usr.bin/sponge/tests/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/tests/Makefile Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,9 @@ > +# $FreeBSD$ > + > +PACKAGE= ${TESTBASE}/usr.bin/sponge > + > +TESTSDIR= ${TESTSBASE}/usr.bin/sponge/tests > + > +ATF_TESTS_SH= cp_test > + > +.include > > Added: head/usr.bin/sponge/tests/Makefile.depend > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/tests/Makefile.depend Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,18 @@ > +# $FreeBSD$ > +# Autogenerated - do NOT edit! > + > +DIRDEPS = \ > + gnu/lib/csu \ > + include \ > + include/xlocale \ > + lib/${CSU_DIR} \ > + lib/atf/libatf-c \ > + lib/libc \ > + lib/libcompiler_rt \ > + > + > +.include > + > +.if ${DEP_RELDIR} == ${_DEP_RELDIR} > +# local dependencies - needed for -jN in clean tree > +.endif > > Added: head/usr.bin/sponge/tests/sponge_test.sh > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/tests/sponge_test.sh Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,48 @@ > +# $FreeBSD$ > +# > +# SPDX-License-Identifier: BSD-2-Clause > +# > +# Copyright 2017 Eitan Adler > +# All rights reserved. > +# > +# Redistribution and use in source and binary forms, with or without > +# modification, are permitted provided that the following conditions are > +# met: > +# > +# * Redistributions of source code must retain the above copyright > +# notice, this list of conditions and the following disclaimer. > +# * 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 THE COPYRIGHT HOLDERS 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 THE COPYRIGHT > +# OWNER 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. > + > +atf_test_case simple > +simple_body() { > + printf 'd\ne\na\n' >| x > + printf 'a\nd\ne\n' >| y > + sort x | sponge x > + > + atf_check -s exit:0 -o empty -e empty 'sort x | sponge x' > + > + if ! cmp -s x y; then > + echo "x and y differ, but they should be equal" > + diff -u x y > + atf_fail "Original and copy do not match" > + fi > + > +} > + > +atf_init_test_cases() { > + atf_add_test_case simple > +} > > Modified: head/usr.bin/tee/tee.1 > ============================================================================== > --- head/usr.bin/tee/tee.1 Tue Dec 5 02:23:36 2017 (r326553) > +++ head/usr.bin/tee/tee.1 Tue Dec 5 03:55:10 2017 (r326554) > @@ -72,6 +72,8 @@ utility takes the default action for all signals, > except in the event of the > .Fl i > option. > +.Sh SEE ALSO > +.Xr sponge 1 > .Sh EXIT STATUS > .Ex -std > .Sh STANDARDS > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Dec 5 13:41:22 2017 Return-Path: Delivered-To: svn-src-head@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 BB888E6A2E4; Tue, 5 Dec 2017 13:41:22 +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 892207AB5D; Tue, 5 Dec 2017 13:41:22 +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 vB5DfLQY019347; Tue, 5 Dec 2017 13:41:21 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5DfLcc019346; Tue, 5 Dec 2017 13:41:21 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201712051341.vB5DfLcc019346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 5 Dec 2017 13:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326566 - head X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 326566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 13:41:22 -0000 Author: cy Date: Tue Dec 5 13:41:21 2017 New Revision: 326566 URL: https://svnweb.freebsd.org/changeset/base/326566 Log: Fix cut & paste error from r326558. Reported by: ed MFC after: 1 week X-MFC with: r326558 Pointy hat to: cy Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 5 09:22:14 2017 (r326565) +++ head/ObsoleteFiles.inc Tue Dec 5 13:41:21 2017 (r326566) @@ -39,7 +39,7 @@ # done # 20171204: Move fdformat man page from volume 1 to volume 8. -OLD_FILES+=usr/share/man/man8/fdformat.1.gz +OLD_FILES+=usr/share/man/man1/fdformat.1.gz # 20171203: libproc version bump OLD_LIBS+=usr/lib/libproc.so.4 OLD_LIBS+=usr/lib32/libproc.so.4 From owner-svn-src-head@freebsd.org Tue Dec 5 13:41:54 2017 Return-Path: Delivered-To: svn-src-head@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 B7745E6A37B; Tue, 5 Dec 2017 13:41:54 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 67F017AD05; Tue, 5 Dec 2017 13:41:53 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MDTkeH7ljp2osMDTlet8db; Tue, 05 Dec 2017 06:41:47 -0700 X-Authority-Analysis: v=2.2 cv=KLEqNBNo c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=ocR9PWop10UA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=0YD4RRMh8QEX0geJxRYA:9 a=CjuIK1q_8ugA:10 a=vRcdKC0ogzYA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 24D1979C; Tue, 5 Dec 2017 05:41:44 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vB5DfhCm028426; Tue, 5 Dec 2017 05:41:43 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vB5DfheP028423; Tue, 5 Dec 2017 05:41:43 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712051341.vB5DfheP028423@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ed Schouten cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326558 - in head: . usr.sbin/fdformat In-Reply-To: Message from Ed Schouten of "Tue, 05 Dec 2017 11:42:39 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 Dec 2017 05:41:43 -0800 X-CMAE-Envelope: MS4wfAJ6l1ZkyuJFBy8wV1wi9TgYfspp3M5KkIoD5s3cIah0Lb3XZfT7L/DaY8/Dx4849QvrGmAuTxPxnm+u6NMZM/EuqWrlYRIjlGhCsbj/7mNcDYIGoodB pL+t6Oi94Li8VM5Kmj/EvuKYyDkillaBoX105F5RwBgv/X9yrpY5JURKa5Ugd+kBEnAQkTCIJ+hJgOxC+tTWnuM8TzNOGd5xy0k9fMHMQ6hZn44OuMdDwXZq P6joSaux7S8Loh+CZQQ9ETM2rLTgXleGZd69LcKlYKtGLjn1K8MUVbGW+fcIEHiU X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 13:41:54 -0000 In message , Ed Schouten writes: > 2017-12-05 6:02 GMT+01:00 Cy Schubert : > > +OLD_FILES+=usr/share/man/man8/fdformat.1.gz > > s/man8/man1/, right? :-) Thank you for pointing this out Ed. Fixed in 326566. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Tue Dec 5 13:44:20 2017 Return-Path: Delivered-To: svn-src-head@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 86051E6A4E1; Tue, 5 Dec 2017 13:44:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 0B1AF7B0E5; Tue, 5 Dec 2017 13:44:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vB5Di937021710 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Dec 2017 15:44:10 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vB5Di937021710 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vB5Di9Ig021709; Tue, 5 Dec 2017 15:44:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 5 Dec 2017 15:44:09 +0200 From: Konstantin Belousov To: Hans Petter Selasky Cc: rgrimes@freebsd.org, cem@freebsd.org, Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee Message-ID: <20171205134409.GV2272@kib.kiev.ua> References: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 13:44:20 -0000 On Tue, Dec 05, 2017 at 02:00:00PM +0100, Hans Petter Selasky wrote: > On 12/05/17 13:58, Rodney W. Grimes wrote: > > Further more, why does freebsd need this in base? > > Hi, > > I think this is useful. It could replace the "-i " (intermediate) option > for "sed" for example. It avoids creating temporary files when filtering > files, right? No, if process fails during the operation, user data is destroyed irretrievable.The usual trick of creating temporary file and renaming ensure that old file is around until all data for new file is written into buffer cache. With some existing filesystem support, it also guarantees that the old file is around in case of the system crash. All this assuming the tool' code matches its description, which is not. From owner-svn-src-head@freebsd.org Tue Dec 5 14:22:09 2017 Return-Path: Delivered-To: svn-src-head@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 7A6ADE6B518; Tue, 5 Dec 2017 14:22:09 +0000 (UTC) (envelope-from avg@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 480B47C654; Tue, 5 Dec 2017 14:22:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5EM8Zh035277; Tue, 5 Dec 2017 14:22:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5EM8MH035276; Tue, 5 Dec 2017 14:22:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201712051422.vB5EM8MH035276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 5 Dec 2017 14:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326567 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 326567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 14:22:09 -0000 Author: avg Date: Tue Dec 5 14:22:08 2017 New Revision: 326567 URL: https://svnweb.freebsd.org/changeset/base/326567 Log: ddb: fix validation of cpu id in 'set db_cpu=x' MFC after: 1 week Modified: head/sys/ddb/db_sym.c Modified: head/sys/ddb/db_sym.c ============================================================================== --- head/sys/ddb/db_sym.c Tue Dec 5 13:41:21 2017 (r326566) +++ head/sys/ddb/db_sym.c Tue Dec 5 14:22:08 2017 (r326567) @@ -85,8 +85,8 @@ db_var_db_cpu(struct db_variable *vp, db_expr_t *value return (1); case DB_VAR_SET: - if (*(int *)valuep < -1 && *(int *)valuep > mp_maxid) { - db_printf("Invalid value: %d", *(int*)valuep); + if (*(int *)valuep < -1 || *(int *)valuep > mp_maxid) { + db_printf("Invalid value: %d\n", *(int*)valuep); return (0); } db_cpu = *(int *)valuep; From owner-svn-src-head@freebsd.org Tue Dec 5 14:34:24 2017 Return-Path: Delivered-To: svn-src-head@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 127C4E6BB5F; Tue, 5 Dec 2017 14:34:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A63ED7CDB3; Tue, 5 Dec 2017 14:34:23 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MEIfeHJkBp2osMEIgetGGF; Tue, 05 Dec 2017 07:34:22 -0700 X-Authority-Analysis: v=2.2 cv=KLEqNBNo c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=ocR9PWop10UA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=1NTNnuwJfOf4legJbHwA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 2F050840; Tue, 5 Dec 2017 06:34:21 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vB5EYKsB034448; Tue, 5 Dec 2017 06:34:20 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vB5EYK30034427; Tue, 5 Dec 2017 06:34:20 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712051434.vB5EYK30034427@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: cem@freebsd.org, Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee In-Reply-To: Message from "Rodney W. Grimes" of "Tue, 05 Dec 2017 04:58:45 -0800." <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 Dec 2017 06:34:20 -0800 X-CMAE-Envelope: MS4wfFiCjxNnU4882z7n/FAWOt4YXZSNlvbp/ZH3mOizCDV7ClL+rFamnS2xK6gRmZD48tkIAVTlmYVpHRWkA4dwmesWlAC92/C+po0vUCFCgb2MbO+OSe5V uCYKiIWai98wS9ubQ9UEMiMlcfxVJSqNLNa9xqSEbF1mZ4AG2xY4tDfsTilKBiWFu00Iyo7cc3IjZGyzPnZEBVSn90+nb6cwDKTXEQXifsNAqojkbn3McNGn BUSUBgGwArZ2rkv4fpNecBrggyi1QcWGesziXEQX8HRJAlLXZHzi0N3L4PGkzo82boEBD1Z92DZ+tRyZa4qOS4caTNWWomilEE//LKQ9jCU= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 14:34:24 -0000 In message <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net>, "Rodney W. Gri mes" writes: > [ Charset UTF-8 unsupported, converting... ] > > On Mon, Dec 4, 2017 at 7:55 PM, Eitan Adler wrote: > > > Author: eadler > > > Date: Tue Dec 5 03:55:10 2017 > > > New Revision: 326554 > > > URL: https://svnweb.freebsd.org/changeset/base/326554 > > > > > > Log: > > > sponge(1): initial commit > > > > > > sponge(1) is a utility that reads input until > > > complete, then opens the output file, then > > > writes to it. This makes it useful in pipelines > > > that read and write to the same file. > > > > > > Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations) > > > > I don't recall reviewing this in any iteration, but I could be mistaken. > > I do not see any of these names with checks in the reviewed by box, > providing feedback in a review != reviewed by unless they have > accepted it. > > Further more, why does freebsd need this in base? When I saw this commit in the inbox on my phone I asked the same question. Why is this in base? Especially with tools which are in the same class as this already in ports, should this not be a port? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Tue Dec 5 14:57:28 2017 Return-Path: Delivered-To: svn-src-head@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 7CE3CE6C943; Tue, 5 Dec 2017 14:57:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 3B51F7DD99; Tue, 5 Dec 2017 14:57:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 50E682603A1; Tue, 5 Dec 2017 15:57:23 +0100 (CET) Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Konstantin Belousov Cc: rgrimes@freebsd.org, cem@freebsd.org, Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> <20171205134409.GV2272@kib.kiev.ua> From: Hans Petter Selasky Message-ID: <5bd30132-aac7-e636-04c5-e57cbd65c54b@selasky.org> Date: Tue, 5 Dec 2017 15:54:38 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171205134409.GV2272@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 14:57:28 -0000 On 12/05/17 14:44, Konstantin Belousov wrote: > On Tue, Dec 05, 2017 at 02:00:00PM +0100, Hans Petter Selasky wrote: >> On 12/05/17 13:58, Rodney W. Grimes wrote: >>> Further more, why does freebsd need this in base? >> Hi, >> >> I think this is useful. It could replace the "-i " (intermediate) option >> for "sed" for example. It avoids creating temporary files when filtering >> files, right? Hi, > No, if process fails during the operation, user data is destroyed > irretrievable. It depends what you are doing. If the compiler crashes while outputting an object file and the atexit() hooks fail to remove the object file and you re-run the build, bad things can still happen and nobody will notice. From what I can see users must be aware of the limitations of any command they use in a script. Should probably be noted in the sponge manual page. sponge could also have an atexit() hook to remove the processed file upon failure. Typically when patching files in packages, it is a waste of system resources to have a three step procedure, mv-process-mv, because when the build is complete the files will be deleted anyway .... >The usual trick of creating temporary file and renaming > ensure that old file is around until all data for new file is written > into buffer cache. With some existing filesystem support, it also > guarantees that the old file is around in case of the system crash. This process could also be automated with sponge. If some option XXX is set, backup the file first in a safe way, before writing it new. Further because sponge is a single utility, it can lock the files in question through the whole procedure to make the operation atomic w.r.t. the file system. Can you lock files from scripts? And what about performance and complexity? > > All this assuming the tool' code matches its description, which is not. --HPS From owner-svn-src-head@freebsd.org Tue Dec 5 15:19:20 2017 Return-Path: Delivered-To: svn-src-head@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 836D3E6D412; Tue, 5 Dec 2017 15:19:20 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BCACD7E84B; Tue, 5 Dec 2017 15:19:19 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MElUeHSBBp2osMElVetLTF; Tue, 05 Dec 2017 08:04:13 -0700 X-Authority-Analysis: v=2.2 cv=KLEqNBNo c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=ocR9PWop10UA:10 a=6I5d2MoRAAAA:8 a=vJ3PJytkAAAA:8 a=YxBL1-UpAAAA:8 a=Ug2Wxoev8HxC__jtvqgA:9 a=IW8E0xEPpk4UX4_Z:21 a=CjuIK1q_8ugA:10 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 a=IjZwj45LgO3ly-622nXo:22 a=l9wNFzH4Rd0V1LYgFcnv:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E7F45A1; Tue, 5 Dec 2017 07:04:07 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vB5F46VC002900; Tue, 5 Dec 2017 07:04:06 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vB5F458w002872; Tue, 5 Dec 2017 07:04:06 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712051504.vB5F458w002872@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Eitan Adler cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee In-Reply-To: Message from Eitan Adler of "Tue, 05 Dec 2017 03:55:10 +0000." <201712050355.vB53tApl074041@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 Dec 2017 07:04:04 -0800 X-CMAE-Envelope: MS4wfF/esH6kYj6nRvMlLWv6iEXn+VYwJ8tPwWUfePiuwJAWoDPBPM+yknWKMnr7V/PGfo5EHZMPEJp0wzL7A25M8Rq0VtvNcMztrOJhfz58Y9QMCvT9H1Eu m3tTzPcKvU0l6yL3ur8f60lpromXEuV25Ho6e++Y3WYDUANjw56sfjLBskSOOOVnXiEPDXhSOc0cNEZnww0XWhKQyBAD6hMzWAIvFb7yoS/jvnpXO+y3kgzF d9/cGsvIU5e2YpfCY+R+gf6llNLYxCaUCuT4n80D0+IeGgOxL+y5nCcQrtf0tqE2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 15:19:20 -0000 In message <201712050355.vB53tApl074041@repo.freebsd.org>, Eitan Adler writes: > Author: eadler > Date: Tue Dec 5 03:55:10 2017 > New Revision: 326554 > URL: https://svnweb.freebsd.org/changeset/base/326554 > > Log: > sponge(1): initial commit > > sponge(1) is a utility that reads input until > complete, then opens the output file, then > writes to it. This makes it useful in pipelines > that read and write to the same file. > > Reviewed by: wblock, jilles, imp, cem, danfe (all: various iteration > s) > Inspired by: https://joeyh.name/code/moreutils/ > > Added: > head/usr.bin/sponge/ > head/usr.bin/sponge/Makefile (contents, props changed) > head/usr.bin/sponge/sponge.1 (contents, props changed) > head/usr.bin/sponge/sponge.c (contents, props changed) > head/usr.bin/sponge/tests/ > head/usr.bin/sponge/tests/Makefile (contents, props changed) > head/usr.bin/sponge/tests/Makefile.depend (contents, props changed) > head/usr.bin/sponge/tests/sponge_test.sh (contents, props changed) > Modified: > head/.arclint > head/usr.bin/tee/tee.1 > > Modified: head/.arclint > ============================================================================= > = > --- head/.arclint Tue Dec 5 02:23:36 2017 (r326553) > +++ head/.arclint Tue Dec 5 03:55:10 2017 (r326554) > @@ -9,7 +9,8 @@ > "type": "spelling" > }, > "chmod": { > - "type": "chmod" > + "type": "chmod", > + "exclude": "(/tests/)" > }, > "merge-conflict": { > "type": "merge-conflict" > > Added: head/usr.bin/sponge/Makefile > ============================================================================= > = > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/Makefile Tue Dec 5 03:55:10 2017 (r32655 > 4) > @@ -0,0 +1,8 @@ > +# $FreeBSD$ > + > +PROG= sponge > + > +HAS_TESTS= > +SUBDIR.${MK_TESTS}+= tests > + > +.include > > Added: head/usr.bin/sponge/sponge.1 > ============================================================================= > = > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/sponge.1 Tue Dec 5 03:55:10 2017 (r32655 > 4) > @@ -0,0 +1,75 @@ > +.\" Eitan Adler. 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 THE REGENTS 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 PURPO > SE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI > AL > +.\" 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, STRI > CT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA > Y > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd November 1, 2017 > +.Dt SPONGE 1 > +.Os > +.Sh NAME > +.Nm sponge > +.Nd buffer stdin and write to stdout > +.Sh SYNOPSIS > +.Nm > +.Op Fl a > +.Ar filename > +.Sh DESCRIPTION > +The > +.Nm > +utility reads standard in until complete, then opens > +the output file and writes to it. > +This makes it useful in pipelines that read a file and then write to it. > +These options are available: > +.Bl -tag -width indent > +.It Fl a > +Open > +.Ar filename > +in append mode. > +.El > +.Pp > +If an attempt to allocate memory fails, > +.Nm > +fails without output. > +The file is written even if earlier components > +of the pipeline failed. > +.Sh SEE ALSO > +.Xr builtin 1 , > +.Xr csh 1 , > +.Xr getrusage 2 , > +.Xr tee 1 , > +.Xr wait 2 > +.Sh EXIT STATUS > +.Ex -std > +.Sh EXAMPLES > +A > +.Pa file > +can be be sorted "in place" by executing > +.Cm sort file | sponge file > +.Sh HISTORY > +The > +.Nm > +utility was written by > +.An Eitan Adler Aq Mt eadler@FreeBSD.org > +and first appeared > +in > +.Fx 12.0 . > > Added: head/usr.bin/sponge/sponge.c > ============================================================================= > = > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/sponge.c Tue Dec 5 03:55:10 2017 (r32655 > 4) > @@ -0,0 +1,189 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2017 Eitan Adler > + * > + * 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 THE REGENTS 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 PURPOS > E > + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIA > L > + * 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, STRIC > T > + * 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$ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define DEFAULT_BUF_SIZE 16384 > +#define DEFAULT_BUF_CNT 12 > + > +static int flag_append = 0; > + > +static void usage(void); > +static void *safe_malloc(size_t size); > +static void *safe_calloc(size_t count, size_t size); > +static void *safe_reallocf(void *ptr, size_t size); > + > +static void * > +safe_malloc(size_t size) > +{ > + void *ret; > + > + ret = malloc(size); > + if (ret == NULL) { > + err(1, "malloc failed"); > + } > + return (ret); > +} > + > +static void * > +safe_calloc(size_t count, size_t size) > +{ > + void *ret; > + > + ret = calloc(count, size); > + if (ret == NULL) { > + err(1, "calloc failed"); > + } > + return (ret); > +} > + > +static void * > +safe_reallocf(void *ptr, size_t size) > +{ > + void *ret; > + > + ret = reallocf(ptr, size); > + if (ret == NULL) { > + err(1, "reallocf failed"); > + } > + return (ret); > +} > + > +static void > +usage(void) > +{ > + fprintf(stderr, "usage: sponge [-a] filename\n"); > +} > + > +int > +main(int argc, char* argv[]) > +{ > + struct iovec *iov; > + char *buf; > + char *outfile; > + ssize_t i; > + size_t bufcnt; > + size_t whichbuf; > + size_t bufremain; > + long maxiovec; > + int fd; > + int openflags = O_WRONLY; > + int opt; > + > + while ((opt = getopt(argc, argv, "ah")) != -1) { > + switch (opt) { > + case 'a': > + flag_append = 1; > + break; > + case 'h': > + usage(); > + exit(0); > + case '?': > + default: > + usage(); > + exit(1); > + } > + } > + > + if (optind < argc) { > + outfile = argv[optind]; > + } > + > + > + bufcnt = DEFAULT_BUF_CNT; > + whichbuf = 0; > + iov = safe_calloc(bufcnt, sizeof(*iov)); > + > + for (;;) { > + buf = safe_malloc(DEFAULT_BUF_SIZE); > + i = read(STDIN_FILENO, buf, DEFAULT_BUF_SIZE); > + if (whichbuf == bufcnt) { > + bufcnt *= 2; > + iov = safe_reallocf(iov, bufcnt * sizeof(*iov)); > + } > + if (i < 0) { > + err(1, "read failed"); > + } > + if (i == 0) { > + free(buf); > + break; > + } > + iov[whichbuf].iov_base = buf; > + iov[whichbuf].iov_len = i; > + whichbuf++; > + } > + > + if (outfile) { > + if (flag_append) { > + openflags |= O_APPEND; > + } else { > + openflags |= O_TRUNC; > + } > + fd = open(outfile, openflags); > + } > + else { > + fd = STDOUT_FILENO; > + } > + > + if (fd < 0) { > + err(1, "failed to open"); > + } > + > + maxiovec = sysconf(_SC_IOV_MAX); > + if (maxiovec == -1) { > + maxiovec = _XOPEN_IOV_MAX; > + } > + bufcnt = whichbuf; > + bufremain = bufcnt; > + > + while (bufremain > 0) { > + whichbuf = (bufremain < maxiovec) ? bufremain : maxiovec; Buildworld stops here. Should this not be (unsigned long) maxiovec? > + bufremain -= whichbuf; > + > [...] -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Tue Dec 5 15:35:28 2017 Return-Path: Delivered-To: svn-src-head@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 2C0C5E6DDBF; Tue, 5 Dec 2017 15:35:28 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C2247F2F1; Tue, 5 Dec 2017 15:35:28 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=54578 helo=[10.0.0.109]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1eMFFl-000MC9-FN; Tue, 05 Dec 2017 15:35:25 +0000 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Devin Teske Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee Date: Tue, 5 Dec 2017 07:33:21 -0800 Message-Id: References: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> Cc: rgrimes@freebsd.org, cem@freebsd.org, Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> To: Hans Petter Selasky X-Mailer: iPhone Mail (13G36) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 15:35:28 -0000 > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: >=20 >> On 12/05/17 13:58, Rodney W. Grimes wrote: >> Further more, why does freebsd need this in base? >=20 > Hi, >=20 > I think this is useful. It could replace the "-i " (intermediate) option f= or "sed" for example. It avoids creating temporary files when filtering file= s, right? >=20 > --HPS >=20 Wth is wrong with: data=3D$( sed -e '...' somefile ) && echo "$data" > somefile or set -e data=3D... echo "$data" > ... or exec 3< ... <&3 or (I digress) Infinite variations, but the gist is that sponge looks to be trying to help s= h(1)/similar when help is unneeded. Why buffer data into memory via fork-exec-pipe to sponge when you can buffer= to native namespace without pipe to sponge? Am I missing something? Why do we need sponge(1)? --=20 Devin= From owner-svn-src-head@freebsd.org Tue Dec 5 15:46:45 2017 Return-Path: Delivered-To: svn-src-head@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 9A9F6E6E3CF; Tue, 5 Dec 2017 15:46:45 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A8167FA4A; Tue, 5 Dec 2017 15:46:45 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=54633 helo=[10.0.0.109]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1eMFQX-000MHT-1z; Tue, 05 Dec 2017 15:46:33 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee From: Devin Teske X-Mailer: iPhone Mail (13G36) In-Reply-To: Date: Tue, 5 Dec 2017 07:46:43 -0800 Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8090FD05-E35B-4BC2-A89C-281EE8EBAA0B@shxd.cx> References: <201712050355.vB53tApl074041@repo.freebsd.org> To: cem@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 15:46:45 -0000 > On Dec 4, 2017, at 8:40 PM, Conrad Meyer wrote: >=20 >> On Mon, Dec 4, 2017 at 8:30 PM, Conrad Meyer wrote: >>> On Mon, Dec 4, 2017 at 7:55 PM, Eitan Adler wrote: >>> Author: eadler >>> Date: Tue Dec 5 03:55:10 2017 >>> New Revision: 326554 >>> URL: https://svnweb.freebsd.org/changeset/base/326554 >>>=20 >>> Log: >>> sponge(1): initial commit >>>=20 >>> sponge(1) is a utility that reads input until >>> complete, then opens the output file, then >>> writes to it. This makes it useful in pipelines >>> that read and write to the same file. >>>=20 >>> Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations)= >>=20 >> I don't recall reviewing this in any iteration, but I could be mistaken. >>=20 >> Best, >> Conrad >=20 > In fact I don't think any of the listed reviewers approved the change, > at least in phabricator. The "Reviewed by" line signifies not just > giving feedback, but approval of the final (or near-final) change. >=20 > Best, > Conrad >=20 If true, upsetting. You have people like myself that are ultra patient and w= ait for the approvals. For example, https://reviews.freebsd.org/D10006 which= has been in review for 8 months now and I have been working on it for a tot= al of 5 years now. It is more than a little hurtful to put in such effort and then see someone e= lse run roughshod past the group. --=20 Devin= From owner-svn-src-head@freebsd.org Tue Dec 5 15:53:51 2017 Return-Path: Delivered-To: svn-src-head@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 5FB05E6E93C; Tue, 5 Dec 2017 15:53:51 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: from mail-wr0-x22f.google.com (mail-wr0-x22f.google.com [IPv6:2a00:1450:400c:c0c::22f]) (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 02BDB7FFE2; Tue, 5 Dec 2017 15:53:51 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: by mail-wr0-x22f.google.com with SMTP id z34so794006wrz.10; Tue, 05 Dec 2017 07:53:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=upZrzz+2yP+DM/uhrJ9OUEk2NiHB4yGJSHdXaTRTChA=; b=aPfKR9Cd72Tp08W7xem3Zh6eG82orifhKdJ4XkB9VfHxJ1X5/u+oSDoO9mn1J1ZPH3 WHaUQpbjGFAf6cf8mM9nKp17wlHpKMyw4trv5pud3quS+gUuB86VNOziqdG5nK1WqVrT UeVBrv0oVf3G4J+C5WWW1Y3dHGh6PH3a3tOM1uI3Q0Y4k0G0AA+nKviGA5MS1fUEW5Zw +3K7YlFT4mZLWFe+hvzmZy4uniQwrhdy3MyFSWk0eMAleTkhWKTJq8B8uFt+oZ+E6jQi /mHqh9EJZvpkjjHpLCm4hcdx+WF+6BX51qTZCVUguCB/VJ6xT8PUtfyLkpfrKLOo5QbG dbDQ== 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:cc; bh=upZrzz+2yP+DM/uhrJ9OUEk2NiHB4yGJSHdXaTRTChA=; b=nd3aWG7tdrW38osnd3ZELVnbnmB8JW4FvM9xvzRAWPFxrQEcwkoczwFKOdDo9PnlIq JmINwO1Vs6YcBa/dL+5OO5qCeJPOuj7/cy9YLhXrc1UCuiuLhs0RZCW+Y+LO9MrzDjNq MlB2D0JmC+BSaf9PfmXjyqLpgP8SAwNgjs13MusykokmfHOFe+6AheClQ8Bsdzm4Ed8x H8AaMREdqEzZ/DwuBRTo4YDDgdAhI3vB42r29QH6FmZ3P5hYtfpUP/qYAcL0SSBITaKd kYzRecaBkWLB508+6M7yIGfH2Trj1tFwSb7BoUwpkhHqFX+jKEKEQcPK/6TITsa+QWGy IOqg== X-Gm-Message-State: AJaThX655N4YakjVVBnh+aqIrL29N5jgZcNY3+ilCbo2+PEewVd8NmBA J/bGGrBE4bNrnwfkxnv69EiN9FHC9TBTwZTSXaogYg== X-Google-Smtp-Source: AGs4zMYqRTdZKPkZzIICqHV1urZKz4w1BeNeL/y/akm668MUaq3FYcHYTmTsq3QEIDqRcXkREYJvuqlxJpifDq7BKCU= X-Received: by 10.223.134.134 with SMTP id 6mr16598328wrx.72.1512489228838; Tue, 05 Dec 2017 07:53:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.196.9 with HTTP; Tue, 5 Dec 2017 07:53:48 -0800 (PST) Received: by 10.223.196.9 with HTTP; Tue, 5 Dec 2017 07:53:48 -0800 (PST) In-Reply-To: References: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> From: Matt Joras Date: Tue, 5 Dec 2017 07:53:48 -0800 Message-ID: Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Devin Teske Cc: Hans Petter Selasky , rgrimes@freebsd.org, cem@freebsd.org, Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 15:53:51 -0000 On Dec 5, 2017 7:35 AM, "Devin Teske" wrote: > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: > >> On 12/05/17 13:58, Rodney W. Grimes wrote: >> Further more, why does freebsd need this in base? > > Hi, > > I think this is useful. It could replace the "-i " (intermediate) option for "sed" for example. It avoids creating temporary files when filtering files, right? > > --HPS > Wth is wrong with: data=$( sed -e '...' somefile ) && echo "$data" > somefile or set -e data=... echo "$data" > ... or exec 3< ... <&3 or (I digress) Infinite variations, but the gist is that sponge looks to be trying to help sh(1)/similar when help is unneeded. Why buffer data into memory via fork-exec-pipe to sponge when you can buffer to native namespace without pipe to sponge? Am I missing something? Why do we need sponge(1)? -- Devin I do believe you are sort of missing the point. It is a utility that is explicitly useful in shell pipelines, so when you want to do things as one-liners. I like the utility and use the one from ports and my own version in various things here and there. It is a common utility installed in Linux distros and the top answer on Google for questions such as "redirect shell output to same file". I think the outrage about adding a tiny utility that's common elsewhere is a bit silly. As for the implementation, I have my own version of sponge (hobby program written in rust so not base-worthy), and it uses explicit temporary files for larger outputs. Matt From owner-svn-src-head@freebsd.org Tue Dec 5 16:06:24 2017 Return-Path: Delivered-To: svn-src-head@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 E36ABE6EF16; Tue, 5 Dec 2017 16:06:24 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C610080832; Tue, 5 Dec 2017 16:06:24 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=54721 helo=[10.0.0.109]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1eMFjj-000MSc-0P; Tue, 05 Dec 2017 16:06:23 +0000 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee From: Devin Teske X-Mailer: iPhone Mail (13G36) In-Reply-To: Date: Tue, 5 Dec 2017 08:06:21 -0800 Cc: Hans Petter Selasky , rgrimes@freebsd.org, cem@freebsd.org, Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <16BDAEF5-87B3-482F-B5AB-372E128D0514@shxd.cx> References: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> To: Matt Joras Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 16:06:25 -0000 > On Dec 5, 2017, at 7:53 AM, Matt Joras wrote: >=20 >=20 >=20 > On Dec 5, 2017 7:35 AM, "Devin Teske" wrote: >=20 > > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote:= > > > >> On 12/05/17 13:58, Rodney W. Grimes wrote: > >> Further more, why does freebsd need this in base? > > > > Hi, > > > > I think this is useful. It could replace the "-i " (intermediate) option= for "sed" for example. It avoids creating temporary files when filtering fi= les, right? > > > > --HPS > > >=20 > Wth is wrong with: >=20 > data=3D$( sed -e '...' somefile ) && > echo "$data" > somefile >=20 > or >=20 > set -e > data=3D... > echo "$data" > ... >=20 > or >=20 > exec 3< $( ... ) > EOF > cat > ... <&3 >=20 > or >=20 > (I digress) >=20 > Infinite variations, but the gist is that sponge looks to be trying to hel= p sh(1)/similar when help is unneeded. >=20 > Why buffer data into memory via fork-exec-pipe to sponge when you can buff= er to native namespace without pipe to sponge? >=20 > Am I missing something? Why do we need sponge(1)? > -- > Devin >=20 > I do believe you are sort of missing the point. It is a utility that is ex= plicitly useful in shell pipelines, so when you want to do things as one-lin= ers. I like the utility and use the one from ports and my own version in var= ious things here and there. It is a common utility installed in Linux distro= s and the top answer on Google for questions such as "redirect shell output t= o same file". I think the outrage about adding a tiny utility that's common e= lsewhere is a bit silly. >=20 > As for the implementation, I have my own version of sponge (hobby program w= ritten in rust so not base-worthy), and it uses explicit temporary files for= larger outputs.=20 >=20 > Matt The problems I have are: 1. Should be in ports Not pre-installed on Linux, why should we have it in base? If in base, people will target it thinking it solves a need that can't other= wise be solved and thus end up creating a script that is less portable becau= se it is encumbered with dependencies specific to our base. 2. Teaches bad practice sed ... somefile | sponge somefile Ignores if there is a sed error and indiscriminately zeroes somefile. 3. Solution in search of a problem --=20 Devin= From owner-svn-src-head@freebsd.org Tue Dec 5 16:29:33 2017 Return-Path: Delivered-To: svn-src-head@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 B2A25E6FC48; Tue, 5 Dec 2017 16:29:33 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 521D81C67; Tue, 5 Dec 2017 16:29:32 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MG63eOgKkRDG7MG64esdM5; Tue, 05 Dec 2017 09:29:31 -0700 X-Authority-Analysis: v=2.2 cv=b+PC2pOx c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=ocR9PWop10UA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=ndaoGXS1AAAA:8 a=jQgKp30ja-HrSgA4ZeUA:9 a=GaW9oB-fHLm431We:21 a=EdJcV6vQjR9nN-R3:21 a=CjuIK1q_8ugA:10 a=ugJ6eDHFsi2XojoArKsA:9 a=4q4shZUV2vsQyd6v:21 a=CWeUk3ljr1loAy-E:21 a=15VCfSkxD73Nj12u:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=mFeOnlTyF09QQMGr2mMI:22 Received: from [25.81.45.55] (S0106d4ca6d8943b0.gv.shawcable.net [24.68.134.59]) by spqr.komquats.com (Postfix) with ESMTPSA id 9F16C1DD; Tue, 5 Dec 2017 08:29:26 -0800 (PST) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee Date: Tue, 5 Dec 2017 08:29:29 -0800 To: Devin Teske , Hans Petter Selasky CC: "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20171205162926.9F16C1DD@spqr.komquats.com> X-CMAE-Envelope: MS4wfNFclXJdeL8CHEKtQffyo0jyVFaBRNTo8W/ThG5pYPltUTfEEQLYHwiLlqFCdr7AGJeJktadPNlRWtiXQswnMtFvkQSd9b2HWsMDVHPNRbio+Fxn9wXq CBx37CiSTQ9uai5Uq1Qjga+PlEwsIlj7nRzHA/Kivjmex+s0gaK7PhEox1lnbnT+RvakBNHw0Drovf+2pSGmUeIzTLQutsvMLw8mBJC7H8kAIDUc8co9hpFk HNIkt9aHQHM+f9FBT3b/57zn0tNeWsW5obWuvwzb1Z5XbVNr7fhK/iu7aQw8hGg1Y/1XKSbcRG1NItS+Tvh22/9FeTmk4+zYSgtHmPp77k47nZxovqmXTV0g kEy46JLzDihiAMT8YQ211dPK93uALOiBXMLypJTvr3UQJAL8Db8= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 16:29:33 -0000 Why not update sed to create the backup file only if the suffix is given to= -i, like gnu sed does. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. This old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Devin Teske Sent: 05/12/2017 07:35 To: Hans Petter Selasky Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; svn-= src-all@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge= /tests usr.bin/tee > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: >=20 >> On 12/05/17 13:58, Rodney W. Grimes wrote: >> Further more, why does freebsd need this in base? >=20 > Hi, >=20 > I think this is useful. It could replace the "-i " (intermediate) option = for "sed" for example. It avoids creating temporary files when filtering fi= les, right? >=20 > --HPS >=20 Wth is wrong with: data=3D$( sed -e '...' somefile ) && echo "$data" > somefile or set -e data=3D... echo "$data" > ... or exec 3< ... <&3 or (I digress) Infinite variations, but the gist is that sponge looks to be trying to help= sh(1)/similar when help is unneeded. Why buffer data into memory via fork-exec-pipe to sponge when you can buffe= r to native namespace without pipe to sponge? Am I missing something? Why do we need sponge(1)? --=20 Devin From owner-svn-src-head@freebsd.org Tue Dec 5 16:29:33 2017 Return-Path: Delivered-To: svn-src-head@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 75633E6FC45; Tue, 5 Dec 2017 16:29:33 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (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 06C7C1C66; Tue, 5 Dec 2017 16:29:33 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id q9so936725wre.7; Tue, 05 Dec 2017 08:29:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0XZsZWFTd4dhIZ/cr/nff6iVquOV45bM9OPboAOJjcQ=; b=iZnPXNp9SUhrPaHaB9e56f8SmSFp5SW1NZTCBoUI/TFr2ipkxQ2x3fhWPwC8b+jhjf JMTYeTUb2ZoCQPie7Qdapx4OyLm6dC6Ddvzsrs3N4PuOg+NBKZIEa5WiUn8ZNDYBvw57 0rVKLJ1g5dQ64Cqwq5Lp1PoSofd87wfoAS1H8/CdUYZwiDnCZZGO0PYnlxrEJ+i3L7y+ kEjm9xS3aJQuVdJd5AcY1uSiE0BMgJuD9WkkyWfSvxGCYQFfqMfQ2gKGFKVA42u4FiUh QHQGsxicwEhTQoKNcTZhGSe9j7aWg6KQogp9uB3nvW9kqUR3/0shH5uB5lI/zvnHyLRn nwiw== 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:cc; bh=0XZsZWFTd4dhIZ/cr/nff6iVquOV45bM9OPboAOJjcQ=; b=Nk1MKOzOQXmI+1M4/ozLjOVmbeI62q0kYOdhUXgdg/nhftPlQwSM9Q5KaBdtc7lUxj JBlCnSrMqdND49tFHIXdqbu6x7iDm0VOHJIg0wOZeCob8MNpmBE/a3FkpXkxYeY29YNW btieIge+uxqdY3GibCdx0cjb0VMxuClUX1WcDHnUYiqxfMnjsQ+bTRJmYe8tiHfUc2e9 8K3blok0uKbya3ps0ZrTr2V0VBWMD59jGlFiOdyTjStzGYiTPYtpbQ9TcCd5QCwPB4jR u/lULaGQSmUSFZcd+YPXi7i2BZoUDB5OGJzdaGw+kfl5FNBaSiau6r4btMsQEfxx371g 6pHQ== X-Gm-Message-State: AJaThX5XpEqq8BEkBi8Img2aiRX875+vn+ymza4MRP4QvFdfWcKrEmR8 AlRUt0GlbFIWz/ITqPaBn0xPq5Pib7OS6aZYb78= X-Google-Smtp-Source: AGs4zMY9rEXYoF+cZdcEYLkOUNfBDw5k8mR6VVJ7vulLzzOB54nVmM1i9f/shiz44z53RSzoewCT6RdpxIzVeE5APao= X-Received: by 10.223.163.11 with SMTP id c11mr17677593wrb.214.1512491371299; Tue, 05 Dec 2017 08:29:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.196.9 with HTTP; Tue, 5 Dec 2017 08:29:30 -0800 (PST) In-Reply-To: <16BDAEF5-87B3-482F-B5AB-372E128D0514@shxd.cx> References: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> <16BDAEF5-87B3-482F-B5AB-372E128D0514@shxd.cx> From: Matt Joras Date: Tue, 5 Dec 2017 08:29:30 -0800 Message-ID: Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Devin Teske Cc: Hans Petter Selasky , rgrimes@freebsd.org, cem@freebsd.org, Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 16:29:33 -0000 On Tue, Dec 5, 2017 at 8:06 AM, Devin Teske wrote: > > > The problems I have are: > > 1. Should be in ports > > Not pre-installed on Linux, why should we have it in base? "Pre-installed on Linux" is meaningless. The closest analog to our base is arguably GNU coreutils. It is indeed not part of GNU coreutils but then again there are several things in our base that are not in coreutils, and vice versa. Why should we have anything in base? If people find it useful and it doens't have a high cost of maintainership then why not have it? > If in base, people will target it thinking it solves a need that can't > otherwise be solved and thus end up creating a script that is less portable > because it is encumbered with dependencies specific to our base. It's not even a homegrown idea though... As we've already covered this is a tool that exists in the broader OSS ecosystem. As long as it is compatible with the more common implementation I don't see the issue. Anything one writes using it is just "encumbered" with a dependency on sponge. > 2. Teaches bad practice > > sed ... somefile | sponge somefile > > Ignores if there is a sed error and indiscriminately zeroes somefile. Calling this unequivocally bad practice is silly. There are plenty uses of sponge that aren't bad practice. I have a git commit hook that utilizes sponge to do the same "auto-culling" that our svn patches do. I like the sponge version better than creating temporary files myself: sed '/^$/d' $(git config commit.message) | awk 'NR==FNR{a[$0];next} !($0 in a)' /dev/fd/0 "$1" | sponge "$1" > 3. Solution in search of a problem Again, stating this unequivocally is silly. I discovered sponge years ago when I was searching how best to handle something where I wanted to write output back to the same file in a shell pipeline. I was literally someone with a problem in search of a solution, and that solution was and still is sponge. Since then I have seen it recommended numerous times in passing. Matt From owner-svn-src-head@freebsd.org Tue Dec 5 16:49:12 2017 Return-Path: Delivered-To: svn-src-head@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 A7A3DE707DC; Tue, 5 Dec 2017 16:49:12 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 45D082EAA; Tue, 5 Dec 2017 16:49:11 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MGP5eVjmnGvLHMGP6ejt0V; Tue, 05 Dec 2017 09:49:10 -0700 X-Authority-Analysis: v=2.2 cv=a9pAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=ocR9PWop10UA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=ndaoGXS1AAAA:8 a=z0teBqPy1X18kmprVqoA:9 a=vwzrjUem2fATOGXU:21 a=M3fsWT2IC9t0Ut-9:21 a=CjuIK1q_8ugA:10 a=a11oI3MFgE0DJICV_lUA:9 a=mtsX-dKVlAp7E83b:21 a=DKgg1OFqWCy208_p:21 a=JYNM_zmkhQQQPQg_:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=mFeOnlTyF09QQMGr2mMI:22 Received: from [25.81.45.55] (unknown [72.143.226.210]) by spqr.komquats.com (Postfix) with ESMTPSA id 361ED247; Tue, 5 Dec 2017 08:49:06 -0800 (PST) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r326554 - in head: . usr.bin/spongeusr.bin/sponge/tests usr.bin/tee Date: Tue, 5 Dec 2017 08:49:09 -0800 To: Cy Schubert , Devin Teske , Hans Petter Selasky CC: "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20171205164906.361ED247@spqr.komquats.com> X-CMAE-Envelope: MS4wfMjjpN6L5iei1/N8/srgfayvuD49cxiLZ8QQXmh+d1p0Gzp/HVygADQNCFOiatCK+Ad70DnXb9CKkZOMPtIV+Q5tDUK+eWqotabNnY+OKhW1EnPSm8SZ OR3CBh2LrBzSofsFZebvUqwgqd1RhTw4T9QUOlAJ7NkK/k9RqT9+pm5U2zL0h6vHizMjQN+Fyeyu2tkQkMM+8vbYvhEyy2UoYE0YIA3TuT/ebl92uaXkjhc9 JK+qwx1KkrcrJ+SMj/Nz0oUMPLPZ4BIslvwsCZSBEIlRC58ciR3P36UA0ZMoTkuzqwMAOzHUHCN4nMfMCHPF1/pWU+dCBO7znToyNqzEw47jUU9zXazMo5Od zN8Khfqnq4v3rwAiPrN9l0VJRadpIHV8gum2R8peCkkFjcxveDE= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 16:49:12 -0000 I'll post a phab review at openhack tonight. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. This old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Cy Schubert Sent: 05/12/2017 08:30 To: Devin Teske; Hans Petter Selasky Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; svn-= src-all@freebsd.org; svn-src-head@freebsd.org Subject: RE: svn commit: r326554 - in head: . usr.bin/spongeusr.bin/sponge/= tests usr.bin/tee Why not update sed to create the backup file only if the suffix is given to= -i, like gnu sed does. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. This old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- From: Devin Teske Sent: 05/12/2017 07:35 To: Hans Petter Selasky Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; svn-= src-all@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge= /tests usr.bin/tee > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: >=20 >> On 12/05/17 13:58, Rodney W. Grimes wrote: >> Further more, why does freebsd need this in base? >=20 > Hi, >=20 > I think this is useful. It could replace the "-i " (intermediate) option = for "sed" for example. It avoids creating temporary files when filtering fi= les, right? >=20 > --HPS >=20 Wth is wrong with: data=3D$( sed -e '...' somefile ) && echo "$data" > somefile or set -e data=3D... echo "$data" > ... or exec 3< ... <&3 or (I digress) Infinite variations, but the gist is that sponge looks to be trying to help= sh(1)/similar when help is unneeded. Why buffer data into memory via fork-exec-pipe to sponge when you can buffe= r to native namespace without pipe to sponge? Am I missing something? Why do we need sponge(1)? --=20 Devin= From owner-svn-src-head@freebsd.org Tue Dec 5 17:01:12 2017 Return-Path: Delivered-To: svn-src-head@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 9177FE70E11 for ; Tue, 5 Dec 2017 17:01:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic303-36.consmr.mail.gq1.yahoo.com (sonic303-36.consmr.mail.gq1.yahoo.com [98.137.64.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 652243983 for ; Tue, 5 Dec 2017 17:01:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1512493271; bh=CsfJbu+BDxa61aRfqcDSXkML/9z4xPZB8WBnjc0RCZk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=K4w4xCeG+wZwBG8ILfkHCanr4dIt9OrGB3YwKQ0pd1ZqO2vO6R0cJ+da0TbcuCMrPMSTRXxaqCCjP5CDOVl/6Vk4mV4pnB8FGaXdaOs9N11b+nkh0MOGI+hLMz3gJxUQRzM5mJxP6wnh7Euba1cIAomT/k10uF1UdV/pBOKxpxofB8TvQVC2OX0amyOgtyAVok34d9fNIIKmXM6yxXasS7ZVMByXLYDSkePaXeT7G27E4dRtS9GNJtNujr4lHFmfZ/9XJVxc8C/kZk3WY6CKKjMF0MOtHvTE6rlzR6VT2XwqqMQR0b8Dd/82nZcNJ3+PFZ3GJ4f3ofBT508nCll5Cw== X-YMail-OSG: KkYx1Q0VM1mxsfr7S6vw2yXNe0u0fPp9L04plgo5ZYojtiXjJRJhkgAzOChPCB3 MyTdaewOfWMo9lVs5oVV60xSUMi0iC1VcYXotHXJ7LAhjtI_qvYl470t0s0Grlq8pybWTjj17gHc YI_ETGblM9X3VPixnyQC4KDkGl5UVmSrudWX5_gmXVZ0m_BN5p6qUvvVaDUaih4f2Sv.GKw.K9XI 4FkUwt2QihMbsYpP_CL3AkLMv0tmN_soqFcKvqf8AoKUcuQ0eZRMw1uC861iwoQwg8vBy_AkDnnz pQfkmIglhK3MJD970KcUTZjppewnhEmjuQu5C8TJC9H0n7EtgJeaZKhVSyMmK9TRUeE4wq7YSAYa ve6sMlVD6m2t6s4IlaiH0dEJBjmv3conqkyMNgQ8cr8llb5xzfcpSmbmlaeJX6RcJU7XDUttTcjK 6PR1R8zfFhCXVN4.XC2gp7ckriyaTwqx.AdVFQmmpxWdksfNPCWCS4PthNzOqfWrrH3dd7K83 Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Tue, 5 Dec 2017 17:01:11 +0000 Received: from smtp104.rhel.mail.gq1.yahoo.com (EHLO [192.168.0.3]) ([216.39.57.214]) by smtp415.mail.gq1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 878947950; Tue, 05 Dec 2017 16:40:52 +0000 (UTC) Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Cy Schubert , Devin Teske , Hans Petter Selasky Cc: "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <20171205162926.9F16C1DD@spqr.komquats.com> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: Date: Tue, 5 Dec 2017 11:40:53 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171205162926.9F16C1DD@spqr.komquats.com> Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 17:01:12 -0000 On 05/12/2017 11:29, Cy Schubert wrote: > Why not update sed to create the backup file only if the suffix is > given to -i, like gnu sed does. > No, no .. there have been several failed attempts at that that cause nasty side effects. It is also a rather non-standardish thing to do. Pedro. > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > This old phone only supports top post. Apologies. > > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- > ------------------------------------------------------------------------ > From: Devin Teske > Sent: 05/12/2017 07:35 > To: Hans Petter Selasky > Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; > svn-src-all@freebsd.org; svn-src-head@freebsd.org > Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge > usr.bin/sponge/tests usr.bin/tee > > > > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: > > > >> On 12/05/17 13:58, Rodney W. Grimes wrote: > >> Further more, why does freebsd need this in base? > > > > Hi, > > > > I think this is useful. It could replace the "-i " (intermediate) > option for "sed" for example. It avoids creating temporary files when > filtering files, right? > > > > --HPS > > > > Wth is wrong with: > > data=$( sed -e '...' somefile ) && > ������� echo "$data" > somefile > > or > > set -e > data=... > echo "$data" > ... > > or > > exec 3< $( ... ) > EOF > cat > ... <&3 > > or > > (I digress) > > Infinite variations, but the gist is that sponge looks to be trying to > help sh(1)/similar when help is unneeded. > > Why buffer data into memory via fork-exec-pipe to sponge when you can > buffer to native namespace without pipe to sponge? > > Am I missing something? Why do we need sponge(1)? > -- > Devin > From owner-svn-src-head@freebsd.org Tue Dec 5 16:55:20 2017 Return-Path: Delivered-To: svn-src-head@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 982E4E70B8E; Tue, 5 Dec 2017 16:55:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DF1A355A; Tue, 5 Dec 2017 16:55:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vB5GtGQJ052406; Tue, 5 Dec 2017 08:55:16 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vB5GtGTn052405; Tue, 5 Dec 2017 08:55:16 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712051655.vB5GtGTn052405@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee In-Reply-To: To: Pedro Giffuni Date: Tue, 5 Dec 2017 08:55:16 -0800 (PST) CC: Cy Schubert , Devin Teske , Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Tue, 05 Dec 2017 17:12:45 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 16:55:20 -0000 [ Charset windows-1252 unsupported, converting... ] > > On 05/12/2017 11:29, Cy Schubert wrote: > > Why not update sed to create the backup file only if the suffix is > > given to -i, like gnu sed does. > > > > No, no .. there have been several failed attempts at that that cause > nasty side effects. > It is also a rather non-standardish thing to do. Yet we are okay with having sponge(1) and its nasty side effects? Someone please just ask for revision on this, and also make sure the top level .arclint file that got a bogus add of /test/ during the commit? The argument that Linux does this, and that this is a top answer in google do not hold water for me. Linux does lots of things, many are novieces solving novice problems cause they are not skilled. sponge(1), imho, as Devin points out is just not needed to solve this problem and has its own set of issues. The COST so far of this small amount of code on developers, again, IMHO, already far out weights any benifit of having it in base. > Pedro. > > > --- > > Sent using a tiny phone keyboard. > > Apologies for any typos and autocorrect. > > This old phone only supports top post. Apologies. > > > > Cy Schubert > > or > > The need of the many outweighs the greed of the few. > > --- > > ------------------------------------------------------------------------ > > From: Devin Teske > > Sent: 05/12/2017 07:35 > > To: Hans Petter Selasky > > Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; > > svn-src-all@freebsd.org; svn-src-head@freebsd.org > > Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge > > usr.bin/sponge/tests usr.bin/tee > > > > > > > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: > > > > > >> On 12/05/17 13:58, Rodney W. Grimes wrote: > > >> Further more, why does freebsd need this in base? > > > > > > Hi, > > > > > > I think this is useful. It could replace the "-i " (intermediate) > > option for "sed" for example. It avoids creating temporary files when > > filtering files, right? > > > > > > --HPS > > > > > > > Wth is wrong with: > > > > data=$( sed -e '...' somefile ) && > > ????????????????????? echo "$data" > somefile > > > > or > > > > set -e > > data=... > > echo "$data" > ... > > > > or > > > > exec 3< > $( ... ) > > EOF > > cat > ... <&3 > > > > or > > > > (I digress) > > > > Infinite variations, but the gist is that sponge looks to be trying to > > help sh(1)/similar when help is unneeded. > > > > Why buffer data into memory via fork-exec-pipe to sponge when you can > > buffer to native namespace without pipe to sponge? > > > > Am I missing something? Why do we need sponge(1)? > > -- > > Devin > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Dec 5 17:17:24 2017 Return-Path: Delivered-To: svn-src-head@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 E0A83E7189E; Tue, 5 Dec 2017 17:17:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7283663B68; Tue, 5 Dec 2017 17:17:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MGqQeP1DzRDG7MGqResqx1; Tue, 05 Dec 2017 10:17:23 -0700 X-Authority-Analysis: v=2.2 cv=b+PC2pOx c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=ocR9PWop10UA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=ndaoGXS1AAAA:8 a=RWzydPCFlKVictrZKQIA:9 a=Oi5DB1_Efbxysd3r:21 a=Ph7Tx-iF3zROu3-g:21 a=pILNOxqGKmIA:10 a=X58yrYSmipAA:10 a=BWvPGDcYAAAA:8 a=8l7mZa13pO45tTzP2b8A:9 a=gOwVrYTz3kFE_n5z:21 a=KV9SI-dKoOCm_D0E:21 a=85e5lze0_N498t16:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=mFeOnlTyF09QQMGr2mMI:22 a=pxhY87DP9d2VeQe4joPk:22 Received: from [25.81.45.55] (S0106d4ca6d8943b0.gv.shawcable.net [24.68.134.59]) by spqr.komquats.com (Postfix) with ESMTPSA id 73E1C2D8; Tue, 5 Dec 2017 09:17:21 -0800 (PST) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r326554 - in head: . usr.bin/spongeusr.bin/sponge/tests usr.bin/tee Date: Tue, 5 Dec 2017 09:17:24 -0800 To: Pedro Giffuni , Devin Teske , Hans Petter Selasky CC: "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20171205171721.73E1C2D8@spqr.komquats.com> X-CMAE-Envelope: MS4wfP1OuuqwRigZmyCv699pIc+i/lks06ZtXYakgBlE+/wUmPwJEk1oPO4gjVYDuqIKQChrNwGXtE6ZjuJSOQQ0KiCU2hhm+sLmuciDpz45qj1gdzrzCqWQ XZpg7KraflM5LCpt+WPHLXmPZeQ08RB+AwA/jPAYKM31oRJwgunDIWZw5Jvi7Ui55WdpGS3iB2b+hHzeI8ihxuoExlbBoYQatAoJXdMPp/0dt+qj556ibk8V BlnGdmSZK7tVezFsTnF1eU3OBPt4FLf5YnhF0Ex/ec87+EJeLMmLlsycUCI/ZIcYvvehklsYRLHppDGMlTbey4PKW9yhbiNhw8Y1h6ESd1bFGLV6wChfrq10 JXUHCGN2U5nQUS7M1+mTjn2KZoG321BSGHPsS9Za9r0rEaaAWiPYUnPt7xRng1TX4G3kCu7+ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 17:17:25 -0000 What side effects? Can you give one or two examples, please? --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. This old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Pedro Giffuni Sent: 05/12/2017 08:40 To: Cy Schubert; Devin Teske; Hans Petter Selasky Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; svn-= src-all@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/spongeusr.bin/sponge/= tests usr.bin/tee On 05/12/2017 11:29, Cy Schubert wrote: Why not update sed to create the backup file only if the suffix is given to= -i, like gnu sed does. No, no .. there have been several failed attempts at that that cause nasty= side effects. It is also a rather non-standardish thing to do. Pedro. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. This old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- From: Devin Teske Sent: 05/12/2017 07:35 To: Hans Petter Selasky Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; svn-= src-all@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge= /tests usr.bin/tee > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: >=20 >> On 12/05/17 13:58, Rodney W. Grimes wrote: >> Further more, why does freebsd need this in base? >=20 > Hi, >=20 > I think this is useful. It could replace the "-i " (intermediate) option = for "sed" for example. It avoids creating temporary files when filtering fi= les, right? >=20 > --HPS >=20 Wth is wrong with: data=3D$( sed -e '...' somefile ) && =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD echo "$dat= a" > somefile or set -e data=3D... echo "$data" > ... or exec 3< ... <&3 or (I digress) Infinite variations, but the gist is that sponge looks to be trying to hel= p sh(1)/similar when help is unneeded. Why buffer data into memory via fork-exec-pipe to sponge when you can buff= er to native namespace without pipe to sponge? Am I missing something? Why do we need sponge(1)? --=20 Devin = From owner-svn-src-head@freebsd.org Tue Dec 5 17:18:29 2017 Return-Path: Delivered-To: svn-src-head@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 DC859E71922; Tue, 5 Dec 2017 17:18:29 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8A0663CE1; Tue, 5 Dec 2017 17:18:29 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=54936 helo=[10.0.0.109]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1eMGrU-000NA0-G5; Tue, 05 Dec 2017 17:18:28 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee From: Devin Teske X-Mailer: iPhone Mail (13G36) In-Reply-To: Date: Tue, 5 Dec 2017 09:18:28 -0800 Cc: Hans Petter Selasky , rgrimes@freebsd.org, cem@freebsd.org, Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <2E8767A0-D427-47D1-B294-B30330AD970D@shxd.cx> References: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> <16BDAEF5-87B3-482F-B5AB-372E128D0514@shxd.cx> To: Matt Joras X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 17:18:30 -0000 >> On Dec 5, 2017, at 8:29 AM, Matt Joras wrote: >>=20 >> On Tue, Dec 5, 2017 at 8:06 AM, Devin Teske wrote: >>=20 >>=20 >> The problems I have are: >>=20 >> 1. Should be in ports >>=20 >> Not pre-installed on Linux, why should we have it in base? > "Pre-installed on Linux" is meaningless. The closest analog to our > base is arguably GNU coreutils. It is indeed not part of GNU coreutils > but then again there are several things in our base that are not in > coreutils, and vice versa. Why should we have anything in base? If > people find it useful and it doens't have a high cost of > maintainership then why not have it? Hand-waving and baseless conjecture is not going to change the fact that I h= ave administered tens-of-thousands of Linux machines and: 1. None have ever had moreutils installed 2. Before today I have never heard of sponge or moreutils You point to Linux not having a "base" as it were, but this is patently fals= e. In the kickstart scripts for anaconda, you can specify ^@minimal or @base or= @whatever to get a classification of packages that have been glommed togeth= er. When installing Linux (be it CentOS, RedHat, Ubuntu, or whatever) there a= re package collections. No collection that I have ever installef anywhere has ever installed moreuti= ls. Ever. Contrast that with the facts that: All linux distros regardless of what package collection you choose gives you= awk, sed, tr, etc. So while you point to the notion that "Linux has no base" and "everything is= a package anyway" (my paraphrasing), this is not the case. It is not arguing "slippery slope" to not want sponge in base, but rather th= at it literally does not get installed with any package collection in Linux a= nd therefore no Linux base has it (the "base" in Linux is based on the packa= ge collection you choose, and thus since you cannot choose a package collect= ion that contains it, you cannot build a Linux system that has sponge on fir= st-boot unless you explicitly mention sponge as a package in the packages se= ction of a kickstart/preseed or manually select during install). >=20 >> If in base, people will target it thinking it solves a need that can't >> otherwise be solved and thus end up creating a script that is less portab= le >> because it is encumbered with dependencies specific to our base. > It's not even a homegrown idea though... As we've already covered this > is a tool that exists in the broader OSS ecosystem. Tens of thousands of machines across multiple companies tells me otherwise. > As long as it is > compatible with the more common implementation I don't see the issue. > Anything one writes using it is just "encumbered" with a dependency on > sponge. >> 2. Teaches bad practice >>=20 >> sed ... somefile | sponge somefile >>=20 >> Ignores if there is a sed error and indiscriminately zeroes somefile. >=20 > Calling this unequivocally bad practice is silly. sh(1) manually calls it bad practice > There are plenty > uses of sponge that aren't bad practice. I have a git commit hook that > utilizes sponge to do the same "auto-culling" that our svn patches do. Ignoring errors in a pipeline as was pointed out. > I like the sponge version better than creating temporary files myself: You. Do not. Need. Temporary files. > sed '/^$/d' $(git config commit.message) | awk 'NR=3D=3DFNR{a[$0];next} > !($0 in a)' /dev/fd/0 "$1" | sponge "$1" No temp files AND proper error checking. set -e # All errors fatal data=3D$( sed '/^$/d' $(git config commit.message) ) uncommon_lines=3D$( echo "$data" | awk 'NR=3D=3DFNR{a[$0];next} !($0 in a)' /= dev/fd/0 "$1" ) echo "$uncommon_lines" > "$1" If you don't want the "set -e" just throw "|| exit" at the end of the first t= wo lines. The important bit is: 1. If the path produced by $( git config commit.message ) makes sed throw an= error (e.g., ENOENT) resulting in error status, you don't blindly go on to o= verwrite "$1" 2. If awk is unable to open and read "$1" on the second line, you do not bli= ndly forge ahead and overwrtie "$1" 3. Only if you successfully ran sed, successfully ran awk, should "$1" be up= dated. The sponge approach is just plain bad practice because: A. An error on the commit message results in "$1" being truncated to zero by= tes B. An error on /dev/fd/0 results in "$1" being truncated to zero bytes C. An error by awk on "$1" results in "$1" being truncated to zero bytes (e.= g., a flaky NFS connection wherein an awk read() fails but the sponge write(= ) succeeds). >=20 >> 3. Solution in search of a problem > Again, stating this unequivocally is silly. I discovered sponge years > ago when I was searching how best to handle something where I wanted > to write output back to the same file in a shell pipeline. Something that is explicitly warned against in sh(1). > I was > literally someone with a problem in search of a solution, and that > solution was and still is sponge. Sure, if you fly in the face of warnings abound. > Since then I have seen it > recommended numerous times in passing. Ubiquitous bad practice is still bad practice. --=20 Devin= From owner-svn-src-head@freebsd.org Tue Dec 5 17:22:22 2017 Return-Path: Delivered-To: svn-src-head@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 A1C11E71B18; Tue, 5 Dec 2017 17:22:22 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F17D640E9; Tue, 5 Dec 2017 17:22:22 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=54940 helo=[10.0.0.109]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1eMGvF-000NCk-0P; Tue, 05 Dec 2017 17:22:21 +0000 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee From: Devin Teske X-Mailer: iPhone Mail (13G36) In-Reply-To: <20171205162926.9F16C1DD@spqr.komquats.com> Date: Tue, 5 Dec 2017 09:22:20 -0800 Cc: Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <20171205162926.9F16C1DD@spqr.komquats.com> To: Cy Schubert Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 17:22:22 -0000 > On Dec 5, 2017, at 8:29 AM, Cy Schubert wrote: >=20 > Why not update sed to create the backup file only if the suffix is given t= o -i, like gnu sed does. >=20 I suspect that would break countless scripts that test uname to determine ho= w to use the -i flag of sed. --=20 Devin > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > This old phone only supports top post. Apologies. >=20 > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- > From: Devin Teske > Sent: 05/12/2017 07:35 > To: Hans Petter Selasky > Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; svn= -src-all@freebsd.org; svn-src-head@freebsd.org > Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/spong= e/tests usr.bin/tee >=20 >=20 > > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote:= > >=20 > >> On 12/05/17 13:58, Rodney W. Grimes wrote: > >> Further more, why does freebsd need this in base? > >=20 > > Hi, > >=20 > > I think this is useful. It could replace the "-i " (intermediate) option= for "sed" for example. It avoids creating temporary files when filtering fi= les, right? > >=20 > > --HPS > >=20 >=20 > Wth is wrong with: >=20 > data=3D$( sed -e '...' somefile ) && > echo "$data" > somefile >=20 > or >=20 > set -e > data=3D... > echo "$data" > ... >=20 > or >=20 > exec 3< $( ... ) > EOF > cat > ... <&3 >=20 > or >=20 > (I digress) >=20 > Infinite variations, but the gist is that sponge looks to be trying to hel= p sh(1)/similar when help is unneeded. >=20 > Why buffer data into memory via fork-exec-pipe to sponge when you can buff= er to native namespace without pipe to sponge? >=20 > Am I missing something? Why do we need sponge(1)? > --=20 > Devin >=20 From owner-svn-src-head@freebsd.org Tue Dec 5 17:23:28 2017 Return-Path: Delivered-To: svn-src-head@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 1A6D6E71BCA; Tue, 5 Dec 2017 17:23:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com [209.85.214.52]) (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 AC0CA6429A; Tue, 5 Dec 2017 17:23:27 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f52.google.com with SMTP id m11so17654781iti.1; Tue, 05 Dec 2017 09:23:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=vZU/ms8NeTAe/5GLLeYBE2k6BwEXO0BAFPKm3ueo1F0=; b=oMi9ofeCZ9sZXuGrgAvStedTbK/HPWqmhiW8RP3g/tmKrTA8d2YYqZ7bVxQ81v2PjL DILhwMgEKvKFeOruTVw+vRGrOdn2bUm+ZJt4b84Dc3UTlMuPSfMc9+Ph4ZN0UfJUmAJO sdjjLk+V/Qgmfxmf9Ixxz8tv51rjOw7e4XmAW6fQ4TOnB/eJpyGcioGBUfpQZ77r3z0N lGj2rKCu2eBamuP7tLnOh08QeRrjHq7iNpFRcJ0NW77D6+QJrZfezC4ym4JP1O+gOkNS LXKWXzzMS2MyGSOy1FW+sBern87MPyNSwTFhXgFlZzjjDFWu+sNy2lpl7Z3YQmaZNd9L QLyg== X-Gm-Message-State: AKGB3mL1UB+Uk/BxiX4YnHSha3fXreyw6kvPC295chwjrG3QYSEpNCW2 SZsOfMdpNCi1qsZ8j7tpwVsXn5rM X-Google-Smtp-Source: AGs4zMaLxiIAfTLkPDgwke+5xW9e3EdbnGKhYoNrIL39/k7l7SsQFKfOZariXEy4Pr68tBnSSnT8pQ== X-Received: by 10.36.14.86 with SMTP id 83mr17253118ite.8.1512494264135; Tue, 05 Dec 2017 09:17:44 -0800 (PST) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com. [209.85.214.48]) by smtp.gmail.com with ESMTPSA id u94sm236962ioi.67.2017.12.05.09.17.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 09:17:43 -0800 (PST) Received: by mail-it0-f48.google.com with SMTP id z6so3298678iti.4; Tue, 05 Dec 2017 09:17:43 -0800 (PST) X-Received: by 10.36.192.2 with SMTP id u2mr18451271itf.119.1512494263458; Tue, 05 Dec 2017 09:17:43 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Tue, 5 Dec 2017 09:17:42 -0800 (PST) In-Reply-To: <201712050355.vB53tApl074041@repo.freebsd.org> References: <201712050355.vB53tApl074041@repo.freebsd.org> From: Conrad Meyer Date: Tue, 5 Dec 2017 09:17:42 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 17:23:28 -0000 Please revert this change, along with r326555 and r326557. I am not opposed to the idea of a version of this utility in base. I am opposed to breaking the build, and functionally broken programs. Thanks, Conrad On Mon, Dec 4, 2017 at 7:55 PM, Eitan Adler wrote: > Author: eadler > Date: Tue Dec 5 03:55:10 2017 > New Revision: 326554 > URL: https://svnweb.freebsd.org/changeset/base/326554 > > Log: > sponge(1): initial commit > > sponge(1) is a utility that reads input until > complete, then opens the output file, then > writes to it. This makes it useful in pipelines > that read and write to the same file. > > Reviewed by: wblock, jilles, imp, cem, danfe (all: various iterations) > Inspired by: https://joeyh.name/code/moreutils/ > > Added: > head/usr.bin/sponge/ > head/usr.bin/sponge/Makefile (contents, props changed) > head/usr.bin/sponge/sponge.1 (contents, props changed) > head/usr.bin/sponge/sponge.c (contents, props changed) > head/usr.bin/sponge/tests/ > head/usr.bin/sponge/tests/Makefile (contents, props changed) > head/usr.bin/sponge/tests/Makefile.depend (contents, props changed) > head/usr.bin/sponge/tests/sponge_test.sh (contents, props changed) > Modified: > head/.arclint > head/usr.bin/tee/tee.1 > > Modified: head/.arclint > ============================================================================== > --- head/.arclint Tue Dec 5 02:23:36 2017 (r326553) > +++ head/.arclint Tue Dec 5 03:55:10 2017 (r326554) > @@ -9,7 +9,8 @@ > "type": "spelling" > }, > "chmod": { > - "type": "chmod" > + "type": "chmod", > + "exclude": "(/tests/)" > }, > "merge-conflict": { > "type": "merge-conflict" > > Added: head/usr.bin/sponge/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/Makefile Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,8 @@ > +# $FreeBSD$ > + > +PROG= sponge > + > +HAS_TESTS= > +SUBDIR.${MK_TESTS}+= tests > + > +.include > > Added: head/usr.bin/sponge/sponge.1 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/sponge.1 Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,75 @@ > +.\" Eitan Adler. 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 THE REGENTS 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 THE REGENTS 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 November 1, 2017 > +.Dt SPONGE 1 > +.Os > +.Sh NAME > +.Nm sponge > +.Nd buffer stdin and write to stdout > +.Sh SYNOPSIS > +.Nm > +.Op Fl a > +.Ar filename > +.Sh DESCRIPTION > +The > +.Nm > +utility reads standard in until complete, then opens > +the output file and writes to it. > +This makes it useful in pipelines that read a file and then write to it. > +These options are available: > +.Bl -tag -width indent > +.It Fl a > +Open > +.Ar filename > +in append mode. > +.El > +.Pp > +If an attempt to allocate memory fails, > +.Nm > +fails without output. > +The file is written even if earlier components > +of the pipeline failed. > +.Sh SEE ALSO > +.Xr builtin 1 , > +.Xr csh 1 , > +.Xr getrusage 2 , > +.Xr tee 1 , > +.Xr wait 2 > +.Sh EXIT STATUS > +.Ex -std > +.Sh EXAMPLES > +A > +.Pa file > +can be be sorted "in place" by executing > +.Cm sort file | sponge file > +.Sh HISTORY > +The > +.Nm > +utility was written by > +.An Eitan Adler Aq Mt eadler@FreeBSD.org > +and first appeared > +in > +.Fx 12.0 . > > Added: head/usr.bin/sponge/sponge.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/sponge.c Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,189 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2017 Eitan Adler > + * > + * 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 THE REGENTS 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 THE REGENTS 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$ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define DEFAULT_BUF_SIZE 16384 > +#define DEFAULT_BUF_CNT 12 > + > +static int flag_append = 0; > + > +static void usage(void); > +static void *safe_malloc(size_t size); > +static void *safe_calloc(size_t count, size_t size); > +static void *safe_reallocf(void *ptr, size_t size); > + > +static void * > +safe_malloc(size_t size) > +{ > + void *ret; > + > + ret = malloc(size); > + if (ret == NULL) { > + err(1, "malloc failed"); > + } > + return (ret); > +} > + > +static void * > +safe_calloc(size_t count, size_t size) > +{ > + void *ret; > + > + ret = calloc(count, size); > + if (ret == NULL) { > + err(1, "calloc failed"); > + } > + return (ret); > +} > + > +static void * > +safe_reallocf(void *ptr, size_t size) > +{ > + void *ret; > + > + ret = reallocf(ptr, size); > + if (ret == NULL) { > + err(1, "reallocf failed"); > + } > + return (ret); > +} > + > +static void > +usage(void) > +{ > + fprintf(stderr, "usage: sponge [-a] filename\n"); > +} > + > +int > +main(int argc, char* argv[]) > +{ > + struct iovec *iov; > + char *buf; > + char *outfile; > + ssize_t i; > + size_t bufcnt; > + size_t whichbuf; > + size_t bufremain; > + long maxiovec; > + int fd; > + int openflags = O_WRONLY; > + int opt; > + > + while ((opt = getopt(argc, argv, "ah")) != -1) { > + switch (opt) { > + case 'a': > + flag_append = 1; > + break; > + case 'h': > + usage(); > + exit(0); > + case '?': > + default: > + usage(); > + exit(1); > + } > + } > + > + if (optind < argc) { > + outfile = argv[optind]; > + } > + > + > + bufcnt = DEFAULT_BUF_CNT; > + whichbuf = 0; > + iov = safe_calloc(bufcnt, sizeof(*iov)); > + > + for (;;) { > + buf = safe_malloc(DEFAULT_BUF_SIZE); > + i = read(STDIN_FILENO, buf, DEFAULT_BUF_SIZE); > + if (whichbuf == bufcnt) { > + bufcnt *= 2; > + iov = safe_reallocf(iov, bufcnt * sizeof(*iov)); > + } > + if (i < 0) { > + err(1, "read failed"); > + } > + if (i == 0) { > + free(buf); > + break; > + } > + iov[whichbuf].iov_base = buf; > + iov[whichbuf].iov_len = i; > + whichbuf++; > + } > + > + if (outfile) { > + if (flag_append) { > + openflags |= O_APPEND; > + } else { > + openflags |= O_TRUNC; > + } > + fd = open(outfile, openflags); > + } > + else { > + fd = STDOUT_FILENO; > + } > + > + if (fd < 0) { > + err(1, "failed to open"); > + } > + > + maxiovec = sysconf(_SC_IOV_MAX); > + if (maxiovec == -1) { > + maxiovec = _XOPEN_IOV_MAX; > + } > + bufcnt = whichbuf; > + bufremain = bufcnt; > + > + while (bufremain > 0) { > + whichbuf = (bufremain < maxiovec) ? bufremain : maxiovec; > + bufremain -= whichbuf; > + > + i = writev(fd, iov, whichbuf); > + if (i < 0) { > + err(1, "failed to write"); > + } > + } > + > + if (outfile) { > + i = close(fd); > + if (i < 0) { > + err(1, "failed to close"); > + } > + } > +} > > Added: head/usr.bin/sponge/tests/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/tests/Makefile Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,9 @@ > +# $FreeBSD$ > + > +PACKAGE= ${TESTBASE}/usr.bin/sponge > + > +TESTSDIR= ${TESTSBASE}/usr.bin/sponge/tests > + > +ATF_TESTS_SH= cp_test > + > +.include > > Added: head/usr.bin/sponge/tests/Makefile.depend > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/tests/Makefile.depend Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,18 @@ > +# $FreeBSD$ > +# Autogenerated - do NOT edit! > + > +DIRDEPS = \ > + gnu/lib/csu \ > + include \ > + include/xlocale \ > + lib/${CSU_DIR} \ > + lib/atf/libatf-c \ > + lib/libc \ > + lib/libcompiler_rt \ > + > + > +.include > + > +.if ${DEP_RELDIR} == ${_DEP_RELDIR} > +# local dependencies - needed for -jN in clean tree > +.endif > > Added: head/usr.bin/sponge/tests/sponge_test.sh > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/sponge/tests/sponge_test.sh Tue Dec 5 03:55:10 2017 (r326554) > @@ -0,0 +1,48 @@ > +# $FreeBSD$ > +# > +# SPDX-License-Identifier: BSD-2-Clause > +# > +# Copyright 2017 Eitan Adler > +# All rights reserved. > +# > +# Redistribution and use in source and binary forms, with or without > +# modification, are permitted provided that the following conditions are > +# met: > +# > +# * Redistributions of source code must retain the above copyright > +# notice, this list of conditions and the following disclaimer. > +# * 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 THE COPYRIGHT HOLDERS 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 THE COPYRIGHT > +# OWNER 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. > + > +atf_test_case simple > +simple_body() { > + printf 'd\ne\na\n' >| x > + printf 'a\nd\ne\n' >| y > + sort x | sponge x > + > + atf_check -s exit:0 -o empty -e empty 'sort x | sponge x' > + > + if ! cmp -s x y; then > + echo "x and y differ, but they should be equal" > + diff -u x y > + atf_fail "Original and copy do not match" > + fi > + > +} > + > +atf_init_test_cases() { > + atf_add_test_case simple > +} > > Modified: head/usr.bin/tee/tee.1 > ============================================================================== > --- head/usr.bin/tee/tee.1 Tue Dec 5 02:23:36 2017 (r326553) > +++ head/usr.bin/tee/tee.1 Tue Dec 5 03:55:10 2017 (r326554) > @@ -72,6 +72,8 @@ utility takes the default action for all signals, > except in the event of the > .Fl i > option. > +.Sh SEE ALSO > +.Xr sponge 1 > .Sh EXIT STATUS > .Ex -std > .Sh STANDARDS > From owner-svn-src-head@freebsd.org Tue Dec 5 17:23:34 2017 Return-Path: Delivered-To: svn-src-head@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 76911E71C16; Tue, 5 Dec 2017 17:23:34 +0000 (UTC) (envelope-from bdrewery@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 4353F642DF; Tue, 5 Dec 2017 17:23:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5HNXQO014634; Tue, 5 Dec 2017 17:23:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5HNXwb014633; Tue, 5 Dec 2017 17:23:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712051723.vB5HNXwb014633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 17:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326569 - head/sys/modules/vmm X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/modules/vmm X-SVN-Commit-Revision: 326569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 17:23:34 -0000 Author: bdrewery Date: Tue Dec 5 17:23:33 2017 New Revision: 326569 URL: https://svnweb.freebsd.org/changeset/base/326569 Log: Fix cyclic dependency after r326552. The OBJS_DEPEND_GUESS mechanism was making vmx_genassym.o depend on all headers along with vmx_assym.h, though vmx_assym.h depends on having vmx_genassym.o present to generate. Moving the headers to DPSRCS is enough to resolve the issue as they will no longer be implicit dependencies for all objects. Because of this we need explicit OBJS_DEPEND_GUESS entries to ensure the headers are generated when needed for the *_support.o files that need them. X-MFC-With: r326552 MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/sys/modules/vmm/Makefile Modified: head/sys/modules/vmm/Makefile ============================================================================== --- head/sys/modules/vmm/Makefile Tue Dec 5 14:46:12 2017 (r326568) +++ head/sys/modules/vmm/Makefile Tue Dec 5 17:23:33 2017 (r326569) @@ -3,8 +3,8 @@ KMOD= vmm SRCS= opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h pcib_if.h acpi_if.h -SRCS+= vmx_assym.h svm_assym.h -DPSRCS= vmx_genassym.c svm_genassym.c +DPSRCS+= vmx_assym.h svm_assym.h +DPSRCS+= vmx_genassym.c svm_genassym.c CFLAGS+= -DVMM_KEEP_STATS -DSMP CFLAGS+= -I${SRCTOP}/sys/amd64/vmm @@ -56,6 +56,9 @@ SRCS+= vmcb.c \ svm_msr.c CLEANFILES= vmx_assym.h vmx_genassym.o svm_assym.h svm_genassym.o + +OBJS_DEPEND_GUESS.vmx_support.o+= vmx_assym.h +OBJS_DEPEND_GUESS.svm_support.o+= svm_assym.h vmx_assym.h: vmx_genassym.o sh ${SYSDIR}/kern/genassym.sh vmx_genassym.o > ${.TARGET} From owner-svn-src-head@freebsd.org Tue Dec 5 17:50:35 2017 Return-Path: Delivered-To: svn-src-head@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 5F5F4E725A6; Tue, 5 Dec 2017 17:50:35 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 00D286535F; Tue, 5 Dec 2017 17:50:34 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MHMUePEM9RDG7MHMVet0lD; Tue, 05 Dec 2017 10:50:33 -0700 X-Authority-Analysis: v=2.2 cv=b+PC2pOx c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=ocR9PWop10UA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=ndaoGXS1AAAA:8 a=IDPPhiR9RvHgwgAsPNAA:9 a=cExSKycrkz02Yz1S:21 a=pwaUFreBph5h-PuX:21 a=QEXdDO2ut3YA:10 a=VVDKKMnT1RUTkQuetWUA:9 a=a3gq0iXbTZ7bkWuq:21 a=l1k_JcxzDZWNceyM:21 a=UPq-Zfme56oUIyW2:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=mFeOnlTyF09QQMGr2mMI:22 Received: from [25.81.45.55] (S0106d4ca6d8943b0.gv.shawcable.net [24.68.134.59]) by spqr.komquats.com (Postfix) with ESMTPSA id 64B7135B; Tue, 5 Dec 2017 09:50:29 -0800 (PST) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee Date: Tue, 5 Dec 2017 09:50:32 -0800 To: Devin Teske CC: Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20171205175029.64B7135B@spqr.komquats.com> X-CMAE-Envelope: MS4wfNPfAajGB81cFuEtK32rMBm6u3Iohv19CR2cSVaqJRgoVLhSNwwkFTujeeGDdbQDaAk5hYhtgJq7Y9WxBMAVLrSOJ9Rx4PvNU1JJVUvYsrxDokBtzplO Yu12+cPPhTypOdC/Z+7fyVCdUDqiAPwX753pVPQBKSxQlWDPbJ9aMkj1/C51CjzkMHDyUbYR8xIwqQ27kXTSvbCkGQ8fH3WNTrqopF988R10YkkbODMDOaLE fsKNlA1QL7E/WHFNiYxbBQyzE7eqXMrJtF2qxq6R5ieoxMn7yOyVuFQS1kphA3IzNAK0yOxszj58+2Z2pIL7KavRMVVp0NbF2dX60GnsjuEuQgbJZGIa2YU3 ZemDYzHFeKsaioBYhz6Wdeh++fT5n/4ZDzRx3gs+sup5Xqnp9l8= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 17:50:35 -0000 Our sed already creates backup files "optionally" just as gsed does. Only t= he syntax is different. No need to sponge sed, just sed -i '' (whereas gsed= is -i without the argument). --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. This old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Devin Teske Sent: 05/12/2017 09:23 To: Cy Schubert Cc: Hans Petter Selasky; rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler;= src-committers; svn-src-all@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge= /tests usr.bin/tee On Dec 5, 2017, at 8:29 AM, Cy Schubert wrote: Why not update sed to create the backup file only if the suffix is given to= -i, like gnu sed does. I suspect that would break countless scripts that test uname to determine h= ow to use the -i flag of sed. --=20 Devin --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. This old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- From: Devin Teske Sent: 05/12/2017 07:35 To: Hans Petter Selasky Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; svn-= src-all@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge= /tests usr.bin/tee > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: >=20 >> On 12/05/17 13:58, Rodney W. Grimes wrote: >> Further more, why does freebsd need this in base? >=20 > Hi, >=20 > I think this is useful. It could replace the "-i " (intermediate) option = for "sed" for example. It avoids creating temporary files when filtering fi= les, right? >=20 > --HPS >=20 Wth is wrong with: data=3D$( sed -e '...' somefile ) && echo "$data" > somefile or set -e data=3D... echo "$data" > ... or exec 3< ... <&3 or (I digress) Infinite variations, but the gist is that sponge looks to be trying to help= sh(1)/similar when help is unneeded. Why buffer data into memory via fork-exec-pipe to sponge when you can buffe= r to native namespace without pipe to sponge? Am I missing something? Why do we need sponge(1)? --=20 Devin= From owner-svn-src-head@freebsd.org Tue Dec 5 18:08:23 2017 Return-Path: Delivered-To: svn-src-head@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 F4200E72C99 for ; Tue, 5 Dec 2017 18:08:22 +0000 (UTC) (envelope-from erj@erj.cc) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (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 C1C4765F01 for ; Tue, 5 Dec 2017 18:08:22 +0000 (UTC) (envelope-from erj@erj.cc) Received: by mail-it0-x234.google.com with SMTP id r6so3631312itr.3 for ; Tue, 05 Dec 2017 10:08:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=erj.cc; s=ericroxx; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y8uDaEO8HXMv705m6dFVGgvtCJkhaoHe/M9ki+BMIzo=; b=Z1k7P8Cuwlh5JhXJjaLwHgHkfNF1cs4XuE/fipebUdAei7KPirmOVNNRNtYoHrvSii ohrb3b1J+g7cT5B0KhxuyKGpSyFNPIpR39BJDRWNcL1bvcQc/yPoVHiJkDtw4IEC3cw/ bCBqXxCcfCDkgLYAOHRIpoBkQfY+LxB4OIPXU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y8uDaEO8HXMv705m6dFVGgvtCJkhaoHe/M9ki+BMIzo=; b=oOomOYu9YLVRqHegpQsNjLs8kGG+zIC5EKyTVd9AveUYK6bD9fzMxCr8BNw5ydGXmE UTVVOfq0OJYCcnW3zJoQGdVvSsXcAKcr7aenySn2bObESDQxOVbkn/Ad1j2vGrbhX0M3 JIKCgA5yeTTpjNvtoYXJOeUv9RkjT/FI/M98xbD7+/VaPgeLVinwE2N7x3zNlO96zeU2 518GrA4J6N01AqtKCsHoyApxRzPX5qLURQp0vGQ53A3EQGxJI7OQnPNjwUgJTglX1MJf fQbyu+Zzr8idNBCCUIHl/8y17rErV1JVEB9d1iKwWWaPmuk5wUqk0BWAOPF12cfo9GXu mZ1A== X-Gm-Message-State: AKGB3mJs0uQ5iLphrxuann1pQ7qbYaxkok3VuQbQF32zGuKp6sLxDoAT H1DpTdYrGUsYTMi3FRSkGRfwsUpl8tHPK0M70BL7rg== X-Google-Smtp-Source: AGs4zMbJuBV3xdULaRI/DvC29ii9tPrdHecqP9O6NiwLsd1qorLVSvHMX0kasur1aZbB2Abjas1+f4DsqSrgxxCsdoM= X-Received: by 10.36.219.214 with SMTP id c205mr18417054itg.65.1512497301839; Tue, 05 Dec 2017 10:08:21 -0800 (PST) MIME-Version: 1.0 References: <20171205175029.64B7135B@spqr.komquats.com> In-Reply-To: <20171205175029.64B7135B@spqr.komquats.com> From: Eric Joyner Date: Tue, 05 Dec 2017 18:08:11 +0000 Message-ID: Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Cy Schubert Cc: Devin Teske , Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 18:08:23 -0000 I got told by a co-worker that this broke buildworld. Can this commit get reverted/have the cast fixed? - Eric (erj) On Tue, Dec 5, 2017 at 9:50 AM Cy Schubert wrote: > Our sed already creates backup files "optionally" just as gsed does. Only > the syntax is different. No need to sponge sed, just sed -i '' (whereas > gsed is -i without the argument). > > > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > This old phone only supports top post. Apologies. > > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- > ------------------------------ > From: Devin Teske > Sent: 05/12/2017 09:23 > To: Cy Schubert > Cc: Hans Petter Selasky; rgrimes@freebsd.org; cem@freebsd.org; Eitan > Adler; src-committers; svn-src-all@freebsd.org; svn-src-head@freebsd.org > > Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge > usr.bin/sponge/tests usr.bin/tee > > > On Dec 5, 2017, at 8:29 AM, Cy Schubert wrote: > > Why not update sed to create the backup file only if the suffix is given > to -i, like gnu sed does. > > > I suspect that would break countless scripts that test uname to determine > how to use the -i flag of sed. > -- > Devin > > > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > This old phone only supports top post. Apologies. > > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- > ------------------------------ > From: Devin Teske > Sent: 05/12/2017 07:35 > To: Hans Petter Selasky > Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; > svn-src-all@freebsd.org; svn-src-head@freebsd.org > Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge > usr.bin/sponge/tests usr.bin/tee > > > > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: > > > >> On 12/05/17 13:58, Rodney W. Grimes wrote: > >> Further more, why does freebsd need this in base? > > > > Hi, > > > > I think this is useful. It could replace the "-i " (intermediate) option > for "sed" for example. It avoids creating temporary files when filtering > files, right? > > > > --HPS > > > > Wth is wrong with: > > data=$( sed -e '...' somefile ) && > echo "$data" > somefile > > or > > set -e > data=... > echo "$data" > ... > > or > > exec 3< $( ... ) > EOF > cat > ... <&3 > > or > > (I digress) > > Infinite variations, but the gist is that sponge looks to be trying to > help sh(1)/similar when help is unneeded. > > Why buffer data into memory via fork-exec-pipe to sponge when you can > buffer to native namespace without pipe to sponge? > > Am I missing something? Why do we need sponge(1)? > -- > Devin > > From owner-svn-src-head@freebsd.org Tue Dec 5 18:26:35 2017 Return-Path: Delivered-To: svn-src-head@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 86658E73B3C; Tue, 5 Dec 2017 18:26: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 50F0D672DD; Tue, 5 Dec 2017 18:26:35 +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 vB5IQY07040642; Tue, 5 Dec 2017 18:26:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5IQYrM040641; Tue, 5 Dec 2017 18:26:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712051826.vB5IQYrM040641@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 5 Dec 2017 18:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326570 - head/usr.bin X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/usr.bin X-SVN-Commit-Revision: 326570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 18:26:35 -0000 Author: dim Date: Tue Dec 5 18:26:34 2017 New Revision: 326570 URL: https://svnweb.freebsd.org/changeset/base/326570 Log: For now, disconnect usr.bin/sponge from the build, to unbreak world after r326557. Noticed by: many Pointy hat to: eadler Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Dec 5 17:23:33 2017 (r326569) +++ head/usr.bin/Makefile Tue Dec 5 18:26:34 2017 (r326570) @@ -148,7 +148,6 @@ SUBDIR= alias \ soelim \ sort \ split \ - sponge \ stat \ stdbuf \ strings \ From owner-svn-src-head@freebsd.org Tue Dec 5 18:30:20 2017 Return-Path: Delivered-To: svn-src-head@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 10B8AE73CEE for ; Tue, 5 Dec 2017 18:30:20 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x230.google.com (mail-yb0-x230.google.com [IPv6:2607:f8b0:4002:c09::230]) (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 B9FD06769F for ; Tue, 5 Dec 2017 18:30:19 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x230.google.com with SMTP id j7so535278ybl.3 for ; Tue, 05 Dec 2017 10:30:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9vsdKb3GI68lbK3a885nUNZNJKx0rssLXx/0mNW3J4M=; b=YbHsJ+IbSnXazEMEIm6m+wefbOFtvL/RHfIssAstThSxG/oYmMzocQO7WFNdoy8CVd A+GsHvqUeOzBxG0mt9om1uWiS4wvx/gWy6RHof4q0QzwpSSEkv7wF8gozs6m7whsOvTF TiGxDKc2goyzH23SCKTn1IrY0otmyqopN6dhU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9vsdKb3GI68lbK3a885nUNZNJKx0rssLXx/0mNW3J4M=; b=HdUUStJKHsfzYhZMB43Mtzpk7Nl2miGaCYEt+zTsFiULrfPftIYA8m2HHtcEnZV6r4 lGWBHGaD2+EjbXE21mFzpg9WjTqLlkGgHsjQsL6hEkVOCz6UFCggKKuUavrTNPNLl7OY OtLNhTpix4QI6r40Qrzu2CL9nQgCWbonc+WksjpB3vLszGR+IWGnvRj13SiUSs8rR0x3 /euJzEILz7EHSVd/FADdbTYgeHVkVk88kUUkqn/bIHodhCp/sbZgu98J30NkBiZM1hAu yHGZ5JQ3PgPM6rWyWBiBktDomnIqp3aze81G9+v5cH9c8GBXlRw8htvJ7nrFqOiR7J9+ 8mxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9vsdKb3GI68lbK3a885nUNZNJKx0rssLXx/0mNW3J4M=; b=Qp9IwJcLyF3JKncxJ8bk1eYlc5KTvuneXam2PacJp+de01kEsQV3sPa0ELQqkdQvd5 FvhMzN05ei5stxD2yr+ofVivxcAJgp4IYD9s9VTWGVA8jc/800/kF3QhjycCULl8jA7d H6XWDEXiwo7xjwtIYvQ3k2t1yUREHyN+ewQm0CrnqjRFjSTUamS4yiZ1q8h1+qcE4YGQ r4ALZTm6IEW79JuuH0F7K7d84Un8HpV06I3eqnBPrevYrEEsnBhAkTO70E2ZBsA+ghMu rIBgAiaQH5xxkctf3JtZHqjx8kECbFnJnekojxQVzVDqno1uVRcV8DeUGYhRO0H9OEXJ gvog== X-Gm-Message-State: AKGB3mKvjam1gxBX4KBUQJeczq44mvqR5j3QR1N7SP0O4+nk4pZu9jzK Jo6/+84l6e9EHCjhcbX3cu6umEeEKeCsVGQemWxepg== X-Google-Smtp-Source: AGs4zMb1t+qUV6Xm8MOu3xxKO5t/9lyOxbmVf33tEkR0mqDgXZ26/pr1qXFUVCfyNVKvs+IadvpnOWSTXGWtyzvavt0= X-Received: by 10.37.160.68 with SMTP id x62mr5817655ybh.277.1512498618737; Tue, 05 Dec 2017 10:30:18 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.37.15.66 with HTTP; Tue, 5 Dec 2017 10:29:47 -0800 (PST) In-Reply-To: References: <20171205175029.64B7135B@spqr.komquats.com> From: Eitan Adler Date: Tue, 5 Dec 2017 10:29:47 -0800 X-Google-Sender-Auth: kUMWtIADBKUaekfPyHHC3CBJiYk Message-ID: Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Eric Joyner Cc: Cy Schubert , Devin Teske , Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 18:30:20 -0000 I'm not near my commit box right now so someone will have to revert it. What's funny is that I ran a complete 'make buildworld buildkernel' last night with this patch. Will respond to the rest of the thread later On 5 December 2017 at 10:08, Eric Joyner wrote: > I got told by a co-worker that this broke buildworld. Can this commit get > reverted/have the cast fixed? > > - Eric (erj) > > > On Tue, Dec 5, 2017 at 9:50 AM Cy Schubert wrote: >> >> Our sed already creates backup files "optionally" just as gsed does. Only >> the syntax is different. No need to sponge sed, just sed -i '' (whereas gsed >> is -i without the argument). >> >> >> --- >> Sent using a tiny phone keyboard. >> Apologies for any typos and autocorrect. >> This old phone only supports top post. Apologies. >> >> Cy Schubert >> or >> The need of the many outweighs the greed of the few. >> --- >> ________________________________ >> From: Devin Teske >> Sent: 05/12/2017 09:23 >> To: Cy Schubert >> Cc: Hans Petter Selasky; rgrimes@freebsd.org; cem@freebsd.org; Eitan >> Adler; src-committers; svn-src-all@freebsd.org; svn-src-head@freebsd.org >> >> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge >> usr.bin/sponge/tests usr.bin/tee >> >> >> On Dec 5, 2017, at 8:29 AM, Cy Schubert wrote: >> >> Why not update sed to create the backup file only if the suffix is given >> to -i, like gnu sed does. >> >> >> I suspect that would break countless scripts that test uname to determine >> how to use the -i flag of sed. >> -- >> Devin >> >> >> --- >> Sent using a tiny phone keyboard. >> Apologies for any typos and autocorrect. >> This old phone only supports top post. Apologies. >> >> Cy Schubert >> or >> The need of the many outweighs the greed of the few. >> --- >> ________________________________ >> From: Devin Teske >> Sent: 05/12/2017 07:35 >> To: Hans Petter Selasky >> Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; >> svn-src-all@freebsd.org; svn-src-head@freebsd.org >> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge >> usr.bin/sponge/tests usr.bin/tee >> >> >> > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: >> > >> >> On 12/05/17 13:58, Rodney W. Grimes wrote: >> >> Further more, why does freebsd need this in base? >> > >> > Hi, >> > >> > I think this is useful. It could replace the "-i " (intermediate) option >> > for "sed" for example. It avoids creating temporary files when filtering >> > files, right? >> > >> > --HPS >> > >> >> Wth is wrong with: >> >> data=$( sed -e '...' somefile ) && >> echo "$data" > somefile >> >> or >> >> set -e >> data=... >> echo "$data" > ... >> >> or >> >> exec 3<> $( ... ) >> EOF >> cat > ... <&3 >> >> or >> >> (I digress) >> >> Infinite variations, but the gist is that sponge looks to be trying to >> help sh(1)/similar when help is unneeded. >> >> Why buffer data into memory via fork-exec-pipe to sponge when you can >> buffer to native namespace without pipe to sponge? >> >> Am I missing something? Why do we need sponge(1)? >> -- >> Devin >> > -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Tue Dec 5 18:42:09 2017 Return-Path: Delivered-To: svn-src-head@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 289F4E743AF; Tue, 5 Dec 2017 18:42:09 +0000 (UTC) (envelope-from erj@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 001D668269; Tue, 5 Dec 2017 18:42:08 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5Ig8AX048187; Tue, 5 Dec 2017 18:42:08 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5Ig7CX048185; Tue, 5 Dec 2017 18:42:07 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201712051842.vB5Ig7CX048185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Tue, 5 Dec 2017 18:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326571 - in head: sbin/ifconfig sys/net X-SVN-Group: head X-SVN-Commit-Author: erj X-SVN-Commit-Paths: in head: sbin/ifconfig sys/net X-SVN-Commit-Revision: 326571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 18:42:09 -0000 Author: erj Date: Tue Dec 5 18:42:07 2017 New Revision: 326571 URL: https://svnweb.freebsd.org/changeset/base/326571 Log: ifconfig(8): Display extended compliance code string for SFP transceivers - Updates tables in affected files with new entries from newer spec revisions of SFF-8472, SFF-8024, and SFF-8636 - Change ifconfig to read and display the extended compliance code for SFP media if the extended compliance code is not 0. This was being displayed for QSFP transceivers only, but SFP28 media uses this to report 25G capability. Reviewed by: melifaro, sbruno Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D13286 Modified: head/sbin/ifconfig/sfp.c head/sys/net/sff8472.h Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Tue Dec 5 18:26:34 2017 (r326570) +++ head/sbin/ifconfig/sfp.c Tue Dec 5 18:42:07 2017 (r326571) @@ -69,7 +69,7 @@ struct _nv { const char *find_value(struct _nv *x, int value); const char *find_zero_bit(struct _nv *x, int value, int sz); -/* SFF-8472 Rev. 11.4 table 3.4: Connector values */ +/* SFF-8024 Rev. 4.1 Table 4-3: Connector Types */ static struct _nv conn[] = { { 0x00, "Unknown" }, { 0x01, "SC" }, @@ -87,7 +87,8 @@ static struct _nv conn[] = { { 0x20, "HSSDC II" }, { 0x21, "Copper pigtail" }, { 0x22, "RJ45" }, - { 0x23, "No separate connector" }, /* SFF-8436 */ + { 0x23, "No separable connector" }, + { 0x24, "MXC 2x16" }, { 0, NULL } }; @@ -183,10 +184,17 @@ static struct _nv eth_1040g[] = { }; #define SFF_8636_EXT_COMPLIANCE 0x80 -/* SFF-8024 Rev. 3.4 table 4.4: Extended Specification Compliance */ +/* SFF-8024 Rev. 4.2 table 4-4: Extended Specification Compliance */ static struct _nv eth_extended_comp[] = { { 0xFF, "Reserved" }, - { 0x1A, "2 lambda DWDM 100G" }, + { 0x21, "100G PAM4 BiDi" }, + { 0x20, "100G SWDM4" }, + { 0x1F, "40G SWDM4" }, + { 0x1E, "2.5GBASE-T" }, + { 0x1D, "5GBASE-T" }, + { 0x1C, "10GBASE-T Short Reach" }, + { 0x1B, "100G 1550nm WDM" }, + { 0x1A, "100GE-DWDM2" }, { 0x19, "100G ACC or 25GAUI C2M ACC" }, { 0x18, "100G AOC or 25GAUI C2M AOC" }, { 0x17, "100G CLR4" }, @@ -198,23 +206,24 @@ static struct _nv eth_extended_comp[] = { { 0x11, "4 x 10GBASE-SR" }, { 0x10, "40GBASE-ER4" }, { 0x0F, "Reserved" }, + { 0x0E, "Reserved" }, { 0x0D, "25GBASE-CR CA-N" }, { 0x0C, "25GBASE-CR CA-S" }, { 0x0B, "100GBASE-CR4 or 25GBASE-CR CA-L" }, { 0x0A, "Reserved" }, - { 0x09, "100G CWDM4 MSA without FEC" }, - { 0x08, "100G ACC (Active Copper Cable)" }, + { 0x09, "Obsolete" }, + { 0x08, "100G ACC (Active Copper Cable) or 25GAUI C2M ACC" }, { 0x07, "100G PSM4 Parallel SMF" }, - { 0x06, "100G CWDM4 MSA with FEC" }, + { 0x06, "100G CWDM4" }, { 0x05, "100GBASE-SR10" }, - { 0x04, "100GBASE-ER4" }, - { 0x03, "100GBASE-LR4" }, - { 0x02, "100GBASE-SR4" }, - { 0x01, "100G AOC (Active Optical Cable) or 25GAUI C2M ACC" }, + { 0x04, "100GBASE-ER4 or 25GBASE-ER" }, + { 0x03, "100GBASE-LR4 or 25GBASE-LR" }, + { 0x02, "100GBASE-SR4 or 25GBASE-SR" }, + { 0x01, "100G AOC (Active Optical Cable) or 25GAUI C2M AOC" }, { 0x00, "Unspecified" } }; -/* SFF-8636 Rev. 2.5 table 6.3: Revision compliance */ +/* SFF-8636 Rev. 2.9 table 6.3: Revision compliance */ static struct _nv rev_compl[] = { { 0x1, "SFF-8436 rev <=4.8" }, { 0x2, "SFF-8436 rev <=4.8" }, @@ -222,7 +231,8 @@ static struct _nv rev_compl[] = { { 0x4, "SFF-8636 rev <=1.4" }, { 0x5, "SFF-8636 rev <=1.5" }, { 0x6, "SFF-8636 rev <=2.0" }, - { 0x7, "SFF-8636 rev <=2.5" }, + { 0x7, "SFF-8636 rev <=2.7" }, + { 0x8, "SFF-8636 rev >=2.8" }, { 0x0, "Unspecified" } }; @@ -378,17 +388,20 @@ get_sfp_transceiver_class(struct i2c_info *ii, char *b const char *tech_class; uint8_t code; - unsigned char qbuf[8]; - read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 8, (uint8_t *)qbuf); - - /* Check 10G Ethernet/IB first */ - read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 1, &code); - tech_class = find_zero_bit(eth_10g, code, 1); - if (tech_class == NULL) { - /* No match. Try Ethernet 1G */ - read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS_START + 3, - 1, (caddr_t)&code); - tech_class = find_zero_bit(eth_compat, code, 1); + /* Use extended compliance code if it's valid */ + read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS, 1, &code); + if (code != 0) + tech_class = find_value(eth_extended_comp, code); + else { + /* Next, check 10G Ethernet/IB CCs */ + read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 1, &code); + tech_class = find_zero_bit(eth_10g, code, 1); + if (tech_class == NULL) { + /* No match. Try Ethernet 1G */ + read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS_START + 3, + 1, (caddr_t)&code); + tech_class = find_zero_bit(eth_compat, code, 1); + } } if (tech_class == NULL) Modified: head/sys/net/sff8472.h ============================================================================== --- head/sys/net/sff8472.h Tue Dec 5 18:26:34 2017 (r326570) +++ head/sys/net/sff8472.h Tue Dec 5 18:42:07 2017 (r326571) @@ -379,7 +379,7 @@ enum { /* * Table 3.2 Identifier values. - * Identifier constants has taken from SFF-8024 rev 2.9 table 4.1 + * Identifier constants has taken from SFF-8024 rev 4.2 table 4.1 * (as referenced by table 3.2 footer) * */ enum { @@ -400,13 +400,15 @@ enum { SFF_8024_ID_CXP = 0xE, /* CXP */ SFF_8024_ID_HD4X = 0xF, /* Shielded Mini Multilane HD 4X */ SFF_8024_ID_HD8X = 0x10, /* Shielded Mini Multilane HD 8X */ - SFF_8024_ID_QSFP28 = 0x11, /* QSFP28 */ + SFF_8024_ID_QSFP28 = 0x11, /* QSFP28 or later */ SFF_8024_ID_CXP2 = 0x12, /* CXP2 (aka CXP28) */ SFF_8024_ID_CDFP = 0x13, /* CDFP (Style 1/Style 2) */ SFF_8024_ID_SMM4 = 0x14, /* Shielded Mini Multilate HD 4X Fanout */ SFF_8024_ID_SMM8 = 0x15, /* Shielded Mini Multilate HD 8X Fanout */ SFF_8024_ID_CDFP3 = 0x16, /* CDFP (Style3) */ - SFF_8024_ID_LAST = SFF_8024_ID_CDFP3 + SFF_8024_ID_MICROQSFP = 0x17, /* microQSFP */ + SFF_8024_ID_QSFP_DD = 0x18, /* QSFP-DD 8X Pluggable Transceiver */ + SFF_8024_ID_LAST = SFF_8024_ID_QSFP_DD }; static const char *sff_8024_id[SFF_8024_ID_LAST + 1] = {"Unknown", @@ -431,7 +433,9 @@ static const char *sff_8024_id[SFF_8024_ID_LAST + 1] = "CDFP", "SMM4", "SMM8", - "CDFP3"}; + "CDFP3", + "microQSFP", + "QSFP-DD"}; /* Keep compatibility with old definitions */ #define SFF_8472_ID_UNKNOWN SFF_8024_ID_UNKNOWN From owner-svn-src-head@freebsd.org Tue Dec 5 18:48:59 2017 Return-Path: Delivered-To: svn-src-head@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 C8EF3E747D5; Tue, 5 Dec 2017 18:48:59 +0000 (UTC) (envelope-from cem@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 93C4168827; Tue, 5 Dec 2017 18:48:59 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5ImwG7049149; Tue, 5 Dec 2017 18:48:58 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5Imwl2049148; Tue, 5 Dec 2017 18:48:58 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201712051848.vB5Imwl2049148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 5 Dec 2017 18:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326572 - head/sys/dev/ioat X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/ioat X-SVN-Commit-Revision: 326572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 18:48:59 -0000 Author: cem Date: Tue Dec 5 18:48:58 2017 New Revision: 326572 URL: https://svnweb.freebsd.org/changeset/base/326572 Log: ioat(4): Add Skylake Xeon PCI-ID SKX IOAT is just another 3.2 version of the CBDMA engine. Submitted by: Deepak Veliath Sponsored by: Dell EMC Isilon Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Tue Dec 5 18:42:07 2017 (r326571) +++ head/sys/dev/ioat/ioat.c Tue Dec 5 18:48:58 2017 (r326572) @@ -236,6 +236,8 @@ static struct _pcsid { 0x6f278086, "BDX IOAT Ch7" }, { 0x6f2e8086, "BDX IOAT Ch0 (RAID)" }, { 0x6f2f8086, "BDX IOAT Ch1 (RAID)" }, + + { 0x20218086, "SKX IOAT" }, }; MODULE_PNP_INFO("W32:vendor/device;D:human", pci, ioat, pci_ids, From owner-svn-src-head@freebsd.org Tue Dec 5 18:57:20 2017 Return-Path: Delivered-To: svn-src-head@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 D71A2E74CD8; Tue, 5 Dec 2017 18:57:20 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 69D4069079; Tue, 5 Dec 2017 18:57:20 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MIP5eWa9HGvLHMIP6ekSJ7; Tue, 05 Dec 2017 11:57:18 -0700 X-Authority-Analysis: v=2.2 cv=a9pAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=ocR9PWop10UA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=ndaoGXS1AAAA:8 a=XC3ynbMe0NH15Jm6wAsA:9 a=59NxDjTQvWqhdRGL:21 a=lKrUHsMZsg-uI1nw:21 a=QEXdDO2ut3YA:10 a=m8DlcCAFU8aXbRfX6yYA:9 a=qS2ixOb_dgTcq_rL:21 a=hAFxksFN1iF-jhSP:21 a=DfFShuTV8cL9fB38:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=mFeOnlTyF09QQMGr2mMI:22 Received: from [25.81.45.55] (S0106d4ca6d8943b0.gv.shawcable.net [24.68.134.59]) by spqr.komquats.com (Postfix) with ESMTPSA id 88D73495; Tue, 5 Dec 2017 10:56:09 -0800 (PST) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r326554 - in head: . usr.bin/spongeusr.bin/sponge/tests usr.bin/tee Date: Tue, 5 Dec 2017 10:56:13 -0800 To: Eitan Adler , Eric Joyner CC: Devin Teske , Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20171205185609.88D73495@spqr.komquats.com> X-CMAE-Envelope: MS4wfFjdY/G1c1pBaDVphzYDFDXUwZ55Kh876EyzZSu1Cy75aO4eg2SUwOIWqbFwS3nFG6VjHX4ljuovMk6xBA0ctbj81Tti1F3awa6aY6SiPtX6/DxF7Yg7 hUtxtfjF7lq06GzPFTbdY3Pam+Qan9e+Kuoi+Ec/yKiYrHm5reXLhohm+6MXNkOPxQIrw300DO3SB0fo5GUR0Is3+ELYDWPFoSqgnNzOrmXhqlNy2DKpwhL9 lYZ87B1AK5+kPMzHBbLGXyTCOp7kL1Mny1qLnTAclphAD+lEgxw43itIZK0pbDh89AHoZpGzk9RTzxb5NYKrElhF33jBhod6eN9XY1pB+lQfE64TmW2TJ0AY bJIszDjpveBaCT0+7d1+KD9wNEonu16pVpolXf9SjX0AhO5pI7S5S0lMYqay0kFOPRAR/5lN Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 18:57:20 -0000 Looks like it was disconnected from buildworld. I have a patch on my laptop= but I won't have internet connectivity for another hour. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. This old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Eitan Adler Sent: 05/12/2017 10:40 To: Eric Joyner Cc: Cy Schubert; Devin Teske; Hans Petter Selasky; rgrimes@freebsd.org; cem= @freebsd.org; src-committers; svn-src-all@freebsd.org; svn-src-head@freebsd= .org Subject: Re: svn commit: r326554 - in head: . usr.bin/spongeusr.bin/sponge/= tests usr.bin/tee I'm not near my commit box right now so someone will have to revert it. What's funny is that I ran a complete 'make buildworld buildkernel' last night with this patch. Will respond to the rest of the thread later On 5 December 2017 at 10:08, Eric Joyner wrote: > I got told by a co-worker that this broke buildworld. Can this commit get > reverted/have the cast fixed? > > - Eric (erj) > > > On Tue, Dec 5, 2017 at 9:50 AM Cy Schubert wro= te: >> >> Our sed already creates backup files "optionally" just as gsed does. Onl= y >> the syntax is different. No need to sponge sed, just sed -i '' (whereas = gsed >> is -i without the argument). >> >> >> --- >> Sent using a tiny phone keyboard. >> Apologies for any typos and autocorrect. >> This old phone only supports top post. Apologies. >> >> Cy Schubert >> or >> The need of the many outweighs the greed of the few. >> --- >> ________________________________ >> From: Devin Teske >> Sent: 05/12/2017 09:23 >> To: Cy Schubert >> Cc: Hans Petter Selasky; rgrimes@freebsd.org; cem@freebsd.org; Eitan >> Adler; src-committers; svn-src-all@freebsd.org; svn-src-head@freebsd.org >> >> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge >> usr.bin/sponge/tests usr.bin/tee >> >> >> On Dec 5, 2017, at 8:29 AM, Cy Schubert wrote= : >> >> Why not update sed to create the backup file only if the suffix is given >> to -i, like gnu sed does. >> >> >> I suspect that would break countless scripts that test uname to determin= e >> how to use the -i flag of sed. >> -- >> Devin >> >> >> --- >> Sent using a tiny phone keyboard. >> Apologies for any typos and autocorrect. >> This old phone only supports top post. Apologies. >> >> Cy Schubert >> or >> The need of the many outweighs the greed of the few. >> --- >> ________________________________ >> From: Devin Teske >> Sent: 05/12/2017 07:35 >> To: Hans Petter Selasky >> Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; >> svn-src-all@freebsd.org; svn-src-head@freebsd.org >> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge >> usr.bin/sponge/tests usr.bin/tee >> >> >> > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrot= e: >> > >> >> On 12/05/17 13:58, Rodney W. Grimes wrote: >> >> Further more, why does freebsd need this in base? >> > >> > Hi, >> > >> > I think this is useful. It could replace the "-i " (intermediate) opti= on >> > for "sed" for example. It avoids creating temporary files when filteri= ng >> > files, right? >> > >> > --HPS >> > >> >> Wth is wrong with: >> >> data=3D$( sed -e '...' somefile ) && >> echo "$data" > somefile >> >> or >> >> set -e >> data=3D... >> echo "$data" > ... >> >> or >> >> exec 3<> $( ... ) >> EOF >> cat > ... <&3 >> >> or >> >> (I digress) >> >> Infinite variations, but the gist is that sponge looks to be trying to >> help sh(1)/similar when help is unneeded. >> >> Why buffer data into memory via fork-exec-pipe to sponge when you can >> buffer to native namespace without pipe to sponge? >> >> Am I missing something? Why do we need sponge(1)? >> -- >> Devin >> > --=20 Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Tue Dec 5 19:54:56 2017 Return-Path: Delivered-To: svn-src-head@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 9BB6CE7675A; Tue, 5 Dec 2017 19:54:56 +0000 (UTC) (envelope-from glebius@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 527416BE38; Tue, 5 Dec 2017 19:54:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5Jst1U079841; Tue, 5 Dec 2017 19:54:55 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5JstQS079839; Tue, 5 Dec 2017 19:54:55 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201712051954.vB5JstQS079839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 5 Dec 2017 19:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326573 - head/usr.sbin/syslogd X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/usr.sbin/syslogd X-SVN-Commit-Revision: 326573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 19:54:56 -0000 Author: glebius Date: Tue Dec 5 19:54:55 2017 New Revision: 326573 URL: https://svnweb.freebsd.org/changeset/base/326573 Log: When parsing remote messages, require them to have standard timestamp field, and support properly parse out the hostname as described by RFC3164, which wasn't done before. However, don't discard message if it doesn't have hostname, for compatibility. Enable logging of the message supplied hostname instead of real hostname with -H switch. PR: 200933 Reported by: Konstantin Pavlov MFC after: 2 months Modified: head/usr.sbin/syslogd/syslogd.8 head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.8 ============================================================================== --- head/usr.sbin/syslogd/syslogd.8 Tue Dec 5 18:48:58 2017 (r326572) +++ head/usr.sbin/syslogd/syslogd.8 Tue Dec 5 19:54:55 2017 (r326573) @@ -28,7 +28,7 @@ .\" @(#)syslogd.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 3, 2017 +.Dd November 28, 2017 .Dt SYSLOGD 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd log systems messages .Sh SYNOPSIS .Nm -.Op Fl 468ACcdFkNnosTuv +.Op Fl 468ACcdFHkNnosTuv .Op Fl a Ar allowed_peer .Op Fl b Ar bind_address .Op Fl f Ar config_file @@ -229,6 +229,9 @@ and to run .Nm , and wants to monitor when and how it exits. +.It Fl H +When logging remote messages use hostname from the message (if supplied) +instead of using address from which the message was received. .It Fl k Disable the translation of messages received with facility Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Tue Dec 5 18:48:58 2017 (r326572) +++ head/usr.sbin/syslogd/syslogd.c Tue Dec 5 19:54:55 2017 (r326573) @@ -173,7 +173,6 @@ static STAILQ_HEAD(, socklist) shead = STAILQ_HEAD_INI #define IGN_CONS 0x001 /* don't print on console */ #define SYNC_FILE 0x002 /* do fsync on file after printing */ -#define ADDDATE 0x004 /* add a date to the message */ #define MARK 0x008 /* this message is a mark */ #define ISKERNEL 0x010 /* kernel generated message */ @@ -324,6 +323,7 @@ static int logflags = O_WRONLY|O_APPEND; /* flags used static char bootfile[MAXLINE+1]; /* booted kernel file */ static int RemoteAddDate; /* Always set the date on remote messages */ +static int RemoteHostname; /* Log remote hostname from the message */ static int UniquePriority; /* Only log specified priority? */ static int LogFacPri; /* Put facility and priority in log message: */ @@ -352,7 +352,7 @@ static void domark(int); static void fprintlog(struct filed *, int, const char *); static void init(int); static void logerror(const char *); -static void logmsg(int, const char *, const char *, int); +static void logmsg(int, const char *, const char *, const char *, int); static void log_deadchild(pid_t, int, const char *); static void markit(void); static int socksetup(struct peer *); @@ -361,7 +361,7 @@ static int socklist_recv_sock(struct socklist *); static int socklist_recv_signal(struct socklist *); static void sighandler(int); static int skip_message(const char *, const char *, int); -static void printline(const char *, char *, int); +static void parsemsg(const char *, char *); static void printsys(char *); static int p_open(const char *, pid_t *); static void reapchild(int); @@ -454,7 +454,7 @@ main(int argc, char *argv[]) if (madvise(NULL, 0, MADV_PROTECT) != 0) dprintf("madvise() failed: %s\n", strerror(errno)); - while ((ch = getopt(argc, argv, "468Aa:b:cCdf:Fkl:m:nNop:P:sS:Tuv")) + while ((ch = getopt(argc, argv, "468Aa:b:cCdf:FHkl:m:nNop:P:sS:Tuv")) != -1) switch (ch) { #ifdef INET @@ -518,6 +518,9 @@ main(int argc, char *argv[]) case 'F': /* run in foreground instead of daemon */ Foreground++; break; + case 'H': + RemoteHostname = 1; + break; case 'k': /* keep remote kern fac */ KeepKernFac = 1; break; @@ -772,7 +775,7 @@ socklist_recv_sock(struct socklist *sl) socklen_t sslen; const char *hname; char line[MAXLINE + 1]; - int date, len; + int len; sslen = sizeof(ss); len = recvfrom(sl->sl_socket, line, sizeof(line) - 1, 0, sa, &sslen); @@ -786,19 +789,17 @@ socklist_recv_sock(struct socklist *sl) } /* Received valid data. */ line[len] = '\0'; - if (sl->sl_ss.ss_family == AF_LOCAL) { + if (sl->sl_ss.ss_family == AF_LOCAL) hname = LocalHostName; - date = 0; - } else { + else { hname = cvthname(sa); unmapped(sa); if (validate(sa, hname) == 0) { dprintf("Message from %s was ignored.", hname); return (-1); } - date = RemoteAddDate ? ADDDATE : 0; } - printline(hname, line, date); + parsemsg(hname, line); return (0); } @@ -836,7 +837,7 @@ usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", - "usage: syslogd [-468ACcdFknosTuv] [-a allowed_peer]", + "usage: syslogd [-468ACcdFHknosTuv] [-a allowed_peer]", " [-b bind_address] [-f config_file]", " [-l [mode:]path] [-m mark_interval]", " [-P pid_file] [-p log_socket]", @@ -845,28 +846,43 @@ usage(void) } /* - * Take a raw input line, decode the message, and print the message - * on the appropriate log files. + * Take a raw input line, extract PRI, TIMESTAMP and HOSTNAME from the message, + * and print the message on the appropriate log files. */ static void -printline(const char *hname, char *msg, int flags) +parsemsg(const char *from, char *msg) { - char *p, *q; + const char *timestamp; + char *q; long n; - int c, pri; + int i, c, pri, msglen; char line[MAXLINE + 1]; - /* test for special codes */ - p = msg; - pri = DEFUPRI; - if (*p == '<') { - errno = 0; - n = strtol(p + 1, &q, 10); - if (*q == '>' && n >= 0 && n < INT_MAX && errno == 0) { - p = q + 1; - pri = n; + /* Parse PRI. */ + if (msg[0] != '<' || !isdigit(msg[1])) { + dprintf("Invalid PRI from %s\n", from); + return; + } + for (i = 2; i <= 4; i++) { + if (msg[i] == '>') + break; + if (!isdigit(msg[i])) { + dprintf("Invalid PRI header from %s\n", from); + return; } } + if (msg[i] != '>') { + dprintf("Invalid PRI header from %s\n", from); + return; + } + errno = 0; + n = strtol(msg + 1, &q, 10); + if (errno != 0 || *q != msg[i] || n < 0 || n >= INT_MAX) { + dprintf("Invalid PRI %ld from %s: %s\n", + n, from, strerror(errno)); + return; + } + pri = n; if (pri &~ (LOG_FACMASK|LOG_PRIMASK)) pri = DEFUPRI; @@ -878,9 +894,53 @@ printline(const char *hname, char *msg, int flags) if ((pri & LOG_FACMASK) == LOG_KERN && !KeepKernFac) pri = LOG_MAKEPRI(LOG_USER, LOG_PRI(pri)); - q = line; + /* + * The TIMESTAMP field is the local time and is in the format of + * "Mmm dd hh:mm:ss" (without the quote marks). + * A single space character MUST follow the TIMESTAMP field. + * + * XXXGL: the check can be improved. + */ + msg += i + 1; + msglen = strlen(msg); + if (msglen < MAXDATELEN || msg[3] != ' ' || msg[6] != ' ' || + msg[9] != ':' || msg[12] != ':' || msg[15] != ' ') { + dprintf("Invalid TIMESTAMP from %s: %s\n", from, msg); + return; + } - while ((c = (unsigned char)*p++) != '\0' && + if (!RemoteAddDate) + timestamp = msg; + else + timestamp = NULL; + msg += MAXDATELEN; + msglen -= MAXDATELEN; + + /* + * A single space character MUST also follow the HOSTNAME field. + */ + for (i = 0; i < MIN(MAXHOSTNAMELEN, msglen); i++) { + if (msg[i] == ' ') { + if (RemoteHostname) { + msg[i] = '\0'; + from = msg; + } + msg += i + 1; + break; + } + /* + * Support non RFC compliant messages, without hostname. + */ + if (msg[i] == ':') + break; + } + if (i == MIN(MAXHOSTNAMELEN, msglen)) { + dprintf("Invalid HOSTNAME from %s: %s\n", from, msg); + return; + } + + q = line; + while ((c = (unsigned char)*msg++) != '\0' && q < &line[sizeof(line) - 4]) { if (mask_C1 && (c & 0x80) && c < 0xA0) { c &= 0x7F; @@ -902,7 +962,7 @@ printline(const char *hname, char *msg, int flags) } *q = '\0'; - logmsg(pri, line, hname, flags); + logmsg(pri, timestamp, line, from, 0); } /* @@ -956,7 +1016,7 @@ printsys(char *msg) long n; int flags, isprintf, pri; - flags = ISKERNEL | SYNC_FILE | ADDDATE; /* fsync after write */ + flags = ISKERNEL | SYNC_FILE; /* fsync after write */ p = msg; pri = DEFSPRI; isprintf = 1; @@ -977,7 +1037,7 @@ printsys(char *msg) flags |= IGN_CONS; if (pri &~ (LOG_FACMASK|LOG_PRIMASK)) pri = DEFSPRI; - logmsg(pri, p, LocalHostName, flags); + logmsg(pri, NULL, p, LocalHostName, flags); } static time_t now; @@ -1032,40 +1092,21 @@ skip_message(const char *name, const char *spec, int c * the priority. */ static void -logmsg(int pri, const char *msg, const char *from, int flags) +logmsg(int pri, const char *timestamp, const char *msg, const char *from, + int flags) { struct filed *f; int i, fac, msglen, prilev; - const char *timestamp; char prog[NAME_MAX+1]; char buf[MAXLINE+1]; dprintf("logmsg: pri %o, flags %x, from %s, msg %s\n", pri, flags, from, msg); - /* - * Check to see if msg looks non-standard. - */ - msglen = strlen(msg); - if (msglen < MAXDATELEN || msg[3] != ' ' || msg[6] != ' ' || - msg[9] != ':' || msg[12] != ':' || msg[15] != ' ') - flags |= ADDDATE; - (void)time(&now); - if (flags & ADDDATE) { + if (timestamp == NULL) timestamp = ctime(&now) + 4; - } else { - timestamp = msg; - msg += MAXDATELEN; - msglen -= MAXDATELEN; - } - /* skip leading blanks */ - while (isspace(*msg)) { - msg++; - msglen--; - } - /* extract facility and priority level */ if (flags & MARK) fac = LOG_NFACILITIES; @@ -1078,7 +1119,7 @@ logmsg(int pri, const char *msg, const char *from, int prilev = LOG_PRI(pri); - /* extract program name */ + /* Extract TAG part of the message (usually program name). */ for (i = 0; i < NAME_MAX; i++) { if (!isprint(msg[i]) || msg[i] == ':' || msg[i] == '[' || msg[i] == '/' || isspace(msg[i])) @@ -1092,8 +1133,8 @@ logmsg(int pri, const char *msg, const char *from, int snprintf(buf, sizeof(buf), "%s: %s", use_bootfile ? bootfile : "kernel", msg); msg = buf; - msglen = strlen(buf); } + msglen = strlen(msg); /* log the message to the particular outputs */ if (!Initialized) { @@ -1643,7 +1684,7 @@ logerror(const char *type) (void)snprintf(buf, sizeof buf, "syslogd: %s", type); errno = 0; dprintf("%s\n", buf); - logmsg(LOG_SYSLOG|LOG_ERR, buf, LocalHostName, ADDDATE); + logmsg(LOG_SYSLOG|LOG_ERR, NULL, buf, LocalHostName, 0); recursed--; } @@ -1987,7 +2028,7 @@ init(int signo) } } - logmsg(LOG_SYSLOG|LOG_INFO, "syslogd: restart", LocalHostName, ADDDATE); + logmsg(LOG_SYSLOG|LOG_INFO, NULL, "syslogd: restart", LocalHostName, 0); dprintf("syslogd: restarted\n"); /* * Log a change in hostname, but only on a restart. @@ -1996,7 +2037,7 @@ init(int signo) (void)snprintf(hostMsg, sizeof(hostMsg), "syslogd: hostname changed, \"%s\" to \"%s\"", oldLocalHostName, LocalHostName); - logmsg(LOG_SYSLOG|LOG_INFO, hostMsg, LocalHostName, ADDDATE); + logmsg(LOG_SYSLOG|LOG_INFO, NULL, hostMsg, LocalHostName, 0); dprintf("%s\n", hostMsg); } /* @@ -2006,7 +2047,7 @@ init(int signo) if (signo == 0 && !use_bootfile) { (void)snprintf(bootfileMsg, sizeof(bootfileMsg), "syslogd: kernel boot file is %s", bootfile); - logmsg(LOG_KERN|LOG_INFO, bootfileMsg, LocalHostName, ADDDATE); + logmsg(LOG_KERN|LOG_INFO, NULL, bootfileMsg, LocalHostName, 0); dprintf("%s\n", bootfileMsg); } } @@ -2315,8 +2356,7 @@ markit(void) now = time((time_t *)NULL); MarkSeq += TIMERINTVL; if (MarkSeq >= MarkInterval) { - logmsg(LOG_INFO, "-- MARK --", - LocalHostName, ADDDATE|MARK); + logmsg(LOG_INFO, NULL, "-- MARK --", LocalHostName, MARK); MarkSeq = 0; } From owner-svn-src-head@freebsd.org Tue Dec 5 19:55:55 2017 Return-Path: Delivered-To: svn-src-head@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 709F4E767C6; Tue, 5 Dec 2017 19:55:55 +0000 (UTC) (envelope-from glebius@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 9AF5E6C006; Tue, 5 Dec 2017 19:55:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5Jtr6c079955; Tue, 5 Dec 2017 19:55:53 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5Jtrwp079953; Tue, 5 Dec 2017 19:55:53 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201712051955.vB5Jtrwp079953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 5 Dec 2017 19:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326574 - head/usr.bin/logger X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/usr.bin/logger X-SVN-Commit-Revision: 326574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 19:55:56 -0000 Author: glebius Date: Tue Dec 5 19:55:53 2017 New Revision: 326574 URL: https://svnweb.freebsd.org/changeset/base/326574 Log: Generate fully RFC3164 compliant messages, with timestamp and hostname. Allow to set hostname to any string with -H. MFC after: 2 months Modified: head/usr.bin/logger/logger.1 head/usr.bin/logger/logger.c Modified: head/usr.bin/logger/logger.1 ============================================================================== --- head/usr.bin/logger/logger.1 Tue Dec 5 19:54:55 2017 (r326573) +++ head/usr.bin/logger/logger.1 Tue Dec 5 19:55:53 2017 (r326574) @@ -28,7 +28,7 @@ .\" @(#)logger.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 23, 2016 +.Dd December 5, 2017 .Dt LOGGER 1 .Os .Sh NAME @@ -38,6 +38,7 @@ .Nm .Op Fl 46Ais .Op Fl f Ar file +.Op Fl H Ar hostname .Op Fl h Ar host .Op Fl P Ar port .Op Fl p Ar pri @@ -77,6 +78,11 @@ Log the message to standard error, as well as the syst .It Fl f Ar file Read the contents of the specified file into syslog. This option is ignored when a message is also specified. +.It Fl H Ar hostname +Set the hostname in the header of the message to specified value. +If not specified, host part of +.Xr gethostname 3 +will be used. .It Fl h Ar host Send the message to the remote system .Ar host Modified: head/usr.bin/logger/logger.c ============================================================================== --- head/usr.bin/logger/logger.c Tue Dec 5 19:54:55 2017 (r326573) +++ head/usr.bin/logger/logger.c Tue Dec 5 19:55:53 2017 (r326574) @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)logger.c 8.1 (Berkeley) 6/ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define SYSLOG_NAMES @@ -71,8 +72,8 @@ static int decode(char *, const CODE *); static int pencode(char *); static ssize_t socksetup(const char *, const char *, const char *, struct socks **); -static void logmessage(int, const char *, struct socks *, ssize_t, - const char *); +static void logmessage(int, const char *, const char *, const char *, + struct socks *, ssize_t, const char *); static void usage(void); #ifdef INET6 @@ -93,19 +94,22 @@ main(int argc, char *argv[]) { struct socks *socks; ssize_t nsock; + time_t now; int ch, logflags, pri; - char *tag, *host, buf[1024]; + char *tag, *host, buf[1024], *timestamp, tbuf[26], + *hostname, hbuf[MAXHOSTNAMELEN]; const char *svcname, *src; tag = NULL; host = NULL; + hostname = NULL; svcname = "syslog"; src = NULL; socks = NULL; pri = LOG_USER | LOG_NOTICE; logflags = 0; unsetenv("TZ"); - while ((ch = getopt(argc, argv, "46Af:h:iP:p:S:st:")) != -1) + while ((ch = getopt(argc, argv, "46Af:H:h:iP:p:S:st:")) != -1) switch((char)ch) { case '4': family = PF_INET; @@ -123,6 +127,9 @@ main(int argc, char *argv[]) err(1, "%s", optarg); setvbuf(stdin, 0, _IONBF, 0); break; + case 'H': /* hostname to set in message header */ + hostname = optarg; + break; case 'h': /* hostname to deliver to */ host = optarg; break; @@ -168,6 +175,17 @@ main(int argc, char *argv[]) openlog(tag, logflags, 0); (void) fclose(stdout); + (void )time(&now); + (void )ctime_r(&now, tbuf); + tbuf[19] = '\0'; + timestamp = tbuf + 4; + + if (hostname == NULL) { + hostname = hbuf; + (void )gethostname(hbuf, MAXHOSTNAMELEN); + *strchr(hostname, '.') = '\0'; + } + /* log input line if appropriate */ if (argc > 0) { char *p, *endp; @@ -176,11 +194,13 @@ main(int argc, char *argv[]) for (p = buf, endp = buf + sizeof(buf) - 2; *argv;) { len = strlen(*argv); if (p + len > endp && p > buf) { - logmessage(pri, tag, socks, nsock, buf); + logmessage(pri, timestamp, hostname, tag, + socks, nsock, buf); p = buf; } if (len > sizeof(buf) - 1) - logmessage(pri, tag, socks, nsock, *argv++); + logmessage(pri, timestamp, hostname, tag, + socks, nsock, *argv++); else { if (p != buf) *p++ = ' '; @@ -189,10 +209,12 @@ main(int argc, char *argv[]) } } if (p != buf) - logmessage(pri, tag, socks, nsock, buf); + logmessage(pri, timestamp, hostname, tag, socks, nsock, + buf); } else while (fgets(buf, sizeof(buf), stdin) != NULL) - logmessage(pri, tag, socks, nsock, buf); + logmessage(pri, timestamp, hostname, tag, socks, nsock, + buf); exit(0); } @@ -320,8 +342,8 @@ socksetup(const char *src, const char *dst, const char * Send the message to syslog, either on the local host, or on a remote host */ static void -logmessage(int pri, const char *tag, struct socks *sk, ssize_t nsock, - const char *buf) +logmessage(int pri, const char *timestamp, const char *hostname, + const char *tag, struct socks *sk, ssize_t nsock, const char *buf) { char *line; int len, i, lsent; @@ -330,7 +352,8 @@ logmessage(int pri, const char *tag, struct socks *sk, syslog(pri, "%s", buf); return; } - if ((len = asprintf(&line, "<%d>%s: %s", pri, tag, buf)) == -1) + if ((len = asprintf(&line, "<%d>%s %s %s: %s", pri, timestamp, + hostname, tag, buf)) == -1) errx(1, "asprintf"); lsent = -1; From owner-svn-src-head@freebsd.org Tue Dec 5 20:06:54 2017 Return-Path: Delivered-To: svn-src-head@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 E43F5E76B38; Tue, 5 Dec 2017 20:06:54 +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 AEBC06C7DE; Tue, 5 Dec 2017 20:06:54 +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 vB5K6rlr084335; Tue, 5 Dec 2017 20:06:53 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5K6rgL084333; Tue, 5 Dec 2017 20:06:53 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201712052006.vB5K6rgL084333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 5 Dec 2017 20:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326575 - in head/usr.bin: . sponge X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/usr.bin: . sponge X-SVN-Commit-Revision: 326575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 20:06:55 -0000 Author: cy Date: Tue Dec 5 20:06:53 2017 New Revision: 326575 URL: https://svnweb.freebsd.org/changeset/base/326575 Log: Fix build after r326554; reconnect sponge to build again. Modified: head/usr.bin/Makefile head/usr.bin/sponge/sponge.c Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Dec 5 19:55:53 2017 (r326574) +++ head/usr.bin/Makefile Tue Dec 5 20:06:53 2017 (r326575) @@ -148,6 +148,7 @@ SUBDIR= alias \ soelim \ sort \ split \ + sponge \ stat \ stdbuf \ strings \ Modified: head/usr.bin/sponge/sponge.c ============================================================================== --- head/usr.bin/sponge/sponge.c Tue Dec 5 19:55:53 2017 (r326574) +++ head/usr.bin/sponge/sponge.c Tue Dec 5 20:06:53 2017 (r326575) @@ -172,7 +172,8 @@ main(int argc, char* argv[]) bufremain = bufcnt; while (bufremain > 0) { - whichbuf = (bufremain < maxiovec) ? bufremain : maxiovec; + whichbuf = bufremain < (unsigned long) maxiovec + ? bufremain : maxiovec; bufremain -= whichbuf; i = writev(fd, iov, whichbuf); From owner-svn-src-head@freebsd.org Tue Dec 5 20:19:15 2017 Return-Path: Delivered-To: svn-src-head@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 081CDE76FEF; Tue, 5 Dec 2017 20:19:15 +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 D45DF6D158; Tue, 5 Dec 2017 20:19:14 +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 vB5KJDvK089057; Tue, 5 Dec 2017 20:19:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5KJD4W089053; Tue, 5 Dec 2017 20:19:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712052019.vB5KJD4W089053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Dec 2017 20:19:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326576 - in head: lib/libc/sys sys/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: lib/libc/sys sys/sys X-SVN-Commit-Revision: 326576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 20:19:15 -0000 Author: emaste Date: Tue Dec 5 20:19:13 2017 New Revision: 326576 URL: https://svnweb.freebsd.org/changeset/base/326576 Log: use @@@ instead of @@ in __sym_default Using .symver foo,foo@@VER causes foo and foo@@VER to be output to the .o file. This requires foo to be weak since the linker handles foo@@VER as foo. Using .symver foo,foo@@@VER causes just foo@@ver to be output and avoid the need for making foo weak. It also reduces the constraint on how exactly a linker has to handle foo and foo@@VER being present. Submitted by: Rafael Espíndola Reviewed by: dim, kib Differential Revision: https://reviews.freebsd.org/D11653 Modified: head/lib/libc/sys/openat.c head/lib/libc/sys/setcontext.c head/lib/libc/sys/swapcontext.c head/sys/sys/cdefs.h Modified: head/lib/libc/sys/openat.c ============================================================================== --- head/lib/libc/sys/openat.c Tue Dec 5 20:06:53 2017 (r326575) +++ head/lib/libc/sys/openat.c Tue Dec 5 20:19:13 2017 (r326576) @@ -43,7 +43,6 @@ __sym_compat(openat, __impl_openat, FBSD_1.1); __weak_reference(openat, __impl_openat); __sym_default(openat, openat, FBSD_1.2); -#pragma weak openat int openat(int fd, const char *path, int flags, ...) { Modified: head/lib/libc/sys/setcontext.c ============================================================================== --- head/lib/libc/sys/setcontext.c Tue Dec 5 20:06:53 2017 (r326575) +++ head/lib/libc/sys/setcontext.c Tue Dec 5 20:19:13 2017 (r326576) @@ -42,7 +42,6 @@ __sym_compat(setcontext, __impl_setcontext, FBSD_1.0); __weak_reference(setcontext, __impl_setcontext); __sym_default(setcontext, setcontext, FBSD_1.2); -#pragma weak setcontext int setcontext(const ucontext_t *uc) { Modified: head/lib/libc/sys/swapcontext.c ============================================================================== --- head/lib/libc/sys/swapcontext.c Tue Dec 5 20:06:53 2017 (r326575) +++ head/lib/libc/sys/swapcontext.c Tue Dec 5 20:19:13 2017 (r326576) @@ -43,7 +43,6 @@ __sym_compat(swapcontext, __impl_swapcontext, FBSD_1.0 __weak_reference(swapcontext, __impl_swapcontext); __sym_default(swapcontext, swapcontext, FBSD_1.2); -#pragma weak swapcontext int swapcontext(ucontext_t *oucp, const ucontext_t *ucp) { Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Tue Dec 5 20:06:53 2017 (r326575) +++ head/sys/sys/cdefs.h Tue Dec 5 20:19:13 2017 (r326576) @@ -551,7 +551,7 @@ #define __sym_compat(sym,impl,verid) \ __asm__(".symver " #impl ", " #sym "@" #verid) #define __sym_default(sym,impl,verid) \ - __asm__(".symver " #impl ", " #sym "@@" #verid) + __asm__(".symver " #impl ", " #sym "@@@" #verid) #else #define __weak_reference(sym,alias) \ __asm__(".weak alias"); \ @@ -563,7 +563,7 @@ #define __sym_compat(sym,impl,verid) \ __asm__(".symver impl, sym@verid") #define __sym_default(impl,sym,verid) \ - __asm__(".symver impl, sym@@verid") + __asm__(".symver impl, sym@@@verid") #endif /* __STDC__ */ #endif /* __GNUC__ || __INTEL_COMPILER */ From owner-svn-src-head@freebsd.org Tue Dec 5 20:43:25 2017 Return-Path: Delivered-To: svn-src-head@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 C9600E80CE2; Tue, 5 Dec 2017 20:43:25 +0000 (UTC) (envelope-from shurd@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 A3BE26E63F; Tue, 5 Dec 2017 20:43:25 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5KhOsB001501; Tue, 5 Dec 2017 20:43:24 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5KhO5U001500; Tue, 5 Dec 2017 20:43:24 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201712052043.vB5KhO5U001500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Tue, 5 Dec 2017 20:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326577 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 326577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 20:43:25 -0000 Author: shurd Date: Tue Dec 5 20:43:24 2017 New Revision: 326577 URL: https://svnweb.freebsd.org/changeset/base/326577 Log: Avoid calling CURVNET_[SET|RESTORE] for each packet The LRO possible test was calling CURVNET_SET once for IPv4 or IPv6 for each packet in a chain. Only call it once per chain instead. Submitted by: Matthew Macy Reviewed by: cem, ae Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D13368 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Dec 5 20:19:13 2017 (r326576) +++ head/sys/net/iflib.c Tue Dec 5 20:43:24 2017 (r326577) @@ -2467,13 +2467,26 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri) } #if defined(INET6) || defined(INET) +static void +iflib_get_ip_forwarding(struct lro_ctrl *lc, bool *v4, bool *v6) +{ + CURVNET_SET(lc->ifp->if_vnet); +#if defined(INET6) + *v6 = VNET(ip6_forwarding); +#endif +#if defined(INET) + *v4 = VNET(ipforwarding); +#endif + CURVNET_RESTORE(); +} + /* * Returns true if it's possible this packet could be LROed. * if it returns false, it is guaranteed that tcp_lro_rx() * would not return zero. */ static bool -iflib_check_lro_possible(struct lro_ctrl *lc, struct mbuf *m) +iflib_check_lro_possible(struct mbuf *m, bool v4_forwarding, bool v6_forwarding) { struct ether_header *eh; uint16_t eh_type; @@ -2483,32 +2496,21 @@ iflib_check_lro_possible(struct lro_ctrl *lc, struct m switch (eh_type) { #if defined(INET6) case ETHERTYPE_IPV6: - { - CURVNET_SET(lc->ifp->if_vnet); - if (VNET(ip6_forwarding) == 0) { - CURVNET_RESTORE(); - return true; - } - CURVNET_RESTORE(); - break; - } + return !v6_forwarding; #endif #if defined (INET) case ETHERTYPE_IP: - { - CURVNET_SET(lc->ifp->if_vnet); - if (VNET(ipforwarding) == 0) { - CURVNET_RESTORE(); - return true; - } - CURVNET_RESTORE(); - break; - } + return !v4_forwarding; #endif } return false; } +#else +static void +iflib_get_ip_forwarding(struct lro_ctrl *lc __unused, bool *v4 __unused, bool *v6 __unused) +{ +} #endif static bool @@ -2525,6 +2527,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) struct ifnet *ifp; int lro_enabled; bool lro_possible = false; + bool v4_forwarding, v6_forwarding; /* * XXX early demux data packets so that if_input processing only handles @@ -2601,6 +2604,8 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) __iflib_fl_refill_lt(ctx, fl, budget + 8); lro_enabled = (if_getcapenable(ifp) & IFCAP_LRO); + if (lro_enabled) + iflib_get_ip_forwarding(&rxq->ifr_lc, &v4_forwarding, &v6_forwarding); mt = mf = NULL; while (mh != NULL) { m = mh; @@ -2615,7 +2620,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) #if defined(INET6) || defined(INET) if (lro_enabled) { if (!lro_possible) { - lro_possible = iflib_check_lro_possible(&rxq->ifr_lc, m); + lro_possible = iflib_check_lro_possible(m, v4_forwarding, v6_forwarding); if (lro_possible && mf != NULL) { ifp->if_input(ifp, mf); DBG_COUNTER_INC(rx_if_input); From owner-svn-src-head@freebsd.org Tue Dec 5 20:32:07 2017 Return-Path: Delivered-To: svn-src-head@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 B8AE2E806F0; Tue, 5 Dec 2017 20:32:07 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DFB26DD1D; Tue, 5 Dec 2017 20:32:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MJeDeX3YJGvLHMJeEeklaL; Tue, 05 Dec 2017 13:17:00 -0700 X-Authority-Analysis: v=2.2 cv=a9pAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=ocR9PWop10UA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=ndaoGXS1AAAA:8 a=3LhwCfBeHoEQoLPJ3MgA:9 a=L3bb61WgntlLSfa0:21 a=OSfL2kd0QOkLvTrr:21 a=CjuIK1q_8ugA:10 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=mFeOnlTyF09QQMGr2mMI:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 867E55AE; Tue, 5 Dec 2017 12:16:56 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vB5KGc3v038429; Tue, 5 Dec 2017 12:16:38 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vB5KGc9T038423; Tue, 5 Dec 2017 12:16:38 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712052016.vB5KGc9T038423@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Eitan Adler cc: Eric Joyner , Cy Schubert , Devin Teske , Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee In-Reply-To: Message from Eitan Adler of "Tue, 05 Dec 2017 10:29:47 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 Dec 2017 12:16:38 -0800 X-CMAE-Envelope: MS4wfKLQGyV8RJRB1EPt0rPHqgehmzBw/htMWGY/jymnSxNBzlWHh/j8S8zsyn89zkcwu2TaVtfaJSSwuVsBhiN6reZScibjG5M8xdZACMLf6RD4y0AEtTwb rroakvyS3RyOtVM6ONfyuKD4r1w1FnRFeg4JHu6R9PdnScf2k9UDKHZ/XVNPOe72KI2XmH2M18AJ1ZW10M7ri/O99ACbJU4zCizShG7lTKfCmzt2Rky1r4tk qsnvOdpYvcHvVcfc+LNUfTEbsUxx3eR/iJxNuMnsB3nYD4KH6d5BGyQ/yhSncJxTyHK8tRD0005eyaw1w11pS177lPiKttr7HXnZ8caiOALI6+9CtrYS31mp dl5rnBJD37AQhxdlLXDNmLr7ogu989UnURYerRoOgZsRHcwOlSW5CKOcUUGo6is2iZG4I3AA X-Mailman-Approved-At: Tue, 05 Dec 2017 20:54:08 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 20:32:07 -0000 In message , Eitan Adler writes: > I'm not near my commit box right now so someone will have to revert > it. What's funny is that I ran a complete 'make buildworld > buildkernel' last night with this patch. > > Will respond to the rest of the thread later No problem. r326575 addresses the issue. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. > > On 5 December 2017 at 10:08, Eric Joyner wrote: > > I got told by a co-worker that this broke buildworld. Can this commit get > > reverted/have the cast fixed? > > > > - Eric (erj) > > > > > > On Tue, Dec 5, 2017 at 9:50 AM Cy Schubert wrote > : > >> > >> Our sed already creates backup files "optionally" just as gsed does. Only > >> the syntax is different. No need to sponge sed, just sed -i '' (whereas gs > ed > >> is -i without the argument). > >> > >> > >> --- > >> Sent using a tiny phone keyboard. > >> Apologies for any typos and autocorrect. > >> This old phone only supports top post. Apologies. > >> > >> Cy Schubert > >> or > >> The need of the many outweighs the greed of the few. > >> --- > >> ________________________________ > >> From: Devin Teske > >> Sent: 05/12/2017 09:23 > >> To: Cy Schubert > >> Cc: Hans Petter Selasky; rgrimes@freebsd.org; cem@freebsd.org; Eitan > >> Adler; src-committers; svn-src-all@freebsd.org; svn-src-head@freebsd.org > >> > >> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge > >> usr.bin/sponge/tests usr.bin/tee > >> > >> > >> On Dec 5, 2017, at 8:29 AM, Cy Schubert wrote: > >> > >> Why not update sed to create the backup file only if the suffix is given > >> to -i, like gnu sed does. > >> > >> > >> I suspect that would break countless scripts that test uname to determine > >> how to use the -i flag of sed. > >> -- > >> Devin > >> > >> > >> --- > >> Sent using a tiny phone keyboard. > >> Apologies for any typos and autocorrect. > >> This old phone only supports top post. Apologies. > >> > >> Cy Schubert > >> or > >> The need of the many outweighs the greed of the few. > >> --- > >> ________________________________ > >> From: Devin Teske > >> Sent: 05/12/2017 07:35 > >> To: Hans Petter Selasky > >> Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; > >> svn-src-all@freebsd.org; svn-src-head@freebsd.org > >> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge > >> usr.bin/sponge/tests usr.bin/tee > >> > >> > >> > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky wrote: > >> > > >> >> On 12/05/17 13:58, Rodney W. Grimes wrote: > >> >> Further more, why does freebsd need this in base? > >> > > >> > Hi, > >> > > >> > I think this is useful. It could replace the "-i " (intermediate) option > >> > for "sed" for example. It avoids creating temporary files when filtering > >> > files, right? > >> > > >> > --HPS > >> > > >> > >> Wth is wrong with: > >> > >> data=$( sed -e '...' somefile ) && > >> echo "$data" > somefile > >> > >> or > >> > >> set -e > >> data=... > >> echo "$data" > ... > >> > >> or > >> > >> exec 3< >> $( ... ) > >> EOF > >> cat > ... <&3 > >> > >> or > >> > >> (I digress) > >> > >> Infinite variations, but the gist is that sponge looks to be trying to > >> help sh(1)/similar when help is unneeded. > >> > >> Why buffer data into memory via fork-exec-pipe to sponge when you can > >> buffer to native namespace without pipe to sponge? > >> > >> Am I missing something? Why do we need sponge(1)? > >> -- > >> Devin > >> > > > > > > -- > Eitan Adler > Source, Ports, Doc committer > Bugmeister, Ports Security teams > From owner-svn-src-head@freebsd.org Tue Dec 5 21:00:35 2017 Return-Path: Delivered-To: svn-src-head@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 75439E816DA; Tue, 5 Dec 2017 21:00:35 +0000 (UTC) (envelope-from shurd@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 CCA966F731; Tue, 5 Dec 2017 21:00:33 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5L0VcZ006615; Tue, 5 Dec 2017 21:00:31 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5L0VnS006611; Tue, 5 Dec 2017 21:00:31 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201712052100.vB5L0VnS006611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Tue, 5 Dec 2017 21:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326578 - in head/sys: dev/bnxt net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: in head/sys: dev/bnxt net X-SVN-Commit-Revision: 326578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:00:35 -0000 Author: shurd Date: Tue Dec 5 21:00:31 2017 New Revision: 326578 URL: https://svnweb.freebsd.org/changeset/base/326578 Log: iflib: Support to padding Ethernet frames to a min size Some bnxt devices do not correctly send frames smaller than 52 bytes (without CRC), so add a quirk that will pad frames to an arbitrary size before passing off to the encap routine. Reported by: Bhargava Chenna Marreddy Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D13269 Modified: head/sys/dev/bnxt/bnxt.h head/sys/dev/bnxt/if_bnxt.c head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/dev/bnxt/bnxt.h ============================================================================== --- head/sys/dev/bnxt/bnxt.h Tue Dec 5 20:43:24 2017 (r326577) +++ head/sys/dev/bnxt/bnxt.h Tue Dec 5 21:00:31 2017 (r326578) @@ -236,6 +236,8 @@ __FBSDID("$FreeBSD$"); ifmedia_add(softc->media, IFM_ETHER | (ifm_speed), 0, NULL); \ } while(0) +#define BNXT_MIN_FRAME_SIZE 52 /* Frames must be padded to this size for some A0 chips */ + /* NVRAM access */ enum bnxt_nvm_directory_type { BNX_DIR_TYPE_UNUSED = 0, Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Tue Dec 5 20:43:24 2017 (r326577) +++ head/sys/dev/bnxt/if_bnxt.c Tue Dec 5 21:00:31 2017 (r326578) @@ -298,7 +298,7 @@ static struct if_shared_ctx bnxt_sctx_init = { .isc_magic = IFLIB_MAGIC, .isc_driver = &bnxt_iflib_driver, .isc_nfl = 2, // Number of Free Lists - .isc_flags = IFLIB_HAS_RXCQ | IFLIB_HAS_TXCQ, + .isc_flags = IFLIB_HAS_RXCQ | IFLIB_HAS_TXCQ | IFLIB_NEED_ETHER_PAD, .isc_q_align = PAGE_SIZE, .isc_tx_maxsize = BNXT_TSO_SIZE, .isc_tx_maxsegsize = BNXT_TSO_SIZE, @@ -793,6 +793,7 @@ bnxt_attach_pre(if_ctx_t ctx) scctx->isc_tx_tso_size_max = BNXT_TSO_SIZE; scctx->isc_tx_tso_segsize_max = BNXT_TSO_SIZE; scctx->isc_vectors = softc->func.max_cp_rings; + scctx->isc_min_frame_size = BNXT_MIN_FRAME_SIZE; scctx->isc_txrx = &bnxt_txrx; if (scctx->isc_nrxd[0] < Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Dec 5 20:43:24 2017 (r326577) +++ head/sys/net/iflib.c Tue Dec 5 21:00:31 2017 (r326578) @@ -627,11 +627,14 @@ SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_encapfail, static int iflib_encap_load_mbuf_fail; +static int iflib_encap_pad_mbuf_fail; static int iflib_encap_txq_avail_fail; static int iflib_encap_txd_encap_fail; SYSCTL_INT(_net_iflib, OID_AUTO, encap_load_mbuf_fail, CTLFLAG_RD, &iflib_encap_load_mbuf_fail, 0, "# busdma load failures"); +SYSCTL_INT(_net_iflib, OID_AUTO, encap_pad_mbuf_fail, CTLFLAG_RD, + &iflib_encap_pad_mbuf_fail, 0, "# runt frame pad failures"); SYSCTL_INT(_net_iflib, OID_AUTO, encap_txq_avail_fail, CTLFLAG_RD, &iflib_encap_txq_avail_fail, 0, "# txq avail failures"); SYSCTL_INT(_net_iflib, OID_AUTO, encap_txd_encap_fail, CTLFLAG_RD, @@ -684,9 +687,10 @@ iflib_debug_reset(void) iflib_fl_refills = iflib_fl_refills_large = iflib_tx_frees = iflib_txq_drain_flushing = iflib_txq_drain_oactive = iflib_txq_drain_notready = iflib_txq_drain_encapfail = - iflib_encap_load_mbuf_fail = iflib_encap_txq_avail_fail = - iflib_encap_txd_encap_fail = iflib_task_fn_rxs = iflib_rx_intr_enables = - iflib_fast_intrs = iflib_intr_link = iflib_intr_msix = iflib_rx_unavail = + iflib_encap_load_mbuf_fail = iflib_encap_pad_mbuf_fail = + iflib_encap_txq_avail_fail = iflib_encap_txd_encap_fail = + iflib_task_fn_rxs = iflib_rx_intr_enables = iflib_fast_intrs = + iflib_intr_link = iflib_intr_msix = iflib_rx_unavail = iflib_rx_ctx_inactive = iflib_rx_zero_len = iflib_rx_if_input = iflib_rx_mbuf_null = iflib_rxd_flush = 0; } @@ -3103,6 +3107,35 @@ calc_next_txd(iflib_txq_t txq, int cidx, uint8_t qid) return (next < end ? next : start); } +/* + * Pad an mbuf to ensure a minimum ethernet frame size. + * min_frame_size is the frame size (less CRC) to pad the mbuf to + */ +static __noinline int +iflib_ether_pad(device_t dev, struct mbuf *m_head, uint16_t min_frame_size) +{ + /* + * 18 is enough bytes to pad an ARP packet to 46 bytes, and + * and ARP message is the smallest common payload I can think of + */ + static char pad[18]; /* just zeros */ + int n; + + for (n = min_frame_size - m_head->m_pkthdr.len; + n > 0; n -= sizeof(pad)) + if (!m_append(m_head, min(n, sizeof(pad)), pad)) + break; + + if (n > 0) { + m_freem(m_head); + device_printf(dev, "cannot pad short frame\n"); + DBG_COUNTER_INC(encap_pad_mbuf_fail); + return (ENOBUFS); + } + + return 0; +} + static int iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) { @@ -3157,6 +3190,12 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) max_segs = scctx->isc_tx_nsegments; } m_head = *m_headp; + if ((sctx->isc_flags & IFLIB_NEED_ETHER_PAD) && + __predict_false(m_head->m_pkthdr.len < scctx->isc_min_frame_size)) { + err = iflib_ether_pad(ctx->ifc_dev, m_head, scctx->isc_min_frame_size); + if (err) + return err; + } pkt_info_zero(&pi); pi.ipi_mflags = (m_head->m_flags & (M_VLANTAG|M_BCAST|M_MCAST)); Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Tue Dec 5 20:43:24 2017 (r326577) +++ head/sys/net/iflib.h Tue Dec 5 21:00:31 2017 (r326578) @@ -217,6 +217,8 @@ typedef struct if_softc_ctx { iflib_intr_mode_t isc_intr; uint16_t isc_max_frame_size; /* set at init time by driver */ + uint16_t isc_min_frame_size; /* set at init time by driver, only used if + IFLIB_NEED_ETHER_PAD is set. */ uint32_t isc_pause_frames; /* set by driver for iflib_timer to detect */ pci_vendor_info_t isc_vendor_info; /* set by iflib prior to attach_pre */ int isc_disable_msix; @@ -314,6 +316,10 @@ typedef enum { * Driver needs csum zeroed for offloading */ #define IFLIB_NEED_ZERO_CSUM 0x80 +/* + * Driver needs frames padded to some minimum length + */ +#define IFLIB_NEED_ETHER_PAD 0x100 From owner-svn-src-head@freebsd.org Tue Dec 5 21:13:09 2017 Return-Path: Delivered-To: svn-src-head@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 E56B5E82631; Tue, 5 Dec 2017 21:13:09 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) (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 820FE70978; Tue, 5 Dec 2017 21:13:09 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f174.google.com with SMTP id s37so259991ioe.10; Tue, 05 Dec 2017 13:13:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=HRJvMPg/kYbr629zP/lS7k4V3+/f1diVBL7m3M3Yz9E=; b=VixUthgwq2RcB1zuaVHlMoGhirn3qfb6deunSs2sZAjpGVSSL2DTZcO584Ohxqx9MG GQK/o7FOLTWdbPM/JoT3jRRB4m3WGCUH7lKXAceUhry5ph5tHz7sVfXrSMclcSz4iqVM oHzRbQS+Ne3FCr87tiulA7jO1X8Gc1W8c6MmwbyQ6PaGSDME7Y0hWbvkynzIo+pC7Sp4 9IR6/ds3xrfZGFJenTa0E3XnBafBvYPxDELE37UXGTbbplBJE7o6JBQimYyyX6woNMuK zm0ToyeIZxsChnNeqXPj3NE12Z3eDOANODM/FK9UxE0mpUkoQq5GVE6De/THT9TRyUzW JS7g== X-Gm-Message-State: AJaThX4BMSQ4Vddo3JYxrPVJg8Elz+UuR6arrTq8cz2K5q5YfTRKlf1F iwhX1V/Cn8E0/u72NnWMMZx4IAEH X-Google-Smtp-Source: AGs4zMameovuvD4sO+71phfkx3QILYhz4aQJ4mBPgpEhtAz0K+rEGUgoU7JXoa8NIo8Zn4w8AU7C5w== X-Received: by 10.107.188.196 with SMTP id m187mr25914357iof.255.1512508002271; Tue, 05 Dec 2017 13:06:42 -0800 (PST) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com. [209.85.223.176]) by smtp.gmail.com with ESMTPSA id m91sm415196iod.76.2017.12.05.13.06.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 13:06:41 -0800 (PST) Received: by mail-io0-f176.google.com with SMTP id u42so242933ioi.9; Tue, 05 Dec 2017 13:06:41 -0800 (PST) X-Received: by 10.107.158.193 with SMTP id h184mr30746893ioe.256.1512508001642; Tue, 05 Dec 2017 13:06:41 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Tue, 5 Dec 2017 13:06:40 -0800 (PST) In-Reply-To: <201712052016.vB5KGc9T038423@slippy.cwsent.com> References: <201712052016.vB5KGc9T038423@slippy.cwsent.com> From: Conrad Meyer Date: Tue, 5 Dec 2017 13:06:40 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee To: Cy Schubert Cc: Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:13:10 -0000 On Tue, Dec 5, 2017 at 12:16 PM, Cy Schubert wro= te: > In message om> > , Eitan Adler writes: >> I'm not near my commit box right now so someone will have to revert >> it. What's funny is that I ran a complete 'make buildworld >> buildkernel' last night with this patch. >> >> Will respond to the rest of the thread later > > No problem. r326575 addresses the issue. Not fully =E2=80=94 it doesn't address that the code is functionally broken= or that the change touched things it didn't need to. I think a revert is still called for, when you can reach a machine with commit access. Conrad From owner-svn-src-head@freebsd.org Tue Dec 5 21:21:25 2017 Return-Path: Delivered-To: svn-src-head@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 9E96DE82928; Tue, 5 Dec 2017 21:21:25 +0000 (UTC) (envelope-from manu@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 78A8970EF5; Tue, 5 Dec 2017 21:21:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LLOiW016609; Tue, 5 Dec 2017 21:21:24 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LLOrn016603; Tue, 5 Dec 2017 21:21:24 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201712052121.vB5LLOrn016603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 5 Dec 2017 21:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326579 - in head/sys: arm/allwinner arm/allwinner/clkng arm/allwinner/h3 conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/allwinner/clkng arm/allwinner/h3 conf X-SVN-Commit-Revision: 326579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:21:25 -0000 Author: manu Date: Tue Dec 5 21:21:23 2017 New Revision: 326579 URL: https://svnweb.freebsd.org/changeset/base/326579 Log: Allwinner H5: Enhance support Add proper gpio and clock support Modified: head/sys/arm/allwinner/a10_gpio.c head/sys/arm/allwinner/clkng/ccu_h3.c head/sys/arm/allwinner/clkng/ccu_sun8i_r.c head/sys/arm/allwinner/h3/h3_padconf.c head/sys/arm/allwinner/h3/h3_r_padconf.c head/sys/conf/files.arm64 Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/a10_gpio.c Tue Dec 5 21:21:23 2017 (r326579) @@ -113,7 +113,7 @@ extern const struct allwinner_padconf a33_padconf; #endif /* Defined in h3_padconf.c */ -#ifdef SOC_ALLWINNER_H3 +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) extern const struct allwinner_padconf h3_padconf; extern const struct allwinner_padconf h3_r_padconf; #endif @@ -156,8 +156,9 @@ static struct ofw_compat_data compat_data[] = { {"allwinner,sun8i-a83t-pinctrl", (uintptr_t)&a83t_padconf}, {"allwinner,sun8i-a83t-r-pinctrl", (uintptr_t)&a83t_r_padconf}, #endif -#ifdef SOC_ALLWINNER_H3 +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) {"allwinner,sun8i-h3-pinctrl", (uintptr_t)&h3_padconf}, + {"allwinner,sun50i-h5-pinctrl", (uintptr_t)&h3_padconf}, {"allwinner,sun8i-h3-r-pinctrl", (uintptr_t)&h3_r_padconf}, #endif #ifdef SOC_ALLWINNER_A64 Modified: head/sys/arm/allwinner/clkng/ccu_h3.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_h3.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/clkng/ccu_h3.c Tue Dec 5 21:21:23 2017 (r326579) @@ -37,6 +37,10 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__aarch64__) +#include "opt_soc.h" +#endif + #include #include #include Modified: head/sys/arm/allwinner/clkng/ccu_sun8i_r.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Tue Dec 5 21:21:23 2017 (r326579) @@ -33,6 +33,10 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__aarch64__) +#include "opt_soc.h" +#endif + #include #include #include Modified: head/sys/arm/allwinner/h3/h3_padconf.c ============================================================================== --- head/sys/arm/allwinner/h3/h3_padconf.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/h3/h3_padconf.c Tue Dec 5 21:21:23 2017 (r326579) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Emmanuel Vadot + * Copyright (c) 2016-2017 Emmanuel Vadot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,9 +33,13 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__aarch64__) +#include "opt_soc.h" +#endif + #include -#ifdef SOC_ALLWINNER_H3 +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) const static struct allwinner_pins h3_pins[] = { {"PA0", 0, 0, {"gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "pa_eint0", NULL}, 6, 0}, Modified: head/sys/arm/allwinner/h3/h3_r_padconf.c ============================================================================== --- head/sys/arm/allwinner/h3/h3_r_padconf.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/h3/h3_r_padconf.c Tue Dec 5 21:21:23 2017 (r326579) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Emmanuel Vadot + * Copyright (c) 2016-2017 Emmanuel Vadot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,9 +33,13 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__aarch64__) +#include "opt_soc.h" +#endif + #include -#ifdef SOC_ALLWINNER_H3 +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) const static struct allwinner_pins h3_r_pins[] = { {"PL0", 0, 0, {"gpio_in", "gpio_out", "s_twi", NULL, NULL, NULL, "pl_eint0", NULL}, 6, 0}, Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/conf/files.arm64 Tue Dec 5 21:21:23 2017 (r326579) @@ -28,6 +28,8 @@ arm/allwinner/a10_gpio.c optional gpio aw_gpio fdt arm/allwinner/a10_mmc.c optional mmc aw_mmc fdt arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 fdt arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 fdt +arm/allwinner/h3/h3_padconf.c optional soc_allwinner_h5 fdt +arm/allwinner/h3/h3_r_padconf.c optional soc_allwinner_h5 fdt arm/allwinner/aw_ccu.c optional aw_ccu fdt arm/allwinner/aw_nmi.c optional aw_nmi fdt \ compile-with "${NORMAL_C} -I$S/gnu/dts/include" From owner-svn-src-head@freebsd.org Tue Dec 5 21:25:45 2017 Return-Path: Delivered-To: svn-src-head@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 10116E82AFF; Tue, 5 Dec 2017 21:25:45 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x229.google.com (mail-lf0-x229.google.com [IPv6:2a00:1450:4010:c07::229]) (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 871B1712F5; Tue, 5 Dec 2017 21:25:44 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x229.google.com with SMTP id i2so1930510lfe.9; Tue, 05 Dec 2017 13:25:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=0oe+EeXPZ2QpRoppWriDysRNRcOgz5AQpSd3gYCOSSg=; b=PXoGyz7+AxSsBHSJbonJWYsRNYF44OTTMyLO2dk0HTtVgpJ5lNw3DVTpUJwLzyn1Oe mHx7Dl6P8riFaKLqn9lWghNUPIW0magx+bN/4oCLoaVp8Zasgf9AxqtJ3LcyAuNbR+AD K3cH7f8h8D4k+fKrzYrPeYwskv5hPoM9z1Xyl9o+wWqf7JqX5F9a6PvfOf9zhy2RGJKo 10VTtkMxvYr++dL8T4fv2XbTR5vAKzmAAR2IFlIHpmR0naKayoIsDso08WAlvMtN5Dy4 vvGyqaPHm1JsY45wpspgEsqHcI1HkOb0VL+IunROI9bSvtrTaNSqZEdMVhW09PsBdRTT YAgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=0oe+EeXPZ2QpRoppWriDysRNRcOgz5AQpSd3gYCOSSg=; b=KMHvz/AYsvp/1AtH0FhhebGFAP3vWToGIINAK2YKQh8nFlUmdPlq8N9TIbej1wW5wH oMuC3lxdIpnQzIIOkV6PBtMW/Ptv/hP5uM0XgEnDi9EIkRZRD1VIxlqssB+zv3bG16FD yUH+j+nNad5vOaA03XRO3uIOtADrCV2HLj5U+J+wc1KxiqqB1/7CJBOyVxCBbLYTZgOF 1FLCQqbITQ1v2+QAZR7P6s6zWkX9GefcBYc+PeyYu1H1uyFAxPYSEVld+KR4FvlkhEwa ez0RCx2Gn/PTMdFAhQYpXarqhS5HZF4FpbzbQNEf2t+XIwpcGAbDhHd+d9wnOS5ERTIC iSDQ== X-Gm-Message-State: AJaThX5r1/8xc/GyckyU2/c/z9uj6uenUnxYQBFwoboUR0g6FJ7OBteJ +Wei2VgGC7zuqpnLYCtAhDcx7HLvOl/+4jnbpao= X-Google-Smtp-Source: AGs4zMYUlMrZszHqDNoZyrJJDiUP2ynzR9Zw8AeHplyGcrniD/zzYyJpBU4KKb+e1K1pSOyLdD/OohLymBvyEvIWog8= X-Received: by 10.46.20.4 with SMTP id u4mr11511007ljd.38.1512509142210; Tue, 05 Dec 2017 13:25:42 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.76.19 with HTTP; Tue, 5 Dec 2017 13:25:41 -0800 (PST) In-Reply-To: <201505051452.t45EqXXv027613@svn.freebsd.org> References: <201505051452.t45EqXXv027613@svn.freebsd.org> From: Alan Somers Date: Tue, 5 Dec 2017 14:25:41 -0700 X-Google-Sender-Auth: BuRAPCkH4JtRX5U5PdPZLOSAY9Y Message-ID: Subject: Re: svn commit: r282485 - head/lib/libc/gen To: Julian Elischer Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:25:45 -0000 On Tue, May 5, 2015 at 8:52 AM, Julian Elischer wrote: > Author: julian > Date: Tue May 5 14:52:33 2015 > New Revision: 282485 > URL: https://svnweb.freebsd.org/changeset/base/282485 > > Log: > Tweak seekdir, telldir and readdir so that when htere are deletes going > on, > as seek to teh last location saved will still work. This is needed for > Samba > to be able to correctly handle delete requests from windows. This does > not > completely fix seekdir when deletes are present but fixes the worst of > the > problems. The real solution must involve some changes to the API for eh > VFS > and getdirentries(2). > > Obtained from: Panzura inc > MFC after: 1 week > > Modified: > head/lib/libc/gen/directory.3 > head/lib/libc/gen/readdir.c > head/lib/libc/gen/rewinddir.c > head/lib/libc/gen/telldir.c > head/lib/libc/gen/telldir.h > Do you remember what the exact problem you had was? I'm trying to write a regression test for it, but I'm having trouble guessing what the bug was. And was _fixtelldir() related to the issue with deletes, or was that to fix a separate bug? -Alan From owner-svn-src-head@freebsd.org Tue Dec 5 21:29:48 2017 Return-Path: Delivered-To: svn-src-head@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 7080FE82C45; Tue, 5 Dec 2017 21:29:48 +0000 (UTC) (envelope-from bdrewery@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 3CAF87156B; Tue, 5 Dec 2017 21:29:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LTlaE019277; Tue, 5 Dec 2017 21:29:47 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LTlro019275; Tue, 5 Dec 2017 21:29:47 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712052129.vB5LTlro019275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 21:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326580 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 326580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:29:48 -0000 Author: bdrewery Date: Tue Dec 5 21:29:47 2017 New Revision: 326580 URL: https://svnweb.freebsd.org/changeset/base/326580 Log: AUTO_OBJ: For all top-level targets enforce using an OBJDIR. This will cause an error if the wanted OBJDIR is not writable. Previously it would cause the files to generate to the source tree. This was too obscure and things like buildworld really expect a proper OBJDIR layout. Sponsored by: Dell EMC Modified: head/Makefile.sys.inc head/share/mk/src.sys.obj.mk Modified: head/Makefile.sys.inc ============================================================================== --- head/Makefile.sys.inc Tue Dec 5 21:21:23 2017 (r326579) +++ head/Makefile.sys.inc Tue Dec 5 21:29:47 2017 (r326580) @@ -38,6 +38,10 @@ MK_AUTO_OBJ= no # just want to read any existing OBJDIR but we don't care if we can create # or write to them. .MAKEOVERRIDES+= MK_AUTO_OBJ +.else +# For top-level we always assume the MAKEOBJDIRPREFIX is writable rather than +# falling back to .CURDIR. +__objdir_writable= yes .endif .endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) Modified: head/share/mk/src.sys.obj.mk ============================================================================== --- head/share/mk/src.sys.obj.mk Tue Dec 5 21:21:23 2017 (r326579) +++ head/share/mk/src.sys.obj.mk Tue Dec 5 21:29:47 2017 (r326580) @@ -172,7 +172,7 @@ CheckAutoObj() { \ .if !empty(__objdir) .if ${.CURDIR} == ${__objdir} __objdir_writable?= yes -.else +.elif empty(__objdir_writable) __objdir_writable!= \ ${CheckAutoObj}; CheckAutoObj "${__objdir}" || echo no .endif From owner-svn-src-head@freebsd.org Tue Dec 5 21:30:19 2017 Return-Path: Delivered-To: svn-src-head@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 011BCE82CAD; Tue, 5 Dec 2017 21:30:19 +0000 (UTC) (envelope-from bdrewery@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 C2445716CE; Tue, 5 Dec 2017 21:30:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LUHZx019361; Tue, 5 Dec 2017 21:30:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LUHuJ019360; Tue, 5 Dec 2017 21:30:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712052130.vB5LUHuJ019360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 21:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326581 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 326581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:30:19 -0000 Author: bdrewery Date: Tue Dec 5 21:30:17 2017 New Revision: 326581 URL: https://svnweb.freebsd.org/changeset/base/326581 Log: Handle writable-but-not-a-directory cases for writable OBJDIR check. Sponsored by: Dell EMC Modified: head/share/mk/src.sys.obj.mk Modified: head/share/mk/src.sys.obj.mk ============================================================================== --- head/share/mk/src.sys.obj.mk Tue Dec 5 21:29:47 2017 (r326580) +++ head/share/mk/src.sys.obj.mk Tue Dec 5 21:30:17 2017 (r326581) @@ -137,7 +137,10 @@ __objdir:= ${MAKEOBJDIR} # If the last component is a symlink then recurse on the new path. CheckAutoObj= \ DirIsCreatable() { \ - [ -w "$${1}" ] && return 0; \ + if [ -w "$${1}" ]; then \ + [ -d "$${1}" ] || return 1; \ + return 0; \ + fi; \ d="$${1}"; \ IFS=/; \ set -- $${d}; \ @@ -154,13 +157,16 @@ DirIsCreatable() { \ ret=0; \ DirIsCreatable "$${dir%/}" || ret=$$?; \ return $${ret}; \ + elif [ -e "/$${dir}$${d}" ]; then \ + return 1; \ else \ break; \ fi; \ fi; \ dir="$${dir}$${d}/"; \ done; \ - [ -w "$${dir}" ]; \ + [ -w "$${dir}" ] && [ -d "$${dir}" ] && return 0; \ + return 1; \ }; \ CheckAutoObj() { \ if DirIsCreatable "$${1}"; then \ From owner-svn-src-head@freebsd.org Tue Dec 5 21:30:23 2017 Return-Path: Delivered-To: svn-src-head@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 553D6E82CD4; Tue, 5 Dec 2017 21:30:23 +0000 (UTC) (envelope-from bdrewery@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 21CEB716F2; Tue, 5 Dec 2017 21:30:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LUML9019409; Tue, 5 Dec 2017 21:30:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LUMMr019408; Tue, 5 Dec 2017 21:30:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712052130.vB5LUMMr019408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 21:30:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326582 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 326582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:30:23 -0000 Author: bdrewery Date: Tue Dec 5 21:30:22 2017 New Revision: 326582 URL: https://svnweb.freebsd.org/changeset/base/326582 Log: Deal with bmake-20170301 no longer resolving -C like it used to. Several checks assume .CURDIR is resolved, such as for determining RELDIR from SRCTOP/.CURDIR. If -C is used then the path is no longer resolved like it was before which is problematic for symlinked source trees. A similar change was also made to ports post bmake-20170301. This fixes 'make -C buildworld' using the wrong OBJDIR. Reported by: rstone Sponsored by: Dell EMC Modified: head/share/mk/src.sys.env.mk Modified: head/share/mk/src.sys.env.mk ============================================================================== --- head/share/mk/src.sys.env.mk Tue Dec 5 21:30:17 2017 (r326581) +++ head/share/mk/src.sys.env.mk Tue Dec 5 21:30:22 2017 (r326582) @@ -2,6 +2,14 @@ # early setup only see also src.sys.mk +# bmake-20170301 started taking '-C' "as is" for some cases, notably absolute +# paths. Some later comparisons will assume .CURDIR is resolved and matches +# what we would get with 'cd'. So just force resolve it now if it is an +# absolute path. +.if ${MAKE_VERSION} >= 20170301 && !empty(.CURDIR:M/*) +.CURDIR:= ${.CURDIR:tA} +.endif + # make sure this is defined in a consistent manner SRCTOP:= ${.PARSEDIR:tA:H:H} From owner-svn-src-head@freebsd.org Tue Dec 5 21:36:09 2017 Return-Path: Delivered-To: svn-src-head@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 8EBF7E83180; Tue, 5 Dec 2017 21:36:09 +0000 (UTC) (envelope-from bdrewery@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 5BFC87215A; Tue, 5 Dec 2017 21:36:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5La8ld023716; Tue, 5 Dec 2017 21:36:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5La8T3023715; Tue, 5 Dec 2017 21:36:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712052136.vB5La8T3023715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 5 Dec 2017 21:36:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326583 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 326583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:36:09 -0000 Author: bdrewery Date: Tue Dec 5 21:36:08 2017 New Revision: 326583 URL: https://svnweb.freebsd.org/changeset/base/326583 Log: native-xtools: Ensure GCC files are cleaned up. Because we force enable MK_GCC when building we need to also force enable it for the cleaning phase. Otherwise the NXB_TARGET files are found in the next build's kernel-toolchain phase and cause an error. Reported by: sbruno X-MFC-With: r325001 MFC after: 1 month Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Dec 5 21:30:22 2017 (r326582) +++ head/Makefile.inc1 Tue Dec 5 21:36:08 2017 (r326583) @@ -2261,7 +2261,7 @@ NXBMAKE+= SUBDIR_OVERRIDE='$${NXBDIRS:M*}' # even if the TARGET being built for wants GCC. NXBMAKE+= WANT_COMPILER_TYPE='$${X_COMPILER_TYPE}' native-xtools: .PHONY - ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _cleanobj + ${_+_}cd ${.CURDIR}; ${NXBTMAKE} _cleanobj MK_GCC=yes # Build the bootstrap/host/cross tools that produce native binaries # Pass along MK_GCC=yes to ensure GCC-needed build tools are built. # We don't quite know what the NXB_TARGET wants so just build it. From owner-svn-src-head@freebsd.org Tue Dec 5 21:37:33 2017 Return-Path: Delivered-To: svn-src-head@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 424E2E832D9; Tue, 5 Dec 2017 21:37:33 +0000 (UTC) (envelope-from imp@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 0A463723E0; Tue, 5 Dec 2017 21:37:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LbWh7023803; Tue, 5 Dec 2017 21:37:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LbWb4023802; Tue, 5 Dec 2017 21:37:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052137.vB5LbWb4023802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326584 - head/sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/geom/eli X-SVN-Commit-Revision: 326584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:37:33 -0000 Author: imp Date: Tue Dec 5 21:37:32 2017 New Revision: 326584 URL: https://svnweb.freebsd.org/changeset/base/326584 Log: When building standalone, include stand.h rather than the kernel includes or the userland includes. Sponsored by: Netflix Modified: head/sys/geom/eli/g_eli_hmac.c Modified: head/sys/geom/eli/g_eli_hmac.c ============================================================================== --- head/sys/geom/eli/g_eli_hmac.c Tue Dec 5 21:36:08 2017 (r326583) +++ head/sys/geom/eli/g_eli_hmac.c Tue Dec 5 21:37:32 2017 (r326584) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#elif defined(_STANDALONE) +#include "stand.h" #else #include #include From owner-svn-src-head@freebsd.org Tue Dec 5 21:37:43 2017 Return-Path: Delivered-To: svn-src-head@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 4631DE83329; Tue, 5 Dec 2017 21:37:43 +0000 (UTC) (envelope-from imp@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 CE52E724AF; Tue, 5 Dec 2017 21:37:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LbfxR023857; Tue, 5 Dec 2017 21:37:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5Lbfid023856; Tue, 5 Dec 2017 21:37:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052137.vB5Lbfid023856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326585 - head/stand/ficl X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/ficl X-SVN-Commit-Revision: 326585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:37:44 -0000 Author: imp Date: Tue Dec 5 21:37:41 2017 New Revision: 326585 URL: https://svnweb.freebsd.org/changeset/base/326585 Log: Include ficl.h before anything else and avoid including anything at all if we're not building float. Sponsored by: Netflix Modified: head/stand/ficl/float.c Modified: head/stand/ficl/float.c ============================================================================== --- head/stand/ficl/float.c Tue Dec 5 21:37:32 2017 (r326584) +++ head/stand/ficl/float.c Tue Dec 5 21:37:41 2017 (r326585) @@ -43,14 +43,14 @@ /* $FreeBSD$ */ +#include "ficl.h" + +#if FICL_WANT_FLOAT #include #include #include #include #include -#include "ficl.h" - -#if FICL_WANT_FLOAT /******************************************************************* ** Do float addition r1 + r2. From owner-svn-src-head@freebsd.org Tue Dec 5 21:37:46 2017 Return-Path: Delivered-To: svn-src-head@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 EDA79E83350; Tue, 5 Dec 2017 21:37:46 +0000 (UTC) (envelope-from imp@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 BB6DA72526; Tue, 5 Dec 2017 21:37:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5Lbj9j023911; Tue, 5 Dec 2017 21:37:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LbjX5023910; Tue, 5 Dec 2017 21:37:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052137.vB5LbjX5023910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326586 - head/stand/geli X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/geli X-SVN-Commit-Revision: 326586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:37:47 -0000 Author: imp Date: Tue Dec 5 21:37:45 2017 New Revision: 326586 URL: https://svnweb.freebsd.org/changeset/base/326586 Log: No need to include the userland md5.h, the kernel one is just fine. Sponsored by: Netflix Modified: head/stand/geli/geliboot_internal.h Modified: head/stand/geli/geliboot_internal.h ============================================================================== --- head/stand/geli/geliboot_internal.h Tue Dec 5 21:37:41 2017 (r326585) +++ head/stand/geli/geliboot_internal.h Tue Dec 5 21:37:45 2017 (r326586) @@ -43,7 +43,7 @@ #include /* Pull in the md5, sha256, and sha512 implementations */ -#include +#include #include #include From owner-svn-src-head@freebsd.org Tue Dec 5 21:37:51 2017 Return-Path: Delivered-To: svn-src-head@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 95F78E8338C; Tue, 5 Dec 2017 21:37:51 +0000 (UTC) (envelope-from imp@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 459D272589; Tue, 5 Dec 2017 21:37:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5Lboqk023962; Tue, 5 Dec 2017 21:37:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LboP2023961; Tue, 5 Dec 2017 21:37:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052137.vB5LboP2023961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326587 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:37:52 -0000 Author: imp Date: Tue Dec 5 21:37:50 2017 New Revision: 326587 URL: https://svnweb.freebsd.org/changeset/base/326587 Log: Use the kernel relative paths, rather than the userland relative paths for the iso9660 header files. Sponsored by: Netflix Modified: head/stand/libsa/cd9660.c Modified: head/stand/libsa/cd9660.c ============================================================================== --- head/stand/libsa/cd9660.c Tue Dec 5 21:37:45 2017 (r326586) +++ head/stand/libsa/cd9660.c Tue Dec 5 21:37:50 2017 (r326587) @@ -43,8 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include +#include +#include #include "stand.h" From owner-svn-src-head@freebsd.org Tue Dec 5 21:38:00 2017 Return-Path: Delivered-To: svn-src-head@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 DD805E833E2; Tue, 5 Dec 2017 21:37:59 +0000 (UTC) (envelope-from imp@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 ECD63726AF; Tue, 5 Dec 2017 21:37:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5Lbtum024017; Tue, 5 Dec 2017 21:37:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LbtRU024015; Tue, 5 Dec 2017 21:37:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052137.vB5LbtRU024015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326588 - in head/stand/i386: gptzfsboot zfsboot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/i386: gptzfsboot zfsboot X-SVN-Commit-Revision: 326588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:38:00 -0000 Author: imp Date: Tue Dec 5 21:37:55 2017 New Revision: 326588 URL: https://svnweb.freebsd.org/changeset/base/326588 Log: Need to include skein in the include path so we don't get this from the "system" headers (though in buildworld, it's from the recently built sysroot). Sponsored by: Netflix Modified: head/stand/i386/gptzfsboot/Makefile head/stand/i386/zfsboot/Makefile Modified: head/stand/i386/gptzfsboot/Makefile ============================================================================== --- head/stand/i386/gptzfsboot/Makefile Tue Dec 5 21:37:50 2017 (r326587) +++ head/stand/i386/gptzfsboot/Makefile Tue Dec 5 21:37:55 2017 (r326588) @@ -30,6 +30,7 @@ CFLAGS+=-DBOOTPROG=\"gptzfsboot\" \ -I${LDRSRC} \ -I${BOOTSRC}/i386/common \ -I${ZFSSRC} \ + -I${SYSDIR}/crypto/skein \ -I${SYSDIR}/cddl/boot/zfs \ -I${BOOTSRC}/i386/btx/lib \ -I${BOOTSRC}/i386/boot2 \ Modified: head/stand/i386/zfsboot/Makefile ============================================================================== --- head/stand/i386/zfsboot/Makefile Tue Dec 5 21:37:50 2017 (r326587) +++ head/stand/i386/zfsboot/Makefile Tue Dec 5 21:37:55 2017 (r326588) @@ -29,6 +29,7 @@ CFLAGS+=-DBOOTPROG=\"zfsboot\" \ -I${BOOTSRC}/i386/common \ -I${BOOTSRC}/i386 \ -I${ZFSSRC} \ + -I${SYSDIR}/crypto/skein \ -I${SYSDIR}/cddl/boot/zfs \ -I${BTXLIB} \ -I${BOOTSRC}/i386/boot2 \ From owner-svn-src-head@freebsd.org Tue Dec 5 21:38:04 2017 Return-Path: Delivered-To: svn-src-head@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 06461E8341D; Tue, 5 Dec 2017 21:38:03 +0000 (UTC) (envelope-from imp@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 EAFF272795; Tue, 5 Dec 2017 21:38:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5Lc0vn024073; Tue, 5 Dec 2017 21:38:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5Lc0vk024072; Tue, 5 Dec 2017 21:38:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052138.vB5Lc0vk024072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326589 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 326589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:38:04 -0000 Author: imp Date: Tue Dec 5 21:37:59 2017 New Revision: 326589 URL: https://svnweb.freebsd.org/changeset/base/326589 Log: Make sure we include the right path for skein.h, as well only include the ZFS flags for zfs_modules.c. This keeps us from pulling from the system or sysroot during buildworld. Modified: head/stand/efi/boot1/Makefile Modified: head/stand/efi/boot1/Makefile ============================================================================== --- head/stand/efi/boot1/Makefile Tue Dec 5 21:37:55 2017 (r326588) +++ head/stand/efi/boot1/Makefile Tue Dec 5 21:37:59 2017 (r326589) @@ -31,9 +31,10 @@ CWARNFLAGS.zfs_module.c += -Wno-unused-function SRCS= boot1.c self_reloc.c start.S ufs_module.c .if ${MK_ZFS} != "no" SRCS+= zfs_module.c -CFLAGS+= -I${ZFSSRC} -CFLAGS+= -I${SYSDIR}/cddl/boot/zfs -CFLAGS+= -DEFI_ZFS_BOOT +CFLAGS.zfs_module.c+= -I${ZFSSRC} +CFLAGS.zfs_module.c+= -I${SYSDIR}/cddl/boot/zfs +CFLAGS.zfs_module.c+= -I${SYSDIR}/crypto/skein +CFLAGS.zfs_module.c+= -DEFI_ZFS_BOOT LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a .endif From owner-svn-src-head@freebsd.org Tue Dec 5 21:38:07 2017 Return-Path: Delivered-To: svn-src-head@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 D3208E83447; Tue, 5 Dec 2017 21:38:07 +0000 (UTC) (envelope-from imp@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 6EA427285D; Tue, 5 Dec 2017 21:38:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5Lc5Ef024129; Tue, 5 Dec 2017 21:38:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5Lc51T024125; Tue, 5 Dec 2017 21:38:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052138.vB5Lc51T024125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326590 - in head/stand: common efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: common efi/loader X-SVN-Commit-Revision: 326590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:38:08 -0000 Author: imp Date: Tue Dec 5 21:38:04 2017 New Revision: 326590 URL: https://svnweb.freebsd.org/changeset/base/326590 Log: Prefer stdint.h to inttypes.h since the added prototypes form the latter aren't used. Prefer sys/link_elf.h to link.h so we're only dependent on the kernel tree. The default installation of link.h just includes this file, and any benefit from that is outweighed by the hassle it causes. This reduces the footprint of files needed from the system includes (or sysroot in buildworld). Sponsored by: Netflix Modified: head/stand/common/load_elf.c head/stand/common/load_elf_obj.c head/stand/common/reloc_elf.c head/stand/efi/loader/main.c Modified: head/stand/common/load_elf.c ============================================================================== --- head/stand/common/load_elf.c Tue Dec 5 21:37:59 2017 (r326589) +++ head/stand/common/load_elf.c Tue Dec 5 21:38:04 2017 (r326590) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #define FREEBSD_ELF -#include +#include #include "bootstrap.h" Modified: head/stand/common/load_elf_obj.c ============================================================================== --- head/stand/common/load_elf_obj.c Tue Dec 5 21:37:59 2017 (r326589) +++ head/stand/common/load_elf_obj.c Tue Dec 5 21:38:04 2017 (r326590) @@ -33,12 +33,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include #define FREEBSD_ELF -#include +#include #include "bootstrap.h" Modified: head/stand/common/reloc_elf.c ============================================================================== --- head/stand/common/reloc_elf.c Tue Dec 5 21:37:59 2017 (r326589) +++ head/stand/common/reloc_elf.c Tue Dec 5 21:38:04 2017 (r326590) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #define FREEBSD_ELF -#include +#include #include "bootstrap.h" Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Tue Dec 5 21:37:59 2017 (r326589) +++ head/stand/efi/loader/main.c Tue Dec 5 21:38:04 2017 (r326590) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include From owner-svn-src-head@freebsd.org Tue Dec 5 21:38:12 2017 Return-Path: Delivered-To: svn-src-head@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 73DC4E83477; Tue, 5 Dec 2017 21:38:12 +0000 (UTC) (envelope-from imp@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 83BCA7290A; Tue, 5 Dec 2017 21:38:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LcAf5024183; Tue, 5 Dec 2017 21:38:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LcAMx024182; Tue, 5 Dec 2017 21:38:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052138.vB5LcAMx024182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326591 - head/contrib/compiler-rt/lib/builtins X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/compiler-rt/lib/builtins X-SVN-Commit-Revision: 326591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:38:12 -0000 Author: imp Date: Tue Dec 5 21:38:10 2017 New Revision: 326591 URL: https://svnweb.freebsd.org/changeset/base/326591 Log: This isn't NetBSD specific code. Include these for any kernel / standalone use. Tweak for FreeBSD's quirky limits.h stuff. Sponsored by: Netflix Modified: head/contrib/compiler-rt/lib/builtins/int_lib.h Modified: head/contrib/compiler-rt/lib/builtins/int_lib.h ============================================================================== --- head/contrib/compiler-rt/lib/builtins/int_lib.h Tue Dec 5 21:38:04 2017 (r326590) +++ head/contrib/compiler-rt/lib/builtins/int_lib.h Tue Dec 5 21:38:10 2017 (r326591) @@ -55,12 +55,12 @@ #define UNUSED __attribute__((unused)) #endif -#if defined(__NetBSD__) && (defined(_KERNEL) || defined(_STANDALONE)) +#if (defined(_KERNEL) || defined(_STANDALONE)) /* * Kernel and boot environment can't use normal headers, * so use the equivalent system headers. */ -# include +# include # include # include #else From owner-svn-src-head@freebsd.org Tue Dec 5 21:38:17 2017 Return-Path: Delivered-To: svn-src-head@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 63EFDE834A3; Tue, 5 Dec 2017 21:38:17 +0000 (UTC) (envelope-from imp@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 C6326729EB; Tue, 5 Dec 2017 21:38:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LcEqw024234; Tue, 5 Dec 2017 21:38:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LcEie024233; Tue, 5 Dec 2017 21:38:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052138.vB5LcEie024233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326592 - head/stand/userboot/test X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/userboot/test X-SVN-Commit-Revision: 326592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:38:17 -0000 Author: imp Date: Tue Dec 5 21:38:14 2017 New Revision: 326592 URL: https://svnweb.freebsd.org/changeset/base/326592 Log: Don't inherit CFLAGS. This a specialized test program, and can be built with mostly default flags. Do so in anticipation of the rest of stand not building with system headers. Sponsored by: Netflix Modified: head/stand/userboot/test/Makefile Modified: head/stand/userboot/test/Makefile ============================================================================== --- head/stand/userboot/test/Makefile Tue Dec 5 21:38:10 2017 (r326591) +++ head/stand/userboot/test/Makefile Tue Dec 5 21:38:14 2017 (r326592) @@ -9,6 +9,6 @@ MK_SSP= no PROG= test INTERNALPROG= -CFLAGS+= -I${BOOTSRC}/userboot -U_STANDALONE +CFLAGS= -I${BOOTSRC}/userboot .include From owner-svn-src-head@freebsd.org Tue Dec 5 21:38:21 2017 Return-Path: Delivered-To: svn-src-head@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 C25D8E834CF; Tue, 5 Dec 2017 21:38:21 +0000 (UTC) (envelope-from imp@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 3E81A72AA2; Tue, 5 Dec 2017 21:38:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LcJiI024289; Tue, 5 Dec 2017 21:38:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LcJEH024287; Tue, 5 Dec 2017 21:38:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052138.vB5LcJEH024287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326593 - in head/stand: . libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: . libsa X-SVN-Commit-Revision: 326593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:38:22 -0000 Author: imp Date: Tue Dec 5 21:38:19 2017 New Revision: 326593 URL: https://svnweb.freebsd.org/changeset/base/326593 Log: Stop building with the standard system headers. Building with the standard system headers isn't a perfect match to the stand environment. Instead, copy over the files we know are safe to use and constrain what else is used. We use -nostdinc to achieve this. This also fixes issues with building 32-bit libraries on amd64 sometimes pulling in the wrong cpufunc.h giving an error now that we stop on errors. It will also enable an easier transition to lua boot. Sponsored by: Netflix Modified: head/stand/defs.mk head/stand/libsa/Makefile Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Tue Dec 5 21:38:14 2017 (r326592) +++ head/stand/defs.mk Tue Dec 5 21:38:19 2017 (r326593) @@ -41,6 +41,12 @@ LIBSA32= ${BOOTOBJ}/libsa32/libsa32.a .endif # Standard options: +CFLAGS+= -nostdinc +.if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 +CFLAGS+= -I${BOOTOBJ}/libsa32 +.else +CFLAGS+= -I${BOOTOBJ}/libsa +.endif CFLAGS+= -I${SASRC} -D_STANDALONE CFLAGS+= -I${SYSDIR} Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Tue Dec 5 21:38:14 2017 (r326592) +++ head/stand/libsa/Makefile Tue Dec 5 21:38:19 2017 (r326593) @@ -91,6 +91,7 @@ SRCS+= libsa_bzlib_private.h .for file in bzlib.c crctable.c decompress.c huffman.c randtable.c SRCS+= _${file} CLEANFILES+= _${file} +CFLAGS._${file}+=-I${SRCTOP}/contrib/bzip2 _${file}: ${file} sed "s|bzlib_private\.h|libsa_bzlib_private.h|" \ @@ -129,6 +130,26 @@ libsa_${file}: ${file} ${.ALLSRC} > ${.TARGET} .endfor +# Create a subset of includes that are safe, as well as adjusting those that aren't +# The lists may drive people nuts, but they are explicitly opt-in +beforedepend: + echo beforedepend; \ + mkdir -p xlocale arpa; \ + for i in a.out.h assert.h elf.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h unistd.h uuid.h; do \ + ln -sf ${SRCTOP}/include/$$i $$i; \ + done; \ + ln -sf ${SYSDIR}/${MACHINE}/include/stdarg.h stdarg.h; \ + ln -sf ${SYSDIR}/sys/errno.h errno.h; \ + ln -sf ${SYSDIR}/sys/stdint.h stdint.h; \ + ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ + ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ + for i in _time.h _strings.h _string.h; do \ + [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ + done; \ + for i in ctype.h stdio.h stdlib.h; do \ + ln -sf ${SASRC}/stand.h $$i; \ + done + # io routines SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \ fstat.c close.c lseek.c open.c read.c write.c readdir.c @@ -147,6 +168,8 @@ SRCS+= pkgfs.c .if ${MK_NAND} != "no" SRCS+= nandfs.c .endif + +CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2 # explicit_bzero .PATH: ${SYSDIR}/libkern From owner-svn-src-head@freebsd.org Tue Dec 5 21:38:27 2017 Return-Path: Delivered-To: svn-src-head@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 2063AE8350E; Tue, 5 Dec 2017 21:38:27 +0000 (UTC) (envelope-from imp@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 9CCC372B6B; Tue, 5 Dec 2017 21:38:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LcOM2024341; Tue, 5 Dec 2017 21:38:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LcO0K024340; Tue, 5 Dec 2017 21:38:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052138.vB5LcO0K024340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326594 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:38:27 -0000 Author: imp Date: Tue Dec 5 21:38:24 2017 New Revision: 326594 URL: https://svnweb.freebsd.org/changeset/base/326594 Log: Now that we offer a semi-sane standards-ish set of #include files in the stand environment that's safe to use (and insulated from whatever build env you might normally have), stop hacking the bzlib and zlib sources with sed. There's no longer any need. Sponsored by: Netflix Modified: head/stand/libsa/Makefile Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Tue Dec 5 21:38:19 2017 (r326593) +++ head/stand/libsa/Makefile Tue Dec 5 21:38:24 2017 (r326594) @@ -86,50 +86,15 @@ SRCS+= _setjmp.S # loader(8) with LOADER_BZIP2_SUPPORT defined .PATH: ${SRCTOP}/contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS -SRCS+= libsa_bzlib_private.h -.for file in bzlib.c crctable.c decompress.c huffman.c randtable.c -SRCS+= _${file} -CLEANFILES+= _${file} -CFLAGS._${file}+=-I${SRCTOP}/contrib/bzip2 +SRCS+=bzlib.c crctable.c decompress.c huffman.c randtable.c -_${file}: ${file} - sed "s|bzlib_private\.h|libsa_bzlib_private.h|" \ - ${.ALLSRC} > ${.TARGET} -.endfor - -CLEANFILES+= libsa_bzlib_private.h -libsa_bzlib_private.h: bzlib_private.h - sed -e 's||"stand.h"|' \ - ${.ALLSRC} > ${.TARGET} - # decompression functionality from zlib .PATH: ${SRCTOP}/contrib/zlib CFLAGS+=-DHAVE_MEMCPY -I${SRCTOP}/contrib/zlib -SRCS+= adler32.c crc32.c libsa_zutil.h libsa_gzguts.h +SRCS+= adler32.c crc32.c +SRCS+= infback.c inffast.c inflate.c inftrees.c zutil.c -.for file in infback.c inffast.c inflate.c inftrees.c zutil.c -SRCS+= _${file} -CLEANFILES+= _${file} - -_${file}: ${file} - sed -e "s|zutil\.h|libsa_zutil.h|" \ - -e "s|gzguts\.h|libsa_gzguts.h|" \ - ${.ALLSRC} > ${.TARGET} -.endfor - -# depend on stand.h being able to be included multiple times -.for file in zutil.h gzguts.h -CLEANFILES+= libsa_${file} -libsa_${file}: ${file} - sed -e 's||"stand.h"|' \ - -e 's||"stand.h"|' \ - -e 's||"stand.h"|' \ - -e 's||"stand.h"|' \ - -e 's||"stand.h"|' \ - ${.ALLSRC} > ${.TARGET} -.endfor - # Create a subset of includes that are safe, as well as adjusting those that aren't # The lists may drive people nuts, but they are explicitly opt-in beforedepend: @@ -146,7 +111,7 @@ beforedepend: for i in _time.h _strings.h _string.h; do \ [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ done; \ - for i in ctype.h stdio.h stdlib.h; do \ + for i in ctype.h fcntl.h stdio.h stdlib.h; do \ ln -sf ${SASRC}/stand.h $$i; \ done From owner-svn-src-head@freebsd.org Tue Dec 5 21:40:53 2017 Return-Path: Delivered-To: svn-src-head@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 7447AE83980; Tue, 5 Dec 2017 21:40:53 +0000 (UTC) (envelope-from kevans@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 41918735C1; Tue, 5 Dec 2017 21:40:53 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LeqX2025169; Tue, 5 Dec 2017 21:40:52 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LeqJ0025168; Tue, 5 Dec 2017 21:40:52 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201712052140.vB5LeqJ0025168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 5 Dec 2017 21:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326595 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 326595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:40:53 -0000 Author: kevans Date: Tue Dec 5 21:40:52 2017 New Revision: 326595 URL: https://svnweb.freebsd.org/changeset/base/326595 Log: a10_gpio: Don't do read/set dance if pin is already configured for output This fixes some regulator issues with a83t/BananaPi-M3; the pin value was getting clobbered as we reconfigured the pin when initializing the regulator. Discussed with: ian Modified: head/sys/arm/allwinner/a10_gpio.c Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Tue Dec 5 21:38:24 2017 (r326594) +++ head/sys/arm/allwinner/a10_gpio.c Tue Dec 5 21:40:52 2017 (r326595) @@ -353,7 +353,8 @@ a10_gpio_pin_configure(struct a10_gpio_softc *sc, uint /* Manage input/output. */ if (flags & GPIO_PIN_INPUT) { err = a10_gpio_set_function(sc, pin, A10_GPIO_INPUT); - } else if (flags & GPIO_PIN_OUTPUT) { + } else if ((flags & GPIO_PIN_OUTPUT) && + a10_gpio_get_function(sc, pin) != A10_GPIO_OUTPUT) { if (flags & GPIO_PIN_PRESET_LOW) { a10_gpio_pin_set_locked(sc, pin, 0); } else if (flags & GPIO_PIN_PRESET_HIGH) { From owner-svn-src-head@freebsd.org Tue Dec 5 21:42:10 2017 Return-Path: Delivered-To: svn-src-head@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 6B26CE83DBD; Tue, 5 Dec 2017 21:42:10 +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 38731739B8; Tue, 5 Dec 2017 21:42:10 +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 vB5Lg9dp028195; Tue, 5 Dec 2017 21:42:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5Lg9p1028194; Tue, 5 Dec 2017 21:42:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712052142.vB5Lg9p1028194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Dec 2017 21:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326596 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 326596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:42:10 -0000 Author: emaste Date: Tue Dec 5 21:42:09 2017 New Revision: 326596 URL: https://svnweb.freebsd.org/changeset/base/326596 Log: Makefile.inc1: map mips MACHINE_/TARGET_ARCH to triples This helps Clang MIPS builds. Reviewed by: bdrewery, jhb (earlier version) Differential Revision: https://reviews.freebsd.org/D12171 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Dec 5 21:40:52 2017 (r326595) +++ head/Makefile.inc1 Tue Dec 5 21:42:09 2017 (r326596) @@ -641,9 +641,9 @@ XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -s .elif ${WANT_COMPILER_TYPE} == clang || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == clang) MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:C/amd64/x86_64/}-${MACHINE_ABI}-freebsd12.0 +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.0 TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd12.0 +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.0 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} From owner-svn-src-head@freebsd.org Tue Dec 5 22:02:47 2017 Return-Path: Delivered-To: svn-src-head@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 DF63DE8477A; Tue, 5 Dec 2017 22:02:47 +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 AC24474A52; Tue, 5 Dec 2017 22:02:47 +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 vB5M2kxO036987; Tue, 5 Dec 2017 22:02:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5M2kOH036986; Tue, 5 Dec 2017 22:02:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712052202.vB5M2kOH036986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Dec 2017 22:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326597 - head/sys/dev/vnic X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/vnic X-SVN-Commit-Revision: 326597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 22:02:48 -0000 Author: emaste Date: Tue Dec 5 22:02:46 2017 New Revision: 326597 URL: https://svnweb.freebsd.org/changeset/base/326597 Log: vnic: apply hardware L3 checksum only for IPv4 Previously we set the csum_l3 flag for IPv4 and IPv6, but only IPv4 should have header checksumming applied. Prompted by Linux commit fa6d7cb5d76cf0467c61420fc9238045aedfd379. Reviewed by: bz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13366 Modified: head/sys/dev/vnic/nicvf_queues.c Modified: head/sys/dev/vnic/nicvf_queues.c ============================================================================== --- head/sys/dev/vnic/nicvf_queues.c Tue Dec 5 21:42:09 2017 (r326596) +++ head/sys/dev/vnic/nicvf_queues.c Tue Dec 5 22:02:46 2017 (r326597) @@ -1802,6 +1802,8 @@ nicvf_sq_add_hdr_subdesc(struct snd_queue *sq, int qen if (mbuf == NULL) return (ENOBUFS); } + if (mbuf->m_pkthdr.csum_flags & CSUM_IP) + hdr->csum_l3 = 1; /* Enable IP csum calculation */ ip = (struct ip *)(mbuf->m_data + ehdrlen); iphlen = ip->ip_hl << 2; @@ -1809,13 +1811,10 @@ nicvf_sq_add_hdr_subdesc(struct snd_queue *sq, int qen proto = ip->ip_p; break; #endif - default: - hdr->csum_l3 = 0; } #if defined(INET6) || defined(INET) if (poff > 0 && mbuf->m_pkthdr.csum_flags != 0) { - hdr->csum_l3 = 1; /* Enable IP csum calculation */ switch (proto) { case IPPROTO_TCP: if ((mbuf->m_pkthdr.csum_flags & CSUM_TCP) == 0) From owner-svn-src-head@freebsd.org Tue Dec 5 22:05:12 2017 Return-Path: Delivered-To: svn-src-head@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 402ECE8480F; Tue, 5 Dec 2017 22:05:12 +0000 (UTC) (envelope-from kevans@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 0BE7C74BDD; Tue, 5 Dec 2017 22:05:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5M5Bsr037115; Tue, 5 Dec 2017 22:05:11 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5M5BRU037114; Tue, 5 Dec 2017 22:05:11 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201712052205.vB5M5BRU037114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 5 Dec 2017 22:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326598 - head/sys/modules/dtb/allwinner X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/modules/dtb/allwinner X-SVN-Commit-Revision: 326598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 22:05:12 -0000 Author: kevans Date: Tue Dec 5 22:05:10 2017 New Revision: 326598 URL: https://svnweb.freebsd.org/changeset/base/326598 Log: dtb/allwinner: Restore a83t/BananaPi-M3 DTS after r342822 sinovoip-bpi-m3.dts was disconnected from the build in r324822. Since then, a CCU driver has been added and several other changes have been made to make us compatible with upstream DTS for this board. Add links for older DTB that might be used: our u-boot port was expecting sinovoip-bpi-m3.dtb up until ports r455629, and our u-boot will not be switching to the upstream name (sun8i-a83t-bananapi-m3) quite yet. Discussed with: manu Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Tue Dec 5 22:02:46 2017 (r326597) +++ head/sys/modules/dtb/allwinner/Makefile Tue Dec 5 22:05:10 2017 (r326598) @@ -10,6 +10,7 @@ DTS= \ sun7i-a20-cubieboard2.dts \ sun7i-a20-olimex-som-evb.dts \ sun7i-a20-pcduino3.dts \ + sun8i-a83t-bananapi-m3.dts \ sun8i-h2-plus-orangepi-zero.dts \ sun8i-h3-nanopi-m1.dts \ sun8i-h3-nanopi-neo.dts \ @@ -24,5 +25,7 @@ LINKS= \ ${DTBDIR}/sun7i-a20-cubieboard2.dtb ${DTBDIR}/cubieboard2.dtb \ ${DTBDIR}/sun7i-a20-olimex-som-evb.dtb ${DTBDIR}/olimex-a20-som-evb.dtb \ ${DTBDIR}/sun7i-a20-pcduino3.dtb ${DTBDIR}/pcduino3.dtb \ + ${DTBDIR}/sun8i-a83t-bananapi-m3.dtb ${DTBDIR}/sinovoip-bpi-m3.dtb \ + ${DTBDIR}/sun8i-a83t-bananapi-m3.dtb ${DTBDIR}/sun8i-a83t-sinovoip-bpi-m3.dtb .include From owner-svn-src-head@freebsd.org Tue Dec 5 22:20:01 2017 Return-Path: Delivered-To: svn-src-head@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 0E4A9E84E8F; Tue, 5 Dec 2017 22:20:01 +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 DC50375610; Tue, 5 Dec 2017 22:20:00 +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 vB5MJx3q041368; Tue, 5 Dec 2017 22:19:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5MJxEn041364; Tue, 5 Dec 2017 22:19:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712052219.vB5MJxEn041364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Dec 2017 22:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326599 - head/sys/dev/vt X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/vt X-SVN-Commit-Revision: 326599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 22:20:01 -0000 Author: emaste Date: Tue Dec 5 22:19:59 2017 New Revision: 326599 URL: https://svnweb.freebsd.org/changeset/base/326599 Log: Implement "vidcontrol -h " for vt(4) PR: 210415 Submitted by: Siva Mahadevan Reviewed by: ray (earlier) MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11814 Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_buf.c head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Tue Dec 5 22:05:10 2017 (r326598) +++ head/sys/dev/vt/vt.h Tue Dec 5 22:19:59 2017 (r326599) @@ -196,8 +196,8 @@ struct vt_buf { #define VBF_SCROLL 0x8 /* scroll locked mode. */ #define VBF_HISTORY_FULL 0x10 /* All rows filled. */ unsigned int vb_history_size; - int vb_roffset; /* (b) History rows offset. */ - int vb_curroffset; /* (b) Saved rows offset. */ + unsigned int vb_roffset; /* (b) History rows offset. */ + unsigned int vb_curroffset; /* (b) Saved rows offset. */ term_pos_t vb_cursor; /* (u) Cursor position. */ term_pos_t vb_mark_start; /* (b) Copy region start. */ term_pos_t vb_mark_end; /* (b) Copy region end. */ @@ -223,7 +223,7 @@ void vtbuf_cursor_position(struct vt_buf *, const term void vtbuf_scroll_mode(struct vt_buf *vb, int yes); void vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area); void vtbuf_undirty(struct vt_buf *, term_rect_t *); -void vtbuf_sethistory_size(struct vt_buf *, int); +void vtbuf_sethistory_size(struct vt_buf *, unsigned int); int vtbuf_iscursor(const struct vt_buf *vb, int row, int col); void vtbuf_cursor_visibility(struct vt_buf *, int); #ifndef SC_NO_CUTPASTE Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Tue Dec 5 22:05:10 2017 (r326598) +++ head/sys/dev/vt/vt_buf.c Tue Dec 5 22:19:59 2017 (r326599) @@ -134,11 +134,10 @@ vthistory_addlines(struct vt_buf *vb, int offset) #endif vb->vb_curroffset += offset; - if (vb->vb_curroffset < 0) - vb->vb_curroffset = 0; - if (vb->vb_curroffset + vb->vb_scr_size.tp_row >= vb->vb_history_size) + if (vb->vb_curroffset + vb->vb_scr_size.tp_row >= vb->vb_history_size) { vb->vb_flags |= VBF_HISTORY_FULL; - vb->vb_curroffset %= vb->vb_history_size; + vb->vb_curroffset %= vb->vb_history_size; + } if ((vb->vb_flags & VBF_SCROLL) == 0) { vb->vb_roffset = vb->vb_curroffset; } @@ -460,7 +459,7 @@ vtbuf_init(struct vt_buf *vb, const term_pos_t *p) } void -vtbuf_sethistory_size(struct vt_buf *vb, int size) +vtbuf_sethistory_size(struct vt_buf *vb, unsigned int size) { term_pos_t p; @@ -474,9 +473,9 @@ void vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, unsigned int history_size) { term_char_t *old, *new, **rows, **oldrows, **copyrows, *row, *oldrow; - int bufsize, rowssize, w, h, c, r, history_was_full; - unsigned int old_history_size; - term_rect_t rect; + unsigned int w, h, c, r, old_history_size; + size_t bufsize, rowssize; + int history_full; history_size = MAX(history_size, p->tp_row); @@ -495,7 +494,8 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns w = vb->vb_scr_size.tp_col; h = vb->vb_scr_size.tp_row; old_history_size = vb->vb_history_size; - history_was_full = vb->vb_flags & VBF_HISTORY_FULL; + history_full = vb->vb_flags & VBF_HISTORY_FULL || + vb->vb_curroffset + h >= history_size; vb->vb_history_size = history_size; vb->vb_buffer = new; @@ -504,20 +504,16 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns vb->vb_scr_size = *p; vtbuf_init_rows(vb); - /* Copy history and fill extra space if needed. */ + /* + * Copy rows to the new buffer. The first row in the history + * is back to index 0, ie. the new buffer doesn't cycle. + */ if (history_size > old_history_size) { - /* - * Copy rows to the new buffer. The first row in the history - * is back to index 0, ie. the new buffer doesn't cycle. - * - * The rest of the new buffer is initialized with blank - * content. - */ for (r = 0; r < old_history_size; r ++) { row = rows[r]; /* Compute the corresponding row in the old buffer. */ - if (history_was_full) + if (history_full) /* * The buffer is full, the "top" row is * the one just after the viewable area @@ -551,18 +547,29 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns } /* Fill remaining rows. */ - rect.tr_begin.tp_col = 0; - rect.tr_begin.tp_row = old_history_size; - rect.tr_end.tp_col = p->tp_col; - rect.tr_end.tp_row = p->tp_row; - vtbuf_fill(vb, &rect, VTBUF_SPACE_CHAR(TERMINAL_NORM_ATTR)); + for (r = old_history_size; r < history_size; r++) { + row = rows[r]; + for (c = MIN(p->tp_col, w); c < p->tp_col; c++) { + row[c] = VTBUF_SPACE_CHAR(TERMINAL_NORM_ATTR); + } + } vb->vb_flags &= ~VBF_HISTORY_FULL; - } else { + /* - * Copy rows to the new buffer. The first row in the history - * is back to index 0, ie. the new buffer doesn't cycle. + * If the screen is already filled (there are non-visible lines + * above the current viewable area), adjust curroffset to the + * new viewable area. * + * If the old buffer was full, set curroffset to the + * th most recent line of history in the new, non-cycled + * buffer. Otherwise, it didn't cycle, so the old curroffset + * is the same in the new buffer. + */ + if (history_full) + vb->vb_curroffset = old_history_size - h; + } else { + /* * (old_history_size - history_size) lines of history are * dropped. */ @@ -575,15 +582,13 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns * See the equivalent if{} block above for an * explanation. */ - if (history_was_full) + if (history_full) oldrow = copyrows[ (vb->vb_curroffset + h + r + (old_history_size - history_size)) % old_history_size]; else - oldrow = copyrows[ - (r + (old_history_size - history_size)) % - old_history_size]; + oldrow = copyrows[r]; memmove(row, oldrow, MIN(p->tp_col, w) * sizeof(term_char_t)); @@ -598,23 +603,13 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns } } - if (!history_was_full && - (vb->vb_curroffset + h) >= history_size) + if (history_full) { + vb->vb_curroffset = history_size - h; vb->vb_flags |= VBF_HISTORY_FULL; + } } - /* - * If the screen is already filled (there are non-visible lines - * above the current viewable area), adjust curroffset to the - * new viewable area. - */ - if (!history_was_full && vb->vb_curroffset > 0) { - vb->vb_curroffset = vb->vb_curroffset + h - p->tp_row; - if (vb->vb_curroffset < 0) - vb->vb_curroffset += vb->vb_history_size; - vb->vb_curroffset %= vb->vb_history_size; - vb->vb_roffset = vb->vb_curroffset; - } + vb->vb_roffset = vb->vb_curroffset; /* Adjust cursor position. */ if (vb->vb_cursor.tp_col > p->tp_col - 1) @@ -628,7 +623,6 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns /* Move cursor to the last line on the screen. */ vb->vb_cursor.tp_row = p->tp_row - 1; - vtbuf_make_undirty(vb); VTBUF_UNLOCK(vb); /* Deallocate old buffer. */ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue Dec 5 22:05:10 2017 (r326598) +++ head/sys/dev/vt/vt_core.c Tue Dec 5 22:19:59 2017 (r326599) @@ -2220,6 +2220,13 @@ skip_thunk: case CONS_BLANKTIME: /* XXX */ return (0); + case CONS_HISTORY: + if (*(int *)data < 0) + return EINVAL; + if (*(int *)data != vd->vd_curwindow->vw_buf.vb_history_size) + vtbuf_sethistory_size(&vd->vd_curwindow->vw_buf, + *(int *)data); + return 0; case CONS_GET: /* XXX */ *(int *)data = M_CG640x480; From owner-svn-src-head@freebsd.org Tue Dec 5 22:24:21 2017 Return-Path: Delivered-To: svn-src-head@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 D679FE85170; Tue, 5 Dec 2017 22:24:21 +0000 (UTC) (envelope-from imp@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 A098775B2F; Tue, 5 Dec 2017 22:24:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5MOKe6045221; Tue, 5 Dec 2017 22:24:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5MOKM2045220; Tue, 5 Dec 2017 22:24:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052224.vB5MOKM2045220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 22:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326600 - head/contrib/compiler-rt/lib/builtins X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/compiler-rt/lib/builtins X-SVN-Commit-Revision: 326600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 22:24:21 -0000 Author: imp Date: Tue Dec 5 22:24:20 2017 New Revision: 326600 URL: https://svnweb.freebsd.org/changeset/base/326600 Log: Since this is contrib code, create an upstreamable version of my change. Now on FreeBSD and NetBSD if _STANDALONE is defined, we include the kernel version with alloances for the quirky differences between the two. Sponsored by: Netflix Modified: head/contrib/compiler-rt/lib/builtins/int_lib.h Modified: head/contrib/compiler-rt/lib/builtins/int_lib.h ============================================================================== --- head/contrib/compiler-rt/lib/builtins/int_lib.h Tue Dec 5 22:19:59 2017 (r326599) +++ head/contrib/compiler-rt/lib/builtins/int_lib.h Tue Dec 5 22:24:20 2017 (r326600) @@ -55,12 +55,16 @@ #define UNUSED __attribute__((unused)) #endif -#if (defined(_KERNEL) || defined(_STANDALONE)) +#if (defined(__FreeBSD__) || defined(__NetBSD__)) && (defined(_KERNEL) || defined(_STANDALONE)) /* * Kernel and boot environment can't use normal headers, * so use the equivalent system headers. */ +#ifdef __FreeBSD__ # include +#else +# include +#endif # include # include #else From owner-svn-src-head@freebsd.org Tue Dec 5 23:00:42 2017 Return-Path: Delivered-To: svn-src-head@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 B1C7DE85E9A; Tue, 5 Dec 2017 23:00:42 +0000 (UTC) (envelope-from jilles@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 7BD8176E7C; Tue, 5 Dec 2017 23:00:42 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5N0fr8060068; Tue, 5 Dec 2017 23:00:41 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5N0fQg060066; Tue, 5 Dec 2017 23:00:41 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201712052300.vB5N0fQg060066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 5 Dec 2017 23:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326601 - head/contrib/mdocml X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/contrib/mdocml X-SVN-Commit-Revision: 326601 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 23:00:42 -0000 Author: jilles Date: Tue Dec 5 23:00:41 2017 New Revision: 326601 URL: https://svnweb.freebsd.org/changeset/base/326601 Log: mdocml: Add IEEE Std 1003.1-2008, 2016 edition Also document IEEE Std 1003.1-2008, 2013 edition in mdoc(7) (as well as the 2016 edition). Submitted by: Yuri Pankov Reviewed by: bjk Differential Revision: https://reviews.freebsd.org/D13349 Modified: head/contrib/mdocml/mdoc.7 head/contrib/mdocml/st.in Modified: head/contrib/mdocml/mdoc.7 ============================================================================== --- head/contrib/mdocml/mdoc.7 Tue Dec 5 22:24:20 2017 (r326600) +++ head/contrib/mdocml/mdoc.7 Tue Dec 5 23:00:41 2017 (r326601) @@ -2575,6 +2575,17 @@ The second and last Technical Corrigendum. .br This standard is also called X/Open Portability Guide version 7. +.Pp +.It \-p1003.1-2013 +.St -p1003.1-2013 +.br +The 2013 edition incorporates Technical Corrigendum 1. +.Pp +.It \-p1003.1-2016 +.St -p1003.1-2016 +.br +The 2016 edition incorporates Technical Corrigendum 1 and +Technical Corrigendum 2. .El .It Other standards .Pp Modified: head/contrib/mdocml/st.in ============================================================================== --- head/contrib/mdocml/st.in Tue Dec 5 22:24:20 2017 (r326600) +++ head/contrib/mdocml/st.in Tue Dec 5 23:00:41 2017 (r326601) @@ -35,6 +35,7 @@ LINE("-p1003.1-2001", "IEEE Std 1003.1-2001 (\\(LqPOSI LINE("-p1003.1-2004", "IEEE Std 1003.1-2004 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2008", "IEEE Std 1003.1-2008 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2013", "IEEE Std 1003.1-2008, 2013 Edition (\\(LqPOSIX.1\\(Rq)") +LINE("-p1003.1-2016", "IEEE Std 1003.1-2008, 2016 Edition (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1", "IEEE Std 1003.1 (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1b", "IEEE Std 1003.1b (\\(LqPOSIX.1b\\(Rq)") LINE("-p1003.1b-93", "IEEE Std 1003.1b-1993 (\\(LqPOSIX.1b\\(Rq)") From owner-svn-src-head@freebsd.org Tue Dec 5 23:02:33 2017 Return-Path: Delivered-To: svn-src-head@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 32669E86032; Tue, 5 Dec 2017 23:02:33 +0000 (UTC) (envelope-from imp@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 F1A0077244; Tue, 5 Dec 2017 23:02:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5N2WJ5061619; Tue, 5 Dec 2017 23:02:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5N2WNS061618; Tue, 5 Dec 2017 23:02:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052302.vB5N2WNS061618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 23:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326602 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 326602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 23:02:33 -0000 Author: imp Date: Tue Dec 5 23:02:31 2017 New Revision: 326602 URL: https://svnweb.freebsd.org/changeset/base/326602 Log: Remove stray cam_periph_async call. It's called twice this way. While currently harmless for AC_UNIT_ATTENTION event (cam_periph_async does nothing with them), it's still in error because if it were to start in the future, it would be done twice. Sponsored by: Netflix Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Dec 5 23:00:41 2017 (r326601) +++ head/sys/cam/scsi/scsi_da.c Tue Dec 5 23:02:31 2017 (r326602) @@ -1919,7 +1919,6 @@ daasync(void *callback_arg, u_int32_t code, dareprobe(periph); } } - cam_periph_async(periph, code, path, arg); break; } case AC_SCSI_AEN: From owner-svn-src-head@freebsd.org Tue Dec 5 23:06:16 2017 Return-Path: Delivered-To: svn-src-head@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 A8E1FE860C7; Tue, 5 Dec 2017 23:06:16 +0000 (UTC) (envelope-from jilles@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 72B5F7741C; Tue, 5 Dec 2017 23:06:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5N6Fqb061787; Tue, 5 Dec 2017 23:06:15 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5N6FJk061786; Tue, 5 Dec 2017 23:06:15 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201712052306.vB5N6FJk061786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 5 Dec 2017 23:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326603 - head/contrib/mdocml X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/contrib/mdocml X-SVN-Commit-Revision: 326603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 23:06:16 -0000 Author: jilles Date: Tue Dec 5 23:06:15 2017 New Revision: 326603 URL: https://svnweb.freebsd.org/changeset/base/326603 Log: mdoc(7): Update .Dd for previous commit Modified: head/contrib/mdocml/mdoc.7 Modified: head/contrib/mdocml/mdoc.7 ============================================================================== --- head/contrib/mdocml/mdoc.7 Tue Dec 5 23:02:31 2017 (r326602) +++ head/contrib/mdocml/mdoc.7 Tue Dec 5 23:06:15 2017 (r326603) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 20 2017 $ +.Dd $Mdocdate: December 5 2017 $ .Dt MDOC 7 .Os .Sh NAME From owner-svn-src-head@freebsd.org Wed Dec 6 00:29:44 2017 Return-Path: Delivered-To: svn-src-head@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 CA0EDE88D23; Wed, 6 Dec 2017 00:29:44 +0000 (UTC) (envelope-from imp@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 95F527A89A; Wed, 6 Dec 2017 00:29:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB60Th48094919; Wed, 6 Dec 2017 00:29:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB60Thcn094918; Wed, 6 Dec 2017 00:29:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712060029.vB60Thcn094918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 6 Dec 2017 00:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326605 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 326605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 00:29:44 -0000 Author: imp Date: Wed Dec 6 00:29:43 2017 New Revision: 326605 URL: https://svnweb.freebsd.org/changeset/base/326605 Log: Add NVME as a known device type for devstat processing. Also, reduce the amount of cut and pasted code a little since only two args are different in the devstat_end_transaction calls. Sponsored by: Netflix Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Wed Dec 6 00:00:37 2017 (r326604) +++ head/sys/cam/cam_periph.c Wed Dec 6 00:29:43 2017 (r326605) @@ -1171,8 +1171,10 @@ cam_periph_runccb(union ccb *ccb, * If the user has supplied a stats structure, and if we understand * this particular type of ccb, record the transaction start. */ - if ((ds != NULL) && (ccb->ccb_h.func_code == XPT_SCSI_IO || - ccb->ccb_h.func_code == XPT_ATA_IO)) { + if (ds != NULL && + (ccb->ccb_h.func_code == XPT_SCSI_IO || + ccb->ccb_h.func_code == XPT_ATA_IO || + ccb->ccb_h.func_code == XPT_NVME_IO)) { starttime = <ime; binuptime(starttime); devstat_start_transaction(ds, starttime); @@ -1203,25 +1205,27 @@ cam_periph_runccb(union ccb *ccb, } if (ds != NULL) { + uint32_t bytes; + devstat_tag_type tag; + bool valid = true; + if (ccb->ccb_h.func_code == XPT_SCSI_IO) { - devstat_end_transaction(ds, - ccb->csio.dxfer_len - ccb->csio.resid, - ccb->csio.tag_action & 0x3, - ((ccb->ccb_h.flags & CAM_DIR_MASK) == - CAM_DIR_NONE) ? DEVSTAT_NO_DATA : - (ccb->ccb_h.flags & CAM_DIR_OUT) ? - DEVSTAT_WRITE : - DEVSTAT_READ, NULL, starttime); + bytes = ccb->csio.dxfer_len - ccb->csio.resid; + tag = (devstat_tag_type)(ccb->csio.tag_action & 0x3); } else if (ccb->ccb_h.func_code == XPT_ATA_IO) { - devstat_end_transaction(ds, - ccb->ataio.dxfer_len - ccb->ataio.resid, - 0, /* Not used in ATA */ - ((ccb->ccb_h.flags & CAM_DIR_MASK) == - CAM_DIR_NONE) ? DEVSTAT_NO_DATA : - (ccb->ccb_h.flags & CAM_DIR_OUT) ? - DEVSTAT_WRITE : - DEVSTAT_READ, NULL, starttime); + bytes = ccb->ataio.dxfer_len - ccb->ataio.resid; + tag = (devstat_tag_type)0; + } else if (ccb->ccb_h.func_code == XPT_NVME_IO) { + bytes = ccb->nvmeio.dxfer_len; /* NB: resid no possible */ + tag = (devstat_tag_type)0; + } else { + valid = false; } + if (valid) + devstat_end_transaction(ds, bytes, tag, + ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE) ? + DEVSTAT_NO_DATA : (ccb->ccb_h.flags & CAM_DIR_OUT) ? + DEVSTAT_WRITE : DEVSTAT_READ, NULL, starttime); } return(error); From owner-svn-src-head@freebsd.org Wed Dec 6 00:29:54 2017 Return-Path: Delivered-To: svn-src-head@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 1426BE88D5B; Wed, 6 Dec 2017 00:29:54 +0000 (UTC) (envelope-from imp@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 84CE57A933; Wed, 6 Dec 2017 00:29:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB60TqMh094989; Wed, 6 Dec 2017 00:29:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB60TpKm094973; Wed, 6 Dec 2017 00:29:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712060029.vB60TpKm094973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 6 Dec 2017 00:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326606 - in head/sys/cam: . ata mmc nvme scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/cam: . ata mmc nvme scsi X-SVN-Commit-Revision: 326606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 00:29:54 -0000 Author: imp Date: Wed Dec 6 00:29:50 2017 New Revision: 326606 URL: https://svnweb.freebsd.org/changeset/base/326606 Log: Remove unused 4th argument to match the standard error routines. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13386 Modified: head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_pmp.c head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_periph.c head/sys/cam/cam_periph.h head/sys/cam/mmc/mmc_da.c head/sys/cam/nvme/nvme_da.c head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_ch.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_enc.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_pt.c head/sys/cam/scsi/scsi_sa.c head/sys/cam/scsi/scsi_sg.c head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/ata/ata_da.c Wed Dec 6 00:29:50 2017 (r326606) @@ -3354,7 +3354,7 @@ adaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_ } #endif - return(cam_periph_error(ccb, cam_flags, sense_flags, NULL)); + return(cam_periph_error(ccb, cam_flags, sense_flags)); } static void Modified: head/sys/cam/ata/ata_pmp.c ============================================================================== --- head/sys/cam/ata/ata_pmp.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/ata/ata_pmp.c Wed Dec 6 00:29:50 2017 (r326606) @@ -597,7 +597,7 @@ pmpdone(struct cam_periph *periph, union ccb *done_ccb priority = done_ccb->ccb_h.pinfo.priority; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { + if (cam_periph_error(done_ccb, 0, 0) == ERESTART) { return; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { cam_release_devq(done_ccb->ccb_h.path, Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/ata/ata_xpt.c Wed Dec 6 00:29:50 2017 (r326606) @@ -763,8 +763,8 @@ probedone(struct cam_periph *periph, union ccb *done_c if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { if (cam_periph_error(done_ccb, - 0, softc->restart ? (SF_NO_RECOVERY | SF_NO_RETRY) : 0, - NULL) == ERESTART) { + 0, softc->restart ? (SF_NO_RECOVERY | SF_NO_RETRY) : 0 + ) == ERESTART) { out: /* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */ cam_release_devq(path, 0, 0, 0, FALSE); Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/cam_periph.c Wed Dec 6 00:29:50 2017 (r326606) @@ -1302,7 +1302,7 @@ camperiphdone(struct cam_periph *periph, union ccb *do } } if (cam_periph_error(done_ccb, - 0, SF_RETRY_UA | SF_NO_PRINT, NULL) == ERESTART) + 0, SF_RETRY_UA | SF_NO_PRINT) == ERESTART) goto out; if (done_ccb->ccb_h.status & CAM_DEV_QFRZN) { cam_release_devq(done_ccb->ccb_h.path, 0, 0, 0, 0); @@ -1716,7 +1716,7 @@ sense_error_done: */ int cam_periph_error(union ccb *ccb, cam_flags camflags, - u_int32_t sense_flags, union ccb *save_ccb) + u_int32_t sense_flags) { struct cam_path *newpath; union ccb *orig_ccb, *scan_ccb; Modified: head/sys/cam/cam_periph.h ============================================================================== --- head/sys/cam/cam_periph.h Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/cam_periph.h Wed Dec 6 00:29:50 2017 (r326606) @@ -197,7 +197,7 @@ void cam_periph_freeze_after_event(struct cam_periph struct timeval* event_time, u_int duration_ms); int cam_periph_error(union ccb *ccb, cam_flags camflags, - u_int32_t sense_flags, union ccb *save_ccb); + u_int32_t sense_flags); static __inline struct mtx * cam_periph_mtx(struct cam_periph *periph) Modified: head/sys/cam/mmc/mmc_da.c ============================================================================== --- head/sys/cam/mmc/mmc_da.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/mmc/mmc_da.c Wed Dec 6 00:29:50 2017 (r326606) @@ -1425,6 +1425,6 @@ sddadone(struct cam_periph *periph, union ccb *done_cc static int sddaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { - return(cam_periph_error(ccb, cam_flags, sense_flags, NULL)); + return(cam_periph_error(ccb, cam_flags, sense_flags)); } #endif /* _KERNEL */ Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/nvme/nvme_da.c Wed Dec 6 00:29:50 2017 (r326606) @@ -407,7 +407,7 @@ ndadump(void *arg, void *virtual, vm_offset_t physical xpt_polled_action((union ccb *)&nvmeio); error = cam_periph_error((union ccb *)&nvmeio, - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); + 0, SF_NO_RECOVERY | SF_NO_RETRY); if ((nvmeio.ccb_h.status & CAM_DEV_QFRZN) != 0) cam_release_devq(nvmeio.ccb_h.path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, /*getcount_only*/0); @@ -426,7 +426,7 @@ ndadump(void *arg, void *virtual, vm_offset_t physical xpt_polled_action((union ccb *)&nvmeio); error = cam_periph_error((union ccb *)&nvmeio, - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); + 0, SF_NO_RECOVERY | SF_NO_RETRY); if ((nvmeio.ccb_h.status & CAM_DEV_QFRZN) != 0) cam_release_devq(nvmeio.ccb_h.path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, /*getcount_only*/0); @@ -1087,7 +1087,7 @@ ndaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_ break; } - return(cam_periph_error(ccb, cam_flags, sense_flags, NULL)); + return(cam_periph_error(ccb, cam_flags, sense_flags)); } /* Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/scsi/scsi_cd.c Wed Dec 6 00:29:50 2017 (r326606) @@ -2593,8 +2593,7 @@ cderror(union ccb *ccb, u_int32_t cam_flags, u_int32_t if (softc->quirks & CD_Q_RETRY_BUSY) sense_flags |= SF_RETRY_BUSY; - return (cam_periph_error(ccb, cam_flags, sense_flags, - &softc->saved_ccb)); + return (cam_periph_error(ccb, cam_flags, sense_flags)); } static void Modified: head/sys/cam/scsi/scsi_ch.c ============================================================================== --- head/sys/cam/scsi/scsi_ch.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/scsi/scsi_ch.c Wed Dec 6 00:29:50 2017 (r326606) @@ -752,8 +752,7 @@ cherror(union ccb *ccb, u_int32_t cam_flags, u_int32_t periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct ch_softc *)periph->softc; - return (cam_periph_error(ccb, cam_flags, sense_flags, - &softc->saved_ccb)); + return (cam_periph_error(ccb, cam_flags, sense_flags)); } static int Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/scsi/scsi_da.c Wed Dec 6 00:29:50 2017 (r326606) @@ -1676,7 +1676,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, xpt_polled_action((union ccb *)&csio); error = cam_periph_error((union ccb *)&csio, - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); + 0, SF_NO_RECOVERY | SF_NO_RETRY); if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0) cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, /*getcount_only*/0); @@ -1704,7 +1704,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, xpt_polled_action((union ccb *)&csio); error = cam_periph_error((union ccb *)&csio, - 0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR, NULL); + 0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR); if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0) cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0, /*reduction*/0, /*timeout*/0, /*getcount_only*/0); @@ -5450,8 +5450,7 @@ daerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t if (softc->quirks & DA_Q_RETRY_BUSY) sense_flags |= SF_RETRY_BUSY; - return(cam_periph_error(ccb, cam_flags, sense_flags, - &softc->saved_ccb)); + return(cam_periph_error(ccb, cam_flags, sense_flags)); } static void Modified: head/sys/cam/scsi/scsi_enc.c ============================================================================== --- head/sys/cam/scsi/scsi_enc.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/scsi/scsi_enc.c Wed Dec 6 00:29:50 2017 (r326606) @@ -335,7 +335,7 @@ enc_error(union ccb *ccb, uint32_t cflags, uint32_t sf periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct enc_softc *)periph->softc; - return (cam_periph_error(ccb, cflags, sflags, &softc->saved_ccb)); + return (cam_periph_error(ccb, cflags, sflags)); } static int Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/scsi/scsi_pass.c Wed Dec 6 00:29:50 2017 (r326606) @@ -2277,6 +2277,5 @@ passerror(union ccb *ccb, u_int32_t cam_flags, u_int32 periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct pass_softc *)periph->softc; - return(cam_periph_error(ccb, cam_flags, sense_flags, - &softc->saved_ccb)); + return(cam_periph_error(ccb, cam_flags, sense_flags)); } Modified: head/sys/cam/scsi/scsi_pt.c ============================================================================== --- head/sys/cam/scsi/scsi_pt.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/scsi/scsi_pt.c Wed Dec 6 00:29:50 2017 (r326606) @@ -571,8 +571,7 @@ pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct pt_softc *)periph->softc; - return(cam_periph_error(ccb, cam_flags, sense_flags, - &softc->saved_ccb)); + return(cam_periph_error(ccb, cam_flags, sense_flags)); } static int Modified: head/sys/cam/scsi/scsi_sa.c ============================================================================== --- head/sys/cam/scsi/scsi_sa.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/scsi/scsi_sa.c Wed Dec 6 00:29:50 2017 (r326606) @@ -3469,7 +3469,7 @@ saerror(union ccb *ccb, u_int32_t cflgs, u_int32_t sfl /* * Otherwise, we let the common code handle this. */ - return (cam_periph_error(ccb, cflgs, sflgs, &softc->saved_ccb)); + return (cam_periph_error(ccb, cflgs, sflgs)); /* * XXX: To Be Fixed @@ -3482,7 +3482,7 @@ saerror(union ccb *ccb, u_int32_t cflgs, u_int32_t sfl } /* FALLTHROUGH */ default: - return (cam_periph_error(ccb, cflgs, sflgs, &softc->saved_ccb)); + return (cam_periph_error(ccb, cflgs, sflgs)); } /* Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/scsi/scsi_sg.c Wed Dec 6 00:29:50 2017 (r326606) @@ -943,8 +943,7 @@ sgerror(union ccb *ccb, uint32_t cam_flags, uint32_t s periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct sg_softc *)periph->softc; - return (cam_periph_error(ccb, cam_flags, sense_flags, - &softc->saved_ccb)); + return (cam_periph_error(ccb, cam_flags, sense_flags)); } static void Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Wed Dec 6 00:29:43 2017 (r326605) +++ head/sys/cam/scsi/scsi_xpt.c Wed Dec 6 00:29:50 2017 (r326606) @@ -1180,8 +1180,8 @@ probedone(struct cam_periph *periph, union ccb *done_c { if (cam_ccb_status(done_ccb) != CAM_REQ_CMP) { - if (cam_periph_error(done_ccb, 0, - SF_NO_PRINT, NULL) == ERESTART) { + if (cam_periph_error(done_ccb, 0, SF_NO_PRINT) == + ERESTART) { outr: /* Drop freeze taken due to CAM_DEV_QFREEZE */ cam_release_devq(path, 0, 0, 0, FALSE); @@ -1278,8 +1278,7 @@ out: } else if (cam_periph_error(done_ccb, 0, done_ccb->ccb_h.target_lun > 0 ? SF_RETRY_UA|SF_QUIET_IR - : SF_RETRY_UA, - &softc->saved_ccb) == ERESTART) { + : SF_RETRY_UA) == ERESTART) { goto outr; } else { if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { @@ -1321,9 +1320,9 @@ out: if (cam_ccb_status(done_ccb) != CAM_REQ_CMP) { if (cam_periph_error(done_ccb, 0, - done_ccb->ccb_h.target_lun > 0 ? - SF_RETRY_UA|SF_QUIET_IR : SF_RETRY_UA, - &softc->saved_ccb) == ERESTART) { + done_ccb->ccb_h.target_lun > 0 ? + SF_RETRY_UA|SF_QUIET_IR : SF_RETRY_UA) == + ERESTART) { goto outr; } if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { @@ -1427,8 +1426,7 @@ out: page = (struct scsi_control_page *)offset; path->device->queue_flags = page->queue_flags; } else if (cam_periph_error(done_ccb, 0, - SF_RETRY_UA|SF_NO_PRINT, - &softc->saved_ccb) == ERESTART) { + SF_RETRY_UA|SF_NO_PRINT) == ERESTART) { goto outr; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ @@ -1470,8 +1468,7 @@ out: xpt_schedule(periph, priority); goto out; } else if (cam_periph_error(done_ccb, 0, - SF_RETRY_UA|SF_NO_PRINT, - &softc->saved_ccb) == ERESTART) { + SF_RETRY_UA|SF_NO_PRINT) == ERESTART) { goto outr; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ @@ -1515,8 +1512,7 @@ out: path->device->device_id = (uint8_t *)devid; } } else if (cam_periph_error(done_ccb, 0, - SF_RETRY_UA, - &softc->saved_ccb) == ERESTART) { + SF_RETRY_UA) == ERESTART) { goto outr; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ @@ -1558,9 +1554,8 @@ out: path->device->ext_inq_len = length; path->device->ext_inq = (uint8_t *)ext_inq; } - } else if (cam_periph_error(done_ccb, 0, - SF_RETRY_UA, - &softc->saved_ccb) == ERESTART) { + } else if (cam_periph_error(done_ccb, 0, SF_RETRY_UA) == + ERESTART) { goto outr; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ @@ -1623,8 +1618,7 @@ probe_device_check: path->device->serial_num[slen] = '\0'; } } else if (cam_periph_error(done_ccb, 0, - SF_RETRY_UA|SF_NO_PRINT, - &softc->saved_ccb) == ERESTART) { + SF_RETRY_UA|SF_NO_PRINT) == ERESTART) { goto outr; } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ @@ -1693,7 +1687,7 @@ probe_device_check: case PROBE_DV_EXIT: if (cam_ccb_status(done_ccb) != CAM_REQ_CMP) { cam_periph_error(done_ccb, 0, - SF_NO_PRINT | SF_NO_RECOVERY | SF_NO_RETRY, NULL); + SF_NO_PRINT | SF_NO_RECOVERY | SF_NO_RETRY); } if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ @@ -1744,7 +1738,7 @@ probe_device_check: if (cam_ccb_status(done_ccb) != CAM_REQ_CMP) { cam_periph_error(done_ccb, 0, - SF_NO_PRINT | SF_NO_RECOVERY | SF_NO_RETRY, NULL); + SF_NO_PRINT | SF_NO_RECOVERY | SF_NO_RETRY); } if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ From owner-svn-src-head@freebsd.org Wed Dec 6 00:42:10 2017 Return-Path: Delivered-To: svn-src-head@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 107D9E89461; Wed, 6 Dec 2017 00:42:10 +0000 (UTC) (envelope-from glebius@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 DEC117B1A4; Wed, 6 Dec 2017 00:42:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB60g9PY003154; Wed, 6 Dec 2017 00:42:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB60g83H003150; Wed, 6 Dec 2017 00:42:08 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201712060042.vB60g83H003150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 6 Dec 2017 00:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326607 - head/sys/fs/tmpfs X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/fs/tmpfs X-SVN-Commit-Revision: 326607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 00:42:10 -0000 Author: glebius Date: Wed Dec 6 00:42:08 2017 New Revision: 326607 URL: https://svnweb.freebsd.org/changeset/base/326607 Log: Reduce pollution via tmpfs.h. Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Wed Dec 6 00:29:50 2017 (r326606) +++ head/sys/fs/tmpfs/tmpfs.h Wed Dec 6 00:42:08 2017 (r326607) @@ -37,22 +37,13 @@ #ifndef _FS_TMPFS_TMPFS_H_ #define _FS_TMPFS_TMPFS_H_ -#include -#include #include -#include -#include -#include -#include - -#include -#include #include -#include -#include +#ifdef _SYS_MALLOC_H_ MALLOC_DECLARE(M_TMPFSMNT); MALLOC_DECLARE(M_TMPFSNAME); +#endif /* * Internal representation of a tmpfs directory entry. Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Wed Dec 6 00:29:50 2017 (r326606) +++ head/sys/fs/tmpfs/tmpfs_subr.c Wed Dec 6 00:42:08 2017 (r326607) @@ -39,8 +39,11 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include +#include +#include #include #include #include @@ -59,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Dec 6 00:29:50 2017 (r326606) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Dec 6 00:42:08 2017 (r326607) @@ -46,8 +46,10 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include +#include #include #include #include @@ -56,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Wed Dec 6 00:29:50 2017 (r326606) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Wed Dec 6 00:42:08 2017 (r326607) @@ -39,9 +39,11 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include +#include #include #include #include From owner-svn-src-head@freebsd.org Wed Dec 6 00:44:50 2017 Return-Path: Delivered-To: svn-src-head@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 857F7E8959D; Wed, 6 Dec 2017 00:44:50 +0000 (UTC) (envelope-from glebius@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 5277D7B3B5; Wed, 6 Dec 2017 00:44:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB60invn003312; Wed, 6 Dec 2017 00:44:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB60inRf003311; Wed, 6 Dec 2017 00:44:49 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201712060044.vB60inRf003311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 6 Dec 2017 00:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326608 - head/sys/fs/tmpfs X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/fs/tmpfs X-SVN-Commit-Revision: 326608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 00:44:50 -0000 Author: glebius Date: Wed Dec 6 00:44:49 2017 New Revision: 326608 URL: https://svnweb.freebsd.org/changeset/base/326608 Log: Fix file missed in r326607. Modified: head/sys/fs/tmpfs/tmpfs_fifoops.c Modified: head/sys/fs/tmpfs/tmpfs_fifoops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_fifoops.c Wed Dec 6 00:42:08 2017 (r326607) +++ head/sys/fs/tmpfs/tmpfs_fifoops.c Wed Dec 6 00:44:49 2017 (r326608) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include From owner-svn-src-head@freebsd.org Wed Dec 6 01:01:56 2017 Return-Path: Delivered-To: svn-src-head@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 C0CEBE89E92 for ; Wed, 6 Dec 2017 01:01:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1.freebsd.org (Postfix) with SMTP id 8E5ED7BDE6 for ; Wed, 6 Dec 2017 01:01:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: (qmail 37411 invoked by uid 99); 6 Dec 2017 01:01:55 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2017 01:01:55 +0000 Received: from [192.168.0.8] (unknown [186.80.205.98]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 060071A0158; Wed, 6 Dec 2017 01:01:51 +0000 (UTC) From: Pedro Giffuni Message-Id: <4FE900E7-10E6-4909-BB4A-C5E6F83FF515@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: svn commit: r326554 - in head: . usr.bin/spongeusr.bin/sponge/tests usr.bin/tee Date: Tue, 5 Dec 2017 20:01:46 -0500 In-Reply-To: <20171205171721.73E1C2D8@spqr.komquats.com> Cc: Devin Teske , Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" To: Cy Schubert References: <20171205171721.73E1C2D8@spqr.komquats.com> X-Mailer: Apple Mail (2.3445.4.7) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 01:01:56 -0000 Hello; > On Dec 5, 2017, at 12:17, Cy Schubert = wrote: >=20 > What side effects? Can you give one or two examples, please? >=20 Sorry, I forgot the details .. but I am pretty sure there was exp-run = and breakage in the ports tree. Pedro. > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > This old phone only supports top post. Apologies. >=20 > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- > From: Pedro Giffuni > Sent: 05/12/2017 08:40 > To: Cy Schubert; Devin Teske; Hans Petter Selasky > Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; = svn-src-all@freebsd.org; svn-src-head@freebsd.org > Subject: Re: svn commit: r326554 - in head: . = usr.bin/spongeusr.bin/sponge/tests usr.bin/tee >=20 >=20 > On 05/12/2017 11:29, Cy Schubert wrote: >> Why not update sed to create the backup file only if the suffix is = given to -i, like gnu sed does. >>=20 >=20 > No, no .. there have been several failed attempts at that that cause = nasty side effects. > It is also a rather non-standardish thing to do. >=20 > Pedro. >=20 >> --- >> Sent using a tiny phone keyboard. >> Apologies for any typos and autocorrect. >> This old phone only supports top post. Apologies. >>=20 >> Cy Schubert >> or = >> The need of the many outweighs the greed of the few. >> --- >> From: Devin Teske >> Sent: 05/12/2017 07:35 >> To: Hans Petter Selasky >> Cc: rgrimes@freebsd.org ; cem@freebsd.org = ; Eitan Adler; src-committers; = svn-src-all@freebsd.org ; = svn-src-head@freebsd.org >> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge = usr.bin/sponge/tests usr.bin/tee >>=20 >>=20 >> > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky = wrote: >> >=20 >> >> On 12/05/17 13:58, Rodney W. Grimes wrote: >> >> Further more, why does freebsd need this in base? >> >=20 >> > Hi, >> >=20 >> > I think this is useful. It could replace the "-i " (intermediate) = option for "sed" for example. It avoids creating temporary files when = filtering files, right? >> >=20 >> > --HPS >> >=20 >>=20 >> Wth is wrong with: >>=20 >> data=3D$( sed -e '...' somefile ) && >> =C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD= =C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD echo "$data" > = somefile >>=20 >> or >>=20 >> set -e >> data=3D... >> echo "$data" > ... >>=20 >> or >>=20 >> exec 3<> $( ... ) >> EOF >> cat > ... <&3 >>=20 >> or >>=20 >> (I digress) >>=20 >> Infinite variations, but the gist is that sponge looks to be trying = to help sh(1)/similar when help is unneeded. >>=20 >> Why buffer data into memory via fork-exec-pipe to sponge when you can = buffer to native namespace without pipe to sponge? >>=20 >> Am I missing something? Why do we need sponge(1)? >> --=20 >> Devin >>=20 >=20 From owner-svn-src-head@freebsd.org Wed Dec 6 01:17:30 2017 Return-Path: Delivered-To: svn-src-head@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 2BBB0E8A5F7; Wed, 6 Dec 2017 01:17:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) (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 9F5857C5C9; Wed, 6 Dec 2017 01:17:29 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f50.google.com with SMTP id 68so5196640ite.4; Tue, 05 Dec 2017 17:17:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=QqLCxn6qPBtYVRht5fBLO6r+HroTRgudmgGx6DhgMOc=; b=W7WohaKjXmRNzOdZfkbFZIf5/gt3oA5zTJGpfvAi1t35bUWxXWhOxTRPabL6XAuf1+ YJhuwYlvNeZvlh3QXTAHsgmPjIE6bP/+Lm7FbE4cx+rL1tGgAKb44hjIouFSTKSkXQax vlRCR8xFdbvvjwBFbT1PhYksJ84EBA205zKERFRiRQT+ZR7mHato1EFwNO+wqqKAA5C0 9swuZrrG5WTEYhH9lVAI2k376W9idqkmMLncnffPULUf/GOX0G2TfDEmyettLqYoAIVc rP2boaa/wEz4yKWIFMQUO7Oa9M7xkrwcK63BrHf4do2Y5Fm7DKCuC92X1U+MBQW6/Iz9 fjTA== X-Gm-Message-State: AKGB3mJO3wSFOzJkBnvLR+GvxgRSn1d8vtUxK8iH9xSuBxv4OG6AnbWZ doHBBrzqdxfmwFYaENhKqMCkjjMN X-Google-Smtp-Source: AGs4zMYEdAeD1sR/w9x+N+wjwPK4C0i5MOrp0GVRYJwdT8nqfaFNl+wGNnjrHFGQd6O+250lQ+W1qA== X-Received: by 10.36.22.10 with SMTP id a10mr11771551ita.39.1512523043481; Tue, 05 Dec 2017 17:17:23 -0800 (PST) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com. [209.85.223.178]) by smtp.gmail.com with ESMTPSA id o71sm809452itc.30.2017.12.05.17.17.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 17:17:23 -0800 (PST) Received: by mail-io0-f178.google.com with SMTP id d16so846302iob.4; Tue, 05 Dec 2017 17:17:23 -0800 (PST) X-Received: by 10.107.158.193 with SMTP id h184mr31562613ioe.256.1512523042980; Tue, 05 Dec 2017 17:17:22 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Tue, 5 Dec 2017 17:17:22 -0800 (PST) In-Reply-To: References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> From: Conrad Meyer Date: Tue, 5 Dec 2017 17:17:22 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r316980 - head/contrib/zstd/programs To: Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 01:17:30 -0000 Ping. Please revert this change. If you want zstd to behave this way, pursue it upstream first. Thanks, Conrad On Wed, Nov 15, 2017 at 7:38 PM, Conrad Meyer wrote: > Please revert this change. > > First, it introduces the POLA-violating behavior that zstdcat deletes > its source files. This is not how zcat/bzcat behaves. > > Second, it introduces a needless behavioral difference between FreeBSD > zstd and the rest of the world's zstd. The zstd documentation we ship > continues to claim that zstd preserves source files by default, yet > this change makes that documentation exactly backwards. While we can > change FreeBSD's documentation to accommodate the change, we can't > change Google results. > > Thanks, > Conrad > > On Sat, Apr 15, 2017 at 1:15 PM, Baptiste Daroussin wrote: >> Author: bapt >> Date: Sat Apr 15 20:15:44 2017 >> New Revision: 316980 >> URL: https://svnweb.freebsd.org/changeset/base/316980 >> >> Log: >> Change some default to make zstd a dropin replacement for gzip,bzip etc >> in most cases >> >> Changes ares: >> - quiet by default >> - remove the source files one compression completion by default >> >> Modified: >> head/contrib/zstd/programs/fileio.c >> head/contrib/zstd/programs/zstdcli.c >> >> Modified: head/contrib/zstd/programs/fileio.c >> ============================================================================== >> --- head/contrib/zstd/programs/fileio.c Sat Apr 15 20:06:24 2017 (r316979) >> +++ head/contrib/zstd/programs/fileio.c Sat Apr 15 20:15:44 2017 (r316980) >> @@ -138,7 +138,7 @@ static U32 g_dictIDFlag = 1; >> void FIO_setDictIDFlag(unsigned dictIDFlag) { g_dictIDFlag = dictIDFlag; } >> static U32 g_checksumFlag = 1; >> void FIO_setChecksumFlag(unsigned checksumFlag) { g_checksumFlag = checksumFlag; } >> -static U32 g_removeSrcFile = 0; >> +static U32 g_removeSrcFile = 1; >> void FIO_setRemoveSrcFile(unsigned flag) { g_removeSrcFile = (flag>0); } >> static U32 g_memLimit = 0; >> void FIO_setMemLimit(unsigned memLimit) { g_memLimit = memLimit; } >> >> Modified: head/contrib/zstd/programs/zstdcli.c >> ============================================================================== >> --- head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:06:24 2017 (r316979) >> +++ head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:15:44 2017 (r316980) >> @@ -61,7 +61,7 @@ >> #define MB *(1 <<20) >> #define GB *(1U<<30) >> >> -#define DEFAULT_DISPLAY_LEVEL 2 >> +#define DEFAULT_DISPLAY_LEVEL 1 >> >> static const char* g_defaultDictName = "dictionary"; >> static const unsigned g_defaultMaxDictSize = 110 KB; >> From owner-svn-src-head@freebsd.org Wed Dec 6 01:42:21 2017 Return-Path: Delivered-To: svn-src-head@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 C559DE8AF01; Wed, 6 Dec 2017 01:42:21 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 5DAFE7D0C6; Wed, 6 Dec 2017 01:42:21 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id C9E6714115; Wed, 6 Dec 2017 01:42:19 +0000 (UTC) Subject: Re: svn commit: r316980 - head/contrib/zstd/programs To: cem@freebsd.org, Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> From: Allan Jude Message-ID: <89b00017-aa92-66ca-5a28-47f0eb8f399b@freebsd.org> Date: Tue, 5 Dec 2017 20:42:11 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDoRcaoxkuIdAdpg2aaiVWDTSSqBnR7dH" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 01:42:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dDoRcaoxkuIdAdpg2aaiVWDTSSqBnR7dH Content-Type: multipart/mixed; boundary="D4rRGiNoViBIo1IUkF4sAuODgCglEDsRm"; protected-headers="v1" From: Allan Jude To: cem@freebsd.org, Baptiste Daroussin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <89b00017-aa92-66ca-5a28-47f0eb8f399b@freebsd.org> Subject: Re: svn commit: r316980 - head/contrib/zstd/programs References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> In-Reply-To: --D4rRGiNoViBIo1IUkF4sAuODgCglEDsRm Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2017-12-05 20:17, Conrad Meyer wrote: > Ping. Please revert this change. If you want zstd to behave this > way, pursue it upstream first. >=20 > Thanks, > Conrad >=20 > On Wed, Nov 15, 2017 at 7:38 PM, Conrad Meyer wrote: >> Please revert this change. >> >> First, it introduces the POLA-violating behavior that zstdcat deletes >> its source files. This is not how zcat/bzcat behaves. >> >> Second, it introduces a needless behavioral difference between FreeBSD= >> zstd and the rest of the world's zstd. The zstd documentation we ship= >> continues to claim that zstd preserves source files by default, yet >> this change makes that documentation exactly backwards. While we can >> change FreeBSD's documentation to accommodate the change, we can't >> change Google results. >> >> Thanks, >> Conrad >> >> On Sat, Apr 15, 2017 at 1:15 PM, Baptiste Daroussin = wrote: >>> Author: bapt >>> Date: Sat Apr 15 20:15:44 2017 >>> New Revision: 316980 >>> URL: https://svnweb.freebsd.org/changeset/base/316980 >>> >>> Log: >>> Change some default to make zstd a dropin replacement for gzip,bzip= etc >>> in most cases >>> >>> Changes ares: >>> - quiet by default >>> - remove the source files one compression completion by default >>> >>> Modified: >>> head/contrib/zstd/programs/fileio.c >>> head/contrib/zstd/programs/zstdcli.c >>> >>> Modified: head/contrib/zstd/programs/fileio.c >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>> --- head/contrib/zstd/programs/fileio.c Sat Apr 15 20:06:24 2017 = (r316979) >>> +++ head/contrib/zstd/programs/fileio.c Sat Apr 15 20:15:44 2017 = (r316980) >>> @@ -138,7 +138,7 @@ static U32 g_dictIDFlag =3D 1; >>> void FIO_setDictIDFlag(unsigned dictIDFlag) { g_dictIDFlag =3D dictI= DFlag; } >>> static U32 g_checksumFlag =3D 1; >>> void FIO_setChecksumFlag(unsigned checksumFlag) { g_checksumFlag =3D= checksumFlag; } >>> -static U32 g_removeSrcFile =3D 0; >>> +static U32 g_removeSrcFile =3D 1; >>> void FIO_setRemoveSrcFile(unsigned flag) { g_removeSrcFile =3D (flag= >0); } >>> static U32 g_memLimit =3D 0; >>> void FIO_setMemLimit(unsigned memLimit) { g_memLimit =3D memLimit; }= >>> >>> Modified: head/contrib/zstd/programs/zstdcli.c >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>> --- head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:06:24 2= 017 (r316979) >>> +++ head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:15:44 2= 017 (r316980) >>> @@ -61,7 +61,7 @@ >>> #define MB *(1 <<20) >>> #define GB *(1U<<30) >>> >>> -#define DEFAULT_DISPLAY_LEVEL 2 >>> +#define DEFAULT_DISPLAY_LEVEL 1 >>> >>> static const char* g_defaultDictName =3D "dictionary"; >>> static const unsigned g_defaultMaxDictSize =3D 110 KB; >>> >=20 Upstream recommends we create an additional hardlink, called 'zz' (like xz but zstd), to do such compatibility, and keep 'zstd' the same as zstd on every other distro. --=20 Allan Jude --D4rRGiNoViBIo1IUkF4sAuODgCglEDsRm-- --dDoRcaoxkuIdAdpg2aaiVWDTSSqBnR7dH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJaJ0r7AAoJEBmVNT4SmAt+OEEP/R0ScQayJ4evMsZYY0+w3naW XeQaNGTDpx4Cmepn1hfFD4nx2uOlMrlvlSpTKoCovEyB9D0kVaSbiO5/xYKayg2K pLcdaWWV+3+Fj1Lfryqt90eAzUNZFjg2T9eIHj80UyUHwbZ4cEHXqaFaDQW6X4yx 62ARgnQosCv8M0yeZIEU2F4ifkft20bVLlWOm5J5BlHC3GHB80wKb9uZe6idM78E BIhMCuge/GOokXyDe3qS7iKvrtuhV9AnsaWWX0VprCR1p9kI+fAjy40f/2WOSlEB RBU+Wt1ilbgXbTEOKB7j6P2epkxYoYA+Quky1ToEqE/5mMMHylnws7Fg3jZMVfAJ Oh3hgln8waOZrrf9Rke1XSq12ket/xzSblZle3MfNI3jvYAPBLD1nq4zErqS+5cv Te1FB2S5H4XhEgAtdTZWT9oBk0Vq+JMwHqFepG7KO4SP08kRmn47TajUR1bo8Hm5 BSvjTpF233fHl2EUjEnVSpWk0kh9Z/nrp/ogodHJAkXO8PJl0d8o+qRQ02nffaeU +6HGon0DpCD++i+KSEBS14IQMjDCmW3XOFitr28LX9K7HeoDgs1hV5mzi/2XXDEq tRlxvhR5C0TujR1C7Tpyr+T9Fba3fEfu9PNfy/qMkvFk+Hi5TFRFOEni4z1ye3el OxswnhR5OVAoZLuYQFsG =ouH2 -----END PGP SIGNATURE----- --dDoRcaoxkuIdAdpg2aaiVWDTSSqBnR7dH-- From owner-svn-src-head@freebsd.org Wed Dec 6 02:00:02 2017 Return-Path: Delivered-To: svn-src-head@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 48FB1E8B8CA; Wed, 6 Dec 2017 02:00:02 +0000 (UTC) (envelope-from imp@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 229487D993; Wed, 6 Dec 2017 02:00:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6201Wq032294; Wed, 6 Dec 2017 02:00:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB620059032287; Wed, 6 Dec 2017 02:00:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712060200.vB620059032287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 6 Dec 2017 02:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326609 - in head: stand/libsa stand/userboot stand/userboot/test stand/userboot/userboot usr.sbin/bhyveload X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: stand/libsa stand/userboot stand/userboot/test stand/userboot/userboot usr.sbin/bhyveload X-SVN-Commit-Revision: 326609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 02:00:02 -0000 Author: imp Date: Wed Dec 6 02:00:00 2017 New Revision: 326609 URL: https://svnweb.freebsd.org/changeset/base/326609 Log: Make putenv and getenv match the userland definition of these functions, tweak man page and one variable that shouldn't be const anymore. Sponsored by: Netflix Modified: head/stand/libsa/environment.c head/stand/libsa/libstand.3 head/stand/libsa/stand.h head/stand/userboot/test/test.c head/stand/userboot/userboot.h head/stand/userboot/userboot/main.c head/usr.sbin/bhyveload/bhyveload.c Modified: head/stand/libsa/environment.c ============================================================================== --- head/stand/libsa/environment.c Wed Dec 6 00:44:49 2017 (r326608) +++ head/stand/libsa/environment.c Wed Dec 6 02:00:00 2017 (r326609) @@ -162,7 +162,7 @@ setenv(const char *name, const char *value, int overwr } int -putenv(const char *string) +putenv(char *string) { char *value, *copy; int result; Modified: head/stand/libsa/libstand.3 ============================================================================== --- head/stand/libsa/libstand.3 Wed Dec 6 00:44:49 2017 (r326608) +++ head/stand/libsa/libstand.3 Wed Dec 6 02:00:00 2017 (r326609) @@ -110,7 +110,7 @@ for set/unset hook functions. .Xc .It Xo .Ft int -.Fn putenv "const char *string" +.Fn putenv "char *string" .Xc .It Xo .Ft int Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Wed Dec 6 00:44:49 2017 (r326608) +++ head/stand/libsa/stand.h Wed Dec 6 02:00:00 2017 (r326609) @@ -330,7 +330,7 @@ extern int env_setenv(const char *name, int flags, extern char *getenv(const char *name); extern int setenv(const char *name, const char *value, int overwrite); -extern int putenv(const char *string); +extern int putenv(char *string); extern int unsetenv(const char *name); extern ev_sethook_t env_noset; /* refuse set operation */ Modified: head/stand/userboot/test/test.c ============================================================================== --- head/stand/userboot/test/test.c Wed Dec 6 00:44:49 2017 (r326608) +++ head/stand/userboot/test/test.c Wed Dec 6 02:00:00 2017 (r326609) @@ -367,10 +367,10 @@ test_getmem(void *arg, uint64_t *lowmem, uint64_t *hig *highmem = 0; } -const char * +char * test_getenv(void *arg, int idx) { - static const char *vars[] = { + static char *vars[] = { "foo=bar", "bar=barbar", NULL Modified: head/stand/userboot/userboot.h ============================================================================== --- head/stand/userboot/userboot.h Wed Dec 6 00:44:49 2017 (r326608) +++ head/stand/userboot/userboot.h Wed Dec 6 02:00:00 2017 (r326609) @@ -202,7 +202,7 @@ struct loader_callbacks { * environment variable to return next. It will begin at 0 and * each invocation will add 1 to the previous value of 'num'. */ - const char * (*getenv)(void *arg, int num); + char * (*getenv)(void *arg, int num); /* * Version 4 additions. Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Wed Dec 6 00:44:49 2017 (r326608) +++ head/stand/userboot/userboot/main.c Wed Dec 6 02:00:00 2017 (r326609) @@ -78,7 +78,7 @@ void loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks) { static char mallocbuf[MALLOCSZ]; - const char *var; + char *var; int i; if (version < USERBOOT_VERSION) Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Wed Dec 6 00:44:49 2017 (r326608) +++ head/usr.sbin/bhyveload/bhyveload.c Wed Dec 6 02:00:00 2017 (r326609) @@ -529,7 +529,7 @@ addenv(const char *str) SLIST_INSERT_HEAD(&envhead, env, next); } -static const char * +static char * cb_getenv(void *arg, int num) { int i; From owner-svn-src-head@freebsd.org Wed Dec 6 02:00:11 2017 Return-Path: Delivered-To: svn-src-head@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 A02A1E8B90E; Wed, 6 Dec 2017 02:00:11 +0000 (UTC) (envelope-from imp@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 23F967DA49; Wed, 6 Dec 2017 02:00:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6209Kp032348; Wed, 6 Dec 2017 02:00:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6209Yf032347; Wed, 6 Dec 2017 02:00:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712060200.vB6209Yf032347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 6 Dec 2017 02:00:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326610 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 02:00:11 -0000 Author: imp Date: Wed Dec 6 02:00:09 2017 New Revision: 326610 URL: https://svnweb.freebsd.org/changeset/base/326610 Log: Fix random() prototype to match the system. Sponsored by: Netflix Modified: head/stand/libsa/stand.h Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Wed Dec 6 02:00:00 2017 (r326609) +++ head/stand/libsa/stand.h Wed Dec 6 02:00:09 2017 (r326610) @@ -282,7 +282,7 @@ extern ssize_t write(int, void *, size_t); extern struct dirent *readdirfd(int); extern void srandom(unsigned int); -extern u_long random(void); +extern long random(void); /* imports from stdlib, locally modified */ extern long strtol(const char *, char **, int); From owner-svn-src-head@freebsd.org Wed Dec 6 02:05:22 2017 Return-Path: Delivered-To: svn-src-head@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 7EF78E8BC98; Wed, 6 Dec 2017 02:05:22 +0000 (UTC) (envelope-from jhibbits@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 4BF807E030; Wed, 6 Dec 2017 02:05:22 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB625LQ2036355; Wed, 6 Dec 2017 02:05:21 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB625Lps036354; Wed, 6 Dec 2017 02:05:21 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201712060205.vB625Lps036354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 6 Dec 2017 02:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326611 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 326611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 02:05:22 -0000 Author: jhibbits Date: Wed Dec 6 02:05:21 2017 New Revision: 326611 URL: https://svnweb.freebsd.org/changeset/base/326611 Log: Use unsigned intptr_t type for framebuffer addresses Summary: Some architectures (powerpc Book-E) have a vm_paddr_t larger than intptr_t. Casting from the intptr_t to vm_paddr_t causes sign extension, leading to a potentially invalid address. This was seen when running X on a PowerPC P1022 machine, which mapped the backing framebuffer at 0xc1800000. When mmap()d by X, this yielded an invalid address of 0xffffffffc1800000, or, as the hardware would see it, 0xfc1800000. Reviewed By: ray Differential Revision: https://reviews.freebsd.org/D13332 Modified: head/sys/sys/fbio.h Modified: head/sys/sys/fbio.h ============================================================================== --- head/sys/sys/fbio.h Wed Dec 6 02:00:09 2017 (r326610) +++ head/sys/sys/fbio.h Wed Dec 6 02:05:21 2017 (r326611) @@ -136,8 +136,8 @@ struct fb_info { fb_leave_t *leave; fb_setblankmode_t *setblankmode; - intptr_t fb_pbase; /* For FB mmap. */ - intptr_t fb_vbase; /* if NULL, use fb_write/fb_read. */ + uintptr_t fb_pbase; /* For FB mmap. */ + uintptr_t fb_vbase; /* if NULL, use fb_write/fb_read. */ void *fb_priv; /* First argument for read/write. */ const char *fb_name; uint32_t fb_flags; From owner-svn-src-head@freebsd.org Wed Dec 6 02:06:16 2017 Return-Path: Delivered-To: svn-src-head@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 213A0E8BD31; Wed, 6 Dec 2017 02:06:16 +0000 (UTC) (envelope-from jhibbits@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 E1FF57E193; Wed, 6 Dec 2017 02:06:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB626Fxp036433; Wed, 6 Dec 2017 02:06:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB626Fn8036432; Wed, 6 Dec 2017 02:06:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201712060206.vB626Fn8036432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 6 Dec 2017 02:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326612 - head/sys/dev/vt/hw/fb X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/vt/hw/fb X-SVN-Commit-Revision: 326612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 02:06:16 -0000 Author: jhibbits Date: Wed Dec 6 02:06:14 2017 New Revision: 326612 URL: https://svnweb.freebsd.org/changeset/base/326612 Log: Allow custom overrides of mmap attribute for VT framebuffer Summary: As in /dev/fb, allow the framebuffer driver to override the default memattr for mmap(2). This is analogous to the change in 306555. Reviewed By: ray Differential Revision: https://reviews.freebsd.org/D13331 Modified: head/sys/dev/vt/hw/fb/vt_fb.c Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Wed Dec 6 02:05:21 2017 (r326611) +++ head/sys/dev/vt/hw/fb/vt_fb.c Wed Dec 6 02:06:14 2017 (r326612) @@ -143,8 +143,11 @@ vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, *paddr = vtophys((uint8_t *)info->fb_vbase + offset); } else { *paddr = info->fb_pbase + offset; + if (info->fb_flags & FB_FLAG_MEMATTR) + *memattr = info->fb_memattr; #ifdef VM_MEMATTR_WRITE_COMBINING - *memattr = VM_MEMATTR_WRITE_COMBINING; + else + *memattr = VM_MEMATTR_WRITE_COMBINING; #endif } return (0); From owner-svn-src-head@freebsd.org Wed Dec 6 02:21:14 2017 Return-Path: Delivered-To: svn-src-head@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 8D0E8E8C685; Wed, 6 Dec 2017 02:21:14 +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 1EC9C7E8A6; Wed, 6 Dec 2017 02:21:14 +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 vB62LDmb042787; Wed, 6 Dec 2017 02:21:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB62LBSK042767; Wed, 6 Dec 2017 02:21:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712060221.vB62LBSK042767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Dec 2017 02:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326613 - head/contrib/tcpdump X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/tcpdump X-SVN-Commit-Revision: 326613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 02:21:14 -0000 Author: emaste Date: Wed Dec 6 02:21:11 2017 New Revision: 326613 URL: https://svnweb.freebsd.org/changeset/base/326613 Log: Update tcpdump to 4.9.2 It contains many fixes, including bounds checking, buffer overflows (in SLIP and bittok2str_internal), buffer over-reads, and infinite loops. One other notable change: Do not use getprotobynumber() for protocol name resolution. Do not do any protocol name resolution if -n is specified. Submitted by: gordon Reviewed by: delphij, emaste, glebius MFC after: 1 week Relnotes: Yes Security: CVE-2017-11108, CVE-2017-11541, CVE-2017-11542 Security: CVE-2017-11543, CVE-2017-12893, CVE-2017-12894 Security: CVE-2017-12895, CVE-2017-12896, CVE-2017-12897 Security: CVE-2017-12898, CVE-2017-12899, CVE-2017-12900 Security: CVE-2017-12901, CVE-2017-12902, CVE-2017-12985 Security: CVE-2017-12986, CVE-2017-12987, CVE-2017-12988 Security: CVE-2017-12989, CVE-2017-12990, CVE-2017-12991 Security: CVE-2017-12992, CVE-2017-12993, CVE-2017-12994 Security: CVE-2017-12995, CVE-2017-12996, CVE-2017-12997 Security: CVE-2017-12998, CVE-2017-12999, CVE-2017-13000 Security: CVE-2017-13001, CVE-2017-13002, CVE-2017-13003 Security: CVE-2017-13004, CVE-2017-13005, CVE-2017-13006 Security: CVE-2017-13007, CVE-2017-13008, CVE-2017-13009 Security: CVE-2017-13010, CVE-2017-13011, CVE-2017-13012 Security: CVE-2017-13013, CVE-2017-13014, CVE-2017-13015 Security: CVE-2017-13016, CVE-2017-13017, CVE-2017-13018 Security: CVE-2017-13019, CVE-2017-13020, CVE-2017-13021 Security: CVE-2017-13022, CVE-2017-13023, CVE-2017-13024 Security: CVE-2017-13025, CVE-2017-13026, CVE-2017-13027 Security: CVE-2017-13028, CVE-2017-13029, CVE-2017-13030 Security: CVE-2017-13031, CVE-2017-13032, CVE-2017-13033 Security: CVE-2017-13034, CVE-2017-13035, CVE-2017-13036 Security: CVE-2017-13037, CVE-2017-13038, CVE-2017-13039 Security: CVE-2017-13040, CVE-2017-13041, CVE-2017-13042 Security: CVE-2017-13043, CVE-2017-13044, CVE-2017-13045 Security: CVE-2017-13046, CVE-2017-13047, CVE-2017-13048 Security: CVE-2017-13049, CVE-2017-13050, CVE-2017-13051 Security: CVE-2017-13052, CVE-2017-13053, CVE-2017-13054 Security: CVE-2017-13055, CVE-2017-13687, CVE-2017-13688 Security: CVE-2017-13689, CVE-2017-13690, CVE-2017-13725 Differential Revision: https://reviews.freebsd.org/D12404 Added: head/contrib/tcpdump/funcattrs.h - copied unchanged from r323696, vendor/tcpdump/dist/funcattrs.h Modified: head/contrib/tcpdump/CHANGES head/contrib/tcpdump/CONTRIBUTING head/contrib/tcpdump/CREDITS head/contrib/tcpdump/INSTALL.txt head/contrib/tcpdump/Makefile.in head/contrib/tcpdump/PLATFORMS head/contrib/tcpdump/README.md head/contrib/tcpdump/VERSION head/contrib/tcpdump/addrtoname.c head/contrib/tcpdump/addrtoname.h head/contrib/tcpdump/addrtostr.c head/contrib/tcpdump/af.c head/contrib/tcpdump/af.h head/contrib/tcpdump/checksum.c head/contrib/tcpdump/config.h.in head/contrib/tcpdump/configure head/contrib/tcpdump/configure.in head/contrib/tcpdump/extract.h head/contrib/tcpdump/gmpls.c head/contrib/tcpdump/gmpls.h head/contrib/tcpdump/ip6.h head/contrib/tcpdump/ipproto.c head/contrib/tcpdump/ipproto.h head/contrib/tcpdump/l2vpn.c head/contrib/tcpdump/l2vpn.h head/contrib/tcpdump/netdissect-stdinc.h head/contrib/tcpdump/netdissect.h head/contrib/tcpdump/nlpid.c head/contrib/tcpdump/nlpid.h head/contrib/tcpdump/oui.c head/contrib/tcpdump/oui.h head/contrib/tcpdump/print-802_11.c head/contrib/tcpdump/print-802_15_4.c head/contrib/tcpdump/print-aodv.c head/contrib/tcpdump/print-arp.c head/contrib/tcpdump/print-atm.c head/contrib/tcpdump/print-beep.c head/contrib/tcpdump/print-bfd.c head/contrib/tcpdump/print-bgp.c head/contrib/tcpdump/print-bootp.c head/contrib/tcpdump/print-cfm.c head/contrib/tcpdump/print-chdlc.c head/contrib/tcpdump/print-cnfp.c head/contrib/tcpdump/print-decnet.c head/contrib/tcpdump/print-dhcp6.c head/contrib/tcpdump/print-domain.c head/contrib/tcpdump/print-eap.c head/contrib/tcpdump/print-eigrp.c head/contrib/tcpdump/print-esp.c head/contrib/tcpdump/print-ether.c head/contrib/tcpdump/print-fr.c head/contrib/tcpdump/print-frag6.c head/contrib/tcpdump/print-gre.c head/contrib/tcpdump/print-hncp.c head/contrib/tcpdump/print-icmp.c head/contrib/tcpdump/print-icmp6.c head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-ip6.c head/contrib/tcpdump/print-ip6opts.c head/contrib/tcpdump/print-isakmp.c head/contrib/tcpdump/print-isoclns.c head/contrib/tcpdump/print-juniper.c head/contrib/tcpdump/print-l2tp.c head/contrib/tcpdump/print-ldp.c head/contrib/tcpdump/print-llc.c head/contrib/tcpdump/print-lldp.c head/contrib/tcpdump/print-lmp.c head/contrib/tcpdump/print-lspping.c head/contrib/tcpdump/print-m3ua.c head/contrib/tcpdump/print-mobility.c head/contrib/tcpdump/print-mpcp.c head/contrib/tcpdump/print-mpls.c head/contrib/tcpdump/print-mptcp.c head/contrib/tcpdump/print-nfs.c head/contrib/tcpdump/print-null.c head/contrib/tcpdump/print-olsr.c head/contrib/tcpdump/print-ospf6.c head/contrib/tcpdump/print-pgm.c head/contrib/tcpdump/print-pim.c head/contrib/tcpdump/print-pktap.c head/contrib/tcpdump/print-ppp.c head/contrib/tcpdump/print-radius.c head/contrib/tcpdump/print-resp.c head/contrib/tcpdump/print-ripng.c head/contrib/tcpdump/print-rpki-rtr.c head/contrib/tcpdump/print-rsvp.c head/contrib/tcpdump/print-rt6.c head/contrib/tcpdump/print-rx.c head/contrib/tcpdump/print-sip.c head/contrib/tcpdump/print-sl.c head/contrib/tcpdump/print-slow.c head/contrib/tcpdump/print-stp.c head/contrib/tcpdump/print-syslog.c head/contrib/tcpdump/print-telnet.c head/contrib/tcpdump/print-tftp.c head/contrib/tcpdump/print-vqp.c head/contrib/tcpdump/print-vtp.c head/contrib/tcpdump/print-wb.c head/contrib/tcpdump/print-zephyr.c head/contrib/tcpdump/print.c head/contrib/tcpdump/signature.c head/contrib/tcpdump/signature.h head/contrib/tcpdump/smbutil.c head/contrib/tcpdump/tcpdump.1.in head/contrib/tcpdump/tcpdump.c head/contrib/tcpdump/util-print.c Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/CHANGES ============================================================================== --- head/contrib/tcpdump/CHANGES Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/CHANGES Wed Dec 6 02:21:11 2017 (r326613) @@ -1,10 +1,119 @@ +Sunday September 3, 2017 denis@ovsienko.info + Summary for 4.9.2 tcpdump release + Do not use getprotobynumber() for protocol name resolution. Do not do + any protocol name resolution if -n is specified. + Improve errors detection in the test scripts. + Fix a segfault with OpenSSL 1.1 and improve OpenSSL usage. + Clean up IS-IS printing. + Fix buffer overflow vulnerabilities: + CVE-2017-11543 (SLIP) + CVE-2017-13011 (bittok2str_internal) + Fix infinite loop vulnerabilities: + CVE-2017-12989 (RESP) + CVE-2017-12990 (ISAKMP) + CVE-2017-12995 (DNS) + CVE-2017-12997 (LLDP) + Fix buffer over-read vulnerabilities: + CVE-2017-11541 (safeputs) + CVE-2017-11542 (PIMv1) + CVE-2017-12893 (SMB/CIFS) + CVE-2017-12894 (lookup_bytestring) + CVE-2017-12895 (ICMP) + CVE-2017-12896 (ISAKMP) + CVE-2017-12897 (ISO CLNS) + CVE-2017-12898 (NFS) + CVE-2017-12899 (DECnet) + CVE-2017-12900 (tok2strbuf) + CVE-2017-12901 (EIGRP) + CVE-2017-12902 (Zephyr) + CVE-2017-12985 (IPv6) + CVE-2017-12986 (IPv6 routing headers) + CVE-2017-12987 (IEEE 802.11) + CVE-2017-12988 (telnet) + CVE-2017-12991 (BGP) + CVE-2017-12992 (RIPng) + CVE-2017-12993 (Juniper) + CVE-2017-11542 (PIMv1) + CVE-2017-11541 (safeputs) + CVE-2017-12994 (BGP) + CVE-2017-12996 (PIMv2) + CVE-2017-12998 (ISO IS-IS) + CVE-2017-12999 (ISO IS-IS) + CVE-2017-13000 (IEEE 802.15.4) + CVE-2017-13001 (NFS) + CVE-2017-13002 (AODV) + CVE-2017-13003 (LMP) + CVE-2017-13004 (Juniper) + CVE-2017-13005 (NFS) + CVE-2017-13006 (L2TP) + CVE-2017-13007 (Apple PKTAP) + CVE-2017-13008 (IEEE 802.11) + CVE-2017-13009 (IPv6 mobility) + CVE-2017-13010 (BEEP) + CVE-2017-13012 (ICMP) + CVE-2017-13013 (ARP) + CVE-2017-13014 (White Board) + CVE-2017-13015 (EAP) + CVE-2017-11543 (SLIP) + CVE-2017-13016 (ISO ES-IS) + CVE-2017-13017 (DHCPv6) + CVE-2017-13018 (PGM) + CVE-2017-13019 (PGM) + CVE-2017-13020 (VTP) + CVE-2017-13021 (ICMPv6) + CVE-2017-13022 (IP) + CVE-2017-13023 (IPv6 mobility) + CVE-2017-13024 (IPv6 mobility) + CVE-2017-13025 (IPv6 mobility) + CVE-2017-13026 (ISO IS-IS) + CVE-2017-13027 (LLDP) + CVE-2017-13028 (BOOTP) + CVE-2017-13029 (PPP) + CVE-2017-13030 (PIM) + CVE-2017-13031 (IPv6 fragmentation header) + CVE-2017-13032 (RADIUS) + CVE-2017-13033 (VTP) + CVE-2017-13034 (PGM) + CVE-2017-13035 (ISO IS-IS) + CVE-2017-13036 (OSPFv3) + CVE-2017-13037 (IP) + CVE-2017-13038 (PPP) + CVE-2017-13039 (ISAKMP) + CVE-2017-13040 (MPTCP) + CVE-2017-13041 (ICMPv6) + CVE-2017-13042 (HNCP) + CVE-2017-13043 (BGP) + CVE-2017-13044 (HNCP) + CVE-2017-13045 (VQP) + CVE-2017-13046 (BGP) + CVE-2017-13047 (ISO ES-IS) + CVE-2017-13048 (RSVP) + CVE-2017-13049 (Rx) + CVE-2017-13050 (RPKI-Router) + CVE-2017-13051 (RSVP) + CVE-2017-13052 (CFM) + CVE-2017-13053 (BGP) + CVE-2017-13054 (LLDP) + CVE-2017-13055 (ISO IS-IS) + CVE-2017-13687 (Cisco HDLC) + CVE-2017-13688 (OLSR) + CVE-2017-13689 (IKEv1) + CVE-2017-13690 (IKEv2) + CVE-2017-13725 (IPv6 routing headers) + +Sunday July 23, 2017 denis@ovsienko.info + Summary for 4.9.1 tcpdump release + CVE-2017-11108/Fix bounds checking for STP. + Make assorted documentation updates and fix a few typos in tcpdump output. + Fixup -C for file size >2GB (GH #488). + Show AddressSanitizer presence in version output. + Fix a bug in test scripts (exposed in GH #613). + On FreeBSD adjust Capsicum capabilities for netmap. + On Linux fix a use-after-free when the requested interface does not exist. + Wednesday January 18, 2017 devel.fx.lebail@orange.fr Summary for 4.9.0 tcpdump release General updates: - Improve separation frontend/backend (tcpdump/libnetdissect) - Don't require IPv6 library support in order to support IPv6 addresses - Introduce data types to use for integral values in packet structures - Fix display of timestamps with -tt, -ttt and -ttttt options Fix some heap overflows found with American Fuzzy Lop by Hanno Boeck and others (More information in the log with CVE-2016-* and CVE-2017-*) Change the way protocols print link-layer addresses (Fix heap overflows @@ -35,14 +144,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr Don't drop CAP_SYS_CHROOT before chrooting Fixes issue where statistics not reported when -G and -W options used - New printers supporting: - Generic Protocol Extension for VXLAN (VXLAN-GPE) - Home Networking Control Protocol (HNCP), RFCs 7787 and 7788 - Locator/Identifier Separation Protocol (LISP), type 3 and type 4 packets - Marvell Extended Distributed Switch Architecture header (MEDSA) - Network Service Header (NSH) - REdis Serialization Protocol (RESP) - Updated printers: 802.11: Beginnings of 11ac radiotap support 802.11: Check the Protected bit for management frames @@ -61,7 +162,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr ATM: Fix an incorrect bounds check BFD: Update specification from draft to RFC 5880 BFD: Update to print optional authentication field - BGP: Add decoding of ADD-PATH capability BGP: Add support for the AIGP attribute (RFC7311) BGP: Print LARGE_COMMUNITY Path Attribute BGP: Update BGP numbers from IANA; Print minor values for FSM notification @@ -78,7 +178,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr DTP: Improve packet integrity checks EGP: Fix bounds checks ESP: Don't use OpenSSL_add_all_algorithms() in OpenSSL 1.1.0 or later - ESP: Handle OpenSSL 1.1.x Ethernet: Add some bounds checking before calling isoclns_print (Fix a heap overflow) Ethernet: Print the Length/Type field as length when needed FDDI: Fix -e output for FDDI @@ -87,7 +186,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr Geneve: Fix error message with invalid option length; Update list option classes HNCP: Fix incorrect time interval format. Fix handling of IPv4 prefixes ICMP6: Fetch a 32-bit big-endian quantity with EXTRACT_32BITS() - ICMP6: dagid is always an IPv6 address, not an opaque 128-bit string IGMP: Add a length check IP: Add a bounds check (Fix a heap overflow) IP: Check before fetching the protocol version (Fix a heap overflow) @@ -115,7 +213,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr MPLS LSP ping: Update printing for RFC 4379, bug fixes, more bounds checks MPLS: "length" is now the *remaining* packet length MPLS: Add bounds and length checks (Fix a heap overflow) - NFS: Add a test that makes unaligned accesses NFS: Don't assume the ONC RPC header is nicely aligned NFS: Don't overflow the Opaque_Handle buffer (Fix a segmentation fault) NFS: Don't run past the end of an NFSv3 file handle @@ -130,7 +227,6 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr PGM: Print the formatted IP address, not the raw binary address, as a string PIM: Add some bounds checking (Fix a heap overflow) PIMv2: Fix checksumming of Register messages - PPI: Pass an adjusted struct pcap_pkthdr to the sub-printer PPP: Add some bounds checks (Fix a heap overflow) PPP: Report invalid PAP AACK/ANAK packets Q.933: Add a missing bounds check @@ -171,16 +267,46 @@ Wednesday January 18, 2017 devel.fx.lebail@orange.fr UDLD: Fix an infinite loop UDP: Add a bounds check (Fix a heap overflow) UDP: Check against the packet length first - UDP: Don't do the DDP-over-UDP heuristic check up front VAT: Add some bounds checks VTP: Add a test on Mgmt Domain Name length VTP: Add bounds checks and filter out non-printable characters VXLAN: Add a bound check and a test case ZeroMQ: Fix an infinite loop -Tuesday April 14, 2015 guy@alum.mit.edu - Summary for 4.8.0 tcpdump release +Tuesday October 25, 2016 mcr@sandelman.ca + Summary for 4.8.1 tcpdump release Fix "-x" for Apple PKTAP and PPI packets + Improve separation frontend/backend (tcpdump/libnetdissect) + Fix display of timestamps with -tt, -ttt and -ttttt options + Add support for the Marvell Extended Distributed Switch Architecture header + Use PRIx64 to print a 64-bit number in hex. + Printer for HNCP (RFCs 7787 and 7788). + dagid is always an IPv6 address, not an opaque 128-bit string, and other fixes to RPL printer. + RSVP: Add bounds and length checks + OSPF: Do more bounds checking + Handle OpenSSL 1.1.x. + Initial support for the REdis Serialization Protocol known as RESP. + Add printing function for Generic Protocol Extension for VXLAN + draft-ietf-nvo3-vxlan-gpe-01 + Network Service Header: draft-ietf-sfc-nsh-01 + Don't recompile the filter if the new file has the same DLT. + Pass an adjusted struct pcap_pkthdr to the sub-printer. + Add three test cases for already fixed CVEs + CVE-2014-8767: OLSR + CVE-2014-8768: Geonet + CVE-2014-8769: AODV + Don't do the DDP-over-UDP heuristic first: GitHub issue #499. + Use the new debugging routines in libpcap. + Harmonize TCP source or destination ports tests with UDP ones + Introduce data types to use for integral values in packet structures. + RSVP: Fix an infinite loop + Support of Type 3 and Type 4 LISP packets. + Don't require IPv6 library support in order to support IPv6 addresses. + Many many changes to support libnetdissect usage. + Add a test that makes unaligned accesses: GitHub issue #478. + add a DNSSEC test case: GH #445 and GH #467. + BGP: add decoding of ADD-PATH capability + fixes to LLC header printing, and RFC948-style IP packets Friday April 10, 2015 guy@alum.mit.edu Summary for 4.7.4 tcpdump release Modified: head/contrib/tcpdump/CONTRIBUTING ============================================================================== --- head/contrib/tcpdump/CONTRIBUTING Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/CONTRIBUTING Wed Dec 6 02:21:11 2017 (r326613) @@ -3,6 +3,44 @@ Some Information for Contributors You want to contribute to Tcpdump, Thanks! Please, read these lines. + +How to report bugs and other problems +------------------------------------- +To report a security issue (segfault, buffer overflow, infinite loop, arbitrary +code execution etc) please send an e-mail to security@tcpdump.org, do not use +the bug tracker! + +To report a non-security problem (failure to compile, incorrect output in the +protocol printout, missing support for a particular protocol etc) please check +first that it reproduces with the latest stable release of tcpdump and the latest +stable release of libpcap. If it does, please check that the problem reproduces +with the current git master branch of tcpdump and the current git master branch of +libpcap. If it does (and it is not a security-related problem, otherwise see +above), please navigate to https://github.com/the-tcpdump-group/tcpdump/issues +and check if the problem has already been reported. If it has not, please open +a new issue and provide the following details: + +* tcpdump and libpcap version (tcpdump --version) +* operating system name and version and any other details that may be relevant + (uname -a, compiler name and version, CPU type etc.) +* configure flags if any were used +* statement of the problem +* steps to reproduce + +Please note that if you know exactly how to solve the problem and the solution +would not be too intrusive, it would be best to contribute some development time +and open a pull request instead as discussed below. + +Still not sure how to do? Feel free to [subscribe](http://www.tcpdump.org/#mailing-lists) +to the mailing list tcpdump-workers@lists.tcpdump.org and ask! + + +How to add new code and to update existing code +----------------------------------------------- + +0) Check that there isn't a pull request already opened for the changes you + intend to make. + 1) Fork the Tcpdump repository on GitHub from https://github.com/the-tcpdump-group/tcpdump (See https://help.github.com/articles/fork-a-repo/) @@ -12,8 +50,11 @@ Please, read these lines. on Linux and OSX before sending pull requests. (See http://docs.travis-ci.com/user/getting-started/) -3) Clone your repository +3) Setup your git working copy git clone https://github.com//tcpdump.git + cd tcpdump + git remote add upstream https://github.com/the-tcpdump-group/tcpdump + git fetch upstream 4) Do a 'touch .devel' in your working directory. Currently, the effect is @@ -47,19 +88,26 @@ Please, read these lines. 7) Test with 'make check' Don't send a pull request if 'make check' gives failed tests. -8) Rebase your commits against upstream/master - (To keep linearity) +8) Try to rebase your commits to keep the history simple. + git rebase upstream/master + (If the rebase fails and you cannot resolve, issue "git rebase --abort" + and ask for help in the pull request comment.) -9) Initiate and send a pull request +9) Once 100% happy, put your work into your forked repository. + git push + +10) Initiate and send a pull request (See https://help.github.com/articles/using-pull-requests/) -Some remarks ------------- + +Code style and generic remarks +------------------------------ a) A thorough reading of some other printers code is useful. b) Put the normative reference if any as comments (RFC, etc.). -c) Put the format of packets/headers/options as comments. +c) Put the format of packets/headers/options as comments if there is no + published normative reference. d) The printer may receive incomplete packet in the buffer, truncated at any random position, for example by capturing with '-s size' option. Modified: head/contrib/tcpdump/CREDITS ============================================================================== --- head/contrib/tcpdump/CREDITS Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/CREDITS Wed Dec 6 02:21:11 2017 (r326613) @@ -5,7 +5,7 @@ The current maintainers: Denis Ovsienko Fulvio Risso Guy Harris - Hannes Gredler + Hannes Gredler Michael Richardson Francois-Xavier Le Bail @@ -39,6 +39,7 @@ Additional people who have contributed patches: Bjoern A. Zeeb Bram Brent L. Bates + Brian Carpenter Brian Ginsbach Bruce M. Simpson Carles Kishimoto Bisbe @@ -54,6 +55,7 @@ Additional people who have contributed patches: Craig Rodrigues Crist J. Clark Daniel Hagerty + Daniel Lee Darren Reed David Binderman David Horn @@ -85,6 +87,7 @@ Additional people who have contributed patches: Greg Stark Hank Leininger Hannes Viertel + Hanno Böck Harry Raaymakers Heinz-Ado Arnolds Hendrik Scholz @@ -111,6 +114,7 @@ Additional people who have contributed patches: Juliusz Chroboczek Kaarthik Sivakumar Kaladhar Musunuru + Kamil Frankowicz Karl Norby Kazushi Sugyo Kelly Carmichael @@ -123,7 +127,6 @@ Additional people who have contributed patches: Larry Lile Lennert Buytenhek Loganaden Velvindron - Daniel Lee Loris Degioanni Love Hörnquist-Åstrand Lucas C. Villa Real @@ -166,6 +169,7 @@ Additional people who have contributed patches: Paolo Abeni Pascal Hennequin Pasvorn Boonmark + Patrik Lundquist Paul Ferrell Paul Mundt Paul S. Traina Modified: head/contrib/tcpdump/INSTALL.txt ============================================================================== --- head/contrib/tcpdump/INSTALL.txt Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/INSTALL.txt Wed Dec 6 02:21:11 2017 (r326613) @@ -37,6 +37,7 @@ Please see "PLATFORMS" for notes about tested platform FILES ----- CHANGES - description of differences between releases +CONTRIBUTING - guidelines for contributing CREDITS - people that have helped tcpdump along INSTALL.txt - this file LICENSE - the license under which tcpdump is distributed Modified: head/contrib/tcpdump/Makefile.in ============================================================================== --- head/contrib/tcpdump/Makefile.in Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/Makefile.in Wed Dec 6 02:21:11 2017 (r326613) @@ -263,6 +263,7 @@ HDR = \ ether.h \ ethertype.h \ extract.h \ + funcattrs.h \ getopt_long.h \ gmpls.h \ gmt2local.h \ Modified: head/contrib/tcpdump/PLATFORMS ============================================================================== --- head/contrib/tcpdump/PLATFORMS Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/PLATFORMS Wed Dec 6 02:21:11 2017 (r326613) @@ -1,9 +1,16 @@ -== Tested platforms == -NetBSD 5.1/i386 (mcr - 2012/4/1) -Debian Linux (squeeze/i386) (mcr - 2012/4/1) +In many operating systems tcpdump is available as a native package or port, +which simplifies installation of updates and long-term maintenance. However, +the native packages are sometimes a few versions behind and to try a more +recent snapshot it will take to compile tcpdump from the source code. ---- -RedHat Linux 6.1/i386 (assar) -FreeBSD 2.2.8/i386 (itojun) +tcpdump compiles and works on at least the following platforms: - +* AIX +* FreeBSD +* HP-UX 11i +* Linux (any) with glibc (usually just works) +* Linux (any) with musl libc (sometimes fails to compile, please report any bugs) +* Mac OS X / macOS +* NetBSD +* OpenWrt +* Solaris Modified: head/contrib/tcpdump/README.md ============================================================================== --- head/contrib/tcpdump/README.md Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/README.md Wed Dec 6 02:21:11 2017 (r326613) @@ -3,25 +3,21 @@ [![Build Status](https://travis-ci.org/the-tcpdump-group/tcpdump.png)](https://travis-ci.org/the-tcpdump-group/tcpdump) -TCPDUMP 4.x.y -Now maintained by "The Tcpdump Group" -See www.tcpdump.org +To report a security issue please send an e-mail to security@tcpdump.org. -Please send inquiries/comments/reports to: +To report bugs and other problems, contribute patches, request a +feature, provide generic feedback etc please see the file +CONTRIBUTING in the tcpdump source tree root. -* tcpdump-workers@lists.tcpdump.org +TCPDUMP 4.x.y +Now maintained by "The Tcpdump Group" +See www.tcpdump.org Anonymous Git is available via: git clone git://bpf.tcpdump.org/tcpdump -Please submit patches by forking the branch on GitHub at: - -* http://github.com/the-tcpdump-group/tcpdump/tree/master - -and issuing a pull request. - -formerly from Lawrence Berkeley National Laboratory +formerly from Lawrence Berkeley National Laboratory Network Research Group ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z (3.4) @@ -70,20 +66,6 @@ Another tool that tcpdump users might find useful is t It is a program that can be used to extract portions of tcpdump binary trace files. See the above distribution for further details and documentation. - -Problems, bugs, questions, desirable enhancements, etc. should be sent -to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support -requests, and feature requests may also be submitted on the GitHub issue -tracker for tcpdump at: - -* https://github.com/the-tcpdump-group/tcpdump/issues - -Source code contributions, etc. should be sent to the email address -above or submitted by forking the branch on GitHub at: - -* http://github.com/the-tcpdump-group/tcpdump/tree/master - -and issuing a pull request. Current versions can be found at www.tcpdump.org. Modified: head/contrib/tcpdump/VERSION ============================================================================== --- head/contrib/tcpdump/VERSION Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/VERSION Wed Dec 6 02:21:11 2017 (r326613) @@ -1 +1 @@ -4.9.0 +4.9.2 Modified: head/contrib/tcpdump/addrtoname.c ============================================================================== --- head/contrib/tcpdump/addrtoname.c Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/addrtoname.c Wed Dec 6 02:21:11 2017 (r326613) @@ -150,14 +150,24 @@ struct enamemem { u_short e_addr2; const char *e_name; u_char *e_nsap; /* used only for nsaptable[] */ -#define e_bs e_nsap /* for bytestringtable */ struct enamemem *e_nxt; }; static struct enamemem enametable[HASHNAMESIZE]; static struct enamemem nsaptable[HASHNAMESIZE]; -static struct enamemem bytestringtable[HASHNAMESIZE]; +struct bsnamemem { + u_short bs_addr0; + u_short bs_addr1; + u_short bs_addr2; + const char *bs_name; + u_char *bs_bytes; + unsigned int bs_nbytes; + struct bsnamemem *bs_nxt; +}; + +static struct bsnamemem bytestringtable[HASHNAMESIZE]; + struct protoidmem { uint32_t p_oui; u_short p_proto; @@ -342,7 +352,7 @@ getname6(netdissect_options *ndo, const u_char *ap) return (p->name); } -static const char hex[] = "0123456789abcdef"; +static const char hex[16] = "0123456789abcdef"; /* Find the hash node that corresponds the ether address 'ep' */ @@ -380,11 +390,11 @@ lookup_emem(netdissect_options *ndo, const u_char *ep) * with length 'nlen' */ -static inline struct enamemem * +static inline struct bsnamemem * lookup_bytestring(netdissect_options *ndo, register const u_char *bs, const unsigned int nlen) { - struct enamemem *tp; + struct bsnamemem *tp; register u_int i, j, k; if (nlen >= 6) { @@ -399,26 +409,28 @@ lookup_bytestring(netdissect_options *ndo, register co i = j = k = 0; tp = &bytestringtable[(i ^ j) & (HASHNAMESIZE-1)]; - while (tp->e_nxt) - if (tp->e_addr0 == i && - tp->e_addr1 == j && - tp->e_addr2 == k && - memcmp((const char *)bs, (const char *)(tp->e_bs), nlen) == 0) + while (tp->bs_nxt) + if (nlen == tp->bs_nbytes && + tp->bs_addr0 == i && + tp->bs_addr1 == j && + tp->bs_addr2 == k && + memcmp((const char *)bs, (const char *)(tp->bs_bytes), nlen) == 0) return tp; else - tp = tp->e_nxt; + tp = tp->bs_nxt; - tp->e_addr0 = i; - tp->e_addr1 = j; - tp->e_addr2 = k; + tp->bs_addr0 = i; + tp->bs_addr1 = j; + tp->bs_addr2 = k; - tp->e_bs = (u_char *) calloc(1, nlen + 1); - if (tp->e_bs == NULL) + tp->bs_bytes = (u_char *) calloc(1, nlen); + if (tp->bs_bytes == NULL) (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc"); - memcpy(tp->e_bs, bs, nlen); - tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); - if (tp->e_nxt == NULL) + memcpy(tp->bs_bytes, bs, nlen); + tp->bs_nbytes = nlen; + tp->bs_nxt = (struct bsnamemem *)calloc(1, sizeof(*tp)); + if (tp->bs_nxt == NULL) (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc"); return tp; @@ -445,11 +457,11 @@ lookup_nsap(netdissect_options *ndo, register const u_ tp = &nsaptable[(i ^ j) & (HASHNAMESIZE-1)]; while (tp->e_nxt) - if (tp->e_addr0 == i && + if (nsap_length == tp->e_nsap[0] && + tp->e_addr0 == i && tp->e_addr1 == j && tp->e_addr2 == k && - tp->e_nsap[0] == nsap_length && - memcmp((const char *)&(nsap[1]), + memcmp((const char *)nsap, (char *)&(tp->e_nsap[1]), nsap_length) == 0) return tp; else @@ -549,12 +561,12 @@ le64addr_string(netdissect_options *ndo, const u_char const unsigned int len = 8; register u_int i; register char *cp; - register struct enamemem *tp; + register struct bsnamemem *tp; char buf[BUFSIZE]; tp = lookup_bytestring(ndo, ep, len); - if (tp->e_name) - return (tp->e_name); + if (tp->bs_name) + return (tp->bs_name); cp = buf; for (i = len; i > 0 ; --i) { @@ -566,11 +578,11 @@ le64addr_string(netdissect_options *ndo, const u_char *cp = '\0'; - tp->e_name = strdup(buf); - if (tp->e_name == NULL) + tp->bs_name = strdup(buf); + if (tp->bs_name == NULL) (*ndo->ndo_error)(ndo, "le64addr_string: strdup(buf)"); - return (tp->e_name); + return (tp->bs_name); } const char * @@ -579,7 +591,7 @@ linkaddr_string(netdissect_options *ndo, const u_char { register u_int i; register char *cp; - register struct enamemem *tp; + register struct bsnamemem *tp; if (len == 0) return (""); @@ -591,11 +603,11 @@ linkaddr_string(netdissect_options *ndo, const u_char return (q922_string(ndo, ep, len)); tp = lookup_bytestring(ndo, ep, len); - if (tp->e_name) - return (tp->e_name); + if (tp->bs_name) + return (tp->bs_name); - tp->e_name = cp = (char *)malloc(len*3); - if (tp->e_name == NULL) + tp->bs_name = cp = (char *)malloc(len*3); + if (tp->bs_name == NULL) (*ndo->ndo_error)(ndo, "linkaddr_string: malloc"); *cp++ = hex[*ep >> 4]; *cp++ = hex[*ep++ & 0xf]; @@ -605,7 +617,7 @@ linkaddr_string(netdissect_options *ndo, const u_char *cp++ = hex[*ep++ & 0xf]; } *cp = '\0'; - return (tp->e_name); + return (tp->bs_name); } const char * Modified: head/contrib/tcpdump/addrtoname.h ============================================================================== --- head/contrib/tcpdump/addrtoname.h Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/addrtoname.h Wed Dec 6 02:21:11 2017 (r326613) @@ -33,7 +33,8 @@ enum { LINKADDR_ETHER, LINKADDR_FRELAY, LINKADDR_IEEE1394, - LINKADDR_ATM + LINKADDR_ATM, + LINKADDR_OTHER }; #define BUFSIZE 128 Modified: head/contrib/tcpdump/addrtostr.c ============================================================================== --- head/contrib/tcpdump/addrtostr.c Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/addrtostr.c Wed Dec 6 02:21:11 2017 (r326613) @@ -110,25 +110,24 @@ addrtostr6 (const void *src, char *dst, size_t size) size_t space_left, added_space; int snprintfed; struct { - long base; - long len; + int base; + int len; } best, cur; - u_long words [IN6ADDRSZ / INT16SZ]; + uint16_t words [IN6ADDRSZ / INT16SZ]; int i; /* Preprocess: * Copy the input (bytewise) array into a wordwise array. * Find the longest run of 0x00's in src[] for :: shorthanding. */ - memset (words, 0, sizeof(words)); - for (i = 0; i < IN6ADDRSZ; i++) - words[i/2] |= (srcaddr[i] << ((1 - (i % 2)) << 3)); + for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) + words[i] = (srcaddr[2*i] << 8) | srcaddr[2*i + 1]; best.len = 0; best.base = -1; cur.len = 0; cur.base = -1; - for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) + for (i = 0; i < (int)(IN6ADDRSZ / INT16SZ); i++) { if (words[i] == 0) { @@ -161,7 +160,7 @@ addrtostr6 (const void *src, char *dst, size_t size) *dp++ = c; \ space_left--; \ } - for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) + for (i = 0; i < (int)(IN6ADDRSZ / INT16SZ); i++) { /* Are we inside the best run of 0x00's? */ @@ -192,7 +191,7 @@ addrtostr6 (const void *src, char *dst, size_t size) space_left -= added_space; break; } - snprintfed = snprintf (dp, space_left, "%lx", words[i]); + snprintfed = snprintf (dp, space_left, "%x", words[i]); if (snprintfed < 0) return (NULL); if ((size_t) snprintfed >= space_left) Modified: head/contrib/tcpdump/af.c ============================================================================== --- head/contrib/tcpdump/af.c Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/af.c Wed Dec 6 02:21:11 2017 (r326613) @@ -12,7 +12,7 @@ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE. * - * Original code by Hannes Gredler (hannes@juniper.net) + * Original code by Hannes Gredler (hannes@gredler.at) */ #ifdef HAVE_CONFIG_H Modified: head/contrib/tcpdump/af.h ============================================================================== --- head/contrib/tcpdump/af.h Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/af.h Wed Dec 6 02:21:11 2017 (r326613) @@ -12,7 +12,7 @@ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE. * - * Original code by Hannes Gredler (hannes@juniper.net) + * Original code by Hannes Gredler (hannes@gredler.at) */ extern const struct tok af_values[]; Modified: head/contrib/tcpdump/checksum.c ============================================================================== --- head/contrib/tcpdump/checksum.c Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/checksum.c Wed Dec 6 02:21:11 2017 (r326613) @@ -14,7 +14,7 @@ * * miscellaneous checksumming routines * - * Original code by Hannes Gredler (hannes@juniper.net) + * Original code by Hannes Gredler (hannes@gredler.at) */ #ifdef HAVE_CONFIG_H Modified: head/contrib/tcpdump/config.h.in ============================================================================== --- head/contrib/tcpdump/config.h.in Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/config.h.in Wed Dec 6 02:21:11 2017 (r326613) @@ -34,6 +34,9 @@ /* Define to 1 if you have the `ether_ntohost' function. */ #undef HAVE_ETHER_NTOHOST +/* Define to 1 if you have the `EVP_CipherInit_ex' function. */ +#undef HAVE_EVP_CIPHERINIT_EX + /* Define to 1 if you have the `EVP_CIPHER_CTX_new' function. */ #undef HAVE_EVP_CIPHER_CTX_NEW Modified: head/contrib/tcpdump/configure ============================================================================== --- head/contrib/tcpdump/configure Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/configure Wed Dec 6 02:21:11 2017 (r326613) @@ -5801,7 +5801,7 @@ if test "x$ac_cv_func_pcap_loop" = xyes; then : else - as_fn_error $? "Report this to tcpdump-workers@lists.tcpdump.org, and include the + as_fn_error $? "This is a bug, please follow the guidelines in CONTRIBUTING and include the config.log file in your report. If you have downloaded libpcap from tcpdump.org, and built it yourself, please also include the config.log file from the libpcap source directory, the Makefile from the libpcap @@ -8116,17 +8116,32 @@ fi done # - # OK, do we have EVP_CIPHER_CTX_new? + # OK, then: + # + # 1) do we have EVP_CIPHER_CTX_new? # If so, we use it to allocate an # EVP_CIPHER_CTX, as EVP_CIPHER_CTX may be # opaque; otherwise, we allocate it ourselves. # - for ac_func in EVP_CIPHER_CTX_new + # 2) do we have EVP_CipherInit_ex()? + # If so, we use it, because we need to be + # able to make two "initialize the cipher" + # calls, one with the cipher and key, and + # one with the IV, and, as of OpenSSL 1.1, + # You Can't Do That with EVP_CipherInit(), + # because a call to EVP_CipherInit() will + # unconditionally clear the context, and + # if you don't supply a cipher, it'll + # clear the cipher, rendering the context + # unusable and causing a crash. + # + for ac_func in EVP_CIPHER_CTX_new EVP_CipherInit_ex do : - ac_fn_c_check_func "$LINENO" "EVP_CIPHER_CTX_new" "ac_cv_func_EVP_CIPHER_CTX_new" -if test "x$ac_cv_func_EVP_CIPHER_CTX_new" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_EVP_CIPHER_CTX_NEW 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi Modified: head/contrib/tcpdump/configure.in ============================================================================== --- head/contrib/tcpdump/configure.in Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/configure.in Wed Dec 6 02:21:11 2017 (r326613) @@ -935,12 +935,26 @@ if test "$want_libcrypto" != "no"; then if test "$ac_cv_lib_crypto_DES_cbc_encrypt" = "yes"; then AC_CHECK_HEADERS(openssl/evp.h) # - # OK, do we have EVP_CIPHER_CTX_new? + # OK, then: + # + # 1) do we have EVP_CIPHER_CTX_new? # If so, we use it to allocate an # EVP_CIPHER_CTX, as EVP_CIPHER_CTX may be # opaque; otherwise, we allocate it ourselves. # - AC_CHECK_FUNCS(EVP_CIPHER_CTX_new) + # 2) do we have EVP_CipherInit_ex()? + # If so, we use it, because we need to be + # able to make two "initialize the cipher" + # calls, one with the cipher and key, and + # one with the IV, and, as of OpenSSL 1.1, + # You Can't Do That with EVP_CipherInit(), + # because a call to EVP_CipherInit() will + # unconditionally clear the context, and + # if you don't supply a cipher, it'll + # clear the cipher, rendering the context + # unusable and causing a crash. + # + AC_CHECK_FUNCS(EVP_CIPHER_CTX_new EVP_CipherInit_ex) fi ]) fi Modified: head/contrib/tcpdump/extract.h ============================================================================== --- head/contrib/tcpdump/extract.h Wed Dec 6 02:06:14 2017 (r326612) +++ head/contrib/tcpdump/extract.h Wed Dec 6 02:21:11 2017 (r326613) @@ -20,8 +20,48 @@ */ /* - * Macros to extract possibly-unaligned big-endian integral values. + * For 8-bit values; provided for the sake of completeness. Byte order + * isn't relevant, and alignment isn't an issue. */ +#define EXTRACT_8BITS(p) (*(p)) +#define EXTRACT_LE_8BITS(p) (*(p)) + +/* + * Inline functions or macros to extract possibly-unaligned big-endian + * integral values. + */ +#include "funcattrs.h" + +/* + * If we have versions of GCC or Clang that support an __attribute__ + * to say "if we're building with unsigned behavior sanitization, + * don't complain about undefined behavior in this function", we + * label these functions with that attribute - we *know* it's undefined + * in the C standard, but we *also* know it does what we want with + * the ISA we're targeting and the compiler we're using. + * + * For GCC 4.9.0 and later, we use __attribute__((no_sanitize_undefined)); + * pre-5.0 GCC doesn't have __has_attribute, and I'm not sure whether + * GCC or Clang first had __attribute__((no_sanitize(XXX)). + * + * For Clang, we check for __attribute__((no_sanitize(XXX)) with + * __has_attribute, as there are versions of Clang that support + * __attribute__((no_sanitize("undefined")) but don't support + * __attribute__((no_sanitize_undefined)). + * + * We define this here, rather than in funcattrs.h, because we + * only want it used here, we don't want it to be broadly used. + * (Any printer will get this defined, but this should at least + * make it harder for people to find.) + */ +#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 409) +#define UNALIGNED_OK __attribute__((no_sanitize_undefined)) +#elif __has_attribute(no_sanitize) +#define UNALIGNED_OK __attribute__((no_sanitize("undefined"))) +#else +#define UNALIGNED_OK +#endif + #ifdef LBL_ALIGN /* * The processor doesn't natively handle unaligned loads. @@ -31,7 +71,7 @@ defined(__mips) || defined(__mips__)) /* - * This is a GCC-compatible compiler and we have __attribute__, which +* This is a GCC-compatible compiler and we have __attribute__, which * we assume that mean we have __attribute__((packed)), and this is * MIPS or Alpha, which has instructions that can help when doing * unaligned loads. @@ -88,19 +128,19 @@ typedef struct { uint32_t val; } __attribute__((packed)) unaligned_uint32_t; -static inline uint16_t +UNALIGNED_OK static inline uint16_t EXTRACT_16BITS(const void *p) { return ((uint16_t)ntohs(((const unaligned_uint16_t *)(p))->val)); } -static inline uint32_t +UNALIGNED_OK static inline uint32_t EXTRACT_32BITS(const void *p) { return ((uint32_t)ntohl(((const unaligned_uint32_t *)(p))->val)); } -static inline uint64_t +UNALIGNED_OK static inline uint64_t EXTRACT_64BITS(const void *p) { return ((uint64_t)(((uint64_t)ntohl(((const unaligned_uint32_t *)(p) + 0)->val)) << 32 | @@ -138,19 +178,19 @@ EXTRACT_64BITS(const void *p) * The processor natively handles unaligned loads, so we can just * cast the pointer and fetch through it. */ -static inline uint16_t +static inline uint16_t UNALIGNED_OK EXTRACT_16BITS(const void *p) { return ((uint16_t)ntohs(*(const uint16_t *)(p))); } -static inline uint32_t +static inline uint32_t UNALIGNED_OK EXTRACT_32BITS(const void *p) { return ((uint32_t)ntohl(*(const uint32_t *)(p))); } -static inline uint64_t +static inline uint64_t UNALIGNED_OK EXTRACT_64BITS(const void *p) { return ((uint64_t)(((uint64_t)ntohl(*((const uint32_t *)(p) + 0))) << 32 | @@ -193,7 +233,6 @@ EXTRACT_64BITS(const void *p) * Macros to extract possibly-unaligned little-endian integral values. * XXX - do loads on little-endian machines that support unaligned loads? */ -#define EXTRACT_LE_8BITS(p) (*(p)) #define EXTRACT_LE_16BITS(p) \ ((uint16_t)(((uint16_t)(*((const uint8_t *)(p) + 1)) << 8) | \ ((uint16_t)(*((const uint8_t *)(p) + 0)) << 0))) @@ -242,3 +281,6 @@ EXTRACT_64BITS(const void *p) #define ND_TTEST_64BITS(p) ND_TTEST2(*(p), 8) #define ND_TCHECK_64BITS(p) ND_TCHECK2(*(p), 8) + +#define ND_TTEST_128BITS(p) ND_TTEST2(*(p), 16) +#define ND_TCHECK_128BITS(p) ND_TCHECK2(*(p), 16) Copied: head/contrib/tcpdump/funcattrs.h (from r323696, vendor/tcpdump/dist/funcattrs.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/tcpdump/funcattrs.h Wed Dec 6 02:21:11 2017 (r326613, copy of r323696, vendor/tcpdump/dist/funcattrs.h) @@ -0,0 +1,122 @@ +/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ +/* + * Copyright (c) 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the Computer Systems + * Engineering Group at Lawrence Berkeley Laboratory. + * 4. Neither the name of the University nor of the Laboratory may be used + * to endorse or promote products derived from this software without + * specific prior written permission. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Dec 6 02:47:48 2017 Return-Path: Delivered-To: svn-src-head@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 0EDCAE8D0DB; Wed, 6 Dec 2017 02:47:48 +0000 (UTC) (envelope-from eadler@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 CF3D87F56E; Wed, 6 Dec 2017 02:47:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB62lkAK053164; Wed, 6 Dec 2017 02:47:46 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB62lksa053161; Wed, 6 Dec 2017 02:47:46 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712060247.vB62lksa053161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 6 Dec 2017 02:47:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326614 - in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee X-SVN-Commit-Revision: 326614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 02:47:48 -0000 Author: eadler Date: Wed Dec 6 02:47:46 2017 New Revision: 326614 URL: https://svnweb.freebsd.org/changeset/base/326614 Log: sponge(1): revert I did a complete buildworld and test... with the program disconnected from the tree. Revert the change for now. (this keeps the change to .arclint which is still correct) Wearing: my pointhat Deleted: head/usr.bin/sponge/ Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/Makefile head/usr.bin/tee/tee.1 Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Dec 6 02:21:11 2017 (r326613) +++ head/etc/mtree/BSD.tests.dist Wed Dec 6 02:47:46 2017 (r326614) @@ -712,8 +712,6 @@ .. soelim .. - sponge - .. stat .. tail Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Wed Dec 6 02:21:11 2017 (r326613) +++ head/usr.bin/Makefile Wed Dec 6 02:47:46 2017 (r326614) @@ -148,7 +148,6 @@ SUBDIR= alias \ soelim \ sort \ split \ - sponge \ stat \ stdbuf \ strings \ Modified: head/usr.bin/tee/tee.1 ============================================================================== --- head/usr.bin/tee/tee.1 Wed Dec 6 02:21:11 2017 (r326613) +++ head/usr.bin/tee/tee.1 Wed Dec 6 02:47:46 2017 (r326614) @@ -72,8 +72,6 @@ utility takes the default action for all signals, except in the event of the .Fl i option. -.Sh SEE ALSO -.Xr sponge 1 .Sh EXIT STATUS .Ex -std .Sh STANDARDS From owner-svn-src-head@freebsd.org Wed Dec 6 03:10:11 2017 Return-Path: Delivered-To: svn-src-head@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 6201CE8D9A1; Wed, 6 Dec 2017 03:10:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01AAF801D7; Wed, 6 Dec 2017 03:10:10 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vB63A2QP054609; Tue, 5 Dec 2017 19:10:02 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vB63A1Bn054608; Tue, 5 Dec 2017 19:10:02 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712060310.vB63A1Bn054608@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326614 - in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee In-Reply-To: <201712060247.vB62lksa053161@repo.freebsd.org> To: Eitan Adler Date: Tue, 5 Dec 2017 19:10:01 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 03:10:11 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: eadler > Date: Wed Dec 6 02:47:46 2017 > New Revision: 326614 > URL: https://svnweb.freebsd.org/changeset/base/326614 > > Log: > sponge(1): revert > > I did a complete buildworld and test... with the program disconnected > from the tree. Revert the change for now. > > (this keeps the change to .arclint which is still correct) Commited with no log entry that makes any sense about why it was changed, please revert .arclint and recommit with a proper log entry for .arclint as to why all /tests/ dirs should be ignored. > Wearing: my pointhat > > Deleted: > head/usr.bin/sponge/ > Modified: > head/etc/mtree/BSD.tests.dist > head/usr.bin/Makefile > head/usr.bin/tee/tee.1 > > Modified: head/etc/mtree/BSD.tests.dist > ============================================================================== > --- head/etc/mtree/BSD.tests.dist Wed Dec 6 02:21:11 2017 (r326613) > +++ head/etc/mtree/BSD.tests.dist Wed Dec 6 02:47:46 2017 (r326614) > @@ -712,8 +712,6 @@ > .. > soelim > .. > - sponge > - .. > stat > .. > tail > > Modified: head/usr.bin/Makefile > ============================================================================== > --- head/usr.bin/Makefile Wed Dec 6 02:21:11 2017 (r326613) > +++ head/usr.bin/Makefile Wed Dec 6 02:47:46 2017 (r326614) > @@ -148,7 +148,6 @@ SUBDIR= alias \ > soelim \ > sort \ > split \ > - sponge \ > stat \ > stdbuf \ > strings \ > > Modified: head/usr.bin/tee/tee.1 > ============================================================================== > --- head/usr.bin/tee/tee.1 Wed Dec 6 02:21:11 2017 (r326613) > +++ head/usr.bin/tee/tee.1 Wed Dec 6 02:47:46 2017 (r326614) > @@ -72,8 +72,6 @@ utility takes the default action for all signals, > except in the event of the > .Fl i > option. > -.Sh SEE ALSO > -.Xr sponge 1 > .Sh EXIT STATUS > .Ex -std > .Sh STANDARDS > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Dec 6 03:19:36 2017 Return-Path: Delivered-To: svn-src-head@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 1DEFCE8DD48; Wed, 6 Dec 2017 03:19:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.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 E185480769; Wed, 6 Dec 2017 03:19:35 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f46.google.com with SMTP id m11so19111163iti.1; Tue, 05 Dec 2017 19:19:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=ZV+h/3Jcgurr7dzG7Mwn74FEuZ3whq43eXNJUrsRlN4=; b=iIBLWHr2NGWEQtrcrRZLh7yRjRSDfoQusVCPGikquOhrxe5OkywkKQT8a7NGpZ4JAs fO4Xa1MoFMOvIBsGWEzWu2JwckIheRoZwG3xtLeuzx9rg2OIpkqobWoguRMxe0DxJMpx gcw/xpvYvopo3EhhmuSNsEp5weqqYmoGm2u2DXoS4HnBFoNLNXVlj/Leg+OHsYR6hZFr fbrOLakVpgaLJGPfDq9sQBJMmCcIfOm/CVdvOmPjLRJxinmrxdU96xleGaxRtNJgrNpM /O5ECywpunEVoiBVEZQFSYnRALSFRsJhVX8AqUliCzZtK/tLRPMIXKbrEeKtDKyuHXoT /5wg== X-Gm-Message-State: AKGB3mJt5dyX4e7g0fJN3ABeSmelpSTMh7wTPORj5iCEn4gBoFy2ntM/ ePsm8Ti9ptF7Tv0GSiuATx3ps40i X-Google-Smtp-Source: AGs4zMazhpdkfIZTIZvs6jd6m+qkjhwner2MsSTuJVClVa1WciksF7B7ccIgbWbeKimwYC3bVcUaHA== X-Received: by 10.36.164.75 with SMTP id v11mr2613516iti.33.1512530374466; Tue, 05 Dec 2017 19:19:34 -0800 (PST) Received: from mail-io0-f177.google.com (mail-io0-f177.google.com. [209.85.223.177]) by smtp.gmail.com with ESMTPSA id e7sm908415ita.17.2017.12.05.19.19.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 19:19:34 -0800 (PST) Received: by mail-io0-f177.google.com with SMTP id e204so1078084iof.12; Tue, 05 Dec 2017 19:19:34 -0800 (PST) X-Received: by 10.107.7.169 with SMTP id g41mr33591135ioi.38.1512530374015; Tue, 05 Dec 2017 19:19:34 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Tue, 5 Dec 2017 19:19:33 -0800 (PST) In-Reply-To: <201712060310.vB63A1Bn054608@pdx.rh.CN85.dnsmgr.net> References: <201712060247.vB62lksa053161@repo.freebsd.org> <201712060310.vB63A1Bn054608@pdx.rh.CN85.dnsmgr.net> From: Conrad Meyer Date: Tue, 5 Dec 2017 19:19:33 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326614 - in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee To: "Rodney W. Grimes" Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 03:19:36 -0000 On Tue, Dec 5, 2017 at 7:10 PM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: eadler >> Date: Wed Dec 6 02:47:46 2017 >> New Revision: 326614 >> URL: https://svnweb.freebsd.org/changeset/base/326614 >> >> Log: >> sponge(1): revert >> >> I did a complete buildworld and test... with the program disconnected >> from the tree. Revert the change for now. >> >> (this keeps the change to .arclint which is still correct) > > Commited with no log entry that makes any sense about why it was changed, > please revert .arclint and recommit with a proper log entry for .arclint > as to why all /tests/ dirs should be ignored. I have to agree with Rod. The commit message for the arclint change is currently "sponge(1): initial commit =E2=80=A6" and doesn't say anything about the arclint change. Even if the change is correct, the commit message isn't. Conrad From owner-svn-src-head@freebsd.org Wed Dec 6 04:20:00 2017 Return-Path: Delivered-To: svn-src-head@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 DB0B8E8F132; Wed, 6 Dec 2017 04:20:00 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CC7D2050; Wed, 6 Dec 2017 04:19:59 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MRBVeZUA4GvLHMRBXemNpG; Tue, 05 Dec 2017 21:19:53 -0700 X-Authority-Analysis: v=2.2 cv=a9pAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=ocR9PWop10UA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=ndaoGXS1AAAA:8 a=hx6Ii2k5rYYujSR53hIA:9 a=vco7Zi0Eel3hwEHE:21 a=g2mOxOadRNXdeNGP:21 a=-AoTj2VQkFj2jE9d:21 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=mFeOnlTyF09QQMGr2mMI:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id AB65B296; Tue, 5 Dec 2017 20:19:49 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vB64Jnpp068353; Tue, 5 Dec 2017 20:19:49 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vB64JldG068350; Tue, 5 Dec 2017 20:19:47 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712060419.vB64JldG068350@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Pedro Giffuni cc: Cy Schubert , Devin Teske , Hans Petter Selasky , "rgrimes@freebsd.org" , "cem@freebsd.org" , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r326554 - in head: . usr.bin/spongeusr.bin/sponge/tests usr.bin/tee In-Reply-To: Message from Pedro Giffuni of "Tue, 05 Dec 2017 20:01:46 -0500." <4FE900E7-10E6-4909-BB4A-C5E6F83FF515@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 Dec 2017 20:19:47 -0800 X-CMAE-Envelope: MS4wfIFCV8AflxFKpNFzYBcHAmUWjo0Ld4cR0cJlwlggW93RqfLbC+5FQNbYgaW8ihK8/C0AryPUpuVCkgPegYHNg994Q/yds/FvuEHTL0nG0e5G6Sez1ebQ nX/0ALGcwWQrWz4umCtcwBKJ5phYbDgBEih5DRG2Q6T7+R68NlUQguDoC8XakreLUHAxMRS8b+v6cRymOuknvyjQjtYKF4kTt1JsR73KTv6ao4995HdgL5dn v4juCe5i69bWWo6nl8mjcvBhSaQCYeU2YsnWbPPGD0n9YB5l/lhzpAHZ5ONI9s6OeZbVAqFoB1PMReOmRBKeA9eJvXIy0kWffXPa22zVKn5n1USZvLjdFtZZ 2Jy23/lewu3aBQrOPVfWCV4QMxb09vJ4XHsnVEeuY36/qt6/HrRNulfXrZzvsQA+FgXDx06C X-Mailman-Approved-At: Wed, 06 Dec 2017 04:25:01 +0000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 04:20:01 -0000 Thanks. It doesn't matter anyway FreeBSD sed -i '' == gsed -i . -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. In message <4FE900E7-10E6-4909-BB4A-C5E6F83FF515@FreeBSD.org>, Pedro Giffuni wr ites: > > > --Apple-Mail=_50E4FA92-D46B-44D0-AA71-CE18C2B93B8C > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; > charset=utf-8 > > Hello; > > > On Dec 5, 2017, at 12:17, Cy Schubert = > wrote: > >=20 > > What side effects? Can you give one or two examples, please? > >=20 > > Sorry, I forgot the details .. but I am pretty sure there was exp-run = > and breakage in the ports tree. > > Pedro. > > > --- > > Sent using a tiny phone keyboard. > > Apologies for any typos and autocorrect. > > This old phone only supports top post. Apologies. > >=20 > > Cy Schubert > > or > > The need of the many outweighs the greed of the few. > > --- > > From: Pedro Giffuni > > Sent: 05/12/2017 08:40 > > To: Cy Schubert; Devin Teske; Hans Petter Selasky > > Cc: rgrimes@freebsd.org; cem@freebsd.org; Eitan Adler; src-committers; = > svn-src-all@freebsd.org; svn-src-head@freebsd.org > > Subject: Re: svn commit: r326554 - in head: . = > usr.bin/spongeusr.bin/sponge/tests usr.bin/tee > >=20 > >=20 > > On 05/12/2017 11:29, Cy Schubert wrote: > >> Why not update sed to create the backup file only if the suffix is = > given to -i, like gnu sed does. > >>=20 > >=20 > > No, no .. there have been several failed attempts at that that cause = > nasty side effects. > > It is also a rather non-standardish thing to do. > >=20 > > Pedro. > >=20 > >> --- > >> Sent using a tiny phone keyboard. > >> Apologies for any typos and autocorrect. > >> This old phone only supports top post. Apologies. > >>=20 > >> Cy Schubert > >> or = > > >> The need of the many outweighs the greed of the few. > >> --- > >> From: Devin Teske > >> Sent: 05/12/2017 07:35 > >> To: Hans Petter Selasky > >> Cc: rgrimes@freebsd.org ; cem@freebsd.org = > ; Eitan Adler; src-committers; = > svn-src-all@freebsd.org ; = > svn-src-head@freebsd.org > >> Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge = > usr.bin/sponge/tests usr.bin/tee > >>=20 > >>=20 > >> > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky = > wrote: > >> >=20 > >> >> On 12/05/17 13:58, Rodney W. Grimes wrote: > >> >> Further more, why does freebsd need this in base? > >> >=20 > >> > Hi, > >> >=20 > >> > I think this is useful. It could replace the "-i " (intermediate) = > option for "sed" for example. It avoids creating temporary files when = > filtering files, right? > >> >=20 > >> > --HPS > >> >=20 > >>=20 > >> Wth is wrong with: > >>=20 > >> data=3D$( sed -e '...' somefile ) && > >> =C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD= > =C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD echo "$data" > = > somefile > >>=20 > >> or > >>=20 > >> set -e > >> data=3D... > >> echo "$data" > ... > >>=20 > >> or > >>=20 > >> exec 3< >> $( ... ) > >> EOF > >> cat > ... <&3 > >>=20 > >> or > >>=20 > >> (I digress) > >>=20 > >> Infinite variations, but the gist is that sponge looks to be trying = > to help sh(1)/similar when help is unneeded. > >>=20 > >> Why buffer data into memory via fork-exec-pipe to sponge when you can = > buffer to native namespace without pipe to sponge? > >>=20 > >> Am I missing something? Why do we need sponge(1)? > >> --=20 > >> Devin > >>=20 > >=20 > > > --Apple-Mail=_50E4FA92-D46B-44D0-AA71-CE18C2B93B8C > Content-Transfer-Encoding: quoted-printable > Content-Type: text/html; > charset=utf-8 > > charset=3Dutf-8"> -webkit-nbsp-mode: space; line-break: after-white-space;" = > class=3D"">Hello;

type=3D"cite" class=3D"">
On Dec 5, 2017, at 12:17, Cy = > Schubert < class=3D"">Cy.Schubert@komquats.com> wrote:

class=3D"Apple-interchange-newline">
> charset=3Dwindows-1252" http-equiv=3D"Content-Type" class=3D""> > =20 >
class=3D"">
11pt;" class=3D"">What side effects? Can you give one or two examples, = > please?

class=3D"">

class=3D"">
Sorry, I forgot the details .. but I am pretty sure = > there was exp-run and breakage in the ports tree.

class=3D"">
Pedro.

type=3D"cite" class=3D"">
text=3D"#000000" class=3D"">
Calibri,sans-serif; font-size: 11pt;" class=3D"">---
Sent = > using a tiny phone keyboard.
Apologies for any typos and = > autocorrect.
This old phone only supports top post. = > Apologies.

Cy Schubert
< href=3D"mailto:Cy.Schubert@cschubert.com" = > class=3D"">Cy.Schubert@cschubert.com> or < href=3D"mailto:cy@freebsd.org" class=3D"">cy@freebsd.org>
class=3D"">The need of the many outweighs the greed of the few.
class=3D"">---

style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: = > bold;" class=3D"">From: Tahoma,sans-serif; font-size: 10pt;" class=3D"">Pedro Giffuni
class=3D""> 10pt; font-weight: bold;" class=3D"">Sent: style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;" = > class=3D"">05/12/2017 08:40
style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: = > bold;" class=3D"">To: Tahoma,sans-serif; font-size: 10pt;" class=3D"">Cy Schubert; Devin = > Teske; Hans Petter Selasky
style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: = > bold;" class=3D"">Cc: Tahoma,sans-serif; font-size: 10pt;" class=3D""> href=3D"mailto:rgrimes@freebsd.org" class=3D"">rgrimes@freebsd.org; = > cem@freebsd.org; Eitan = > Adler; src-committers; class=3D"">svn-src-all@freebsd.org; href=3D"mailto:svn-src-head@freebsd.org" = > class=3D"">svn-src-head@freebsd.org
style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font-weight: = > bold;" class=3D"">Subject: Tahoma,sans-serif; font-size: 10pt;" class=3D"">Re: svn commit: r326554 = > - in head: . usr.bin/spongeusr.bin/sponge/tests usr.bin/tee
class=3D"">


>

>
On 05/12/2017 11:29, Cy Schubert = > wrote:
>
>
type=3D"cite" class=3D""> > =20 >
>
class=3D"">Why > not update sed to create the backup file only if the suffix is > given to -i, like gnu sed does.
>
>
>
>
>
> No, no .. there have been several failed attempts at that that cause > nasty side effects.
> It is also a rather non-standardish thing to do.
>
> Pedro.
>
>
type=3D"cite" class=3D""> >
>
class=3D"">---
> Sent using a tiny phone keyboard.
> Apologies for any typos and autocorrect.
> This old phone only supports top post. Apologies.
= > >
> Cy Schubert
> href=3D"mailto:Cy.Schubert@cschubert.com"><Cy.Schubert@cschubert.com>= > ; or href=3D"mailto:cy@freebsd.org"><cy@freebsd.org>
> The need of the many outweighs the greed of the few.
class=3D""> > ---
>
>
>
font-size: 10pt; font-weight: bold;" class=3D"">From: style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;" = > class=3D"">Devin Teske
> font-weight: bold;" class=3D"">Sent: Tahoma,sans-serif; font-size: 10pt;" class=3D"">05/12/2017 = > 07:35
> font-weight: bold;" class=3D"">To: Tahoma,sans-serif; font-size: 10pt;" class=3D"">Hans Petter = > Selasky
> font-weight: bold;" class=3D"">Cc: Tahoma,sans-serif; font-size: 10pt;" class=3D""> class=3D"moz-txt-link-abbreviated" = > href=3D"mailto:rgrimes@freebsd.org">rgrimes@freebsd.org; > href=3D"mailto:cem@freebsd.org">cem@freebsd.org; Eitan Adler; = > src-committers; > href=3D"mailto:svn-src-all@freebsd.org">svn-src-all@freebsd.org; class=3D"moz-txt-link-abbreviated" = > href=3D"mailto:svn-src-head@freebsd.org">svn-src-head@freebsd.org n>
> font-weight: bold;" class=3D"">Subject: Tahoma,sans-serif; font-size: 10pt;" class=3D"">Re: svn commit: r326554 = > - > in head: . usr.bin/sponge usr.bin/sponge/tests = > usr.bin/tee
>
>
> > On Dec 5, 2017, at 5:00 AM, Hans Petter Selasky > href=3D"mailto:hps@selasky.org"><hps@selasky.org> wrote:
class=3D""> > >
> >> On 12/05/17 13:58, Rodney W. Grimes wrote:
> >> Further more, why does freebsd need this in base?
class=3D""> > >
> > Hi,
> >
> > I think this is useful. It could replace the "-i " > (intermediate) option for "sed" for example. It avoids creating > temporary files when filtering files, right?
> >
> > --HPS
> >
>
> Wth is wrong with:
>
> data=3D$( sed -e '...' somefile ) &&
> =C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2= > =BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD=C3=AF=C2=BF=C2=BD echo "$data" = > > somefile
>
> or
>
> set -e
> data=3D...
> echo "$data" > ...
>
> or
>
> exec 3<<EOF
> $( ... )
> EOF
> cat > ... <&3
>
> or
>
> (I digress)
>
> Infinite variations, but the gist is that sponge looks to be > trying to help sh(1)/similar when help is unneeded.
>
> Why buffer data into memory via fork-exec-pipe to sponge when you > can buffer to native namespace without pipe to sponge?
class=3D""> >
> Am I missing something? Why do we need sponge(1)?
> --
> Devin
>
>
>
> =20 > >

= > > --Apple-Mail=_50E4FA92-D46B-44D0-AA71-CE18C2B93B8C-- From owner-svn-src-head@freebsd.org Wed Dec 6 04:29:52 2017 Return-Path: Delivered-To: svn-src-head@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 C4CCAE8F5B1; Wed, 6 Dec 2017 04:29:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 731DE2698; Wed, 6 Dec 2017 04:29:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 912523C6C1E; Wed, 6 Dec 2017 15:29:43 +1100 (AEDT) Date: Wed, 6 Dec 2017 15:29:42 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326611 - head/sys/sys In-Reply-To: <201712060205.vB625Lps036354@repo.freebsd.org> Message-ID: <20171206133235.U2427@besplex.bde.org> References: <201712060205.vB625Lps036354@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=WCRROSdGWhctSmwJaF8A:9 a=hp5lvgMGni1NBp4V:21 a=9w7bzTHj1VTNeAQj:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 04:29:52 -0000 On Wed, 6 Dec 2017, Justin Hibbits wrote: > Log: > Use unsigned intptr_t type for framebuffer addresses > > Summary: > Some architectures (powerpc Book-E) have a vm_paddr_t larger than intptr_t. > Casting from the intptr_t to vm_paddr_t causes sign extension, leading to a > potentially invalid address. Don't do that then. It is only valid to cast intptr_t to and from void * or vm_offset_t. All of these can only represent virtual addresses, and converting virtual addresses to physical addresses by casting to vm_paddr_t gives garbage. The problem is that fb_pbase is a physical address misrepresented using [u]intptr_t. intptr_t for the virtual address fb_vbase is only a problem if fb_base is misrepresented by a larger unsigned type. > This was seen when running X on a PowerPC P1022 machine, which mapped the > backing framebuffer at 0xc1800000. When mmap()d by X, this yielded an invalid > address of 0xffffffffc1800000, or, as the hardware would see it, 0xfc1800000. On 32-bit arches, truncation still occurs at 4G (insted of sign extension at 2G). The sign extension bug would fix exotic arches where device memory is below 2G or above top_of_memory-2G. amd64 doesn't seem to be one of these. It puts the kernel near the top and uses sign extension tricks to reach it, but that is only virtual. > ... > Modified: head/sys/sys/fbio.h > ============================================================================== > --- head/sys/sys/fbio.h Wed Dec 6 02:00:09 2017 (r326610) > +++ head/sys/sys/fbio.h Wed Dec 6 02:05:21 2017 (r326611) > @@ -136,8 +136,8 @@ struct fb_info { > fb_leave_t *leave; > fb_setblankmode_t *setblankmode; > > - intptr_t fb_pbase; /* For FB mmap. */ > - intptr_t fb_vbase; /* if NULL, use fb_write/fb_read. */ > + uintptr_t fb_pbase; /* For FB mmap. */ > + uintptr_t fb_vbase; /* if NULL, use fb_write/fb_read. */ This breaks the warning for fb_pbase. fb_pbase is a physical address, so it cannot be represented by any intptr_t in general. Apparently it never holds a virtual address, since that would be confusing even if it is converted between virtual and physical correctly. fb_vbase is apparently a virtual address, so intptr_t was good enough for it. The broken code in dev/fb using these struct members is: X creator_vt.c: sc->fb.fb_pbase = phys; 'phys' has type bus_addr_t, so this assignment blindly truncates addresses on arches where bus_address_t != [u]intptr_t. The sign extension even fixes this on arches where intptr_t == int32_t, bus_addr_t == uint64_t, and physical addresses are in the lower or upper 2G of the bus space. Even vm_paddr_t is at least technically wrong for fb_pbase. Since the buffer is a frame buffer, its bus space is probably always memory, and bus_addr_t must be at least as large as vm_addr_t to represent any physical memory space, but bus_addr_t might be larger and actually use the extra bits to select a mapping method... Assignment is only correct if fb_base has type bus_addr_t and is treated as a cookie, but for mmap() of device memory there would have to be translation. X fbd.c: if (info->fb_pbase == 0) X fbd.c: *paddr = vtophys((uint8_t *)info->fb_vbase + offset); X fbd.c: else X fbd.c: *paddr = info->fb_pbase + offset; This is the translation code in fb_mmap(). 'offset' is the mmap offset which has type vm_ooffset_t which is hopefully large enough to represent any physical address, although of course it isn't (it is too small for /dev/kmem of 64-bit arches and also for /dev/mem on 64-bit arches if high physical addresses are used). The fb_pbase == 0 case partly correct. fb_vbase gives a virtual address and 'offset' must be small to give another virtual address, and the result is converted to a physical address. No overflow checking is done for the addition. fb_pbase != 0 means that fb_pbase gives a raw bus space address. 'offset' is presumably still small, but fb_pbase is already broken since it can only represent virtual addresses. As usual, no overflow checking is done for the addition. The assignment is also logically broken. The RHS should have type bus_addr_t, but mmap()'s API doesn't support that. *paddr has type vm_paddr_t, which might have a different size and representation. Callers have lots of casts to intptr_t for initializations of fb_vbase. These were not quite correct. They are mostly/always to convert from pointers to integral types to intptr_t, but intptr_t is only guaranteed to work for converting between void * and intptr_t. The sloppy casts works on vaxes because all pointers have the same representation. Now these casts have the additional error of a sign mismatch between the cast and the target type. This can cause sign extension bugs like the one fixed (I think intptr_t and uintptr_t can have different sizes. E.g., uintptr_t might be uint32_t but intptr_t might be int33_t or more likely int64_t to avoid sign extension bugs, or reverse this to expose sign extension bugs). Assignments to fb_pbase are usually not cast. The first one found by grep is perfect except for the broken target type. arm/.../*lcd.c assigns sc->sc_fb_phys to fb_pbase. The RHS has the correct type bus_addr_t, but the LHS can only represent virtual addresses. The second one is logically broken. arm/.../*fimd.c assigns fb_pbase to 'int reg;'. This works iff physical addresses are representable by ints on arm (perhaps using sign extension). Similarly in all MD code. dev/vt/.../ofwfb.c hard-codes a virtual == physical mapping on powerpc. "Early" output in sc and fb uses even harder coding. dev/drm2/.../radeon_fb.c assumes that 'resource_size_t aper_base' plus an offsets fits in fb_pbase. (A base isn't a size, but drm2 doesn't have a suitable type for bases, so it abuses its resource_size_t which is vm_paddr_t on FreeBSD. I think it should use rman_res_t which is uintmax_t. It was you that expaned rman_res_t to uintmax_t to make it work with resource spaces larger than the virtual address space. Anything smaller than uintmax_t risks not working if any of the other types involved is larger than the others. bus_addr_t has the same problem. But these types could be MD and as small as possible (uint32_t on i386 without PAE).) drm2 also has bugs printing these types. For fb_pbase, it assumes that the type is uintptr_t and uses the PRIXPTR mistake. This is now just a style bug since the type is now unsigned. For aper_base, it uses a bogus cast to unsigned long to break the warning and the value when the value is large. dev/terasic/.../*mtl_vt.c starts with an rman_res_t and truncates to [u]intptr_t. pmap_mapdev() takes a vm_paddr_t, but is called with the truncated copy. The correct conversions are approximately rman_res_t -> vm_paddr_t (no change in value) -> bus_addr_t (maybe change value) in fb_pbase; then back to vm_paddr_t to call pmap_mapdev() and put the result in fb_vbase. Bruce From owner-svn-src-head@freebsd.org Wed Dec 6 04:30:11 2017 Return-Path: Delivered-To: svn-src-head@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 DBFF3E8F629; Wed, 6 Dec 2017 04:30:11 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8EF6427EA; Wed, 6 Dec 2017 04:30:11 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MRLUeZWoZGvLHMRLVemPO6; Tue, 05 Dec 2017 21:30:10 -0700 X-Authority-Analysis: v=2.2 cv=a9pAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=ocR9PWop10UA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=rEqYXyXTbiSD_AIRaIoA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 48E562C8; Tue, 5 Dec 2017 20:30:08 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vB64U7GT068873; Tue, 5 Dec 2017 20:30:07 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vB64U74f068870; Tue, 5 Dec 2017 20:30:07 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712060430.vB64U74f068870@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Gleb Smirnoff cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326574 - head/usr.bin/logger In-Reply-To: Message from Gleb Smirnoff of "Tue, 05 Dec 2017 19:55:53 +0000." <201712051955.vB5Jtrwp079953@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 Dec 2017 20:30:07 -0800 X-CMAE-Envelope: MS4wfB8jkpawOHoOTQyjms6JmDRA2F/+QtDMOSfZJua7RohfLhABehrB73xCxTjQsBu3Qb+EMVErouwNIccnFzWn4mvR47vv6peT985lNAfkGpHyJEJRvUko ZMEZDWNaLISgAaCk1rdhWO/MsAHFW3abXtBl1E7ec9ymc5EBvOplhesKwkEJ4Tv8kRs0kWl3R8IJPDqjHr3IYbH7r0uYGdoJ4z5gOoB3uWlKWWHVmqRp/dGV VHEK1VN2GQhID0qQ0mVtMqx/qGaFnTiwPUzHOYvdRPIZisCNnaT0pEMgutkgvPA8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 04:30:12 -0000 In message <201712051955.vB5Jtrwp079953@repo.freebsd.org>, Gleb Smirnoff writes : > Author: glebius > Date: Tue Dec 5 19:55:53 2017 > New Revision: 326574 > URL: https://svnweb.freebsd.org/changeset/base/326574 > > Log: > Generate fully RFC3164 compliant messages, with timestamp and hostname. > Allow to set hostname to any string with -H. > > MFC after: 2 months > > Modified: > head/usr.bin/logger/logger.1 > head/usr.bin/logger/logger.c > > Modified: head/usr.bin/logger/logger.1 > ============================================================================= > = > --- head/usr.bin/logger/logger.1 Tue Dec 5 19:54:55 2017 (r32657 > 3) > +++ head/usr.bin/logger/logger.1 Tue Dec 5 19:55:53 2017 (r32657 > 4) > @@ -28,7 +28,7 @@ > .\" @(#)logger.1 8.1 (Berkeley) 6/6/93 > .\" $FreeBSD$ > .\" > -.Dd December 23, 2016 > +.Dd December 5, 2017 > .Dt LOGGER 1 > .Os > .Sh NAME > @@ -38,6 +38,7 @@ > .Nm > .Op Fl 46Ais > .Op Fl f Ar file > +.Op Fl H Ar hostname > .Op Fl h Ar host > .Op Fl P Ar port > .Op Fl p Ar pri > @@ -77,6 +78,11 @@ Log the message to standard error, as well as the syst > .It Fl f Ar file > Read the contents of the specified file into syslog. > This option is ignored when a message is also specified. > +.It Fl H Ar hostname > +Set the hostname in the header of the message to specified value. > +If not specified, host part of > +.Xr gethostname 3 > +will be used. > .It Fl h Ar host > Send the message to the remote system > .Ar host > > Modified: head/usr.bin/logger/logger.c > ============================================================================= > = > --- head/usr.bin/logger/logger.c Tue Dec 5 19:54:55 2017 (r32657 > 3) > +++ head/usr.bin/logger/logger.c Tue Dec 5 19:55:53 2017 (r32657 > 4) > @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)logger.c 8.1 (Berkeley) > 6/ > #include > __FBSDID("$FreeBSD$"); > > -#include > +#include > #include > #include > > @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > > #define SYSLOG_NAMES > @@ -71,8 +72,8 @@ static int decode(char *, const CODE *); > static int pencode(char *); > static ssize_t socksetup(const char *, const char *, const char *, > struct socks **); > -static void logmessage(int, const char *, struct socks *, ssize_t, > - const char *); > +static void logmessage(int, const char *, const char *, const char *, > + struct socks *, ssize_t, const char *); > static void usage(void); > > #ifdef INET6 > @@ -93,19 +94,22 @@ main(int argc, char *argv[]) > { > struct socks *socks; > ssize_t nsock; > + time_t now; > int ch, logflags, pri; > - char *tag, *host, buf[1024]; > + char *tag, *host, buf[1024], *timestamp, tbuf[26], > + *hostname, hbuf[MAXHOSTNAMELEN]; > const char *svcname, *src; > > tag = NULL; > host = NULL; > + hostname = NULL; > svcname = "syslog"; > src = NULL; > socks = NULL; > pri = LOG_USER | LOG_NOTICE; > logflags = 0; > unsetenv("TZ"); > - while ((ch = getopt(argc, argv, "46Af:h:iP:p:S:st:")) != -1) > + while ((ch = getopt(argc, argv, "46Af:H:h:iP:p:S:st:")) != -1) > switch((char)ch) { > case '4': > family = PF_INET; > @@ -123,6 +127,9 @@ main(int argc, char *argv[]) > err(1, "%s", optarg); > setvbuf(stdin, 0, _IONBF, 0); > break; > + case 'H': /* hostname to set in message header */ > + hostname = optarg; > + break; > case 'h': /* hostname to deliver to */ > host = optarg; > break; > @@ -168,6 +175,17 @@ main(int argc, char *argv[]) > openlog(tag, logflags, 0); > (void) fclose(stdout); > > + (void )time(&now); > + (void )ctime_r(&now, tbuf); > + tbuf[19] = '\0'; > + timestamp = tbuf + 4; > + > + if (hostname == NULL) { > + hostname = hbuf; > + (void )gethostname(hbuf, MAXHOSTNAMELEN); > + *strchr(hostname, '.') = '\0'; Hi Gleb, I'm getting a segfault here. [New LWP 101396] Core was generated by `logger -p daemon.notice -t local-dhclient(lagg0):4629 2 dhclient-script for inter'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000402152 in main (argc=, argv=) at /opt/src/svn-current/usr.bin/logger/logger.c:186 186 *strchr(hostname, '.') = '\0'; (gdb) bt #0 0x0000000000402152 in main (argc=, argv=) at /opt/src/svn-current/usr.bin/logger/logger.c:186 (gdb) > + } > + > /* log input line if appropriate */ > if (argc > 0) { > char *p, *endp; > @@ -176,11 +194,13 @@ main(int argc, char *argv[]) -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed Dec 6 04:40:54 2017 Return-Path: Delivered-To: svn-src-head@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 5C907E8FA2C; Wed, 6 Dec 2017 04:40:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 416962D50; Wed, 6 Dec 2017 04:40:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id vB64epl7040933 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Dec 2017 20:40:52 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id vB64ep3s040932; Tue, 5 Dec 2017 20:40:51 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 5 Dec 2017 20:40:51 -0800 From: Gleb Smirnoff To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326574 - head/usr.bin/logger Message-ID: <20171206044051.GF1056@FreeBSD.org> References: <201712051955.vB5Jtrwp079953@repo.freebsd.org> <201712060430.vB64U74f068870@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="/NkBOFFp2J2Af1nK" Content-Disposition: inline In-Reply-To: <201712060430.vB64U74f068870@slippy.cwsent.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 04:40:54 -0000 --/NkBOFFp2J2Af1nK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Cy, On Tue, Dec 05, 2017 at 08:30:07PM -0800, Cy Schubert wrote: C> Hi Gleb, C> C> I'm getting a segfault here. C> C> [New LWP 101396] C> Core was generated by `logger -p daemon.notice -t local-dhclient(lagg0):4629 C> 2 dhclient-script for inter'. C> Program terminated with signal SIGSEGV, Segmentation fault. C> #0 0x0000000000402152 in main (argc=, argv=) C> at /opt/src/svn-current/usr.bin/logger/logger.c:186 C> 186 *strchr(hostname, '.') = '\0'; C> (gdb) bt C> #0 0x0000000000402152 in main (argc=, argv=) C> at /opt/src/svn-current/usr.bin/logger/logger.c:186 C> (gdb) Mea culpa! Can you please test the attached patch? -- Gleb Smirnoff --/NkBOFFp2J2Af1nK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="logger.diff" Index: logger.c =================================================================== --- logger.c (revision 326614) +++ logger.c (working copy) @@ -183,7 +183,7 @@ main(int argc, char *argv[]) if (hostname == NULL) { hostname = hbuf; (void )gethostname(hbuf, MAXHOSTNAMELEN); - *strchr(hostname, '.') = '\0'; + *strchrnul(hostname, '.') = '\0'; } /* log input line if appropriate */ --/NkBOFFp2J2Af1nK-- From owner-svn-src-head@freebsd.org Wed Dec 6 04:59:06 2017 Return-Path: Delivered-To: svn-src-head@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 54058E9091D; Wed, 6 Dec 2017 04:59:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0522D3847; Wed, 6 Dec 2017 04:59:05 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id MRnMeLRiap2osMRnNewQDM; Tue, 05 Dec 2017 21:58:58 -0700 X-Authority-Analysis: v=2.2 cv=KLEqNBNo c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=ocR9PWop10UA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=3JR1sUh4GS8n-EOMUQQA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 51004303; Tue, 5 Dec 2017 20:58:56 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vB64wtfl005015; Tue, 5 Dec 2017 20:58:55 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vB64wtWS004930; Tue, 5 Dec 2017 20:58:55 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712060458.vB64wtWS004930@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Gleb Smirnoff cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326574 - head/usr.bin/logger In-Reply-To: Message from Gleb Smirnoff of "Tue, 05 Dec 2017 20:40:51 -0800." <20171206044051.GF1056@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 Dec 2017 20:58:55 -0800 X-CMAE-Envelope: MS4wfK4m3YjWUul60KXamsCTRNuaAnHXw9v0RW3bIQ2BCGdgJp/KQkVeKu6GmbmM88sGXrlH4xvYou/s94gF5ywn8FubsCMaJt9aH+qNikEYlDwNk724Glv8 i7SvJqGOe6AHQU/TXLQLxU7ADyS5Txew+6yFtznhBIS2AMi+vcohmtnyISKpm1Z7Z+FvrzfM37cXCCHKk9ahwdJ8ULUAZqepH0QdqO9qD6pyG3/JO6xrJjlb e92h690jkmVHyqwcPwiY+kbhyX+RYQRpWb6Vpsu6YfRDi65svWpraMNTxiZ0xlkU X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 04:59:06 -0000 In message <20171206044051.GF1056@FreeBSD.org>, Gleb Smirnoff writes: > > > --/NkBOFFp2J2Af1nK > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > Hi Cy, > > On Tue, Dec 05, 2017 at 08:30:07PM -0800, Cy Schubert wrote: > C> Hi Gleb, > C> > C> I'm getting a segfault here. > C> > C> [New LWP 101396] > C> Core was generated by `logger -p daemon.notice -t local-dhclient(lagg0):46 > 29 > C> 2 dhclient-script for inter'. > C> Program terminated with signal SIGSEGV, Segmentation fault. > C> #0 0x0000000000402152 in main (argc=, argv= > ) > C> at /opt/src/svn-current/usr.bin/logger/logger.c:186 > C> 186 *strchr(hostname, '.') = '\0'; > C> (gdb) bt > C> #0 0x0000000000402152 in main (argc=, argv= > ) > C> at /opt/src/svn-current/usr.bin/logger/logger.c:186 > C> (gdb) > > Mea culpa! Can you please test the attached patch? > > -- > Gleb Smirnoff > > --/NkBOFFp2J2Af1nK > Content-Type: text/x-diff; charset=us-ascii > Content-Disposition: attachment; filename="logger.diff" > > Index: logger.c > =================================================================== > --- logger.c (revision 326614) > +++ logger.c (working copy) > @@ -183,7 +183,7 @@ main(int argc, char *argv[]) > if (hostname == NULL) { > hostname = hbuf; > (void )gethostname(hbuf, MAXHOSTNAMELEN); > - *strchr(hostname, '.') = '\0'; > + *strchrnul(hostname, '.') = '\0'; > } > > /* log input line if appropriate */ > > --/NkBOFFp2J2Af1nK-- Fixed. Thanks! -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed Dec 6 05:18:53 2017 Return-Path: Delivered-To: svn-src-head@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 7E460E910BD; Wed, 6 Dec 2017 05:18:53 +0000 (UTC) (envelope-from imp@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 47476633EE; Wed, 6 Dec 2017 05:18:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB65IqXL015932; Wed, 6 Dec 2017 05:18:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB65IqtK015931; Wed, 6 Dec 2017 05:18:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712060518.vB65IqtK015931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 6 Dec 2017 05:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326615 - head/usr.sbin/bhyveload X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/bhyveload X-SVN-Commit-Revision: 326615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 05:18:53 -0000 Author: imp Date: Wed Dec 6 05:18:52 2017 New Revision: 326615 URL: https://svnweb.freebsd.org/changeset/base/326615 Log: De-const to match changes in userboot.h Sponsored by: Netflix Modified: head/usr.sbin/bhyveload/bhyveload.c Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Wed Dec 6 02:47:46 2017 (r326614) +++ head/usr.sbin/bhyveload/bhyveload.c Wed Dec 6 05:18:52 2017 (r326615) @@ -513,14 +513,14 @@ cb_getmem(void *arg, uint64_t *ret_lowmem, uint64_t *r } struct env { - const char *str; /* name=value */ + char *str; /* name=value */ SLIST_ENTRY(env) next; }; static SLIST_HEAD(envhead, env) envhead; static void -addenv(const char *str) +addenv(char *str) { struct env *env; From owner-svn-src-head@freebsd.org Wed Dec 6 06:50:50 2017 Return-Path: Delivered-To: svn-src-head@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 7F979E977F8; Wed, 6 Dec 2017 06:50:50 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59B2A660AB; Wed, 6 Dec 2017 06:50:50 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 90EDB5BED; Wed, 6 Dec 2017 06:50:49 +0000 (UTC) Date: Wed, 6 Dec 2017 06:50:49 +0000 From: Alexey Dokuchaev To: Conrad Meyer Cc: Cy Schubert , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Eitan Adler Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee Message-ID: <20171206065049.GA9434@FreeBSD.org> References: <201712052016.vB5KGc9T038423@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 06:50:50 -0000 [ Charset UTF-8 unsupported, converting... ] On Tue, Dec 05, 2017 at 01:06:40PM -0800, Conrad Meyer wrote: > On Tue, Dec 5, 2017 at 12:16 PM, Cy Schubert wrote: > > In message [...], Eitan Adler writes: > >> I'm not near my commit box right now so someone will have to revert > >> it. What's funny is that I ran a complete 'make buildworld > >> buildkernel' last night with this patch. > >> > >> Will respond to the rest of the thread later[.] > > > > No problem. r326575 addresses the issue. > > Not fully -- it doesn't address that the code is functionally broken or > that the change touched things it didn't need to. I think a revert is > still called for, when you can reach a machine with commit access. While it was already reverted, all the input so far raises a question of should it be readded even if/when fixed, since it apparently can be done with existing shell tools, in a better way [1]. I'd like us to have a smaller, orthogonal base, with tools not repeating themselves. ./danfe [1] https://lists.freebsd.org/pipermail/svn-src-head/2017-December/107001.html From owner-svn-src-head@freebsd.org Wed Dec 6 06:49:55 2017 Return-Path: Delivered-To: svn-src-head@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 24F1BE97639; Wed, 6 Dec 2017 06:49:55 +0000 (UTC) (envelope-from tsoome@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 E581C65F8E; Wed, 6 Dec 2017 06:49:54 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB66nsiJ052931; Wed, 6 Dec 2017 06:49:54 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB66nrIg052929; Wed, 6 Dec 2017 06:49:53 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201712060649.vB66nrIg052929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 6 Dec 2017 06:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326616 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 06:49:55 -0000 Author: tsoome Date: Wed Dec 6 06:49:53 2017 New Revision: 326616 URL: https://svnweb.freebsd.org/changeset/base/326616 Log: dhcp_try_rfc1048() is not used any more Remove unused function. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D13382 Modified: head/stand/libsa/bootp.c head/stand/libsa/bootp.h Modified: head/stand/libsa/bootp.c ============================================================================== --- head/stand/libsa/bootp.c Wed Dec 6 05:18:52 2017 (r326615) +++ head/stand/libsa/bootp.c Wed Dec 6 06:49:53 2017 (r326616) @@ -355,17 +355,6 @@ bad: return (-1); } -int -dhcp_try_rfc1048(u_char *cp, u_int len) -{ - - expected_dhcpmsgtype = DHCPACK; - if (bcmp(vm_rfc1048, cp, sizeof(vm_rfc1048)) == 0) { - return (vend_rfc1048(cp, len)); - } - return (-1); -} - static int vend_rfc1048(u_char *cp, u_int len) { Modified: head/stand/libsa/bootp.h ============================================================================== --- head/stand/libsa/bootp.h Wed Dec 6 05:18:52 2017 (r326615) +++ head/stand/libsa/bootp.h Wed Dec 6 06:49:53 2017 (r326616) @@ -146,6 +146,4 @@ struct cmu_vend { extern struct bootp *bootp_response; extern size_t bootp_response_size; -int dhcp_try_rfc1048(u_char *cp, u_int len); - #endif /* _BOOTP_H_ */ From owner-svn-src-head@freebsd.org Wed Dec 6 08:37:38 2017 Return-Path: Delivered-To: svn-src-head@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 6F4A5E996B3; Wed, 6 Dec 2017 08:37:38 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49AE46888D; Wed, 6 Dec 2017 08:37:38 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 87CB0693D; Wed, 6 Dec 2017 08:37:37 +0000 (UTC) Date: Wed, 6 Dec 2017 09:37:37 +0100 From: Baptiste Daroussin To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude Subject: Re: svn commit: r316980 - head/contrib/zstd/programs Message-ID: <20171206083736.mdodca65vr7xkc6g@ivaldir.net> References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xeg3w23sysplxwj6" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 08:37:38 -0000 --xeg3w23sysplxwj6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 05, 2017 at 05:17:22PM -0800, Conrad Meyer wrote: > Ping. Please revert this change. If you want zstd to behave this > way, pursue it upstream first. This is planned, for now I first need to modify newsyslog to accept more arguments for the compression program, then I'll switch back zstd to a vani= lla. I am not pushing into the direction of yet another hardlink >=20 > Thanks, > Conrad >=20 > On Wed, Nov 15, 2017 at 7:38 PM, Conrad Meyer wrote: > > Please revert this change. > > > > First, it introduces the POLA-violating behavior that zstdcat deletes > > its source files. This is not how zcat/bzcat behaves. > > > > Second, it introduces a needless behavioral difference between FreeBSD > > zstd and the rest of the world's zstd. The zstd documentation we ship > > continues to claim that zstd preserves source files by default, yet > > this change makes that documentation exactly backwards. While we can > > change FreeBSD's documentation to accommodate the change, we can't > > change Google results. > > > > Thanks, > > Conrad > > > > On Sat, Apr 15, 2017 at 1:15 PM, Baptiste Daroussin = wrote: > >> Author: bapt > >> Date: Sat Apr 15 20:15:44 2017 > >> New Revision: 316980 > >> URL: https://svnweb.freebsd.org/changeset/base/316980 > >> > >> Log: > >> Change some default to make zstd a dropin replacement for gzip,bzip = etc > >> in most cases > >> > >> Changes ares: > >> - quiet by default > >> - remove the source files one compression completion by default > >> > >> Modified: > >> head/contrib/zstd/programs/fileio.c > >> head/contrib/zstd/programs/zstdcli.c > >> > >> Modified: head/contrib/zstd/programs/fileio.c > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >> --- head/contrib/zstd/programs/fileio.c Sat Apr 15 20:06:24 2017 = (r316979) > >> +++ head/contrib/zstd/programs/fileio.c Sat Apr 15 20:15:44 2017 = (r316980) > >> @@ -138,7 +138,7 @@ static U32 g_dictIDFlag =3D 1; > >> void FIO_setDictIDFlag(unsigned dictIDFlag) { g_dictIDFlag =3D dictID= Flag; } > >> static U32 g_checksumFlag =3D 1; > >> void FIO_setChecksumFlag(unsigned checksumFlag) { g_checksumFlag =3D = checksumFlag; } > >> -static U32 g_removeSrcFile =3D 0; > >> +static U32 g_removeSrcFile =3D 1; > >> void FIO_setRemoveSrcFile(unsigned flag) { g_removeSrcFile =3D (flag>= 0); } > >> static U32 g_memLimit =3D 0; > >> void FIO_setMemLimit(unsigned memLimit) { g_memLimit =3D memLimit; } > >> > >> Modified: head/contrib/zstd/programs/zstdcli.c > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >> --- head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:06:24 20= 17 (r316979) > >> +++ head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:15:44 20= 17 (r316980) > >> @@ -61,7 +61,7 @@ > >> #define MB *(1 <<20) > >> #define GB *(1U<<30) > >> > >> -#define DEFAULT_DISPLAY_LEVEL 2 > >> +#define DEFAULT_DISPLAY_LEVEL 1 > >> > >> static const char* g_defaultDictName =3D "dictionary"; > >> static const unsigned g_defaultMaxDictSize =3D 110 KB; > >> --xeg3w23sysplxwj6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlonrEkACgkQY4mL3PG3 PlolXQ//fPBTzL5yexhQgfE5o2CeGpw1TkvVZVo6u9reDHwpy1n56RNdSixy5KK6 ixoAQHx4AvHjphR7Bkp1IBiWS8M1KaDK+mzCievc47CRLzBwNkOqTu7ujoe2f7WU 2l50DZ+U38SgnYvJMmA6W7b2GvY1NzmVgLXU06jZu4GajqegyKeqcgtwGkKcdfHP 8ATALsMW7U1ECTeqifokoOdE6xQ2lUxSZiPMt6xCIx2c342B2y3iHVWd9oBq/K78 o3KwqW/48pvXWeSOqFehPNr2zXlGgCaW/u+qH9nxiC8jloP3nnKNqFE6up+yFl3L LwDoEzAPVS6/PWmJfo53VmwuDpbZE9ddRnHhYj2aJhIGymSb1UpixGs3a4/Fx2/t TaElSab8TedoO0BPvSKYXPoz+GFi3hwwmH5xw8cHt4YmVoCmzz/mv7EQw7+ptj9q ZN9d3iO26muQfmQSOYol0x+xKY1aMyajnnsohxLRtogT0R40zzXW0zbktbtE1Ty/ nZAtXZfKQeyJCmR6cgEahmGUywRaOnDmF2vYJ2qcEjgCYE4hh4kNmRDB1sdrcyKa XZ2gnWhQkTFn+mMz1UQBIa2lJsF4XuBPLGb+UDp8yBwJZEm090BWoZtnC6RXIK5c z9jMyoiEQsmzP159j+d2kDhHCvFX+h0R1y9zvJ5NrS+Vp2uj6nw= =Sr+k -----END PGP SIGNATURE----- --xeg3w23sysplxwj6-- From owner-svn-src-head@freebsd.org Wed Dec 6 08:38:48 2017 Return-Path: Delivered-To: svn-src-head@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 AFEB8E9972E; Wed, 6 Dec 2017 08:38:48 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DBFD689FF; Wed, 6 Dec 2017 08:38:48 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id B1F106A89; Wed, 6 Dec 2017 08:38:47 +0000 (UTC) Date: Wed, 6 Dec 2017 09:38:47 +0100 From: Baptiste Daroussin To: Allan Jude Cc: cem@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316980 - head/contrib/zstd/programs Message-ID: <20171206083847.f4t5wdtf6toaua63@ivaldir.net> References: <201704152015.v3FKFiwZ006836@repo.freebsd.org> <89b00017-aa92-66ca-5a28-47f0eb8f399b@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="26zso3mqgppcsewa" Content-Disposition: inline In-Reply-To: <89b00017-aa92-66ca-5a28-47f0eb8f399b@freebsd.org> User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 08:38:48 -0000 --26zso3mqgppcsewa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 05, 2017 at 08:42:11PM -0500, Allan Jude wrote: > On 2017-12-05 20:17, Conrad Meyer wrote: > > Ping. Please revert this change. If you want zstd to behave this > > way, pursue it upstream first. > >=20 > > Thanks, > > Conrad > >=20 > > On Wed, Nov 15, 2017 at 7:38 PM, Conrad Meyer wrote: > >> Please revert this change. > >> > >> First, it introduces the POLA-violating behavior that zstdcat deletes > >> its source files. This is not how zcat/bzcat behaves. > >> > >> Second, it introduces a needless behavioral difference between FreeBSD > >> zstd and the rest of the world's zstd. The zstd documentation we ship > >> continues to claim that zstd preserves source files by default, yet > >> this change makes that documentation exactly backwards. While we can > >> change FreeBSD's documentation to accommodate the change, we can't > >> change Google results. > >> > >> Thanks, > >> Conrad > >> > >> On Sat, Apr 15, 2017 at 1:15 PM, Baptiste Daroussin = wrote: > >>> Author: bapt > >>> Date: Sat Apr 15 20:15:44 2017 > >>> New Revision: 316980 > >>> URL: https://svnweb.freebsd.org/changeset/base/316980 > >>> > >>> Log: > >>> Change some default to make zstd a dropin replacement for gzip,bzip= etc > >>> in most cases > >>> > >>> Changes ares: > >>> - quiet by default > >>> - remove the source files one compression completion by default > >>> > >>> Modified: > >>> head/contrib/zstd/programs/fileio.c > >>> head/contrib/zstd/programs/zstdcli.c > >>> > >>> Modified: head/contrib/zstd/programs/fileio.c > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >>> --- head/contrib/zstd/programs/fileio.c Sat Apr 15 20:06:24 2017 = (r316979) > >>> +++ head/contrib/zstd/programs/fileio.c Sat Apr 15 20:15:44 2017 = (r316980) > >>> @@ -138,7 +138,7 @@ static U32 g_dictIDFlag =3D 1; > >>> void FIO_setDictIDFlag(unsigned dictIDFlag) { g_dictIDFlag =3D dictI= DFlag; } > >>> static U32 g_checksumFlag =3D 1; > >>> void FIO_setChecksumFlag(unsigned checksumFlag) { g_checksumFlag =3D= checksumFlag; } > >>> -static U32 g_removeSrcFile =3D 0; > >>> +static U32 g_removeSrcFile =3D 1; > >>> void FIO_setRemoveSrcFile(unsigned flag) { g_removeSrcFile =3D (flag= >0); } > >>> static U32 g_memLimit =3D 0; > >>> void FIO_setMemLimit(unsigned memLimit) { g_memLimit =3D memLimit; } > >>> > >>> Modified: head/contrib/zstd/programs/zstdcli.c > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >>> --- head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:06:24 2= 017 (r316979) > >>> +++ head/contrib/zstd/programs/zstdcli.c Sat Apr 15 20:15:44 2= 017 (r316980) > >>> @@ -61,7 +61,7 @@ > >>> #define MB *(1 <<20) > >>> #define GB *(1U<<30) > >>> > >>> -#define DEFAULT_DISPLAY_LEVEL 2 > >>> +#define DEFAULT_DISPLAY_LEVEL 1 > >>> > >>> static const char* g_defaultDictName =3D "dictionary"; > >>> static const unsigned g_defaultMaxDictSize =3D 110 KB; > >>> > >=20 >=20 > Upstream recommends we create an additional hardlink, called 'zz' (like > xz but zstd), to do such compatibility, and keep 'zstd' the same as zstd > on every other distro. >=20 Actually I would prefer not to do it and simply adapt newsyslog to be more flexible. it is the only consumer of the zstd command. Bapt --26zso3mqgppcsewa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlonrJcACgkQY4mL3PG3 PlralQ/9H7S2z1dWwe7Z7EmcL4IjbpmOIYs2gx70GsdVzQWwtayDQomFNUNRCQM0 r+VVuyDAiV+Co38C/+ItkzxG5H++MCDzBQDDGdk4k/M5si9PyZLP0mFs6QVnlCwu UGtpV1UpHN+djpZc7HfIkiReJ6Y/2paXg2oVeD+RmHu7bcZgqI2vz7WxVP+J03cS 84xfNkhvfJb02NYqARE8fBHBITXkk5Y+gQWNtQkndQHtNnpWVJL0ZTdW6kyG2enw LuLhdiQLHPCN+q1CxtidsgEQgphth8khUPyfQLyxctWefuhL8JclaR4GD1iOdbIl BpZ09o9hH6gsxTWQ1urqChGff1XdcHxa2I8cI+32XILW/XiW4u9A2GR467DEjyBF P2PdSOLOG29Ylq45/E1z/moKFs4XX/2QbmpvtK12+wruvOsgf6i+5aQhtMzlBaZS ofJySbcM2O8bQdJ1/H0KikS0fBmKy6I6905LCvGYZKyy9mrUbfCMQ+zKtAHh8HPk pkYi4chLEbjcyjzkmH35JesY0cgFfxsdjyxvHZHo6ioV81nTO2VkMUe1ItE12qNx f8+2m3bIhGntZd2ejTWa/hIVlzvVzgPQvn9tWHSxu3+FFXpGDxVvPmGoz3PaYamk I1+M4ZBO2aqlMRbJF369cB5FlIcUJ0FbnGimIEH+VkNs6M1LzBI= =H5xT -----END PGP SIGNATURE----- --26zso3mqgppcsewa-- From owner-svn-src-head@freebsd.org Wed Dec 6 09:44:36 2017 Return-Path: Delivered-To: svn-src-head@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 EB5B4E9AB1F; Wed, 6 Dec 2017 09:44:36 +0000 (UTC) (envelope-from bapt@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 C2FF96AA93; Wed, 6 Dec 2017 09:44:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB69iZJK027555; Wed, 6 Dec 2017 09:44:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB69iZQe027554; Wed, 6 Dec 2017 09:44:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712060944.vB69iZQe027554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 09:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326617 - head/usr.sbin/newsyslog X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/newsyslog X-SVN-Commit-Revision: 326617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 09:44:37 -0000 Author: bapt Date: Wed Dec 6 09:44:35 2017 New Revision: 326617 URL: https://svnweb.freebsd.org/changeset/base/326617 Log: Allow newsyslog to execute compression commands which have a semantic different than the traditional gzip(1) This is done to allow to use zstd(1) as a compression tool without having to patch it to change its default behavior. Modified: head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 06:49:53 2017 (r326616) +++ head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 09:44:35 2017 (r326617) @@ -151,14 +151,23 @@ struct compress_types { const char *flag; /* Flag in configuration file */ const char *suffix; /* Compression suffix */ const char *path; /* Path to compression program */ + char **args; /* Comrpession arguments */ }; +static char f_arg[] = "-f"; +static char q_arg[] = "-q"; +static char rm_arg[] = "--rm"; +static char *gz_args[] ={ NULL, f_arg, NULL, NULL }; +#define bzip2_args gz_args +#define xz_args gz_args +static char *zstd_args[] = { NULL, q_arg, rm_arg, NULL, NULL }; + static const struct compress_types compress_type[COMPRESS_TYPES] = { - { "", "", "" }, /* no compression */ - { "Z", COMPRESS_SUFFIX_GZ, _PATH_GZIP }, /* gzip compression */ - { "J", COMPRESS_SUFFIX_BZ2, _PATH_BZIP2 }, /* bzip2 compression */ - { "X", COMPRESS_SUFFIX_XZ, _PATH_XZ }, /* xz compression */ - { "Y", COMPRESS_SUFFIX_ZST, _PATH_ZSTD } /* zst compression */ + { "", "", "", NULL}, /* none */ + { "Z", COMPRESS_SUFFIX_GZ, _PATH_GZIP, gz_args}, /* gzip */ + { "J", COMPRESS_SUFFIX_BZ2, _PATH_BZIP2, bzip2_args}, /* bzip2 */ + { "X", COMPRESS_SUFFIX_XZ, _PATH_XZ, xz_args }, /* xz */ + { "Y", COMPRESS_SUFFIX_ZST, _PATH_ZSTD, zstd_args } /* zst */ }; struct conf_entry { @@ -2001,6 +2010,8 @@ do_zipwork(struct zipwork_entry *zwork) int errsav, fcount, zstatus; pid_t pidzip, wpid; char zresult[MAXPATHLEN]; + char command[BUFSIZ]; + char **args; int c; assert(zwork != NULL); @@ -2013,6 +2024,7 @@ do_zipwork(struct zipwork_entry *zwork) pgm_path = compress_type[c].path; (void) strlcat(zresult, compress_type[c].suffix, sizeof(zresult)); + args = compress_type[c].args; break; } } @@ -2026,6 +2038,13 @@ do_zipwork(struct zipwork_entry *zwork) else pgm_name++; + args[0] = strdup(pgm_name); + if (args[0] == NULL) + err(1, "strdup()"); + for (c = 0; args[c] != NULL; c++) + ; + args[c] = zwork->zw_fname; + if (zwork->zw_swork != NULL && zwork->zw_swork->sw_runcmd == 0 && zwork->zw_swork->sw_pidok <= 0) { warnx( @@ -2035,6 +2054,11 @@ do_zipwork(struct zipwork_entry *zwork) return; } + strlcpy(command, pgm_path, sizeof(command)); + for (c = 1; args[c] != NULL; c++) { + strlcat(command, " ", sizeof(command)); + strlcat(command, args[c], sizeof(command)); + } if (noaction) { printf("\t%s %s\n", pgm_name, zwork->zw_fname); change_attrs(zresult, zwork->zw_conf); @@ -2058,8 +2082,8 @@ do_zipwork(struct zipwork_entry *zwork) } if (!pidzip) { /* The child process executes the compression command */ - execl(pgm_path, pgm_path, "-f", zwork->zw_fname, (char *)0); - err(1, "execl(`%s -f %s')", pgm_path, zwork->zw_fname); + execv(pgm_path, (char *const*) args); + err(1, "execv(`%s')", command); } wpid = waitpid(pidzip, &zstatus, 0); @@ -2069,13 +2093,12 @@ do_zipwork(struct zipwork_entry *zwork) return; } if (!WIFEXITED(zstatus)) { - warnx("`%s -f %s' did not terminate normally", pgm_name, - zwork->zw_fname); + warnx("`%s' did not terminate normally", command); return; } if (WEXITSTATUS(zstatus)) { - warnx("`%s -f %s' terminated with a non-zero status (%d)", - pgm_name, zwork->zw_fname, WEXITSTATUS(zstatus)); + warnx("`%s' terminated with a non-zero status (%d)", command, + WEXITSTATUS(zstatus)); return; } From owner-svn-src-head@freebsd.org Wed Dec 6 09:53:11 2017 Return-Path: Delivered-To: svn-src-head@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 80321E9AE37; Wed, 6 Dec 2017 09:53:11 +0000 (UTC) (envelope-from bapt@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 57C8A6B10B; Wed, 6 Dec 2017 09:53:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB69rAmE031511; Wed, 6 Dec 2017 09:53:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB69rAHN031509; Wed, 6 Dec 2017 09:53:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712060953.vB69rAHN031509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 09:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326618 - head/sys/contrib/zstd/programs X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/sys/contrib/zstd/programs X-SVN-Commit-Revision: 326618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 09:53:11 -0000 Author: bapt Date: Wed Dec 6 09:53:10 2017 New Revision: 326618 URL: https://svnweb.freebsd.org/changeset/base/326618 Log: Revert local changes made to make zstd(1) frontend behave like gzip(1) and friends This change was made to allow zstd(1) to be a dropin replacement for gzip(1) and friends, allowing easy integration, in particular with newsyslog(8). At the price of having a zstd(1) command which by default behaves differently than what upstream default, confusing users. newsyslog(8) has been adapted to now be more flexible in what it accepts as compression program, so we can switch back zstd(1) to its default behaviour Reported by: many Modified: head/sys/contrib/zstd/programs/fileio.c head/sys/contrib/zstd/programs/zstdcli.c Modified: head/sys/contrib/zstd/programs/fileio.c ============================================================================== --- head/sys/contrib/zstd/programs/fileio.c Wed Dec 6 09:44:35 2017 (r326617) +++ head/sys/contrib/zstd/programs/fileio.c Wed Dec 6 09:53:10 2017 (r326618) @@ -203,7 +203,7 @@ static U32 g_dictIDFlag = 1; void FIO_setDictIDFlag(unsigned dictIDFlag) { g_dictIDFlag = dictIDFlag; } static U32 g_checksumFlag = 1; void FIO_setChecksumFlag(unsigned checksumFlag) { g_checksumFlag = checksumFlag; } -static U32 g_removeSrcFile = 1; +static U32 g_removeSrcFile = 0; void FIO_setRemoveSrcFile(unsigned flag) { g_removeSrcFile = (flag>0); } static U32 g_memLimit = 0; void FIO_setMemLimit(unsigned memLimit) { g_memLimit = memLimit; } Modified: head/sys/contrib/zstd/programs/zstdcli.c ============================================================================== --- head/sys/contrib/zstd/programs/zstdcli.c Wed Dec 6 09:44:35 2017 (r326617) +++ head/sys/contrib/zstd/programs/zstdcli.c Wed Dec 6 09:53:10 2017 (r326618) @@ -68,7 +68,7 @@ #define MB *(1 <<20) #define GB *(1U<<30) -#define DISPLAY_LEVEL_DEFAULT 1 +#define DISPLAY_LEVEL_DEFAULT 2 static const char* g_defaultDictName = "dictionary"; static const unsigned g_defaultMaxDictSize = 110 KB; @@ -421,7 +421,7 @@ int main(int argCount, const char* argv[]) /* preset behaviors */ if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbThreads=0; if (exeNameMatch(programName, ZSTD_UNZSTD)) operation=zom_decompress; - if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; FIO_setRemoveSrcFile(0); } + if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; } if (exeNameMatch(programName, ZSTD_GZ)) { suffix = GZ_EXTENSION; FIO_setCompressionType(FIO_gzipCompression); FIO_setRemoveSrcFile(1); } /* behave like gzip */ if (exeNameMatch(programName, ZSTD_GUNZIP)) { operation=zom_decompress; FIO_setRemoveSrcFile(1); } /* behave like gunzip */ if (exeNameMatch(programName, ZSTD_GZCAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; } /* behave like gzcat */ From owner-svn-src-head@freebsd.org Wed Dec 6 10:15:36 2017 Return-Path: Delivered-To: svn-src-head@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 48882E9B746; Wed, 6 Dec 2017 10:15:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28D916C031; Wed, 6 Dec 2017 10:15:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 5C32382AF; Wed, 6 Dec 2017 10:15:35 +0000 (UTC) Date: Wed, 6 Dec 2017 10:15:35 +0000 From: Alexey Dokuchaev To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326617 - head/usr.sbin/newsyslog Message-ID: <20171206101535.GA8696@FreeBSD.org> References: <201712060944.vB69iZQe027554@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712060944.vB69iZQe027554@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 10:15:36 -0000 On Wed, Dec 06, 2017 at 09:44:35AM +0000, Baptiste Daroussin wrote: > New Revision: 326617 > URL: https://svnweb.freebsd.org/changeset/base/326617 > > Log: > Allow newsyslog to execute compression commands which > have a semantic different than the traditional gzip(1) > > This is done to allow to use zstd(1) as a compression tool without > having to patch it to change its default behavior. > > Modified: > head/usr.sbin/newsyslog/newsyslog.c > > Modified: head/usr.sbin/newsyslog/newsyslog.c > ============================================================================== > --- head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 06:49:53 2017 (r326616) > +++ head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 09:44:35 2017 (r326617) > @@ -151,14 +151,23 @@ struct compress_types { > const char *flag; /* Flag in configuration file */ > const char *suffix; /* Compression suffix */ > const char *path; /* Path to compression program */ > + char **args; /* Comrpession arguments */ Comrpession? > + strlcpy(command, pgm_path, sizeof(command)); > + for (c = 1; args[c] != NULL; c++) { > + strlcat(command, " ", sizeof(command)); > + strlcat(command, args[c], sizeof(command)); > + } I'm wondering if we should check strlcpy/strlcat() return values here and abort early if someone is trying to overrun command buffer? ./danfe From owner-svn-src-head@freebsd.org Wed Dec 6 10:20:02 2017 Return-Path: Delivered-To: svn-src-head@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 7AC67E9B7FB; Wed, 6 Dec 2017 10:20:02 +0000 (UTC) (envelope-from bapt@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 3F6596C1F2; Wed, 6 Dec 2017 10:20:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6AK1sl040259; Wed, 6 Dec 2017 10:20:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6AK1de040258; Wed, 6 Dec 2017 10:20:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712061020.vB6AK1de040258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 10:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326621 - head/usr.sbin/newsyslog X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/newsyslog X-SVN-Commit-Revision: 326621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 10:20:02 -0000 Author: bapt Date: Wed Dec 6 10:20:01 2017 New Revision: 326621 URL: https://svnweb.freebsd.org/changeset/base/326621 Log: Fix typo Reported by: danfe Modified: head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 10:06:00 2017 (r326620) +++ head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 10:20:01 2017 (r326621) @@ -151,7 +151,7 @@ struct compress_types { const char *flag; /* Flag in configuration file */ const char *suffix; /* Compression suffix */ const char *path; /* Path to compression program */ - char **args; /* Comrpession arguments */ + char **args; /* Compession arguments */ }; static char f_arg[] = "-f"; From owner-svn-src-head@freebsd.org Wed Dec 6 10:20:15 2017 Return-Path: Delivered-To: svn-src-head@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 AFA91E9B846; Wed, 6 Dec 2017 10:20:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 271326C32C; Wed, 6 Dec 2017 10:20:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 0DE73854F; Wed, 6 Dec 2017 10:20:12 +0000 (UTC) Date: Wed, 6 Dec 2017 11:20:11 +0100 From: Baptiste Daroussin To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326617 - head/usr.sbin/newsyslog Message-ID: <20171206102011.klh3jbcrat6ucdxb@ivaldir.net> References: <201712060944.vB69iZQe027554@repo.freebsd.org> <20171206101535.GA8696@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qo3a332lamiodjvp" Content-Disposition: inline In-Reply-To: <20171206101535.GA8696@FreeBSD.org> User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 10:20:15 -0000 --qo3a332lamiodjvp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 06, 2017 at 10:15:35AM +0000, Alexey Dokuchaev wrote: > On Wed, Dec 06, 2017 at 09:44:35AM +0000, Baptiste Daroussin wrote: > > New Revision: 326617 > > URL: https://svnweb.freebsd.org/changeset/base/326617 > >=20 > > Log: > > Allow newsyslog to execute compression commands which > > have a semantic different than the traditional gzip(1) > > =20 > > This is done to allow to use zstd(1) as a compression tool without > > having to patch it to change its default behavior. > >=20 > > Modified: > > head/usr.sbin/newsyslog/newsyslog.c > >=20 > > Modified: head/usr.sbin/newsyslog/newsyslog.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 06:49:53 2017 (r3266= 16) > > +++ head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 09:44:35 2017 (r3266= 17) > > @@ -151,14 +151,23 @@ struct compress_types { > > const char *flag; /* Flag in configuration file */ > > const char *suffix; /* Compression suffix */ > > const char *path; /* Path to compression program */ > > + char **args; /* Comrpession arguments */ >=20 > Comrpession? Fixed thanks >=20 > > + strlcpy(command, pgm_path, sizeof(command)); > > + for (c =3D 1; args[c] !=3D NULL; c++) { > > + strlcat(command, " ", sizeof(command)); > > + strlcat(command, args[c], sizeof(command)); > > + } >=20 > I'm wondering if we should check strlcpy/strlcat() return values here and > abort early if someone is trying to overrun command buffer? >=20 At worse we will have a truncated command to prompt in the debug/verbose informations, which imho is fine. Best regards, Bapt --qo3a332lamiodjvp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlonxFsACgkQY4mL3PG3 Plp0cA/7BiSj6ESTg+KjofanIIPMfywGk1g/Rq3fxRNVJGkRyjHzC04LqlU6dpMI h7YqLHsblbH763DEPxOtHhjK7EZFxINuaUTOxqsUai07wqaHGEH+HP38iUi7VvLb GhJNH5pZArsYNRITxbS7/qiwdmtIND/F5i90/MpwPH1zUFDkdE68rv55dggJFejw qnnBax1QfDgmPvanK1Fid6G6slFi/Vv++VGd8Up9gWgj9jQ5zDB4vFroEcpPDL5l 3bDPK33e8/LqL/XYdgN3k/f99pjzEX6180paT+QONg8SAZh7UNwN08LtbmuxbVIP brTVE+Hb0IiFDAWDJ0kAgu06wYv7SqaSIaeDtsKMtwHZxkN6PXp/xe5Itnt/8UZq Kie+98VkQ/F088Dv1oyP7ReBmkd7Ok2GcGat9j5TZ5HdxCovpeS5UqO4LV2GWNPq olCIzcNQlGd8V/iY0VvoXTTW4kFaofmxEfje+AcvbgzevldPRi0TwyaFvmvUY7Zo auFbkSgX5Qu31ZiC4MmF4B/plVmBWrnvJUa4OVefApd/5mCJDc0GoQy4W6i2fTcS jxAxG8n61fdhe7HnQ/cigw3LqZnKu+JuGh4EWgoTddIA+9OP1OLhVZ1pm6/KGdd3 QjakGgyxQBLo6VB/kA20tJprNoUCGR2eF5hpodVhs+aIYppECZ8= =UnYl -----END PGP SIGNATURE----- --qo3a332lamiodjvp-- From owner-svn-src-head@freebsd.org Wed Dec 6 10:41:34 2017 Return-Path: Delivered-To: svn-src-head@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 D6B12E9BF58; Wed, 6 Dec 2017 10:41:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8B3C6CE62; Wed, 6 Dec 2017 10:41:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 12BDE8876; Wed, 6 Dec 2017 10:41:34 +0000 (UTC) Date: Wed, 6 Dec 2017 10:41:34 +0000 From: Alexey Dokuchaev To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326621 - head/usr.sbin/newsyslog Message-ID: <20171206104134.GA27656@FreeBSD.org> References: <201712061020.vB6AK1de040258@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712061020.vB6AK1de040258@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 10:41:34 -0000 On Wed, Dec 06, 2017 at 10:20:01AM +0000, Baptiste Daroussin wrote: > New Revision: 326621 > URL: https://svnweb.freebsd.org/changeset/base/326621 > > Log: > Fix typo Still not fixed. > Reported by: danfe > > Modified: > head/usr.sbin/newsyslog/newsyslog.c > > Modified: head/usr.sbin/newsyslog/newsyslog.c > ============================================================================== > --- head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 10:06:00 2017 (r326620) > +++ head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 10:20:01 2017 (r326621) > @@ -151,7 +151,7 @@ struct compress_types { > const char *flag; /* Flag in configuration file */ > const char *suffix; /* Compression suffix */ > const char *path; /* Path to compression program */ > - char **args; /* Comrpession arguments */ > + char **args; /* Compession arguments */ Spelling is hard, I know. :-) Compession -> "Compression program arguments" perhaps? ./danfe From owner-svn-src-head@freebsd.org Wed Dec 6 10:47:51 2017 Return-Path: Delivered-To: svn-src-head@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 C3F65E9C135; Wed, 6 Dec 2017 10:47:51 +0000 (UTC) (envelope-from bapt@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 8E3FC6D0B9; Wed, 6 Dec 2017 10:47:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6Alos9052711; Wed, 6 Dec 2017 10:47:50 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6AlonV052710; Wed, 6 Dec 2017 10:47:50 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712061047.vB6AlonV052710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 10:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326622 - head/usr.sbin/newsyslog X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/newsyslog X-SVN-Commit-Revision: 326622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 10:47:51 -0000 Author: bapt Date: Wed Dec 6 10:47:50 2017 New Revision: 326622 URL: https://svnweb.freebsd.org/changeset/base/326622 Log: Really fix typo and improve wording of the comment Modified: head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 10:20:01 2017 (r326621) +++ head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 10:47:50 2017 (r326622) @@ -151,7 +151,7 @@ struct compress_types { const char *flag; /* Flag in configuration file */ const char *suffix; /* Compression suffix */ const char *path; /* Path to compression program */ - char **args; /* Compession arguments */ + char **args; /* Compression program arguments */ }; static char f_arg[] = "-f"; From owner-svn-src-head@freebsd.org Wed Dec 6 10:48:25 2017 Return-Path: Delivered-To: svn-src-head@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 8D4BDE9C191; Wed, 6 Dec 2017 10:48:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BFD06D204; Wed, 6 Dec 2017 10:48:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 9927F8B25; Wed, 6 Dec 2017 10:48:24 +0000 (UTC) Date: Wed, 6 Dec 2017 11:48:24 +0100 From: Baptiste Daroussin To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326621 - head/usr.sbin/newsyslog Message-ID: <20171206104824.lwsaqqzvsoyqqcob@ivaldir.net> References: <201712061020.vB6AK1de040258@repo.freebsd.org> <20171206104134.GA27656@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mucwans7ar7ohs4e" Content-Disposition: inline In-Reply-To: <20171206104134.GA27656@FreeBSD.org> User-Agent: NeoMutt/20171027 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 10:48:25 -0000 --mucwans7ar7ohs4e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 06, 2017 at 10:41:34AM +0000, Alexey Dokuchaev wrote: > On Wed, Dec 06, 2017 at 10:20:01AM +0000, Baptiste Daroussin wrote: > > New Revision: 326621 > > URL: https://svnweb.freebsd.org/changeset/base/326621 > >=20 > > Log: > > Fix typo >=20 > Still not fixed. >=20 > > Reported by: danfe > >=20 > > Modified: > > head/usr.sbin/newsyslog/newsyslog.c > >=20 > > Modified: head/usr.sbin/newsyslog/newsyslog.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 10:06:00 2017 (r3266= 20) > > +++ head/usr.sbin/newsyslog/newsyslog.c Wed Dec 6 10:20:01 2017 (r3266= 21) > > @@ -151,7 +151,7 @@ struct compress_types { > > const char *flag; /* Flag in configuration file */ > > const char *suffix; /* Compression suffix */ > > const char *path; /* Path to compression program */ > > - char **args; /* Comrpession arguments */ > > + char **args; /* Compession arguments */ >=20 > Spelling is hard, I know. :-) meh >=20 > Compession -> "Compression program arguments" perhaps? done :) Thanks, Bapt --mucwans7ar7ohs4e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlonyvYACgkQY4mL3PG3 PlracA//WYHtdR6fRR2DUBRzNhl5QDkkbPJSX9T+wzlRh0TN+anes+rHFTFpkDmi b7eYTu5bzv2ylDRO6mJINQCDrOzk8s+VRlOqEI5CcQtHcbSdvIg2qP6awWxz+36g JuIsAXG1sdgJ4OB1f4y7UxgnbmapO9x8qlPAVrhwWkb3BL5ub+9xrpyQVZx4wdl8 7Dc/s8F2o0WfeLdZBWgYHeLnpzjcKZDLrWlWqdJnDdsXVLjKVwOYlE4VQt77nvOH uEtIQ9L3pDx5FrbaVJVMynyE2xeSVBzbnpu4U8iWJKz5QD4XwKcv5wSaQdotKrO9 oajQL9YWr1LnVE0CJqtEwMGbdGUVkZ3VA9XhSuz+1wjV7SyoStOAy3rn1vLn54yW maSBY5nV+7wf+jUfyBnPgPsQRDExv3FrIrkXhI0vEv8Ly3LSSP2nfcsLE0uDVnW+ sYu5Z3aRptYCaXRIFIz39LXrS+kZw3cSBgNCrhkGhNPQN4nv+Wx1Es6I+4YUn8CV rXNPYlFaIBiChUosFC/kuvA2LFVfKHUVgOAOfTAqsd3ahWRj4RbgOW/tGxOAmu57 GecwrHWhc86oVUomibME1McS5IqXydTPhhu+oDegm7/Fov0sWPc50orGfILeTQAW fO7/VTaau8Alt0DFiMKs6KE66iAWHyW/9yg8S0tQnENNKxvCoe4= =4NkE -----END PGP SIGNATURE----- --mucwans7ar7ohs4e-- From owner-svn-src-head@freebsd.org Wed Dec 6 14:53:54 2017 Return-Path: Delivered-To: svn-src-head@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 8E12EE822D7; Wed, 6 Dec 2017 14:53:54 +0000 (UTC) (envelope-from kevans@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 5ABB5750FF; Wed, 6 Dec 2017 14:53:54 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6Err0I057417; Wed, 6 Dec 2017 14:53:53 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6ErrcQ057416; Wed, 6 Dec 2017 14:53:53 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201712061453.vB6ErrcQ057416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 6 Dec 2017 14:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326623 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 326623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 14:53:54 -0000 Author: kevans Date: Wed Dec 6 14:53:53 2017 New Revision: 326623 URL: https://svnweb.freebsd.org/changeset/base/326623 Log: aw_mp.c: use argument name in macros Rather than relying on 'cluster' existing in the context they're used in, use the argument name. Differential Revision: https://reviews.freebsd.org/D12931 Modified: head/sys/arm/allwinner/aw_mp.c Modified: head/sys/arm/allwinner/aw_mp.c ============================================================================== --- head/sys/arm/allwinner/aw_mp.c Wed Dec 6 10:47:50 2017 (r326622) +++ head/sys/arm/allwinner/aw_mp.c Wed Dec 6 14:53:53 2017 (r326623) @@ -83,13 +83,13 @@ __FBSDID("$FreeBSD$"); #define CPUCFG_DBGCTL0 0x1e0 #define CPUCFG_DBGCTL1 0x1e4 -#define CPUS_CL_RST(cl) (0x30 + (cluster) * 0x4) -#define CPUX_CL_CTRL0(cl) (0x0 + (cluster) * 0x10) -#define CPUX_CL_CTRL1(cl) (0x4 + (cluster) * 0x10) -#define CPUX_CL_CPU_STATUS(cl) (0x30 + (cluster) * 0x4) -#define CPUX_CL_RST(cl) (0x80 + (cluster) * 0x4) -#define PRCM_CL_PWROFF(cl) (0x100 + (cluster) * 0x4) -#define PRCM_CL_PWR_CLAMP(cl, cpu) (0x140 + (cluster) * 0x4 + (cpu) * 0x4) +#define CPUS_CL_RST(cl) (0x30 + (cl) * 0x4) +#define CPUX_CL_CTRL0(cl) (0x0 + (cl) * 0x10) +#define CPUX_CL_CTRL1(cl) (0x4 + (cl) * 0x10) +#define CPUX_CL_CPU_STATUS(cl) (0x30 + (cl) * 0x4) +#define CPUX_CL_RST(cl) (0x80 + (cl) * 0x4) +#define PRCM_CL_PWROFF(cl) (0x100 + (cl) * 0x4) +#define PRCM_CL_PWR_CLAMP(cl, cpu) (0x140 + (cl) * 0x4 + (cpu) * 0x4) void aw_mp_setmaxid(platform_t plat) From owner-svn-src-head@freebsd.org Wed Dec 6 17:01:26 2017 Return-Path: Delivered-To: svn-src-head@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 62510E85706; Wed, 6 Dec 2017 17:01:26 +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 2D59179B5C; Wed, 6 Dec 2017 17:01:26 +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 vB6H1PTH011395; Wed, 6 Dec 2017 17:01:25 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6H1PDN011394; Wed, 6 Dec 2017 17:01:25 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712061701.vB6H1PDN011394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 6 Dec 2017 17:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326624 - head/sys/cam/ata X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/cam/ata X-SVN-Commit-Revision: 326624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 17:01:26 -0000 Author: asomers Date: Wed Dec 6 17:01:25 2017 New Revision: 326624 URL: https://svnweb.freebsd.org/changeset/base/326624 Log: cam: fix sign-extension error in adagetparams adagetparams contains a sign-extension error that will cause the sector count to be incorrectly calculated for ATA disks of >=1TiB that still use CHS addressing. Disks using LBA48 addressing are unaffected. Reported by: Coverity CID: 1007296 Reviewed by: ken MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13198 Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Dec 6 14:53:53 2017 (r326623) +++ head/sys/cam/ata/ata_da.c Wed Dec 6 17:01:25 2017 (r326624) @@ -3377,7 +3377,8 @@ adagetparams(struct cam_periph *periph, struct ccb_get dp->heads = cgd->ident_data.heads; dp->secs_per_track = cgd->ident_data.sectors; dp->cylinders = cgd->ident_data.cylinders; - dp->sectors = cgd->ident_data.cylinders * dp->heads * dp->secs_per_track; + dp->sectors = cgd->ident_data.cylinders * + (u_int32_t)(dp->heads * dp->secs_per_track); } lbasize = (u_int32_t)cgd->ident_data.lba_size_1 | ((u_int32_t)cgd->ident_data.lba_size_2 << 16); From owner-svn-src-head@freebsd.org Wed Dec 6 17:50:12 2017 Return-Path: Delivered-To: svn-src-head@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 04D8BE87251; Wed, 6 Dec 2017 17:50:12 +0000 (UTC) (envelope-from glebius@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 C5D157B90F; Wed, 6 Dec 2017 17:50:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6HoAtO030309; Wed, 6 Dec 2017 17:50:10 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6HoAA8030308; Wed, 6 Dec 2017 17:50:10 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201712061750.vB6HoAA8030308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 6 Dec 2017 17:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326625 - head/usr.bin/logger X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/usr.bin/logger X-SVN-Commit-Revision: 326625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 17:50:12 -0000 Author: glebius Date: Wed Dec 6 17:50:10 2017 New Revision: 326625 URL: https://svnweb.freebsd.org/changeset/base/326625 Log: Fix crash with a dotless hostname. Modified: head/usr.bin/logger/logger.c Modified: head/usr.bin/logger/logger.c ============================================================================== --- head/usr.bin/logger/logger.c Wed Dec 6 17:01:25 2017 (r326624) +++ head/usr.bin/logger/logger.c Wed Dec 6 17:50:10 2017 (r326625) @@ -183,7 +183,7 @@ main(int argc, char *argv[]) if (hostname == NULL) { hostname = hbuf; (void )gethostname(hbuf, MAXHOSTNAMELEN); - *strchr(hostname, '.') = '\0'; + *strchrnul(hostname, '.') = '\0'; } /* log input line if appropriate */ From owner-svn-src-head@freebsd.org Wed Dec 6 17:52:02 2017 Return-Path: Delivered-To: svn-src-head@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 D63DFE87471; Wed, 6 Dec 2017 17:52:02 +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 9C4527BCA7; Wed, 6 Dec 2017 17:52:02 +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 vB6Hq1fA031861; Wed, 6 Dec 2017 17:52:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6Hq1LZ031860; Wed, 6 Dec 2017 17:52:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712061752.vB6Hq1LZ031860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 6 Dec 2017 17:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326626 - head/lib/libproc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/lib/libproc X-SVN-Commit-Revision: 326626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 17:52:02 -0000 Author: markj Date: Wed Dec 6 17:52:01 2017 New Revision: 326626 URL: https://svnweb.freebsd.org/changeset/base/326626 Log: Use a global extern declaration to appease gcc. Reported by: gjb X-MFC with: r326498 Modified: head/lib/libproc/proc_create.c Modified: head/lib/libproc/proc_create.c ============================================================================== --- head/lib/libproc/proc_create.c Wed Dec 6 17:50:10 2017 (r326625) +++ head/lib/libproc/proc_create.c Wed Dec 6 17:52:01 2017 (r326626) @@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$"); #include "_libproc.h" +extern char * const *environ; + static int getelfclass(int); static int proc_init(pid_t, int, int, struct proc_handle **); @@ -179,7 +181,6 @@ int proc_create(const char *file, char * const *argv, char * const *envp, proc_child_func *pcf, void *child_arg, struct proc_handle **pphdl) { - extern char * const *environ; struct proc_handle *phdl; int error, status; pid_t pid; From owner-svn-src-head@freebsd.org Wed Dec 6 18:11:41 2017 Return-Path: Delivered-To: svn-src-head@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 CC320E87EFE; Wed, 6 Dec 2017 18:11:41 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from pv33p00im-asmtp002.me.com (pv33p00im-asmtp002.me.com [17.142.194.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF1F97CA4B; Wed, 6 Dec 2017 18:11:41 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.pv33p00im-asmtp002.me.com by pv33p00im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P0J00J00U0GKB00@pv33p00im-asmtp002.me.com>; Wed, 06 Dec 2017 17:11:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=04042017; t=1512580294; bh=fojFQGsXXuy1w19bay9ml+nPKYzoSUpbPNB8Ebu/Njg=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=Hau5nADUBB5zKZyTbgJafuA3jg51LdmRopWT+iMlFTVo/A+SL5VUwS7CQhlAiRoRE v71yVrwQ/zgU86+o20QgsWWG1LjDg7CT3260kq+oVUes/aEwmSE1BkAgSr7qZ+etOY 8WcE4h5BFkwQKqgzaI83BY+CnzQ4mxPukLW4Z5wEoxHMv6CWFDi9shiVlSEMRosWwX fMnwCMdauESPx0jAaki2gDphN2OGQVHfXXO8kjelKcY7P7G+9hVb9ID9X5e5MfIjWD 7YgHloX1y4FDFZOwkcOM55SZPMOM5Trl5VTsqzI6UzeNFHpL4eC50/QqO+sSPCugxw a/4mBMeSt5yGw== Received: from icloud.com ([127.0.0.1]) by pv33p00im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P0J002IFUF3XC00@pv33p00im-asmtp002.me.com>; Wed, 06 Dec 2017 17:11:28 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-06_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1712060245 User-Agent: Microsoft-MacOutlook/f.28.0.171108 Date: Wed, 06 Dec 2017 09:11:26 -0800 Subject: Re: svn commit: r326624 - head/sys/cam/ata From: Ravi Pokala To: Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: Thread-topic: svn commit: r326624 - head/sys/cam/ata References: <201712061701.vB6H1PDN011394@repo.freebsd.org> In-reply-to: <201712061701.vB6H1PDN011394@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 18:11:41 -0000 > ... disks of >=1TiB that still use CHS addressing. Out of morbid curiosity, are there any such monstrosities? -Ravi (rpokala@) -----Original Message----- From: on behalf of Alan Somers Date: 2017-12-06, Wednesday at 09:01 To: , , Subject: svn commit: r326624 - head/sys/cam/ata Author: asomers Date: Wed Dec 6 17:01:25 2017 New Revision: 326624 URL: https://svnweb.freebsd.org/changeset/base/326624 Log: cam: fix sign-extension error in adagetparams adagetparams contains a sign-extension error that will cause the sector count to be incorrectly calculated for ATA disks of >=1TiB that still use CHS addressing. Disks using LBA48 addressing are unaffected. Reported by: Coverity CID: 1007296 Reviewed by: ken MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13198 Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Dec 6 14:53:53 2017 (r326623) +++ head/sys/cam/ata/ata_da.c Wed Dec 6 17:01:25 2017 (r326624) @@ -3377,7 +3377,8 @@ adagetparams(struct cam_periph *periph, struct ccb_get dp->heads = cgd->ident_data.heads; dp->secs_per_track = cgd->ident_data.sectors; dp->cylinders = cgd->ident_data.cylinders; - dp->sectors = cgd->ident_data.cylinders * dp->heads * dp->secs_per_track; + dp->sectors = cgd->ident_data.cylinders * + (u_int32_t)(dp->heads * dp->secs_per_track); } lbasize = (u_int32_t)cgd->ident_data.lba_size_1 | ((u_int32_t)cgd->ident_data.lba_size_2 << 16); From owner-svn-src-head@freebsd.org Wed Dec 6 18:11:57 2017 Return-Path: Delivered-To: svn-src-head@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 BF483E87F53; Wed, 6 Dec 2017 18:11:57 +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 8C5277CBB4; Wed, 6 Dec 2017 18:11:57 +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 vB6IBuHJ039126; Wed, 6 Dec 2017 18:11:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6IBu34039125; Wed, 6 Dec 2017 18:11:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201712061811.vB6IBu34039125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Dec 2017 18:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326628 - head/contrib/tcpdump X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/tcpdump X-SVN-Commit-Revision: 326628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 18:11:57 -0000 Author: emaste Date: Wed Dec 6 18:11:56 2017 New Revision: 326628 URL: https://svnweb.freebsd.org/changeset/base/326628 Log: tcpdump: remove undesired svn:keywords property from contrib Reported by: glebius MFC after: 6 days MFC with: r326613 Modified: Directory Properties: head/contrib/tcpdump/ (props changed) head/contrib/tcpdump/funcattrs.h (props changed) From owner-svn-src-head@freebsd.org Wed Dec 6 18:13:54 2017 Return-Path: Delivered-To: svn-src-head@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 1B33AE88046; Wed, 6 Dec 2017 18:13:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DF6F97CDBD; Wed, 6 Dec 2017 18:13:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id vB6IDqr1066934 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Dec 2017 10:13:52 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id vB6IDqek066933; Wed, 6 Dec 2017 10:13:52 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Dec 2017 10:13:52 -0800 From: Gleb Smirnoff To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326628 - head/contrib/tcpdump Message-ID: <20171206181352.GH1056@FreeBSD.org> References: <201712061811.vB6IBu34039125@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712061811.vB6IBu34039125@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 18:13:54 -0000 On Wed, Dec 06, 2017 at 06:11:56PM +0000, Ed Maste wrote: E> Author: emaste E> Date: Wed Dec 6 18:11:56 2017 E> New Revision: 326628 E> URL: https://svnweb.freebsd.org/changeset/base/326628 E> E> Log: E> tcpdump: remove undesired svn:keywords property from contrib Thanks! -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Wed Dec 6 18:15:46 2017 Return-Path: Delivered-To: svn-src-head@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 4481FE880FA; Wed, 6 Dec 2017 18:15:46 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) (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 BB66F7CF28; Wed, 6 Dec 2017 18:15:45 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22d.google.com with SMTP id x20so5293101lff.1; Wed, 06 Dec 2017 10:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=FUBdHa+zIai9Hm9dMDNke1pRB9Xe5eTPNU7YOyX28xQ=; b=kQB47EN8TgrgGVAlJqBOGeB9MUpcnDlZ+DP/903oo4x+5zmNzG9k6I6ByyPw/2mD5D ogaq91BU4D7+lx2EVrOquQOAX59R4bVSByw0h5N/eEaIumZZJHtpYz4Q+LAm3OHxhEov xnwDX9bw6atVlnkgICWuiTiAH1JZhuBVeXwyL81XHCu3vus8ONh/1ulsqglQVVnQskNh dSfU3Npw9SRWqiIqHORo2RpEFm1VGOPhGXV6JkromuhZzKJemgFK8+mBfWURXM524AgZ QLVJkV+L40VQbwl4ghqNV/R/WL4xpGzZMk6QeIN1ROh4cT5tTOHzqoVPjDX/FsT1xqFU wTfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=FUBdHa+zIai9Hm9dMDNke1pRB9Xe5eTPNU7YOyX28xQ=; b=RANrjOao/vyZZtLpuxPuCV+CBpCF9KTvG4TI19rsSQziY1iNiqZYcGR8L11plPdi9h UnulgqgRmtAKXu4RJmPMCBEmnBFwiEVXKKZTevj/IqKLffxvyzzuzIO2cWzMzZyfTnYN +p8tv9kQwJ5H6U+lmFxK9DTJnb4xzcQ5wvGSX5R2ZXV67OwXAxi56v+bo6eu+dBHNKkN SppnLLdTSz5C/uFjYF9SuMRO+76KI3EWWTiFULbfdNiuZywn+6dtnkcaxLe0LM83XRU4 Nat6Nqtg2dkBYNvIuTgN1e/HpDBaVujpqFDW2MrX3mPjyHgT4Xq/LaYCGOedAyqKc/j8 lUNw== X-Gm-Message-State: AJaThX7KGFYrCRvt+00uJN1LgdaabdaiRvj3yKdWZNBP3ETcasPi8jDo o2LCZPgfCqBBMdZ25R1JKwMLZIMXuLKtrTDCgeI= X-Google-Smtp-Source: AGs4zMaGtJ4WaTEvtHZPBTqdGSvf3JOYr1tjIV07N7rYyprVlydC1IPwSLzSUWG9l0AN+lRKHOQbBb5zZNNP0pWrgJw= X-Received: by 10.46.41.25 with SMTP id u25mr14475177lje.130.1512584143360; Wed, 06 Dec 2017 10:15:43 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.76.19 with HTTP; Wed, 6 Dec 2017 10:15:42 -0800 (PST) In-Reply-To: References: <201712061701.vB6H1PDN011394@repo.freebsd.org> From: Alan Somers Date: Wed, 6 Dec 2017 11:15:42 -0700 X-Google-Sender-Auth: 4-M0yez-gVBFntNImCzaejLoIUk Message-ID: Subject: Re: svn commit: r326624 - head/sys/cam/ata To: Ravi Pokala Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 18:15:46 -0000 Nope. The ATA spec prohibited them, and nobody ever manufactured any. But you might be able to fake one with CTL or QEMU or something similar. On Wed, Dec 6, 2017 at 10:11 AM, Ravi Pokala wrote: > > ... disks of >=1TiB that still use CHS addressing. > > Out of morbid curiosity, are there any such monstrosities? > > -Ravi (rpokala@) > > -----Original Message----- > From: on behalf of Alan Somers > > Date: 2017-12-06, Wednesday at 09:01 > To: , , < > svn-src-head@freebsd.org> > Subject: svn commit: r326624 - head/sys/cam/ata > > Author: asomers > Date: Wed Dec 6 17:01:25 2017 > New Revision: 326624 > URL: https://svnweb.freebsd.org/changeset/base/326624 > > Log: > cam: fix sign-extension error in adagetparams > > adagetparams contains a sign-extension error that will cause the sector > count to be incorrectly calculated for ATA disks of >=1TiB that still use > CHS addressing. Disks using LBA48 addressing are unaffected. > > Reported by: Coverity > CID: 1007296 > Reviewed by: ken > MFC after: 3 weeks > Sponsored by: Spectra Logic Corp > Differential Revision: https://reviews.freebsd.org/D13198 > > Modified: > head/sys/cam/ata/ata_da.c > > Modified: head/sys/cam/ata/ata_da.c > ============================================================ > ================== > --- head/sys/cam/ata/ata_da.c Wed Dec 6 14:53:53 2017 (r326623) > +++ head/sys/cam/ata/ata_da.c Wed Dec 6 17:01:25 2017 (r326624) > @@ -3377,7 +3377,8 @@ adagetparams(struct cam_periph *periph, struct > ccb_get > dp->heads = cgd->ident_data.heads; > dp->secs_per_track = cgd->ident_data.sectors; > dp->cylinders = cgd->ident_data.cylinders; > - dp->sectors = cgd->ident_data.cylinders * dp->heads * > dp->secs_per_track; > + dp->sectors = cgd->ident_data.cylinders * > + (u_int32_t)(dp->heads * dp->secs_per_track); > } > lbasize = (u_int32_t)cgd->ident_data.lba_size_1 | > ((u_int32_t)cgd->ident_data.lba_size_2 << 16); > > > > > From owner-svn-src-head@freebsd.org Wed Dec 6 18:36:56 2017 Return-Path: Delivered-To: svn-src-head@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 26F5EE8897E; Wed, 6 Dec 2017 18:36:56 +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 E7E0E7DD6E; Wed, 6 Dec 2017 18:36:55 +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 vB6IatIH051790; Wed, 6 Dec 2017 18:36:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6IatCU051789; Wed, 6 Dec 2017 18:36:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712061836.vB6IatCU051789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 6 Dec 2017 18:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326629 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 326629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 18:36:56 -0000 Author: markj Date: Wed Dec 6 18:36:54 2017 New Revision: 326629 URL: https://svnweb.freebsd.org/changeset/base/326629 Log: Use unique wait messages in the page daemon control loop. Discussed with: alc MFC after: 1 week Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Dec 6 18:11:56 2017 (r326628) +++ head/sys/vm/vm_pageout.c Wed Dec 6 18:36:54 2017 (r326629) @@ -1818,7 +1818,7 @@ vm_pageout_worker(void *arg) */ mtx_unlock(&vm_page_queue_free_mtx); if (pass >= 1) - pause("psleep", hz / VM_INACT_SCAN_RATE); + pause("pwait", hz / VM_INACT_SCAN_RATE); pass++; } else { /* From owner-svn-src-head@freebsd.org Wed Dec 6 20:05:37 2017 Return-Path: Delivered-To: svn-src-head@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 6AF70E8AE5D; Wed, 6 Dec 2017 20:05:37 +0000 (UTC) (envelope-from bapt@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 37F8780B5E; Wed, 6 Dec 2017 20:05:37 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6K5avE089303; Wed, 6 Dec 2017 20:05:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6K5axo089302; Wed, 6 Dec 2017 20:05:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712062005.vB6K5axo089302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 20:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326630 - head/usr.bin/sdiff X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/sdiff X-SVN-Commit-Revision: 326630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 20:05:37 -0000 Author: bapt Date: Wed Dec 6 20:05:36 2017 New Revision: 326630 URL: https://svnweb.freebsd.org/changeset/base/326630 Log: Fix -Wincompatible-pointer-types-discards-qualifiers warnings MFC after: 1 week Modified: head/usr.bin/sdiff/sdiff.c Modified: head/usr.bin/sdiff/sdiff.c ============================================================================== --- head/usr.bin/sdiff/sdiff.c Wed Dec 6 18:36:54 2017 (r326629) +++ head/usr.bin/sdiff/sdiff.c Wed Dec 6 20:05:36 2017 (r326630) @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" -#define DIFF_PATH "/usr/bin/diff" +static char diff_path[] = "/usr/bin/diff"; #define WIDTH 126 /* @@ -213,9 +213,11 @@ main(int argc, char **argv) int ch, fd[2] = {-1}, status; pid_t pid=0; const char *outfile = NULL; - char **diffargv, *diffprog = DIFF_PATH, *filename1, *filename2, + char **diffargv, *diffprog = diff_path, *filename1, *filename2, *tmp1, *tmp2, *s1, *s2; int i; + char I_arg[] = "-I"; + char speed_lf[] = "--speed-large-files"; /* * Process diff flags. @@ -269,14 +271,14 @@ main(int argc, char **argv) sprintf(diffargv[1], "%s%c", diffargv[1], ch); break; case 'H': - diffargv[diffargc++] = "--speed-large-files"; + diffargv[diffargc++] = speed_lf; break; case DIFFPROG_OPT: diffargv[0] = diffprog = optarg; break; case 'I': Iflag = 1; - diffargv[diffargc++] = "-I"; + diffargv[diffargc++] = I_arg; diffargv[diffargc++] = optarg; break; case 'l': From owner-svn-src-head@freebsd.org Wed Dec 6 20:09:31 2017 Return-Path: Delivered-To: svn-src-head@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 AA667E8AFA0; Wed, 6 Dec 2017 20:09:31 +0000 (UTC) (envelope-from bapt@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 7753D80D66; Wed, 6 Dec 2017 20:09:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6K9Uv7089467; Wed, 6 Dec 2017 20:09:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6K9UJS089466; Wed, 6 Dec 2017 20:09:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712062009.vB6K9UJS089466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 20:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326631 - head/usr.bin/sdiff X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/sdiff X-SVN-Commit-Revision: 326631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 20:09:31 -0000 Author: bapt Date: Wed Dec 6 20:09:30 2017 New Revision: 326631 URL: https://svnweb.freebsd.org/changeset/base/326631 Log: Rename variables confusing gcc 4.2.1 While there is no reason it shadows div(3) gcc 4.2.1 complains about it MFC after: 1 week Modified: head/usr.bin/sdiff/sdiff.c Modified: head/usr.bin/sdiff/sdiff.c ============================================================================== --- head/usr.bin/sdiff/sdiff.c Wed Dec 6 20:05:36 2017 (r326630) +++ head/usr.bin/sdiff/sdiff.c Wed Dec 6 20:09:30 2017 (r326631) @@ -618,7 +618,7 @@ QUIT: * Takes into account that tabs can take multiple columns. */ static void -println(const char *s1, const char div, const char *s2) +println(const char *s1, const char divider, const char *s2) { size_t col; @@ -635,7 +635,7 @@ println(const char *s1, const char div, const char *s2 putchar(' '); /* Only print left column. */ - if (div == ' ' && !s2) { + if (divider == ' ' && !s2) { printf(" (\n"); return; } @@ -645,10 +645,10 @@ println(const char *s1, const char div, const char *s2 * need to add the space for padding. */ if (!s2) { - printf(" %c\n", div); + printf(" %c\n", divider); return; } - printf(" %c ", div); + printf(" %c ", divider); col += 3; /* Skip angle bracket and space. */ @@ -870,14 +870,14 @@ parsecmd(FILE *diffpipe, FILE *file1, FILE *file2) * Queues up a diff line. */ static void -enqueue(char *left, char div, char *right) +enqueue(char *left, char divider, char *right) { struct diffline *diffp; if (!(diffp = malloc(sizeof(struct diffline)))) err(2, "enqueue"); diffp->left = left; - diffp->div = div; + diffp->div = divider; diffp->right = right; STAILQ_INSERT_TAIL(&diffhead, diffp, diffentries); } From owner-svn-src-head@freebsd.org Wed Dec 6 20:10:06 2017 Return-Path: Delivered-To: svn-src-head@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 BD6BAE8B038; Wed, 6 Dec 2017 20:10:06 +0000 (UTC) (envelope-from bapt@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 877C480EB3; Wed, 6 Dec 2017 20:10:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6KA56m089554; Wed, 6 Dec 2017 20:10:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6KA5a4089553; Wed, 6 Dec 2017 20:10:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712062010.vB6KA5a4089553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 20:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326632 - head/usr.bin/sdiff X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/sdiff X-SVN-Commit-Revision: 326632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 20:10:06 -0000 Author: bapt Date: Wed Dec 6 20:10:05 2017 New Revision: 326632 URL: https://svnweb.freebsd.org/changeset/base/326632 Log: sdiff(1) can now be built defaults warning level Modified: head/usr.bin/sdiff/Makefile Modified: head/usr.bin/sdiff/Makefile ============================================================================== --- head/usr.bin/sdiff/Makefile Wed Dec 6 20:09:30 2017 (r326631) +++ head/usr.bin/sdiff/Makefile Wed Dec 6 20:10:05 2017 (r326632) @@ -4,7 +4,6 @@ PROG= sdiff SRCS= edit.c sdiff.c -WARNS= 3 MAN1= sdiff.1 From owner-svn-src-head@freebsd.org Wed Dec 6 20:23:39 2017 Return-Path: Delivered-To: svn-src-head@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 D4849E8B526; Wed, 6 Dec 2017 20:23:39 +0000 (UTC) (envelope-from bapt@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 A1E45185E; Wed, 6 Dec 2017 20:23:39 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6KNcTx097894; Wed, 6 Dec 2017 20:23:38 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6KNcLu097893; Wed, 6 Dec 2017 20:23:38 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712062023.vB6KNcLu097893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 20:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326633 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 326633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 20:23:39 -0000 Author: bapt Date: Wed Dec 6 20:23:38 2017 New Revision: 326633 URL: https://svnweb.freebsd.org/changeset/base/326633 Log: Update to 2017-12-06 MFC after: 2 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Wed Dec 6 20:10:05 2017 (r326632) +++ head/share/misc/pci_vendors Wed Dec 6 20:23:38 2017 (r326633) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.10.21 -# Date: 2017-10-21 03:15:01 +# Version: 2017.12.06 +# Date: 2017-12-06 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -751,6 +751,7 @@ 131b Kaveri [Radeon R4 Graphics] 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] + 15dd Radeon Vega 8 Mobile 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s 3150 RV380/M24 [Mobility Radeon X600] @@ -1629,6 +1630,7 @@ 6623 Mars 6631 Oland 6640 Saturn XT [FirePro M6100] + 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] 6641 Saturn PRO [Radeon HD 8930M] 6646 Bonaire XT [Radeon R9 M280X] 6647 Bonaire PRO [Radeon R9 M270X] @@ -2370,7 +2372,8 @@ 6828 Cape Verde PRO [FirePro W600] 6829 Cape Verde 682a Venus PRO - 682b Venus LE [Radeon HD 8830M] + 682b Venus LE / Tropo PRO-L [Radeon HD 8830M / R7 M465X] + 0128 079c Radeon R7 465X 682c Cape Verde GL [FirePro W4100] 682d Chelsea XT GL [FirePro M4000] 682f Chelsea LP [Radeon HD 7730M] @@ -2504,6 +2507,7 @@ 144d c0c7 Radeon HD 7550M 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] + 6861 Vega 10 XT [Radeon PRO WX 9100] 6863 Vega 10 XTX [Radeon Vega Frontier Edition] 687f Vega 10 XT [Radeon RX Vega 64] 6888 Cypress XT [FirePro V8800] @@ -4037,6 +4041,7 @@ 141f Family 15h (Models 30h-3fh) Processor Function 5 1422 Family 15h (Models 30h-3fh) Processor Root Complex 1423 Family 15h (Models 30h-3fh) I/O Memory Management Unit + 1424 Family 15h (Models 30h-3fh) Processor Root Port 1426 Family 15h (Models 30h-3fh) Processor Root Port 1436 Liverpool Processor Root Complex 1437 Liverpool I/O Memory Management Unit @@ -4045,6 +4050,7 @@ 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit 1452 Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge + 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B 1456 Family 17h (Models 00h-0fh) Platform Security Processor 1457 Family 17h (Models 00h-0fh) HD Audio Controller @@ -5217,6 +5223,7 @@ 3020 Samurai_IDE 1043 ASUSTeK Computer Inc. 0464 Radeon R9 270x GPU + 0521 RX580 [RX 580 Dual O8G] 0675 ISDNLink P-IN100-ST-D 0675 1704 ISDN Adapter (PCI Bus, D, C) 0675 1707 ISDN Adapter (PCI Bus, DV, W) @@ -6176,6 +6183,7 @@ 103c 12dd 4Gb Fibre Channel [AB429A] 2432 ISP2432-based 4Gb Fibre Channel to PCI Express HBA 103c 7040 FC1142SR 4Gb 1-port PCIe Fibre Channel Host Bus Adapter [HPAE311A] + 1077 0137 QLE2460 4 GB PCI-X Host-Bus-Adapter 2532 ISP2532-based 8Gb Fibre Channel to PCI Express HBA 1014 041e FC EN0Y/EN12 PCIe2 LP 8 Gb 4-port Fibre Channel Adapter for POWER 103c 3262 StorageWorks 81Q @@ -6227,6 +6235,10 @@ 1077 000b 25GE 2P QL41262HxCU-DE Adapter 1077 0011 FastLinQ QL41212H 25GbE Adapter 1077 0012 FastLinQ QL41112H 10GbE Adapter + 1590 021d 10/25GbE 2P QL41222HLCU-HP Adapter + 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter + 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter + 1590 0220 10/25GbE 2P QL41122HLRJ-HP Adapter 8080 FastLinQ QL41000 Series 10/25/40/50GbE Controller (FCoE) 1077 0001 10GE 2P QL41162HxRJ-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter @@ -6247,6 +6259,8 @@ 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter (SR-IOV VF) 1077 0011 FastLinQ QL41212H 25GbE Adapter (SR-IOV VF) 1077 0012 FastLinQ QL41112H 10GbE Adapter (SR-IOV VF) + 1590 021e 10/25GbE 2P QL41162HMRJ-HP Adapter + 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter 8430 ISP8324 1/10GbE Converged Network Controller (NIC VF) 8431 8300 Series 10GbE Converged Network Adapter (FCoE VF) 8432 ISP2432M-based 10GbE Converged Network Adapter (CNA) @@ -10853,6 +10867,8 @@ 1725 GP100 172e GP100 172f GP100 + 174d GM108M [GeForce MX130] + 174e GM108M [GeForce MX110] 17c2 GM200 [GeForce GTX TITAN X] 17c8 GM200 [GeForce GTX 980 Ti] 17f0 GM200GL [Quadro M6000] @@ -10868,7 +10884,7 @@ 1b78 GP102GL 1b80 GP104 [GeForce GTX 1080] 1b81 GP104 [GeForce GTX 1070] - 1b82 GP104 + 1b82 GP104 [GeForce GTX 1070 Ti] 1b83 GP104 1b84 GP104 [GeForce GTX 1060 3GB] 1b87 GP104 [P104-100] @@ -10882,7 +10898,7 @@ 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL [Quadro P4000] 1bb3 GP104GL [Tesla P4] - 1bb4 GP104GL + 1bb4 GP104GL [Tesla P6] 1bb5 GP104GLM [Quadro P5200 Mobile] 1bb6 GP104GLM [Quadro P5000 Mobile] 1bb7 GP104GLM [Quadro P4000 Mobile] @@ -10933,6 +10949,7 @@ 103c 21d4 StoreFabric CN1200E 10Gb Converged Network Adapter 103c 220a FlexFabric 10Gb 2-port 556FLR-SFP+ Adapter 103c 803f Ethernet 10Gb 2-port 557SFP+ Adapter + 103c 8144 FlexFabric 10GB 2-port 556FLR-T Adapter 17aa 1056 ThinkServer OCm14102-UX-L AnyFabric 17aa 1057 ThinkServer OCm14104-UX-L AnyFabric 17aa 1059 ThinkServer OCm14104-UT-L AnyFabric @@ -11263,6 +11280,7 @@ 8821 RTL8821AE 802.11ac PCIe Wireless Network Adapter b723 RTL8723BE PCIe Wireless Network Adapter 10ec 8739 Dell Wireless 1801 + c821 RTL8821CE 802.11ac PCIe Wireless Network Adapter 10ed Ascii Corporation 7310 V7310 10ee Xilinx Corporation @@ -12565,6 +12583,8 @@ 1131 4f61 Activy DVB-S Budget Rev GR 1131 5f61 Activy DVB-T Budget 114b 2003 DVRaptor Video Edit/Capture Card + 1159 0040 MuTech M-Vision 500 (MV-500 rev. E) + 1159 0050 MuTech M-Vision 500 (MV-500 rev. F) 11bd 0006 DV500 Overlay 11bd 000a DV500 Overlay 11bd 000f DV500 Overlay @@ -13021,7 +13041,7 @@ 3011 Tokenet/vg 1001/10m anylan 9050 Lanfleet/Truevalue 9051 Lanfleet/Truevalue -1159 Mutech Corp +1159 MuTech Corporation 0001 MV-1000 0002 MV-1500 115a Harlequin Ltd @@ -15480,9 +15500,9 @@ 1392 Medialight Inc 1393 Moxa Technologies Co Ltd 0001 UC7000 Serial - 1020 CP102 (2-port RS-232 PCI) - 1021 CP102UL (2-port RS-232 Universal PCI) - 1022 CP102U (2-port RS-232 Universal PCI) + 1020 CP-102 (2-port RS-232 PCI) + 1021 CP-102UL (2-port RS-232 Universal PCI) + 1022 CP-102U (2-port RS-232 Universal PCI) 1023 CP-102UF 1024 CP-102E (2-port RS-232 Smart PCI Express Serial Board) 1025 CP-102EL (2-port RS-232 Smart PCI Express Serial Board) @@ -15509,7 +15529,7 @@ 1380 CP138U (8-port RS-232/422/485 Smart Universal PCI) 1680 Smartio C168H/PCI 1681 CP-168U V2 Smart Serial Board (8-port RS-232) - 1682 CP168EL (8-port RS-232 Smart PCI Express) + 1682 CP-168EL (8-port RS-232 Smart PCI Express) 1683 CP-168EL-A (8-port RS-232 PCI Express Serial Board) 2040 Intellio CP-204J 2180 Intellio C218 Turbo PCI @@ -16588,6 +16608,7 @@ 6083 T62100-6083 Unified Wire Ethernet Controller 6084 T64100-6084 Unified Wire Ethernet Controller 6085 T6240-6085 Unified Wire Ethernet Controller + 6086 T6225-6086 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16607,6 +16628,7 @@ 6483 T62100-6083 Unified Wire Ethernet Controller 6484 T64100-6084 Unified Wire Ethernet Controller 6485 T6240-6085 Unified Wire Ethernet Controller + 6486 T6225-6086 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16626,6 +16648,7 @@ 6583 T62100-6083 Unified Wire Storage Controller 6584 T64100-6084 Unified Wire Storage Controller 6585 T6240-6085 Unified Wire Storage Controller + 6586 T6225-6086 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16645,6 +16668,7 @@ 6683 T62100-6083 Unified Wire Storage Controller 6684 T64100-6084 Unified Wire Storage Controller 6685 T6240-6085 Unified Wire Storage Controller + 6686 T6225-6086 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16664,6 +16688,7 @@ 6883 T62100-6083 Unified Wire Ethernet Controller [VF] 6884 T64100-6084 Unified Wire Ethernet Controller [VF] 6885 T6240-6085 Unified Wire Ethernet Controller [VF] + 6886 T6225-6086 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -17303,6 +17328,7 @@ 169d NetLink BCM5789 Gigabit Ethernet PCI Express 16a0 NetLink BCM5785 Fast Ethernet 16a1 BCM57840 NetXtreme II 10 Gigabit Ethernet + 1043 866e PEB-10G/57840-2T 10GBase-T Network Adapter 16a2 BCM57840 NetXtreme II 10/20-Gigabit Ethernet 103c 1916 FlexFabric 20Gb 2-port 630FLB Adapter 103c 1917 FlexFabric 20Gb 2-port 630M Adapter @@ -17427,7 +17453,8 @@ 14e4 1404 BCM957414M4142 OCP 2x25G Type1 wRoCE 1590 020e Ethernet 25Gb 2-port 631SFP28 Adapter 1590 0211 Ethernet 25Gb 2-port 631FLR-SFP28 Adapter - 16d8 BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller + 16d8 BCM57416 NetXtreme-E Dual-Media 10G RDMA Ethernet Controller + 1028 1feb NetXtreme-E 10Gb SFP+ Adapter 1590 020c Ethernet 10Gb 2-port 535T Adapter 1590 0212 Ethernet 10Gb 2-port 535FLR-T Adapter 16d9 BCM57417 NetXtreme-E 10GBASE-T RDMA Ethernet Controller @@ -21984,6 +22011,7 @@ 0897 Centrino Wireless-N 130 8086 5015 Centrino Wireless-N 130 BGN 8086 5017 Centrino Wireless-N 130 BG + 08a7 Quark SoC X1000 SDIO / eMMC Controller 08ae Centrino Wireless-N 100 8086 1005 Centrino Wireless-N 100 BGN 8086 1007 Centrino Wireless-N 100 BG @@ -22182,6 +22210,12 @@ 8086 8370 Dual Band Wireless AC 3160 # PowerVR SGX 545 08cf Atom Processor Z2760 Integrated Graphics Controller + 0934 Quark SoC X1000 I2C Controller and GPIO Controller + 0935 Quark SoC X1000 SPI Controller + 0936 Quark SoC X1000 HS-UART + 0937 Quark SoC X1000 10/100 Ethernet MAC + 0939 Quark SoC X1000 USB EHCI Host Controller / USB 2.0 Device + 093a Quark SoC X1000 USB OHCI Host Controller 0953 PCIe Data Center SSD 8086 3702 DC P3700 SSD 8086 3703 DC P3700 SSD [2.5" SFF] @@ -22191,6 +22225,7 @@ 8086 370a DC P3600 SSD [2.5" SFF] 8086 370d SSD 750 Series [Add-in Card] 8086 370e SSD 750 Series [2.5" SFF] + 0958 Quark SoC X1000 Host Bridge 095a Wireless 7265 # Stone Peak 2 AC 8086 1010 Dual Band Wireless-AC 7265 @@ -22277,6 +22312,7 @@ 8086 5310 Dual Band Wireless-AC 7265 # Stone Peak 2 AGN 8086 9200 Dual Band Wireless-AC 7265 + 095e Quark SoC X1000 Legacy Bridge 0960 80960RP (i960RP) Microprocessor/Bridge 0962 80960RM (i960RM) Bridge 0964 80960RP (i960RP) Microprocessor/Bridge @@ -23077,6 +23113,8 @@ 11a1 Merrifield Power Management Unit 11a2 Merrifield Serial IO DMA Controller 11a5 Merrifield Serial IO PWM Controller + 11c3 Quark SoC X1000 PCIe Root Port 0 + 11c4 Quark SoC X1000 PCIe Root Port 1 1200 IXP1200 Network Processor 172a 0000 AEP SSL Accelerator 1209 8255xER/82551IT Fast Ethernet Controller @@ -23392,6 +23430,7 @@ 108e 7b14 Sun Dual Port 10 GbE PCIe 2.0 ExpressModule, Base-T 108e 7b15 Sun Dual Port 10 GbE PCIe 2.0 Low Profile Adapter, Base-T 1137 00bf Ethernet Converged Network Adapter X540-T2 + 1170 0052 Ethernet Controller 10-Gigabit X540-AT2 17aa 1073 ThinkServer X540-T2 AnyFabric 17aa 4006 Ethernet Controller 10-Gigabit X540-AT2 1bd4 001a 10G base-T DP ER102Ti3 Rack Adapter @@ -23512,6 +23551,7 @@ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ 8086 000e Ethernet Server Adapter OCP X710-2 + 8086 000f Ethernet Server Adapter OCP X710-2 8086 0010 Ethernet Converged Network Adapter X710 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ @@ -23622,6 +23662,7 @@ 15c8 Ethernet Connection X553/X557-AT 10GBASE-T 15ce Ethernet Connection X553 10 GbE SFP+ 15d0 Ethernet SDI Adapter FM10420-100GbE-QDA2 + 8086 0001 Ethernet SDI Adapter FM10420-100GbE-QDA2 15d1 Ethernet Controller 10G X550T 8086 0002 Ethernet Converged Network Adapter X550-T1 8086 001b Ethernet Server Adapter X550-T1 for OCP From owner-svn-src-head@freebsd.org Wed Dec 6 21:00:42 2017 Return-Path: Delivered-To: svn-src-head@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 9B452E8BE3A; Wed, 6 Dec 2017 21:00:42 +0000 (UTC) (envelope-from bdrewery@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 68772298C; Wed, 6 Dec 2017 21:00:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6L0fGK011161; Wed, 6 Dec 2017 21:00:41 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6L0fA7011160; Wed, 6 Dec 2017 21:00:41 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712062100.vB6L0fA7011160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 6 Dec 2017 21:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326634 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 326634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 21:00:42 -0000 Author: bdrewery Date: Wed Dec 6 21:00:41 2017 New Revision: 326634 URL: https://svnweb.freebsd.org/changeset/base/326634 Log: AUTO_OBJ: Don't create nested OBJDIRS with print-dir or make -n. Sponsored by: Dell EMC Modified: head/share/mk/bsd.obj.mk Modified: head/share/mk/bsd.obj.mk ============================================================================== --- head/share/mk/bsd.obj.mk Wed Dec 6 20:23:38 2017 (r326633) +++ head/share/mk/bsd.obj.mk Wed Dec 6 21:00:41 2017 (r326634) @@ -55,7 +55,8 @@ CANONICALOBJDIR= ${.OBJDIR} # Handle special case where SRCS is full-pathed and requires # nested objdirs. This duplicates some auto.obj.mk logic. .if (!empty(SRCS:M*/*) || !empty(DPSRCS:M*/*)) && \ - (${.TARGETS} == "" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} != "") + (${.TARGETS} == "" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} != "") && \ + !make(print-dir) && empty(.MAKEFLAGS:M-[nN]) _wantdirs= ${SRCS:M*/*:H} ${DPSRCS:M*/*:H} .if !empty(_wantdirs) _wantdirs:= ${_wantdirs:O:u} From owner-svn-src-head@freebsd.org Wed Dec 6 21:12:25 2017 Return-Path: Delivered-To: svn-src-head@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 CC64BE8C41D; Wed, 6 Dec 2017 21:12:25 +0000 (UTC) (envelope-from stevek@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 996113175; Wed, 6 Dec 2017 21:12:25 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6LCOlG019070; Wed, 6 Dec 2017 21:12:24 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6LCOWN019069; Wed, 6 Dec 2017 21:12:24 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201712062112.vB6LCOWN019069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Wed, 6 Dec 2017 21:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326635 - head/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: stevek X-SVN-Commit-Paths: head/lib/libc/stdio X-SVN-Commit-Revision: 326635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 21:12:25 -0000 Author: stevek Date: Wed Dec 6 21:12:24 2017 New Revision: 326635 URL: https://svnweb.freebsd.org/changeset/base/326635 Log: The function fwscanf() return value is wrong when encountering an early matching failure. According to the Open Group documentation for fwscanf: "Upon successful completion, these functions shall return the number of successfully matched and assigned input items; this number can be zero in the event of an early matching failure." Without this change, fwscanf would return EOF in the case of an early matching failure, instead of the proper return value of 0. This change aligns fwscanf(3) with the implementation in fscanf(3). PR: 202240 Submitted by: rajendra.sy@gmail.com Reviewed by: jhb, cem Approved by: sjg (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D13288 Modified: head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfwscanf.c ============================================================================== --- head/lib/libc/stdio/vfwscanf.c Wed Dec 6 21:00:41 2017 (r326634) +++ head/lib/libc/stdio/vfwscanf.c Wed Dec 6 21:12:24 2017 (r326635) @@ -494,7 +494,7 @@ literal: goto input_failure; if (wi != c) { __ungetwc(wi, fp, locale); - goto input_failure; + goto match_failure; } nread++; continue; From owner-svn-src-head@freebsd.org Wed Dec 6 21:18:46 2017 Return-Path: Delivered-To: svn-src-head@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 AD2AFE8C573; Wed, 6 Dec 2017 21:18:46 +0000 (UTC) (envelope-from stevek@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 7A350341B; Wed, 6 Dec 2017 21:18:46 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6LIjRJ019390; Wed, 6 Dec 2017 21:18:45 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6LIjgL019389; Wed, 6 Dec 2017 21:18:45 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201712062118.vB6LIjgL019389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Wed, 6 Dec 2017 21:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326636 - head/contrib/binutils/libiberty X-SVN-Group: head X-SVN-Commit-Author: stevek X-SVN-Commit-Paths: head/contrib/binutils/libiberty X-SVN-Commit-Revision: 326636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 21:18:46 -0000 Author: stevek Date: Wed Dec 6 21:18:45 2017 New Revision: 326636 URL: https://svnweb.freebsd.org/changeset/base/326636 Log: The function make_relative_prefix_1 does not properly free locally allocated memory when it returns early. Free the memory associated with the variables full_programe, bin_dirs, prog_dirs, and prefix_dirs when the function returns early. Submitted by: Tom Rix Reviewed by: jhibbits, emaste Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9691 Modified: head/contrib/binutils/libiberty/make-relative-prefix.c Modified: head/contrib/binutils/libiberty/make-relative-prefix.c ============================================================================== --- head/contrib/binutils/libiberty/make-relative-prefix.c Wed Dec 6 21:12:24 2017 (r326635) +++ head/contrib/binutils/libiberty/make-relative-prefix.c Wed Dec 6 21:18:45 2017 (r326636) @@ -299,10 +299,18 @@ make_relative_prefix_1 (const char *progname, const ch full_progname = strdup(progname); prog_dirs = split_directories (full_progname, &prog_num); - bin_dirs = split_directories (bin_prefix, &bin_num); + if (prog_dirs == NULL) + { + free (full_progname); + return NULL; + } free (full_progname); - if (bin_dirs == NULL || prog_dirs == NULL) - return NULL; + bin_dirs = split_directories (bin_prefix, &bin_num); + if (bin_dirs == NULL) + { + free_split_directories(prog_dirs); + return NULL; + } /* Remove the program name from comparison of directory names. */ prog_num--; @@ -365,7 +373,12 @@ make_relative_prefix_1 (const char *progname, const ch ret = (char *) malloc (needed_len); if (ret == NULL) - return NULL; + { + free_split_directories (prog_dirs); + free_split_directories (bin_dirs); + free_split_directories (prefix_dirs); + return NULL; + } /* Build up the pathnames in argv[0]. */ *ret = '\0'; From owner-svn-src-head@freebsd.org Wed Dec 6 21:44:56 2017 Return-Path: Delivered-To: svn-src-head@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 25392E8CE56; Wed, 6 Dec 2017 21:44:56 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 073D26384A; Wed, 6 Dec 2017 21:44:56 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp001.me.com by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P0K00N006GS1R00@mr11p00im-asmtp001.me.com>; Wed, 06 Dec 2017 21:44:47 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=04042017; t=1512596687; bh=ghO46/MaZye6krjHJIQOJ6WEKe9H9PTJbeQTV58+kuM=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=Dlo1s99j1gMMGbObM7Y0zrBvFA3TdMqlI8RTv3cgGw8exSIvX4ip0hQhzhKdeW9vr RUea9XL0OEI+6CHiVSmaDBiTL0RnugYoaUB1QNR95SteFFqekd42TMtEfQDwuX0ySf 1B6OUQA8G7ZBkZ69i/sExUA9XFM6pdUypjA6slBy8L1K6cJ2P5nefMqXhrHivV55ev nA/WH/yK3fwCzGaYt1XTX5Gi7JwGjR9qC5WUY0uZx/PGwuASjoQmltQOb3I3d+D5hI M/u6InOfsJbEhudb/Steb87Bfpj8zagzpYWOPOPR6M9G06ZTCVC+7FQ0GaTx5yRf2u 4AGcd+4N1uqtw== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P0K003M372LHK10@mr11p00im-asmtp001.me.com>; Wed, 06 Dec 2017 21:44:46 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-06_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1712060306 User-Agent: Microsoft-MacOutlook/f.28.0.171108 Date: Wed, 06 Dec 2017 13:44:45 -0800 Subject: Re: svn commit: r326624 - head/sys/cam/ata From: Ravi Pokala To: Alan Somers Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-id: <9B746B37-4C6C-4F21-B9F7-77826DDF0DCA@mac.com> Thread-topic: svn commit: r326624 - head/sys/cam/ata References: <201712061701.vB6H1PDN011394@repo.freebsd.org> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 21:44:56 -0000 Oh good, I'll be able to sleep tonight after all. :-) -Ravi -----Original Message----- From: on behalf of Alan Somers Date: 2017-12-06, Wednesday at 10:15 To: Ravi Pokala Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r326624 - head/sys/cam/ata Nope. The ATA spec prohibited them, and nobody ever manufactured any. But you might be able to fake one with CTL or QEMU or something similar. On Wed, Dec 6, 2017 at 10:11 AM, Ravi Pokala wrote: > ... disks of >=1TiB that still use CHS addressing. Out of morbid curiosity, are there any such monstrosities? -Ravi (rpokala@) -----Original Message----- From: on behalf of Alan Somers Date: 2017-12-06, Wednesday at 09:01 To: , , Subject: svn commit: r326624 - head/sys/cam/ata Author: asomers Date: Wed Dec 6 17:01:25 2017 New Revision: 326624 URL: https://svnweb.freebsd.org/changeset/base/326624 Log: cam: fix sign-extension error in adagetparams adagetparams contains a sign-extension error that will cause the sector count to be incorrectly calculated for ATA disks of >=1TiB that still use CHS addressing. Disks using LBA48 addressing are unaffected. Reported by: Coverity CID: 1007296 Reviewed by: ken MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13198 Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Dec 6 14:53:53 2017 (r326623) +++ head/sys/cam/ata/ata_da.c Wed Dec 6 17:01:25 2017 (r326624) @@ -3377,7 +3377,8 @@ adagetparams(struct cam_periph *periph, struct ccb_get dp->heads = cgd->ident_data.heads; dp->secs_per_track = cgd->ident_data.sectors; dp->cylinders = cgd->ident_data.cylinders; - dp->sectors = cgd->ident_data.cylinders * dp->heads * dp->secs_per_track; + dp->sectors = cgd->ident_data.cylinders * + (u_int32_t)(dp->heads * dp->secs_per_track); } lbasize = (u_int32_t)cgd->ident_data.lba_size_1 | ((u_int32_t)cgd->ident_data.lba_size_2 << 16); From owner-svn-src-head@freebsd.org Wed Dec 6 22:06:49 2017 Return-Path: Delivered-To: svn-src-head@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 F0D36E8D801; Wed, 6 Dec 2017 22:06:49 +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 AAD9E6488D; Wed, 6 Dec 2017 22:06:49 +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 vB6M6mnk040306; Wed, 6 Dec 2017 22:06:48 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6M6mvD040302; Wed, 6 Dec 2017 22:06:48 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712062206.vB6M6mvD040302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 6 Dec 2017 22:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326640 - in head/lib/libc: gen tests/gen X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/lib/libc: gen tests/gen X-SVN-Commit-Revision: 326640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 22:06:50 -0000 Author: asomers Date: Wed Dec 6 22:06:48 2017 New Revision: 326640 URL: https://svnweb.freebsd.org/changeset/base/326640 Log: Optimize telldir(3) Currently each call to telldir() requires a malloc and adds an entry to a linked list which must be traversed on future telldir(), seekdir(), closedir(), and readdir() calls. Applications that call telldir() for every directory entry incur O(n^2) behavior in readdir() and O(n) in telldir() and closedir(). This optimization eliminates the malloc() and linked list in most cases by packing the relevant information into a single long. On 64-bit architectures msdosfs, NFS, tmpfs, UFS, and ZFS can all use the packed representation. On 32-bit architectures msdosfs, NFS, and UFS can use the packed representation, but ZFS and tmpfs can only use it for about the first 128 files per directory. Memory savings is about 50 bytes per telldir(3) call. Speedup for telldir()-heavy directory traversals is about 20-30x for one million files per directory. Reviewed by: kib, mav, mckusick MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13385 Added: head/lib/libc/tests/gen/dir2_test.c (contents, props changed) Modified: head/lib/libc/gen/telldir.c head/lib/libc/gen/telldir.h head/lib/libc/tests/gen/Makefile Modified: head/lib/libc/gen/telldir.c ============================================================================== --- head/lib/libc/gen/telldir.c Wed Dec 6 22:03:11 2017 (r326639) +++ head/lib/libc/gen/telldir.c Wed Dec 6 22:06:48 2017 (r326640) @@ -54,11 +54,25 @@ __FBSDID("$FreeBSD$"); long telldir(DIR *dirp) { - struct ddloc *lp, *flp; - long idx; + struct ddloc_mem *lp, *flp; + union ddloc_packed ddloc; if (__isthreaded) _pthread_mutex_lock(&dirp->dd_lock); + /* + * Outline: + * 1) If the directory position fits in a packed structure, return that. + * 2) Otherwise, see if it's already been recorded in the linked list + * 3) Otherwise, malloc a new one + */ + if (dirp->dd_seek < (1ul << DD_SEEK_BITS) && + dirp->dd_loc < (1ul << DD_LOC_BITS)) { + ddloc.s.is_packed = 1; + ddloc.s.loc = dirp->dd_loc; + ddloc.s.seek = dirp->dd_seek; + goto out; + } + flp = NULL; LIST_FOREACH(lp, &dirp->dd_td->td_locq, loc_lqe) { if (lp->loc_seek == dirp->dd_seek) { @@ -72,7 +86,7 @@ telldir(DIR *dirp) } } if (lp == NULL) { - lp = malloc(sizeof(struct ddloc)); + lp = malloc(sizeof(struct ddloc_mem)); if (lp == NULL) { if (__isthreaded) _pthread_mutex_unlock(&dirp->dd_lock); @@ -86,10 +100,17 @@ telldir(DIR *dirp) else LIST_INSERT_HEAD(&dirp->dd_td->td_locq, lp, loc_lqe); } - idx = lp->loc_index; + ddloc.i.is_packed = 0; + /* + * Technically this assignment could overflow on 32-bit architectures, + * but we would get ENOMEM long before that happens. + */ + ddloc.i.index = lp->loc_index; + +out: if (__isthreaded) _pthread_mutex_unlock(&dirp->dd_lock); - return (idx); + return (ddloc.l); } /* @@ -99,34 +120,47 @@ telldir(DIR *dirp) void _seekdir(DIR *dirp, long loc) { - struct ddloc *lp; + struct ddloc_mem *lp; struct dirent *dp; + union ddloc_packed ddloc; + off_t loc_seek; + long loc_loc; - LIST_FOREACH(lp, &dirp->dd_td->td_locq, loc_lqe) { - if (lp->loc_index == loc) - break; + ddloc.l = loc; + + if (ddloc.s.is_packed) { + loc_seek = ddloc.s.seek; + loc_loc = ddloc.s.loc; + } else { + LIST_FOREACH(lp, &dirp->dd_td->td_locq, loc_lqe) { + if (lp->loc_index == ddloc.i.index) + break; + } + if (lp == NULL) + return; + + loc_seek = lp->loc_seek; + loc_loc = lp->loc_loc; } - if (lp == NULL) + if (loc_loc == dirp->dd_loc && loc_seek == dirp->dd_seek) return; - if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek) - return; /* If it's within the same chunk of data, don't bother reloading. */ - if (lp->loc_seek == dirp->dd_seek) { + if (loc_seek == dirp->dd_seek) { /* * If we go back to 0 don't make the next readdir * trigger a call to getdirentries(). */ - if (lp->loc_loc == 0) + if (loc_loc == 0) dirp->dd_flags |= __DTF_SKIPREAD; - dirp->dd_loc = lp->loc_loc; + dirp->dd_loc = loc_loc; return; } - (void) lseek(dirp->dd_fd, (off_t)lp->loc_seek, SEEK_SET); - dirp->dd_seek = lp->loc_seek; + (void) lseek(dirp->dd_fd, (off_t)loc_seek, SEEK_SET); + dirp->dd_seek = loc_seek; dirp->dd_loc = 0; dirp->dd_flags &= ~__DTF_SKIPREAD; /* current contents are invalid */ - while (dirp->dd_loc < lp->loc_loc) { + while (dirp->dd_loc < loc_loc) { dp = _readdir_unlocked(dirp, 0); if (dp == NULL) break; @@ -145,7 +179,7 @@ _seekdir(DIR *dirp, long loc) void _fixtelldir(DIR *dirp, long oldseek, long oldloc) { - struct ddloc *lp; + struct ddloc_mem *lp; lp = LIST_FIRST(&dirp->dd_td->td_locq); if (lp != NULL) { @@ -163,8 +197,8 @@ _fixtelldir(DIR *dirp, long oldseek, long oldloc) void _reclaim_telldir(DIR *dirp) { - struct ddloc *lp; - struct ddloc *templp; + struct ddloc_mem *lp; + struct ddloc_mem *templp; lp = LIST_FIRST(&dirp->dd_td->td_locq); while (lp != NULL) { Modified: head/lib/libc/gen/telldir.h ============================================================================== --- head/lib/libc/gen/telldir.h Wed Dec 6 22:03:11 2017 (r326639) +++ head/lib/libc/gen/telldir.h Wed Dec 6 22:06:48 2017 (r326640) @@ -41,24 +41,62 @@ #include /* - * One of these structures is malloced to describe the current directory - * position each time telldir is called. It records the current magic - * cookie returned by getdirentries and the offset within the buffer - * associated with that return value. + * telldir will malloc one of these to describe the current directory position, + * if it can't fit that information into the packed structure below. It + * records the current magic cookie returned by getdirentries and the offset + * within the buffer associated with that return value. */ -struct ddloc { - LIST_ENTRY(ddloc) loc_lqe; /* entry in list */ +struct ddloc_mem { + LIST_ENTRY(ddloc_mem) loc_lqe; /* entry in list */ long loc_index; /* key associated with structure */ off_t loc_seek; /* magic cookie returned by getdirentries */ long loc_loc; /* offset of entry in buffer */ }; +#ifdef __LP64__ +#define DD_LOC_BITS 31 +#define DD_SEEK_BITS 32 +#define DD_INDEX_BITS 63 +#else +#define DD_LOC_BITS 12 +#define DD_SEEK_BITS 19 +#define DD_INDEX_BITS 31 +#endif + /* + * This is the real type returned by telldir. telldir will prefer to return + * the packed type, if possible, or the malloced type otherwise. For msdosfs, + * UFS, and NFS, directory positions usually fit within the packed type. For + * ZFS and tmpfs, they usually fit within the packed type on 64-bit + * architectures. + */ +union ddloc_packed { + long l; /* Opaque type returned by telldir(3) */ + struct { + /* Identifies union type. Must be 0. */ + unsigned long is_packed:1; + /* Index into directory's linked list of ddloc_mem */ + unsigned long index:DD_INDEX_BITS; + } __packed i; + struct { + /* Identifies union type. Must be 1. */ + unsigned long is_packed:1; + /* offset of entry in buffer*/ + unsigned long loc:DD_LOC_BITS; + /* magic cookie returned by getdirentries */ + unsigned long seek:DD_SEEK_BITS; + } __packed s; +}; + +_Static_assert(sizeof(long) == sizeof(union ddloc_packed), + "packed telldir size mismatch!"); + +/* * One of these structures is malloced for each DIR to record telldir * positions. */ struct _telldir { - LIST_HEAD(, ddloc) td_locq; /* list of locations */ + LIST_HEAD(, ddloc_mem) td_locq; /* list of locations */ long td_loccnt; /* index of entry for sequential readdir's */ }; Modified: head/lib/libc/tests/gen/Makefile ============================================================================== --- head/lib/libc/tests/gen/Makefile Wed Dec 6 22:03:11 2017 (r326639) +++ head/lib/libc/tests/gen/Makefile Wed Dec 6 22:06:48 2017 (r326640) @@ -3,6 +3,8 @@ .include ATF_TESTS_C+= arc4random_test +ATF_TESTS_C+= dir2_test +ATF_TESTS_C+= dlopen_empty_test ATF_TESTS_C+= fmtcheck2_test ATF_TESTS_C+= fmtmsg_test ATF_TESTS_C+= fnmatch2_test @@ -12,9 +14,8 @@ ATF_TESTS_C+= getmntinfo_test ATF_TESTS_C+= glob2_test ATF_TESTS_C+= popen_test ATF_TESTS_C+= posix_spawn_test -ATF_TESTS_C+= wordexp_test -ATF_TESTS_C+= dlopen_empty_test ATF_TESTS_C+= realpath2_test +ATF_TESTS_C+= wordexp_test # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, # TODO: t_siginfo (fixes require further inspection) Added: head/lib/libc/tests/gen/dir2_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/tests/gen/dir2_test.c Wed Dec 6 22:06:48 2017 (r326640) @@ -0,0 +1,189 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2017 Spectra Logic Corporation + * 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 THE 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 THE 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. + */ + +/* + * Test cases for operations on DIR objects: + * opendir, readdir, seekdir, telldir, closedir, etc + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +ATF_TC(telldir_after_seekdir); +ATF_TC_HEAD(telldir_after_seekdir, tc) +{ + + atf_tc_set_md_var(tc, "descr", "Calling telldir(3) after seekdir(3) " + "should return the argument passed to seekdir."); +} +ATF_TC_BODY(telldir_after_seekdir, tc) +{ + const int NUMFILES = 1000; + char template[] = "dXXXXXX"; + char *tmpdir; + int i, dirfd; + DIR *dirp; + struct dirent *de; + long beginning, middle, end, td; + + /* Create a temporary directory */ + tmpdir = mkdtemp(template); + ATF_REQUIRE_MSG(tmpdir != NULL, "mkdtemp failed"); + dirfd = open(tmpdir, O_RDONLY | O_DIRECTORY); + ATF_REQUIRE(dirfd > 0); + + /* + * Fill it with files. Must be > 128 to ensure that the directory + * can't fit within a single page + */ + for (i = 0; i < NUMFILES; i = i+1) { + int fd; + char filename[16]; + + snprintf(filename, sizeof(filename), "%d", i); + fd = openat(dirfd, filename, O_WRONLY | O_CREAT); + ATF_REQUIRE(fd > 0); + close(fd); + } + + /* Get some directory bookmarks in various locations */ + dirp = fdopendir(dirfd); + ATF_REQUIRE_MSG(dirfd >= 0, "fdopendir failed"); + beginning = telldir(dirp); + for (i = 0; i < NUMFILES / 2; i = i+1) { + de = readdir(dirp); + ATF_REQUIRE_MSG(de != NULL, "readdir failed"); + } + middle = telldir(dirp); + for (; i < NUMFILES - 1; i = i+1) { + de = readdir(dirp); + ATF_REQUIRE_MSG(de != NULL, "readdir failed"); + } + end = telldir(dirp); + + /* + * Seekdir to each bookmark, check the telldir after seekdir condition, + * and check that the bookmark is valid by reading another directory + * entry. + */ + + seekdir(dirp, beginning); + td = telldir(dirp); + ATF_CHECK_EQ(beginning, td); + ATF_REQUIRE_MSG(NULL != readdir(dirp), "invalid directory index"); + + seekdir(dirp, middle); + td = telldir(dirp); + ATF_CHECK_EQ(middle, td); + ATF_REQUIRE_MSG(NULL != readdir(dirp), "invalid directory index"); + + seekdir(dirp, end); + td = telldir(dirp); + ATF_CHECK_EQ(end, td); + ATF_REQUIRE_MSG(NULL != readdir(dirp), "invalid directory index"); + + closedir(dirp); +} + +ATF_TC(telldir_at_end_of_block); +ATF_TC_HEAD(telldir_at_end_of_block, tc) +{ + + atf_tc_set_md_var(tc, "descr", "Calling telldir(3) after readdir(3) read the last entry in the block should return a valid location"); +} +ATF_TC_BODY(telldir_at_end_of_block, tc) +{ + /* For UFS and ZFS, blocks roll over at 128 directory entries. */ + const int NUMFILES = 129; + char template[] = "dXXXXXX"; + char *tmpdir; + int i, dirfd; + DIR *dirp; + struct dirent *de; + long td; + char last_filename[16]; + + /* Create a temporary directory */ + tmpdir = mkdtemp(template); + ATF_REQUIRE_MSG(tmpdir != NULL, "mkdtemp failed"); + dirfd = open(tmpdir, O_RDONLY | O_DIRECTORY); + ATF_REQUIRE(dirfd > 0); + + /* + * Fill it with files. Must be > 128 to ensure that the directory + * can't fit within a single page. The "-2" accounts for "." and ".." + */ + for (i = 0; i < NUMFILES - 2; i = i+1) { + int fd; + char filename[16]; + + snprintf(filename, sizeof(filename), "%d", i); + fd = openat(dirfd, filename, O_WRONLY | O_CREAT); + ATF_REQUIRE(fd > 0); + close(fd); + } + + /* Read all entries within the first page */ + dirp = fdopendir(dirfd); + ATF_REQUIRE_MSG(dirfd >= 0, "fdopendir failed"); + for (i = 0; i < NUMFILES - 1; i = i + 1) + ATF_REQUIRE_MSG(readdir(dirp) != NULL, "readdir failed"); + + /* Call telldir at the end of a page */ + td = telldir(dirp); + + /* Read the last entry */ + de = readdir(dirp); + ATF_REQUIRE_MSG(de != NULL, "readdir failed"); + strlcpy(last_filename, de->d_name, sizeof(last_filename)); + + /* Seek back to the bookmark. readdir() should return the last entry */ + seekdir(dirp, td); + de = readdir(dirp); + ATF_REQUIRE_STREQ_MSG(last_filename, de->d_name, + "seekdir went to the wrong directory position"); + + closedir(dirp); +} + + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, telldir_after_seekdir); + ATF_TP_ADD_TC(tp, telldir_at_end_of_block); + + return atf_no_error(); +} From owner-svn-src-head@freebsd.org Wed Dec 6 22:08:36 2017 Return-Path: Delivered-To: svn-src-head@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 779D1E8D8B0; Wed, 6 Dec 2017 22:08:36 +0000 (UTC) (envelope-from bapt@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 512AE64A09; Wed, 6 Dec 2017 22:08:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6M8Zub040409; Wed, 6 Dec 2017 22:08:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6M8ZHe040408; Wed, 6 Dec 2017 22:08:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201712062208.vB6M8ZHe040408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 6 Dec 2017 22:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326641 - head/contrib/dma X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/contrib/dma X-SVN-Commit-Revision: 326641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 22:08:36 -0000 Author: bapt Date: Wed Dec 6 22:08:35 2017 New Revision: 326641 URL: https://svnweb.freebsd.org/changeset/base/326641 Log: Split body of mails not respecting RFC2822 For mails which has a body not respecting RFC2822 (which often happen with crontabs) try to split by words finding the last space before 1000's character If no spaces are found then consider the mail to be malformed anyway PR: 208261 Modified: head/contrib/dma/mail.c Modified: head/contrib/dma/mail.c ============================================================================== --- head/contrib/dma/mail.c Wed Dec 6 22:06:48 2017 (r326640) +++ head/contrib/dma/mail.c Wed Dec 6 22:08:35 2017 (r326641) @@ -41,6 +41,8 @@ #include "dma.h" +#define MAX_LINE_RFC822 1000 + void bounce(struct qitem *it, const char *reason) { @@ -341,19 +343,47 @@ newaddr: goto again; } +static int +writeline(struct queue *queue, const char *line, ssize_t linelen) +{ + ssize_t len; + + while (linelen > 0) { + len = linelen; + if (linelen > MAX_LINE_RFC822) { + len = MAX_LINE_RFC822 - 10; + } + + if (fwrite(line, len, 1, queue->mailf) != 1) + return (-1); + + if (linelen <= MAX_LINE_RFC822) + break; + + if (fwrite("\n", 1, 1, queue->mailf) != 1) + return (-1); + + line += MAX_LINE_RFC822 - 10; + linelen = strlen(line); + } + return (0); +} + int readmail(struct queue *queue, int nodot, int recp_from_header) { struct parse_state parse_state; - char line[1000]; /* by RFC2822 */ - size_t linelen; + char *line = NULL; + ssize_t linelen; + size_t linecap = 0; + char newline[MAX_LINE_RFC822]; size_t error; int had_headers = 0; int had_from = 0; int had_messagid = 0; int had_date = 0; - int had_last_line = 0; int nocopy = 0; + int ret = -1; parse_state.state = NONE; @@ -372,24 +402,17 @@ readmail(struct queue *queue, int nodot, int recp_from return (-1); while (!feof(stdin)) { - if (fgets(line, sizeof(line) - 1, stdin) == NULL) + newline[0] = '\0'; + if ((linelen = getline(&line, &linecap, stdin)) <= 0) break; - if (had_last_line) - errlogx(EX_DATAERR, "bad mail input format:" - " from %s (uid %d) (envelope-from %s)", - username, useruid, queue->sender); - linelen = strlen(line); - if (linelen == 0 || line[linelen - 1] != '\n') { - /* - * This line did not end with a newline character. - * If we fix it, it better be the last line of - * the file. - */ - line[linelen] = '\n'; - line[linelen + 1] = 0; - had_last_line = 1; - } + if (!had_headers) { + if (linelen > MAX_LINE_RFC822) { + /* XXX also split headers */ + errlogx(EX_DATAERR, "bad mail input format:" + " from %s (uid %d) (envelope-from %s)", + username, useruid, queue->sender); + } /* * Unless this is a continuation, switch of * the Bcc: nocopy flag. @@ -430,31 +453,39 @@ readmail(struct queue *queue, int nodot, int recp_from while (!had_date || !had_messagid || !had_from) { if (!had_date) { had_date = 1; - snprintf(line, sizeof(line), "Date: %s\n", rfc822date()); + snprintf(newline, sizeof(newline), "Date: %s\n", rfc822date()); } else if (!had_messagid) { /* XXX msgid, assign earlier and log? */ had_messagid = 1; - snprintf(line, sizeof(line), "Message-Id: <%"PRIxMAX".%s.%"PRIxMAX"@%s>\n", + snprintf(newline, sizeof(newline), "Message-Id: <%"PRIxMAX".%s.%"PRIxMAX"@%s>\n", (uintmax_t)time(NULL), queue->id, (uintmax_t)random(), hostname()); } else if (!had_from) { had_from = 1; - snprintf(line, sizeof(line), "From: <%s>\n", queue->sender); + snprintf(newline, sizeof(newline), "From: <%s>\n", queue->sender); } - if (fwrite(line, strlen(line), 1, queue->mailf) != 1) - return (-1); + if (fwrite(newline, strlen(newline), 1, queue->mailf) != 1) + goto fail; } - strcpy(line, "\n"); + strlcpy(newline, "\n", sizeof(newline)); } if (!nodot && linelen == 2 && line[0] == '.') break; if (!nocopy) { - if (fwrite(line, strlen(line), 1, queue->mailf) != 1) - return (-1); + if (newline[0]) { + if (fwrite(newline, strlen(newline), 1, queue->mailf) != 1) + goto fail; + } else { + if (writeline(queue, line, linelen) != 0) + goto fail; + } } } - return (0); + ret = 0; +fail: + free(line); + return (ret); } From owner-svn-src-head@freebsd.org Wed Dec 6 23:03:36 2017 Return-Path: Delivered-To: svn-src-head@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 961F3E8F53D; Wed, 6 Dec 2017 23:03:36 +0000 (UTC) (envelope-from glebius@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 564C367039; Wed, 6 Dec 2017 23:03:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6N3ZrB065293; Wed, 6 Dec 2017 23:03:35 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6N3YO0065287; Wed, 6 Dec 2017 23:03:34 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201712062303.vB6N3YO0065287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 6 Dec 2017 23:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326642 - in head: share/man/man9 sys/dev/firewire sys/dev/lmc sys/dev/smc sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head: share/man/man9 sys/dev/firewire sys/dev/lmc sys/dev/smc sys/net X-SVN-Commit-Revision: 326642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 23:03:36 -0000 Author: glebius Date: Wed Dec 6 23:03:34 2017 New Revision: 326642 URL: https://svnweb.freebsd.org/changeset/base/326642 Log: Garbage collect IFCAP_POLLING_NOCOUNT. It wasn't used since very beginning of polling(4). The module always ignored return value from driver polling handler. Modified: head/share/man/man9/ifnet.9 head/sys/dev/firewire/if_fwe.c head/sys/dev/firewire/if_fwip.c head/sys/dev/lmc/if_lmc.c head/sys/dev/smc/if_smc.c head/sys/net/if.h Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Wed Dec 6 22:08:35 2017 (r326641) +++ head/share/man/man9/ifnet.9 Wed Dec 6 23:03:34 2017 (r326642) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2017 +.Dd December 6, 2017 .Dt IFNET 9 .Os .Sh NAME @@ -677,7 +677,7 @@ Userland code shall use .Xr ioctl 2 . .Pp The following capabilities are currently supported by the system: -.Bl -tag -width ".Dv IFCAP_POLLING_NOCOUNT" -offset indent +.Bl -tag -width ".Dv IFCAP_VLAN_HWTAGGING" -offset indent .It Dv IFCAP_RXCSUM This interface can do checksum validation on receiving data. Some interfaces do not have sufficient buffer storage to store frames @@ -752,9 +752,6 @@ A shorthand for This interface supports frame filtering in hardware on .Xr vlan 4 interfaces. -.It Dv IFCAP_POLLING_NOCOUNT -The return value for the number of processed packets should be -skipped for this interface. .It Dv IFCAP_VLAN_HWTSO This interface supports TCP Segmentation offloading on .Xr vlan 4 Modified: head/sys/dev/firewire/if_fwe.c ============================================================================== --- head/sys/dev/firewire/if_fwe.c Wed Dec 6 22:08:35 2017 (r326641) +++ head/sys/dev/firewire/if_fwe.c Wed Dec 6 23:03:34 2017 (r326642) @@ -395,7 +395,6 @@ fwe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) /* Disable interrupts */ fc->set_intr(fc, 0); ifp->if_capenable |= IFCAP_POLLING; - ifp->if_capenable |= IFCAP_POLLING_NOCOUNT; return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && @@ -404,7 +403,6 @@ fwe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) /* Enable interrupts. */ fc->set_intr(fc, 1); ifp->if_capenable &= ~IFCAP_POLLING; - ifp->if_capenable &= ~IFCAP_POLLING_NOCOUNT; return (error); } } Modified: head/sys/dev/firewire/if_fwip.c ============================================================================== --- head/sys/dev/firewire/if_fwip.c Wed Dec 6 22:08:35 2017 (r326641) +++ head/sys/dev/firewire/if_fwip.c Wed Dec 6 23:03:34 2017 (r326642) @@ -410,8 +410,7 @@ fwip_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data return (error); /* Disable interrupts */ fc->set_intr(fc, 0); - ifp->if_capenable |= IFCAP_POLLING | - IFCAP_POLLING_NOCOUNT; + ifp->if_capenable |= IFCAP_POLLING; return (error); } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && @@ -420,7 +419,6 @@ fwip_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data /* Enable interrupts. */ fc->set_intr(fc, 1); ifp->if_capenable &= ~IFCAP_POLLING; - ifp->if_capenable &= ~IFCAP_POLLING_NOCOUNT; return (error); } } Modified: head/sys/dev/lmc/if_lmc.c ============================================================================== --- head/sys/dev/lmc/if_lmc.c Wed Dec 6 22:08:35 2017 (r326641) +++ head/sys/dev/lmc/if_lmc.c Wed Dec 6 23:03:34 2017 (r326642) @@ -3823,7 +3823,6 @@ setup_ifnet(struct ifnet *ifp) # if defined(DEVICE_POLLING) ifp->if_capabilities |= IFCAP_POLLING; - ifp->if_capenable |= IFCAP_POLLING_NOCOUNT; # endif if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); Modified: head/sys/dev/smc/if_smc.c ============================================================================== --- head/sys/dev/smc/if_smc.c Wed Dec 6 22:08:35 2017 (r326641) +++ head/sys/dev/smc/if_smc.c Wed Dec 6 23:03:34 2017 (r326642) @@ -1216,7 +1216,6 @@ smc_stop(struct smc_softc *sc) #ifdef DEVICE_POLLING ether_poll_deregister(sc->smc_ifp); sc->smc_ifp->if_capenable &= ~IFCAP_POLLING; - sc->smc_ifp->if_capenable &= ~IFCAP_POLLING_NOCOUNT; #endif /* @@ -1276,7 +1275,6 @@ smc_init_locked(struct smc_softc *sc) ether_poll_register(smc_poll, ifp); SMC_LOCK(sc); ifp->if_capenable |= IFCAP_POLLING; - ifp->if_capenable |= IFCAP_POLLING_NOCOUNT; #endif } Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Wed Dec 6 22:08:35 2017 (r326641) +++ head/sys/net/if.h Wed Dec 6 23:03:34 2017 (r326642) @@ -234,7 +234,7 @@ struct if_data { #define IFCAP_TOE4 0x04000 /* interface can offload TCP */ #define IFCAP_TOE6 0x08000 /* interface can offload TCP6 */ #define IFCAP_VLAN_HWFILTER 0x10000 /* interface hw can filter vlan tag */ -#define IFCAP_POLLING_NOCOUNT 0x20000 /* polling ticks cannot be fragmented */ +/* available 0x20000 */ #define IFCAP_VLAN_HWTSO 0x40000 /* can do IFCAP_TSO on VLANs */ #define IFCAP_LINKSTATE 0x80000 /* the runtime link state is dynamic */ #define IFCAP_NETMAP 0x100000 /* netmap mode supported/enabled */ From owner-svn-src-head@freebsd.org Wed Dec 6 23:05:08 2017 Return-Path: Delivered-To: svn-src-head@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 8A12EE8F6AC; Wed, 6 Dec 2017 23:05:08 +0000 (UTC) (envelope-from imp@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 62D3767250; Wed, 6 Dec 2017 23:05:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6N576s065405; Wed, 6 Dec 2017 23:05:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6N57XP065402; Wed, 6 Dec 2017 23:05:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712062305.vB6N57XP065402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 6 Dec 2017 23:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326643 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 326643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 23:05:08 -0000 Author: imp Date: Wed Dec 6 23:05:07 2017 New Revision: 326643 URL: https://svnweb.freebsd.org/changeset/base/326643 Log: Make cam_periph_runccb be safe to call when we can only do polling. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13388 Modified: head/sys/cam/cam_periph.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Wed Dec 6 23:03:34 2017 (r326642) +++ head/sys/cam/cam_periph.c Wed Dec 6 23:05:07 2017 (r326643) @@ -1160,7 +1160,11 @@ cam_periph_runccb(union ccb *ccb, struct bintime *starttime; struct bintime ltime; int error; - + bool sched_stopped; + struct mtx *periph_mtx; + struct cam_periph *periph; + uint32_t timeout = 1; + starttime = NULL; xpt_path_assert(ccb->ccb_h.path, MA_OWNED); KASSERT((ccb->ccb_h.flags & CAM_UNLOCKED) == 0, @@ -1180,21 +1184,47 @@ cam_periph_runccb(union ccb *ccb, devstat_start_transaction(ds, starttime); } + sched_stopped = SCHEDULER_STOPPED(); ccb->ccb_h.cbfcnp = cam_periph_done; - xpt_action(ccb); - - do { - cam_periph_ccbwait(ccb); - if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) - error = 0; - else if (error_routine != NULL) { - ccb->ccb_h.cbfcnp = cam_periph_done; - error = (*error_routine)(ccb, camflags, sense_flags); - } else - error = 0; + periph = xpt_path_periph(ccb->ccb_h.path); + periph_mtx = cam_periph_mtx(periph); - } while (error == ERESTART); - + /* + * If we're polling, then we need to ensure that we have ample resources + * in the periph. We also need to drop the periph lock while we're polling. + * cam_periph_error can reschedule the ccb by calling xpt_action and returning + * ERESTART, so we have to effect the polling in the do loop below. + */ + if (sched_stopped) { + mtx_unlock(periph_mtx); + timeout = xpt_poll_setup(ccb); + } + + if (timeout == 0) { + ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + error = EBUSY; + } else { + xpt_action(ccb); + do { + if (!sched_stopped) + cam_periph_ccbwait(ccb); + else { + xpt_pollwait(ccb, timeout); + timeout = ccb->ccb_h.timeout * 10; + } + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) + error = 0; + else if (error_routine != NULL) { + ccb->ccb_h.cbfcnp = cam_periph_done; + error = (*error_routine)(ccb, camflags, sense_flags); + } else + error = 0; + } while (error == ERESTART); + } + + if (sched_stopped) + mtx_lock(periph_mtx); + if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { cam_release_devq(ccb->ccb_h.path, /* relsim_flags */0, Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Dec 6 23:03:34 2017 (r326642) +++ head/sys/cam/cam_xpt.c Wed Dec 6 23:05:07 2017 (r326643) @@ -3204,8 +3204,8 @@ call_sim: start_ccb->ccb_h.status)); } -void -xpt_polled_action(union ccb *start_ccb) +uint32_t +xpt_poll_setup(union ccb *start_ccb) { u_int32_t timeout; struct cam_sim *sim; @@ -3219,8 +3219,6 @@ xpt_polled_action(union ccb *start_ccb) mtx = sim->mtx; dev = start_ccb->ccb_h.path->device; - mtx_unlock(&dev->device_mtx); - /* * Steal an opening so that no other queued requests * can get it before us while we simulate interrupts. @@ -3242,29 +3240,57 @@ xpt_polled_action(union ccb *start_ccb) dev->ccbq.dev_openings++; mtx_unlock(&devq->send_mtx); - if (timeout != 0) { + return (timeout); +} + +void +xpt_pollwait(union ccb *start_ccb, uint32_t timeout) +{ + struct cam_sim *sim; + struct mtx *mtx; + + sim = start_ccb->ccb_h.path->bus->sim; + mtx = sim->mtx; + + while (--timeout > 0) { + if (mtx) + mtx_lock(mtx); + (*(sim->sim_poll))(sim); + if (mtx) + mtx_unlock(mtx); + camisr_runqueue(); + if ((start_ccb->ccb_h.status & CAM_STATUS_MASK) + != CAM_REQ_INPROG) + break; + DELAY(100); + } + + if (timeout == 0) { + /* + * XXX Is it worth adding a sim_timeout entry + * point so we can attempt recovery? If + * this is only used for dumps, I don't think + * it is. + */ + start_ccb->ccb_h.status = CAM_CMD_TIMEOUT; + } +} + +void +xpt_polled_action(union ccb *start_ccb) +{ + uint32_t timeout; + struct cam_ed *dev; + + timeout = start_ccb->ccb_h.timeout * 10; + dev = start_ccb->ccb_h.path->device; + + mtx_unlock(&dev->device_mtx); + + timeout = xpt_poll_setup(start_ccb); + if (timeout > 0) { xpt_action(start_ccb); - while(--timeout > 0) { - if (mtx) - mtx_lock(mtx); - (*(sim->sim_poll))(sim); - if (mtx) - mtx_unlock(mtx); - camisr_runqueue(); - if ((start_ccb->ccb_h.status & CAM_STATUS_MASK) - != CAM_REQ_INPROG) - break; - DELAY(100); - } - if (timeout == 0) { - /* - * XXX Is it worth adding a sim_timeout entry - * point so we can attempt recovery? If - * this is only used for dumps, I don't think - * it is. - */ - start_ccb->ccb_h.status = CAM_CMD_TIMEOUT; - } + xpt_pollwait(start_ccb, timeout); } else { start_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; } @@ -3305,6 +3331,7 @@ xpt_schedule_dev(struct camq *queue, cam_pinfo *pinfo, u_int32_t old_priority; CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_schedule_dev\n")); + old_priority = pinfo->priority; Modified: head/sys/cam/cam_xpt.h ============================================================================== --- head/sys/cam/cam_xpt.h Wed Dec 6 23:03:34 2017 (r326642) +++ head/sys/cam/cam_xpt.h Wed Dec 6 23:05:07 2017 (r326643) @@ -144,6 +144,8 @@ void xpt_copy_path(struct cam_path *new_path, void xpt_release_path(struct cam_path *path); const char * xpt_action_name(uint32_t action); +void xpt_pollwait(union ccb *start_ccb, uint32_t timeout); +uint32_t xpt_poll_setup(union ccb *start_ccb); #endif /* _KERNEL */ From owner-svn-src-head@freebsd.org Wed Dec 6 23:05:17 2017 Return-Path: Delivered-To: svn-src-head@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 6EDC4E8F6D1; Wed, 6 Dec 2017 23:05:17 +0000 (UTC) (envelope-from imp@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 2F2FA6728B; Wed, 6 Dec 2017 23:05:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6N5Ge7065469; Wed, 6 Dec 2017 23:05:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6N5GJv065466; Wed, 6 Dec 2017 23:05:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712062305.vB6N5GJv065466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 6 Dec 2017 23:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326644 - in head/sys/cam: ata nvme scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/cam: ata nvme scsi X-SVN-Commit-Revision: 326644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 23:05:17 -0000 Author: imp Date: Wed Dec 6 23:05:15 2017 New Revision: 326644 URL: https://svnweb.freebsd.org/changeset/base/326644 Log: Now that cam_periph_runccb() can be called from situations where the kernel scheduler is stopped, replace the by hand calling of xpt_polled_action() with it. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13388 Modified: head/sys/cam/ata/ata_da.c head/sys/cam/nvme/nvme_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Dec 6 23:05:07 2017 (r326643) +++ head/sys/cam/ata/ata_da.c Wed Dec 6 23:05:15 2017 (r326644) @@ -1088,13 +1088,8 @@ adadump(void *arg, void *virtual, vm_offset_t physical ata_28bit_cmd(&ccb.ataio, ATA_WRITE_DMA, 0, lba, count); } - xpt_polled_action(&ccb); - - error = adaerror(&ccb, - 0, SF_NO_RECOVERY | SF_NO_RETRY); - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); + error = cam_periph_runccb(&ccb, adaerror, + 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); if (error != 0) printf("Aborting dump due to I/O error.\n"); @@ -1124,13 +1119,8 @@ adadump(void *arg, void *virtual, vm_offset_t physical ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); else ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); - xpt_polled_action(&ccb); - - error = adaerror(&ccb, - 0, SF_NO_RECOVERY | SF_NO_RETRY); - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); + error = cam_periph_runccb(&ccb, adaerror, + 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); if (error != 0) xpt_print(periph->path, "Synchronize cache failed\n"); } @@ -3510,32 +3500,9 @@ adaspindown(uint8_t cmd, int flags) 0, ada_default_timeout*1000); ata_28bit_cmd(&local_ccb, cmd, 0, 0, 0); - - if (!SCHEDULER_STOPPED()) { - /* - * Not panicing, can just do the normal runccb - * XXX should make cam_periph_runccb work while - * XXX panicing... later - */ - error = cam_periph_runccb((union ccb *)&local_ccb, adaerror, - /*cam_flags*/0, /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, - softc->disk->d_devstat); - } else { - /* - * Panicing, so we have to do this by hand: do - * xpt_polled_action to run the request through the SIM, - * extract the error, and if the queue was frozen, - * unfreeze it. cam_periph_runccb takes care of these - * details, but xpt_polled_action doesn't. - */ - xpt_polled_action((union ccb *)&local_ccb); - error = adaerror((union ccb *)&local_ccb, 0, - SF_NO_RECOVERY | SF_NO_RETRY); - if ((local_ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(local_ccb.ccb_h.path, - /*relsim_flags*/0, /*reduction*/0, - /*timeout*/0, /*getcount_only*/0); - } + error = cam_periph_runccb((union ccb *)&local_ccb, adaerror, + /*cam_flags*/0, /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, + softc->disk->d_devstat); if (error != 0) xpt_print(periph->path, "Spin-down disk failed\n"); cam_periph_unlock(periph); Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Wed Dec 6 23:05:07 2017 (r326643) +++ head/sys/cam/nvme/nvme_da.c Wed Dec 6 23:05:15 2017 (r326644) @@ -404,17 +404,12 @@ ndadump(void *arg, void *virtual, vm_offset_t physical xpt_setup_ccb(&nvmeio.ccb_h, periph->path, CAM_PRIORITY_NORMAL); nvmeio.ccb_h.ccb_state = NDA_CCB_DUMP; nda_nvme_write(softc, &nvmeio, virtual, lba, length, count); - xpt_polled_action((union ccb *)&nvmeio); - - error = cam_periph_error((union ccb *)&nvmeio, - 0, SF_NO_RECOVERY | SF_NO_RETRY); - if ((nvmeio.ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(nvmeio.ccb_h.path, /*relsim_flags*/0, - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); + error = cam_periph_runccb((union ccb *)&nvmeio, cam_periph_error, + 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); if (error != 0) - printf("Aborting dump due to I/O error.\n"); - + printf("Aborting dump due to I/O error %d.\n", error); cam_periph_unlock(periph); + return (error); } @@ -423,13 +418,8 @@ ndadump(void *arg, void *virtual, vm_offset_t physical nvmeio.ccb_h.ccb_state = NDA_CCB_DUMP; nda_nvme_flush(softc, &nvmeio); - xpt_polled_action((union ccb *)&nvmeio); - - error = cam_periph_error((union ccb *)&nvmeio, - 0, SF_NO_RECOVERY | SF_NO_RETRY); - if ((nvmeio.ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(nvmeio.ccb_h.path, /*relsim_flags*/0, - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); + error = cam_periph_runccb((union ccb *)&nvmeio, cam_periph_error, + 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); if (error != 0) xpt_print(periph->path, "flush cmd failed\n"); cam_periph_unlock(periph); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Dec 6 23:05:07 2017 (r326643) +++ head/sys/cam/scsi/scsi_da.c Wed Dec 6 23:05:15 2017 (r326644) @@ -1673,13 +1673,8 @@ dadump(void *arg, void *virtual, vm_offset_t physical, /*dxfer_len*/length, /*sense_len*/SSD_FULL_SIZE, da_default_timeout * 1000); - xpt_polled_action((union ccb *)&csio); - - error = cam_periph_error((union ccb *)&csio, - 0, SF_NO_RECOVERY | SF_NO_RETRY); - if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0, - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); + error = cam_periph_runccb((union ccb *)&csio, cam_periph_error, + 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); if (error != 0) printf("Aborting dump due to I/O error.\n"); cam_periph_unlock(periph); @@ -1701,13 +1696,8 @@ dadump(void *arg, void *virtual, vm_offset_t physical, /*lb_count*/0, SSD_FULL_SIZE, 5 * 1000); - xpt_polled_action((union ccb *)&csio); - - error = cam_periph_error((union ccb *)&csio, - 0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR); - if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0) - cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0, - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); + error = cam_periph_runccb((union ccb *)&csio, cam_periph_error, + 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); if (error != 0) xpt_print(periph->path, "Synchronize cache failed\n"); } From owner-svn-src-head@freebsd.org Wed Dec 6 23:05:25 2017 Return-Path: Delivered-To: svn-src-head@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 8BE5DE8F71F; Wed, 6 Dec 2017 23:05:25 +0000 (UTC) (envelope-from imp@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 3C258673A6; Wed, 6 Dec 2017 23:05:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB6N5OWt065545; Wed, 6 Dec 2017 23:05:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6N5McJ065525; Wed, 6 Dec 2017 23:05:22 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712062305.vB6N5McJ065525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 6 Dec 2017 23:05:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326645 - in head/sys: cam cam/ata cam/mmc cam/nvme cam/scsi dev/hyperv/storvsc X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: cam cam/ata cam/mmc cam/nvme cam/scsi dev/hyperv/storvsc X-SVN-Commit-Revision: 326645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 23:05:25 -0000 Author: imp Date: Wed Dec 6 23:05:22 2017 New Revision: 326645 URL: https://svnweb.freebsd.org/changeset/base/326645 Log: Define xpt_path_inq. This provides a nice wrarpper around the XPT_PATH_INQ ccb creation and calling. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13387 Modified: head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_periph.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h head/sys/cam/mmc/mmc_da.c head/sys/cam/mmc/mmc_xpt.c head/sys/cam/nvme/nvme_da.c head/sys/cam/nvme/nvme_xpt.c head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_ch.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_pt.c head/sys/cam/scsi/scsi_sa.c head/sys/cam/scsi/scsi_sg.c head/sys/cam/scsi/scsi_target.c head/sys/cam/scsi/scsi_xpt.c head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/ata/ata_da.c Wed Dec 6 23:05:22 2017 (r326645) @@ -1726,10 +1726,7 @@ adaregister(struct cam_periph *periph, void *arg) else softc->quirks = ADA_Q_NONE; - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); TASK_INIT(&softc->sysctl_task, 0, adasysctlinit, periph); Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/ata/ata_xpt.c Wed Dec 6 23:05:22 2017 (r326645) @@ -1006,10 +1006,7 @@ noerror: if (path->device->mintags != 0 && path->bus->sim->max_tagged_dev_openings != 0) { /* Check if the SIM does not want queued commands. */ - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, path); if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_inquiry & PI_TAG_ABLE)) { /* Report SIM which tags are allowed. */ @@ -1412,10 +1409,7 @@ ata_scan_bus(struct cam_periph *periph, union ccb *req xpt_done(request_ccb); return; } - xpt_setup_ccb(&work_ccb->ccb_h, request_ccb->ccb_h.path, - request_ccb->ccb_h.pinfo.priority); - work_ccb->ccb_h.func_code = XPT_PATH_INQ; - xpt_action(work_ccb); + xpt_path_inq(&work_ccb->cpi, request_ccb->ccb_h.path); if (work_ccb->ccb_h.status != CAM_REQ_CMP) { request_ccb->ccb_h.status = work_ccb->ccb_h.status; xpt_free_ccb(work_ccb); @@ -1570,10 +1564,7 @@ ata_scan_lun(struct cam_periph *periph, struct cam_pat CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_scan_lun\n")); - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); - + xpt_path_inq(&cpi, path); if (cpi.ccb_h.status != CAM_REQ_CMP) { if (request_ccb != NULL) { request_ccb->ccb_h.status = cpi.ccb_h.status; @@ -1682,9 +1673,7 @@ ata_device_transport(struct cam_path *path) struct ata_params *ident_buf = NULL; /* Get transport information from the SIM */ - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, path); path->device->transport = cpi.transport; if ((path->device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0) @@ -1979,9 +1968,7 @@ ata_set_transfer_settings(struct ccb_trans_settings *c scsi = &cts->proto_specific.scsi; else scsi = NULL; - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, path); /* Sanity checking */ if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0 @@ -2110,9 +2097,7 @@ _ata_announce_periph(struct cam_periph *periph, struct if ((cts->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) return; /* Ask the SIM for its base transfer speed */ - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, path); /* Report connection speed */ *speed = cpi.base_transfer_speed; if (cts->transport == XPORT_ATA) { Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/cam_periph.c Wed Dec 6 23:05:22 2017 (r326645) @@ -743,9 +743,7 @@ camperiphfree(struct cam_periph *periph) arg = &ccb; break; case AC_PATH_REGISTERED: - ccb.ccb_h.func_code = XPT_PATH_INQ; - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - xpt_action(&ccb); + xpt_path_inq(&ccb.cpi, periph->path); arg = &ccb; break; default: Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/cam_xpt.c Wed Dec 6 23:05:22 2017 (r326645) @@ -2620,9 +2620,7 @@ xptsetasyncbusfunc(struct cam_eb *bus, void *arg) CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); xpt_path_lock(&path); - xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, &path); csa->callback(csa->callback_arg, AC_PATH_REGISTERED, &path, &cpi); @@ -4087,9 +4085,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, return (CAM_RESRC_UNAVAIL); } - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, path); if (cpi.ccb_h.status == CAM_REQ_CMP) { struct xpt_xport **xpt; Modified: head/sys/cam/cam_xpt.h ============================================================================== --- head/sys/cam/cam_xpt.h Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/cam_xpt.h Wed Dec 6 23:05:22 2017 (r326645) @@ -36,8 +36,10 @@ #ifdef _KERNEL #include +#include #endif + /* Forward Declarations */ union ccb; struct cam_periph; @@ -146,6 +148,20 @@ void xpt_release_path(struct cam_path *path); const char * xpt_action_name(uint32_t action); void xpt_pollwait(union ccb *start_ccb, uint32_t timeout); uint32_t xpt_poll_setup(union ccb *start_ccb); + +/* + * Perform a path inquiry at the request priority. The bzero may be + * unnecessary. + */ +static inline void +xpt_path_inq(struct ccb_pathinq *cpi, struct cam_path *path) +{ + + bzero(cpi, sizeof(*cpi)); + xpt_setup_ccb(&cpi->ccb_h, path, CAM_PRIORITY_NORMAL); + cpi->ccb_h.func_code = XPT_PATH_INQ; + xpt_action((union ccb *)cpi); +} #endif /* _KERNEL */ Modified: head/sys/cam/mmc/mmc_da.c ============================================================================== --- head/sys/cam/mmc/mmc_da.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/mmc/mmc_da.c Wed Dec 6 23:05:22 2017 (r326645) @@ -685,10 +685,7 @@ sdda_hook_into_geom(struct cam_periph *periph) softc = (struct sdda_softc*) periph->softc; - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); bzero(&cgd, sizeof(cgd)); xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NONE); Modified: head/sys/cam/mmc/mmc_xpt.c ============================================================================== --- head/sys/cam/mmc/mmc_xpt.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/mmc/mmc_xpt.c Wed Dec 6 23:05:22 2017 (r326645) @@ -239,9 +239,7 @@ mmc_scan_lun(struct cam_periph *periph, struct cam_pat CAM_DEBUG(path, CAM_DEBUG_TRACE, ("mmc_scan_lun\n")); - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); if (cpi.ccb_h.status != CAM_REQ_CMP) { if (request_ccb != NULL) { @@ -392,9 +390,7 @@ mmc_announce_periph(struct cam_periph *periph) xpt_action((union ccb*)&cts); if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) return; - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); printf("XPT info: CLK %04X, ...\n", cts.proto_specific.mmc.ios.clock); } @@ -570,8 +566,7 @@ mmcprobe_start(struct cam_periph *periph, union ccb *s case PROBE_RESET: /* FALLTHROUGH */ case PROBE_IDENTIFY: - init_standard_ccb(start_ccb, XPT_PATH_INQ); - xpt_action(start_ccb); + xpt_path_inq(&start_ccb->cpi, periph->path); CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("Start with PROBE_RESET\n")); init_standard_ccb(start_ccb, XPT_SET_TRAN_SETTINGS); Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/nvme/nvme_da.c Wed Dec 6 23:05:22 2017 (r326645) @@ -706,10 +706,7 @@ ndaregister(struct cam_periph *periph, void *arg) softc->quirks = NDA_Q_NONE; - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); TASK_INIT(&softc->sysctl_task, 0, ndasysctlinit, periph); Modified: head/sys/cam/nvme/nvme_xpt.c ============================================================================== --- head/sys/cam/nvme/nvme_xpt.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/nvme/nvme_xpt.c Wed Dec 6 23:05:22 2017 (r326645) @@ -365,9 +365,7 @@ nvme_scan_lun(struct cam_periph *periph, struct cam_pa CAM_DEBUG(path, CAM_DEBUG_TRACE, ("nvme_scan_lun\n")); - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, path); if (cpi.ccb_h.status != CAM_REQ_CMP) { if (request_ccb != NULL) { @@ -458,9 +456,7 @@ nvme_device_transport(struct cam_path *path) /* XXX get data from nvme namespace and other info ??? */ /* Get transport information from the SIM */ - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, path); path->device->transport = cpi.transport; path->device->transport_version = cpi.transport_version; @@ -633,9 +629,7 @@ nvme_announce_periph(struct cam_periph *periph) nvmex = &cts.xport_specific.nvme; /* Ask the SIM for its base transfer speed */ - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); printf("%s%d: nvme version %d.%d x%d (max x%d) lanes PCIe Gen%d (max Gen%d) link", periph->periph_name, periph->unit_number, NVME_MAJOR(nvmex->spec), Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/scsi/scsi_cd.c Wed Dec 6 23:05:22 2017 (r326645) @@ -595,10 +595,7 @@ cdregister(struct cam_periph *periph, void *arg) softc->quirks = CD_Q_NONE; /* Check if the SIM does not want 6 byte commands */ - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE)) softc->quirks |= CD_Q_10_BYTE_ONLY; Modified: head/sys/cam/scsi/scsi_ch.c ============================================================================== --- head/sys/cam/scsi/scsi_ch.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/scsi/scsi_ch.c Wed Dec 6 23:05:22 2017 (r326645) @@ -404,10 +404,7 @@ chregister(struct cam_periph *periph, void *arg) if (cgd->inq_data.version <= SCSI_REV_2) softc->quirks |= CH_Q_NO_DVCID; - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); /* * Changers don't have a blocksize, and obviously don't support Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/scsi/scsi_da.c Wed Dec 6 23:05:22 2017 (r326645) @@ -2462,10 +2462,7 @@ daregister(struct cam_periph *periph, void *arg) softc->quirks = DA_Q_NONE; /* Check if the SIM does not want 6 byte commands */ - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE)) softc->quirks |= DA_Q_NO_6_BYTE; Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/scsi/scsi_pass.c Wed Dec 6 23:05:22 2017 (r326645) @@ -588,10 +588,7 @@ passregister(struct cam_periph *periph, void *arg) softc->io_zone_size = MAXPHYS; knlist_init_mtx(&softc->read_select.si_note, cam_periph_mtx(periph)); - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); if (cpi.maxio == 0) softc->maxio = DFLTPHYS; /* traditional default */ Modified: head/sys/cam/scsi/scsi_pt.c ============================================================================== --- head/sys/cam/scsi/scsi_pt.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/scsi/scsi_pt.c Wed Dec 6 23:05:22 2017 (r326645) @@ -277,10 +277,7 @@ ptctor(struct cam_periph *periph, void *arg) periph->softc = softc; - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); cam_periph_unlock(periph); Modified: head/sys/cam/scsi/scsi_sa.c ============================================================================== --- head/sys/cam/scsi/scsi_sa.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/scsi/scsi_sa.c Wed Dec 6 23:05:22 2017 (r326645) @@ -2427,10 +2427,7 @@ saregister(struct cam_periph *periph, void *arg) softc->flags |= SA_FLAG_PROTECT_SUPP; } - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); /* * The SA driver supports a blocksize, but we don't know the Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/scsi/scsi_sg.c Wed Dec 6 23:05:22 2017 (r326645) @@ -324,10 +324,7 @@ sgregister(struct cam_periph *periph, void *arg) TAILQ_INIT(&softc->rdwr_done); periph->softc = softc; - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); if (cpi.maxio == 0) softc->maxio = DFLTPHYS; /* traditional default */ Modified: head/sys/cam/scsi/scsi_target.c ============================================================================== --- head/sys/cam/scsi/scsi_target.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/scsi/scsi_target.c Wed Dec 6 23:05:22 2017 (r326645) @@ -393,9 +393,7 @@ targenable(struct targ_softc *softc, struct cam_path * return (CAM_LUN_ALRDY_ENA); /* Make sure SIM supports target mode */ - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, path); status = cpi.ccb_h.status & CAM_STATUS_MASK; if (status != CAM_REQ_CMP) { printf("pathinq failed, status %#x\n", status); Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/cam/scsi/scsi_xpt.c Wed Dec 6 23:05:22 2017 (r326645) @@ -709,9 +709,7 @@ probeschedule(struct cam_periph *periph) softc = (probe_softc *)periph->softc; ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs); - xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, periph->path); /* * If a device has gone away and another device, or the same one, Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Dec 6 23:05:15 2017 (r326644) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Dec 6 23:05:22 2017 (r326645) @@ -2364,10 +2364,7 @@ storvsc_ada_probe_veto(void *arg __unused, struct cam_ if (path->device->protocol == PROTO_ATA) { struct ccb_pathinq cpi; - bzero(&cpi, sizeof(cpi)); - xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); - cpi.ccb_h.func_code = XPT_PATH_INQ; - xpt_action((union ccb *)&cpi); + xpt_path_inq(&cpi, path); if (cpi.ccb_h.status == CAM_REQ_CMP && cpi.hba_vendor == PCI_VENDOR_INTEL && cpi.hba_device == PCI_PRODUCT_PIIX4) { From owner-svn-src-head@freebsd.org Wed Dec 6 23:24:12 2017 Return-Path: Delivered-To: svn-src-head@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 6594EE8FDC2; Wed, 6 Dec 2017 23:24:12 +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 31EBF67F92; Wed, 6 Dec 2017 23:24:12 +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 vB6NOBip073941; Wed, 6 Dec 2017 23:24:11 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB6NOBUD073940; Wed, 6 Dec 2017 23:24:11 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712062324.vB6NOBUD073940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 6 Dec 2017 23:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326646 - head/lib/libcam X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/lib/libcam X-SVN-Commit-Revision: 326646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 23:24:12 -0000 Author: asomers Date: Wed Dec 6 23:24:11 2017 New Revision: 326646 URL: https://svnweb.freebsd.org/changeset/base/326646 Log: Fix a null-pointer dereference and a tautological check in cam_get_device Reported by: Coverity CID: 1017964 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13184 Modified: head/lib/libcam/camlib.c Modified: head/lib/libcam/camlib.c ============================================================================== --- head/lib/libcam/camlib.c Wed Dec 6 23:05:22 2017 (r326645) +++ head/lib/libcam/camlib.c Wed Dec 6 23:24:11 2017 (r326646) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -132,6 +133,9 @@ cam_get_device(const char *path, char *dev_name, int d * it so we don't hose the user's string. */ newpath = (char *)strdup(path); + if (newpath == NULL) + return (-1); + tmpstr = newpath; /* @@ -140,8 +144,9 @@ cam_get_device(const char *path, char *dev_name, int d if (*tmpstr == '/') { tmpstr2 = tmpstr; tmpstr = strrchr(tmpstr2, '/'); - if ((tmpstr != NULL) && (*tmpstr != '\0')) - tmpstr++; + /* We know that tmpstr2 contains a '/', so strrchr can't fail */ + assert(tmpstr != NULL && *tmpstr != '\0'); + tmpstr++; } if (*tmpstr == '\0') { From owner-svn-src-head@freebsd.org Thu Dec 7 00:10:30 2017 Return-Path: Delivered-To: svn-src-head@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 2C300E91173; Thu, 7 Dec 2017 00:10:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC4116968D; Thu, 7 Dec 2017 00:10:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 3520015A64; Thu, 7 Dec 2017 00:10:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 72AC72B3A; Thu, 7 Dec 2017 00:10:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id wCcFPCbAYfSn; Thu, 7 Dec 2017 00:10:25 +0000 (UTC) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 4BBBF2B34 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Wed, 6 Dec 2017 16:10:29 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <201711241450.vAOEoSFW056744@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gAde4lAE7MTi2iDfcB5h56iu1VnthhhDX" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 00:10:30 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gAde4lAE7MTi2iDfcB5h56iu1VnthhhDX Content-Type: multipart/mixed; boundary="spVduI3t8v5ursx5GxuebkPffu7ISarGQ"; protected-headers="v1" From: Bryan Drewery To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... References: <201711241450.vAOEoSFW056744@repo.freebsd.org> In-Reply-To: <201711241450.vAOEoSFW056744@repo.freebsd.org> --spVduI3t8v5ursx5GxuebkPffu7ISarGQ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 11/24/2017 6:50 AM, Hans Petter Selasky wrote: > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/Makefile.inc1 Fri Nov 24 14:29:32 2017 (r326168) > +++ head/Makefile.inc1 Fri Nov 24 14:50:28 2017 (r326169) > @@ -2410,16 +2410,24 @@ _lib_libradius=3D lib/libradius > .endif > =20 > .if ${MK_OFED} !=3D "no" > -_ofed_lib=3D contrib/ofed/usr.lib > -_prebuild_libs+=3D contrib/ofed/usr.lib/libosmcomp > -_prebuild_libs+=3D contrib/ofed/usr.lib/libopensm > -_prebuild_libs+=3D contrib/ofed/usr.lib/libibcommon > -_prebuild_libs+=3D contrib/ofed/usr.lib/libibverbs > -_prebuild_libs+=3D contrib/ofed/usr.lib/libibumad > +# > +# The OFED libraries are built in four steps > +# as reflected below, due to interdependencies. > +# > +# NOTE: Depending on contrib/ofed/include is only needed for > +# the lib32 compat build. > +# > +_ofed_lib=3D \ > +contrib/ofed/include \ > +contrib/ofed/usr.lib/0 \ > +contrib/ofed/usr.lib/1 \ > +contrib/ofed/usr.lib/2 \ > +contrib/ofed/usr.lib/3 > =20 > -contrib/ofed/usr.lib/libopensm__L: lib/libthr__L > -contrib/ofed/usr.lib/libosmcomp__L: lib/libthr__L > -contrib/ofed/usr.lib/libibumad__L: contrib/ofed/usr.lib/libibcommon__L= > +contrib/ofed/usr.lib/0__L: contrib/ofed/include__L lib/libthr__L > +contrib/ofed/usr.lib/1__L: contrib/ofed/usr.lib/0__L > +contrib/ofed/usr.lib/2__L: contrib/ofed/usr.lib/1__L > +contrib/ofed/usr.lib/3__L: contrib/ofed/usr.lib/2__L > .endif =2E.. > ~/git/freebsd # cat contrib/ofed/usr.lib/0/Makefile > # $FreeBSD$ >=20 > SUBDIR=3D \ > ../../libibverbs >=20 > SUBDIR_PARALLEL=3D >=20 > .include I'm a bit speechless. Why?? The old version was 90% fine and I sent you advice on how to make it work with the new layout. --=20 Regards, Bryan Drewery --spVduI3t8v5ursx5GxuebkPffu7ISarGQ-- --gAde4lAE7MTi2iDfcB5h56iu1VnthhhDX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJaKIb1AAoJEDXXcbtuRpfPqsQH/3/oBEWbQ8fZvVH62XuTCUB6 eqhrSOmKXGcSrUSGNzAy/8Q6BKiOysXsPcRSgG6wz/FhqpodFUXDGtd0ZYLKthUV U716jT+L3XOz6FSfqTMKnApqSJblcGDbLJQYiDhvtZ9EWeNSv2sJiqMPNeXMKYp7 WwNyxIcyPaPnoMIJC7THWixCrNPLJf174qRtv4nJtCHzzeJ/Ul3t0UTD1V6NqMts Oi9Ns4Dr01v0dlflTth0Hnj8fjXSjNEz1WTzW96FCDB5g0ZTiUdDaXQrYZ6Y++kC vuRkXeCVWrw7+zQ6llTO9qsrgVOpn/s3CuueNvdQam1xgbdXuj+Sbea5/3FF9hA= =jG6z -----END PGP SIGNATURE----- --gAde4lAE7MTi2iDfcB5h56iu1VnthhhDX-- From owner-svn-src-head@freebsd.org Thu Dec 7 00:31:00 2017 Return-Path: Delivered-To: svn-src-head@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 14CBDE91B73; Thu, 7 Dec 2017 00:31:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 C6F0A6A307; Thu, 7 Dec 2017 00:30:59 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 823362602F2; Thu, 7 Dec 2017 01:30:55 +0100 (CET) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> Date: Thu, 7 Dec 2017 01:28:06 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 00:31:00 -0000 On 12/07/17 01:10, Bryan Drewery wrote: > I'm a bit speechless. Why?? The old version was 90% fine and I sent > you advice on how to make it work with the new layout. Hi, I tried to listen to your advice, splitting up the Makefiles, not listing every dependency. Further how the OFED libraries are linked has changed. Two iterations for building the OFED libraries is not enough, like before. We really need four iterations. I don't see how the current approach is "wrong". Can you explain a bit more? --HPS From owner-svn-src-head@freebsd.org Thu Dec 7 00:31:12 2017 Return-Path: Delivered-To: svn-src-head@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 D46FAE91BB0; Thu, 7 Dec 2017 00:31:12 +0000 (UTC) (envelope-from bdrewery@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 5AC426A45D; Thu, 7 Dec 2017 00:31:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB70VA1B098786; Thu, 7 Dec 2017 00:31:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB70VAEP098785; Thu, 7 Dec 2017 00:31:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712070031.vB70VAEP098785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Dec 2017 00:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326647 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 326647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 00:31:13 -0000 Author: bdrewery Date: Thu Dec 7 00:31:10 2017 New Revision: 326647 URL: https://svnweb.freebsd.org/changeset/base/326647 Log: Revert r325529: No longer needed after r325699. Sponsored by: Dell EMC Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Wed Dec 6 23:24:11 2017 (r326646) +++ head/Makefile Thu Dec 7 00:31:10 2017 (r326647) @@ -577,7 +577,7 @@ universe_${target}_kernels: universe_${target}_prologu "check _.${target}.makeLINT for details"| ${MAKEFAIL})) .endif @cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ - universe_kernels MK_AUTO_OBJ=no + universe_kernels .endif # !MAKE_JUST_WORLDS # Tell the user the worlds and kernels have completed From owner-svn-src-head@freebsd.org Thu Dec 7 00:31:29 2017 Return-Path: Delivered-To: svn-src-head@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 C0C9EE91D2C; Thu, 7 Dec 2017 00:31:29 +0000 (UTC) (envelope-from bdrewery@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 8B75C6A719; Thu, 7 Dec 2017 00:31:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB70VSaq098840; Thu, 7 Dec 2017 00:31:28 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB70VS9K098839; Thu, 7 Dec 2017 00:31:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712070031.vB70VS9K098839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Dec 2017 00:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326648 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 326648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 00:31:29 -0000 Author: bdrewery Date: Thu Dec 7 00:31:28 2017 New Revision: 326648 URL: https://svnweb.freebsd.org/changeset/base/326648 Log: tinderbox/universe: Don't execute KERNCONFS lookup if not needed. Sponsored by: Dell EMC Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu Dec 7 00:31:10 2017 (r326647) +++ head/Makefile Thu Dec 7 00:31:28 2017 (r326648) @@ -585,6 +585,7 @@ universe_${target}: universe_${target}_done universe_${target}_done: @echo ">> ${target} completed on `LC_ALL=C date`" .endfor +.if make(universe_kernconfs) || make(universe_kernels) universe_kernels: universe_kernconfs .PHONY .if !defined(TARGET) TARGET!= uname -m @@ -621,6 +622,7 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE (echo "${TARGET} ${kernel} kernel failed," \ "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) .endfor +.endif # make(universe_kernels) universe: universe_epilogue universe_epilogue: .PHONY @echo "--------------------------------------------------------------" From owner-svn-src-head@freebsd.org Thu Dec 7 00:38:08 2017 Return-Path: Delivered-To: svn-src-head@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 394A2E92121; Thu, 7 Dec 2017 00:38:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0238F6ABF3; Thu, 7 Dec 2017 00:38:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 21A9A16471; Thu, 7 Dec 2017 00:38:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 54B202BE5; Thu, 7 Dec 2017 00:38:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id HF7QetJXAZ3h; Thu, 7 Dec 2017 00:38:03 +0000 (UTC) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com EE2CA2BE0 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Wed, 6 Dec 2017 16:38:06 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1QWGnaSJPHJg9gnOFoXLiu13XkKQFuGCG" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 00:38:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1QWGnaSJPHJg9gnOFoXLiu13XkKQFuGCG Content-Type: multipart/mixed; boundary="cVpSAnSmk16r7nnuBOpGxLfJkfCoorewr"; protected-headers="v1" From: Bryan Drewery To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> In-Reply-To: <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> --cVpSAnSmk16r7nnuBOpGxLfJkfCoorewr Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/6/2017 4:28 PM, Hans Petter Selasky wrote: > On 12/07/17 01:10, Bryan Drewery wrote: >> I'm a bit speechless.=C2=A0 Why??=C2=A0 The old version was 90% fine a= nd I sent >> you advice on how to make it work with the new layout. >=20 > Hi, >=20 > I tried to listen to your advice, splitting up the Makefiles, not > listing every dependency. Further how the OFED libraries are linked has= > changed. Two iterations for building the OFED libraries is not enough, > like before. We really need four iterations. >=20 > I don't see how the current approach is "wrong". Can you explain a bit > more? 1. SUBDIR=3D../../somewhere else is inherently wrong. 2. Building a library from a directory named '2' is wrong. 3. Not just using proper SUBDIR_DEPEND and making all these subdirs is not needed and complicates things MORE by splitting them all up. 4. Building a library from a directory where its real bsd.lib.mk is not at is wrong. 5. Depending on an include directory in the Makefile.inc1 library dependencies is simply not needed - I told you that. 6. Using these /0 /1 /2 /3 directories actually hurts the 'make libraries' parallelism/dependency graph. It ends up building /1 rather than building libibcm and libibumad directly in its graph. It creates an indirection which adds more unneeded submake recursion. The whole thing needlessly obfuscates these libraries. It's fine, I'm going to rewrite it all now. --=20 Regards, Bryan Drewery --cVpSAnSmk16r7nnuBOpGxLfJkfCoorewr-- --1QWGnaSJPHJg9gnOFoXLiu13XkKQFuGCG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJaKI1vAAoJEDXXcbtuRpfPnoEH/1Axa1BVXU1po6uj6WuTFJ/H FYPxpVkUteqzhg8j7784/bRMbu9QseB8YkF0adnZ8704+VwFQ328LXaP7BrT8TGe BOvyTRaPI2roWgspGLXwqWPBOkRwWb0PFba8DKq7agmSpj5GeJpIUy8qswurEWgT tRxZ0kF36oHsB53PQWQO7R9ExIQ4iH2jbUvvIkFTWUgNcqxfQkF71XJxliM/9aIF c91ybwe6uq05tinmuHdt3F0lsSPJN5Nm/T6NoZbSeMDaBWMRr7Ra5GD/apN8b+l8 X3qpb5j+2ZUXcrOztZesqdzW0gZhPWIT77XXdbawKn3mzzLsYDf0WWrUw06+ybE= =cFoI -----END PGP SIGNATURE----- --1QWGnaSJPHJg9gnOFoXLiu13XkKQFuGCG-- From owner-svn-src-head@freebsd.org Thu Dec 7 00:48:54 2017 Return-Path: Delivered-To: svn-src-head@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 855EEE92790; Thu, 7 Dec 2017 00:48:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4866B441; Thu, 7 Dec 2017 00:48:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 6B04116838; Thu, 7 Dec 2017 00:48:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id A994D2C1F; Thu, 7 Dec 2017 00:48:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id v1MEgcEQUajp; Thu, 7 Dec 2017 00:48:49 +0000 (UTC) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 25B822C1A From: Bryan Drewery To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <8e2fd368-ad3e-27bb-0834-4b6f2f99e905@FreeBSD.org> Date: Wed, 6 Dec 2017 16:48:53 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WEE857xEE8GMxMD9Ed18XLuxhN45DwR4N" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 00:48:54 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WEE857xEE8GMxMD9Ed18XLuxhN45DwR4N Content-Type: multipart/mixed; boundary="OVuWltfChgeUHVBH8Ld2XefD1sbpM0V9v"; protected-headers="v1" From: Bryan Drewery To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <8e2fd368-ad3e-27bb-0834-4b6f2f99e905@FreeBSD.org> Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> In-Reply-To: --OVuWltfChgeUHVBH8Ld2XefD1sbpM0V9v Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/6/2017 4:38 PM, Bryan Drewery wrote: > On 12/6/2017 4:28 PM, Hans Petter Selasky wrote: >> On 12/07/17 01:10, Bryan Drewery wrote: >>> I'm a bit speechless.=C2=A0 Why??=C2=A0 The old version was 90% fine = and I sent >>> you advice on how to make it work with the new layout. >> >> Hi, >> >> I tried to listen to your advice, splitting up the Makefiles, not >> listing every dependency. Further how the OFED libraries are linked ha= s >> changed. Two iterations for building the OFED libraries is not enough,= >> like before. We really need four iterations. >> >> I don't see how the current approach is "wrong". Can you explain a bit= >> more? >=20 > 1. SUBDIR=3D../../somewhere else is inherently wrong. > 2. Building a library from a directory named '2' is wrong. > 3. Not just using proper SUBDIR_DEPEND and making all these subdirs is > not needed and complicates things MORE by splitting them all up. > 4. Building a library from a directory where its real bsd.lib.mk is not= > at is wrong. > 5. Depending on an include directory in the Makefile.inc1 library > dependencies is simply not needed - I told you that. > 6. Using these /0 /1 /2 /3 directories actually hurts the 'make > libraries' parallelism/dependency graph. It ends up building /1 rather > than building libibcm and libibumad directly in its graph. It creates > an indirection which adds more unneeded submake recursion. >=20 > The whole thing needlessly obfuscates these libraries. >=20 > It's fine, I'm going to rewrite it all now. >=20 7. We don't put FreeBSD Makefiles in the same directory as contributed files. It's against the pattern. So moving contrib/ofed/usr.lib/* to contrib/ofed/*/ is wrong. It complicates future merges of contrib code. Really none of these Makefiles should be in contrib/ofed - the proper thing would be to move them out, not to inline them with the contributed code. --=20 Regards, Bryan Drewery --OVuWltfChgeUHVBH8Ld2XefD1sbpM0V9v-- --WEE857xEE8GMxMD9Ed18XLuxhN45DwR4N Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJaKI/1AAoJEDXXcbtuRpfPRxoIALYfm2/SBPlAVp778WD//Jef XDpBI8Eqh+kcbIErHmt2QAL1xbQUOsOg7zoGQ78Xfx6SKnu8fxkRgC4LlxE4nlRv sBWp6rXmIywrJRFR5Pduv/GdxRrRieq1UM0kN6vqmJu9e7dbsOnjMJfNnT2sTT3H XCC7MYy5W+bNeRVfjWdAQDSsIv6K5dNF8D0sHCxnE72xs1F6l9Bev2E27QmD6T30 JLUBIDa/fNEAHTYEkxbRx6BSlMgux3ngRmqzwFYuz1dHtZ1BMVKy61xs/7s1Nc66 y/hKwUFdy73f5RRNhtaEoqtYzALAqAETB4Bqvmqucq/r3wzXvHYD8IHnR9dClmo= =bdAu -----END PGP SIGNATURE----- --WEE857xEE8GMxMD9Ed18XLuxhN45DwR4N-- From owner-svn-src-head@freebsd.org Thu Dec 7 00:50:26 2017 Return-Path: Delivered-To: svn-src-head@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 1F88FE928A0; Thu, 7 Dec 2017 00:50:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC0116B5CE; Thu, 7 Dec 2017 00:50:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id C568616986; Thu, 7 Dec 2017 00:50:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 149F82C2D; Thu, 7 Dec 2017 00:50:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id jObnSUbt1RkB; Thu, 7 Dec 2017 00:50:16 +0000 (UTC) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 8B1D62C27 From: Bryan Drewery To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <8e2fd368-ad3e-27bb-0834-4b6f2f99e905@FreeBSD.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Wed, 6 Dec 2017 16:50:19 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <8e2fd368-ad3e-27bb-0834-4b6f2f99e905@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="N7qFonVXa2aX9q0lSbr4edMau1wcRpcxQ" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 00:50:26 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --N7qFonVXa2aX9q0lSbr4edMau1wcRpcxQ Content-Type: multipart/mixed; boundary="ItijETbQp6HRpNjgeh6DvPB0f26c8E2md"; protected-headers="v1" From: Bryan Drewery To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <8e2fd368-ad3e-27bb-0834-4b6f2f99e905@FreeBSD.org> In-Reply-To: <8e2fd368-ad3e-27bb-0834-4b6f2f99e905@FreeBSD.org> --ItijETbQp6HRpNjgeh6DvPB0f26c8E2md Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/6/2017 4:48 PM, Bryan Drewery wrote: > On 12/6/2017 4:38 PM, Bryan Drewery wrote: >> On 12/6/2017 4:28 PM, Hans Petter Selasky wrote: >>> On 12/07/17 01:10, Bryan Drewery wrote: >>>> I'm a bit speechless.=C2=A0 Why??=C2=A0 The old version was 90% fine= and I sent >>>> you advice on how to make it work with the new layout. >>> >>> Hi, >>> >>> I tried to listen to your advice, splitting up the Makefiles, not >>> listing every dependency. Further how the OFED libraries are linked h= as >>> changed. Two iterations for building the OFED libraries is not enough= , >>> like before. We really need four iterations. >>> >>> I don't see how the current approach is "wrong". Can you explain a bi= t >>> more? >> >> 1. SUBDIR=3D../../somewhere else is inherently wrong. >> 2. Building a library from a directory named '2' is wrong. >> 3. Not just using proper SUBDIR_DEPEND and making all these subdirs is= >> not needed and complicates things MORE by splitting them all up. >> 4. Building a library from a directory where its real bsd.lib.mk is no= t >> at is wrong. >> 5. Depending on an include directory in the Makefile.inc1 library >> dependencies is simply not needed - I told you that. >> 6. Using these /0 /1 /2 /3 directories actually hurts the 'make >> libraries' parallelism/dependency graph. It ends up building /1 rather= >> than building libibcm and libibumad directly in its graph. It creates= >> an indirection which adds more unneeded submake recursion. >> >> The whole thing needlessly obfuscates these libraries. >> >> It's fine, I'm going to rewrite it all now. >> >=20 > 7. We don't put FreeBSD Makefiles in the same directory as contributed > files. It's against the pattern. So moving contrib/ofed/usr.lib/* to > contrib/ofed/*/ is wrong. It complicates future merges of contrib code.= > Really none of these Makefiles should be in contrib/ofed - the proper > thing would be to move them out, not to inline them with the contribute= d > code. >=20 8. And you blew away my Makefile.depend files, which I do normally say I'll deal with, but a far simpler directory structure movement would have easily kept them and I could have updated them. But now there's not even something to start from since they were deleted for no reason. --=20 Regards, Bryan Drewery --ItijETbQp6HRpNjgeh6DvPB0f26c8E2md-- --N7qFonVXa2aX9q0lSbr4edMau1wcRpcxQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJaKJBLAAoJEDXXcbtuRpfPhrMH+gPxofqjUZb+I+W9LTuB2ewZ 6Sf0G2/0n7yIk2LXHMnCRIL1S7I9RR+perSrO2xhCvreC8xpRhjkdxlErYfYS0tp rz65+ZSk2p7nOnVn3sBllLkTQAhyVA/AocaeBBAPRYzHeBTYytBWsrSwegPabbVn LjeR6Nht7jGdZ1F1CfxAtScxX4bF17wXgxt2i4tqzS78zi9VR9oZXYcloCdLOlP7 O5IjFpkVeOn9yKWWd88VaxsUEqVmLigoKVMLDPcVrKrnd2BtfUOHsTLi+ZoUA+16 Ac2NK8Hw39B0AIhIY+h236ro7mO/GiyuhDYIz7f2TcdZ+S+2BN9CyDZTZmbA1MU= =i5Op -----END PGP SIGNATURE----- --N7qFonVXa2aX9q0lSbr4edMau1wcRpcxQ-- From owner-svn-src-head@freebsd.org Thu Dec 7 00:56:16 2017 Return-Path: Delivered-To: svn-src-head@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 8B5B4E92BD2; Thu, 7 Dec 2017 00:56:16 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 5299B6BA9C; Thu, 7 Dec 2017 00:56:16 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8E42B2602F2; Thu, 7 Dec 2017 01:56:14 +0100 (CET) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> From: Hans Petter Selasky Message-ID: <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> Date: Thu, 7 Dec 2017 01:53:27 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 00:56:16 -0000 On 12/07/17 01:38, Bryan Drewery wrote: > 1. SUBDIR=../../somewhere else is inherently wrong. > 2. Building a library from a directory named '2' is wrong. > 3. Not just using proper SUBDIR_DEPEND and making all these subdirs is > not needed and complicates things MORE by splitting them all up. > 4. Building a library from a directory where its real bsd.lib.mk is not > at is wrong. > 5. Depending on an include directory in the Makefile.inc1 library > dependencies is simply not needed - I told you that. Try building the COMPAT 32-bit libraries with OFED and you'll see that this is needed! > 6. Using these /0 /1 /2 /3 directories actually hurts the 'make > libraries' parallelism/dependency graph. It ends up building /1 rather > than building libibcm and libibumad directly in its graph. It creates > an indirection which adds more unneeded submake recursion. I think this is no argument over having to maintain and update Makefile.inc1 with all the dependencies every time there is a change or new driver library added to OFED. > > The whole thing needlessly obfuscates these libraries. > > It's fine, I'm going to rewrite it all now. It would be nice if these utilities can be built standalone, outside the buildworld target aswell. I've suggested adding an "all-install" variant to make. Having to kick a buildworld to test-build contrib/ofed is quite overkill, and that is some of reasoning behind the current Makefile layout. 6: When a set of libraries should be built in order, it is more clean to have 4 dependencies, than a bunch of them in my opinion. You can use the updated "tools/make_libdeps.sh" to figure this out. The old approach with _prebuild_libs+= won't work :-( --HPS From owner-svn-src-head@freebsd.org Thu Dec 7 01:02:13 2017 Return-Path: Delivered-To: svn-src-head@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 CC14DE92FF7; Thu, 7 Dec 2017 01:02:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE506C0FF; Thu, 7 Dec 2017 01:02:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 6CCA016F8A; Thu, 7 Dec 2017 01:02:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id A4EB82C60; Thu, 7 Dec 2017 01:02:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id o7iwBwD_bEgR; Thu, 7 Dec 2017 01:02:08 +0000 (UTC) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 6BF182C5B To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <20f66fc2-5812-1c0d-ceed-1171d918568d@FreeBSD.org> Date: Wed, 6 Dec 2017 17:02:12 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K9pJ5rsLHisRd0EuJcCjTlC1eJ880vfAW" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 01:02:13 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --K9pJ5rsLHisRd0EuJcCjTlC1eJ880vfAW Content-Type: multipart/mixed; boundary="gOJRTx9qXMupFIAbiwuCcmosRDNbHAAj7"; protected-headers="v1" From: Bryan Drewery To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20f66fc2-5812-1c0d-ceed-1171d918568d@FreeBSD.org> Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> In-Reply-To: <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> --gOJRTx9qXMupFIAbiwuCcmosRDNbHAAj7 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/6/2017 4:53 PM, Hans Petter Selasky wrote: > On 12/07/17 01:38, Bryan Drewery wrote: >> 1. SUBDIR=3D../../somewhere else is inherently wrong. >> 2. Building a library from a directory named '2' is wrong. >> 3. Not just using proper SUBDIR_DEPEND and making all these subdirs is= >> not needed and complicates things MORE by splitting them all up. >> 4. Building a library from a directory where its real bsd.lib.mk is no= t >> at is wrong. >> 5. Depending on an include directory in the Makefile.inc1 library >> dependencies is simply not needed - I told you that. >=20 > Try building the COMPAT 32-bit libraries with OFED and you'll see that > this is needed! >=20 No. The proper fix is to add contrib/ofed/include to the _LC_INCDIRS.${MK_OFED:tl} list in Makefile.libcompat. Just looking at the lib32 build you can see 'includes' is only called on a subset of directories via _LC_INCDIRS. >> 6. Using these /0 /1 /2 /3 directories actually hurts the 'make >> libraries' parallelism/dependency graph. It ends up building /1 rather= >> than building libibcm and libibumad directly in its graph.=C2=A0 It cr= eates >> an indirection which adds more unneeded submake recursion. >=20 > I think this is no argument over having to maintain and update > Makefile.inc1 with all the dependencies every time there is a change or= > new driver library added to OFED. The argument is that it's how things are done. If you come up with a brilliant solution to make Makefile.inc1 library dependencies simpler, GREAT! But the one you have put in here is totally bogus. >=20 >> >> The whole thing needlessly obfuscates these libraries. >> >> It's fine, I'm going to rewrite it all now. >=20 > It would be nice if these utilities can be built standalone, outside th= e > buildworld target aswell. I've suggested adding an "all-install" varian= t They mostly can, but building things directly with the current build system simply won't create a SYSROOT or do cross-directory dependencies properly. That's what DIRDEPS_BUILD does. Again, if you had invented some great solution to make this simpler that would be good, but that's not what you have here. You have simply made changes to simply build ordering in contrib/ofed when not in buildworld, but that's not even needed if you use the proper SUBDIR and SUBDIR_DEPEND. > to make. Having to kick a buildworld to test-build contrib/ofed is quit= e > overkill, and that is some of reasoning behind the current Makefile lay= out. >=20 > 6: When a set of libraries should be built in order, it is more clean t= o > have 4 dependencies, than a bunch of them in my opinion. Creating rats nest dependency lists is not proper or easier to maintain or cleaner at all. It's wrong. >=20 > You can use the updated "tools/make_libdeps.sh" to figure this out. >=20 > The old approach with > _prebuild_libs+=3D >=20 > won't work :-( >=20 I told you before how to make it work. --=20 Regards, Bryan Drewery --gOJRTx9qXMupFIAbiwuCcmosRDNbHAAj7-- --K9pJ5rsLHisRd0EuJcCjTlC1eJ880vfAW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJaKJMUAAoJEDXXcbtuRpfPCLUIAKyY8bgiZm+jESMZAQUPPLoM rDSm5xUnr4gpn+v6NEUUQtiqvM4Xh2vTSe6tw1pb/1ZuEjW1Fww+x0OoCFmPBBuX i4QX/U2etmMrwiCzsh7d36C0S59C3KCP+OVh9GTdkZme4czOxMPH6CY+MZRM7/3g K0FpEqao+JlmBdTIlg1hxfz8EjtUo9WxN2I7Wqw+1yxq8b0lU7CLSzCz9gG/2LFg 2J6/Smr80G7p/rQ4e/qXTN+Tl9RsVIaw3rOaVbGGdwwiUVV+PZR1q/eNhg1WKYS7 WXoqAsg6IyheJlqXVL3t1wv3bGVZ9gjpsdglBNfXsTwkz35pHzoc7fGzWha0Lzg= =fgRy -----END PGP SIGNATURE----- --K9pJ5rsLHisRd0EuJcCjTlC1eJ880vfAW-- From owner-svn-src-head@freebsd.org Thu Dec 7 01:32:36 2017 Return-Path: Delivered-To: svn-src-head@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 EAB66E94F80; Thu, 7 Dec 2017 01:32:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A64806DBF0; Thu, 7 Dec 2017 01:32:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id CC5D317A17; Thu, 7 Dec 2017 01:32:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id C041C2D3C; Thu, 7 Dec 2017 01:32:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id w-66iXFknJMD; Thu, 7 Dec 2017 01:32:32 +0000 (UTC) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 92ACE2D37 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5ad2e6ba-7209-0e20-bd69-f83ad3410b3a@FreeBSD.org> Date: Wed, 6 Dec 2017 17:32:35 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pt86p2xO0PdBqJaipKAdPll2364Pq05dA" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 01:32:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Pt86p2xO0PdBqJaipKAdPll2364Pq05dA Content-Type: multipart/mixed; boundary="LNJf8ON5Umkt2hKaTkjD6uffkLlipksKH"; protected-headers="v1" From: Bryan Drewery To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <5ad2e6ba-7209-0e20-bd69-f83ad3410b3a@FreeBSD.org> Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> In-Reply-To: <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> --LNJf8ON5Umkt2hKaTkjD6uffkLlipksKH Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/6/2017 4:53 PM, Hans Petter Selasky wrote: > It would be nice if these utilities can be built standalone, outside th= e > buildworld target aswell. I've suggested adding an "all-install" varian= t > to make. Having to kick a buildworld to test-build contrib/ofed is quit= e > overkill, and that is some of reasoning behind the current Makefile lay= out. This is what buildworld+SUBDIR_OVERRIDE is for. The following patch also mitigates the need to install libraries for build testing which I'll commit tomorrow: > commit 7cce144e821cbf2f4e70711928a8945137700b35 (HEAD -> master) > Author: Bryan Drewery > Date: Wed Dec 6 17:29:57 2017 -0800 >=20 > Look for libraries in OBJDIR when building outside of buildworld. >=20 > This allows build testing more easily without establishing a sysroo= t > or installing the files. >=20 > Sponsored by: Dell EMC >=20 > diff --git share/mk/src.libnames.mk share/mk/src.libnames.mk > index 2d172197ac53..fdd1a4866620 100644 > --- share/mk/src.libnames.mk > +++ share/mk/src.libnames.mk > @@ -359,7 +359,7 @@ LIB${_l:tu}?=3D ${LIBDESTDIR}${LIBDIR_BASE}/l= ibprivate${_l}.a > .endfor >=20 > .for _l in ${_LIBRARIES} > -.if ${_INTERNALLIBS:M${_l}} > +.if ${_INTERNALLIBS:M${_l}} || !defined(SYSROOT) > LDADD_${_l}_L+=3D -L${LIB${_l:tu}DIR} > .endif > DPADD_${_l}?=3D ${LIB${_l:tu}} --=20 Regards, Bryan Drewery --LNJf8ON5Umkt2hKaTkjD6uffkLlipksKH-- --Pt86p2xO0PdBqJaipKAdPll2364Pq05dA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJaKJozAAoJEDXXcbtuRpfPHKwH/2qhORRAkFUbrzKO5BrnkHVP 7nA/N1QCKUyrFBD6zaAGSM12nkEHk642qFfoyK2ddFNZc9HgUt/7CzYNMuqbv3HI E+Fg+hyOC6DbE+tSIy2a1Wq9AopBMJoi73TbMwbgrLt9VnPIiiDH/4Q1yFhuMHzl Un4hp4LyyeGVN2sle2I9jHfHYt0+3G1HGZ0KyOVCcOcwOg8fksNspUiML72ItrEt Gqq3nxJ/1dzjWN7GW2vBDqWBHn1WIklMXRedWuYd4QA67Br+ELItcAWVg3c3zsba T9+gF9UuRZj/6CfZfpbQHaAw9xCjBf3DnNCl9dyuGWzxvnBGOzuSCXAacY2SFS4= =fu/l -----END PGP SIGNATURE----- --Pt86p2xO0PdBqJaipKAdPll2364Pq05dA-- From owner-svn-src-head@freebsd.org Thu Dec 7 01:41:52 2017 Return-Path: Delivered-To: svn-src-head@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 97D13E95396; Thu, 7 Dec 2017 01:41:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E3D46E087; Thu, 7 Dec 2017 01:41:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 4AE0D17C5C; Thu, 7 Dec 2017 01:41:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 82D9A2D5F; Thu, 7 Dec 2017 01:41:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 9AS3CpvPSKXq; Thu, 7 Dec 2017 01:41:48 +0000 (UTC) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 871F92D59 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Wed, 6 Dec 2017 17:41:51 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="I0kb8FpVDjAbBbtN2BTUMS6LkwcE885a4" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 01:41:52 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --I0kb8FpVDjAbBbtN2BTUMS6LkwcE885a4 Content-Type: multipart/mixed; boundary="RWHCIixodMEfnjDq5bqW3Ivgl0Gv2CooG"; protected-headers="v1" From: Bryan Drewery To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> In-Reply-To: <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> --RWHCIixodMEfnjDq5bqW3Ivgl0Gv2CooG Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/6/2017 4:53 PM, Hans Petter Selasky wrote: > On 12/07/17 01:38, Bryan Drewery wrote: >> 1. SUBDIR=3D../../somewhere else is inherently wrong. >> 2. Building a library from a directory named '2' is wrong. >> 3. Not just using proper SUBDIR_DEPEND and making all these subdirs is= >> not needed and complicates things MORE by splitting them all up. >> 4. Building a library from a directory where its real bsd.lib.mk is no= t >> at is wrong. >> 5. Depending on an include directory in the Makefile.inc1 library >> dependencies is simply not needed - I told you that. >=20 > Try building the COMPAT 32-bit libraries with OFED and you'll see that > this is needed! >=20 >> 6. Using these /0 /1 /2 /3 directories actually hurts the 'make >> libraries' parallelism/dependency graph. It ends up building /1 rather= >> than building libibcm and libibumad directly in its graph.=C2=A0 It cr= eates >> an indirection which adds more unneeded submake recursion. >=20 > I think this is no argument over having to maintain and update > Makefile.inc1 with all the dependencies every time there is a change or= > new driver library added to OFED. Here's the proper change to contrib/ofed/usr.lib/Makefile, it is trivial.= > diff --git contrib/ofed/usr.lib/Makefile contrib/ofed/usr.lib/Makefile > index 47b97591f5b7..9c22b889fa19 100644 > --- contrib/ofed/usr.lib/Makefile > +++ contrib/ofed/usr.lib/Makefile > @@ -1,13 +1,24 @@ > -SUBDIR=3D libibcommon libibmad libibumad libibverbs libmlx4 lib= mthca \ > - libopensm libosmcomp libosmvendor libibcm librdmacm libsdp libc= xgb4 > +SUBDIR=3D \ > + libibverbs \ > + libibcm \ > + libibumad \ > + librdmacm \ > + libibmad \ > + libosmcomp \ > + libosmvendor \ > + libcxgb4 \ > + libmlx4 \ > + libmlx5 \ > + libibnetdisc \ > + libopensm >=20 > SUBDIR_DEPEND_libcxgb4=3D libibverbs > SUBDIR_DEPEND_libibcm=3D libibverbs > -SUBDIR_DEPEND_libibmad=3D libibcommon libibumad > -SUBDIR_DEPEND_libibumad=3D libibcommon > +SUBDIR_DEPEND_libibmad=3D libibumad > +SUBDIR_DEPEND_libibnetdisc=3D libosmcomp libibmad libibumad > SUBDIR_DEPEND_libmlx4=3D libibverbs > -SUBDIR_DEPEND_libmthca=3D libibverbs > -SUBDIR_DEPEND_libosmvendor=3D libibumad libopensm libosmcomp > +SUBDIR_DEPEND_libmlx5=3D libibverbs > +SUBDIR_DEPEND_libosmvendor=3D libibumad > SUBDIR_DEPEND_librdmacm=3D libibverbs > SUBDIR_PARALLEL=3D >=20 And Makefile.inc1 which is even more simple. > @@ -2365,14 +2414,12 @@ _lib_libradius=3D lib/libradius > .if ${MK_OFED} !=3D "no" > _ofed_lib=3D contrib/ofed/usr.lib > _prebuild_libs+=3D contrib/ofed/usr.lib/libosmcomp > -_prebuild_libs+=3D contrib/ofed/usr.lib/libopensm > -_prebuild_libs+=3D contrib/ofed/usr.lib/libibcommon > _prebuild_libs+=3D contrib/ofed/usr.lib/libibverbs > +_prebuild_libs+=3D contrib/ofed/usr.lib/libibmad > _prebuild_libs+=3D contrib/ofed/usr.lib/libibumad >=20 > -contrib/ofed/usr.lib/libopensm__L: lib/libthr__L > contrib/ofed/usr.lib/libosmcomp__L: lib/libthr__L > -contrib/ofed/usr.lib/libibumad__L: contrib/ofed/usr.lib/libibcommon__L= > +contrib/ofed/usr.lib/libibmad__L: contrib/ofed/usr.lib/libibumad__L > .endif --=20 Regards, Bryan Drewery --RWHCIixodMEfnjDq5bqW3Ivgl0Gv2CooG-- --I0kb8FpVDjAbBbtN2BTUMS6LkwcE885a4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJaKJxfAAoJEDXXcbtuRpfPHsQIAJzYK8LzNt2uVxR0RMEQQojt tWlidHu4cbmxeusZpn4+QKMGW2az21j7deUwiJN+g3N+WkyGZDreMUm9/pw6gdcn RvNHtraWGCLXf8S9L6KeR6mo51N8bIi03vL/uvpRpY2a/5CgGkpHtJZ0AmxVCuuD UAj/ehIDs7JvxszvWzW0RMMyexRL0MXzqRpfntfY6tilc6YzqtD3/PAbXGCyrXg7 ihMVefng/Eab5SpW1Q6vo04YYFGquHXpfYPadOwRGOzLrydOPcnVOn1HoApBC/Lh 1JAys6JPy2bF+0NLgW5cG/JSJIjLD8LEzRT90JYcboAN4GXw2fDT8Tt6+Huugyc= =W/MV -----END PGP SIGNATURE----- --I0kb8FpVDjAbBbtN2BTUMS6LkwcE885a4-- From owner-svn-src-head@freebsd.org Thu Dec 7 01:49:37 2017 Return-Path: Delivered-To: svn-src-head@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 9B7DBE95BEB; Thu, 7 Dec 2017 01:49:37 +0000 (UTC) (envelope-from bdrewery@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 621D16E8C5; Thu, 7 Dec 2017 01:49:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB71nZru032773; Thu, 7 Dec 2017 01:49:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB71nZsh032771; Thu, 7 Dec 2017 01:49:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712070149.vB71nZsh032771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Dec 2017 01:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326649 - in head/targets/pseudo/userland: . lib X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head/targets/pseudo/userland: . lib X-SVN-Commit-Revision: 326649 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 01:49:37 -0000 Author: bdrewery Date: Thu Dec 7 01:49:35 2017 New Revision: 326649 URL: https://svnweb.freebsd.org/changeset/base/326649 Log: Disconnect OFED after r326169 broke all DIRDEPS support for it. Modified: head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/lib/Makefile.depend Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Thu Dec 7 00:31:28 2017 (r326648) +++ head/targets/pseudo/userland/Makefile.depend Thu Dec 7 01:49:35 2017 (r326649) @@ -894,27 +894,6 @@ DIRDEPS+= usr.sbin/cxgbetool DIRDEPS+= usr.bin/dtc .endif -.if ${MK_OFED} != "no" -DIRDEPS+= \ - contrib/ofed/usr.bin/ibaddr \ - contrib/ofed/usr.bin/ibnetdiscover \ - contrib/ofed/usr.bin/ibping \ - contrib/ofed/usr.bin/ibportstate \ - contrib/ofed/usr.bin/ibroute \ - contrib/ofed/usr.bin/ibsendtrap \ - contrib/ofed/usr.bin/ibstat \ - contrib/ofed/usr.bin/ibsysstat \ - contrib/ofed/usr.bin/ibtracert \ - contrib/ofed/usr.bin/opensm \ - contrib/ofed/usr.bin/osmtest \ - contrib/ofed/usr.bin/perfquery \ - contrib/ofed/usr.bin/saquery \ - contrib/ofed/usr.bin/sminfo \ - contrib/ofed/usr.bin/smpdump \ - contrib/ofed/usr.bin/smpquery \ - contrib/ofed/usr.bin/vendstat -.endif - DIRDEPS+= ${DIRDEPS.${MACHINE}:U} Modified: head/targets/pseudo/userland/lib/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/lib/Makefile.depend Thu Dec 7 00:31:28 2017 (r326648) +++ head/targets/pseudo/userland/lib/Makefile.depend Thu Dec 7 01:49:35 2017 (r326649) @@ -242,22 +242,6 @@ DIRDEPS+= \ lib/libpmcstat .endif -.if ${MK_OFED} != "no" -DIRDEPS+= \ - contrib/ofed/usr.lib/libcxgb4 \ - contrib/ofed/usr.lib/libibcm \ - contrib/ofed/usr.lib/libibcommon \ - contrib/ofed/usr.lib/libibmad \ - contrib/ofed/usr.lib/libibumad \ - contrib/ofed/usr.lib/libibverbs \ - contrib/ofed/usr.lib/libmlx4 \ - contrib/ofed/usr.lib/libopensm \ - contrib/ofed/usr.lib/libosmcomp \ - contrib/ofed/usr.lib/libosmvendor \ - contrib/ofed/usr.lib/librdmacm \ - contrib/ofed/usr.lib/libsdp -.endif - .if ${MK_BLACKLIST_SUPPORT} != "no" DIRDEPS+= lib/libblacklist .endif From owner-svn-src-head@freebsd.org Thu Dec 7 01:50:18 2017 Return-Path: Delivered-To: svn-src-head@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 CC97FE95CE3; Thu, 7 Dec 2017 01:50:18 +0000 (UTC) (envelope-from bjk@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 76E8F6EA81; Thu, 7 Dec 2017 01:50:18 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB71oHta032864; Thu, 7 Dec 2017 01:50:17 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB71oHkR032863; Thu, 7 Dec 2017 01:50:17 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201712070150.vB71oHkR032863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Thu, 7 Dec 2017 01:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326650 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: bjk X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 326650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 01:50:18 -0000 Author: bjk (doc committer) Date: Thu Dec 7 01:50:17 2017 New Revision: 326650 URL: https://svnweb.freebsd.org/changeset/base/326650 Log: Note that old sys/event.h required manual sys/types.h inclusion ed fixed this in r313704 but older versions are still affected. Modified: head/lib/libc/sys/kqueue.2 Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Thu Dec 7 01:49:35 2017 (r326649) +++ head/lib/libc/sys/kqueue.2 Thu Dec 7 01:50:17 2017 (r326650) @@ -782,8 +782,9 @@ The value is limited to 24 hours; longer timeouts will be silently reinterpreted as 24 hours. .Pp -Previous versions of +In versions older than +.Fx 12.0 , .In sys/event.h -fail to parse without including +failed to parse without including .In sys/types.h manually. From owner-svn-src-head@freebsd.org Thu Dec 7 01:57:29 2017 Return-Path: Delivered-To: svn-src-head@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 B5EEBE9638D; Thu, 7 Dec 2017 01:57:29 +0000 (UTC) (envelope-from bjk@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 8A2126F214; Thu, 7 Dec 2017 01:57:29 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB71vSLU036862; Thu, 7 Dec 2017 01:57:28 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB71vSj1036857; Thu, 7 Dec 2017 01:57:28 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201712070157.vB71vSj1036857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Thu, 7 Dec 2017 01:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326651 - in head/bin: cat date kenv setfacl sh X-SVN-Group: head X-SVN-Commit-Author: bjk X-SVN-Commit-Paths: in head/bin: cat date kenv setfacl sh X-SVN-Commit-Revision: 326651 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 01:57:29 -0000 Author: bjk (doc committer) Date: Thu Dec 7 01:57:27 2017 New Revision: 326651 URL: https://svnweb.freebsd.org/changeset/base/326651 Log: Fix mandoc -Tlint warnings in bin/ Many style-level issues are still reported. Submitted by: Yuri Pankov Reviewed by: jilles (previous revision) Differential Revision: https://reviews.freebsd.org/D13334 Modified: head/bin/cat/cat.1 head/bin/date/date.1 head/bin/kenv/kenv.1 head/bin/setfacl/setfacl.1 head/bin/sh/sh.1 Modified: head/bin/cat/cat.1 ============================================================================== --- head/bin/cat/cat.1 Thu Dec 7 01:50:17 2017 (r326650) +++ head/bin/cat/cat.1 Thu Dec 7 01:57:27 2017 (r326651) @@ -195,8 +195,8 @@ utility appeared in .At v1 . .An Dennis Ritchie designed and wrote the first man page. -It appears to have been -.Xr cat 1 . +It appears to have been for +.Nm . .Sh BUGS Because of the shell language mechanism used to perform output redirection, the command Modified: head/bin/date/date.1 ============================================================================== --- head/bin/date/date.1 Thu Dec 7 01:50:17 2017 (r326650) +++ head/bin/date/date.1 Thu Dec 7 01:57:27 2017 (r326651) @@ -131,7 +131,8 @@ The option suppresses this behavior and causes the time to be set only on the current machine. .It Fl R -Use RFC 2822 date and time output format. This is equivalent to use +Use RFC 2822 date and time output format. +This is equivalent to using .Dq Li %a, %d %b %Y \&%T %z as .Ar output_fmt Modified: head/bin/kenv/kenv.1 ============================================================================== --- head/bin/kenv/kenv.1 Thu Dec 7 01:50:17 2017 (r326650) +++ head/bin/kenv/kenv.1 Thu Dec 7 01:57:27 2017 (r326651) @@ -91,11 +91,17 @@ The file can contain lines of the form .Pp .Dl name = "value" # this is a comment .Pp -where whitespace around name and '=', and -everything after a '#' character, are ignored. Almost any printable -character except '=' is acceptable as part of a name. Quotes -are optional and necessary only if the value contains -whitespace. +where whitespace around +.Sq name +and +.Sq = , +and everything after a +.Sq # +character, are ignored. +Almost any printable character except +.Sq = +is acceptable as part of a name. +Quotes are optional and necessary only if the value contains whitespace. .Sh SEE ALSO .Xr kenv 2 , .Xr config 5 , Modified: head/bin/setfacl/setfacl.1 ============================================================================== --- head/bin/setfacl/setfacl.1 Thu Dec 7 01:50:17 2017 (r326650) +++ head/bin/setfacl/setfacl.1 Thu Dec 7 01:57:27 2017 (r326651) @@ -114,7 +114,8 @@ is the input is taken from stdin. .It Fl n Do not recalculate the permissions associated with the ACL -mask entry. This option is not applicable to NFSv4 ACLs. +mask entry. +This option is not applicable to NFSv4 ACLs. .It Fl x Ar entries | position If .Ar entries @@ -291,7 +292,8 @@ specifying the access granted to the owner of the file .Dq Li group@ specifying the access granted to the file owning group; .Dq Li everyone@ -specifying everyone. Note that +specifying everyone. +Note that .Dq Li everyone@ is not the same as traditional Unix .Dq Li other @@ -301,8 +303,8 @@ literally, everyone, including file owner and owning g The ACL qualifier field describes the user or group associated with the ACL entry. It may consist of one of the following: uid or -user name, or gid or group name. In entries whose tag type is -one of +user name, or gid or group name. +In entries whose tag type is one of .Dq Li owner@ , .Dq Li group@ , or Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Thu Dec 7 01:50:17 2017 (r326650) +++ head/bin/sh/sh.1 Thu Dec 7 01:57:27 2017 (r326651) @@ -1033,7 +1033,7 @@ The syntax of the command is: .Bd -unfilled -offset indent -compact .Ic case Ar word Ic in -.Ar pattern Ns ) Ar list Li ;; +.Ar pattern ) Ar list Li ;; .Ar ... .Ic esac .Ed From owner-svn-src-head@freebsd.org Thu Dec 7 02:08:57 2017 Return-Path: Delivered-To: svn-src-head@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 6E385E96D09; Thu, 7 Dec 2017 02:08:57 +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 2D86F6FA94; Thu, 7 Dec 2017 02:08:57 +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 vB728uwn040927; Thu, 7 Dec 2017 02:08:56 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB728tNH040922; Thu, 7 Dec 2017 02:08:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712070208.vB728tNH040922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 7 Dec 2017 02:08:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326652 - in head/usr.bin/dc: . tests X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/usr.bin/dc: . tests X-SVN-Commit-Revision: 326652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 02:08:57 -0000 Author: asomers Date: Thu Dec 7 02:08:55 2017 New Revision: 326652 URL: https://svnweb.freebsd.org/changeset/base/326652 Log: dc(1): fix modulo operations with fractional inputs Our dc(1) has never correctly calculated remainders with fractional inputs. Both bmod and bdivmod seem to have copy/pasted code from bdiv, which results in the remainder having the wrong output scale. PR: 162495 Reported by: anonymous Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D13390 Added: head/usr.bin/dc/tests/bcode.sh (contents, props changed) Modified: head/usr.bin/dc/bcode.c head/usr.bin/dc/dc.1 head/usr.bin/dc/tests/Makefile head/usr.bin/dc/tests/inout.sh Modified: head/usr.bin/dc/bcode.c ============================================================================== --- head/usr.bin/dc/bcode.c Thu Dec 7 01:57:27 2017 (r326651) +++ head/usr.bin/dc/bcode.c Thu Dec 7 02:08:55 2017 (r326652) @@ -1096,13 +1096,13 @@ bmod(void) r = new_number(); scale = max(a->scale, b->scale); - r->scale = max(b->scale, a->scale + bmachine.scale); + r->scale = scale; if (BN_is_zero(a->number)) warnx("remainder by zero"); else { normalize(a, scale); - normalize(b, scale + bmachine.scale); + normalize(b, scale); ctx = BN_CTX_new(); bn_checkp(ctx); @@ -1117,7 +1117,7 @@ bmod(void) static void bdivmod(void) { - struct number *a, *b, *rdiv, *rmod; + struct number *a, *b, *frac, *quotient, *rdiv, *remainder; BN_CTX *ctx; u_int scale; @@ -1131,25 +1131,44 @@ bdivmod(void) } rdiv = new_number(); - rmod = new_number(); - rdiv->scale = bmachine.scale; - rmod->scale = max(b->scale, a->scale + bmachine.scale); + quotient = new_number(); + remainder = new_number(); scale = max(a->scale, b->scale); + rdiv->scale = 0; + remainder->scale = scale; + quotient->scale = bmachine.scale; + scale = max(a->scale, b->scale); if (BN_is_zero(a->number)) warnx("divide by zero"); else { normalize(a, scale); - normalize(b, scale + bmachine.scale); + normalize(b, scale); ctx = BN_CTX_new(); bn_checkp(ctx); - bn_check(BN_div(rdiv->number, rmod->number, + /* + * Unlike other languages' divmod operations, dc is specified + * to return the remainder and the full quotient, rather than + * the remainder and the floored quotient. bn(3) has no + * function to calculate both. So we'll use BN_div to get the + * remainder and floored quotient, then calculate the full + * quotient from those. + * + * quotient = rdiv + remainder / divisor + */ + bn_check(BN_div(rdiv->number, remainder->number, b->number, a->number, ctx)); + frac = div_number(remainder, a, bmachine.scale); + normalize(rdiv, bmachine.scale); + normalize(remainder, scale); + bn_check(BN_add(quotient->number, rdiv->number, frac->number)); + free_number(frac); BN_CTX_free(ctx); } - push_number(rdiv); - push_number(rmod); + push_number(quotient); + push_number(remainder); + free_number(rdiv); free_number(a); free_number(b); } Modified: head/usr.bin/dc/dc.1 ============================================================================== --- head/usr.bin/dc/dc.1 Thu Dec 7 01:57:27 2017 (r326651) +++ head/usr.bin/dc/dc.1 Thu Dec 7 02:08:55 2017 (r326652) @@ -35,7 +35,7 @@ .\" .\" @(#)dc.1 8.1 (Berkeley) 6/6/93 .\" -.Dd February 27, 2017 +.Dd December 5, 2017 .Dt DC 1 .Os .Sh NAME @@ -139,8 +139,8 @@ The two entries are popped off the stack; the result is pushed on the stack in their place. Any fractional part of an exponent is ignored. .Pp -For addition and subtraction, the scale of the result is the maximum -of scales of the operands. +For addition, subtraction, and remainder, the scale of the result is the +maximum of scales of the operands. For division the scale of the result is defined by the scale set by the .Ic k Modified: head/usr.bin/dc/tests/Makefile ============================================================================== --- head/usr.bin/dc/tests/Makefile Thu Dec 7 01:57:27 2017 (r326651) +++ head/usr.bin/dc/tests/Makefile Thu Dec 7 02:08:55 2017 (r326652) @@ -3,5 +3,6 @@ PACKAGE= tests ATF_TESTS_SH= inout +ATF_TESTS_SH+= bcode .include Added: head/usr.bin/dc/tests/bcode.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/dc/tests/bcode.sh Thu Dec 7 02:08:55 2017 (r326652) @@ -0,0 +1,144 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2017 Alan Somers +# 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 THE 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 THE 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$ + +atf_test_case bmod +bmod_head() +{ + atf_set "descr" "Tests the remainder % operator" +} +bmod_body() +{ + cat > input.dc << EOF +0 3 % p # basic usage +1 3 % p +2 3 % p +3 3 % p +4 3 % p +_1 3 % p # negative dividends work like a remainder, not a modulo +1 _3 % p # negative divisors use the divisor's absolute value +1k # fractional remainders +5 3 % p +6 5 % p +5.4 3 % p +_.1 3 % p +1.1 _3 % p +1 .3 % p +EOF + dc input.dc > output.txt + cat > expect.txt << EOF +0 +1 +2 +0 +1 +-1 +1 +2 +1 +2.4 +-.1 +1.1 +.1 +EOF + atf_check cmp expect.txt output.txt +} + +atf_test_case bmod_by_zero +bmod_by_zero_head() +{ + atf_set "descr" "remaindering by zero should print a warning" +} +bmod_by_zero_body() +{ + atf_check -e match:"remainder by zero" dc -e '1 0 %' +} + +atf_test_case bdivmod +bdivmod_head() +{ + atf_set "descr" "Tests the divide and modulo ~ operator" +} +bdivmod_body() +{ + cat > input.dc << EOF +0 3 ~ n32Pp # basic usage +1 3 ~ n32Pp +2 3 ~ n32Pp +3 3 ~ n32Pp +4 3 ~ n32Pp +_1 3 ~ n32Pp # negative dividends work like a remainder, not a modulo +_4 3 ~ n32Pp # sign of quotient and divisor must agree +1 _3 ~ n32Pp # negative divisors use the divisor's absolute value +1k # fractional remainders +5 3 ~ n32Pp +6 5 ~ n32Pp +5.4 3 ~ n32Pp +_.1 3 ~ n32Pp +1.1 _3 ~ n32Pp +1 .3 ~ n32Pp +4k +.01 .003 ~ n32Pp # divmod quotient always has scale=0 +EOF + dc input.dc > output.txt + cat > expect.txt << EOF +0 0 +1 0 +2 0 +0 1 +1 1 +-1 0 +-1 -1 +1 0 +2 1.6 +1 1.2 +2.4 1.8 +-.1 0.0 +1.1 -.3 +.1 3.3 +.001 3.3333 +EOF + atf_check cmp expect.txt output.txt +} + +atf_test_case bdivmod_by_zero +bdivmod_by_zero_head() +{ + atf_set "descr" "divmodding by zero should print a warning" +} +bdivmod_by_zero_body() +{ + atf_check -e match:"divide by zero" dc -e '1 0 ~' +} + +atf_init_test_cases() +{ + atf_add_test_case bmod + atf_add_test_case bmod_by_zero + atf_add_test_case bdivmod + atf_add_test_case bdivmod_by_zero +} Modified: head/usr.bin/dc/tests/inout.sh ============================================================================== --- head/usr.bin/dc/tests/inout.sh Thu Dec 7 01:57:27 2017 (r326651) +++ head/usr.bin/dc/tests/inout.sh Thu Dec 7 02:08:55 2017 (r326652) @@ -52,8 +52,8 @@ base16_input_body() 0.1 p # Leading zeros are ignored 00.1 p # Leading zeros are ignored EOF -dc input.dc > output.txt -cat > expect.txt << EOF + dc input.dc > output.txt + cat > expect.txt << EOF 0 16 1 From owner-svn-src-head@freebsd.org Thu Dec 7 03:41:53 2017 Return-Path: Delivered-To: svn-src-head@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 94339E9AB7E; Thu, 7 Dec 2017 03:41:53 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 702E073732; Thu, 7 Dec 2017 03:41:52 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vB73firD060417; Wed, 6 Dec 2017 19:41:44 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vB73fikq060416; Wed, 6 Dec 2017 19:41:44 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712070341.vB73fikq060416@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326651 - in head/bin: cat date kenv setfacl sh In-Reply-To: <201712070157.vB71vSj1036857@repo.freebsd.org> To: Benjamin Kaduk Date: Wed, 6 Dec 2017 19:41:44 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 03:41:53 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: bjk (doc committer) > Date: Thu Dec 7 01:57:27 2017 > New Revision: 326651 > URL: https://svnweb.freebsd.org/changeset/base/326651 > > Log: > Fix mandoc -Tlint warnings in bin/ > > Many style-level issues are still reported. It helps to clarify that .Dd was not needing a bumped if you add an additional line in the commit log that says something like "No (meaningful) content changed" or "Markup change only". Thanks, > Submitted by: Yuri Pankov > Reviewed by: jilles (previous revision) > Differential Revision: https://reviews.freebsd.org/D13334 > > Modified: > head/bin/cat/cat.1 > head/bin/date/date.1 > head/bin/kenv/kenv.1 > head/bin/setfacl/setfacl.1 > head/bin/sh/sh.1 > > Modified: head/bin/cat/cat.1 ... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Dec 7 04:31:22 2017 Return-Path: Delivered-To: svn-src-head@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 12F73E9C355; Thu, 7 Dec 2017 04:31:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id CDD19753B6; Thu, 7 Dec 2017 04:31:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 909ECD4343D; Thu, 7 Dec 2017 15:31:13 +1100 (AEDT) Date: Thu, 7 Dec 2017 15:31:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mark Johnston cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326626 - head/lib/libproc In-Reply-To: <201712061752.vB6Hq1LZ031860@repo.freebsd.org> Message-ID: <20171207142408.F1895@besplex.bde.org> References: <201712061752.vB6Hq1LZ031860@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=WTDbq_u4yy9RV7ibXkYA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 04:31:22 -0000 On Wed, 6 Dec 2017, Mark Johnston wrote: > Log: > Use a global extern declaration to appease gcc. Why not do this to fix the bug which is reported by gcc as requested by using -Wnested-externs (given by WARNS?=6 in ../Makefile.inc). clang doesn't suuport this option except in a broken way by ignoring it. -Wnested-includes is turned off for CXX in sys.mk, but that doesn't apply here. > Modified: head/lib/libproc/proc_create.c > ============================================================================== > --- head/lib/libproc/proc_create.c Wed Dec 6 17:50:10 2017 (r326625) > +++ head/lib/libproc/proc_create.c Wed Dec 6 17:52:01 2017 (r326626) > @@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$"); > > #include "_libproc.h" > > +extern char * const *environ; > + > static int getelfclass(int); > static int proc_init(pid_t, int, int, struct proc_handle **); > > @@ -179,7 +181,6 @@ int > proc_create(const char *file, char * const *argv, char * const *envp, > proc_child_func *pcf, void *child_arg, struct proc_handle **pphdl) > { > - extern char * const *environ; > struct proc_handle *phdl; > int error, status; > pid_t pid; This is still broken. 'environ' is hard to use since it is not declared in any standard header, but it has a whole man page environ(7) whose synoposis declares it as char **. The type mismatch is not detected because no header files that declares 'environ' is included (because none exists). 'environ' is also documented in exec(3) and posix_spawn(3). 'environ' is correctly declared in all 9 other source files and 3 man pages in /usr/src/lib/ that declare it. Declaring it as extern in file scope is worse in some ways that declaring it in block scope, since it breaks this warning so that the bug of misdeclaring it is harder to notice. WARNS=6 also enables -Wredundant-decls to detect this bug when it is only a style bug. Normally variables are declared in headers, so redeclaring them in .c files is a type mismatch if the declarations are compatible (not necessarily the same) and a style bug if they are compatible. gcc up to least 4.2.1] has some bugs involving it not understanding redundancy. clang silently ignores this option too. Bruce From owner-svn-src-head@freebsd.org Thu Dec 7 04:55:32 2017 Return-Path: Delivered-To: svn-src-head@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 3B345E9CC43; Thu, 7 Dec 2017 04:55:32 +0000 (UTC) (envelope-from bryanv@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 0867F75D7E; Thu, 7 Dec 2017 04:55:31 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB74tVr4012164; Thu, 7 Dec 2017 04:55:31 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB74tVMe012163; Thu, 7 Dec 2017 04:55:31 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201712070455.vB74tVMe012163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Thu, 7 Dec 2017 04:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326654 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: bryanv X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 326654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 04:55:32 -0000 Author: bryanv Date: Thu Dec 7 04:55:31 2017 New Revision: 326654 URL: https://svnweb.freebsd.org/changeset/base/326654 Log: Use consistent name for the vxlan VNI parameter name and provide shorthand Submitted by: hrs MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D2868 Modified: head/sbin/ifconfig/ifvxlan.c Modified: head/sbin/ifconfig/ifvxlan.c ============================================================================== --- head/sbin/ifconfig/ifvxlan.c Thu Dec 7 03:57:11 2017 (r326653) +++ head/sbin/ifconfig/ifvxlan.c Thu Dec 7 04:55:31 2017 (r326654) @@ -594,6 +594,7 @@ setvxlan_flush(const char *val, int d, int s, const st static struct cmd vxlan_cmds[] = { + DEF_CLONE_CMD_ARG("vni", setvxlan_vni), DEF_CLONE_CMD_ARG("vxlanid", setvxlan_vni), DEF_CLONE_CMD_ARG("vxlanlocal", setvxlan_local), DEF_CLONE_CMD_ARG("vxlanremote", setvxlan_remote), @@ -608,7 +609,8 @@ static struct cmd vxlan_cmds[] = { DEF_CLONE_CMD("vxlanlearn", 1, setvxlan_learn), DEF_CLONE_CMD("-vxlanlearn", 0, setvxlan_learn), - DEF_CMD_ARG("vxlanvni", setvxlan_vni), + DEF_CMD_ARG("vni", setvxlan_vni), + DEF_CMD_ARG("vxlanid", setvxlan_vni), DEF_CMD_ARG("vxlanlocal", setvxlan_local), DEF_CMD_ARG("vxlanremote", setvxlan_remote), DEF_CMD_ARG("vxlangroup", setvxlan_group), From owner-svn-src-head@freebsd.org Thu Dec 7 05:55:19 2017 Return-Path: Delivered-To: svn-src-head@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 BF17AE9E046; Thu, 7 Dec 2017 05:55:19 +0000 (UTC) (envelope-from eugen@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 8B3DF779F7; Thu, 7 Dec 2017 05:55:19 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB75tIrW037077; Thu, 7 Dec 2017 05:55:18 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB75tIfM037076; Thu, 7 Dec 2017 05:55:18 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712070555.vB75tIfM037076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 7 Dec 2017 05:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326655 - head/sys/geom/raid X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sys/geom/raid X-SVN-Commit-Revision: 326655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 05:55:19 -0000 Author: eugen Date: Thu Dec 7 05:55:18 2017 New Revision: 326655 URL: https://svnweb.freebsd.org/changeset/base/326655 Log: Fix use-after-free that sometimes results in a garbage returned instead of right error code after requests to SINGLE/CONCAT volumes, f.e: # dd if=/dev/raid/r0 bs=512 of=/dev/null dd: /dev/raid/r0: Unknown error: -559038242 Reviewed by: avg (mentor), mav (mentor) MFC after: 3 days Modified: head/sys/geom/raid/tr_concat.c Modified: head/sys/geom/raid/tr_concat.c ============================================================================== --- head/sys/geom/raid/tr_concat.c Thu Dec 7 04:55:31 2017 (r326654) +++ head/sys/geom/raid/tr_concat.c Thu Dec 7 05:55:18 2017 (r326655) @@ -341,7 +341,7 @@ g_raid_tr_iodone_concat(struct g_raid_tr_object *tr, pbp->bio_inbed++; if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; - g_raid_iodone(pbp, bp->bio_error); + g_raid_iodone(pbp, pbp->bio_error); } } From owner-svn-src-head@freebsd.org Thu Dec 7 07:55:40 2017 Return-Path: Delivered-To: svn-src-head@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 AFD34EA0481; Thu, 7 Dec 2017 07:55:40 +0000 (UTC) (envelope-from bde@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 897817AE45; Thu, 7 Dec 2017 07:55:40 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB77tdMY086456; Thu, 7 Dec 2017 07:55:39 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB77tcw3086446; Thu, 7 Dec 2017 07:55:38 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201712070755.vB77tcw3086446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Thu, 7 Dec 2017 07:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326656 - in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 kern mips/mips powerpc/powerpc riscv/riscv sparc64/sparc64 X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 kern mips/mips powerpc/powerpc riscv/riscv sparc64/sparc64 X-SVN-Commit-Revision: 326656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 07:55:40 -0000 Author: bde Date: Thu Dec 7 07:55:38 2017 New Revision: 326656 URL: https://svnweb.freebsd.org/changeset/base/326656 Log: Move instantiation of msgbufp from 9 MD files to subr_prf.c. This variable should be pure MI except possibly for reading it in MD dump routines. Its initialization was pure MD in 4.4BSD, but FreeBSD changed this in r36441 in 1998. There were many imperfections in r36441. This commit fixes only a small one, to simplify fixing the others 1 arch at a time. (r47678 added support for special/early/multiple message buffer initialization which I want in a more general form, but this was too fragile to use because hacking on the msgbufp global corrupted it, and was only used for 5 hours in -current...) Modified: head/sys/amd64/amd64/machdep.c head/sys/arm/arm/pmap-v4.c head/sys/arm/arm/pmap-v6.c head/sys/arm64/arm64/pmap.c head/sys/i386/i386/pmap.c head/sys/kern/subr_prf.c head/sys/mips/mips/machdep.c head/sys/powerpc/powerpc/pmap_dispatch.c head/sys/riscv/riscv/pmap.c head/sys/sparc64/sparc64/pmap.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/amd64/amd64/machdep.c Thu Dec 7 07:55:38 2017 (r326656) @@ -184,8 +184,6 @@ struct init_ops init_ops = { */ extern char kernphys[]; -struct msgbuf *msgbufp; - /* * Physical address of the EFI System Table. Stashed from the metadata hints * passed into the kernel and used by the EFI code to call runtime services. Modified: head/sys/arm/arm/pmap-v4.c ============================================================================== --- head/sys/arm/arm/pmap-v4.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/arm/arm/pmap-v4.c Thu Dec 7 07:55:38 2017 (r326656) @@ -265,8 +265,6 @@ void (*pmap_copy_page_offs_func)(vm_paddr_t a_phys, int cnt); void (*pmap_zero_page_func)(vm_paddr_t, int, int); -struct msgbuf *msgbufp = NULL; - /* * Crashdump maps. */ Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/arm/arm/pmap-v6.c Thu Dec 7 07:55:38 2017 (r326656) @@ -294,8 +294,6 @@ vm_paddr_t first_managed_pa; */ caddr_t _tmppt = 0; -struct msgbuf *msgbufp = NULL; /* XXX move it to machdep.c */ - /* * Crashdump maps. */ Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/arm64/arm64/pmap.c Thu Dec 7 07:55:38 2017 (r326656) @@ -221,8 +221,6 @@ vm_offset_t virtual_avail; /* VA of first avail page ( vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ vm_offset_t kernel_vm_end = 0; -struct msgbuf *msgbufp = NULL; - /* * Data for the pv entry allocation mechanism. * Updates to pv_invl_gen are protected by the pv_list_locks[] Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/i386/i386/pmap.c Thu Dec 7 07:55:38 2017 (r326656) @@ -255,7 +255,6 @@ pt_entry_t *CMAP3; static pd_entry_t *KPTD; caddr_t ptvmmap = 0; caddr_t CADDR3; -struct msgbuf *msgbufp = NULL; /* * Crashdump maps. Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/kern/subr_prf.c Thu Dec 7 07:55:38 2017 (r326656) @@ -122,6 +122,7 @@ static void snprintf_func(int ch, void *arg); static int msgbufmapped; /* Set when safe to use msgbuf */ int msgbuftrigger; +struct msgbuf *msgbufp; static int log_console_output = 1; SYSCTL_INT(_kern, OID_AUTO, log_console_output, CTLFLAG_RWTUN, Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/mips/mips/machdep.c Thu Dec 7 07:55:38 2017 (r326656) @@ -318,8 +318,6 @@ cpu_initclocks(void) cpu_initclocks_bsp(); } -struct msgbuf *msgbufp = NULL; - /* * Initialize the hardware exception vectors, and the jump table used to * call locore cache and TLB management functions, based on the kind Modified: head/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- head/sys/powerpc/powerpc/pmap_dispatch.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/powerpc/powerpc/pmap_dispatch.c Thu Dec 7 07:55:38 2017 (r326656) @@ -72,7 +72,6 @@ static struct kobj_ops mmu_kernel_kops; */ struct pmap kernel_pmap_store; -struct msgbuf *msgbufp; vm_offset_t msgbuf_phys; vm_offset_t kernel_vm_end; Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/riscv/riscv/pmap.c Thu Dec 7 07:55:38 2017 (r326656) @@ -220,8 +220,6 @@ vm_offset_t virtual_avail; /* VA of first avail page ( vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ vm_offset_t kernel_vm_end = 0; -struct msgbuf *msgbufp = NULL; - vm_paddr_t dmap_phys_base; /* The start of the dmap region */ vm_paddr_t dmap_phys_max; /* The limit of the dmap region */ vm_offset_t dmap_max_addr; /* The virtual address limit of the dmap */ Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Thu Dec 7 05:55:18 2017 (r326655) +++ head/sys/sparc64/sparc64/pmap.c Thu Dec 7 07:55:38 2017 (r326656) @@ -100,11 +100,6 @@ __FBSDID("$FreeBSD$"); #include /* - * Virtual address of message buffer - */ -struct msgbuf *msgbufp; - -/* * Map of physical memory reagions */ vm_paddr_t phys_avail[128]; From owner-svn-src-head@freebsd.org Thu Dec 7 08:12:43 2017 Return-Path: Delivered-To: svn-src-head@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 A92CBEA0B7E; Thu, 7 Dec 2017 08:12:43 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) (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 3A3177B8FE; Thu, 7 Dec 2017 08:12:42 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f51.google.com with SMTP id f13so7122163lff.12; Thu, 07 Dec 2017 00:12:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FxhmGKwSarNxO30kwwTyiReZw6RKetE/koFua0iEIgY=; b=AalA7S4wQYVPUVTFMlKENnyaRPevRzk07eiYUmFBlAu20b94gTdFt5MxAIWmq4+O0w OIrSxpQYvGP7JkLnVyErMuGtR8dCyV0CT56BVK7U/wu6Aj1+3R47XAnxxNG9mo1/Qbrt 2sIT2pLIY2Jeep7Y+a3igyCmAlOWiBacQlq5IcyFeItpwVhgls74oeiPf4+OMBs7Vpfj xtL4r+WaFPvDleyuWn0Jd6xYckQOmbbZFj0vRNcpB7RHR+wQ4qO4CGS331k+CCAiz+Z8 /mIq16h2XM9/EBZBU6Tspps8ys22Zewx8XQz/Iv6pc9TTz87K7pQF49UOqvhQOMRCnz5 1ncQ== X-Gm-Message-State: AJaThX64Kw9JsOGhMeew8YiuaHN0p/h6jFaLbQ88gWnfB97DisGRGngN Oa2opFnU4mW/elXg9m/Muf8uNiSG X-Google-Smtp-Source: AGs4zMZvjRL8vCIBgSWX17cL8Pi4Bw11tREtz+UWqWpcY+ugfAUfBaMuLOfFJ7u/acmK/PV4Yzf14A== X-Received: by 10.46.68.11 with SMTP id r11mr15209697lja.1.1512634354939; Thu, 07 Dec 2017 00:12:34 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id a15sm930456ljb.11.2017.12.07.00.12.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 00:12:34 -0800 (PST) Subject: Re: svn commit: r326347 - in head/sys: kern sys vm To: Jeff Roberson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711282340.vASNetfP044382@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Thu, 7 Dec 2017 10:12:33 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201711282340.vASNetfP044382@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 08:12:43 -0000 On 29/11/2017 01:40, Jeff Roberson wrote: > Eliminate kmem_arena and kmem_object in preparation for further NUMA commits. > > The arena argument to kmem_*() is now only used in an assert. A follow-up > commit will remove the argument altogether before we freeze the API for the > next release. > > This replaces the hard limit on kmem size with a soft limit imposed by UMA. When > the soft limit is exceeded we periodically wakeup the UMA reclaim thread to > attempt to shrink KVA. On 32bit architectures this should behave much more > gracefully as we exhaust KVA. On 64bit the limits are likely never hit. > > Reviewed by: markj, kib (some objections) > Discussed with: alc > Tested by: pho > Sponsored by: Netflix / Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D13187 Given this bug report https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224080#c3 can we revert this commit until its impact on ZFS is examined (and fixed)? Unfortunately, there is no public comment from you at all. Not even "yes, I am aware, will be looking into it". -- Andriy Gapon From owner-svn-src-head@freebsd.org Thu Dec 7 08:25:52 2017 Return-Path: Delivered-To: svn-src-head@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 D128FEA0E61; Thu, 7 Dec 2017 08:25:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 873ED7BE58; Thu, 7 Dec 2017 08:25:51 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EE4CF2603A1; Thu, 7 Dec 2017 09:25:48 +0100 (CET) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <8e2fd368-ad3e-27bb-0834-4b6f2f99e905@FreeBSD.org> From: Hans Petter Selasky Message-ID: Date: Thu, 7 Dec 2017 09:23:04 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 08:25:52 -0000 On 12/07/17 01:50, Bryan Drewery wrote: > 8. And you blew away my Makefile.depend files, which I do normally say > I'll deal with, but a far simpler directory structure movement would > have easily kept them and I could have updated them. But now there's not > even something to start from since they were deleted for no reason I've been told that these files are automatically generated and that they are currently not in use. It should be trivial to generate new ones then ?? --HPS From owner-svn-src-head@freebsd.org Thu Dec 7 08:41:28 2017 Return-Path: Delivered-To: svn-src-head@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 6FD3FE803FE; Thu, 7 Dec 2017 08:41:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 389007C6EE; Thu, 7 Dec 2017 08:41:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 72B342603A1; Thu, 7 Dec 2017 09:41:25 +0100 (CET) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <8e2fd368-ad3e-27bb-0834-4b6f2f99e905@FreeBSD.org> From: Hans Petter Selasky Message-ID: <53b6c65e-0e0e-0b18-9740-e97e11a5552f@selasky.org> Date: Thu, 7 Dec 2017 09:38:40 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <8e2fd368-ad3e-27bb-0834-4b6f2f99e905@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 08:41:28 -0000 On 12/07/17 01:48, Bryan Drewery wrote: > 7. We don't put FreeBSD Makefiles in the same directory as contributed > files. It's against the pattern. So moving contrib/ofed/usr.lib/* to > contrib/ofed/*/ is wrong. It complicates future merges of contrib code. > Really none of these Makefiles should be in contrib/ofed - the proper > thing would be to move them out, not to inline them with the contributed > code. Hi, At the moment Mellanox is maintaining this code. Importing vendor code must be merged carefully using graphical tools like "meld". There is no simple C&P at the moment. Several of the utilities in OFED use automake or cmake to build. The Makefiles for FreeBSD must be created manually. This also include the associated config.h files. All the OFED utilities have been re-organized source-wise in upstream GITs since the last OFED user-space update. I'd like the Makefiles to stay in a similar tree as the source tree, so that figuring out which Makefile pull sources from which directory is more trivial instead of having to look into each and every one of them. Finally, Mellanox has sent out several mails to infiniband@freebsd.org and current@freebsd.org warning and telling we are going to merge. I've waited one week extra for input, but it has all been silent. That someone now should jump and say everything is wrong with the Makefiles and build infrastructure in OFED is simply not fair. It would be really helpful to me if you could be more responsive in the few weeks behind or at least say you're busy or on vacation. --HPS From owner-svn-src-head@freebsd.org Thu Dec 7 09:02:18 2017 Return-Path: Delivered-To: svn-src-head@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 3DC43E80DA5; Thu, 7 Dec 2017 09:02:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 E0B367D5F9; Thu, 7 Dec 2017 09:02:17 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D060B2603A1; Thu, 7 Dec 2017 10:02:15 +0100 (CET) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> <20f66fc2-5812-1c0d-ceed-1171d918568d@FreeBSD.org> From: Hans Petter Selasky Message-ID: Date: Thu, 7 Dec 2017 09:59:30 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20f66fc2-5812-1c0d-ceed-1171d918568d@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 09:02:18 -0000 On 12/07/17 02:02, Bryan Drewery wrote: > On 12/6/2017 4:53 PM, Hans Petter Selasky wrote: >> On 12/07/17 01:38, Bryan Drewery wrote: >> >> Try building the COMPAT 32-bit libraries with OFED and you'll see that >> this is needed! >> > > No. The proper fix is to add contrib/ofed/include to the > _LC_INCDIRS.${MK_OFED:tl} list in Makefile.libcompat. Just looking at > the lib32 build you can see 'includes' is only called on a subset of > directories via _LC_INCDIRS. The OFED includes were not there before. How does this make any difference over depending on the include directory like I currently do? I see Makefile.libcompat as yet another way to scatter the build details of OFED. I would like all the build details of OFED to stay in one place, contrib/ofed/xxx so that future generations will understand what needs to be updated. And then if any, Makefile.inc1 Makefile should pull / include from there. > >>> 6. Using these /0 /1 /2 /3 directories actually hurts the 'make >>> libraries' parallelism/dependency graph. It ends up building /1 rather >>> than building libibcm and libibumad directly in its graph.  It creates >>> an indirection which adds more unneeded submake recursion. Please understand that /0 /1 /2 /3 is a best effort compromise, versus parallelism and an ordered build, not having a bunch a manual and not at least undocumented steps. I see no problem if OFED should build a little bit slower due to this. There are plenty of libraries to build during buildworld and the compiler should be saturated all the time, and I don't see a real problem here. >> >> I think this is no argument over having to maintain and update >> Makefile.inc1 with all the dependencies every time there is a change or >> new driver library added to OFED. > > The argument is that it's how things are done. If you come up with a > brilliant solution to make Makefile.inc1 library dependencies simpler, > GREAT! But the one you have put in here is totally bogus. Why can't you use the existing DPADD='s in the Makefiles? The only problem I see is you need a tool to grok the location of the Makefiles for those libraries in order to build the dependency graph? >>> >>> It's fine, I'm going to rewrite it all now. Please add me as a reviewer. >> >> It would be nice if these utilities can be built standalone, outside the >> buildworld target aswell. I've suggested adding an "all-install" variant > > They mostly can, but building things directly with the current build > system simply won't create a SYSROOT or do cross-directory dependencies > properly. That's what DIRDEPS_BUILD does. Again, if you had invented > some great solution to make this simpler that would be good, but that's > not what you have here. You have simply made changes to simply build > ordering in contrib/ofed when not in buildworld, but that's not even > needed if you use the proper SUBDIR and SUBDIR_DEPEND. > >> to make. Having to kick a buildworld to test-build contrib/ofed is quite >> overkill, and that is some of reasoning behind the current Makefile layout. >> >> 6: When a set of libraries should be built in order, it is more clean to >> have 4 dependencies, than a bunch of them in my opinion. > > Creating rats nest dependency lists is not proper or easier to maintain > or cleaner at all. It's wrong. > >> >> You can use the updated "tools/make_libdeps.sh" to figure this out. >> >> The old approach with >> _prebuild_libs+= >> >> won't work :-( >> > > I told you before how to make it work. > > From owner-svn-src-head@freebsd.org Thu Dec 7 09:03:01 2017 Return-Path: Delivered-To: svn-src-head@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 58A42E80E30; Thu, 7 Dec 2017 09:03:01 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 1BEF87D78A; Thu, 7 Dec 2017 09:03:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D958E2603A1; Thu, 7 Dec 2017 10:02:58 +0100 (CET) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> <5ad2e6ba-7209-0e20-bd69-f83ad3410b3a@FreeBSD.org> From: Hans Petter Selasky Message-ID: <2c848aac-ab0a-473e-2807-a8be218f8ba8@selasky.org> Date: Thu, 7 Dec 2017 10:00:13 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <5ad2e6ba-7209-0e20-bd69-f83ad3410b3a@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 09:03:01 -0000 On 12/07/17 02:32, Bryan Drewery wrote: > This is what buildworld+SUBDIR_OVERRIDE is for. The following patch > also mitigates the need to install libraries for build testing which > I'll commit tomorrow: Nice! I will try to check it out. --HPS From owner-svn-src-head@freebsd.org Thu Dec 7 09:05:36 2017 Return-Path: Delivered-To: svn-src-head@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 2F6D2E80F60; Thu, 7 Dec 2017 09:05: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 F08C27D973; Thu, 7 Dec 2017 09:05: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 vB795ZhN016289; Thu, 7 Dec 2017 09:05:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB795ZNl016288; Thu, 7 Dec 2017 09:05:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712070905.vB795ZNl016288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Dec 2017 09:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326657 - head/sys/ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/ufs/ufs X-SVN-Commit-Revision: 326657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 09:05:36 -0000 Author: kib Date: Thu Dec 7 09:05:34 2017 New Revision: 326657 URL: https://svnweb.freebsd.org/changeset/base/326657 Log: Fix livelock in ufsdirhash_create(). When more than one thread enters ufsdirhash_create() for the same directory and the inode dirhash is instantiated, but the dirhash' hash is not, all of them lock the dirhash shared and then try to upgrade. Since there are several threads owning the lock shared, upgrade fails and the same attempt is repeated, ad infinitum. To break the lockstep, lock the dirhash in exclusive mode after the failed try-upgrade. Reported and tested by: pho Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/ufs/ufs/ufs_dirhash.c Modified: head/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- head/sys/ufs/ufs/ufs_dirhash.c Thu Dec 7 07:55:38 2017 (r326656) +++ head/sys/ufs/ufs/ufs_dirhash.c Thu Dec 7 09:05:34 2017 (r326657) @@ -192,9 +192,11 @@ ufsdirhash_create(struct inode *ip) struct dirhash *ndh; struct dirhash *dh; struct vnode *vp; + bool excl; ndh = dh = NULL; vp = ip->i_vnode; + excl = false; for (;;) { /* Racy check for i_dirhash to prefetch a dirhash structure. */ if (ip->i_dirhash == NULL && ndh == NULL) { @@ -231,8 +233,11 @@ ufsdirhash_create(struct inode *ip) ufsdirhash_hold(dh); VI_UNLOCK(vp); - /* Acquire a shared lock on existing hashes. */ - sx_slock(&dh->dh_lock); + /* Acquire a lock on existing hashes. */ + if (excl) + sx_xlock(&dh->dh_lock); + else + sx_slock(&dh->dh_lock); /* The hash could've been recycled while we were waiting. */ VI_LOCK(vp); @@ -253,9 +258,10 @@ ufsdirhash_create(struct inode *ip) * so we can recreate it. If we fail the upgrade, drop our * lock and try again. */ - if (sx_try_upgrade(&dh->dh_lock)) + if (excl || sx_try_upgrade(&dh->dh_lock)) break; sx_sunlock(&dh->dh_lock); + excl = true; } /* Free the preallocated structure if it was not necessary. */ if (ndh) { From owner-svn-src-head@freebsd.org Thu Dec 7 09:09:32 2017 Return-Path: Delivered-To: svn-src-head@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 A18E6E810D9; Thu, 7 Dec 2017 09:09:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 561017DB97; Thu, 7 Dec 2017 09:09:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 199B62603A1; Thu, 7 Dec 2017 10:09:30 +0100 (CET) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> From: Hans Petter Selasky Message-ID: <8803f80b-56ee-d6e1-e8a4-5060a5c5fccf@selasky.org> Date: Thu, 7 Dec 2017 10:06:45 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 09:09:32 -0000 On 12/07/17 02:41, Bryan Drewery wrote: > On 12/6/2017 4:53 PM, Hans Petter Selasky wrote: >> On 12/07/17 01:38, Bryan Drewery wrote: >>> 1. SUBDIR=../../somewhere else is inherently wrong. >>> 2. Building a library from a directory named '2' is wrong. >>> 3. Not just using proper SUBDIR_DEPEND and making all these subdirs is >>> not needed and complicates things MORE by splitting them all up. >>> 4. Building a library from a directory where its real bsd.lib.mk is not >>> at is wrong. >>> 5. Depending on an include directory in the Makefile.inc1 library >>> dependencies is simply not needed - I told you that. >> >> Try building the COMPAT 32-bit libraries with OFED and you'll see that >> this is needed! >> >>> 6. Using these /0 /1 /2 /3 directories actually hurts the 'make >>> libraries' parallelism/dependency graph. It ends up building /1 rather >>> than building libibcm and libibumad directly in its graph.  It creates >>> an indirection which adds more unneeded submake recursion. >> >> I think this is no argument over having to maintain and update >> Makefile.inc1 with all the dependencies every time there is a change or >> new driver library added to OFED. > > Here's the proper change to contrib/ofed/usr.lib/Makefile, it is trivial. > >> diff --git contrib/ofed/usr.lib/Makefile contrib/ofed/usr.lib/Makefile >> index 47b97591f5b7..9c22b889fa19 100644 >> --- contrib/ofed/usr.lib/Makefile >> +++ contrib/ofed/usr.lib/Makefile >> @@ -1,13 +1,24 @@ >> -SUBDIR= libibcommon libibmad libibumad libibverbs libmlx4 libmthca \ >> - libopensm libosmcomp libosmvendor libibcm librdmacm libsdp libcxgb4 >> +SUBDIR= \ >> + libibverbs \ >> + libibcm \ >> + libibumad \ >> + librdmacm \ >> + libibmad \ >> + libosmcomp \ >> + libosmvendor \ >> + libcxgb4 \ >> + libmlx4 \ >> + libmlx5 \ >> + libibnetdisc \ >> + libopensm >> >> SUBDIR_DEPEND_libcxgb4= libibverbs >> SUBDIR_DEPEND_libibcm= libibverbs >> -SUBDIR_DEPEND_libibmad= libibcommon libibumad >> -SUBDIR_DEPEND_libibumad= libibcommon >> +SUBDIR_DEPEND_libibmad= libibumad >> +SUBDIR_DEPEND_libibnetdisc= libosmcomp libibmad libibumad >> SUBDIR_DEPEND_libmlx4= libibverbs >> -SUBDIR_DEPEND_libmthca= libibverbs >> -SUBDIR_DEPEND_libosmvendor= libibumad libopensm libosmcomp >> +SUBDIR_DEPEND_libmlx5= libibverbs >> +SUBDIR_DEPEND_libosmvendor= libibumad >> SUBDIR_DEPEND_librdmacm= libibverbs >> SUBDIR_PARALLEL= >> > > And Makefile.inc1 which is even more simple. > >> @@ -2365,14 +2414,12 @@ _lib_libradius= lib/libradius >> .if ${MK_OFED} != "no" >> _ofed_lib= contrib/ofed/usr.lib >> _prebuild_libs+= contrib/ofed/usr.lib/libosmcomp >> -_prebuild_libs+= contrib/ofed/usr.lib/libopensm >> -_prebuild_libs+= contrib/ofed/usr.lib/libibcommon >> _prebuild_libs+= contrib/ofed/usr.lib/libibverbs >> +_prebuild_libs+= contrib/ofed/usr.lib/libibmad >> _prebuild_libs+= contrib/ofed/usr.lib/libibumad >> >> -contrib/ofed/usr.lib/libopensm__L: lib/libthr__L >> contrib/ofed/usr.lib/libosmcomp__L: lib/libthr__L >> -contrib/ofed/usr.lib/libibumad__L: contrib/ofed/usr.lib/libibcommon__L >> +contrib/ofed/usr.lib/libibmad__L: contrib/ofed/usr.lib/libibumad__L >> .endif Hi, FYI: The paths of the libraries are no longer correct. Running: sh tools/make_libdeps.sh $PWD Gives this list of actual dependencies: > contrib/ofed/libcxgb4: contrib/ofed/libibverbs lib/libthr > contrib/ofed/libibcm: contrib/ofed/libibverbs > contrib/ofed/libibmad: contrib/ofed/libibumad > contrib/ofed/libibnetdisc: contrib/ofed/opensm/complib contrib/ofed/libibmad contrib/ofed/libibumad > contrib/ofed/libmlx4: contrib/ofed/libibverbs lib/libthr > contrib/ofed/libmlx5: contrib/ofed/libibverbs lib/libthr > contrib/ofed/librdmacm: contrib/ofed/libibverbs > contrib/ofed/opensm/complib: lib/libthr > contrib/ofed/opensm/libopensm: lib/libthr > contrib/ofed/opensm/libvendor: contrib/ofed/libibumad lib/libthr All of this information is then in turn based on the given: LIBADD= XXX In the respective Makefiles. There is no need to duplicate this information. It should be pulled from of the existing OFED Makefiles. --HPS From owner-svn-src-head@freebsd.org Thu Dec 7 09:40:16 2017 Return-Path: Delivered-To: svn-src-head@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 D5403E819CC; Thu, 7 Dec 2017 09:40:16 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 9890A7EB84; Thu, 7 Dec 2017 09:40:16 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 918512603A1; Thu, 7 Dec 2017 10:40:12 +0100 (CET) Subject: Re: svn commit: r326169 - in head: . contrib/ofed lib/libc/locale share/mk sys/amd64/amd64 sys/amd64/conf sys/conf sys/contrib/rdma/krping sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/... From: Hans Petter Selasky To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711241450.vAOEoSFW056744@repo.freebsd.org> <0fec20d5-cb8f-4937-5dd0-54b8b7461772@selasky.org> <19abac3b-8407-abd8-4fe9-c23d6bd7121f@selasky.org> <8803f80b-56ee-d6e1-e8a4-5060a5c5fccf@selasky.org> Message-ID: <7f577cfd-35a5-a9de-f020-8aba9c99c46d@selasky.org> Date: Thu, 7 Dec 2017 10:37:27 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <8803f80b-56ee-d6e1-e8a4-5060a5c5fccf@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 09:40:16 -0000 FYI: The main targets for contrib/ofed is currently [i386 and] amd64. I see there are some minor build issues for other targets, and these will be fixes as we go along. Currently contrib/ofed is not connected to the default buildworld and this should not cause any problems for the average FreeBSD user. --HPS From owner-svn-src-head@freebsd.org Thu Dec 7 10:03:46 2017 Return-Path: Delivered-To: svn-src-head@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 CFD92E82301; Thu, 7 Dec 2017 10:03:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEA1A7FC04; Thu, 7 Dec 2017 10:03:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 037BA1F67E; Thu, 7 Dec 2017 10:03:45 +0000 (UTC) Date: Thu, 7 Dec 2017 10:03:45 +0000 From: Alexey Dokuchaev To: Jung-uk Kim Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r326383 - head/sys/x86/cpufreq Message-ID: <20171207100345.GA59559@FreeBSD.org> References: <201711300140.vAU1e7dC001292@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 10:03:46 -0000 On Thu, Nov 30, 2017 at 03:08:49PM -0500, Jung-uk Kim wrote: > ... > Probably. However, I am just trying to fix my FX-8350 and A10-6800 and > I don't have Zen processors to verify the MSRs are actually working on > those CPUs. Ah, that's so lovely, thanks Jung-uk; I feel that our support for AMD fam. 15h CPUs is lacking. E.g. only four P-states are reported for my A8-5550M, while it supports boosted P-states per BKDG, and reading MSRs directly via `sysutils/amdmsrtweaker' reports eight of them (P0 .. P7), with three turbo P-states P0 P1 P2. Since you have A10-6800 you might try to reproduce what I see here with A8-5550M. ./danfe From owner-svn-src-head@freebsd.org Thu Dec 7 15:16:18 2017 Return-Path: Delivered-To: svn-src-head@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 CF9A8E89E97; Thu, 7 Dec 2017 15:16:18 +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 9CC0A67FF0; Thu, 7 Dec 2017 15:16:18 +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 vB7FGHD6069831; Thu, 7 Dec 2017 15:16:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7FGHuT069830; Thu, 7 Dec 2017 15:16:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712071516.vB7FGHuT069830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 7 Dec 2017 15:16:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326658 - head/lib/libefivar X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/lib/libefivar X-SVN-Commit-Revision: 326658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 15:16:18 -0000 Author: markj Date: Thu Dec 7 15:16:17 2017 New Revision: 326658 URL: https://svnweb.freebsd.org/changeset/base/326658 Log: Ensure that "out" is initialized in all error paths. Reported by: gcc Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D13402 Modified: head/lib/libefivar/efivar-dp-xlate.c Modified: head/lib/libefivar/efivar-dp-xlate.c ============================================================================== --- head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 09:05:34 2017 (r326657) +++ head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 15:16:17 2017 (r326658) @@ -529,7 +529,7 @@ build_dp(const char *efimedia, const char *relpath, ef { char *fp, *dptxt = NULL; int rv = 0; - efidp out; + efidp out = NULL; size_t len; fp = path_to_file_dp(relpath); From owner-svn-src-head@freebsd.org Thu Dec 7 16:37:20 2017 Return-Path: Delivered-To: svn-src-head@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 A9647E8BE49; Thu, 7 Dec 2017 16:37:20 +0000 (UTC) (envelope-from bdrewery@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 72B926C5A6; Thu, 7 Dec 2017 16:37:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB7GbJlm007042; Thu, 7 Dec 2017 16:37:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7GbJ4i007041; Thu, 7 Dec 2017 16:37:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201712071637.vB7GbJ4i007041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 7 Dec 2017 16:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326659 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 326659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 16:37:20 -0000 Author: bdrewery Date: Thu Dec 7 16:37:19 2017 New Revision: 326659 URL: https://svnweb.freebsd.org/changeset/base/326659 Log: Look for libraries in OBJDIR when building outside of buildworld. This allows build testing more easily without establishing a sysroot or installing the files. Sponsored by: Dell EMC Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Thu Dec 7 15:16:17 2017 (r326658) +++ head/share/mk/src.libnames.mk Thu Dec 7 16:37:19 2017 (r326659) @@ -359,7 +359,7 @@ LIB${_l:tu}?= ${LIBDESTDIR}${LIBDIR_BASE}/libprivate${ .endfor .for _l in ${_LIBRARIES} -.if ${_INTERNALLIBS:M${_l}} +.if ${_INTERNALLIBS:M${_l}} || !defined(SYSROOT) LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} .endif DPADD_${_l}?= ${LIB${_l:tu}} From owner-svn-src-head@freebsd.org Thu Dec 7 18:03:03 2017 Return-Path: Delivered-To: svn-src-head@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 41863E8D8F9; Thu, 7 Dec 2017 18:03:03 +0000 (UTC) (envelope-from jkim@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 8FCF86F9C0; Thu, 7 Dec 2017 18:03:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB7I31me045587; Thu, 7 Dec 2017 18:03:01 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7I2ves045538; Thu, 7 Dec 2017 18:02:57 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201712071802.vB7I2ves045538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 7 Dec 2017 18:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326662 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn c... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/a... X-SVN-Commit-Revision: 326662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 18:03:03 -0000 Author: jkim Date: Thu Dec 7 18:02:57 2017 New Revision: 326662 URL: https://svnweb.freebsd.org/changeset/base/326662 Log: Merge OpenSSL 1.0.2n. Added: head/crypto/openssl/ssl/fatalerrtest.c - copied unchanged from r326660, vendor-crypto/openssl/dist/ssl/fatalerrtest.c Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/apps.c head/crypto/openssl/apps/dsa.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/speed.c head/crypto/openssl/crypto/aes/asm/aes-armv4.pl head/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl head/crypto/openssl/crypto/asn1/a_i2d_fp.c head/crypto/openssl/crypto/bio/b_print.c head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl head/crypto/openssl/crypto/bn/bn_exp.c head/crypto/openssl/crypto/dsa/dsa_ameth.c head/crypto/openssl/crypto/engine/eng_fat.c head/crypto/openssl/crypto/lhash/lhash.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/rsa/rsa_gen.c head/crypto/openssl/crypto/sha/asm/sha256-armv4.pl head/crypto/openssl/crypto/symhacks.h head/crypto/openssl/crypto/x509v3/v3_lib.c head/crypto/openssl/crypto/x509v3/v3_scts.c head/crypto/openssl/doc/crypto/EVP_EncryptInit.pod head/crypto/openssl/ssl/Makefile head/crypto/openssl/ssl/bad_dtls_test.c head/crypto/openssl/ssl/s23_clnt.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssltest.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/util/copy-if-different.pl head/crypto/openssl/util/copy.pl head/crypto/openssl/util/libeay.num head/crypto/openssl/util/mk1mf.pl head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/amd64/rsaz-avx2.S head/secure/lib/libcrypto/arm/aes-armv4.S head/secure/lib/libcrypto/arm/bsaes-armv7.S head/secure/lib/libcrypto/arm/sha256-armv4.S head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/EC_GROUP_new.3 head/secure/lib/libcrypto/man/EC_KEY_new.3 head/secure/lib/libcrypto/man/EC_POINT_add.3 head/secure/lib/libcrypto/man/EC_POINT_new.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_meth_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_check_host.3 head/secure/lib/libcrypto/man/X509_check_private_key.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_ECPKParameters.3 head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ec.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CONF_CTX_new.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libssl/man/SSL_CONF_cmd.3 head/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 head/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get0_param.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set1_curves.3 head/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_check_chain.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_export_keying_material.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/CHANGES Thu Dec 7 18:02:57 2017 (r326662) @@ -7,6 +7,51 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.0.2m and 1.0.2n [7 Dec 2017] + + *) Read/write after SSL object in error state + + OpenSSL 1.0.2 (starting from version 1.0.2b) introduced an "error state" + mechanism. The intent was that if a fatal error occurred during a handshake + then OpenSSL would move into the error state and would immediately fail if + you attempted to continue the handshake. This works as designed for the + explicit handshake functions (SSL_do_handshake(), SSL_accept() and + SSL_connect()), however due to a bug it does not work correctly if + SSL_read() or SSL_write() is called directly. In that scenario, if the + handshake fails then a fatal error will be returned in the initial function + call. If SSL_read()/SSL_write() is subsequently called by the application + for the same SSL object then it will succeed and the data is passed without + being decrypted/encrypted directly from the SSL/TLS record layer. + + In order to exploit this issue an application bug would have to be present + that resulted in a call to SSL_read()/SSL_write() being issued after having + already received a fatal error. + + This issue was reported to OpenSSL by David Benjamin (Google). + (CVE-2017-3737) + [Matt Caswell] + + *) rsaz_1024_mul_avx2 overflow bug on x86_64 + + There is an overflow bug in the AVX2 Montgomery multiplication procedure + used in exponentiation with 1024-bit moduli. No EC algorithms are affected. + Analysis suggests that attacks against RSA and DSA as a result of this + defect would be very difficult to perform and are not believed likely. + Attacks against DH1024 are considered just feasible, because most of the + work necessary to deduce information about a private key may be performed + offline. The amount of resources required for such an attack would be + significant. However, for an attack on TLS to be meaningful, the server + would have to share the DH1024 private key among multiple clients, which is + no longer an option since CVE-2016-0701. + + This only affects processors that support the AVX2 but not ADX extensions + like Intel Haswell (4th generation). + + This issue was reported to OpenSSL by David Benjamin (Google). The issue + was originally found via the OSS-Fuzz project. + (CVE-2017-3738) + [Andy Polyakov] + Changes between 1.0.2l and 1.0.2m [2 Nov 2017] *) bn_sqrx8x_internal carry bug on x86_64 Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/Configure Thu Dec 7 18:02:57 2017 (r326662) @@ -592,9 +592,9 @@ my %table=( "debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32", # x86 Win32 target defaults to ANSI API, if you want UNICODE, complement # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE' -"VC-WIN32","cl:-W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", +"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", # Unified CE target -"debug-VC-WIN32","cl:-W3 -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", +"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", "VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32", # Borland C++ 4.5 Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/Makefile Thu Dec 7 18:02:57 2017 (r326662) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.2m +VERSION=1.0.2n MAJOR=1 MINOR=0.2 SHLIB_VERSION_NUMBER=1.0.0 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/NEWS Thu Dec 7 18:02:57 2017 (r326662) @@ -5,6 +5,11 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.2m and OpenSSL 1.0.2n [7 Dec 2017] + + o Read/write after SSL object in error state (CVE-2017-3737) + o rsaz_1024_mul_avx2 overflow bug on x86_64 (CVE-2017-3738) + Major changes between OpenSSL 1.0.2l and OpenSSL 1.0.2m [2 Nov 2017] o bn_sqrx8x_internal carry bug on x86_64 (CVE-2017-3736) Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/README Thu Dec 7 18:02:57 2017 (r326662) @@ -1,5 +1,5 @@ - OpenSSL 1.0.2m 2 Nov 2017 + OpenSSL 1.0.2n 7 Dec 2017 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/apps.c ============================================================================== --- head/crypto/openssl/apps/apps.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/apps/apps.c Thu Dec 7 18:02:57 2017 (r326662) @@ -148,6 +148,10 @@ #ifdef _WIN32 static int WIN32_rename(const char *from, const char *to); # define rename(from,to) WIN32_rename((from),(to)) +# ifdef fileno +# undef fileno +# endif +# define fileno(a) (int)_fileno(a) #endif typedef struct { @@ -2788,13 +2792,13 @@ unsigned char *next_protos_parse(unsigned short *outle OPENSSL_free(out); return NULL; } - out[start] = i - start; + out[start] = (unsigned char)(i - start); start = i + 1; } else out[i + 1] = in[i]; } - *outlen = len + 1; + *outlen = (unsigned char)(len + 1); return out; } #endif /* ndef OPENSSL_NO_TLSEXT */ Modified: head/crypto/openssl/apps/dsa.c ============================================================================== --- head/crypto/openssl/apps/dsa.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/apps/dsa.c Thu Dec 7 18:02:57 2017 (r326662) @@ -327,6 +327,9 @@ int MAIN(int argc, char **argv) } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) { EVP_PKEY *pk; pk = EVP_PKEY_new(); + if (pk == NULL) + goto end; + EVP_PKEY_set1_DSA(pk, dsa); if (outformat == FORMAT_PVK) i = i2b_PVK_bio(out, pk, pvk_encr, 0, passout); Modified: head/crypto/openssl/apps/s_client.c ============================================================================== --- head/crypto/openssl/apps/s_client.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/apps/s_client.c Thu Dec 7 18:02:57 2017 (r326662) @@ -630,10 +630,11 @@ static int serverinfo_cli_parse_cb(SSL *s, unsigned in unsigned char ext_buf[4 + 65536]; /* Reconstruct the type/len fields prior to extension data */ - ext_buf[0] = ext_type >> 8; - ext_buf[1] = ext_type & 0xFF; - ext_buf[2] = inlen >> 8; - ext_buf[3] = inlen & 0xFF; + inlen &= 0xffff; /* for formal memcpy correctness */ + ext_buf[0] = (unsigned char)(ext_type >> 8); + ext_buf[1] = (unsigned char)(ext_type); + ext_buf[2] = (unsigned char)(inlen >> 8); + ext_buf[3] = (unsigned char)(inlen); memcpy(ext_buf + 4, in, inlen); BIO_snprintf(pem_name, sizeof(pem_name), "SERVERINFO FOR EXTENSION %d", Modified: head/crypto/openssl/apps/speed.c ============================================================================== --- head/crypto/openssl/apps/speed.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/apps/speed.c Thu Dec 7 18:02:57 2017 (r326662) @@ -2829,8 +2829,8 @@ static void multiblock_speed(const EVP_CIPHER *evp_cip RAND_bytes(out, 16); len += 16; - aad[11] = len >> 8; - aad[12] = len; + aad[11] = (unsigned char)(len >> 8); + aad[12] = (unsigned char)(len); pad = EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_AEAD_TLS1_AAD, EVP_AEAD_TLS1_AAD_LEN, aad); Modified: head/crypto/openssl/crypto/aes/asm/aes-armv4.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aes-armv4.pl Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/aes/asm/aes-armv4.pl Thu Dec 7 18:02:57 2017 (r326662) @@ -184,7 +184,7 @@ AES_encrypt: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_encrypt #else - adr r3,AES_encrypt + adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} mov $rounds,r0 @ inp @@ -430,7 +430,7 @@ _armv4_AES_set_encrypt_key: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_set_encrypt_key #else - adr r3,private_AES_set_encrypt_key + adr r3,. #endif teq r0,#0 #if __ARM_ARCH__>=7 @@ -952,7 +952,7 @@ AES_decrypt: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_decrypt #else - adr r3,AES_decrypt + adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} mov $rounds,r0 @ inp Modified: head/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/aes/asm/bsaes-armv7.pl Thu Dec 7 18:02:57 2017 (r326662) @@ -724,7 +724,7 @@ $code.=<<___; .type _bsaes_decrypt8,%function .align 4 _bsaes_decrypt8: - adr $const,_bsaes_decrypt8 + adr $const,. vldmia $key!, {@XMM[9]} @ round 0 key add $const,$const,#.LM0ISR-_bsaes_decrypt8 @@ -819,7 +819,7 @@ _bsaes_const: .type _bsaes_encrypt8,%function .align 4 _bsaes_encrypt8: - adr $const,_bsaes_encrypt8 + adr $const,. vldmia $key!, {@XMM[9]} @ round 0 key sub $const,$const,#_bsaes_encrypt8-.LM0SR @@ -923,7 +923,7 @@ $code.=<<___; .type _bsaes_key_convert,%function .align 4 _bsaes_key_convert: - adr $const,_bsaes_key_convert + adr $const,. vld1.8 {@XMM[7]}, [$inp]! @ load round 0 key sub $const,$const,#_bsaes_key_convert-.LM0 vld1.8 {@XMM[15]}, [$inp]! @ load round 1 key Modified: head/crypto/openssl/crypto/asn1/a_i2d_fp.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_i2d_fp.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/asn1/a_i2d_fp.c Thu Dec 7 18:02:57 2017 (r326662) @@ -87,6 +87,9 @@ int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned int i, j = 0, n, ret = 1; n = i2d(x, NULL); + if (n <= 0) + return 0; + b = (char *)OPENSSL_malloc(n); if (b == NULL) { ASN1err(ASN1_F_ASN1_I2D_BIO, ERR_R_MALLOC_FAILURE); Modified: head/crypto/openssl/crypto/bio/b_print.c ============================================================================== --- head/crypto/openssl/crypto/bio/b_print.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/bio/b_print.c Thu Dec 7 18:02:57 2017 (r326662) @@ -385,7 +385,7 @@ _dopr(char **sbuffer, if (cflags == DP_C_SHORT) { short int *num; num = va_arg(args, short int *); - *num = currlen; + *num = (short int)currlen; } else if (cflags == DP_C_LONG) { /* XXX */ long int *num; num = va_arg(args, long int *); @@ -502,7 +502,7 @@ fmtint(char **sbuffer, if (!(flags & DP_F_UNSIGNED)) { if (value < 0) { signvalue = '-'; - uvalue = -(unsigned LLONG)value; + uvalue = 0 - (unsigned LLONG)value; } else if (flags & DP_F_PLUS) signvalue = '+'; else if (flags & DP_F_SPACE) Modified: head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl ============================================================================== --- head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Thu Dec 7 18:02:57 2017 (r326662) @@ -239,7 +239,7 @@ $code.=<<___; vmovdqu 32*8-128($ap), $ACC8 lea 192(%rsp), $tp0 # 64+128=192 - vpbroadcastq .Land_mask(%rip), $AND_MASK + vmovdqu .Land_mask(%rip), $AND_MASK jmp .LOOP_GRANDE_SQR_1024 .align 32 @@ -1070,10 +1070,10 @@ $code.=<<___; vpmuludq 32*6-128($np),$Yi,$TEMP1 vpaddq $TEMP1,$ACC6,$ACC6 vpmuludq 32*7-128($np),$Yi,$TEMP2 - vpblendd \$3, $ZERO, $ACC9, $ACC9 # correct $ACC3 + vpblendd \$3, $ZERO, $ACC9, $TEMP1 # correct $ACC3 vpaddq $TEMP2,$ACC7,$ACC7 vpmuludq 32*8-128($np),$Yi,$TEMP0 - vpaddq $ACC9, $ACC3, $ACC3 # correct $ACC3 + vpaddq $TEMP1, $ACC3, $ACC3 # correct $ACC3 vpaddq $TEMP0,$ACC8,$ACC8 mov %rbx, %rax @@ -1086,7 +1086,9 @@ $code.=<<___; vmovdqu -8+32*2-128($ap),$TEMP2 mov $r1, %rax + vpblendd \$0xfc, $ZERO, $ACC9, $ACC9 # correct $ACC3 imull $n0, %eax + vpaddq $ACC9,$ACC4,$ACC4 # correct $ACC3 and \$0x1fffffff, %eax imulq 16-128($ap),%rbx @@ -1322,15 +1324,12 @@ ___ # But as we underutilize resources, it's possible to correct in # each iteration with marginal performance loss. But then, as # we do it in each iteration, we can correct less digits, and -# avoid performance penalties completely. Also note that we -# correct only three digits out of four. This works because -# most significant digit is subjected to less additions. +# avoid performance penalties completely. $TEMP0 = $ACC9; $TEMP3 = $Bi; $TEMP4 = $Yi; $code.=<<___; - vpermq \$0, $AND_MASK, $AND_MASK vpaddq (%rsp), $TEMP1, $ACC0 vpsrlq \$29, $ACC0, $TEMP1 @@ -1763,7 +1762,7 @@ $code.=<<___; .align 64 .Land_mask: - .quad 0x1fffffff,0x1fffffff,0x1fffffff,-1 + .quad 0x1fffffff,0x1fffffff,0x1fffffff,0x1fffffff .Lscatter_permd: .long 0,2,4,6,7,7,7,7 .Lgather_permd: Modified: head/crypto/openssl/crypto/bn/bn_exp.c ============================================================================== --- head/crypto/openssl/crypto/bn/bn_exp.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/bn/bn_exp.c Thu Dec 7 18:02:57 2017 (r326662) @@ -149,7 +149,7 @@ int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p || BN_get_flags(a, BN_FLG_CONSTTIME) != 0) { /* BN_FLG_CONSTTIME only supported by BN_mod_exp_mont() */ BNerr(BN_F_BN_EXP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return -1; + return 0; } BN_CTX_start(ctx); @@ -285,7 +285,7 @@ int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) { /* BN_FLG_CONSTTIME only supported by BN_mod_exp_mont() */ BNerr(BN_F_BN_MOD_EXP_RECP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return -1; + return 0; } bits = BN_num_bits(p); @@ -1228,7 +1228,7 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) { /* BN_FLG_CONSTTIME only supported by BN_mod_exp_mont() */ BNerr(BN_F_BN_MOD_EXP_MONT_WORD, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return -1; + return 0; } bn_check_top(p); @@ -1361,7 +1361,7 @@ int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, cons || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) { /* BN_FLG_CONSTTIME only supported by BN_mod_exp_mont() */ BNerr(BN_F_BN_MOD_EXP_SIMPLE, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); - return -1; + return 0; } bits = BN_num_bits(p); Modified: head/crypto/openssl/crypto/dsa/dsa_ameth.c ============================================================================== --- head/crypto/openssl/crypto/dsa/dsa_ameth.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/dsa/dsa_ameth.c Thu Dec 7 18:02:57 2017 (r326662) @@ -133,6 +133,7 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_P unsigned char *penc = NULL; int penclen; ASN1_STRING *str = NULL; + ASN1_OBJECT *aobj; dsa = pkey->pkey.dsa; if (pkey->save_parameters && dsa->p && dsa->q && dsa->g) { @@ -159,8 +160,11 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_P goto err; } - if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(EVP_PKEY_DSA), - ptype, str, penc, penclen)) + aobj = OBJ_nid2obj(EVP_PKEY_DSA); + if (aobj == NULL) + goto err; + + if (X509_PUBKEY_set0_param(pk, aobj, ptype, str, penc, penclen)) return 1; err: Modified: head/crypto/openssl/crypto/engine/eng_fat.c ============================================================================== --- head/crypto/openssl/crypto/engine/eng_fat.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/engine/eng_fat.c Thu Dec 7 18:02:57 2017 (r326662) @@ -167,6 +167,7 @@ int ENGINE_register_complete(ENGINE *e) #endif ENGINE_register_RAND(e); ENGINE_register_pkey_meths(e); + ENGINE_register_pkey_asn1_meths(e); return 1; } Modified: head/crypto/openssl/crypto/lhash/lhash.c ============================================================================== --- head/crypto/openssl/crypto/lhash/lhash.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/lhash/lhash.c Thu Dec 7 18:02:57 2017 (r326662) @@ -107,7 +107,7 @@ * https://en.wikipedia.org/wiki/Linear_hashing * * Litwin, Witold (1980), "Linear hashing: A new tool for file and table - * addressing", Proc. 6th Conference on Very Large Databases: 212–223 + * addressing", Proc. 6th Conference on Very Large Databases: 212-223 * http://hackthology.com/pdfs/Litwin-1980-Linear_Hashing.pdf * * From the wikipedia article "Linear hashing is used in the BDB Berkeley Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/opensslv.h Thu Dec 7 18:02:57 2017 (r326662) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x100020dfL +# define OPENSSL_VERSION_NUMBER 0x100020efL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2m-fips 2 Nov 2017" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n-fips 7 Dec 2017" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2m-freebsd 2 Nov 2017" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n-freebsd 7 Dec 2017" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: head/crypto/openssl/crypto/rsa/rsa_gen.c ============================================================================== --- head/crypto/openssl/crypto/rsa/rsa_gen.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/rsa/rsa_gen.c Thu Dec 7 18:02:57 2017 (r326662) @@ -110,6 +110,16 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGN int bitsp, bitsq, ok = -1, n = 0; BN_CTX *ctx = NULL; + /* + * When generating ridiculously small keys, we can get stuck + * continually regenerating the same prime values. + */ + if (bits < 16) { + ok = 0; /* we set our own err */ + RSAerr(RSA_F_RSA_BUILTIN_KEYGEN, RSA_R_KEY_SIZE_TOO_SMALL); + goto err; + } + ctx = BN_CTX_new(); if (ctx == NULL) goto err; @@ -161,21 +171,10 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGN if (!BN_GENCB_call(cb, 3, 0)) goto err; for (;;) { - /* - * When generating ridiculously small keys, we can get stuck - * continually regenerating the same prime values. Check for this and - * bail if it happens 3 times. - */ - unsigned int degenerate = 0; do { if (!BN_generate_prime_ex(rsa->q, bitsq, 0, NULL, NULL, cb)) goto err; - } while ((BN_cmp(rsa->p, rsa->q) == 0) && (++degenerate < 3)); - if (degenerate == 3) { - ok = 0; /* we set our own err */ - RSAerr(RSA_F_RSA_BUILTIN_KEYGEN, RSA_R_KEY_SIZE_TOO_SMALL); - goto err; - } + } while (BN_cmp(rsa->p, rsa->q) == 0); if (!BN_sub(r2, rsa->q, BN_value_one())) goto err; if (!BN_gcd(r1, r2, rsa->e, ctx)) Modified: head/crypto/openssl/crypto/sha/asm/sha256-armv4.pl ============================================================================== --- head/crypto/openssl/crypto/sha/asm/sha256-armv4.pl Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/sha/asm/sha256-armv4.pl Thu Dec 7 18:02:57 2017 (r326662) @@ -205,7 +205,7 @@ sha256_block_data_order: #if __ARM_ARCH__<7 sub r3,pc,#8 @ sha256_block_data_order #else - adr r3,sha256_block_data_order + adr r3,. #endif #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) ldr r12,.LOPENSSL_armcap Modified: head/crypto/openssl/crypto/symhacks.h ============================================================================== --- head/crypto/openssl/crypto/symhacks.h Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/symhacks.h Thu Dec 7 18:02:57 2017 (r326662) @@ -280,6 +280,8 @@ # define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf # undef EVP_PKEY_meth_set_verify_recover # define EVP_PKEY_meth_set_verify_recover EVP_PKEY_meth_set_vrfy_recover +# undef EVP_PKEY_meth_get_verify_recover +# define EVP_PKEY_meth_get_verify_recover EVP_PKEY_meth_get_vrfy_recover /* Hack some long EC names */ # undef EC_GROUP_set_point_conversion_form Modified: head/crypto/openssl/crypto/x509v3/v3_lib.c ============================================================================== --- head/crypto/openssl/crypto/x509v3/v3_lib.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/x509v3/v3_lib.c Thu Dec 7 18:02:57 2017 (r326662) @@ -286,9 +286,9 @@ void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, int crit, unsigned long flags) { - int extidx = -1; - int errcode; - X509_EXTENSION *ext, *extmp; + int errcode, extidx = -1; + X509_EXTENSION *ext = NULL, *extmp; + STACK_OF(X509_EXTENSION) *ret = NULL; unsigned long ext_op = flags & X509V3_ADD_OP_MASK; /* @@ -347,12 +347,20 @@ int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int return 1; } - if (!*x && !(*x = sk_X509_EXTENSION_new_null())) - return -1; - if (!sk_X509_EXTENSION_push(*x, ext)) - return -1; + if ((ret = *x) == NULL + && (ret = sk_X509_EXTENSION_new_null()) == NULL) + goto m_fail; + if (!sk_X509_EXTENSION_push(ret, ext)) + goto m_fail; + *x = ret; return 1; + + m_fail: + if (ret != *x) + sk_X509_EXTENSION_free(ret); + X509_EXTENSION_free(ext); + return -1; err: if (!(flags & X509V3_ADD_SILENT)) Modified: head/crypto/openssl/crypto/x509v3/v3_scts.c ============================================================================== --- head/crypto/openssl/crypto/x509v3/v3_scts.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/crypto/x509v3/v3_scts.c Thu Dec 7 18:02:57 2017 (r326662) @@ -156,7 +156,7 @@ static void timestamp_print(BIO *out, SCT_TIMESTAMP ti gen = ASN1_GENERALIZEDTIME_new(); ASN1_GENERALIZEDTIME_adj(gen, (time_t)0, (int)(timestamp / 86400000), - (timestamp % 86400000) / 1000); + (int)(timestamp % 86400000) / 1000); /* * Note GeneralizedTime from ASN1_GENERALIZETIME_adj is always 15 * characters long with a final Z. Update it with fractional seconds. Modified: head/crypto/openssl/doc/crypto/EVP_EncryptInit.pod ============================================================================== --- head/crypto/openssl/doc/crypto/EVP_EncryptInit.pod Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/doc/crypto/EVP_EncryptInit.pod Thu Dec 7 18:02:57 2017 (r326662) @@ -40,14 +40,14 @@ EVP_aes_128_cbc_hmac_sha256, EVP_aes_256_cbc_hmac_sha2 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, ENGINE *impl, unsigned char *key, unsigned char *iv); int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, - int *outl, unsigned char *in, int inl); + int *outl, const unsigned char *in, int inl); int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, ENGINE *impl, unsigned char *key, unsigned char *iv); int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, - int *outl, unsigned char *in, int inl); + int *outl, const unsigned char *in, int inl); int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); Modified: head/crypto/openssl/ssl/Makefile ============================================================================== --- head/crypto/openssl/ssl/Makefile Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/ssl/Makefile Thu Dec 7 18:02:57 2017 (r326662) @@ -15,7 +15,8 @@ KRB5_INCLUDES= CFLAGS= $(INCLUDES) $(CFLAG) GENERAL=Makefile README ssl-lib.com install.com -TEST=ssltest.c heartbeat_test.c clienthellotest.c sslv2conftest.c dtlstest.c bad_dtls_test.c +TEST=ssltest.c heartbeat_test.c clienthellotest.c sslv2conftest.c dtlstest.c \ + bad_dtls_test.c fatalerrtest.c APPS= LIB=$(TOP)/libssl.a Modified: head/crypto/openssl/ssl/bad_dtls_test.c ============================================================================== --- head/crypto/openssl/ssl/bad_dtls_test.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/ssl/bad_dtls_test.c Thu Dec 7 18:02:57 2017 (r326662) @@ -590,13 +590,13 @@ static int send_record(BIO *rbio, unsigned char type, unsigned char *enc; #ifdef SIXTY_FOUR_BIT_LONG - seq[0] = (seqnr >> 40) & 0xff; - seq[1] = (seqnr >> 32) & 0xff; + seq[0] = (unsigned char)(seqnr >> 40); + seq[1] = (unsigned char)(seqnr >> 32); #endif - seq[2] = (seqnr >> 24) & 0xff; - seq[3] = (seqnr >> 16) & 0xff; - seq[4] = (seqnr >> 8) & 0xff; - seq[5] = seqnr & 0xff; + seq[2] = (unsigned char)(seqnr >> 24); + seq[3] = (unsigned char)(seqnr >> 16); + seq[4] = (unsigned char)(seqnr >> 8); + seq[5] = (unsigned char)(seqnr); pad = 15 - ((len + SHA_DIGEST_LENGTH) % 16); enc = OPENSSL_malloc(len + SHA_DIGEST_LENGTH + 1 + pad); @@ -612,8 +612,8 @@ static int send_record(BIO *rbio, unsigned char type, HMAC_Update(&ctx, seq, 6); HMAC_Update(&ctx, &type, 1); HMAC_Update(&ctx, ver, 2); /* Version */ - lenbytes[0] = len >> 8; - lenbytes[1] = len & 0xff; + lenbytes[0] = (unsigned char)(len >> 8); + lenbytes[1] = (unsigned char)(len); HMAC_Update(&ctx, lenbytes, 2); /* Length */ HMAC_Update(&ctx, enc, len); /* Finally the data itself */ HMAC_Final(&ctx, enc + len, NULL); @@ -637,8 +637,8 @@ static int send_record(BIO *rbio, unsigned char type, BIO_write(rbio, ver, 2); BIO_write(rbio, epoch, 2); BIO_write(rbio, seq, 6); - lenbytes[0] = (len + sizeof(iv)) >> 8; - lenbytes[1] = (len + sizeof(iv)) & 0xff; + lenbytes[0] = (unsigned char)((len + sizeof(iv)) >> 8); + lenbytes[1] = (unsigned char)(len + sizeof(iv)); BIO_write(rbio, lenbytes, 2); BIO_write(rbio, iv, sizeof(iv)); Copied: head/crypto/openssl/ssl/fatalerrtest.c (from r326660, vendor-crypto/openssl/dist/ssl/fatalerrtest.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/crypto/openssl/ssl/fatalerrtest.c Thu Dec 7 18:02:57 2017 (r326662, copy of r326660, vendor-crypto/openssl/dist/ssl/fatalerrtest.c) @@ -0,0 +1,109 @@ +/* + * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include +#include +#include "ssltestlib.h" + +int main(int argc, char *argv[]) +{ + SSL_CTX *sctx, *cctx; + SSL *sssl, *cssl; + const char *msg = "Dummy"; + BIO *err = NULL, *wbio = NULL; + int ret = 1, len; + char buf[80]; + unsigned char dummyrec[] = { + 0x17, 0x03, 0x03, 0x00, 0x05, 'D', 'u', 'm', 'm', 'y' + }; + + if (argc != 3) { + printf("Incorrect number of parameters\n"); + return 1; + } + + SSL_library_init(); + SSL_load_error_strings(); + err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT); + CRYPTO_malloc_debug_init(); + CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); + CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); + + if (!create_ssl_ctx_pair(SSLv23_method(), SSLv23_method(), &sctx, &cctx, + argv[1], argv[2])) { + printf("Failed to create SSL_CTX pair\n"); + goto err; + } + + /* + * Deliberately set the cipher lists for client and server to be different + * to force a handshake failure. + */ + if (!SSL_CTX_set_cipher_list(sctx, "AES128-SHA") + || !SSL_CTX_set_cipher_list(cctx, "AES256-SHA")) { + printf("Failed to set cipher lists\n"); + goto err; + } + + if (!create_ssl_objects(sctx, cctx, &sssl, &cssl, NULL, NULL)) { + printf("Failed to create SSL objectx\n"); + goto err; + } + + wbio = SSL_get_wbio(cssl); + if (wbio == NULL) { + printf("Unexpected NULL bio received\n"); + goto err; + } + + if (create_ssl_connection(sssl, cssl)) { + printf("Unexpected success creating a connection\n"); + goto err; + } + + ERR_clear_error(); + + /* Inject a plaintext record from client to server */ + if (BIO_write(wbio, dummyrec, sizeof(dummyrec)) <= 0) { + printf("Unexpected failure injecting dummy record\n"); + goto err; + } + + /* SSL_read()/SSL_write should fail because of a previous fatal error */ + if ((len = SSL_read(sssl, buf, sizeof(buf - 1))) > 0) { + buf[len] = '\0'; + printf("Unexpected success reading data: %s\n", buf); + goto err; + } + if (SSL_write(sssl, msg, strlen(msg)) > 0) { + printf("Unexpected success writing data\n"); + goto err; + } + + ret = 0; + err: + SSL_free(sssl); + SSL_free(cssl); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); + ERR_print_errors_fp(stderr); + + if (ret) { + printf("Fatal err test: FAILED\n"); + } + + ERR_free_strings(); + ERR_remove_thread_state(NULL); + EVP_cleanup(); + CRYPTO_cleanup_all_ex_data(); + CRYPTO_mem_leaks(err); + BIO_free(err); + + return ret; +} Modified: head/crypto/openssl/ssl/s23_clnt.c ============================================================================== --- head/crypto/openssl/ssl/s23_clnt.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/ssl/s23_clnt.c Thu Dec 7 18:02:57 2017 (r326662) @@ -757,10 +757,12 @@ static int ssl23_get_server_hello(SSL *s) s->version = TLS1_VERSION; s->method = TLSv1_client_method(); break; +#ifndef OPENSSL_NO_SSL3 case SSL3_VERSION: s->version = SSL3_VERSION; s->method = SSLv3_client_method(); break; +#endif } SSLerr(SSL_F_SSL23_GET_SERVER_HELLO, SSL_R_UNSUPPORTED_PROTOCOL); ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_PROTOCOL_VERSION); Modified: head/crypto/openssl/ssl/s3_pkt.c ============================================================================== --- head/crypto/openssl/ssl/s3_pkt.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/ssl/s3_pkt.c Thu Dec 7 18:02:57 2017 (r326662) @@ -1324,10 +1324,16 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *b } #ifndef OPENSSL_NO_HEARTBEATS else if (rr->type == TLS1_RT_HEARTBEAT) { - tls1_process_heartbeat(s); + i = tls1_process_heartbeat(s); - /* Exit and notify application to read again */ + if (i < 0) + return i; + rr->length = 0; + if (s->mode & SSL_MODE_AUTO_RETRY) + goto start; + + /* Exit and notify application to read again */ s->rwstate = SSL_READING; BIO_clear_retry_flags(SSL_get_rbio(s)); BIO_set_retry_read(SSL_get_rbio(s)); Modified: head/crypto/openssl/ssl/ssl.h ============================================================================== --- head/crypto/openssl/ssl/ssl.h Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/ssl/ssl.h Thu Dec 7 18:02:57 2017 (r326662) @@ -1727,7 +1727,7 @@ extern "C" { # define SSL_ST_BEFORE 0x4000 # define SSL_ST_OK 0x03 # define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT) -# define SSL_ST_ERR 0x05 +# define SSL_ST_ERR (0x05|SSL_ST_INIT) # define SSL_CB_LOOP 0x01 # define SSL_CB_EXIT 0x02 Modified: head/crypto/openssl/ssl/ssltest.c ============================================================================== --- head/crypto/openssl/ssl/ssltest.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/ssl/ssltest.c Thu Dec 7 18:02:57 2017 (r326662) @@ -423,13 +423,13 @@ static unsigned char *next_protos_parse(unsigned short OPENSSL_free(out); return NULL; } - out[start] = i - start; + out[start] = (unsigned char)(i - start); start = i + 1; } else out[i + 1] = in[i]; } - *outlen = len + 1; + *outlen = (unsigned char)(len + 1); return out; } @@ -554,6 +554,7 @@ static int cb_ticket2(SSL* s, unsigned char* key_name, { fprintf(stderr, "ticket callback for SNI context should never be called\n"); EXIT(1); + return 0; } #endif Modified: head/crypto/openssl/ssl/t1_lib.c ============================================================================== --- head/crypto/openssl/ssl/t1_lib.c Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/ssl/t1_lib.c Thu Dec 7 18:02:57 2017 (r326662) @@ -1916,7 +1916,7 @@ unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsi s2n(TLSEXT_TYPE_application_layer_protocol_negotiation, ret); s2n(3 + len, ret); s2n(1 + len, ret); - *ret++ = len; + *ret++ = (unsigned char)len; memcpy(ret, selected, len); ret += len; } Modified: head/crypto/openssl/util/copy-if-different.pl ============================================================================== --- head/crypto/openssl/util/copy-if-different.pl Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/util/copy-if-different.pl Thu Dec 7 18:02:57 2017 (r326662) @@ -12,7 +12,8 @@ my @filelist; foreach my $arg (@ARGV) { $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... - foreach (glob qq("$arg")) + $arg = qq("$arg") if ($arg =~ /\s/); # compensate for bug in 5.10... + foreach (glob $arg) { push @filelist, $_; } Modified: head/crypto/openssl/util/copy.pl ============================================================================== --- head/crypto/openssl/util/copy.pl Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/util/copy.pl Thu Dec 7 18:02:57 2017 (r326662) @@ -19,7 +19,8 @@ foreach $arg (@ARGV) { next; } $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... - foreach (glob qq("$arg")) + $arg = qq("$arg") if ($arg =~ /\s/); # compensate for bug in 5.10... + foreach (glob $arg) { push @filelist, $_; } Modified: head/crypto/openssl/util/libeay.num ============================================================================== --- head/crypto/openssl/util/libeay.num Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/util/libeay.num Thu Dec 7 18:02:57 2017 (r326662) @@ -4417,7 +4417,8 @@ EC_GROUP_get_mont_data 4772 EXIST::FU i2d_re_X509_tbs 4773 EXIST::FUNCTION: EVP_PKEY_asn1_set_item 4774 EXIST::FUNCTION: EVP_PKEY_meth_get_init 4775 EXIST::FUNCTION: -EVP_PKEY_meth_get_verify_recover 4776 EXIST::FUNCTION: +EVP_PKEY_meth_get_verify_recover 4776 EXIST:!VMS:FUNCTION: +EVP_PKEY_meth_get_vrfy_recover 4776 EXIST:VMS:FUNCTION: EVP_PKEY_meth_get_keygen 4777 EXIST::FUNCTION: EVP_PKEY_meth_get_derive 4778 EXIST::FUNCTION: EVP_PKEY_meth_get_verifyctx 4779 EXIST::FUNCTION: Modified: head/crypto/openssl/util/mk1mf.pl ============================================================================== --- head/crypto/openssl/util/mk1mf.pl Thu Dec 7 17:37:58 2017 (r326661) +++ head/crypto/openssl/util/mk1mf.pl Thu Dec 7 18:02:57 2017 (r326662) @@ -765,7 +765,7 @@ foreach (split(/\s+/,$test)) { $t=&bname($_); $tt="\$(OBJ_D)${o}$t${obj}"; - $tt.=" \$(OBJ_D)${o}ssltestlib${obj}" if $t eq "dtlstest"; + $tt.=" \$(OBJ_D)${o}ssltestlib${obj}" if $t eq "dtlstest" or $t eq "fatalerrtest"; $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); } Modified: head/secure/lib/libcrypto/Makefile.inc ============================================================================== --- head/secure/lib/libcrypto/Makefile.inc Thu Dec 7 17:37:58 2017 (r326661) +++ head/secure/lib/libcrypto/Makefile.inc Thu Dec 7 18:02:57 2017 (r326662) @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.2m -OPENSSL_DATE= 2017-11-02 +OPENSSL_VER= 1.0.2n +OPENSSL_DATE= 2017-12-07 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc Modified: head/secure/lib/libcrypto/amd64/rsaz-avx2.S ============================================================================== --- head/secure/lib/libcrypto/amd64/rsaz-avx2.S Thu Dec 7 17:37:58 2017 (r326661) +++ head/secure/lib/libcrypto/amd64/rsaz-avx2.S Thu Dec 7 18:02:57 2017 (r326662) @@ -68,7 +68,7 @@ rsaz_1024_sqr_avx2: vmovdqu 256-128(%rsi),%ymm8 leaq 192(%rsp),%rbx - vpbroadcastq .Land_mask(%rip),%ymm15 + vmovdqu .Land_mask(%rip),%ymm15 jmp .LOOP_GRANDE_SQR_1024 .align 32 @@ -801,10 +801,10 @@ rsaz_1024_mul_avx2: vpmuludq 192-128(%rcx),%ymm11,%ymm12 vpaddq %ymm12,%ymm6,%ymm6 vpmuludq 224-128(%rcx),%ymm11,%ymm13 - vpblendd $3,%ymm14,%ymm9,%ymm9 + vpblendd $3,%ymm14,%ymm9,%ymm12 vpaddq %ymm13,%ymm7,%ymm7 vpmuludq 256-128(%rcx),%ymm11,%ymm0 - vpaddq %ymm9,%ymm3,%ymm3 + vpaddq %ymm12,%ymm3,%ymm3 vpaddq %ymm0,%ymm8,%ymm8 movq %rbx,%rax @@ -817,7 +817,9 @@ rsaz_1024_mul_avx2: vmovdqu -8+64-128(%rsi),%ymm13 movq %r10,%rax + vpblendd $0xfc,%ymm14,%ymm9,%ymm9 imull %r8d,%eax + vpaddq %ymm9,%ymm4,%ymm4 andl $0x1fffffff,%eax imulq 16-128(%rsi),%rbx @@ -1046,7 +1048,6 @@ rsaz_1024_mul_avx2: decl %r14d jnz .Loop_mul_1024 - vpermq $0,%ymm15,%ymm15 vpaddq (%rsp),%ymm12,%ymm0 vpsrlq $29,%ymm0,%ymm12 @@ -1686,7 +1687,7 @@ rsaz_avx2_eligible: .align 64 .Land_mask: -.quad 0x1fffffff,0x1fffffff,0x1fffffff,-1 +.quad 0x1fffffff,0x1fffffff,0x1fffffff,0x1fffffff .Lscatter_permd: .long 0,2,4,6,7,7,7,7 .Lgather_permd: Modified: head/secure/lib/libcrypto/arm/aes-armv4.S ============================================================================== --- head/secure/lib/libcrypto/arm/aes-armv4.S Thu Dec 7 17:37:58 2017 (r326661) +++ head/secure/lib/libcrypto/arm/aes-armv4.S Thu Dec 7 18:02:57 2017 (r326662) @@ -166,7 +166,7 @@ AES_encrypt: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_encrypt #else - adr r3,AES_encrypt + adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} mov r12,r0 @ inp @@ -412,7 +412,7 @@ _armv4_AES_set_encrypt_key: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_set_encrypt_key #else - adr r3,private_AES_set_encrypt_key + adr r3,. #endif teq r0,#0 #if __ARM_ARCH__>=7 @@ -929,7 +929,7 @@ AES_decrypt: #if __ARM_ARCH__<7 sub r3,pc,#8 @ AES_decrypt #else - adr r3,AES_decrypt + adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} mov r12,r0 @ inp Modified: head/secure/lib/libcrypto/arm/bsaes-armv7.S ============================================================================== --- head/secure/lib/libcrypto/arm/bsaes-armv7.S Thu Dec 7 17:37:58 2017 (r326661) +++ head/secure/lib/libcrypto/arm/bsaes-armv7.S Thu Dec 7 18:02:57 2017 (r326662) @@ -83,7 +83,7 @@ .type _bsaes_decrypt8,%function .align 4 _bsaes_decrypt8: - adr r6,_bsaes_decrypt8 + adr r6,. vldmia r4!, {q9} @ round 0 key add r6,r6,#.LM0ISR-_bsaes_decrypt8 @@ -569,7 +569,7 @@ _bsaes_const: .type _bsaes_encrypt8,%function .align 4 _bsaes_encrypt8: - adr r6,_bsaes_encrypt8 + adr r6,. vldmia r4!, {q9} @ round 0 key sub r6,r6,#_bsaes_encrypt8-.LM0SR @@ -1000,7 +1000,7 @@ _bsaes_encrypt8_bitslice: .type _bsaes_key_convert,%function .align 4 _bsaes_key_convert: - adr r6,_bsaes_key_convert + adr r6,. vld1.8 {q7}, [r4]! @ load round 0 key sub r6,r6,#_bsaes_key_convert-.LM0 vld1.8 {q15}, [r4]! @ load round 1 key Modified: head/secure/lib/libcrypto/arm/sha256-armv4.S ============================================================================== --- head/secure/lib/libcrypto/arm/sha256-armv4.S Thu Dec 7 17:37:58 2017 (r326661) +++ head/secure/lib/libcrypto/arm/sha256-armv4.S Thu Dec 7 18:02:57 2017 (r326662) @@ -90,7 +90,7 @@ sha256_block_data_order: #if __ARM_ARCH__<7 sub r3,pc,#8 @ sha256_block_data_order #else - adr r3,sha256_block_data_order + adr r3,. #endif #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) ldr r12,.LOPENSSL_armcap Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Thu Dec 7 17:37:58 2017 (r326661) +++ head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Thu Dec 7 18:02:57 2017 (r326662) @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2017-11-02" "1.0.2m" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2017-12-07" "1.0.2n" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Dec 7 18:26:53 2017 Return-Path: Delivered-To: svn-src-head@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 E43E6E8E195; Thu, 7 Dec 2017 18:26:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id 478FE70999; Thu, 7 Dec 2017 18:26:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r326383 - head/sys/x86/cpufreq To: Alexey Dokuchaev Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201711300140.vAU1e7dC001292@repo.freebsd.org> <20171207100345.GA59559@FreeBSD.org> From: Jung-uk Kim Message-ID: Date: Thu, 7 Dec 2017 13:26:48 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171207100345.GA59559@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="J1vSBdmXOAJfhDPJoxAKrFf9RHOjFRlCU" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 18:26:54 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --J1vSBdmXOAJfhDPJoxAKrFf9RHOjFRlCU Content-Type: multipart/mixed; boundary="1ing45LaWKkIBGBa7feOFid3N0VDeELK9"; protected-headers="v1" From: Jung-uk Kim To: Alexey Dokuchaev Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Message-ID: Subject: Re: svn commit: r326383 - head/sys/x86/cpufreq References: <201711300140.vAU1e7dC001292@repo.freebsd.org> <20171207100345.GA59559@FreeBSD.org> In-Reply-To: <20171207100345.GA59559@FreeBSD.org> --1ing45LaWKkIBGBa7feOFid3N0VDeELK9 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/07/2017 05:03, Alexey Dokuchaev wrote: > On Thu, Nov 30, 2017 at 03:08:49PM -0500, Jung-uk Kim wrote: >> ... >> Probably. However, I am just trying to fix my FX-8350 and A10-6800 an= d >> I don't have Zen processors to verify the MSRs are actually working on= >> those CPUs. >=20 > Ah, that's so lovely, thanks Jung-uk; I feel that our support for AMD > fam. 15h CPUs is lacking. E.g. only four P-states are reported for my > A8-5550M, while it supports boosted P-states per BKDG, and reading MSRs= > directly via `sysutils/amdmsrtweaker' reports eight of them (P0 .. P7),= > with three turbo P-states P0 P1 P2. You don't trust your BIOS? ;-) Unless SSDT is unavailable or broken, we should use ACPI tables first. > Since you have A10-6800 you might try to reproduce what I see here with= > A8-5550M. I'll take a look when I find some free time. Jung-uk Kim --1ing45LaWKkIBGBa7feOFid3N0VDeELK9-- --J1vSBdmXOAJfhDPJoxAKrFf9RHOjFRlCU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAloph+wACgkQfJ+WJvzb 8UaxNwf/UxJL3JzTB4YJ9vyapsFECsBzAkrBkWsehQkFqfJTrMxiLMgU3+SPhPxF 1TrHML9OgCunsvCXw5PvsHsvvxxWx/48YEWaq5md0/VH8bHxXUzTuv8mImEbLc/X A3Dt4Epzb4ZsyjKI8Vi/WbqecCfXgHYN9Gl2uOKVnbujUKAMI6W5YHBewT/VGFmK NVtJpJm4hGVL29G37ats4ArZhyEy2qq/cuIVvJpnnM8IVBpiKAP6UqCPmcGV9BaQ 9O/9wuMF43RXZBlrs8j538cJIlbhFggy/wEVtaa3wpGW19Nm8WfNlPsjlyyHTBDa lF7LD6tEWvGYM3ESCDxf099um4Z5GA== =aq3m -----END PGP SIGNATURE----- --J1vSBdmXOAJfhDPJoxAKrFf9RHOjFRlCU-- From owner-svn-src-head@freebsd.org Thu Dec 7 19:38:10 2017 Return-Path: Delivered-To: svn-src-head@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 EDA8FE8F2F8; Thu, 7 Dec 2017 19:38:10 +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 BA985726E2; Thu, 7 Dec 2017 19:38:10 +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 vB7Jc93G083316; Thu, 7 Dec 2017 19:38:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7Jc9Ck083315; Thu, 7 Dec 2017 19:38:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712071938.vB7Jc9Ck083315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 7 Dec 2017 19:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326664 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 326664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 19:38:11 -0000 Author: markj Date: Thu Dec 7 19:38:09 2017 New Revision: 326664 URL: https://svnweb.freebsd.org/changeset/base/326664 Log: Fix the UMA reclaim worker after r326347. atomic_set_*() sets a bit in the target memory location, so atomic_set_int(&uma_reclaim_needed, 0) does not do what it looks like it does. PR: 224080 Reviewed by: jeff, kib Differential Revision: https://reviews.freebsd.org/D13412 Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Dec 7 18:04:48 2017 (r326663) +++ head/sys/vm/uma_core.c Thu Dec 7 19:38:09 2017 (r326664) @@ -3177,7 +3177,7 @@ uma_reclaim_worker(void *arg __unused) EVENTHANDLER_INVOKE(vm_lowmem, VM_LOW_KMEM); sx_xlock(&uma_drain_lock); uma_reclaim_locked(true); - atomic_set_int(&uma_reclaim_needed, 0); + uma_reclaim_needed = 0; sx_xunlock(&uma_drain_lock); /* Don't fire more than once per-second. */ pause("umarclslp", hz); From owner-svn-src-head@freebsd.org Thu Dec 7 19:40:47 2017 Return-Path: Delivered-To: svn-src-head@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 EC35FE8F48E; Thu, 7 Dec 2017 19:40:47 +0000 (UTC) (envelope-from bz@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 B8C53729E2; Thu, 7 Dec 2017 19:40:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB7JekHK085639; Thu, 7 Dec 2017 19:40:46 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7JekFC085638; Thu, 7 Dec 2017 19:40:46 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201712071940.vB7JekFC085638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 7 Dec 2017 19:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326665 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 326665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 19:40:48 -0000 Author: bz Date: Thu Dec 7 19:40:46 2017 New Revision: 326665 URL: https://svnweb.freebsd.org/changeset/base/326665 Log: Use correct field in the description for the lock after r319722. Reviewed by: glebius Sponsored by: iXsystems, Inc. Modified: head/sys/sys/socketvar.h Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Thu Dec 7 19:38:09 2017 (r326664) +++ head/sys/sys/socketvar.h Thu Dec 7 19:40:46 2017 (r326665) @@ -71,7 +71,7 @@ struct socket; * (a) constant after allocation, no locking required. * (b) locked by SOCK_LOCK(so). * (cr) locked by SOCKBUF_LOCK(&so->so_rcv). - * (cs) locked by SOCKBUF_LOCK(&so->so_rcv). + * (cs) locked by SOCKBUF_LOCK(&so->so_snd). * (e) locked by SOLISTEN_LOCK() of corresponding listening socket. * (f) not locked since integer reads/writes are atomic. * (g) used only as a sleep/wakeup address, no value. From owner-svn-src-head@freebsd.org Thu Dec 7 19:57:53 2017 Return-Path: Delivered-To: svn-src-head@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 535D8E8F930; Thu, 7 Dec 2017 19:57:53 +0000 (UTC) (envelope-from cem@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 205BB7345F; Thu, 7 Dec 2017 19:57:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB7Jvqf8092203; Thu, 7 Dec 2017 19:57:52 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7JvqJX092201; Thu, 7 Dec 2017 19:57:52 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201712071957.vB7JvqJX092201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 7 Dec 2017 19:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326666 - in head/sys/dev/mlx4: mlx4_core mlx4_en X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/dev/mlx4: mlx4_core mlx4_en X-SVN-Commit-Revision: 326666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 19:57:53 -0000 Author: cem Date: Thu Dec 7 19:57:51 2017 New Revision: 326666 URL: https://svnweb.freebsd.org/changeset/base/326666 Log: mlx4: Remove redundant declarations to fix GCC build These were made redundant in r325841. Reviewed by: hselasky MFC after: 1 week (hselasky will MFC) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D13401 Modified: head/sys/dev/mlx4/mlx4_core/icm.h head/sys/dev/mlx4/mlx4_en/en.h Modified: head/sys/dev/mlx4/mlx4_core/icm.h ============================================================================== --- head/sys/dev/mlx4/mlx4_core/icm.h Thu Dec 7 19:40:46 2017 (r326665) +++ head/sys/dev/mlx4/mlx4_core/icm.h Thu Dec 7 19:57:51 2017 (r326666) @@ -124,7 +124,4 @@ static inline unsigned long mlx4_icm_size(struct mlx4_ return sg_dma_len(&iter->chunk->mem[iter->page_idx]); } -int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm); -int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev); - #endif /* MLX4_ICM_H */ Modified: head/sys/dev/mlx4/mlx4_en/en.h ============================================================================== --- head/sys/dev/mlx4/mlx4_en/en.h Thu Dec 7 19:40:46 2017 (r326665) +++ head/sys/dev/mlx4/mlx4_en/en.h Thu Dec 7 19:57:51 2017 (r326666) @@ -832,7 +832,6 @@ void mlx4_en_destroy_drop_qp(struct mlx4_en_priv *priv int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring); void mlx4_en_rx_irq(struct mlx4_cq *mcq); -int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode); int mlx4_SET_VLAN_FLTR(struct mlx4_dev *dev, struct mlx4_en_priv *priv); int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset); From owner-svn-src-head@freebsd.org Thu Dec 7 20:00:20 2017 Return-Path: Delivered-To: svn-src-head@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 CFD42E8FC0E; Thu, 7 Dec 2017 20:00:20 +0000 (UTC) (envelope-from gjb@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 9C99E739DB; Thu, 7 Dec 2017 20:00:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB7K0JCD092579; Thu, 7 Dec 2017 20:00:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7K0JPG092578; Thu, 7 Dec 2017 20:00:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201712072000.vB7K0JPG092578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 7 Dec 2017 20:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326667 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 326667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 20:00:20 -0000 Author: gjb Date: Thu Dec 7 20:00:19 2017 New Revision: 326667 URL: https://svnweb.freebsd.org/changeset/base/326667 Log: Fix the reldoc target in release/Makefile following doc commit r51264. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Dec 7 19:57:51 2017 (r326666) +++ head/release/Makefile Thu Dec 7 20:00:19 2017 (r326667) @@ -163,17 +163,19 @@ ports.txz: reldoc: cd ${DOCDIR}/en_US.ISO8859-1/htdocs/releases/${REVISION}R && \ - ${MAKE} all install clean 'FORMATS=html txt' \ - INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc + env MAN4DIR=${WORLDDIR}/share/man/man4 \ + ${MAKE} all install clean "FORMATS=html txt" \ + INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc \ + WEBDIR=${DOCDIR} DESTDIR=${.OBJDIR}/rdoc mkdir -p reldoc .for i in hardware readme relnotes errata - ln -f ${DOCDIR}/${RELNOTES_LANG}/htdocs/releases/${REVISION}R/${i}/${i:tl}.txt \ - reldoc/${i:tu}.TXT - ln -f ${DOCDIR}/${RELNOTES_LANG}/htdocs/releases/${REVISION}R/${i}/${i:tl}.html \ - reldoc/${i:tu}.HTM + ln -f ${.OBJDIR}/rdoc/${i:tl}.txt \ + reldoc/${i:tu}.TXT + ln -f ${.OBJDIR}/rdoc/${i:tl}.html \ + reldoc/${i:tu}.HTML .endfor - cp ${DOCDIR}/${RELNOTES_LANG}/htdocs/releases/${REVISION}R/readme/docbook.css \ - reldoc + cp ${.OBJDIR}/rdoc/docbook.css \ + reldoc/ disc1: packagesystem # Install system From owner-svn-src-head@freebsd.org Thu Dec 7 20:09:18 2017 Return-Path: Delivered-To: svn-src-head@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 7FB35E90152; Thu, 7 Dec 2017 20:09:18 +0000 (UTC) (envelope-from eugen@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 4CE387430C; Thu, 7 Dec 2017 20:09:18 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB7K9Hec096671; Thu, 7 Dec 2017 20:09:17 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7K9H3N096670; Thu, 7 Dec 2017 20:09:17 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712072009.vB7K9H3N096670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 7 Dec 2017 20:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326668 - head/sys/geom/raid X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sys/geom/raid X-SVN-Commit-Revision: 326668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 20:09:18 -0000 Author: eugen Date: Thu Dec 7 20:09:17 2017 New Revision: 326668 URL: https://svnweb.freebsd.org/changeset/base/326668 Log: geom_raid (RAID5): do not lose bp->bio_error, keep it in pbp->bio_error and return it by passing to g_raid_iodone() Approved by: mav (mentor) MFC after: 3 days Modified: head/sys/geom/raid/tr_raid5.c Modified: head/sys/geom/raid/tr_raid5.c ============================================================================== --- head/sys/geom/raid/tr_raid5.c Thu Dec 7 20:00:19 2017 (r326667) +++ head/sys/geom/raid/tr_raid5.c Thu Dec 7 20:09:17 2017 (r326668) @@ -373,15 +373,15 @@ g_raid_tr_iodone_raid5(struct g_raid_tr_object *tr, struct g_raid_subdisk *sd, struct bio *bp) { struct bio *pbp; - int error; pbp = bp->bio_parent; + if (pbp->bio_error == 0) + pbp->bio_error = bp->bio_error; pbp->bio_inbed++; - error = bp->bio_error; g_destroy_bio(bp); if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; - g_raid_iodone(pbp, error); + g_raid_iodone(pbp, pbp->bio_error); } } From owner-svn-src-head@freebsd.org Thu Dec 7 20:38:39 2017 Return-Path: Delivered-To: svn-src-head@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 416FBE90BA6; Thu, 7 Dec 2017 20:38:39 +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 0DE2075203; Thu, 7 Dec 2017 20:38:38 +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 vB7Kccvf009227; Thu, 7 Dec 2017 20:38:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7KccuT009226; Thu, 7 Dec 2017 20:38:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712072038.vB7KccuT009226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 7 Dec 2017 20:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326669 - head/lib/msun/man X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/lib/msun/man X-SVN-Commit-Revision: 326669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 20:38:39 -0000 Author: dim Date: Thu Dec 7 20:38:37 2017 New Revision: 326669 URL: https://svnweb.freebsd.org/changeset/base/326669 Log: Remove the sentence in math(3) about some long double math functions not being available. Submitted by: Steve Kargl MFC after: 3 days Modified: head/lib/msun/man/math.3 Modified: head/lib/msun/man/math.3 ============================================================================== --- head/lib/msun/man/math.3 Thu Dec 7 20:09:17 2017 (r326668) +++ head/lib/msun/man/math.3 Thu Dec 7 20:38:37 2017 (r326669) @@ -28,7 +28,7 @@ .\" from: @(#)math.3 6.10 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" -.Dd December 5, 2010 +.Dd December 7, 2017 .Dt MATH 3 .Os .Sh NAME @@ -235,12 +235,6 @@ and .Vt long double values, were written for or imported into subsequent versions of FreeBSD. .Sh BUGS -Some of the -.Vt "long double" -math functions in -.St -isoC-99 -are not available. -.Pp Many of the routines to compute transcendental functions produce inaccurate results in other than the default rounding mode. .Pp From owner-svn-src-head@freebsd.org Thu Dec 7 20:41:24 2017 Return-Path: Delivered-To: svn-src-head@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 9CDE0E90D69; Thu, 7 Dec 2017 20:41:24 +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 69DAA75454; Thu, 7 Dec 2017 20:41:24 +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 vB7KfNYX010064; Thu, 7 Dec 2017 20:41:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7KfNcl010063; Thu, 7 Dec 2017 20:41:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712072041.vB7KfNcl010063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 7 Dec 2017 20:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326670 - head/lib/msun/bsdsrc X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/lib/msun/bsdsrc X-SVN-Commit-Revision: 326670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 20:41:24 -0000 Author: dim Date: Thu Dec 7 20:41:23 2017 New Revision: 326670 URL: https://svnweb.freebsd.org/changeset/base/326670 Log: Remove an unused incude from lib/msun/bsdsrc/b_log.c. Submitted by: Steve Kargl MFC after: 3 days Modified: head/lib/msun/bsdsrc/b_log.c Modified: head/lib/msun/bsdsrc/b_log.c ============================================================================== --- head/lib/msun/bsdsrc/b_log.c Thu Dec 7 20:38:37 2017 (r326669) +++ head/lib/msun/bsdsrc/b_log.c Thu Dec 7 20:41:23 2017 (r326670) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include "mathimpl.h" From owner-svn-src-head@freebsd.org Thu Dec 7 21:24:01 2017 Return-Path: Delivered-To: svn-src-head@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 1D61CE91B34 for ; Thu, 7 Dec 2017 21:24:01 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 A5E9C770E5 for ; Thu, 7 Dec 2017 21:24:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x22d.google.com with SMTP id g130so2242248wme.0 for ; Thu, 07 Dec 2017 13:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UVUR3Rj7ohP0vzUjUnFcLTv4wAjt+3B1QEGmIX/ZYR8=; b=B4lN1bNuty+BQ99AHlfLiPIE03ObLvYWUblK8s09i4RbgwtcSUgKJl0/G2NyEu0FrY GX8TKXRHeND6MQ6vaAql5cfi0+5jUu45k/8olqrSlOvi91JBFKK48zZo1I3I8FIE+Oji TNsNAzKq48KyQbMMChMS4lZUy6Gqn9ftDJzJwV9GuiG0mBIgJb2uMKIjMap+5vZarpcW eZNkDzM1uMEa0kQbdboCc2cir3UgWYL1RHUgEH3OH5l3K+dAQoUX7nkuiimKrnzlrLU5 Xa0Ha0m+ZhllIPNjzQSYdWyAj4kWXVYQF0YNFl/E61jAuXdQDBQpmRuXNl8v3LYXWn3Y JDrg== 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:cc; bh=UVUR3Rj7ohP0vzUjUnFcLTv4wAjt+3B1QEGmIX/ZYR8=; b=QQX5Q9FbYJjlWtDq/ju98eEWpp97xlwoV6KrjpKApBBrH9Tb9iYui8uWXHqFVDvtib xexrWQbHH+vXrq9Xgjn7gPo0n/UHZtuj/hUE5useT9QeQCm1laUyosLUOH6OZwHFVa5i VxOe7L5RF/VL4nujAK3PTpn7tNNCLXKEargMsvUpgOd9eo29rRgcrxIp9OlFRMfAwXV3 LdX/4QJ9U58xS6z6fr/ktmpTRV0OqOdIX5plnAoekU2FycnnCTuPHNmdzOsR4oACg0Lq bTc1lAmHoN/AV00IjE9/DB26gV/sw2MG6x5Ozu68B7D7Cjfw6/8rya81jNhiCrd36ubl cOlA== X-Gm-Message-State: AJaThX44j/MsW+ampnFVMHQy/A059gDMt8+y5ZrLmokEHWZ0Vwspv6gM U8lW/ikU8oRMPZ3qa0cRpDWOVouEvjfWOwI8HpZZSg== X-Google-Smtp-Source: AGs4zMbsKdWckZCSCLCcPFrpojfV+gP285eBtFQFojAdosUQepT9BzL6JGHXxjxQw1993Z7bI/smcCnxO+lYprImomg= X-Received: by 10.80.140.176 with SMTP id q45mr49376574edq.186.1512681839025; Thu, 07 Dec 2017 13:23:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.149.174 with HTTP; Thu, 7 Dec 2017 13:23:58 -0800 (PST) In-Reply-To: <201712071938.vB7Jc9Ck083315@repo.freebsd.org> References: <201712071938.vB7Jc9Ck083315@repo.freebsd.org> From: Oliver Pinter Date: Thu, 7 Dec 2017 22:23:58 +0100 Message-ID: Subject: Re: svn commit: r326664 - head/sys/vm To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 21:24:01 -0000 On 12/7/17, Mark Johnston wrote: > Author: markj > Date: Thu Dec 7 19:38:09 2017 > New Revision: 326664 > URL: https://svnweb.freebsd.org/changeset/base/326664 > > Log: > Fix the UMA reclaim worker after r326347. > > atomic_set_*() sets a bit in the target memory location, so > atomic_set_int(&uma_reclaim_needed, 0) does not do what it looks like > it does. > > PR: 224080 > Reviewed by: jeff, kib > Differential Revision: https://reviews.freebsd.org/D13412 > > Modified: > head/sys/vm/uma_core.c > > Modified: head/sys/vm/uma_core.c > ============================================================================== > --- head/sys/vm/uma_core.c Thu Dec 7 18:04:48 2017 (r326663) > +++ head/sys/vm/uma_core.c Thu Dec 7 19:38:09 2017 (r326664) > @@ -3177,7 +3177,7 @@ uma_reclaim_worker(void *arg __unused) > EVENTHANDLER_INVOKE(vm_lowmem, VM_LOW_KMEM); > sx_xlock(&uma_drain_lock); > uma_reclaim_locked(true); > - atomic_set_int(&uma_reclaim_needed, 0); > + uma_reclaim_needed = 0; atomic_store_rel_int(&uma_reclaim_needed, 0) ? > sx_xunlock(&uma_drain_lock); > /* Don't fire more than once per-second. */ > pause("umarclslp", hz); > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Thu Dec 7 21:36:15 2017 Return-Path: Delivered-To: svn-src-head@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 2A0C7E91E85; Thu, 7 Dec 2017 21:36:15 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com [209.85.214.47]) (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 EE6657766A; Thu, 7 Dec 2017 21:36:14 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f47.google.com with SMTP id z6so449117iti.4; Thu, 07 Dec 2017 13:36:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=bCNe5brmAthcX37NC2uY9jRNmMS/HCtVCVKsLmfkFLI=; b=d6teJ1TfzKkZHQCWPy7BKQOwhDffCt2WXVfqM3CLIEpJUc0iHWd2pwonpK5TNlOBah +WbKv/iBiPXXp2u7pu7evm8jqoaxaXMYqy9tdfjviWFbpxJWkE1l+6wEg3NomlqGA+oN MMCJgLE6xoICCm3d8Xxf/D3aL5naBUm+c2NxYvG0bXddGYuJt+ghn0E7hf4KzTr0f2dJ ia1tDWecDeoazkHSdqWTK/Z9v2uiWvZVO+HTj1Id+9N6edobqlq44fhq8Xp1hjGhh2xx 7Vy+51BvD4BJSrYORrPoOZX0ekXutjCv4xy3o7L2MAwRNJkfpSOmZew8oNIaeZsqmKz8 L8wA== X-Gm-Message-State: AKGB3mJ2WCEj9mFtI6uam2+gFIGEAJIkHXHzP3OZln4TInktQkuNQe3T nlR54d41ELfwQOuQw9pRv/aH1l8E X-Google-Smtp-Source: AGs4zMYe3lccAUxdFSEOVya4UBjaNAbSlYM+YAAzwjGsb2FgcvTYcUfTN0ZZLjwLasCMZOYHGL7Nrg== X-Received: by 10.36.23.151 with SMTP id 145mr3533006ith.28.1512682082073; Thu, 07 Dec 2017 13:28:02 -0800 (PST) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com. [209.85.214.52]) by smtp.gmail.com with ESMTPSA id i63sm42138itb.35.2017.12.07.13.28.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 13:28:01 -0800 (PST) Received: by mail-it0-f52.google.com with SMTP id d16so415629itj.1; Thu, 07 Dec 2017 13:28:01 -0800 (PST) X-Received: by 10.107.158.193 with SMTP id h184mr39990087ioe.256.1512682081651; Thu, 07 Dec 2017 13:28:01 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Thu, 7 Dec 2017 13:28:01 -0800 (PST) In-Reply-To: References: <201712071938.vB7Jc9Ck083315@repo.freebsd.org> From: Conrad Meyer Date: Thu, 7 Dec 2017 13:28:01 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326664 - head/sys/vm To: Oliver Pinter Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 21:36:15 -0000 Read the phab review. On Thu, Dec 7, 2017 at 1:23 PM, Oliver Pinter wrote: > On 12/7/17, Mark Johnston wrote: >> Author: markj >> Date: Thu Dec 7 19:38:09 2017 >> New Revision: 326664 >> URL: https://svnweb.freebsd.org/changeset/base/326664 >> >> Log: >> Fix the UMA reclaim worker after r326347. >> >> atomic_set_*() sets a bit in the target memory location, so >> atomic_set_int(&uma_reclaim_needed, 0) does not do what it looks like >> it does. >> >> PR: 224080 >> Reviewed by: jeff, kib >> Differential Revision: https://reviews.freebsd.org/D13412 >> >> Modified: >> head/sys/vm/uma_core.c >> >> Modified: head/sys/vm/uma_core.c >> ============================================================================== >> --- head/sys/vm/uma_core.c Thu Dec 7 18:04:48 2017 (r326663) >> +++ head/sys/vm/uma_core.c Thu Dec 7 19:38:09 2017 (r326664) >> @@ -3177,7 +3177,7 @@ uma_reclaim_worker(void *arg __unused) >> EVENTHANDLER_INVOKE(vm_lowmem, VM_LOW_KMEM); >> sx_xlock(&uma_drain_lock); >> uma_reclaim_locked(true); >> - atomic_set_int(&uma_reclaim_needed, 0); >> + uma_reclaim_needed = 0; > > atomic_store_rel_int(&uma_reclaim_needed, 0) ? > >> sx_xunlock(&uma_drain_lock); >> /* Don't fire more than once per-second. */ >> pause("umarclslp", hz); >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >> > From owner-svn-src-head@freebsd.org Thu Dec 7 22:11:25 2017 Return-Path: Delivered-To: svn-src-head@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 13D73E929F3; Thu, 7 Dec 2017 22:11:25 +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 D508978CD2; Thu, 7 Dec 2017 22:11:24 +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 vB7MBN8J049459; Thu, 7 Dec 2017 22:11:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7MBNTr049458; Thu, 7 Dec 2017 22:11:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712072211.vB7MBNTr049458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 7 Dec 2017 22:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326671 - head/stand/i386/gptzfsboot X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/stand/i386/gptzfsboot X-SVN-Commit-Revision: 326671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 22:11:25 -0000 Author: markj Date: Thu Dec 7 22:11:23 2017 New Revision: 326671 URL: https://svnweb.freebsd.org/changeset/base/326671 Log: Avoid setting -Wno-tentative-definition-incomplete-type with gcc. No version of gcc that I've tried accepts this flag. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D13415 Modified: head/stand/i386/gptzfsboot/Makefile Modified: head/stand/i386/gptzfsboot/Makefile ============================================================================== --- head/stand/i386/gptzfsboot/Makefile Thu Dec 7 20:41:23 2017 (r326670) +++ head/stand/i386/gptzfsboot/Makefile Thu Dec 7 22:11:23 2017 (r326671) @@ -39,12 +39,9 @@ CFLAGS+=-DBOOTPROG=\"gptzfsboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline -Wno-pointer-sign -NO_WCAST_ALIGN= +CFLAGS.clang+= -Wno-tentative-definition-incomplete-type -.if ${COMPILER_TYPE} == "clang" || \ - (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201) -CFLAGS+= -Wno-tentative-definition-incomplete-type -.endif +NO_WCAST_ALIGN= .if ${MACHINE} == "amd64" LIBZFSBOOT=${BOOTOBJ}/zfs32/libzfsboot.a From owner-svn-src-head@freebsd.org Thu Dec 7 22:19:10 2017 Return-Path: Delivered-To: svn-src-head@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 794E9E92C44; Thu, 7 Dec 2017 22:19:10 +0000 (UTC) (envelope-from tuexen@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 44F5979115; Thu, 7 Dec 2017 22:19:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB7MJ9w8051512; Thu, 7 Dec 2017 22:19:09 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7MJ8lT051499; Thu, 7 Dec 2017 22:19:08 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201712072219.vB7MJ8lT051499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 7 Dec 2017 22:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326672 - in head: sys/conf sys/netinet sys/netinet6 usr.bin/systat X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head: sys/conf sys/netinet sys/netinet6 usr.bin/systat X-SVN-Commit-Revision: 326672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 22:19:10 -0000 Author: tuexen Date: Thu Dec 7 22:19:08 2017 New Revision: 326672 URL: https://svnweb.freebsd.org/changeset/base/326672 Log: Retire SCTP_WITH_NO_CSUM option. This option was used in the early days to allow performance measurements extrapolating the use of SCTP checksum offloading. Since this feature is now available, get rid of this option. This also un-breaks the LINT kernel. Thanks to markj@ for making me aware of the problem. Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/netinet/sctp_crc32.c head/sys/netinet/sctp_crc32.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_input.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_uio.h head/sys/netinet6/sctp6_usrreq.c head/usr.bin/systat/sctp.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/conf/NOTES Thu Dec 7 22:19:08 2017 (r326672) @@ -675,21 +675,6 @@ options SCTP # faster.. if you are not debugging don't use. options SCTP_DEBUG # -# This option turns off the CRC32c checksum. Basically, -# you will not be able to talk to anyone else who -# has not done this. Its more for experimentation to -# see how much CPU the CRC32c really takes. Most new -# cards for TCP support checksum offload.. so this -# option gives you a "view" into what SCTP would be -# like with such an offload (which only exists in -# high in iSCSI boards so far). With the new -# splitting 8's algorithm its not as bad as it used -# to be.. but it does speed things up try only -# for in a captured lab environment :-) -options SCTP_WITH_NO_CSUM -# - -# # All that options after that turn on specific types of # logging. You can monitor CWND growth, flight size # and all sorts of things. Go look at the code and Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/conf/options Thu Dec 7 22:19:08 2017 (r326672) @@ -458,7 +458,6 @@ XBONEHACK # SCTP opt_sctp.h SCTP_DEBUG opt_sctp.h # Enable debug printfs -SCTP_WITH_NO_CSUM opt_sctp.h # Use this at your peril SCTP_LOCK_LOGGING opt_sctp.h # Log to KTR lock activity SCTP_MBUF_LOGGING opt_sctp.h # Log to KTR general mbuf aloc/free SCTP_MBCNT_LOGGING opt_sctp.h # Log to KTR mbcnt activity Modified: head/sys/netinet/sctp_crc32.c ============================================================================== --- head/sys/netinet/sctp_crc32.c Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/netinet/sctp_crc32.c Thu Dec 7 22:19:08 2017 (r326672) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include -#if !defined(SCTP_WITH_NO_CSUM) static uint32_t sctp_finalize_crc32c(uint32_t crc32c) @@ -115,17 +114,11 @@ sctp_calculate_cksum(struct mbuf *m, uint32_t offset) base = sctp_finalize_crc32c(base); return (base); } -#endif /* !defined(SCTP_WITH_NO_CSUM) */ void sctp_delayed_cksum(struct mbuf *m, uint32_t offset) { -#if defined(SCTP_WITH_NO_CSUM) -#ifdef INVARIANTS - panic("sctp_delayed_cksum() called when using no SCTP CRC."); -#endif -#else uint32_t checksum; checksum = sctp_calculate_cksum(m, offset); @@ -144,5 +137,4 @@ sctp_delayed_cksum(struct mbuf *m, uint32_t offset) return; } *(uint32_t *)(m->m_data + offset) = checksum; -#endif } Modified: head/sys/netinet/sctp_crc32.h ============================================================================== --- head/sys/netinet/sctp_crc32.h Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/netinet/sctp_crc32.h Thu Dec 7 22:19:08 2017 (r326672) @@ -39,9 +39,7 @@ __FBSDID("$FreeBSD$"); #define _NETINET_SCTP_CRC32_H_ #if defined(_KERNEL) -#if !defined(SCTP_WITH_NO_CSUM) uint32_t sctp_calculate_cksum(struct mbuf *, uint32_t); -#endif void sctp_delayed_cksum(struct mbuf *, uint32_t offset); #endif /* _KERNEL */ #endif /* __crc32c_h__ */ Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/netinet/sctp_input.c Thu Dec 7 22:19:08 2017 (r326672) @@ -5507,9 +5507,7 @@ void sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int length, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_chunkhdr *ch, -#if !defined(SCTP_WITH_NO_CSUM) uint8_t compute_crc, -#endif uint8_t ecn_bits, uint8_t mflowtype, uint32_t mflowid, uint16_t fibnum, uint32_t vrf_id, uint16_t port) @@ -5529,7 +5527,6 @@ sctp_common_input_processing(struct mbuf **mm, int iph sctp_audit_log(0xE0, 1); sctp_auditing(0, inp, stcb, net); #endif -#if !defined(SCTP_WITH_NO_CSUM) if (compute_crc != 0) { uint32_t check, calc_check; @@ -5574,7 +5571,6 @@ sctp_common_input_processing(struct mbuf **mm, int iph goto out; } } -#endif /* Destination port of 0 is illegal, based on RFC4960. */ if (sh->dest_port == 0) { SCTP_STAT_INCR(sctps_hdrops); @@ -5892,9 +5888,7 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint struct sctphdr *sh; struct sctp_chunkhdr *ch; int length, offset; -#if !defined(SCTP_WITH_NO_CSUM) uint8_t compute_crc; -#endif uint32_t mflowid; uint8_t mflowtype; uint16_t fibnum; @@ -5964,9 +5958,6 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint goto out; } ecn_bits = ip->ip_tos; -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_recvnocrc); -#else if (m->m_pkthdr.csum_flags & CSUM_SCTP_VALID) { SCTP_STAT_INCR(sctps_recvhwcrc); compute_crc = 0; @@ -5974,14 +5965,11 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint SCTP_STAT_INCR(sctps_recvswcrc); compute_crc = 1; } -#endif sctp_common_input_processing(&m, iphlen, offset, length, (struct sockaddr *)&src, (struct sockaddr *)&dst, sh, ch, -#if !defined(SCTP_WITH_NO_CSUM) compute_crc, -#endif ecn_bits, mflowtype, mflowid, fibnum, vrf_id, port); Modified: head/sys/netinet/sctp_input.h ============================================================================== --- head/sys/netinet/sctp_input.h Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/netinet/sctp_input.h Thu Dec 7 22:19:08 2017 (r326672) @@ -43,9 +43,7 @@ void sctp_common_input_processing(struct mbuf **, int, int, int, struct sockaddr *, struct sockaddr *, struct sctphdr *, struct sctp_chunkhdr *, -#if !defined(SCTP_WITH_NO_CSUM) uint8_t, -#endif uint8_t, uint8_t, uint32_t, uint16_t, uint32_t, uint16_t); Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/netinet/sctp_output.c Thu Dec 7 22:19:08 2017 (r326672) @@ -4226,23 +4226,15 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, } SCTP_ATTACH_CHAIN(o_pak, m, packet_length); if (port) { -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_sendnocrc); -#else sctphdr->checksum = sctp_calculate_cksum(m, sizeof(struct ip) + sizeof(struct udphdr)); SCTP_STAT_INCR(sctps_sendswcrc); -#endif if (V_udp_cksum) { SCTP_ENABLE_UDP_CSUM(o_pak); } } else { -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_sendnocrc); -#else m->m_pkthdr.csum_flags = CSUM_SCTP; m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); -#endif } #ifdef SCTP_PACKET_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) @@ -4566,23 +4558,15 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, } SCTP_ATTACH_CHAIN(o_pak, m, packet_length); if (port) { -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_sendnocrc); -#else sctphdr->checksum = sctp_calculate_cksum(m, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); SCTP_STAT_INCR(sctps_sendswcrc); -#endif if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), packet_length - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } } else { -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_sendnocrc); -#else m->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); -#endif } /* send it out. table id is taken from stcb */ #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -11227,23 +11211,15 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad } ip->ip_len = htons(len); if (port) { -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_sendnocrc); -#else shout->checksum = sctp_calculate_cksum(mout, sizeof(struct ip) + sizeof(struct udphdr)); SCTP_STAT_INCR(sctps_sendswcrc); -#endif if (V_udp_cksum) { SCTP_ENABLE_UDP_CSUM(o_pak); } } else { -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_sendnocrc); -#else mout->m_pkthdr.csum_flags = CSUM_SCTP; mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); -#endif } #ifdef SCTP_PACKET_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) { @@ -11257,23 +11233,15 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad case AF_INET6: ip6->ip6_plen = (uint16_t)(len - sizeof(struct ip6_hdr)); if (port) { -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_sendnocrc); -#else shout->checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); SCTP_STAT_INCR(sctps_sendswcrc); -#endif if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), len - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } } else { -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_sendnocrc); -#else mout->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum); SCTP_STAT_INCR(sctps_sendhwcrc); -#endif } #ifdef SCTP_PACKET_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) { Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/netinet/sctp_sysctl.c Thu Dec 7 22:19:08 2017 (r326672) @@ -716,7 +716,6 @@ sctp_sysctl_handle_stats(SYSCTL_HANDLER_ARGS) sb.sctps_recvauthfailed += sarry->sctps_recvauthfailed; sb.sctps_recvexpress += sarry->sctps_recvexpress; sb.sctps_recvexpressm += sarry->sctps_recvexpressm; - sb.sctps_recvnocrc += sarry->sctps_recvnocrc; sb.sctps_recvswcrc += sarry->sctps_recvswcrc; sb.sctps_recvhwcrc += sarry->sctps_recvhwcrc; sb.sctps_sendpackets += sarry->sctps_sendpackets; @@ -729,7 +728,6 @@ sctp_sysctl_handle_stats(SYSCTL_HANDLER_ARGS) sb.sctps_sendecne += sarry->sctps_sendecne; sb.sctps_sendauth += sarry->sctps_sendauth; sb.sctps_senderrors += sarry->sctps_senderrors; - sb.sctps_sendnocrc += sarry->sctps_sendnocrc; sb.sctps_sendswcrc += sarry->sctps_sendswcrc; sb.sctps_sendhwcrc += sarry->sctps_sendhwcrc; sb.sctps_pdrpfmbox += sarry->sctps_pdrpfmbox; Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/netinet/sctp_uio.h Thu Dec 7 22:19:08 2017 (r326672) @@ -986,7 +986,7 @@ struct sctpstat { uint32_t sctps_recvexpress; /* total fast path receives all one * chunk */ uint32_t sctps_recvexpressm; /* total fast path multi-part data */ - uint32_t sctps_recvnocrc; + uint32_t sctps_recv_spare; /* formerly sctps_recvnocrc */ uint32_t sctps_recvswcrc; uint32_t sctps_recvhwcrc; @@ -1006,7 +1006,7 @@ struct sctpstat { uint32_t sctps_sendecne;/* total output ECNE chunks */ uint32_t sctps_sendauth;/* total output AUTH chunks FIXME */ uint32_t sctps_senderrors; /* ip_output error counter */ - uint32_t sctps_sendnocrc; + uint32_t sctps_send_spare; /* formerly sctps_sendnocrc */ uint32_t sctps_sendswcrc; uint32_t sctps_sendhwcrc; /* PCKDROPREP statistics: */ Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Thu Dec 7 22:11:23 2017 (r326671) +++ head/sys/netinet6/sctp6_usrreq.c Thu Dec 7 22:19:08 2017 (r326672) @@ -71,9 +71,7 @@ sctp6_input_with_port(struct mbuf **i_pak, int *offp, struct sctphdr *sh; struct sctp_chunkhdr *ch; int length, offset; -#if !defined(SCTP_WITH_NO_CSUM) uint8_t compute_crc; -#endif uint32_t mflowid; uint8_t mflowtype; uint16_t fibnum; @@ -144,9 +142,6 @@ sctp6_input_with_port(struct mbuf **i_pak, int *offp, goto out; } ecn_bits = ((ntohl(ip6->ip6_flow) >> 20) & 0x000000ff); -#if defined(SCTP_WITH_NO_CSUM) - SCTP_STAT_INCR(sctps_recvnocrc); -#else if (m->m_pkthdr.csum_flags & CSUM_SCTP_VALID) { SCTP_STAT_INCR(sctps_recvhwcrc); compute_crc = 0; @@ -154,14 +149,11 @@ sctp6_input_with_port(struct mbuf **i_pak, int *offp, SCTP_STAT_INCR(sctps_recvswcrc); compute_crc = 1; } -#endif sctp_common_input_processing(&m, iphlen, offset, length, (struct sockaddr *)&src, (struct sockaddr *)&dst, sh, ch, -#if !defined(SCTP_WITH_NO_CSUM) compute_crc, -#endif ecn_bits, mflowtype, mflowid, fibnum, vrf_id, port); Modified: head/usr.bin/systat/sctp.c ============================================================================== --- head/usr.bin/systat/sctp.c Thu Dec 7 22:11:23 2017 (r326671) +++ head/usr.bin/systat/sctp.c Thu Dec 7 22:19:08 2017 (r326672) @@ -180,7 +180,6 @@ domode(struct sctpstat *ret) DO(sctps_recvauthfailed); DO(sctps_recvexpress); DO(sctps_recvexpressm); - DO(sctps_recvnocrc); DO(sctps_recvswcrc); DO(sctps_recvhwcrc); @@ -194,7 +193,6 @@ domode(struct sctpstat *ret) DO(sctps_sendecne); DO(sctps_sendauth); DO(sctps_senderrors); - DO(sctps_sendnocrc); DO(sctps_sendswcrc); DO(sctps_sendhwcrc); From owner-svn-src-head@freebsd.org Thu Dec 7 22:23:37 2017 Return-Path: Delivered-To: svn-src-head@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 6699AE92E36; Thu, 7 Dec 2017 22:23:37 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) (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 E5BA779529; Thu, 7 Dec 2017 22:23:36 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f52.google.com with SMTP id x204so9852733lfa.11; Thu, 07 Dec 2017 14:23:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kb6sPzfybx4WaT8wWgvTLpwxYZs703K1kyj3y6A2w+c=; b=SwLfW8O2Nvb9kY+4nHdoNkpMmKOzurTsd99B86x/kfaj96LuLSXxMJTvYKsHr53IzX N3+ipUVPT4VKoIgPNlXuJJ7F4Vlak6pGeYk3ZY/Sgk7psE3bSCcrDCPZ1aTNK2HfO+6x fm3k5Mm7SLARBzkq8Aw4cSoec8xyZieQK4uyQT1Zm7Hc26uQuisM8vBoerfdCbiyWasf Vzw5WhpFUrzqpuh32l5W8rRpXzqn1KhxlWZrT2LSrOoY0IaLEyzIcVKtHl0Wl9c1ViEF dQS4G2FmWr/jZKa1MMAgG/vEN83u7QcVYDfISdZDTQ6KNB/nmVmBddW5YmCeGG5qbBgk /CvA== X-Gm-Message-State: AJaThX4QEBKQDm1pDBG4XZo3UDvoNVhYn8GXo/sp3CuoEbgseYNWnTLg DRMkepu0LsAHi4MnIBdTs3GgIFxXNCE= X-Google-Smtp-Source: AGs4zMZOu9LF+eVcXh0V1jXXSWkQECtS4gYN0VTmtOnCunpCQuLXpaAq4jWN2DoRBcJyz3RkxIhfjg== X-Received: by 10.25.81.65 with SMTP id f62mr12618508lfb.148.1512685408327; Thu, 07 Dec 2017 14:23:28 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id f99sm1166487lfi.77.2017.12.07.14.23.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 14:23:27 -0800 (PST) Subject: Re: svn commit: r326383 - head/sys/x86/cpufreq To: Alexey Dokuchaev , Jung-uk Kim Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201711300140.vAU1e7dC001292@repo.freebsd.org> <20171207100345.GA59559@FreeBSD.org> From: Andriy Gapon Message-ID: Date: Fri, 8 Dec 2017 00:23:25 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171207100345.GA59559@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 22:23:37 -0000 On 07/12/2017 12:03, Alexey Dokuchaev wrote: > On Thu, Nov 30, 2017 at 03:08:49PM -0500, Jung-uk Kim wrote: >> ... >> Probably. However, I am just trying to fix my FX-8350 and A10-6800 and >> I don't have Zen processors to verify the MSRs are actually working on >> those CPUs. > > Ah, that's so lovely, thanks Jung-uk; I feel that our support for AMD > fam. 15h CPUs is lacking. E.g. only four P-states are reported for my > A8-5550M, while it supports boosted P-states per BKDG, and reading MSRs > directly via `sysutils/amdmsrtweaker' reports eight of them (P0 .. P7), > with three turbo P-states P0 P1 P2. > > Since you have A10-6800 you might try to reproduce what I see here with > A8-5550M. I think that the boosted states are supposed to be hidden from the OS. It may be possible to query them though hardware specific registers, but they can not be set by software directly anyway. My impression is that the proper way to observe the boost states is via APERF / MPERF MSRs. They are useful for other things, e.g. C0 residency, too. P.S. i7z-like utility for AMD would be nice to have. -- Andriy Gapon From owner-svn-src-head@freebsd.org Thu Dec 7 22:36:59 2017 Return-Path: Delivered-To: svn-src-head@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 6FC3EE93221; Thu, 7 Dec 2017 22:36:59 +0000 (UTC) (envelope-from glebius@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 46E3B79C4B; Thu, 7 Dec 2017 22:36:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB7Mawis059700; Thu, 7 Dec 2017 22:36:58 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB7MawIY059698; Thu, 7 Dec 2017 22:36:58 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201712072236.vB7MawIY059698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 7 Dec 2017 22:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326673 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 326673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 22:36:59 -0000 Author: glebius Date: Thu Dec 7 22:36:58 2017 New Revision: 326673 URL: https://svnweb.freebsd.org/changeset/base/326673 Log: Separate out send buffer autoscaling code into function, so that alternative TCP stacks may reuse it instead of pasting. Obtained from: Netflix Modified: head/sys/netinet/tcp_output.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Thu Dec 7 22:19:08 2017 (r326672) +++ head/sys/netinet/tcp_output.c Thu Dec 7 22:36:58 2017 (r326673) @@ -487,60 +487,8 @@ after_sack_rexmit: /* len will be >= 0 after this point. */ KASSERT(len >= 0, ("[%s:%d]: len < 0", __func__, __LINE__)); - /* - * Automatic sizing of send socket buffer. Often the send buffer - * size is not optimally adjusted to the actual network conditions - * at hand (delay bandwidth product). Setting the buffer size too - * small limits throughput on links with high bandwidth and high - * delay (eg. trans-continental/oceanic links). Setting the - * buffer size too big consumes too much real kernel memory, - * especially with many connections on busy servers. - * - * The criteria to step up the send buffer one notch are: - * 1. receive window of remote host is larger than send buffer - * (with a fudge factor of 5/4th); - * 2. send buffer is filled to 7/8th with data (so we actually - * have data to make use of it); - * 3. send buffer fill has not hit maximal automatic size; - * 4. our send window (slow start and cogestion controlled) is - * larger than sent but unacknowledged data in send buffer. - * - * The remote host receive window scaling factor may limit the - * growing of the send buffer before it reaches its allowed - * maximum. - * - * It scales directly with slow start or congestion window - * and does at most one step per received ACK. This fast - * scaling has the drawback of growing the send buffer beyond - * what is strictly necessary to make full use of a given - * delay*bandwidth product. However testing has shown this not - * to be much of an problem. At worst we are trading wasting - * of available bandwidth (the non-use of it) for wasting some - * socket buffer memory. - * - * TODO: Shrink send buffer during idle periods together - * with congestion window. Requires another timer. Has to - * wait for upcoming tcp timer rewrite. - * - * XXXGL: should there be used sbused() or sbavail()? - */ - if (V_tcp_do_autosndbuf && so->so_snd.sb_flags & SB_AUTOSIZE) { - int lowat; + tcp_sndbuf_autoscale(tp, so, sendwin); - lowat = V_tcp_sendbuf_auto_lowat ? so->so_snd.sb_lowat : 0; - if ((tp->snd_wnd / 4 * 5) >= so->so_snd.sb_hiwat - lowat && - sbused(&so->so_snd) >= - (so->so_snd.sb_hiwat / 8 * 7) - lowat && - sbused(&so->so_snd) < V_tcp_autosndbuf_max && - sendwin >= (sbused(&so->so_snd) - - (tp->snd_nxt - tp->snd_una))) { - if (!sbreserve_locked(&so->so_snd, - min(so->so_snd.sb_hiwat + V_tcp_autosndbuf_inc, - V_tcp_autosndbuf_max), so, curthread)) - so->so_snd.sb_flags &= ~SB_AUTOSIZE; - } - } - /* * Decide if we can use TCP Segmentation Offloading (if supported by * hardware). @@ -1857,4 +1805,63 @@ tcp_addoptions(struct tcpopt *to, u_char *optp) KASSERT(optlen <= TCP_MAXOLEN, ("%s: TCP options too long", __func__)); return (optlen); +} + +void +tcp_sndbuf_autoscale(struct tcpcb *tp, struct socket *so, uint32_t sendwin) +{ + + /* + * Automatic sizing of send socket buffer. Often the send buffer + * size is not optimally adjusted to the actual network conditions + * at hand (delay bandwidth product). Setting the buffer size too + * small limits throughput on links with high bandwidth and high + * delay (eg. trans-continental/oceanic links). Setting the + * buffer size too big consumes too much real kernel memory, + * especially with many connections on busy servers. + * + * The criteria to step up the send buffer one notch are: + * 1. receive window of remote host is larger than send buffer + * (with a fudge factor of 5/4th); + * 2. send buffer is filled to 7/8th with data (so we actually + * have data to make use of it); + * 3. send buffer fill has not hit maximal automatic size; + * 4. our send window (slow start and cogestion controlled) is + * larger than sent but unacknowledged data in send buffer. + * + * The remote host receive window scaling factor may limit the + * growing of the send buffer before it reaches its allowed + * maximum. + * + * It scales directly with slow start or congestion window + * and does at most one step per received ACK. This fast + * scaling has the drawback of growing the send buffer beyond + * what is strictly necessary to make full use of a given + * delay*bandwidth product. However testing has shown this not + * to be much of an problem. At worst we are trading wasting + * of available bandwidth (the non-use of it) for wasting some + * socket buffer memory. + * + * TODO: Shrink send buffer during idle periods together + * with congestion window. Requires another timer. Has to + * wait for upcoming tcp timer rewrite. + * + * XXXGL: should there be used sbused() or sbavail()? + */ + if (V_tcp_do_autosndbuf && so->so_snd.sb_flags & SB_AUTOSIZE) { + int lowat; + + lowat = V_tcp_sendbuf_auto_lowat ? so->so_snd.sb_lowat : 0; + if ((tp->snd_wnd / 4 * 5) >= so->so_snd.sb_hiwat - lowat && + sbused(&so->so_snd) >= + (so->so_snd.sb_hiwat / 8 * 7) - lowat && + sbused(&so->so_snd) < V_tcp_autosndbuf_max && + sendwin >= (sbused(&so->so_snd) - + (tp->snd_nxt - tp->snd_una))) { + if (!sbreserve_locked(&so->so_snd, + min(so->so_snd.sb_hiwat + V_tcp_autosndbuf_inc, + V_tcp_autosndbuf_max), so, curthread)) + so->so_snd.sb_flags &= ~SB_AUTOSIZE; + } + } } Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Thu Dec 7 22:19:08 2017 (r326672) +++ head/sys/netinet/tcp_var.h Thu Dec 7 22:36:58 2017 (r326673) @@ -884,6 +884,7 @@ void tcp_sack_partialack(struct tcpcb *, struct tcphd void tcp_free_sackholes(struct tcpcb *tp); int tcp_newreno(struct tcpcb *, struct tcphdr *); int tcp_compute_pipe(struct tcpcb *); +void tcp_sndbuf_autoscale(struct tcpcb *, struct socket *, uint32_t); static inline void tcp_fields_to_host(struct tcphdr *th) From owner-svn-src-head@freebsd.org Thu Dec 7 22:50:32 2017 Return-Path: Delivered-To: svn-src-head@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 CEBBAE9350D; Thu, 7 Dec 2017 22:50:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id E97857A39F; Thu, 7 Dec 2017 22:50:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 540AED66025; Fri, 8 Dec 2017 09:50:23 +1100 (AEDT) Date: Fri, 8 Dec 2017 09:50:22 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mark Johnston cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326658 - head/lib/libefivar In-Reply-To: <201712071516.vB7FGHuT069830@repo.freebsd.org> Message-ID: <20171208093703.Q1048@besplex.bde.org> References: <201712071516.vB7FGHuT069830@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=zFx5VP3w1OfopxCF-z4A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 22:50:32 -0000 On Thu, 7 Dec 2017, Mark Johnston wrote: > Log: > Ensure that "out" is initialized in all error paths. > ... > Modified: head/lib/libefivar/efivar-dp-xlate.c > ============================================================================== > --- head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 09:05:34 2017 (r326657) > +++ head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 15:16:17 2017 (r326658) > @@ -529,7 +529,7 @@ build_dp(const char *efimedia, const char *relpath, ef > { > char *fp, *dptxt = NULL; > int rv = 0; > - efidp out; > + efidp out = NULL; > size_t len; > > fp = path_to_file_dp(relpath); This is a worse style of initializations in declararations than usual. 1 initialization in a non-declaration is mixed with many initializations in declarations, using the C99 misfeature of allowing initialiations after statements, without even any blank lines to keep the declarations separate. Most libefivar code is much uglier than this, with 2-space indentation and worse. Bruce From owner-svn-src-head@freebsd.org Thu Dec 7 23:19:10 2017 Return-Path: Delivered-To: svn-src-head@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 7241CE93E59 for ; Thu, 7 Dec 2017 23:19:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (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 340C07B36B for ; Thu, 7 Dec 2017 23:19:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22d.google.com with SMTP id x28so1061881ita.0 for ; Thu, 07 Dec 2017 15:19:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=CB4RcnvRWZJ/agHxxrG+J/b/yqNasT296z6IE7KqmPo=; b=A1/Mv4hX85dQL1pWpdOiB82pkaYPAj+fBGqN9QubxxvFHDRd9zfO1OMjXBZ3wBCnNO hnn22+44OtHWxM1x2g8l5HoEqR7ugja0yBDA4JzABVehmCqxyAGlNr7TSAl1GeR/mp3L FGpEMoar1s0Q9QL3GUtVts5QLeMjfBqDovtC2JcYv5xQHskCQPEQEueWcGlQcvtGy8OX QgsFywlf7tIPD5+rOVJegngtb6f1YoB28/BClZ9/479Tc2OM6sBcla5l318BcZqObwyQ 4qrG1iG8NUbad9zlcsZ3F6RKlqWw3kfAUG2VuTFJ44m++4g4CPUXv5T2SNsjHk1ZA7r9 69Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=CB4RcnvRWZJ/agHxxrG+J/b/yqNasT296z6IE7KqmPo=; b=MReigXSWIzTnWjAJqB5nd3NMIEmus3u0GMdTzyc6US5UNNaNMWcEAR6pI1wCKlMNjx xTZxScX4huW3GcqwyzwA2HlT0UAhiQf3Kx8qaK0QxaGGc4Jn53H9nlIp51fCpFDlZy4j bG8hpB7zEK0c1BwfVGhtVdWcoRGsu8VonMr9lSTTaLK2pjIIH9BsPm57xO7Kg4vF3prT v1GlXDXD6EL7WSjgsSORUGN1WPD7v59r2jCldi01xwFBZiZmbXr+Eu4r0WYLvmLw0P5c WkEyyLA2P7pKOxpHKu+aywpQXUx7ctiiasxjWDYk/zs7u/l7+o2dfs4LmXS4TQFC6vUB ywiA== X-Gm-Message-State: AKGB3mIVM//Xd/8nAlDwp/XQaQad33asdivIq+yPalJk2TdWkPe97zrP 078vAuoEcOGvM+Sh2cbqCvybImxGwD17b/ELbWqbHg== X-Google-Smtp-Source: AGs4zMYfS1eClEmFRco10qj4SFlVCkAcYv+psMil8wfwgOSkNYwJkpDbjapvWIqoCFHryITzWtsq+UdfU2lvi4/EoXc= X-Received: by 10.36.147.193 with SMTP id y184mr3281143itd.64.1512688749184; Thu, 07 Dec 2017 15:19:09 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Thu, 7 Dec 2017 15:19:08 -0800 (PST) X-Originating-IP: [50.253.109.65] In-Reply-To: <20171208093703.Q1048@besplex.bde.org> References: <201712071516.vB7FGHuT069830@repo.freebsd.org> <20171208093703.Q1048@besplex.bde.org> From: Warner Losh Date: Thu, 7 Dec 2017 16:19:08 -0700 X-Google-Sender-Auth: Jl0qzCcAlLWDGJylfjzb_yzVSyY Message-ID: Subject: Re: svn commit: r326658 - head/lib/libefivar To: Bruce Evans Cc: Mark Johnston , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 23:19:10 -0000 On Thu, Dec 7, 2017 at 3:50 PM, Bruce Evans wrote: > On Thu, 7 Dec 2017, Mark Johnston wrote: > > Log: >> Ensure that "out" is initialized in all error paths. >> ... >> Modified: head/lib/libefivar/efivar-dp-xlate.c >> ============================================================ >> ================== >> --- head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 09:05:34 >> 2017 (r326657) >> +++ head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 15:16:17 >> 2017 (r326658) >> @@ -529,7 +529,7 @@ build_dp(const char *efimedia, const char *relpath, ef >> { >> char *fp, *dptxt = NULL; >> int rv = 0; >> - efidp out; >> + efidp out = NULL; >> size_t len; >> >> fp = path_to_file_dp(relpath); >> > > This is a worse style of initializations in declararations than usual. > 1 initialization in a non-declaration is mixed with many initializations > in declarations, using the C99 misfeature of allowing initialiations > after statements, without even any blank lines to keep the declarations > separate. > This matches the current style of the file though... > Most libefivar code is much uglier than this, with 2-space indentation > and worse. The code you are complaining about is vendor code.... The 2-space indentation is the least of the issues with that code.... Warner From owner-svn-src-head@freebsd.org Thu Dec 7 23:21:47 2017 Return-Path: Delivered-To: svn-src-head@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 A180FE94060; Thu, 7 Dec 2017 23:21:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 68E167B5E1; Thu, 7 Dec 2017 23:21:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 1B782107830; Fri, 8 Dec 2017 10:21:39 +1100 (AEDT) Date: Fri, 8 Dec 2017 10:21:38 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326669 - head/lib/msun/man In-Reply-To: <201712072038.vB7KccuT009226@repo.freebsd.org> Message-ID: <20171208095030.X1048@besplex.bde.org> References: <201712072038.vB7KccuT009226@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cK6QihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=IJ1v6GkqQ1CQte_BRr8A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 23:21:47 -0000 On Thu, 7 Dec 2017, Dimitry Andric wrote: > Log: > Remove the sentence in math(3) about some long double math functions not > being available. > > Submitted by: Steve Kargl > MFC after: 3 days > > Modified: > head/lib/msun/man/math.3 > > Modified: head/lib/msun/man/math.3 > ============================================================================== > --- head/lib/msun/man/math.3 Thu Dec 7 20:09:17 2017 (r326668) > +++ head/lib/msun/man/math.3 Thu Dec 7 20:38:37 2017 (r326669) > @@ -28,7 +28,7 @@ > .\" from: @(#)math.3 6.10 (Berkeley) 5/6/91 > .\" $FreeBSD$ > .\" > -.Dd December 5, 2010 > +.Dd December 7, 2017 > .Dt MATH 3 > .Os > .Sh NAME > @@ -235,12 +235,6 @@ and > .Vt long double > values, were written for or imported into subsequent versions of FreeBSD. > .Sh BUGS > -Some of the > -.Vt "long double" > -math functions in > -.St -isoC-99 > -are not available. > -.Pp > Many of the routines to compute transcendental functions produce > inaccurate results in other than the default rounding mode. > .Pp The removal is technically correct, since math(3) doesn't cover complex functions and the "imprecise" functions powl() and tgammal() are available. The unusuability of the imprecise functions is just not documented anywhere (their man page gives a generic description of error bounds that is off by a factor of 2**60 for imprecise functons on ld128). This man page gives stale documentation about the bad implementation of trig functions on i386. I fixed that a year ago in r305384, but didn' notice that it is documented here. The documentation only claims inaccurate argument reduction for huge arguments. Actually, the reduction was inaccurate for all args (about N bits wrong for an error of 2**N ulps for args near 2**N times Pi/2). Bruce From owner-svn-src-head@freebsd.org Fri Dec 8 00:57:15 2017 Return-Path: Delivered-To: svn-src-head@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 923A1E95996; Fri, 8 Dec 2017 00:57:15 +0000 (UTC) (envelope-from nwhitehorn@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 5E0317DD15; Fri, 8 Dec 2017 00:57:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB80vE3p017787; Fri, 8 Dec 2017 00:57:14 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB80vD8i017780; Fri, 8 Dec 2017 00:57:13 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201712080057.vB80vD8i017780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 8 Dec 2017 00:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326674 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/partedit X-SVN-Commit-Revision: 326674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 00:57:15 -0000 Author: nwhitehorn Date: Fri Dec 8 00:57:13 2017 New Revision: 326674 URL: https://svnweb.freebsd.org/changeset/base/326674 Log: Support mounted boot partitions in the installer. This allows the platform layer, for example, to specify that the EFI boot partition should be mounted at /efi and formatted normally with newfs_msdos rather than splatted to from /boot/boot1.efifat. This commit adds only the API for this; actual platform use will come later. Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c head/usr.sbin/bsdinstall/partedit/partedit.h head/usr.sbin/bsdinstall/partedit/partedit_arm64.c head/usr.sbin/bsdinstall/partedit/partedit_generic.c head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c head/usr.sbin/bsdinstall/partedit/partedit_sparc64.c head/usr.sbin/bsdinstall/partedit/partedit_x86.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Thu Dec 7 22:36:58 2017 (r326673) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Fri Dec 8 00:57:13 2017 (r326674) @@ -191,9 +191,7 @@ newfs_command(const char *fstype, char *command, int u for (i = 0; i < (int)nitems(items); i++) { if (items[i].state == 0) continue; - if (strcmp(items[i].name, "FAT32") == 0) - strcat(command, "-F 32 "); - else if (strcmp(items[i].name, "FAT16") == 0) + if (strcmp(items[i].name, "FAT16") == 0) strcat(command, "-F 16 "); else if (strcmp(items[i].name, "FAT12") == 0) strcat(command, "-F 12 "); @@ -675,6 +673,7 @@ set_default_part_metadata(const char *name, const char { struct partition_metadata *md; char *zpool_name = NULL; + const char *default_bootmount = NULL; int i; /* Set part metadata */ @@ -705,8 +704,12 @@ set_default_part_metadata(const char *name, const char if (strcmp(type, "freebsd-swap") == 0) mountpoint = "none"; - if (strcmp(type, bootpart_type(scheme)) == 0) - md->bootcode = 1; + if (strcmp(type, bootpart_type(scheme, &default_bootmount)) == 0) { + if (default_bootmount == NULL) + md->bootcode = 1; + else if (mountpoint == NULL || strlen(mountpoint) == 0) + mountpoint = default_bootmount; + } /* VTOC8 needs partcode at the start of partitions */ if (strcmp(scheme, "VTOC8") == 0 && (strcmp(type, "freebsd-ufs") == 0 @@ -886,9 +889,79 @@ gpart_max_free(struct ggeom *geom, intmax_t *npartstar return (maxsize); } +static size_t +add_boot_partition(struct ggeom *geom, struct gprovider *pp, + const char *scheme, int interactive) +{ + struct gconfig *gc; + struct gprovider *ppi; + int choice; + + /* Check for existing freebsd-boot partition */ + LIST_FOREACH(ppi, &geom->lg_provider, lg_provider) { + struct partition_metadata *md; + const char *bootmount = NULL; + + LIST_FOREACH(gc, &ppi->lg_config, lg_config) + if (strcmp(gc->lg_name, "type") == 0) + break; + if (gc == NULL) + continue; + if (strcmp(gc->lg_val, bootpart_type(scheme, &bootmount)) != 0) + continue; + + /* + * If the boot partition is not mountable and needs partcode, + * but doesn't have it, it doesn't satisfy our requirements. + */ + md = get_part_metadata(ppi->lg_name, 0); + if (bootmount == NULL && (md == NULL || !md->bootcode)) + continue; + + /* If it is mountable, but mounted somewhere else, remount */ + if (bootmount != NULL && md != NULL && md->fstab != NULL + && strlen(md->fstab->fs_file) > 0 + && strcmp(md->fstab->fs_file, bootmount) != 0) + continue; + + /* If it is mountable, but mountpoint is not set, mount it */ + if (bootmount != NULL && md == NULL) + set_default_part_metadata(ppi->lg_name, scheme, + gc->lg_val, bootmount, NULL); + + /* Looks good at this point, no added data needed */ + return (0); + } + + if (interactive) + choice = dialog_yesno("Boot Partition", + "This partition scheme requires a boot partition " + "for the disk to be bootable. Would you like to " + "make one now?", 0, 0); + else + choice = 0; + + if (choice == 0) { /* yes */ + const char *bootmount = NULL; + char sizestr[7]; + + humanize_number(sizestr, 7, + bootpart_size(scheme), "B", HN_AUTOSCALE, + HN_NOSPACE | HN_DECIMAL); + + gpart_create(pp, bootpart_type(scheme, &bootmount), + sizestr, bootmount, NULL, 0); + + return (bootpart_size(scheme)); + } + + return (0); +} + void -gpart_create(struct gprovider *pp, char *default_type, char *default_size, - char *default_mountpoint, char **partname, int interactive) +gpart_create(struct gprovider *pp, const char *default_type, + const char *default_size, const char *default_mountpoint, + char **partname, int interactive) { struct gctl_req *r; struct gconfig *gc; @@ -984,11 +1057,11 @@ gpart_create(struct gprovider *pp, char *default_type, nitems = scheme_supports_labels(scheme) ? 4 : 3; if (default_type != NULL) - items[0].text = default_type; + items[0].text = (char *)default_type; if (default_size != NULL) - items[1].text = default_size; + items[1].text = (char *)default_size; if (default_mountpoint != NULL) - items[2].text = default_mountpoint; + items[2].text = (char *)default_mountpoint; /* Default options */ strncpy(options_fstype, items[0].text, @@ -1105,61 +1178,21 @@ addpartform: * the user to add one. */ - /* Check for existing freebsd-boot partition */ - LIST_FOREACH(pp, &geom->lg_provider, lg_provider) { - struct partition_metadata *md; - md = get_part_metadata(pp->lg_name, 0); - if (md == NULL || !md->bootcode) - continue; - LIST_FOREACH(gc, &pp->lg_config, lg_config) - if (strcmp(gc->lg_name, "type") == 0) - break; - if (gc != NULL && strcmp(gc->lg_val, - bootpart_type(scheme)) == 0) - break; - } - - /* If there isn't one, and we need one, ask */ if ((strcmp(items[0].text, "freebsd") == 0 || - strcmp(items[2].text, "/") == 0) && bootpart_size(scheme) > 0 && - pp == NULL) { - if (interactive) - choice = dialog_yesno("Boot Partition", - "This partition scheme requires a boot partition " - "for the disk to be bootable. Would you like to " - "make one now?", 0, 0); - else - choice = 0; + strcmp(items[2].text, "/") == 0) && bootpart_size(scheme) > 0) { + size_t bytes = add_boot_partition(geom, pp, scheme, + interactive); - if (choice == 0) { /* yes */ - r = gctl_get_handle(); - gctl_ro_param(r, "class", -1, "PART"); - gctl_ro_param(r, "arg0", -1, geom->lg_name); - gctl_ro_param(r, "flags", -1, GPART_FLAGS); - gctl_ro_param(r, "verb", -1, "add"); - gctl_ro_param(r, "type", -1, bootpart_type(scheme)); - snprintf(sizestr, sizeof(sizestr), "%jd", - bootpart_size(scheme) / sector); - gctl_ro_param(r, "size", -1, sizestr); - snprintf(startstr, sizeof(startstr), "%jd", firstfree); - gctl_ro_param(r, "start", -1, startstr); - gctl_rw_param(r, "output", sizeof(output), output); - errstr = gctl_issue(r); - if (errstr != NULL && errstr[0] != '\0') - gpart_show_error("Error", NULL, errstr); - gctl_free(r); - - get_part_metadata(strtok(output, " "), 1)->bootcode = 1; - - /* Now adjust the part we are really adding forward */ - firstfree += bootpart_size(scheme) / sector; - size -= (bootpart_size(scheme) + stripe)/sector; + /* Now adjust the part we are really adding forward */ + if (bytes > 0) { + firstfree += bytes / sector; + size -= (bytes + stripe)/sector; if (stripe > 0 && (firstfree*sector % stripe) != 0) firstfree += (stripe - ((firstfree*sector) % stripe)) / sector; } } - + r = gctl_get_handle(); gctl_ro_param(r, "class", -1, "PART"); gctl_ro_param(r, "arg0", -1, geom->lg_name); @@ -1197,9 +1230,8 @@ addpartform: gctl_issue(r); /* Error usually expected and non-fatal */ gctl_free(r); - if (strcmp(items[0].text, bootpart_type(scheme)) == 0) - get_part_metadata(newpartname, 1)->bootcode = 1; - else if (strcmp(items[0].text, "freebsd") == 0) + + if (strcmp(items[0].text, "freebsd") == 0) gpart_partition(newpartname, "BSD"); else set_default_part_metadata(newpartname, scheme, Modified: head/usr.sbin/bsdinstall/partedit/partedit.h ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit.h Thu Dec 7 22:36:58 2017 (r326673) +++ head/usr.sbin/bsdinstall/partedit/partedit.h Fri Dec 8 00:57:13 2017 (r326674) @@ -65,8 +65,9 @@ int wizard_makeparts(struct gmesh *mesh, const char *d void gpart_delete(struct gprovider *pp); void gpart_destroy(struct ggeom *lg_geom); void gpart_edit(struct gprovider *pp); -void gpart_create(struct gprovider *pp, char *default_type, char *default_size, - char *default_mountpoint, char **output, int interactive); +void gpart_create(struct gprovider *pp, const char *default_type, + const char *default_size, const char *default_mountpoint, + char **output, int interactive); intmax_t gpart_max_free(struct ggeom *gp, intmax_t *start); void gpart_revert(struct gprovider *pp); void gpart_revert_all(struct gmesh *mesh); @@ -78,12 +79,29 @@ void gpart_set_root(const char *lg_name, const char *a const char *choose_part_type(const char *def_scheme); /* machine-dependent bootability checks */ -const char *default_scheme(void); -int is_scheme_bootable(const char *scheme); -int is_fs_bootable(const char *scheme, const char *fs); +const char *default_scheme(void); /* Default partition scheme */ +int is_scheme_bootable(const char *scheme); /* Non-zero if scheme boots */ +int is_fs_bootable(const char *scheme, const char *fs); /* Ditto if FS boots */ + +/* Size of boot partition in bytes. Zero if no boot partition */ size_t bootpart_size(const char *scheme); -const char *bootpart_type(const char *scheme); + +/* + * Type and mountpoint of boot partition for given scheme. If boot partition + * should not be mounted, set mountpoint to NULL or leave it unchanged. + * Note that mountpoint non-NULL implies partcode_path() will be ignored. + * Do *NOT* set both! + */ +const char *bootpart_type(const char *scheme, const char **mountpoint); + +/* Path to bootcode that goes in the scheme (e.g. disk MBR). NULL if none */ const char *bootcode_path(const char *scheme); + +/* + * Path to boot blocks to be dd'ed into the partition suggested by bootpart_* + * for the given scheme and root filesystem type. If the boot partition should + * be mounted rather than dd'ed to, return NULL here. + */ const char *partcode_path(const char *scheme, const char *fs_type); #endif Modified: head/usr.sbin/bsdinstall/partedit/partedit_arm64.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_arm64.c Thu Dec 7 22:36:58 2017 (r326673) +++ head/usr.sbin/bsdinstall/partedit/partedit_arm64.c Fri Dec 8 00:57:13 2017 (r326674) @@ -77,7 +77,7 @@ bootpart_size(const char *scheme) } const char * -bootpart_type(const char *scheme) +bootpart_type(const char *scheme, const char **mountpoint) { /* Only EFI is supported as boot partition */ Modified: head/usr.sbin/bsdinstall/partedit/partedit_generic.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_generic.c Thu Dec 7 22:36:58 2017 (r326673) +++ head/usr.sbin/bsdinstall/partedit/partedit_generic.c Fri Dec 8 00:57:13 2017 (r326674) @@ -65,7 +65,7 @@ bootpart_size(const char *part_type) { } const char * -bootpart_type(const char *scheme) { +bootpart_type(const char *scheme, const char **mountpoint) { return ("freebsd-boot"); } Modified: head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Thu Dec 7 22:36:58 2017 (r326673) +++ head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Fri Dec 8 00:57:13 2017 (r326674) @@ -92,7 +92,7 @@ bootpart_size(const char *part_type) { } const char * -bootpart_type(const char *scheme) { +bootpart_type(const char *scheme, const char **mountpoint) { size_t platlen = sizeof(platform); if (strlen(platform) == 0) sysctlbyname("hw.platform", platform, &platlen, NULL, -1); Modified: head/usr.sbin/bsdinstall/partedit/partedit_sparc64.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_sparc64.c Thu Dec 7 22:36:58 2017 (r326673) +++ head/usr.sbin/bsdinstall/partedit/partedit_sparc64.c Fri Dec 8 00:57:13 2017 (r326674) @@ -61,7 +61,7 @@ bootpart_size(const char *part_type) { } const char * -bootpart_type(const char *scheme) { +bootpart_type(const char *scheme, const char **mountpoint) { return ("freebsd-boot"); } Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_x86.c Thu Dec 7 22:36:58 2017 (r326673) +++ head/usr.sbin/bsdinstall/partedit/partedit_x86.c Fri Dec 8 00:57:13 2017 (r326674) @@ -111,7 +111,7 @@ bootpart_size(const char *scheme) } const char * -bootpart_type(const char *scheme) +bootpart_type(const char *scheme, const char **mountpoint) { if (strcmp(x86_bootmethod(), "UEFI") == 0) From owner-svn-src-head@freebsd.org Fri Dec 8 01:52:20 2017 Return-Path: Delivered-To: svn-src-head@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 521D8E969BB; Fri, 8 Dec 2017 01:52:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 17D517F555; Fri, 8 Dec 2017 01:52:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id E4011D5EE7B; Fri, 8 Dec 2017 12:09:47 +1100 (AEDT) Date: Fri, 8 Dec 2017 12:09:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: Bruce Evans , Mark Johnston , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r326658 - head/lib/libefivar In-Reply-To: Message-ID: <20171208120208.F1461@besplex.bde.org> References: <201712071516.vB7FGHuT069830@repo.freebsd.org> <20171208093703.Q1048@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=Et80GqgB3u6NiAF8MZUA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 01:52:20 -0000 On Thu, 7 Dec 2017, Warner Losh wrote: > On Thu, Dec 7, 2017 at 3:50 PM, Bruce Evans wrote: > >> On Thu, 7 Dec 2017, Mark Johnston wrote: >> >> Log: >>> Ensure that "out" is initialized in all error paths. >>> ... >>> Modified: head/lib/libefivar/efivar-dp-xlate.c >>> ============================================================ >>> ================== >>> --- head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 09:05:34 >>> 2017 (r326657) >>> +++ head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 15:16:17 >>> 2017 (r326658) >>> @@ -529,7 +529,7 @@ build_dp(const char *efimedia, const char *relpath, ef >>> { >>> char *fp, *dptxt = NULL; >>> int rv = 0; >>> - efidp out; >>> + efidp out = NULL; >>> size_t len; >>> >>> fp = path_to_file_dp(relpath); >>> >> >> This is a worse style of initializations in declararations than usual. >> 1 initialization in a non-declaration is mixed with many initializations >> in declarations, using the C99 misfeature of allowing initialiations >> after statements, without even any blank lines to keep the declarations >> separate. > > This matches the current style of the file though... The rest of the file, and other libefivar files with 1-tab indentation, are not very far from KNF. Some even have a blank line after null declarations. This file even has parentheses around return values in most places. >> Most libefivar code is much uglier than this, with 2-space indentation >> and worse. > > The code you are complaining about is vendor code.... The 2-space > indentation is the least of the issues with that code.... If it were in the vendor tree, then I could not-see it more easily. Bruce From owner-svn-src-head@freebsd.org Fri Dec 8 03:36:14 2017 Return-Path: Delivered-To: svn-src-head@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 7FD96E98A25; Fri, 8 Dec 2017 03:36:14 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) (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 4161B2485; Fri, 8 Dec 2017 03:36:14 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-qt0-x242.google.com with SMTP id g10so23032648qtj.12; Thu, 07 Dec 2017 19:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=J3u9L4szEMvpuknnZIgRFTh8I5ZbKjT7glWofFFql28=; b=FYVfqVYg9vex7OPREBkuwHs118uRxZ+zh6WJLoABqHrAAKyaFDRGvYckQUkN5Z+d2y kX6fTXLY+dNXJlDPqI1oG/96uwIRGc0pCIFsdrnd7Be7Jw1D7abzFuHmamOQLqo2nLRr C3r+FKC3wYrJGknvp1ZheB/Q6ia1QhepXL2Gb/+GEejKmSx8shZXkCjnM3TLt+16h+Sg FzxGQflHSBipz+v8OQlVJiLeU39Rh8jhYu6k3KQus2cAbuzIqYGsEqI5zEpT/1+ubekv BQB+es+fPUWn/+fIdo6sz6IbxNj8gcXogFgl7bqMnwwUfTH+cJm//OiiiUS4XrFpy8aj C8cA== 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:cc; bh=J3u9L4szEMvpuknnZIgRFTh8I5ZbKjT7glWofFFql28=; b=Teb7B/VSYxxUrOZzt22/wWfIrCGk/91EE3kcD00CeSSYiTJyOl8lvf/qqv/RuXWm61 eTj7foXWoGYKrWbf4LTKLIKTGzeRuhJzGYXXfeseoB5vTjRS4IiHMBoWR4i7SmZI29CY tPFmTRZRQzG2H0NlGDAHoS3Q7YqBze2OWgSa39tQ6yTOw3VSrtPBAr3cq6xzBgPRdNGY DjClbXauB+z+ylSQRw8cvQIu+V5S/vA2FjWT2RP1cUlXSHmQyxCDgW3r2bfJpt7Cdsso 9YGF/yd0moyYhUfVCtkurxErWKgD/xgR3nifmBX5yPeDwN5He1sSGfVu7Qq765PKfwDt kFow== X-Gm-Message-State: AKGB3mIFygv7O1IoOr0u3Bur01uDStDRr6zK6GOONQhLlCrmjE0mwm1t 3rBYb16YskmkAu1AEKMqVUQrt1GlHXthi8yOnA== X-Google-Smtp-Source: AGs4zMac39dWD9ZGb29pVL5wqxy6o+s/+axz/5XGiHIDeCPux1Mb10QNqbwSCM0XD/KPbjxArni7X5EAI9Xy2Xyyogo= X-Received: by 10.55.6.133 with SMTP id 127mr32379714qkg.219.1512704173049; Thu, 07 Dec 2017 19:36:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.38.200 with HTTP; Thu, 7 Dec 2017 19:36:12 -0800 (PST) In-Reply-To: References: <201711300140.vAU1e7dC001292@repo.freebsd.org> <20171207100345.GA59559@FreeBSD.org> From: Sepherosa Ziehau Date: Fri, 8 Dec 2017 11:36:12 +0800 Message-ID: Subject: Re: svn commit: r326383 - head/sys/x86/cpufreq To: Andriy Gapon Cc: Alexey Dokuchaev , Jung-uk Kim , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , cem@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 03:36:14 -0000 On Fri, Dec 8, 2017 at 6:23 AM, Andriy Gapon wrote: > On 07/12/2017 12:03, Alexey Dokuchaev wrote: >> On Thu, Nov 30, 2017 at 03:08:49PM -0500, Jung-uk Kim wrote: >>> ... >>> Probably. However, I am just trying to fix my FX-8350 and A10-6800 and >>> I don't have Zen processors to verify the MSRs are actually working on >>> those CPUs. >> >> Ah, that's so lovely, thanks Jung-uk; I feel that our support for AMD >> fam. 15h CPUs is lacking. E.g. only four P-states are reported for my >> A8-5550M, while it supports boosted P-states per BKDG, and reading MSRs >> directly via `sysutils/amdmsrtweaker' reports eight of them (P0 .. P7), >> with three turbo P-states P0 P1 P2. >> >> Since you have A10-6800 you might try to reproduce what I see here with >> A8-5550M. > > I think that the boosted states are supposed to be hidden from the OS. > It may be possible to query them though hardware specific registers, but they > can not be set by software directly anyway. For most of the modern Intel CPUs, boosted state is _not_ hidden from OS, it normally shows as max_freq+1, e.g. if max_freq is 3400, then the boosted state will have freq 3401. > My impression is that the proper way to observe the boost states is via APERF / > MPERF MSRs. They are useful for other things, e.g. C0 residency, too. Yeah, that's the only way to observe the current frequency of the cpu; on most of the modern Intel CPUs, P-state just sets the frequency upper limit. Thanks, sephe From owner-svn-src-head@freebsd.org Fri Dec 8 03:49:54 2017 Return-Path: Delivered-To: svn-src-head@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 B79DBE98CF3; Fri, 8 Dec 2017 03:49:54 +0000 (UTC) (envelope-from jhibbits@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 81C3F2974; Fri, 8 Dec 2017 03:49:54 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB83nrY7089327; Fri, 8 Dec 2017 03:49:53 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB83nrdx089326; Fri, 8 Dec 2017 03:49:53 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201712080349.vB83nrdx089326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 8 Dec 2017 03:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326675 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 326675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 03:49:54 -0000 Author: jhibbits Date: Fri Dec 8 03:49:53 2017 New Revision: 326675 URL: https://svnweb.freebsd.org/changeset/base/326675 Log: Remove PTE VA mappings for tracked pages in 64-bit mode This was done in 32-bit mode, but not duplicated when 64-bit mode was brought in. Without this, stale mappings can be left, leading to odd crashes when the wrong VA is checked in XX_PhysToVirt() (dpaa(4)). Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Fri Dec 8 00:57:13 2017 (r326674) +++ head/sys/powerpc/booke/pmap.c Fri Dec 8 03:49:53 2017 (r326675) @@ -1291,6 +1291,10 @@ pte_remove(mmu_t mmu, pmap_t pmap, vm_offset_t va, u_i /* Remove pv_entry from pv_list. */ pv_remove(pmap, va, m); + } else if (m->md.pv_tracked) { + pv_remove(pmap, va, m); + if (TAILQ_EMPTY(&m->md.pv_list)) + m->md.pv_tracked = false; } mtx_lock_spin(&tlbivax_mutex); tlb_miss_lock(); From owner-svn-src-head@freebsd.org Fri Dec 8 10:05:25 2017 Return-Path: Delivered-To: svn-src-head@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 2F3BAE9FF48; Fri, 8 Dec 2017 10:05:25 +0000 (UTC) (envelope-from andrew@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 ED6ED6BB55; Fri, 8 Dec 2017 10:05:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8A5OpU047235; Fri, 8 Dec 2017 10:05:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8A5OV7047234; Fri, 8 Dec 2017 10:05:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201712081005.vB8A5OV7047234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 8 Dec 2017 10:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326683 - head/sys/dev/uart X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/dev/uart X-SVN-Commit-Revision: 326683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 10:05:25 -0000 Author: andrew Date: Fri Dec 8 10:05:23 2017 New Revision: 326683 URL: https://svnweb.freebsd.org/changeset/base/326683 Log: Set the io width when using an ACPI uart. Previously it would only ever be set when finding the uart from the device tree. Sponsored by: DARPA, AFRL Modified: head/sys/dev/uart/uart_cpu_arm64.c Modified: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_arm64.c Fri Dec 8 08:16:36 2017 (r326682) +++ head/sys/dev/uart/uart_cpu_arm64.c Fri Dec 8 10:05:23 2017 (r326683) @@ -100,7 +100,8 @@ uart_cpu_acpi_scan(uint8_t interface_type) static int uart_cpu_acpi_probe(struct uart_class **classp, bus_space_tag_t *bst, - bus_space_handle_t *bsh, int *baud, u_int *rclk, u_int *shiftp) + bus_space_handle_t *bsh, int *baud, u_int *rclk, u_int *shiftp, + u_int *iowidthp) { struct acpi_uart_compat_data *cd; ACPI_TABLE_SPCR *spcr; @@ -142,6 +143,7 @@ uart_cpu_acpi_probe(struct uart_class **classp, bus_sp *classp = cd->clas; *rclk = 0; *shiftp = 2; + *iowidthp = spcr->SerialPort.BitWidth / 8; out: acpi_unmap_table(spcr); @@ -169,7 +171,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) err = ENXIO; #ifdef DEV_ACPI - err = uart_cpu_acpi_probe(&class, &bst, &bsh, &br, &rclk, &shift); + err = uart_cpu_acpi_probe(&class, &bst, &bsh, &br, &rclk, &shift, + &iowidth); #endif #ifdef FDT if (err != 0) { From owner-svn-src-head@freebsd.org Fri Dec 8 15:41:01 2017 Return-Path: Delivered-To: svn-src-head@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 566CBE86A05; Fri, 8 Dec 2017 15:41:01 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33518770F4; Fri, 8 Dec 2017 15:41:01 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 77E5318036; Fri, 8 Dec 2017 15:41:00 +0000 (UTC) Date: Fri, 8 Dec 2017 15:41:00 +0000 From: Alexey Dokuchaev To: Jung-uk Kim Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r326383 - head/sys/x86/cpufreq Message-ID: <20171208154100.GA5624@FreeBSD.org> References: <201711300140.vAU1e7dC001292@repo.freebsd.org> <20171207100345.GA59559@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 15:41:01 -0000 On Thu, Dec 07, 2017 at 01:26:48PM -0500, Jung-uk Kim wrote: > On 12/07/2017 05:03, Alexey Dokuchaev wrote: > > On Thu, Nov 30, 2017 at 03:08:49PM -0500, Jung-uk Kim wrote: > >> ... > >> Probably. However, I am just trying to fix my FX-8350 and A10-6800 and > >> I don't have Zen processors to verify the MSRs are actually working on > >> those CPUs. > > > > Ah, that's so lovely, thanks Jung-uk; I feel that our support for AMD > > fam. 15h CPUs is lacking. E.g. only four P-states are reported for my > > A8-5550M, while it supports boosted P-states per BKDG, and reading MSRs > > directly via `sysutils/amdmsrtweaker' reports eight of them (P0 .. P7), > > with three turbo P-states P0 P1 P2. > > You don't trust your BIOS? ;-) Well, I kind of do, with a grain of salt. BIOSes (or shall I say, their CPU support packages) are often poorly written or being too conservative, in order to simplify vendors' job making sure they work across all CPUs. I also like to undervolt them; I'm doing this now with my Pentium M 780 CPU via patched DSDT. I hope that I could do the same for A8-5550M, and with having more P-states than currently provided via stock DSDT for a more fine-grained control. > Unless SSDT is unavailable or broken, we should use ACPI tables first. I know that's correct and recommended procedure; in fact, under Ubuntu, available frequency steps are: 2.10 GHz, 1.90 GHz, 1.70 GHz, 1.40 GHz; also just four (with driver: acpi-cpufreq). I'd have to boot into Win7 to see if it's doing more than that. ./danfe From owner-svn-src-head@freebsd.org Fri Dec 8 15:57:40 2017 Return-Path: Delivered-To: svn-src-head@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 90509E8709C; Fri, 8 Dec 2017 15:57:40 +0000 (UTC) (envelope-from pfg@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 0984477CB2; Fri, 8 Dec 2017 15:57:39 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8Fvd4R093184; Fri, 8 Dec 2017 15:57:39 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8FvTrG093085; Fri, 8 Dec 2017 15:57:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201712081557.vB8FvTrG093085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 8 Dec 2017 15:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326695 - in head: include include/arpa lib/libc/include/isc lib/libc/inet lib/libc/nameser lib/libc/resolv sys/dev/ath/ath_hal sys/dev/ath/ath_hal/ah_regdomain sys/dev/ath/ath_hal/ar52... X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: in head: include include/arpa lib/libc/include/isc lib/libc/inet lib/libc/nameser lib/libc/resolv sys/dev/ath/ath_hal sys/dev/ath/ath_hal/ah_regdomain sys/dev/ath/ath_hal/ar5210 sys/dev/ath/ath_hal/ar... X-SVN-Commit-Revision: 326695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 15:57:40 -0000 Author: pfg Date: Fri Dec 8 15:57:29 2017 New Revision: 326695 URL: https://svnweb.freebsd.org/changeset/base/326695 Log: SPDX: license IDs for some ISC-related files. Modified: head/include/arpa/inet.h head/include/arpa/nameser.h head/include/ftw.h head/include/hesiod.h head/include/netdb.h head/include/readpassphrase.h head/include/res_update.h head/include/resolv.h head/include/unwind.h head/include/wchar.h head/lib/libc/include/isc/eventlib.h head/lib/libc/include/isc/list.h head/lib/libc/include/isc/platform.h head/lib/libc/inet/inet_addr.c head/lib/libc/inet/inet_cidr_ntop.c head/lib/libc/inet/inet_cidr_pton.c head/lib/libc/inet/inet_net_ntop.c head/lib/libc/inet/inet_net_pton.c head/lib/libc/inet/inet_neta.c head/lib/libc/inet/inet_ntop.c head/lib/libc/inet/inet_pton.c head/lib/libc/inet/nsap_addr.c head/lib/libc/nameser/ns_name.c head/lib/libc/nameser/ns_netint.c head/lib/libc/nameser/ns_parse.c head/lib/libc/nameser/ns_print.c head/lib/libc/nameser/ns_samedomain.c head/lib/libc/nameser/ns_ttl.c head/lib/libc/resolv/herror.c head/lib/libc/resolv/res_comp.c head/lib/libc/resolv/res_data.c head/lib/libc/resolv/res_debug.c head/lib/libc/resolv/res_debug.h head/lib/libc/resolv/res_findzonecut.c head/lib/libc/resolv/res_init.c head/lib/libc/resolv/res_mkquery.c head/lib/libc/resolv/res_mkupdate.c head/lib/libc/resolv/res_query.c head/lib/libc/resolv/res_send.c head/lib/libc/resolv/res_update.c head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_btcoex.h head/sys/dev/ath/ath_hal/ah_debug.h head/sys/dev/ath/ath_hal/ah_decode.h head/sys/dev/ath/ath_hal/ah_desc.h head/sys/dev/ath/ath_hal/ah_devid.h head/sys/dev/ath/ath_hal/ah_diagcodes.h head/sys/dev/ath/ath_hal/ah_eeprom.h head/sys/dev/ath/ath_hal/ah_eeprom_9287.c head/sys/dev/ath/ath_hal/ah_eeprom_9287.h head/sys/dev/ath/ath_hal/ah_eeprom_v1.c head/sys/dev/ath/ath_hal/ah_eeprom_v1.h head/sys/dev/ath/ath_hal/ah_eeprom_v14.c head/sys/dev/ath/ath_hal/ah_eeprom_v14.h head/sys/dev/ath/ath_hal/ah_eeprom_v3.c head/sys/dev/ath/ath_hal/ah_eeprom_v3.h head/sys/dev/ath/ath_hal/ah_eeprom_v4k.c head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ah_regdomain.c head/sys/dev/ath/ath_hal/ah_regdomain.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_ctry.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regenum.h head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h head/sys/dev/ath/ath_hal/ah_soc.h head/sys/dev/ath/ath_hal/ar5210/ar5210.h head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c head/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c head/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c head/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c head/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h head/sys/dev/ath/ath_hal/ar5210/ar5210phy.h head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h head/sys/dev/ath/ath_hal/ar5211/ar5211.h head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c head/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c head/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c head/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c head/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c head/sys/dev/ath/ath_hal/ar5211/ar5211_power.c head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c head/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c head/sys/dev/ath/ath_hal/ar5211/ar5211desc.h head/sys/dev/ath/ath_hal/ar5211/ar5211phy.h head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h head/sys/dev/ath/ath_hal/ar5212/ar2316.c head/sys/dev/ath/ath_hal/ar5212/ar2317.c head/sys/dev/ath/ath_hal/ar5212/ar2413.c head/sys/dev/ath/ath_hal/ar5212/ar2425.c head/sys/dev/ath/ath_hal/ar5212/ar5111.c head/sys/dev/ath/ath_hal/ar5212/ar5112.c head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c head/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c head/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c head/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c head/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c head/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c head/sys/dev/ath/ath_hal/ar5212/ar5212desc.h head/sys/dev/ath/ath_hal/ar5212/ar5212phy.h head/sys/dev/ath/ath_hal/ar5212/ar5212reg.h head/sys/dev/ath/ath_hal/ar5212/ar5311reg.h head/sys/dev/ath/ath_hal/ar5212/ar5413.c head/sys/dev/ath/ath_hal/ar5312/ar5312.h head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c head/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c head/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c head/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c head/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c head/sys/dev/ath/ath_hal/ar5312/ar5312_power.c head/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c head/sys/dev/ath/ath_hal/ar5312/ar5312phy.h head/sys/dev/ath/ath_hal/ar5312/ar5312reg.h head/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c head/sys/dev/ath/ath_hal/ar5416/ar2133.c head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.h head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c head/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c head/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c head/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c head/sys/dev/ath/ath_hal/ar5416/ar5416_radar.c head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.c head/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.h head/sys/dev/ath/ath_hal/ar9001/ar9130_phy.c head/sys/dev/ath/ath_hal/ar9001/ar9130_phy.h head/sys/dev/ath/ath_hal/ar9001/ar9130reg.h head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280.c head/sys/dev/ath/ath_hal/ar9002/ar9280.h head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285.c head/sys/dev/ath/ath_hal/ar9002/ar9285.h head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c head/sys/dev/ath/ath_hal/ar9002/ar9285an.h head/sys/dev/ath/ath_hal/ar9002/ar9287.c head/sys/dev/ath/ath_hal/ar9002/ar9287.h head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.h head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.h head/sys/dev/ath/ath_hal/ar9002/ar9287an.h head/sys/dev/ath/ath_hal/ar9002/ar9287phy.h head/sys/dev/ath/ath_hal/ar9003/ar9300_btcoex.h head/sys/dev/bhnd/bcma/bcma.c head/sys/dev/bhnd/bcma/bcma.h head/sys/dev/bhnd/bcma/bcma_bhndb.c head/sys/dev/bhnd/bcma/bcma_dmp.h head/sys/dev/bhnd/bcma/bcma_erom.c head/sys/dev/bhnd/bcma/bcma_eromreg.h head/sys/dev/bhnd/bcma/bcma_eromvar.h head/sys/dev/bhnd/bcma/bcma_subr.c head/sys/dev/bhnd/bcma/bcmavar.h head/sys/dev/bhnd/bhnd.c head/sys/dev/bhnd/bhnd.h head/sys/dev/bhnd/bhnd_debug.h head/sys/dev/bhnd/bhnd_erom.c head/sys/dev/bhnd/bhnd_erom.h head/sys/dev/bhnd/bhnd_erom_types.h head/sys/dev/bhnd/bhnd_eromvar.h head/sys/dev/bhnd/bhnd_ids.h head/sys/dev/bhnd/bhnd_match.h head/sys/dev/bhnd/bhnd_private.h head/sys/dev/bhnd/bhnd_subr.c head/sys/dev/bhnd/bhnd_types.h head/sys/dev/bhnd/bhndreg.h head/sys/dev/bhnd/bhndvar.h head/sys/dev/bhnd/cores/chipc/bhnd_pmu_chipc.c head/sys/dev/bhnd/cores/chipc/bhnd_sprom_chipc.c head/sys/dev/bhnd/cores/chipc/chipc.c head/sys/dev/bhnd/cores/chipc/chipc.h head/sys/dev/bhnd/cores/chipc/chipc_cfi.c head/sys/dev/bhnd/cores/chipc/chipc_gpio.c head/sys/dev/bhnd/cores/chipc/chipc_gpiovar.h head/sys/dev/bhnd/cores/chipc/chipc_private.h head/sys/dev/bhnd/cores/chipc/chipc_slicer.c head/sys/dev/bhnd/cores/chipc/chipc_slicer.h head/sys/dev/bhnd/cores/chipc/chipc_spi.c head/sys/dev/bhnd/cores/chipc/chipc_spi.h head/sys/dev/bhnd/cores/chipc/chipc_subr.c head/sys/dev/bhnd/cores/chipc/chipcreg.h head/sys/dev/bhnd/cores/chipc/chipcvar.h head/sys/dev/bhnd/cores/pci/bhnd_pci.c head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c head/sys/dev/bhnd/cores/pci/bhnd_pci_hostbvar.h head/sys/dev/bhnd/cores/pci/bhnd_pcib.c head/sys/dev/bhnd/cores/pci/bhnd_pcibvar.h head/sys/dev/bhnd/cores/pci/bhnd_pcireg.h head/sys/dev/bhnd/cores/pci/bhnd_pcivar.h head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostbvar.h head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_reg.h head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_var.h head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2b.c head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2b_var.h head/sys/dev/bhnd/cores/pmu/bhnd_pmu.c head/sys/dev/bhnd/cores/pmu/bhnd_pmu.h head/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c head/sys/dev/bhnd/cores/pmu/bhnd_pmu_private.h head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c head/sys/dev/bhnd/cores/pmu/bhnd_pmu_types.h head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h head/sys/dev/bhnd/cores/pmu/bhnd_pmuvar.h head/sys/dev/bhnd/cores/usb/bhnd_ehci.c head/sys/dev/bhnd/cores/usb/bhnd_ohci.c head/sys/dev/bhnd/cores/usb/bhnd_usb.c head/sys/dev/bhnd/cores/usb/bhnd_usbvar.h head/sys/netpfil/pf/if_pflog.c head/sys/netpfil/pf/in4_cksum.c head/sys/netpfil/pf/pf.h head/sys/netpfil/pf/pf_osfp.c head/usr.bin/sdiotool/brcmfmac_bus.h head/usr.bin/sdiotool/brcmfmac_sdio.h head/usr.bin/sdiotool/cam_sdio.h head/usr.bin/sdiotool/linux_compat.h head/usr.bin/sdiotool/linux_sdio_compat.h Modified: head/include/arpa/inet.h ============================================================================== --- head/include/arpa/inet.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/arpa/inet.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: (BSD-3-Clause AND ISC) * * ++Copyright++ 1983, 1993 * - Modified: head/include/arpa/nameser.h ============================================================================== --- head/include/arpa/nameser.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/arpa/nameser.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: (ISC AND BSD-3-Clause) + * * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1996-2003 Internet Software Consortium. * @@ -16,8 +18,6 @@ */ /*- - * SPDX-License-Identifier: BSD-3-Clause - * * Copyright (c) 1983, 1989, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/include/ftw.h ============================================================================== --- head/include/ftw.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/ftw.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,6 +1,8 @@ /* $OpenBSD: ftw.h,v 1.1 2003/07/21 21:13:18 millert Exp $ */ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2003 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any Modified: head/include/hesiod.h ============================================================================== --- head/include/hesiod.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/hesiod.h Fri Dec 8 15:57:29 2017 (r326695) @@ -3,7 +3,7 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * SPDX-License-Identifier: (BSD-2-Clause-NetBSD AND ISC) * * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. * All rights reserved. Modified: head/include/netdb.h ============================================================================== --- head/include/netdb.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/netdb.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: (BSD-3-Clause AND ISC) * * Copyright (c) 1980, 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. Modified: head/include/readpassphrase.h ============================================================================== --- head/include/readpassphrase.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/readpassphrase.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,7 +1,9 @@ /* $OpenBSD: readpassphrase.h,v 1.5 2003/06/17 21:56:23 millert Exp $ */ /* $FreeBSD$ */ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2000, 2002 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any Modified: head/include/res_update.h ============================================================================== --- head/include/res_update.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/res_update.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1999 by Internet Software Consortium, Inc. * Modified: head/include/resolv.h ============================================================================== --- head/include/resolv.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/resolv.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: (ISC AND BSD-3-Clause) * * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1995-2003 Internet Software Consortium. Modified: head/include/unwind.h ============================================================================== --- head/include/unwind.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/unwind.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,6 +1,10 @@ /* $FreeBSD$ */ -/* libunwind - a platform-independent unwind library +/*- + libunwind - a platform-independent unwind library + + SPDX-License-Identifier: ISC + Copyright (C) 2003 Hewlett-Packard Co Contributed by David Mosberger-Tang Modified: head/include/wchar.h ============================================================================== --- head/include/wchar.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/include/wchar.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause + * SPDX-License-Identifier: (BSD-2-Clause AND BSD-2-Clause-NetBSD) * * Copyright (c)1999 Citrus Project, * All rights reserved. Modified: head/lib/libc/include/isc/eventlib.h ============================================================================== --- head/lib/libc/include/isc/eventlib.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/include/isc/eventlib.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1995-1999, 2001, 2003 Internet Software Consortium. * Modified: head/lib/libc/include/isc/list.h ============================================================================== --- head/lib/libc/include/isc/list.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/include/isc/list.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1997,1999 by Internet Software Consortium. * Modified: head/lib/libc/include/isc/platform.h ============================================================================== --- head/lib/libc/include/isc/platform.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/include/isc/platform.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any Modified: head/lib/libc/inet/inet_addr.c ============================================================================== --- head/lib/libc/inet/inet_addr.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/inet/inet_addr.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: (BSD-3-Clause AND ISC) * * Copyright (c) 1983, 1990, 1993 * The Regents of the University of California. All rights reserved. Modified: head/lib/libc/inet/inet_cidr_ntop.c ============================================================================== --- head/lib/libc/inet/inet_cidr_ntop.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/inet/inet_cidr_ntop.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1998,1999 by Internet Software Consortium. * Modified: head/lib/libc/inet/inet_cidr_pton.c ============================================================================== --- head/lib/libc/inet/inet_cidr_pton.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/inet/inet_cidr_pton.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1998,1999 by Internet Software Consortium. * Modified: head/lib/libc/inet/inet_net_ntop.c ============================================================================== --- head/lib/libc/inet/inet_net_ntop.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/inet/inet_net_ntop.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996,1999 by Internet Software Consortium. * Modified: head/lib/libc/inet/inet_net_pton.c ============================================================================== --- head/lib/libc/inet/inet_net_pton.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/inet/inet_net_pton.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1996, 1998, 1999, 2001, 2003 Internet Software Consortium. * Modified: head/lib/libc/inet/inet_neta.c ============================================================================== --- head/lib/libc/inet/inet_neta.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/inet/inet_neta.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996,1999 by Internet Software Consortium. * Modified: head/lib/libc/inet/inet_ntop.c ============================================================================== --- head/lib/libc/inet/inet_ntop.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/inet/inet_ntop.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996-1999 by Internet Software Consortium. * Modified: head/lib/libc/inet/inet_pton.c ============================================================================== --- head/lib/libc/inet/inet_pton.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/inet/inet_pton.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996,1999 by Internet Software Consortium. * Modified: head/lib/libc/inet/nsap_addr.c ============================================================================== --- head/lib/libc/inet/nsap_addr.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/inet/nsap_addr.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996-1999 by Internet Software Consortium. * Modified: head/lib/libc/nameser/ns_name.c ============================================================================== --- head/lib/libc/nameser/ns_name.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/nameser/ns_name.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996,1999 by Internet Software Consortium. * Modified: head/lib/libc/nameser/ns_netint.c ============================================================================== --- head/lib/libc/nameser/ns_netint.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/nameser/ns_netint.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996,1999 by Internet Software Consortium. * Modified: head/lib/libc/nameser/ns_parse.c ============================================================================== --- head/lib/libc/nameser/ns_parse.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/nameser/ns_parse.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996,1999 by Internet Software Consortium. * Modified: head/lib/libc/nameser/ns_print.c ============================================================================== --- head/lib/libc/nameser/ns_print.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/nameser/ns_print.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996-1999 by Internet Software Consortium. * Modified: head/lib/libc/nameser/ns_samedomain.c ============================================================================== --- head/lib/libc/nameser/ns_samedomain.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/nameser/ns_samedomain.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995,1999 by Internet Software Consortium. * Modified: head/lib/libc/nameser/ns_ttl.c ============================================================================== --- head/lib/libc/nameser/ns_ttl.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/nameser/ns_ttl.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996,1999 by Internet Software Consortium. * Modified: head/lib/libc/resolv/herror.c ============================================================================== --- head/lib/libc/resolv/herror.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/herror.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: (BSD-3-Clause AND ISC) * * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. Modified: head/lib/libc/resolv/res_comp.c ============================================================================== --- head/lib/libc/resolv/res_comp.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_comp.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: (BSD-3-Clause AND ISC) * * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. Modified: head/lib/libc/resolv/res_data.c ============================================================================== --- head/lib/libc/resolv/res_data.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_data.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-1999 by Internet Software Consortium. * Modified: head/lib/libc/resolv/res_debug.c ============================================================================== --- head/lib/libc/resolv/res_debug.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_debug.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: (ISC AND BSD-3-Clause) + * * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1996-2003 Internet Software Consortium. * @@ -16,8 +18,6 @@ */ /*- - * SPDX-License-Identifier: BSD-3-Clause - * * Copyright (c) 1985 * The Regents of the University of California. All rights reserved. * Modified: head/lib/libc/resolv/res_debug.h ============================================================================== --- head/lib/libc/resolv/res_debug.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_debug.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1999 by Internet Software Consortium. * @@ -13,6 +15,8 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ */ #ifndef _RES_DEBUG_H_ Modified: head/lib/libc/resolv/res_findzonecut.c ============================================================================== --- head/lib/libc/resolv/res_findzonecut.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_findzonecut.c Fri Dec 8 15:57:29 2017 (r326695) @@ -2,7 +2,9 @@ static const char rcsid[] = "$Id: res_findzonecut.c,v 1.10 2005/10/11 00:10:16 marka Exp $"; #endif /* not lint */ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1999 by Internet Software Consortium. * Modified: head/lib/libc/resolv/res_init.c ============================================================================== --- head/lib/libc/resolv/res_init.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_init.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: (BSD-3-Clause AND ISC) * * Copyright (c) 1985, 1989, 1993 * The Regents of the University of California. All rights reserved. Modified: head/lib/libc/resolv/res_mkquery.c ============================================================================== --- head/lib/libc/resolv/res_mkquery.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_mkquery.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: (ISC AND BSD-3-Clause) + * * Portions Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1996, 1997, 1988, 1999, 2001, 2003 Internet Software Consortium. * @@ -16,8 +18,6 @@ */ /*- - * SPDX-License-Identifier: BSD-3-Clause - * * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/lib/libc/resolv/res_mkupdate.c ============================================================================== --- head/lib/libc/resolv/res_mkupdate.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_mkupdate.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996-1999 by Internet Software Consortium. * Modified: head/lib/libc/resolv/res_query.c ============================================================================== --- head/lib/libc/resolv/res_query.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_query.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: (ISC AND BSD-3-Clause) * * Portions Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1996-2001, 2003 Internet Software Consortium. Modified: head/lib/libc/resolv/res_send.c ============================================================================== --- head/lib/libc/resolv/res_send.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_send.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: (ISC AND BSD-3-Clause) * * Portions Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1996-2003 Internet Software Consortium. Modified: head/lib/libc/resolv/res_update.c ============================================================================== --- head/lib/libc/resolv/res_update.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/lib/libc/resolv/res_update.c Fri Dec 8 15:57:29 2017 (r326695) @@ -2,7 +2,9 @@ static const char rcsid[] = "$Id: res_update.c,v 1.13 2005/04/27 04:56:43 sra Exp $"; #endif /* not lint */ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996-1999 by Internet Software Consortium. * Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_btcoex.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_btcoex.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_btcoex.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2014 Qualcomm Atheros, Inc. * All Rights Reserved. * Modified: head/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_debug.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_debug.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2008 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_decode.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_decode.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_decode.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_desc.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_desc.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_devid.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_devid.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_devid.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_diagcodes.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_diagcodes.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_diagcodes.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_eeprom.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_eeprom_9287.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_9287.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_9287.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2008 Sam Leffler, Errno Consulting * Copyright (c) 2010 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_eeprom_9287.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_9287.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_9287.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2008-2009 Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v1.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v1.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v1.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2008 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v1.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v1.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v1.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v14.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v14.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2008 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2008 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v3.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v3.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v3.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v3.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v3.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v3.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v4k.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v4k.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v4k.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2009 Rui Paulo * Copyright (c) 2008 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2009 Rui Paulo * Copyright (c) 2008 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_internal.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_regdomain.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2005-2006 Atheros Communications, Inc. * All rights reserved. Modified: head/sys/dev/ath/ath_hal/ah_regdomain.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_regdomain.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2005-2006 Atheros Communications, Inc. * All rights reserved. Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_ctry.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_ctry.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_ctry.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2005-2011 Atheros Communications, Inc. * All rights reserved. Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2005-2006 Atheros Communications, Inc. * All rights reserved. Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2005-2006 Atheros Communications, Inc. * All rights reserved. Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regenum.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regenum.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regenum.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2005-2011 Atheros Communications, Inc. * All rights reserved. Modified: head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2005-2006 Atheros Communications, Inc. * All rights reserved. Modified: head/sys/dev/ath/ath_hal/ah_soc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_soc.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ah_soc.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_power.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Fri Dec 8 15:37:36 2017 (r326694) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Fri Dec 8 15:57:29 2017 (r326695) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Dec 8 17:15:22 2017 Return-Path: Delivered-To: svn-src-head@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 57FA9E88F7A; Fri, 8 Dec 2017 17:15:22 +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 21ECB7AE18; Fri, 8 Dec 2017 17:15:22 +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 vB8HFL2X026246; Fri, 8 Dec 2017 17:15:21 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8HFLDo026245; Fri, 8 Dec 2017 17:15:21 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201712081715.vB8HFLDo026245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 8 Dec 2017 17:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326698 - head/usr.bin/at X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/usr.bin/at X-SVN-Commit-Revision: 326698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 17:15:22 -0000 Author: asomers Date: Fri Dec 8 17:15:20 2017 New Revision: 326698 URL: https://svnweb.freebsd.org/changeset/base/326698 Log: at(1): annotate some intended switch-case fallthroughs Reported by: Coverity CID: 1008191 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.bin/at/parsetime.c Modified: head/usr.bin/at/parsetime.c ============================================================================== --- head/usr.bin/at/parsetime.c Fri Dec 8 16:25:05 2017 (r326697) +++ head/usr.bin/at/parsetime.c Fri Dec 8 17:15:20 2017 (r326698) @@ -617,6 +617,7 @@ parsetime(int argc, char **argv) } /* now is optional prefix for PLUS tree */ expect(PLUS); + /* FALLTHROUGH */ case PLUS: plus(&runtime); break; @@ -641,8 +642,10 @@ parsetime(int argc, char **argv) */ case TEATIME: hr += 4; + /* FALLTHROUGH */ case NOON: hr += 12; + /* FALLTHROUGH */ case MIDNIGHT: if (runtime.tm_hour >= hr) { runtime.tm_mday++; From owner-svn-src-head@freebsd.org Fri Dec 8 17:52:55 2017 Return-Path: Delivered-To: svn-src-head@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 5C5C8E89C8C; Fri, 8 Dec 2017 17:52:55 +0000 (UTC) (envelope-from pfg@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 20DFE7C5BE; Fri, 8 Dec 2017 17:52:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8Hqs08043371; Fri, 8 Dec 2017 17:52:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8Hqsqc043368; Fri, 8 Dec 2017 17:52:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201712081752.vB8Hqsqc043368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 8 Dec 2017 17:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326700 - head/lib/libc/isc X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/lib/libc/isc X-SVN-Commit-Revision: 326700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 17:52:55 -0000 Author: pfg Date: Fri Dec 8 17:52:53 2017 New Revision: 326700 URL: https://svnweb.freebsd.org/changeset/base/326700 Log: SPDX: more ISC-related files. Modified: head/lib/libc/isc/ev_streams.c head/lib/libc/isc/ev_timers.c head/lib/libc/isc/eventlib_p.h Modified: head/lib/libc/isc/ev_streams.c ============================================================================== --- head/lib/libc/isc/ev_streams.c Fri Dec 8 17:16:35 2017 (r326699) +++ head/lib/libc/isc/ev_streams.c Fri Dec 8 17:52:53 2017 (r326700) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996-1999 by Internet Software Consortium * Modified: head/lib/libc/isc/ev_timers.c ============================================================================== --- head/lib/libc/isc/ev_timers.c Fri Dec 8 17:16:35 2017 (r326699) +++ head/lib/libc/isc/ev_timers.c Fri Dec 8 17:52:53 2017 (r326700) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-1999 by Internet Software Consortium * Modified: head/lib/libc/isc/eventlib_p.h ============================================================================== --- head/lib/libc/isc/eventlib_p.h Fri Dec 8 17:16:35 2017 (r326699) +++ head/lib/libc/isc/eventlib_p.h Fri Dec 8 17:52:53 2017 (r326700) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: ISC + * * Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-1999 by Internet Software Consortium * From owner-svn-src-head@freebsd.org Fri Dec 8 18:43:32 2017 Return-Path: Delivered-To: svn-src-head@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 5CF7DE8B1F2; Fri, 8 Dec 2017 18:43:32 +0000 (UTC) (envelope-from shurd@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 27BBB7E65A; Fri, 8 Dec 2017 18:43:32 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8IhVn7064252; Fri, 8 Dec 2017 18:43:31 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8IhVdA064251; Fri, 8 Dec 2017 18:43:31 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201712081843.vB8IhVdA064251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Fri, 8 Dec 2017 18:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326702 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 326702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 18:43:32 -0000 Author: shurd Date: Fri Dec 8 18:43:31 2017 New Revision: 326702 URL: https://svnweb.freebsd.org/changeset/base/326702 Log: Handle read-only mbufs in iflib ether pad function If ethernet padding is enabled, and a read-only mbuf is passed, it would modify the mbuf using m_append(). Instead, call m_dup() and append to the new packet. Reported by: Pyun YongHyeon Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D13414 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Fri Dec 8 18:04:43 2017 (r326701) +++ head/sys/net/iflib.c Fri Dec 8 18:43:31 2017 (r326702) @@ -3112,7 +3112,7 @@ calc_next_txd(iflib_txq_t txq, int cidx, uint8_t qid) * min_frame_size is the frame size (less CRC) to pad the mbuf to */ static __noinline int -iflib_ether_pad(device_t dev, struct mbuf *m_head, uint16_t min_frame_size) +iflib_ether_pad(device_t dev, struct mbuf **m_head, uint16_t min_frame_size) { /* * 18 is enough bytes to pad an ARP packet to 46 bytes, and @@ -3120,14 +3120,25 @@ iflib_ether_pad(device_t dev, struct mbuf *m_head, uin */ static char pad[18]; /* just zeros */ int n; + struct mbuf *new_head; - for (n = min_frame_size - m_head->m_pkthdr.len; + if (!M_WRITABLE(*m_head)) { + new_head = m_dup(*m_head, M_NOWAIT); + if (new_head == NULL) { + device_printf(dev, "cannot pad short frame, m_dup() failed"); + return ENOMEM; + } + m_freem(*m_head); + *m_head = new_head; + } + + for (n = min_frame_size - (*m_head)->m_pkthdr.len; n > 0; n -= sizeof(pad)) - if (!m_append(m_head, min(n, sizeof(pad)), pad)) + if (!m_append(*m_head, min(n, sizeof(pad)), pad)) break; if (n > 0) { - m_freem(m_head); + m_freem(*m_head); device_printf(dev, "cannot pad short frame\n"); DBG_COUNTER_INC(encap_pad_mbuf_fail); return (ENOBUFS); @@ -3189,13 +3200,13 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) desc_tag = txq->ift_desc_tag; max_segs = scctx->isc_tx_nsegments; } - m_head = *m_headp; if ((sctx->isc_flags & IFLIB_NEED_ETHER_PAD) && __predict_false(m_head->m_pkthdr.len < scctx->isc_min_frame_size)) { - err = iflib_ether_pad(ctx->ifc_dev, m_head, scctx->isc_min_frame_size); + err = iflib_ether_pad(ctx->ifc_dev, m_headp, scctx->isc_min_frame_size); if (err) return err; } + m_head = *m_headp; pkt_info_zero(&pi); pi.ipi_mflags = (m_head->m_flags & (M_VLANTAG|M_BCAST|M_MCAST)); From owner-svn-src-head@freebsd.org Fri Dec 8 18:57:15 2017 Return-Path: Delivered-To: svn-src-head@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 B40EEE8B5C6; Fri, 8 Dec 2017 18:57:15 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-qt0-x22d.google.com (mail-qt0-x22d.google.com [IPv6:2607:f8b0:400d:c0d::22d]) (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 6F4117EDE3; Fri, 8 Dec 2017 18:57:15 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-qt0-x22d.google.com with SMTP id f2so28133949qtj.4; Fri, 08 Dec 2017 10:57:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Q4XBSWr5r9/0IrhJSVIgFrjcPqXFUDGhexxVUhf/Kbc=; b=tJvD4J7AhBRKHmqCXuWoCXmMwViI6PVT9V0AGNcD4oLa29+0c6BGSIQSzke1ub2AaU flfa1CaA2UGAcMAAwyKm9JaMpE2wHnDCGU0ZfSTtFIjDLOwfnsJ3vPxyHuVlHqQYB/jj NikBpx+3LPH/iuDdmR51k/ybpsfHJkQCWSJCQLYUxnuTw7ZMXYUwH556lNPW/llWkcWn 4WH7yrLOyunKTxcl0D5L2GnRK3yXcEYc95tpEZkT7V3TiYKWaANdpqjrnAuHjv71dxTA QDdNbflUGpL5Oj6PdHgA3ADXHVrOXc1F0sP95Jeh7U1KyGS3lUezsoaoU+CF3x94XFcr TLGg== 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:cc; bh=Q4XBSWr5r9/0IrhJSVIgFrjcPqXFUDGhexxVUhf/Kbc=; b=t5mqup+UBk5mMLQiT55twIPMUZvPMIi2Lh6RojLh07ZhIK9Sm2vgOTQ5hZ849PUz16 iU5HMSG5UskX9YXDuXuXmmNSPyiVnzi6uVvXi4HeNErnGqBi6k8RZC+x4ktWzhXwIZq6 9RT0CjPITiEbfDcw737QNtWU7Eu2/R7hEnB8e7amf9xdMVH+RxqK8u27Oh7brIWOiQJK J/t2IjbYdSHana3DvQaSlSAXiyCq3AbjMw2G1Y7GO0q0anWb8rtDlWC9CsY6uPbUL5Lh 5MNx1pmlMK0XJXFtOl/Is5rJZdyk7vQ+/cBGM2g/MznPi9dM22pjLPxz1VwTBfLme9zo Vymg== X-Gm-Message-State: AKGB3mKqLhxwTqRt7R5QWJDb/oTDXPqHeW3doOU68jPyhRS5UKDv7JxB 4WnQAfLne0YeAlAzjNAKoTmi7p4+QaknbNALTRg= X-Google-Smtp-Source: AGs4zMactPnUuVs8e26Hu5YqI9XuybwuRZ5hubAp2LF5/0b24hveItHA8Mo7Z1jQEeN2ynABEDq/BFuhAEo2iU+Jr2k= X-Received: by 10.200.50.39 with SMTP id x36mr18752306qta.255.1512759434277; Fri, 08 Dec 2017 10:57:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.39.211 with HTTP; Fri, 8 Dec 2017 10:57:13 -0800 (PST) In-Reply-To: <201712081843.vB8IhVdA064251@repo.freebsd.org> References: <201712081843.vB8IhVdA064251@repo.freebsd.org> From: Ryan Stone Date: Fri, 8 Dec 2017 13:57:13 -0500 Message-ID: Subject: Re: svn commit: r326702 - head/sys/net To: Stephen Hurd Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 18:57:15 -0000 On Fri, Dec 8, 2017 at 1:43 PM, Stephen Hurd wrote: > Author: shurd > Date: Fri Dec 8 18:43:31 2017 > New Revision: 326702 > URL: https://svnweb.freebsd.org/changeset/base/326702 > + if (!M_WRITABLE(*m_head)) { > + new_head = m_dup(*m_head, M_NOWAIT); > + if (new_head == NULL) { > + device_printf(dev, "cannot pad short frame, m_dup() failed"); > + return ENOMEM; Don't we leak *m_head here? As far as I can tell the caller doesn't deal with it. From owner-svn-src-head@freebsd.org Fri Dec 8 19:26:27 2017 Return-Path: Delivered-To: svn-src-head@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 42287E8BED9; Fri, 8 Dec 2017 19:26:27 +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 0BC3F7FF46; Fri, 8 Dec 2017 19:26:26 +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 vB8JQQfK081355; Fri, 8 Dec 2017 19:26:26 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8JQQYZ081354; Fri, 8 Dec 2017 19:26:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712081926.vB8JQQYZ081354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 8 Dec 2017 19:26:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326705 - head/cddl/usr.sbin/dtrace/tests/common/env X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/cddl/usr.sbin/dtrace/tests/common/env X-SVN-Commit-Revision: 326705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:26:27 -0000 Author: markj Date: Fri Dec 8 19:26:25 2017 New Revision: 326705 URL: https://svnweb.freebsd.org/changeset/base/326705 Log: Actually add the -x setenv test Makefile, missed in r326499. X-MFC with: r326499 Added: head/cddl/usr.sbin/dtrace/tests/common/env/ head/cddl/usr.sbin/dtrace/tests/common/env/Makefile (contents, props changed) Added: head/cddl/usr.sbin/dtrace/tests/common/env/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dtrace/tests/common/env/Makefile Fri Dec 8 19:26:25 2017 (r326705) @@ -0,0 +1,30 @@ +# $FreeBSD$ + +# +# This Makefile was generated by $srcdir/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh. +# + +PACKAGE= tests + +${PACKAGE}FILES= \ + err.D_PRAGMA_OPTSET.setfromscript.d \ + err.D_PRAGMA_OPTSET.unsetfromscript.d \ + tst.ld_nolazyload.ksh \ + tst.ld_nolazyload.ksh.out \ + tst.setenv1.ksh \ + tst.setenv1.ksh.out \ + tst.setenv2.ksh \ + tst.setenv2.ksh.out \ + tst.unsetenv1.ksh \ + tst.unsetenv1.ksh.out \ + tst.unsetenv2.ksh \ + tst.unsetenv2.ksh.out \ + +TESTEXES= \ + + +CFILES= \ + + + +.include "../../dtrace.test.mk" From owner-svn-src-head@freebsd.org Fri Dec 8 19:50:07 2017 Return-Path: Delivered-To: svn-src-head@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 7744AE8D4C8; Fri, 8 Dec 2017 19:50:07 +0000 (UTC) (envelope-from shurd@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 41626116B; Fri, 8 Dec 2017 19:50:07 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8Jo6aE090283; Fri, 8 Dec 2017 19:50:06 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8Jo67f090282; Fri, 8 Dec 2017 19:50:06 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201712081950.vB8Jo67f090282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Fri, 8 Dec 2017 19:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326706 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 326706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:50:07 -0000 Author: shurd Date: Fri Dec 8 19:50:06 2017 New Revision: 326706 URL: https://svnweb.freebsd.org/changeset/base/326706 Log: Free mbuf chain when m_dup fails Fix memory leak where mbuf chain wasn't free()d if iflib_ether_pad() has a failure in m_dup(). Reported by: "Ryan Stone" Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Fri Dec 8 19:26:25 2017 (r326705) +++ head/sys/net/iflib.c Fri Dec 8 19:50:06 2017 (r326706) @@ -3125,6 +3125,7 @@ iflib_ether_pad(device_t dev, struct mbuf **m_head, ui if (!M_WRITABLE(*m_head)) { new_head = m_dup(*m_head, M_NOWAIT); if (new_head == NULL) { + m_freem(*m_head); device_printf(dev, "cannot pad short frame, m_dup() failed"); return ENOMEM; } From owner-svn-src-head@freebsd.org Fri Dec 8 19:56:36 2017 Return-Path: Delivered-To: svn-src-head@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 9CF16E8D699; Fri, 8 Dec 2017 19:56:36 +0000 (UTC) (envelope-from imp@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 670561636; Fri, 8 Dec 2017 19:56:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8JuZNP094152; Fri, 8 Dec 2017 19:56:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8JuZiC094150; Fri, 8 Dec 2017 19:56:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712081956.vB8JuZiC094150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 19:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326707 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:56:36 -0000 Author: imp Date: Fri Dec 8 19:56:35 2017 New Revision: 326707 URL: https://svnweb.freebsd.org/changeset/base/326707 Log: Add partial support signal.h functioanlity. Pull in machine/signal.h to define sig_atomic_t. Sponsored by: Netflix Modified: head/stand/libsa/Makefile head/stand/libsa/stand.h Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Fri Dec 8 19:50:06 2017 (r326706) +++ head/stand/libsa/Makefile Fri Dec 8 19:56:35 2017 (r326707) @@ -111,7 +111,7 @@ beforedepend: for i in _time.h _strings.h _string.h; do \ [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ done; \ - for i in ctype.h fcntl.h stdio.h stdlib.h; do \ + for i in ctype.h fcntl.h signal.h stdio.h stdlib.h; do \ ln -sf ${SASRC}/stand.h $$i; \ done Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Fri Dec 8 19:50:06 2017 (r326706) +++ head/stand/libsa/stand.h Fri Dec 8 19:56:35 2017 (r326707) @@ -88,6 +88,9 @@ #define EOFFSET (ELAST+8) /* relative seek not supported */ #define ESALAST (ELAST+8) /* */ +/* Partial signal emulation for sig_atomic_t */ +#include + struct open_file; /* From owner-svn-src-head@freebsd.org Fri Dec 8 19:56:58 2017 Return-Path: Delivered-To: svn-src-head@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 B7BEEE8D6F4; Fri, 8 Dec 2017 19:56:58 +0000 (UTC) (envelope-from imp@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 82058178A; Fri, 8 Dec 2017 19:56:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8JuvXx094210; Fri, 8 Dec 2017 19:56:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8Juv92094209; Fri, 8 Dec 2017 19:56:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712081956.vB8Juv92094209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 19:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326708 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:56:58 -0000 Author: imp Date: Fri Dec 8 19:56:57 2017 New Revision: 326708 URL: https://svnweb.freebsd.org/changeset/base/326708 Log: Remove _KERNEL hack now that errno.h does the right thing when _STANDALONE is defined. Sponsored By: Netflix Modified: head/stand/libsa/stand.h Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Fri Dec 8 19:56:35 2017 (r326707) +++ head/stand/libsa/stand.h Fri Dec 8 19:56:57 2017 (r326708) @@ -72,10 +72,7 @@ #define CHK(fmt, args...) printf("%s(%d): " fmt "\n", __func__, __LINE__ , ##args) #define PCHK(fmt, args...) {printf("%s(%d): " fmt "\n", __func__, __LINE__ , ##args); getchar();} -/* Avoid unwanted userlandish components */ -#define _KERNEL #include -#undef _KERNEL /* special stand error codes */ #define EADAPT (ELAST+1) /* bad adaptor */ From owner-svn-src-head@freebsd.org Fri Dec 8 19:57:03 2017 Return-Path: Delivered-To: svn-src-head@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 5AE22E8D71F; Fri, 8 Dec 2017 19:57:03 +0000 (UTC) (envelope-from imp@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 250BB17B0; Fri, 8 Dec 2017 19:57:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8Jv2cO094268; Fri, 8 Dec 2017 19:57:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8Jv25m094267; Fri, 8 Dec 2017 19:57:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712081957.vB8Jv25m094267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 19:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326709 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:57:03 -0000 Author: imp Date: Fri Dec 8 19:57:02 2017 New Revision: 326709 URL: https://svnweb.freebsd.org/changeset/base/326709 Log: Provide implementations for iscntrl, ispunct and isgraph. Sponsored by: Netflix Modified: head/stand/libsa/stand.h Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Fri Dec 8 19:56:57 2017 (r326708) +++ head/stand/libsa/stand.h Fri Dec 8 19:57:02 2017 (r326709) @@ -235,6 +235,22 @@ static __inline int isalnum(int c) return isalpha(c) || isdigit(c); } +static __inline int iscntrl(int c) +{ + return (c >= 0 && c < ' ') || c == 127; +} + +static __inline int isgraph(int c) +{ + return c >= '!' && c <= '~'; +} + +static __inline int ispunct(int c) +{ + return (c >= '!' && c <= '/') || (c >= ':' && c <= '@') || + (c >= '[' && c <= '`') || (c >= '{' && c <= '~'); +} + static __inline int toupper(int c) { return islower(c) ? c - 'a' + 'A' : c; From owner-svn-src-head@freebsd.org Fri Dec 8 19:57:10 2017 Return-Path: Delivered-To: svn-src-head@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 E0558E8D75A; Fri, 8 Dec 2017 19:57:09 +0000 (UTC) (envelope-from imp@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 6CA26188C; Fri, 8 Dec 2017 19:57:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8Jv69Q094321; Fri, 8 Dec 2017 19:57:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8Jv62p094320; Fri, 8 Dec 2017 19:57:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712081957.vB8Jv62p094320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 19:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326710 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:57:10 -0000 Author: imp Date: Fri Dec 8 19:57:06 2017 New Revision: 326710 URL: https://svnweb.freebsd.org/changeset/base/326710 Log: Put the files we're copying over into a few variables and add them to CLEANDIRS and CLEANFILES so make clean removes any divots. Sponsored by: Netflix Modified: head/stand/libsa/Makefile Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Fri Dec 8 19:57:02 2017 (r326709) +++ head/stand/libsa/Makefile Fri Dec 8 19:57:06 2017 (r326710) @@ -97,10 +97,15 @@ SRCS+= infback.c inffast.c inflate.c inftrees.c zutil. # Create a subset of includes that are safe, as well as adjusting those that aren't # The lists may drive people nuts, but they are explicitly opt-in +FAKE_DIRS=xlocale arpa +SAFE_INCS=a.out.h assert.h elf.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h unistd.h uuid.h +STAND_H_INC=ctype.h fcntl.h signal.h stdio.h stdlib.h +OTHER_INC=stdarg.h errno.h stdint.h + beforedepend: echo beforedepend; \ - mkdir -p xlocale arpa; \ - for i in a.out.h assert.h elf.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h unistd.h uuid.h; do \ + mkdir -p ${FAKE_DIRS}; \ + for i in ${SAFE_INCS}; do \ ln -sf ${SRCTOP}/include/$$i $$i; \ done; \ ln -sf ${SYSDIR}/${MACHINE}/include/stdarg.h stdarg.h; \ @@ -111,9 +116,11 @@ beforedepend: for i in _time.h _strings.h _string.h; do \ [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ done; \ - for i in ctype.h fcntl.h signal.h stdio.h stdlib.h; do \ + for i in ${STAND_H_INC}; do \ ln -sf ${SASRC}/stand.h $$i; \ done +CLEANDIRS+=${FAKE_DIRS} +CLEANFILES+= ${SAFE_INCS} ${STAND_H_INC} ${OTHER_INC} # io routines SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \ From owner-svn-src-head@freebsd.org Fri Dec 8 19:57:13 2017 Return-Path: Delivered-To: svn-src-head@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 15CA2E8D780; Fri, 8 Dec 2017 19:57:13 +0000 (UTC) (envelope-from imp@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 BC43C1930; Fri, 8 Dec 2017 19:57:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8JvB6Q094376; Fri, 8 Dec 2017 19:57:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8JvBua094373; Fri, 8 Dec 2017 19:57:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712081957.vB8JvBua094373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 19:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326711 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 326711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:57:13 -0000 Author: imp Date: Fri Dec 8 19:57:11 2017 New Revision: 326711 URL: https://svnweb.freebsd.org/changeset/base/326711 Log: Const poison a couple of interfaces. Obtained from: lua boot project Sponsored by: Netflix Modified: head/stand/common/bootstrap.h head/stand/common/interp_backslash.c head/stand/common/interp_parse.c Modified: head/stand/common/bootstrap.h ============================================================================== --- head/stand/common/bootstrap.h Fri Dec 8 19:57:06 2017 (r326710) +++ head/stand/common/bootstrap.h Fri Dec 8 19:57:11 2017 (r326711) @@ -49,10 +49,10 @@ void interact(const char *rc); int include(const char *filename); /* interp_backslash.c */ -char *backslash(char *str); +char *backslash(const char *str); /* interp_parse.c */ -int parse(int *argc, char ***argv, char *str); +int parse(int *argc, char ***argv, const char *str); /* interp_forth.c */ void bf_init(const char *rc); Modified: head/stand/common/interp_backslash.c ============================================================================== --- head/stand/common/interp_backslash.c Fri Dec 8 19:57:06 2017 (r326710) +++ head/stand/common/interp_backslash.c Fri Dec 8 19:57:11 2017 (r326711) @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); * processing" done on it. Original can be free'd if desired. */ char * -backslash(char *str) +backslash(const char *str) { /* * Remove backslashes from the strings. Turn \040 etc. into a single Modified: head/stand/common/interp_parse.c ============================================================================== --- head/stand/common/interp_parse.c Fri Dec 8 19:57:06 2017 (r326710) +++ head/stand/common/interp_parse.c Fri Dec 8 19:57:11 2017 (r326711) @@ -7,7 +7,7 @@ * 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. - * + * * Jordan K. Hubbard * 29 August 1998 * @@ -82,7 +82,7 @@ isdquote(int ch) } int -parse(int *argc, char ***argv, char *str) +parse(int *argc, char ***argv, const char *str) { int ac; char *val, *p, *q, *copy = NULL; From owner-svn-src-head@freebsd.org Fri Dec 8 19:57:20 2017 Return-Path: Delivered-To: svn-src-head@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 19C85E8D7DE; Fri, 8 Dec 2017 19:57:20 +0000 (UTC) (envelope-from imp@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 4289A1A5C; Fri, 8 Dec 2017 19:57:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8JvHia094473; Fri, 8 Dec 2017 19:57:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8JvGio094468; Fri, 8 Dec 2017 19:57:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712081957.vB8JvGio094468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 19:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326712 - in head/stand: . common X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: . common X-SVN-Commit-Revision: 326712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:57:20 -0000 Author: imp Date: Fri Dec 8 19:57:16 2017 New Revision: 326712 URL: https://svnweb.freebsd.org/changeset/base/326712 Log: Create interp class. Create an interp class. Use it to separate out the different types of interpreters: forth and simple with function pointers rather than via #ifdefs. Obtained from: lua boot loader project (via https://bsdimp@github.com/bsdimp/freebsd.git lua-bootloader) Sponsored by: Netflix Added: head/stand/common/interp.h (contents, props changed) head/stand/common/interp_simple.c (contents, props changed) Modified: head/stand/common/interp.c head/stand/common/interp_forth.c head/stand/loader.mk Modified: head/stand/common/interp.c ============================================================================== --- head/stand/common/interp.c Fri Dec 8 19:57:11 2017 (r326711) +++ head/stand/common/interp.c Fri Dec 8 19:57:16 2017 (r326712) @@ -1,5 +1,6 @@ /*- * Copyright (c) 1998 Michael Smith + * Copyright (c) 2011 Wojciech A. Koszek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - #include __FBSDID("$FreeBSD$"); @@ -36,112 +36,60 @@ __FBSDID("$FreeBSD$"); #include #include #include "bootstrap.h" +#include "interp.h" -#ifdef BOOT_FORTH -#include "ficl.h" -#define RETURN(x) stackPushINT(bf_vm->pStack,!x); return(x) -extern FICL_VM *bf_vm; +#define MAXARGS 20 /* maximum number of arguments allowed */ + +struct interp *interp = +#if defined(BOOT_FORTH) + &boot_interp_forth; #else -#define RETURN(x) return(x) + &boot_interp_simple; #endif -#define MAXARGS 20 /* maximum number of arguments allowed */ - -static void prompt(void); - -#ifndef BOOT_FORTH -static int perform(int argc, char *argv[]); - -/* - * Perform the command - */ int -perform(int argc, char *argv[]) +default_load_config(void *ctx) { - int result; - struct bootblk_command **cmdp; - bootblk_cmd_t *cmd; - - if (argc < 1) - return(CMD_OK); - - /* set return defaults; a successful command will override these */ - command_errmsg = command_errbuf; - strcpy(command_errbuf, "no error message"); - cmd = NULL; - result = CMD_ERROR; - - /* search the command set for the command */ - SET_FOREACH(cmdp, Xcommand_set) { - if (((*cmdp)->c_name != NULL) && !strcmp(argv[0], (*cmdp)->c_name)) - cmd = (*cmdp)->c_fn; - } - if (cmd != NULL) { - result = (cmd)(argc, argv); - } else { - command_errmsg = "unknown command"; - } - RETURN(result); + return INTERP_INCL(interp, "/boot/loader.rc"); } -#endif /* ! BOOT_FORTH */ /* * Interactive mode */ void -interact(const char *rc) +interact(const char * rc) { - static char input[256]; /* big enough? */ -#ifndef BOOT_FORTH - int argc; - char **argv; -#endif + static char input[256]; /* big enough? */ -#ifdef BOOT_FORTH - bf_init((rc) ? "" : NULL); -#endif + INTERP_INIT(interp); - if (rc == NULL) { - /* Read our default configuration. */ - include("/boot/loader.rc"); - } else if (*rc != '\0') - include(rc); + /* + * Read our default configuration + */ + INTERP_LOAD_DEF_CONFIG(interp); + printf("\n"); + /* + * Before interacting, we might want to autoboot. + */ + autoboot_maybe(); - printf("\n"); + /* + * Not autobooting, go manual + */ + printf("\nType '?' for a list of commands, 'help' for more detailed help.\n"); + if (getenv("prompt") == NULL) + setenv("prompt", "${interpret}", 1); + if (getenv("interpret") == NULL) + setenv("interpret", "OK", 1); - /* - * Before interacting, we might want to autoboot. - */ - autoboot_maybe(); - - /* - * Not autobooting, go manual - */ - printf("\nType '?' for a list of commands, 'help' for more detailed help.\n"); - if (getenv("prompt") == NULL) - setenv("prompt", "${interpret}", 1); - if (getenv("interpret") == NULL) - setenv("interpret", "OK", 1); - - for (;;) { - input[0] = '\0'; - prompt(); - ngets(input, sizeof(input)); -#ifdef BOOT_FORTH - bf_vm->sourceID.i = 0; - bf_run(input); -#else - if (!parse(&argc, &argv, input)) { - if (perform(argc, argv)) - printf("%s: %s\n", argv[0], command_errmsg); - free(argv); - } else { - printf("parse error\n"); + for (;;) { + input[0] = '\0'; + prompt(); + ngets(input, sizeof(input)); + INTERP_RUN(interp, input); } -#endif - } } /* @@ -158,214 +106,87 @@ COMMAND_SET(include, "include", "read commands from a static int command_include(int argc, char *argv[]) { - int i; - int res; - char **argvbuf; + int i; + int res; + char **argvbuf; - /* - * Since argv is static, we need to save it here. - */ - argvbuf = (char**) calloc((u_int)argc, sizeof(char*)); - for (i = 0; i < argc; i++) - argvbuf[i] = strdup(argv[i]); + /* + * Since argv is static, we need to save it here. + */ + argvbuf = (char**) calloc((u_int)argc, sizeof(char*)); + for (i = 0; i < argc; i++) + argvbuf[i] = strdup(argv[i]); - res=CMD_OK; - for (i = 1; (i < argc) && (res == CMD_OK); i++) - res = include(argvbuf[i]); + res=CMD_OK; + for (i = 1; (i < argc) && (res == CMD_OK); i++) + res = INTERP_INCL(interp, argvbuf[i]); - for (i = 0; i < argc; i++) - free(argvbuf[i]); - free(argvbuf); + for (i = 0; i < argc; i++) + free(argvbuf[i]); + free(argvbuf); - return(res); + return(res); } /* - * Header prepended to each line. The text immediately follows the header. - * We try to make this short in order to save memory -- the loader has - * limited memory available, and some of the forth files are very long. + * Perform the command */ -struct includeline -{ - struct includeline *next; -#ifndef BOOT_FORTH - int flags; - int line; -#define SL_QUIET (1<<0) -#define SL_IGNOREERR (1<<1) -#endif - char text[0]; -}; - int -include(const char *filename) +perform(int argc, char *argv[]) { - struct includeline *script, *se, *sp; - char input[256]; /* big enough? */ -#ifdef BOOT_FORTH - int res; - char *cp; - int prevsrcid, fd, line; -#else - int argc,res; - char **argv, *cp; - int fd, flags, line; -#endif + int result; + struct bootblk_command **cmdp; + bootblk_cmd_t *cmd; - if (((fd = open(filename, O_RDONLY)) == -1)) { - snprintf(command_errbuf, sizeof(command_errbuf), - "can't open '%s': %s", filename, strerror(errno)); - return(CMD_ERROR); - } + if (argc < 1) + return(CMD_OK); - /* - * Read the script into memory. - */ - script = se = NULL; - line = 0; - - while (fgetstr(input, sizeof(input), fd) >= 0) { - line++; -#ifdef BOOT_FORTH - cp = input; -#else - flags = 0; - /* Discard comments */ - if (strncmp(input+strspn(input, " "), "\\ ", 2) == 0) - continue; - cp = input; - /* Echo? */ - if (input[0] == '@') { - cp++; - flags |= SL_QUIET; + /* set return defaults; a successful command will override these */ + command_errmsg = command_errbuf; + strcpy(command_errbuf, "no error message"); + cmd = NULL; + result = CMD_ERROR; + + /* search the command set for the command */ + SET_FOREACH(cmdp, Xcommand_set) { + if (((*cmdp)->c_name != NULL) && !strcmp(argv[0], (*cmdp)->c_name)) + cmd = (*cmdp)->c_fn; } - /* Error OK? */ - if (input[0] == '-') { - cp++; - flags |= SL_IGNOREERR; - } -#endif - /* Allocate script line structure and copy line, flags */ - if (*cp == '\0') - continue; /* ignore empty line, save memory */ - sp = malloc(sizeof(struct includeline) + strlen(cp) + 1); - /* On malloc failure (it happens!), free as much as possible and exit */ - if (sp == NULL) { - while (script != NULL) { - se = script; - script = script->next; - free(se); - } - snprintf(command_errbuf, sizeof(command_errbuf), - "file '%s' line %d: memory allocation failure - aborting", - filename, line); - return (CMD_ERROR); - } - strcpy(sp->text, cp); -#ifndef BOOT_FORTH - sp->flags = flags; - sp->line = line; -#endif - sp->next = NULL; - - if (script == NULL) { - script = sp; + if (cmd != NULL) { + result = (cmd)(argc, argv); } else { - se->next = sp; + command_errmsg = "unknown command"; } - se = sp; - } - close(fd); - - /* - * Execute the script - */ -#ifndef BOOT_FORTH - argv = NULL; -#else - prevsrcid = bf_vm->sourceID.i; - bf_vm->sourceID.i = fd; -#endif - res = CMD_OK; - for (sp = script; sp != NULL; sp = sp->next) { - -#ifdef BOOT_FORTH - res = bf_run(sp->text); - if (res != VM_OUTOFTEXT) { - snprintf(command_errbuf, sizeof(command_errbuf), - "Error while including %s, in the line:\n%s", - filename, sp->text); - res = CMD_ERROR; - break; - } else - res = CMD_OK; -#else - /* print if not being quiet */ - if (!(sp->flags & SL_QUIET)) { - prompt(); - printf("%s\n", sp->text); - } - - /* Parse the command */ - if (!parse(&argc, &argv, sp->text)) { - if ((argc > 0) && (perform(argc, argv) != 0)) { - /* normal command */ - printf("%s: %s\n", argv[0], command_errmsg); - if (!(sp->flags & SL_IGNOREERR)) { - res=CMD_ERROR; - break; - } - } - free(argv); - argv = NULL; - } else { - printf("%s line %d: parse error\n", filename, sp->line); - res=CMD_ERROR; - break; - } -#endif - } -#ifndef BOOT_FORTH - if (argv != NULL) - free(argv); -#else - bf_vm->sourceID.i = prevsrcid; -#endif - while(script != NULL) { - se = script; - script = script->next; - free(se); - } - return(res); + return result; } /* * Emit the current prompt; use the same syntax as the parser * for embedding environment variables. */ -static void -prompt(void) +void +prompt(void) { - char *pr, *p, *cp, *ev; - - if ((cp = getenv("prompt")) == NULL) - cp = ">"; - pr = p = strdup(cp); + char *pr, *p, *cp, *ev; - while (*p != 0) { - if ((*p == '$') && (*(p+1) == '{')) { - for (cp = p + 2; (*cp != 0) && (*cp != '}'); cp++) - ; - *cp = 0; - ev = getenv(p + 2); - - if (ev != NULL) - printf("%s", ev); - p = cp + 1; - continue; + if ((cp = getenv("prompt")) == NULL) + cp = ">"; + pr = p = strdup(cp); + + while (*p != 0) { + if ((*p == '$') && (*(p+1) == '{')) { + for (cp = p + 2; (*cp != 0) && (*cp != '}'); cp++) + ; + *cp = 0; + ev = getenv(p + 2); + + if (ev != NULL) + printf("%s", ev); + p = cp + 1; + continue; + } + putchar(*p++); } - putchar(*p++); - } - putchar(' '); - free(pr); + putchar(' '); + free(pr); } Added: head/stand/common/interp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/common/interp.h Fri Dec 8 19:57:16 2017 (r326712) @@ -0,0 +1,87 @@ +/*- + * Copyright (c) 2011 Wojciech A. Koszek + * Copyright (c) 2014 Pedro Souza + * 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 THE 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 THE 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$ + */ + +typedef void interp_init_t(void *ctx); +typedef int interp_run_t(void *ctx, const char *input); +typedef int interp_incl_t(void *ctx, const char *filename); +typedef int interp_load_def_t(void *ctx); // load default configuration files + +struct interp { + interp_init_t *init; + interp_run_t *run; + interp_incl_t *incl; + interp_load_def_t *load_configs; + void *context; +}; + +#define INTERP_INIT(i) do { \ + if (((i) != NULL) && ((i)->init != NULL)) { \ + ((i)->init((i)->context)); \ + } \ +} while (0) + +#define INTERP_RUN(i, input) \ + ((i)->run(((i)->context), input)) + +#define INTERP_INCL(i, filename) \ + ((i)->incl(((i)->context), filename)) + +#define INTERP_LOAD_DEF_CONFIG(i) \ + ((i)->load_configs(((i)->context))) + + + +extern struct interp boot_interp_simple; +extern struct interp boot_interp_forth; +extern struct interp boot_interp_lua; + + +extern struct interp *interp; + +int perform(int argc, char *argv[]); +void prompt(void); + +/* + * Default config loader for interp_simple & intep_forth + * Use it if your interpreter does not use a custom config + * file. + * + * Calls interp->include with 'loader.rc' or 'boot.conf' + */ +int default_load_config(void *ctx); + +struct includeline +{ + struct includeline *next; + int flags; + int line; +#define SL_QUIET (1<<0) +#define SL_IGNOREERR (1<<1) + char text[0]; +}; Modified: head/stand/common/interp_forth.c ============================================================================== --- head/stand/common/interp_forth.c Fri Dec 8 19:57:11 2017 (r326711) +++ head/stand/common/interp_forth.c Fri Dec 8 19:57:16 2017 (r326712) @@ -1,5 +1,6 @@ /*- * Copyright (c) 1998 Michael Smith + * Copyright (c) 2011 Wojciech A. Koszek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" #include "ficl.h" +#include "interp.h" extern unsigned bootprog_rev; @@ -60,9 +62,14 @@ extern unsigned bootprog_rev; /* * BootForth Interface to Ficl Forth interpreter. */ +struct interp_forth_softc { + FICL_SYSTEM *bf_sys; + FICL_VM *bf_vm; + FICL_WORD *pInterp; +}; +struct interp_forth_softc forth_softc = { NULL, NULL, NULL }; -FICL_SYSTEM *bf_sys; -FICL_VM *bf_vm; +#define RETURN(x) stackPushINT(bf_vm->pStack,!x); return(x) /* * Shim for taking commands from BF and passing them out to 'standard' @@ -71,91 +78,93 @@ FICL_VM *bf_vm; static void bf_command(FICL_VM *vm) { - char *name, *line, *tail, *cp; - size_t len; - struct bootblk_command **cmdp; - bootblk_cmd_t *cmd; - int nstrings, i; - int argc, result; - char **argv; + char *name, *line, *tail, *cp; + size_t len; + struct bootblk_command **cmdp; + bootblk_cmd_t *cmd; + int nstrings, i; + int argc, result; + char **argv; - /* Get the name of the current word */ - name = vm->runningWord->name; - - /* Find our command structure */ - cmd = NULL; - SET_FOREACH(cmdp, Xcommand_set) { - if (((*cmdp)->c_name != NULL) && !strcmp(name, (*cmdp)->c_name)) - cmd = (*cmdp)->c_fn; - } - if (cmd == NULL) - panic("callout for unknown command '%s'", name); - - /* Check whether we have been compiled or are being interpreted */ - if (stackPopINT(vm->pStack)) { - /* - * Get parameters from stack, in the format: - * an un ... a2 u2 a1 u1 n -- - * Where n is the number of strings, a/u are pairs of - * address/size for strings, and they will be concatenated - * in LIFO order. - */ - nstrings = stackPopINT(vm->pStack); - for (i = 0, len = 0; i < nstrings; i++) - len += stackFetch(vm->pStack, i * 2).i + 1; - line = malloc(strlen(name) + len + 1); - strcpy(line, name); + /* Get the name of the current word */ + name = vm->runningWord->name; - if (nstrings) - for (i = 0; i < nstrings; i++) { - len = stackPopINT(vm->pStack); - cp = stackPopPtr(vm->pStack); - strcat(line, " "); - strncat(line, cp, len); - } - } else { - /* Get remainder of invocation */ - tail = vmGetInBuf(vm); - for (cp = tail, len = 0; cp != vm->tib.end && *cp != 0 && *cp != '\n'; cp++, len++) - ; - - line = malloc(strlen(name) + len + 2); - strcpy(line, name); - if (len > 0) { - strcat(line, " "); - strncat(line, tail, len); - vmUpdateTib(vm, tail + len); + /* Find our command structure */ + cmd = NULL; + SET_FOREACH(cmdp, Xcommand_set) { + if (((*cmdp)->c_name != NULL) && !strcmp(name, (*cmdp)->c_name)) + cmd = (*cmdp)->c_fn; } - } - DEBUG("cmd '%s'", line); - - command_errmsg = command_errbuf; - command_errbuf[0] = 0; - if (!parse(&argc, &argv, line)) { - result = (cmd)(argc, argv); - free(argv); - } else { - result=BF_PARSE; - } + if (cmd == NULL) + panic("callout for unknown command '%s'", name); - switch (result) { - case CMD_CRIT: - printf("%s\n", command_errmsg); - break; - case CMD_FATAL: - panic("%s\n", command_errmsg); - } + /* Check whether we have been compiled or are being interpreted */ + if (stackPopINT(vm->pStack)) { + /* + * Get parameters from stack, in the format: + * an un ... a2 u2 a1 u1 n -- + * Where n is the number of strings, a/u are pairs of + * address/size for strings, and they will be concatenated + * in LIFO order. + */ + nstrings = stackPopINT(vm->pStack); + for (i = 0, len = 0; i < nstrings; i++) + len += stackFetch(vm->pStack, i * 2).i + 1; + line = malloc(strlen(name) + len + 1); + strcpy(line, name); - free(line); - /* - * If there was error during nested ficlExec(), we may no longer have - * valid environment to return. Throw all exceptions from here. - */ - if (result != CMD_OK) - vmThrow(vm, result); + if (nstrings) + for (i = 0; i < nstrings; i++) { + len = stackPopINT(vm->pStack); + cp = stackPopPtr(vm->pStack); + strcat(line, " "); + strncat(line, cp, len); + } + } else { + /* Get remainder of invocation */ + tail = vmGetInBuf(vm); + for (cp = tail, len = 0; cp != vm->tib.end && *cp != 0 && *cp != '\n'; cp++, len++) + ; - /* This is going to be thrown!!! */ - stackPushINT(vm->pStack,result); + line = malloc(strlen(name) + len + 2); + strcpy(line, name); + if (len > 0) { + strcat(line, " "); + strncat(line, tail, len); + vmUpdateTib(vm, tail + len); + } + } + DEBUG("cmd '%s'", line); + + command_errmsg = command_errbuf; + command_errbuf[0] = 0; + if (!parse(&argc, &argv, line)) { + result = (cmd)(argc, argv); + free(argv); + } else { + result=BF_PARSE; + } + + /* XXX Not sure about the rest of this -- imp */ + + switch (result) { + case CMD_CRIT: + printf("%s\n", command_errmsg); + break; + case CMD_FATAL: + panic("%s\n", command_errmsg); + } + + free(line); + /* + * If there was error during nested ficlExec(), we may no longer have + * valid environment to return. Throw all exceptions from here. + */ + if (result != CMD_OK) + vmThrow(vm, result); + + /* This is going to be thrown!!! */ + stackPushINT(vm->pStack,result); } /* @@ -249,16 +258,23 @@ bf_command(FICL_VM *vm) /* * Initialise the Forth interpreter, create all our commands as words. */ -void -bf_init(const char *rc) +static void +interp_forth_init(void *ctx) { + struct interp_forth_softc *softc; struct bootblk_command **cmdp; char create_buf[41]; /* 31 characters-long builtins */ - int fd; + FICL_SYSTEM *bf_sys; + FICL_VM *bf_vm; - bf_sys = ficlInitSystem(BF_DICTSIZE); - bf_vm = ficlNewVM(bf_sys); + softc = ctx; + assert((softc->bf_sys == NULL) && (softc->bf_vm == NULL) && + (softc->pInterp == NULL)); /* No Forth context at this stage */ + + bf_sys = softc->bf_sys = ficlInitSystem(BF_DICTSIZE); + bf_vm = softc->bf_vm = ficlNewVM(bf_sys); + /* Put all private definitions in a "builtins" vocabulary */ ficlExec(bf_vm, "vocabulary builtins also builtins definitions"); @@ -279,28 +295,35 @@ bf_init(const char *rc) ficlSetEnv(bf_sys, "FreeBSD_version", __FreeBSD_version); ficlSetEnv(bf_sys, "loader_version", bootprog_rev); +#if 0 /* XXX lost functionality -- imp */ /* try to load and run init file if present */ if (rc == NULL) rc = "/boot/boot.4th"; if (*rc != '\0') { + int fd; + fd = open(rc, O_RDONLY); if (fd != -1) { (void)ficlExecFD(bf_vm, fd); close(fd); } } +#endif } /* * Feed a line of user input to the Forth interpreter */ -int -bf_run(char *line) +static int +interp_forth_run(void *ctx, const char *line) { + struct interp_forth_softc *softc; int result; - result = ficlExec(bf_vm, line); + softc = ctx; + result = ficlExec(softc->bf_vm, (char *)line); + DEBUG("ficlExec '%s' = %d", line, result); switch (result) { case VM_OUTOFTEXT: @@ -326,7 +349,32 @@ bf_run(char *line) if (result == VM_USEREXIT) panic("interpreter exit"); - setenv("interpret", bf_vm->state ? "" : "OK", 1); + setenv("interpret", softc->bf_vm->state ? "" : "OK", 1); return (result); } + +static int +interp_forth_incl(void *ctx, const char *filename) +{ + struct interp_forth_softc *softc; + int fd; + + softc = ctx; + + fd = open(filename, O_RDONLY); + if (fd == -1) { + printf("can't open %s\n", filename); + return (CMD_ERROR); + } + return (ficlExecFD(softc->bf_vm, fd)); +} + + +struct interp boot_interp_forth = { + .init = interp_forth_init, + .run = interp_forth_run, + .incl = interp_forth_incl, + .load_configs = default_load_config, + .context = &forth_softc +}; Added: head/stand/common/interp_simple.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/common/interp_simple.c Fri Dec 8 19:57:16 2017 (r326712) @@ -0,0 +1,183 @@ +/*- + * Copyright (c) 2011 Wojciech A. Koszek + * Copyright (c) 2014 Pedro Souza + * 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 THE 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 THE 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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include "bootstrap.h" +#include "interp.h" + +struct interp_simple_softc { + int dummy; +}; + +static void +interp_simple_init(void *ctx) +{ + + (void)ctx; /* Silent the compiler */ +} + +static int +interp_simple_run(void *ctx, const char *input) +{ + struct interp_simple_softc *softc; + int argc; + char **argv; + + softc = ctx; + (void)softc; /* Currently unused */ + + if (!parse(&argc, &argv, input)) { + if (perform(argc, argv)) + printf("%s: %s\n", argv[0], command_errmsg); + free(argv); + } else { + printf("parse error\n"); + } + return 0; +} + +static int +interp_simple_incl(void *ctx, const char *filename) +{ + struct includeline *script, *se, *sp; + char input[256]; /* big enough? */ + int argc,res; + char **argv, *cp; + int fd, flags, line; + + (void)ctx; /* Silent the compiler */ + + if (((fd = open(filename, O_RDONLY)) == -1)) { + sprintf(command_errbuf,"can't open '%s': %s\n", filename, strerror(errno)); + return(CMD_ERROR); + } + + /* + * Read the script into memory. + */ + script = se = NULL; + line = 0; + + while (fgetstr(input, sizeof(input), fd) >= 0) { + line++; + flags = 0; + /* Discard comments */ + if (strncmp(input+strspn(input, " "), "\\ ", 2) == 0) + continue; + cp = input; + /* Echo? */ + if (input[0] == '@') { + cp++; + flags |= SL_QUIET; + } + /* Error OK? */ + if (input[0] == '-') { + cp++; + flags |= SL_IGNOREERR; + } + /* Allocate script line structure and copy line, flags */ + if (*cp == '\0') + continue; /* ignore empty line, save memory */ + sp = malloc(sizeof(struct includeline) + strlen(cp) + 1); + /* On malloc failure (it happens!), free as much as possible and exit */ + if (sp == NULL) { + while (script != NULL) { + se = script; + script = script->next; + free(se); + } + sprintf(command_errbuf, "file '%s' line %d: memory allocation " + "failure - aborting\n", filename, line); + return (CMD_ERROR); + } + strcpy(sp->text, cp); + sp->flags = flags; + sp->line = line; + sp->next = NULL; + + if (script == NULL) { + script = sp; + } else { + se->next = sp; + } + se = sp; + } + close(fd); + + /* + * Execute the script + */ + argv = NULL; + res = CMD_OK; + for (sp = script; sp != NULL; sp = sp->next) { + + /* print if not being quiet */ + if (!(sp->flags & SL_QUIET)) { + prompt(); + printf("%s\n", sp->text); + } + + /* Parse the command */ + if (!parse(&argc, &argv, sp->text)) { + if ((argc > 0) && (perform(argc, argv) != 0)) { + /* normal command */ + printf("%s: %s\n", argv[0], command_errmsg); + if (!(sp->flags & SL_IGNOREERR)) { + res=CMD_ERROR; + break; + } + } + free(argv); + argv = NULL; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Dec 8 19:57:24 2017 Return-Path: Delivered-To: svn-src-head@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 63B5FE8D7EE; Fri, 8 Dec 2017 19:57:24 +0000 (UTC) (envelope-from imp@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 C2E1C1B35; Fri, 8 Dec 2017 19:57:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8JvLSj094524; Fri, 8 Dec 2017 19:57:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8JvLFi094523; Fri, 8 Dec 2017 19:57:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712081957.vB8JvLFi094523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 19:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326713 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 326713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:57:24 -0000 Author: imp Date: Fri Dec 8 19:57:21 2017 New Revision: 326713 URL: https://svnweb.freebsd.org/changeset/base/326713 Log: Build WITHOUT_FORTH too, at least for amd64 and i386 Sponsored by: Netflix Modified: head/tools/boot/universe.sh Modified: head/tools/boot/universe.sh ============================================================================== --- head/tools/boot/universe.sh Fri Dec 8 19:57:16 2017 (r326712) +++ head/tools/boot/universe.sh Fri Dec 8 19:57:21 2017 (r326713) @@ -44,6 +44,14 @@ dobuild() top=$(make -V SRCTOP) cd $top/stand +# Build without forth +for i in \ + amd64/amd64 \ + i386/i386 \ + ; do + ta=${i##*/} + dobuild $ta _.boot.${ta}.no_forth.log "WITHOUT_FORTH=yes" +done # Build without GELI for i in \ From owner-svn-src-head@freebsd.org Fri Dec 8 19:57:28 2017 Return-Path: Delivered-To: svn-src-head@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 00957E8D809; Fri, 8 Dec 2017 19:57:28 +0000 (UTC) (envelope-from imp@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 571F11C0E; Fri, 8 Dec 2017 19:57:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8JvQM1094578; Fri, 8 Dec 2017 19:57:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8JvQEd094577; Fri, 8 Dec 2017 19:57:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712081957.vB8JvQEd094577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 19:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326714 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 326714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 19:57:28 -0000 Author: imp Date: Fri Dec 8 19:57:26 2017 New Revision: 326714 URL: https://svnweb.freebsd.org/changeset/base/326714 Log: boot1.c needs EFI_ZFS_BOOT too, so add it globally. Otherwise we'll not be able to actually read ZFS partitions. Submitted by: kevans@ Modified: head/stand/efi/boot1/Makefile Modified: head/stand/efi/boot1/Makefile ============================================================================== --- head/stand/efi/boot1/Makefile Fri Dec 8 19:57:21 2017 (r326713) +++ head/stand/efi/boot1/Makefile Fri Dec 8 19:57:26 2017 (r326714) @@ -34,7 +34,7 @@ SRCS+= zfs_module.c CFLAGS.zfs_module.c+= -I${ZFSSRC} CFLAGS.zfs_module.c+= -I${SYSDIR}/cddl/boot/zfs CFLAGS.zfs_module.c+= -I${SYSDIR}/crypto/skein -CFLAGS.zfs_module.c+= -DEFI_ZFS_BOOT +CFLAGS+= -DEFI_ZFS_BOOT LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a .endif From owner-svn-src-head@freebsd.org Fri Dec 8 20:10:09 2017 Return-Path: Delivered-To: svn-src-head@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 E0E19E8DF5F; Fri, 8 Dec 2017 20:10:09 +0000 (UTC) (envelope-from shurd@sasktel.net) Received: from mail16c7.megamailservers.com (mail16c7.megamailservers.com [69.49.98.125]) (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 6271E2BCE; Fri, 8 Dec 2017 20:10:08 +0000 (UTC) (envelope-from shurd@sasktel.net) Received: from mail16c7.megamailservers.com (localhost [127.0.0.1]) by mail16c7.megamailservers.com (8.14.9/8.13.1) with ESMTP id vB8JohGi024932 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 8 Dec 2017 14:50:43 -0500 Received: (from webmail@localhost) by mail16c7.megamailservers.com (8.14.9/8.12.2/Submit) id vB8Joga0024931; Fri, 8 Dec 2017 14:50:42 -0500 Received: from 96-92-42-173-static.hfc.comcastbusiness.net (96-92-42-173-static.hfc.comcastbusiness.net [96.92.42.173]) by webmail.sasktel.net (Webmail 5.0 V.V.I.) with HTTP for ; Fri, 08 Dec 2017 13:50:42 -0600 Message-ID: <20171208135042.aiyw0cs744044wss@webmail.sasktel.net> From: shurd@sasktel.net Reply-to: shurd@sasktel.net To: Stephen Hurd , Ryan Stone Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r326702 - head/sys/net Date: Fri, 08 Dec 2017 13:50:42 -0600 X-Priority: 3 X-Authenticated-User: shurd.sasktel.net References: <201712081843.vB8IhVdA064251@repo.freebsd.org> In-Reply-To: MIME-Version: 1.0 User-Agent: Webmail 6.0 X-CTCH-RefID: str=0001.0A020204.5A2AED13.003F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.2 cv=XbX59Mx5 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=sKQkgkx3tBUQ55hxqPYCBw==:17 a=v2NWgMxlncYA:10 a=ikZSrtty1KYA:10 a=ocR9PWop10UA:10 a=G-JvYgQUlsIBVzUhMCsA:9 a=6I5d2MoRAAAA:8 a=y7aGmgrOC_-RP0Dl4XUA:9 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=OZOGwo4DbkHpDYqCreQA:9 a=MNKL-DSECXe5wbzu:21 a=_W_S_7VecoQA:10 a=IjZwj45LgO3ly-622nXo:22 Content-Type: text/plain; charset=UTF-8; format="flowed" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-Description: Plaintext Version of Message X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 20:10:10 -0000 On Fri, 8 Dec 2017 13:57:13 -0500, Ryan Stone wrote: On Fri, Dec 8, 2017 at 1:43 PM, Stephen Hurd wrote: > Author: shurd > Date: Fri Dec 8 18:43:31 2017 > New Revision: 326702 > URL: https://svnweb.freebsd.org/changeset/base/326702 > + if (!M_WRITABLE(*m_head)) { > + new_head = m_dup(*m_head, M_NOWAIT); > + if (new_head == NULL) { > + device_printf(dev, "cannot pad short frame, m_dup() failed"); > + return ENOMEM; Don't we leak *m_head here? As far as I can tell the caller doesn't deal with it. Thanks for catching that, fixed in r326706. From owner-svn-src-head@freebsd.org Fri Dec 8 20:11:32 2017 Return-Path: Delivered-To: svn-src-head@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 C5EF1E8E132; Fri, 8 Dec 2017 20:11:32 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A87EE2DDE; Fri, 8 Dec 2017 20:11:32 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vB8KBUll068553; Fri, 8 Dec 2017 12:11:30 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vB8KBUsA068552; Fri, 8 Dec 2017 12:11:30 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712082011.vB8KBUsA068552@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326614 - in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee In-Reply-To: To: cem@freebsd.org Date: Fri, 8 Dec 2017 12:11:30 -0800 (PST) CC: "Rodney W. Grimes" , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 20:11:32 -0000 [ Charset UTF-8 unsupported, converting... ] > On Tue, Dec 5, 2017 at 7:10 PM, Rodney W. Grimes > wrote: > > [ Charset UTF-8 unsupported, converting... ] > >> Author: eadler > >> Date: Wed Dec 6 02:47:46 2017 > >> New Revision: 326614 > >> URL: https://svnweb.freebsd.org/changeset/base/326614 > >> > >> Log: > >> sponge(1): revert > >> > >> I did a complete buildworld and test... with the program disconnected > >> from the tree. Revert the change for now. > >> > >> (this keeps the change to .arclint which is still correct) > > > > Commited with no log entry that makes any sense about why it was changed, > > please revert .arclint and recommit with a proper log entry for .arclint > > as to why all /tests/ dirs should be ignored. > > I have to agree with Rod. The commit message for the arclint change > is currently "sponge(1): initial commit ?" and doesn't say anything > about the arclint change. Even if the change is correct, the commit > message isn't. Ping, I have not seen this reverted and recommitted with a reasonable explination as to why this change is actually desired. Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Dec 8 21:01:10 2017 Return-Path: Delivered-To: svn-src-head@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 C3206E8F369; Fri, 8 Dec 2017 21:01:10 +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 8B61763EAD; Fri, 8 Dec 2017 21:01:10 +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 vB8L19r3021023; Fri, 8 Dec 2017 21:01:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8L19nZ021021; Fri, 8 Dec 2017 21:01:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201712082101.vB8L19nZ021021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 8 Dec 2017 21:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326716 - head/contrib/ofed/libibnetdisc X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/contrib/ofed/libibnetdisc X-SVN-Commit-Revision: 326716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 21:01:10 -0000 Author: hselasky Date: Fri Dec 8 21:01:09 2017 New Revision: 326716 URL: https://svnweb.freebsd.org/changeset/base/326716 Log: Correctly define the unordered_map namespace in ofed/libibnetdisc . This should fix ofed/libibnetdisc compilation with C-compilers different from clang and GCC v4.2.1. Submitted by: kib Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/libibnetdisc/Makefile head/contrib/ofed/libibnetdisc/g_hash_table.cpp Modified: head/contrib/ofed/libibnetdisc/Makefile ============================================================================== --- head/contrib/ofed/libibnetdisc/Makefile Fri Dec 8 20:04:10 2017 (r326715) +++ head/contrib/ofed/libibnetdisc/Makefile Fri Dec 8 21:01:09 2017 (r326716) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .PATH: ${.CURDIR} ${.CURDIR}/man SHLIBDIR?= /usr/lib @@ -28,6 +30,9 @@ LIBADD= osmcomp ibmad ibumad CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -I${.CURDIR} CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband +.if ${COMPILER_FEATURES:Mc++11} +CXXFLAGS+= -std=c++11 +.endif VERSION_MAP= ${.CURDIR}/libibnetdisc.map .include Modified: head/contrib/ofed/libibnetdisc/g_hash_table.cpp ============================================================================== --- head/contrib/ofed/libibnetdisc/g_hash_table.cpp Fri Dec 8 20:04:10 2017 (r326715) +++ head/contrib/ofed/libibnetdisc/g_hash_table.cpp Fri Dec 8 21:01:09 2017 (r326716) @@ -31,17 +31,17 @@ * */ -#if defined(__clang__) +#if __cplusplus >= 201103L #include -#define HASH_TABLE_UNORDERED_MAP std::unordered_map +#define UM_NAMESPACE std #else #include -#define HASH_TABLE_UNORDERED_MAP std::tr1::unordered_map +#define UM_NAMESPACE std::tr1 #endif class HashTable { public: - HASH_TABLE_UNORDERED_MAP map; + UM_NAMESPACE::unordered_map map; HashTable() { }; ~HashTable() { }; }; From owner-svn-src-head@freebsd.org Fri Dec 8 21:59:43 2017 Return-Path: Delivered-To: svn-src-head@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 85269E90460; Fri, 8 Dec 2017 21:59:43 +0000 (UTC) (envelope-from imp@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 5244265C66; Fri, 8 Dec 2017 21:59:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8LxgEb045934; Fri, 8 Dec 2017 21:59:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8LxgTv045933; Fri, 8 Dec 2017 21:59:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712082159.vB8LxgTv045933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 21:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326717 - head/tools/tools/nanobsd/embedded X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd/embedded X-SVN-Commit-Revision: 326717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 21:59:43 -0000 Author: imp Date: Fri Dec 8 21:59:42 2017 New Revision: 326717 URL: https://svnweb.freebsd.org/changeset/base/326717 Log: Remove local here. It was a cut and paste error. Sponsored by: Netflix Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Fri Dec 8 21:01:09 2017 (r326716) +++ head/tools/tools/nanobsd/embedded/common Fri Dec 8 21:59:42 2017 (r326717) @@ -477,7 +477,7 @@ dos_boot_part ( ) ( ) if [ -n "$NANO_BOOT_PKG" ]; then - local d=/usr/local/share/u-boot/${NANO_BOOT_PKG} + d=/usr/local/share/u-boot/${NANO_BOOT_PKG} if [ ! -d ${d} ]; then echo ${NANO_BOOT_PKG} not installed. Sadly, it must be. exit 1 From owner-svn-src-head@freebsd.org Fri Dec 8 21:59:51 2017 Return-Path: Delivered-To: svn-src-head@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 91F57E9048A; Fri, 8 Dec 2017 21:59:51 +0000 (UTC) (envelope-from imp@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 4395865CE1; Fri, 8 Dec 2017 21:59:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8LxoOs045988; Fri, 8 Dec 2017 21:59:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8LxopL045987; Fri, 8 Dec 2017 21:59:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712082159.vB8LxopL045987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 21:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326718 - head/tools/tools/nanobsd/embedded X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd/embedded X-SVN-Commit-Revision: 326718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 21:59:51 -0000 Author: imp Date: Fri Dec 8 21:59:50 2017 New Revision: 326718 URL: https://svnweb.freebsd.org/changeset/base/326718 Log: Don't automatically create objdir here. We're just after the TMPPATH. We'll make the paths later. Sponsored by: Netflix Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Fri Dec 8 21:59:42 2017 (r326717) +++ head/tools/tools/nanobsd/embedded/common Fri Dec 8 21:59:50 2017 (r326718) @@ -669,5 +669,5 @@ create_diskimage ( ) ( # Set the path to the same path we use for buldworld to use latest mkimg NANO_TARGET=$(cd ${NANO_SRC}; ${NANO_MAKE} TARGET_ARCH=${NANO_ARCH} -V _TARGET) -NANO_TMPPATH=$(cd ${NANO_SRC}; ${NANO_MAKE} TARGET=${NANO_TARGET} TARGET_ARCH=${NANO_ARCH} -f Makefile.inc1 buildenv -V TMPPATH) +NANO_TMPPATH=$(cd ${NANO_SRC}; ${NANO_MAKE} MK_AUTO_OBJ=no TARGET=${NANO_TARGET} TARGET_ARCH=${NANO_ARCH} -f Makefile.inc1 buildenv -V TMPPATH) export PATH="${NANO_TMPPATH}" From owner-svn-src-head@freebsd.org Fri Dec 8 22:06:19 2017 Return-Path: Delivered-To: svn-src-head@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 E3D18E90704; Fri, 8 Dec 2017 22:06:19 +0000 (UTC) (envelope-from ed@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 8B22B66406; Fri, 8 Dec 2017 22:06:19 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8M6IZe050625; Fri, 8 Dec 2017 22:06:18 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8M6Ipe050619; Fri, 8 Dec 2017 22:06:18 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201712082206.vB8M6Ipe050619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 8 Dec 2017 22:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326719 - in head: . include lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: in head: . include lib/libc/gen X-SVN-Commit-Revision: 326719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 22:06:20 -0000 Author: ed Date: Fri Dec 8 22:06:18 2017 New Revision: 326719 URL: https://svnweb.freebsd.org/changeset/base/326719 Log: Remove basename_r(3). Now that the POSIX working group is going to require that basename(3) and dirname(3) are thread-safe in future revisions of the standard, there is even less of a need to provide basename_r(3). Remove this function to prevent people from writing code that only builds on FreeBSD and Bionic. Removing this function seems to break exactly one port: sbruno@'s qemu-user-static. I will send him a pull request on GitHub in a bit. __FreeBSD_version will not be bumped, as any value from 2017 can be used to test for the presence of a thread-safe basename(3)/dirname(3). PR: https://bugs.freebsd.org/224016 Modified: head/ObsoleteFiles.inc head/include/libgen.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/gen/basename_compat.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Dec 8 21:59:50 2017 (r326718) +++ head/ObsoleteFiles.inc Fri Dec 8 22:06:18 2017 (r326719) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20171208: Remove basename_r(3) +OLD_FILES+=usr/share/man/man3/basename_r.3.gz # 20171204: Move fdformat man page from volume 1 to volume 8. OLD_FILES+=usr/share/man/man1/fdformat.1.gz # 20171203: libproc version bump Modified: head/include/libgen.h ============================================================================== --- head/include/libgen.h Fri Dec 8 21:59:50 2017 (r326718) +++ head/include/libgen.h Fri Dec 8 22:06:18 2017 (r326719) @@ -37,7 +37,6 @@ __BEGIN_DECLS char *basename(char *); -char *basename_r(const char *, char *); char *dirname(char *); __END_DECLS Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Fri Dec 8 21:59:50 2017 (r326718) +++ head/lib/libc/gen/Makefile.inc Fri Dec 8 22:06:18 2017 (r326719) @@ -312,7 +312,6 @@ MLINKS+=arc4random.3 arc4random_addrandom.3 \ arc4random.3 arc4random_stir.3 \ arc4random.3 arc4random_buf.3 \ arc4random.3 arc4random_uniform.3 -MLINKS+=basename.3 basename_r.3 MLINKS+=ctermid.3 ctermid_r.3 MLINKS+=devname.3 devname_r.3 MLINKS+=devname.3 fdevname.3 Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Fri Dec 8 21:59:50 2017 (r326718) +++ head/lib/libc/gen/Symbol.map Fri Dec 8 22:06:18 2017 (r326719) @@ -332,7 +332,6 @@ FBSD_1.1 { }; FBSD_1.2 { - basename_r; cfmakesane; endutxent; getpagesizes; Modified: head/lib/libc/gen/basename_compat.c ============================================================================== --- head/lib/libc/gen/basename_compat.c Fri Dec 8 21:59:50 2017 (r326718) +++ head/lib/libc/gen/basename_compat.c Fri Dec 8 22:06:18 2017 (r326719) @@ -26,7 +26,7 @@ __FBSDID("$FreeBSD$"); #include char * -basename_r(const char *path, char *bname) +__freebsd11_basename_r(const char *path, char *bname) { const char *endp, *startp; size_t len; @@ -75,7 +75,8 @@ __freebsd11_basename(char *path) if (bname == NULL) return (NULL); } - return (basename_r(path, bname)); + return (__freebsd11_basename_r(path, bname)); } +__sym_compat(basename_r, __freebsd11_basename_r, FBSD_1.2); __sym_compat(basename, __freebsd11_basename, FBSD_1.0); From owner-svn-src-head@freebsd.org Fri Dec 8 22:19:42 2017 Return-Path: Delivered-To: svn-src-head@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 773B8E90BEF; Fri, 8 Dec 2017 22:19:42 +0000 (UTC) (envelope-from imp@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 4475F66D85; Fri, 8 Dec 2017 22:19:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB8MJfww055114; Fri, 8 Dec 2017 22:19:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB8MJfq2055112; Fri, 8 Dec 2017 22:19:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712082219.vB8MJfq2055112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Dec 2017 22:19:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326720 - in head/stand: . ficl X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: . ficl X-SVN-Commit-Revision: 326720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 22:19:42 -0000 Author: imp Date: Fri Dec 8 22:19:41 2017 New Revision: 326720 URL: https://svnweb.freebsd.org/changeset/base/326720 Log: This path belongs in ficl/Makefile, not the common defines for users of ficl. Sponsored by: Netflix Modified: head/stand/ficl.mk head/stand/ficl/Makefile Modified: head/stand/ficl.mk ============================================================================== --- head/stand/ficl.mk Fri Dec 8 22:06:18 2017 (r326719) +++ head/stand/ficl.mk Fri Dec 8 22:19:41 2017 (r326720) @@ -12,8 +12,6 @@ FICL_CPUARCH= mips64 FICL_CPUARCH= ${MACHINE_CPUARCH} .endif -.PATH: ${FICLSRC} ${FICLSRC}/${FICL_CPUARCH} - .if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 0 CFLAGS+= -fPIC .endif Modified: head/stand/ficl/Makefile ============================================================================== --- head/stand/ficl/Makefile Fri Dec 8 22:06:18 2017 (r326719) +++ head/stand/ficl/Makefile Fri Dec 8 22:19:41 2017 (r326720) @@ -4,6 +4,8 @@ .include .include "${BOOTSRC}/ficl.mk" +.PATH: ${FICLSRC} ${FICLSRC}/${FICL_CPUARCH} + BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ prefix.c search.c stack.c tools.c vm.c words.c From owner-svn-src-head@freebsd.org Sat Dec 9 02:07:43 2017 Return-Path: Delivered-To: svn-src-head@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 6E463E9747B for ; Sat, 9 Dec 2017 02:07:43 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (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 244A56E9B2 for ; Sat, 9 Dec 2017 02:07:43 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x229.google.com with SMTP id y187so5001271ywd.12 for ; Fri, 08 Dec 2017 18:07:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=/mhik2BOa6rTzs9j/IL4EBgADT6Jw276HpAA6u6eg7w=; b=XWvDwgu/PU8YY/1AsXiLzQUWYMNVfCoVwbl0ausHPh/eX5f+2Cwkcv4xms2o6Ma+xr 2d09FAJMKspPbg6qrQQOVl2IwZbcNVblr1x3vObeMORh5Zkc55dSr177Ch5KVYnyyoKm BzqymdlwbCF5WnUHJVudZoeCPx0Krmf7/DY1Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=/mhik2BOa6rTzs9j/IL4EBgADT6Jw276HpAA6u6eg7w=; b=vvku4sUzgO7rmYCD+bp3Rlr3IVIz2GRZSb+XGTl/sgTP4hTcKqNB9CgoMeRv3GE7uK wGpdSG5NiWwb0pUy0Ob9CI/X9Cht46eT1AkSUHrMgZvnD9BRDBnMnosbvlX6DR8n0dVT LTyGHwx3I1A/kh2O3dbg9Oh8NuqNjvHKzL+3m6n8/IV424lp54l13zKrNmD6PY8CQKuf NR18o5MY+pWxCO5WK+rdw6RUH43yHkonrZXTWSFWUc1pCNIytE9yS+FhlqHVwvfn9jPk h78rEAJ6rf8w+EoosaJsLMTqKSZaqbzy6bsj6XeF2+IE7UNe1Ay6SGg2PGFYgvVOJR25 KmNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=/mhik2BOa6rTzs9j/IL4EBgADT6Jw276HpAA6u6eg7w=; b=Au/2b6UkMH7idKKezbH6izHrUUNm/IG6ZkDWXF2l9NyhcCbHolV+t/VGjZxkOAhWeS hax++wAcGmwTz8Qt5eZwJWgmEck04DrdKWxke4PJ/qbOnq2vytfo6VrsdxYtTRCw/VSs pgIHouBvakn/OeplgXhiHJhWdZMbp6/F3dww86COuhd6Waic1HwZZj5o8JylNJMe0C8d 3NLAo6opvxTDGnJ2jw3AsMeUKAzOeOHEVU04tWexebj91dq0hecRBbApBJP8on6LN7AR 7rnw3zDbJ7JRdoQfuujMdK1OGvGiSfhgOul9WsHUyIijjuxwMlvxZSk0j/J0jRqaNExN OMUQ== X-Gm-Message-State: AKGB3mLAl17/wTcYDvKHI/b5U5waCrmD6MZTKuV6ymv/LaNNam1f+qXx iaclZrdOJYZ+uTgwsY8ZFEXN1RFlYXq8wc8mvOhDRA== X-Google-Smtp-Source: AGs4zMaIM7mUIyRsb3QFGITwQFOLz4lgsCXc9kePRLT/M+4ZX3ZdpR5USEq8fPk3KO4fNcuKrMAJGfEpA970tXDyrxQ= X-Received: by 10.129.156.77 with SMTP id t74mr12340716ywg.279.1512785257322; Fri, 08 Dec 2017 18:07:37 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.37.15.66 with HTTP; Fri, 8 Dec 2017 18:07:06 -0800 (PST) In-Reply-To: <201712082011.vB8KBUsA068552@pdx.rh.CN85.dnsmgr.net> References: <201712082011.vB8KBUsA068552@pdx.rh.CN85.dnsmgr.net> From: Eitan Adler Date: Fri, 8 Dec 2017 18:07:06 -0800 X-Google-Sender-Auth: NE9GhplC6TSMlrYZQpm6HNNsqFw Message-ID: Subject: Re: svn commit: r326614 - in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee To: rgrimes@freebsd.org Cc: cem@freebsd.org, src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 02:07:43 -0000 On 8 December 2017 at 12:11, Rodney W. Grimes wrote: > Ping, I have not seen this reverted and recommitted with a reasonable > explination as to why this change is actually desired. Sorry, work has been busy and as the crux was reverted it didn't feel as urgent[0]. The answer is that shell scripts in scripts don't need to be chmod +x to work. In fact most are not. Of the tests I found from a simple search: 65 are chmod +x 84 are chmod -x The entirety of the changed config is: "chmod": { "type": "chmod", + "exclude": "(/tests/)" }, which simply disables this test during 'arc diff'. [0] I still owe everyone a reply the original thread -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Sat Dec 9 04:23:25 2017 Return-Path: Delivered-To: svn-src-head@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 12B9DE9E20B; Sat, 9 Dec 2017 04:23:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com [209.85.214.52]) (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 9900074DD8; Sat, 9 Dec 2017 04:23:24 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f52.google.com with SMTP id p139so8053374itb.1; Fri, 08 Dec 2017 20:23:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=etAH1DXjfUnh4WKY3tJhZaCN/DHANzjRV/125DPRvtc=; b=e7a7XsB/6PpBxFeIlNG/wqzzd6SbxBsTyr1k21MuLBEe1utMg4dl0NgH1aKCitV/dk lO5PpGOrS1U/VFkhKdrWl/rwKNB9ZCdWuAaVCSa2MxDo2yqUikip5Xk+dHvTQ5hPSeKS eCgGsIo3y5jmoppZ8kTD38ms4RpLDaODV4xyu7EDqsdzKltR5yrik2MariKNjRJ0dARt VwZn5CZ6vQe3NJRhp1IKy3AH3QbJc0D+xqm4F4FjJsVb+gLQQFlEDP1/+SXDKdiKyQ2S uR1IZAshLsTnGv3OZMyTcsf9YuzoBQbwosYoDsQb7uub2WMgwRifeXDfFNNTwGHk3oUe I5GQ== X-Gm-Message-State: AKGB3mInlxQ+cAaDOmMon/em3JOy6Sx0tTAtA18vMWw826v2Uxslhwdt qGwvo8pAHSS41+HayaIRu5onQU4J X-Google-Smtp-Source: AGs4zMbIBhoEdBP7GruJo12GjbZoL8qxZw5AaJREF+03rGD32EjSFXN8y4WUBVMzRTlRTyywENnZhQ== X-Received: by 10.36.217.208 with SMTP id p199mr9000287itg.106.1512793397794; Fri, 08 Dec 2017 20:23:17 -0800 (PST) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com. [209.85.223.181]) by smtp.gmail.com with ESMTPSA id e7sm1496718ita.17.2017.12.08.20.23.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Dec 2017 20:23:17 -0800 (PST) Received: by mail-io0-f181.google.com with SMTP id s37so4437301ioe.10; Fri, 08 Dec 2017 20:23:17 -0800 (PST) X-Received: by 10.107.131.99 with SMTP id f96mr43987971iod.215.1512793397533; Fri, 08 Dec 2017 20:23:17 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Fri, 8 Dec 2017 20:23:17 -0800 (PST) In-Reply-To: References: <201712082011.vB8KBUsA068552@pdx.rh.CN85.dnsmgr.net> From: Conrad Meyer Date: Fri, 8 Dec 2017 20:23:17 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326614 - in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee To: Eitan Adler Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 04:23:25 -0000 On Fri, Dec 8, 2017 at 6:07 PM, Eitan Adler wrote: > On 8 December 2017 at 12:11, Rodney W. Grimes > wrote: > >> Ping, I have not seen this reverted and recommitted with a reasonable >> explination as to why this change is actually desired. > > Sorry, work has been busy and as the crux was reverted it didn't feel > as urgent[0]. It's fine, it's not urgent. > The answer is that shell scripts in scripts don't need > to be chmod +x to work. In fact most are not. > Of the tests I found from a simple search: > 65 are chmod +x > 84 are chmod -x Great. Please re-apply the change with something like that in the commit message, when you get a chance. It shouldn't take more than a minute or two. Conrad From owner-svn-src-head@freebsd.org Sat Dec 9 04:57:44 2017 Return-Path: Delivered-To: svn-src-head@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 14343EA0AC0; Sat, 9 Dec 2017 04:57:44 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) (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 9E9DE769D5; Sat, 9 Dec 2017 04:57:43 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-io0-f174.google.com with SMTP id e204so4474046iof.12; Fri, 08 Dec 2017 20:57:43 -0800 (PST) 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:cc; bh=Ez/wrVTtV/q3A1INAIAFBRNeaUxF8+fpIwqvQYdOhJE=; b=k/p9AVofkxy4VGUFb9QthPaTomp46pGwenC+ndldEwhyzGyiQarLKO2aRh3sRu8Cji laFiTn1AuBKaO+sLt+RRV8IvWi4Iv4pW6MCcsyvd7LnZHVKuQqXNc1YZ77dTR2Aifr+m AlB+k2sY7GNvjezUXAJGkNm7yUssEBF1abnA/Vk2cqcm/tnbquITPBwIhDkDRvmbVntR GfvivXw+yV896pUWXe19L4y55auxKE7bNXS1axhogik3ldsfFcKfxMwouE/U7wGyO01S 1Pp5lFMA8OY5hpKNe204/oVgUVQbTa2Rfn1XMufjmHlldcsWfT8rLn5sDOu4Tx3M43pH gaBQ== X-Gm-Message-State: AJaThX7PKnaSqaTMaPUh7DG8sM4jj/t6KF5IFtqHkSOofiheoMO6gP1y GsP8rU4ESvtyHSi5jiWYR7EHQvzK X-Google-Smtp-Source: AGs4zMZybjw6FOjPhCCr92/jYeUI+dWFAygh+bOve2CoH3juLcxX1I8hc1tOIiY+KDL3Zvv0zLMhSQ== X-Received: by 10.107.169.209 with SMTP id f78mr43302473ioj.162.1512789376974; Fri, 08 Dec 2017 19:16:16 -0800 (PST) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com. [209.85.223.180]) by smtp.gmail.com with ESMTPSA id r125sm1449925iod.74.2017.12.08.19.16.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Dec 2017 19:16:16 -0800 (PST) Received: by mail-io0-f180.google.com with SMTP id v186so4361869iod.7; Fri, 08 Dec 2017 19:16:15 -0800 (PST) X-Received: by 10.107.114.19 with SMTP id n19mr5216971ioc.224.1512789375486; Fri, 08 Dec 2017 19:16:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.164.151 with HTTP; Fri, 8 Dec 2017 19:16:14 -0800 (PST) Received: by 10.107.164.151 with HTTP; Fri, 8 Dec 2017 19:16:14 -0800 (PST) In-Reply-To: References: <201712082011.vB8KBUsA068552@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Fri, 8 Dec 2017 21:16:14 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326614 - in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee To: Eitan Adler Cc: rgrimes@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 04:57:44 -0000 On Dec 8, 2017 8:07 PM, "Eitan Adler" wrote: On 8 December 2017 at 12:11, Rodney W. Grimes wrote: > Ping, I have not seen this reverted and recommitted with a reasonable > explination as to why this change is actually desired. Sorry, work has been busy and as the crux was reverted it didn't feel as urgent[0]. The answer is that shell scripts in scripts don't need to be chmod +x to work. In fact most are not. Of the tests I found from a simple search: 65 are chmod +x 84 are chmod -x The entirety of the changed config is: "chmod": { "type": "chmod", + "exclude": "(/tests/)" }, which simply disables this test during 'arc diff'. +1 to this change, but I think it would've been worthy of its own commit. I don't recall off-hand if it's ATF-specific or not- in that case, at least, the scripts are merely being processed into atf-sh script for when it ends up in /usr/tests. It's probably worth double checking the non-ATF case to make sure -x won't break their expected execution, though. - Kyle Evans From owner-svn-src-head@freebsd.org Sat Dec 9 05:05:26 2017 Return-Path: Delivered-To: svn-src-head@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 7EC48EA0E1C; Sat, 9 Dec 2017 05:05:26 +0000 (UTC) (envelope-from imp@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 4C25776E81; Sat, 9 Dec 2017 05:05:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB955PER026082; Sat, 9 Dec 2017 05:05:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB955PQh026081; Sat, 9 Dec 2017 05:05:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712090505.vB955PQh026081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 9 Dec 2017 05:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326724 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 326724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 05:05:26 -0000 Author: imp Date: Sat Dec 9 05:05:25 2017 New Revision: 326724 URL: https://svnweb.freebsd.org/changeset/base/326724 Log: Add two dates derived from looking at archival source tarballs in the TUHS collection for 7th Edition and V32. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Sat Dec 9 03:45:23 2017 (r326723) +++ head/share/misc/bsd-family-tree Sat Dec 9 05:05:25 2017 (r326724) @@ -408,7 +408,7 @@ Fifth Edition 1974-06-xx [QCU] above 50 installations Sixth Edition 1975-05-xx [QCU] port to DEC Vax -Seventh Edition 1979-01-xx [QCU] +Seventh Edition 1979-01-xx [QCU] 1979-01-10 [TUHS] first portable UNIX Eighth Edition 1985-02-xx [QCU] VAX 11/750, VAX 11/780 [dmr] @@ -440,7 +440,7 @@ Tenth Edition 1989-10-xx [QCU] 2.11BSD 1992-02-xx [SMS] 2.11BSD rev #430 1999-12-13 [SMS] -32V 1978-1[01]-xx [QCU] +32V 1978-1[01]-xx [QCU] 1979-03-26 [TUHS] 3BSD late 1979 [QCU] March 1980 [TUHS] virtual memory, page replacement, demand paging From owner-svn-src-head@freebsd.org Sat Dec 9 06:52:21 2017 Return-Path: Delivered-To: svn-src-head@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 E9969E80EE1; Sat, 9 Dec 2017 06:52:21 +0000 (UTC) (envelope-from imp@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 AD03679997; Sat, 9 Dec 2017 06:52:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB96qKb6071875; Sat, 9 Dec 2017 06:52:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB96qKP8071869; Sat, 9 Dec 2017 06:52:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712090652.vB96qKP8071869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 9 Dec 2017 06:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326725 - in head/usr.sbin: . efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/usr.sbin: . efibootmgr X-SVN-Commit-Revision: 326725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 06:52:22 -0000 Author: imp Date: Sat Dec 9 06:52:20 2017 New Revision: 326725 URL: https://svnweb.freebsd.org/changeset/base/326725 Log: Import Netflix's efibootmgr to help manage UEFI boot variables efibootmgr manages the UEFI BootXXXX variables that implement the UEFI Boot Manager protocol defined in the UEFI standards. It is modeled after the Linux program of the same name with a mostly compatible set of command line options. Since there's a fair amount of OS specifioc code due to differeing names and methods of doing things, the compatibility isn't 100%. Basic functionality is implemented, though the more advanced next boot functionality that's been defined elsewhere is unimplemented. Submitted by: Matt Williams (with unix / efi path xlate by me) Sponsored by: Netflix Added: head/usr.sbin/efibootmgr/ head/usr.sbin/efibootmgr/Makefile (contents, props changed) head/usr.sbin/efibootmgr/efibootmgr.8 (contents, props changed) head/usr.sbin/efibootmgr/efibootmgr.c (contents, props changed) Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Sat Dec 9 05:05:25 2017 (r326724) +++ head/usr.sbin/Makefile Sat Dec 9 06:52:20 2017 (r326725) @@ -123,7 +123,7 @@ SUBDIR.${MK_BSNMP}+= bsnmpd SUBDIR.${MK_CTM}+= ctm SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_DIALOG}+= bsdconfig -SUBDIR.${MK_EFI}+= efivar efidp +SUBDIR.${MK_EFI}+= efivar efidp efibootmgr SUBDIR.${MK_FLOPPY}+= fdcontrol SUBDIR.${MK_FLOPPY}+= fdformat SUBDIR.${MK_FLOPPY}+= fdread Added: head/usr.sbin/efibootmgr/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/efibootmgr/Makefile Sat Dec 9 06:52:20 2017 (r326725) @@ -0,0 +1,14 @@ +# $FreeBSD$ +EFIBOOT=${SRCTOP}/stand/efi +EFIINCL=${SRCTOP}/stand/efi/include +EFIVAR=${SRCTOP}/usr.sbin/efivar +.PATH: ${EFIBOOT}/libefi ${EFIVAR} +CFLAGS+= -I${EFIVAR} -I${EFIINCL} + +PROG=efibootmgr +MAN= efibootmgr.8 +SRCS= efichar.c efiutil.c efibootmgr.c + +LIBADD= efivar geom + +.include Added: head/usr.sbin/efibootmgr/efibootmgr.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/efibootmgr/efibootmgr.8 Sat Dec 9 06:52:20 2017 (r326725) @@ -0,0 +1,150 @@ +.\" Copyright (c) 2017 Netflix, Inc +.\" 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 THE 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 THE 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 December 8, 2017 +.Dt EFIBOOTMGR 8 +.Os +.Sh NAME +.Nm efibootmgr +.Nd manipulate the EFI Boot Manager +.Sh SYNOPSIS +.Op Fl aAnNB Ar Bootvar +.Op Fl t Ar timeout +.Op Fl T +.Op Fl o Ar bootorder +.Op Fl verbose +.Op Fl c -k Ar kernel -l Ar loader [-L Ar label] [--dry-run] +.Sh "DESCRIPTION" +.Nm +manipulates how UEFI Boot Managers boot the system. +Methods of booting can be created and destroyed. +Boot methods can be activated or deactivated. +The order of boot methods tried can be changed. +Temporary boot methods can override the usual booting methods. +.Pp +The UEFI standard defines how hosts may control what is used to +bootstrap the system. +Each method is encapsulated within a persistent UEFI variable, stored +by the UEFI BIOS of the form +.Va BootXXXX . +These variables are numbered, describe where to load the bootstrap +program from, and whether or not the method is active. +The boot order of these methods is controlled by another variable +.Va BootOrder . +The currently booting method is communicated using +.Va BootCurrent . +A global timeout can also be set. +.Pp +.Nm +requires that the kernel efirt module to get and set these +non-volatile variables. +.Pp +The following options are available: +.Bl -tag -width 28m +.It Fl c Fl -create +Create a new Boot Variable +.It Fl l -loader Ar loader +The path to and name of the loader. +.It Fl k -kernel Ar kernel +The path to and name of the kernel. +.It Fl L -label Ar label +An optional description for the entry. +.It Fl D -dry-run +Process but do not set the given BootVar. +.It Fl B -delete Ar BootVarNum +Delete the given BootVar Num. +.It Fl a -activate Ar BootVarNum +Activate the given BootVarNum. +.It Fl A -deactivate Ar BootVarNum +Deactivate the given BootVarNum. +.It Fl n -bootnext Ar BootVarNum +Set BootVarNum as the BootNext variable. +.It Fl N -delete-bootnext +Delete the BootNext optional BootVar. +.It Fl o -bootorder Ar bootorder +Set BootOrder variable to the given comma delimited set of BootVarNums. +The numbers are in hex to match BootXXXX, but may omit leading zeros. +.It Fl t -set-timeout Ar timeout +Set the bootmenu timeout value. +.It Fl T -del-timeout +Delete the BootTimeout variable. +.It Fl v -verbose +Display the device path of BootVars in the output. +.El +.Pp +.Sh Exammples +.Pp +To Display the current Boot related variables in the system: +.Pp +.Dl efibootmgr [-v] +.Pp +This will display the optional BootNext BootVar, BootCurrent, +or currently booted BootVar, followed by the optional Timeout value, any +BootOrder that maybe set, followed finally by all currently defined Boot +variables, active or not. The verbose flag will augment this output with +the hardrive partition uuids, size/offset and device-path of the +variable. +.Pp +The +.Nm +program can be used to create new EFI boot variables. To create a new +boot var pointing to an installation on partition 1 of device ada0 using +the given loader with a description FreeBSD-11: +.Pp +.Dl efibootmgr -c -d ada0 -p 1 -l/EFI/BOOT/BOOTX64.EFI -L FreeBSD-11 +.Pp +This will result in the next available BootVarNum being assigned to a +new UEFI load variable, and given the label "FreeBSD-11" such as: +.Pp +.Dl Boot0009 FreeBSD-11 +.Pp +Note newly created BootVars are created inactive. The active state is denoted +by an '*' following the BootVar name in the output. They are also inserted +into the first position of current BootOrder variable if it exists. They +must first be set to active before being considered available to attempt booting from, else they +are ignored. +.Pp +.Dl efibootmgr -B 0009 +.Pp +Will delete the given BootVar Boot0009 +.Pp +To set a given newly created BootVar active use: +.Pp +.Dl efibootmgr -a 0009 +.Pp +To set a given BootVar to be used as the BootNext variable, irrespective +of its active state, use: +.Pp +.Dl efibootmgr -n 0009 +.Pp +To set the BootOrder for the next reboot use: +.Pp +.Dl efibootmgr -o 0009,0003,... +.Pp +.Sh SEE ALSO +.Xr efivar 8 , +.Xr uefi 8 , +.Xr gpart 8 Added: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/efibootmgr/efibootmgr.c Sat Dec 9 06:52:20 2017 (r326725) @@ -0,0 +1,874 @@ +/*- + * Copyright (c) 2017 Netflix, Inc. + * 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 + * in this position and unchanged. + * 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 THE AUTHOR ``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 THE AUTHOR 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifndef LOAD_OPTION_ACTIVE +#define LOAD_OPTION_ACTIVE 0x00000001 +#endif + +#ifndef LOAD_OPTION_CATEGORY_BOOT +#define LOAD_OPTION_CATEGORY_BOOT 0x00000000 +#endif + +#define BAD_LENGTH ((size_t)-1) + +typedef struct _bmgr_opts { + char *dev; + char *env; + char *loader; + char *label; + char *kernel; + char *name; + char *order; + int bootnum; + bool copy; + bool create; + bool delete; + bool delete_bootnext; + bool del_timeout; + bool dry_run; + bool once; + int part; + int cp_src; + bool set_active; + bool set_bootnext; + bool set_inactive; + bool set_timeout; + int timeout; + bool verbose; +} bmgr_opts_t; + +static struct option lopts[] = { + {"activate", required_argument, NULL, 'a'}, + {"bootnext", required_argument, NULL, 'n'}, /* set bootnext */ + {"bootorder", required_argument, NULL, 'o'}, /* set order */ + {"copy", required_argument, NULL, 'C'}, /* Copy boot method */ + {"create", no_argument, NULL, 'c'}, + {"deactivate", required_argument, NULL, 'A'}, + {"del-timout", no_argument, NULL, 'T'}, + {"delete", required_argument, NULL, 'B'}, + {"delete-bootnext", required_argument, NULL, 'N'}, + {"device", required_argument, NULL, 'd'}, + {"dry-run", no_argument, NULL, 'D'}, + {"env", required_argument, NULL, 'e'}, + {"help", no_argument, NULL, 'h'}, + {"kernel", required_argument, NULL, 'k'}, + {"label", required_argument, NULL, 'L'}, + {"loader", required_argument, NULL, 'l'}, + {"once", no_argument, NULL, 'O'}, + {"partition", required_argument, NULL, 'p'}, + {"set-timeout", required_argument, NULL, 't'}, + {"verbose", no_argument, NULL, 'v'}, + { NULL, 0, NULL, 0} +}; + +/* global efibootmgr opts */ +static bmgr_opts_t opts; + +static LIST_HEAD(efivars_head, entry) efivars = + LIST_HEAD_INITIALIZER(efivars); + +struct entry { + efi_guid_t guid; + uint32_t attrs; + uint8_t *data; + size_t size; + char *name; + char *label; + int idx; + int part; + + LIST_ENTRY(entry) entries; +}; + +#define MAX_DP_LEN 4096 +#define MAX_LOADOPT_LEN 8192 + + +static char * +mangle_loader(char *loader) +{ + char *c; + + for (c = loader; *c; c++) + if (*c == '/') + *c = '\\'; + + return loader; +} + + +#define COMMON_ATTRS EFI_VARIABLE_NON_VOLATILE | \ + EFI_VARIABLE_BOOTSERVICE_ACCESS | \ + EFI_VARIABLE_RUNTIME_ACCESS + +/* + * We use global guid, and common var attrs and + * find it better to just delete and re-create a var. + */ +static int +set_bootvar(const char *name, uint8_t *data, size_t size) +{ + + efi_del_variable(EFI_GLOBAL_GUID, name); + return efi_set_variable(EFI_GLOBAL_GUID, name, data, size, + COMMON_ATTRS); +} + + +#define USAGE \ + " [-aAnNB Bootvar] [-t timeout] [-T] [-o bootorder] [-O] [--verbose] [--help] \n \ + [-c -d device -p partition -l loader [-L label] [--dry-run]]" + +#define CREATE_USAGE \ + " efibootmgr -c -d device -p partition -loader loader [-L label ] [--dry-run]" +#define ORDER_USAGE \ + " efibootmgr -o bootvarnum1,bootvarnum2,..." +#define TIMEOUT_USAGE \ + " efibootmgr -t seconds" +#define DELETE_USAGE \ + " efibootmgr -B bootvarnum" +#define ACTIVE_USAGE \ + " efibootmgr [-a | -A] bootvarnum" +#define BOOTNEXT_USAGE \ + " efibootmgr [-n | -N] bootvarnum" + +static void +parse_args(int argc, char *argv[]) +{ + int ch; + + while ((ch = getopt_long(argc, argv, "A:a:B:C:cDd:e:hk:L:l:Nn:Oo:p:Tt:v", + lopts, NULL)) != -1) { + switch (ch) { + case 'A': + opts.set_inactive = true; + opts.bootnum = strtoul(optarg, NULL, 16); + break; + case 'a': + opts.set_active = true; + opts.bootnum = strtoul(optarg, NULL, 16); + break; + case 'B': + opts.delete = true; + opts.bootnum = strtoul(optarg, NULL, 16); + break; + case 'C': + opts.copy = true; + opts.cp_src = strtoul(optarg, NULL, 16); + case 'c': + opts.create = true; + break; + case 'D': /* should be remove dups XXX */ + opts.dry_run = true; + break; + case 'd': + opts.dev = optarg; + break; + case 'e': + opts.env = strdup(optarg); + break; + case 'h': + default: + errx(1, "%s", USAGE); + break; + case 'k': + opts.kernel = strdup(optarg); + break; + case 'L': + opts.label = strdup(optarg); + break; + case 'l': + opts.loader = strdup(optarg); + opts.loader = mangle_loader(opts.loader); + break; + case 'N': + opts.delete_bootnext = true; + break; + case 'n': + opts.set_bootnext = true; + opts.bootnum = strtoul(optarg, NULL, 16); + break; + case 'O': + opts.once = true; + break; + case 'o': + opts.order = strdup(optarg); + break; + case 'p': + opts.part = strtoul(optarg, NULL, 10); + break; + case 'T': + opts.del_timeout = true; + break; + case 't': + opts.set_timeout = true; + opts.timeout = strtoul(optarg, NULL, 10); + break; + case 'v': + opts.verbose = true; + break; + } + } + if (opts.create) { + if (!(opts.loader && opts.dev && opts.part)) + errx(1, "%s",CREATE_USAGE); + return; + } + if (opts.set_bootnext && !(opts.bootnum)) + errx(1, "%s", BOOTNEXT_USAGE); + + if ((opts.set_active || opts.set_inactive) && !(opts.bootnum)) + errx(1, "%s", ACTIVE_USAGE); + + if (opts.order && !(opts.order)) + errx(1, "%s", ORDER_USAGE); +} + + +static void +print_order() +{ + uint32_t attrs; + uint8_t *data; + size_t size, i; + + if (efi_get_variable(EFI_GLOBAL_GUID, "BootOrder", &data, &size, &attrs) < 0) + errx(1, "Couldn't get value for BootOrder\n"); + + if (size % 2 == 1) + errx(1, "Bad BootOrder variable: odd length"); + + printf("BootOrder : "); + for (i = 0; i < size; i += 2) + printf("%04x%s", le16dec(data + i), i == size - 2 ? "\n" : ", "); +} + + +static void +read_vars(void) +{ + + efi_guid_t *guid; + char *next_name = NULL; + int ret = 0; + + struct entry *nent; + + LIST_INIT(&efivars); + while ((ret = efi_get_next_variable_name(&guid, &next_name)) > 0) { + /* + * Only pay attention to the EFI:BootXXXX variables to get the list. + */ + if (efi_guid_cmp(guid, &EFI_GLOBAL_GUID) != 0 || + strlen(next_name) != 8 || + strncmp(next_name, "Boot", 4) != 0 || + !isxdigit(next_name[4]) || + !isxdigit(next_name[5]) || + !isxdigit(next_name[6]) || + !isxdigit(next_name[7])) + continue; + nent = malloc(sizeof(struct entry)); + nent->name = strdup(next_name); + + ret = efi_get_variable(*guid, next_name, &nent->data, + &nent->size, &nent->attrs); + if (ret < 0) + err(1, "efi_get_variable"); + nent->guid = *guid; + nent->idx = strtoul(&next_name[4], NULL, 16); + LIST_INSERT_HEAD(&efivars, nent, entries); + } +} + + +static void +set_boot_order(char *order) +{ + uint16_t *new_data; + size_t size; + char *next, *cp; + int cnt; + int i; + + cp = order; + cnt = 1; + while (*cp) { + if (*cp++ == ',') + cnt++; + } + size = sizeof(uint16_t) * cnt; + new_data = malloc(size); + + i = 0; + cp = strdup(order); + while ((next = strsep(&cp, ",")) != NULL) { + new_data[i] = strtoul(next, NULL, 16); + if (new_data[i] == 0 && errno == EINVAL) { + warnx("can't parse %s as a numb", next); + errx(1, "%s", ORDER_USAGE); + } + i++; + } + free(cp); + if (set_bootvar("BootOrder", (uint8_t*)new_data, size) < 0) + err(1, "Unabke to set BootOrder to %s", order); +} + +static void +handle_activity(int bootnum, bool active) +{ + uint32_t attrs, load_attrs; + uint8_t *data; + size_t size; + char *name; + + asprintf(&name, "%s%04X", "Boot", bootnum); + if (name == NULL) + err(1, "asprintf"); + if (efi_get_variable(EFI_GLOBAL_GUID, name, &data, &size, &attrs) < 0) + err(1, "No such bootvar %s\n", name); + + load_attrs = le32dec(data); + + if (active) + load_attrs |= LOAD_OPTION_ACTIVE; + else + load_attrs &= ~LOAD_OPTION_ACTIVE; + + le32enc(data, load_attrs); + + if (set_bootvar(name, data, size) < 0) + err(1, "handle activity efi_set_variable"); +} + + +/* + * add boot var to boot order. + * called by create boot var. There is no option + * to add one independent of create. + * + * Note: we currently don't support where it goes + * so it goes on the front, inactive. + * use -o 2,3,7 etc to affect order, -a to activate. + */ +static void +add_to_boot_order(char *bootvar) +{ + size_t size; + uint32_t attrs; + uint16_t val; + uint8_t *data, *new; + + val = strtoul(&bootvar[4], NULL, 16); + + if (efi_get_variable(EFI_GLOBAL_GUID, "BootOrder", &data, &size, &attrs) < 0) { + if (errno == ENOENT) { /* create it and set this bootvar to active */ + size = 0; + data = NULL; + } else + err(1, "efi_get_variable BootOrder"); + } + + /* + * We have BootOrder with the current order + * so grow the array by one, add the value + * and write the new variable value. + */ + size += sizeof(uint16_t); + new = malloc(size); + if (!new) + err(1, "malloc"); + + le16enc(new, val); + if (size > sizeof(uint16_t)) + memcpy(new + sizeof(uint16_t), data, size - sizeof(uint16_t)); + + if (set_bootvar("BootOrder", new, size) < 0) + err(1, "set_bootvar"); + free(new); +} + + +static void +remove_from_order(uint16_t bootnum) +{ + uint32_t attrs; + size_t size, i, j; + uint8_t *new, *data; + + if (efi_get_variable(EFI_GLOBAL_GUID, "BootOrder", &data, &size, &attrs) < 0) + return; + + new = malloc(size); + if (new == NULL) + err(1, "malloc"); + + for (j = i = 0; i < size; i += sizeof(uint16_t)) { + if (le16dec(data + i) == bootnum) + continue; + memcpy(new + j, data + i, sizeof(uint16_t)); + j += sizeof(uint16_t); + } + if (i == j) + warnx("Boot variable %04x not in BootOrder", bootnum); + else if (set_bootvar("BootOrder", new, j) < 0) + err(1, "Unable to update BootOrder with new value"); + free(new); +} + + +static void +delete_bootvar(int bootnum) +{ + char *name; + int defer = 0; + + /* + * Try to delete the boot variable and remocve it + * from the boot order. We always do both actions + * to make it easy to clean up from oopses. + */ + if (bootnum < 0 || bootnum > 0xffff) + errx(1, "Bad boot variable %#x", bootnum); + asprintf(&name, "%s%04X", "Boot", bootnum); + if (name == NULL) + err(1, "asprintf"); + printf("Removing boot variable '%s'\n", name); + if (efi_del_variable(EFI_GLOBAL_GUID, name) < 0) { + defer = 1; + warn("cannot delete variable %s", name); + } + printf("Removing 0x%x from BootOrder\n", bootnum); + remove_from_order(bootnum); + free(name); + if (defer) + exit(defer); +} + + +static void +del_bootnext(void) +{ + + if (efi_del_variable(EFI_GLOBAL_GUID, "BootNext") < 0) + err(1, "efi_del_variable"); +} + +static void +handle_bootnext(uint16_t bootnum) +{ + uint16_t num; + + le16enc(&num, bootnum); + if (set_bootvar("BootNext", (uint8_t*)&bootnum, sizeof(uint16_t)) < 0) + err(1, "set_bootvar"); +} + + +static int +compare(const void *a, const void *b) +{ + uint16_t c; + uint16_t d; + + memcpy(&c, a, sizeof(uint16_t)); + memcpy(&d, b, sizeof(uint16_t)); + + if (c < d) + return -1; + if (c == d) + return 0; + return 1; +} + +static char * +make_next_boot_var_name() +{ + struct entry *v; + uint16_t *vals, next_free = 0; + char *name; + int cnt = 0; + int i; + + LIST_FOREACH(v, &efivars, entries) { + cnt++; + } + + vals = malloc(sizeof(uint16_t) * cnt); + if (!vals) + return NULL; + + i = 0; + LIST_FOREACH(v, &efivars, entries) { + vals[i++] = v->idx; + } + qsort(vals, cnt, sizeof(uint16_t), compare); + /* if the hole is at the beginning, just return zero */ + if (vals[0] > 0) { + next_free = 0; + } else { + /* now just run the list looking for the first hole */ + for (i = 0; i < cnt - 1 && next_free == 0; i++) + if (vals[i] != vals[i + 1] + 1) + next_free = vals[i] + 1; + if (next_free == 0) + next_free = vals[cnt - 1] + 1; + /* In theory we could have used all 65k slots -- what to do? */ + } + free(vals); + + asprintf(&name, "%s%04X", "Boot", next_free); + if (name == NULL) + err(1, "asprintf"); + return name; +} + + +static size_t +create_loadopt(uint8_t *buf, size_t bufmax, uint32_t attributes, efidp dp, size_t dp_size, + const char *description, const uint8_t *optional_data, size_t optional_data_size) +{ + efi_char *bbuf = NULL; + uint8_t *pos = buf; + size_t desc_len = 0; + size_t len; + + if (optional_data == NULL && optional_data_size != 0) + return BAD_LENGTH; + if (dp == NULL && dp_size != 0) + return BAD_LENGTH; + + /* + * Compute the length to make sure the passed in buffer is long enough. + */ + utf8_to_ucs2(description, &bbuf, &desc_len); + len = sizeof(uint32_t) + sizeof(uint16_t) + desc_len + dp_size + optional_data_size; + if (len > bufmax) { + free(bbuf); + return BAD_LENGTH; + } + + le32enc(pos, attributes); + pos += sizeof (attributes); + + le16enc(pos, dp_size); + pos += sizeof (uint16_t); + + memcpy(pos, bbuf, desc_len); /* NB:desc_len includes strailing NUL */ + pos += desc_len; + free(bbuf); + + memcpy(pos, dp, dp_size); + pos += dp_size; + + if (optional_data && optional_data_size > 0) { + memcpy(pos, optional_data, optional_data_size); + pos += optional_data_size; + } + + return pos - buf; +} + + +static int +make_boot_var(const char *label, const char *loader, const char *kernel, const char *env, bool dry_run) +{ + struct entry *new_ent; + uint32_t load_attrs = 0; + uint8_t *load_opt_buf; + size_t lopt_size, llen, klen; + efidp dp, loaderdp, kerneldp; + char *bootvar = NULL; + int ret; + + bootvar = make_next_boot_var_name(); + if (bootvar == NULL) + err(1, "bootvar creation"); + if (loader == NULL) + errx(1, "Must specify boot loader"); + if (efivar_unix_path_to_device_path(loader, &loaderdp) != 0) + err(1, "Cannot translate unix loader path '%s' to UEFI", loader); + if (kernel != NULL) { + if (efivar_unix_path_to_device_path(kernel, &kerneldp) != 0) + err(1, "Cannot translate unix kernel path '%s' to UEFI", kernel); + } else { + kerneldp = NULL; + } + llen = efidp_size(loaderdp); + klen = efidp_size(kerneldp); + dp = malloc(llen + klen); + memcpy(dp, loaderdp, llen); + if (kerneldp != NULL) + memcpy((char *)dp + llen, kerneldp, klen); + + /* don't make the new bootvar active by default, use the -a option later */ + load_attrs = LOAD_OPTION_CATEGORY_BOOT; + load_opt_buf = malloc(MAX_LOADOPT_LEN); + if (load_opt_buf == NULL) + err(1, "malloc"); + + lopt_size = create_loadopt(load_opt_buf, MAX_LOADOPT_LEN, load_attrs, + dp, llen + klen, label, env, strlen(env) + 1); + if (lopt_size == BAD_LENGTH) + errx(1, "Can't crate loadopt"); + + ret = 0; + if (!dry_run) { + ret = efi_set_variable(EFI_GLOBAL_GUID, bootvar, + (uint8_t*)load_opt_buf, lopt_size, COMMON_ATTRS); + } + + if (ret) + err(1, "efi_set_variable"); + + add_to_boot_order(bootvar); /* first, still not active */ + new_ent = malloc(sizeof(struct entry)); + if (new_ent == NULL) + err(1, "malloc"); + memset(new_ent, 0, sizeof(struct entry)); + new_ent->name = bootvar; + new_ent->guid = EFI_GLOBAL_GUID; + LIST_INSERT_HEAD(&efivars, new_ent, entries); + + free(dp); + return 0; +} + + +static void +print_loadopt_str(uint8_t *data, size_t datalen) +{ + char *dev, *relpath, *abspath; + uint32_t attr; + uint16_t fplen; + efi_char *descr; + uint8_t *ep = data + datalen; + uint8_t *walker = data; + efidp dp, edp; + void *opt; + char buf[1024]; + int len; + int optlen; + int rv; + + if (datalen < sizeof(attr) + sizeof(fplen) + sizeof(efi_char)) + return; + // First 4 bytes are attribute flags + attr = le32dec(walker); + walker += sizeof(attr); + // Next two bytes are length of the file paths + fplen = le16dec(walker); + walker += sizeof(fplen); + // Next we have a 0 terminated UCS2 string that we know to be aligned + descr = (efi_char *)(intptr_t)(void *)walker; + len = ucs2len(descr); // XXX need to sanity check that len < (datalen - (ep - walker) / 2) + walker += (len + 1) * sizeof(efi_char); + if (walker > ep) + return; + // Now we have fplen bytes worth of file path stuff + dp = (efidp)walker; + walker += fplen; + if (walker > ep) + return; + edp = (efidp)walker; + // Everything left is the binary option args + opt = walker; + optlen = ep - walker; + + while (dp < edp) { + efidp_format_device_path(buf, sizeof(buf), dp, + (intptr_t)(void *)edp - (intptr_t)(void *)dp); + printf(" %s\n", buf); + rv = efivar_device_path_to_unix_path(dp, &dev, &relpath, &abspath); + if (rv == 0) { + printf(" %s:%s %s\n", dev, relpath, abspath); + free(dev); + free(relpath); + free(abspath); + } + dp = (efidp)((char *)dp + efidp_size(dp)); + } + if (optlen == 0) + return; +} + +static char * +get_descr(uint8_t* data) +{ + uint8_t *pos = data; + efi_char *desc; + int len; + char *buf; + int i = 0; + + pos += sizeof(uint32_t) + sizeof(uint16_t); + desc = (efi_char*)(intptr_t)(void *)pos; + len = ucs2len(desc); + buf = malloc(len + 1); + memset(buf, 0, len + 1); + while (desc[i]) { + buf[i] = desc[i]; + i++; + } + return (char*)buf; +} + + +/* Cmd epilogue, or just the default with no args. + * The order is [bootnext] bootcurrent, timeout, order, and the bootvars [-v] + */ +static int +print_boot_vars(bool verbose) +{ + /* + * just read and print the current values + * as a command epilogue + */ + struct entry *v; + uint32_t attrs, load_attrs; + uint8_t *data; + size_t size; + int ret; + + ret = efi_get_variable(EFI_GLOBAL_GUID, "BootNext", &data, &size, &attrs); + if (ret > 0) { + printf("BootNext : %04x\n", le16dec(data)); + } + + ret = efi_get_variable(EFI_GLOBAL_GUID, "BootCurrent", &data, &size,&attrs); + printf("BootCurrent: %04x\n", le16dec(data)); + + ret = efi_get_variable(EFI_GLOBAL_GUID, "Timeout", &data, &size, &attrs); + if (ret > 0) { + printf("Timeout : %d seconds\n", le16dec(data)); + } + print_order(); + + /* now we want to fetch 'em all fresh again + * which possibly includes a newly created bootvar + */ + LIST_FOREACH(v, &efivars, entries) { + attrs = 0; + ret = efi_get_variable(EFI_GLOBAL_GUID, v->name, &data, + &size, &attrs); + if (ret < 0) + continue; /* we must have deleted it */ + load_attrs = le32dec(data); + printf("%s%c %s", v->name, + ((load_attrs & LOAD_OPTION_ACTIVE) ? '*': ' '), + get_descr(data)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Dec 9 06:57:21 2017 Return-Path: Delivered-To: svn-src-head@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 2FE49E810B7; Sat, 9 Dec 2017 06:57:21 +0000 (UTC) (envelope-from imp@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 EF53E79CBA; Sat, 9 Dec 2017 06:57:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB96vJH9072113; Sat, 9 Dec 2017 06:57:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB96vJMP072112; Sat, 9 Dec 2017 06:57:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712090657.vB96vJMP072112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 9 Dec 2017 06:57:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326726 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 06:57:21 -0000 Author: imp Date: Sat Dec 9 06:57:19 2017 New Revision: 326726 URL: https://svnweb.freebsd.org/changeset/base/326726 Log: Forgotten in 326725 Release Notes: Yes Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Sat Dec 9 06:52:20 2017 (r326725) +++ head/usr.sbin/efibootmgr/efibootmgr.c Sat Dec 9 06:57:19 2017 (r326726) @@ -314,7 +314,7 @@ read_vars(void) LIST_INIT(&efivars); while ((ret = efi_get_next_variable_name(&guid, &next_name)) > 0) { /* - * Only pay attention to the EFI:BootXXXX variables to get the list. + * Only pay attention to EFI:BootXXXX variables to get the list. */ if (efi_guid_cmp(guid, &EFI_GLOBAL_GUID) != 0 || strlen(next_name) != 8 || From owner-svn-src-head@freebsd.org Sat Dec 9 07:43:56 2017 Return-Path: Delivered-To: svn-src-head@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 B35F1E81E08; Sat, 9 Dec 2017 07:43:56 +0000 (UTC) (envelope-from imp@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 6F5547B114; Sat, 9 Dec 2017 07:43:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB97htcr093184; Sat, 9 Dec 2017 07:43:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB97htAI093183; Sat, 9 Dec 2017 07:43:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712090743.vB97htAI093183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 9 Dec 2017 07:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326727 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 07:43:56 -0000 Author: imp Date: Sat Dec 9 07:43:55 2017 New Revision: 326727 URL: https://svnweb.freebsd.org/changeset/base/326727 Log: Remove vestiges of -d and -p commands. Fix two core dumps when optional data isn't specified. Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Sat Dec 9 06:57:19 2017 (r326726) +++ head/usr.sbin/efibootmgr/efibootmgr.c Sat Dec 9 07:43:55 2017 (r326727) @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); #define BAD_LENGTH ((size_t)-1) typedef struct _bmgr_opts { - char *dev; char *env; char *loader; char *label; @@ -84,7 +83,6 @@ typedef struct _bmgr_opts { bool del_timeout; bool dry_run; bool once; - int part; int cp_src; bool set_active; bool set_bootnext; @@ -194,7 +192,7 @@ parse_args(int argc, char *argv[]) { int ch; - while ((ch = getopt_long(argc, argv, "A:a:B:C:cDd:e:hk:L:l:Nn:Oo:p:Tt:v", + while ((ch = getopt_long(argc, argv, "A:a:B:C:cDe:hk:L:l:Nn:Oo:Tt:v", lopts, NULL)) != -1) { switch (ch) { case 'A': @@ -218,9 +216,6 @@ parse_args(int argc, char *argv[]) case 'D': /* should be remove dups XXX */ opts.dry_run = true; break; - case 'd': - opts.dev = optarg; - break; case 'e': opts.env = strdup(optarg); break; @@ -251,9 +246,6 @@ parse_args(int argc, char *argv[]) case 'o': opts.order = strdup(optarg); break; - case 'p': - opts.part = strtoul(optarg, NULL, 10); - break; case 'T': opts.del_timeout = true; break; @@ -267,7 +259,7 @@ parse_args(int argc, char *argv[]) } } if (opts.create) { - if (!(opts.loader && opts.dev && opts.part)) + if (!opts.loader) errx(1, "%s",CREATE_USAGE); return; } @@ -598,7 +590,12 @@ create_loadopt(uint8_t *buf, size_t bufmax, uint32_t a /* * Compute the length to make sure the passed in buffer is long enough. */ - utf8_to_ucs2(description, &bbuf, &desc_len); + if (description) + utf8_to_ucs2(description, &bbuf, &desc_len); + else { + desc_len = 0; + bbuf = NULL; + } len = sizeof(uint32_t) + sizeof(uint16_t) + desc_len + dp_size + optional_data_size; if (len > bufmax) { free(bbuf); @@ -665,7 +662,7 @@ make_boot_var(const char *label, const char *loader, c err(1, "malloc"); lopt_size = create_loadopt(load_opt_buf, MAX_LOADOPT_LEN, load_attrs, - dp, llen + klen, label, env, strlen(env) + 1); + dp, llen + klen, label, env, env ? strlen(env) + 1 : 0); if (lopt_size == BAD_LENGTH) errx(1, "Can't crate loadopt"); From owner-svn-src-head@freebsd.org Sat Dec 9 07:44:01 2017 Return-Path: Delivered-To: svn-src-head@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 D7BF4E81E29; Sat, 9 Dec 2017 07:44:01 +0000 (UTC) (envelope-from imp@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 9C7B87B133; Sat, 9 Dec 2017 07:44:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB97i0qw093257; Sat, 9 Dec 2017 07:44:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB97i0YV093256; Sat, 9 Dec 2017 07:44:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712090744.vB97i0YV093256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 9 Dec 2017 07:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326728 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 326728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 07:44:02 -0000 Author: imp Date: Sat Dec 9 07:44:00 2017 New Revision: 326728 URL: https://svnweb.freebsd.org/changeset/base/326728 Log: Indent multiple device path entries correctly. Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Sat Dec 9 07:43:55 2017 (r326727) +++ head/usr.sbin/efibootmgr/efibootmgr.c Sat Dec 9 07:44:00 2017 (r326728) @@ -704,6 +704,7 @@ print_loadopt_str(uint8_t *data, size_t datalen) int len; int optlen; int rv; + int indent; if (datalen < sizeof(attr) + sizeof(fplen) + sizeof(efi_char)) return; @@ -729,13 +730,15 @@ print_loadopt_str(uint8_t *data, size_t datalen) opt = walker; optlen = ep - walker; + indent = 1; while (dp < edp) { efidp_format_device_path(buf, sizeof(buf), dp, (intptr_t)(void *)edp - (intptr_t)(void *)dp); - printf(" %s\n", buf); + printf("%*s%s\n", indent, "", buf); + indent = 10 + len + 1; rv = efivar_device_path_to_unix_path(dp, &dev, &relpath, &abspath); if (rv == 0) { - printf(" %s:%s %s\n", dev, relpath, abspath); + printf("%*s%s:%s %s\n", indent + 4, "", dev, relpath, abspath); free(dev); free(relpath); free(abspath); From owner-svn-src-head@freebsd.org Sat Dec 9 08:21:30 2017 Return-Path: Delivered-To: svn-src-head@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 5E344E82FD1; Sat, 9 Dec 2017 08:21:30 +0000 (UTC) (envelope-from eadler@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 29AA27C2CC; Sat, 9 Dec 2017 08:21:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB98LTH3009867; Sat, 9 Dec 2017 08:21:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB98LTx4009866; Sat, 9 Dec 2017 08:21:29 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712090821.vB98LTx4009866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 9 Dec 2017 08:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326729 - head X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 326729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 08:21:30 -0000 Author: eadler Date: Sat Dec 9 08:21:29 2017 New Revision: 326729 URL: https://svnweb.freebsd.org/changeset/base/326729 Log: arc lint: Explain linting explain shell scripts in scripts don't need to be chmod +x to work. In fact most are not. Of the tests I found from a simple search: 65 are chmod +x 84 are chmod -x simply disable the check for test shell scripts. Modified: head/.arclint Modified: head/.arclint ============================================================================== --- head/.arclint Sat Dec 9 07:44:00 2017 (r326728) +++ head/.arclint Sat Dec 9 08:21:29 2017 (r326729) @@ -24,3 +24,4 @@ } } } + From owner-svn-src-head@freebsd.org Sat Dec 9 08:23:18 2017 Return-Path: Delivered-To: svn-src-head@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 45B21E83140 for ; Sat, 9 Dec 2017 08:23:18 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (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 EF85B7C60D for ; Sat, 9 Dec 2017 08:23:17 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22c.google.com with SMTP id m129so5340985ywb.11 for ; Sat, 09 Dec 2017 00:23:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=1cHgf8DWHZsptso6eV9QrSMuCQcQeXRsaH8I3rp2XI8=; b=McstSsqA56Jo4WlZpPxz+agS7hfckAB7x/GATL9WJ908KBRy683yX1xadColxnfVQ3 JxrU89aeyHbWgi36R2DvccSIkx5PK7mWiuRKSH9yv8ADqefuqmANHGZyyoqaz9vdSnia vRnAtg/HS1gm2Jm8amOZMMs70Mu3a0pm/YV2Q= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=1cHgf8DWHZsptso6eV9QrSMuCQcQeXRsaH8I3rp2XI8=; b=KfLib8dLBTwylXhkDomFVhCkPGiKtSc17eTHwOyCk7MBThL3a7t2coQf7h7hOLM71V Nm8qlFLK6sHMmzAeIAPSYDctgnlpUa+8ZrfxlYe7qTibfE0DiRw+3+vVZzJxddPkOJTC p/e7X98ggTQNfxXLB4D9EGSdKqTM9MTSSN8VFx+n95EkGyMbzPWyZ0LQEJUqkmqoazcU 1hwEzXnpjiseu2xFT11B4AbxnMsGWFrZ9pfwULwt5GmMQrgPncCWEusYA5IzAnLWewyn C2xHhJvCz/06pRxRhqcHWmH19DretDeMaIh3YbrHAJiETREEna4MXFKGO6tXtshzmUbB dupQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=1cHgf8DWHZsptso6eV9QrSMuCQcQeXRsaH8I3rp2XI8=; b=IQgiIZoF5A7SqRevbQ903Ys0d/xB984rSoHPMDB8Aa34BVVCF2qSnoeFUSeUMaSF/6 yz/iK5mBJKLsPuv4BY7kA85ZGUA4LRyv7/4lTJBBwEWL6ggAaotiMhkbIZiKAkDjQdPr kMLb7U5jHRnvxq48+Sd2JzjhDGQRgV3Q6/FVb9qVM6LSpP+1sOJdphbCyioY4EOeDRYD oW61662HiQ8VNKZl6okMf0CyHIjal541sH8JRhrIgYK8iLNOBN78a0p68931lK0vM+RA V5XO0O6spOaIwD09t3NEwIiJwr4ylh88nqqxGNCsCNHagAFihyiBWjbJe4824jiO/PVQ F+QA== X-Gm-Message-State: AJaThX4QWEjARZ3rsy4L6PyHSTT0qMfTP2wLrvDQMz3NBY+k6ZP4MCB5 KVnu83EblJkBBlp4krFpXXwn4H2FU/C0chFfTXHHpg== X-Google-Smtp-Source: AGs4zMaNZHOMt7UF/LVxfx6ITAn3/qRD9fhQvYmS/TD1J16kMmc9JClvqX8kselCASXJolZCdyUBVgC/2zChW8/Msp4= X-Received: by 10.129.235.2 with SMTP id n2mr19708077ywm.180.1512807797141; Sat, 09 Dec 2017 00:23:17 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.37.15.66 with HTTP; Sat, 9 Dec 2017 00:22:46 -0800 (PST) In-Reply-To: References: <201712082011.vB8KBUsA068552@pdx.rh.CN85.dnsmgr.net> From: Eitan Adler Date: Sat, 9 Dec 2017 00:22:46 -0800 X-Google-Sender-Auth: iQ1qtYP3PPl8Ky1ainMQO1MwsjI Message-ID: Subject: Re: svn commit: r326614 - in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee To: cem@freebsd.org Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 08:23:18 -0000 On 8 December 2017 at 20:23, Conrad Meyer wrote: > On Fri, Dec 8, 2017 at 6:07 PM, Eitan Adler wrote: > Great. Please re-apply the change with something like that in the > commit message, when you get a chance. It shouldn't take more than a > minute or two. r326729 Once again, sorry about the noise. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Sat Dec 9 14:45:34 2017 Return-Path: Delivered-To: svn-src-head@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 57515E8D435; Sat, 9 Dec 2017 14:45:34 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C783467D9C; Sat, 9 Dec 2017 14:45:33 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vB9EjUN4072367; Sat, 9 Dec 2017 06:45:30 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vB9EjTg6072366; Sat, 9 Dec 2017 06:45:29 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712091445.vB9EjTg6072366@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r326729 - head In-Reply-To: <201712090821.vB98LTx4009866@repo.freebsd.org> To: Eitan Adler Date: Sat, 9 Dec 2017 06:45:29 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 14:45:34 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: eadler > Date: Sat Dec 9 08:21:29 2017 > New Revision: 326729 > URL: https://svnweb.freebsd.org/changeset/base/326729 > > Log: > arc lint: Explain linting explain > > shell scripts in scripts don't need > to be chmod +x to work. In fact most are not. > Of the tests I found from a simple search: > 65 are chmod +x > 84 are chmod -x > > simply disable the check for test shell scripts. > > Modified: > head/.arclint > > Modified: head/.arclint > ============================================================================== > --- head/.arclint Sat Dec 9 07:44:00 2017 (r326728) > +++ head/.arclint Sat Dec 9 08:21:29 2017 (r326729) > @@ -24,3 +24,4 @@ > } > } > } > + This is not how you revert and commit a correct log fix, the log yet again does not match the commit. Please, revert this and revert the other and apply the log with the diff so that things match correctly. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Dec 9 15:34:42 2017 Return-Path: Delivered-To: svn-src-head@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 10F1BE8E91F; Sat, 9 Dec 2017 15:34:42 +0000 (UTC) (envelope-from trasz@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 D218269563; Sat, 9 Dec 2017 15:34:41 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB9FYeUi092585; Sat, 9 Dec 2017 15:34:40 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9FYeDo092584; Sat, 9 Dec 2017 15:34:40 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201712091534.vB9FYeDo092584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 9 Dec 2017 15:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326730 - head/sys/dev/iscsi X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/dev/iscsi X-SVN-Commit-Revision: 326730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 15:34:42 -0000 Author: trasz Date: Sat Dec 9 15:34:40 2017 New Revision: 326730 URL: https://svnweb.freebsd.org/changeset/base/326730 Log: Move the DIAGNOSTIC check for lost iSCSI PDUs from icl_conn_close() to icl_conn_free(). It's perfectly valid for the counter to be non-zero in the former. MFC after: 2 weeks Sponsored by: playkey.net Modified: head/sys/dev/iscsi/icl_soft.c Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Sat Dec 9 08:21:29 2017 (r326729) +++ head/sys/dev/iscsi/icl_soft.c Sat Dec 9 15:34:40 2017 (r326730) @@ -1170,6 +1170,11 @@ void icl_soft_conn_free(struct icl_conn *ic) { +#ifdef DIAGNOSTIC + KASSERT(ic->ic_outstanding_pdus == 0, + ("destroying session with %d outstanding PDUs", + ic->ic_outstanding_pdus)); +#endif cv_destroy(&ic->ic_send_cv); cv_destroy(&ic->ic_receive_cv); kobj_delete((struct kobj *)ic, M_ICL_SOFT); @@ -1410,11 +1415,6 @@ icl_soft_conn_close(struct icl_conn *ic) KASSERT(STAILQ_EMPTY(&ic->ic_to_send), ("destroying session with non-empty send queue")); -#ifdef DIAGNOSTIC - KASSERT(ic->ic_outstanding_pdus == 0, - ("destroying session with %d outstanding PDUs", - ic->ic_outstanding_pdus)); -#endif ICL_CONN_UNLOCK(ic); } From owner-svn-src-head@freebsd.org Sat Dec 9 15:44:32 2017 Return-Path: Delivered-To: svn-src-head@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 25DB4E8EFCB; Sat, 9 Dec 2017 15:44:32 +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 E73EF69CFE; Sat, 9 Dec 2017 15:44:31 +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 vB9FiVfs096791; Sat, 9 Dec 2017 15:44:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9FiVUI096790; Sat, 9 Dec 2017 15:44:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712091544.vB9FiVUI096790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 9 Dec 2017 15:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326731 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 326731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 15:44:32 -0000 Author: markj Date: Sat Dec 9 15:44:30 2017 New Revision: 326731 URL: https://svnweb.freebsd.org/changeset/base/326731 Log: Provide a sysctl to force synchronous initialization of inode blocks. FFS performs asynchronous inode initialization, using a barrier write to ensure that the inode block is written before the corresponding cylinder group header update. Some GEOMs do not appear to handle BIO_ORDERED correctly, meaning that the barrier write may not work as intended. The sysctl allows one to work around this problem at the cost of expensive file creation on new filesystems. The default behaviour is unchanged. Reviewed by: kib, mckusick MFC after: 1 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D13428 Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Sat Dec 9 15:34:40 2017 (r326730) +++ head/sys/ufs/ffs/ffs_alloc.c Sat Dec 9 15:44:30 2017 (r326731) @@ -1958,6 +1958,16 @@ getinobuf(struct inode *ip, u_int cg, u_int32_t cginob } /* + * Synchronous inode initialization is needed only when barrier writes do not + * work as advertised, and will impose a heavy cost on file creation in a newly + * created filesystem. + */ +static int doasyncinodeinit = 1; +SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncinodeinit, CTLFLAG_RWTUN, + &doasyncinodeinit, 0, + "Perform inode block initialization using asynchronous writes"); + +/* * Determine whether an inode can be allocated. * * Check to see if an inode is available, and if it is, @@ -2065,6 +2075,7 @@ gotit: dp2->di_gen = arc4random(); dp2++; } + /* * Rather than adding a soft updates dependency to ensure * that the new inode block is written before it is claimed @@ -2074,7 +2085,10 @@ gotit: * written. The barrier write should only slow down bulk * loading of newly created filesystems. */ - babarrierwrite(ibp); + if (doasyncinodeinit) + babarrierwrite(ibp); + else + bwrite(ibp); /* * After the inode block is written, try to update the From owner-svn-src-head@freebsd.org Sat Dec 9 15:47:28 2017 Return-Path: Delivered-To: svn-src-head@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 33805E8F122; Sat, 9 Dec 2017 15:47: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 007B869EBB; Sat, 9 Dec 2017 15:47:27 +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 vB9FlRfu096930; Sat, 9 Dec 2017 15:47:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9FlRtp096929; Sat, 9 Dec 2017 15:47:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712091547.vB9FlRtp096929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 9 Dec 2017 15:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326732 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 326732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 15:47:28 -0000 Author: markj Date: Sat Dec 9 15:47:26 2017 New Revision: 326732 URL: https://svnweb.freebsd.org/changeset/base/326732 Log: Fix the act_scan_laundry_weight mechanism. r292392 modified the active queue scan to weigh clean pages differently from dirty pages when attempting to meet the inactive queue target. When r306706 was merged into the PQ_LAUNDRY branch, this mechanism was broken. Fix it by scalaing the correct page shortage variable. Reviewed by: alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13423 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Dec 9 15:44:30 2017 (r326731) +++ head/sys/vm/vm_pageout.c Sat Dec 9 15:47:26 2017 (r326732) @@ -1393,7 +1393,7 @@ drop_page: inactq_shortage = vm_cnt.v_inactive_target - (vm_cnt.v_inactive_count + vm_cnt.v_laundry_count / act_scan_laundry_weight) + vm_paging_target() + deficit + addl_page_shortage; - page_shortage *= act_scan_laundry_weight; + inactq_shortage *= act_scan_laundry_weight; pq = &vmd->vmd_pagequeues[PQ_ACTIVE]; vm_pagequeue_lock(pq); From owner-svn-src-head@freebsd.org Sat Dec 9 15:59:11 2017 Return-Path: Delivered-To: svn-src-head@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 73BE9E8F888; Sat, 9 Dec 2017 15:59:11 +0000 (UTC) (envelope-from zeising@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 4D7246A5FF; Sat, 9 Dec 2017 15:59:11 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB9FxA1N001256; Sat, 9 Dec 2017 15:59:10 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9FxAv9001255; Sat, 9 Dec 2017 15:59:10 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201712091559.vB9FxAv9001255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Sat, 9 Dec 2017 15:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326733 - head/usr.sbin/acpi/acpiconf X-SVN-Group: head X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: head/usr.sbin/acpi/acpiconf X-SVN-Commit-Revision: 326733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 15:59:11 -0000 Author: zeising (doc,ports committer) Date: Sat Dec 9 15:59:10 2017 New Revision: 326733 URL: https://svnweb.freebsd.org/changeset/base/326733 Log: Improve options and error handling. Improve options handling and error out if multiple mutually exclusive options are passed to acpiconf. Switch from using atoi() to strtol() for argument parsing, and add error checking and handling, instead of blindly trusting that the integer conversion is OK. Cange err() to errx() in once case, the errno value was garbage there. Reviewed by: emaste Approved by: emaste Differential Revision: D13430 Modified: head/usr.sbin/acpi/acpiconf/acpiconf.c Modified: head/usr.sbin/acpi/acpiconf/acpiconf.c ============================================================================== --- head/usr.sbin/acpi/acpiconf/acpiconf.c Sat Dec 9 15:47:26 2017 (r326732) +++ head/usr.sbin/acpi/acpiconf/acpiconf.c Sat Dec 9 15:59:10 2017 (r326733) @@ -92,7 +92,7 @@ acpi_battinfo(int num) uint32_t volt; if (num < 0 || num > 64) - err(EX_USAGE, "invalid battery %d", num); + errx(EX_USAGE, "invalid battery %d", num); /* Print battery design information. */ battio.unit = num; @@ -205,8 +205,9 @@ usage(const char* prog) int main(int argc, char *argv[]) { - char *prog; - int c, sleep_type; + char *prog, *end; + int c, sleep_type, battery, ack; + int iflag = 0, kflag = 0, sflag = 0; prog = argv[0]; if (argc < 2) @@ -218,16 +219,24 @@ main(int argc, char *argv[]) while ((c = getopt(argc, argv, "hi:k:s:")) != -1) { switch (c) { case 'i': - acpi_battinfo(atoi(optarg)); + iflag = 1; + battery = strtol(optarg, &end, 10); + if ((size_t)(end - optarg) != strlen(optarg)) + errx(EX_USAGE, "invalid battery"); break; case 'k': - acpi_sleep_ack(atoi(optarg)); + kflag = 1; + ack = strtol(optarg, &end, 10); + if ((size_t)(end - optarg) != strlen(optarg)) + errx(EX_USAGE, "invalid ack argument"); break; case 's': + sflag = 1; if (optarg[0] == 'S') - sleep_type = optarg[1] - '0'; - else - sleep_type = optarg[0] - '0'; + optarg++; + sleep_type = strtol(optarg, &end, 10); + if ((size_t)(end - optarg) != strlen(optarg)) + errx(EX_USAGE, "invalid sleep type"); if (sleep_type < 1 || sleep_type > 4) errx(EX_USAGE, "invalid sleep type (%d)", sleep_type); @@ -241,7 +250,25 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - if (sleep_type != -1) + if (iflag != 0 && kflag != 0 && sflag != 0) + errx(EX_USAGE, "-i, -k and -s are mutually exclusive"); + + if (iflag != 0) { + if (kflag != 0) + errx(EX_USAGE, "-i and -k are mutually exclusive"); + if (sflag != 0) + errx(EX_USAGE, "-i and -s are mutually exclusive"); + acpi_battinfo(battery); + } + + if (kflag != 0) { + if (sflag != 0) + errx(EX_USAGE, "-k and -s are mutually exclusive"); + acpi_sleep_ack(ack); + } + + + if (sflag != 0) acpi_sleep(sleep_type); close(acpifd); From owner-svn-src-head@freebsd.org Sat Dec 9 17:19:44 2017 Return-Path: Delivered-To: svn-src-head@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 3B751E92088; Sat, 9 Dec 2017 17:19:44 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) (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 BB72A6D693; Sat, 9 Dec 2017 17:19:43 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f45.google.com with SMTP id x28so9147857ita.0; Sat, 09 Dec 2017 09:19:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=wYdAFJ1Dq/X0UfkO0se5albEwQo9JhY0nJKp8Kg8yi0=; b=P3ni1OUiaYmxOWa9qWUX7ohTLbQRbNK7zImWqHkUSLK2eIBPrCzaW10rppKvkpXlk3 Emxgrp4aqmwum18TLKFZVDYP+6FqbitmFlDE//nrbuySNJVfMVWUeNjlTz/WyX+EFVOi kySRPLMVm3Z3IKuV23yjsZ/xW546BwhSIItRUy0DX8wFTeLLtmpKV+uEm3/32HSYiFRm Ci7WPomMOMC/2MrQzSn3/M+JrEygJIDVfGA8DP91V2UUsNrKjHhsUpjDNNse3CMRkGsu pPGRIbXSBylpVpD5lScDWUEDJmYxNNoKuE2DNY5Tu2ldBMeK4wvxII0eQc7N2RBWySD3 NlXQ== X-Gm-Message-State: AKGB3mK/ueQuX1IEq48xH672QChUn+IuvXmCC0rfguRgJyclij4gKqbO 1ss3s99u2jDHtbyW2DD1W6Acw04l X-Google-Smtp-Source: AGs4zMaePUuf7eB6vPyXai8x3t/kKcq491+UC4UW6VoVPcgdxPs5CUF2uepa7OUuAqeVOsP1g8z5AA== X-Received: by 10.36.166.75 with SMTP id r11mr11708355iti.41.1512839981068; Sat, 09 Dec 2017 09:19:41 -0800 (PST) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com. [209.85.223.179]) by smtp.gmail.com with ESMTPSA id t26sm1928387ioe.77.2017.12.09.09.19.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Dec 2017 09:19:40 -0800 (PST) Received: by mail-io0-f179.google.com with SMTP id u42so5511923ioi.9; Sat, 09 Dec 2017 09:19:40 -0800 (PST) X-Received: by 10.107.181.147 with SMTP id e141mr11868216iof.117.1512839980743; Sat, 09 Dec 2017 09:19:40 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.165.150 with HTTP; Sat, 9 Dec 2017 09:19:40 -0800 (PST) In-Reply-To: References: <201712082011.vB8KBUsA068552@pdx.rh.CN85.dnsmgr.net> From: Conrad Meyer Date: Sat, 9 Dec 2017 09:19:40 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326614 - in head: etc/mtree usr.bin usr.bin/sponge usr.bin/tee To: Eitan Adler Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 17:19:44 -0000 That isn't what was asked for. Conrad On Sat, Dec 9, 2017 at 12:22 AM, Eitan Adler wrote: > On 8 December 2017 at 20:23, Conrad Meyer wrote: >> On Fri, Dec 8, 2017 at 6:07 PM, Eitan Adler wrote: >> Great. Please re-apply the change with something like that in the >> commit message, when you get a chance. It shouldn't take more than a >> minute or two. > > r326729 > > Once again, sorry about the noise. > > > > -- > Eitan Adler > Source, Ports, Doc committer > Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Sat Dec 9 17:27:38 2017 Return-Path: Delivered-To: svn-src-head@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 2CA14E92394; Sat, 9 Dec 2017 17:27:38 +0000 (UTC) (envelope-from karels@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 EB3A96DB43; Sat, 9 Dec 2017 17:27:37 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB9HRaxE039987; Sat, 9 Dec 2017 17:27:36 GMT (envelope-from karels@FreeBSD.org) Received: (from karels@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9HRaYv039986; Sat, 9 Dec 2017 17:27:36 GMT (envelope-from karels@FreeBSD.org) Message-Id: <201712091727.vB9HRaYv039986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: karels set sender to karels@FreeBSD.org using -f From: Mike Karels Date: Sat, 9 Dec 2017 17:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326734 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: karels X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 326734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 17:27:38 -0000 Author: karels Date: Sat Dec 9 17:27:36 2017 New Revision: 326734 URL: https://svnweb.freebsd.org/changeset/base/326734 Log: gifconfig_gif0 no longer works, document replacement rc.conf(5) documents the gifconfig_ keyword, which is no longer implemented. Document the replacement, which works with cloned_interfaces as well. Reviewed by: dab Group Reviwers: manpages MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D13130 Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Dec 9 15:59:10 2017 (r326733) +++ head/share/man/man5/rc.conf.5 Sat Dec 9 17:27:36 2017 (r326734) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2017 +.Dd December 9, 2017 .Dt RC.CONF 5 .Os .Sh NAME @@ -1816,21 +1816,40 @@ This variable is deprecated in favor of Set to the list of .Xr gif 4 tunnel interfaces to configure on this host. -A -.Va gifconfig_ Ns Aq Ar interface -variable is assumed to exist for each value of -.Ar interface . +For each +.Xr gif +tunnel interface, set a variable named +.Va ifconfig_ Ns Aq Ar interface +with the parameters for the +.Xr ifconfig 8 +command to configure the link level for +.Ar interface +with the +.Cm tunnel +option. The value of this variable is used to configure the link layer of the -tunnel according to the syntax of the +tunnel using the .Cm tunnel option to -.Xr ifconfig 8 . +.Xr ifconfig . +For example, configure two +.Xr gif +interfaces with: +.Bd -literal -offset indent +gif_interfaces="gif0 gif1" +ifconfig_gif0="tunnel src_addr0 dst_addr0" +ifconfig_gif1="tunnel src_addr1 dst_addr1" +.Ed +.Pp Additionally, this option ensures that each listed interface is created via the .Cm create option to -.Xr ifconfig 8 -before attempting to configure it. +.Xr ifconfig . +This example also works with +.Va cloned_interfaces +instead of +.Va gif_interfaces . .It Va sppp_interfaces .Pq Vt str Set to the list of From owner-svn-src-head@freebsd.org Sat Dec 9 18:03:48 2017 Return-Path: Delivered-To: svn-src-head@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 6CB02E92E92; Sat, 9 Dec 2017 18:03:48 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) (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 F19106EDC4; Sat, 9 Dec 2017 18:03:47 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f50.google.com with SMTP id x204so14979929lfa.11; Sat, 09 Dec 2017 10:03:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=plzD/KIKmAAOeEojTAMBJsoBSLQEWrjS4ilEVnGNaYs=; b=d5xQStq8iuj2+on4wphP10zF6He+osWYCZb/FpnxMW63eb+/5MXhrom0Iny1lPDCuo grkcQd2jNdg1PhLOIWmbWZdjEPWSUWObAPrw6k17IVC6bViDwo++AvGm6+0137a99QWh g9ndZhrfX99mk88M33hGrgm+WmdDfLew8L4mxsGHWapDWXAhBPGMUe3bLAvdDqiM1BTu q1E7dTtJSk564mYxgc8TXZ88Cwru7tIsIbjOXFzNe+5L7hERkol9/K4YNo10KVKzMEwc k4FPEUFfzXV/RDuIiLiY1ug9SMMmnsAW1cEj7ACCS25pZg+epRU8yneQBETozFa2jJvA IXNA== X-Gm-Message-State: AJaThX4W1rUlJvyqWySIMofI/y2R1AspL44fceNxH5JvpvzDAKwHVKwF o7FT7BS5XU9Ac8wdnrJLgI8P1sQq X-Google-Smtp-Source: AGs4zMYB71j1wGhB1fCGLv2o8OeBcHCE9IyywxsPeIWtAyni3B1FHn8UTPidj9wdVVrWsdA4j6aIDQ== X-Received: by 10.25.87.147 with SMTP id l141mr16669302lfb.111.1512842619885; Sat, 09 Dec 2017 10:03:39 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id u23sm2008792lje.79.2017.12.09.10.03.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Dec 2017 10:03:38 -0800 (PST) Subject: Re: svn commit: r326731 - head/sys/ufs/ffs To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712091544.vB9FiVUI096790@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Sat, 9 Dec 2017 20:03:37 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201712091544.vB9FiVUI096790@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 18:03:48 -0000 On 09/12/2017 17:44, Mark Johnston wrote: > Some GEOMs do not appear to handle BIO_ORDERED correctly, meaning that the Nitpick: this should be "geoms" or, even better, "GEOM classes" :-) > barrier write may not work as intended. Could the loss of BIO_ORDERED in g_duplicate_bio() contribute to the problem with those GEOM classes? -- Andriy Gapon From owner-svn-src-head@freebsd.org Sat Dec 9 21:04:57 2017 Return-Path: Delivered-To: svn-src-head@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 F1D49E98437; Sat, 9 Dec 2017 21:04:57 +0000 (UTC) (envelope-from rmacklem@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 BF1EE759E4; Sat, 9 Dec 2017 21:04:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB9L4uA1032570; Sat, 9 Dec 2017 21:04:56 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9L4uKx032569; Sat, 9 Dec 2017 21:04:56 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201712092104.vB9L4uKx032569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 9 Dec 2017 21:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326735 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 326735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 21:04:58 -0000 Author: rmacklem Date: Sat Dec 9 21:04:56 2017 New Revision: 326735 URL: https://svnweb.freebsd.org/changeset/base/326735 Log: Define macros used by the pNFS server code. This commit defines some macros used by the pNFS server code. They will not be used until the main pNFS server code merge occurs, which will probably be in April 2018. Modified: head/sys/fs/nfs/nfsport.h Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sat Dec 9 17:27:36 2017 (r326734) +++ head/sys/fs/nfs/nfsport.h Sat Dec 9 21:04:56 2017 (r326735) @@ -711,6 +711,25 @@ void nfsrvd_rcv(struct socket *, void *, int); #define NFSSESSIONMUTEXPTR(s) (&((s)->mtx)) #define NFSLOCKSESSION(s) mtx_lock(&((s)->mtx)) #define NFSUNLOCKSESSION(s) mtx_unlock(&((s)->mtx)) +#define NFSLOCKLAYOUT(l) mtx_lock(&((l)->mtx)) +#define NFSUNLOCKLAYOUT(l) mtx_unlock(&((l)->mtx)) +#define NFSDDSLOCK() mtx_lock(&nfsrv_dslock_mtx) +#define NFSDDSUNLOCK() mtx_unlock(&nfsrv_dslock_mtx) +#define NFSDSCLOCKMUTEXPTR (&nfsrv_dsclock_mtx) +#define NFSDSCLOCK() mtx_lock(&nfsrv_dsclock_mtx) +#define NFSDSCUNLOCK() mtx_unlock(&nfsrv_dsclock_mtx) +#define NFSDSRMLOCKMUTEXPTR (&nfsrv_dsrmlock_mtx) +#define NFSDSRMLOCK() mtx_lock(&nfsrv_dsrmlock_mtx) +#define NFSDSRMUNLOCK() mtx_unlock(&nfsrv_dsrmlock_mtx) +#define NFSDWRPCLOCKMUTEXPTR (&nfsrv_dwrpclock_mtx) +#define NFSDWRPCLOCK() mtx_lock(&nfsrv_dwrpclock_mtx) +#define NFSDWRPCUNLOCK() mtx_unlock(&nfsrv_dwrpclock_mtx) +#define NFSDSRPCLOCKMUTEXPTR (&nfsrv_dsrpclock_mtx) +#define NFSDSRPCLOCK() mtx_lock(&nfsrv_dsrpclock_mtx) +#define NFSDSRPCUNLOCK() mtx_unlock(&nfsrv_dsrpclock_mtx) +#define NFSDARPCLOCKMUTEXPTR (&nfsrv_darpclock_mtx) +#define NFSDARPCLOCK() mtx_lock(&nfsrv_darpclock_mtx) +#define NFSDARPCUNLOCK() mtx_unlock(&nfsrv_darpclock_mtx) /* * Use these macros to initialize/free a mutex. From owner-svn-src-head@freebsd.org Sat Dec 9 21:55:21 2017 Return-Path: Delivered-To: svn-src-head@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 0CF9BE99C0F; Sat, 9 Dec 2017 21:55:21 +0000 (UTC) (envelope-from cem@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 D9BA2774FE; Sat, 9 Dec 2017 21:55:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB9LtJth053386; Sat, 9 Dec 2017 21:55:19 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9LtJFY053385; Sat, 9 Dec 2017 21:55:19 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201712092155.vB9LtJFY053385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 9 Dec 2017 21:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326736 - head/usr.bin/wc X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.bin/wc X-SVN-Commit-Revision: 326736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 21:55:21 -0000 Author: cem Date: Sat Dec 9 21:55:19 2017 New Revision: 326736 URL: https://svnweb.freebsd.org/changeset/base/326736 Log: wc(1): Extend non-controversial optimizations to '-c' mode wc(1)'s slow path for counting words or multibyte characters requires conversion of the 8-bit input stream to wide characters. However, a faster path can be used for counting only lines ('-l' -- newlines have the same representation in all supported encodings) or bytes ('-c'). The existing line count optimization was not used if the input was the implicit stdin. Additionally, it wasn't used if only byte counting was requested. This change expands the fast path to both of these scenarios. Expanding the buffer size from 64 kB helps reduce the number of read(2) calls needed, but exactly what impact that change has and what size to expand the buffer to are still under discussion. PR: 224160 Tested by: wosch (earlier version) Sponsored by: Dell EMC Isilon Modified: head/usr.bin/wc/wc.c Modified: head/usr.bin/wc/wc.c ============================================================================== --- head/usr.bin/wc/wc.c Sat Dec 9 21:04:56 2017 (r326735) +++ head/usr.bin/wc/wc.c Sat Dec 9 21:55:19 2017 (r326736) @@ -206,30 +206,30 @@ cnt(const char *file) linect = wordct = charct = llct = tmpll = 0; if (file == NULL) fd = STDIN_FILENO; - else { - if ((fd = open(file, O_RDONLY, 0)) < 0) { - xo_warn("%s: open", file); - return (1); - } - if (doword || (domulti && MB_CUR_MAX != 1)) - goto word; - /* - * Line counting is split out because it's a lot faster to get - * lines than to get words, since the word count requires some - * logic. - */ - if (doline) { - while ((len = read(fd, buf, MAXBSIZE))) { - if (len == -1) { - xo_warn("%s: read", file); - (void)close(fd); - return (1); - } - if (siginfo) { - show_cnt(file, linect, wordct, charct, - llct); - } - charct += len; + else if ((fd = open(file, O_RDONLY, 0)) < 0) { + xo_warn("%s: open", file); + return (1); + } + if (doword || (domulti && MB_CUR_MAX != 1)) + goto word; + /* + * Line counting is split out because it's a lot faster to get + * lines than to get words, since the word count requires some + * logic. + */ + if (doline || dochar) { + while ((len = read(fd, buf, MAXBSIZE))) { + if (len == -1) { + xo_warn("%s: read", file); + (void)close(fd); + return (1); + } + if (siginfo) { + show_cnt(file, linect, wordct, charct, + llct); + } + charct += len; + if (doline) { for (p = buf; len--; ++p) if (*p == '\n') { if (tmpll > llct) @@ -239,36 +239,37 @@ cnt(const char *file) } else tmpll++; } - reset_siginfo(); + } + reset_siginfo(); + if (doline) tlinect += linect; - if (dochar) - tcharct += charct; - if (dolongline) { - if (llct > tlongline) - tlongline = llct; - } + if (dochar) + tcharct += charct; + if (dolongline) { + if (llct > tlongline) + tlongline = llct; + } + show_cnt(file, linect, wordct, charct, llct); + (void)close(fd); + return (0); + } + /* + * If all we need is the number of characters and it's a + * regular file, just stat the puppy. + */ + if (dochar || domulti) { + if (fstat(fd, &sb)) { + xo_warn("%s: fstat", file); + (void)close(fd); + return (1); + } + if (S_ISREG(sb.st_mode)) { + reset_siginfo(); + charct = sb.st_size; show_cnt(file, linect, wordct, charct, llct); + tcharct += charct; (void)close(fd); return (0); - } - /* - * If all we need is the number of characters and it's a - * regular file, just stat the puppy. - */ - if (dochar || domulti) { - if (fstat(fd, &sb)) { - xo_warn("%s: fstat", file); - (void)close(fd); - return (1); - } - if (S_ISREG(sb.st_mode)) { - reset_siginfo(); - charct = sb.st_size; - show_cnt(file, linect, wordct, charct, llct); - tcharct += charct; - (void)close(fd); - return (0); - } } } From owner-svn-src-head@freebsd.org Sat Dec 9 22:37:21 2017 Return-Path: Delivered-To: svn-src-head@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 4D465E9A81F; Sat, 9 Dec 2017 22:37:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pl0-x229.google.com (mail-pl0-x229.google.com [IPv6:2607:f8b0:400e:c01::229]) (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 23DBB78657; Sat, 9 Dec 2017 22:37:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pl0-x229.google.com with SMTP id bi12so2396598plb.6; Sat, 09 Dec 2017 14:37:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4PwKbYAiJckZX90JaiYl45zfE2I2ve4kC++aJSHo5qY=; b=HBeH8girLvaBE+UlQM/tXFxRZO8cY5UcaBrTgl87G180itpiq3Hw2qcnoJomncyH79 jltSvirgHJX26ojchVhCyMva7ktCxb47N6NU7pqCFaCEagxQOxnjYhQhhjQPMTGlkIQo hXgDzmfAOuX7BJUz4Gy8Qp+Di/NhD4zO875qrXgkzK6c21126YMBKV4BQ1OubbmMI0Rr ENZjJdYoWTkiaF3Wm42DUbTTDR0HxtmX2JL+avq/ep19me7U/EmAi+PEGHfddmIstC8q p7JMPphwCKh89YTwWfLtYXTpgFBeDKRK3Qxqulv1V5MGzAbxo1Hb2iaE0rkYQmrjlwxQ bZ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=4PwKbYAiJckZX90JaiYl45zfE2I2ve4kC++aJSHo5qY=; b=p6h4hTSICnWQT3/jZkqrCS+c7xc4Q/DU5z0/tVJtKc+CJ8DhQMECkYRL3vcTJeHmZL e8lHOkET9fkY0BRKC4Y74op1RO/YdnSKhwPr+HLgisGgG4f2Lz7ZShlO27cI3cQbtjPb D8YYR0ru00Cgy4AsFrOglo/+t2gteNJehaei/vVtT7GOozHEfriBF9popl/zLT5c6sx7 D67CrO9MVZnoIFABYm4oJcrkswn55thE5hjzvrIgAKw3L8kBPpqf3qg7EHhlN3/gsNnM vY9Sn14IZUHBUq6ZF+GuGac00MXSMle40azTDVv0kra0ncHpP72I1CnqVIRTX9Jazjw+ lyLw== X-Gm-Message-State: AJaThX7YRY6Sjzihpt9zy7qEH8Y2TnLkFXYx9BsldYV8jCmIWVBVoJAy tc7iWYgzKd439lo4uBsLHPmbCw== X-Google-Smtp-Source: AGs4zMZohnkhnwk9benYGwbaHtP5ravhuMuDzBNLM3QNnDbUb41fKPZpAOFhdGl6t8I8Syrve9n+0A== X-Received: by 10.84.240.193 with SMTP id l1mr34684251plt.240.1512859039835; Sat, 09 Dec 2017 14:37:19 -0800 (PST) Received: from raichu (toroon0560w-lp140-01-69-159-38-22.dsl.bell.ca. [69.159.38.22]) by smtp.gmail.com with ESMTPSA id i11sm18126361pfk.25.2017.12.09.14.37.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Dec 2017 14:37:18 -0800 (PST) Sender: Mark Johnston Date: Sat, 9 Dec 2017 17:37:13 -0500 From: Mark Johnston To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326731 - head/sys/ufs/ffs Message-ID: <20171209223713.GA15275@raichu> References: <201712091544.vB9FiVUI096790@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 22:37:21 -0000 On Sat, Dec 09, 2017 at 08:03:37PM +0200, Andriy Gapon wrote: > On 09/12/2017 17:44, Mark Johnston wrote: > > Some GEOMs do not appear to handle BIO_ORDERED correctly, meaning that the > > Nitpick: this should be "geoms" or, even better, "GEOM classes" :-) Ok. :) > > barrier write may not work as intended. > Could the loss of BIO_ORDERED in g_duplicate_bio() contribute to the problem > with those GEOM classes? It does look like a bug that g_duplicate_bio() doesn't preserve that flag. However, the issue I was looking at was in gmirror: when a mirror is being synchronized, gmirror will delay writes that collide with an active synchronization request. However, subsequent writes which do not collide are passed directly to the mirrors, so an ordering violation is possible. I plan to fix this. I haven't checked, but graid might have a similar issue. I also noticed that gsched doesn't take BIO_ORDERED into account when sorting requests. Isilon has an I/O scheduler which has this problem too. From owner-svn-src-head@freebsd.org Sat Dec 9 23:16:04 2017 Return-Path: Delivered-To: svn-src-head@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 5B35DE9B55C; Sat, 9 Dec 2017 23:16:04 +0000 (UTC) (envelope-from adrian@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 334D87967E; Sat, 9 Dec 2017 23:16:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB9NG3fO086426; Sat, 9 Dec 2017 23:16:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9NG32f086424; Sat, 9 Dec 2017 23:16:03 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201712092316.vB9NG32f086424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 9 Dec 2017 23:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326737 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 326737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 23:16:04 -0000 Author: adrian Date: Sat Dec 9 23:16:02 2017 New Revision: 326737 URL: https://svnweb.freebsd.org/changeset/base/326737 Log: [net80211] add a method for checking if a VAP WME AC has a NOACK policy or not. A subsequent set of commits will introduce this instead of a whole lot of gymnastics to check the WME category. Modified: head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_proto.h Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Sat Dec 9 21:55:19 2017 (r326736) +++ head/sys/net80211/ieee80211_proto.c Sat Dec 9 23:16:02 2017 (r326737) @@ -1308,6 +1308,12 @@ ieee80211_wme_updateparams(struct ieee80211vap *vap) } } +/* + * Fetch the WME parameters for the given VAP. + * + * When net80211 grows p2p, etc support, this may return different + * parameters for each VAP. + */ void ieee80211_wme_vap_getparams(struct ieee80211vap *vap, struct chanAccParams *wp) { @@ -1315,11 +1321,37 @@ ieee80211_wme_vap_getparams(struct ieee80211vap *vap, memcpy(wp, &vap->iv_ic->ic_wme.wme_chanParams, sizeof(*wp)); } +/* + * For NICs which only support one set of WME paramaters (ie, softmac NICs) + * there may be different VAP WME parameters but only one is "active". + * This returns the "NIC" WME parameters for the currently active + * context. + */ void ieee80211_wme_ic_getparams(struct ieee80211com *ic, struct chanAccParams *wp) { memcpy(wp, &ic->ic_wme.wme_chanParams, sizeof(*wp)); +} + +/* + * Return whether to use QoS on a given WME queue. + * + * This is intended to be called from the transmit path of softmac drivers + * which are setting NoAck bits in transmit descriptors. + * + * Ideally this would be set in some transmit field before the packet is + * queued to the driver but net80211 isn't quite there yet. + */ +int +ieee80211_wme_vap_ac_is_noack(struct ieee80211vap *vap, int ac) +{ + /* Bounds/sanity check */ + if (ac < 0 || ac >= WME_NUM_AC) + return (0); + + /* Again, there's only one global context for now */ + return (!! vap->iv_ic->ic_wme.wme_chanParams.cap_wmeParams[ac].wmep_noackPolicy); } static void Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Sat Dec 9 21:55:19 2017 (r326736) +++ head/sys/net80211/ieee80211_proto.h Sat Dec 9 23:16:02 2017 (r326737) @@ -298,6 +298,7 @@ void ieee80211_wme_vap_getparams(struct ieee80211vap * struct chanAccParams *); void ieee80211_wme_ic_getparams(struct ieee80211com *ic, struct chanAccParams *); +int ieee80211_wme_vap_ac_is_noack(struct ieee80211vap *vap, int ac); /* * Return the WME TID from a QoS frame. If no TID From owner-svn-src-head@freebsd.org Sat Dec 9 23:19:38 2017 Return-Path: Delivered-To: svn-src-head@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 C5115E9B65C for ; Sat, 9 Dec 2017 23:19:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (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 87FCE79835 for ; Sat, 9 Dec 2017 23:19:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22e.google.com with SMTP id d137so9484299itc.2 for ; Sat, 09 Dec 2017 15:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=DugEn0wF8WkdlBuulYzWW7JuI9Nhf03TN3PBUffcSLc=; b=uXWCmtyAYKhLcK0/5Wkguwuu58WatTw5IIgr6fPcbi7mkMD1lXzx2hVFuDtczFH2FF 2etoCDSHTCHYW7M0iMlZ+GXy2AuLSFPysWW2c+/yLI+tM/Pt0MGKJ+iVDqRsK4aNy84O obm6YNL+qiMxBY4CdB5w/z4F1rCIThk6lRXSudyVHUdsUrsPEQRUipEWbieMNrPNWvjJ qj9Iu+ZcuEU67Nms65oLyJfM6vx2LHlZKjqAWhkx5CDQLMlb8J542OmfpbgWS1SN/GgO mu1P0mOlu8XYhAhdvhhsM/sQfIZ2gD5ewYJw5QcyvuDSDzCM2BkJFc7fUlLwwQIQJ8go f8Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=DugEn0wF8WkdlBuulYzWW7JuI9Nhf03TN3PBUffcSLc=; b=joHHwo3+z5NY9qkq7hf/AKYo9BXNcMysA0yh1Sc/AqLHiKaNS50XqSnulMu0RR6RTq l4anULEk0yiNy/qNZnMvj/dxtgZaJ+HvZxX9fF3Oah2Z9t1G9swiLHvAyV0CCsKFah/J 6p7dejMCpAxrEz8IpjOKSTnRKmnWed5YQxDWd+3JXH51igVFo3DcVHK+AWzRGO1/y+D/ c5cAPYAnJdaUWMzH1DdfhQNVHsVOaKFaRqEK8kM+CZmNgVLhrRYJrnGRP5qt0gs3Ghx7 RYz+yVB/o7ZIytmaNX8oSh2eA2Lv0d8NIgBlhIlT/CdF7XYIGc2/zHbe+cT9lBpqbLIS 8dMQ== X-Gm-Message-State: AKGB3mKYTNnLMSRADAS4Pftr1JNnZ5NAgY0mry85OfxvCsxbWVCZTZ8l +Vs695HhTrOpz5eqycZ9MqsHeF1utX8Ek/TQZ4lytQ== X-Google-Smtp-Source: ACJfBov50QsRhDhGLLAWbB/GlRdvNfSk+hejHEPQqjNwHt/t8ZhMmpX34WHYRFlim2isW6QHaj31WkPS3JfFnn0ngl0= X-Received: by 10.36.131.200 with SMTP id d191mr3537030ite.97.1512861577726; Sat, 09 Dec 2017 15:19:37 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Sat, 9 Dec 2017 15:19:36 -0800 (PST) X-Originating-IP: [2607:fb90:6cac:851b:54b5:2218:52a:92a0] Received: by 10.79.108.204 with HTTP; Sat, 9 Dec 2017 15:19:36 -0800 (PST) In-Reply-To: <20171209223713.GA15275@raichu> References: <201712091544.vB9FiVUI096790@repo.freebsd.org> <20171209223713.GA15275@raichu> From: Warner Losh Date: Sat, 9 Dec 2017 16:19:36 -0700 X-Google-Sender-Auth: -j_hFgIgWvEgxpYc9TbVMGUeEPM Message-ID: Subject: Re: svn commit: r326731 - head/sys/ufs/ffs To: Mark Johnston Cc: Andriy Gapon , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 23:19:38 -0000 On Dec 9, 2017 3:37 PM, "Mark Johnston" wrote: On Sat, Dec 09, 2017 at 08:03:37PM +0200, Andriy Gapon wrote: > On 09/12/2017 17:44, Mark Johnston wrote: > > Some GEOMs do not appear to handle BIO_ORDERED correctly, meaning that the > > Nitpick: this should be "geoms" or, even better, "GEOM classes" :-) Ok. :) > > barrier write may not work as intended. > Could the loss of BIO_ORDERED in g_duplicate_bio() contribute to the problem > with those GEOM classes? It does look like a bug that g_duplicate_bio() doesn't preserve that flag. However, the issue I was looking at was in gmirror: when a mirror is being synchronized, gmirror will delay writes that collide with an active synchronization request. However, subsequent writes which do not collide are passed directly to the mirrors, so an ordering violation is possible. I plan to fix this. I haven't checked, but graid might have a similar issue. I also noticed that gsched doesn't take BIO_ORDERED into account when sorting requests. Isilon has an I/O scheduler which has this problem too I think the cam iosched ignores it too. It's really a Pita. And what do you do with multiple streams setting these sorts of bios. It's a relic of the single threaded days... Warner From owner-svn-src-head@freebsd.org Sat Dec 9 23:27:34 2017 Return-Path: Delivered-To: svn-src-head@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 8580CE9B92B; Sat, 9 Dec 2017 23:27:34 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 4B08579C77; Sat, 9 Dec 2017 23:27:33 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 651B52738B; Sat, 9 Dec 2017 23:27:26 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id vB9NRAL1073191 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 9 Dec 2017 23:27:10 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id vB9NRA4j073190; Sat, 9 Dec 2017 23:27:10 GMT (envelope-from phk) To: Warner Losh cc: Mark Johnston , Andriy Gapon , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326731 - head/sys/ufs/ffs In-reply-to: From: "Poul-Henning Kamp" References: <201712091544.vB9FiVUI096790@repo.freebsd.org> <20171209223713.GA15275@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <73188.1512862030.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Sat, 09 Dec 2017 23:27:10 +0000 Message-ID: <73189.1512862030@critter.freebsd.dk> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 23:27:34 -0000 -------- In message , Warner Losh writes: >I also noticed that gsched doesn't take BIO_ORDERED into account when >sorting requests. Isilon has an I/O scheduler which has this problem >too > >I think the cam iosched ignores it too. That would be strange given that BIO_ORDERED is @gibbs baby ? -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-svn-src-head@freebsd.org Sat Dec 9 23:34:02 2017 Return-Path: Delivered-To: svn-src-head@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 57E7CE9BB91; Sat, 9 Dec 2017 23:34:02 +0000 (UTC) (envelope-from eugen@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 2F2E07A08D; Sat, 9 Dec 2017 23:34:02 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB9NY1an094588; Sat, 9 Dec 2017 23:34:01 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9NY0eo094581; Sat, 9 Dec 2017 23:34:00 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201712092334.vB9NY0eo094581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sat, 9 Dec 2017 23:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326738 - head/usr.sbin/pw X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.sbin/pw X-SVN-Commit-Revision: 326738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 23:34:02 -0000 Author: eugen Date: Sat Dec 9 23:34:00 2017 New Revision: 326738 URL: https://svnweb.freebsd.org/changeset/base/326738 Log: pw(8): correct expiration period handling and command line overrides to preconfigured values for -e, -p and -w flags. Use non-negative symbols instead of magic values in passwd_val/pw_password functions. PR: 223431 Submitted by: Yuri Pankov (in part, patch for the manual) Reported by: mav (mentor) MFC after: 3 days Relnotes: yes Modified: head/usr.sbin/pw/psdate.c head/usr.sbin/pw/psdate.h head/usr.sbin/pw/pw.8 head/usr.sbin/pw/pw.h head/usr.sbin/pw/pw_conf.c head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/psdate.c ============================================================================== --- head/usr.sbin/pw/psdate.c Sat Dec 9 23:16:02 2017 (r326737) +++ head/usr.sbin/pw/psdate.c Sat Dec 9 23:34:00 2017 (r326738) @@ -40,7 +40,7 @@ static const char rcsid[] = #include "psdate.h" -static int +int numerics(char const * str) { Modified: head/usr.sbin/pw/psdate.h ============================================================================== --- head/usr.sbin/pw/psdate.h Sat Dec 9 23:16:02 2017 (r326737) +++ head/usr.sbin/pw/psdate.h Sat Dec 9 23:34:00 2017 (r326738) @@ -35,6 +35,7 @@ #include __BEGIN_DECLS +int numerics(char const * str); time_t parse_date(time_t dt, char const * str); void print_date(char *buf, time_t t, int dotime); __END_DECLS Modified: head/usr.sbin/pw/pw.8 ============================================================================== --- head/usr.sbin/pw/pw.8 Sat Dec 9 23:16:02 2017 (r326737) +++ head/usr.sbin/pw/pw.8 Sat Dec 9 23:34:00 2017 (r326738) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2016 +.Dd December 10, 2017 .Dt PW 8 .Os .Sh NAME @@ -611,6 +611,14 @@ that the account expires. A value of 0 suppresses automatic calculation of the expiry date. .It Fl p Ar days Set the default password expiration period in days. +When +.Fl D +is used, the +.Ar days +argument is interpreted differently. +It must be numeric and represents the number of days after creation +that the account expires. +A value of 0 suppresses automatic calculation of the expiry date. .It Fl g Ar group Set the default group for new users. If a blank group is specified using Modified: head/usr.sbin/pw/pw.h ============================================================================== --- head/usr.sbin/pw/pw.h Sat Dec 9 23:16:02 2017 (r326737) +++ head/usr.sbin/pw/pw.h Sat Dec 9 23:34:00 2017 (r326738) @@ -48,6 +48,14 @@ enum _mode M_NUM }; +enum _passmode +{ + P_NO, + P_NONE, + P_RANDOM, + P_YES +}; + enum _which { W_USER, Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sat Dec 9 23:16:02 2017 (r326737) +++ head/usr.sbin/pw/pw_conf.c Sat Dec 9 23:34:00 2017 (r326738) @@ -200,18 +200,18 @@ passwd_val(char const * str, int dflt) for (i = 0; booltrue[i]; i++) if (strcmp(str, booltrue[i]) == 0) - return 1; + return P_YES; for (i = 0; boolfalse[i]; i++) if (strcmp(str, boolfalse[i]) == 0) - return 0; + return P_NO; /* * Special cases for defaultpassword */ if (strcmp(str, "random") == 0) - return -1; + return P_RANDOM; if (strcmp(str, "none") == 0) - return -2; + return P_NONE; errx(1, "Invalid value for default password"); } Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Dec 9 23:16:02 2017 (r326737) +++ head/usr.sbin/pw/pw_user.c Sat Dec 9 23:34:00 2017 (r326738) @@ -517,7 +517,9 @@ pw_password(struct userconf * cnf, char const * user, char pwbuf[32]; switch (cnf->default_password) { - case -1: /* Random password */ + case P_NONE: /* No password at all! */ + return ""; + case P_RANDOM: /* Random password */ l = (arc4random() % 8 + 8); /* 8 - 16 chars */ for (i = 0; i < l; i++) pwbuf[i] = chars[arc4random_uniform(sizeof(chars)-1)]; @@ -533,17 +535,13 @@ pw_password(struct userconf * cnf, char const * user, fflush(stdout); } break; - - case -2: /* No password at all! */ - return ""; - - case 0: /* No login - default */ - default: - return "*"; - - case 1: /* user's name */ + case P_YES: /* user's name */ strlcpy(pwbuf, user, sizeof(pwbuf)); break; + case P_NO: /* No login - default */ + /* FALLTHROUGH */ + default: + return "*"; } return pw_pwcrypt(pwbuf); } @@ -1124,11 +1122,20 @@ validate_mode(char *mode) return (m); } +static long +validate_expire(char *str, int opt) +{ + if (!numerics(str)) + errx(EX_DATAERR, "-%c argument must be numeric " + "when setting defaults: %s", (char)opt, str); + return strtol(str, NULL, 0); +} + static void mix_config(struct userconf *cmdcnf, struct userconf *cfg) { - if (cmdcnf->default_password == 0) + if (cmdcnf->default_password < 0) cmdcnf->default_password = cfg->default_password; if (cmdcnf->reuse_uids == 0) cmdcnf->reuse_uids = cfg->reuse_uids; @@ -1166,9 +1173,9 @@ mix_config(struct userconf *cmdcnf, struct userconf *c cmdcnf->min_gid = cfg->min_gid; if (cmdcnf->max_gid == 0) cmdcnf->max_gid = cfg->max_gid; - if (cmdcnf->expire_days == 0) + if (cmdcnf->expire_days < 0) cmdcnf->expire_days = cfg->expire_days; - if (cmdcnf->password_days == 0) + if (cmdcnf->password_days < 0) cmdcnf->password_days = cfg->password_days; } @@ -1200,6 +1207,9 @@ pw_user_add(int argc, char **argv, char *arg1) if ((cmdcnf = calloc(1, sizeof(struct userconf))) == NULL) err(EXIT_FAILURE, "calloc()"); + cmdcnf->default_password = cmdcnf->expire_days = cmdcnf->password_days = -1; + now = time(NULL); + if (arg1 != NULL) { if (arg1[strspn(arg1, "0123456789")] == '\0') id = pw_checkid(arg1, UID_MAX); @@ -1228,12 +1238,16 @@ pw_user_add(int argc, char **argv, char *arg1) homedir = optarg; break; case 'e': - now = time(NULL); - cmdcnf->expire_days = parse_date(now, optarg); + if (genconf) + cmdcnf->expire_days = validate_expire(optarg, ch); + else + cmdcnf->expire_days = parse_date(now, optarg); break; case 'p': - now = time(NULL); - cmdcnf->password_days = parse_date(now, optarg); + if (genconf) + cmdcnf->password_days = validate_expire(optarg, ch); + else + cmdcnf->password_days = parse_date(now, optarg); break; case 'g': validate_grname(cmdcnf, optarg); @@ -1371,8 +1385,12 @@ pw_user_add(int argc, char **argv, char *arg1) pwd->pw_uid = pw_uidpolicy(cmdcnf, id); pwd->pw_gid = pw_gidpolicy(cnf, grname, pwd->pw_name, (gid_t) pwd->pw_uid, dryrun); - pwd->pw_change = cmdcnf->password_days; - pwd->pw_expire = cmdcnf->expire_days; + + if (cmdcnf->password_days > 0) + pwd->pw_change = now + cmdcnf->password_days * 86400L; + if (cmdcnf->expire_days > 0) + pwd->pw_expire = now + cmdcnf->expire_days * 86400L; + pwd->pw_dir = pw_homepolicy(cmdcnf, homedir, pwd->pw_name); pwd->pw_shell = pw_shellpolicy(cmdcnf); lc = login_getpwclass(pwd); @@ -1513,6 +1531,7 @@ pw_user_mod(int argc, char **argv, char *arg1) class = nispasswd = NULL; quiet = createhome = pretty = dryrun = nis = precrypted = false; edited = false; + now = time(NULL); if (arg1 != NULL) { if (arg1[strspn(arg1, "0123456789")] == '\0') @@ -1542,11 +1561,9 @@ pw_user_mod(int argc, char **argv, char *arg1) homedir = optarg; break; case 'e': - now = time(NULL); expire_days = parse_date(now, optarg); break; case 'p': - now = time(NULL); password_days = parse_date(now, optarg); break; case 'g': @@ -1681,13 +1698,14 @@ pw_user_mod(int argc, char **argv, char *arg1) } } - if (password_days >= 0 && pwd->pw_change != password_days) { - pwd->pw_change = password_days; + + if (password_days >= 0) { + pwd->pw_change = now + password_days * 86400L; edited = true; } - if (expire_days >= 0 && pwd->pw_expire != expire_days) { - pwd->pw_expire = expire_days; + if (expire_days >= 0) { + pwd->pw_expire = now + expire_days * 86400L; edited = true; } From owner-svn-src-head@freebsd.org Sat Dec 9 23:35:01 2017 Return-Path: Delivered-To: svn-src-head@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 7265EE9BC20 for ; Sat, 9 Dec 2017 23:35:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (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 32FB67A1DD for ; Sat, 9 Dec 2017 23:35:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22f.google.com with SMTP id t196so6016240iof.0 for ; Sat, 09 Dec 2017 15:35:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=kJS7tHPfyocmeZiqTj1XURUuKP5xsB0ohr83mpX0YNs=; b=WJf3UaLJ6l79qAngsbfJeRwU/6pmadg+VMiNpXBZhSs072oRMYvtov8qLTtOM4QmAb TGT2cH4EfxA7AZ6IRlXyUbvqNvJBqjpFSLR+AGGn1DZwsEnA/bN0m5C/laNVbdLm/3Lt bx44cabM8yAVs6p3RcO4yXUVlaEjiksAoOp8QKzWzpnsV1Pt28u7qsiKbuFn3VYy6DlJ NJf1YhXzhGxejD5FVs4Yc0ww1FH86giQEdNjpUyUtaRTVMSODnxSgoqMpVvzWTB84kwy dp515nTJKFNihkSmmEVBN2awvtsy3iqkYqk++m97OFSJnEOPZbPGLnptpv1pC7bJFeNf iyDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=kJS7tHPfyocmeZiqTj1XURUuKP5xsB0ohr83mpX0YNs=; b=bhROk3yyn7KfKagvcYrgwVgwu67LIVr32sMrWLOzKGUtztkma0GhlIig+1bW2MCfod TALZObvxs1lnnuidxaI/jaLRcXKP4i2Mu9cbmYiMJXMycZ6XS9mV6NMiCLpI0dmib5zw uaiMM3cO1pdxEMAjtSedVgoxpbjW07eIG+gGjzOjIEUmp/WGs+GVAFaIe+MAxoRWNoiJ EhTLM1o627pJ41ZBfdp8IUh8gFbCbv03C31HCzUZH+gcZclsFJt82RnSzpSGfdYlmglK LG4S9NGB7KAqWIYA/DMylOOYiOuZvQGvqKRnW9SNITwUpJcNW5QRwlSGX0lcF1Cac0AX HzpA== X-Gm-Message-State: AJaThX4KxVyxhPGmQ8f+L2q58CcDDkT7Ma1tO9jLNOacIv4q5w0rs7d6 YpcKTUvYkOyYe4iwZBCs8Qv8ZRZcsyLOaXNZtjjcaA== X-Google-Smtp-Source: AGs4zMYbWVzls3AeH+vdr7TL+PY/u5A9bB8D++Z9AXwxCU3pTie+qq8YiZaTccHC5/6oplJWXF+nV+P/nNNhmiXx/KQ= X-Received: by 10.107.48.197 with SMTP id w188mr49518288iow.301.1512862500345; Sat, 09 Dec 2017 15:35:00 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Sat, 9 Dec 2017 15:34:59 -0800 (PST) X-Originating-IP: [2607:fb90:6cac:851b:54b5:2218:52a:92a0] Received: by 10.79.108.204 with HTTP; Sat, 9 Dec 2017 15:34:59 -0800 (PST) In-Reply-To: <73189.1512862030@critter.freebsd.dk> References: <201712091544.vB9FiVUI096790@repo.freebsd.org> <20171209223713.GA15275@raichu> <73189.1512862030@critter.freebsd.dk> From: Warner Losh Date: Sat, 9 Dec 2017 16:34:59 -0700 X-Google-Sender-Auth: BEtc_WXmNnjWk-COq-AX2mckvA8 Message-ID: Subject: Re: svn commit: r326731 - head/sys/ufs/ffs To: Poul-Henning Kamp Cc: Mark Johnston , Andriy Gapon , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 23:35:01 -0000 On Dec 9, 2017 4:27 PM, "Poul-Henning Kamp" wrote: -------- In message , Warner Losh writes: >I also noticed that gsched doesn't take BIO_ORDERED into account when >sorting requests. Isilon has an I/O scheduler which has this problem >too > >I think the cam iosched ignores it too. That would be strange given that BIO_ORDERED is @gibbs baby ? Nah... I wrote the iosched code... and I find the concept somewhat flawed since it is at the disk level, not the partition level, so it winds up interfering with mixed traffic. And it really only makes sense for writes, but it affects reads. And it is a poor fit to Ata semantics, and not a lot better for scsi. And for nvme it creates a bottleneck in hardware carefully designed to be free of bottlenecks... Warner Warner -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-head@freebsd.org Sat Dec 9 23:40:31 2017 Return-Path: Delivered-To: svn-src-head@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 B64C9E9BDCB; Sat, 9 Dec 2017 23:40:31 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 476FC7A406; Sat, 9 Dec 2017 23:40:30 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vB9NePc4090616 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 10 Dec 2017 00:40:26 +0100 (CET) (envelope-from eugen@freebsd.org) X-Envelope-From: eugen@freebsd.org X-Envelope-To: src-committers@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id vB9NeKLB030934 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 10 Dec 2017 06:40:21 +0700 (+07) (envelope-from eugen@freebsd.org) Subject: Re: svn commit: r326738 - head/usr.sbin/pw To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712092334.vB9NY0eo094581@repo.freebsd.org> From: Eugene Grosbein Message-ID: <5A2C745F.9020209@freebsd.org> Date: Sun, 10 Dec 2017 06:40:15 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201712092334.vB9NY0eo094581@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Dec 2017 23:40:31 -0000 10.12.2017 6:34, Eugene Grosbein пишет: > Author: eugen > Date: Sat Dec 9 23:34:00 2017 > New Revision: 326738 > URL: https://svnweb.freebsd.org/changeset/base/326738 > > Log: > pw(8): correct expiration period handling and command line overrides > to preconfigured values for -e, -p and -w flags. > > Use non-negative symbols instead of magic values > in passwd_val/pw_password functions. > > PR: 223431 > Submitted by: Yuri Pankov (in part, patch for the manual) > Reported by: mav (mentor) Oh... Of course, it should be "Approved by: mav (mentor)". Mea culpa.