From owner-svn-src-all@freebsd.org Sun May 28 00:13:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6CD9D76610; Sun, 28 May 2017 00:13:46 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 781341C89; Sun, 28 May 2017 00:13:46 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S0DjYA086308; Sun, 28 May 2017 00:13:45 GMT (envelope-from rgrimes@FreeBSD.org) Received: (from rgrimes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S0DipZ086301; Sun, 28 May 2017 00:13:44 GMT (envelope-from rgrimes@FreeBSD.org) Message-Id: <201705280013.v4S0DipZ086301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rgrimes set sender to rgrimes@FreeBSD.org using -f From: "Rodney W. Grimes" Date: Sun, 28 May 2017 00:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319016 - in stable/11: bin/pkill libexec/rtld-elf usr.bin/chpass usr.bin/passwd usr.sbin/bsdinstall/partedit usr.sbin/mailwrapper usr.sbin/nologin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 00:13:46 -0000 Author: rgrimes Date: Sun May 28 00:13:44 2017 New Revision: 319016 URL: https://svnweb.freebsd.org/changeset/base/319016 Log: MFC r314833 Convert absolute links to relative links. Style.Makefile(9) has been ignored to produce minimal diffs. MFC r314837 The relative symlink fix causes downstream issues for EMC DELL Isilon so revert the relative symlink fix pending a better solution. Reported by: ngie MFC r315091 Revert r314833 until the problem with INSTALL_RSYMLINKS can be found as it appears to break arm release builds. PR: 217705 Reported by: cyclaero@gmail.com Approved by: grehan (mentor) Modified: stable/11/bin/pkill/Makefile stable/11/libexec/rtld-elf/Makefile stable/11/usr.bin/chpass/Makefile stable/11/usr.bin/passwd/Makefile stable/11/usr.sbin/bsdinstall/partedit/Makefile stable/11/usr.sbin/mailwrapper/Makefile stable/11/usr.sbin/nologin/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/pkill/Makefile ============================================================================== --- stable/11/bin/pkill/Makefile Sat May 27 23:57:09 2017 (r319015) +++ stable/11/bin/pkill/Makefile Sun May 28 00:13:44 2017 (r319016) @@ -16,8 +16,8 @@ MLINKS= pkill.1 pgrep.1 # keep in mind that pkill is installed to /usr/bin in other # OS types, e.g., NetBSD, OpenBSD, Solaris, and Linux. # -SYMLINKS= ${BINDIR}/pkill /usr/bin/pkill -SYMLINKS+= ${BINDIR}/pgrep /usr/bin/pgrep +SYMLINKS= ../..${BINDIR}/pkill /usr/bin/pkill +SYMLINKS+= ../..${BINDIR}/pgrep /usr/bin/pgrep .if ${MK_TESTS} != "no" SUBDIR+= tests Modified: stable/11/libexec/rtld-elf/Makefile ============================================================================== --- stable/11/libexec/rtld-elf/Makefile Sat May 27 23:57:09 2017 (r319015) +++ stable/11/libexec/rtld-elf/Makefile Sun May 28 00:13:44 2017 (r319016) @@ -34,7 +34,7 @@ WARNS?= 2 INSTALLFLAGS= -C -b PRECIOUSPROG= BINDIR= /libexec -SYMLINKS= ${BINDIR}/${PROG} ${LIBEXECDIR}/${PROG} +SYMLINKS= ../..${BINDIR}/${PROG} ${LIBEXECDIR}/${PROG} MLINKS= rtld.1 ld-elf.so.1.1 \ rtld.1 ld.so.1 Modified: stable/11/usr.bin/chpass/Makefile ============================================================================== --- stable/11/usr.bin/chpass/Makefile Sat May 27 23:57:09 2017 (r319015) +++ stable/11/usr.bin/chpass/Makefile Sun May 28 00:13:44 2017 (r319016) @@ -22,12 +22,12 @@ LIBADD= crypt util LIBADD+= ypclnt .endif -SYMLINKS= ${BINDIR}/chpass ${BINDIR}/chfn -SYMLINKS+= ${BINDIR}/chpass ${BINDIR}/chsh +SYMLINKS= chpass ${BINDIR}/chfn +SYMLINKS+= chpass ${BINDIR}/chsh .if ${MK_NIS} != "no" -SYMLINKS+= ${BINDIR}/chpass ${BINDIR}/ypchpass -SYMLINKS+= ${BINDIR}/chpass ${BINDIR}/ypchfn -SYMLINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh +SYMLINKS+= chpass ${BINDIR}/ypchfn +SYMLINKS+= chpass ${BINDIR}/ypchpass +SYMLINKS+= chpass ${BINDIR}/ypchsh .endif MLINKS= chpass.1 chfn.1 chpass.1 chsh.1 Modified: stable/11/usr.bin/passwd/Makefile ============================================================================== --- stable/11/usr.bin/passwd/Makefile Sat May 27 23:57:09 2017 (r319015) +++ stable/11/usr.bin/passwd/Makefile Sun May 28 00:13:44 2017 (r319016) @@ -9,7 +9,7 @@ BINMODE = 4555 PRECIOUSPROG= LIBADD = pam .if ${MK_NIS} != "no" -SYMLINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd +SYMLINKS = passwd ${BINDIR}/yppasswd MLINKS = passwd.1 yppasswd.1 .endif Modified: stable/11/usr.sbin/bsdinstall/partedit/Makefile ============================================================================== --- stable/11/usr.sbin/bsdinstall/partedit/Makefile Sat May 27 23:57:09 2017 (r319015) +++ stable/11/usr.sbin/bsdinstall/partedit/Makefile Sun May 28 00:13:44 2017 (r319016) @@ -4,7 +4,7 @@ BINDIR= ${LIBEXECDIR}/bsdinstall PROG= partedit LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ ${BINDIR}/partedit ${BINDIR}/scriptedpart -SYMLINKS= ${BINDIR}/partedit /usr/sbin/sade +SYMLINKS= ../libexec/bsdinstall/partedit /usr/sbin/sade LIBADD+= geom ncursesw util dialog m PARTEDIT_ARCH= ${MACHINE} Modified: stable/11/usr.sbin/mailwrapper/Makefile ============================================================================== --- stable/11/usr.sbin/mailwrapper/Makefile Sat May 27 23:57:09 2017 (r319015) +++ stable/11/usr.sbin/mailwrapper/Makefile Sun May 28 00:13:44 2017 (r319016) @@ -10,19 +10,19 @@ LIBADD= util .endif .if ${MK_MAILWRAPPER} != "no" || ${MK_SENDMAIL} != "no" -SYMLINKS= ${BINDIR}/mailwrapper /usr/sbin/sendmail \ - ${BINDIR}/mailwrapper /usr/sbin/hoststat \ - ${BINDIR}/mailwrapper /usr/sbin/purgestat \ - ${BINDIR}/mailwrapper /usr/bin/newaliases \ - ${BINDIR}/mailwrapper /usr/bin/mailq +SYMLINKS= ../sbin/mailwrapper /usr/bin/mailq \ + ../sbin/mailwrapper /usr/bin/newaliases \ + mailwrapper /usr/sbin/hoststat \ + mailwrapper /usr/sbin/purgestat \ + mailwrapper /usr/sbin/sendmail .if ${MK_MAILWRAPPER} == "no" && ${MK_SENDMAIL} != "no" -SYMLINKS+= /usr/libexec/sendmail/sendmail ${BINDIR}/mailwrapper +SYMLINKS+= ../libexec/sendmail/sendmail ${BINDIR}/mailwrapper .endif .endif .if ${MK_MAILWRAPPER} != "no" && ${MK_SENDMAIL} == "no" -SYMLINKS+= ${BINDIR}/mailwrapper /bin/rmail +SYMLINKS+= ..${BINDIR}/mailwrapper /bin/rmail .endif .if ${MK_MAILWRAPPER} != "no" Modified: stable/11/usr.sbin/nologin/Makefile ============================================================================== --- stable/11/usr.sbin/nologin/Makefile Sat May 27 23:57:09 2017 (r319015) +++ stable/11/usr.sbin/nologin/Makefile Sun May 28 00:13:44 2017 (r319016) @@ -4,7 +4,7 @@ PROG= nologin MAN= nologin.5 nologin.8 -SYMLINKS= ${BINDIR}/nologin /sbin/nologin +SYMLINKS= ..${BINDIR}/nologin /sbin/nologin # It is important that nologin be statically linked for security # reasons. A dynamic non-setuid binary can be linked against a trojan From owner-svn-src-all@freebsd.org Sun May 28 00:25:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA6C0D76908; Sun, 28 May 2017 00:25:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1DD812D2; Sun, 28 May 2017 00:25:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S0PfGk090690; Sun, 28 May 2017 00:25:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S0PfHY090688; Sun, 28 May 2017 00:25:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280025.v4S0PfHY090688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 00:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319017 - stable/11/lib/libgeom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 00:25:43 -0000 Author: ngie Date: Sun May 28 00:25:41 2017 New Revision: 319017 URL: https://svnweb.freebsd.org/changeset/base/319017 Log: MFC r317310,r317316: r317310: Minor style(9) fixups Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289. r317316: Minor style(9) fixups Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289. Modified: stable/11/lib/libgeom/geom_ctl.c stable/11/lib/libgeom/geom_stats.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libgeom/geom_ctl.c ============================================================================== --- stable/11/lib/libgeom/geom_ctl.c Sun May 28 00:13:44 2017 (r319016) +++ stable/11/lib/libgeom/geom_ctl.c Sun May 28 00:25:41 2017 (r319017) @@ -29,23 +29,22 @@ * $FreeBSD$ */ -#include +#include +#include #include #include -#include -#include +#include #include -#include -#include +#include +#include #include -#include - -#include +#include +#include #define GCTL_TABLE 1 #include -/* +/* * Global pointer to a string that is used to avoid an errorneous free in * gctl_free. */ @@ -172,7 +171,7 @@ gctl_param_add(struct gctl_req *req, con ap->len = len; else if (len < 0) { ap->flag |= GCTL_PARAM_ASCII; - ap->len = strlen(value) + 1; + ap->len = strlen(value) + 1; } } Modified: stable/11/lib/libgeom/geom_stats.c ============================================================================== --- stable/11/lib/libgeom/geom_stats.c Sun May 28 00:13:44 2017 (r319016) +++ stable/11/lib/libgeom/geom_stats.c Sun May 28 00:25:41 2017 (r319017) @@ -29,20 +29,18 @@ * $FreeBSD$ */ -#include +#include +#include +#include +#include #include #include +#include #include #include #include #include -#include -#include -#include -#include - - /************************************************************/ static uint npages, pagesize, spp; static int statsfd = -1; @@ -67,7 +65,7 @@ geom_stats_resync(void) if (statsfd == -1) return; for (;;) { - p = mmap(statp, (npages + 1) * pagesize, + p = mmap(statp, (npages + 1) * pagesize, PROT_READ, MAP_SHARED, statsfd, 0); if (p == MAP_FAILED) break; From owner-svn-src-all@freebsd.org Sun May 28 00:25:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87C48D76928; Sun, 28 May 2017 00:25:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE171301; Sun, 28 May 2017 00:25:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S0PjrX090741; Sun, 28 May 2017 00:25:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S0Pj7F090739; Sun, 28 May 2017 00:25:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280025.v4S0Pj7F090739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 00:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319018 - stable/10/lib/libgeom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 00:25:46 -0000 Author: ngie Date: Sun May 28 00:25:44 2017 New Revision: 319018 URL: https://svnweb.freebsd.org/changeset/base/319018 Log: MFC r317310,r317316: r317310: Minor style(9) fixups Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289. r317316: Minor style(9) fixups Delete trailing whitespace and sort headers. Leave libgeom.h's placement alone, per reasoning in r317289. Modified: stable/10/lib/libgeom/geom_ctl.c stable/10/lib/libgeom/geom_stats.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libgeom/geom_ctl.c ============================================================================== --- stable/10/lib/libgeom/geom_ctl.c Sun May 28 00:25:41 2017 (r319017) +++ stable/10/lib/libgeom/geom_ctl.c Sun May 28 00:25:44 2017 (r319018) @@ -29,23 +29,22 @@ * $FreeBSD$ */ -#include +#include +#include #include #include -#include -#include +#include #include -#include -#include +#include +#include #include -#include - -#include +#include +#include #define GCTL_TABLE 1 #include -/* +/* * Global pointer to a string that is used to avoid an errorneous free in * gctl_free. */ @@ -172,7 +171,7 @@ gctl_param_add(struct gctl_req *req, con ap->len = len; else if (len < 0) { ap->flag |= GCTL_PARAM_ASCII; - ap->len = strlen(value) + 1; + ap->len = strlen(value) + 1; } } Modified: stable/10/lib/libgeom/geom_stats.c ============================================================================== --- stable/10/lib/libgeom/geom_stats.c Sun May 28 00:25:41 2017 (r319017) +++ stable/10/lib/libgeom/geom_stats.c Sun May 28 00:25:44 2017 (r319018) @@ -29,20 +29,18 @@ * $FreeBSD$ */ -#include +#include +#include +#include +#include #include #include +#include #include #include #include #include -#include -#include -#include -#include - - /************************************************************/ static uint npages, pagesize, spp; static int statsfd = -1; @@ -67,7 +65,7 @@ geom_stats_resync(void) if (statsfd == -1) return; for (;;) { - p = mmap(statp, (npages + 1) * pagesize, + p = mmap(statp, (npages + 1) * pagesize, PROT_READ, MAP_SHARED, statsfd, 0); if (p == MAP_FAILED) break; From owner-svn-src-all@freebsd.org Sun May 28 00:28:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30FA6D76A36; Sun, 28 May 2017 00:28:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 012D915FE; Sun, 28 May 2017 00:28:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S0SCFv090865; Sun, 28 May 2017 00:28:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S0SCET090864; Sun, 28 May 2017 00:28:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280028.v4S0SCET090864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 00:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319019 - head/lib/libgeom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 00:28:13 -0000 Author: ngie Date: Sun May 28 00:28:11 2017 New Revision: 319019 URL: https://svnweb.freebsd.org/changeset/base/319019 Log: Remove getpagesize(3) error checking added in r317312 getpagesize(3) no longer fails as of r317436. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libgeom/geom_stats.c Modified: head/lib/libgeom/geom_stats.c ============================================================================== --- head/lib/libgeom/geom_stats.c Sun May 28 00:25:44 2017 (r319018) +++ head/lib/libgeom/geom_stats.c Sun May 28 00:28:11 2017 (r319019) @@ -87,8 +87,6 @@ geom_stats_open(void) if (statsfd < 0) return (errno); pagesize = getpagesize(); - if (pagesize == -1) - return (errno); spp = pagesize / sizeof(struct devstat); p = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, statsfd, 0); if (p == MAP_FAILED) { From owner-svn-src-all@freebsd.org Sun May 28 00:43:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07FB4D76EDE; Sun, 28 May 2017 00:43:14 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABDCF1D5E; Sun, 28 May 2017 00:43:13 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S0hCMA098947; Sun, 28 May 2017 00:43:12 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S0hCqh098945; Sun, 28 May 2017 00:43:12 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705280043.v4S0hCqh098945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sun, 28 May 2017 00:43:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319020 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 00:43:14 -0000 Author: vangyzen Date: Sun May 28 00:43:12 2017 New Revision: 319020 URL: https://svnweb.freebsd.org/changeset/base/319020 Log: Fix INSTALL_AS_USER Move INSTALL_AS_USER into bsd.init.mk to maximize the chance that it has final authority over fooOWN and fooGRP. Reviewed by: sjg MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10810 Modified: head/share/mk/bsd.init.mk head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.init.mk ============================================================================== --- head/share/mk/bsd.init.mk Sun May 28 00:28:11 2017 (r319019) +++ head/share/mk/bsd.init.mk Sun May 28 00:43:12 2017 (r319020) @@ -16,6 +16,33 @@ ____: .include .MAIN: all +# Handle INSTALL_AS_USER here to maximize the chance that +# it has final authority over fooOWN and fooGRP. +.if ${MK_INSTALL_AS_USER} != "no" +.if !defined(_uid) +_uid!= id -u +.export _uid +.endif +.if ${_uid} != 0 +.if !defined(USER) +# Avoid exporting USER +.if !defined(_USER) +_USER!= id -un +.export _USER +.endif +USER= ${_USER} +.endif +.if !defined(_gid) +_gid!= id -g +.export _gid +.endif +.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE +$xOWN= ${USER} +$xGRP= ${_gid} +.endfor +.endif +.endif + # Some targets need to know when something may build. This is used to # optimize targets that are only needed when building something, such as # (not) reading in depend files. For DIRDEPS_BUILD, it will only calculate Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sun May 28 00:28:11 2017 (r319019) +++ head/share/mk/bsd.own.mk Sun May 28 00:43:12 2017 (r319020) @@ -135,31 +135,6 @@ CTFCONVERT_CMD= CTFCONVERT_CMD= @: .endif -.if ${MK_INSTALL_AS_USER} != "no" -.if !defined(_uid) -_uid!= id -u -.export _uid -.endif -.if ${_uid} != 0 -.if !defined(USER) -# Avoid exporting USER -.if !defined(_USER) -_USER!= id -un -.export _USER -.endif -USER= ${_USER} -.endif -.if !defined(_gid) -_gid!= id -g -.export _gid -.endif -.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE -$xOWN= ${USER} -$xGRP= ${_gid} -.endfor -.endif -.endif - .endif # !_WITHOUT_SRCCONF # Binaries From owner-svn-src-all@freebsd.org Sun May 28 00:45:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D231BD76F5D; Sun, 28 May 2017 00:45:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD4371EBE; Sun, 28 May 2017 00:45:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S0j2VB099118; Sun, 28 May 2017 00:45:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S0j2RW099117; Sun, 28 May 2017 00:45:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280045.v4S0j2RW099117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 00:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319021 - stable/11/lib/libcam X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 00:45:03 -0000 Author: ngie Date: Sun May 28 00:45:02 2017 New Revision: 319021 URL: https://svnweb.freebsd.org/changeset/base/319021 Log: MFC r316131: Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf) Part of my original reasoning as far as converting the snprintf calls was to permit switching over from char[] to wchar_t[] in the future, as well as futureproof in case cam_errbuf's size was ever changed. Unfortunately, my approach was bugged because it conflated the number of items with the size of the buffer, instead of the number of elements being a fixed size != 1 byte. Use nitems(..) instead which counts the quantity of items of a specific type, as opposed to an unqualified sizeof(..) (which assumes that the number of characters is equal to the buffer size). Noted by: cem Modified: stable/11/lib/libcam/camlib.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libcam/camlib.c ============================================================================== --- stable/11/lib/libcam/camlib.c Sun May 28 00:43:12 2017 (r319020) +++ stable/11/lib/libcam/camlib.c Sun May 28 00:45:02 2017 (r319021) @@ -120,7 +120,7 @@ cam_get_device(const char *path, char *d int i; if (path == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device pathname was NULL", __func__); return(-1); } @@ -143,7 +143,7 @@ cam_get_device(const char *path, char *d } if (*tmpstr == '\0') { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: no text after slash", __func__); free(newpath); return(-1); @@ -171,7 +171,7 @@ cam_get_device(const char *path, char *d * If we only have 1, we don't have a valid device name. */ if (strlen(tmpstr) < 2) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: must have both device name and unit number", __func__); free(newpath); @@ -183,7 +183,7 @@ cam_get_device(const char *path, char *d * has probably given us all numbers. Point out the error. */ if (isdigit(*tmpstr)) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device name cannot begin with a number", __func__); free(newpath); @@ -196,7 +196,7 @@ cam_get_device(const char *path, char *d * or he gave us a device name/number format we don't recognize. */ if (!isdigit(tmpstr[strlen(tmpstr) - 1])) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: unable to find device unit number", __func__); free(newpath); return(-1); @@ -272,7 +272,7 @@ cam_open_btl(path_id_t path_id, target_i int fd, bufsize; if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't open %s\n%s: %s", __func__, XPT_DEVICE, __func__, strerror(errno)); return(NULL); @@ -289,7 +289,7 @@ cam_open_btl(path_id_t path_id, target_i ccb.cdm.match_buf_len = bufsize; ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); if (ccb.cdm.matches == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't malloc match buffer", __func__); close(fd); return(NULL); @@ -302,7 +302,7 @@ cam_open_btl(path_id_t path_id, target_i ccb.cdm.patterns = (struct dev_match_pattern *)malloc( sizeof(struct dev_match_pattern)); if (ccb.cdm.patterns == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't malloc pattern buffer", __func__); free(ccb.cdm.matches); ccb.cdm.matches = NULL; @@ -325,7 +325,7 @@ cam_open_btl(path_id_t path_id, target_i PERIPH_MATCH_LUN | PERIPH_MATCH_NAME; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CAMIOCOMMAND ioctl failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto btl_bailout; @@ -337,7 +337,7 @@ cam_open_btl(path_id_t path_id, target_i if ((ccb.ccb_h.status != CAM_REQ_CMP) || ((ccb.cdm.status != CAM_DEV_MATCH_LAST) && (ccb.cdm.status != CAM_DEV_MATCH_MORE))) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CAM error %#x, CDM error %d " "returned from XPT_DEV_MATCH ccb", __func__, ccb.ccb_h.status, ccb.cdm.status); @@ -345,7 +345,7 @@ cam_open_btl(path_id_t path_id, target_i } if (ccb.cdm.status == CAM_DEV_MATCH_MORE) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CDM reported more than one" " passthrough device at %d:%d:%jx!!\n", __func__, path_id, target_id, (uintmax_t)target_lun); @@ -353,7 +353,7 @@ cam_open_btl(path_id_t path_id, target_i } if (ccb.cdm.num_matches == 0) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: no passthrough device found at" " %d:%d:%jx", __func__, path_id, target_id, (uintmax_t)target_lun); @@ -379,7 +379,7 @@ cam_open_btl(path_id_t path_id, target_i break; /* NOTREACHED */ } default: - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: asked for a peripheral match, but" " got a bus or device match", __func__); goto btl_bailout; @@ -422,7 +422,7 @@ cam_lookup_pass(const char *dev_name, in * passthrough device. */ if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't open %s\n%s: %s", __func__, XPT_DEVICE, __func__, strerror(errno)); return(NULL); @@ -455,7 +455,7 @@ cam_lookup_pass(const char *dev_name, in "your kernel\n%s: or %s%d doesn't exist", __func__, __func__, dev_name, unit); } - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CAMGETPASSTHRU ioctl failed\n" "%s: %s%s", __func__, __func__, strerror(errno), (errno == ENOENT) ? tmpstr : ""); @@ -473,7 +473,7 @@ cam_lookup_pass(const char *dev_name, in * the device the user gave us. */ if (ccb.cgdl.status == CAM_GDEVLIST_ERROR) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device %s%d does not exist!", __func__, dev_name, unit); return(NULL); @@ -504,7 +504,7 @@ cam_real_open_device(const char *path, i if (device == NULL) { if ((device = (struct cam_device *)malloc( sizeof(struct cam_device))) == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device structure malloc" " failed\n%s: %s", __func__, __func__, strerror(errno)); @@ -535,7 +535,7 @@ cam_real_open_device(const char *path, i device->given_unit_number = given_unit_number; if ((fd = open(path, flags)) < 0) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't open passthrough device %s\n" "%s: %s", __func__, path, __func__, strerror(errno)); @@ -563,7 +563,7 @@ cam_real_open_device(const char *path, i * because we just opened it above. The only way this * ioctl can fail is if the ccb size is wrong. */ - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CAMGETPASSTHRU ioctl failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; @@ -576,7 +576,7 @@ cam_real_open_device(const char *path, i * the device the user gave us. */ if (ccb.cgdl.status == CAM_GDEVLIST_ERROR) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: passthrough device does not exist!", __func__); goto crod_bailout; } @@ -590,7 +590,7 @@ cam_real_open_device(const char *path, i ccb.ccb_h.func_code = XPT_PATH_INQ; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: Path Inquiry CCB failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; @@ -605,7 +605,7 @@ cam_real_open_device(const char *path, i */ ccb.ccb_h.func_code = XPT_GDEV_TYPE; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: Get Device Type CCB failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; @@ -629,7 +629,7 @@ cam_real_open_device(const char *path, i ccb.cts.type = CTS_TYPE_CURRENT_SETTINGS; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: Get Transfer Settings CCB failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; @@ -711,14 +711,14 @@ cam_device_dup(struct cam_device *device struct cam_device *newdev; if (device == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device is NULL", __func__); return (NULL); } newdev = malloc(sizeof(struct cam_device)); if (newdev == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't malloc CAM device structure", __func__); return (NULL); } @@ -736,13 +736,13 @@ cam_device_copy(struct cam_device *src, { if (src == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: source device struct was NULL", __func__); return; } if (dst == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: destination device struct was NULL", __func__); return; } From owner-svn-src-all@freebsd.org Sun May 28 00:45:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39E5BD76FC6; Sun, 28 May 2017 00:45:30 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A1F91004; Sun, 28 May 2017 00:45:29 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S0jTaO099175; Sun, 28 May 2017 00:45:29 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S0jTJj099174; Sun, 28 May 2017 00:45:29 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705280045.v4S0jTJj099174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sun, 28 May 2017 00:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319022 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 00:45:30 -0000 Author: vangyzen Date: Sun May 28 00:45:28 2017 New Revision: 319022 URL: https://svnweb.freebsd.org/changeset/base/319022 Log: Fix INSTALL_AS_USER with external nsswitch databases The INSTALL_AS_USER option tells "install" to use the current user name as the owner of the installed file. The "install" command executed by the build is statically linked, so it does not load nsswitch modules, such as nss_ldap.so, so it fails when the user is only defined in such a database. Fix it to use the current UID instead of user name. This works for all users. I expect it is also slightly more efficient. Reviewed by: sjg MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10862 Modified: head/share/mk/bsd.init.mk Modified: head/share/mk/bsd.init.mk ============================================================================== --- head/share/mk/bsd.init.mk Sun May 28 00:45:02 2017 (r319021) +++ head/share/mk/bsd.init.mk Sun May 28 00:45:28 2017 (r319022) @@ -24,20 +24,12 @@ _uid!= id -u .export _uid .endif .if ${_uid} != 0 -.if !defined(USER) -# Avoid exporting USER -.if !defined(_USER) -_USER!= id -un -.export _USER -.endif -USER= ${_USER} -.endif .if !defined(_gid) _gid!= id -g .export _gid .endif .for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE -$xOWN= ${USER} +$xOWN= ${_uid} $xGRP= ${_gid} .endfor .endif From owner-svn-src-all@freebsd.org Sun May 28 00:47:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 462BAD8503D; Sun, 28 May 2017 00:47:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 215D61172; Sun, 28 May 2017 00:47:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S0l3tV099274; Sun, 28 May 2017 00:47:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S0l3Hd099273; Sun, 28 May 2017 00:47:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280047.v4S0l3Hd099273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 00:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319023 - stable/10/lib/libcam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 00:47:04 -0000 Author: ngie Date: Sun May 28 00:47:02 2017 New Revision: 319023 URL: https://svnweb.freebsd.org/changeset/base/319023 Log: MFC r316131: Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf) Part of my original reasoning as far as converting the snprintf calls was to permit switching over from char[] to wchar_t[] in the future, as well as futureproof in case cam_errbuf's size was ever changed. Unfortunately, my approach was bugged because it conflated the number of items with the size of the buffer, instead of the number of elements being a fixed size != 1 byte. Use nitems(..) instead which counts the quantity of items of a specific type, as opposed to an unqualified sizeof(..) (which assumes that the number of characters is equal to the buffer size). Noted by: cem Modified: stable/10/lib/libcam/camlib.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcam/camlib.c ============================================================================== --- stable/10/lib/libcam/camlib.c Sun May 28 00:45:28 2017 (r319022) +++ stable/10/lib/libcam/camlib.c Sun May 28 00:47:02 2017 (r319023) @@ -120,7 +120,7 @@ cam_get_device(const char *path, char *d int i; if (path == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device pathname was NULL", __func__); return(-1); } @@ -143,7 +143,7 @@ cam_get_device(const char *path, char *d } if (*tmpstr == '\0') { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: no text after slash", __func__); free(newpath); return(-1); @@ -171,7 +171,7 @@ cam_get_device(const char *path, char *d * If we only have 1, we don't have a valid device name. */ if (strlen(tmpstr) < 2) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: must have both device name and unit number", __func__); free(newpath); @@ -183,7 +183,7 @@ cam_get_device(const char *path, char *d * has probably given us all numbers. Point out the error. */ if (isdigit(*tmpstr)) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device name cannot begin with a number", __func__); free(newpath); @@ -196,7 +196,7 @@ cam_get_device(const char *path, char *d * or he gave us a device name/number format we don't recognize. */ if (!isdigit(tmpstr[strlen(tmpstr) - 1])) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: unable to find device unit number", __func__); free(newpath); return(-1); @@ -272,7 +272,7 @@ cam_open_btl(path_id_t path_id, target_i int fd, bufsize; if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't open %s\n%s: %s", __func__, XPT_DEVICE, __func__, strerror(errno)); return(NULL); @@ -289,7 +289,7 @@ cam_open_btl(path_id_t path_id, target_i ccb.cdm.match_buf_len = bufsize; ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); if (ccb.cdm.matches == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't malloc match buffer", __func__); close(fd); return(NULL); @@ -302,7 +302,7 @@ cam_open_btl(path_id_t path_id, target_i ccb.cdm.patterns = (struct dev_match_pattern *)malloc( sizeof(struct dev_match_pattern)); if (ccb.cdm.patterns == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't malloc pattern buffer", __func__); free(ccb.cdm.matches); ccb.cdm.matches = NULL; @@ -325,7 +325,7 @@ cam_open_btl(path_id_t path_id, target_i PERIPH_MATCH_LUN | PERIPH_MATCH_NAME; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CAMIOCOMMAND ioctl failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto btl_bailout; @@ -337,7 +337,7 @@ cam_open_btl(path_id_t path_id, target_i if ((ccb.ccb_h.status != CAM_REQ_CMP) || ((ccb.cdm.status != CAM_DEV_MATCH_LAST) && (ccb.cdm.status != CAM_DEV_MATCH_MORE))) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CAM error %#x, CDM error %d " "returned from XPT_DEV_MATCH ccb", __func__, ccb.ccb_h.status, ccb.cdm.status); @@ -345,7 +345,7 @@ cam_open_btl(path_id_t path_id, target_i } if (ccb.cdm.status == CAM_DEV_MATCH_MORE) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CDM reported more than one" " passthrough device at %d:%d:%jx!!\n", __func__, path_id, target_id, (uintmax_t)target_lun); @@ -353,7 +353,7 @@ cam_open_btl(path_id_t path_id, target_i } if (ccb.cdm.num_matches == 0) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: no passthrough device found at" " %d:%d:%jx", __func__, path_id, target_id, (uintmax_t)target_lun); @@ -379,7 +379,7 @@ cam_open_btl(path_id_t path_id, target_i break; /* NOTREACHED */ } default: - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: asked for a peripheral match, but" " got a bus or device match", __func__); goto btl_bailout; @@ -422,7 +422,7 @@ cam_lookup_pass(const char *dev_name, in * passthrough device. */ if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't open %s\n%s: %s", __func__, XPT_DEVICE, __func__, strerror(errno)); return(NULL); @@ -455,7 +455,7 @@ cam_lookup_pass(const char *dev_name, in "your kernel\n%s: or %s%d doesn't exist", __func__, __func__, dev_name, unit); } - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CAMGETPASSTHRU ioctl failed\n" "%s: %s%s", __func__, __func__, strerror(errno), (errno == ENOENT) ? tmpstr : ""); @@ -473,7 +473,7 @@ cam_lookup_pass(const char *dev_name, in * the device the user gave us. */ if (ccb.cgdl.status == CAM_GDEVLIST_ERROR) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device %s%d does not exist!", __func__, dev_name, unit); return(NULL); @@ -504,7 +504,7 @@ cam_real_open_device(const char *path, i if (device == NULL) { if ((device = (struct cam_device *)malloc( sizeof(struct cam_device))) == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device structure malloc" " failed\n%s: %s", __func__, __func__, strerror(errno)); @@ -535,7 +535,7 @@ cam_real_open_device(const char *path, i device->given_unit_number = given_unit_number; if ((fd = open(path, flags)) < 0) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't open passthrough device %s\n" "%s: %s", __func__, path, __func__, strerror(errno)); @@ -563,7 +563,7 @@ cam_real_open_device(const char *path, i * because we just opened it above. The only way this * ioctl can fail is if the ccb size is wrong. */ - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: CAMGETPASSTHRU ioctl failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; @@ -576,7 +576,7 @@ cam_real_open_device(const char *path, i * the device the user gave us. */ if (ccb.cgdl.status == CAM_GDEVLIST_ERROR) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: passthrough device does not exist!", __func__); goto crod_bailout; } @@ -590,7 +590,7 @@ cam_real_open_device(const char *path, i ccb.ccb_h.func_code = XPT_PATH_INQ; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: Path Inquiry CCB failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; @@ -605,7 +605,7 @@ cam_real_open_device(const char *path, i */ ccb.ccb_h.func_code = XPT_GDEV_TYPE; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: Get Device Type CCB failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; @@ -629,7 +629,7 @@ cam_real_open_device(const char *path, i ccb.cts.type = CTS_TYPE_CURRENT_SETTINGS; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: Get Transfer Settings CCB failed\n" "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; @@ -711,14 +711,14 @@ cam_device_dup(struct cam_device *device struct cam_device *newdev; if (device == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: device is NULL", __func__); return (NULL); } newdev = malloc(sizeof(struct cam_device)); if (newdev == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: couldn't malloc CAM device structure", __func__); return (NULL); } @@ -736,13 +736,13 @@ cam_device_copy(struct cam_device *src, { if (src == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: source device struct was NULL", __func__); return; } if (dst == NULL) { - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, nitems(cam_errbuf), "%s: destination device struct was NULL", __func__); return; } From owner-svn-src-all@freebsd.org Sun May 28 01:08:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68B1CD854A1; Sun, 28 May 2017 01:08:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F9C21C17; Sun, 28 May 2017 01:08:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S18mvS007353; Sun, 28 May 2017 01:08:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S18lrX007342; Sun, 28 May 2017 01:08:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280108.v4S18lrX007342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 01:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319024 - in stable/11: . sys/boot sys/boot/efi/boot1 sys/boot/i386/boot2 sys/boot/i386/pxeldr sys/boot/i386/zfsboot sys/boot/pc98/boot0.5 sys/boot/pc98/boot2 sys/boot/pc98/pc98boot sys... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 01:08:49 -0000 Author: ngie Date: Sun May 28 01:08:46 2017 New Revision: 319024 URL: https://svnweb.freebsd.org/changeset/base/319024 Log: MFC r309412,r316109,r316132: r309412 (by imp): dd is currently a bootstrap tool. It really doesn't have any business being a bootstrap tool. However, for reproducible build output, FreeBSD added dd status=none because it was otherwise difficult to suppress the status information, but retain any errors that might happen. There's no real reason that dd has to be a build tool, other than we use status=none unconditional. Remove dd from a bootstrap tool entirely by only using status=none when available. This may also help efforts to build the system on non-FreeBSD hosts as well. r316109: Don't hardcode input files for stage 1/2 bootloaders; use .ALLSRC instead This is a better pattern to follow when creating the bootloaders and doing the relevant space checks to make sure that the sizes aren't exceeded (and thus, copy-pasting is a bit less error prone). r316132: Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to sys/boot/i386/zfsboot/... This is being done to make it easier to change in the future--this action might be needed sooner rather than later because of gcc 6.3.0 bailing, stating that there is negative free space left (deficit) in the boot2 bootloader. Modified: stable/11/Makefile.inc1 stable/11/sys/boot/Makefile.inc stable/11/sys/boot/efi/boot1/Makefile stable/11/sys/boot/i386/boot2/Makefile stable/11/sys/boot/i386/pxeldr/Makefile stable/11/sys/boot/i386/zfsboot/Makefile stable/11/sys/boot/pc98/boot0.5/Makefile stable/11/sys/boot/pc98/boot2/Makefile stable/11/sys/boot/pc98/pc98boot/Makefile stable/11/sys/boot/powerpc/boot1.chrp/Makefile stable/11/sys/boot/sparc64/boot1/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Sun May 28 00:47:02 2017 (r319023) +++ stable/11/Makefile.inc1 Sun May 28 01:08:46 2017 (r319024) @@ -1632,11 +1632,6 @@ ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libne _cat= bin/cat .endif -# r264059 support for status= -.if ${BOOTSTRAPPING} < 1100017 -_dd= bin/dd -.endif - # r277259 crunchide: Correct 64-bit section header offset # r281674 crunchide: always include both 32- and 64-bit ELF support .if ${BOOTSTRAPPING} < 1100078 @@ -1719,7 +1714,6 @@ bootstrap-tools: .PHONY ${_groff} \ ${_dtc} \ ${_cat} \ - ${_dd} \ ${_kbdcontrol} \ usr.bin/lorder \ ${_libopenbsd} \ Modified: stable/11/sys/boot/Makefile.inc ============================================================================== --- stable/11/sys/boot/Makefile.inc Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/Makefile.inc Sun May 28 01:08:46 2017 (r319024) @@ -15,3 +15,10 @@ CFLAGS.clang+= -mno-movt .endif CFLAGS.clang+= -mfpu=none .endif + +# The boot loader build uses dd status=none, where possible, for reproducible +# build output (since performance varies from run to run). Trouble is that +# option was recently (10.3) added to FreeBSD and is non-standard. Only use it +# when this test succeeds rather than require dd to be a bootstrap tool. +DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && echo status=none) || true +DD=dd ${DD_NOSTATUS} Modified: stable/11/sys/boot/efi/boot1/Makefile ============================================================================== --- stable/11/sys/boot/efi/boot1/Makefile Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/efi/boot1/Makefile Sun May 28 01:08:46 2017 (r319024) @@ -107,7 +107,7 @@ boot1.o: ${.CURDIR}/../../common/ufsread BOOT1_MAXSIZE?= 131072 boot1.efifat: boot1.efi - @set -- `ls -l boot1.efi`; \ + @set -- `ls -l ${.ALLSRC}`; \ x=$$(($$5-${BOOT1_MAXSIZE})); \ if [ $$x -ge 0 ]; then \ echo "boot1 $$x bytes too large; regenerate FAT templates?" >&2 ;\ @@ -117,8 +117,7 @@ boot1.efifat: boot1.efi uudecode ${.CURDIR}/fat-${MACHINE}.tmpl.bz2.uu mv fat-${MACHINE}.tmpl.bz2 ${.TARGET}.bz2 bzip2 -f -d ${.TARGET}.bz2 - dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc \ - status=none + ${DD} if=${.ALLSRC} of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc CLEANFILES= boot1.efi boot1.efifat Modified: stable/11/sys/boot/i386/boot2/Makefile ============================================================================== --- stable/11/sys/boot/i386/boot2/Makefile Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/i386/boot2/Makefile Sun May 28 01:08:46 2017 (r319024) @@ -69,17 +69,19 @@ boot1.out: boot1.o CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ boot2.s boot2.s.tmp boot2.h sio.o +BOOT2SIZE= 7680 + boot2: boot2.ld - @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ + @set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 - dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync status=none + ${DD} if=${.ALLSRC} of=${.TARGET} obs=${BOOT2SIZE} conv=osync boot2.ld: boot2.ldr boot2.bin ${BTXKERN} btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ -o ${.TARGET} -P 1 boot2.bin boot2.ldr: - dd if=/dev/zero of=${.TARGET} bs=512 count=1 status=none + ${DD} if=/dev/zero of=${.TARGET} bs=512 count=1 boot2.bin: boot2.out ${OBJCOPY} -S -O binary boot2.out ${.TARGET} Modified: stable/11/sys/boot/i386/pxeldr/Makefile ============================================================================== --- stable/11/sys/boot/i386/pxeldr/Makefile Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/i386/pxeldr/Makefile Sun May 28 01:08:46 2017 (r319024) @@ -31,7 +31,7 @@ CLEANFILES+= ${BOOT}.tmp ${BOOT}: ${LDR} ${LOADER} cat ${LDR} ${LOADER} > ${.TARGET}.tmp - dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync status=none + ${DD} if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync rm ${.TARGET}.tmp LDFLAGS+=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary Modified: stable/11/sys/boot/i386/zfsboot/Makefile ============================================================================== --- stable/11/sys/boot/i386/zfsboot/Makefile Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/i386/zfsboot/Makefile Sun May 28 01:08:46 2017 (r319024) @@ -63,9 +63,9 @@ CLEANFILES+= zfsboot2 zfsboot.ld zfsboot BOOT2SIZE= 65536 zfsboot2: zfsboot.ld - @set -- `ls -l zfsboot.ld`; x=$$((${BOOT2SIZE}-$$5)); \ + @set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 - dd if=zfsboot.ld of=${.TARGET} obs=${BOOT2SIZE} conv=osync status=none + ${DD} if=${.ALLSRC} of=${.TARGET} obs=${BOOT2SIZE} conv=osync zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l zfsboot.ldr \ Modified: stable/11/sys/boot/pc98/boot0.5/Makefile ============================================================================== --- stable/11/sys/boot/pc98/boot0.5/Makefile Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/pc98/boot0.5/Makefile Sun May 28 01:08:46 2017 (r319024) @@ -18,7 +18,7 @@ LDFLAGS=-e start -Ttext ${BOOT_BOOT0_ORG # The size of boot0.5 must be 7168 bytes ${BOOT}: ${BOOT}.bin - cat ${BOOT}.bin /dev/zero | dd of=${BOOT} bs=1 count=7168 + cat ${BOOT}.bin /dev/zero | ${DD} of=${BOOT} bs=1 count=7168 ${BOOT}.bin: ${BOOT}.out ${OBJCOPY} -S -O binary ${BOOT}.out ${.TARGET} Modified: stable/11/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/11/sys/boot/pc98/boot2/Makefile Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/pc98/boot2/Makefile Sun May 28 01:08:46 2017 (r319024) @@ -78,14 +78,14 @@ CLEANFILES+= boot2 boot2.ld boot2.ldr bo boot2: boot2.ld @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 - dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync + ${DD} if=boot2.ld of=${.TARGET} obs=7680 conv=osync boot2.ld: boot2.ldr boot2.bin ${BTXKERN} btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ -o ${.TARGET} -P 1 boot2.bin boot2.ldr: - dd if=/dev/zero of=${.TARGET} bs=276 count=1 + ${DD} if=/dev/zero of=${.TARGET} bs=276 count=1 boot2.bin: boot2.out ${OBJCOPY} -S -O binary boot2.out ${.TARGET} Modified: stable/11/sys/boot/pc98/pc98boot/Makefile ============================================================================== --- stable/11/sys/boot/pc98/pc98boot/Makefile Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/pc98/pc98boot/Makefile Sun May 28 01:08:46 2017 (r319024) @@ -20,6 +20,6 @@ ${BOOT}: ${BOOT0} ${BOOT05} ${BOOT}.part cat ${BOOT0} ${BOOT}.part ${BOOT05} > ${.TARGET} ${BOOT}.part: - dd if=/dev/zero of=${.TARGET} bs=512 count=1 + ${DD} if=/dev/zero of=${.TARGET} bs=512 count=1 .include Modified: stable/11/sys/boot/powerpc/boot1.chrp/Makefile ============================================================================== --- stable/11/sys/boot/powerpc/boot1.chrp/Makefile Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/powerpc/boot1.chrp/Makefile Sun May 28 01:08:46 2017 (r319024) @@ -30,8 +30,8 @@ boot1.hfs: boot1.elf bootinfo.txt uudecode ${.CURDIR}/hfs.tmpl.bz2.uu mv hfs.tmpl.bz2 ${.TARGET}.bz2 bzip2 -f -d ${.TARGET}.bz2 - dd if=boot1.elf of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc - dd if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \ + ${DD} if=boot1.elf of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc + ${DD} if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \ conv=notrunc CLEANFILES= boot1.hfs Modified: stable/11/sys/boot/sparc64/boot1/Makefile ============================================================================== --- stable/11/sys/boot/sparc64/boot1/Makefile Sun May 28 00:47:02 2017 (r319023) +++ stable/11/sys/boot/sparc64/boot1/Makefile Sun May 28 01:08:46 2017 (r319024) @@ -17,10 +17,10 @@ LDFLAGS=-Ttext ${BOOTBLOCKBASE} -Wl,-N # Construct boot1. sunlabel expects it to contain zeroed-out space for the # label, and to be of the correct size. ${FILES}: boot1.aout - @set -- `ls -l boot1.aout`; x=$$((7680-$$5)); \ + @set -- `ls -l ${.ALLSRC}`; x=$$((7680-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 - dd if=/dev/zero of=${.TARGET} bs=512 count=16 - dd if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc + ${DD} if=/dev/zero of=${.TARGET} bs=512 count=16 + ${DD} if=${.ALLSRC} of=${.TARGET} bs=512 oseek=1 conv=notrunc boot1.aout: boot1.elf elf2aout -o ${.TARGET} ${.ALLSRC} From owner-svn-src-all@freebsd.org Sun May 28 01:15:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E12B4D858AE; Sun, 28 May 2017 01:15:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD10F1135; Sun, 28 May 2017 01:15:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S1F0C4011571; Sun, 28 May 2017 01:15:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S1ExA0011550; Sun, 28 May 2017 01:14:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280114.v4S1ExA0011550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 01:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319025 - in stable/10/sys/boot: . efi/boot1 i386/boot2 i386/pxeldr i386/zfsboot pc98/boot0.5 pc98/boot2 pc98/pc98boot powerpc/boot1.chrp sparc64/boot1 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 01:15:02 -0000 Author: ngie Date: Sun May 28 01:14:59 2017 New Revision: 319025 URL: https://svnweb.freebsd.org/changeset/base/319025 Log: MFC r309412,r316109,r316132: r309412 (by imp): dd is currently a bootstrap tool. It really doesn't have any business being a bootstrap tool. However, for reproducible build output, FreeBSD added dd status=none because it was otherwise difficult to suppress the status information, but retain any errors that might happen. There's no real reason that dd has to be a build tool, other than we use status=none unconditional. Remove dd from a bootstrap tool entirely by only using status=none when available. This may also help efforts to build the system on non-FreeBSD hosts as well. r316109: Don't hardcode input files for stage 1/2 bootloaders; use .ALLSRC instead This is a better pattern to follow when creating the bootloaders and doing the relevant space checks to make sure that the sizes aren't exceeded (and thus, copy-pasting is a bit less error prone). r316132: Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to sys/boot/i386/zfsboot/... This is being done to make it easier to change in the future--this action might be needed sooner rather than later because of gcc 6.3.0 bailing, stating that there is negative free space left (deficit) in the boot2 bootloader. Modified: stable/10/sys/boot/Makefile.inc stable/10/sys/boot/efi/boot1/Makefile stable/10/sys/boot/i386/boot2/Makefile stable/10/sys/boot/i386/pxeldr/Makefile stable/10/sys/boot/i386/zfsboot/Makefile stable/10/sys/boot/pc98/boot0.5/Makefile stable/10/sys/boot/pc98/boot2/Makefile stable/10/sys/boot/pc98/pc98boot/Makefile stable/10/sys/boot/powerpc/boot1.chrp/Makefile stable/10/sys/boot/sparc64/boot1/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/Makefile.inc ============================================================================== --- stable/10/sys/boot/Makefile.inc Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/Makefile.inc Sun May 28 01:14:59 2017 (r319025) @@ -1,3 +1,10 @@ # $FreeBSD$ SSP_CFLAGS= + +# The boot loader build uses dd status=none, where possible, for reproducible +# build output (since performance varies from run to run). Trouble is that +# option was recently (10.3) added to FreeBSD and is non-standard. Only use it +# when this test succeeds rather than require dd to be a bootstrap tool. +DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && echo status=none) || true +DD=dd ${DD_NOSTATUS} Modified: stable/10/sys/boot/efi/boot1/Makefile ============================================================================== --- stable/10/sys/boot/efi/boot1/Makefile Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/efi/boot1/Makefile Sun May 28 01:14:59 2017 (r319025) @@ -99,7 +99,7 @@ boot1.efifat: boot1.efi uudecode ${.CURDIR}/fat-${MACHINE}.tmpl.bz2.uu mv fat-${MACHINE}.tmpl.bz2 ${.TARGET}.bz2 bzip2 -f -d ${.TARGET}.bz2 - dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc + ${DD} if=${.ALLSRC} of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc CLEANFILES= boot1.efi boot1.efifat Modified: stable/10/sys/boot/i386/boot2/Makefile ============================================================================== --- stable/10/sys/boot/i386/boot2/Makefile Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/i386/boot2/Makefile Sun May 28 01:14:59 2017 (r319025) @@ -68,17 +68,19 @@ boot1.out: boot1.o CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ boot2.s boot2.s.tmp boot2.h sio.o +BOOT2SIZE= 7680 + boot2: boot2.ld - @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ + @set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 - dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync + ${DD} if=${.ALLSRC} of=${.TARGET} obs=${BOOT2SIZE} conv=osync boot2.ld: boot2.ldr boot2.bin ${BTXKERN} btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ -o ${.TARGET} -P 1 boot2.bin boot2.ldr: - dd if=/dev/zero of=${.TARGET} bs=512 count=1 + ${DD} if=/dev/zero of=${.TARGET} bs=512 count=1 boot2.bin: boot2.out ${OBJCOPY} -S -O binary boot2.out ${.TARGET} Modified: stable/10/sys/boot/i386/pxeldr/Makefile ============================================================================== --- stable/10/sys/boot/i386/pxeldr/Makefile Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/i386/pxeldr/Makefile Sun May 28 01:14:59 2017 (r319025) @@ -31,7 +31,7 @@ CLEANFILES+= ${BOOT}.tmp ${BOOT}: ${LDR} ${LOADER} cat ${LDR} ${LOADER} > ${.TARGET}.tmp - dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync + ${DD} if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync rm ${.TARGET}.tmp LDFLAGS+=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary Modified: stable/10/sys/boot/i386/zfsboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/zfsboot/Makefile Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/i386/zfsboot/Makefile Sun May 28 01:14:59 2017 (r319025) @@ -63,9 +63,9 @@ CLEANFILES+= zfsboot2 zfsboot.ld zfsboot BOOT2SIZE= 65536 zfsboot2: zfsboot.ld - @set -- `ls -l zfsboot.ld`; x=$$((${BOOT2SIZE}-$$5)); \ + @set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 - dd if=zfsboot.ld of=${.TARGET} obs=${BOOT2SIZE} conv=osync + ${DD} if=${.ALLSRC} of=${.TARGET} obs=${BOOT2SIZE} conv=osync zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l zfsboot.ldr \ Modified: stable/10/sys/boot/pc98/boot0.5/Makefile ============================================================================== --- stable/10/sys/boot/pc98/boot0.5/Makefile Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/pc98/boot0.5/Makefile Sun May 28 01:14:59 2017 (r319025) @@ -18,7 +18,7 @@ LDFLAGS=-e start -Ttext ${BOOT_BOOT0_ORG # The size of boot0.5 must be 7168 bytes ${BOOT}: ${BOOT}.bin - cat ${BOOT}.bin /dev/zero | dd of=${BOOT} bs=1 count=7168 + cat ${BOOT}.bin /dev/zero | ${DD} of=${BOOT} bs=1 count=7168 ${BOOT}.bin: ${BOOT}.out ${OBJCOPY} -S -O binary ${BOOT}.out ${.TARGET} Modified: stable/10/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/10/sys/boot/pc98/boot2/Makefile Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/pc98/boot2/Makefile Sun May 28 01:14:59 2017 (r319025) @@ -77,14 +77,14 @@ CLEANFILES+= boot2 boot2.ld boot2.ldr bo boot2: boot2.ld @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 - dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync + ${DD} if=boot2.ld of=${.TARGET} obs=7680 conv=osync boot2.ld: boot2.ldr boot2.bin ${BTXKERN} btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ -o ${.TARGET} -P 1 boot2.bin boot2.ldr: - dd if=/dev/zero of=${.TARGET} bs=276 count=1 + ${DD} if=/dev/zero of=${.TARGET} bs=276 count=1 boot2.bin: boot2.out ${OBJCOPY} -S -O binary boot2.out ${.TARGET} Modified: stable/10/sys/boot/pc98/pc98boot/Makefile ============================================================================== --- stable/10/sys/boot/pc98/pc98boot/Makefile Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/pc98/pc98boot/Makefile Sun May 28 01:14:59 2017 (r319025) @@ -20,6 +20,6 @@ ${BOOT}: ${BOOT0} ${BOOT05} ${BOOT}.part cat ${BOOT0} ${BOOT}.part ${BOOT05} > ${.TARGET} ${BOOT}.part: - dd if=/dev/zero of=${.TARGET} bs=512 count=1 + ${DD} if=/dev/zero of=${.TARGET} bs=512 count=1 .include Modified: stable/10/sys/boot/powerpc/boot1.chrp/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/boot1.chrp/Makefile Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/powerpc/boot1.chrp/Makefile Sun May 28 01:14:59 2017 (r319025) @@ -30,8 +30,8 @@ boot1.hfs: boot1.elf bootinfo.txt uudecode ${.CURDIR}/hfs.tmpl.bz2.uu mv hfs.tmpl.bz2 ${.TARGET}.bz2 bzip2 -f -d ${.TARGET}.bz2 - dd if=boot1.elf of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc - dd if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \ + ${DD} if=boot1.elf of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc + ${DD} if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \ conv=notrunc CLEANFILES= boot1.hfs Modified: stable/10/sys/boot/sparc64/boot1/Makefile ============================================================================== --- stable/10/sys/boot/sparc64/boot1/Makefile Sun May 28 01:08:46 2017 (r319024) +++ stable/10/sys/boot/sparc64/boot1/Makefile Sun May 28 01:14:59 2017 (r319025) @@ -17,10 +17,10 @@ LDFLAGS=-Ttext ${BOOTBLOCKBASE} -Wl,-N # Construct boot1. sunlabel expects it to contain zeroed-out space for the # label, and to be of the correct size. ${FILES}: boot1.aout - @set -- `ls -l boot1.aout`; x=$$((7680-$$5)); \ + @set -- `ls -l ${.ALLSRC}`; x=$$((7680-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 - dd if=/dev/zero of=${.TARGET} bs=512 count=16 - dd if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc + ${DD} if=/dev/zero of=${.TARGET} bs=512 count=16 + ${DD} if=${.ALLSRC} of=${.TARGET} bs=512 oseek=1 conv=notrunc boot1.aout: boot1.elf elf2aout -o ${.TARGET} ${.ALLSRC} From owner-svn-src-all@freebsd.org Sun May 28 02:15:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FCD8D85BEE; Sun, 28 May 2017 02:15:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 003331B46; Sun, 28 May 2017 02:15:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S2FwZY035364; Sun, 28 May 2017 02:15:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S2FvXQ035361; Sun, 28 May 2017 02:15:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280215.v4S2FvXQ035361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 02:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319026 - head/usr.sbin/pw/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 02:15:59 -0000 Author: ngie Date: Sun May 28 02:15:57 2017 New Revision: 319026 URL: https://svnweb.freebsd.org/changeset/base/319026 Log: pw: add some basic testcases for groupshow and usershow - groupshow: test out -a/-g/-n . - usershow: test out -a/-n/-u . MFC after: 1 week Sponsored by: Dell EMC Isilon Added: head/usr.sbin/pw/tests/pw_groupshow_test.sh (contents, props changed) head/usr.sbin/pw/tests/pw_usershow_test.sh (contents, props changed) Modified: head/usr.sbin/pw/tests/Makefile Modified: head/usr.sbin/pw/tests/Makefile ============================================================================== --- head/usr.sbin/pw/tests/Makefile Sun May 28 01:14:59 2017 (r319025) +++ head/usr.sbin/pw/tests/Makefile Sun May 28 02:15:57 2017 (r319026) @@ -14,10 +14,12 @@ ATF_TESTS_SH= pw_etcdir_test \ pw_groupadd_test \ pw_groupdel_test \ pw_groupmod_test \ + pw_groupshow_test \ pw_useradd_test \ pw_userdel_test \ pw_usermod_test \ - pw_usernext_test + pw_usernext_test \ + pw_usershow_test .for tp in ${ATF_TESTS_SH} TEST_METADATA.${tp}+= required_user="root" Added: head/usr.sbin/pw/tests/pw_groupshow_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/pw_groupshow_test.sh Sun May 28 02:15:57 2017 (r319026) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +atf_test_case group_show_all +group_show_all_body() { + populate_etc_skel + atf_check -o not-empty ${PW} groupshow -a +} + +atf_test_case group_show_gid +group_show_gid_body() { + populate_etc_skel + atf_check -o not-empty ${PW} groupshow -g 0 +} + +atf_test_case group_show_name +group_show_name_body() { + populate_etc_skel + atf_check -o not-empty ${PW} groupshow wheel +} + +atf_test_case group_show_nonexistent_gid +group_show_nonexistent_gid_body() { + populate_etc_skel + + nonexistent_gid=4242 + no_such_name_msg="pw: unknown gid \`$nonexistent_gid'\n" + + atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \ + $nonexistent_gid + atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \ + -g $nonexistent_gid +} + +atf_test_case group_show_nonexistent_name +group_show_nonexistent_name_body() { + populate_etc_skel + + nonexistent_name=bogus + no_such_name_msg="pw: unknown group \`$nonexistent_name'\n" + + atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \ + $nonexistent_name + atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \ + -n $nonexistent_name +} + +atf_init_test_cases() { + atf_add_test_case group_show_all + atf_add_test_case group_show_gid + atf_add_test_case group_show_name + atf_add_test_case group_show_nonexistent_gid + atf_add_test_case group_show_nonexistent_name +} Added: head/usr.sbin/pw/tests/pw_usershow_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/pw_usershow_test.sh Sun May 28 02:15:57 2017 (r319026) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +atf_test_case user_show_all +user_show_all_body() { + populate_etc_skel + atf_check -o not-empty ${PW} usershow -a +} + +atf_test_case user_show_name +user_show_name_body() { + populate_etc_skel + atf_check -o not-empty ${PW} usershow root +} + +atf_test_case user_show_nonexistent_name +user_show_nonexistent_name_body() { + populate_etc_skel + + nonexistent_user=bogus + no_such_user_msg="pw: no such user \`$nonexistent_user'\n" + + atf_check -e "inline:$no_such_user_msg" -s exit:67 ${PW} usershow \ + $nonexistent_user + atf_check -e "inline:$no_such_user_msg" -s exit:67 ${PW} usershow \ + -n $nonexistent_user +} + +atf_test_case user_show_nonexistent_uid +user_show_nonexistent_uid_body() { + populate_etc_skel + + nonexistent_uid=4242 + no_such_uid_msg="pw: no such uid \`$nonexistent_uid'\n" + + atf_check -e "inline:$no_such_uid_msg" -s exit:67 ${PW} usershow \ + $nonexistent_uid + atf_check -e "inline:$no_such_uid_msg" -s exit:67 ${PW} usershow \ + -u $nonexistent_uid +} + +atf_test_case user_show_uid +user_show_uid_body() { + populate_etc_skel + atf_check -o not-empty ${PW} usershow -u 0 +} + +atf_init_test_cases() { + atf_add_test_case user_show_all + atf_add_test_case user_show_name + atf_add_test_case user_show_nonexistent_name + atf_add_test_case user_show_nonexistent_uid + atf_add_test_case user_show_uid +} From owner-svn-src-all@freebsd.org Sun May 28 02:55:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3C7CD85853; Sun, 28 May 2017 02:55:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 945F91FB2; Sun, 28 May 2017 02:55:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S2t5hV051368; Sun, 28 May 2017 02:55:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S2t5L2051363; Sun, 28 May 2017 02:55:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280255.v4S2t5L2051363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 02:55:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319027 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 02:55:06 -0000 Author: ngie Date: Sun May 28 02:55:04 2017 New Revision: 319027 URL: https://svnweb.freebsd.org/changeset/base/319027 Log: lib/libc/tests/nss: use calloc appropriately The pattern used prior to this commit was `calloc(1, n * sizeof(type))`; the pattern that should be used however is `calloc(n, sizeof(type))`. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getgr_test.c head/lib/libc/tests/nss/gethostby_test.c head/lib/libc/tests/nss/getproto_test.c head/lib/libc/tests/nss/getrpc_test.c head/lib/libc/tests/nss/getserv_test.c Modified: head/lib/libc/tests/nss/getgr_test.c ============================================================================== --- head/lib/libc/tests/nss/getgr_test.c Sun May 28 02:15:57 2017 (r319026) +++ head/lib/libc/tests/nss/getgr_test.c Sun May 28 02:55:04 2017 (r319027) @@ -104,7 +104,7 @@ clone_group(struct group *dest, struct g for (cp = src->gr_mem; *cp; ++cp) ++members_num; - dest->gr_mem = calloc(1, (members_num + 1) * sizeof(char *)); + dest->gr_mem = calloc(members_num + 1, sizeof(char *)); ATF_REQUIRE(dest->gr_mem != NULL); for (cp = src->gr_mem; *cp; ++cp) { Modified: head/lib/libc/tests/nss/gethostby_test.c ============================================================================== --- head/lib/libc/tests/nss/gethostby_test.c Sun May 28 02:15:57 2017 (r319026) +++ head/lib/libc/tests/nss/gethostby_test.c Sun May 28 02:55:04 2017 (r319027) @@ -163,8 +163,7 @@ clone_hostent(struct hostent *dest, stru for (cp = src->h_aliases; *cp; ++cp) ++aliases_num; - dest->h_aliases = calloc(1, (aliases_num + 1) * - sizeof(char *)); + dest->h_aliases = calloc(aliases_num + 1, sizeof(char *)); ATF_REQUIRE(dest->h_aliases != NULL); for (cp = src->h_aliases; *cp; ++cp) { @@ -178,7 +177,7 @@ clone_hostent(struct hostent *dest, stru for (cp = src->h_addr_list; *cp; ++cp) ++addrs_num; - dest->h_addr_list = calloc(1, (addrs_num + 1) * sizeof(char *)); + dest->h_addr_list = calloc(addrs_num + 1, sizeof(char *)); ATF_REQUIRE(dest->h_addr_list != NULL); for (cp = src->h_addr_list; *cp; ++cp) { Modified: head/lib/libc/tests/nss/getproto_test.c ============================================================================== --- head/lib/libc/tests/nss/getproto_test.c Sun May 28 02:15:57 2017 (r319026) +++ head/lib/libc/tests/nss/getproto_test.c Sun May 28 02:55:04 2017 (r319027) @@ -99,7 +99,7 @@ clone_protoent(struct protoent *dest, st for (cp = src->p_aliases; *cp; ++cp) ++aliases_num; - dest->p_aliases = calloc(1, (aliases_num+1) * sizeof(char *)); + dest->p_aliases = calloc(aliases_num + 1, sizeof(char *)); assert(dest->p_aliases != NULL); for (cp = src->p_aliases; *cp; ++cp) { Modified: head/lib/libc/tests/nss/getrpc_test.c ============================================================================== --- head/lib/libc/tests/nss/getrpc_test.c Sun May 28 02:15:57 2017 (r319026) +++ head/lib/libc/tests/nss/getrpc_test.c Sun May 28 02:55:04 2017 (r319027) @@ -100,7 +100,7 @@ clone_rpcent(struct rpcent *dest, struct for (cp = src->r_aliases; *cp; ++cp) ++aliases_num; - dest->r_aliases = calloc(1, (aliases_num + 1) * sizeof(char *)); + dest->r_aliases = calloc(aliases_num + 1, sizeof(char *)); ATF_REQUIRE(dest->r_aliases != NULL); for (cp = src->r_aliases; *cp; ++cp) { Modified: head/lib/libc/tests/nss/getserv_test.c ============================================================================== --- head/lib/libc/tests/nss/getserv_test.c Sun May 28 02:15:57 2017 (r319026) +++ head/lib/libc/tests/nss/getserv_test.c Sun May 28 02:55:04 2017 (r319027) @@ -102,7 +102,7 @@ clone_servent(struct servent *dest, stru for (cp = src->s_aliases; *cp; ++cp) ++aliases_num; - dest->s_aliases = calloc(1, (aliases_num + 1) * sizeof(char *)); + dest->s_aliases = calloc(aliases_num + 1, sizeof(char *)); ATF_REQUIRE(dest->s_aliases != NULL); for (cp = src->s_aliases; *cp; ++cp) { From owner-svn-src-all@freebsd.org Sun May 28 03:39:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25BFAD85331; Sun, 28 May 2017 03:39:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE610154F; Sun, 28 May 2017 03:39:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S3dOun068296; Sun, 28 May 2017 03:39:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S3dOWG068295; Sun, 28 May 2017 03:39:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280339.v4S3dOWG068295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 03:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319028 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 03:39:26 -0000 Author: ngie Date: Sun May 28 03:39:24 2017 New Revision: 319028 URL: https://svnweb.freebsd.org/changeset/base/319028 Log: Sort make variables to suit style.Makefile(5) This is being done prior to functional changes. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/Makefile Modified: head/lib/libc/tests/nss/Makefile ============================================================================== --- head/lib/libc/tests/nss/Makefile Sun May 28 02:55:04 2017 (r319027) +++ head/lib/libc/tests/nss/Makefile Sun May 28 03:39:24 2017 (r319028) @@ -1,18 +1,13 @@ # $FreeBSD$ +.PATH: ${.CURDIR:H}/resolv + PACKAGE= tests TESTSDIR= ${TESTSBASE}/lib/libc/nss BINDIR= ${TESTSDIR} -.PATH: ${.CURDIR:H}/resolv - -${PACKAGE}FILES+= mach - -WARNS?= 1 -CFLAGS+= -I${SRCTOP}/tests - ATF_TESTS_C+= getaddrinfo_test ATF_TESTS_C+= getgr_test ATF_TESTS_C+= gethostby_test @@ -23,4 +18,10 @@ ATF_TESTS_C+= getrpc_test ATF_TESTS_C+= getserv_test ATF_TESTS_C+= getusershell_test +${PACKAGE}FILES+= mach + +WARNS?= 1 + +CFLAGS+= -I${SRCTOP}/tests + .include From owner-svn-src-all@freebsd.org Sun May 28 03:42:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04B8CD85538; Sun, 28 May 2017 03:42:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEAB41987; Sun, 28 May 2017 03:42:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S3gnKR072153; Sun, 28 May 2017 03:42:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S3gnM0072149; Sun, 28 May 2017 03:42:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280342.v4S3gnM0072149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 03:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319029 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 03:42:51 -0000 Author: ngie Date: Sun May 28 03:42:49 2017 New Revision: 319029 URL: https://svnweb.freebsd.org/changeset/base/319029 Log: Staticize functions and remove unused variables to aid with bumping WARNS MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getaddrinfo_test.c head/lib/libc/tests/nss/getgr_test.c head/lib/libc/tests/nss/getpw_test.c head/lib/libc/tests/nss/getusershell_test.c Modified: head/lib/libc/tests/nss/getaddrinfo_test.c ============================================================================== --- head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 03:39:24 2017 (r319028) +++ head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 03:42:49 2017 (r319029) @@ -144,7 +144,7 @@ compare_addrinfo(struct addrinfo *ai1, s return (rv); } -void +static void free_addrinfo(struct addrinfo *ai) { if (ai == NULL) @@ -409,7 +409,7 @@ addrinfo_read_hostlist_func(struct addri return (0); } -void +static void run_tests(char *hostlist_file, char *snapshot_file, int ai_family) { struct addrinfo_test_data td, td_snap; Modified: head/lib/libc/tests/nss/getgr_test.c ============================================================================== --- head/lib/libc/tests/nss/getgr_test.c Sun May 28 03:39:24 2017 (r319028) +++ head/lib/libc/tests/nss/getgr_test.c Sun May 28 03:42:49 2017 (r319029) @@ -49,8 +49,6 @@ enum test_methods { TEST_BUILD_SNAPSHOT = 16, }; -static enum test_methods method = TEST_BUILD_SNAPSHOT; - DECLARE_TEST_DATA(group) DECLARE_TEST_FILE_SNAPSHOT(group) DECLARE_1PASS_TEST(group) Modified: head/lib/libc/tests/nss/getpw_test.c ============================================================================== --- head/lib/libc/tests/nss/getpw_test.c Sun May 28 03:39:24 2017 (r319028) +++ head/lib/libc/tests/nss/getpw_test.c Sun May 28 03:42:49 2017 (r319029) @@ -47,8 +47,6 @@ enum test_methods { TEST_BUILD_SNAPSHOT }; -static enum test_methods method = TEST_BUILD_SNAPSHOT; - DECLARE_TEST_DATA(passwd) DECLARE_TEST_FILE_SNAPSHOT(passwd) DECLARE_1PASS_TEST(passwd) Modified: head/lib/libc/tests/nss/getusershell_test.c ============================================================================== --- head/lib/libc/tests/nss/getusershell_test.c Sun May 28 03:39:24 2017 (r319028) +++ head/lib/libc/tests/nss/getusershell_test.c Sun May 28 03:42:49 2017 (r319029) @@ -48,8 +48,6 @@ struct usershell { char *path; }; -static enum test_methods method = TEST_GETUSERSHELL; - DECLARE_TEST_DATA(usershell) DECLARE_TEST_FILE_SNAPSHOT(usershell) DECLARE_2PASS_TEST(usershell) From owner-svn-src-all@freebsd.org Sun May 28 03:47:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FFDCD855F2; Sun, 28 May 2017 03:47:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 420F41B1B; Sun, 28 May 2017 03:47:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S3lwJ0072389; Sun, 28 May 2017 03:47:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S3lwQR072388; Sun, 28 May 2017 03:47:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280347.v4S3lwQR072388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 03:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319030 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 03:47:59 -0000 Author: ngie Date: Sun May 28 03:47:58 2017 New Revision: 319030 URL: https://svnweb.freebsd.org/changeset/base/319030 Log: Fix -Wsign-compare warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getgr_test.c Modified: head/lib/libc/tests/nss/getgr_test.c ============================================================================== --- head/lib/libc/tests/nss/getgr_test.c Sun May 28 03:42:49 2017 (r319029) +++ head/lib/libc/tests/nss/getgr_test.c Sun May 28 03:47:58 2017 (r319030) @@ -177,7 +177,7 @@ sdump_group(struct group *grp, char *buf written = snprintf(buffer, buflen, "%s:%s:%d:", grp->gr_name, grp->gr_passwd, grp->gr_gid); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -187,7 +187,7 @@ sdump_group(struct group *grp, char *buf written = snprintf(buffer, buflen, "%s%s", cp == grp->gr_mem ? "" : ",", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; From owner-svn-src-all@freebsd.org Sun May 28 03:58:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 317F2D859ED; Sun, 28 May 2017 03:58:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5F83182B; Sun, 28 May 2017 03:58:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S3waZ7077603; Sun, 28 May 2017 03:58:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S3wash077602; Sun, 28 May 2017 03:58:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280358.v4S3wash077602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 03:58:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319031 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 03:58:38 -0000 Author: ngie Date: Sun May 28 03:58:36 2017 New Revision: 319031 URL: https://svnweb.freebsd.org/changeset/base/319031 Log: getusershell_test: staticize run_tests(..) to fix warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getusershell_test.c Modified: head/lib/libc/tests/nss/getusershell_test.c ============================================================================== --- head/lib/libc/tests/nss/getusershell_test.c Sun May 28 03:47:58 2017 (r319030) +++ head/lib/libc/tests/nss/getusershell_test.c Sun May 28 03:58:36 2017 (r319031) @@ -132,7 +132,7 @@ usershell_read_snapshot_func(struct user return (0); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct usershell_test_data td, td_snap; From owner-svn-src-all@freebsd.org Sun May 28 03:59:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FCC4D85A66; Sun, 28 May 2017 03:59:35 +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 F3000198C; Sun, 28 May 2017 03:59:34 +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 v4S3xYbQ077696; Sun, 28 May 2017 03:59:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S3xY9v077695; Sun, 28 May 2017 03:59:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705280359.v4S3xY9v077695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 28 May 2017 03:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319032 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 03:59:35 -0000 Author: gjb Date: Sun May 28 03:59:33 2017 New Revision: 319032 URL: https://svnweb.freebsd.org/changeset/base/319032 Log: MFC r318872: Enable DHCP and IPv6 autoconfig on non-cloud VM images. PR: 203653 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/vmimage.subr Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/tools/vmimage.subr Directory Properties: stable/10/ (props changed) Modified: stable/11/release/tools/vmimage.subr ============================================================================== --- stable/11/release/tools/vmimage.subr Sun May 28 03:58:36 2017 (r319031) +++ stable/11/release/tools/vmimage.subr Sun May 28 03:59:33 2017 (r319032) @@ -157,6 +157,11 @@ vm_extra_enable_services() { done fi + if [ -z "${VMCONFIG}" -o -c "${VMCONFIG}" ]; then + echo 'ifconfig_DEFAULT="DHCP inet6 accept_rtadv"' >> \ + ${DESTDIR}/etc/rc.conf + fi + return 0 } From owner-svn-src-all@freebsd.org Sun May 28 03:59:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3357D85A5F; Sun, 28 May 2017 03:59:34 +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 BF362198B; Sun, 28 May 2017 03:59:34 +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 v4S3xXQ5077690; Sun, 28 May 2017 03:59:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S3xXOW077689; Sun, 28 May 2017 03:59:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705280359.v4S3xXOW077689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 28 May 2017 03:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319032 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 03:59:35 -0000 Author: gjb Date: Sun May 28 03:59:33 2017 New Revision: 319032 URL: https://svnweb.freebsd.org/changeset/base/319032 Log: MFC r318872: Enable DHCP and IPv6 autoconfig on non-cloud VM images. PR: 203653 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/vmimage.subr Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/tools/vmimage.subr Directory Properties: stable/11/ (props changed) Modified: stable/10/release/tools/vmimage.subr ============================================================================== --- stable/10/release/tools/vmimage.subr Sun May 28 03:58:36 2017 (r319031) +++ stable/10/release/tools/vmimage.subr Sun May 28 03:59:33 2017 (r319032) @@ -151,6 +151,11 @@ vm_extra_enable_services() { done fi + if [ -z "${VMCONFIG}" -o -c "${VMCONFIG}" ]; then + echo 'ifconfig_DEFAULT="DHCP inet6 accept_rtadv"' >> \ + ${DESTDIR}/etc/rc.conf + fi + return 0 } From owner-svn-src-all@freebsd.org Sun May 28 04:03:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA903D85CD2; Sun, 28 May 2017 04:03:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC8A51ECF; Sun, 28 May 2017 04:03:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S436wr081410; Sun, 28 May 2017 04:03:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S4366k081409; Sun, 28 May 2017 04:03:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280403.v4S4366k081409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319033 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:03:08 -0000 Author: ngie Date: Sun May 28 04:03:06 2017 New Revision: 319033 URL: https://svnweb.freebsd.org/changeset/base/319033 Log: getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getserv_test.c Modified: head/lib/libc/tests/nss/getserv_test.c ============================================================================== --- head/lib/libc/tests/nss/getserv_test.c Sun May 28 03:59:33 2017 (r319032) +++ head/lib/libc/tests/nss/getserv_test.c Sun May 28 04:03:06 2017 (r319033) @@ -177,16 +177,16 @@ sdump_servent(struct servent *serv, char written = snprintf(buffer, buflen, "%s %d %s", serv->s_name, ntohs(serv->s_port), serv->s_proto); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (serv->s_aliases != NULL) { if (*(serv->s_aliases) != '\0') { for (cp = serv->s_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -410,7 +410,7 @@ servent_test_getservent(struct servent * return (servent_test_correctness(serv, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct servent_test_data td, td_snap, td_2pass; From owner-svn-src-all@freebsd.org Sun May 28 04:03:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58358D85D47; Sun, 28 May 2017 04:03:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A217105C; Sun, 28 May 2017 04:03:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S43jZB081477; Sun, 28 May 2017 04:03:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S43jtO081476; Sun, 28 May 2017 04:03:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280403.v4S43jtO081476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319034 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:03:46 -0000 Author: ngie Date: Sun May 28 04:03:45 2017 New Revision: 319034 URL: https://svnweb.freebsd.org/changeset/base/319034 Log: getaddrinfo_test: fix -Wsign-compare warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getaddrinfo_test.c Modified: head/lib/libc/tests/nss/getaddrinfo_test.c ============================================================================== --- head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 04:03:06 2017 (r319033) +++ head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 04:03:45 2017 (r319034) @@ -164,30 +164,30 @@ sdump_addrinfo(struct addrinfo *ai, char ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; written = snprintf(buffer, buflen, "%s ", ai->ai_canonname == NULL ? "(null)" : ai->ai_canonname); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (ai->ai_addr == NULL) { written = snprintf(buffer, buflen, "(null)"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } else { - for (i = 0; i < ai->ai_addrlen; i++) { + for (i = 0; i < (int)ai->ai_addrlen; i++) { written = snprintf(buffer, buflen, - i + 1 != ai->ai_addrlen ? "%d." : "%d", + i + 1 != (int)ai->ai_addrlen ? "%d." : "%d", ((unsigned char *)ai->ai_addr)[i]); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -199,7 +199,7 @@ sdump_addrinfo(struct addrinfo *ai, char if (ai->ai_next != NULL) { written = snprintf(buffer, buflen, ":"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; From owner-svn-src-all@freebsd.org Sun May 28 04:04:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6838D85DD1; Sun, 28 May 2017 04:04:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6EB41205; Sun, 28 May 2017 04:04:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S44WF0081551; Sun, 28 May 2017 04:04:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S44Wjr081550; Sun, 28 May 2017 04:04:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280404.v4S44Wjr081550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319035 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:04:34 -0000 Author: ngie Date: Sun May 28 04:04:32 2017 New Revision: 319035 URL: https://svnweb.freebsd.org/changeset/base/319035 Log: getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getrpc_test.c Modified: head/lib/libc/tests/nss/getrpc_test.c ============================================================================== --- head/lib/libc/tests/nss/getrpc_test.c Sun May 28 04:03:45 2017 (r319034) +++ head/lib/libc/tests/nss/getrpc_test.c Sun May 28 04:04:32 2017 (r319035) @@ -173,16 +173,16 @@ sdump_rpcent(struct rpcent *rpc, char *b written = snprintf(buffer, buflen, "%s %d", rpc->r_name, rpc->r_number); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (rpc->r_aliases != NULL) { if (*(rpc->r_aliases) != '\0') { for (cp = rpc->r_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -400,7 +400,7 @@ rpcent_test_getrpcent(struct rpcent *rpc return (rpcent_test_correctness(rpc, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct rpcent_test_data td, td_snap, td_2pass; From owner-svn-src-all@freebsd.org Sun May 28 04:05:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C11C2D85E65; Sun, 28 May 2017 04:05:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 933721364; Sun, 28 May 2017 04:05:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S45JFZ081639; Sun, 28 May 2017 04:05:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S45J8o081638; Sun, 28 May 2017 04:05:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280405.v4S45J8o081638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319036 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:05:20 -0000 Author: ngie Date: Sun May 28 04:05:19 2017 New Revision: 319036 URL: https://svnweb.freebsd.org/changeset/base/319036 Log: getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getproto_test.c Modified: head/lib/libc/tests/nss/getproto_test.c ============================================================================== --- head/lib/libc/tests/nss/getproto_test.c Sun May 28 04:04:32 2017 (r319035) +++ head/lib/libc/tests/nss/getproto_test.c Sun May 28 04:05:19 2017 (r319036) @@ -172,16 +172,16 @@ sdump_protoent(struct protoent *pe, char written = snprintf(buffer, buflen, "%s %d", pe->p_name, pe->p_proto); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (pe->p_aliases != NULL) { if (*(pe->p_aliases) != '\0') { for (cp = pe->p_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -395,7 +395,7 @@ protoent_test_getprotoent(struct protoen return (protoent_test_correctness(pe, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct protoent_test_data td, td_snap, td_2pass; From owner-svn-src-all@freebsd.org Sun May 28 04:11:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF534D85F43; Sun, 28 May 2017 04:11:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA24F15C9; Sun, 28 May 2017 04:11:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S4B48s082720; Sun, 28 May 2017 04:11:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S4B4V8082719; Sun, 28 May 2017 04:11:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280411.v4S4B4V8082719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:11:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319037 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:11:06 -0000 Author: ngie Date: Sun May 28 04:11:04 2017 New Revision: 319037 URL: https://svnweb.freebsd.org/changeset/base/319037 Log: getaddrinfo_test: mark unused function parameters __unused to fix -Wunused warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getaddrinfo_test.c Modified: head/lib/libc/tests/nss/getaddrinfo_test.c ============================================================================== --- head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 04:05:19 2017 (r319036) +++ head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 04:11:04 2017 (r319037) @@ -28,7 +28,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include @@ -125,7 +125,8 @@ compare_addrinfo_(struct addrinfo *ai1, } static int -compare_addrinfo(struct addrinfo *ai1, struct addrinfo *ai2, void *mdata) +compare_addrinfo(struct addrinfo *ai1, struct addrinfo *ai2, + void *mdata __unused) { int rv; @@ -344,7 +345,7 @@ addrinfo_read_snapshot_func(struct addri } static int -addrinfo_test_correctness(struct addrinfo *ai, void *mdata) +addrinfo_test_correctness(struct addrinfo *ai, void *mdata __unused) { printf("testing correctness with the following data:\n"); From owner-svn-src-all@freebsd.org Sun May 28 04:12:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02A13D85133; Sun, 28 May 2017 04:12:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C329D17D2; Sun, 28 May 2017 04:12:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S4C2ix085084; Sun, 28 May 2017 04:12:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S4C2qA085083; Sun, 28 May 2017 04:12:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280412.v4S4C2qA085083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319038 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:12:04 -0000 Author: ngie Date: Sun May 28 04:12:02 2017 New Revision: 319038 URL: https://svnweb.freebsd.org/changeset/base/319038 Log: getusershell_test: mark mdata parameter in compare_usershell __unused MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getusershell_test.c Modified: head/lib/libc/tests/nss/getusershell_test.c ============================================================================== --- head/lib/libc/tests/nss/getusershell_test.c Sun May 28 04:11:04 2017 (r319037) +++ head/lib/libc/tests/nss/getusershell_test.c Sun May 28 04:12:02 2017 (r319038) @@ -76,7 +76,8 @@ clone_usershell(struct usershell *dest, } static int -compare_usershell(struct usershell *us1, struct usershell *us2, void *mdata) +compare_usershell(struct usershell *us1, struct usershell *us2, + void *mdata __unused) { int rv; From owner-svn-src-all@freebsd.org Sun May 28 04:12:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 029BFD85226; Sun, 28 May 2017 04:12:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C62141B05; Sun, 28 May 2017 04:12:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S4Cq2q085814; Sun, 28 May 2017 04:12:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S4CqHp085813; Sun, 28 May 2017 04:12:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280412.v4S4CqHp085813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319039 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:12:54 -0000 Author: ngie Date: Sun May 28 04:12:52 2017 New Revision: 319039 URL: https://svnweb.freebsd.org/changeset/base/319039 Log: getserv_test: mark unused parameters __unused to fix corresponding warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getserv_test.c Modified: head/lib/libc/tests/nss/getserv_test.c ============================================================================== --- head/lib/libc/tests/nss/getserv_test.c Sun May 28 04:12:02 2017 (r319038) +++ head/lib/libc/tests/nss/getserv_test.c Sun May 28 04:12:52 2017 (r319039) @@ -300,7 +300,7 @@ servent_fill_test_data(struct servent_te } static int -servent_test_correctness(struct servent *serv, void *mdata) +servent_test_correctness(struct servent *serv, void *mdata __unused) { printf("testing correctness with the following data:\n"); dump_servent(serv); @@ -403,7 +403,7 @@ servent_test_getservbyport(struct serven } static int -servent_test_getservent(struct servent *serv, void *mdata) +servent_test_getservent(struct servent *serv, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getservent(). */ From owner-svn-src-all@freebsd.org Sun May 28 04:15:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8871DD853A1; Sun, 28 May 2017 04:15:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 558401CF5; Sun, 28 May 2017 04:15:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S4F55S085933; Sun, 28 May 2017 04:15:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S4F5fB085932; Sun, 28 May 2017 04:15:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280415.v4S4F5fB085932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319040 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:15:06 -0000 Author: ngie Date: Sun May 28 04:15:05 2017 New Revision: 319040 URL: https://svnweb.freebsd.org/changeset/base/319040 Log: getrpc_test: fix -Wunused warnings - Mark unused function parameters unused. - Remove an unused function prototype. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getrpc_test.c Modified: head/lib/libc/tests/nss/getrpc_test.c ============================================================================== --- head/lib/libc/tests/nss/getrpc_test.c Sun May 28 04:12:52 2017 (r319039) +++ head/lib/libc/tests/nss/getrpc_test.c Sun May 28 04:15:05 2017 (r319040) @@ -70,8 +70,6 @@ static int rpcent_test_getrpcbyname(stru static int rpcent_test_getrpcbynumber(struct rpcent *, void *); static int rpcent_test_getrpcent(struct rpcent *, void *); -static void usage(void) __attribute__((__noreturn__)); - IMPLEMENT_TEST_DATA(rpcent) IMPLEMENT_TEST_FILE_SNAPSHOT(rpcent) IMPLEMENT_1PASS_TEST(rpcent) @@ -289,7 +287,7 @@ rpcent_fill_test_data(struct rpcent_test } static int -rpcent_test_correctness(struct rpcent *rpc, void *mdata) +rpcent_test_correctness(struct rpcent *rpc, void *mdata __unused) { printf("testing correctness with the following data:\n"); @@ -390,7 +388,7 @@ rpcent_test_getrpcbynumber(struct rpcent } static int -rpcent_test_getrpcent(struct rpcent *rpc, void *mdata) +rpcent_test_getrpcent(struct rpcent *rpc, void *mdata __unused) { /* From owner-svn-src-all@freebsd.org Sun May 28 04:15:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6F01D8543B; Sun, 28 May 2017 04:15:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A42101E52; Sun, 28 May 2017 04:15:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S4Fvdx086001; Sun, 28 May 2017 04:15:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S4FvfK086000; Sun, 28 May 2017 04:15:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280415.v4S4FvfK086000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319041 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:15:58 -0000 Author: ngie Date: Sun May 28 04:15:57 2017 New Revision: 319041 URL: https://svnweb.freebsd.org/changeset/base/319041 Log: getproto_test: fix -Wunused warnings Mark unused parameters __unused in functions. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getproto_test.c Modified: head/lib/libc/tests/nss/getproto_test.c ============================================================================== --- head/lib/libc/tests/nss/getproto_test.c Sun May 28 04:15:05 2017 (r319040) +++ head/lib/libc/tests/nss/getproto_test.c Sun May 28 04:15:57 2017 (r319041) @@ -288,7 +288,7 @@ protoent_fill_test_data(struct protoent_ } static int -protoent_test_correctness(struct protoent *pe, void *mdata) +protoent_test_correctness(struct protoent *pe, void *mdata __unused) { printf("testing correctness with the following data:\n"); dump_protoent(pe); @@ -388,7 +388,7 @@ protoent_test_getprotobynumber(struct pr } static int -protoent_test_getprotoent(struct protoent *pe, void *mdata) +protoent_test_getprotoent(struct protoent *pe, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getprotoent(). */ From owner-svn-src-all@freebsd.org Sun May 28 04:34:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D63ACD85A81; Sun, 28 May 2017 04:34:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD8651732; Sun, 28 May 2017 04:34:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S4YvMf094031; Sun, 28 May 2017 04:34:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S4Yv4f094030; Sun, 28 May 2017 04:34:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280434.v4S4Yv4f094030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319042 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:34:58 -0000 Author: ngie Date: Sun May 28 04:34:57 2017 New Revision: 319042 URL: https://svnweb.freebsd.org/changeset/base/319042 Log: gethostby_test: fix multiple warning types - Fix -Wmissing-declaration warning by staticizing run_tests. - Fix -Wsign-compare warnings by casting size_t types to int for comparisons. Reindent some of the code in sdump_hostent(..) to accomodate the overall changes. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/gethostby_test.c Modified: head/lib/libc/tests/nss/gethostby_test.c ============================================================================== --- head/lib/libc/tests/nss/gethostby_test.c Sun May 28 04:15:57 2017 (r319041) +++ head/lib/libc/tests/nss/gethostby_test.c Sun May 28 04:34:57 2017 (r319042) @@ -412,7 +412,7 @@ sdump_hostent(struct hostent *ht, char * written = snprintf(buffer, buflen, "%s %d %d", ht->h_name, ht->h_addrtype, ht->h_length); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -421,7 +421,7 @@ sdump_hostent(struct hostent *ht, char * for (cp = ht->h_aliases; *cp; ++cp) { written = snprintf(buffer, buflen, " %s",*cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -431,59 +431,61 @@ sdump_hostent(struct hostent *ht, char * } else { written = snprintf(buffer, buflen, " noaliases"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } } else { written = snprintf(buffer, buflen, " (null)"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } written = snprintf(buffer, buflen, " : "); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (ht->h_addr_list != NULL) { if (*(ht->h_addr_list) != NULL) { for (cp = ht->h_addr_list; *cp; ++cp) { - for (i = 0; i < ht->h_length; ++i ) { - written = snprintf(buffer, buflen, - i + 1 != ht->h_length ? "%d." : "%d", - (unsigned char)(*cp)[i]); - buffer += written; - if (written > buflen) - return; - buflen -= written; + for (i = 0; i < (size_t)ht->h_length; ++i) { + written = snprintf(buffer, buflen, + i + 1 != (size_t)ht->h_length ? + "%d." : "%d", + (unsigned char)(*cp)[i]); + buffer += written; + if (written > (int)buflen) + return; + buflen -= written; - if (buflen == 0) - return; - } + if (buflen == 0) + return; + } - if (*(cp + 1) ) { - written = snprintf(buffer, buflen, " "); - buffer += written; - if (written > buflen) - return; - buflen -= written; - } + if (*(cp + 1)) { + written = snprintf(buffer, buflen, + " "); + buffer += written; + if (written > (int)buflen) + return; + buflen -= written; + } } } else { written = snprintf(buffer, buflen, " noaddrs"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } } else { written = snprintf(buffer, buflen, " (null)"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } @@ -920,7 +922,7 @@ hostent_test_getnameinfo_eq(struct hoste return (0); } -int +static int run_tests(const char *hostlist_file, const char *snapshot_file, int af_type, enum test_methods method, bool use_ipv6_mapping) { From owner-svn-src-all@freebsd.org Sun May 28 04:41:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4826D85B8B; Sun, 28 May 2017 04:41:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AA551ABD; Sun, 28 May 2017 04:41:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S4f6Jb095058; Sun, 28 May 2017 04:41:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S4f6sb095057; Sun, 28 May 2017 04:41:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280441.v4S4f6sb095057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319043 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:41:07 -0000 Author: ngie Date: Sun May 28 04:41:06 2017 New Revision: 319043 URL: https://svnweb.freebsd.org/changeset/base/319043 Log: getpw_test: fix -Wunused warnings - Mark unused parameters __unused. - Put dump_passwd under DEBUG as it's only used in that case. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getpw_test.c Modified: head/lib/libc/tests/nss/getpw_test.c ============================================================================== --- head/lib/libc/tests/nss/getpw_test.c Sun May 28 04:34:57 2017 (r319042) +++ head/lib/libc/tests/nss/getpw_test.c Sun May 28 04:41:06 2017 (r319043) @@ -57,7 +57,9 @@ static int compare_passwd(struct passwd static void free_passwd(struct passwd *); static void sdump_passwd(struct passwd *, char *, size_t); +#ifdef DEBUG static void dump_passwd(struct passwd *); +#endif static int passwd_read_snapshot_func(struct passwd *, char *); @@ -95,7 +97,7 @@ clone_passwd(struct passwd *dest, struct } static int -compare_passwd(struct passwd *pwd1, struct passwd *pwd2, void *mdata) +compare_passwd(struct passwd *pwd1, struct passwd *pwd2, void *mdata __unused) { ATF_REQUIRE(pwd1 != NULL); ATF_REQUIRE(pwd2 != NULL); @@ -140,6 +142,7 @@ sdump_passwd(struct passwd *pwd, char *b pwd->pw_fields); } +#ifdef DEBUG static void dump_passwd(struct passwd *pwd) { @@ -150,6 +153,7 @@ dump_passwd(struct passwd *pwd) } else printf("(null)\n"); } +#endif static int passwd_read_snapshot_func(struct passwd *pwd, char *line) @@ -249,7 +253,7 @@ passwd_fill_test_data(struct passwd_test } static int -passwd_test_correctness(struct passwd *pwd, void *mdata) +passwd_test_correctness(struct passwd *pwd, void *mdata __unused) { #ifdef DEBUG @@ -361,7 +365,7 @@ passwd_test_getpwuid(struct passwd *pwd_ } static int -passwd_test_getpwent(struct passwd *pwd, void *mdata) +passwd_test_getpwent(struct passwd *pwd, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getpwent(). */ From owner-svn-src-all@freebsd.org Sun May 28 04:43:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78389D85D25; Sun, 28 May 2017 04:43:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 475DC1D45; Sun, 28 May 2017 04:43:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S4h2ff098232; Sun, 28 May 2017 04:43:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S4h2dQ098231; Sun, 28 May 2017 04:43:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280443.v4S4h2dQ098231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 04:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319044 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 04:43:03 -0000 Author: ngie Date: Sun May 28 04:43:02 2017 New Revision: 319044 URL: https://svnweb.freebsd.org/changeset/base/319044 Log: getgr_test: fix -Wunused warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getgr_test.c Modified: head/lib/libc/tests/nss/getgr_test.c ============================================================================== --- head/lib/libc/tests/nss/getgr_test.c Sun May 28 04:41:06 2017 (r319043) +++ head/lib/libc/tests/nss/getgr_test.c Sun May 28 04:43:02 2017 (r319044) @@ -307,7 +307,7 @@ group_fill_test_data(struct group_test_d } static int -group_test_correctness(struct group *grp, void *mdata) +group_test_correctness(struct group *grp, void *mdata __unused) { printf("testing correctness with the following data:\n"); dump_group(grp); @@ -385,7 +385,7 @@ group_test_getgrgid(struct group *grp_mo } static int -group_test_getgrent(struct group *grp, void *mdata) +group_test_getgrent(struct group *grp, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getgrent(). */ From owner-svn-src-all@freebsd.org Sun May 28 05:26:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5771D85843; Sun, 28 May 2017 05:26:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DBC2112; Sun, 28 May 2017 05:26:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S5QjmR014493; Sun, 28 May 2017 05:26:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S5Qjjs014492; Sun, 28 May 2017 05:26:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280526.v4S5Qjjs014492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 05:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319045 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 05:26:46 -0000 Author: ngie Date: Sun May 28 05:26:45 2017 New Revision: 319045 URL: https://svnweb.freebsd.org/changeset/base/319045 Log: Fix -Wunused and -Wshadow warnings MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/gethostby_test.c Modified: head/lib/libc/tests/nss/gethostby_test.c ============================================================================== --- head/lib/libc/tests/nss/gethostby_test.c Sun May 28 04:43:02 2017 (r319044) +++ head/lib/libc/tests/nss/gethostby_test.c Sun May 28 05:26:45 2017 (r319045) @@ -87,8 +87,6 @@ static int hostent_test_gethostbyaddr(st static int hostent_test_getaddrinfo_eq(struct hostent *, void *); static int hostent_test_getnameinfo_eq(struct hostent *, void *); -static void usage(void) __attribute__((__noreturn__)); - IMPLEMENT_TEST_DATA(hostent) IMPLEMENT_TEST_FILE_SNAPSHOT(hostent) IMPLEMENT_1PASS_TEST(hostent) @@ -677,7 +675,7 @@ dump_hostent(struct hostent *result) } static int -hostent_test_correctness(struct hostent *ht, void *mdata) +hostent_test_correctness(struct hostent *ht, void *mdata __unused) { #ifdef DEBUG @@ -760,7 +758,7 @@ hostent_test_gethostbyaddr(struct hosten } static int -hostent_test_getaddrinfo_eq(struct hostent *he, void *mdata) +hostent_test_getaddrinfo_eq(struct hostent *he, void *mdata __unused) { struct addrinfo *ai, hints; int rv; @@ -799,7 +797,7 @@ hostent_test_getaddrinfo_eq(struct hoste } static int -hostent_test_getnameinfo_eq(struct hostent *he, void *mdata) +hostent_test_getnameinfo_eq(struct hostent *he, void *mdata __unused) { char **cp; char buffer[NI_MAXHOST]; @@ -923,14 +921,14 @@ hostent_test_getnameinfo_eq(struct hoste } static int -run_tests(const char *hostlist_file, const char *snapshot_file, int af_type, +run_tests(const char *hostlist_file, const char *snapshot_file, int _af_type, enum test_methods method, bool use_ipv6_mapping) { struct hostent_test_data td, td_addr, td_snap; res_state statp; int rv = -2; - switch (af_type) { + switch (_af_type) { case AF_INET: ATF_REQUIRE_FEATURE("inet"); ATF_REQUIRE(!use_ipv6_mapping); @@ -939,7 +937,7 @@ run_tests(const char *hostlist_file, con ATF_REQUIRE_FEATURE("inet6"); break; default: - atf_tc_fail("unhandled address family: %d", af_type); + atf_tc_fail("unhandled address family: %d", _af_type); break; } From owner-svn-src-all@freebsd.org Sun May 28 05:31:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E607DD85A8F; Sun, 28 May 2017 05:31:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6764367; Sun, 28 May 2017 05:31:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S5VIGO015386; Sun, 28 May 2017 05:31:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S5VIie015385; Sun, 28 May 2017 05:31:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280531.v4S5VIie015385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 05:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319046 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 05:31:20 -0000 Author: ngie Date: Sun May 28 05:31:18 2017 New Revision: 319046 URL: https://svnweb.freebsd.org/changeset/base/319046 Log: Fix a -Wunused-but-set-variable warning reported by gcc 6.3.0 MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getaddrinfo_test.c Modified: head/lib/libc/tests/nss/getaddrinfo_test.c ============================================================================== --- head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 05:26:45 2017 (r319045) +++ head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 05:31:18 2017 (r319046) @@ -310,12 +310,11 @@ addrinfo_read_snapshot_func(struct addri { struct addrinfo *ai2; char *s, *ps; - int i, rv; + int rv; printf("1 line read from snapshot:\n%s\n", line); rv = 0; - i = 0; ps = line; s = strsep(&ps, ":"); From owner-svn-src-all@freebsd.org Sun May 28 06:13:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36446D852B7; Sun, 28 May 2017 06:13:41 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFD481635; Sun, 28 May 2017 06:13:40 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S6DeSs034728; Sun, 28 May 2017 06:13:40 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S6DdRQ034717; Sun, 28 May 2017 06:13:39 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705280613.v4S6DdRQ034717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 28 May 2017 06:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319047 - in head/lib/msun: . man src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 06:13:41 -0000 Author: mmel Date: Sun May 28 06:13:38 2017 New Revision: 319047 URL: https://svnweb.freebsd.org/changeset/base/319047 Log: Implement sincos, sincosf, and sincosl. The primary benefit of these functions is that argument reduction is done once instead of twice in independent calls to sin() and cos(). * lib/msun/Makefile: . Add s_sincos[fl].c to the build. . Add sincos.3 documentation. . Add appropriate MLINKS. * lib/msun/Symbol.map: . Expose sincos[fl] symbols in dynamic libm.so. * lib/msun/man/sincos.3: . Documentation for sincos[fl]. * lib/msun/src/k_sincos.h: . Kernel for sincos() function. This merges the individual kernels for sin() and cos(). The merger offered an opportunity to re-arrange the individual kernels for better performance. * lib/msun/src/k_sincosf.h: . Kernel for sincosf() function. This merges the individual kernels for sinf() and cosf(). The merger offered an opportunity to re-arrange the individual kernels for better performance. * lib/msun/src/k_sincosl.h: . Kernel for sincosl() function. This merges the individual kernels for sinl() and cosl(). The merger offered an opportunity to re-arrange the individual kernels for better performance. * lib/msun/src/math.h: . Add prototytpes for sincos[fl](). * lib/msun/src/math_private.h: . Add RETURNV macros. This is needed to reset fpsetprec on I386 hardware for a function with type void. * lib/msun/src/s_sincos.c: . Implementation of sincos() where sin() and cos() were merged into one routine and possibly re-arranged for better performance. * lib/msun/src/s_sincosf.c: . Implementation of sincosf() where sinf() and cosf() were merged into one routine and possibly re-arranged for better performance. * lib/msun/src/s_sincosl.c: . Implementation of sincosl() where sinl() and cosl() were merged into one routine and possibly re-arranged for better performance. PR: 215977, 218300 Submitted by: Steven G. Kargl MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D10765 Added: head/lib/msun/man/sincos.3 (contents, props changed) head/lib/msun/src/k_sincos.h (contents, props changed) head/lib/msun/src/k_sincosf.h (contents, props changed) head/lib/msun/src/k_sincosl.h (contents, props changed) head/lib/msun/src/s_sincos.c (contents, props changed) head/lib/msun/src/s_sincosf.c (contents, props changed) head/lib/msun/src/s_sincosl.c (contents, props changed) Modified: head/lib/msun/Makefile head/lib/msun/Symbol.map head/lib/msun/src/math.h head/lib/msun/src/math_private.h Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Sun May 28 05:31:18 2017 (r319046) +++ head/lib/msun/Makefile Sun May 28 06:13:38 2017 (r319047) @@ -73,7 +73,8 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c s_nexttowardf.c s_remquo.c s_remquof.c \ s_rint.c s_rintf.c s_round.c s_roundf.c \ s_scalbln.c s_scalbn.c s_scalbnf.c s_signbit.c \ - s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c \ + s_signgam.c s_significand.c s_significandf.c s_sin.c \ + s_sincos.c s_sincosf.c s_sinf.c \ s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c s_trunc.c s_truncf.c \ w_cabs.c w_cabsf.c w_drem.c w_dremf.c @@ -104,7 +105,8 @@ COMMON_SRCS+= catrigl.c \ s_csqrtl.c s_erfl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \ s_fmaxl.c s_fminl.c s_frexpl.c s_logbl.c s_logl.c s_nanl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ - s_scalbnl.c s_sinl.c s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c + s_scalbnl.c s_sinl.c s_sincosl.c \ + s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c .endif # C99 complex functions @@ -137,7 +139,8 @@ MAN= acos.3 acosh.3 asin.3 asinh.3 atan. fma.3 fmax.3 fmod.3 hypot.3 ieee.3 ieee_test.3 ilogb.3 j0.3 \ lgamma.3 log.3 lrint.3 lround.3 math.3 nan.3 \ nextafter.3 remainder.3 rint.3 \ - round.3 scalbn.3 signbit.3 sin.3 sinh.3 sqrt.3 tan.3 tanh.3 trunc.3 \ + round.3 scalbn.3 signbit.3 sin.3 sincos.3 \ + sinh.3 sqrt.3 tan.3 tanh.3 trunc.3 \ complex.3 MLINKS+=acos.3 acosf.3 acos.3 acosl.3 @@ -215,6 +218,7 @@ MLINKS+=round.3 roundf.3 round.3 roundl. MLINKS+=scalbn.3 scalbln.3 scalbn.3 scalblnf.3 scalbn.3 scalblnl.3 MLINKS+=scalbn.3 scalbnf.3 scalbn.3 scalbnl.3 MLINKS+=sin.3 sinf.3 sin.3 sinl.3 +MLINKS+=sincos.3 sincosf.3 sin.3 sincosl.3 MLINKS+=sinh.3 sinhf.3 sinh.3 sinhl.3 MLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 cbrtl.3 sqrt.3 sqrtf.3 \ sqrt.3 sqrtl.3 Modified: head/lib/msun/Symbol.map ============================================================================== --- head/lib/msun/Symbol.map Sun May 28 05:31:18 2017 (r319046) +++ head/lib/msun/Symbol.map Sun May 28 06:13:38 2017 (r319047) @@ -294,4 +294,7 @@ FBSD_1.5 { casinl; catanl; catanhl; + sincos; + sincosf; + sincosl; }; Added: head/lib/msun/man/sincos.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/man/sincos.3 Sun May 28 06:13:38 2017 (r319047) @@ -0,0 +1,82 @@ +.\" Copyright (c) 2011 Steven G. Kargl. +.\" +.\" 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 March 12, 2011 +.Dt SINCOS 3 +.Os +.Sh NAME +.Nm sincos , +.Nm sincosf , +.Nm sincosl +.Nd sine and cosine functions +.Sh LIBRARY +.Lb libm +.Sh SYNOPSIS +.In math.h +.Ft void +.Fn sincos "double x" "double *s" "double *c" +.Ft void +.Fn sincosf "float x" "float *s" "float *c" +.Ft void +.Fn sincosl "long double x" "long double *s" "long double *c" +.Sh DESCRIPTION +The +.Fn sincos , +.Fn sincosf , +and +.Fn sincosl +functions compute the sine and cosine of +.Fa x . +Using these functions allows argument reduction to occur only +once instead of twice with individual invocations of +.Fn sin +and +.Fn cos . +Like +.Fn sin +and +.Fn cos , +a large magnitude argument may yield a result with little +or no significance. +.Sh RETURN VALUES +Upon returning from +.Fn sincos , +.Fn sincosf , +and +.Fn sincosl , +the memory pointed to by +.Ar "*s" +and +.Ar "*c" +are assigned the values of sine and cosine, respectively. +.Sh SEE ALSO +.Xr cos 3 , +.Xr sin 3 , +.Sh HISTORY +These functions were added to +.Fx 9.0 +to aid in writing various complex function contained in +.St -isoC-99 . + Added: head/lib/msun/src/k_sincos.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/k_sincos.h Sun May 28 06:13:38 2017 (r319047) @@ -0,0 +1,52 @@ +/*- + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + * k_sin.c and k_cos.c merged by Steven G. Kargl. + */ + +#include +__FBSDID("$FreeBSD$"); + +static const double +S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */ +S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */ +S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */ +S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */ +S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */ +S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */ + +static const double +C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */ +C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */ +C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */ +C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */ +C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */ +C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */ + +static inline void +__kernel_sincos(double x, double y, int iy, double *sn, double *cs) +{ + double hz, r, v, w, z; + + z = x * x; + w = z * z; + r = S2 + z * (S3 + z * S4) + z * w * (S5 + z * S6); + v = z * x; + + if (iy == 0) + *sn = x + v * (S1 + z * r); + else + *sn = x - ((z * (y / 2 - v * r) - y) - v * S1); + + r = z * (C1 + z * (C2 + z * C3)) + w * w * (C4 + z * (C5 + z * C6)); + hz = z / 2; + w = 1 - hz; + *cs = w + (((1 - w) - hz) + (z * r - x * y)); +} Added: head/lib/msun/src/k_sincosf.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/k_sincosf.h Sun May 28 06:13:38 2017 (r319047) @@ -0,0 +1,43 @@ +/*- + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + * k_sinf.c and k_cosf.c merged by Steven G. Kargl. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]). */ +static const double +S1 = -0x15555554cbac77.0p-55, /* -0.166666666416265235595 */ +S2 = 0x111110896efbb2.0p-59, /* 0.0083333293858894631756 */ +S3 = -0x1a00f9e2cae774.0p-65, /* -0.000198393348360966317347 */ +S4 = 0x16cd878c3b46a7.0p-71; /* 0.0000027183114939898219064 */ + +/* |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]). */ +static const double +C0 = -0x1ffffffd0c5e81.0p-54, /* -0.499999997251031003120 */ +C1 = 0x155553e1053a42.0p-57, /* 0.0416666233237390631894 */ +C2 = -0x16c087e80f1e27.0p-62, /* -0.00138867637746099294692 */ +C3 = 0x199342e0ee5069.0p-68; /* 0.0000243904487962774090654 */ + +static inline void +__kernel_sincosdf(double x, float *sn, float *cs) +{ + double r, s, w, z; + + z = x * x; + w = z * z; + r = S3 + z * S4; + s = z * x; + *sn = (x + s * (S1 + z * S2)) + s * w * r; + r = C2 + z * C3; + *cs = ((1 + z * C0) + w * C1) + (w * z) * r; +} Added: head/lib/msun/src/k_sincosl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/k_sincosl.h Sun May 28 06:13:38 2017 (r319047) @@ -0,0 +1,134 @@ +/*- + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + * k_sinl.c and k_cosl.c merged by Steven G. Kargl + */ + +#include +__FBSDID("$FreeBSD$"); + +#if LDBL_MANT_DIG == 64 /* ld80 version of k_sincosl.c. */ + +#if defined(__amd64__) || defined(__i386__) +/* Long double constants are slow on these arches, and broken on i386. */ +static const volatile double +C1hi = 0.041666666666666664, /* 0x15555555555555.0p-57 */ +C1lo = 2.2598839032744733e-18, /* 0x14d80000000000.0p-111 */ +S1hi = -0.16666666666666666, /* -0x15555555555555.0p-55 */ +S1lo = -9.2563760475949941e-18; /* -0x15580000000000.0p-109 */ +#define S1 ((long double)S1hi + S1lo) +#define C1 ((long double)C1hi + C1lo) +#else +static const long double +C1 = 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68 */ +S1 = -0.166666666666666666671L, /* -0xaaaaaaaaaaaaaaab.0p-66 */ +#endif + +static const double +C2 = -0.0013888888888888874, /* -0x16c16c16c16c10.0p-62 */ +C3 = 0.000024801587301571716, /* 0x1a01a01a018e22.0p-68 */ +C4 = -0.00000027557319215507120, /* -0x127e4fb7602f22.0p-74 */ +C5 = 0.0000000020876754400407278, /* 0x11eed8caaeccf1.0p-81 */ +C6 = -1.1470297442401303e-11, /* -0x19393412bd1529.0p-89 */ +C7 = 4.7383039476436467e-14, /* 0x1aac9d9af5c43e.0p-97 */ +S2 = 0.0083333333333333332, /* 0x11111111111111.0p-59 */ +S3 = -0.00019841269841269427, /* -0x1a01a01a019f81.0p-65 */ +S4 = 0.0000027557319223597490, /* 0x171de3a55560f7.0p-71 */ +S5 = -0.000000025052108218074604, /* -0x1ae64564f16cad.0p-78 */ +S6 = 1.6059006598854211e-10, /* 0x161242b90243b5.0p-85 */ +S7 = -7.6429779983024564e-13, /* -0x1ae42ebd1b2e00.0p-93 */ +S8 = 2.6174587166648325e-15; /* 0x179372ea0b3f64.0p-101 */ + +static inline void +__kernel_sincosl(long double x, long double y, int iy, long double *sn, + long double *cs) +{ + long double hz, r, v, w, z; + + z = x * x; + v = z * x; + /* + * XXX Replace Horner scheme with an algorithm suitable for CPUs + * with more complex pipelines. + */ + r = S2 + z * (S3 + z * (S4 + z * (S5 + z * (S6 + z * (S7 + z * S8))))); + + if (iy == 0) + *sn = x + v * (S1 + z * r); + else + *sn = x - ((z * (y / 2 - v * r) - y) - v * S1); + + hz = z / 2; + w = 1 - hz; + r = z * (C1 + z * (C2 + z * (C3 + z * (C4 + z * (C5 + z * (C6 + + z * C7)))))); + *cs = w + (((1 - w) - hz) + (z * r - x * y)); +} + +#elif LDBL_MANT_DIG == 113 /* ld128 version of k_sincosl.c. */ + +static const long double +C1 = 0.04166666666666666666666666666666658424671L, +C2 = -0.001388888888888888888888888888863490893732L, +C3 = 0.00002480158730158730158730158600795304914210L, +C4 = -0.2755731922398589065255474947078934284324e-6L, +C5 = 0.2087675698786809897659225313136400793948e-8L, +C6 = -0.1147074559772972315817149986812031204775e-10L, +C7 = 0.4779477332386808976875457937252120293400e-13L, +S1 = -0.16666666666666666666666666666666666606732416116558L, +S2 = 0.0083333333333333333333333333333331135404851288270047L, +S3 = -0.00019841269841269841269841269839935785325638310428717L, +S4 = 0.27557319223985890652557316053039946268333231205686e-5L, +S5 = -0.25052108385441718775048214826384312253862930064745e-7L, +S6 = 0.16059043836821614596571832194524392581082444805729e-9L, +S7 = -0.76471637318198151807063387954939213287488216303768e-12L, +S8 = 0.28114572543451292625024967174638477283187397621303e-14L; + +static const double +C8 = -0.1561920696721507929516718307820958119868e-15, +C9 = 0.4110317413744594971475941557607804508039e-18, +C10 = -0.8896592467191938803288521958313920156409e-21, +C11 = 0.1601061435794535138244346256065192782581e-23, +S9 = -0.82206352458348947812512122163446202498005154296863e-17, +S10 = 0.19572940011906109418080609928334380560135358385256e-19, +S11 = -0.38680813379701966970673724299207480965452616911420e-22, +S12 = 0.64038150078671872796678569586315881020659912139412e-25; + +static inline void +__kernel_sincosl(long double x, long double y, int iy, long double *sn, + long double *cs) +{ + long double hz, r, v, w, z; + + z = x * x; + v = z * x; + /* + * XXX Replace Horner scheme with an algorithm suitable for CPUs + * with more complex pipelines. + */ + r = S2 + z * (S3 + z * (S4 + z * (S5 + z * (S6 + z * (S7 + z * (S8 + + z * (S9 + z * (S10 + z * (S11 + z * S12))))))))); + + if (iy == 0) + *sn = x + v * (S1 + z * r); + else + *cs = x - ((z * (y / 2 - v * r) - y) - v * S1); + + hz = z / 2; + w = 1 - hz; + r = z * (C1 + z * (C2 + z * (C3 + z * (C4 + z * (C5 + z * (C6 + + z * (C7 + z * (C8 + z * (C9 + z * (C10 + z * C11)))))))))); + + *cs = w + (((1 - w) - hz) + (z * r - x * y)); +} +#else +#error "Unsupported long double format" +#endif Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Sun May 28 05:31:18 2017 (r319046) +++ head/lib/msun/src/math.h Sun May 28 06:13:38 2017 (r319047) @@ -500,6 +500,9 @@ long double truncl(long double); #if __BSD_VISIBLE long double lgammal_r(long double, int *); +void sincos(double, double *, double *); +void sincosf(float, float *, float *); +void sincosl(long double, long double *, long double *); #endif __END_DECLS Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Sun May 28 05:31:18 2017 (r319046) +++ head/lib/msun/src/math_private.h Sun May 28 06:13:38 2017 (r319047) @@ -306,9 +306,21 @@ do { \ fpsetprec(__oprec); \ RETURNF(__retval); \ } while (0) +#define ENTERV() \ + fp_prec_t __oprec; \ + \ + if ((__oprec = fpgetprec()) != FP_PE) \ + fpsetprec(FP_PE) +#define RETURNV() do { \ + if (__oprec != FP_PE) \ + fpsetprec(__oprec); \ + return; \ +} while (0) #else -#define ENTERI(x) +#define ENTERI() #define RETURNI(x) RETURNF(x) +#define ENTERV() +#define RETURNV() return #endif /* Default return statement if hack*_t() is not used. */ Added: head/lib/msun/src/s_sincos.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_sincos.c Sun May 28 06:13:38 2017 (r319047) @@ -0,0 +1,80 @@ +/*- + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + * s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the + * algorithms are contained in the original files. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "math.h" +#define INLINE_REM_PIO2 +#include "math_private.h" +#include "e_rem_pio2.c" +#include "k_sincos.h" + +void +sincos(double x, double *sn, double *cs) +{ + double y[2]; + int32_t n, ix; + + /* High word of x. */ + GET_HIGH_WORD(ix, x); + + /* |x| ~< pi/4 */ + ix &= 0x7fffffff; + if (ix <= 0x3fe921fb) { + if (ix < 0x3e400000) { /* |x| < 2**-27 */ + if ((int)x == 0) { /* Generate inexact. */ + *sn = x; + *cs = 1; + return; + } + } + __kernel_sincos(x, 0, 0, sn, cs); + return; + } + + /* If x = Inf or NaN, then sin(x) = NaN and cos(x) = NaN. */ + if (ix >= 0x7ff00000) { + *sn = x - x; + *cs = x - x; + return; + } + + /* Argument reduction. */ + n = __ieee754_rem_pio2(x, y); + + switch(n & 3) { + case 0: + __kernel_sincos(y[0], y[1], 1, sn, cs); + break; + case 1: + __kernel_sincos(y[0], y[1], 1, cs, sn); + *cs = -*cs; + break; + case 2: + __kernel_sincos(y[0], y[1], 1, sn, cs); + *sn = -*sn; + *cs = -*cs; + break; + default: + __kernel_sincos(y[0], y[1], 1, cs, sn); + *sn = -*sn; + } +} + +#if (LDBL_MANT_DIG == 53) +__weak_reference(sincos, sincosl); +#endif Added: head/lib/msun/src/s_sincosf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_sincosf.c Sun May 28 06:13:38 2017 (r319047) @@ -0,0 +1,126 @@ +/*- + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* s_sincosf.c -- float version of s_sincos.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. + * Optimized by Bruce D. Evans. + * Merged s_sinf.c and s_cosf.c by Steven G. Kargl. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "math.h" +#define INLINE_REM_PIO2F +#include "math_private.h" +#include "e_rem_pio2f.c" +#include "k_sincosf.h" + +/* Small multiples of pi/2 rounded to double precision. */ +static const double +p1pio2 = 1*M_PI_2, /* 0x3FF921FB, 0x54442D18 */ +p2pio2 = 2*M_PI_2, /* 0x400921FB, 0x54442D18 */ +p3pio2 = 3*M_PI_2, /* 0x4012D97C, 0x7F3321D2 */ +p4pio2 = 4*M_PI_2; /* 0x401921FB, 0x54442D18 */ + +void +sincosf(float x, float *sn, float *cs) +{ + float c, s; + double y; + int32_t n, hx, ix; + + GET_FLOAT_WORD(hx, x); + ix = hx & 0x7fffffff; + + if (ix <= 0x3f490fda) { /* |x| ~<= pi/4 */ + if (ix < 0x39800000) { /* |x| < 2**-12 */ + if ((int)x == 0) { + *sn = x; /* x with inexact if x != 0 */ + *cs = 1; + return; + } + } + __kernel_sincosdf(x, sn, cs); + return; + } + + if (ix <= 0x407b53d1) { /* |x| ~<= 5*pi/4 */ + if (ix <= 0x4016cbe3) { /* |x| ~<= 3pi/4 */ + if (hx > 0) { + __kernel_sincosdf(x - p1pio2, cs, sn); + *cs = -*cs; + } else { + __kernel_sincosdf(x + p1pio2, cs, sn); + *sn = -*sn; + } + } else { + if (hx > 0) + __kernel_sincosdf(x - p2pio2, sn, cs); + else + __kernel_sincosdf(x + p2pio2, sn, cs); + *sn = -*sn; + *cs = -*cs; + } + return; + } + + if (ix <= 0x40e231d5) { /* |x| ~<= 9*pi/4 */ + if (ix <= 0x40afeddf) { /* |x| ~<= 7*pi/4 */ + if (hx > 0) { + __kernel_sincosdf(x - p3pio2, cs, sn); + *sn = -*sn; + } else { + __kernel_sincosdf(x + p3pio2, cs, sn); + *cs = -*cs; + } + } else { + if (hx > 0) + __kernel_sincosdf(x - p4pio2, sn, cs); + else + __kernel_sincosdf(x + p4pio2, sn, cs); + } + return; + } + + /* If x = Inf or NaN, then sin(x) = NaN and cos(x) = NaN. */ + if (ix >= 0x7f800000) { + *sn = x - x; + *cs = x - x; + return; + } + + /* Argument reduction. */ + n = __ieee754_rem_pio2f(x, &y); + __kernel_sincosdf(y, &s, &c); + + switch(n & 3) { + case 0: + *sn = s; + *cs = c; + break; + case 1: + *sn = c; + *cs = -s; + break; + case 2: + *sn = -s; + *cs = -c; + break; + default: + *sn = -c; + *cs = s; + } +} + + Added: head/lib/msun/src/s_sincosl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_sincosl.c Sun May 28 06:13:38 2017 (r319047) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2007, 2010-2013 Steven G. Kargl + * 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 unmodified, 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 ``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. + * + * s_sinl.c and s_cosl.c merged by Steven G. Kargl. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#ifdef __i386__ +#include +#endif + +#include "math.h" +#include "math_private.h" +#include "k_sincosl.h" + +#if LDBL_MANT_DIG == 64 +#include "../ld80/e_rem_pio2l.h" +#elif LDBL_MANT_DIG == 113 +#include "../ld128/e_rem_pio2l.h" +#else +#error "Unsupported long double format" +#endif + +void +sincosl(long double x, long double *sn, long double *cs) +{ + union IEEEl2bits z; + int e0, sgn; + long double y[2]; + + z.e = x; + sgn = z.bits.sign; + z.bits.sign = 0; + + ENTERV(); + + /* Optimize the case where x is already within range. */ + if (z.e < M_PI_4) { + /* + * If x = +-0 or x is a subnormal number, then sin(x) = x and + * cos(x) = 1. + */ + if (z.bits.exp == 0) { + *sn = x; + *cs = 1; + } else + __kernel_sincosl(x, 0, 0, sn, cs); + RETURNV(); + } + + /* If x = NaN or Inf, then sin(x) and cos(x) are NaN. */ + if (z.bits.exp == 32767) { + *sn = x - x; + *cs = x - x; + RETURNV(); + } + + /* Range reduction. */ + e0 = __ieee754_rem_pio2l(x, y); + + switch (e0 & 3) { + case 0: + __kernel_sincosl(y[0], y[1], 1, sn, cs); + break; + case 1: + __kernel_sincosl(y[0], y[1], 1, cs, sn); + *cs = -*cs; + break; + case 2: + __kernel_sincosl(y[0], y[1], 1, sn, cs); + *sn = -*sn; + *cs = -*cs; + break; + default: + __kernel_sincosl(y[0], y[1], 1, cs, sn); + *sn = -*sn; + } + + RETURNV(); +} From owner-svn-src-all@freebsd.org Sun May 28 06:26:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0594BD857B0; Sun, 28 May 2017 06:26:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB5C21C78; Sun, 28 May 2017 06:26:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S6QhKF038766; Sun, 28 May 2017 06:26:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S6QhcP038764; Sun, 28 May 2017 06:26:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280626.v4S6QhcP038764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 06:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319048 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 06:26:45 -0000 Author: ngie Date: Sun May 28 06:26:43 2017 New Revision: 319048 URL: https://svnweb.freebsd.org/changeset/base/319048 Log: Push `snapshot_file` copying down into run_tests function, and mark snapshot_file const char *. This fixes a bogus set of errors from gcc about strdup not being allowed a NULL argument. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/getaddrinfo_test.c head/lib/libc/tests/nss/gethostby_test.c Modified: head/lib/libc/tests/nss/getaddrinfo_test.c ============================================================================== --- head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 06:13:38 2017 (r319047) +++ head/lib/libc/tests/nss/getaddrinfo_test.c Sun May 28 06:26:43 2017 (r319048) @@ -410,11 +410,19 @@ addrinfo_read_hostlist_func(struct addri } static void -run_tests(char *hostlist_file, char *snapshot_file, int ai_family) +run_tests(char *hostlist_file, const char *snapshot_file, int ai_family) { struct addrinfo_test_data td, td_snap; + char *snapshot_file_copy; int rv; + if (snapshot_file == NULL) + snapshot_file_copy = NULL; + else { + snapshot_file_copy = strdup(snapshot_file); + ATF_REQUIRE(snapshot_file_copy != NULL); + } + memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = ai_family; hints.ai_flags = AI_CANONNAME; @@ -477,24 +485,17 @@ fin: TEST_DATA_DESTROY(addrinfo, &td_snap); TEST_DATA_DESTROY(addrinfo, &td); - free(hostlist_file); - free(snapshot_file); + free(snapshot_file_copy); } #define HOSTLIST_FILE "mach" #define RUN_TESTS(tc, snapshot_file, ai_family) do { \ char *_hostlist_file; \ - char *_snapshot_file; \ ATF_REQUIRE(0 < asprintf(&_hostlist_file, "%s/%s", \ atf_tc_get_config_var(tc, "srcdir"), HOSTLIST_FILE)); \ - if (snapshot_file == NULL) \ - _snapshot_file = NULL; \ - else { \ - _snapshot_file = strdup(snapshot_file); \ - ATF_REQUIRE(_snapshot_file != NULL); \ - } \ - run_tests(_hostlist_file, _snapshot_file, ai_family); \ -} while(0) + run_tests(_hostlist_file, snapshot_file, ai_family); \ + free(_hostlist_file); \ +} while (0) ATF_TC_WITHOUT_HEAD(pf_unspec); ATF_TC_BODY(pf_unspec, tc) Modified: head/lib/libc/tests/nss/gethostby_test.c ============================================================================== --- head/lib/libc/tests/nss/gethostby_test.c Sun May 28 06:13:38 2017 (r319047) +++ head/lib/libc/tests/nss/gethostby_test.c Sun May 28 06:26:43 2017 (r319048) @@ -924,10 +924,19 @@ static int run_tests(const char *hostlist_file, const char *snapshot_file, int _af_type, enum test_methods method, bool use_ipv6_mapping) { + char *snapshot_file_copy; struct hostent_test_data td, td_addr, td_snap; res_state statp; int rv = -2; + if (snapshot_file == NULL) + snapshot_file_copy = NULL; + else { + snapshot_file_copy = strdup(snapshot_file); + ATF_REQUIRE(snapshot_file_copy != NULL); + } + snapshot_file = snapshot_file_copy; + switch (_af_type) { case AF_INET: ATF_REQUIRE_FEATURE("inet"); @@ -946,8 +955,8 @@ run_tests(const char *hostlist_file, con if (statp == NULL || ((statp->options & RES_INIT) == 0 && res_ninit(statp) == -1)) { printf("error: can't init res_state\n"); - - return (-1); + rv = -1; + goto fin2; } if (use_ipv6_mapping) @@ -1051,6 +1060,9 @@ fin: TEST_DATA_DESTROY(hostent, &td_addr); TEST_DATA_DESTROY(hostent, &td); +fin2: + free(snapshot_file_copy); + return (rv); } @@ -1059,30 +1071,24 @@ fin: #define _RUN_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping) \ do { \ char *_hostlist_file; \ - char *_snapshot_file; \ ATF_REQUIRE(0 < asprintf(&_hostlist_file, "%s/%s", \ atf_tc_get_config_var(tc, "srcdir"), HOSTLIST_FILE)); \ - if (snapshot_file == NULL) \ - _snapshot_file = NULL; \ - else { \ - _snapshot_file = strdup(snapshot_file); \ - ATF_REQUIRE(_snapshot_file != NULL); \ - } \ - ATF_REQUIRE(run_tests(_hostlist_file, _snapshot_file, af_type, \ + ATF_REQUIRE(run_tests(_hostlist_file, snapshot_file, af_type, \ method, use_ipv6_mapping) == 0); \ -} while(0) + free(_hostlist_file); \ +} while (0) #define RUN_HOST_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping) \ do { \ use_ipnode_functions = false; \ _RUN_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping); \ -} while(0) +} while (0) #define RUN_IPNODE_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping) \ do { \ use_ipnode_functions = true; \ _RUN_TESTS(tc, snapshot_file, af_type, method, use_ipv6_mapping); \ -} while(0) +} while (0) ATF_TC_WITHOUT_HEAD(gethostbyaddr_ipv4); ATF_TC_BODY(gethostbyaddr_ipv4, tc) From owner-svn-src-all@freebsd.org Sun May 28 06:29:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81921D8586F; Sun, 28 May 2017 06:29:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53C6D1DE9; Sun, 28 May 2017 06:29:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S6T1os038889; Sun, 28 May 2017 06:29:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S6T18b038888; Sun, 28 May 2017 06:29:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280629.v4S6T18b038888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 06:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319049 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 06:29:02 -0000 Author: ngie Date: Sun May 28 06:29:01 2017 New Revision: 319049 URL: https://svnweb.freebsd.org/changeset/base/319049 Log: Bump WARNS from 1 to 3 after recent commits to fix warnings in the directory. Tested with: clang 4.0, gcc 4.2.1, gcc 6.3.0 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/Makefile Modified: head/lib/libc/tests/nss/Makefile ============================================================================== --- head/lib/libc/tests/nss/Makefile Sun May 28 06:26:43 2017 (r319048) +++ head/lib/libc/tests/nss/Makefile Sun May 28 06:29:01 2017 (r319049) @@ -20,7 +20,7 @@ ATF_TESTS_C+= getusershell_test ${PACKAGE}FILES+= mach -WARNS?= 1 +WARNS?= 3 CFLAGS+= -I${SRCTOP}/tests From owner-svn-src-all@freebsd.org Sun May 28 06:31:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84F6CD85A0C; Sun, 28 May 2017 06:31:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C1E7206; Sun, 28 May 2017 06:31:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S6VqLh041350; Sun, 28 May 2017 06:31:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S6Vq9j041349; Sun, 28 May 2017 06:31:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280631.v4S6Vq9j041349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 06:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319050 - stable/11/lib/libkvm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 06:31:53 -0000 Author: ngie Date: Sun May 28 06:31:52 2017 New Revision: 319050 URL: https://svnweb.freebsd.org/changeset/base/319050 Log: MFC r315698: libkvm: bump WARNS to 6 after recent commits done to resolve warnings issues Tested with: make tinderbox; clang 4.0.0 (amd64), gcc 4.2.1/6.3.0 (amd64) Modified: stable/11/lib/libkvm/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libkvm/Makefile ============================================================================== --- stable/11/lib/libkvm/Makefile Sun May 28 06:29:01 2017 (r319049) +++ stable/11/lib/libkvm/Makefile Sun May 28 06:31:52 2017 (r319050) @@ -8,7 +8,7 @@ SHLIBDIR?= /lib SHLIB_MAJOR= 7 CFLAGS+=-DLIBC_SCCS -I${.CURDIR} -WARNS?= 3 +WARNS?= 6 SRCS= kvm.c kvm_cptime.c kvm_getloadavg.c \ kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c \ From owner-svn-src-all@freebsd.org Sun May 28 07:04:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33C98D852A0; Sun, 28 May 2017 07:04:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 041BB10DE; Sun, 28 May 2017 07:04:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S74p2e055023; Sun, 28 May 2017 07:04:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S74pS7055022; Sun, 28 May 2017 07:04:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280704.v4S74pS7055022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 07:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319051 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 07:04:52 -0000 Author: ngie Date: Sun May 28 07:04:50 2017 New Revision: 319051 URL: https://svnweb.freebsd.org/changeset/base/319051 Log: hostent_test_getnameinfo_eq(..): initialize found_a_host to false MFC after: 1 week Reported by: Coverity CID: 1368943 Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/gethostby_test.c Modified: head/lib/libc/tests/nss/gethostby_test.c ============================================================================== --- head/lib/libc/tests/nss/gethostby_test.c Sun May 28 06:31:52 2017 (r319050) +++ head/lib/libc/tests/nss/gethostby_test.c Sun May 28 07:04:50 2017 (r319051) @@ -884,7 +884,7 @@ hostent_test_getnameinfo_eq(struct hoste * An address might reverse resolve to hostname alias or the * official hostname, e.g. moon.vub.ac.be. */ - bool found_a_match; + bool found_a_match = false; if (strcmp(result->h_name, buffer) == 0) { found_a_match = true; From owner-svn-src-all@freebsd.org Sun May 28 07:37:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA9B7D85969; Sun, 28 May 2017 07:37:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DC672000; Sun, 28 May 2017 07:37:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S7be4R067586; Sun, 28 May 2017 07:37:40 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S7beb3067584; Sun, 28 May 2017 07:37:40 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201705280737.v4S7beb3067584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 28 May 2017 07:37:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319052 - in head/sys/modules: linux linux64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 07:37:41 -0000 Author: dchagin Date: Sun May 28 07:37:40 2017 New Revision: 319052 URL: https://svnweb.freebsd.org/changeset/base/319052 Log: Strip _binary_linux_locore_o_size from ${VDSO}.so as it is a low absolute symbol, and this breaks symbol lookup in ddb. Requested by: bde@ MFC after: 1 week Modified: head/sys/modules/linux/Makefile head/sys/modules/linux64/Makefile Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Sun May 28 07:04:50 2017 (r319051) +++ head/sys/modules/linux/Makefile Sun May 28 07:37:40 2017 (r319052) @@ -64,10 +64,12 @@ linux${SFX}_support.o: linux${SFX}_assym ${VDSO}.so: linux${SFX}_locore.o ${OBJCOPY} --input-target binary --output-target elf64-x86-64-freebsd \ --binary-architecture i386 linux${SFX}_locore.o ${.TARGET} + strip -N _binary_linux${SFX}_locore_o_size ${.TARGET} .else ${VDSO}.so: linux${SFX}_locore.o ${OBJCOPY} --input-target binary --output-target elf32-i386-freebsd \ --binary-architecture i386 linux${SFX}_locore.o ${.TARGET} + strip -N _binary_linux_locore_o_size ${.TARGET} .endif linux${SFX}_genassym.o: Modified: head/sys/modules/linux64/Makefile ============================================================================== --- head/sys/modules/linux64/Makefile Sun May 28 07:04:50 2017 (r319051) +++ head/sys/modules/linux64/Makefile Sun May 28 07:37:40 2017 (r319052) @@ -38,6 +38,7 @@ linux_locore.o: linux_locore.s linux_ass ${VDSO}.so: linux_locore.o ${OBJCOPY} --input-target binary --output-target elf64-x86-64-freebsd \ -S -g --binary-architecture i386:x86-64 linux_locore.o ${.TARGET} + strip -N _binary_linux_locore_o_size ${.TARGET} linux_support.o: assym.s linux_assym.h ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ From owner-svn-src-all@freebsd.org Sun May 28 07:40:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64BDFD85A03; Sun, 28 May 2017 07:40:11 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 404ED1C4; Sun, 28 May 2017 07:40:11 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S7eAYt067742; Sun, 28 May 2017 07:40:10 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S7e9B1067738; Sun, 28 May 2017 07:40:09 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201705280740.v4S7e9B1067738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 28 May 2017 07:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319053 - in head/sys: compat/linux conf modules/linux modules/linux64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 07:40:11 -0000 Author: dchagin Date: Sun May 28 07:40:09 2017 New Revision: 319053 URL: https://svnweb.freebsd.org/changeset/base/319053 Log: On success, getrandom() Linux system call returns the number of bytes that were copied to the buffer supplied by the user. Also fix getrandom() if Linuxulator modules are built without the kernel. PR: 219464 Submitted by: Maciej Pasternacki Reported by: Maciej Pasternacki MFC after: 1 week Modified: head/sys/compat/linux/linux_misc.c head/sys/conf/config.mk head/sys/modules/linux/Makefile head/sys/modules/linux64/Makefile Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun May 28 07:37:40 2017 (r319052) +++ head/sys/compat/linux/linux_misc.c Sun May 28 07:40:09 2017 (r319053) @@ -31,6 +31,9 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#if defined(KLD_MODULE) +#include "opt_global.h" +#endif #include #include @@ -2516,6 +2519,7 @@ linux_getrandom(struct thread *td, struc { struct uio uio; struct iovec iov; + int error; if (args->flags & ~(LINUX_GRND_NONBLOCK|LINUX_GRND_RANDOM)) return (EINVAL); @@ -2532,7 +2536,10 @@ linux_getrandom(struct thread *td, struc uio.uio_rw = UIO_READ; uio.uio_td = td; - return (read_random_uio(&uio, args->flags & LINUX_GRND_NONBLOCK)); + error = read_random_uio(&uio, args->flags & LINUX_GRND_NONBLOCK); + if (error == 0) + td->td_retval[0] = args->count - uio.uio_resid; + return (error); } int Modified: head/sys/conf/config.mk ============================================================================== --- head/sys/conf/config.mk Sun May 28 07:37:40 2017 (r319052) +++ head/sys/conf/config.mk Sun May 28 07:40:09 2017 (r319053) @@ -8,6 +8,8 @@ # the code here when they all produce identical results # (or should) .if !defined(KERNBUILDDIR) +opt_global.h: + echo "#define DEV_RANDOM 1" >> ${.TARGET} opt_bpf.h: echo "#define DEV_BPF 1" > ${.TARGET} .if ${MK_INET_SUPPORT} != "no" Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Sun May 28 07:37:40 2017 (r319052) +++ head/sys/modules/linux/Makefile Sun May 28 07:40:09 2017 (r319053) @@ -15,7 +15,7 @@ SRCS= linux_fork.c linux${SFX}_dummy.c l linux${SFX}_machdep.c linux_misc.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \ linux${SFX}_sysvec.c linux_uid16.c linux_time.c \ - linux_timer.c linux_vdso.c \ + linux_timer.c linux_vdso.c opt_global.h \ opt_inet6.h opt_compat.h opt_posix.h opt_usb.h vnode_if.h \ device_if.h bus_if.h assym.s \ linux${SFX}_support.s Modified: head/sys/modules/linux64/Makefile ============================================================================== --- head/sys/modules/linux64/Makefile Sun May 28 07:37:40 2017 (r319052) +++ head/sys/modules/linux64/Makefile Sun May 28 07:40:09 2017 (r319053) @@ -10,7 +10,7 @@ SRCS= linux_fork.c linux_dummy.c linux_f linux_machdep.c linux_misc.c linux_ptrace.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux_sysent.c \ linux_sysvec.c linux_time.c linux_vdso.c linux_timer.c \ - opt_inet6.h opt_compat.h opt_posix.h opt_usb.h \ + opt_inet6.h opt_compat.h opt_global.h opt_posix.h opt_usb.h \ vnode_if.h device_if.h bus_if.h assym.s \ linux_support.s DPSRCS= linux_genassym.c From owner-svn-src-all@freebsd.org Sun May 28 07:40:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D91FBD85B3F; Sun, 28 May 2017 07:40:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB5D63C2; Sun, 28 May 2017 07:40:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S7egGl067818; Sun, 28 May 2017 07:40:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S7egsx067817; Sun, 28 May 2017 07:40:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280740.v4S7egsx067817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 07:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319054 - head/lib/libc/tests/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 07:40:44 -0000 Author: ngie Date: Sun May 28 07:40:42 2017 New Revision: 319054 URL: https://svnweb.freebsd.org/changeset/base/319054 Log: hostent_test_getaddrinfo_eq(..): call freeaddrinfo on `ai` when done This plugs a leak of memory allocated via getaddrinfo. MFC after: 1 week Reported by: Coverity CID: 1346866 Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/nss/gethostby_test.c Modified: head/lib/libc/tests/nss/gethostby_test.c ============================================================================== --- head/lib/libc/tests/nss/gethostby_test.c Sun May 28 07:40:09 2017 (r319053) +++ head/lib/libc/tests/nss/gethostby_test.c Sun May 28 07:40:42 2017 (r319054) @@ -776,24 +776,26 @@ hostent_test_getaddrinfo_eq(struct hoste rv = getaddrinfo(he->h_name, NULL, &hints, &ai); if (rv == 0) { printf("not ok - shouldn't have been resolved\n"); - return (-1); - } + rv = -1; + } else + rv = 0; } else { rv = getaddrinfo(he->h_name, NULL, &hints, &ai); if (rv != 0) { printf("not ok - should have been resolved\n"); - return (-1); + rv = -1; + goto done; } - rv = is_hostent_equal(he, ai); if (rv != 0) { printf("not ok - addrinfo and hostent are not equal\n"); - return (-1); + rv = -1; } - } - - return (0); +done: + if (ai != NULL) + freeaddrinfo(ai); + return (rv); } static int From owner-svn-src-all@freebsd.org Sun May 28 07:44:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF433D85EC6; Sun, 28 May 2017 07:44:56 +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 7F988AD0; Sun, 28 May 2017 07:44:56 +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 v4S7itLG071689; Sun, 28 May 2017 07:44:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S7it5j071688; Sun, 28 May 2017 07:44:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705280744.v4S7it5j071688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 28 May 2017 07:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319055 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 07:44:56 -0000 Author: adrian Date: Sun May 28 07:44:55 2017 New Revision: 319055 URL: https://svnweb.freebsd.org/changeset/base/319055 Log: [ar71xx] undo read-after-write to flush; some bus devices dislike this. This broke the PCI fixup on at least the AR7240 + AR9280 reference design board that I have. Tested: * Atheros AP93 reference design - AR7240 + AR9280 Modified: head/sys/mips/atheros/ar71xxreg.h Modified: head/sys/mips/atheros/ar71xxreg.h ============================================================================== --- head/sys/mips/atheros/ar71xxreg.h Sun May 28 07:40:42 2017 (r319054) +++ head/sys/mips/atheros/ar71xxreg.h Sun May 28 07:44:55 2017 (r319055) @@ -528,13 +528,14 @@ typedef enum { #define AR71XX_SPI_RDS 0x0C #define ATH_READ_REG(reg) \ - *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) - + *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) +/* + * Note: Don't put a flush read here; some users (eg the AR724x PCI fixup code) + * requires write-only space to certain registers. Doing the read afterwards + * causes things to break. + */ #define ATH_WRITE_REG(reg, val) \ - do { \ - *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) = (val); \ - (void) ATH_READ_REG(reg); \ - } while (0) + *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) = (val) static inline void ar71xx_ddr_flush(uint32_t reg) From owner-svn-src-all@freebsd.org Sun May 28 07:46:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44992D85F65; Sun, 28 May 2017 07:46:00 +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 0FB51C44; Sun, 28 May 2017 07:45:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 9E07910555A; Sun, 28 May 2017 17:45:52 +1000 (AEST) Date: Sun, 28 May 2017 17:45:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dmitry Chagin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r319052 - in head/sys/modules: linux linux64 In-Reply-To: <201705280737.v4S7beb3067584@repo.freebsd.org> Message-ID: <20170528174051.C1396@besplex.bde.org> References: <201705280737.v4S7beb3067584@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=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=pBE7GHsQ8FWS9r3ezFEA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 07:46:00 -0000 On Sun, 28 May 2017, Dmitry Chagin wrote: > Log: > Strip _binary_linux_locore_o_size from ${VDSO}.so as it is a low absolute > symbol, and this breaks symbol lookup in ddb. > > Requested by: bde@ Thanks. This works because the symbol is auto-generated by the linker from the name of a file and not used at the source level or useful at the object level. Bruce From owner-svn-src-all@freebsd.org Sun May 28 08:46:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F9D8D7B2FB; Sun, 28 May 2017 08:46:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 431C1BC2; Sun, 28 May 2017 08:46:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S8kfdN096301; Sun, 28 May 2017 08:46:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S8kfhk096300; Sun, 28 May 2017 08:46:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280846.v4S8kfhk096300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 08:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319056 - head/tests/sys/file X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 08:46:42 -0000 Author: ngie Date: Sun May 28 08:46:41 2017 New Revision: 319056 URL: https://svnweb.freebsd.org/changeset/base/319056 Log: tests/sys/file/ftruncate_test: use an exit code of 1 instead of -1 with err*(3). An exit code of -1 is implementation defined -- it's best to stick with something well-defined (1). MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/file/ftruncate_test.c Modified: head/tests/sys/file/ftruncate_test.c ============================================================================== --- head/tests/sys/file/ftruncate_test.c Sun May 28 07:44:55 2017 (r319055) +++ head/tests/sys/file/ftruncate_test.c Sun May 28 08:46:41 2017 (r319056) @@ -78,34 +78,34 @@ main(void) snprintf(path, PATH_MAX, "/tmp/ftruncate.XXXXXXXXXXXXX"); fd = mkstemp(path); if (fd < 0) - err(-1, "mkstemp"); + err(1, "mkstemp"); read_only_fd = open(path, O_RDONLY); if (read_only_fd < 0) { error = errno; (void)unlink(path); errno = error; - err(-1, "open(%s, O_RDONLY)", path); + err(1, "open(%s, O_RDONLY)", path); } (void)unlink(path); if (ftruncate(fd, -1) == 0) - errx(-1, "ftruncate(fd, -1) succeeded"); + errx(1, "ftruncate(fd, -1) succeeded unexpectedly"); if (errno != EINVAL) - err(-1, "ftruncate(fd, -1) returned wrong error"); + err(1, "ftruncate(fd, -1) returned wrong error"); for (i = 0; i < lengths_count; i++) { len = lengths[i]; if (ftruncate(fd, len) < 0) - err(-1, "ftruncate(%jd) up", (intmax_t)len); + err(1, "ftruncate(%jd) up", (intmax_t)len); if (fstat(fd, &sb) < 0) - err(-1, "stat"); + err(1, "stat"); if (sb.st_size != len) errx(-1, "fstat with len=%jd returned len %jd up", (intmax_t)len, (intmax_t)sb.st_size); if (len != 0) { size = pread(fd, &ch, sizeof(ch), len - 1); if (size < 0) - err(-1, "pread on len %jd up", (intmax_t)len); + err(1, "pread on len %jd up", (intmax_t)len); if (size != sizeof(ch)) errx(-1, "pread len %jd size %jd up", (intmax_t)len, (intmax_t)size); @@ -119,9 +119,9 @@ main(void) for (i = lengths_count - 1; i >= 0; i--) { len = lengths[i]; if (ftruncate(fd, len) < 0) - err(-1, "ftruncate(%jd) down", (intmax_t)len); + err(1, "ftruncate(%jd) down", (intmax_t)len); if (fstat(fd, &sb) < 0) - err(-1, "stat"); + err(1, "stat"); if (sb.st_size != len) errx(-1, "fstat(%jd) returned %jd down", (intmax_t)len, sb.st_size); @@ -134,7 +134,7 @@ main(void) if (ftruncate(read_only_fd, 0) == 0) errx(-1, "ftruncate(read_only_fd) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(read_only_fd) returned wrong error"); + err(1, "ftruncate(read_only_fd) returned wrong error"); close(read_only_fd); /* @@ -142,22 +142,22 @@ main(void) */ fd = socket(PF_UNIX, SOCK_STREAM, 0); if (fd < 0) - err(-1, "socket(PF_UNIX, SOCK_STREAM, 0)"); + err(1, "socket(PF_UNIX, SOCK_STREAM, 0)"); if (ftruncate(fd, 0) == 0) errx(-1, "ftruncate(socket) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(socket) returned wrong error"); + err(1, "ftruncate(socket) returned wrong error"); close(fd); /* * Make sure that ftruncate on pipes doesn't work. */ if (pipe(fds) < 0) - err(-1, "pipe"); + err(1, "pipe"); if (ftruncate(fds[0], 0) == 0) errx(-1, "ftruncate(pipe) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(pipe) returned wrong error"); + err(1, "ftruncate(pipe) returned wrong error"); close(fds[0]); close(fds[1]); @@ -166,11 +166,11 @@ main(void) */ fd = kqueue(); if (fd < 0) - err(-1, "kqueue"); + err(1, "kqueue"); if (ftruncate(fds[0], 0) == 0) errx(-1, "ftruncate(kqueue) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(kqueue) returned wrong error"); + err(1, "ftruncate(kqueue) returned wrong error"); close(fd); return (0); From owner-svn-src-all@freebsd.org Sun May 28 08:46:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A687D7B354; Sun, 28 May 2017 08:46:59 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB3B4CE6; Sun, 28 May 2017 08:46:58 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S8kv0s096360; Sun, 28 May 2017 08:46:57 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S8kvYF096359; Sun, 28 May 2017 08:46:57 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201705280846.v4S8kvYF096359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 28 May 2017 08:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319057 - head/sys/amd64/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 08:46:59 -0000 Author: dchagin Date: Sun May 28 08:46:57 2017 New Revision: 319057 URL: https://svnweb.freebsd.org/changeset/base/319057 Log: In r246085 some bits that are MI movied out into headers in compat/linux, but I missed that when I commited x86_64 Linuxulator. So remove the duplicates. MFC after: 1 week Modified: head/sys/amd64/linux/linux.h Modified: head/sys/amd64/linux/linux.h ============================================================================== --- head/sys/amd64/linux/linux.h Sun May 28 08:46:41 2017 (r319056) +++ head/sys/amd64/linux/linux.h Sun May 28 08:46:57 2017 (r319057) @@ -101,9 +101,6 @@ typedef struct { /* * Miscellaneous */ -#define LINUX_NAME_MAX 255 -#define LINUX_CTL_MAXNAME 10 - #define LINUX_AT_COUNT 19 /* Count of used aux entry types. */ struct l___sysctl_args @@ -117,11 +114,6 @@ struct l___sysctl_args l_ulong __spare[4]; }; -/* Scheduling policies */ -#define LINUX_SCHED_OTHER 0 -#define LINUX_SCHED_FIFO 1 -#define LINUX_SCHED_RR 2 - /* Resource limits */ #define LINUX_RLIMIT_CPU 0 #define LINUX_RLIMIT_FSIZE 1 @@ -456,20 +448,6 @@ struct l_pollfd { l_short revents; }; - -#define LINUX_CLONE_VM 0x00000100 -#define LINUX_CLONE_FS 0x00000200 -#define LINUX_CLONE_FILES 0x00000400 -#define LINUX_CLONE_SIGHAND 0x00000800 -#define LINUX_CLONE_PID 0x00001000 /* No longer exist in Linux */ -#define LINUX_CLONE_VFORK 0x00004000 -#define LINUX_CLONE_PARENT 0x00008000 -#define LINUX_CLONE_THREAD 0x00010000 -#define LINUX_CLONE_SETTLS 0x00080000 -#define LINUX_CLONE_PARENT_SETTID 0x00100000 -#define LINUX_CLONE_CHILD_CLEARTID 0x00200000 -#define LINUX_CLONE_CHILD_SETTID 0x01000000 - #define LINUX_ARCH_SET_GS 0x1001 #define LINUX_ARCH_SET_FS 0x1002 #define LINUX_ARCH_GET_FS 0x1003 From owner-svn-src-all@freebsd.org Sun May 28 08:52:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54AC6D7B752; Sun, 28 May 2017 08:52:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21536127C; Sun, 28 May 2017 08:52:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S8qD0g000393; Sun, 28 May 2017 08:52:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S8qDrI000392; Sun, 28 May 2017 08:52:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280852.v4S8qDrI000392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 08:52:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319058 - head/tests/sys/file X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 08:52:14 -0000 Author: ngie Date: Sun May 28 08:52:12 2017 New Revision: 319058 URL: https://svnweb.freebsd.org/changeset/base/319058 Log: Create a deterministic file in the kyua sandbox, instead of a temporary file outside the kyua sandbox This helps ensure that the file is removed at test exit, and as a side effect, cures a warning about umasks with Coverity. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/file/ftruncate_test.c Modified: head/tests/sys/file/ftruncate_test.c ============================================================================== --- head/tests/sys/file/ftruncate_test.c Sun May 28 08:46:57 2017 (r319057) +++ head/tests/sys/file/ftruncate_test.c Sun May 28 08:52:12 2017 (r319058) @@ -60,14 +60,14 @@ int main(void) { int error, fd, fds[2], i, read_only_fd; - char path[PATH_MAX]; + char path[] = "ftruncate_file"; struct stat sb; ssize_t size; off_t len; char ch; /* - * Tests using a writable temporary file: grow and then shrink a file + * Tests using a writable file: grow and then shrink a file * using ftruncate and various lengths. Make sure that a negative * file length is rejected. Make sure that when we grow the file, * bytes now in the range of the file size return 0. @@ -75,10 +75,9 @@ main(void) * Save a read-only reference to the file to use later for read-only * descriptor tests. */ - snprintf(path, PATH_MAX, "/tmp/ftruncate.XXXXXXXXXXXXX"); - fd = mkstemp(path); + fd = open(path, O_RDWR|O_CREAT); if (fd < 0) - err(1, "mkstemp"); + err(1, "open(%s, O_RDWR|O_CREAT", path); read_only_fd = open(path, O_RDONLY); if (read_only_fd < 0) { error = errno; From owner-svn-src-all@freebsd.org Sun May 28 08:55:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE940D7B85D; Sun, 28 May 2017 08:55:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74203148D; Sun, 28 May 2017 08:55:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S8tWmi000562; Sun, 28 May 2017 08:55:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S8tWTt000561; Sun, 28 May 2017 08:55:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280855.v4S8tWTt000561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 08:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319059 - head/tests/sys/file X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 08:55:33 -0000 Author: ngie Date: Sun May 28 08:55:32 2017 New Revision: 319059 URL: https://svnweb.freebsd.org/changeset/base/319059 Log: Use an exit code of 1 instead of -1 for reasons noted in r319056 MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/file/newfileops_on_fork_test.c Modified: head/tests/sys/file/newfileops_on_fork_test.c ============================================================================== --- head/tests/sys/file/newfileops_on_fork_test.c Sun May 28 08:52:12 2017 (r319058) +++ head/tests/sys/file/newfileops_on_fork_test.c Sun May 28 08:55:32 2017 (r319059) @@ -61,7 +61,7 @@ do_accept(__unused void *arg) accept_fd = accept(listen_fd, NULL, NULL); if (accept_fd < 0) - err(-1, "accept"); + err(1, "accept"); return (NULL); } @@ -73,7 +73,7 @@ do_fork(void) pid = fork(); if (pid < 0) - err(-1, "fork"); + err(1, "fork"); if (pid > 0) { waitpid(pid, NULL, 0); exit(0); @@ -84,15 +84,15 @@ do_fork(void) * listen_fd+1, and get back EBADF if it's not a valid descriptor, * and EINVAL if it is. This (currently) works fine in practice. */ - if (ftruncate(listen_fd + 1, 0 < 0)) { + if (ftruncate(listen_fd + 1, 0) < 0) { if (errno == EBADF) exit(0); else if (errno == EINVAL) - errx(-1, "file descriptor still open in child"); + errx(1, "file descriptor still open in child"); else - err(-1, "unexpected error"); + err(1, "unexpected error"); } else - errx(-1, "ftruncate succeeded"); + errx(1, "ftruncate succeeded"); } int @@ -103,18 +103,18 @@ main(__unused int argc, __unused char *a listen_fd = socket(PF_INET, SOCK_STREAM, 0); if (listen_fd < 0) - err(-1, "socket"); + err(1, "socket"); bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); sin.sin_port = htons(PORT); if (bind(listen_fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) - err(-1, "bind"); + err(1, "bind"); if (listen(listen_fd, -1) <0) - err(-1, "listen"); + err(1, "listen"); if (pthread_create(&accept_thread, NULL, do_accept, NULL) != 0) - err(-1, "pthread_create"); + err(1, "pthread_create"); sleep(1); /* Easier than using a CV. */ do_fork(); exit(0); From owner-svn-src-all@freebsd.org Sun May 28 08:57:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 649E1D7B929; Sun, 28 May 2017 08:57:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36CF61650; Sun, 28 May 2017 08:57:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S8v87m000673; Sun, 28 May 2017 08:57:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S8v8Dr000672; Sun, 28 May 2017 08:57:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280857.v4S8v8Dr000672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 08:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319060 - head/tests/sys/file X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 08:57:09 -0000 Author: ngie Date: Sun May 28 08:57:08 2017 New Revision: 319060 URL: https://svnweb.freebsd.org/changeset/base/319060 Log: Use main(void) instead of main(argc __unused, argv __unused) MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/file/newfileops_on_fork_test.c Modified: head/tests/sys/file/newfileops_on_fork_test.c ============================================================================== --- head/tests/sys/file/newfileops_on_fork_test.c Sun May 28 08:55:32 2017 (r319059) +++ head/tests/sys/file/newfileops_on_fork_test.c Sun May 28 08:57:08 2017 (r319060) @@ -96,7 +96,7 @@ do_fork(void) } int -main(__unused int argc, __unused char *argv[]) +main(void) { struct sockaddr_in sin; pthread_t accept_thread; From owner-svn-src-all@freebsd.org Sun May 28 08:59:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9352FD7BA82; Sun, 28 May 2017 08:59:36 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::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 6AA781895; Sun, 28 May 2017 08:59:36 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id h64so3357208pge.3; Sun, 28 May 2017 01:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=EJfBTcRFD37O2Bmhp6gqmQDYMQXfTPpa5+fGbIyqqE0=; b=LK6zJNvF5u7y4s/nLITZH9jz5/KyiiLgfzmz/CPuhY8U7gAE83DixsP2qXDjSwK7e4 dmDopn+sseTAfBj1G/6NpXs5qlQZq6rKu+xOm7UiOxMfOZbMr1s1yJWrwgDKsw3a/CQc p/HKHovMO89J+Y8bqxXwO9aP+hvJjEYFmfhp+S7XxetzzPBfpcolhncxhtbchTQhObJd QH6kSFDtC361TeW9d8eOau/LuXvIiXRlLZvw9d36Q/i2JTjnFN17VPieWGUmuI6Q2PcB 0LrEqohtOCL7xkGkMuw9m5Oy2UQUe6VW4Y7uS6oh4VJSC/FsOnY6xsBLHraudU6aCy2N 6g9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=EJfBTcRFD37O2Bmhp6gqmQDYMQXfTPpa5+fGbIyqqE0=; b=VwrH8MkMw+somw/wriIESdTPclDGYDSX2A51vDOKbt+QGQZK7DQJyhG3lPhNfuaxh0 wS6iv/wB31QnxusX0C96tyyrYj/eo1Ol0kOcugyGqj/+9Bl6iDiX/JIC2dD+z34rMiCF IB5JaNvTzMww27MRuf5/C7CWK/d9wsDSKWmnhd7bjkgEvImWpymDWxbuf9L1nVN+zf6t goYoEAomcRovMFEaAMCRDM7PdJzD8XsyRVwktg8na23QqiBBbmPWaP85v/oqy2N2TxJk PRj974iEObf57x8CpMtWrAydIJ0KU4ZNy+j0Je0XDWgFJQtut7lqNOhtX2FBUvD/zDdh SJnw== X-Gm-Message-State: AODbwcDZ3NiioSC13jO9JJqxPy/DFK2IRzRLIusC5Y2ZhkItyJFjBdTd N4XYib+yCBAkRygMTcs= X-Received: by 10.98.157.207 with SMTP id a76mr11701382pfk.17.1495961975736; Sun, 28 May 2017 01:59:35 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id r69sm11672668pfj.42.2017.05.28.01.59.34 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 May 2017 01:59:35 -0700 (PDT) Subject: Re: svn commit: r319059 - head/tests/sys/file Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_5C6AB243-3F65-4001-B15E-7361616440B5"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201705280855.v4S8tWTt000561@repo.freebsd.org> Date: Sun, 28 May 2017 01:59:33 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201705280855.v4S8tWTt000561@repo.freebsd.org> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 08:59:36 -0000 --Apple-Mail=_5C6AB243-3F65-4001-B15E-7361616440B5 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On May 28, 2017, at 01:55, Ngie Cooper wrote: > > Author: ngie > Date: Sun May 28 08:55:32 2017 > New Revision: 319059 > URL: https://svnweb.freebsd.org/changeset/base/319059 > > Log: > Use an exit code of 1 instead of -1 for reasons noted in r319056 > > MFC after: 3 days > Sponsored by: Dell EMC Isilon Also: fix an invalid test with ftruncate. Reported by: Coverity CID: 1296041 --Apple-Mail=_5C6AB243-3F65-4001-B15E-7361616440B5 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZKpF2AAoJEPWDqSZpMIYVIx4P/iaOMDuDV3RmhGTQSkk3PuF1 yX0if4yJu56XFC2I3qIszLLwwvwarqeYPN6KvWsDrqZh5iWwNolqgp3n8WH1+Il3 vYa41f+vousqy7+6wQsueuDpOItqmf2IRdTs7jO7QEK3BTkmzrohJLKNBuH6D1i/ hfnL/WAYhBYm9DZ/d5kfmHfnQqWqPMLcsUcaMQ12vFQcYGEnWOwVemqxoZARGNHc 7LsNcXcq8A4agQHuvrHRnLzRLjTe81im+oaMQOuvmZ+z2dgj5t8GcUVfiX9QwMgm wbng7ULutALLVinHGkIiw/g6jUTfq+os78l1oXXbWmK841/7YhJeXnbEYdpI3pad IWNYX8SkzuxKVuYlS03M4kzmqoE5N8Ssb3kqD8F0o0xf4irhWny76NT0ooBMBILm jcOp2YK/OH7+2VuV3QUzz/sNekyCKiQZKKVqoRFtHC7ODj1AG1UF8tO+CDltHHwk tpX/QHvXA6p5WVq2W92bDjYM7hiy48CcoEHSuDBlQNuItPtzCRYve8qc9lIg5cSV d98YeaWk3d+rm/J2vyGAExje9tLQkvLLGHZDJ1OHEdb9/2MTqJWlj8NnV3WuyO5F ZmIRjTQlAqlTKiOcOt1VHl/x0U6HU7vz3+6Vq7cHKJsZnQ2DmFl8B1hro56eTmSC ebvZQMhQKE+wmtVveO5q =Dqnk -----END PGP SIGNATURE----- --Apple-Mail=_5C6AB243-3F65-4001-B15E-7361616440B5-- From owner-svn-src-all@freebsd.org Sun May 28 09:01:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68180D7BF0B; Sun, 28 May 2017 09:01:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A5541D3F; Sun, 28 May 2017 09:01:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S91weL004699; Sun, 28 May 2017 09:01:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S91wVp004698; Sun, 28 May 2017 09:01:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280901.v4S91wVp004698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 09:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319061 - head/tests/sys/file X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 09:01:59 -0000 Author: ngie Date: Sun May 28 09:01:58 2017 New Revision: 319061 URL: https://svnweb.freebsd.org/changeset/base/319061 Log: Don't leak accept_fd on thread completion MFC after: 3 days Reported by: Coverity CID: 1296068 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/file/newfileops_on_fork_test.c Modified: head/tests/sys/file/newfileops_on_fork_test.c ============================================================================== --- head/tests/sys/file/newfileops_on_fork_test.c Sun May 28 08:57:08 2017 (r319060) +++ head/tests/sys/file/newfileops_on_fork_test.c Sun May 28 09:01:58 2017 (r319061) @@ -63,6 +63,7 @@ do_accept(__unused void *arg) if (accept_fd < 0) err(1, "accept"); + close(accept_fd); return (NULL); } From owner-svn-src-all@freebsd.org Sun May 28 09:08:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDD08D8502F; Sun, 28 May 2017 09:08:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDF211F22; Sun, 28 May 2017 09:08:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S98UpM005032; Sun, 28 May 2017 09:08:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S98UFq005031; Sun, 28 May 2017 09:08:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280908.v4S98UFq005031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 09:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319062 - head/tests/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 09:08:32 -0000 Author: ngie Date: Sun May 28 09:08:30 2017 New Revision: 319062 URL: https://svnweb.freebsd.org/changeset/base/319062 Log: Initial `srv` before using it in bind(2) MFC after: 3 days Reported by: Coverity CID: 1357526 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/netinet/tcp_user_cookie.c Modified: head/tests/sys/netinet/tcp_user_cookie.c ============================================================================== --- head/tests/sys/netinet/tcp_user_cookie.c Sun May 28 09:01:58 2017 (r319061) +++ head/tests/sys/netinet/tcp_user_cookie.c Sun May 28 09:08:30 2017 (r319062) @@ -72,6 +72,7 @@ main(int argc, char **argv) if (sock < 0) err(EXIT_FAILURE, "socket"); + memset(&srv, 0, sizeof(srv)); srv.sin_len = sizeof(srv); srv.sin_family = AF_INET; srv.sin_port = htons(port); From owner-svn-src-all@freebsd.org Sun May 28 09:21:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB675D85447; Sun, 28 May 2017 09:21:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A25EB15DA; Sun, 28 May 2017 09:21:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4S9LSwN011744; Sun, 28 May 2017 09:21:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S9LSF8011743; Sun, 28 May 2017 09:21:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705280921.v4S9LSF8011743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 09:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319063 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 09:21:30 -0000 Author: ngie Date: Sun May 28 09:21:28 2017 New Revision: 319063 URL: https://svnweb.freebsd.org/changeset/base/319063 Log: Send all of `data`, not just a portion of it It was sending only a long's worth (4 or 8 bytes) of data previously (instead of the entire buffer) via send(2). MFC after: 1 week Reported by: Coverity CID: 1229966, 1229967, 1230004, 1230005 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/kern/unix_seqpacket_test.c Modified: head/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- head/tests/sys/kern/unix_seqpacket_test.c Sun May 28 09:08:30 2017 (r319062) +++ head/tests/sys/kern/unix_seqpacket_test.c Sun May 28 09:21:28 2017 (r319063) @@ -762,7 +762,7 @@ ATF_TC_BODY(shutdown_send, tc) /* ATF's isolation mechanisms will guarantee uniqueness of this file */ const char *path = "sock"; const char *data = "data"; - ssize_t ssize; + ssize_t datalen, ssize; int s, err, s2; s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); @@ -786,8 +786,9 @@ ATF_TC_BODY(shutdown_send, tc) } ATF_CHECK_EQ(0, shutdown(s2, SHUT_RDWR)); + datalen = strlen(data) + 1; /* +1 for the null */ /* USE MSG_NOSIGNAL so we don't get SIGPIPE */ - ssize = send(s2, data, sizeof(data), MSG_EOR | MSG_NOSIGNAL); + ssize = send(s2, data, datalen, MSG_EOR | MSG_NOSIGNAL); ATF_CHECK_EQ(EPIPE, errno); ATF_CHECK_EQ(-1, ssize); close(s); @@ -802,6 +803,7 @@ ATF_TC_BODY(shutdown_send_sigpipe, tc) /* ATF's isolation mechanisms will guarantee uniqueness of this file */ const char *path = "sock"; const char *data = "data"; + ssize_t datalen; int s, err, s2; s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); @@ -826,7 +828,8 @@ ATF_TC_BODY(shutdown_send_sigpipe, tc) ATF_CHECK_EQ(0, shutdown(s2, SHUT_RDWR)); ATF_REQUIRE(SIG_ERR != signal(SIGPIPE, shutdown_send_sigpipe_handler)); - (void)send(s2, data, sizeof(data), MSG_EOR); + datalen = strlen(data) + 1; /* +1 for the null */ + (void)send(s2, data, sizeof(*data), MSG_EOR); ATF_CHECK_EQ(1, got_sigpipe); close(s); close(s2); From owner-svn-src-all@freebsd.org Sun May 28 09:29:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30330D85594; Sun, 28 May 2017 09:29:55 +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 00A2219BD; Sun, 28 May 2017 09:29:54 +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 v4S9Ts3S013464; Sun, 28 May 2017 09:29:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4S9TrO9013463; Sun, 28 May 2017 09:29:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705280929.v4S9TrO9013463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 28 May 2017 09:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319064 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 09:29:55 -0000 Author: kib Date: Sun May 28 09:29:53 2017 New Revision: 319064 URL: https://svnweb.freebsd.org/changeset/base/319064 Log: Update getdirentries(2) page for new struct dirent layout. Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/sys/getdirentries.2 Modified: head/lib/libc/sys/getdirentries.2 ============================================================================== --- head/lib/libc/sys/getdirentries.2 Sun May 28 09:21:28 2017 (r319063) +++ head/lib/libc/sys/getdirentries.2 Sun May 28 09:29:53 2017 (r319064) @@ -28,7 +28,7 @@ .\" @(#)getdirentries.2 8.2 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd May 3, 1995 +.Dd May 28, 2017 .Dt GETDIRENTRIES 2 .Os .Sh NAME @@ -71,10 +71,11 @@ The data in the buffer is a series of .Vt dirent structures each containing the following entries: .Bd -literal -offset indent -uint32_t d_fileno; -uint16_t d_reclen; -uint8_t d_type; -uint8_t d_namlen; +ino_t d_fileno; +off_t d_off; +uint16_t d_reclen; +uint8_t d_type; +uint16_t d_namlen; char d_name[MAXNAMLEN + 1]; /* see below */ .Ed .Pp From owner-svn-src-all@freebsd.org Sun May 28 10:43:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CE5ED85C93; Sun, 28 May 2017 10:43:18 +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 CC69B1E86; Sun, 28 May 2017 10:43:17 +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 v4SAhGXK045378; Sun, 28 May 2017 10:43:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SAhGl7045376; Sun, 28 May 2017 10:43:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705281043.v4SAhGl7045376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 28 May 2017 10:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319065 - in stable/11/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 10:43:18 -0000 Author: hselasky Date: Sun May 28 10:43:16 2017 New Revision: 319065 URL: https://svnweb.freebsd.org/changeset/base/319065 Log: MFC r318860: Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel. Modified: stable/11/sys/dev/sound/pcm/buffer.c stable/11/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/pcm/buffer.c ============================================================================== --- stable/11/sys/dev/sound/pcm/buffer.c Sun May 28 09:29:53 2017 (r319064) +++ stable/11/sys/dev/sound/pcm/buffer.c Sun May 28 10:43:16 2017 (r319065) @@ -35,6 +35,7 @@ #include "feeder_if.h" #define SND_USE_FXDIV +#define SND_DECLARE_FXDIV #include "snd_fxdiv_gen.h" SND_DECLARE_FILE("$FreeBSD$"); Modified: stable/11/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/11/sys/tools/sound/snd_fxdiv_gen.awk Sun May 28 09:29:53 2017 (r319064) +++ stable/11/sys/tools/sound/snd_fxdiv_gen.awk Sun May 28 10:43:16 2017 (r319065) @@ -108,7 +108,10 @@ BEGIN { printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); - printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); + printf("extern const uint32_t snd_fxdiv_table[%d][2];\n\n", SND_MAX_ALIGN + 1); + + printf("#ifdef SND_DECLARE_FXDIV\n"); + printf("const uint32_t snd_fxdiv_table[%d][2] = {\n", SND_MAX_ALIGN + 1); for (i = 1; i <= SND_MAX_ALIGN; i++) { if (aligns[i] != 1) @@ -120,7 +123,7 @@ BEGIN { i, r["mul"], r["shift"]); } - printf("};\n\n"); + printf("};\n#endif\n\n"); printf("#define SND_FXDIV_MAX\t\t0x%08x\n", FXONE); printf("#define SND_FXDIV(x, y)\t\t(((uint32_t)(x) *\t\t\t\\\n"); From owner-svn-src-all@freebsd.org Sun May 28 10:44:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6436D85D78; Sun, 28 May 2017 10:44:44 +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 A5B7B1FFB; Sun, 28 May 2017 10:44:44 +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 v4SAihVs045499; Sun, 28 May 2017 10:44:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SAihSw045497; Sun, 28 May 2017 10:44:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705281044.v4SAihSw045497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 28 May 2017 10:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319066 - in stable/10/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 10:44:44 -0000 Author: hselasky Date: Sun May 28 10:44:43 2017 New Revision: 319066 URL: https://svnweb.freebsd.org/changeset/base/319066 Log: MFC r318860: Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel. Modified: stable/10/sys/dev/sound/pcm/buffer.c stable/10/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/buffer.c ============================================================================== --- stable/10/sys/dev/sound/pcm/buffer.c Sun May 28 10:43:16 2017 (r319065) +++ stable/10/sys/dev/sound/pcm/buffer.c Sun May 28 10:44:43 2017 (r319066) @@ -35,6 +35,7 @@ #include "feeder_if.h" #define SND_USE_FXDIV +#define SND_DECLARE_FXDIV #include "snd_fxdiv_gen.h" SND_DECLARE_FILE("$FreeBSD$"); Modified: stable/10/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/10/sys/tools/sound/snd_fxdiv_gen.awk Sun May 28 10:43:16 2017 (r319065) +++ stable/10/sys/tools/sound/snd_fxdiv_gen.awk Sun May 28 10:44:43 2017 (r319066) @@ -108,7 +108,10 @@ BEGIN { printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); - printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); + printf("extern const uint32_t snd_fxdiv_table[%d][2];\n\n", SND_MAX_ALIGN + 1); + + printf("#ifdef SND_DECLARE_FXDIV\n"); + printf("const uint32_t snd_fxdiv_table[%d][2] = {\n", SND_MAX_ALIGN + 1); for (i = 1; i <= SND_MAX_ALIGN; i++) { if (aligns[i] != 1) @@ -120,7 +123,7 @@ BEGIN { i, r["mul"], r["shift"]); } - printf("};\n\n"); + printf("};\n#endif\n\n"); printf("#define SND_FXDIV_MAX\t\t0x%08x\n", FXONE); printf("#define SND_FXDIV(x, y)\t\t(((uint32_t)(x) *\t\t\t\\\n"); From owner-svn-src-all@freebsd.org Sun May 28 10:45:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 348ABD85DE9; Sun, 28 May 2017 10:45:30 +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 03FD0199; Sun, 28 May 2017 10:45:29 +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 v4SAjTnI045591; Sun, 28 May 2017 10:45:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SAjSfR045589; Sun, 28 May 2017 10:45:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705281045.v4SAjSfR045589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 28 May 2017 10:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r319067 - in stable/9/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 10:45:30 -0000 Author: hselasky Date: Sun May 28 10:45:28 2017 New Revision: 319067 URL: https://svnweb.freebsd.org/changeset/base/319067 Log: MFC r318860: Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel. Modified: stable/9/sys/dev/sound/pcm/buffer.c stable/9/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/pcm/buffer.c ============================================================================== --- stable/9/sys/dev/sound/pcm/buffer.c Sun May 28 10:44:43 2017 (r319066) +++ stable/9/sys/dev/sound/pcm/buffer.c Sun May 28 10:45:28 2017 (r319067) @@ -35,6 +35,7 @@ #include "feeder_if.h" #define SND_USE_FXDIV +#define SND_DECLARE_FXDIV #include "snd_fxdiv_gen.h" SND_DECLARE_FILE("$FreeBSD$"); Modified: stable/9/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/9/sys/tools/sound/snd_fxdiv_gen.awk Sun May 28 10:44:43 2017 (r319066) +++ stable/9/sys/tools/sound/snd_fxdiv_gen.awk Sun May 28 10:45:28 2017 (r319067) @@ -108,7 +108,10 @@ BEGIN { printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); - printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); + printf("extern const uint32_t snd_fxdiv_table[%d][2];\n\n", SND_MAX_ALIGN + 1); + + printf("#ifdef SND_DECLARE_FXDIV\n"); + printf("const uint32_t snd_fxdiv_table[%d][2] = {\n", SND_MAX_ALIGN + 1); for (i = 1; i <= SND_MAX_ALIGN; i++) { if (aligns[i] != 1) @@ -120,7 +123,7 @@ BEGIN { i, r["mul"], r["shift"]); } - printf("};\n\n"); + printf("};\n#endif\n\n"); printf("#define SND_FXDIV_MAX\t\t0x%08x\n", FXONE); printf("#define SND_FXDIV(x, y)\t\t(((uint32_t)(x) *\t\t\t\\\n"); From owner-svn-src-all@freebsd.org Sun May 28 10:46:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95A12D85E7E; Sun, 28 May 2017 10:46:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CFEA319; Sun, 28 May 2017 10:46:35 +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 v4SAkYwZ045684; Sun, 28 May 2017 10:46:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SAkYja045682; Sun, 28 May 2017 10:46:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705281046.v4SAkYja045682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 28 May 2017 10:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r319068 - in stable/8/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 10:46:35 -0000 Author: hselasky Date: Sun May 28 10:46:34 2017 New Revision: 319068 URL: https://svnweb.freebsd.org/changeset/base/319068 Log: MFC r318860: Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel. Modified: stable/8/sys/dev/sound/pcm/buffer.c stable/8/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pcm/ (props changed) stable/8/sys/tools/ (props changed) Modified: stable/8/sys/dev/sound/pcm/buffer.c ============================================================================== --- stable/8/sys/dev/sound/pcm/buffer.c Sun May 28 10:45:28 2017 (r319067) +++ stable/8/sys/dev/sound/pcm/buffer.c Sun May 28 10:46:34 2017 (r319068) @@ -35,6 +35,7 @@ #include "feeder_if.h" #define SND_USE_FXDIV +#define SND_DECLARE_FXDIV #include "snd_fxdiv_gen.h" SND_DECLARE_FILE("$FreeBSD$"); Modified: stable/8/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/8/sys/tools/sound/snd_fxdiv_gen.awk Sun May 28 10:45:28 2017 (r319067) +++ stable/8/sys/tools/sound/snd_fxdiv_gen.awk Sun May 28 10:46:34 2017 (r319068) @@ -108,7 +108,10 @@ BEGIN { printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); - printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); + printf("extern const uint32_t snd_fxdiv_table[%d][2];\n\n", SND_MAX_ALIGN + 1); + + printf("#ifdef SND_DECLARE_FXDIV\n"); + printf("const uint32_t snd_fxdiv_table[%d][2] = {\n", SND_MAX_ALIGN + 1); for (i = 1; i <= SND_MAX_ALIGN; i++) { if (aligns[i] != 1) @@ -120,7 +123,7 @@ BEGIN { i, r["mul"], r["shift"]); } - printf("};\n\n"); + printf("};\n#endif\n\n"); printf("#define SND_FXDIV_MAX\t\t0x%08x\n", FXONE); printf("#define SND_FXDIV(x, y)\t\t(((uint32_t)(x) *\t\t\t\\\n"); From owner-svn-src-all@freebsd.org Sun May 28 12:05:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2DB9D869DC; Sun, 28 May 2017 12:05:17 +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 C0158AC8; Sun, 28 May 2017 12:05:17 +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 v4SC5GOj078567; Sun, 28 May 2017 12:05:16 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SC5G9t078564; Sun, 28 May 2017 12:05:16 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201705281205.v4SC5G9t078564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Sun, 28 May 2017 12:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319069 - in head/sys: dev/bhnd/cores/chipc dev/bhnd/cores/chipc/pwrctl mips/broadcom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 12:05:18 -0000 Author: mizhka Date: Sun May 28 12:05:16 2017 New Revision: 319069 URL: https://svnweb.freebsd.org/changeset/base/319069 Log: [mips] [bhnd] Support of old PMU for BMIPS and siba SoC - Fix typo of PLL Type 4 - Don't panic of frequency getters Submitted by: Hiroki Mori Differential Revision: https://reviews.freebsd.org/D10967 Modified: head/sys/dev/bhnd/cores/chipc/chipcreg.h head/sys/dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_subr.c head/sys/mips/broadcom/bcm_pmu.c Modified: head/sys/dev/bhnd/cores/chipc/chipcreg.h ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipcreg.h Sun May 28 10:46:34 2017 (r319068) +++ head/sys/dev/bhnd/cores/chipc/chipcreg.h Sun May 28 12:05:16 2017 (r319069) @@ -280,7 +280,7 @@ enum { #define CHIPC_PLL_TYPE1 0x2 /* 48MHz base, 3 dividers */ #define CHIPC_PLL_TYPE2 0x4 /* 48MHz, 4 dividers */ #define CHIPC_PLL_TYPE3 0x6 /* 25MHz, 2 dividers */ -#define CHIPC_PLL_TYPE4 0x8 /* 48MHz, 4 dividers */ +#define CHIPC_PLL_TYPE4 0x1 /* 48MHz, 4 dividers */ #define CHIPC_PLL_TYPE5 0x3 /* 25MHz, 4 dividers */ #define CHIPC_PLL_TYPE6 0x5 /* 100/200 or 120/240 only */ #define CHIPC_PLL_TYPE7 0x7 /* 25MHz, 4 dividers */ Modified: head/sys/dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_subr.c ============================================================================== --- head/sys/dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_subr.c Sun May 28 10:46:34 2017 (r319068) +++ head/sys/dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_subr.c Sun May 28 12:05:16 2017 (r319069) @@ -374,7 +374,7 @@ bhnd_pwrctl_slowclk_freq(struct bhnd_pwr } else if (PWRCTL_QUIRK(sc, SLOWCLK_CTL)) { div = bhnd_bus_read_4(sc->res, CHIPC_PLL_SLOWCLK_CTL); div = CHIPC_GET_BITS(div, CHIPC_SCC_CD); - div *= 4; + div = 4 * (div + 1); } else if (PWRCTL_QUIRK(sc, INSTACLK_CTL)) { if (max_freq) { div = 1; @@ -503,7 +503,10 @@ bhnd_pwrctl_setclk(struct bhnd_pwrctl_so if (bhnd_get_hwrev(sc->chipc_dev) == 10) return (ENODEV); - scc = bhnd_bus_read_4(sc->res, CHIPC_PLL_SLOWCLK_CTL); + if (PWRCTL_QUIRK(sc, SLOWCLK_CTL)) + scc = bhnd_bus_read_4(sc->res, CHIPC_PLL_SLOWCLK_CTL); + else + scc = bhnd_bus_read_4(sc->res, CHIPC_SYS_CLK_CTL); switch (clock) { case BHND_CLOCK_HT: @@ -520,7 +523,10 @@ bhnd_pwrctl_setclk(struct bhnd_pwrctl_so return (ENODEV); } - bhnd_bus_write_4(sc->res, CHIPC_PLL_SLOWCLK_CTL, scc); + if (PWRCTL_QUIRK(sc, SLOWCLK_CTL)) + bhnd_bus_write_4(sc->res, CHIPC_PLL_SLOWCLK_CTL, scc); + else + bhnd_bus_write_4(sc->res, CHIPC_SYS_CLK_CTL, scc); DELAY(CHIPC_PLL_DELAY); break; Modified: head/sys/mips/broadcom/bcm_pmu.c ============================================================================== --- head/sys/mips/broadcom/bcm_pmu.c Sun May 28 10:46:34 2017 (r319068) +++ head/sys/mips/broadcom/bcm_pmu.c Sun May 28 12:05:16 2017 (r319069) @@ -208,7 +208,7 @@ bcm_get_uart_rclk(struct bcm_platform *b uint64_t bcm_get_alpfreq(struct bcm_platform *bp) { if (!bcm_has_pmu(bp)) - panic("%s requires PMU\n", __FUNCTION__); + return (BHND_PMU_ALP_CLOCK); return (bhnd_pmu_alp_clock(bcm_get_pmu(bp))); } @@ -217,7 +217,7 @@ bcm_get_alpfreq(struct bcm_platform *bp) uint64_t bcm_get_ilpfreq(struct bcm_platform *bp) { if (!bcm_has_pmu(bp)) - panic("%s requires PMU\n", __FUNCTION__); + return (BHND_PMU_ILP_CLOCK); return (bhnd_pmu_ilp_clock(bcm_get_pmu(bp))); } From owner-svn-src-all@freebsd.org Sun May 28 12:14:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F2AED86C5C; Sun, 28 May 2017 12:14:35 +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 400DBFF9; Sun, 28 May 2017 12:14:35 +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 v4SCEYh4082847; Sun, 28 May 2017 12:14:34 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SCEYSt082845; Sun, 28 May 2017 12:14:34 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201705281214.v4SCEYSt082845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Sun, 28 May 2017 12:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319070 - head/sys/dev/etherswitch/rtl8366 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 12:14:35 -0000 Author: mizhka Date: Sun May 28 12:14:33 2017 New Revision: 319070 URL: https://svnweb.freebsd.org/changeset/base/319070 Log: [etherswitch] [rtl8366] add phy4cpu setting and support mdioproxy Tested on WZR-HP-G301NH(RTL8366RB) and WZR-HP-G300NH(RTL8366SR). Submitted by: Hiroki Mori Differential Revision: https://reviews.freebsd.org/D10740 Modified: head/sys/dev/etherswitch/rtl8366/rtl8366rb.c head/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h Modified: head/sys/dev/etherswitch/rtl8366/rtl8366rb.c ============================================================================== --- head/sys/dev/etherswitch/rtl8366/rtl8366rb.c Sun May 28 12:05:16 2017 (r319069) +++ head/sys/dev/etherswitch/rtl8366/rtl8366rb.c Sun May 28 12:14:33 2017 (r319070) @@ -54,10 +54,12 @@ #include #include #include +#include #include #include +#include "mdio_if.h" #include "iicbus_if.h" #include "miibus_if.h" #include "etherswitch_if.h" @@ -74,7 +76,9 @@ struct rtl8366rb_softc { struct ifnet *ifp[RTL8366_NUM_PHYS]; struct callout callout_tick; etherswitch_info_t info; - int chip_type; /* 0 = RTL8366RB, 1 = RTL8366SR */ + int chip_type; + int phy4cpu; + int numphys; }; #define RTL_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) @@ -145,7 +149,7 @@ rtl8366rb_probe(device_t dev) bzero(sc, sizeof(*sc)); if (smi_probe(dev) != 0) return (ENXIO); - if(sc->chip_type == 0) + if (sc->chip_type == RTL8366RB) device_set_desc(dev, "RTL8366RB Ethernet Switch Controller"); else device_set_desc(dev, "RTL8366SR Ethernet Switch Controller"); @@ -215,17 +219,23 @@ rtl8366rb_attach(device_t dev) smi_read(dev, RTL8366_CVCR, &rev, RTL_WAITOK); device_printf(dev, "rev. %d\n", rev & 0x000f); - sc->info.es_nports = RTL8366_NUM_PORTS; + sc->phy4cpu = 0; + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "phy4cpu", &sc->phy4cpu); + + sc->numphys = sc->phy4cpu ? RTL8366_NUM_PHYS - 1 : RTL8366_NUM_PHYS; + + sc->info.es_nports = sc->numphys + 1; sc->info.es_nvlangroups = RTL8366_NUM_VLANS; sc->info.es_vlan_caps = ETHERSWITCH_VLAN_DOT1Q; - if(sc->chip_type == 0) + if (sc->chip_type == RTL8366RB) sprintf(sc->info.es_name, "Realtek RTL8366RB"); else sprintf(sc->info.es_name, "Realtek RTL8366SR"); /* attach miibus and phys */ /* PHYs need an interface, so we generate a dummy one */ - for (i = 0; i < RTL8366_NUM_PHYS; i++) { + for (i = 0; i < sc->numphys; i++) { sc->ifp[i] = if_alloc(IFT_ETHER); sc->ifp[i]->if_softc = sc; sc->ifp[i]->if_flags |= IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING @@ -263,7 +273,7 @@ rtl8366rb_detach(device_t dev) sc = device_get_softc(dev); - for (i=0; i < RTL8366_NUM_PHYS; i++) { + for (i=0; i < sc->numphys; i++) { if (sc->miibus[i]) device_delete_child(dev, sc->miibus[i]); if (sc->ifp[i] != NULL) @@ -319,7 +329,7 @@ rtl833rb_miipollstat(struct rtl8366rb_so uint16_t value; int portstatus; - for (i = 0; i < RTL8366_NUM_PHYS; i++) { + for (i = 0; i < sc->numphys; i++) { mii = device_get_softc(sc->miibus[i]); if ((i % 2) == 0) { if (smi_read(sc->dev, RTL8366_PLSR_BASE + i/2, &value, RTL_NOWAIT) != 0) { @@ -365,7 +375,7 @@ smi_probe(device_t dev) iicbus = device_get_parent(dev); iicha = device_get_parent(iicbus); - for(i = 0; i < 2; ++i) { + for (i = 0; i < 2; ++i) { iicbus_reset(iicbus, IIC_FASTEST, RTL8366_IIC_ADDR, NULL); for (j=3; j--; ) { IICBUS_STOP(iicha); @@ -380,7 +390,7 @@ smi_probe(device_t dev) err = iicbus_start(iicbus, RTL8366_IIC_ADDR | RTL_IICBUS_READ, RTL_IICBUS_TIMEOUT); if (err != 0) goto out; - if(i == 0) { + if (i == 0) { bytes[0] = RTL8366RB_CIR & 0xff; bytes[1] = (RTL8366RB_CIR >> 8) & 0xff; } else { @@ -396,22 +406,22 @@ smi_probe(device_t dev) chipid = ((bytes[1] & 0xff) << 8) | (bytes[0] & 0xff); if (i == 0 && chipid == RTL8366RB_CIR_ID8366RB) { DPRINTF(dev, "chip id 0x%04x\n", chipid); - sc->chip_type = 0; + sc->chip_type = RTL8366RB; err = 0; break; } if (i == 1 && chipid == RTL8366SR_CIR_ID8366SR) { DPRINTF(dev, "chip id 0x%04x\n", chipid); - sc->chip_type = 1; + sc->chip_type = RTL8366SR; err = 0; break; } - if(i == 0) { + if (i == 0) { iicbus_stop(iicbus); iicbus_release_bus(iicbus, dev); } } - if(i == 2) + if (i == 2) err = ENXIO; out: iicbus_stop(iicbus); @@ -472,7 +482,7 @@ smi_select(device_t dev, int op, int sle RTL_SMI_ACQUIRED_ASSERT((struct rtl8366rb_softc *)device_get_softc(dev)); - if(sc->chip_type == 1) { // RTL8366SR work around + if (sc->chip_type == RTL8366SR) { // RTL8366SR work around // this is same work around at probe for (int i=3; i--; ) IICBUS_STOP(device_get_parent(device_get_parent(dev))); @@ -648,13 +658,18 @@ rtl_getport(device_t dev, etherswitch_po ifmr = &p->es_ifmr; - if (p->es_port < 0 || p->es_port >= RTL8366_NUM_PORTS) + if (p->es_port < 0 || p->es_port >= (sc->numphys + 1)) return (ENXIO); - vlangroup = RTL8366_PVCR_GET(p->es_port, - rtl_readreg(dev, RTL8366_PVCR_REG(p->es_port))); + if (sc->phy4cpu && p->es_port == sc->numphys) { + vlangroup = RTL8366_PVCR_GET(p->es_port + 1, + rtl_readreg(dev, RTL8366_PVCR_REG(p->es_port + 1))); + } else { + vlangroup = RTL8366_PVCR_GET(p->es_port, + rtl_readreg(dev, RTL8366_PVCR_REG(p->es_port))); + } p->es_pvid = sc->vid[vlangroup] & ETHERSWITCH_VID_MASK; - if (p->es_port < RTL8366_NUM_PHYS) { + if (p->es_port < sc->numphys) { mii = device_get_softc(sc->miibus[p->es_port]); ifm = &mii->mii_media; err = ifmedia_ioctl(sc->ifp[p->es_port], &p->es_ifr, ifm, SIOCGIFMEDIA); @@ -687,10 +702,11 @@ rtl_setport(device_t dev, etherswitch_po int i, err, vlangroup; struct ifmedia *ifm; struct mii_data *mii; + int port; sc = device_get_softc(dev); - if (p->es_port < 0 || p->es_port >= RTL8366_NUM_PORTS) + if (p->es_port < 0 || p->es_port >= (sc->numphys + 1)) return (ENXIO); vlangroup = -1; for (i = 0; i < RTL8366_NUM_VLANS; i++) { @@ -701,12 +717,18 @@ rtl_setport(device_t dev, etherswitch_po } if (vlangroup == -1) return (ENXIO); - err = smi_rmw(dev, RTL8366_PVCR_REG(p->es_port), - RTL8366_PVCR_VAL(p->es_port, RTL8366_PVCR_PORT_MASK), - RTL8366_PVCR_VAL(p->es_port, vlangroup), RTL_WAITOK); + if (sc->phy4cpu && p->es_port == sc->numphys) { + port = p->es_port + 1; + } else { + port = p->es_port; + } + err = smi_rmw(dev, RTL8366_PVCR_REG(port), + RTL8366_PVCR_VAL(port, RTL8366_PVCR_PORT_MASK), + RTL8366_PVCR_VAL(port, vlangroup), RTL_WAITOK); if (err) return (err); - if (p->es_port == RTL8366_CPU_PORT) + /* CPU Port */ + if (p->es_port == sc->numphys) return (0); mii = device_get_softc(sc->miibus[p->es_port]); ifm = &mii->mii_media; @@ -720,6 +742,7 @@ rtl_getvgroup(device_t dev, etherswitch_ struct rtl8366rb_softc *sc; uint16_t vmcr[3]; int i; + int member, untagged; sc = device_get_softc(dev); @@ -727,8 +750,15 @@ rtl_getvgroup(device_t dev, etherswitch_ vmcr[i] = rtl_readreg(dev, RTL8366_VMCR(i, vg->es_vlangroup)); vg->es_vid = sc->vid[vg->es_vlangroup]; - vg->es_member_ports = RTL8366_VMCR_MEMBER(vmcr); - vg->es_untagged_ports = RTL8366_VMCR_UNTAG(vmcr); + member = RTL8366_VMCR_MEMBER(vmcr); + untagged = RTL8366_VMCR_UNTAG(vmcr); + if (sc->phy4cpu) { + vg->es_member_ports = ((member & 0x20) >> 1) | (member & 0x0f); + vg->es_untagged_ports = ((untagged & 0x20) >> 1) | (untagged & 0x0f); + } else { + vg->es_member_ports = member; + vg->es_untagged_ports = untagged; + } vg->es_fid = RTL8366_VMCR_FID(vmcr); return (0); } @@ -738,6 +768,7 @@ rtl_setvgroup(device_t dev, etherswitch_ { struct rtl8366rb_softc *sc; int g; + int member, untagged; sc = device_get_softc(dev); @@ -750,16 +781,26 @@ rtl_setvgroup(device_t dev, etherswitch_ sc->vid[g] |= ETHERSWITCH_VID_VALID; rtl_writereg(dev, RTL8366_VMCR(RTL8366_VMCR_DOT1Q_REG, g), (vg->es_vid << RTL8366_VMCR_DOT1Q_VID_SHIFT) & RTL8366_VMCR_DOT1Q_VID_MASK); - if(sc->chip_type == 0) { + if (sc->phy4cpu) { + /* add space at phy4 */ + member = (vg->es_member_ports & 0x0f) | + ((vg->es_member_ports & 0x10) << 1); + untagged = (vg->es_untagged_ports & 0x0f) | + ((vg->es_untagged_ports & 0x10) << 1); + } else { + member = vg->es_member_ports; + untagged = vg->es_untagged_ports; + } + if (sc->chip_type == RTL8366RB) { rtl_writereg(dev, RTL8366_VMCR(RTL8366_VMCR_MU_REG, g), - ((vg->es_member_ports << RTL8366_VMCR_MU_MEMBER_SHIFT) & RTL8366_VMCR_MU_MEMBER_MASK) | - ((vg->es_untagged_ports << RTL8366_VMCR_MU_UNTAG_SHIFT) & RTL8366_VMCR_MU_UNTAG_MASK)); + ((member << RTL8366_VMCR_MU_MEMBER_SHIFT) & RTL8366_VMCR_MU_MEMBER_MASK) | + ((untagged << RTL8366_VMCR_MU_UNTAG_SHIFT) & RTL8366_VMCR_MU_UNTAG_MASK)); rtl_writereg(dev, RTL8366_VMCR(RTL8366_VMCR_FID_REG, g), vg->es_fid); } else { rtl_writereg(dev, RTL8366_VMCR(RTL8366_VMCR_MU_REG, g), - ((vg->es_member_ports << RTL8366_VMCR_MU_MEMBER_SHIFT) & RTL8366_VMCR_MU_MEMBER_MASK) | - ((vg->es_untagged_ports << RTL8366_VMCR_MU_UNTAG_SHIFT) & RTL8366_VMCR_MU_UNTAG_MASK) | + ((member << RTL8366_VMCR_MU_MEMBER_SHIFT) & RTL8366_VMCR_MU_MEMBER_MASK) | + ((untagged << RTL8366_VMCR_MU_UNTAG_SHIFT) & RTL8366_VMCR_MU_UNTAG_MASK) | ((vg->es_fid << RTL8366_VMCR_FID_FID_SHIFT) & RTL8366_VMCR_FID_FID_MASK)); } return (0); @@ -886,6 +927,10 @@ static device_method_t rtl8366rb_methods DEVMETHOD(miibus_readreg, rtl_readphy), DEVMETHOD(miibus_writereg, rtl_writephy), + /* MDIO interface */ + DEVMETHOD(mdio_readreg, rtl_readphy), + DEVMETHOD(mdio_writereg, rtl_writephy), + /* etherswitch interface */ DEVMETHOD(etherswitch_getconf, rtl_getconf), DEVMETHOD(etherswitch_getinfo, rtl_getinfo), @@ -907,6 +952,7 @@ static devclass_t rtl8366rb_devclass; DRIVER_MODULE(rtl8366rb, iicbus, rtl8366rb_driver, rtl8366rb_devclass, 0, 0); DRIVER_MODULE(miibus, rtl8366rb, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE(mdio, rtl8366rb, mdio_driver, mdio_devclass, 0, 0); DRIVER_MODULE(etherswitch, rtl8366rb, etherswitch_driver, etherswitch_devclass, 0, 0); MODULE_VERSION(rtl8366rb, 1); MODULE_DEPEND(rtl8366rb, iicbus, 1, 1, 1); /* XXX which versions? */ Modified: head/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h ============================================================================== --- head/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h Sun May 28 12:05:16 2017 (r319069) +++ head/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h Sun May 28 12:14:33 2017 (r319070) @@ -30,6 +30,9 @@ #ifndef _DEV_ETHERSWITCH_RTL8366RBVAR_H_ #define _DEV_ETHERSWITCH_RTL8366RBVAR_H_ +#define RTL8366RB 0 +#define RTL8366SR 1 + #define RTL8366_IIC_ADDR 0xa8 #define RTL_IICBUS_TIMEOUT 100 /* us */ #define RTL_IICBUS_READ 1 @@ -173,9 +176,7 @@ (0x8000 | (1 << (((phy) & 0x1f) + 9)) | (((page) & (sc->chip_type == 0 ? 0xf : 0x7)) << 5) | ((reg) & 0x1f)) /* general characteristics of the chip */ -#define RTL8366_CPU_PORT 5 -#define RTL8366_NUM_PORTS 6 -#define RTL8366_NUM_PHYS (RTL8366_NUM_PORTS-1) +#define RTL8366_NUM_PHYS 5 #define RTL8366_NUM_VLANS 16 #define RTL8366_NUM_PHY_REG 32 From owner-svn-src-all@freebsd.org Sun May 28 15:39:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A0E3D84F83; Sun, 28 May 2017 15:39:13 +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 F414F19C8; Sun, 28 May 2017 15:39:12 +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 v4SFdCMe063162; Sun, 28 May 2017 15:39:12 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SFdBKA063157; Sun, 28 May 2017 15:39:11 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705281539.v4SFdBKA063157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 28 May 2017 15:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319071 - in head/sys: conf fs/ext2fs modules/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 15:39:13 -0000 Author: pfg Date: Sun May 28 15:39:11 2017 New Revision: 319071 URL: https://svnweb.freebsd.org/changeset/base/319071 Log: Support for linux ext2fs posix-draft ACLs. This is closely tied to the Extended Attribute implementation. Submitted by: Fedor Uporov Reviewed by: kevlo, pfg Differential Revision: https://reviews.freebsd.org/D10807 Added: head/sys/fs/ext2fs/ext2_acl.c (contents, props changed) head/sys/fs/ext2fs/ext2_acl.h (contents, props changed) Modified: head/sys/conf/files head/sys/fs/ext2fs/ext2_extattr.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/modules/ext2fs/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun May 28 12:14:33 2017 (r319070) +++ head/sys/conf/files Sun May 28 15:39:11 2017 (r319071) @@ -3525,6 +3525,7 @@ geom/virstor/binstream.c optional geom_v geom/virstor/g_virstor.c optional geom_virstor geom/virstor/g_virstor_md.c optional geom_virstor geom/zero/g_zero.c optional geom_zero +fs/ext2fs/ext2_acl.c optional ext2fs fs/ext2fs/ext2_alloc.c optional ext2fs fs/ext2fs/ext2_balloc.c optional ext2fs fs/ext2fs/ext2_bmap.c optional ext2fs Added: head/sys/fs/ext2fs/ext2_acl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/fs/ext2fs/ext2_acl.c Sun May 28 15:39:11 2017 (r319071) @@ -0,0 +1,521 @@ +/*- + * Copyright (c) 2017, Fedor Uporov + * 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +void +ext2_sync_acl_from_inode(struct inode *ip, struct acl *acl) +{ + struct acl_entry *acl_mask, *acl_group_obj; + int i; + + /* + * Update ACL_USER_OBJ, ACL_OTHER, but simply identify ACL_MASK + * and ACL_GROUP_OBJ for use after we know whether ACL_MASK is + * present. + */ + acl_mask = NULL; + acl_group_obj = NULL; + for (i = 0; i < acl->acl_cnt; i++) { + switch (acl->acl_entry[i].ae_tag) { + case ACL_USER_OBJ: + acl->acl_entry[i].ae_perm = acl_posix1e_mode_to_perm( + ACL_USER_OBJ, ip->i_mode); + acl->acl_entry[i].ae_id = ACL_UNDEFINED_ID; + break; + + case ACL_GROUP_OBJ: + acl_group_obj = &acl->acl_entry[i]; + acl->acl_entry[i].ae_id = ACL_UNDEFINED_ID; + break; + + case ACL_OTHER: + acl->acl_entry[i].ae_perm = acl_posix1e_mode_to_perm( + ACL_OTHER, ip->i_mode); + acl->acl_entry[i].ae_id = ACL_UNDEFINED_ID; + break; + + case ACL_MASK: + acl_mask = &acl->acl_entry[i]; + acl->acl_entry[i].ae_id = ACL_UNDEFINED_ID; + break; + + case ACL_USER: + case ACL_GROUP: + break; + + default: + panic("ext2_sync_acl_from_inode(): bad ae_tag"); + } + } + + if (acl_group_obj == NULL) + panic("ext2_sync_acl_from_inode(): no ACL_GROUP_OBJ"); + + if (acl_mask == NULL) { + /* + * There is no ACL_MASK, so update ACL_GROUP_OBJ. + */ + acl_group_obj->ae_perm = acl_posix1e_mode_to_perm( + ACL_GROUP_OBJ, ip->i_mode); + } else { + /* + * Update the ACL_MASK entry instead of ACL_GROUP_OBJ. + */ + acl_mask->ae_perm = acl_posix1e_mode_to_perm(ACL_GROUP_OBJ, + ip->i_mode); + } +} + +static void +ext2_sync_inode_from_acl(struct acl *acl, struct inode *ip) +{ + + ip->i_mode &= ACL_PRESERVE_MASK; + ip->i_mode |= acl_posix1e_acl_to_mode(acl); +} + +/* + * Convert from filesystem to in-memory representation. + */ +static int +ext4_acl_from_disk(char *value, size_t size, struct acl *acl) +{ + const char *end = value + size; + int n, count, s; + + if (((struct ext2_acl_header *)value)->a_version != EXT4_ACL_VERSION) + return (EINVAL); + + if (!value || size < sizeof(struct ext2_acl_header)) + return (EINVAL); + + s = size - sizeof(struct ext2_acl_header); + s -= 4 * sizeof(struct ext2_acl_entry_short); + if (s < 0) + if ((size - sizeof(struct ext2_acl_header)) % + sizeof(struct ext2_acl_entry_short)) + count = -1; + else + count = (size - sizeof(struct ext2_acl_header)) / + sizeof(struct ext2_acl_entry_short); + else + if (s % sizeof(struct ext2_acl_entry)) + count = -1; + else + count = s / sizeof(struct ext2_acl_entry) + 4; + + if (count <= 0 || count > acl->acl_maxcnt) + return (EINVAL); + + value = value + sizeof(struct ext2_acl_header); + + for (n = 0; n < count; n++) { + struct ext2_acl_entry *entry = (struct ext2_acl_entry *)value; + if ((char *)value + sizeof(struct ext2_acl_entry_short) > end) + return (EINVAL); + + acl->acl_entry[n].ae_tag = entry->ae_tag; + acl->acl_entry[n].ae_perm = entry->ae_perm; + + switch (acl->acl_entry[n].ae_tag) { + case ACL_USER_OBJ: + case ACL_GROUP_OBJ: + case ACL_MASK: + case ACL_OTHER: + value = (char *)value + sizeof(struct ext2_acl_entry_short); + break; + + case ACL_USER: + value = (char *)value + sizeof(struct ext2_acl_entry); + if ((char *)value > end) + return (EINVAL); + + acl->acl_entry[n].ae_id = entry->ae_id; + break; + + case ACL_GROUP: + value = (char *)value + sizeof(struct ext2_acl_entry); + if ((char *)value > end) + return (EINVAL); + + acl->acl_entry[n].ae_id = entry->ae_id; + break; + + default: + return (EINVAL); + } + } + + if (value != end) + return (EINVAL); + + acl->acl_cnt = count; + + return (0); +} + +static int +ext2_getacl_posix1e(struct vop_getacl_args *ap) +{ + int attrnamespace; + const char *attrname; + char *value; + int len; + int error; + + len = sizeof(*ap->a_aclp) + sizeof(struct ext2_acl_header); + value = malloc(len, M_ACL, M_WAITOK); + if (!value) + return (ENOMEM); + + switch (ap->a_type) { + case ACL_TYPE_DEFAULT: + attrnamespace = POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE; + attrname = POSIX1E_ACL_DEFAULT_EXTATTR_NAME; + break; + case ACL_TYPE_ACCESS: + attrnamespace = POSIX1E_ACL_ACCESS_EXTATTR_NAMESPACE; + attrname = POSIX1E_ACL_ACCESS_EXTATTR_NAME; + break; + default: + return (EINVAL); + } + + error = vn_extattr_get(ap->a_vp, IO_NODELOCKED, attrnamespace, attrname, + &len, value, ap->a_td); + switch (error) { + case ENOATTR: + switch (ap->a_type) { + case ACL_TYPE_ACCESS: + ap->a_aclp->acl_cnt = 3; + ap->a_aclp->acl_entry[0].ae_tag = ACL_USER_OBJ; + ap->a_aclp->acl_entry[0].ae_id = ACL_UNDEFINED_ID; + ap->a_aclp->acl_entry[0].ae_perm = ACL_PERM_NONE; + ap->a_aclp->acl_entry[1].ae_tag = ACL_GROUP_OBJ; + ap->a_aclp->acl_entry[1].ae_id = ACL_UNDEFINED_ID; + ap->a_aclp->acl_entry[1].ae_perm = ACL_PERM_NONE; + ap->a_aclp->acl_entry[2].ae_tag = ACL_OTHER; + ap->a_aclp->acl_entry[2].ae_id = ACL_UNDEFINED_ID; + ap->a_aclp->acl_entry[2].ae_perm = ACL_PERM_NONE; + break; + + case ACL_TYPE_DEFAULT: + ap->a_aclp->acl_cnt = 0; + break; + } + case 0: + if (!error) { + error = ext4_acl_from_disk(value, len, ap->a_aclp); + if (error) + goto out; + } + + if (error == ENOATTR) + error = 0; + + if (ap->a_type == ACL_TYPE_ACCESS) + ext2_sync_acl_from_inode(VTOI(ap->a_vp), ap->a_aclp); + default: + break; + } + +out: + free(value, M_TEMP); + return (error); +} + +int +ext2_getacl(struct vop_getacl_args *ap) +{ + + if (((ap->a_vp->v_mount->mnt_flag & MNT_ACLS) == 0) || + ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) == 1)) + return (EOPNOTSUPP); + + if (ap->a_type == ACL_TYPE_NFS4) + return (ENOTSUP); + + return (ext2_getacl_posix1e(ap)); +} + +/* + * Convert from in-memory to filesystem representation. + */ +static int +ext4_acl_to_disk(const struct acl *acl, size_t *size, char *value) +{ + struct ext2_acl_header *ext_acl; + int disk_size; + char *e; + size_t n; + + if (acl->acl_cnt <= 4) + disk_size = sizeof(struct ext2_acl_header) + + acl->acl_cnt * sizeof(struct ext2_acl_entry_short); + else + disk_size = sizeof(struct ext2_acl_header) + + 4 * sizeof(struct ext2_acl_entry_short) + + (acl->acl_cnt - 4) * sizeof(struct ext2_acl_entry); + + if (disk_size > *size) + return (EINVAL); + + *size = disk_size; + ext_acl = (struct ext2_acl_header *)value; + + ext_acl->a_version = EXT4_ACL_VERSION; + e = (char *)ext_acl + sizeof(struct ext2_acl_header); + for (n = 0; n < acl->acl_cnt; n++) { + const struct acl_entry *acl_e = &acl->acl_entry[n]; + struct ext2_acl_entry *entry = (struct ext2_acl_entry *)e; + entry->ae_tag = acl_e->ae_tag; + entry->ae_perm = acl_e->ae_perm; + switch (acl_e->ae_tag) { + case ACL_USER: + entry->ae_id = acl_e->ae_id; + e += sizeof(struct ext2_acl_entry); + break; + + case ACL_GROUP: + entry->ae_id = acl_e->ae_id; + e += sizeof(struct ext2_acl_entry); + break; + + case ACL_USER_OBJ: + case ACL_GROUP_OBJ: + case ACL_MASK: + case ACL_OTHER: + e += sizeof(struct ext2_acl_entry_short); + break; + + default: + return (EINVAL); + } + } + + return (0); +} + +static int +ext2_setacl_posix1e(struct vop_setacl_args *ap) +{ + struct inode *ip = VTOI(ap->a_vp); + char *value; + size_t len; + int error; + + if ((ap->a_vp->v_mount->mnt_flag & MNT_ACLS) == 0) + return (EINVAL); + + /* + * If this is a set operation rather than a delete operation, + * invoke VOP_ACLCHECK() on the passed ACL to determine if it is + * valid for the target. This will include a check on ap->a_type. + */ + if (ap->a_aclp != NULL) { + /* + * Set operation. + */ + error = VOP_ACLCHECK(ap->a_vp, ap->a_type, ap->a_aclp, + ap->a_cred, ap->a_td); + if (error) + return (error); + } else { + /* + * Delete operation. + * POSIX.1e allows only deletion of the default ACL on a + * directory (ACL_TYPE_DEFAULT). + */ + if (ap->a_type != ACL_TYPE_DEFAULT) + return (EINVAL); + if (ap->a_vp->v_type != VDIR) + return (ENOTDIR); + } + + if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY) + return (EROFS); + + /* + * Authorize the ACL operation. + */ + if (ip->i_flags & (IMMUTABLE | APPEND)) + return (EPERM); + + /* + * Must hold VADMIN (be file owner) or have appropriate privilege. + */ + if ((error = VOP_ACCESS(ap->a_vp, VADMIN, ap->a_cred, ap->a_td))) + return (error); + + switch (ap->a_type) { + case ACL_TYPE_ACCESS: + len = sizeof(*ap->a_aclp) + sizeof(struct ext2_acl_header); + value = malloc(len, M_ACL, M_WAITOK | M_ZERO); + error = ext4_acl_to_disk(ap->a_aclp, &len, value); + if (error == 0) + error = vn_extattr_set(ap->a_vp, IO_NODELOCKED, + POSIX1E_ACL_ACCESS_EXTATTR_NAMESPACE, + POSIX1E_ACL_ACCESS_EXTATTR_NAME, len, + value, ap->a_td); + + free(value, M_ACL); + break; + + case ACL_TYPE_DEFAULT: + if (ap->a_aclp == NULL) { + error = vn_extattr_rm(ap->a_vp, IO_NODELOCKED, + POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE, + POSIX1E_ACL_DEFAULT_EXTATTR_NAME, ap->a_td); + + /* + * Attempting to delete a non-present default ACL + * will return success for portability purposes. + * (TRIX) + * + * XXX: Note that since we can't distinguish + * "that EA is not supported" from "that EA is not + * defined", the success case here overlaps the + * the ENOATTR->EOPNOTSUPP case below. + */ + if (error == ENOATTR) + error = 0; + } else { + len = sizeof(*ap->a_aclp) + sizeof(struct ext2_acl_header); + value = malloc(len, M_ACL, M_WAITOK | M_ZERO); + error = ext4_acl_to_disk(ap->a_aclp, &len, value); + if (error == 0) + error = vn_extattr_set(ap->a_vp, IO_NODELOCKED, + POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE, + POSIX1E_ACL_DEFAULT_EXTATTR_NAME, len, + value, ap->a_td); + + free(value, M_ACL); + } + break; + + default: + error = EINVAL; + } + + /* + * Map lack of attribute definition in UFS_EXTATTR into lack of + * support for ACLs on the filesystem. + */ + if (error == ENOATTR) + return (EOPNOTSUPP); + + if (error != 0) + return (error); + + if (ap->a_type == ACL_TYPE_ACCESS) { + /* + * Now that the EA is successfully updated, update the + * inode and mark it as changed. + */ + ext2_sync_inode_from_acl(ap->a_aclp, ip); + ip->i_flag |= IN_CHANGE; + error = ext2_update(ip->i_vnode, 1); + } + + VN_KNOTE_UNLOCKED(ap->a_vp, NOTE_ATTRIB); + + return (error); +} + +int +ext2_setacl(struct vop_setacl_args *ap) +{ + if (((ap->a_vp->v_mount->mnt_flag & MNT_ACLS) == 0) || + ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) == 1)) + return (EOPNOTSUPP); + + if (ap->a_type == ACL_TYPE_NFS4) + return (ENOTSUP); + + return (ext2_setacl_posix1e(ap)); +} + +/* + * Check the validity of an ACL for a file. + */ +int +ext2_aclcheck(struct vop_aclcheck_args *ap) +{ + + if (((ap->a_vp->v_mount->mnt_flag & MNT_ACLS) == 0) || + ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) == 1)) + return (EOPNOTSUPP); + + if (ap->a_type == ACL_TYPE_NFS4) + return (ENOTSUP); + + if ((ap->a_vp->v_mount->mnt_flag & MNT_ACLS) == 0) + return (EINVAL); + + /* + * Verify we understand this type of ACL, and that it applies + * to this kind of object. + * Rely on the acl_posix1e_check() routine to verify the contents. + */ + switch (ap->a_type) { + case ACL_TYPE_ACCESS: + break; + + case ACL_TYPE_DEFAULT: + if (ap->a_vp->v_type != VDIR) + return (EINVAL); + break; + + default: + return (EINVAL); + } + + return (acl_posix1e_check(ap->a_aclp)); +} \ No newline at end of file Added: head/sys/fs/ext2fs/ext2_acl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/fs/ext2fs/ext2_acl.h Sun May 28 15:39:11 2017 (r319071) @@ -0,0 +1,55 @@ +/*- + * Copyright (c) 2017, Fedor Uporov + * 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$ + */ + +#ifndef _FS_EXT2FS_EXT2_ACL_H_ +#define _FS_EXT2FS_EXT2_ACL_H_ + +#define EXT4_ACL_VERSION 0x0001 + +struct ext2_acl_entry { + int16_t ae_tag; + int16_t ae_perm; + int32_t ae_id; +}; + +struct ext2_acl_entry_short { + int16_t ae_tag; + int16_t ae_perm; +}; + +struct ext2_acl_header { + int32_t a_version; +}; + +void ext2_sync_acl_from_inode(struct inode *ip, struct acl *acl); + +int ext2_getacl(struct vop_getacl_args *); +int ext2_setacl(struct vop_setacl_args *); +int ext2_aclcheck(struct vop_aclcheck_args *); + +#endif /* !_FS_EXT2FS_EXT2_ACL_H_ */ Modified: head/sys/fs/ext2fs/ext2_extattr.c ============================================================================== --- head/sys/fs/ext2fs/ext2_extattr.c Sun May 28 12:14:33 2017 (r319070) +++ head/sys/fs/ext2fs/ext2_extattr.c Sun May 28 15:39:11 2017 (r319071) @@ -46,35 +46,92 @@ #include #include - static int -ext2_extattr_index_to_bsd(int index) +ext2_extattr_attrnamespace_to_bsd(int attrnamespace) { - switch (index) { - case EXT4_XATTR_INDEX_SYSTEM: - return (EXTATTR_NAMESPACE_SYSTEM); - case EXT4_XATTR_INDEX_USER: - return (EXTATTR_NAMESPACE_USER); + switch (attrnamespace) { + case EXT4_XATTR_INDEX_SYSTEM: + return (EXTATTR_NAMESPACE_SYSTEM); + + case EXT4_XATTR_INDEX_USER: + return (EXTATTR_NAMESPACE_USER); + + case EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT: + return (POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE); + + case EXT4_XATTR_INDEX_POSIX_ACL_ACCESS: + return (POSIX1E_ACL_ACCESS_EXTATTR_NAMESPACE); } return (EXTATTR_NAMESPACE_EMPTY); } +static const char * +ext2_extattr_name_to_bsd(int attrnamespace, const char *name, int* name_len) +{ + + if (attrnamespace == EXT4_XATTR_INDEX_SYSTEM) + return (name); + else if (attrnamespace == EXT4_XATTR_INDEX_USER) + return (name); + else if (attrnamespace == EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT) { + *name_len = strlen(POSIX1E_ACL_DEFAULT_EXTATTR_NAME); + return (POSIX1E_ACL_DEFAULT_EXTATTR_NAME); + } else if (attrnamespace == EXT4_XATTR_INDEX_POSIX_ACL_ACCESS) { + *name_len = strlen(POSIX1E_ACL_ACCESS_EXTATTR_NAME); + return (POSIX1E_ACL_ACCESS_EXTATTR_NAME); + } + + /* + * XXX: Not all linux namespaces are mapped to bsd for now, + * return NULL, which will be converted to ENOTSUP on upper layer. + */ +#ifdef EXT2FS_DEBUG + printf("can not convert ext2fs name to bsd: namespace=%d\n", attrnamespace); +#endif /* DEBUG */ + + return (NULL); +} + static int -ext2_extattr_index_to_linux(int index) +ext2_extattr_attrnamespace_to_linux(int attrnamespace, const char *name) { - switch (index) { - case EXTATTR_NAMESPACE_SYSTEM: - return (EXT4_XATTR_INDEX_SYSTEM); - case EXTATTR_NAMESPACE_USER: - return (EXT4_XATTR_INDEX_USER); + if (attrnamespace == POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE && + !strcmp(name, POSIX1E_ACL_DEFAULT_EXTATTR_NAME)) + return (EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT); + + if (attrnamespace == POSIX1E_ACL_ACCESS_EXTATTR_NAMESPACE && + !strcmp(name, POSIX1E_ACL_ACCESS_EXTATTR_NAME)) + return (EXT4_XATTR_INDEX_POSIX_ACL_ACCESS); + + switch (attrnamespace) { + case EXTATTR_NAMESPACE_SYSTEM: + return (EXT4_XATTR_INDEX_SYSTEM); + + case EXTATTR_NAMESPACE_USER: + return (EXT4_XATTR_INDEX_USER); } + /* + * In this case namespace conversion should be unique, + * so this point is unreachable. + */ return (-1); } +static const char * +ext2_extattr_name_to_linux(int attrnamespace, const char *name) +{ + + if (attrnamespace == POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE || + attrnamespace == POSIX1E_ACL_ACCESS_EXTATTR_NAMESPACE) + return (""); + else + return (name); +} + int ext2_extattr_valid_attrname(int attrnamespace, const char *attrname) { @@ -114,6 +171,8 @@ ext2_extattr_inode_list(struct inode *ip struct buf *bp; struct ext2fs_extattr_dinode_header *header; struct ext2fs_extattr_entry *entry; + const char *attr_name; + int name_len; int error; fs = ip->i_e2fs; @@ -147,17 +206,26 @@ ext2_extattr_inode_list(struct inode *ip for (entry = EXT2_IFIRST(header); !EXT2_IS_LAST_ENTRY(entry); entry = EXT2_EXTATTR_NEXT(entry)) { - if (ext2_extattr_index_to_bsd(entry->e_name_index) != attrnamespace) + if (ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) != + attrnamespace) continue; + name_len = entry->e_name_len; + attr_name = ext2_extattr_name_to_bsd(entry->e_name_index, + entry->e_name, &name_len); + if (!attr_name) { + brelse(bp); + return (ENOTSUP); + } + if (uio == NULL) - *size += entry->e_name_len + 1; + *size += name_len + 1; else { - char *attr_name = malloc(entry->e_name_len + 1, M_TEMP, M_WAITOK); - attr_name[0] = entry->e_name_len; - memcpy(&attr_name[1], entry->e_name, entry->e_name_len); - error = uiomove(attr_name, entry->e_name_len + 1, uio); - free(attr_name, M_TEMP); + char *name = malloc(name_len + 1, M_TEMP, M_WAITOK); + name[0] = name_len; + memcpy(&name[1], attr_name, name_len); + error = uiomove(name, name_len + 1, uio); + free(name, M_TEMP); if (error) break; } @@ -176,6 +244,8 @@ ext2_extattr_block_list(struct inode *ip struct buf *bp; struct ext2fs_extattr_header *header; struct ext2fs_extattr_entry *entry; + const char *attr_name; + int name_len; int error; fs = ip->i_e2fs; @@ -202,17 +272,26 @@ ext2_extattr_block_list(struct inode *ip for (entry = EXT2_FIRST_ENTRY(bp); !EXT2_IS_LAST_ENTRY(entry); entry = EXT2_EXTATTR_NEXT(entry)) { - if (ext2_extattr_index_to_bsd(entry->e_name_index) != attrnamespace) + if (ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) != + attrnamespace) continue; + name_len = entry->e_name_len; + attr_name = ext2_extattr_name_to_bsd(entry->e_name_index, + entry->e_name, &name_len); + if (!attr_name) { + brelse(bp); + return (ENOTSUP); + } + if (uio == NULL) - *size += entry->e_name_len + 1; + *size += name_len + 1; else { - char *attr_name = malloc(entry->e_name_len + 1, M_TEMP, M_WAITOK); - attr_name[0] = entry->e_name_len; - memcpy(&attr_name[1], entry->e_name, entry->e_name_len); - error = uiomove(attr_name, entry->e_name_len + 1, uio); - free(attr_name, M_TEMP); + char *name = malloc(name_len + 1, M_TEMP, M_WAITOK); + name[0] = name_len; + memcpy(&name[1], attr_name, name_len); + error = uiomove(name, name_len + 1, uio); + free(name, M_TEMP); if (error) break; } @@ -231,6 +310,8 @@ ext2_extattr_inode_get(struct inode *ip, struct buf *bp; struct ext2fs_extattr_dinode_header *header; struct ext2fs_extattr_entry *entry; + const char *attr_name; + int name_len; int error; fs = ip->i_e2fs; @@ -264,11 +345,20 @@ ext2_extattr_inode_get(struct inode *ip, for (entry = EXT2_IFIRST(header); !EXT2_IS_LAST_ENTRY(entry); entry = EXT2_EXTATTR_NEXT(entry)) { - if (ext2_extattr_index_to_bsd(entry->e_name_index) != attrnamespace) + if (ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) != + attrnamespace) continue; - if (strlen(name) == entry->e_name_len && - 0 == strncmp(entry->e_name, name, entry->e_name_len)) { + name_len = entry->e_name_len; + attr_name = ext2_extattr_name_to_bsd(entry->e_name_index, + entry->e_name, &name_len); + if (!attr_name) { + brelse(bp); + return (ENOTSUP); + } + + if (strlen(name) == name_len && + 0 == strncmp(attr_name, name, name_len)) { if (uio == NULL) *size += entry->e_value_size; else { @@ -294,6 +384,8 @@ ext2_extattr_block_get(struct inode *ip, struct buf *bp; struct ext2fs_extattr_header *header; struct ext2fs_extattr_entry *entry; + const char *attr_name; + int name_len; int error; fs = ip->i_e2fs; @@ -320,11 +412,20 @@ ext2_extattr_block_get(struct inode *ip, for (entry = EXT2_FIRST_ENTRY(bp); !EXT2_IS_LAST_ENTRY(entry); entry = EXT2_EXTATTR_NEXT(entry)) { - if (ext2_extattr_index_to_bsd(entry->e_name_index) != attrnamespace) + if (ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) != + attrnamespace) continue; - if (strlen(name) == entry->e_name_len && - 0 == strncmp(entry->e_name, name, entry->e_name_len)) { + name_len = entry->e_name_len; + attr_name = ext2_extattr_name_to_bsd(entry->e_name_index, + entry->e_name, &name_len); + if (!attr_name) { + brelse(bp); + return (ENOTSUP); + } + + if (strlen(name) == name_len && + 0 == strncmp(attr_name, name, name_len)) { if (uio == NULL) *size += entry->e_value_size; else { @@ -411,6 +512,8 @@ ext2_extattr_inode_delete(struct inode * struct buf *bp; struct ext2fs_extattr_dinode_header *header; struct ext2fs_extattr_entry *entry; + const char *attr_name; + int name_len; int error; fs = ip->i_e2fs; @@ -444,9 +547,20 @@ ext2_extattr_inode_delete(struct inode * /* If I am last entry, just make magic zero */ entry = EXT2_IFIRST(header); - if (EXT2_IS_LAST_ENTRY(EXT2_EXTATTR_NEXT(entry))) { - if (strlen(name) == entry->e_name_len && - 0 == strncmp(entry->e_name, name, entry->e_name_len)) { + if ((EXT2_IS_LAST_ENTRY(EXT2_EXTATTR_NEXT(entry))) && + (ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) == + attrnamespace)) { + + name_len = entry->e_name_len; + attr_name = ext2_extattr_name_to_bsd(entry->e_name_index, + entry->e_name, &name_len); + if (!attr_name) { + brelse(bp); + return (ENOTSUP); + } + + if (strlen(name) == name_len && + 0 == strncmp(attr_name, name, name_len)) { memset(header, 0, sizeof(struct ext2fs_extattr_dinode_header)); return (bwrite(bp)); @@ -455,11 +569,20 @@ ext2_extattr_inode_delete(struct inode * for (entry = EXT2_IFIRST(header); !EXT2_IS_LAST_ENTRY(entry); entry = EXT2_EXTATTR_NEXT(entry)) { - if (ext2_extattr_index_to_bsd(entry->e_name_index) != attrnamespace) + if (ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) != + attrnamespace) continue; - if (strlen(name) == entry->e_name_len && - 0 == strncmp(entry->e_name, name, entry->e_name_len)) { + name_len = entry->e_name_len; + attr_name = ext2_extattr_name_to_bsd(entry->e_name_index, + entry->e_name, &name_len); + if (!attr_name) { + brelse(bp); + return (ENOTSUP); + } + + if (strlen(name) == name_len && + 0 == strncmp(attr_name, name, name_len)) { ext2_extattr_delete_entry((char *)EXT2_IFIRST(header), EXT2_IFIRST(header), entry, (char *)dinode + EXT2_INODE_SIZE(fs)); @@ -521,6 +644,8 @@ ext2_extattr_block_delete(struct inode * struct buf *bp; struct ext2fs_extattr_header *header; struct ext2fs_extattr_entry *entry; + const char *attr_name; + int name_len; int error; fs = ip->i_e2fs; @@ -555,9 +680,20 @@ ext2_extattr_block_delete(struct inode * /* If I am last entry, clean me and free the block */ entry = EXT2_FIRST_ENTRY(bp); - if (EXT2_IS_LAST_ENTRY(EXT2_EXTATTR_NEXT(entry))) { - if (strlen(name) == entry->e_name_len && - 0 == strncmp(entry->e_name, name, entry->e_name_len)) { + if (EXT2_IS_LAST_ENTRY(EXT2_EXTATTR_NEXT(entry)) && + (ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) == + attrnamespace)) { + + name_len = entry->e_name_len; + attr_name = ext2_extattr_name_to_bsd(entry->e_name_index, + entry->e_name, &name_len); + if (!attr_name) { + brelse(bp); + return (ENOTSUP); + } + + if (strlen(name) == name_len && + 0 == strncmp(attr_name, name, name_len)) { ip->i_blocks -= btodb(fs->e2fs_bsize); ext2_blkfree(ip, ip->i_facl, fs->e2fs_bsize); ip->i_facl = 0; @@ -570,11 +706,20 @@ ext2_extattr_block_delete(struct inode * for (entry = EXT2_FIRST_ENTRY(bp); !EXT2_IS_LAST_ENTRY(entry); entry = EXT2_EXTATTR_NEXT(entry)) { - if (ext2_extattr_index_to_bsd(entry->e_name_index) != attrnamespace) + if (ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) != + attrnamespace) continue; - if (strlen(name) == entry->e_name_len && - 0 == strncmp(entry->e_name, name, entry->e_name_len)) { + name_len = entry->e_name_len; + attr_name = ext2_extattr_name_to_bsd(entry->e_name_index, + entry->e_name, &name_len); + if (!attr_name) { + brelse(bp); + return (ENOTSUP); + } + + if (strlen(name) == name_len && + 0 == strncmp(attr_name, name, name_len)) { ext2_extattr_delete_entry(bp->b_data, EXT2_FIRST_ENTRY(bp), entry, bp->b_data + bp->b_bufsize); @@ -592,15 +737,18 @@ static struct ext2fs_extattr_entry * allocate_entry(const char *name, int attrnamespace, uint16_t offs, uint32_t size, uint32_t hash) { - size_t name_len; + const char *attr_name; + int name_len; struct ext2fs_extattr_entry *entry; - name_len = strlen(name); + attr_name = ext2_extattr_name_to_linux(attrnamespace, name); + name_len = strlen(attr_name); + entry = malloc(sizeof(struct ext2fs_extattr_entry) + name_len, M_TEMP, M_WAITOK); entry->e_name_len = name_len; - entry->e_name_index = ext2_extattr_index_to_linux(attrnamespace); + entry->e_name_index = ext2_extattr_attrnamespace_to_linux(attrnamespace, name); entry->e_value_offs = offs; entry->e_value_block = 0; entry->e_value_size = size; @@ -727,6 +875,8 @@ ext2_extattr_inode_set(struct inode *ip, struct buf *bp; struct ext2fs_extattr_dinode_header *header; struct ext2fs_extattr_entry *entry; + const char *attr_name; + int name_len; size_t size = 0, max_size; int error; @@ -762,11 +912,20 @@ ext2_extattr_inode_set(struct inode *ip, /* Find if entry exist */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun May 28 16:41:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68BF5D85675; Sun, 28 May 2017 16:41:43 +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 390891AF5; Sun, 28 May 2017 16:41:43 +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 v4SGfgha088232; Sun, 28 May 2017 16:41:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SGfgFJ088231; Sun, 28 May 2017 16:41:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705281641.v4SGfgFJ088231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 28 May 2017 16:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319072 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 16:41:43 -0000 Author: trasz Date: Sun May 28 16:41:42 2017 New Revision: 319072 URL: https://svnweb.freebsd.org/changeset/base/319072 Log: Make ctld(8) mention cfiscsi(4). MFC after: 2 weeks Modified: head/usr.sbin/ctld/ctld.8 Modified: head/usr.sbin/ctld/ctld.8 ============================================================================== --- head/usr.sbin/ctld/ctld.8 Sun May 28 15:39:11 2017 (r319071) +++ head/usr.sbin/ctld/ctld.8 Sun May 28 16:41:42 2017 (r319072) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2016 +.Dd May 28, 2017 .Dt CTLD 8 .Os .Sh NAME @@ -55,7 +55,9 @@ instances, removes LUNs no longer existi and creates new LUNs as necessary. After that it listens for the incoming iSCSI connections, performs authentication, and, if successful, passes the connections to the kernel part -of CTL iSCSI target, which handles it from that point. +of CTL iSCSI target, +.Xr cfiscsi 4 , +which handles it from that point. .Pp When it receives a SIGHUP signal, the .Nm @@ -105,6 +107,7 @@ The .Nm utility exits 0 on success, and >0 if an error occurs. .Sh SEE ALSO +.Xr cfiscsi 4 , .Xr ctl 4 , .Xr ctl.conf 5 , .Xr ctladm 8 , From owner-svn-src-all@freebsd.org Sun May 28 16:53:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D67FD85A3E; Sun, 28 May 2017 16:53:23 +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 2CE211204; Sun, 28 May 2017 16:53:23 +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 v4SGrMwj095393; Sun, 28 May 2017 16:53:22 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SGrMk7095392; Sun, 28 May 2017 16:53:22 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705281653.v4SGrMk7095392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 28 May 2017 16:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319073 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 16:53:23 -0000 Author: trasz Date: Sun May 28 16:53:21 2017 New Revision: 319073 URL: https://svnweb.freebsd.org/changeset/base/319073 Log: Random tweaks to cfiscsi(4) man page. MFC after: 2 weeks Modified: head/share/man/man4/cfiscsi.4 Modified: head/share/man/man4/cfiscsi.4 ============================================================================== --- head/share/man/man4/cfiscsi.4 Sun May 28 16:41:42 2017 (r319072) +++ head/share/man/man4/cfiscsi.4 Sun May 28 16:53:21 2017 (r319073) @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd March 29, 2017 +.Dd May 28, 2017 .Dt CFISCSI 4 .Os .Sh NAME @@ -50,9 +50,15 @@ cfiscsi_load="YES" .Sh DESCRIPTION The .Nm -subsystem provides iSCSI target device emulation via +subsystem provides the kernel component of an iSCSI target. +The target is the iSCSI server, providing LUNs backed by local files +and volumes to remote initiators. +The userspace component is provided by +.Xr ctld 8 . +.Nm +is implemented as a .Xr ctl 4 -and +frontend and uses infrastructure provided by .Xr iscsi 4 . .Sh SYSCTL VARIABLES The following variables are available as both @@ -80,7 +86,9 @@ Defaults to 5. .El .Sh SEE ALSO .Xr ctl 4 , -.Xr iscsi 4 +.Xr iscsi 4 , +.Xr ctl.conf 5 , +.Xr ctld 8 .Sh HISTORY The .Nm From owner-svn-src-all@freebsd.org Sun May 28 17:02:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5859ED85F96; Sun, 28 May 2017 17:02:31 +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 0D06C1971; Sun, 28 May 2017 17:02:30 +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 v4SH2UPY099859; Sun, 28 May 2017 17:02:30 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SH2TjS099857; Sun, 28 May 2017 17:02:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705281702.v4SH2TjS099857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 28 May 2017 17:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319074 - in head: share/man/man4 usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 17:02:31 -0000 Author: trasz Date: Sun May 28 17:02:29 2017 New Revision: 319074 URL: https://svnweb.freebsd.org/changeset/base/319074 Log: Minor tweaks to iscsi(4) and iscsid(8). MFC after: 2 weeks Modified: head/share/man/man4/iscsi.4 head/usr.sbin/iscsid/iscsid.8 Modified: head/share/man/man4/iscsi.4 ============================================================================== --- head/share/man/man4/iscsi.4 Sun May 28 16:53:21 2017 (r319073) +++ head/share/man/man4/iscsi.4 Sun May 28 17:02:29 2017 (r319074) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 11, 2015 +.Dd May 28, 2017 .Dt ISCSI 4 .Os .Sh NAME @@ -46,18 +46,14 @@ iscsi_load="YES" .Sh DESCRIPTION The .Nm -subsystem provides the kernel component of an iSCSI initiator. +subsystem provides the kernel component of an iSCSI initiator, +responsible for implementing the Full Feature Phase of the iSCSI protocol. The initiator is the iSCSI client, which connects to an iSCSI target, providing local access to a remote block device. The userland component is provided by .Xr iscsid 8 and both the kernel and userland are configured using .Xr iscsictl 8 . -The -.Nm -subsystem is responsible for implementing the -.Qq Full Feature Phase -of the iSCSI protocol. .Sh SYSCTL VARIABLES The following variables are available as both .Xr sysctl 8 Modified: head/usr.sbin/iscsid/iscsid.8 ============================================================================== --- head/usr.sbin/iscsid/iscsid.8 Sun May 28 16:53:21 2017 (r319073) +++ head/usr.sbin/iscsid/iscsid.8 Sun May 28 17:02:29 2017 (r319074) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd May 28, 2017 .Dt ISCSID 8 .Os .Sh NAME @@ -43,12 +43,15 @@ .Sh DESCRIPTION The .Nm -daemon is responsible for performing the Login Phase of iSCSI connections, -as well as performing SendTargets discovery. +daemon is the userspace component of the iSCSI initiator, +responsible for performing the Login Phase +of iSCSI connections and the SendTargets discovery. .Pp Upon startup, the .Nm -daemon opens the iSCSI initiator device file and waits for kernel requests. +daemon opens the iSCSI initiator device file and waits for requests +from the kernel component, +.Xr iscsi 4 . .Nm does not use any configuration files. All needed information is supplied by the kernel. From owner-svn-src-all@freebsd.org Sun May 28 17:13:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46DADD8543F; Sun, 28 May 2017 17:13:40 +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 16E661016; Sun, 28 May 2017 17:13:40 +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 v4SHDdxE004023; Sun, 28 May 2017 17:13:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SHDdqx004022; Sun, 28 May 2017 17:13:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705281713.v4SHDdqx004022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 28 May 2017 17:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319075 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 17:13:40 -0000 Author: trasz Date: Sun May 28 17:13:38 2017 New Revision: 319075 URL: https://svnweb.freebsd.org/changeset/base/319075 Log: Random tweaks to rctl(8). MFC after: 2 weeks Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Sun May 28 17:02:29 2017 (r319074) +++ head/usr.bin/rctl/rctl.8 Sun May 28 17:13:38 2017 (r319075) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 30, 2016 +.Dd may 28, 2017 .Dt RCTL 8 .Os .Sh NAME @@ -84,7 +84,7 @@ Remove rules matching .Ar filter from the RCTL database. .It Fl u Ar filter -Display resource usage for a subject +Display resource utilization for a subject .Po .Sy process , .Sy user , @@ -173,7 +173,6 @@ resource would be "::maxproc". .Sh SUBJECTS .Bl -column -offset 3n "pseudoterminals" ".Sy username or numerical User ID" -.It Em subject Ta Em subject-id .It Sy process Ta numerical Process ID .It Sy user Ta user name or numerical User ID .It Sy loginclass Ta login class from @@ -182,7 +181,6 @@ resource would be .El .Sh RESOURCES .Bl -column -offset 3n "pseudoterminals" -.It Em resource .It Sy cputime Ta "CPU time, in seconds" .It Sy datasize Ta "data size, in bytes" .It Sy stacksize Ta "stack size, in bytes" @@ -211,7 +209,6 @@ resource would be .El .Sh ACTIONS .Bl -column -offset 3n "pseudoterminals" -.It Em action .It Sy deny Ta deny the allocation; not supported for .Sy cputime , .Sy wallclock , @@ -269,7 +266,7 @@ Prevent user "joe" from allocating more Remove all RCTL rules: .Dl Nm Fl r Ar \&: .Pp -Display resource usage information for jail named "www": +Display resource utilization information for jail named "www": .Dl Nm Fl hu Ar jail:www .Pp Display all the rules applicable to process with PID 512: From owner-svn-src-all@freebsd.org Sun May 28 17:25:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B878D8596C; Sun, 28 May 2017 17:25:48 +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 6840E195F; Sun, 28 May 2017 17:25:48 +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 v4SHPl5r008358; Sun, 28 May 2017 17:25:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SHPlUO008355; Sun, 28 May 2017 17:25:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705281725.v4SHPlUO008355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 28 May 2017 17:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319076 - in head: share/man/man4 usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 17:25:48 -0000 Author: trasz Date: Sun May 28 17:25:47 2017 New Revision: 319076 URL: https://svnweb.freebsd.org/changeset/base/319076 Log: Declutter rctl(8) by moving kernel build instructions into newly created rctl(4). MFC after: 2 weeks Added: head/share/man/man4/rctl.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/usr.bin/rctl/rctl.8 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun May 28 17:13:38 2017 (r319075) +++ head/share/man/man4/Makefile Sun May 28 17:25:47 2017 (r319076) @@ -427,6 +427,7 @@ MAN= aac.4 \ ral.4 \ random.4 \ rc.4 \ + rctl.4 \ re.4 \ rgephy.4 \ rights.4 \ Added: head/share/man/man4/rctl.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/rctl.4 Sun May 28 17:25:47 2017 (r319076) @@ -0,0 +1,74 @@ +.\" Copyright (c) 2017 Edward Tomasz Napierala +.\" 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 May 28, 2017 +.Dt RCTL 4 +.Os +.Sh NAME +.Nm rctl +.Nd resource limits +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options RACCT" +.Cd "options RCTL" +.Ed +.Sh DESCRIPTION +The +.Nm +subsystem provides a flexible resource limits mechanism, +controlled by a set of rules that can be added or removed at runtime +using the +.Xr rctl 8 +management utility. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt, or +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va kern.racct.enable: No 1 +Enable +.Nm . +This defaults to 1, unless +.Cd "options RACCT_DEFAULT_TO_DISABLED" +is set in the kernel configuration file. +.El +.Sh SEE ALSO +.Xr rctl.conf 5 , +.Xr rctl 8 +.Sh HISTORY +The +.Nm +subsystem first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +subsystem was developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Sun May 28 17:13:38 2017 (r319075) +++ head/usr.bin/rctl/rctl.8 Sun May 28 17:25:47 2017 (r319076) @@ -51,13 +51,6 @@ .Fl u .Op Fl h .Ar filter Ar ... -.Pp -.Nm -requires the kernel to be compiled with: -.Bd -ragged -offset indent -.Cd "options RACCT" -.Cd "options RCTL" -.Ed .Sh DESCRIPTION When called without options, the .Nm @@ -244,19 +237,6 @@ and Not all actions are supported for all resources. Attempting to add a rule with an action not supported by a given resource will result in error. -.Sh LOADER TUNABLES -Tunables can be set at the -.Xr loader 8 -prompt, or -.Xr loader.conf 5 . -.Bl -tag -width indent -.It Va kern.racct.enable: No 1 -Enable -.Nm . -This defaults to 1, unless -.Cd "options RACCT_DEFAULT_TO_DISABLED" -is set in the kernel configuration file. -.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES @@ -281,6 +261,7 @@ Display all rules matching user "joe": Display all rules matching login classes: .Dl Nm Ar loginclass: .Sh SEE ALSO +.Xr rctl 4 , .Xr rctl.conf 5 .Sh HISTORY The From owner-svn-src-all@freebsd.org Sun May 28 17:48:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2B17D85E0D; Sun, 28 May 2017 17:48: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 9734D1215; Sun, 28 May 2017 17:48: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 v4SHmsJT016676; Sun, 28 May 2017 17:48:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SHmsaU016675; Sun, 28 May 2017 17:48:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705281748.v4SHmsaU016675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 28 May 2017 17:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319077 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 17:48:55 -0000 Author: pfg Date: Sun May 28 17:48:54 2017 New Revision: 319077 URL: https://svnweb.freebsd.org/changeset/base/319077 Log: Fix potential memory leak. Moving the allocation forward, just before it's actually needed, seems sensible. Add newline character at the last line while here. Reported by: pluknet Differential Revision: https://reviews.freebsd.org/D10974 Modified: head/sys/fs/ext2fs/ext2_acl.c Modified: head/sys/fs/ext2fs/ext2_acl.c ============================================================================== --- head/sys/fs/ext2fs/ext2_acl.c Sun May 28 17:25:47 2017 (r319076) +++ head/sys/fs/ext2fs/ext2_acl.c Sun May 28 17:48:54 2017 (r319077) @@ -210,11 +210,6 @@ ext2_getacl_posix1e(struct vop_getacl_ar int len; int error; - len = sizeof(*ap->a_aclp) + sizeof(struct ext2_acl_header); - value = malloc(len, M_ACL, M_WAITOK); - if (!value) - return (ENOMEM); - switch (ap->a_type) { case ACL_TYPE_DEFAULT: attrnamespace = POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE; @@ -228,6 +223,11 @@ ext2_getacl_posix1e(struct vop_getacl_ar return (EINVAL); } + len = sizeof(*ap->a_aclp) + sizeof(struct ext2_acl_header); + value = malloc(len, M_ACL, M_WAITOK); + if (!value) + return (ENOMEM); + error = vn_extattr_get(ap->a_vp, IO_NODELOCKED, attrnamespace, attrname, &len, value, ap->a_td); switch (error) { @@ -518,4 +518,4 @@ ext2_aclcheck(struct vop_aclcheck_args * } return (acl_posix1e_check(ap->a_aclp)); -} \ No newline at end of file +} From owner-svn-src-all@freebsd.org Sun May 28 17:50:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75D8ED85E9E; Sun, 28 May 2017 17:50:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 480F91384; Sun, 28 May 2017 17:50:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4SHoTdS016791; Sun, 28 May 2017 17:50:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SHoTbp016790; Sun, 28 May 2017 17:50:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705281750.v4SHoTbp016790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 28 May 2017 17:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319078 - head/tests/sys/file X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 17:50:30 -0000 Author: ngie Date: Sun May 28 17:50:29 2017 New Revision: 319078 URL: https://svnweb.freebsd.org/changeset/base/319078 Log: Tweak r319058 slightly - Specify an explicit mode when using O_CREAT per open(2). - Fix the error message (add missing enclosing parentheses). Submitted by: jilles MFC after: 3 days MFC with: r319058 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/file/ftruncate_test.c Modified: head/tests/sys/file/ftruncate_test.c ============================================================================== --- head/tests/sys/file/ftruncate_test.c Sun May 28 17:48:54 2017 (r319077) +++ head/tests/sys/file/ftruncate_test.c Sun May 28 17:50:29 2017 (r319078) @@ -75,9 +75,9 @@ main(void) * Save a read-only reference to the file to use later for read-only * descriptor tests. */ - fd = open(path, O_RDWR|O_CREAT); + fd = open(path, O_RDWR|O_CREAT, 0600); if (fd < 0) - err(1, "open(%s, O_RDWR|O_CREAT", path); + err(1, "open(%s, O_RDWR|O_CREAT, 0600)", path); read_only_fd = open(path, O_RDONLY); if (read_only_fd < 0) { error = errno; From owner-svn-src-all@freebsd.org Sun May 28 18:07:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 277B6D86305; Sun, 28 May 2017 18:07:55 +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 D1A7B1CD3; Sun, 28 May 2017 18:07:54 +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 v4SI7r29024556; Sun, 28 May 2017 18:07:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SI7r4X024552; Sun, 28 May 2017 18:07:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705281807.v4SI7r4X024552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 28 May 2017 18:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319079 - in head: . sbin/mount share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 18:07:55 -0000 Author: trasz Date: Sun May 28 18:07:53 2017 New Revision: 319079 URL: https://svnweb.freebsd.org/changeset/base/319079 Log: Move mount.conf(8) to mount.conf(5); it's a kernel configuration file and not an administrative utility. MFC after: 2 weeks Added: head/share/man/man5/mount.conf.5 - copied, changed from r319078, head/sbin/mount/mount.conf.8 Deleted: head/sbin/mount/mount.conf.8 Modified: head/ObsoleteFiles.inc head/sbin/mount/Makefile head/share/man/man5/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun May 28 17:50:29 2017 (r319078) +++ head/ObsoleteFiles.inc Sun May 28 18:07:53 2017 (r319079) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170529: mount.conf(8) -> mount.conf(5) +OLD_FILES+=usr/share/man/man8/mount.conf.8.gz # 20170525: remove misleading template OLD_FILES+=usr/share/misc/man.template # 20170525: disconnect the roff docs from the build Modified: head/sbin/mount/Makefile ============================================================================== --- head/sbin/mount/Makefile Sun May 28 17:50:29 2017 (r319078) +++ head/sbin/mount/Makefile Sun May 28 18:07:53 2017 (r319079) @@ -4,7 +4,7 @@ PACKAGE=runtime PROG= mount SRCS= mount.c mount_fs.c getmntopts.c vfslist.c -MAN= mount.8 mount.conf.8 +MAN= mount.8 # We do NOT install the getmntopts.3 man page. LIBADD= util Modified: head/share/man/man5/Makefile ============================================================================== --- head/share/man/man5/Makefile Sun May 28 17:50:29 2017 (r319078) +++ head/share/man/man5/Makefile Sun May 28 18:07:53 2017 (r319079) @@ -40,6 +40,7 @@ MAN= acct.5 \ make.conf.5 \ moduli.5 \ motd.5 \ + mount.conf.5 \ mqueuefs.5 \ msdosfs.5 \ networks.5 \ Copied and modified: head/share/man/man5/mount.conf.5 (from r319078, head/sbin/mount/mount.conf.8) ============================================================================== --- head/sbin/mount/mount.conf.8 Sun May 28 17:50:29 2017 (r319078, copy source) +++ head/share/man/man5/mount.conf.5 Sun May 28 18:07:53 2017 (r319079) @@ -27,7 +27,7 @@ .\" .\" .Dd October 17, 2013 -.Dt MOUNT.CONF 8 +.Dt MOUNT.CONF 5 .Os .Sh NAME .Nm mount.conf From owner-svn-src-all@freebsd.org Sun May 28 18:09:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5A53D8639B; Sun, 28 May 2017 18:09:50 +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 A5D4D1E2C; Sun, 28 May 2017 18:09:50 +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 v4SI9nH7024665; Sun, 28 May 2017 18:09:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SI9nT2024664; Sun, 28 May 2017 18:09:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705281809.v4SI9nT2024664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 28 May 2017 18:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319080 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 18:09:50 -0000 Author: trasz Date: Sun May 28 18:09:49 2017 New Revision: 319080 URL: https://svnweb.freebsd.org/changeset/base/319080 Log: Fix Xrs; they were pointing to the wrong section. MFC after: 2 weeks Modified: head/share/man/man5/mount.conf.5 Modified: head/share/man/man5/mount.conf.5 ============================================================================== --- head/share/man/man5/mount.conf.5 Sun May 28 18:07:53 2017 (r319079) +++ head/share/man/man5/mount.conf.5 Sun May 28 18:09:49 2017 (r319080) @@ -52,7 +52,7 @@ The logic for this is in .Fn vfs_mountroot_conf0 . .It The kernel will first mount -.Xr devfs 8 +.Xr devfs 5 as the root file system. .It Next, the kernel will parse the in-memory config file created in step 1 @@ -224,7 +224,7 @@ For each root file system which is mount directory .Em must exist so that the root mount logic can properly re-mount -.Xr devfs 8 . +.Xr devfs 5 . If this directory does not exist, the system may hang during the bootup process. .Sh SEE ALSO From owner-svn-src-all@freebsd.org Sun May 28 18:13:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D8ECD8672E; Sun, 28 May 2017 18:13:45 +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 3DD6D1395; Sun, 28 May 2017 18:13:45 +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 v4SIDiSt028665; Sun, 28 May 2017 18:13:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SIDiIw028664; Sun, 28 May 2017 18:13:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705281813.v4SIDiIw028664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 28 May 2017 18:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319081 - head/sbin/reboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 18:13:45 -0000 Author: trasz Date: Sun May 28 18:13:44 2017 New Revision: 319081 URL: https://svnweb.freebsd.org/changeset/base/319081 Log: .Xr mount.conf(5) from boot(8). MFC after: 2 weeks Modified: head/sbin/reboot/boot_i386.8 Modified: head/sbin/reboot/boot_i386.8 ============================================================================== --- head/sbin/reboot/boot_i386.8 Sun May 28 18:09:49 2017 (r319080) +++ head/sbin/reboot/boot_i386.8 Sun May 28 18:13:44 2017 (r319081) @@ -350,6 +350,7 @@ requirement has not been adhered to. .Xr ddb 4 , .Xr boot.config 5 , .Xr make.conf 5 , +.Xr mount.conf 5 , .Xr ttys 5 , .Xr boot0cfg 8 , .Xr btxld 8 , From owner-svn-src-all@freebsd.org Sun May 28 18:18:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FD43D868C2; Sun, 28 May 2017 18:18:03 +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 05714164B; Sun, 28 May 2017 18:18:02 +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 v4SII23g028854; Sun, 28 May 2017 18:18:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SII2hu028853; Sun, 28 May 2017 18:18:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705281818.v4SII2hu028853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 28 May 2017 18:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319082 - stable/11/contrib/llvm/lib/Target/PowerPC X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 18:18:03 -0000 Author: dim Date: Sun May 28 18:18:01 2017 New Revision: 319082 URL: https://svnweb.freebsd.org/changeset/base/319082 Log: MFC r318906: Pull in r303257 from upstream llvm trunk (by Krzysztof Parzyszek) [PPC] Properly update register save area offsets The variables MinGPR/MinG8R were not updated properly when resetting the offsets, which in the included testcase lead to saving the CR register in the same location as R30. This fixes another issue reported in PR26519. Differential Revision: https://reviews.llvm.org/D33017 Reported by: Mark Millard PR: 206990 Modified: stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Sun May 28 18:13:44 2017 (r319081) +++ stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Sun May 28 18:18:01 2017 (r319082) @@ -1775,32 +1775,37 @@ void PPCFrameLowering::processFunctionBe // Check whether the frame pointer register is allocated. If so, make sure it // is spilled to the correct offset. if (needsFP(MF)) { - HasGPSaveArea = true; - int FI = PFI->getFramePointerSaveIndex(); assert(FI && "No Frame Pointer Save Slot!"); - MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); + // FP is R31/X31, so no need to update MinGPR/MinG8R. + HasGPSaveArea = true; } if (PFI->usesPICBase()) { - HasGPSaveArea = true; - int FI = PFI->getPICBasePointerSaveIndex(); assert(FI && "No PIC Base Pointer Save Slot!"); - MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); + + MinGPR = std::min(MinGPR, PPC::R30); + HasGPSaveArea = true; } const PPCRegisterInfo *RegInfo = static_cast(Subtarget.getRegisterInfo()); if (RegInfo->hasBasePointer(MF)) { - HasGPSaveArea = true; - int FI = PFI->getBasePointerSaveIndex(); assert(FI && "No Base Pointer Save Slot!"); - MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); + + unsigned BP = RegInfo->getBaseRegister(MF); + if (PPC::G8RCRegClass.contains(BP)) { + MinG8R = std::min(MinG8R, BP); + HasG8SaveArea = true; + } else if (PPC::GPRCRegClass.contains(BP)) { + MinGPR = std::min(MinGPR, BP); + HasGPSaveArea = true; + } } // General register save area starts right below the Floating-point From owner-svn-src-all@freebsd.org Sun May 28 18:31:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5866CD86BE8; Sun, 28 May 2017 18:31:15 +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 1E0FE1C03; Sun, 28 May 2017 18:31:15 +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 v4SIVEYG033827; Sun, 28 May 2017 18:31:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SIVE5v033826; Sun, 28 May 2017 18:31:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705281831.v4SIVE5v033826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 28 May 2017 18:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319083 - head/sys/boot/i386/pxeldr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 18:31:15 -0000 Author: bapt Date: Sun May 28 18:31:13 2017 New Revision: 319083 URL: https://svnweb.freebsd.org/changeset/base/319083 Log: Followup on the user-class changes Reported by: Jose Luis Duran (via github) Modified: head/sys/boot/i386/pxeldr/pxeboot.8 Modified: head/sys/boot/i386/pxeldr/pxeboot.8 ============================================================================== --- head/sys/boot/i386/pxeldr/pxeboot.8 Sun May 28 18:18:01 2017 (r319082) +++ head/sys/boot/i386/pxeldr/pxeboot.8 Sun May 28 18:31:13 2017 (r319083) @@ -74,7 +74,7 @@ max-lease-time 120; subnet 10.0.0.0 netmask 255.255.255.0 { filename "pxeboot"; range 10.0.0.10 10.0.0.254; - if exists user-class and option user-class = "FREEBSD" { + if exists user-class and option user-class = "FreeBSD" { option root-path "tftp://10.0.0.1/FreeBSD"; } } From owner-svn-src-all@freebsd.org Sun May 28 21:20:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43A7BD85BD3; Sun, 28 May 2017 21:20:57 +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 158DD19C9; Sun, 28 May 2017 21:20:57 +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 v4SLKuX8002860; Sun, 28 May 2017 21:20:56 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SLKuoD002859; Sun, 28 May 2017 21:20:56 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201705282120.v4SLKuoD002859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 28 May 2017 21:20:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319084 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 21:20:57 -0000 Author: tsoome Date: Sun May 28 21:20:55 2017 New Revision: 319084 URL: https://svnweb.freebsd.org/changeset/base/319084 Log: Small cleanup in dev_net.c The variable servip is unused. One leftover printf and small cstyle nit. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D10980 Modified: head/sys/boot/common/dev_net.c Modified: head/sys/boot/common/dev_net.c ============================================================================== --- head/sys/boot/common/dev_net.c Sun May 28 18:31:13 2017 (r319083) +++ head/sys/boot/common/dev_net.c Sun May 28 21:20:55 2017 (r319084) @@ -256,7 +256,6 @@ net_getparams(int sock) { char buf[MAXHOSTNAMELEN]; n_long rootaddr, smask; - extern struct in_addr servip; #ifdef SUPPORT_BOOTP /* @@ -421,8 +420,8 @@ net_parse_rootpath() val = strchr(ptr, '/'); if (val != NULL) { snprintf(ip, sizeof(ip), "%.*s", - (int)((uintptr_t)val - (uintptr_t)ptr), ptr); - printf("%s\n", ip); + (int)((uintptr_t)val - (uintptr_t)ptr), + ptr); addr = inet_addr(ip); bcopy(val, rootpath, strlen(val) + 1); } From owner-svn-src-all@freebsd.org Sun May 28 21:30:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AA1CD85E3A; Sun, 28 May 2017 21:30: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 2DE4F1F53; Sun, 28 May 2017 21:30: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 v4SLU1nU006717; Sun, 28 May 2017 21:30:01 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SLU1FX006716; Sun, 28 May 2017 21:30:01 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201705282130.v4SLU1FX006716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 28 May 2017 21:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319085 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 21:30:02 -0000 Author: tsoome Date: Sun May 28 21:30:01 2017 New Revision: 319085 URL: https://svnweb.freebsd.org/changeset/base/319085 Log: use the same option list for dhcp discovery and request The DHCP client is supposed to use the same option request list for both DHCP discovery and request. This will also allow us to fill the list in single function. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D10981 Modified: head/lib/libstand/bootp.c Modified: head/lib/libstand/bootp.c ============================================================================== --- head/lib/libstand/bootp.c Sun May 28 21:20:55 2017 (r319084) +++ head/lib/libstand/bootp.c Sun May 28 21:30:01 2017 (r319085) @@ -93,6 +93,35 @@ struct in_addr dhcp_serverip; struct bootp *bootp_response; size_t bootp_response_size; +static void +bootp_fill_request(unsigned char *bp_vend) +{ + /* + * We are booting from PXE, we want to send the string + * 'PXEClient' to the DHCP server so you have the option of + * only responding to PXE aware dhcp requests. + */ + bp_vend[0] = TAG_CLASSID; + bp_vend[1] = 9; + bcopy("PXEClient", &bp_vend[2], 9); + bp_vend[11] = TAG_USER_CLASS; + /* len of each user class + number of user class */ + bp_vend[12] = 8; + /* len of the first user class */ + bp_vend[13] = 7; + bcopy("FreeBSD", &bp_vend[14], 7); + bp_vend[21] = TAG_PARAM_REQ; + bp_vend[22] = 7; + bp_vend[23] = TAG_ROOTPATH; + bp_vend[24] = TAG_HOSTNAME; + bp_vend[25] = TAG_SWAPSERVER; + bp_vend[26] = TAG_GATEWAY; + bp_vend[27] = TAG_SUBNET_MASK; + bp_vend[28] = TAG_INTF_MTU; + bp_vend[29] = TAG_SERVERID; + bp_vend[30] = TAG_END; +} + /* Fetch required bootp infomation */ void bootp(int sock) @@ -136,31 +165,8 @@ bootp(int sock) bp->bp_vend[4] = TAG_DHCP_MSGTYPE; bp->bp_vend[5] = 1; bp->bp_vend[6] = DHCPDISCOVER; + bootp_fill_request(&bp->bp_vend[7]); - /* - * We are booting from PXE, we want to send the string - * 'PXEClient' to the DHCP server so you have the option of - * only responding to PXE aware dhcp requests. - */ - bp->bp_vend[7] = TAG_CLASSID; - bp->bp_vend[8] = 9; - bcopy("PXEClient", &bp->bp_vend[9], 9); - bp->bp_vend[18] = TAG_USER_CLASS; - /* len of each user class + number of user class */ - bp->bp_vend[19] = 8; - /* len of the first user class */ - bp->bp_vend[20] = 7; - bcopy("FreeBSD", &bp->bp_vend[21], 7); - bp->bp_vend[28] = TAG_PARAM_REQ; - bp->bp_vend[29] = 7; - bp->bp_vend[30] = TAG_ROOTPATH; - bp->bp_vend[31] = TAG_HOSTNAME; - bp->bp_vend[32] = TAG_SWAPSERVER; - bp->bp_vend[33] = TAG_GATEWAY; - bp->bp_vend[34] = TAG_SUBNET_MASK; - bp->bp_vend[35] = TAG_INTF_MTU; - bp->bp_vend[36] = TAG_SERVERID; - bp->bp_vend[37] = TAG_END; #else bp->bp_vend[4] = TAG_END; #endif @@ -196,10 +202,7 @@ bootp(int sock) bp->bp_vend[20] = 4; leasetime = htonl(300); bcopy(&leasetime, &bp->bp_vend[21], 4); - bp->bp_vend[25] = TAG_CLASSID; - bp->bp_vend[26] = 9; - bcopy("PXEClient", &bp->bp_vend[27], 9); - bp->bp_vend[36] = TAG_END; + bootp_fill_request(&bp->bp_vend[25]); expected_dhcpmsgtype = DHCPACK; From owner-svn-src-all@freebsd.org Sun May 28 21:42:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F31BAD862FD; Sun, 28 May 2017 21:42:48 +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 C520F17C0; Sun, 28 May 2017 21:42:48 +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 v4SLgltW014693; Sun, 28 May 2017 21:42:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SLglhx014692; Sun, 28 May 2017 21:42:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705282142.v4SLglhx014692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 28 May 2017 21:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319086 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 21:42:49 -0000 Author: kib Date: Sun May 28 21:42:47 2017 New Revision: 319086 URL: https://svnweb.freebsd.org/changeset/base/319086 Log: Mention that the basep argument to getdirentries(2) can be NULL. Noted by: dim Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D10972 Modified: head/lib/libc/sys/getdirentries.2 Modified: head/lib/libc/sys/getdirentries.2 ============================================================================== --- head/lib/libc/sys/getdirentries.2 Sun May 28 21:30:01 2017 (r319085) +++ head/lib/libc/sys/getdirentries.2 Sun May 28 21:42:47 2017 (r319086) @@ -125,7 +125,10 @@ or A value of zero is returned when the end of the directory has been reached. .Pp -The +If the +.Fa basep +pointer value is non-NULL , +the .Fn getdirentries system call writes the position of the block read into the location pointed to by .Fa basep . @@ -158,7 +161,7 @@ is not a valid file descriptor open for .It Bq Er EFAULT Either .Fa buf -or +or non-NULL .Fa basep point outside the allocated address space. .It Bq Er EINVAL From owner-svn-src-all@freebsd.org Sun May 28 22:38:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E88FD841A4; Sun, 28 May 2017 22:38:21 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 006801351; Sun, 28 May 2017 22:38:20 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4SMcK3Z034695; Sun, 28 May 2017 22:38:20 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SMcK8O034694; Sun, 28 May 2017 22:38:20 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201705282238.v4SMcK8O034694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 28 May 2017 22:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319087 - head/sys/dev/rtwn/rtl8192e/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 22:38:21 -0000 Author: avos Date: Sun May 28 22:38:19 2017 New Revision: 319087 URL: https://svnweb.freebsd.org/changeset/base/319087 Log: rtwn_usb: fix build with 'options RTWN_WITHOUT_UCODE' Modified: head/sys/dev/rtwn/rtl8192e/usb/r92eu_attach.c Modified: head/sys/dev/rtwn/rtl8192e/usb/r92eu_attach.c ============================================================================== --- head/sys/dev/rtwn/rtl8192e/usb/r92eu_attach.c Sun May 28 21:42:47 2017 (r319086) +++ head/sys/dev/rtwn/rtl8192e/usb/r92eu_attach.c Sun May 28 22:38:19 2017 (r319087) @@ -141,11 +141,13 @@ r92eu_attach(struct rtwn_usb_softc *uc) sc->sc_vap_preattach = rtwn_nop_softc_vap; sc->sc_postattach = rtwn_nop_softc; sc->sc_detach_private = r92e_detach_private; - sc->sc_set_media_status = r92e_set_media_status; #ifndef RTWN_WITHOUT_UCODE + sc->sc_set_media_status = r92e_set_media_status; sc->sc_set_rsvd_page = r88e_set_rsvd_page; sc->sc_set_pwrmode = r92e_set_pwrmode; sc->sc_set_rssi = rtwn_nop_softc; /* XXX TODO? */ +#else + sc->sc_set_media_status = rtwn_nop_softc_int; #endif sc->sc_beacon_init = r12a_beacon_init; sc->sc_beacon_enable = r92c_beacon_enable; From owner-svn-src-all@freebsd.org Sun May 28 22:51:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7205BD84528; Sun, 28 May 2017 22:51:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A00D18FB; Sun, 28 May 2017 22:51:08 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4SMp7KJ038892; Sun, 28 May 2017 22:51:07 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SMp7Jn038891; Sun, 28 May 2017 22:51:07 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201705282251.v4SMp7Jn038891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 28 May 2017 22:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319088 - head/sys/dev/rtwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 22:51:08 -0000 Author: avos Date: Sun May 28 22:51:06 2017 New Revision: 319088 URL: https://svnweb.freebsd.org/changeset/base/319088 Log: rtwn: fix connection problems with 'options RTWN_WITHOUT_UCODE' sc_set_media_status() callback may involve some generic code in addition to firmware-specific part (e.g., link status register setup for RTL8188E); so, remove 'RTWN_WITHOUT_UCODE' ifdefs around it. Tested with RTL8188CUS, RTL8188EU and RTL8821AU, STA mode. Modified: head/sys/dev/rtwn/if_rtwn.c Modified: head/sys/dev/rtwn/if_rtwn.c ============================================================================== --- head/sys/dev/rtwn/if_rtwn.c Sun May 28 22:38:19 2017 (r319087) +++ head/sys/dev/rtwn/if_rtwn.c Sun May 28 22:51:06 2017 (r319088) @@ -91,9 +91,9 @@ static struct ieee80211vap *rtwn_vap_cre static void rtwn_vap_delete(struct ieee80211vap *); static int rtwn_read_chipid(struct rtwn_softc *); static int rtwn_ioctl_reset(struct ieee80211vap *, u_long); -#ifndef RTWN_WITHOUT_UCODE static void rtwn_set_media_status(struct rtwn_softc *, union sec_param *); +#ifndef RTWN_WITHOUT_UCODE static int rtwn_tx_fwpkt_check(struct rtwn_softc *, struct ieee80211vap *); static int rtwn_construct_nulldata(struct rtwn_softc *, @@ -703,13 +703,13 @@ rtwn_ioctl_reset(struct ieee80211vap *va return (error); } -#ifndef RTWN_WITHOUT_UCODE static void rtwn_set_media_status(struct rtwn_softc *sc, union sec_param *data) { sc->sc_set_media_status(sc, data->macid); } +#ifndef RTWN_WITHOUT_UCODE static int rtwn_tx_fwpkt_check(struct rtwn_softc *sc, struct ieee80211vap *vap) { @@ -1743,11 +1743,9 @@ rtwn_newassoc(struct ieee80211_node *ni, return; } -#ifndef RTWN_WITHOUT_UCODE /* Notify firmware. */ id |= RTWN_MACID_VALID; rtwn_cmd_sleepable(sc, &id, sizeof(id), rtwn_set_media_status); -#endif } static void @@ -1759,10 +1757,8 @@ rtwn_node_free(struct ieee80211_node *ni RTWN_NT_LOCK(sc); if (un->id != RTWN_MACID_UNDEFINED) { sc->node_list[un->id] = NULL; -#ifndef RTWN_WITHOUT_UCODE rtwn_cmd_sleepable(sc, &un->id, sizeof(un->id), rtwn_set_media_status); -#endif } RTWN_NT_UNLOCK(sc); From owner-svn-src-all@freebsd.org Mon May 29 03:02:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62242D865DF; Mon, 29 May 2017 03:02:14 +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 CD6DC1ECF; Mon, 29 May 2017 03:02:13 +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 v4T322pN020241; Sun, 28 May 2017 20:02:02 -0700 (PDT) (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 v4T31xQk020240; Sun, 28 May 2017 20:01:59 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201705290301.v4T31xQk020240@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r319075 - head/usr.bin/rctl In-Reply-To: <201705281713.v4SHDdqx004022@repo.freebsd.org> To: Edward Tomasz Napierala Date: Sun, 28 May 2017 20:01:59 -0700 (PDT) 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 03:02:14 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: trasz > Date: Sun May 28 17:13:38 2017 > New Revision: 319075 > URL: https://svnweb.freebsd.org/changeset/base/319075 > > Log: > Random tweaks to rctl(8). Please try to be descriptive of what it is your tweaking, think about having to come back in 10 years and read the svn log trying to find some change and seeing this in the log not knowing if that is the tweak your looking for or not. ... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon May 29 03:09:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48107D86741; Mon, 29 May 2017 03:09:00 +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 9D5CC1103; Mon, 29 May 2017 03:08:59 +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 v4T38wLp020346; Sun, 28 May 2017 20:08:58 -0700 (PDT) (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 v4T38w6k020345; Sun, 28 May 2017 20:08:58 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201705290308.v4T38w6k020345@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r319080 - head/share/man/man5 In-Reply-To: <201705281809.v4SI9nT2024664@repo.freebsd.org> To: Edward Tomasz Napierala Date: Sun, 28 May 2017 20:08:58 -0700 (PDT) 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 03:09:00 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: trasz > Date: Sun May 28 18:09:49 2017 > New Revision: 319080 > URL: https://svnweb.freebsd.org/changeset/base/319080 > > Log: > Fix Xrs; they were pointing to the wrong section. > > MFC after: 2 weeks > > Modified: > head/share/man/man5/mount.conf.5 > > Modified: head/share/man/man5/mount.conf.5 > ============================================================================== > --- head/share/man/man5/mount.conf.5 Sun May 28 18:07:53 2017 (r319079) > +++ head/share/man/man5/mount.conf.5 Sun May 28 18:09:49 2017 (r319080) > @@ -52,7 +52,7 @@ The logic for this is in > .Fn vfs_mountroot_conf0 . > .It > The kernel will first mount > -.Xr devfs 8 > +.Xr devfs 5 > as the root file system. Um, no, devfs(8) is the command, devfs(5) is the config file that descripts what devfs(8) well do. This sentence does read very well to me: The kernel will first mount devfs(8) as the root file system? Neither devfs(8) or (5) is a file system one is a utility command and the other is a config file. > .It > Next, the kernel will parse the in-memory config file created in step 1 > @@ -224,7 +224,7 @@ For each root file system which is mount > directory > .Em must > exist so that the root mount logic can properly re-mount > -.Xr devfs 8 . > +.Xr devfs 5 . Ditto > If this directory does not exist, the system > may hang during the bootup process. > .Sh SEE ALSO > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon May 29 05:22:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C27FDD86358; Mon, 29 May 2017 05:22:35 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9263E161C; Mon, 29 May 2017 05:22:35 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T5MYdY004076; Mon, 29 May 2017 05:22:34 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T5MYrM004075; Mon, 29 May 2017 05:22:34 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705290522.v4T5MYrM004075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Mon, 29 May 2017 05:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319089 - stable/11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 05:22:35 -0000 Author: rpokala Date: Mon May 29 05:22:34 2017 New Revision: 319089 URL: https://svnweb.freebsd.org/changeset/base/319089 Log: MFC r318688: "struct ata_params" field "reserved206[2]" actually starts at offset 20*7*. Sponsored by: Panasas Modified: stable/11/sys/sys/ata.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/ata.h ============================================================================== --- stable/11/sys/sys/ata.h Sun May 28 22:51:06 2017 (r319088) +++ stable/11/sys/sys/ata.h Mon May 29 05:22:34 2017 (r319089) @@ -263,7 +263,7 @@ struct ata_params { u_int16_t reserved170[6]; /*176*/ u_int8_t media_serial[60]; /*206*/ u_int16_t sct; - u_int16_t reserved206[2]; + u_int16_t reserved207[2]; /*209*/ u_int16_t lsalign; /*210*/ u_int16_t wrv_sectors_m3_1; u_int16_t wrv_sectors_m3_2; From owner-svn-src-all@freebsd.org Mon May 29 05:23:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEBE2D863CE; Mon, 29 May 2017 05:23:10 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB4D71753; Mon, 29 May 2017 05:23:10 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T5N9En004139; Mon, 29 May 2017 05:23:09 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T5N9nf004138; Mon, 29 May 2017 05:23:09 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705290523.v4T5N9nf004138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Mon, 29 May 2017 05:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319090 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 05:23:11 -0000 Author: rpokala Date: Mon May 29 05:23:09 2017 New Revision: 319090 URL: https://svnweb.freebsd.org/changeset/base/319090 Log: MFC r318688: "struct ata_params" field "reserved206[2]" actually starts at offset 20*7*. Sponsored by: Panasas Modified: stable/10/sys/sys/ata.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/ata.h ============================================================================== --- stable/10/sys/sys/ata.h Mon May 29 05:22:34 2017 (r319089) +++ stable/10/sys/sys/ata.h Mon May 29 05:23:09 2017 (r319090) @@ -252,7 +252,7 @@ struct ata_params { u_int16_t reserved170[6]; /*176*/ u_int8_t media_serial[60]; /*206*/ u_int16_t sct; - u_int16_t reserved206[2]; + u_int16_t reserved207[2]; /*209*/ u_int16_t lsalign; /*210*/ u_int16_t wrv_sectors_m3_1; u_int16_t wrv_sectors_m3_2; From owner-svn-src-all@freebsd.org Mon May 29 06:17:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87C31D8605C; Mon, 29 May 2017 06:17:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [96.47.72.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCA31103F; Mon, 29 May 2017 06:17:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T6Fft0024535; Mon, 29 May 2017 06:15:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T6Ffuu024534; Mon, 29 May 2017 06:15:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705290615.v4T6Ffuu024534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 06:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319092 - stable/11/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 06:17:07 -0000 Author: ngie Date: Mon May 29 06:15:41 2017 New Revision: 319092 URL: https://svnweb.freebsd.org/changeset/base/319092 Log: MFC r318315: lib/libc/gen/realpath_test: make check result from getcwd(3) This is being done to avoid dereferencing a NULL pointer via strlcat, obscuring the underlying issue with the getcwd(3) call. Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_realpath.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_realpath.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_realpath.c Mon May 29 06:15:06 2017 (r319091) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_realpath.c Mon May 29 06:15:41 2017 (r319092) @@ -34,6 +34,9 @@ __RCSID("$NetBSD: t_realpath.c,v 1.2 201 #include #include +#ifdef __FreeBSD__ +#include +#endif #include #include #include @@ -122,8 +125,15 @@ ATF_TC_BODY(realpath_symlink, tc) char resb[MAXPATHLEN] = { 0 }; int fd; +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(getcwd(path, sizeof(path)) != NULL, + "getcwd(path) failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(getcwd(slnk, sizeof(slnk)) != NULL, + "getcwd(slnk) failed: %s", strerror(errno)); +#else (void)getcwd(path, sizeof(path)); (void)getcwd(slnk, sizeof(slnk)); +#endif (void)strlcat(path, "/realpath", sizeof(path)); (void)strlcat(slnk, "/symbolic", sizeof(slnk)); From owner-svn-src-all@freebsd.org Mon May 29 06:22:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2771C6E19B; Mon, 29 May 2017 06:22:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67A02156; Mon, 29 May 2017 06:22:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T6MChA028240; Mon, 29 May 2017 06:22:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T6MCaQ028220; Mon, 29 May 2017 06:22:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705290622.v4T6MCaQ028220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 06:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319093 - stable/10/contrib/netbsd-tests/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 06:22:14 -0000 Author: ngie Date: Mon May 29 06:22:12 2017 New Revision: 319093 URL: https://svnweb.freebsd.org/changeset/base/319093 Log: MFC r318315: lib/libc/gen/realpath_test: make check result from getcwd(3) This is being done to avoid dereferencing a NULL pointer via strlcat, obscuring the underlying issue with the getcwd(3) call. Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_realpath.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_realpath.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_realpath.c Mon May 29 06:15:41 2017 (r319092) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_realpath.c Mon May 29 06:22:12 2017 (r319093) @@ -34,6 +34,9 @@ __RCSID("$NetBSD: t_realpath.c,v 1.2 201 #include #include +#ifdef __FreeBSD__ +#include +#endif #include #include #include @@ -122,8 +125,15 @@ ATF_TC_BODY(realpath_symlink, tc) char resb[MAXPATHLEN] = { 0 }; int fd; +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(getcwd(path, sizeof(path)) != NULL, + "getcwd(path) failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(getcwd(slnk, sizeof(slnk)) != NULL, + "getcwd(slnk) failed: %s", strerror(errno)); +#else (void)getcwd(path, sizeof(path)); (void)getcwd(slnk, sizeof(slnk)); +#endif (void)strlcat(path, "/realpath", sizeof(path)); (void)strlcat(slnk, "/symbolic", sizeof(slnk)); From owner-svn-src-all@freebsd.org Mon May 29 06:26:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50035C7DCDB; Mon, 29 May 2017 06:26:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28C3D817; Mon, 29 May 2017 06:26:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T6PxLV028927; Mon, 29 May 2017 06:25:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T6Px8w028925; Mon, 29 May 2017 06:25:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705290625.v4T6Px8w028925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 06:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319094 - stable/10/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 06:26:00 -0000 Author: ngie Date: Mon May 29 06:25:59 2017 New Revision: 319094 URL: https://svnweb.freebsd.org/changeset/base/319094 Log: MFC r316179,r316180,r316181,r316260: r316179 (by cem): t_msgsnd: Use msgsnd()'s msgsz argument correctly to avoid overflow msgsnd's msgsz argument is the size of the message following the 'long' message type. Don't include the message type in the size of the message when invoking msgsnd(2). CID: 1368712 r316180 (by cem): Follow-up to r316179: More of the same CIDs: 1368705, 1368706, 1368707, 1368710 r316181 (by cem): t_msgctl: Fix the same msgsnd() misuse as t_msgsnd msgsnd(2)'s msgsz argument does not describe the full structure, only the message component. CIDs: 1368703, 1368711 r316260: Annotate all changes made in r316178-r316180 with __FreeBSD__ Restore the stock (upstream) code under an #else block, so it's easier for me to visualize and understand the code that needs to be upstreamed. Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c stable/10/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c Mon May 29 06:22:12 2017 (r319093) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c Mon May 29 06:25:59 2017 (r319094) @@ -203,7 +203,11 @@ ATF_TC_BODY(msgctl_pid, tc) if (pid == 0) { +#ifdef __FreeBSD__ + (void)msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT); +#else (void)msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT); +#endif _exit(EXIT_SUCCESS); } @@ -314,7 +318,11 @@ ATF_TC_BODY(msgctl_time, tc) t = time(NULL); (void)memset(&msgds, 0, sizeof(struct msqid_ds)); +#ifdef __FreeBSD__ + (void)msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT); +#else (void)msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT); +#endif (void)msgctl(id, IPC_STAT, &msgds); if (llabs(t - msgds.msg_stime) > 1) Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Mon May 29 06:22:12 2017 (r319093) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Mon May 29 06:25:59 2017 (r319094) @@ -98,7 +98,11 @@ ATF_TC_BODY(msgsnd_block, tc) */ for (;;) { +#ifdef __FreeBSD__ + if (msgsnd(id, &msg, sizeof(msg.buf), 0) < 0) +#else if (msgsnd(id, &msg, sizeof(struct msg), 0) < 0) +#endif _exit(EXIT_FAILURE); } } @@ -140,7 +144,11 @@ ATF_TC_BODY(msgsnd_count, tc) for (;;) { errno = 0; +#ifdef __FreeBSD__ + rv = msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT); +#else rv = msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT); +#endif if (rv == 0) { i++; @@ -184,12 +192,20 @@ ATF_TC_BODY(msgsnd_err, tc) errno = 0; ATF_REQUIRE_ERRNO(EFAULT, msgsnd(id, (void *)-1, +#ifdef __FreeBSD__ + sizeof(msg.buf), IPC_NOWAIT) == -1); +#else sizeof(struct msg), IPC_NOWAIT) == -1); +#endif errno = 0; ATF_REQUIRE_ERRNO(EINVAL, msgsnd(-1, &msg, +#ifdef __FreeBSD__ + sizeof(msg.buf), IPC_NOWAIT) == -1); +#else sizeof(struct msg), IPC_NOWAIT) == -1); +#endif errno = 0; @@ -200,7 +216,11 @@ ATF_TC_BODY(msgsnd_err, tc) msg.mtype = 0; ATF_REQUIRE_ERRNO(EINVAL, msgsnd(id, &msg, +#ifdef __FreeBSD__ + sizeof(msg.buf), IPC_NOWAIT) == -1); +#else sizeof(struct msg), IPC_NOWAIT) == -1); +#endif ATF_REQUIRE(msgctl(id, IPC_RMID, 0) == 0); } @@ -234,7 +254,11 @@ ATF_TC_BODY(msgsnd_nonblock, tc) for (;;) { errno = 0; +#ifdef __FreeBSD__ + rv = msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT); +#else rv = msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT); +#endif if (rv == -1 && errno == EAGAIN) _exit(EXIT_SUCCESS); @@ -299,7 +323,11 @@ ATF_TC_BODY(msgsnd_perm, tc) errno = 0; +#ifdef __FreeBSD__ + if (msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT) == 0) +#else if (msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT) == 0) +#endif _exit(EXIT_FAILURE); if (errno != EACCES) From owner-svn-src-all@freebsd.org Mon May 29 06:26:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EF42C7DCE1; Mon, 29 May 2017 06:26:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF07D818; Mon, 29 May 2017 06:26:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T6Q1iu028977; Mon, 29 May 2017 06:26:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T6Q1em028975; Mon, 29 May 2017 06:26:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705290626.v4T6Q1em028975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 06:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319095 - stable/11/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 06:26:02 -0000 Author: ngie Date: Mon May 29 06:26:00 2017 New Revision: 319095 URL: https://svnweb.freebsd.org/changeset/base/319095 Log: MFC r316179,r316180,r316181,r316260: r316179 (by cem): t_msgsnd: Use msgsnd()'s msgsz argument correctly to avoid overflow msgsnd's msgsz argument is the size of the message following the 'long' message type. Don't include the message type in the size of the message when invoking msgsnd(2). CID: 1368712 r316180 (by cem): Follow-up to r316179: More of the same CIDs: 1368705, 1368706, 1368707, 1368710 r316181 (by cem): t_msgctl: Fix the same msgsnd() misuse as t_msgsnd msgsnd(2)'s msgsz argument does not describe the full structure, only the message component. CIDs: 1368703, 1368711 r316260: Annotate all changes made in r316178-r316180 with __FreeBSD__ Restore the stock (upstream) code under an #else block, so it's easier for me to visualize and understand the code that needs to be upstreamed. Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c Mon May 29 06:25:59 2017 (r319094) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c Mon May 29 06:26:00 2017 (r319095) @@ -203,7 +203,11 @@ ATF_TC_BODY(msgctl_pid, tc) if (pid == 0) { +#ifdef __FreeBSD__ + (void)msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT); +#else (void)msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT); +#endif _exit(EXIT_SUCCESS); } @@ -314,7 +318,11 @@ ATF_TC_BODY(msgctl_time, tc) t = time(NULL); (void)memset(&msgds, 0, sizeof(struct msqid_ds)); +#ifdef __FreeBSD__ + (void)msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT); +#else (void)msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT); +#endif (void)msgctl(id, IPC_STAT, &msgds); if (llabs(t - msgds.msg_stime) > 1) Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Mon May 29 06:25:59 2017 (r319094) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Mon May 29 06:26:00 2017 (r319095) @@ -98,7 +98,11 @@ ATF_TC_BODY(msgsnd_block, tc) */ for (;;) { +#ifdef __FreeBSD__ + if (msgsnd(id, &msg, sizeof(msg.buf), 0) < 0) +#else if (msgsnd(id, &msg, sizeof(struct msg), 0) < 0) +#endif _exit(EXIT_FAILURE); } } @@ -140,7 +144,11 @@ ATF_TC_BODY(msgsnd_count, tc) for (;;) { errno = 0; +#ifdef __FreeBSD__ + rv = msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT); +#else rv = msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT); +#endif if (rv == 0) { i++; @@ -184,12 +192,20 @@ ATF_TC_BODY(msgsnd_err, tc) errno = 0; ATF_REQUIRE_ERRNO(EFAULT, msgsnd(id, (void *)-1, +#ifdef __FreeBSD__ + sizeof(msg.buf), IPC_NOWAIT) == -1); +#else sizeof(struct msg), IPC_NOWAIT) == -1); +#endif errno = 0; ATF_REQUIRE_ERRNO(EINVAL, msgsnd(-1, &msg, +#ifdef __FreeBSD__ + sizeof(msg.buf), IPC_NOWAIT) == -1); +#else sizeof(struct msg), IPC_NOWAIT) == -1); +#endif errno = 0; @@ -200,7 +216,11 @@ ATF_TC_BODY(msgsnd_err, tc) msg.mtype = 0; ATF_REQUIRE_ERRNO(EINVAL, msgsnd(id, &msg, +#ifdef __FreeBSD__ + sizeof(msg.buf), IPC_NOWAIT) == -1); +#else sizeof(struct msg), IPC_NOWAIT) == -1); +#endif ATF_REQUIRE(msgctl(id, IPC_RMID, 0) == 0); } @@ -234,7 +254,11 @@ ATF_TC_BODY(msgsnd_nonblock, tc) for (;;) { errno = 0; +#ifdef __FreeBSD__ + rv = msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT); +#else rv = msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT); +#endif if (rv == -1 && errno == EAGAIN) _exit(EXIT_SUCCESS); @@ -299,7 +323,11 @@ ATF_TC_BODY(msgsnd_perm, tc) errno = 0; +#ifdef __FreeBSD__ + if (msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT) == 0) +#else if (msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT) == 0) +#endif _exit(EXIT_FAILURE); if (errno != EACCES) From owner-svn-src-all@freebsd.org Mon May 29 06:29:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03FA0CA1056; Mon, 29 May 2017 06:29:15 +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 B818ABB2; Mon, 29 May 2017 06:29:14 +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 v4T6F7Gm024445; Mon, 29 May 2017 06:15:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T6F7UY024444; Mon, 29 May 2017 06:15:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705290615.v4T6F7UY024444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 29 May 2017 06:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319091 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 06:29:15 -0000 Author: avg Date: Mon May 29 06:15:06 2017 New Revision: 319091 URL: https://svnweb.freebsd.org/changeset/base/319091 Log: MFC r308826: zfs: fix up after the removal of PG_CACHED pages in r308691 Now that r308691 has been MFC-ed as a part of r318716, r308826 must be MFC-ed as well. PR: 214629 Reported by: mshirk@daemon-security.com [head], lev [stable/11] Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon May 29 05:23:09 2017 (r319090) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon May 29 06:15:06 2017 (r319091) @@ -426,8 +426,8 @@ page_busy(vnode_t *vp, int64_t start, in continue; } vm_page_sbusy(pp); - } else { - ASSERT(pp != NULL && !pp->valid); + } else if (pp != NULL) { + ASSERT(!pp->valid); pp = NULL; } From owner-svn-src-all@freebsd.org Mon May 29 06:31:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89C60CA2FC7; Mon, 29 May 2017 06:31:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 595BCF22; Mon, 29 May 2017 06:31:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T6V7UY029390; Mon, 29 May 2017 06:31:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T6V7cL029389; Mon, 29 May 2017 06:31:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705290631.v4T6V7cL029389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 06:31:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319098 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 06:31:08 -0000 Author: ngie Date: Mon May 29 06:31:07 2017 New Revision: 319098 URL: https://svnweb.freebsd.org/changeset/base/319098 Log: MFC r315561: r315561 (by trasz): Bring back the "i". The point is to make it easy to find via "apropos iscsi", along with all the other relevant components. Modified: stable/11/share/man/man4/ctl.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/ctl.4 ============================================================================== --- stable/11/share/man/man4/ctl.4 Mon May 29 06:31:04 2017 (r319097) +++ stable/11/share/man/man4/ctl.4 Mon May 29 06:31:07 2017 (r319098) @@ -24,12 +24,12 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd March 11, 2017 +.Dd March 19, 2017 .Dt CTL 4 .Os .Sh NAME .Nm ctl -.Nd CAM Target Layer / SCSI target subsystem +.Nd CAM Target Layer / iSCSI target subsystem .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your From owner-svn-src-all@freebsd.org Mon May 29 06:30:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6912CA2E7B; Mon, 29 May 2017 06:30:35 +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 A84BBCE2; Mon, 29 May 2017 06:30:35 +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 v4T6UYU7029244; Mon, 29 May 2017 06:30:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T6UYUb029243; Mon, 29 May 2017 06:30:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705290630.v4T6UYUb029243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 29 May 2017 06:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319096 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 06:30:35 -0000 Author: avg Date: Mon May 29 06:30:34 2017 New Revision: 319096 URL: https://svnweb.freebsd.org/changeset/base/319096 Log: zfs_lookup: fix bogus arguments to lookup of "snapshot" directory When a parent directory lookup is done at the root of a snapshot mounted under .zfs/snapshot directory, we need to look up that directory in the parent filesystem. We achieve that by doing a VOP_LOOKUP operation on a .zfs vnode with "snapshot" as a target name. But previously we also passed ISDOTDOT flag to the lookup and, because of that, the lookup actually returned the parent of the .zfs vnode, that is, a root vnode of the parent filesystem. Reported by: lev Tested by: lev MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon May 29 06:26:00 2017 (r319095) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon May 29 06:30:34 2017 (r319096) @@ -1635,7 +1635,7 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode cn.cn_nameptr = "snapshot"; cn.cn_namelen = strlen(cn.cn_nameptr); cn.cn_nameiop = cnp->cn_nameiop; - cn.cn_flags = cnp->cn_flags; + cn.cn_flags = cnp->cn_flags & ~ISDOTDOT; cn.cn_lkflags = cnp->cn_lkflags; error = VOP_LOOKUP(zfsctl_vp, vpp, &cn); vput(zfsctl_vp); From owner-svn-src-all@freebsd.org Mon May 29 06:31:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F066DCA2FBC; Mon, 29 May 2017 06:31:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFA00E3F; Mon, 29 May 2017 06:31:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T6V4p3029341; Mon, 29 May 2017 06:31:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T6V4S7029340; Mon, 29 May 2017 06:31:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705290631.v4T6V4S7029340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 06:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319097 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 06:31:06 -0000 Author: ngie Date: Mon May 29 06:31:04 2017 New Revision: 319097 URL: https://svnweb.freebsd.org/changeset/base/319097 Log: MFC r315561: r315561 (by trasz): Bring back the "i". The point is to make it easy to find via "apropos iscsi", along with all the other relevant components. Modified: stable/10/share/man/man4/ctl.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ctl.4 ============================================================================== --- stable/10/share/man/man4/ctl.4 Mon May 29 06:30:34 2017 (r319096) +++ stable/10/share/man/man4/ctl.4 Mon May 29 06:31:04 2017 (r319097) @@ -24,12 +24,12 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd March 11, 2017 +.Dd March 19, 2017 .Dt CTL 4 .Os .Sh NAME .Nm ctl -.Nd CAM Target Layer / SCSI target subsystem +.Nd CAM Target Layer / iSCSI target subsystem .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your From owner-svn-src-all@freebsd.org Mon May 29 07:15:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5F6ACC2BD2; Mon, 29 May 2017 07:15:29 +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 B4A2A6E71D; Mon, 29 May 2017 07:15:29 +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 v4T7FSM9049956; Mon, 29 May 2017 07:15:28 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T7FSc6049955; Mon, 29 May 2017 07:15:28 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705290715.v4T7FSc6049955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 29 May 2017 07:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319099 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 07:15:30 -0000 Author: cy Date: Mon May 29 07:15:28 2017 New Revision: 319099 URL: https://svnweb.freebsd.org/changeset/base/319099 Log: Revert r318789. It causes hanging NAT tcp sessions. Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Mon May 29 06:31:07 2017 (r319098) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Mon May 29 07:15:28 2017 (r319099) @@ -497,9 +497,7 @@ ipf_nat_soft_init(softc, arg) softn->ipf_nat_pending.ifq_next = NULL; for (i = 0, tq = softn->ipf_nat_tcptq; i < IPF_TCP_NSTATES; i++, tq++) { -#ifdef LARGE_NAT if (tq->ifq_ttl < softn->ipf_nat_deficmpage) -#endif tq->ifq_ttl = softn->ipf_nat_deficmpage; #ifdef LARGE_NAT else if (tq->ifq_ttl > softn->ipf_nat_defage) From owner-svn-src-all@freebsd.org Mon May 29 07:27:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7344ECC2F04; Mon, 29 May 2017 07:27:09 +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 4368F6EBC5; Mon, 29 May 2017 07:27:09 +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 v4T7R82S053983; Mon, 29 May 2017 07:27:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T7R8q7053982; Mon, 29 May 2017 07:27:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705290727.v4T7R8q7053982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 29 May 2017 07:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319100 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 07:27:09 -0000 Author: adrian Date: Mon May 29 07:27:08 2017 New Revision: 319100 URL: https://svnweb.freebsd.org/changeset/base/319100 Log: Update AP93 support to the new world order. * Map change: create a combined kernel+rootfs image. The instructions I'll post on the wiki (which will be for a very outdated dev board, but at least will explain the what/why for posterity) will include how to reset the boot command. Tested: * AP93 dev board (AR7240 + AR9280) Modified: head/sys/mips/conf/AP93.hints Modified: head/sys/mips/conf/AP93.hints ============================================================================== --- head/sys/mips/conf/AP93.hints Mon May 29 07:15:28 2017 (r319099) +++ head/sys/mips/conf/AP93.hints Mon May 29 07:27:08 2017 (r319100) @@ -94,29 +94,15 @@ hint.map.1.readonly=1 hint.map.2.at="flash/spi0" hint.map.2.start=0x00080000 -# hint.map.2.end=0x00380000 -hint.map.2.end=0x00780000 -# hint.map.2.name="spare-rootfs" -hint.map.2.name="rootfs" -hint.map.2.readonly=1 - -#hint.map.3.at="flash/spi0" -#hint.map.3.start=0x00380000 -#hint.map.3.end=0x00480000 -#hint.map.3.name="spare-uImage" -#hint.map.3.readonly=1 - -#hint.map.4.at="flash/spi0" -#hint.map.4.start=0x00480000 -#hint.map.4.end=0x00780000 -#hint.map.4.name="rootfs" -#hint.map.4.readonly=1 +hint.map.2.end="search:0x00080000:0x10000:.!/bin/sh" +hint.map.2.name="kernel" +hint.map.2.readonly=0 hint.map.3.at="flash/spi0" -hint.map.3.start=0x00780000 +hint.map.3.start="search:0x00080000:0x10000:.!/bin/sh" hint.map.3.end=0x00880000 -hint.map.3.name="uImage" -hint.map.3.readonly=1 +hint.map.3.name="rootfs" +hint.map.3.readonly=0 hint.map.4.at="flash/spi0" hint.map.4.start=0x00880000 From owner-svn-src-all@freebsd.org Mon May 29 07:30:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D470CC2FAA; Mon, 29 May 2017 07:30:08 +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 4E52E6ED23; Mon, 29 May 2017 07:30:08 +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 v4T7U7aw054165; Mon, 29 May 2017 07:30:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T7U7Ni054164; Mon, 29 May 2017 07:30:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705290730.v4T7U7Ni054164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 29 May 2017 07:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319101 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 07:30:08 -0000 Author: adrian Date: Mon May 29 07:30:07 2017 New Revision: 319101 URL: https://svnweb.freebsd.org/changeset/base/319101 Log: [ar71xx] [ar724x] update to work * add EARLY_PRINTF for debugging * update module list to be much larger * add random, otherwise well, stuff doesn't work. * IPFIREWALL_DEFAULT_TO_ACCEPT Tested: * AP93 (AR7240 + AR9280) TODO: * rename to std.AR724X * unify the built module list between all of the mips24k/mips74k atheros config files - now that the HAL, hwpmc, USB, etc are per-chip/per-arch modules it is easy to just compile them all and only include the ones you care about. Modified: head/sys/mips/conf/AR724X_BASE Modified: head/sys/mips/conf/AR724X_BASE ============================================================================== --- head/sys/mips/conf/AR724X_BASE Mon May 29 07:27:08 2017 (r319100) +++ head/sys/mips/conf/AR724X_BASE Mon May 29 07:30:07 2017 (r319101) @@ -25,13 +25,14 @@ makeoptions DEBUG=-g #Build kernel with # Build these as modules so small platform builds will have the # modules already built. -makeoptions MODULES_OVERRIDE="gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci hwpmc cam" +makeoptions MODULES_OVERRIDE="gpio ar71xx if_gif if_gre if_tap if_tun libalias ipfw ipfw_nat ipfw_nptv6 if_vlan if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath_main ath_pci ath_hal ath_hal_ar5212 ath_hal_ar5416 ath_hal_ar9300 ath_rate ath_dfs hwpmc hwpmc_mips24k cam" # For small memory footprints options VM_KMEM_SIZE_SCALE=1 options DDB options KDB +options EARLY_PRINTF options SCHED_4BSD #4BSD scheduler options INET #InterNETworking @@ -59,11 +60,16 @@ options NO_SYSCTL_DESCR options FFS #Berkeley Fast Filesystem options NO_FFS_SNAPSHOT + +options IPFIREWALL_DEFAULT_TO_ACCEPT + # options SOFTUPDATES #Enable FFS soft updates support # options UFS_ACL #Support for access control lists # options UFS_DIRHASH #Improve performance on big directories # options MSDOSFS # Read MSDOS filesystems; useful for USB/CF +options UMTX_CHAINS=16 + device pci device ar724x_pci @@ -129,7 +135,7 @@ device loop device ether device md device bpf -#device random +device random #device if_bridge #device gif # ip[46] in ip[46] tunneling protocol #device gre # generic encapsulation - only for IPv4 in IPv4 though atm From owner-svn-src-all@freebsd.org Mon May 29 07:57:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49812CEE766; Mon, 29 May 2017 07:57:02 +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 0D8A56F74F; Mon, 29 May 2017 07:57:01 +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 v4T7v16W066287; Mon, 29 May 2017 07:57:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T7v1Dd066286; Mon, 29 May 2017 07:57:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705290757.v4T7v1Dd066286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 29 May 2017 07:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319102 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 07:57:02 -0000 Author: adrian Date: Mon May 29 07:57:01 2017 New Revision: 319102 URL: https://svnweb.freebsd.org/changeset/base/319102 Log: [AP93] fix up the arge0/arge1 hints. Modified: head/sys/mips/conf/AP93.hints Modified: head/sys/mips/conf/AP93.hints ============================================================================== --- head/sys/mips/conf/AP93.hints Mon May 29 07:30:07 2017 (r319101) +++ head/sys/mips/conf/AP93.hints Mon May 29 07:57:01 2017 (r319102) @@ -15,12 +15,14 @@ hint.argemdio.0.order=0 hint.arge.0.phymask=0x10 # PHY 4 # hint.arge.0.miimode=2 # MII hint.arge.0.mdio=mdioproxy1 # Hanging off the arswitch MDIO bus +hint.arge.0.eeprommac=0x1fff0000 # arge1: connected to the LAN switch MAC, at 1000BaseTX / GMII. hint.arge.1.phymask=0x0 # hint.arge.1.miimode=1 # GMII hint.arge.1.media=1000 # Force to 1000BaseTX/full hint.arge.1.fduplex=1 +hint.arge.1.eeprommac=0x1fff0006 # # AR7240 switch config From owner-svn-src-all@freebsd.org Mon May 29 09:20:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E17ABCF66C4; Mon, 29 May 2017 09:20:21 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1E5A7233A; Mon, 29 May 2017 09:20:21 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T9KKMx001836; Mon, 29 May 2017 09:20:20 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T9KK34001835; Mon, 29 May 2017 09:20:20 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201705290920.v4T9KK34001835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Mon, 29 May 2017 09:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319115 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 09:20:22 -0000 Author: wma Date: Mon May 29 09:20:20 2017 New Revision: 319115 URL: https://svnweb.freebsd.org/changeset/base/319115 Log: Enable wireless Atheros cards in ARMADA38X Submitted by: Bartosz Szczepanek Dominik Ermel Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D10904 Modified: head/sys/arm/conf/ARMADA38X Modified: head/sys/arm/conf/ARMADA38X ============================================================================== --- head/sys/arm/conf/ARMADA38X Mon May 29 09:08:02 2017 (r319114) +++ head/sys/arm/conf/ARMADA38X Mon May 29 09:20:20 2017 (r319115) @@ -76,6 +76,14 @@ device iic device iicbus device twsi +# Wireless NIC cards +device wlan # 802.11 support +device ath # Atheros NIC's +device ath_pci # Atheros pci/cardbus glue +device ath_hal +device ath_rate_sample +options ATH_ENABLE_11N + # CESA device cesa device crypto From owner-svn-src-all@freebsd.org Mon May 29 09:21:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BCC9CF68B5; Mon, 29 May 2017 09:21:39 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3ACDB72616; Mon, 29 May 2017 09:21:39 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T9Lc6X005829; Mon, 29 May 2017 09:21:38 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T9LcVj005828; Mon, 29 May 2017 09:21:38 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201705290921.v4T9LcVj005828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Mon, 29 May 2017 09:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319116 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 09:21:39 -0000 Author: wma Date: Mon May 29 09:21:38 2017 New Revision: 319116 URL: https://svnweb.freebsd.org/changeset/base/319116 Log: Increase timeout in Atheros HAL It turned out, that some models of the Atheros PCIe adapters (e.g. AR983x family) may fail to attach due to insufficient timeout value. Submitted by: Bartosz Szczepanek Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: adrian Differential revision: https://reviews.freebsd.org/D10903 Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Mon May 29 09:20:20 2017 (r319115) +++ head/sys/dev/ath/ath_hal/ah.c Mon May 29 09:21:38 2017 (r319116) @@ -302,7 +302,7 @@ ath_hal_rf_name(struct ath_hal *ah) HAL_BOOL ath_hal_wait(struct ath_hal *ah, u_int reg, uint32_t mask, uint32_t val) { -#define AH_TIMEOUT 1000 +#define AH_TIMEOUT 5000 return ath_hal_waitfor(ah, reg, mask, val, AH_TIMEOUT); #undef AH_TIMEOUT } From owner-svn-src-all@freebsd.org Mon May 29 09:22:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 468C6CF6B40; Mon, 29 May 2017 09:22:55 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1520672939; Mon, 29 May 2017 09:22:55 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4T9MsY2005949; Mon, 29 May 2017 09:22:54 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T9MrkD005947; Mon, 29 May 2017 09:22:53 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201705290922.v4T9MrkD005947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Mon, 29 May 2017 09:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319117 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 09:22:55 -0000 Author: wma Date: Mon May 29 09:22:53 2017 New Revision: 319117 URL: https://svnweb.freebsd.org/changeset/base/319117 Log: Introduce Genesys GL3224 quirks The Genesys chip is failing when issueing READ_CAP(16) command. Force a quirk to disable it and use READ_CAP(10) instead. Also, depending on used firmware, GL3224 can be recognized either as 'storage device' or 'mass storage class' - enable both variants in scsi_quirk_table. Submitted by: Wojciech Macek Konrad Adamczyk Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: mav Differential revision: https://reviews.freebsd.org/D10902 Modified: head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon May 29 09:21:38 2017 (r319116) +++ head/sys/cam/scsi/scsi_da.c Mon May 29 09:22:53 2017 (r319117) @@ -684,6 +684,13 @@ static struct da_quirk_entry da_quirk_ta }, { /* + * Genesys GL3224 + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "Generic*", "STORAGE DEVICE*", + "120?"}, /*quirks*/ DA_Q_NO_SYNC_CACHE | DA_Q_4K | DA_Q_NO_RC16 + }, + { + /* * Genesys 6-in-1 Card Reader * PR: usb/94647 */ Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Mon May 29 09:21:38 2017 (r319116) +++ head/sys/cam/scsi/scsi_xpt.c Mon May 29 09:22:53 2017 (r319117) @@ -547,6 +547,14 @@ static struct scsi_quirk_entry scsi_quir CAM_QUIRK_NORPTLUNS, /*mintags*/2, /*maxtags*/255 }, { + { T_DIRECT, SIP_MEDIA_REMOVABLE, "Generic", "STORAGE DEVICE*", "120?" }, + CAM_QUIRK_NORPTLUNS, /*mintags*/2, /*maxtags*/255 + }, + { + { T_DIRECT, SIP_MEDIA_REMOVABLE, "Generic", "MassStorageClass", "1533" }, + CAM_QUIRK_NORPTLUNS, /*mintags*/2, /*maxtags*/255 + }, + { /* Default tagged queuing parameters for all devices */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, From owner-svn-src-all@freebsd.org Mon May 29 09:30:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F563CF6BE2; Mon, 29 May 2017 09:30:40 +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 5BA5072B0D; Mon, 29 May 2017 09:30:40 +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 v4T9Udg4007197; Mon, 29 May 2017 09:30:39 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4T9Uccx007189; Mon, 29 May 2017 09:30:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705290930.v4T9Uccx007189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 29 May 2017 09:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319118 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 09:30:40 -0000 Author: ae Date: Mon May 29 09:30:38 2017 New Revision: 319118 URL: https://svnweb.freebsd.org/changeset/base/319118 Log: Disable IPsec debugging code by default when IPSEC_DEBUG kernel option is not specified. Due to the long call chain IPsec code can produce the kernel stack exhaustion on the i386 architecture. The debugging code usually is not used, but it requires a lot of stack space to keep buffers for strings formatting. This patch conditionally defines macros to disable building of IPsec debugging code. IPsec currently has two sysctl variables to configure debug output: * net.key.debug variable is used to enable debug output for PF_KEY protocol. Such debug messages are produced by KEYDBG() macro and usually they can be interesting for developers. * net.inet.ipsec.debug variable is used to enable debug output for DPRINTF() macro and ipseclog() function. DPRINTF() macro usually is used for development debugging. ipseclog() function is used for debugging by administrator. The patch disables KEYDBG() and DPRINTF() macros, and formatting buffers declarations when IPSEC_DEBUG is not present in kernel config. This reduces stack requirement for up to several hundreds of bytes. The net.inet.ipsec.debug variable still can be used to enable ipseclog() messages by administrator. PR: 219476 Reported by: eugen No objection from: #network MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10869 Modified: head/sys/netipsec/ipsec.h head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c head/sys/netipsec/key_debug.h head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c Modified: head/sys/netipsec/ipsec.h ============================================================================== --- head/sys/netipsec/ipsec.h Mon May 29 09:22:53 2017 (r319117) +++ head/sys/netipsec/ipsec.h Mon May 29 09:30:38 2017 (r319118) @@ -299,7 +299,13 @@ VNET_DECLARE(int, natt_cksum_policy); #define ipseclog(x) do { if (V_ipsec_debug) log x; } while (0) /* for openbsd compatibility */ +#ifdef IPSEC_DEBUG +#define IPSEC_DEBUG_DECLARE(x) x #define DPRINTF(x) do { if (V_ipsec_debug) printf x; } while (0) +#else +#define IPSEC_DEBUG_DECLARE(x) +#define DPRINTF(x) +#endif struct inpcb; struct m_tag; Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Mon May 29 09:22:53 2017 (r319117) +++ head/sys/netipsec/ipsec_input.c Mon May 29 09:30:38 2017 (r319118) @@ -117,7 +117,7 @@ __FBSDID("$FreeBSD$"); static int ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); union sockaddr_union dst_address; struct secasvar *sav; uint32_t spi; @@ -277,7 +277,7 @@ int ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct ipsec_ctx_data ctx; struct xform_history *xh; struct secasindex *saidx; @@ -488,7 +488,7 @@ int ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct ipsec_ctx_data ctx; struct xform_history *xh; struct secasindex *saidx; Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Mon May 29 09:22:53 2017 (r319117) +++ head/sys/netipsec/ipsec_output.c Mon May 29 09:30:38 2017 (r319118) @@ -183,7 +183,6 @@ next: static int ipsec4_perform_request(struct mbuf *m, struct secpolicy *sp, u_int idx) { - char sbuf[IPSEC_ADDRSTRLEN], dbuf[IPSEC_ADDRSTRLEN]; struct ipsec_ctx_data ctx; union sockaddr_union *dst; struct secasvar *sav; @@ -230,12 +229,9 @@ ipsec4_perform_request(struct mbuf *m, s ip->ip_sum = in_cksum(m, ip->ip_hl << 2); error = ipsec_encap(&m, &sav->sah->saidx); if (error != 0) { - DPRINTF(("%s: encapsulation for SA %s->%s " - "SPI 0x%08x failed with error %d\n", __func__, - ipsec_address(&sav->sah->saidx.src, sbuf, - sizeof(sbuf)), - ipsec_address(&sav->sah->saidx.dst, dbuf, - sizeof(dbuf)), ntohl(sav->spi), error)); + DPRINTF(("%s: encapsulation for SPI 0x%08x failed " + "with error %d\n", __func__, ntohl(sav->spi), + error)); /* XXXAE: IPSEC_OSTAT_INC(tunnel); */ goto bad; } @@ -497,7 +493,6 @@ next: static int ipsec6_perform_request(struct mbuf *m, struct secpolicy *sp, u_int idx) { - char sbuf[IPSEC_ADDRSTRLEN], dbuf[IPSEC_ADDRSTRLEN]; struct ipsec_ctx_data ctx; union sockaddr_union *dst; struct secasvar *sav; @@ -539,12 +534,9 @@ ipsec6_perform_request(struct mbuf *m, s } error = ipsec_encap(&m, &sav->sah->saidx); if (error != 0) { - DPRINTF(("%s: encapsulation for SA %s->%s " - "SPI 0x%08x failed with error %d\n", __func__, - ipsec_address(&sav->sah->saidx.src, sbuf, - sizeof(sbuf)), - ipsec_address(&sav->sah->saidx.dst, dbuf, - sizeof(dbuf)), ntohl(sav->spi), error)); + DPRINTF(("%s: encapsulation for SPI 0x%08x failed " + "with error %d\n", __func__, ntohl(sav->spi), + error)); /* XXXAE: IPSEC_OSTAT_INC(tunnel); */ goto bad; } Modified: head/sys/netipsec/key_debug.h ============================================================================== --- head/sys/netipsec/key_debug.h Mon May 29 09:22:53 2017 (r319117) +++ head/sys/netipsec/key_debug.h Mon May 29 09:30:38 2017 (r319118) @@ -53,10 +53,14 @@ #define KEYDEBUG_IPSEC_DATA (KEYDEBUG_IPSEC | KEYDEBUG_DATA) #define KEYDEBUG_IPSEC_DUMP (KEYDEBUG_IPSEC | KEYDEBUG_DUMP) +#ifdef IPSEC_DEBUG #define KEYDBG(lev, arg) \ if ((V_key_debug_level & (KEYDEBUG_ ## lev)) == (KEYDEBUG_ ## lev)) { \ arg; \ } +#else +#define KEYDBG(lev, arg) +#endif /* !IPSEC_DEBUG */ VNET_DECLARE(uint32_t, key_debug_level); #define V_key_debug_level VNET(key_debug_level) Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Mon May 29 09:22:53 2017 (r319117) +++ head/sys/netipsec/xform_ah.c Mon May 29 09:30:38 2017 (r319118) @@ -544,7 +544,7 @@ ah_massage_headers(struct mbuf **m0, int static int ah_input(struct mbuf *m, struct secasvar *sav, int skip, int protoff) { - char buf[128]; + IPSEC_DEBUG_DECLARE(char buf[128]); const struct auth_hash *ahx; struct cryptodesc *crda; struct cryptop *crp; @@ -681,7 +681,7 @@ bad: static int ah_input_cb(struct cryptop *crp) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); unsigned char calc[AH_ALEN_MAX]; const struct auth_hash *ahx; struct mbuf *m; @@ -831,7 +831,7 @@ static int ah_output(struct mbuf *m, struct secpolicy *sp, struct secasvar *sav, u_int idx, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); const struct auth_hash *ahx; struct cryptodesc *crda; struct xform_data *xd; Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Mon May 29 09:22:53 2017 (r319117) +++ head/sys/netipsec/xform_esp.c Mon May 29 09:30:38 2017 (r319118) @@ -263,7 +263,7 @@ esp_zeroize(struct secasvar *sav) static int esp_input(struct mbuf *m, struct secasvar *sav, int skip, int protoff) { - char buf[128]; + IPSEC_DEBUG_DECLARE(char buf[128]); const struct auth_hash *esph; const struct enc_xform *espx; struct xform_data *xd; @@ -436,7 +436,7 @@ bad: static int esp_input_cb(struct cryptop *crp) { - char buf[128]; + IPSEC_DEBUG_DECLARE(char buf[128]); u_int8_t lastthree[3], aalg[AH_HMAC_MAXHASHLEN]; const struct auth_hash *esph; const struct enc_xform *espx; @@ -622,7 +622,7 @@ static int esp_output(struct mbuf *m, struct secpolicy *sp, struct secasvar *sav, u_int idx, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct cryptodesc *crde = NULL, *crda = NULL; struct cryptop *crp; const struct auth_hash *esph; Modified: head/sys/netipsec/xform_ipcomp.c ============================================================================== --- head/sys/netipsec/xform_ipcomp.c Mon May 29 09:22:53 2017 (r319117) +++ head/sys/netipsec/xform_ipcomp.c Mon May 29 09:30:38 2017 (r319118) @@ -271,7 +271,7 @@ bad: static int ipcomp_input_cb(struct cryptop *crp) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct cryptodesc *crd; struct xform_data *xd; struct mbuf *m; @@ -387,7 +387,7 @@ static int ipcomp_output(struct mbuf *m, struct secpolicy *sp, struct secasvar *sav, u_int idx, int skip, int protoff) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); const struct comp_algo *ipcompx; struct cryptodesc *crdc; struct cryptop *crp; @@ -521,7 +521,7 @@ bad: static int ipcomp_output_cb(struct cryptop *crp) { - char buf[IPSEC_ADDRSTRLEN]; + IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); struct xform_data *xd; struct secpolicy *sp; struct secasvar *sav; From owner-svn-src-all@freebsd.org Mon May 29 10:15:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77603CFAAF3; Mon, 29 May 2017 10:15:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31B7773C74; Mon, 29 May 2017 10:15:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TAFmEe026478; Mon, 29 May 2017 10:15:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TAFfc0026411; Mon, 29 May 2017 10:15:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705291015.v4TAFfc0026411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 10:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319119 - in stable/11/usr.sbin: acpi amd amd/amd amd/libamu ancontrol audit auditd auditdistd auditreduce authpf autofs bhyvectl bhyveload bluetooth bluetooth/bthidcontrol bluetooth/rf... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 10:15:49 -0000 Author: ngie Date: Mon May 29 10:15:41 2017 New Revision: 319119 URL: https://svnweb.freebsd.org/changeset/base/319119 Log: MFC r314659,r314676: r314659: usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output r314676: Fix build after r314656 Some of the changes I introduced to use .ALLSRC were correct in spirit, but incorrect in reality -- in particular, ../Makefile.inc hadn't been pulled in via bsd.init.mk (via bsd.lib.mk, bsd.prog.mk), so the value of .ALLSRC (evaluated immediately) was empty. .include bsd.init.mk explicitly so we can be certain that the values used as dependencies in the targets are defined when the target recipe has been evaluated. Reminder: thou shalt separate out separate functional changes before committing them. (YUGE) Pointyhat to: ngie In collaboration with: bdrewery Modified: stable/11/usr.sbin/acpi/Makefile.inc stable/11/usr.sbin/amd/Makefile.inc stable/11/usr.sbin/amd/amd/Makefile stable/11/usr.sbin/amd/libamu/Makefile stable/11/usr.sbin/ancontrol/Makefile stable/11/usr.sbin/audit/Makefile stable/11/usr.sbin/auditd/Makefile stable/11/usr.sbin/auditdistd/Makefile stable/11/usr.sbin/auditreduce/Makefile stable/11/usr.sbin/authpf/Makefile stable/11/usr.sbin/autofs/Makefile stable/11/usr.sbin/bhyvectl/Makefile stable/11/usr.sbin/bhyveload/Makefile stable/11/usr.sbin/bluetooth/Makefile.inc stable/11/usr.sbin/bluetooth/bthidcontrol/Makefile stable/11/usr.sbin/bluetooth/rfcomm_pppd/Makefile stable/11/usr.sbin/bsnmpd/bsnmpd/Makefile stable/11/usr.sbin/bsnmpd/gensnmptree/Makefile stable/11/usr.sbin/bsnmpd/tools/Makefile.inc stable/11/usr.sbin/camdd/Makefile stable/11/usr.sbin/ckdist/Makefile stable/11/usr.sbin/cron/crontab/Makefile stable/11/usr.sbin/cron/lib/Makefile stable/11/usr.sbin/ctladm/Makefile stable/11/usr.sbin/ctld/Makefile stable/11/usr.sbin/ctm/Makefile.inc stable/11/usr.sbin/ctm/ctm/Makefile stable/11/usr.sbin/ctm/ctm_dequeue/Makefile stable/11/usr.sbin/ctm/ctm_smail/Makefile stable/11/usr.sbin/dconschat/Makefile stable/11/usr.sbin/editmap/Makefile stable/11/usr.sbin/eeprom/Makefile stable/11/usr.sbin/fdcontrol/Makefile stable/11/usr.sbin/fdformat/Makefile stable/11/usr.sbin/fmtree/Makefile stable/11/usr.sbin/fstyp/Makefile stable/11/usr.sbin/ftp-proxy/Makefile stable/11/usr.sbin/fwcontrol/Makefile stable/11/usr.sbin/gpioctl/Makefile stable/11/usr.sbin/gssd/Makefile stable/11/usr.sbin/hyperv/tools/kvp/Makefile stable/11/usr.sbin/hyperv/tools/vss/Makefile stable/11/usr.sbin/iovctl/Makefile stable/11/usr.sbin/iscsid/Makefile stable/11/usr.sbin/mailstats/Makefile stable/11/usr.sbin/mailwrapper/Makefile stable/11/usr.sbin/makemap/Makefile stable/11/usr.sbin/mlxcontrol/Makefile stable/11/usr.sbin/mount_smbfs/Makefile stable/11/usr.sbin/mountd/Makefile stable/11/usr.sbin/mpsutil/Makefile stable/11/usr.sbin/ndiscvt/Makefile stable/11/usr.sbin/ndp/Makefile stable/11/usr.sbin/nmtree/Makefile stable/11/usr.sbin/pkg/Makefile stable/11/usr.sbin/pnpinfo/Makefile stable/11/usr.sbin/praliases/Makefile stable/11/usr.sbin/praudit/Makefile stable/11/usr.sbin/pwd_mkdb/Makefile stable/11/usr.sbin/rip6query/Makefile stable/11/usr.sbin/rpcbind/tests/Makefile stable/11/usr.sbin/rtadvctl/Makefile stable/11/usr.sbin/sa/Makefile stable/11/usr.sbin/sendmail/Makefile stable/11/usr.sbin/tcpdump/tcpdump/Makefile stable/11/usr.sbin/timed/timedc/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/acpi/Makefile.inc ============================================================================== --- stable/11/usr.sbin/acpi/Makefile.inc Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/acpi/Makefile.inc Mon May 29 10:15:41 2017 (r319119) @@ -1,13 +1,13 @@ # $Id: Makefile.inc,v 1.1 2000/07/14 18:16:22 iwasaki Exp $ # $FreeBSD$ -ACPICA_DIR= ${.CURDIR}/../../../sys/contrib/dev/acpica -CFLAGS+= -I${.CURDIR}/../../../sys +ACPICA_DIR= ${SRCTOP}/sys/contrib/dev/acpica +CFLAGS+= -I${SRCTOP}/sys PACKAGE= acpi -.if exists(${.CURDIR}/../../Makefile.inc) -.include "${.CURDIR}/../../Makefile.inc" +.if exists(${.CURDIR:H:H}/Makefile.inc) +.include "${.CURDIR:H:H}/Makefile.inc" .endif .PATH: ${ACPICA_DIR} \ Modified: stable/11/usr.sbin/amd/Makefile.inc ============================================================================== --- stable/11/usr.sbin/amd/Makefile.inc Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/amd/Makefile.inc Mon May 29 10:15:41 2017 (r319119) @@ -13,13 +13,13 @@ PACKAGE= amd -CFLAGS+= -I. -I${.CURDIR} -CFLAGS+= -I${.CURDIR}/../include -.if exists(${.OBJDIR}/../include) -CFLAGS+= -I${.OBJDIR}/../include +CFLAGS+= -I. -I${.CURDIR} +CFLAGS+= -I${.CURDIR:H}/include +.if exists(${.OBJDIR:H}/include) +CFLAGS+= -I${.OBJDIR:H}/include .endif -CFLAGS+= -I${.CURDIR}/../../../contrib/amd/include -CFLAGS+= -I${.CURDIR}/../../../contrib/amd +CFLAGS+= -I${SRCTOP}/contrib/amd/include +CFLAGS+= -I${SRCTOP}/contrib/amd CFLAGS+= -DHAVE_CONFIG_H .if ${MK_NIS} == "no" CFLAGS+= -DHAVE_LOCALCONFIG_H @@ -37,6 +37,6 @@ NFS_PROT_X= ${SRCTOP}/include/rpcsvc/nfs WARNS?= 1 -.if exists(${.CURDIR}/../../Makefile.inc) -.include "${.CURDIR}/../../Makefile.inc" +.if exists(${.CURDIR:H:H}/Makefile.inc) +.include "${.CURDIR:H:H}/Makefile.inc" .endif Modified: stable/11/usr.sbin/amd/amd/Makefile ============================================================================== --- stable/11/usr.sbin/amd/amd/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/amd/amd/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -6,7 +6,7 @@ # $FreeBSD$ # -.include +.include .PATH: ${.CURDIR}/../../../contrib/amd/amd @@ -28,7 +28,7 @@ SRCS+= srvr_amfs_auto.c srvr_nfs.c sun_m CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \ -I${SRCTOP}/contrib/amd/include \ - -I${.OBJDIR}/../../../include/rpcsvc + -I${OBJTOP}/include/rpcsvc LIBADD= amu @@ -62,7 +62,7 @@ SRCS+= mount_xdr.c CLEANFILES+= mount_xdr.c mount_xdr.c: ${MOUNT_X} - ${RPCCOM} -c -DWANT_NFS3 ${MOUNT_X} -o ${.TARGET} + ${RPCCOM} -c -DWANT_NFS3 ${.ALLSRC} -o ${.TARGET} .if ${MK_HESIOD} != "no" SRCS+= info_hesiod.c Modified: stable/11/usr.sbin/amd/libamu/Makefile ============================================================================== --- stable/11/usr.sbin/amd/libamu/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/amd/libamu/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -5,10 +5,12 @@ # # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/amd/libamu \ - ${.CURDIR}/../../../contrib/amd/conf/transp \ - ${.CURDIR}/../../../contrib/amd/conf/mtab \ - ${.CURDIR}/../../../contrib/amd/conf/umount +.include + +.PATH: ${SRCTOP}/contrib/amd/libamu \ + ${SRCTOP}/contrib/amd/conf/transp \ + ${SRCTOP}/contrib/amd/conf/mtab \ + ${SRCTOP}/contrib/amd/conf/umount LIB= amu INTERNALLIB= @@ -23,10 +25,10 @@ SRCS+= nfs_prot_x.c xdr_func_%undef.c CLEANFILES+= nfs_prot_x.c xdr_func_%undef.c CFLAGS+= -I${.CURDIR}/../../../contrib/amd/libamu \ - -I${.OBJDIR}/../../../include/rpcsvc + -I${OBJTOP}/include/rpcsvc nfs_prot_x.c: ${NFS_PROT_X} - ${RPCCOM} -c -C -DWANT_NFS3 ${NFS_PROT_X} -o ${.TARGET} + ${RPCCOM} -c -C -DWANT_NFS3 ${.ALLSRC} -o ${.TARGET} XDRDEFS!= grep 'ifndef.*HAVE_XDR' ${.CURDIR}/../../../contrib/amd/libamu/xdr_func.c | awk '{print "-D"$$2}' Modified: stable/11/usr.sbin/ancontrol/Makefile ============================================================================== --- stable/11/usr.sbin/ancontrol/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ancontrol/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -4,7 +4,7 @@ PROG= ancontrol MAN= ancontrol.8 WARNS?= 3 -CFLAGS+= -DANCACHE -I${.CURDIR}/../../sys +CFLAGS+= -DANCACHE -I${SRCTOP}/sys LIBADD= md Modified: stable/11/usr.sbin/audit/Makefile ============================================================================== --- stable/11/usr.sbin/audit/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/audit/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,7 +2,7 @@ # $FreeBSD$ # -OPENBSMDIR=${.CURDIR}/../../contrib/openbsm +OPENBSMDIR=${SRCTOP}/contrib/openbsm .PATH: ${OPENBSMDIR}/bin/audit CFLAGS+= -I${OPENBSMDIR} Modified: stable/11/usr.sbin/auditd/Makefile ============================================================================== --- stable/11/usr.sbin/auditd/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/auditd/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,7 +2,7 @@ # $FreeBSD$ # -OPENBSMDIR=${.CURDIR}/../../contrib/openbsm +OPENBSMDIR=${SRCTOP}/contrib/openbsm .PATH: ${OPENBSMDIR}/bin/auditd CFLAGS+= -I${OPENBSMDIR} Modified: stable/11/usr.sbin/auditdistd/Makefile ============================================================================== --- stable/11/usr.sbin/auditdistd/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/auditdistd/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,7 +2,7 @@ # $FreeBSD$ # -OPENBSMDIR=${.CURDIR}/../../contrib/openbsm +OPENBSMDIR=${SRCTOP}/contrib/openbsm .PATH: ${OPENBSMDIR}/bin/auditdistd # Addition of auditdistd because otherwise generated parse.c can't find Modified: stable/11/usr.sbin/auditreduce/Makefile ============================================================================== --- stable/11/usr.sbin/auditreduce/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/auditreduce/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,7 +2,7 @@ # $FreeBSD$ # -OPENBSMDIR=${.CURDIR}/../../contrib/openbsm +OPENBSMDIR=${SRCTOP}/contrib/openbsm .PATH: ${OPENBSMDIR}/bin/auditreduce CFLAGS+= -I${OPENBSMDIR} Modified: stable/11/usr.sbin/authpf/Makefile ============================================================================== --- stable/11/usr.sbin/authpf/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/authpf/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/pf/authpf +.PATH: ${SRCTOP}/contrib/pf/authpf PROG= authpf MAN= authpf.8 Modified: stable/11/usr.sbin/autofs/Makefile ============================================================================== --- stable/11/usr.sbin/autofs/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/autofs/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -13,14 +13,14 @@ SRCS+= popen.c SRCS+= token.l CFLAGS+=-I${.CURDIR} -CFLAGS+=-I${.CURDIR}/../../sys/fs/autofs +CFLAGS+=-I${SRCTOP}/sys/fs/autofs MAN= automount.8 automountd.8 autounmountd.8 auto_master.5 LIBADD= util # Needed for getmntopts.c -MOUNT= ${.CURDIR}/../../sbin/mount +MOUNT= ${SRCTOP}/sbin/mount CFLAGS+=-I${MOUNT} WARNS= 6 Modified: stable/11/usr.sbin/bhyvectl/Makefile ============================================================================== --- stable/11/usr.sbin/bhyvectl/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/bhyvectl/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -12,6 +12,6 @@ LIBADD= vmmapi util WARNS?= 3 -CFLAGS+= -I${.CURDIR}/../../sys/amd64/vmm +CFLAGS+= -I${SRCTOP}/sys/amd64/vmm .include Modified: stable/11/usr.sbin/bhyveload/Makefile ============================================================================== --- stable/11/usr.sbin/bhyveload/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/bhyveload/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -9,6 +9,6 @@ LIBADD= vmmapi WARNS?= 3 -CFLAGS+=-I${.CURDIR}/../../sys/boot/userboot +CFLAGS+=-I${SRCTOP}/sys/boot/userboot .include Modified: stable/11/usr.sbin/bluetooth/Makefile.inc ============================================================================== --- stable/11/usr.sbin/bluetooth/Makefile.inc Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/bluetooth/Makefile.inc Mon May 29 10:15:41 2017 (r319119) @@ -1,4 +1,3 @@ # $FreeBSD$ -.include "${.CURDIR}/../../Makefile.inc" - +.include "${.CURDIR:H:H}/Makefile.inc" Modified: stable/11/usr.sbin/bluetooth/bthidcontrol/Makefile ============================================================================== --- stable/11/usr.sbin/bluetooth/bthidcontrol/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/bluetooth/bthidcontrol/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,13 +1,13 @@ # $Id: Makefile,v 1.2 2004/02/13 21:44:41 max Exp $ # $FreeBSD$ -.PATH: ${.CURDIR}/../bthidd +.PATH: ${.CURDIR:H}/bthidd PROG= bthidcontrol MAN= bthidcontrol.8 SRCS= bthidcontrol.c hid.c lexer.l parser.y sdp.c WARNS?= 1 -CFLAGS+= -DBTHIDCONTROL=1 -I${.CURDIR}/../bthidd +CFLAGS+= -DBTHIDCONTROL=1 -I${.CURDIR:H}/bthidd LIBADD+= bluetooth sdp usbhid Modified: stable/11/usr.sbin/bluetooth/rfcomm_pppd/Makefile ============================================================================== --- stable/11/usr.sbin/bluetooth/rfcomm_pppd/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/bluetooth/rfcomm_pppd/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,7 +1,7 @@ # $Id: Makefile,v 1.7 2003/09/07 18:32:11 max Exp $ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../usr.bin/bluetooth/rfcomm_sppd +.PATH: ${SRCTOP}/usr.bin/bluetooth/rfcomm_sppd PROG= rfcomm_pppd MAN= rfcomm_pppd.8 Modified: stable/11/usr.sbin/bsnmpd/bsnmpd/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/bsnmpd/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/bsnmpd/bsnmpd/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -4,7 +4,7 @@ .include -CONTRIB=${.CURDIR}/../../../contrib/bsnmp +CONTRIB=${SRCTOP}/contrib/bsnmp .PATH: ${CONTRIB}/snmpd PROG= bsnmpd Modified: stable/11/usr.sbin/bsnmpd/gensnmptree/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/gensnmptree/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/bsnmpd/gensnmptree/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,7 +2,7 @@ # # Author: Harti Brandt -CONTRIB=${.CURDIR}/../../../contrib/bsnmp +CONTRIB=${SRCTOP}/contrib/bsnmp .PATH: ${CONTRIB}/gensnmptree PROG= gensnmptree Modified: stable/11/usr.sbin/bsnmpd/tools/Makefile.inc ============================================================================== --- stable/11/usr.sbin/bsnmpd/tools/Makefile.inc Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/bsnmpd/tools/Makefile.inc Mon May 29 10:15:41 2017 (r319119) @@ -6,10 +6,10 @@ PACKAGE= bsnmp CFLAGS+= -I. -I${.CURDIR} -.if exists(${.OBJDIR}/../libbsnmptools) -LIBBSNMPTOOLSDIR= ${.OBJDIR}/../libbsnmptools +.if exists(${.OBJDIR:H}/libbsnmptools) +LIBBSNMPTOOLSDIR= ${.OBJDIR:H}/libbsnmptools .else -LIBBSNMPTOOLSDIR= ${.CURDIR}/../libbsnmptools +LIBBSNMPTOOLSDIR= ${.CURDIR:H}/libbsnmptools .endif LIBBSNMPTOOLS= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a Modified: stable/11/usr.sbin/camdd/Makefile ============================================================================== --- stable/11/usr.sbin/camdd/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/camdd/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,7 +2,7 @@ PROG= camdd SRCS= camdd.c -SDIR= ${.CURDIR}/../../sys +SDIR= ${SRCTOP}/sys LIBADD= cam mt util pthread NO_WTHREAD_SAFETY= 1 MAN= camdd.8 Modified: stable/11/usr.sbin/ckdist/Makefile ============================================================================== --- stable/11/usr.sbin/ckdist/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ckdist/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../usr.bin/cksum +.PATH: ${SRCTOP}/usr.bin/cksum PROG= ckdist SRCS= ckdist.c crc.c Modified: stable/11/usr.sbin/cron/crontab/Makefile ============================================================================== --- stable/11/usr.sbin/cron/crontab/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/cron/crontab/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -10,7 +10,7 @@ PRECIOUSPROG= WARNS?= 3 -CFLAGS+= -I${.CURDIR}/../cron +CFLAGS+= -I${.CURDIR:H}/cron LIBADD= cron md util Modified: stable/11/usr.sbin/cron/lib/Makefile ============================================================================== --- stable/11/usr.sbin/cron/lib/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/cron/lib/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -6,7 +6,7 @@ SRCS= entry.c env.c misc.c WARNS?= 3 -CFLAGS+= -I${.CURDIR}/../cron +CFLAGS+= -I${.CURDIR:H}/cron CFLAGS+= -DLOGIN_CAP -DPAM .include Modified: stable/11/usr.sbin/ctladm/Makefile ============================================================================== --- stable/11/usr.sbin/ctladm/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ctladm/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,8 +2,8 @@ PROG= ctladm SRCS= ctladm.c util.c ctl_util.c ctl_scsi_all.c -.PATH: ${.CURDIR}/../../sys/cam/ctl -SDIR= ${.CURDIR}/../../sys +.PATH: ${SRCTOP}/sys/cam/ctl +SDIR= ${SRCTOP}/sys CFLAGS+= -I${SDIR} # This is necessary because of these warnings: # warning: cast increases required alignment of target type Modified: stable/11/usr.sbin/ctld/Makefile ============================================================================== --- stable/11/usr.sbin/ctld/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ctld/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,15 +1,15 @@ # $FreeBSD$ -CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include -.PATH: ${.CURDIR}/../../contrib/libucl/include +CFLAGS+=-I${SRCTOP}/contrib/libucl/include +.PATH: ${SRCTOP}/contrib/libucl/include PROG= ctld SRCS= chap.c ctld.c discovery.c isns.c kernel.c keys.c log.c SRCS+= login.c parse.y pdu.c token.l y.tab.h uclparse.c CFLAGS+= -I${.CURDIR} -CFLAGS+= -I${.CURDIR}/../../sys -CFLAGS+= -I${.CURDIR}/../../sys/cam/ctl -CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/sys/cam/ctl +CFLAGS+= -I${SRCTOP}/sys/dev/iscsi #CFLAGS+= -DICL_KERNEL_PROXY MAN= ctld.8 ctl.conf.5 Modified: stable/11/usr.sbin/ctm/Makefile.inc ============================================================================== --- stable/11/usr.sbin/ctm/Makefile.inc Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ctm/Makefile.inc Mon May 29 10:15:41 2017 (r319119) @@ -1,5 +1,5 @@ # $FreeBSD$ -.if exists(${.CURDIR}/../../Makefile.inc) -.include "${.CURDIR}/../../Makefile.inc" +.if exists(${.CURDIR:H:H}/Makefile.inc) +.include "${.CURDIR:H:H}/Makefile.inc" .endif Modified: stable/11/usr.sbin/ctm/ctm/Makefile ============================================================================== --- stable/11/usr.sbin/ctm/ctm/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ctm/ctm/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -18,7 +18,7 @@ LIBADD= md WARNS?= 2 -.if exists(${.CURDIR}/../../Makefile.inc) -.include "${.CURDIR}/../../Makefile.inc" +.if exists(${.CURDIR:H:H}/Makefile.inc) +.include "${.CURDIR:H:H}/Makefile.inc" .endif .include Modified: stable/11/usr.sbin/ctm/ctm_dequeue/Makefile ============================================================================== --- stable/11/usr.sbin/ctm/ctm_dequeue/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ctm/ctm_dequeue/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../ctm_rmail +.PATH: ${.CURDIR:H}/ctm_rmail PROG= ctm_dequeue MAN= SRCS= ctm_dequeue.c error.c -CFLAGS+= -I${.CURDIR}/../ctm_rmail +CFLAGS+= -I${.CURDIR:H}/ctm_rmail WARNS?= 1 Modified: stable/11/usr.sbin/ctm/ctm_smail/Makefile ============================================================================== --- stable/11/usr.sbin/ctm/ctm_smail/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ctm/ctm_smail/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../ctm_rmail +.PATH: ${.CURDIR:H}/ctm_rmail PROG= ctm_smail MAN= SRCS= ctm_smail.c error.c -CFLAGS+= -I${.CURDIR}/../ctm_rmail +CFLAGS+= -I${.CURDIR:H}/ctm_rmail WARNS?= 2 Modified: stable/11/usr.sbin/dconschat/Makefile ============================================================================== --- stable/11/usr.sbin/dconschat/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/dconschat/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -3,7 +3,7 @@ PROG= dconschat MAN= dconschat.8 -CFLAGS+= -I${.CURDIR}/../../sys +CFLAGS+= -I${SRCTOP}/sys LIBADD= kvm Modified: stable/11/usr.sbin/editmap/Makefile ============================================================================== --- stable/11/usr.sbin/editmap/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/editmap/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,6 +1,6 @@ # $FreeBSD$ -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/editmap PROG= editmap Modified: stable/11/usr.sbin/eeprom/Makefile ============================================================================== --- stable/11/usr.sbin/eeprom/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/eeprom/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,11 +1,11 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../ofwdump +.PATH: ${.CURDIR:H}/ofwdump PROG= eeprom MAN= eeprom.8 MANSUBDIR= /sparc64 SRCS= eeprom.c ofw_options.c ofw_util.c -CFLAGS+= -I${.CURDIR}/../ofwdump +CFLAGS+= -I${.CURDIR:H}/ofwdump .include Modified: stable/11/usr.sbin/fdcontrol/Makefile ============================================================================== --- stable/11/usr.sbin/fdcontrol/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/fdcontrol/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,10 +1,10 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../fdread +.PATH: ${.CURDIR:H}/fdread PROG= fdcontrol SRCS= fdcontrol.c fdutil.c -CFLAGS+= -I${.CURDIR}/../fdread +CFLAGS+= -I${.CURDIR:H}/fdread MAN= fdcontrol.8 .if ${MACHINE} == "pc98" Modified: stable/11/usr.sbin/fdformat/Makefile ============================================================================== --- stable/11/usr.sbin/fdformat/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/fdformat/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,11 +1,11 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../fdread +.PATH: ${.CURDIR:H}/fdread PROG= fdformat SRCS= fdformat.c fdutil.c -CFLAGS+= -I${.CURDIR}/../fdread +CFLAGS+= -I${.CURDIR:H}/fdread .if ${MACHINE} == "pc98" CFLAGS+= -DPC98 Modified: stable/11/usr.sbin/fmtree/Makefile ============================================================================== --- stable/11/usr.sbin/fmtree/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/fmtree/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -3,7 +3,7 @@ .include -.PATH: ${.CURDIR}/../../usr.bin/cksum +.PATH: ${SRCTOP}/usr.bin/cksum PROG= fmtree MAN= fmtree.8 Modified: stable/11/usr.sbin/fstyp/Makefile ============================================================================== --- stable/11/usr.sbin/fstyp/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/fstyp/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -18,7 +18,7 @@ WARNS?= 2 SUBDIR+= tests .endif -CFLAGS+=-I${.CURDIR}/../../sys +CFLAGS+=-I${SRCTOP}/sys .if ${MK_ZFS} != "no" IGNORE_PRAGMA= YES Modified: stable/11/usr.sbin/ftp-proxy/Makefile ============================================================================== --- stable/11/usr.sbin/ftp-proxy/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ftp-proxy/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,13 +1,13 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/pf/ftp-proxy +.PATH: ${SRCTOP}/contrib/pf/ftp-proxy PROG= ftp-proxy MAN= ftp-proxy.8 SRCS= ftp-proxy.c filter.c -CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent +CFLAGS+=-I${SRCTOP}/contrib/pf/libevent LIBADD= event Modified: stable/11/usr.sbin/fwcontrol/Makefile ============================================================================== --- stable/11/usr.sbin/fwcontrol/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/fwcontrol/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -5,9 +5,9 @@ SRCS= fwcontrol.c fwcrom.c fwdv.c fwmpeg MAN= fwcontrol.8 WARNS?= 3 -.PATH: ${.CURDIR}/../../sys/dev/firewire +.PATH: ${SRCTOP}/sys/dev/firewire -SDIR= ${.CURDIR}/../../sys +SDIR= ${SRCTOP}/sys CFLAGS+=-I${.CURDIR} -I${SDIR} .include Modified: stable/11/usr.sbin/gpioctl/Makefile ============================================================================== --- stable/11/usr.sbin/gpioctl/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/gpioctl/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -3,7 +3,7 @@ PROG= gpioctl MAN= gpioctl.8 -CFLAGS+= -I${.CURDIR}/../../lib/libgpio +CFLAGS+= -I${SRCTOP}/lib/libgpio LIBADD= gpio Modified: stable/11/usr.sbin/gssd/Makefile ============================================================================== --- stable/11/usr.sbin/gssd/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/gssd/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -18,7 +18,7 @@ CFLAGS+= -DWITHOUT_KERBEROS CLEANFILES= gssd_svc.c gssd_xdr.c gssd.h -RPCSRC= ${.CURDIR}/../../sys/kgssapi/gssd.x +RPCSRC= ${SRCTOP}/sys/kgssapi/gssd.x RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C -M gssd_svc.c: ${RPCSRC} gssd.h @@ -30,6 +30,6 @@ gssd_xdr.c: ${RPCSRC} gssd.h gssd.h: ${RPCSRC} ${RPCGEN} -h -o ${.TARGET} ${RPCSRC} -.PATH: ${.CURDIR}/../../sys/kgssapi +.PATH: ${SRCTOP}/sys/kgssapi .include Modified: stable/11/usr.sbin/hyperv/tools/kvp/Makefile ============================================================================== --- stable/11/usr.sbin/hyperv/tools/kvp/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/hyperv/tools/kvp/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,12 +2,12 @@ .include -HV_KVP_DAEMON_DISTDIR?= ${.CURDIR}/../../../../contrib/hyperv/tools -.PATH: ${HV_KVP_DAEMON_DISTDIR} +HV_KVP_DAEMON_DISTDIR?= ${SRCTOP}/contrib/hyperv/tools +.PATH: ${HV_KVP_DAEMON_DISTDIR} PROG= hv_kvp_daemon -MAN= hv_kvp_daemon.8 +MAN= hv_kvp_daemon.8 -CFLAGS+= -I${.CURDIR}/../../../../sys/dev/hyperv/utilities +CFLAGS+= -I${SRCTOP}/sys/dev/hyperv/utilities .include Modified: stable/11/usr.sbin/hyperv/tools/vss/Makefile ============================================================================== --- stable/11/usr.sbin/hyperv/tools/vss/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/hyperv/tools/vss/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -3,12 +3,12 @@ DIRDEPS = lib/libc .include -HV_VSS_DAEMON_DISTDIR?= ${.CURDIR}/../../../../contrib/hyperv/tools -.PATH: ${HV_VSS_DAEMON_DISTDIR} +HV_VSS_DAEMON_DISTDIR?= ${SRCTOP}/contrib/hyperv/tools +.PATH: ${HV_VSS_DAEMON_DISTDIR} PROG= hv_vss_daemon -MAN= hv_vss_daemon.8 +MAN= hv_vss_daemon.8 -CFLAGS+= -I${.CURDIR}/../../../../sys/dev/hyperv/utilities +CFLAGS+= -I${SRCTOP}/sys/dev/hyperv/utilities .include Modified: stable/11/usr.sbin/iovctl/Makefile ============================================================================== --- stable/11/usr.sbin/iovctl/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/iovctl/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -4,7 +4,7 @@ PROG= iovctl SRCS= iovctl.c parse.c validate.c LIBADD= nv ucl m -CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include +CFLAGS+=-I${SRCTOP}/contrib/libucl/include WARNS?=6 Modified: stable/11/usr.sbin/iscsid/Makefile ============================================================================== --- stable/11/usr.sbin/iscsid/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/iscsid/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -4,8 +4,8 @@ PACKAGE= iscsi PROG= iscsid SRCS= chap.c discovery.c iscsid.c keys.c log.c login.c pdu.c CFLAGS+= -I${.CURDIR} -CFLAGS+= -I${.CURDIR}/../../sys/cam -CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi +CFLAGS+= -I${SRCTOP}/sys/cam +CFLAGS+= -I${SRCTOP}/sys/dev/iscsi CFLAGS+= -DICL_KERNEL_PROXY MAN= iscsid.8 Modified: stable/11/usr.sbin/mailstats/Makefile ============================================================================== --- stable/11/usr.sbin/mailstats/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/mailstats/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,7 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 9/21/96 # $FreeBSD$ -SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/mailstats PROG= mailstats Modified: stable/11/usr.sbin/mailwrapper/Makefile ============================================================================== --- stable/11/usr.sbin/mailwrapper/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/mailwrapper/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -27,7 +27,7 @@ SYMLINKS+= ..${BINDIR}/mailwrapper /bin/ .if ${MK_MAILWRAPPER} != "no" .if !exists(${DESTDIR}/etc/mail/mailer.conf) -FILES= ${.CURDIR}/../../etc/mail/mailer.conf +FILES= ${SRCTOP}/etc/mail/mailer.conf FILESDIR= /etc/mail FILESMODE= 644 .endif Modified: stable/11/usr.sbin/makemap/Makefile ============================================================================== --- stable/11/usr.sbin/makemap/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/makemap/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,7 +1,7 @@ # @(#)Makefile 8.4 (Berkeley) 6/10/97 # $FreeBSD$ -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/makemap PROG= makemap Modified: stable/11/usr.sbin/mlxcontrol/Makefile ============================================================================== --- stable/11/usr.sbin/mlxcontrol/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/mlxcontrol/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -4,7 +4,7 @@ PROG= mlxcontrol MAN= mlxcontrol.8 SRCS= command.c config.c interface.c util.c -CFLAGS+= -I${.CURDIR}/../../sys +CFLAGS+= -I${SRCTOP}/sys WARNS?= 2 Modified: stable/11/usr.sbin/mount_smbfs/Makefile ============================================================================== --- stable/11/usr.sbin/mount_smbfs/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/mount_smbfs/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -4,8 +4,8 @@ PROG= mount_smbfs SRCS= mount_smbfs.c getmntopts.c MAN= mount_smbfs.8 -MOUNTDIR= ${.CURDIR}/../../sbin/mount -CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs +MOUNTDIR= ${SRCTOP}/sbin/mount +CONTRIBDIR= ${SRCTOP}/contrib/smbfs CFLAGS+= -DSMBFS -I${MOUNTDIR} -I${CONTRIBDIR}/include LIBADD= smb Modified: stable/11/usr.sbin/mountd/Makefile ============================================================================== --- stable/11/usr.sbin/mountd/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/mountd/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -5,7 +5,7 @@ PROG= mountd SRCS= mountd.c getmntopts.c MAN= exports.5 netgroup.5 mountd.8 -MOUNT= ${.CURDIR}/../../sbin/mount +MOUNT= ${SRCTOP}/sbin/mount CFLAGS+= -I${MOUNT} WARNS?= 2 Modified: stable/11/usr.sbin/mpsutil/Makefile ============================================================================== --- stable/11/usr.sbin/mpsutil/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/mpsutil/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -10,7 +10,7 @@ WARNS?= 3 LINKS= ${BINDIR}/mpsutil ${BINDIR}/mprutil MLINKS= mpsutil.8 mprutil.8 -CFLAGS+= -I${.CURDIR}/../../sys -I. -DUSE_MPT_IOCTLS +CFLAGS+= -I${SRCTOP}/sys -I. -DUSE_MPT_IOCTLS # Avoid dirdep dependency on libutil CFLAGS+= -I${SRCTOP}/lib/libutil Modified: stable/11/usr.sbin/ndiscvt/Makefile ============================================================================== --- stable/11/usr.sbin/ndiscvt/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ndiscvt/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../sys/compat/ndis +.PATH: ${SRCTOP}/sys/compat/ndis PROG= ndiscvt SRCS= ndiscvt.c @@ -17,7 +17,7 @@ LIBADD= l YFLAGS+=-v -CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../../sys +CFLAGS+=-I. -I${.CURDIR} -I${SRCTOP}/sys CLEANFILES= y.output Modified: stable/11/usr.sbin/ndp/Makefile ============================================================================== --- stable/11/usr.sbin/ndp/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/ndp/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -13,13 +13,13 @@ # A PARTICULAR PURPOSE. # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/tcpdump +.PATH: ${SRCTOP}/contrib/tcpdump PROG= ndp MAN= ndp.8 SRCS= ndp.c gmt2local.c -CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/../../contrib/tcpdump +CFLAGS+= -I. -I${.CURDIR} -I${SRCTOP}/contrib/tcpdump CFLAGS+= -D_U_="" WARNS?= 1 Modified: stable/11/usr.sbin/nmtree/Makefile ============================================================================== --- stable/11/usr.sbin/nmtree/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/nmtree/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,18 +2,18 @@ .include -.PATH: ${.CURDIR}/../../contrib/mtree +.PATH: ${SRCTOP}/contrib/mtree PROG= mtree MAN= mtree.5 mtree.8 SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \ only.c spec.c specspec.c verify.c -CFLAGS+= -I${.CURDIR}/../../contrib/mknod -.PATH: ${.CURDIR}/../../contrib/mknod +CFLAGS+= -I${SRCTOP}/contrib/mknod +.PATH: ${SRCTOP}/contrib/mknod SRCS+= pack_dev.c -CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd +CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= netbsd md util LINKS= ${BINDIR}/mtree ${BINDIR}/nmtree Modified: stable/11/usr.sbin/pkg/Makefile ============================================================================== --- stable/11/usr.sbin/pkg/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/pkg/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -4,8 +4,8 @@ PROG= pkg SRCS= pkg.c dns_utils.c config.c MAN= pkg.7 -CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include -.PATH: ${.CURDIR}/../../contrib/libucl/include +CFLAGS+=-I${SRCTOP}/contrib/libucl/include +.PATH: ${SRCTOP}/contrib/libucl/include LIBADD= archive fetch ucl sbuf crypto ssl .include Modified: stable/11/usr.sbin/pnpinfo/Makefile ============================================================================== --- stable/11/usr.sbin/pnpinfo/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/pnpinfo/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,11 +1,11 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/pnpinfo +.PATH: ${SRCTOP}/contrib/pnpinfo PROG= pnpinfo MAN= pnpinfo.8 -CFLAGS+= -I${.CURDIR}/../../sys +CFLAGS+= -I${SRCTOP}/sys .if ${MACHINE} == "pc98" CFLAGS+= -DPC98 Modified: stable/11/usr.sbin/praliases/Makefile ============================================================================== --- stable/11/usr.sbin/praliases/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/praliases/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,7 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 9/21/96 # $FreeBSD$ -SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/praliases PROG= praliases Modified: stable/11/usr.sbin/praudit/Makefile ============================================================================== --- stable/11/usr.sbin/praudit/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/praudit/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,7 +2,7 @@ # $FreeBSD$ # -OPENBSMDIR=${.CURDIR}/../../contrib/openbsm +OPENBSMDIR=${SRCTOP}/contrib/openbsm .PATH: ${OPENBSMDIR}/bin/praudit PROG= praudit Modified: stable/11/usr.sbin/pwd_mkdb/Makefile ============================================================================== --- stable/11/usr.sbin/pwd_mkdb/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/pwd_mkdb/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,12 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -.PATH: ${.CURDIR}/../../lib/libc/gen # for pw_scan.c +.PATH: ${SRCTOP}/lib/libc/gen # for pw_scan.c PROG= pwd_mkdb MAN= pwd_mkdb.8 SRCS= pw_scan.c pwd_mkdb.c -CFLAGS+= -I${.CURDIR}/../../lib/libc/gen # for pw_scan.h +CFLAGS+= -I${SRCTOP}/lib/libc/gen # for pw_scan.h .include Modified: stable/11/usr.sbin/rip6query/Makefile ============================================================================== --- stable/11/usr.sbin/rip6query/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/rip6query/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -4,6 +4,6 @@ PROG= rip6query MAN= rip6query.8 -CFLAGS+= -I${.CURDIR}/../route6d +CFLAGS+= -I${.CURDIR:H}/route6d .include Modified: stable/11/usr.sbin/rpcbind/tests/Makefile ============================================================================== --- stable/11/usr.sbin/rpcbind/tests/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/rpcbind/tests/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -5,7 +5,7 @@ .PATH: ${.CURDIR}/.. ATF_TESTS_C= addrmerge_test -CFLAGS+= -I${.CURDIR}/.. -Wno-cast-qual +CFLAGS+= -I${.CURDIR:H} -Wno-cast-qual SRCS.addrmerge_test= addrmerge_test.c util.c .if ${MK_INET6_SUPPORT} != "no" Modified: stable/11/usr.sbin/rtadvctl/Makefile ============================================================================== --- stable/11/usr.sbin/rtadvctl/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/rtadvctl/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,13 +1,13 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/../rtadvd +.PATH: ${.CURDIR:H}/rtadvd PROG= rtadvctl MAN= rtadvctl.8 SRCS= rtadvctl.c control.c control_client.c if.c timer_subr.c -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../rtadvd +CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/rtadvd WARNS?= 1 .include Modified: stable/11/usr.sbin/sa/Makefile ============================================================================== --- stable/11/usr.sbin/sa/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/sa/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../usr.bin/lastcomm +.PATH: ${SRCTOP}/usr.bin/lastcomm PROG= sa MAN= sa.8 Modified: stable/11/usr.sbin/sendmail/Makefile ============================================================================== --- stable/11/usr.sbin/sendmail/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/sendmail/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -4,14 +4,14 @@ .include PACKAGE=sendmail -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail SMDIR= ${SENDMAIL_DIR}/src .PATH: ${SMDIR} BINDIR= ${LIBEXECDIR}/sendmail PROG= sendmail -MAN= mailq.1 newaliases.1 aliases.5 sendmail.8 +MAN= mailq.1 newaliases.1 aliases.5 sendmail.8 MLINKS+=sendmail.8 hoststat.8 MLINKS+=sendmail.8 purgestat.8 SRCS= alias.c arpadate.c bf.c collect.c conf.c control.c \ Modified: stable/11/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- stable/11/usr.sbin/tcpdump/tcpdump/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/tcpdump/tcpdump/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -2,7 +2,7 @@ .include -TCPDUMP_DISTDIR?= ${.CURDIR}/../../../contrib/tcpdump +TCPDUMP_DISTDIR?= ${SRCTOP}/contrib/tcpdump .PATH: ${TCPDUMP_DISTDIR} PROG= tcpdump Modified: stable/11/usr.sbin/timed/timedc/Makefile ============================================================================== --- stable/11/usr.sbin/timed/timedc/Makefile Mon May 29 09:30:38 2017 (r319118) +++ stable/11/usr.sbin/timed/timedc/Makefile Mon May 29 10:15:41 2017 (r319119) @@ -1,7 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -.PATH: ${.CURDIR}/../timed +.PATH: ${.CURDIR:H}/timed PROG= timedc MAN= timedc.8 From owner-svn-src-all@freebsd.org Mon May 29 11:37:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BCB3CFC97F; Mon, 29 May 2017 11:37:10 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C70D75DC7; Mon, 29 May 2017 11:37:10 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TBb9IQ060534; Mon, 29 May 2017 11:37:09 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TBb9GT060533; Mon, 29 May 2017 11:37:09 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705291137.v4TBb9GT060533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Mon, 29 May 2017 11:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319124 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 11:37:10 -0000 Author: royger Date: Mon May 29 11:37:08 2017 New Revision: 319124 URL: https://svnweb.freebsd.org/changeset/base/319124 Log: MFC r318632, r318633: bsdinstall: mount is not needed for the ZFS install case bsdinstall: do not use distextract in scripted mode Modified: stable/11/usr.sbin/bsdinstall/scripts/script Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/script Mon May 29 11:16:59 2017 (r319123) +++ stable/11/usr.sbin/bsdinstall/scripts/script Mon May 29 11:37:08 2017 (r319124) @@ -42,6 +42,11 @@ f_include $BSDCFG_SHARE/variable.subr # DISTRIBUTIONS # BSDINSTALL_DISTDIR +# +# Default name of the ZFS boot-pool +# +: ${ZFSBOOT_POOL_NAME:=zroot} + ############################################################ GLOBALS # @@ -53,8 +58,6 @@ msg_installation_error="Installation Err error() { - [ -f "$PATH_FSTAB" ] && bsdinstall umount - local file f_getvar "$VAR_DEBUG_FILE#+" file if [ "$file" ]; then @@ -63,6 +66,13 @@ error() # No need to restore title, pining for the fjords fi + [ -f "$PATH_FSTAB" ] || exit + if [ "$ZFSBOOT_DISKS" ]; then + zpool export $ZFSBOOT_POOL_NAME + else + bsdinstall umount + fi + exit 1 } @@ -99,12 +109,15 @@ if [ "$ZFSBOOT_DISKS" ]; then bsdinstall zfsboot else bsdinstall scriptedpart "$PARTITIONS" + bsdinstall mount fi -bsdinstall mount # Unpack distributions bsdinstall checksum -bsdinstall distextract +for set in $DISTRIBUTIONS; do + f_dprintf "Extracting $BSDINSTALL_DISTDIR/$set" + tar -xf "$BSDINSTALL_DISTDIR/$set" -C $BSDINSTALL_CHROOT +done # Finalize install bsdinstall config @@ -125,7 +138,11 @@ if [ -f /tmp/bsdinstall-installscript-ab fi bsdinstall entropy -bsdinstall umount +if [ "$ZFSBOOT_DISKS" ]; then + zpool export $ZFSBOOT_POOL_NAME +else + bsdinstall umount +fi f_dprintf "Installation Completed at %s" "$( date )" From owner-svn-src-all@freebsd.org Mon May 29 12:51:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6886ACFE45D; Mon, 29 May 2017 12:51:03 +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 3746F78181; Mon, 29 May 2017 12:51:03 +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 v4TCp2iM090284; Mon, 29 May 2017 12:51:02 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TCp24h090283; Mon, 29 May 2017 12:51:02 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201705291251.v4TCp24h090283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 29 May 2017 12:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319125 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 12:51:03 -0000 Author: manu Date: Mon May 29 12:51:02 2017 New Revision: 319125 URL: https://svnweb.freebsd.org/changeset/base/319125 Log: mkimg: Correct an off by one error in the PMBR size The PMBR last sector should be number of sector - 1 (As stated in UEFI Spec 2.6 page 118 table 17). This fixes warning printed by linux tools like parted or fdisk. Sponsored by: Gandi.net Modified: head/usr.bin/mkimg/gpt.c Modified: head/usr.bin/mkimg/gpt.c ============================================================================== --- head/usr.bin/mkimg/gpt.c Mon May 29 11:37:08 2017 (r319124) +++ head/usr.bin/mkimg/gpt.c Mon May 29 12:51:02 2017 (r319125) @@ -152,7 +152,7 @@ gpt_write_pmbr(lba_t blks, void *bootcod uint32_t secs; int error; - secs = (blks > UINT32_MAX) ? UINT32_MAX : (uint32_t)blks; + secs = (blks > UINT32_MAX) ? UINT32_MAX : (uint32_t)blks - 1; pmbr = malloc(secsz); if (pmbr == NULL) From owner-svn-src-all@freebsd.org Mon May 29 12:52:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3D42CFE5C1; Mon, 29 May 2017 12:52:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7627A78481; Mon, 29 May 2017 12:52:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TCqD1B093202; Mon, 29 May 2017 12:52:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TCqDDx093201; Mon, 29 May 2017 12:52:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291252.v4TCqDDx093201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 12:52:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319126 - stable/11/lib/libc/stdlib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 12:52:14 -0000 Author: kib Date: Mon May 29 12:52:13 2017 New Revision: 319126 URL: https://svnweb.freebsd.org/changeset/base/319126 Log: MFC r318298: Fix several buffer overflows in realpath(3), and other minor issues. PR: 219154 Modified: stable/11/lib/libc/stdlib/realpath.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdlib/realpath.c ============================================================================== --- stable/11/lib/libc/stdlib/realpath.c Mon May 29 12:51:02 2017 (r319125) +++ stable/11/lib/libc/stdlib/realpath.c Mon May 29 12:52:13 2017 (r319126) @@ -51,10 +51,11 @@ char * realpath(const char * __restrict path, char * __restrict resolved) { struct stat sb; - char *p, *q, *s; - size_t left_len, resolved_len; + char *p, *q; + size_t left_len, resolved_len, next_token_len; unsigned symlinks; - int m, slen; + int m; + ssize_t slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; if (path == NULL) { @@ -109,18 +110,19 @@ realpath(const char * __restrict path, c * and its length. */ p = strchr(left, '/'); - s = p ? p : left + left_len; - if (s - left >= sizeof(next_token)) { - if (m) - free(resolved); - errno = ENAMETOOLONG; - return (NULL); + + next_token_len = p ? p - left : left_len; + memcpy(next_token, left, next_token_len); + next_token[next_token_len] = '\0'; + + if (p != NULL) { + left_len -= next_token_len + 1; + memmove(left, p + 1, left_len + 1); + } else { + left[0] = '\0'; + left_len = 0; } - memcpy(next_token, left, s - left); - next_token[s - left] = '\0'; - left_len -= s - left; - if (p != NULL) - memmove(left, s + 1, left_len + 1); + if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { if (m) @@ -173,19 +175,25 @@ realpath(const char * __restrict path, c errno = ELOOP; return (NULL); } - slen = readlink(resolved, symlink, sizeof(symlink) - 1); - if (slen < 0) { + slen = readlink(resolved, symlink, sizeof(symlink)); + if (slen <= 0 || slen >= sizeof(symlink)) { if (m) free(resolved); + if (slen < 0) { + /* keep errno from readlink(2) call */ + } else if (slen == 0) { + errno = ENOENT; + } else { + errno = ENAMETOOLONG; + } return (NULL); } symlink[slen] = '\0'; if (symlink[0] == '/') { resolved[1] = 0; resolved_len = 1; - } else if (resolved_len > 1) { + } else { /* Strip the last path component. */ - resolved[resolved_len - 1] = '\0'; q = strrchr(resolved, '/') + 1; *q = '\0'; resolved_len = q - resolved; @@ -209,7 +217,7 @@ realpath(const char * __restrict path, c } left_len = strlcat(symlink, left, sizeof(symlink)); - if (left_len >= sizeof(left)) { + if (left_len >= sizeof(symlink)) { if (m) free(resolved); errno = ENAMETOOLONG; From owner-svn-src-all@freebsd.org Mon May 29 12:53:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF7E2CFE64F; Mon, 29 May 2017 12:53:45 +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 8941B7861F; Mon, 29 May 2017 12:53:45 +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 v4TCrikA093315; Mon, 29 May 2017 12:53:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TCri0s093314; Mon, 29 May 2017 12:53:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291253.v4TCri0s093314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 12:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319127 - stable/11/lib/libc/stdlib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 12:53:45 -0000 Author: kib Date: Mon May 29 12:53:44 2017 New Revision: 319127 URL: https://svnweb.freebsd.org/changeset/base/319127 Log: MFC r318299: Simplify cleanup on failure in realpath(3). Modified: stable/11/lib/libc/stdlib/realpath.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdlib/realpath.c ============================================================================== --- stable/11/lib/libc/stdlib/realpath.c Mon May 29 12:52:13 2017 (r319126) +++ stable/11/lib/libc/stdlib/realpath.c Mon May 29 12:53:44 2017 (r319127) @@ -47,32 +47,16 @@ __FBSDID("$FreeBSD$"); * components. Returns (resolved) on success, or (NULL) on failure, * in which case the path which caused trouble is left in (resolved). */ -char * -realpath(const char * __restrict path, char * __restrict resolved) +static char * +realpath1(const char *path, char *resolved) { struct stat sb; char *p, *q; size_t left_len, resolved_len, next_token_len; unsigned symlinks; - int m; ssize_t slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; - if (path == NULL) { - errno = EINVAL; - return (NULL); - } - if (path[0] == '\0') { - errno = ENOENT; - return (NULL); - } - if (resolved == NULL) { - resolved = malloc(PATH_MAX); - if (resolved == NULL) - return (NULL); - m = 1; - } else - m = 0; symlinks = 0; if (path[0] == '/') { resolved[0] = '/'; @@ -83,20 +67,14 @@ realpath(const char * __restrict path, c left_len = strlcpy(left, path + 1, sizeof(left)); } else { if (getcwd(resolved, PATH_MAX) == NULL) { - if (m) - free(resolved); - else { - resolved[0] = '.'; - resolved[1] = '\0'; - } + resolved[0] = '.'; + resolved[1] = '\0'; return (NULL); } resolved_len = strlen(resolved); left_len = strlcpy(left, path, sizeof(left)); } if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -125,8 +103,6 @@ realpath(const char * __restrict path, c if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -158,27 +134,18 @@ realpath(const char * __restrict path, c */ resolved_len = strlcat(resolved, next_token, PATH_MAX); if (resolved_len >= PATH_MAX) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } - if (lstat(resolved, &sb) != 0) { - if (m) - free(resolved); + if (lstat(resolved, &sb) != 0) return (NULL); - } if (S_ISLNK(sb.st_mode)) { if (symlinks++ > MAXSYMLINKS) { - if (m) - free(resolved); errno = ELOOP; return (NULL); } slen = readlink(resolved, symlink, sizeof(symlink)); if (slen <= 0 || slen >= sizeof(symlink)) { - if (m) - free(resolved); if (slen < 0) { /* keep errno from readlink(2) call */ } else if (slen == 0) { @@ -207,8 +174,6 @@ realpath(const char * __restrict path, c if (p != NULL) { if (symlink[slen - 1] != '/') { if (slen + 1 >= sizeof(symlink)) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -218,16 +183,12 @@ realpath(const char * __restrict path, c left_len = strlcat(symlink, left, sizeof(symlink)); if (left_len >= sizeof(symlink)) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } } left_len = strlcpy(left, symlink, sizeof(left)); } else if (!S_ISDIR(sb.st_mode) && p != NULL) { - if (m) - free(resolved); errno = ENOTDIR; return (NULL); } @@ -241,3 +202,29 @@ realpath(const char * __restrict path, c resolved[resolved_len - 1] = '\0'; return (resolved); } + +char * +realpath(const char * __restrict path, char * __restrict resolved) +{ + char *m, *res; + + if (path == NULL) { + errno = EINVAL; + return (NULL); + } + if (path[0] == '\0') { + errno = ENOENT; + return (NULL); + } + if (resolved != NULL) { + m = NULL; + } else { + m = resolved = malloc(PATH_MAX); + if (resolved == NULL) + return (NULL); + } + res = realpath1(path, resolved); + if (res == NULL) + free(m); + return (res); +} From owner-svn-src-all@freebsd.org Mon May 29 12:55:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23E2ACFE6C1; Mon, 29 May 2017 12:55:28 +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 E79CC78749; Mon, 29 May 2017 12:55:27 +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 v4TCtQ5N093457; Mon, 29 May 2017 12:55:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TCtQeq093456; Mon, 29 May 2017 12:55:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291255.v4TCtQeq093456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 12:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319128 - stable/11/lib/libc/stdlib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 12:55:28 -0000 Author: kib Date: Mon May 29 12:55:26 2017 New Revision: 319128 URL: https://svnweb.freebsd.org/changeset/base/319128 Log: MFC r318303: Style. Modified: stable/11/lib/libc/stdlib/realpath.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdlib/realpath.c ============================================================================== --- stable/11/lib/libc/stdlib/realpath.c Mon May 29 12:53:44 2017 (r319127) +++ stable/11/lib/libc/stdlib/realpath.c Mon May 29 12:55:26 2017 (r319128) @@ -89,7 +89,7 @@ realpath1(const char *path, char *resolv */ p = strchr(left, '/'); - next_token_len = p ? p - left : left_len; + next_token_len = p != NULL ? p - left : left_len; memcpy(next_token, left, next_token_len); next_token[next_token_len] = '\0'; @@ -112,10 +112,9 @@ realpath1(const char *path, char *resolv if (next_token[0] == '\0') { /* Handle consequential slashes. */ continue; - } - else if (strcmp(next_token, ".") == 0) + } else if (strcmp(next_token, ".") == 0) { continue; - else if (strcmp(next_token, "..") == 0) { + } else if (strcmp(next_token, "..") == 0) { /* * Strip the last path component except when we have * single "/" @@ -146,13 +145,12 @@ realpath1(const char *path, char *resolv } slen = readlink(resolved, symlink, sizeof(symlink)); if (slen <= 0 || slen >= sizeof(symlink)) { - if (slen < 0) { - /* keep errno from readlink(2) call */ - } else if (slen == 0) { + if (slen < 0) + ; /* keep errno from readlink(2) call */ + else if (slen == 0) errno = ENOENT; - } else { + else errno = ENAMETOOLONG; - } return (NULL); } symlink[slen] = '\0'; From owner-svn-src-all@freebsd.org Mon May 29 12:58:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E64BCCFE729; Mon, 29 May 2017 12:58:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA9EB7889D; Mon, 29 May 2017 12:58:31 +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 v4TCwU7X093615; Mon, 29 May 2017 12:58:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TCwU2h093614; Mon, 29 May 2017 12:58:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291258.v4TCwU2h093614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 12:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319129 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 12:58:32 -0000 Author: kib Date: Mon May 29 12:58:30 2017 New Revision: 319129 URL: https://svnweb.freebsd.org/changeset/base/319129 Log: MFC r318298: Fix several buffer overflows in realpath(3), and other minor issues. PR: 219154 Modified: stable/10/lib/libc/stdlib/realpath.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/realpath.c ============================================================================== --- stable/10/lib/libc/stdlib/realpath.c Mon May 29 12:55:26 2017 (r319128) +++ stable/10/lib/libc/stdlib/realpath.c Mon May 29 12:58:30 2017 (r319129) @@ -51,10 +51,11 @@ char * realpath(const char * __restrict path, char * __restrict resolved) { struct stat sb; - char *p, *q, *s; - size_t left_len, resolved_len; + char *p, *q; + size_t left_len, resolved_len, next_token_len; unsigned symlinks; - int m, slen; + int m; + ssize_t slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; if (path == NULL) { @@ -109,18 +110,19 @@ realpath(const char * __restrict path, c * and its length. */ p = strchr(left, '/'); - s = p ? p : left + left_len; - if (s - left >= sizeof(next_token)) { - if (m) - free(resolved); - errno = ENAMETOOLONG; - return (NULL); + + next_token_len = p ? p - left : left_len; + memcpy(next_token, left, next_token_len); + next_token[next_token_len] = '\0'; + + if (p != NULL) { + left_len -= next_token_len + 1; + memmove(left, p + 1, left_len + 1); + } else { + left[0] = '\0'; + left_len = 0; } - memcpy(next_token, left, s - left); - next_token[s - left] = '\0'; - left_len -= s - left; - if (p != NULL) - memmove(left, s + 1, left_len + 1); + if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { if (m) @@ -173,19 +175,25 @@ realpath(const char * __restrict path, c errno = ELOOP; return (NULL); } - slen = readlink(resolved, symlink, sizeof(symlink) - 1); - if (slen < 0) { + slen = readlink(resolved, symlink, sizeof(symlink)); + if (slen <= 0 || slen >= sizeof(symlink)) { if (m) free(resolved); + if (slen < 0) { + /* keep errno from readlink(2) call */ + } else if (slen == 0) { + errno = ENOENT; + } else { + errno = ENAMETOOLONG; + } return (NULL); } symlink[slen] = '\0'; if (symlink[0] == '/') { resolved[1] = 0; resolved_len = 1; - } else if (resolved_len > 1) { + } else { /* Strip the last path component. */ - resolved[resolved_len - 1] = '\0'; q = strrchr(resolved, '/') + 1; *q = '\0'; resolved_len = q - resolved; @@ -209,7 +217,7 @@ realpath(const char * __restrict path, c } left_len = strlcat(symlink, left, sizeof(symlink)); - if (left_len >= sizeof(left)) { + if (left_len >= sizeof(symlink)) { if (m) free(resolved); errno = ENAMETOOLONG; From owner-svn-src-all@freebsd.org Mon May 29 12:59:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3968CCFE7AE; Mon, 29 May 2017 12:59:26 +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 1587E789DA; Mon, 29 May 2017 12:59:26 +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 v4TCxPkf093722; Mon, 29 May 2017 12:59:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TCxPcX093721; Mon, 29 May 2017 12:59:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291259.v4TCxPcX093721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 12:59:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319130 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 12:59:26 -0000 Author: kib Date: Mon May 29 12:59:24 2017 New Revision: 319130 URL: https://svnweb.freebsd.org/changeset/base/319130 Log: MFC r318299: Simplify cleanup on failure in realpath(3). Modified: stable/10/lib/libc/stdlib/realpath.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/realpath.c ============================================================================== --- stable/10/lib/libc/stdlib/realpath.c Mon May 29 12:58:30 2017 (r319129) +++ stable/10/lib/libc/stdlib/realpath.c Mon May 29 12:59:24 2017 (r319130) @@ -47,32 +47,16 @@ __FBSDID("$FreeBSD$"); * components. Returns (resolved) on success, or (NULL) on failure, * in which case the path which caused trouble is left in (resolved). */ -char * -realpath(const char * __restrict path, char * __restrict resolved) +static char * +realpath1(const char *path, char *resolved) { struct stat sb; char *p, *q; size_t left_len, resolved_len, next_token_len; unsigned symlinks; - int m; ssize_t slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; - if (path == NULL) { - errno = EINVAL; - return (NULL); - } - if (path[0] == '\0') { - errno = ENOENT; - return (NULL); - } - if (resolved == NULL) { - resolved = malloc(PATH_MAX); - if (resolved == NULL) - return (NULL); - m = 1; - } else - m = 0; symlinks = 0; if (path[0] == '/') { resolved[0] = '/'; @@ -83,20 +67,14 @@ realpath(const char * __restrict path, c left_len = strlcpy(left, path + 1, sizeof(left)); } else { if (getcwd(resolved, PATH_MAX) == NULL) { - if (m) - free(resolved); - else { - resolved[0] = '.'; - resolved[1] = '\0'; - } + resolved[0] = '.'; + resolved[1] = '\0'; return (NULL); } resolved_len = strlen(resolved); left_len = strlcpy(left, path, sizeof(left)); } if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -125,8 +103,6 @@ realpath(const char * __restrict path, c if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -158,27 +134,18 @@ realpath(const char * __restrict path, c */ resolved_len = strlcat(resolved, next_token, PATH_MAX); if (resolved_len >= PATH_MAX) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } - if (lstat(resolved, &sb) != 0) { - if (m) - free(resolved); + if (lstat(resolved, &sb) != 0) return (NULL); - } if (S_ISLNK(sb.st_mode)) { if (symlinks++ > MAXSYMLINKS) { - if (m) - free(resolved); errno = ELOOP; return (NULL); } slen = readlink(resolved, symlink, sizeof(symlink)); if (slen <= 0 || slen >= sizeof(symlink)) { - if (m) - free(resolved); if (slen < 0) { /* keep errno from readlink(2) call */ } else if (slen == 0) { @@ -207,8 +174,6 @@ realpath(const char * __restrict path, c if (p != NULL) { if (symlink[slen - 1] != '/') { if (slen + 1 >= sizeof(symlink)) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -218,16 +183,12 @@ realpath(const char * __restrict path, c left_len = strlcat(symlink, left, sizeof(symlink)); if (left_len >= sizeof(symlink)) { - if (m) - free(resolved); errno = ENAMETOOLONG; return (NULL); } } left_len = strlcpy(left, symlink, sizeof(left)); } else if (!S_ISDIR(sb.st_mode) && p != NULL) { - if (m) - free(resolved); errno = ENOTDIR; return (NULL); } @@ -241,3 +202,29 @@ realpath(const char * __restrict path, c resolved[resolved_len - 1] = '\0'; return (resolved); } + +char * +realpath(const char * __restrict path, char * __restrict resolved) +{ + char *m, *res; + + if (path == NULL) { + errno = EINVAL; + return (NULL); + } + if (path[0] == '\0') { + errno = ENOENT; + return (NULL); + } + if (resolved != NULL) { + m = NULL; + } else { + m = resolved = malloc(PATH_MAX); + if (resolved == NULL) + return (NULL); + } + res = realpath1(path, resolved); + if (res == NULL) + free(m); + return (res); +} From owner-svn-src-all@freebsd.org Mon May 29 13:00:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B268DCFE878; Mon, 29 May 2017 13:00:40 +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 81B5A78B88; Mon, 29 May 2017 13:00:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TD0d4O093858; Mon, 29 May 2017 13:00:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TD0drD093857; Mon, 29 May 2017 13:00:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291300.v4TD0drD093857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 13:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319131 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:00:40 -0000 Author: kib Date: Mon May 29 13:00:39 2017 New Revision: 319131 URL: https://svnweb.freebsd.org/changeset/base/319131 Log: MFC r318303: Style. Modified: stable/10/lib/libc/stdlib/realpath.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/realpath.c ============================================================================== --- stable/10/lib/libc/stdlib/realpath.c Mon May 29 12:59:24 2017 (r319130) +++ stable/10/lib/libc/stdlib/realpath.c Mon May 29 13:00:39 2017 (r319131) @@ -89,7 +89,7 @@ realpath1(const char *path, char *resolv */ p = strchr(left, '/'); - next_token_len = p ? p - left : left_len; + next_token_len = p != NULL ? p - left : left_len; memcpy(next_token, left, next_token_len); next_token[next_token_len] = '\0'; @@ -112,10 +112,9 @@ realpath1(const char *path, char *resolv if (next_token[0] == '\0') { /* Handle consequential slashes. */ continue; - } - else if (strcmp(next_token, ".") == 0) + } else if (strcmp(next_token, ".") == 0) { continue; - else if (strcmp(next_token, "..") == 0) { + } else if (strcmp(next_token, "..") == 0) { /* * Strip the last path component except when we have * single "/" @@ -146,13 +145,12 @@ realpath1(const char *path, char *resolv } slen = readlink(resolved, symlink, sizeof(symlink)); if (slen <= 0 || slen >= sizeof(symlink)) { - if (slen < 0) { - /* keep errno from readlink(2) call */ - } else if (slen == 0) { + if (slen < 0) + ; /* keep errno from readlink(2) call */ + else if (slen == 0) errno = ENOENT; - } else { + else errno = ENAMETOOLONG; - } return (NULL); } symlink[slen] = '\0'; From owner-svn-src-all@freebsd.org Mon May 29 13:10:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADCD7CFEC4A; Mon, 29 May 2017 13:10:02 +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 7DC03791B0; Mon, 29 May 2017 13:10:02 +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 v4TDA1AE097921; Mon, 29 May 2017 13:10:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TDA1cu097919; Mon, 29 May 2017 13:10:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705291310.v4TDA1cu097919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 29 May 2017 13:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319132 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:10:02 -0000 Author: emaste Date: Mon May 29 13:10:01 2017 New Revision: 319132 URL: https://svnweb.freebsd.org/changeset/base/319132 Log: bsdgrep: bump version number and add Kyle Evans copyright The following changes have been made over the last couple of months: Features: - With bsdgrep -r, the working directory is implied if no directory is specified - bsdgrep will now behave as bsdgrep -r does when it's named rgrep - bsdgrep now understands -z/--null-data to use \0 as EOL - GNU regex compatibility is now indicated with a "GNU compatible" in the version string Fixes: - --mmap no longer hangs when coming across an EOF without an accompanying EOL - -o/--color matching generally improved, now produces earliest / longest matches - Context output now more closely aligns with GNU grep - Zero-length matches no longer exhibit broken behavior - Every output line now honors -b/-H/-n flags Tests have been added for previous regressions as well as other previously untested behaviors. Various other fixes have been commited, and refactoring for further / later improvements has taken place. (The original submission changed the version string to 2.5.2, but I decided to use 2.6.0 to reflect the addition of new features.) Submitted by: Kyle Evans Differential Revision: https://reviews.freebsd.org/D10982 Modified: head/usr.bin/grep/grep.h head/usr.bin/grep/util.c Modified: head/usr.bin/grep/grep.h ============================================================================== --- head/usr.bin/grep/grep.h Mon May 29 13:00:39 2017 (r319131) +++ head/usr.bin/grep/grep.h Mon May 29 13:10:01 2017 (r319132) @@ -51,7 +51,7 @@ extern nl_catd catalog; extern const char *errstr[]; -#define VERSION "2.5.1-FreeBSD" +#define VERSION "2.6.0-FreeBSD" #define GREP_FIXED 0 #define GREP_BASIC 1 Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Mon May 29 13:00:39 2017 (r319131) +++ head/usr.bin/grep/util.c Mon May 29 13:10:01 2017 (r319132) @@ -5,6 +5,7 @@ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * Copyright (C) 2008-2010 Gabor Kovesdan + * Copyright (C) 2017 Kyle Evans * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-all@freebsd.org Mon May 29 13:17:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DB70CFF0BA; Mon, 29 May 2017 13:17:02 +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 18A26797B6; Mon, 29 May 2017 13:17:02 +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 v4TDH1VA001833; Mon, 29 May 2017 13:17:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TDH0XX001830; Mon, 29 May 2017 13:17:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291317.v4TDH0XX001830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 13:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319133 - in stable/11/sys: amd64/acpica amd64/amd64 x86/acpica X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:17:02 -0000 Author: kib Date: Mon May 29 13:17:00 2017 New Revision: 319133 URL: https://svnweb.freebsd.org/changeset/base/319133 Log: MFC r318318: Ensure that resume path on amd64 only accesses page tables for normal operation after processor is configured to allow all required features. Modified: stable/11/sys/amd64/acpica/acpi_wakecode.S stable/11/sys/amd64/amd64/cpu_switch.S stable/11/sys/x86/acpica/acpi_wakeup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/11/sys/amd64/acpica/acpi_wakecode.S Mon May 29 13:10:01 2017 (r319132) +++ stable/11/sys/amd64/acpica/acpi_wakecode.S Mon May 29 13:17:00 2017 (r319133) @@ -156,11 +156,12 @@ wakeup_32: /* * Enable EFER.LME so that we get long mode when all the prereqs are * in place. In this case, it turns on when CR0_PG is finally enabled. - * Pick up a few other EFER bits that we'll use need we're here. + * Also it picks up a few other EFER bits that we'll use need we're + * here, like SYSCALL and NX enable. */ movl $MSR_EFER, %ecx - rdmsr - orl $EFER_LME | EFER_SCE, %eax + movl wakeup_efer - wakeup_start(%ebx), %eax + movl wakeup_efer + 4 - wakeup_start(%ebx), %edx wrmsr /* @@ -276,6 +277,8 @@ wakeup_pcb: .quad 0 wakeup_ret: .quad 0 +wakeup_efer: + .quad 0 wakeup_gdt: .word 0 .quad 0 Modified: stable/11/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/11/sys/amd64/amd64/cpu_switch.S Mon May 29 13:10:01 2017 (r319132) +++ stable/11/sys/amd64/amd64/cpu_switch.S Mon May 29 13:17:00 2017 (r319133) @@ -396,7 +396,7 @@ ENTRY(resumectx) movl 4 + PCB_KGSBASE(%rdi),%edx wrmsr - /* Restore EFER. */ + /* Restore EFER one more time. */ movl $MSR_EFER,%ecx movl PCB_EFER(%rdi),%eax wrmsr Modified: stable/11/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/11/sys/x86/acpica/acpi_wakeup.c Mon May 29 13:10:01 2017 (r319132) +++ stable/11/sys/x86/acpica/acpi_wakeup.c Mon May 29 13:17:00 2017 (r319133) @@ -223,7 +223,9 @@ acpi_sleep_machdep(struct acpi_softc *sc WAKECODE_FIXUP(resume_beep, uint8_t, (acpi_resume_beep != 0)); WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); -#ifndef __amd64__ +#ifdef __amd64__ + WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER)); +#else WAKECODE_FIXUP(wakeup_cr4, register_t, pcb->pcb_cr4); #endif WAKECODE_FIXUP(wakeup_pcb, struct pcb *, pcb); From owner-svn-src-all@freebsd.org Mon May 29 13:18:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EEE8CFF283; Mon, 29 May 2017 13:18:21 +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 2E82D7999C; Mon, 29 May 2017 13:18:21 +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 v4TDIKa3001935; Mon, 29 May 2017 13:18:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TDIK1h001934; Mon, 29 May 2017 13:18:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291318.v4TDIK1h001934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 13:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319134 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:18:21 -0000 Author: kib Date: Mon May 29 13:18:20 2017 New Revision: 319134 URL: https://svnweb.freebsd.org/changeset/base/319134 Log: MFC r318312: Fix the AT_EXECFD functionality. Modified: stable/11/libexec/rtld-elf/map_object.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/map_object.c ============================================================================== --- stable/11/libexec/rtld-elf/map_object.c Mon May 29 13:17:00 2017 (r319133) +++ stable/11/libexec/rtld-elf/map_object.c Mon May 29 13:18:20 2017 (r319134) @@ -193,6 +193,8 @@ map_object(int fd, const char *path, con base_flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE; if (npagesizes > 1 && round_page(segs[0]->p_filesz) >= pagesizes[1]) base_flags |= MAP_ALIGNED_SUPER; + if (base_vaddr != 0) + base_flags |= MAP_FIXED | MAP_EXCL; mapbase = mmap(base_addr, mapsize, PROT_NONE, base_flags, -1, 0); if (mapbase == (caddr_t) -1) { From owner-svn-src-all@freebsd.org Mon May 29 13:24:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1360FCFF441; Mon, 29 May 2017 13:24:29 +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 E34F779D51; Mon, 29 May 2017 13:24:28 +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 v4TDORZS006117; Mon, 29 May 2017 13:24:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TDORwd006116; Mon, 29 May 2017 13:24:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291324.v4TDORwd006116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 13:24:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319135 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:24:29 -0000 Author: kib Date: Mon May 29 13:24:27 2017 New Revision: 319135 URL: https://svnweb.freebsd.org/changeset/base/319135 Log: MFC direct execution mode for rtld. MFC r318313: Make ld-elf.so.1 directly executable. MFC r318352 (by jonathan): Rename rtld's parse_libdir to parse_integer. MFC r318380: Pretend that there is some security when executing in direct mode. MFC r318431 (by jonathan): Allow rtld direct-exec to take a file descriptor. MFC r318445: Fix style, add static keyword before static function definition. MFC r318739: For ld.so direct execution mode, implement -p option. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Mon May 29 13:18:20 2017 (r319134) +++ stable/11/libexec/rtld-elf/rtld.c Mon May 29 13:24:27 2017 (r319135) @@ -115,8 +115,11 @@ static void objlist_push_head(Objlist *, static void objlist_push_tail(Objlist *, Obj_Entry *); static void objlist_put_after(Objlist *, Obj_Entry *, Obj_Entry *); static void objlist_remove(Objlist *, Obj_Entry *); -static int parse_libdir(const char *); +static int open_binary_fd(const char *argv0, bool search_in_path); +static int parse_args(char* argv[], int argc, bool *use_pathp, int *fdp); +static int parse_integer(const char *); static void *path_enumerate(const char *, path_enum_proc, void *); +static void print_usage(const char *argv0); static void release_object(Obj_Entry *); static int relocate_object_dag(Obj_Entry *root, bool bind_now, Obj_Entry *rtldobj, int flags, RtldLockState *lockstate); @@ -339,17 +342,20 @@ _LD(const char *var) func_ptr_type _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) { - Elf_Auxinfo *aux, *auxp, *aux_info[AT_COUNT]; + Elf_Auxinfo *aux, *auxp, *auxpf, *aux_info[AT_COUNT]; Objlist_Entry *entry; Obj_Entry *last_interposer, *obj, *preload_tail; const Elf_Phdr *phdr; Objlist initlist; RtldLockState lockstate; - char **argv, *argv0, **env, *kexecpath, *library_path_rpath; + struct stat st; + Elf_Addr *argcp; + char **argv, *argv0, **env, **envp, *kexecpath, *library_path_rpath; caddr_t imgentry; char buf[MAXPATHLEN]; - int argc, fd, i, mib[2], phnum; + int argc, fd, i, mib[2], phnum, rtld_argc; size_t len; + bool dir_enable, explicit_fd, search_in_path; /* * On entry, the dynamic linker itself has not been relocated yet. @@ -359,6 +365,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ */ /* Find the auxiliary vector on the stack. */ + argcp = sp; argc = *sp++; argv = (char **) sp; sp += argc + 1; /* Skip over arguments and NULL terminator */ @@ -410,6 +417,89 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ md_abi_variant_hook(aux_info); + fd = -1; + if (aux_info[AT_EXECFD] != NULL) { + fd = aux_info[AT_EXECFD]->a_un.a_val; + } else { + assert(aux_info[AT_PHDR] != NULL); + phdr = (const Elf_Phdr *)aux_info[AT_PHDR]->a_un.a_ptr; + if (phdr == obj_rtld.phdr) { + if (!trust) { + rtld_printf("Tainted process refusing to run binary %s\n", + argv0); + rtld_die(); + } + dbg("opening main program in direct exec mode"); + if (argc >= 2) { + rtld_argc = parse_args(argv, argc, &search_in_path, &fd); + argv0 = argv[rtld_argc]; + explicit_fd = (fd != -1); + if (!explicit_fd) + fd = open_binary_fd(argv0, search_in_path); + if (fstat(fd, &st) == -1) { + _rtld_error("failed to fstat FD %d (%s): %s", fd, + explicit_fd ? "user-provided descriptor" : argv0, + rtld_strerror(errno)); + rtld_die(); + } + + /* + * Rough emulation of the permission checks done by + * execve(2), only Unix DACs are checked, ACLs are + * ignored. Preserve the semantic of disabling owner + * to execute if owner x bit is cleared, even if + * others x bit is enabled. + * mmap(2) does not allow to mmap with PROT_EXEC if + * binary' file comes from noexec mount. We cannot + * set VV_TEXT on the binary. + */ + dir_enable = false; + if (st.st_uid == geteuid()) { + if ((st.st_mode & S_IXUSR) != 0) + dir_enable = true; + } else if (st.st_gid == getegid()) { + if ((st.st_mode & S_IXGRP) != 0) + dir_enable = true; + } else if ((st.st_mode & S_IXOTH) != 0) { + dir_enable = true; + } + if (!dir_enable) { + rtld_printf("No execute permission for binary %s\n", + argv0); + rtld_die(); + } + + /* + * For direct exec mode, argv[0] is the interpreter + * name, we must remove it and shift arguments left + * before invoking binary main. Since stack layout + * places environment pointers and aux vectors right + * after the terminating NULL, we must shift + * environment and aux as well. + */ + main_argc = argc - rtld_argc; + for (i = 0; i <= main_argc; i++) + argv[i] = argv[i + rtld_argc]; + *argcp -= rtld_argc; + environ = env = envp = argv + main_argc + 1; + do { + *envp = *(envp + rtld_argc); + envp++; + } while (*envp != NULL); + aux = auxp = (Elf_Auxinfo *)envp; + auxpf = (Elf_Auxinfo *)(envp + rtld_argc); + for (;; auxp++, auxpf++) { + *auxp = *auxpf; + if (auxp->a_type == AT_NULL) + break; + } + } else { + rtld_printf("no binary\n"); + rtld_die(); + } + } + } + ld_bind_now = getenv(_LD("BIND_NOW")); /* @@ -470,8 +560,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ * Load the main program, or process its program header if it is * already loaded. */ - if (aux_info[AT_EXECFD] != NULL) { /* Load the main program. */ - fd = aux_info[AT_EXECFD]->a_un.a_val; + if (fd != -1) { /* Load the main program. */ dbg("loading main program"); obj_main = map_object(fd, argv0, NULL); close(fd); @@ -492,7 +581,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ rtld_die(); } - if (aux_info[AT_EXECPATH] != NULL) { + if (aux_info[AT_EXECPATH] != NULL && fd == -1) { kexecpath = aux_info[AT_EXECPATH]->a_un.a_ptr; dbg("AT_EXECPATH %p %s", kexecpath, kexecpath); if (kexecpath[0] == '/') @@ -504,7 +593,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ else obj_main->path = xstrdup(buf); } else { - dbg("No AT_EXECPATH"); + dbg("No AT_EXECPATH or direct exec"); obj_main->path = xstrdup(argv0); } dbg("obj_main path %s", obj_main->path); @@ -2980,9 +3069,12 @@ search_library_pathfds(const char *name, envcopy = xstrdup(path); for (fdstr = strtok_r(envcopy, ":", &last_token); fdstr != NULL; fdstr = strtok_r(NULL, ":", &last_token)) { - dirfd = parse_libdir(fdstr); - if (dirfd < 0) + dirfd = parse_integer(fdstr); + if (dirfd < 0) { + _rtld_error("failed to parse directory FD: '%s'", + fdstr); break; + } fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC | O_VERIFY); if (fd >= 0) { *fdp = fd; @@ -5178,34 +5270,166 @@ symlook_init_from_req(SymLook *dst, cons dst->lockstate = src->lockstate; } +static int +open_binary_fd(const char *argv0, bool search_in_path) +{ + char *pathenv, *pe, binpath[PATH_MAX]; + int fd; + + if (search_in_path && strchr(argv0, '/') == NULL) { + pathenv = getenv("PATH"); + if (pathenv == NULL) { + rtld_printf("-p and no PATH environment variable\n"); + rtld_die(); + } + pathenv = strdup(pathenv); + if (pathenv == NULL) { + rtld_printf("Cannot allocate memory\n"); + rtld_die(); + } + fd = -1; + errno = ENOENT; + while ((pe = strsep(&pathenv, ":")) != NULL) { + if (strlcpy(binpath, pe, sizeof(binpath)) > + sizeof(binpath)) + continue; + if (binpath[0] != '\0' && + strlcat(binpath, "/", sizeof(binpath)) > + sizeof(binpath)) + continue; + if (strlcat(binpath, argv0, sizeof(binpath)) > + sizeof(binpath)) + continue; + fd = open(binpath, O_RDONLY | O_CLOEXEC | O_VERIFY); + if (fd != -1 || errno != ENOENT) + break; + } + free(pathenv); + } else { + fd = open(argv0, O_RDONLY | O_CLOEXEC | O_VERIFY); + } + + if (fd == -1) { + rtld_printf("Opening %s: %s\n", argv0, + rtld_strerror(errno)); + rtld_die(); + } + return (fd); +} + +/* + * Parse a set of command-line arguments. + */ +static int +parse_args(char* argv[], int argc, bool *use_pathp, int *fdp) +{ + const char *arg; + int fd, i, j, arglen; + char opt; + + dbg("Parsing command-line arguments"); + *use_pathp = false; + *fdp = -1; + + for (i = 1; i < argc; i++ ) { + arg = argv[i]; + dbg("argv[%d]: '%s'", i, arg); + + /* + * rtld arguments end with an explicit "--" or with the first + * non-prefixed argument. + */ + if (strcmp(arg, "--") == 0) { + i++; + break; + } + if (arg[0] != '-') + break; + + /* + * All other arguments are single-character options that can + * be combined, so we need to search through `arg` for them. + */ + arglen = strlen(arg); + for (j = 1; j < arglen; j++) { + opt = arg[j]; + if (opt == 'h') { + print_usage(argv[0]); + rtld_die(); + } else if (opt == 'f') { + /* + * -f XX can be used to specify a descriptor for the + * binary named at the command line (i.e., the later + * argument will specify the process name but the + * descriptor is what will actually be executed) + */ + if (j != arglen - 1) { + /* -f must be the last option in, e.g., -abcf */ + _rtld_error("invalid options: %s", arg); + rtld_die(); + } + i++; + fd = parse_integer(argv[i]); + if (fd == -1) { + _rtld_error("invalid file descriptor: '%s'", + argv[i]); + rtld_die(); + } + *fdp = fd; + break; + } else if (opt == 'p') { + *use_pathp = true; + } else { + rtld_printf("invalid argument: '%s'\n", arg); + print_usage(argv[0]); + rtld_die(); + } + } + } + + return (i); +} /* * Parse a file descriptor number without pulling in more of libc (e.g. atoi). */ static int -parse_libdir(const char *str) +parse_integer(const char *str) { static const int RADIX = 10; /* XXXJA: possibly support hex? */ const char *orig; - int fd; + int n; char c; orig = str; - fd = 0; + n = 0; for (c = *str; c != '\0'; c = *++str) { if (c < '0' || c > '9') return (-1); - fd *= RADIX; - fd += c - '0'; + n *= RADIX; + n += c - '0'; } /* Make sure we actually parsed something. */ - if (str == orig) { - _rtld_error("failed to parse directory FD from '%s'", str); + if (str == orig) return (-1); - } - return (fd); + return (n); +} + +static void +print_usage(const char *argv0) +{ + + rtld_printf("Usage: %s [-h] [-f ] [--] []\n" + "\n" + "Options:\n" + " -h Display this help message\n" + " -p Search in PATH for named binary\n" + " -f Execute instead of searching for \n" + " -- End of RTLD options\n" + " Name of process to execute\n" + " Arguments to the executed process\n", argv0); } /* From owner-svn-src-all@freebsd.org Mon May 29 13:25:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EC89CFF4AB; Mon, 29 May 2017 13:25:56 +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 3CB7279E80; Mon, 29 May 2017 13:25:56 +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 v4TDPtKI006221; Mon, 29 May 2017 13:25:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TDPtqZ006220; Mon, 29 May 2017 13:25:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291325.v4TDPtqZ006220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 13:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319136 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:25:56 -0000 Author: kib Date: Mon May 29 13:25:55 2017 New Revision: 319136 URL: https://svnweb.freebsd.org/changeset/base/319136 Log: MFC r318446: Update my copyright, note The FreeBSD Foundation involvement. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Mon May 29 13:24:27 2017 (r319135) +++ stable/11/libexec/rtld-elf/rtld.c Mon May 29 13:25:55 2017 (r319136) @@ -1,10 +1,14 @@ /*- * Copyright 1996, 1997, 1998, 1999, 2000 John D. Polstra. * Copyright 2003 Alexander Kabaev . - * Copyright 2009-2012 Konstantin Belousov . + * Copyright 2009-2013 Konstantin Belousov . * Copyright 2012 John Marino . + * Copyright 2014-2017 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,8 +28,6 @@ * 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$ */ /* @@ -34,6 +36,9 @@ * John Polstra . */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include From owner-svn-src-all@freebsd.org Mon May 29 13:36:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB30ACFF970; Mon, 29 May 2017 13:36:33 +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 7795B7A3D5; Mon, 29 May 2017 13:36:33 +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 v4TDaW78010135; Mon, 29 May 2017 13:36:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TDaWTA010134; Mon, 29 May 2017 13:36:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291336.v4TDaWTA010134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 13:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319137 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:36:33 -0000 Author: kib Date: Mon May 29 13:36:32 2017 New Revision: 319137 URL: https://svnweb.freebsd.org/changeset/base/319137 Log: Correct explanation of the dynamic tokens handling. Reviewed by: emaste, jonathan Sponsored by: The FreeBSD Foundation X-Differential Revision: https://reviews.freebsd.org/D10826 Modified: head/libexec/rtld-elf/rtld.1 Modified: head/libexec/rtld-elf/rtld.1 ============================================================================== --- head/libexec/rtld-elf/rtld.1 Mon May 29 13:25:55 2017 (r319136) +++ head/libexec/rtld-elf/rtld.1 Mon May 29 13:36:32 2017 (r319137) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2017 +.Dd May 20, 2017 .Dt RTLD 1 .Os .Sh NAME @@ -60,10 +60,11 @@ This is useful for C++ libraries that co .Pp When resolving dependencies for the loaded objects, .Nm -may be allowed to translate dynamic token strings in rpath and soname -by setting +translates dynamic token strings in rpath and soname. +If the .Fl "z origin" -option of the static linker +option of the static linker was set when linking the binary, +the token expansion is performed at the object load time, see .Xr ld 1 . The following strings are recognized now: .Bl -tag -width ".Pa $PLATFORM" From owner-svn-src-all@freebsd.org Mon May 29 13:38:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E525CFFA47; Mon, 29 May 2017 13:38:27 +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 3CD707A544; Mon, 29 May 2017 13:38:27 +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 v4TDcQ0I010247; Mon, 29 May 2017 13:38:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TDcQIT010246; Mon, 29 May 2017 13:38:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291338.v4TDcQIT010246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 13:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319138 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:38:27 -0000 Author: kib Date: Mon May 29 13:38:26 2017 New Revision: 319138 URL: https://svnweb.freebsd.org/changeset/base/319138 Log: Document direct execution mode for rtld. Reviewed by: emaste, jonathan (previous version) Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D10826 Modified: head/libexec/rtld-elf/rtld.1 Modified: head/libexec/rtld-elf/rtld.1 ============================================================================== --- head/libexec/rtld-elf/rtld.1 Mon May 29 13:36:32 2017 (r319137) +++ head/libexec/rtld-elf/rtld.1 Mon May 29 13:38:26 2017 (r319138) @@ -283,6 +283,77 @@ instead of postponing it until required. Normally, the filtees are opened at the time of the first symbol resolution from the filter object. .El +.Sh DIRECT EXECUTION MODE +.Nm +is typically used implicitly, loaded by the kernel as requested by the +.Dv PT_INTERP +program header of the executed binary. +.Fx +also supports a direct execution mode for the dynamic linker. +In this mode, the user explicitly executes +.Nm +and provides the path of the program to be linked and executed as +an argument. +This mode allows use of a non-standard dynamic linker for a program +activation without changing the binary or without changing +the installed dynamic linker. +Execution options may be specified. +.Pp +The syntax of the direct invocation is +.Bd -ragged -offset indent +.Pa /libexec/ld-elf.so.1 +.Op Fl f Ar fd +.Op Fl p +.Op Fl - +.Pa image_path +.Op Ar image arguments +.Ed +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl f Ar fd +File descriptor +.Ar fd +references the binary to be activated by +.Nm . +It must already be opened in the process when executing +.Nm . +If this option is specified, +.Ar image_path +is only used to provide the +.Va argv[0] +value to the program. +.It Fl p +If the +.Pa image_path +argument specifies a name which does not contain a slash +.Dq Li / +character, +.Nm +uses the search path provided by the environment variable +.Dv PATH +to find the binary to execute. +.It Fl - +Ends the +.Nm +options. +The argument following +.Fl - +is interpreted as the path of binary to execute. +.El +.Pp +To conform to user expectation to not break some naively restricted +execution environments, in the direct execution mode +.Nm +emulates verification of the binary execute permission +for current user. +The verification only uses Unix +.Dv DACs , +ignores +.Dv ACLs +and is racy by its nature. +The environments which rely on such restrictions are weak +and breakable on its own. .Sh FILES .Bl -tag -width ".Pa /var/run/ld-elf32.so.hints" -compact .It Pa /var/run/ld-elf.so.hints From owner-svn-src-all@freebsd.org Mon May 29 15:24:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F41B8D4EC76; Mon, 29 May 2017 15:24:46 +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 C3A127D797; Mon, 29 May 2017 15:24:46 +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 v4TFOjT2055282; Mon, 29 May 2017 15:24:45 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TFOjWc055281; Mon, 29 May 2017 15:24:45 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705291524.v4TFOjWc055281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 29 May 2017 15:24:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319139 - stable/11/usr.sbin/bhyve X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 15:24:47 -0000 Author: pfg Date: Mon May 29 15:24:45 2017 New Revision: 319139 URL: https://svnweb.freebsd.org/changeset/base/319139 Log: MFC r318788: bhyvegc_resize: make use of reallocarray(3) for bounds-checking. Also add __FBSDID. Reviewed by: grehan Modified: stable/11/usr.sbin/bhyve/bhyvegc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/bhyvegc.c ============================================================================== --- stable/11/usr.sbin/bhyve/bhyvegc.c Mon May 29 13:38:26 2017 (r319138) +++ stable/11/usr.sbin/bhyve/bhyvegc.c Mon May 29 15:24:45 2017 (r319139) @@ -1,4 +1,5 @@ #include +__FBSDID("$FreeBSD$"); #include @@ -56,9 +57,11 @@ bhyvegc_resize(struct bhyvegc *gc, int w gc_image->width = width; gc_image->height = height; if (!gc->raw) { - gc_image->data = realloc(gc_image->data, - sizeof (uint32_t) * width * height); - memset(gc_image->data, 0, width * height * sizeof (uint32_t)); + gc_image->data = reallocarray(gc_image->data, width * height, + sizeof (uint32_t)); + if (gc_image->data != NULL) + memset(gc_image->data, 0, width * height * + sizeof (uint32_t)); } } From owner-svn-src-all@freebsd.org Mon May 29 16:25:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC40CD77743; Mon, 29 May 2017 16:25:33 +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 5F76E809D6; Mon, 29 May 2017 16:25:33 +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 v4TGPWpj082972; Mon, 29 May 2017 16:25:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGPWM7082971; Mon, 29 May 2017 16:25:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291625.v4TGPWM7082971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319141 - vendor/llvm/llvm-trunk-r304149 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:25:33 -0000 Author: dim Date: Mon May 29 16:25:32 2017 New Revision: 319141 URL: https://svnweb.freebsd.org/changeset/base/319141 Log: Tag llvm trunk r304149. Added: vendor/llvm/llvm-trunk-r304149/ - copied from r319140, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Mon May 29 16:25:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55F86D7773B; Mon, 29 May 2017 16:25:29 +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 D7C2F809CC; Mon, 29 May 2017 16:25:28 +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 v4TGPS2j082925; Mon, 29 May 2017 16:25:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGPQcb082909; Mon, 29 May 2017 16:25:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291625.v4TGPQcb082909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319140 - in vendor/llvm/dist: . docs examples/Kaleidoscope/BuildingAJIT/Chapter1 examples/Kaleidoscope/BuildingAJIT/Chapter2 examples/Kaleidoscope/BuildingAJIT/Chapter3 examples/Kaleid... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:25:29 -0000 Author: dim Date: Mon May 29 16:25:25 2017 New Revision: 319140 URL: https://svnweb.freebsd.org/changeset/base/319140 Log: Vendor import of llvm trunk r304149: https://llvm.org/svn/llvm-project/llvm/trunk@304149 Added: vendor/llvm/dist/docs/Benchmarking.rst vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/Localizer.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeIndexDiscovery.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIEHashAttributes.def vendor/llvm/dist/lib/CodeGen/GlobalISel/Localizer.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/ vendor/llvm/dist/lib/Target/Nios2/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/MCTargetDesc/ vendor/llvm/dist/lib/Target/Nios2/MCTargetDesc/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/MCTargetDesc/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/MCTargetDesc/Nios2MCTargetDesc.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/MCTargetDesc/Nios2MCTargetDesc.h (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/Nios2.h (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/Nios2.td vendor/llvm/dist/lib/Target/Nios2/Nios2InstrFormats.td vendor/llvm/dist/lib/Target/Nios2/Nios2InstrInfo.td vendor/llvm/dist/lib/Target/Nios2/Nios2RegisterInfo.td vendor/llvm/dist/lib/Target/Nios2/Nios2TargetMachine.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/Nios2TargetMachine.h (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/TargetInfo/ vendor/llvm/dist/lib/Target/Nios2/TargetInfo/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/TargetInfo/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/Nios2/TargetInfo/Nios2TargetInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Transforms/Scalar/GVNSink.cpp (contents, props changed) vendor/llvm/dist/test/Analysis/Delinearization/constant_functions_multi_dim.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/localizer-in-O0-pipeline.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/localizer.mir vendor/llvm/dist/test/CodeGen/AArch64/asm-print-comments.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bfe-combine.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.getpc.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shl-add-to-add-shl.ll vendor/llvm/dist/test/CodeGen/Nios2/ vendor/llvm/dist/test/CodeGen/Nios2/lit.local.cfg vendor/llvm/dist/test/CodeGen/Nios2/target_support.ll vendor/llvm/dist/test/CodeGen/PowerPC/atomics-constant.ll vendor/llvm/dist/test/CodeGen/PowerPC/livephysregs.mir vendor/llvm/dist/test/CodeGen/PowerPC/vec_sldwi.ll vendor/llvm/dist/test/CodeGen/Thumb/machine-cse-physreg.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-leaf-constant.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-memop-v512.mir vendor/llvm/dist/test/CodeGen/X86/avx512vpopcntdq-intrinsics.ll vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-dwp.cpp (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-dwp.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-dwp.o.dwp (contents, props changed) vendor/llvm/dist/test/DebugInfo/MIR/X86/empty-inline.mir vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge-ids-1.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge-ids-2.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge-ids-and-types-1.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge-ids-and-types-2.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge-types-1.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge-types-2.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/source-names-1.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/source-names-2.yaml vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergeids.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-objfilename.yaml vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-source-names.test vendor/llvm/dist/test/DebugInfo/X86/gnu-public-names-gmlt.ll vendor/llvm/dist/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll vendor/llvm/dist/test/DebugInfo/X86/split-dwarf-omit-empty.ll vendor/llvm/dist/test/DebugInfo/omit-empty.ll vendor/llvm/dist/test/ExecutionEngine/OrcMCJIT/pr32650.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/chains.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/postdominator_check.ll vendor/llvm/dist/test/LTO/Resolution/X86/linkonce.ll vendor/llvm/dist/test/LTO/Resolution/X86/type-checked-load.ll vendor/llvm/dist/test/MC/Disassembler/AMDGPU/sdwa_gfx9.txt (contents, props changed) vendor/llvm/dist/test/MC/WebAssembly/unnamed-data.ll vendor/llvm/dist/test/MC/X86/pr22004.s (contents, props changed) vendor/llvm/dist/test/MC/X86/x86-64-avx512vpopcntdq.s (contents, props changed) vendor/llvm/dist/test/Transforms/Coroutines/coro-debug.ll vendor/llvm/dist/test/Transforms/Coroutines/coro-materialize.ll vendor/llvm/dist/test/Transforms/EarlyCSE/const-speculation.ll vendor/llvm/dist/test/Transforms/GVN/PRE/phi-translate-2.ll vendor/llvm/dist/test/Transforms/GVNSink/ vendor/llvm/dist/test/Transforms/GVNSink/dither.ll vendor/llvm/dist/test/Transforms/GVNSink/indirect-call.ll vendor/llvm/dist/test/Transforms/GVNSink/sink-common-code.ll vendor/llvm/dist/test/Transforms/GVNSink/struct.ll vendor/llvm/dist/test/Transforms/Inline/prof-update-instr.ll vendor/llvm/dist/test/Transforms/Inline/prof-update-sample.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp-xor-signbit.ll vendor/llvm/dist/test/Transforms/LoopIdiom/pr33114.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/lsr-expand-quadratic.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/nonintegral.ll vendor/llvm/dist/test/Transforms/LoopVectorize/AArch64/no_vector_instructions.ll vendor/llvm/dist/test/Transforms/LoopVectorize/SystemZ/addressing.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32836.ll vendor/llvm/dist/test/tools/gold/X86/relocation-model-pic.ll vendor/llvm/dist/test/tools/llvm-nm/X86/Inputs/example.lib (contents, props changed) vendor/llvm/dist/test/tools/llvm-nm/X86/importlibrary.test vendor/llvm/dist/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp (contents, props changed) vendor/llvm/dist/unittests/IR/BasicBlockTest.cpp (contents, props changed) vendor/llvm/dist/utils/TableGen/X86FoldTablesEmitter.cpp (contents, props changed) vendor/llvm/dist/utils/abtest.py (contents, props changed) Deleted: vendor/llvm/dist/lib/Target/AArch64/AArch64SchedFalkorWriteRes.td vendor/llvm/dist/test/Analysis/CostModel/AArch64/falkor.ll vendor/llvm/dist/test/CodeGen/MIR/ARM/PR32721_ifcvt_triangle_unanalyzable.mir vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge1.yaml vendor/llvm/dist/test/DebugInfo/PDB/Inputs/merge2.yaml vendor/llvm/dist/test/Transforms/Inline/prof-update.ll vendor/llvm/dist/test/Transforms/InstCombine/2008-07-10-ICmpBinOp.ll vendor/llvm/dist/test/Transforms/InstCombine/2008-08-17-ICmpXorSignbit.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/lsr-expand-quadratic.ll vendor/llvm/dist/utils/abtest/abtest.py vendor/llvm/dist/utils/abtest/mark_aarch64fns.py vendor/llvm/dist/utils/abtest/mark_armfns.py Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/docs/GettingStartedVS.rst vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/docs/Vectorizers.rst vendor/llvm/dist/docs/index.rst vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/Analysis/InstructionSimplify.h vendor/llvm/dist/include/llvm/Analysis/LoopPass.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/AtomicExpandUtils.h vendor/llvm/dist/include/llvm/CodeGen/DIE.h vendor/llvm/dist/include/llvm/CodeGen/FaultMaps.h vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalUnion.h vendor/llvm/dist/include/llvm/CodeGen/LivePhysRegs.h vendor/llvm/dist/include/llvm/CodeGen/LiveRangeEdit.h vendor/llvm/dist/include/llvm/CodeGen/LiveStackAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineBlockFrequencyInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineDominanceFrontier.h vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineValueType.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAGInstrs.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDeserializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeStreamMerger.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeTableCollection.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDie.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFUnit.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/MappedBlockStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBTypeServerHandler.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiStream.h vendor/llvm/dist/include/llvm/IR/Attributes.h vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/IntrinsicInst.h vendor/llvm/dist/include/llvm/IR/Intrinsics.td vendor/llvm/dist/include/llvm/IR/IntrinsicsAMDGPU.td vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/include/llvm/IR/Module.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/LTO/Config.h vendor/llvm/dist/include/llvm/Object/Binary.h vendor/llvm/dist/include/llvm/Object/COFF.h vendor/llvm/dist/include/llvm/Object/ELFObjectFile.h vendor/llvm/dist/include/llvm/Object/MachO.h vendor/llvm/dist/include/llvm/Object/ObjectFile.h vendor/llvm/dist/include/llvm/Object/RelocVisitor.h vendor/llvm/dist/include/llvm/Object/Wasm.h vendor/llvm/dist/include/llvm/Option/OptTable.h vendor/llvm/dist/include/llvm/ProfileData/InstrProf.h vendor/llvm/dist/include/llvm/TableGen/Record.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Transforms/Scalar.h vendor/llvm/dist/include/llvm/Transforms/Scalar/GVN.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/Lint.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIEHash.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIEHash.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AtomicExpandPass.cpp vendor/llvm/dist/lib/CodeGen/BasicTargetTransformInfo.cpp vendor/llvm/dist/lib/CodeGen/BranchCoalescing.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.h vendor/llvm/dist/lib/CodeGen/BranchRelaxation.cpp vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/DeadMachineInstructionElim.cpp vendor/llvm/dist/lib/CodeGen/DetectDeadLanes.cpp vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/EarlyIfConversion.cpp vendor/llvm/dist/lib/CodeGen/ExpandISelPseudos.cpp vendor/llvm/dist/lib/CodeGen/ExpandPostRAPseudos.cpp vendor/llvm/dist/lib/CodeGen/FuncletLayout.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/GlobalISel/GlobalISel.cpp vendor/llvm/dist/lib/CodeGen/GlobalMerge.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/ImplicitNullChecks.cpp vendor/llvm/dist/lib/CodeGen/InterleavedAccessPass.cpp vendor/llvm/dist/lib/CodeGen/LexicalScopes.cpp vendor/llvm/dist/lib/CodeGen/LiveDebugValues.cpp vendor/llvm/dist/lib/CodeGen/LiveDebugVariables.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LivePhysRegs.cpp vendor/llvm/dist/lib/CodeGen/LiveStackAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LocalStackSlotAllocation.cpp vendor/llvm/dist/lib/CodeGen/LowerEmuTLS.cpp vendor/llvm/dist/lib/CodeGen/MachineBlockFrequencyInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineBlockPlacement.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineCombiner.cpp vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineOutliner.cpp vendor/llvm/dist/lib/CodeGen/MachinePipeliner.cpp vendor/llvm/dist/lib/CodeGen/MachineScheduler.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/MachineTraceMetrics.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/OptimizePHIs.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/RenameIndependentSubregs.cpp vendor/llvm/dist/lib/CodeGen/SafeStack.cpp vendor/llvm/dist/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/ShadowStackGCLowering.cpp vendor/llvm/dist/lib/CodeGen/ShrinkWrap.cpp vendor/llvm/dist/lib/CodeGen/SjLjEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp vendor/llvm/dist/lib/CodeGen/SpillPlacement.cpp vendor/llvm/dist/lib/CodeGen/StackColoring.cpp vendor/llvm/dist/lib/CodeGen/StackProtector.cpp vendor/llvm/dist/lib/CodeGen/StackSlotColoring.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/CodeGen/TailDuplicator.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/WinEHPrepare.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeSerializer.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeStreamMerger.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeTableCollection.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDie.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnit.cpp vendor/llvm/dist/lib/DebugInfo/MSF/MappedBlockStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBTypeServerHandler.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/TpiStream.cpp vendor/llvm/dist/lib/Demangle/ItaniumDemangle.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist/lib/Fuzzer/FuzzerUtilPosix.cpp vendor/llvm/dist/lib/Fuzzer/test/fuzzer-segv.test vendor/llvm/dist/lib/IR/AttributeImpl.h vendor/llvm/dist/lib/IR/Attributes.cpp vendor/llvm/dist/lib/IR/BasicBlock.cpp vendor/llvm/dist/lib/IR/DebugLoc.cpp vendor/llvm/dist/lib/IR/Instructions.cpp vendor/llvm/dist/lib/IR/IntrinsicInst.cpp vendor/llvm/dist/lib/IR/Module.cpp vendor/llvm/dist/lib/IR/Verifier.cpp vendor/llvm/dist/lib/LTO/LTO.cpp vendor/llvm/dist/lib/LTO/LTOBackend.cpp vendor/llvm/dist/lib/Linker/IRMover.cpp vendor/llvm/dist/lib/MC/WasmObjectWriter.cpp vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/MachOObjectFile.cpp vendor/llvm/dist/lib/Object/WasmObjectFile.cpp vendor/llvm/dist/lib/Option/OptTable.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/ProfileData/InstrProf.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/BinaryStreamReader.cpp vendor/llvm/dist/lib/Support/ConvertUTF.cpp vendor/llvm/dist/lib/Support/DebugCounter.cpp vendor/llvm/dist/lib/Support/DynamicLibrary.cpp vendor/llvm/dist/lib/Support/GraphWriter.cpp vendor/llvm/dist/lib/Support/Host.cpp vendor/llvm/dist/lib/Support/Path.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/YAMLParser.cpp vendor/llvm/dist/lib/TableGen/Record.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64AsmPrinter.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FrameLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64MacroFusion.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64SchedFalkor.td vendor/llvm/dist/lib/Target/AArch64/AArch64SchedFalkorDetails.td vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp vendor/llvm/dist/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h vendor/llvm/dist/lib/Target/AMDGPU/GCNIterativeScheduler.cpp vendor/llvm/dist/lib/Target/AMDGPU/GCNMinRegStrategy.cpp vendor/llvm/dist/lib/Target/AMDGPU/GCNRegPressure.cpp vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCCodeEmitter.h vendor/llvm/dist/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/R600RegisterInfo.td vendor/llvm/dist/lib/Target/AMDGPU/SIDefines.h vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/SOPInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h vendor/llvm/dist/lib/Target/AMDGPU/VOP1Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOP2Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOP3Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOPCInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOPInstructions.td vendor/llvm/dist/lib/Target/ARM/ARMCallLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMCallLowering.h vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMSchedule.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleA9.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleR52.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleSwift.td vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1FrameLowering.cpp vendor/llvm/dist/lib/Target/AVR/AVRInstrInfo.td vendor/llvm/dist/lib/Target/BPF/BPFISelLowering.cpp vendor/llvm/dist/lib/Target/BPF/BPFISelLowering.h vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonPseudo.td vendor/llvm/dist/lib/Target/Hexagon/HexagonRegisterInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonRegisterInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp vendor/llvm/dist/lib/Target/LLVMBuild.txt vendor/llvm/dist/lib/Target/MSP430/MSP430.td vendor/llvm/dist/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430Subtarget.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430Subtarget.h vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.cpp vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.h vendor/llvm/dist/lib/Target/PowerPC/PPCExpandISEL.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrVSX.td vendor/llvm/dist/lib/Target/SystemZ/SystemZExpandPseudo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetTransformInfo.h vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstrArithmetic.td vendor/llvm/dist/lib/Target/X86/X86InstrFMA.td vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrMMX.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86InstrXOP.td vendor/llvm/dist/lib/Target/X86/X86InstructionSelector.cpp vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.cpp vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.h vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Transforms/Coroutines/CoroCleanup.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroEarly.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroElide.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroFrame.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroSplit.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/PGOInstrumentation.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/SanitizerCoverage.cpp vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Scalar/ConstantHoisting.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/GuardWidening.cpp vendor/llvm/dist/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIdiomRecognize.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalar.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/FunctionComparator.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/test/Analysis/IVUsers/quadradic-exit-value.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/different-loops-recs.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/gisel-commandline-option.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-stp-cluster.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-csldst-mmo.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-inline-asm.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-ldp-cluster.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-misched-basic-A53.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-misched-basic-A57.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-misched-forwarding-A53.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-misched-memdep-bug.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-misched-multimmo.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-vabs.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-vadd.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-vmul.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-vshift.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-vsub.ll vendor/llvm/dist/test/CodeGen/AArch64/cmpxchg-O0.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-cmpxchg.ll vendor/llvm/dist/test/CodeGen/AArch64/live-interval-analysis.mir vendor/llvm/dist/test/CodeGen/AArch64/misched-fusion-aes.ll vendor/llvm/dist/test/CodeGen/AArch64/optimize-imm.ll vendor/llvm/dist/test/CodeGen/AArch64/scheduledag-constreg.mir vendor/llvm/dist/test/CodeGen/AArch64/tailcall_misched_graph.ll vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir vendor/llvm/dist/test/CodeGen/AMDGPU/extload-align.ll vendor/llvm/dist/test/CodeGen/AMDGPU/kernel-args.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-constant-i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-constant-i8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-i8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-local-i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-local-i8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/min.ll vendor/llvm/dist/test/CodeGen/AMDGPU/parallelandifcollapse.ll vendor/llvm/dist/test/CodeGen/AMDGPU/r600.bitcast.ll vendor/llvm/dist/test/CodeGen/AMDGPU/schedule-regpressure.mir vendor/llvm/dist/test/CodeGen/AMDGPU/setcc.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shl.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sra.ll vendor/llvm/dist/test/CodeGen/AMDGPU/store-global.ll vendor/llvm/dist/test/CodeGen/AMDGPU/store-private.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sub.ll vendor/llvm/dist/test/CodeGen/AMDGPU/unknown-processor.ll vendor/llvm/dist/test/CodeGen/AMDGPU/vector-alloca.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll vendor/llvm/dist/test/CodeGen/ARM/arm-shrink-wrapping.ll vendor/llvm/dist/test/CodeGen/ARM/constantpool-promote-dbg.ll vendor/llvm/dist/test/CodeGen/ARM/constantpool-promote-ldrh.ll vendor/llvm/dist/test/CodeGen/ARM/constantpool-promote.ll vendor/llvm/dist/test/CodeGen/ARM/cortexr52-misched-basic.ll vendor/llvm/dist/test/CodeGen/ARM/fastisel-thumb-litpool.ll vendor/llvm/dist/test/CodeGen/ARM/memcpy-inline.ll vendor/llvm/dist/test/CodeGen/ARM/memset-inline.ll vendor/llvm/dist/test/CodeGen/ARM/misched-copy-arm.ll vendor/llvm/dist/test/CodeGen/ARM/misched-fp-basic.ll vendor/llvm/dist/test/CodeGen/ARM/misched-int-basic-thumb2.mir vendor/llvm/dist/test/CodeGen/ARM/misched-int-basic.mir vendor/llvm/dist/test/CodeGen/ARM/single-issue-r52.mir vendor/llvm/dist/test/CodeGen/ARM/vcombine.ll vendor/llvm/dist/test/CodeGen/ARM/vext.ll vendor/llvm/dist/test/CodeGen/Hexagon/post-ra-kill-update.mir vendor/llvm/dist/test/CodeGen/Lanai/lanai-misched-trivial-disjoint.ll vendor/llvm/dist/test/CodeGen/MSP430/hwmult16.ll vendor/llvm/dist/test/CodeGen/MSP430/hwmult32.ll vendor/llvm/dist/test/CodeGen/MSP430/hwmultf5.ll vendor/llvm/dist/test/CodeGen/MSP430/vararg.ll vendor/llvm/dist/test/CodeGen/PowerPC/build-vector-tests.ll vendor/llvm/dist/test/CodeGen/PowerPC/p8altivec-shuffles-pred.ll vendor/llvm/dist/test/CodeGen/PowerPC/p9-xxinsertw-xxextractuw.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-i128-abi.ll vendor/llvm/dist/test/CodeGen/PowerPC/pr25157-peephole.ll vendor/llvm/dist/test/CodeGen/PowerPC/pr27078.ll vendor/llvm/dist/test/CodeGen/PowerPC/swaps-le-6.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-ldst-builtin-le.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-ldst.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-p9.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx_insert_extract_le.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx_shuffle_le.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-26-MachineLICMBug.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/memop-vec.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX2.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX512.mir vendor/llvm/dist/test/CodeGen/X86/avx-vzeroupper.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-select-cmp.ll vendor/llvm/dist/test/CodeGen/X86/fp-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/hoist-invariant-load.ll vendor/llvm/dist/test/CodeGen/X86/misched-copy.ll vendor/llvm/dist/test/CodeGen/X86/or-branch.ll vendor/llvm/dist/test/CodeGen/X86/pr27681.mir vendor/llvm/dist/test/CodeGen/X86/sandybridge-loads.ll vendor/llvm/dist/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/stack-folding-fp-avx1.ll vendor/llvm/dist/test/CodeGen/X86/twoaddr-coalesce-2.ll vendor/llvm/dist/test/CodeGen/X86/vector-narrow-binop.ll vendor/llvm/dist/test/CodeGen/X86/vector-popcnt-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-popcnt-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-popcnt-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-avx512.ll vendor/llvm/dist/test/CodeGen/X86/vector-sqrt.ll vendor/llvm/dist/test/CodeGen/X86/vector-trunc-math.ll vendor/llvm/dist/test/CodeGen/X86/vector-tzcnt-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-tzcnt-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-tzcnt-512.ll vendor/llvm/dist/test/CodeGen/X86/wide-integer-cmp.ll vendor/llvm/dist/test/CodeGen/X86/widened-broadcast.ll vendor/llvm/dist/test/CodeGen/X86/x86-interleaved-access.ll vendor/llvm/dist/test/CodeGen/X86/x87.ll vendor/llvm/dist/test/CodeGen/XCore/epilogue_prologue.ll vendor/llvm/dist/test/DebugInfo/Generic/empty.ll vendor/llvm/dist/test/DebugInfo/Generic/nodebug.ll vendor/llvm/dist/test/DebugInfo/Generic/skeletoncu.ll vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-mergetypes.test vendor/llvm/dist/test/DebugInfo/X86/array.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-value-frame-index.ll vendor/llvm/dist/test/DebugInfo/X86/debug-loc-offset.ll vendor/llvm/dist/test/DebugInfo/X86/debug-macro.ll vendor/llvm/dist/test/DebugInfo/X86/empty.ll vendor/llvm/dist/test/DebugInfo/X86/fission-hash.ll vendor/llvm/dist/test/DebugInfo/X86/gnu-public-names-empty.ll vendor/llvm/dist/test/DebugInfo/dwo.ll vendor/llvm/dist/test/DebugInfo/llvm-symbolizer.test vendor/llvm/dist/test/DebugInfo/skeletoncu.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/lit.local.cfg vendor/llvm/dist/test/ExecutionEngine/OrcMCJIT/lit.local.cfg vendor/llvm/dist/test/Feature/fp-intrinsics.ll vendor/llvm/dist/test/Linker/Inputs/module-flags-pic-2-b.ll vendor/llvm/dist/test/Linker/module-flags-pic-2-a.ll vendor/llvm/dist/test/MC/AMDGPU/vop_sdwa.s vendor/llvm/dist/test/MC/Disassembler/X86/avx-512.txt vendor/llvm/dist/test/Other/new-pm-defaults.ll vendor/llvm/dist/test/TableGen/GlobalISelEmitter.td vendor/llvm/dist/test/Transforms/Coroutines/coro-frame.ll vendor/llvm/dist/test/Transforms/GVN/PRE/pre-gep-load.ll vendor/llvm/dist/test/Transforms/GVN/PRE/pre-load.ll vendor/llvm/dist/test/Transforms/GlobalDCE/externally_available.ll vendor/llvm/dist/test/Transforms/InstCombine/alloca.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast-vec-canon.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast.ll vendor/llvm/dist/test/Transforms/InstCombine/ctpop.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp.ll vendor/llvm/dist/test/Transforms/InstSimplify/call.ll vendor/llvm/dist/test/Transforms/InstSimplify/or.ll vendor/llvm/dist/test/Transforms/JumpThreading/assume.ll vendor/llvm/dist/test/Transforms/JumpThreading/fold-not-thread.ll vendor/llvm/dist/test/Transforms/JumpThreading/guards.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/X86/incorrect-offset-scaling.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll vendor/llvm/dist/test/Transforms/NewGVN/pr32403.ll vendor/llvm/dist/test/Transforms/SimpleLoopUnswitch/trivial-unswitch.ll vendor/llvm/dist/test/Verifier/fp-intrinsics.ll vendor/llvm/dist/test/Verifier/module-flags-1.ll vendor/llvm/dist/test/tools/llvm-profdata/memop-size-prof.proftext vendor/llvm/dist/tools/gold/gold-plugin.cpp vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.cpp vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.h vendor/llvm/dist/tools/llvm-profdata/llvm-profdata.cpp vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/unittests/Analysis/ScalarEvolutionTest.cpp vendor/llvm/dist/unittests/DebugInfo/CodeView/CMakeLists.txt vendor/llvm/dist/unittests/DebugInfo/CodeView/ErrorChecking.h vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp vendor/llvm/dist/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp vendor/llvm/dist/unittests/IR/CMakeLists.txt vendor/llvm/dist/unittests/IR/DominatorTreeTest.cpp vendor/llvm/dist/unittests/Support/CrashRecoveryTest.cpp vendor/llvm/dist/utils/TableGen/CMakeLists.txt vendor/llvm/dist/utils/TableGen/GlobalISelEmitter.cpp vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/TableGen/TableGenBackends.h vendor/llvm/dist/utils/git-svn/git-llvm vendor/llvm/dist/utils/lit/lit/TestRunner.py vendor/llvm/dist/utils/release/merge-request.sh Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/CMakeLists.txt Mon May 29 16:25:25 2017 (r319140) @@ -44,6 +44,13 @@ if (NOT PACKAGE_VERSION) "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}") endif() +if ((CMAKE_GENERATOR MATCHES "Visual Studio") AND (CMAKE_GENERATOR_TOOLSET STREQUAL "")) + message(WARNING "Visual Studio generators use the x86 host compiler by " + "default, even for 64-bit targets. This can result in linker " + "instability and out of memory errors. To use the 64-bit " + "host compiler, pass -Thost=x64 on the CMake command line.") +endif() + project(LLVM ${cmake_3_0_PROJ_VERSION} ${cmake_3_0_LANGUAGES} Added: vendor/llvm/dist/docs/Benchmarking.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/docs/Benchmarking.rst Mon May 29 16:25:25 2017 (r319140) @@ -0,0 +1,87 @@ +================================== +Benchmarking tips +================================== + + +Introduction +============ + +For benchmarking a patch we want to reduce all possible sources of +noise as much as possible. How to do that is very OS dependent. + +Note that low noise is required, but not sufficient. It does not +exclude measurement bias. See +https://www.cis.upenn.edu/~cis501/papers/producing-wrong-data.pdf for +example. + +General +================================ + +* Use a high resolution timer, e.g. perf under linux. + +* Run the benchmark multiple times to be able to recognize noise. + +* Disable as many processes or services as possible on the target system. + +* Disable frequency scaling, turbo boost and address space + randomization (see OS specific section). + +* Static link if the OS supports it. That avoids any variation that + might be introduced by loading dynamic libraries. This can be done + by passing ``-DLLVM_BUILD_STATIC=ON`` to cmake. + +* Try to avoid storage. On some systems you can use tmpfs. Putting the + program, inputs and outputs on tmpfs avoids touching a real storage + system, which can have a pretty big variability. + + To mount it (on linux and freebsd at least):: + + mount -t tmpfs -o size=g none dir_to_mount + +Linux +===== + +* Disable address space randomization:: + + echo 0 > /proc/sys/kernel/randomize_va_space + +* Set scaling_governor to performance:: + + for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + do + echo performance > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + done + +* Use https://github.com/lpechacek/cpuset to reserve cpus for just the + program you are benchmarking. If using perf, leave at least 2 cores + so that perf runs in one and your program in another:: + + cset shield -c N1,N2 -k on + + This will move all threads out of N1 and N2. The ``-k on`` means + that even kernel threads are moved out. + +* Disable the SMT pair of the cpus you will use for the benchmark. The + pair of cpu N can be found in + ``/sys/devices/system/cpu/cpuN/topology/thread_siblings_list`` and + disabled with:: + + echo 0 > /sys/devices/system/cpu/cpuX/online + + +* Run the program with:: + + cset shield --exec -- perf stat -r 10 + + This will run the command after ``--`` in the isolated cpus. The + particular perf command runs the ```` 10 times and reports + statistics. + +With these in place you can expect perf variations of less than 0.1%. + +Linux Intel +----------- + +* Disable turbo mode:: + + echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo Modified: vendor/llvm/dist/docs/GettingStartedVS.rst ============================================================================== --- vendor/llvm/dist/docs/GettingStartedVS.rst Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/docs/GettingStartedVS.rst Mon May 29 16:25:25 2017 (r319140) @@ -100,6 +100,10 @@ Here's the short story for getting up an * CMake generates project files for all build types. To select a specific build type, use the Configuration manager from the VS IDE or the ``/property:Configuration`` command line option when using MSBuild. + * By default, the Visual Studio project files generated by CMake use the + 32-bit toolset. If you are developing on a 64-bit version of Windows and + want to use the 64-bit toolset, pass the ``-Thost=x64`` flag when + generating the Visual Studio solution. This requires CMake 3.8.0 or later. 6. Start Visual Studio Modified: vendor/llvm/dist/docs/LangRef.rst ============================================================================== --- vendor/llvm/dist/docs/LangRef.rst Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/docs/LangRef.rst Mon May 29 16:25:25 2017 (r319140) @@ -4415,12 +4415,6 @@ The current supported vocabulary is limi address space identifier. - ``DW_OP_stack_value`` marks a constant value. -DIExpression nodes that contain a ``DW_OP_stack_value`` operator are standalone -location descriptions that describe constant values. This form is used to -describe global constants that have been optimized away. All other expressions -are modifiers to another location: A debug intrinsic ties a location and a -DIExpression together. - DWARF specifies three kinds of simple location descriptions: Register, memory, and implicit location descriptions. Register and memory location descriptions describe the *location* of a source variable (in the sense that a debugger might @@ -12722,7 +12716,7 @@ Syntax: declare @llvm.experimental.constrained.fadd( , , metadata , - metadata ) + metadata ) Overview: """"""""" @@ -12759,7 +12753,7 @@ Syntax: declare @llvm.experimental.constrained.fsub( , , metadata , - metadata ) + metadata ) Overview: """"""""" @@ -12796,7 +12790,7 @@ Syntax: declare @llvm.experimental.constrained.fmul( , , metadata , - metadata ) + metadata ) Overview: """"""""" @@ -12833,7 +12827,7 @@ Syntax: declare @llvm.experimental.constrained.fdiv( , , metadata , - metadata ) + metadata ) Overview: """"""""" @@ -12870,7 +12864,7 @@ Syntax: declare @llvm.experimental.constrained.frem( , , metadata , - metadata ) + metadata ) Overview: """"""""" @@ -12899,6 +12893,461 @@ value operands and has the same type as same sign as the dividend. +Constrained libm-equivalent Intrinsics +-------------------------------------- + +In addition to the basic floating point operations for which constrained +intrinsics are described above, there are constrained versions of various +operations which provide equivalent behavior to a corresponding libm function. +These intrinsics allow the precise behavior of these operations with respect to +rounding mode and exception behavior to be controlled. + +As with the basic constrained floating point intrinsics, the rounding mode +and exception behavior arguments only control the behavior of the optimizer. +They do not change the runtime floating point environment. + + +'``llvm.experimental.constrained.sqrt``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.sqrt( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.sqrt``' intrinsic returns the square root +of the specified value, returning the same value as the libm '``sqrt``' +functions would, but without setting ``errno``. + +Arguments: +"""""""""" + +The first argument and the return type are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the nonnegative square root of the specified value. +If the value is less than negative zero, a floating point exception occurs +and the the return value is architecture specific. + + +'``llvm.experimental.constrained.pow``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.pow( , , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.pow``' intrinsic returns the first operand +raised to the (positive or negative) power specified by the second operand. + +Arguments: +"""""""""" + +The first two arguments and the return value are floating point numbers of the +same type. The second argument specifies the power to which the first argument +should be raised. + +The third and fourth arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the first value raised to the second power, +returning the same values as the libm ``pow`` functions would, and +handles error conditions in the same way. + + +'``llvm.experimental.constrained.powi``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.powi( , i32 , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.powi``' intrinsic returns the first operand +raised to the (positive or negative) power specified by the second operand. The +order of evaluation of multiplications is not defined. When a vector of floating +point type is used, the second argument remains a scalar integer value. + + +Arguments: +"""""""""" + +The first argument and the return value are floating point numbers of the same +type. The second argument is a 32-bit signed integer specifying the power to +which the first argument should be raised. + +The third and fourth arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the first value raised to the second power with an +unspecified sequence of rounding operations. + + +'``llvm.experimental.constrained.sin``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.sin( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.sin``' intrinsic returns the sine of the +first operand. + +Arguments: +"""""""""" + +The first argument and the return type are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the sine of the specified operand, returning the +same values as the libm ``sin`` functions would, and handles error +conditions in the same way. + + +'``llvm.experimental.constrained.cos``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.cos( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.cos``' intrinsic returns the cosine of the +first operand. + +Arguments: +"""""""""" + +The first argument and the return type are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the cosine of the specified operand, returning the +same values as the libm ``cos`` functions would, and handles error +conditions in the same way. + + +'``llvm.experimental.constrained.exp``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.exp( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.exp``' intrinsic computes the base-e +exponential of the specified value. + +Arguments: +"""""""""" + +The first argument and the return value are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``exp`` functions +would, and handles error conditions in the same way. + + +'``llvm.experimental.constrained.exp2``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.exp2( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.exp2``' intrinsic computes the base-2 +exponential of the specified value. + + +Arguments: +"""""""""" + +The first argument and the return value are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``exp2`` functions +would, and handles error conditions in the same way. + + +'``llvm.experimental.constrained.log``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.log( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.log``' intrinsic computes the base-e +logarithm of the specified value. + +Arguments: +"""""""""" + +The first argument and the return value are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + + +Semantics: +"""""""""" + +This function returns the same values as the libm ``log`` functions +would, and handles error conditions in the same way. + + +'``llvm.experimental.constrained.log10``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.log10( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.log10``' intrinsic computes the base-10 +logarithm of the specified value. + +Arguments: +"""""""""" + +The first argument and the return value are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``log10`` functions +would, and handles error conditions in the same way. + + +'``llvm.experimental.constrained.log2``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.log2( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.log2``' intrinsic computes the base-2 +logarithm of the specified value. + +Arguments: +"""""""""" + +The first argument and the return value are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``log2`` functions +would, and handles error conditions in the same way. + + +'``llvm.experimental.constrained.rint``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.rint( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.rint``' intrinsic returns the first +operand rounded to the nearest integer. It may raise an inexact floating point +exception if the operand is not an integer. + +Arguments: +"""""""""" + +The first argument and the return value are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``rint`` functions +would, and handles error conditions in the same way. The rounding mode is +described, not determined, by the rounding mode argument. The actual rounding +mode is determined by the runtime floating point environment. The rounding +mode argument is only intended as information to the compiler. + + +'``llvm.experimental.constrained.nearbyint``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare + @llvm.experimental.constrained.nearbyint( , + metadata , + metadata ) + +Overview: +""""""""" + +The '``llvm.experimental.constrained.nearbyint``' intrinsic returns the first +operand rounded to the nearest integer. It will not raise an inexact floating +point exception if the operand is not an integer. + + +Arguments: +"""""""""" + +The first argument and the return value are floating point numbers of the same +type. + +The second and third arguments specify the rounding mode and exception +behavior as described above. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``nearbyint`` functions +would, and handles error conditions in the same way. The rounding mode is +described, not determined, by the rounding mode argument. The actual rounding +mode is determined by the runtime floating point environment. The rounding +mode argument is only intended as information to the compiler. + + General Intrinsics ------------------ Modified: vendor/llvm/dist/docs/Vectorizers.rst ============================================================================== --- vendor/llvm/dist/docs/Vectorizers.rst Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/docs/Vectorizers.rst Mon May 29 16:25:25 2017 (r319140) @@ -99,7 +99,9 @@ Optimization remarks are enabled using: indicates if vectorization was specified. ``-Rpass-analysis=loop-vectorize`` identifies the statements that caused -vectorization to fail. +vectorization to fail. If in addition ``-fsave-optimization-record`` is +provided, multiple causes of vectorization failure may be listed (this behavior +might change in the future). Consider the following loop: Modified: vendor/llvm/dist/docs/index.rst ============================================================================== --- vendor/llvm/dist/docs/index.rst Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/docs/index.rst Mon May 29 16:25:25 2017 (r319140) @@ -90,6 +90,7 @@ representation. CodeOfConduct CompileCudaWithLLVM ReportingGuide + Benchmarking :doc:`GettingStarted` Discusses how to get up and running quickly with the LLVM infrastructure. Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h Mon May 29 16:25:25 2017 (r319140) @@ -1,4 +1,4 @@ -//===----- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope ----*- C++ -*-===// +//===- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,7 +17,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/JITSymbol.h" -#include "llvm/ExecutionEngine/RuntimeDyld.h" +#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" #include "llvm/ExecutionEngine/SectionMemoryManager.h" #include "llvm/ExecutionEngine/Orc/CompileUtils.h" #include "llvm/ExecutionEngine/Orc/IRCompileLayer.h" @@ -44,7 +44,7 @@ private: IRCompileLayer CompileLayer; public: - typedef decltype(CompileLayer)::ModuleSetHandleT ModuleHandle; + using ModuleHandle = decltype(CompileLayer)::ModuleSetHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h Mon May 29 16:25:25 2017 (r319140) @@ -1,4 +1,4 @@ -//===----- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope ----*- C++ -*-===// +//===- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,7 +17,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/JITSymbol.h" -#include "llvm/ExecutionEngine/RuntimeDyld.h" +#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" #include "llvm/ExecutionEngine/SectionMemoryManager.h" #include "llvm/ExecutionEngine/Orc/CompileUtils.h" #include "llvm/ExecutionEngine/Orc/IRCompileLayer.h" @@ -47,13 +47,13 @@ private: RTDyldObjectLinkingLayer<> ObjectLayer; IRCompileLayer CompileLayer; - typedef std::function(std::unique_ptr)> - OptimizeFunction; + using OptimizeFunction = + std::function(std::unique_ptr)>; IRTransformLayer OptimizeLayer; public: - typedef decltype(OptimizeLayer)::ModuleSetHandleT ModuleHandle; + using ModuleHandle = decltype(OptimizeLayer)::ModuleSetHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h Mon May 29 16:25:25 2017 (r319140) @@ -1,4 +1,4 @@ -//===----- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope ----*- C++ -*-===// +//===- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,6 +17,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/JITSymbol.h" +#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" #include "llvm/ExecutionEngine/SectionMemoryManager.h" #include "llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h" @@ -49,8 +50,8 @@ private: RTDyldObjectLinkingLayer<> ObjectLayer; IRCompileLayer CompileLayer; - typedef std::function(std::unique_ptr)> - OptimizeFunction; + using OptimizeFunction = + std::function(std::unique_ptr)>; IRTransformLayer OptimizeLayer; @@ -58,7 +59,7 @@ private: CompileOnDemandLayer CODLayer; public: - typedef decltype(CODLayer)::ModuleSetHandleT ModuleHandle; + using ModuleHandle = decltype(CODLayer)::ModuleSetHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h Mon May 29 16:25:25 2017 (r319140) @@ -1,4 +1,4 @@ -//===----- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope ----*- C++ -*-===// +//===- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,10 +17,10 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/JITSymbol.h" -#include "llvm/ExecutionEngine/RuntimeDyld.h" +#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" #include "llvm/ExecutionEngine/SectionMemoryManager.h" -#include "llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h" #include "llvm/ExecutionEngine/Orc/CompileUtils.h" +#include "llvm/ExecutionEngine/Orc/IndirectionUtils.h" #include "llvm/ExecutionEngine/Orc/IRCompileLayer.h" #include "llvm/ExecutionEngine/Orc/IRTransformLayer.h" #include "llvm/ExecutionEngine/Orc/LambdaResolver.h" @@ -76,8 +76,8 @@ private: RTDyldObjectLinkingLayer<> ObjectLayer; IRCompileLayer CompileLayer; - typedef std::function(std::unique_ptr)> - OptimizeFunction; + using OptimizeFunction = + std::function(std::unique_ptr)>; IRTransformLayer OptimizeLayer; @@ -85,7 +85,7 @@ private: std::unique_ptr IndirectStubsMgr; public: - typedef decltype(OptimizeLayer)::ModuleSetHandleT ModuleHandle; + using ModuleHandle = decltype(OptimizeLayer)::ModuleSetHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), @@ -106,7 +106,6 @@ public: TargetMachine &getTargetMachine() { return *TM; } ModuleHandle addModule(std::unique_ptr M) { - // Build our symbol resolver: // Lambda 1: Look back into the JIT itself to find symbols that are part of // the same "logical dylib". Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h Mon May 29 16:25:25 2017 (r319140) @@ -1,4 +1,4 @@ -//===----- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope ----*- C++ -*-===// +//===- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -20,9 +20,8 @@ #include "llvm/ADT/Triple.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/JITSymbol.h" -#include "llvm/ExecutionEngine/RuntimeDyld.h" -#include "llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h" #include "llvm/ExecutionEngine/Orc/CompileUtils.h" +#include "llvm/ExecutionEngine/Orc/IndirectionUtils.h" #include "llvm/ExecutionEngine/Orc/IRCompileLayer.h" #include "llvm/ExecutionEngine/Orc/IRTransformLayer.h" #include "llvm/ExecutionEngine/Orc/LambdaResolver.h" @@ -73,7 +72,7 @@ namespace llvm { namespace orc { // Typedef the remote-client API. -typedef remote::OrcRemoteTargetClient MyRemote; +using MyRemote = remote::OrcRemoteTargetClient; class KaleidoscopeJIT { private: @@ -82,8 +81,8 @@ private: RTDyldObjectLinkingLayer<> ObjectLayer; IRCompileLayer CompileLayer; - typedef std::function(std::unique_ptr)> - OptimizeFunction; + using OptimizeFunction = + std::function(std::unique_ptr)>; IRTransformLayer OptimizeLayer; @@ -92,7 +91,7 @@ private: MyRemote &Remote; public: - typedef decltype(OptimizeLayer)::ModuleSetHandleT ModuleHandle; + using ModuleHandle = decltype(OptimizeLayer)::ModuleSetHandleT; KaleidoscopeJIT(MyRemote &Remote) : TM(EngineBuilder().selectTarget(Triple(Remote.getTargetTriple()), "", @@ -124,7 +123,6 @@ public: TargetMachine &getTargetMachine() { return *TM; } ModuleHandle addModule(std::unique_ptr M) { - // Build our symbol resolver: // Lambda 1: Look back into the JIT itself to find symbols that are part of // the same "logical dylib". Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp Mon May 29 16:25:25 2017 (r319140) @@ -1,17 +1,19 @@ +#include "../RemoteJITUtils.h" +#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" +#include "llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h" +#include "llvm/ExecutionEngine/Orc/OrcABISupport.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/DynamicLibrary.h" +#include "llvm/Support/Error.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/Support/TargetSelect.h" -#include "llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h" -#include "llvm/ExecutionEngine/Orc/OrcABISupport.h" - -#include "../RemoteJITUtils.h" - +#include +#include #include -#include +#include #include #include - using namespace llvm; using namespace llvm::orc; @@ -22,7 +24,7 @@ cl::opt Port("port", ExitOnError ExitOnErr; -typedef int (*MainFun)(int, const char*[]); +using MainFun = int (*)(int, const char*[]); template NativePtrT MakeNative(uint64_t P) { @@ -36,7 +38,6 @@ void printExprResult(double Val) { // --- LAZY COMPILE TEST --- int main(int argc, char* argv[]) { - if (argc == 0) ExitOnErr.setBanner("jit_server: "); else @@ -59,14 +60,14 @@ int main(int argc, char* argv[]) { int sockfd = socket(PF_INET, SOCK_STREAM, 0); sockaddr_in servAddr, clientAddr; socklen_t clientAddrLen = sizeof(clientAddr); - bzero(&servAddr, sizeof(servAddr)); + memset(&servAddr, 0, sizeof(servAddr)); servAddr.sin_family = PF_INET; servAddr.sin_family = INADDR_ANY; servAddr.sin_port = htons(Port); { // avoid "Address already in use" error. - int yes=1; + int yes = 1; if (setsockopt(sockfd,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(int)) == -1) { errs() << "Error calling setsockopt.\n"; return 1; @@ -98,7 +99,8 @@ int main(int argc, char* argv[]) { }; FDRPCChannel TCPChannel(newsockfd, newsockfd); - typedef remote::OrcRemoteTargetServer MyServerT; + + using MyServerT = remote::OrcRemoteTargetServer; MyServerT Server(TCPChannel, SymbolLookup, RegisterEHFrames, DeregisterEHFrames); Modified: vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/examples/Kaleidoscope/include/KaleidoscopeJIT.h Mon May 29 16:25:25 2017 (r319140) @@ -1,4 +1,4 @@ -//===----- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope ----*- C++ -*-===// +//===- KaleidoscopeJIT.h - A simple JIT for Kaleidoscope --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -19,7 +19,6 @@ #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/JITSymbol.h" #include "llvm/ExecutionEngine/RTDyldMemoryManager.h" -#include "llvm/ExecutionEngine/RuntimeDyld.h" #include "llvm/ExecutionEngine/SectionMemoryManager.h" #include "llvm/ExecutionEngine/Orc/CompileUtils.h" #include "llvm/ExecutionEngine/Orc/IRCompileLayer.h" @@ -40,9 +39,9 @@ namespace orc { class KaleidoscopeJIT { public: - typedef RTDyldObjectLinkingLayer<> ObjLayerT; - typedef IRCompileLayer CompileLayerT; - typedef CompileLayerT::ModuleSetHandleT ModuleHandleT; + using ObjLayerT = RTDyldObjectLinkingLayer<>; + using CompileLayerT = IRCompileLayer; + using ModuleHandleT = CompileLayerT::ModuleSetHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), Modified: vendor/llvm/dist/include/llvm/ADT/Triple.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/Triple.h Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/include/llvm/ADT/Triple.h Mon May 29 16:25:25 2017 (r319140) @@ -59,6 +59,7 @@ public: mips64, // MIPS64: mips64 mips64el, // MIPS64EL: mips64el msp430, // MSP430: msp430 + nios2, // NIOSII: nios2 ppc, // PPC: powerpc ppc64, // PPC64: powerpc64, ppu ppc64le, // PPC64LE: powerpc64le Modified: vendor/llvm/dist/include/llvm/Analysis/InstructionSimplify.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/InstructionSimplify.h Mon May 29 15:24:45 2017 (r319139) +++ vendor/llvm/dist/include/llvm/Analysis/InstructionSimplify.h Mon May 29 16:25:25 2017 (r319140) @@ -70,174 +70,173 @@ struct SimplifyQuery { Copy.CxtI = I; return Copy; } - }; +}; - // NOTE: the explicit multiple argument versions of these functions are - // deprecated. - // Please use the SimplifyQuery versions in new code. +// NOTE: the explicit multiple argument versions of these functions are +// deprecated. +// Please use the SimplifyQuery versions in new code. - /// Given operands for an Add, fold the result or return null. - Value *SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW, +/// Given operands for an Add, fold the result or return null. +Value *SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW, const SimplifyQuery &Q); - /// Given operands for a Sub, fold the result or return null. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 29 16:25:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6633CD777C8; Mon, 29 May 2017 16:25:51 +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 104A880AFB; Mon, 29 May 2017 16:25:50 +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 v4TGPo3O083053; Mon, 29 May 2017 16:25:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGPkiN083020; Mon, 29 May 2017 16:25:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291625.v4TGPkiN083020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319142 - in vendor/clang/dist: . bindings/python/clang cmake/caches docs include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/Format include/clang/F... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:25:51 -0000 Author: dim Date: Mon May 29 16:25:46 2017 New Revision: 319142 URL: https://svnweb.freebsd.org/changeset/base/319142 Log: Vendor import of clang trunk r304149: https://llvm.org/svn/llvm-project/cfe/trunk@304149 Added: vendor/clang/dist/cmake/caches/BaremetalARM.cmake vendor/clang/dist/lib/Driver/ToolChains/BareMetal.cpp (contents, props changed) vendor/clang/dist/lib/Driver/ToolChains/BareMetal.h (contents, props changed) vendor/clang/dist/lib/Headers/avx512vpopcntdqintrin.h (contents, props changed) vendor/clang/dist/test/CodeGen/avx512vpopcntdqintrin.c (contents, props changed) vendor/clang/dist/test/CodeGen/union-tbaa1.c (contents, props changed) vendor/clang/dist/test/CodeGen/xray-imbue-arg1.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/union-tbaa2.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCoroutines/Inputs/ vendor/clang/dist/test/CodeGenCoroutines/Inputs/coroutine.h (contents, props changed) vendor/clang/dist/test/CodeGenCoroutines/coro-gro.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCoroutines/coro-lambda.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCoroutines/coro-params.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCoroutines/coro-promise-dtor.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCoroutines/coro-ret-void.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCoroutines/coro-unhandled-exception.cpp (contents, props changed) vendor/clang/dist/test/Driver/Inputs/baremetal_arm/ vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/ vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/ vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/5.0.0/ vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/5.0.0/.keep vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/6.0.0/ vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/6.0.0/.keep vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/v1/ vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/v1/.keep vendor/clang/dist/test/Driver/autocomplete.c (contents, props changed) vendor/clang/dist/test/Driver/baremetal.cpp (contents, props changed) vendor/clang/dist/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h (contents, props changed) vendor/clang/dist/test/Frontend/Inputs/SystemHeaderPrefix/noline.h (contents, props changed) vendor/clang/dist/test/Frontend/Inputs/line-directive.h (contents, props changed) vendor/clang/dist/test/Frontend/system-header-line-directive.c (contents, props changed) vendor/clang/dist/test/Misc/caret-diags-multiline.cpp (contents, props changed) vendor/clang/dist/test/Modules/Inputs/DependsOnModule.framework/Headers/coroutines.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/DependsOnModule.framework/Headers/not_coroutines.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/diagnose-missing-import/ vendor/clang/dist/test/Modules/Inputs/diagnose-missing-import/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/diagnose-missing-import/module.modulemap vendor/clang/dist/test/Modules/diagnose-missing-import.m vendor/clang/dist/test/Modules/requires-coroutines.mm vendor/clang/dist/test/SemaCXX/coroutine-seh.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/null-cast.cpp (contents, props changed) vendor/clang/dist/test/SemaObjC/diagnose_if.m vendor/clang/dist/utils/bash-autocomplete.sh (contents, props changed) Deleted: vendor/clang/dist/test/Driver/arm-darwin-builtin.c Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/bindings/python/clang/cindex.py vendor/clang/dist/docs/Modules.rst vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/StmtCXX.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/BuiltinsAMDGPU.def vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/DiagnosticOptions.def vendor/clang/dist/include/clang/Basic/DiagnosticOptions.h vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Basic/SourceManagerInternals.h vendor/clang/dist/include/clang/Basic/TemplateKinds.h vendor/clang/dist/include/clang/Basic/XRayLists.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Format/Format.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h vendor/clang/dist/include/clang/Lex/ModuleMap.h vendor/clang/dist/include/clang/Sema/AttributeList.h vendor/clang/dist/include/clang/Sema/ParsedTemplate.h vendor/clang/dist/include/clang/Sema/ScopeInfo.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/MicrosoftMangle.cpp vendor/clang/dist/lib/AST/StmtCXX.cpp vendor/clang/dist/lib/Analysis/AnalysisDeclContext.cpp vendor/clang/dist/lib/Basic/Module.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/XRayLists.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp vendor/clang/dist/lib/Driver/ToolChains/Linux.cpp vendor/clang/dist/lib/Driver/ToolChains/Myriad.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/Format.cpp vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/TextDiagnostic.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Headers/immintrin.h vendor/clang/dist/lib/Index/IndexBody.cpp vendor/clang/dist/lib/Index/IndexingContext.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/CoroutineStmtBuilder.h vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCoroutine.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaLambda.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/lib/Tooling/CommonOptionsParser.cpp vendor/clang/dist/lib/Tooling/CompilationDatabase.cpp vendor/clang/dist/lib/Tooling/Tooling.cpp vendor/clang/dist/test/CXX/class.access/p4.cpp vendor/clang/dist/test/CodeGen/64bit-swiftcall.c vendor/clang/dist/test/CodeGen/aarch64-neon-2velem.c vendor/clang/dist/test/CodeGen/aarch64-neon-3v.c vendor/clang/dist/test/CodeGen/aarch64-neon-across.c vendor/clang/dist/test/CodeGen/aarch64-neon-extract.c vendor/clang/dist/test/CodeGen/aarch64-neon-fcvt-intrinsics.c vendor/clang/dist/test/CodeGen/aarch64-neon-fma.c vendor/clang/dist/test/CodeGen/aarch64-neon-intrinsics.c vendor/clang/dist/test/CodeGen/aarch64-neon-ldst-one.c vendor/clang/dist/test/CodeGen/aarch64-neon-misc.c vendor/clang/dist/test/CodeGen/aarch64-neon-perm.c vendor/clang/dist/test/CodeGen/aarch64-neon-scalar-copy.c vendor/clang/dist/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c vendor/clang/dist/test/CodeGen/aarch64-neon-shifts.c vendor/clang/dist/test/CodeGen/aarch64-neon-tbl.c vendor/clang/dist/test/CodeGen/aarch64-neon-vcombine.c vendor/clang/dist/test/CodeGen/aarch64-neon-vget-hilo.c vendor/clang/dist/test/CodeGen/aarch64-neon-vget.c vendor/clang/dist/test/CodeGen/aarch64-poly128.c vendor/clang/dist/test/CodeGen/aarch64-poly64.c vendor/clang/dist/test/CodeGen/address-safety-attr-kasan.cpp vendor/clang/dist/test/CodeGen/address-safety-attr.cpp vendor/clang/dist/test/CodeGen/arm-crc32.c vendor/clang/dist/test/CodeGen/arm-neon-directed-rounding.c vendor/clang/dist/test/CodeGen/arm-neon-fma.c vendor/clang/dist/test/CodeGen/arm-neon-numeric-maxmin.c vendor/clang/dist/test/CodeGen/arm-neon-shifts.c vendor/clang/dist/test/CodeGen/arm-neon-vcvtX.c vendor/clang/dist/test/CodeGen/arm-neon-vget.c vendor/clang/dist/test/CodeGen/arm-swiftcall.c vendor/clang/dist/test/CodeGen/arm64-crc32.c vendor/clang/dist/test/CodeGen/arm64-lanes.c vendor/clang/dist/test/CodeGen/arm64_vcopy.c vendor/clang/dist/test/CodeGen/arm64_vdupq_n_f64.c vendor/clang/dist/test/CodeGen/attr-coldhot.c vendor/clang/dist/test/CodeGen/attr-naked.c vendor/clang/dist/test/CodeGen/attr-target-x86.c vendor/clang/dist/test/CodeGen/builtins-arm-exclusive.c vendor/clang/dist/test/CodeGen/builtins-arm.c vendor/clang/dist/test/CodeGen/builtins-arm64.c vendor/clang/dist/test/CodeGen/builtins-ppc-error.c vendor/clang/dist/test/CodeGen/builtins-ppc-vsx.c vendor/clang/dist/test/CodeGen/mips-varargs.c vendor/clang/dist/test/CodeGen/noduplicate-cxx11-test.cpp vendor/clang/dist/test/CodeGen/piclevels.c vendor/clang/dist/test/CodeGen/pragma-weak.c vendor/clang/dist/test/CodeGen/unwind-attr.c vendor/clang/dist/test/CodeGenCXX/apple-kext-indirect-virtual-dtor-call.cpp vendor/clang/dist/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp vendor/clang/dist/test/CodeGenCXX/optnone-templates.cpp vendor/clang/dist/test/CodeGenCXX/static-init-wasm.cpp vendor/clang/dist/test/CodeGenCXX/thunks.cpp vendor/clang/dist/test/CodeGenCoroutines/coro-alloc.cpp vendor/clang/dist/test/CodeGenCoroutines/coro-await.cpp vendor/clang/dist/test/CodeGenCoroutines/coro-builtins.c vendor/clang/dist/test/CodeGenCoroutines/coro-cleanup.cpp vendor/clang/dist/test/CodeGenCoroutines/coro-eh-cleanup.cpp vendor/clang/dist/test/CodeGenObjC/gnu-exceptions.m vendor/clang/dist/test/CodeGenOpenCL/amdgpu-alignment.cl vendor/clang/dist/test/CodeGenOpenCL/amdgpu-attrs.cl vendor/clang/dist/test/CodeGenOpenCL/amdgpu-debug-info-pointer-address-space.cl vendor/clang/dist/test/CodeGenOpenCL/amdgpu-debug-info-variable-expression.cl vendor/clang/dist/test/CodeGenOpenCL/amdgpu-nullptr.cl vendor/clang/dist/test/CodeGenOpenCL/builtins-amdgcn.cl vendor/clang/dist/test/CodeGenOpenCL/byval.cl vendor/clang/dist/test/CodeGenOpenCL/half.cl vendor/clang/dist/test/CodeGenOpenCL/size_t.cl vendor/clang/dist/test/Driver/aarch64-cpus.c vendor/clang/dist/test/Driver/amdgpu-features.c vendor/clang/dist/test/Driver/arm-default-build-attributes.s vendor/clang/dist/test/Driver/cl-outputs.c vendor/clang/dist/test/Driver/clang_f_opts.c vendor/clang/dist/test/Driver/cuda-external-tools.cu vendor/clang/dist/test/Driver/darwin-iphone-defaults.m vendor/clang/dist/test/Driver/debug-options.c vendor/clang/dist/test/Driver/gfortran.f90 vendor/clang/dist/test/Driver/split-debug.h vendor/clang/dist/test/Driver/unknown-arg.c vendor/clang/dist/test/Frontend/gnu-mcount.c vendor/clang/dist/test/Index/Core/index-instantiated-source.cpp vendor/clang/dist/test/Index/Core/index-source.m vendor/clang/dist/test/Index/index-attrs.c vendor/clang/dist/test/Index/index-attrs.cpp vendor/clang/dist/test/Index/index-module.m vendor/clang/dist/test/Index/opencl-types.cl vendor/clang/dist/test/Lexer/cxx-features.cpp vendor/clang/dist/test/Modules/Inputs/DependsOnModule.framework/module.map vendor/clang/dist/test/OpenMP/nvptx_target_codegen.cpp vendor/clang/dist/test/OpenMP/target_codegen.cpp vendor/clang/dist/test/OpenMP/target_codegen_registration.cpp vendor/clang/dist/test/OpenMP/target_parallel_codegen.cpp vendor/clang/dist/test/OpenMP/target_parallel_codegen_registration.cpp vendor/clang/dist/test/OpenMP/target_parallel_if_codegen.cpp vendor/clang/dist/test/OpenMP/target_parallel_num_threads_codegen.cpp vendor/clang/dist/test/OpenMP/target_teams_codegen.cpp vendor/clang/dist/test/OpenMP/target_teams_codegen_registration.cpp vendor/clang/dist/test/OpenMP/target_teams_num_teams_codegen.cpp vendor/clang/dist/test/OpenMP/target_teams_thread_limit_codegen.cpp vendor/clang/dist/test/Parser/objc-available.m vendor/clang/dist/test/Preprocessor/line-directive-output.c vendor/clang/dist/test/Sema/128bitfloat.cpp vendor/clang/dist/test/Sema/sizeof-struct-non-zero-as-member.cl vendor/clang/dist/test/SemaCXX/coreturn.cpp vendor/clang/dist/test/SemaCXX/coroutine-unhandled_exception-warning.cpp vendor/clang/dist/test/SemaCXX/coroutines.cpp vendor/clang/dist/test/SemaCXX/default-assignment-operator.cpp vendor/clang/dist/test/SemaCXX/deprecated.cpp vendor/clang/dist/test/SemaCXX/uninitialized.cpp vendor/clang/dist/test/SemaCXX/virtual-base-used.cpp vendor/clang/dist/test/SemaObjC/unguarded-availability.m vendor/clang/dist/test/SemaOpenCL/invalid-pipes-cl2.0.cl vendor/clang/dist/test/SemaOpenCL/vector_literals_invalid.cl vendor/clang/dist/tools/clang-format/git-clang-format vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/libclang/CXCompilationDatabase.cpp vendor/clang/dist/tools/libclang/CXType.cpp vendor/clang/dist/tools/scan-build/libexec/ccc-analyzer vendor/clang/dist/unittests/Driver/ToolChainTest.cpp vendor/clang/dist/unittests/Format/CleanupTest.cpp vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/unittests/Format/FormatTestJS.cpp vendor/clang/dist/unittests/Format/FormatTestObjC.cpp vendor/clang/dist/unittests/Tooling/CompilationDatabaseTest.cpp vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp vendor/clang/dist/www/cxx_status.html vendor/clang/dist/www/get_started.html Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/CMakeLists.txt Mon May 29 16:25:46 2017 (r319142) @@ -359,6 +359,10 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) PATTERN "*.inc" PATTERN "*.h" ) + + install(PROGRAMS utils/bash-autocomplete.sh + DESTINATION share/clang + ) endif() add_definitions( -D_GNU_SOURCE ) Modified: vendor/clang/dist/bindings/python/clang/cindex.py ============================================================================== --- vendor/clang/dist/bindings/python/clang/cindex.py Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/bindings/python/clang/cindex.py Mon May 29 16:25:46 2017 (r319142) @@ -1963,6 +1963,47 @@ TypeKind.DEPENDENTSIZEDARRAY = TypeKind( TypeKind.MEMBERPOINTER = TypeKind(117) TypeKind.AUTO = TypeKind(118) TypeKind.ELABORATED = TypeKind(119) +TypeKind.PIPE = TypeKind(120) +TypeKind.OCLIMAGE1DRO = TypeKind(121) +TypeKind.OCLIMAGE1DARRAYRO = TypeKind(122) +TypeKind.OCLIMAGE1DBUFFERRO = TypeKind(123) +TypeKind.OCLIMAGE2DRO = TypeKind(124) +TypeKind.OCLIMAGE2DARRAYRO = TypeKind(125) +TypeKind.OCLIMAGE2DDEPTHRO = TypeKind(126) +TypeKind.OCLIMAGE2DARRAYDEPTHRO = TypeKind(127) +TypeKind.OCLIMAGE2DMSAARO = TypeKind(128) +TypeKind.OCLIMAGE2DARRAYMSAARO = TypeKind(129) +TypeKind.OCLIMAGE2DMSAADEPTHRO = TypeKind(130) +TypeKind.OCLIMAGE2DARRAYMSAADEPTHRO = TypeKind(131) +TypeKind.OCLIMAGE3DRO = TypeKind(132) +TypeKind.OCLIMAGE1DWO = TypeKind(133) +TypeKind.OCLIMAGE1DARRAYWO = TypeKind(134) +TypeKind.OCLIMAGE1DBUFFERWO = TypeKind(135) +TypeKind.OCLIMAGE2DWO = TypeKind(136) +TypeKind.OCLIMAGE2DARRAYWO = TypeKind(137) +TypeKind.OCLIMAGE2DDEPTHWO = TypeKind(138) +TypeKind.OCLIMAGE2DARRAYDEPTHWO = TypeKind(139) +TypeKind.OCLIMAGE2DMSAAWO = TypeKind(140) +TypeKind.OCLIMAGE2DARRAYMSAAWO = TypeKind(141) +TypeKind.OCLIMAGE2DMSAADEPTHWO = TypeKind(142) +TypeKind.OCLIMAGE2DARRAYMSAADEPTHWO = TypeKind(143) +TypeKind.OCLIMAGE3DWO = TypeKind(144) +TypeKind.OCLIMAGE1DRW = TypeKind(145) +TypeKind.OCLIMAGE1DARRAYRW = TypeKind(146) +TypeKind.OCLIMAGE1DBUFFERRW = TypeKind(147) +TypeKind.OCLIMAGE2DRW = TypeKind(148) +TypeKind.OCLIMAGE2DARRAYRW = TypeKind(149) +TypeKind.OCLIMAGE2DDEPTHRW = TypeKind(150) +TypeKind.OCLIMAGE2DARRAYDEPTHRW = TypeKind(151) +TypeKind.OCLIMAGE2DMSAARW = TypeKind(152) +TypeKind.OCLIMAGE2DARRAYMSAARW = TypeKind(153) +TypeKind.OCLIMAGE2DMSAADEPTHRW = TypeKind(154) +TypeKind.OCLIMAGE2DARRAYMSAADEPTHRW = TypeKind(155) +TypeKind.OCLIMAGE3DRW = TypeKind(156) +TypeKind.OCLSAMPLER = TypeKind(157) +TypeKind.OCLEVENT = TypeKind(158) +TypeKind.OCLQUEUE = TypeKind(159) +TypeKind.OCLRESERVEID = TypeKind(160) class RefQualifierKind(BaseEnumeration): """Describes a specific ref-qualifier of a type.""" Added: vendor/clang/dist/cmake/caches/BaremetalARM.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/cmake/caches/BaremetalARM.cmake Mon May 29 16:25:46 2017 (r319142) @@ -0,0 +1,50 @@ +set(LLVM_TARGETS_TO_BUILD ARM;X86 CACHE STRING "") + +# Builtins +set(LLVM_BUILTIN_TARGETS "armv7m-none-eabi;armv6m-none-eabi;armv7em-none-eabi" CACHE STRING "Builtin Targets") + +set(BUILTINS_armv6m-none-eabi_CMAKE_SYSROOT ${BAREMETAL_ARMV6M_SYSROOT} CACHE STRING "armv6m-none-eabi Sysroot") +set(BUILTINS_armv6m-none-eabi_CMAKE_SYSTEM_NAME Generic CACHE STRING "armv6m-none-eabi System Name") +set(BUILTINS_armv6m-none-eabi_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "armv6m-none-eabi Baremetal build") +set(BUILTINS_armv6m-none-eabi_COMPILER_RT_OS_DIR "baremetal" CACHE STRING "armv6m-none-eabi os dir") + +set(BUILTINS_armv7m-none-eabi_CMAKE_SYSROOT ${BAREMETAL_ARMV7M_SYSROOT} CACHE STRING "armv7m-none-eabi Sysroot") +set(BUILTINS_armv7m-none-eabi_CMAKE_SYSTEM_NAME Generic CACHE STRING "armv7m-none-eabi System Name") +set(BUILTINS_armv7m-none-eabi_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "armv7m-none-eabi Baremetal build") +set(BUILTINS_armv7m-none-eabi_CMAKE_C_FLAGS "-mfpu=fp-armv8" CACHE STRING "armv7m-none-eabi C Flags") +set(BUILTINS_armv7m-none-eabi_CMAKE_ASM_FLAGS "-mfpu=fp-armv8" CACHE STRING "armv7m-none-eabi ASM Flags") +set(BUILTINS_armv7m-none-eabi_COMPILER_RT_OS_DIR "baremetal" CACHE STRING "armv7m-none-eabi os dir") + +set(BUILTINS_armv7em-none-eabi_CMAKE_SYSROOT ${BAREMETAL_ARMV7EM_SYSROOT} CACHE STRING "armv7em-none-eabi Sysroot") +set(BUILTINS_armv7em-none-eabi_CMAKE_SYSTEM_NAME Generic CACHE STRING "armv7em-none-eabi System Name") +set(BUILTINS_armv7em-none-eabi_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "armv7em-none-eabi Baremetal build") +set(BUILTINS_armv7em-none-eabi_CMAKE_C_FLAGS "-mfpu=fp-armv8" CACHE STRING "armv7em-none-eabi C Flags") +set(BUILTINS_armv7em-none-eabi_CMAKE_ASM_FLAGS "-mfpu=fp-armv8" CACHE STRING "armv7em-none-eabi ASM Flags") +set(BUILTINS_armv7em-none-eabi_COMPILER_RT_OS_DIR "baremetal" CACHE STRING "armv7em-none-eabi os dir") + +set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") +set(LLVM_TOOLCHAIN_TOOLS + llc + llvm-ar + llvm-cxxfilt + llvm-dwarfdump + llvm-dsymutil + llvm-nm + llvm-objdump + llvm-ranlib + llvm-readobj + llvm-size + llvm-symbolizer + opt + CACHE STRING "") + +set(LLVM_DISTRIBUTION_COMPONENTS + clang + lld + clang-headers + builtins-armv6m-none-eabi + builtins-armv7m-none-eabi + builtins-armv7em-none-eabi + runtimes + ${LLVM_TOOLCHAIN_TOOLS} + CACHE STRING "") Modified: vendor/clang/dist/docs/Modules.rst ============================================================================== --- vendor/clang/dist/docs/Modules.rst Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/docs/Modules.rst Mon May 29 16:25:46 2017 (r319142) @@ -413,6 +413,9 @@ altivec blocks The "blocks" language feature is available. +coroutines + Support for the coroutines TS is available. + cplusplus C++ support is available. Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang-c/Index.h Mon May 29 16:25:46 2017 (r319142) @@ -32,7 +32,7 @@ * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable. */ #define CINDEX_VERSION_MAJOR 0 -#define CINDEX_VERSION_MINOR 39 +#define CINDEX_VERSION_MINOR 40 #define CINDEX_VERSION_ENCODE(major, minor) ( \ ((major) * 10000) \ @@ -3076,7 +3076,52 @@ enum CXTypeKind { * * E.g., struct S, or via a qualified name, e.g., N::M::type, or both. */ - CXType_Elaborated = 119 + CXType_Elaborated = 119, + + /* OpenCL PipeType. */ + CXType_Pipe = 120, + + /* OpenCL builtin types. */ + CXType_OCLImage1dRO = 121, + CXType_OCLImage1dArrayRO = 122, + CXType_OCLImage1dBufferRO = 123, + CXType_OCLImage2dRO = 124, + CXType_OCLImage2dArrayRO = 125, + CXType_OCLImage2dDepthRO = 126, + CXType_OCLImage2dArrayDepthRO = 127, + CXType_OCLImage2dMSAARO = 128, + CXType_OCLImage2dArrayMSAARO = 129, + CXType_OCLImage2dMSAADepthRO = 130, + CXType_OCLImage2dArrayMSAADepthRO = 131, + CXType_OCLImage3dRO = 132, + CXType_OCLImage1dWO = 133, + CXType_OCLImage1dArrayWO = 134, + CXType_OCLImage1dBufferWO = 135, + CXType_OCLImage2dWO = 136, + CXType_OCLImage2dArrayWO = 137, + CXType_OCLImage2dDepthWO = 138, + CXType_OCLImage2dArrayDepthWO = 139, + CXType_OCLImage2dMSAAWO = 140, + CXType_OCLImage2dArrayMSAAWO = 141, + CXType_OCLImage2dMSAADepthWO = 142, + CXType_OCLImage2dArrayMSAADepthWO = 143, + CXType_OCLImage3dWO = 144, + CXType_OCLImage1dRW = 145, + CXType_OCLImage1dArrayRW = 146, + CXType_OCLImage1dBufferRW = 147, + CXType_OCLImage2dRW = 148, + CXType_OCLImage2dArrayRW = 149, + CXType_OCLImage2dDepthRW = 150, + CXType_OCLImage2dArrayDepthRW = 151, + CXType_OCLImage2dMSAARW = 152, + CXType_OCLImage2dArrayMSAARW = 153, + CXType_OCLImage2dMSAADepthRW = 154, + CXType_OCLImage2dArrayMSAADepthRW = 155, + CXType_OCLImage3dRW = 156, + CXType_OCLSampler = 157, + CXType_OCLEvent = 158, + CXType_OCLQueue = 159, + CXType_OCLReserveID = 160 }; /** Modified: vendor/clang/dist/include/clang/AST/Expr.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Expr.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/AST/Expr.h Mon May 29 16:25:46 2017 (r319142) @@ -4284,6 +4284,9 @@ public: } Designator *getDesignator(unsigned Idx) { return &designators()[Idx]; } + const Designator *getDesignator(unsigned Idx) const { + return &designators()[Idx]; + } void setDesignators(const ASTContext &C, const Designator *Desigs, unsigned NumDesigs); Modified: vendor/clang/dist/include/clang/AST/StmtCXX.h ============================================================================== --- vendor/clang/dist/include/clang/AST/StmtCXX.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/AST/StmtCXX.h Mon May 29 16:25:46 2017 (r319142) @@ -308,7 +308,9 @@ class CoroutineBodyStmt final OnFallthrough, ///< Handler for control flow falling off the body. Allocate, ///< Coroutine frame memory allocation. Deallocate, ///< Coroutine frame memory deallocation. - ReturnValue, ///< Return value for thunk function. + ReturnValue, ///< Return value for thunk function: p.get_return_object(). + ResultDecl, ///< Declaration holding the result of get_return_object. + ReturnStmt, ///< Return statement for the thunk function. ReturnStmtOnAllocFailure, ///< Return statement if allocation failed. FirstParamMove ///< First offset for move construction of parameter copies. }; @@ -332,7 +334,9 @@ public: Stmt *OnFallthrough = nullptr; Expr *Allocate = nullptr; Expr *Deallocate = nullptr; - Stmt *ReturnValue = nullptr; + Expr *ReturnValue = nullptr; + Stmt *ResultDecl = nullptr; + Stmt *ReturnStmt = nullptr; Stmt *ReturnStmtOnAllocFailure = nullptr; ArrayRef ParamMoves; }; @@ -381,10 +385,11 @@ public: Expr *getDeallocate() const { return cast_or_null(getStoredStmts()[SubStmt::Deallocate]); } - Expr *getReturnValueInit() const { - return cast_or_null(getStoredStmts()[SubStmt::ReturnValue]); + return cast(getStoredStmts()[SubStmt::ReturnValue]); } + Stmt *getResultDecl() const { return getStoredStmts()[SubStmt::ResultDecl]; } + Stmt *getReturnStmt() const { return getStoredStmts()[SubStmt::ReturnStmt]; } Stmt *getReturnStmtOnAllocFailure() const { return getStoredStmts()[SubStmt::ReturnStmtOnAllocFailure]; } Modified: vendor/clang/dist/include/clang/Basic/Attr.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/Attr.td Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/Attr.td Mon May 29 16:25:46 2017 (r319142) @@ -149,6 +149,9 @@ class ExprArgument : Argument; +class NamedArgument : Argument; class TypeArgument : Argument; class UnsignedArgument : Argument; class VariadicUnsignedArgument : Argument; @@ -1819,14 +1822,14 @@ def Unavailable : InheritableAttr { def DiagnoseIf : InheritableAttr { let Spellings = [GNU<"diagnose_if">]; - let Subjects = SubjectList<[Function]>; + let Subjects = SubjectList<[Function, ObjCMethod, ObjCProperty]>; let Args = [ExprArgument<"Cond">, StringArgument<"Message">, EnumArgument<"DiagnosticType", "DiagnosticType", ["error", "warning"], ["DT_Error", "DT_Warning"]>, BoolArgument<"ArgDependent", 0, /*fake*/ 1>, - FunctionArgument<"Parent", 0, /*fake*/ 1>]; + NamedArgument<"Parent", 0, /*fake*/ 1>]; let DuplicatesAllowedWhileMerging = 1; let LateParsed = 1; let AdditionalMembers = [{ Modified: vendor/clang/dist/include/clang/Basic/BuiltinsAMDGPU.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/BuiltinsAMDGPU.def Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/BuiltinsAMDGPU.def Mon May 29 16:25:46 2017 (r319142) @@ -36,6 +36,7 @@ BUILTIN(__builtin_amdgcn_workitem_id_z, // Instruction builtins. //===----------------------------------------------------------------------===// BUILTIN(__builtin_amdgcn_s_getreg, "UiIi", "n") +BUILTIN(__builtin_amdgcn_s_getpc, "LUi", "n") BUILTIN(__builtin_amdgcn_s_waitcnt, "vIi", "n") BUILTIN(__builtin_amdgcn_s_sendmsg, "vIiUi", "n") BUILTIN(__builtin_amdgcn_s_sendmsghalt, "vIiUi", "n") Modified: vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def Mon May 29 16:25:46 2017 (r319142) @@ -420,6 +420,9 @@ BUILTIN(__builtin_vsx_xvtstdcsp, "V4UiV4 BUILTIN(__builtin_vsx_insertword, "V16UcV4UiV16UcIi", "") BUILTIN(__builtin_vsx_extractuword, "V2ULLiV16UcIi", "") +BUILTIN(__builtin_vsx_xxpermdi, "v.", "t") +BUILTIN(__builtin_vsx_xxsldwi, "v.", "t") + // HTM builtins BUILTIN(__builtin_tbegin, "UiUIi", "") BUILTIN(__builtin_tend, "UiUIi", "") Modified: vendor/clang/dist/include/clang/Basic/BuiltinsX86.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/BuiltinsX86.def Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/BuiltinsX86.def Mon May 29 16:25:46 2017 (r319142) @@ -1107,6 +1107,9 @@ TARGET_BUILTIN(__builtin_ia32_vpconflict TARGET_BUILTIN(__builtin_ia32_vplzcntd_512_mask, "V16iV16iV16iUs", "", "avx512cd") TARGET_BUILTIN(__builtin_ia32_vplzcntq_512_mask, "V8LLiV8LLiV8LLiUc", "", "avx512cd") +TARGET_BUILTIN(__builtin_ia32_vpopcntd_512, "V16iV16i", "", "avx512vpopcntdq") +TARGET_BUILTIN(__builtin_ia32_vpopcntq_512, "V8LLiV8LLi", "", "avx512vpopcntdq") + TARGET_BUILTIN(__builtin_ia32_vpermi2varhi128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw") TARGET_BUILTIN(__builtin_ia32_vpermi2varhi256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw") TARGET_BUILTIN(__builtin_ia32_vpermt2varhi128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw") Modified: vendor/clang/dist/include/clang/Basic/DiagnosticOptions.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticOptions.def Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/DiagnosticOptions.def Mon May 29 16:25:46 2017 (r319142) @@ -87,6 +87,8 @@ VALUE_DIAGOPT(TemplateBacktraceLimit, 32 VALUE_DIAGOPT(ConstexprBacktraceLimit, 32, DefaultConstexprBacktraceLimit) /// Limit number of times to perform spell checking. VALUE_DIAGOPT(SpellCheckingLimit, 32, DefaultSpellCheckingLimit) +/// Limit number of lines shown in a snippet. +VALUE_DIAGOPT(SnippetLineLimit, 32, DefaultSnippetLineLimit) VALUE_DIAGOPT(TabStop, 32, DefaultTabStop) /// The distance between tab stops. /// Column limit for formatting message diagnostics, or 0 if unused. Modified: vendor/clang/dist/include/clang/Basic/DiagnosticOptions.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticOptions.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/DiagnosticOptions.h Mon May 29 16:25:46 2017 (r319142) @@ -63,11 +63,15 @@ public: enum TextDiagnosticFormat { Clang, MSVC, Vi }; // Default values. - enum { DefaultTabStop = 8, MaxTabStop = 100, + enum { + DefaultTabStop = 8, + MaxTabStop = 100, DefaultMacroBacktraceLimit = 6, DefaultTemplateBacktraceLimit = 10, DefaultConstexprBacktraceLimit = 10, - DefaultSpellCheckingLimit = 50 }; + DefaultSpellCheckingLimit = 50, + DefaultSnippetLineLimit = 1, + }; // Define simple diagnostic options (with no accessors). #define DIAGOPT(Name, Bits, Default) unsigned Name : Bits; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Mon May 29 16:25:46 2017 (r319142) @@ -537,10 +537,10 @@ def err_maybe_falloff_nonvoid_block : Er def err_falloff_nonvoid_block : Error< "control reaches end of non-void block">; def warn_maybe_falloff_nonvoid_coroutine : Warning< - "control may reach end of non-void coroutine">, + "control may reach end of coroutine; which is undefined behavior because the promise type %0 does not declare 'return_void()'">, InGroup; def warn_falloff_nonvoid_coroutine : Warning< - "control reaches end of non-void coroutine">, + "control reaches end of coroutine; which is undefined behavior because the promise type %0 does not declare 'return_void()'">, InGroup; def warn_suggest_noreturn_function : Warning< "%select{function|method}0 %1 could be declared with attribute 'noreturn'">, @@ -1554,11 +1554,9 @@ def note_ivar_decl : Note<"instance vari def note_bitfield_decl : Note<"bit-field is declared here">; def note_implicit_param_decl : Note<"%0 is an implicit parameter">; def note_member_synthesized_at : Note< - "implicit %select{default constructor|copy constructor|move constructor|copy " - "assignment operator|move assignment operator|destructor}0 for %1 first " - "required here">; -def note_inhctor_synthesized_at : Note< - "inherited constructor for %0 first required here">; + "in implicit %select{default constructor|copy constructor|move constructor|" + "copy assignment operator|move assignment operator|destructor}0 for %1 " + "first required here">; def err_missing_default_ctor : Error< "%select{constructor for %1 must explicitly initialize the|" "implicit default constructor for %1 must explicitly initialize the|" @@ -2769,6 +2767,7 @@ def warn_attribute_wrong_decl_type : War "|types and namespaces" "|Objective-C interfaces" "|methods and properties" + "|functions, methods, and properties" "|struct or union" "|struct, union or class" "|types" @@ -2883,6 +2882,10 @@ def warn_partial_message : Warning<"%0 i def warn_partial_fwdclass_message : Warning< "%0 may be partial because the receiver type is unknown">, InGroup, DefaultIgnore; +def warn_at_available_unchecked_use : Warning< + "%select{@available|__builtin_available}0 does not guard availability here; " + "use if (%select{@available|__builtin_available}0) instead">, + InGroup>; // Thread Safety Attributes def warn_invalid_capability_name : Warning< @@ -6298,6 +6301,8 @@ def warn_ambiguous_suitable_delete_funct InGroup>; def note_member_declared_here : Note< "member %0 declared here">; +def note_member_first_declared_here : Note< + "member %0 first declared here">; def err_decrement_bool : Error<"cannot decrement expression of type bool">; def warn_increment_bool : Warning< "incrementing expression of type bool is deprecated and " @@ -8009,10 +8014,13 @@ def err_block_on_nonlocal : Error< def err_block_on_vm : Error< "__block attribute not allowed on declaration with a variably modified type">; -def err_shufflevector_non_vector : Error< - "first two arguments to __builtin_shufflevector must be vectors">; -def err_shufflevector_incompatible_vector : Error< - "first two arguments to __builtin_shufflevector must have the same type">; +def err_vec_builtin_non_vector : Error< + "first two arguments to %0 must be vectors">; +def err_vec_builtin_incompatible_vector : Error< + "first two arguments to %0 must have the same type">; +def err_vsx_builtin_nonconstant_argument : Error< + "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">; + def err_shufflevector_nonconstant_argument : Error< "index for __builtin_shufflevector must be a constant integer">; def err_shufflevector_argument_too_large : Error< @@ -8899,8 +8907,6 @@ def note_equivalent_internal_linkage_dec def note_redefinition_modules_same_file : Note< "'%0' included multiple times, additional include site in header from module '%1'">; -def note_redefinition_modules_same_file_modulemap : Note< - "consider adding '%0' as part of '%1' definition">; def note_redefinition_include_same_file : Note< "'%0' included multiple times, additional include site here">; } @@ -8944,8 +8950,10 @@ def err_coroutine_promise_type_incomplet def err_coroutine_type_missing_specialization : Error< "this function cannot be a coroutine: missing definition of " "specialization %q0">; -def err_coroutine_promise_return_ill_formed : Error< - "%0 declares both 'return_value' and 'return_void'">; +def err_coroutine_promise_incompatible_return_functions : Error< + "the coroutine promise type %0 declares both 'return_value' and 'return_void'">; +def err_coroutine_promise_requires_return_function : Error< + "the coroutine promise type %0 must declare either 'return_value' or 'return_void'">; def note_coroutine_promise_implicit_await_transform_required_here : Note< "call to 'await_transform' implicitly required by 'co_await' here">; def note_coroutine_promise_suspend_implicitly_required : Note< @@ -8958,11 +8966,19 @@ def warn_coroutine_promise_unhandled_exc InGroup; def err_coroutine_promise_get_return_object_on_allocation_failure : Error< "%0: 'get_return_object_on_allocation_failure()' must be a static member function">; +def err_seh_in_a_coroutine_with_cxx_exceptions : Error< + "cannot use SEH '__try' in a coroutine when C++ exceptions are enabled">; def err_coroutine_promise_new_requires_nothrow : Error< "%0 is required to have a non-throwing noexcept specification when the promise " "type declares 'get_return_object_on_allocation_failure()'">; def note_coroutine_promise_call_implicitly_required : Note< "call to %0 implicitly required by coroutine function here">; +def err_await_suspend_invalid_return_type : Error< + "the return type of 'await_suspend' is required to be 'void' or 'bool' (have %0)" +>; +def note_await_ready_no_bool_conversion : Note< + "the return type of 'await_ready' is required to be contextually convertible to 'bool'" +>; } let CategoryName = "Documentation Issue" in { Modified: vendor/clang/dist/include/clang/Basic/SourceManager.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/SourceManager.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/SourceManager.h Mon May 29 16:25:46 2017 (r319142) @@ -1399,10 +1399,9 @@ public: /// specified by Loc. /// /// If FilenameID is -1, it is considered to be unspecified. - void AddLineNote(SourceLocation Loc, unsigned LineNo, int FilenameID); void AddLineNote(SourceLocation Loc, unsigned LineNo, int FilenameID, bool IsFileEntry, bool IsFileExit, - bool IsSystemHeader, bool IsExternCHeader); + SrcMgr::CharacteristicKind FileKind); /// \brief Determine if the source manager has a line table. bool hasLineTable() const { return LineTable != nullptr; } Modified: vendor/clang/dist/include/clang/Basic/SourceManagerInternals.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/SourceManagerInternals.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/SourceManagerInternals.h Mon May 29 16:25:46 2017 (r319142) @@ -102,8 +102,6 @@ public: unsigned getNumFilenames() const { return FilenamesByID.size(); } void AddLineNote(FileID FID, unsigned Offset, - unsigned LineNo, int FilenameID); - void AddLineNote(FileID FID, unsigned Offset, unsigned LineNo, int FilenameID, unsigned EntryExit, SrcMgr::CharacteristicKind FileKind); Modified: vendor/clang/dist/include/clang/Basic/TemplateKinds.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/TemplateKinds.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/TemplateKinds.h Mon May 29 16:25:46 2017 (r319142) @@ -26,13 +26,21 @@ enum TemplateNameKind { TNK_Function_template, /// The name refers to a template whose specialization produces a /// type. The template itself could be a class template, template - /// template parameter, or C++0x template alias. + /// template parameter, or template alias. TNK_Type_template, /// The name refers to a variable template whose specialization produces a /// variable. TNK_Var_template, - /// The name refers to a dependent template name. Whether the - /// template name is assumed to refer to a type template or a + /// The name refers to a dependent template name: + /// \code + /// template struct apply2 { + /// typedef typename MetaFun::template apply::type type; + /// }; + /// \endcode + /// + /// Here, "apply" is a dependent template name within the typename + /// specifier in the typedef. "apply" is a nested template, and + /// whether the template name is assumed to refer to a type template or a /// function template depends on the context in which the template /// name occurs. TNK_Dependent_template_name Modified: vendor/clang/dist/include/clang/Basic/XRayLists.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/XRayLists.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Basic/XRayLists.h Mon May 29 16:25:46 2017 (r319142) @@ -37,6 +37,7 @@ public: NONE, ALWAYS, NEVER, + ALWAYS_ARG1, }; ImbueAttribute shouldImbueFunction(StringRef FunctionName) const; Modified: vendor/clang/dist/include/clang/Driver/CC1Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/CC1Options.td Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Driver/CC1Options.td Mon May 29 16:25:46 2017 (r319142) @@ -172,6 +172,8 @@ def disable_llvm_optzns : Flag<["-"], "d def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">, HelpText<"Disable lifetime-markers emission even when optimizations are " "enabled">; +def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">, + HelpText<"Disable adding the optnone attribute to functions at O0">; def disable_red_zone : Flag<["-"], "disable-red-zone">, HelpText<"Do not emit code that uses the red zone.">; def dwarf_column_info : Flag<["-"], "dwarf-column-info">, @@ -359,6 +361,9 @@ def fconstexpr_backtrace_limit : Separat HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">; def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"">, HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">; +def fcaret_diagnostics_max_lines : + Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"">, + HelpText<"Set the maximum number of source lines to show in a caret diagnostic">; def fmessage_length : Separate<["-"], "fmessage-length">, MetaVarName<"">, HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">; def verify : Flag<["-"], "verify">, Modified: vendor/clang/dist/include/clang/Driver/Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/Options.td Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Driver/Options.td Mon May 29 16:25:46 2017 (r319142) @@ -469,6 +469,7 @@ def arch__errors__fatal : Flag<["-"], "a def arch : Separate<["-"], "arch">, Flags<[DriverOption]>; def arch__only : Separate<["-"], "arch_only">; def a : Joined<["-"], "a">; +def autocomplete : Joined<["--"], "autocomplete=">; def bind__at__load : Flag<["-"], "bind_at_load">; def bundle__loader : Separate<["-"], "bundle_loader">; def bundle : Flag<["-"], "bundle">; @@ -1740,6 +1741,7 @@ def mno_avx : Flag<["-"], "mno-avx">, Gr def mno_avx2 : Flag<["-"], "mno-avx2">, Group; def mno_avx512f : Flag<["-"], "mno-avx512f">, Group; def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group; +def mno_avx512vpopcntdq : Flag<["-"], "mno-avx512vpopcntdq">, Group; def mno_avx512er : Flag<["-"], "mno-avx512er">, Group; def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group; def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group; @@ -1940,6 +1942,7 @@ def mavx : Flag<["-"], "mavx">, Group, Group; def mavx512f : Flag<["-"], "mavx512f">, Group; def mavx512cd : Flag<["-"], "mavx512cd">, Group; +def mavx512vpopcntdq : Flag<["-"], "mavx512vpopcntdq">, Group; def mavx512er : Flag<["-"], "mavx512er">, Group; def mavx512pf : Flag<["-"], "mavx512pf">, Group; def mavx512dq : Flag<["-"], "mavx512dq">, Group; Modified: vendor/clang/dist/include/clang/Format/Format.h ============================================================================== --- vendor/clang/dist/include/clang/Format/Format.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Format/Format.h Mon May 29 16:25:46 2017 (r319142) @@ -710,16 +710,35 @@ struct FormatStyle { /// \endcode bool BreakBeforeTernaryOperators; - /// \brief Always break constructor initializers before commas and align - /// the commas with the colon. - /// \code - /// true: false: - /// SomeClass::Constructor() vs. SomeClass::Constructor() : a(a), - /// : a(a) b(b), - /// , b(b) c(c) {} - /// , c(c) {} - /// \endcode - bool BreakConstructorInitializersBeforeComma; + /// \brief Different ways to break initializers. + enum BreakConstructorInitializersStyle + { + /// Break constructor initializers before the colon and after the commas. + /// \code + /// Constructor() + /// : initializer1(), + /// initializer2() + /// \endcode + BCIS_BeforeColon, + /// Break constructor initializers before the colon and commas, and align + /// the commas with the colon. + /// \code + /// Constructor() + /// : initializer1() + /// , initializer2() + /// \endcode + BCIS_BeforeComma, + /// Break constructor initializers after the colon and commas. + /// \code + /// Constructor() : + /// initializer1(), + /// initializer2() + /// \endcode + BCIS_AfterColon + }; + + /// \brief The constructor initializers style to use.. + BreakConstructorInitializersStyle BreakConstructorInitializers; /// \brief Break after each annotation on a field in Java files. /// \code{.java} @@ -1390,8 +1409,7 @@ struct FormatStyle { BreakBeforeBinaryOperators == R.BreakBeforeBinaryOperators && BreakBeforeBraces == R.BreakBeforeBraces && BreakBeforeTernaryOperators == R.BreakBeforeTernaryOperators && - BreakConstructorInitializersBeforeComma == - R.BreakConstructorInitializersBeforeComma && + BreakConstructorInitializers == R.BreakConstructorInitializers && BreakAfterJavaFieldAnnotations == R.BreakAfterJavaFieldAnnotations && BreakStringLiterals == R.BreakStringLiterals && ColumnLimit == R.ColumnLimit && CommentPragmas == R.CommentPragmas && Modified: vendor/clang/dist/include/clang/Frontend/ASTUnit.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/ASTUnit.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Frontend/ASTUnit.h Mon May 29 16:25:46 2017 (r319142) @@ -59,6 +59,10 @@ class TargetInfo; class FrontendAction; class ASTDeserializationListener; +namespace vfs { +class FileSystem; +} + /// \brief Utility class for loading a ASTContext from an AST file. /// class ASTUnit : public ModuleLoader { @@ -420,7 +424,8 @@ private: explicit ASTUnit(bool MainFileIsAST); bool Parse(std::shared_ptr PCHContainerOps, - std::unique_ptr OverrideMainBuffer); + std::unique_ptr OverrideMainBuffer, + IntrusiveRefCntPtr VFS); struct ComputedPreamble { llvm::MemoryBuffer *Buffer; @@ -434,11 +439,13 @@ private: PreambleEndsAtStartOfLine(PreambleEndsAtStartOfLine) {} }; ComputedPreamble ComputePreamble(CompilerInvocation &Invocation, - unsigned MaxLines); + unsigned MaxLines, + IntrusiveRefCntPtr VFS); std::unique_ptr getMainBufferWithPrecompiledPreamble( std::shared_ptr PCHContainerOps, - const CompilerInvocation &PreambleInvocationIn, bool AllowRebuild = true, + const CompilerInvocation &PreambleInvocationIn, + IntrusiveRefCntPtr VFS, bool AllowRebuild = true, unsigned MaxLines = 0); void RealizeTopLevelDeclsFromPreamble(); @@ -731,11 +738,17 @@ private: /// of this translation unit should be precompiled, to improve the performance /// of reparsing. Set to zero to disable preambles. /// + /// \param VFS - A vfs::FileSystem to be used for all file accesses. Note that + /// preamble is saved to a temporary directory on a RealFileSystem, so in order + /// for it to be loaded correctly, VFS should have access to it(i.e., be an + /// overlay over RealFileSystem). + /// /// \returns \c true if a catastrophic failure occurred (which means that the /// \c ASTUnit itself is invalid), or \c false otherwise. bool LoadFromCompilerInvocation( std::shared_ptr PCHContainerOps, - unsigned PrecompilePreambleAfterNParses); + unsigned PrecompilePreambleAfterNParses, + IntrusiveRefCntPtr VFS); public: @@ -826,6 +839,11 @@ public: /// (e.g. because the PCH could not be loaded), this accepts the ASTUnit /// mainly to allow the caller to see the diagnostics. /// + /// \param VFS - A vfs::FileSystem to be used for all file accesses. Note that + /// preamble is saved to a temporary directory on a RealFileSystem, so in order + /// for it to be loaded correctly, VFS should have access to it(i.e., be an + /// overlay over RealFileSystem). RealFileSystem will be used if \p VFS is nullptr. + /// // FIXME: Move OnlyLocalDecls, UseBumpAllocator to setters on the ASTUnit, we // shouldn't need to specify them at construction time. static ASTUnit *LoadFromCommandLine( @@ -842,15 +860,23 @@ public: bool AllowPCHWithCompilerErrors = false, bool SkipFunctionBodies = false, bool UserFilesAreVolatile = false, bool ForSerialization = false, llvm::Optional ModuleFormat = llvm::None, - std::unique_ptr *ErrAST = nullptr); + std::unique_ptr *ErrAST = nullptr, + IntrusiveRefCntPtr VFS = nullptr); /// \brief Reparse the source files using the same command-line options that /// were originally used to produce this translation unit. /// + /// \param VFS - A vfs::FileSystem to be used for all file accesses. Note that + /// preamble is saved to a temporary directory on a RealFileSystem, so in order + /// for it to be loaded correctly, VFS should give an access to this(i.e. be an + /// overlay over RealFileSystem). FileMgr->getVirtualFileSystem() will be used if + /// \p VFS is nullptr. + /// /// \returns True if a failure occurred that causes the ASTUnit not to /// contain any translation-unit information, false otherwise. bool Reparse(std::shared_ptr PCHContainerOps, - ArrayRef RemappedFiles = None); + ArrayRef RemappedFiles = None, + IntrusiveRefCntPtr VFS = nullptr); /// \brief Perform code completion at the given file, line, and /// column within this translation unit. Modified: vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def ============================================================================== --- vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def Mon May 29 16:25:46 2017 (r319142) @@ -53,6 +53,7 @@ CODEGENOPT(DisableLLVMPasses , 1, 0) /// ///< the pristine IR generated by the ///< frontend. CODEGENOPT(DisableLifetimeMarkers, 1, 0) ///< Don't emit any lifetime markers +CODEGENOPT(DisableO0ImplyOptNone , 1, 0) ///< Don't annonate function with optnone at O0 CODEGENOPT(ExperimentalNewPassManager, 1, 0) ///< Enables the new, experimental ///< pass manager. CODEGENOPT(DisableRedZone , 1, 0) ///< Set when -mno-red-zone is enabled. Modified: vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h Mon May 29 16:25:46 2017 (r319142) @@ -225,6 +225,11 @@ IntrusiveRefCntPtr createVFSFromCompilerInvocation(const CompilerInvocation &CI, DiagnosticsEngine &Diags); +IntrusiveRefCntPtr +createVFSFromCompilerInvocation(const CompilerInvocation &CI, + DiagnosticsEngine &Diags, + IntrusiveRefCntPtr BaseFS); + } // end namespace clang #endif Modified: vendor/clang/dist/include/clang/Lex/ModuleMap.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/ModuleMap.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Lex/ModuleMap.h Mon May 29 16:25:46 2017 (r319142) @@ -257,6 +257,23 @@ private: /// resolved. Module *resolveModuleId(const ModuleId &Id, Module *Mod, bool Complain) const; + /// Resolve the given header directive to an actual header file. + /// + /// \param M The module in which we're resolving the header directive. + /// \param Header The header directive to resolve. + /// \param RelativePathName Filled in with the relative path name from the + /// module to the resolved header. + /// \return The resolved file, if any. + const FileEntry *resolveHeader(Module *M, + Module::UnresolvedHeaderDirective Header, + SmallVectorImpl &RelativePathName); + + /// Attempt to resolve the specified header directive as naming a builtin + /// header. + const FileEntry * + resolveAsBuiltinHeader(Module *M, Module::UnresolvedHeaderDirective Header, + SmallVectorImpl &BuiltinPathName); + /// \brief Looks up the modules that \p File corresponds to. /// /// If \p File represents a builtin header within Clang's builtin include Modified: vendor/clang/dist/include/clang/Sema/AttributeList.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/AttributeList.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Sema/AttributeList.h Mon May 29 16:25:46 2017 (r319142) @@ -915,6 +915,7 @@ enum AttributeDeclKind { ExpectedTypeOrNamespace, ExpectedObjectiveCInterface, ExpectedMethodOrProperty, + ExpectedFunctionOrMethodOrProperty, ExpectedStructOrUnion, ExpectedStructOrUnionOrClass, ExpectedType, Modified: vendor/clang/dist/include/clang/Sema/ParsedTemplate.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/ParsedTemplate.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Sema/ParsedTemplate.h Mon May 29 16:25:46 2017 (r319142) @@ -145,12 +145,15 @@ namespace clang { /// expressions, or template names, and the source locations for important /// tokens. All of the information about template arguments is allocated /// directly after this structure. - struct TemplateIdAnnotation { + struct TemplateIdAnnotation final + : private llvm::TrailingObjects { + friend TrailingObjects; /// \brief The nested-name-specifier that precedes the template name. CXXScopeSpec SS; - /// TemplateKWLoc - The location of the template keyword within the - /// source. + /// TemplateKWLoc - The location of the template keyword. + /// For e.g. typename T::template Y SourceLocation TemplateKWLoc; /// TemplateNameLoc - The location of the template name within the @@ -183,34 +186,56 @@ namespace clang { /// \brief Retrieves a pointer to the template arguments ParsedTemplateArgument *getTemplateArgs() { - return reinterpret_cast(this + 1); + return getTrailingObjects(); } /// \brief Creates a new TemplateIdAnnotation with NumArgs arguments and /// appends it to List. static TemplateIdAnnotation * - Allocate(unsigned NumArgs, SmallVectorImpl &List) { - TemplateIdAnnotation *TemplateId - = (TemplateIdAnnotation *)std::malloc(sizeof(TemplateIdAnnotation) + - sizeof(ParsedTemplateArgument) * NumArgs); - TemplateId->NumArgs = NumArgs; - - // Default-construct nested-name-specifier. - new (&TemplateId->SS) CXXScopeSpec(); - - // Default-construct parsed template arguments. - ParsedTemplateArgument *TemplateArgs = TemplateId->getTemplateArgs(); - for (unsigned I = 0; I != NumArgs; ++I) - new (TemplateArgs + I) ParsedTemplateArgument(); - - List.push_back(TemplateId); + Create(CXXScopeSpec SS, SourceLocation TemplateKWLoc, + SourceLocation TemplateNameLoc, IdentifierInfo *Name, + OverloadedOperatorKind OperatorKind, + ParsedTemplateTy OpaqueTemplateName, TemplateNameKind TemplateKind, + SourceLocation LAngleLoc, SourceLocation RAngleLoc, + ArrayRef TemplateArgs, + SmallVectorImpl &CleanupList) { + + TemplateIdAnnotation *TemplateId = new (std::malloc( + totalSizeToAlloc(TemplateArgs.size()))) + TemplateIdAnnotation(SS, TemplateKWLoc, TemplateNameLoc, Name, + OperatorKind, OpaqueTemplateName, TemplateKind, + LAngleLoc, RAngleLoc, TemplateArgs); + CleanupList.push_back(TemplateId); return TemplateId; } - - void Destroy() { - SS.~CXXScopeSpec(); + + void Destroy() { + std::for_each( + getTemplateArgs(), getTemplateArgs() + NumArgs, + [](ParsedTemplateArgument &A) { A.~ParsedTemplateArgument(); }); + this->~TemplateIdAnnotation(); free(this); } + private: + TemplateIdAnnotation(const TemplateIdAnnotation &) = delete; + + TemplateIdAnnotation(CXXScopeSpec SS, SourceLocation TemplateKWLoc, + SourceLocation TemplateNameLoc, IdentifierInfo *Name, + OverloadedOperatorKind OperatorKind, + ParsedTemplateTy OpaqueTemplateName, + TemplateNameKind TemplateKind, + SourceLocation LAngleLoc, SourceLocation RAngleLoc, + ArrayRef TemplateArgs) noexcept + : SS(SS), TemplateKWLoc(TemplateKWLoc), + TemplateNameLoc(TemplateNameLoc), Name(Name), Operator(OperatorKind), + Template(OpaqueTemplateName), Kind(TemplateKind), + LAngleLoc(LAngleLoc), RAngleLoc(RAngleLoc), + NumArgs(TemplateArgs.size()) { + + std::uninitialized_copy(TemplateArgs.begin(), TemplateArgs.end(), + getTemplateArgs()); + } + ~TemplateIdAnnotation() = default; }; /// Retrieves the range of the given template parameter lists. Modified: vendor/clang/dist/include/clang/Sema/ScopeInfo.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/ScopeInfo.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Sema/ScopeInfo.h Mon May 29 16:25:46 2017 (r319142) @@ -388,6 +388,8 @@ public: (HasBranchProtectedScope && HasBranchIntoScope)); } + bool isCoroutine() const { return !FirstCoroutineStmtLoc.isInvalid(); } + void setFirstCoroutineStmt(SourceLocation Loc, StringRef Keyword) { assert(FirstCoroutineStmtLoc.isInvalid() && "first coroutine statement location already set"); Modified: vendor/clang/dist/include/clang/Sema/Sema.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Sema.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Sema/Sema.h Mon May 29 16:25:46 2017 (r319142) @@ -689,17 +689,37 @@ public: class SynthesizedFunctionScope { Sema &S; Sema::ContextRAII SavedContext; + bool PushedCodeSynthesisContext = false; public: SynthesizedFunctionScope(Sema &S, DeclContext *DC) - : S(S), SavedContext(S, DC) - { + : S(S), SavedContext(S, DC) { S.PushFunctionScope(); S.PushExpressionEvaluationContext( Sema::ExpressionEvaluationContext::PotentiallyEvaluated); + if (auto *FD = dyn_cast(DC)) + FD->setWillHaveBody(true); + else + assert(isa(DC)); + } + + void addContextNote(SourceLocation UseLoc) { + assert(!PushedCodeSynthesisContext); + + Sema::CodeSynthesisContext Ctx; + Ctx.Kind = Sema::CodeSynthesisContext::DefiningSynthesizedFunction; + Ctx.PointOfInstantiation = UseLoc; + Ctx.Entity = cast(S.CurContext); + S.pushCodeSynthesisContext(Ctx); + + PushedCodeSynthesisContext = true; } ~SynthesizedFunctionScope() { + if (PushedCodeSynthesisContext) + S.popCodeSynthesisContext(); + if (auto *FD = dyn_cast(S.CurContext)) + FD->setWillHaveBody(false); S.PopExpressionEvaluationContext(); S.PopFunctionScopeInfo(); } @@ -2727,7 +2747,7 @@ public: /// of a function. /// /// Returns true if any errors were emitted. - bool diagnoseArgIndependentDiagnoseIfAttrs(const FunctionDecl *Function, + bool diagnoseArgIndependentDiagnoseIfAttrs(const NamedDecl *ND, SourceLocation Loc); /// Returns whether the given function's address can be taken or not, @@ -6974,6 +6994,10 @@ public: /// We are declaring an implicit special member function. DeclaringSpecialMember, + + /// We are defining a synthesized function (such as a defaulted special + /// member). + DefiningSynthesizedFunction, } Kind; /// \brief Was the enclosing context a non-instantiation SFINAE context? @@ -10121,6 +10145,7 @@ private: bool SemaBuiltinVAStartARM(CallExpr *Call); bool SemaBuiltinUnorderedCompare(CallExpr *TheCall); bool SemaBuiltinFPClassification(CallExpr *TheCall, unsigned NumArgs); + bool SemaBuiltinVSX(CallExpr *TheCall); bool SemaBuiltinOSLogFormat(CallExpr *TheCall); public: Modified: vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h ============================================================================== --- vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h Mon May 29 16:25:46 2017 (r319142) @@ -60,16 +60,6 @@ struct CompileCommand { /// The output file associated with the command. std::string Output; - - /// \brief An optional mapping from each file's path to its content for all - /// files needed for the compilation that are not available via the file - /// system. - /// - /// Note that a tool implementation is required to fall back to the file - /// system if a source file is not provided in the mapped sources, as - /// compilation databases will usually not provide all files in mapped sources - /// for performance reasons. - std::vector > MappedSources; }; /// \brief Interface for compilation databases. @@ -186,10 +176,11 @@ public: /// the number of arguments before "--", if "--" was found in the argument /// list. /// \param Argv Points to the command line arguments. + /// \param ErrorMsg Contains error text if the function returns null pointer. /// \param Directory The base directory used in the FixedCompilationDatabase. - static FixedCompilationDatabase *loadFromCommandLine(int &Argc, - const char *const *Argv, - Twine Directory = "."); + static std::unique_ptr loadFromCommandLine( + int &Argc, const char *const *Argv, std::string &ErrorMsg, + Twine Directory = "."); /// \brief Constructs a compilation data base from a specified directory /// and command line. Modified: vendor/clang/dist/lib/AST/DeclBase.cpp ============================================================================== --- vendor/clang/dist/lib/AST/DeclBase.cpp Mon May 29 16:25:32 2017 (r319141) +++ vendor/clang/dist/lib/AST/DeclBase.cpp Mon May 29 16:25:46 2017 (r319142) @@ -274,9 +274,17 @@ void Decl::setLexicalDeclContext(DeclCon } else { getMultipleDC()->LexicalDC = DC; } - Hidden = cast(DC)->Hidden; - if (Hidden && !isFromASTFile() && hasLocalOwningModuleStorage()) - setLocalOwningModule(cast(DC)->getOwningModule()); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 29 16:25:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F83CD777DC; Mon, 29 May 2017 16:25:55 +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 3322E80B49; Mon, 29 May 2017 16:25:55 +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 v4TGPsi3083101; Mon, 29 May 2017 16:25:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGPs40083100; Mon, 29 May 2017 16:25:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291625.v4TGPs40083100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319143 - vendor/clang/clang-trunk-r304149 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:25:55 -0000 Author: dim Date: Mon May 29 16:25:53 2017 New Revision: 319143 URL: https://svnweb.freebsd.org/changeset/base/319143 Log: Tag clang trunk r304149. Added: vendor/clang/clang-trunk-r304149/ - copied from r319142, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Mon May 29 16:26:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7F16D77840; Mon, 29 May 2017 16:26:03 +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 58DDD80C14; Mon, 29 May 2017 16:26:03 +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 v4TGQ2TF083207; Mon, 29 May 2017 16:26:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGPv8l083151; Mon, 29 May 2017 16:25:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291625.v4TGPv8l083151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319144 - in vendor/compiler-rt/dist: cmake lib/asan lib/asan/scripts lib/asan/tests lib/builtins lib/builtins/arm lib/lsan lib/sanitizer_common lib/sanitizer_common/tests lib/scudo lib... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:26:03 -0000 Author: dim Date: Mon May 29 16:25:57 2017 New Revision: 319144 URL: https://svnweb.freebsd.org/changeset/base/319144 Log: Vendor import of compiler-rt trunk r304149: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304149 Added: vendor/compiler-rt/dist/lib/builtins/bswapdi2.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/bswapsi2.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/preinstalled_signal.cc (contents, props changed) vendor/compiler-rt/dist/test/lsan/TestCases/many_tls_keys.cc (contents, props changed) Modified: vendor/compiler-rt/dist/cmake/base-config-ix.cmake vendor/compiler-rt/dist/cmake/builtin-config-ix.cmake vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/asan_win.cc vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup vendor/compiler-rt/dist/lib/asan/tests/asan_interface_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt vendor/compiler-rt/dist/lib/builtins/README.txt vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cdcmp.S vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cfcmp.S vendor/compiler-rt/dist/lib/builtins/arm/eqdf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/eqsf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/gedf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/gesf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/gtdf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/gtsf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/ledf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/lesf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/ltdf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/ltsf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/nedf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/nesf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/unorddf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/unordsf2vfp.S vendor/compiler-rt/dist/lib/builtins/assembly.h vendor/compiler-rt/dist/lib/lsan/lsan_common.cc vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc vendor/compiler-rt/dist/lib/lsan/lsan_flags.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_s390.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.cpp vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/allow_user_segv.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/current_allocated_bytes.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/wait.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/wait3.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/wait4.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/waitid.cc vendor/compiler-rt/dist/test/builtins/Unit/bswapdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/bswapsi2_test.c vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/negate-overflow.cpp Modified: vendor/compiler-rt/dist/cmake/base-config-ix.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/base-config-ix.cmake Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/cmake/base-config-ix.cmake Mon May 29 16:25:57 2017 (r319144) @@ -63,7 +63,9 @@ else() set(COMPILER_RT_TEST_COMPILER_ID GNU) endif() -string(TOLOWER ${CMAKE_SYSTEM_NAME} COMPILER_RT_OS_DIR) +if(NOT DEFINED COMPILER_RT_OS_DIR) + string(TOLOWER ${CMAKE_SYSTEM_NAME} COMPILER_RT_OS_DIR) +endif() set(COMPILER_RT_LIBRARY_OUTPUT_DIR ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) set(COMPILER_RT_LIBRARY_INSTALL_DIR Modified: vendor/compiler-rt/dist/cmake/builtin-config-ix.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/builtin-config-ix.cmake Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/cmake/builtin-config-ix.cmake Mon May 29 16:25:57 2017 (r319144) @@ -24,7 +24,7 @@ int foo(int x, int y) { set(ARM64 aarch64) -set(ARM32 arm armhf armv6m) +set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k) set(X86 i386 i686) set(X86_64 x86_64) set(MIPS32 mips mipsel) Modified: vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Mon May 29 16:25:57 2017 (r319144) @@ -357,28 +357,22 @@ DEFINE_REAL_PTHREAD_FUNCTIONS #if SANITIZER_ANDROID INTERCEPTOR(void*, bsd_signal, int signum, void *handler) { - if (!IsHandledDeadlySignal(signum) || - common_flags()->allow_user_segv_handler) { + if (GetHandleSignalMode(signum) != kHandleSignalExclusive) return REAL(bsd_signal)(signum, handler); - } return 0; } #endif INTERCEPTOR(void*, signal, int signum, void *handler) { - if (!IsHandledDeadlySignal(signum) || - common_flags()->allow_user_segv_handler) { + if (GetHandleSignalMode(signum) != kHandleSignalExclusive) return REAL(signal)(signum, handler); - } return nullptr; } INTERCEPTOR(int, sigaction, int signum, const struct sigaction *act, struct sigaction *oldact) { - if (!IsHandledDeadlySignal(signum) || - common_flags()->allow_user_segv_handler) { + if (GetHandleSignalMode(signum) != kHandleSignalExclusive) return REAL(sigaction)(signum, act, oldact); - } return 0; } Modified: vendor/compiler-rt/dist/lib/asan/asan_win.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_win.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/asan/asan_win.cc Mon May 29 16:25:57 2017 (r319144) @@ -80,7 +80,7 @@ static long WINAPI SEHHandler(EXCEPTION_ INTERCEPTOR_WINAPI(LPTOP_LEVEL_EXCEPTION_FILTER, SetUnhandledExceptionFilter, LPTOP_LEVEL_EXCEPTION_FILTER ExceptionFilter) { CHECK(REAL(SetUnhandledExceptionFilter)); - if (ExceptionFilter == &SEHHandler || common_flags()->allow_user_segv_handler) + if (ExceptionFilter == &SEHHandler) return REAL(SetUnhandledExceptionFilter)(ExceptionFilter); // We record the user provided exception handler to be called for all the // exceptions unhandled by asan. Modified: vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup ============================================================================== --- vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/asan/scripts/asan_device_setup Mon May 29 16:25:57 2017 (r319144) @@ -327,11 +327,6 @@ exec $_to \$@ EOF } -# On Android-L not allowing user segv handler breaks some applications. -if [[ PRE_L -eq 0 ]]; then - ASAN_OPTIONS="$ASAN_OPTIONS,allow_user_segv_handler=1" -fi - if [[ x$extra_options != x ]] ; then ASAN_OPTIONS="$ASAN_OPTIONS,$extra_options" fi Modified: vendor/compiler-rt/dist/lib/asan/tests/asan_interface_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/tests/asan_interface_test.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/asan/tests/asan_interface_test.cc Mon May 29 16:25:57 2017 (r319144) @@ -102,9 +102,6 @@ TEST(AddressSanitizerInterface, GetHeapS } } -#ifndef __powerpc64__ -// FIXME: This has not reliably worked on powerpc since r279664. Re-enable -// this once the problem is tracked down and fixed. static const size_t kManyThreadsMallocSizes[] = {5, 1UL<<10, 1UL<<14, 357}; static const size_t kManyThreadsIterations = 250; static const size_t kManyThreadsNumThreads = @@ -138,7 +135,6 @@ TEST(AddressSanitizerInterface, ManyThre // so we can't check for equality here. EXPECT_LT(after_test, before_test + (1UL<<20)); } -#endif static void DoDoubleFree() { int *x = Ident(new int); Modified: vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc Mon May 29 16:25:57 2017 (r319144) @@ -97,9 +97,6 @@ TEST(AddressSanitizer, NoInstMallocTest) MallocStress(ASAN_LOW_MEMORY ? 300000 : 1000000); } -#ifndef __powerpc64__ -// FIXME: This has not reliably worked on powerpc since r279664. Re-enable -// this once the problem is tracked down and fixed. TEST(AddressSanitizer, ThreadedMallocStressTest) { const int kNumThreads = 4; const int kNumIterations = (ASAN_LOW_MEMORY) ? 10000 : 100000; @@ -112,7 +109,6 @@ TEST(AddressSanitizer, ThreadedMallocStr PTHREAD_JOIN(t[i], 0); } } -#endif static void PrintShadow(const char *tag, uptr ptr, size_t size) { fprintf(stderr, "%s shadow: %lx size % 3ld: ", tag, (long)ptr, (long)size); @@ -210,10 +206,6 @@ void *ThreadedOneSizeMallocStress(void * return NULL; } -#ifndef __powerpc64__ -// FIXME: This has not reliably worked on powerpc since r279664. Re-enable -// this once the problem is tracked down and fixed. - TEST(AddressSanitizer, ThreadedOneSizeMallocStressTest) { const int kNumThreads = 4; pthread_t t[kNumThreads]; @@ -224,7 +216,6 @@ TEST(AddressSanitizer, ThreadedOneSizeMa PTHREAD_JOIN(t[i], 0); } } -#endif TEST(AddressSanitizer, ShadowRegionIsPoisonedTest) { using __asan::kHighMemEnd; Modified: vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc Mon May 29 16:25:57 2017 (r319144) @@ -251,7 +251,8 @@ TEST(AddressSanitizer, BitFieldNegativeT namespace { const char kSEGVCrash[] = "AddressSanitizer: SEGV on unknown address"; -const char kOverriddenHandler[] = "ASan signal handler has been overridden\n"; +const char kOverriddenSigactionHandler[] = "Test sigaction handler\n"; +const char kOverriddenSignalHandler[] = "Test signal handler\n"; TEST(AddressSanitizer, WildAddressTest) { char *c = (char*)0x123; @@ -259,12 +260,12 @@ TEST(AddressSanitizer, WildAddressTest) } void my_sigaction_sighandler(int, siginfo_t*, void*) { - fprintf(stderr, kOverriddenHandler); + fprintf(stderr, kOverriddenSigactionHandler); exit(1); } void my_signal_sighandler(int signum) { - fprintf(stderr, kOverriddenHandler); + fprintf(stderr, kOverriddenSignalHandler); exit(1); } @@ -273,16 +274,20 @@ TEST(AddressSanitizer, SignalTest) { memset(&sigact, 0, sizeof(sigact)); sigact.sa_sigaction = my_sigaction_sighandler; sigact.sa_flags = SA_SIGINFO; - // ASan should silently ignore sigaction()... + char *c = (char *)0x123; + + EXPECT_DEATH(*c = 0, kSEGVCrash); + + // ASan should allow to set sigaction()... EXPECT_EQ(0, sigaction(SIGSEGV, &sigact, 0)); #ifdef __APPLE__ EXPECT_EQ(0, sigaction(SIGBUS, &sigact, 0)); #endif - char *c = (char*)0x123; - EXPECT_DEATH(*c = 0, kSEGVCrash); + EXPECT_DEATH(*c = 0, kOverriddenSigactionHandler); + // ... and signal(). - EXPECT_EQ(0, signal(SIGSEGV, my_signal_sighandler)); - EXPECT_DEATH(*c = 0, kSEGVCrash); + EXPECT_NE(SIG_ERR, signal(SIGSEGV, my_signal_sighandler)); + EXPECT_DEATH(*c = 0, kOverriddenSignalHandler); } } // namespace #endif Modified: vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt Mon May 29 16:25:57 2017 (r319144) @@ -42,6 +42,8 @@ set(GENERIC_SOURCES ashlti3.c ashrdi3.c ashrti3.c + bswapdi2.c + bswapsi2.c clear_cache.c clzdi2.c clzsi2.c @@ -163,8 +165,7 @@ set(GENERIC_SOURCES udivti3.c umoddi3.c umodsi3.c - umodti3.c - emutls.c) + umodti3.c) set(GENERIC_TF_SOURCES comparetf2.c @@ -193,6 +194,7 @@ option(COMPILER_RT_EXCLUDE_ATOMIC_BUILTI if(NOT COMPILER_RT_BAREMETAL_BUILD) set(GENERIC_SOURCES ${GENERIC_SOURCES} + emutls.c enable_execute_stack.c) endif() Modified: vendor/compiler-rt/dist/lib/builtins/README.txt ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/README.txt Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/README.txt Mon May 29 16:25:57 2017 (r319144) @@ -57,8 +57,8 @@ si_int __popcountsi2(si_int a); // bit si_int __popcountdi2(di_int a); // bit population si_int __popcountti2(ti_int a); // bit population -uint32_t __bswapsi2(uint32_t a); // a byteswapped, arm only -uint64_t __bswapdi2(uint64_t a); // a byteswapped, arm only +uint32_t __bswapsi2(uint32_t a); // a byteswapped +uint64_t __bswapdi2(uint64_t a); // a byteswapped // Integral arithmetic Modified: vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cdcmp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cdcmp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cdcmp.S Mon May 29 16:25:57 2017 (r319144) @@ -48,7 +48,12 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cdcmp // NaN has been ruled out, so __aeabi_cdcmple can't trap bne __aeabi_cdcmple +#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) + mov ip, #APSR_C + msr APSR_nzcvq, ip +#else msr CPSR_f, #APSR_C +#endif JMP(lr) #endif END_COMPILERRT_FUNCTION(__aeabi_cdcmpeq) @@ -95,17 +100,23 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cdcmp lsls r0, r0, #31 pop {r0-r3, pc} #else + ITT(eq) moveq ip, #0 beq 1f ldm sp, {r0-r3} bl __aeabi_dcmpeq cmp r0, #1 + ITE(eq) moveq ip, #(APSR_C | APSR_Z) movne ip, #(APSR_C) 1: +#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) + msr APSR_nzcvq, ip +#else msr CPSR_f, ip +#endif pop {r0-r3} POP_PC() #endif Modified: vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cfcmp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cfcmp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/aeabi_cfcmp.S Mon May 29 16:25:57 2017 (r319144) @@ -48,7 +48,12 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmp // NaN has been ruled out, so __aeabi_cfcmple can't trap bne __aeabi_cfcmple +#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) + mov ip, #APSR_C + msr APSR_nzcvq, ip +#else msr CPSR_f, #APSR_C +#endif JMP(lr) #endif END_COMPILERRT_FUNCTION(__aeabi_cfcmpeq) @@ -95,17 +100,23 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmp lsls r0, r0, #31 pop {r0-r3, pc} #else + ITT(eq) moveq ip, #0 beq 1f ldm sp, {r0-r3} bl __aeabi_fcmpeq cmp r0, #1 + ITE(eq) moveq ip, #(APSR_C | APSR_Z) movne ip, #(APSR_C) 1: +#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) + msr APSR_nzcvq, ip +#else msr CPSR_f, ip +#endif pop {r0-r3} POP_PC() #endif Modified: vendor/compiler-rt/dist/lib/builtins/arm/eqdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/eqdf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/eqdf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__eqdf2vfp) vcmp.f64 d6, d7 #endif vmrs apsr_nzcv, fpscr + ITE(eq) moveq r0, #1 // set result register to 1 if equal movne r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/eqsf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/eqsf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/eqsf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2vfp) vcmp.f32 s14, s15 #endif vmrs apsr_nzcv, fpscr + ITE(eq) moveq r0, #1 // set result register to 1 if equal movne r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/gedf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/gedf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/gedf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__gedf2vfp) vcmp.f64 d6, d7 #endif vmrs apsr_nzcv, fpscr + ITE(ge) movge r0, #1 // set result register to 1 if greater than or equal movlt r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/gesf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/gesf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/gesf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__gesf2vfp) vcmp.f32 s14, s15 #endif vmrs apsr_nzcv, fpscr + ITE(ge) movge r0, #1 // set result register to 1 if greater than or equal movlt r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/gtdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/gtdf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/gtdf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__gtdf2vfp) vcmp.f64 d6, d7 #endif vmrs apsr_nzcv, fpscr + ITE(gt) movgt r0, #1 // set result register to 1 if equal movle r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/gtsf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/gtsf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/gtsf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__gtsf2vfp) vcmp.f32 s14, s15 #endif vmrs apsr_nzcv, fpscr + ITE(gt) movgt r0, #1 // set result register to 1 if equal movle r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/ledf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/ledf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/ledf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__ledf2vfp) vcmp.f64 d6, d7 #endif vmrs apsr_nzcv, fpscr + ITE(ls) movls r0, #1 // set result register to 1 if equal movhi r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/lesf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/lesf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/lesf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__lesf2vfp) vcmp.f32 s14, s15 #endif vmrs apsr_nzcv, fpscr + ITE(ls) movls r0, #1 // set result register to 1 if equal movhi r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/ltdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/ltdf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/ltdf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__ltdf2vfp) vcmp.f64 d6, d7 #endif vmrs apsr_nzcv, fpscr + ITE(mi) movmi r0, #1 // set result register to 1 if equal movpl r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/ltsf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/ltsf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/ltsf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__ltsf2vfp) vcmp.f32 s14, s15 #endif vmrs apsr_nzcv, fpscr + ITE(mi) movmi r0, #1 // set result register to 1 if equal movpl r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/nedf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/nedf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/nedf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__nedf2vfp) vcmp.f64 d6, d7 #endif vmrs apsr_nzcv, fpscr + ITE(ne) movne r0, #1 // set result register to 0 if unequal moveq r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/nesf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/nesf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/nesf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__nesf2vfp) vcmp.f32 s14, s15 #endif vmrs apsr_nzcv, fpscr + ITE(ne) movne r0, #1 // set result register to 1 if unequal moveq r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/unorddf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/unorddf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/unorddf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__unorddf2vfp vcmp.f64 d6, d7 #endif vmrs apsr_nzcv, fpscr + ITE(vs) movvs r0, #1 // set result register to 1 if "overflow" (any NaNs) movvc r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/arm/unordsf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/unordsf2vfp.S Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/arm/unordsf2vfp.S Mon May 29 16:25:57 2017 (r319144) @@ -27,6 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__unordsf2vfp vcmp.f32 s14, s15 #endif vmrs apsr_nzcv, fpscr + ITE(vs) movvs r0, #1 // set result register to 1 if "overflow" (any NaNs) movvc r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/builtins/assembly.h ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/assembly.h Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/builtins/assembly.h Mon May 29 16:25:57 2017 (r319144) @@ -96,9 +96,11 @@ #if __ARM_ARCH_ISA_THUMB == 2 #define IT(cond) it cond #define ITT(cond) itt cond +#define ITE(cond) ite cond #else #define IT(cond) #define ITT(cond) +#define ITE(cond) #endif #if __ARM_ARCH_ISA_THUMB == 2 Added: vendor/compiler-rt/dist/lib/builtins/bswapdi2.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/builtins/bswapdi2.c Mon May 29 16:25:57 2017 (r319144) @@ -0,0 +1,27 @@ +/* ===-- bswapdi2.c - Implement __bswapdi2 ---------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + * + * This file implements __bswapdi2 for the compiler_rt library. + * + * ===----------------------------------------------------------------------=== + */ + +#include "int_lib.h" + +COMPILER_RT_ABI uint64_t __bswapdi2(uint64_t u) { + return ( + (((u)&0xff00000000000000ULL) >> 56) | + (((u)&0x00ff000000000000ULL) >> 40) | + (((u)&0x0000ff0000000000ULL) >> 24) | + (((u)&0x000000ff00000000ULL) >> 8) | + (((u)&0x00000000ff000000ULL) << 8) | + (((u)&0x0000000000ff0000ULL) << 24) | + (((u)&0x000000000000ff00ULL) << 40) | + (((u)&0x00000000000000ffULL) << 56)); +} Added: vendor/compiler-rt/dist/lib/builtins/bswapsi2.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/builtins/bswapsi2.c Mon May 29 16:25:57 2017 (r319144) @@ -0,0 +1,23 @@ +/* ===-- bswapsi2.c - Implement __bswapsi2 ---------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + * + * This file implements __bswapsi2 for the compiler_rt library. + * + * ===----------------------------------------------------------------------=== + */ + +#include "int_lib.h" + +COMPILER_RT_ABI uint32_t __bswapsi2(uint32_t u) { + return ( + (((u)&0xff000000) >> 24) | + (((u)&0x00ff0000) >> 8) | + (((u)&0x0000ff00) << 8) | + (((u)&0x000000ff) << 24)); +} Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_common.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/lsan/lsan_common.cc Mon May 29 16:25:57 2017 (r319144) @@ -265,19 +265,21 @@ static void ProcessThreads(SuspendedThre } if (flags()->use_tls) { - LOG_THREADS("TLS at %p-%p.\n", tls_begin, tls_end); - if (cache_begin == cache_end) { - ScanRangeForPointers(tls_begin, tls_end, frontier, "TLS", kReachable); - } else { - // Because LSan should not be loaded with dlopen(), we can assume - // that allocator cache will be part of static TLS image. - CHECK_LE(tls_begin, cache_begin); - CHECK_GE(tls_end, cache_end); - if (tls_begin < cache_begin) - ScanRangeForPointers(tls_begin, cache_begin, frontier, "TLS", - kReachable); - if (tls_end > cache_end) - ScanRangeForPointers(cache_end, tls_end, frontier, "TLS", kReachable); + if (tls_begin) { + LOG_THREADS("TLS at %p-%p.\n", tls_begin, tls_end); + // If the tls and cache ranges don't overlap, scan full tls range, + // otherwise, only scan the non-overlapping portions + if (cache_begin == cache_end || tls_end < cache_begin || + tls_begin > cache_end) { + ScanRangeForPointers(tls_begin, tls_end, frontier, "TLS", kReachable); + } else { + if (tls_begin < cache_begin) + ScanRangeForPointers(tls_begin, cache_begin, frontier, "TLS", + kReachable); + if (tls_end > cache_end) + ScanRangeForPointers(cache_end, tls_end, frontier, "TLS", + kReachable); + } } if (dtls && !DTLSInDestruction(dtls)) { for (uptr j = 0; j < dtls->dtv_size; ++j) { Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/lsan/lsan_common_mac.cc Mon May 29 16:25:57 2017 (r319144) @@ -91,12 +91,7 @@ LoadedModule *GetLinker() { return nullp // Required on Linux for initialization of TLS behavior, but should not be // required on Darwin. -void InitializePlatformSpecificModules() { - if (flags()->use_tls) { - Report("use_tls=1 is not supported on Darwin.\n"); - Die(); - } -} +void InitializePlatformSpecificModules() {} // Scans global variables for heap pointers. void ProcessGlobalRegions(Frontier *frontier) { Modified: vendor/compiler-rt/dist/lib/lsan/lsan_flags.inc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_flags.inc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/lsan/lsan_flags.inc Mon May 29 16:25:57 2017 (r319144) @@ -30,7 +30,7 @@ LSAN_FLAG(bool, use_globals, true, "Root set: include global variables (.data and .bss)") LSAN_FLAG(bool, use_stacks, true, "Root set: include thread stacks") LSAN_FLAG(bool, use_registers, true, "Root set: include thread registers") -LSAN_FLAG(bool, use_tls, !SANITIZER_MAC, +LSAN_FLAG(bool, use_tls, true, "Root set: include TLS and thread-specific storage") LSAN_FLAG(bool, use_root_regions, true, "Root set: include regions added via __lsan_register_root_region().") Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator_primary32.h Mon May 29 16:25:57 2017 (r319144) @@ -319,5 +319,3 @@ class SizeClassAllocator32 { ByteMap possible_regions; SizeClassInfo size_class_info_array[kNumClasses]; }; - - Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h Mon May 29 16:25:57 2017 (r319144) @@ -380,7 +380,7 @@ void SetSoftRssLimitExceededCallback(voi // Functions related to signal handling. typedef void (*SignalHandlerType)(int, void *, void *); -bool IsHandledDeadlySignal(int signum); +HandleSignalMode GetHandleSignalMode(int signum); void InstallDeadlySignalHandlers(SignalHandlerType handler); const char *DescribeSignalOrException(int signo); // Alternative signal stack (POSIX-only). Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flag_parser.h Mon May 29 16:25:57 2017 (r319144) @@ -64,6 +64,11 @@ inline bool FlagHandler(&opaque_storage_); - u32 v = atomic_exchange(m, MtxUnlocked, memory_order_relaxed); + u32 v = atomic_exchange(m, MtxUnlocked, memory_order_release); CHECK_NE(v, MtxUnlocked); if (v == MtxSleeping) { #if SANITIZER_FREEBSD @@ -1394,7 +1394,7 @@ AndroidApiLevel AndroidGetApiLevel() { #endif -bool IsHandledDeadlySignal(int signum) { +HandleSignalMode GetHandleSignalMode(int signum) { switch (signum) { case SIGABRT: return common_flags()->handle_abort; @@ -1407,7 +1407,7 @@ bool IsHandledDeadlySignal(int signum) { case SIGBUS: return common_flags()->handle_sigbus; } - return false; + return kHandleSignalNo; } #if !SANITIZER_GO Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_s390.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_s390.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_s390.cc Mon May 29 16:25:57 2017 (r319144) @@ -178,6 +178,13 @@ static bool FixedCVE_2016_2143() { // 4.4.6+ is OK. if (minor == 4 && patch >= 6) return true; + if (minor == 4 && patch == 0 && ptr[0] == '-' && + internal_strstr(buf.version, "Ubuntu")) { + // Check Ubuntu 16.04 + int r1 = internal_simple_strtoll(ptr+1, &ptr, 10); + if (r1 >= 13) // 4.4.0-13 or later + return true; + } // Otherwise, OK if 4.5+. return minor >= 5; } else { Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc Mon May 29 16:25:57 2017 (r319144) @@ -370,6 +370,27 @@ uptr GetTlsSize() { void InitTlsSize() { } +uptr TlsBaseAddr() { + uptr segbase = 0; +#if defined(__x86_64__) + asm("movq %%gs:0,%0" : "=r"(segbase)); +#elif defined(__i386__) + asm("movl %%gs:0,%0" : "=r"(segbase)); +#endif + return segbase; +} + +// The size of the tls on darwin does not appear to be well documented, +// however the vm memory map suggests that it is 1024 uptrs in size, +// with a size of 0x2000 bytes on x86_64 and 0x1000 bytes on i386. +uptr TlsSize() { +#if defined(__x86_64__) || defined(__i386__) + return 1024 * sizeof(uptr); +#else + return 0; +#endif +} + void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size, uptr *tls_addr, uptr *tls_size) { #if !SANITIZER_GO @@ -377,8 +398,8 @@ void GetThreadStackAndTls(bool main, upt GetThreadStackTopAndBottom(main, &stack_top, &stack_bottom); *stk_addr = stack_bottom; *stk_size = stack_top - stack_bottom; - *tls_addr = 0; - *tls_size = 0; + *tls_addr = TlsBaseAddr(); + *tls_size = TlsSize(); #else *stk_addr = 0; *stk_size = 0; @@ -393,10 +414,10 @@ void ListOfModules::init() { memory_mapping.DumpListOfModules(&modules_); } -bool IsHandledDeadlySignal(int signum) { +HandleSignalMode GetHandleSignalMode(int signum) { // Handling fatal signals on watchOS and tvOS devices is disallowed. if ((SANITIZER_WATCHOS || SANITIZER_TVOS) && !(SANITIZER_IOSSIM)) - return false; + return kHandleSignalNo; switch (signum) { case SIGABRT: return common_flags()->handle_abort; @@ -409,7 +430,7 @@ bool IsHandledDeadlySignal(int signum) { case SIGBUS: return common_flags()->handle_sigbus; } - return false; + return kHandleSignalNo; } MacosVersion cached_macos_version = MACOS_VERSION_UNINITIALIZED; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc Mon May 29 16:25:57 2017 (r319144) @@ -134,7 +134,8 @@ void SleepForMillis(int millis) { void Abort() { #if !SANITIZER_GO // If we are handling SIGABRT, unhandle it first. - if (IsHandledDeadlySignal(SIGABRT)) { + // TODO(vitalybuka): Check if handler belongs to sanitizer. + if (GetHandleSignalMode(SIGABRT) != kHandleSignalNo) { struct sigaction sigact; internal_memset(&sigact, 0, sizeof(sigact)); sigact.sa_sigaction = (sa_sigaction_t)SIG_DFL; @@ -188,8 +189,26 @@ void UnsetAlternateSignalStack() { static void MaybeInstallSigaction(int signum, SignalHandlerType handler) { - if (!IsHandledDeadlySignal(signum)) - return; + switch (GetHandleSignalMode(signum)) { + case kHandleSignalNo: + return; + case kHandleSignalYes: { + struct sigaction sigact; + internal_memset(&sigact, 0, sizeof(sigact)); + CHECK_EQ(0, internal_sigaction(signum, nullptr, &sigact)); + if (sigact.sa_flags & SA_SIGINFO) { + if (sigact.sa_sigaction) return; + } else { + if (sigact.sa_handler != SIG_DFL && sigact.sa_handler != SIG_IGN && + sigact.sa_handler != SIG_ERR) + return; + } + break; + } + case kHandleSignalExclusive: + break; + } + struct sigaction sigact; internal_memset(&sigact, 0, sizeof(sigact)); sigact.sa_sigaction = (sa_sigaction_t)handler; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc Mon May 29 16:25:57 2017 (r319144) @@ -832,9 +832,9 @@ void InstallDeadlySignalHandlers(SignalH // FIXME: Decide what to do on Windows. } -bool IsHandledDeadlySignal(int signum) { +HandleSignalMode GetHandleSignalMode(int signum) { // FIXME: Decide what to do on Windows. - return false; + return kHandleSignalNo; } // Check based on flags if we should handle this exception. Modified: vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc Mon May 29 16:25:57 2017 (r319144) @@ -78,13 +78,15 @@ TEST(SanitizerCommon, HandleSignalMode) TestFlag(kHandleSignalYes, "flag_name=0", kHandleSignalNo); TestFlag(kHandleSignalYes, "flag_name=no", kHandleSignalNo); TestFlag(kHandleSignalYes, "flag_name=false", kHandleSignalNo); + TestFlag(kHandleSignalNo, "flag_name=2", kHandleSignalExclusive); + TestFlag(kHandleSignalYes, "flag_name=exclusive", kHandleSignalExclusive); EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name", kHandleSignalNo), "expected '='"); EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name=", kHandleSignalNo), "Invalid value for signal handler option: ''"); - EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name=2", kHandleSignalNo), - "Invalid value for signal handler option: '2'"); + EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name=3", kHandleSignalNo), + "Invalid value for signal handler option: '3'"); EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name=-1", kHandleSignalNo), "Invalid value for signal handler option: '-1'"); EXPECT_DEATH(TestFlag(kHandleSignalNo, "flag_name=on", kHandleSignalNo), Modified: vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.cpp ============================================================================== --- vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.cpp Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.cpp Mon May 29 16:25:57 2017 (r319144) @@ -18,7 +18,6 @@ #include "scudo_tls.h" -#include #include namespace __scudo { @@ -32,15 +31,17 @@ __attribute__((tls_model("initial-exec") THREADLOCAL ScudoThreadContext ThreadLocalContext; static void teardownThread(void *Ptr) { - uptr Iteration = reinterpret_cast(Ptr); + uptr I = reinterpret_cast(Ptr); // The glibc POSIX thread-local-storage deallocation routine calls user // provided destructors in a loop of PTHREAD_DESTRUCTOR_ITERATIONS. // We want to be called last since other destructors might call free and the // like, so we wait until PTHREAD_DESTRUCTOR_ITERATIONS before draining the // quarantine and swallowing the cache. - if (Iteration < PTHREAD_DESTRUCTOR_ITERATIONS) { - pthread_setspecific(PThreadKey, reinterpret_cast(Iteration + 1)); - return; + if (I > 1) { + // If pthread_setspecific fails, we will go ahead with the teardown. + if (LIKELY(pthread_setspecific(PThreadKey, + reinterpret_cast(I - 1)) == 0)) + return; } ThreadLocalContext.commitBack(); ScudoThreadState = ThreadTornDown; @@ -53,8 +54,9 @@ static void initOnce() { } void initThread() { - pthread_once(&GlobalInitialized, initOnce); - pthread_setspecific(PThreadKey, reinterpret_cast(1)); + CHECK_EQ(pthread_once(&GlobalInitialized, initOnce), 0); + CHECK_EQ(pthread_setspecific(PThreadKey, reinterpret_cast( + GetPthreadDestructorIterations())), 0); ThreadLocalContext.init(); ScudoThreadState = ThreadInitialized; } Modified: vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h ============================================================================== --- vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h Mon May 29 16:25:57 2017 (r319144) @@ -816,6 +816,7 @@ void FlushShadowMemory(); void WriteMemoryProfile(char *buf, uptr buf_size, uptr nthread, uptr nlive); int ExtractResolvFDs(void *state, int *fds, int nfd); int ExtractRecvmsgFDs(void *msg, int *fds, int nfd); +void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size); int call_pthread_cancel_with_cleanup(int(*fn)(void *c, void *m, void *abstime), void *c, void *m, void *abstime, Modified: vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc ============================================================================== --- vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc Mon May 29 16:25:57 2017 (r319144) @@ -320,6 +320,20 @@ int ExtractRecvmsgFDs(void *msgp, int *f return res; } +void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) { + // Check that the thr object is in tls; + const uptr thr_beg = (uptr)thr; + const uptr thr_end = (uptr)thr + sizeof(*thr); + CHECK_GE(thr_beg, tls_addr); + CHECK_LE(thr_beg, tls_addr + tls_size); + CHECK_GE(thr_end, tls_addr); + CHECK_LE(thr_end, tls_addr + tls_size); + // Since the thr object is huge, skip it. + MemoryRangeImitateWrite(thr, /*pc=*/2, tls_addr, thr_beg - tls_addr); + MemoryRangeImitateWrite(thr, /*pc=*/2, thr_end, + tls_addr + tls_size - thr_end); +} + // Note: this function runs with async signals enabled, // so it must not touch any tsan state. int call_pthread_cancel_with_cleanup(int(*fn)(void *c, void *m, Modified: vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc ============================================================================== --- vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc Mon May 29 16:25:57 2017 (r319144) @@ -75,12 +75,18 @@ static void *SignalSafeGetOrAllocate(upt static uptr main_thread_identity = 0; ALIGNED(64) static char main_thread_state[sizeof(ThreadState)]; +ThreadState **cur_thread_location() { + ThreadState **thread_identity = (ThreadState **)pthread_self(); + return ((uptr)thread_identity == main_thread_identity) ? nullptr + : thread_identity; +} + ThreadState *cur_thread() { - uptr thread_identity = (uptr)pthread_self(); - if (thread_identity == main_thread_identity || main_thread_identity == 0) { + ThreadState **thr_state_loc = cur_thread_location(); + if (thr_state_loc == nullptr || main_thread_identity == 0) { return (ThreadState *)&main_thread_state; } - ThreadState **fake_tls = (ThreadState **)MemToShadow(thread_identity); + ThreadState **fake_tls = (ThreadState **)MemToShadow((uptr)thr_state_loc); ThreadState *thr = (ThreadState *)SignalSafeGetOrAllocate( (uptr *)fake_tls, sizeof(ThreadState)); return thr; @@ -90,13 +96,13 @@ ThreadState *cur_thread() { // munmap first and then clear `fake_tls`; if we receive a signal in between, // handler will try to access the unmapped ThreadState. void cur_thread_finalize() { - uptr thread_identity = (uptr)pthread_self(); - if (thread_identity == main_thread_identity) { + ThreadState **thr_state_loc = cur_thread_location(); + if (thr_state_loc == nullptr) { // Calling dispatch_main() or xpc_main() actually invokes pthread_exit to // exit the main thread. Let's keep the main thread's ThreadState. return; } - ThreadState **fake_tls = (ThreadState **)MemToShadow(thread_identity); + ThreadState **fake_tls = (ThreadState **)MemToShadow((uptr)thr_state_loc); internal_munmap(*fake_tls, sizeof(ThreadState)); *fake_tls = nullptr; } @@ -240,6 +246,29 @@ void InitializePlatform() { } #if !SANITIZER_GO +void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) { + // The pointer to the ThreadState object is stored in the shadow memory + // of the tls. + uptr tls_end = tls_addr + tls_size; + ThreadState **thr_state_loc = cur_thread_location(); + if (thr_state_loc == nullptr) { + MemoryRangeImitateWrite(thr, /*pc=*/2, tls_addr, tls_size); + } else { + uptr thr_state_start = (uptr)thr_state_loc; + uptr thr_state_end = thr_state_start + sizeof(uptr); + CHECK_GE(thr_state_start, tls_addr); + CHECK_LE(thr_state_start, tls_addr + tls_size); + CHECK_GE(thr_state_end, tls_addr); + CHECK_LE(thr_state_end, tls_addr + tls_size); + MemoryRangeImitateWrite(thr, /*pc=*/2, tls_addr, + thr_state_start - tls_addr); + MemoryRangeImitateWrite(thr, /*pc=*/2, thr_state_end, + tls_end - thr_state_end); + } +} +#endif + +#if !SANITIZER_GO // Note: this function runs with async signals enabled, // so it must not touch any tsan state. int call_pthread_cancel_with_cleanup(int(*fn)(void *c, void *m, Modified: vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc ============================================================================== --- vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc Mon May 29 16:25:53 2017 (r319143) +++ vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc Mon May 29 16:25:57 2017 (r319144) @@ -248,19 +248,7 @@ void ThreadStart(ThreadState *thr, int t if (stk_addr && stk_size) MemoryRangeImitateWrite(thr, /*pc=*/ 1, stk_addr, stk_size); - if (tls_addr && tls_size) { - // Check that the thr object is in tls; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 29 16:26:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 827BBD77871; Mon, 29 May 2017 16:26:07 +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 35FC580C78; Mon, 29 May 2017 16:26:07 +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 v4TGQ69A083253; Mon, 29 May 2017 16:26:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGQ6BB083252; Mon, 29 May 2017 16:26:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291626.v4TGQ6BB083252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319145 - vendor/compiler-rt/compiler-rt-trunk-r304149 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:26:07 -0000 Author: dim Date: Mon May 29 16:26:06 2017 New Revision: 319145 URL: https://svnweb.freebsd.org/changeset/base/319145 Log: Tag compiler-rt trunk r304149. Added: vendor/compiler-rt/compiler-rt-trunk-r304149/ - copied from r319144, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Mon May 29 16:26:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98C51D778CC; Mon, 29 May 2017 16:26:13 +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 3EBA880D06; Mon, 29 May 2017 16:26:13 +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 v4TGQCKr083323; Mon, 29 May 2017 16:26:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGQAN9083302; Mon, 29 May 2017 16:26:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291626.v4TGQAN9083302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319146 - in vendor/libc++/dist: . cmake include include/experimental lib test/libcxx test/libcxx/experimental/language.support test/libcxx/experimental/language.support/support.corouti... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:26:13 -0000 Author: dim Date: Mon May 29 16:26:10 2017 New Revision: 319146 URL: https://svnweb.freebsd.org/changeset/base/319146 Log: Vendor import of libc++ trunk r304149: https://llvm.org/svn/llvm-project/libcxx/trunk@304149 Added: vendor/libc++/dist/include/experimental/coroutine vendor/libc++/dist/test/libcxx/experimental/language.support/ vendor/libc++/dist/test/libcxx/experimental/language.support/support.coroutines/ vendor/libc++/dist/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp (contents, props changed) vendor/libc++/dist/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp (contents, props changed) vendor/libc++/dist/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/ vendor/libc++/dist/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.traits/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/expected.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/generator.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/go.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/includes.sh.cpp (contents, props changed) vendor/libc++/dist/test/support/coroutine_types.h (contents, props changed) vendor/libc++/dist/test/support/test.workarounds/c1xx_empty_parameter_pack_expansion.pass.cpp (contents, props changed) Deleted: vendor/libc++/dist/test/std/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op_astrk/arrow.pass.cpp vendor/libc++/dist/test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp Modified: vendor/libc++/dist/CMakeLists.txt vendor/libc++/dist/cmake/config-ix.cmake vendor/libc++/dist/include/__config vendor/libc++/dist/include/__threading_support vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/experimental/__config vendor/libc++/dist/include/iterator vendor/libc++/dist/include/memory vendor/libc++/dist/include/module.modulemap vendor/libc++/dist/lib/CMakeLists.txt vendor/libc++/dist/test/libcxx/double_include.sh.cpp vendor/libc++/dist/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp vendor/libc++/dist/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp vendor/libc++/dist/test/support/poisoned_hash_helper.hpp vendor/libc++/dist/test/support/test_macros.h vendor/libc++/dist/test/support/test_workarounds.h vendor/libc++/dist/test/support/uses_alloc_types.hpp vendor/libc++/dist/utils/libcxx/test/config.py vendor/libc++/dist/www/cxx1z_status.html Modified: vendor/libc++/dist/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/CMakeLists.txt Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/CMakeLists.txt Mon May 29 16:26:10 2017 (r319146) @@ -452,6 +452,11 @@ add_compile_flags_if_supported(-nostdinc # the dylib when get ODR used by another function. add_compile_flags_if_supported(-fvisibility-inlines-hidden) +if (LIBCXX_CONFIGURE_IDE) + # This simply allows IDE to process + add_compile_flags_if_supported(-fcoroutines-ts) +endif() + # Let the library headers know they are currently being used to build the # library. add_definitions(-D_LIBCPP_BUILDING_LIBRARY) Modified: vendor/libc++/dist/cmake/config-ix.cmake ============================================================================== --- vendor/libc++/dist/cmake/config-ix.cmake Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/cmake/config-ix.cmake Mon May 29 16:26:10 2017 (r319146) @@ -41,7 +41,15 @@ if (LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG) if (MINGW) # Mingw64 requires quite a few "C" runtime libraries in order for basic # programs to link successfully with -nodefaultlibs. - list(APPEND CMAKE_REQUIRED_LIBRARIES mingw32 gcc gcc_eh mingwex msvcrt gcc) + if (LIBCXX_USE_COMPILER_RT) + set(MINGW_RUNTIME ${LIBCXX_BUILTINS_LIBRARY}) + else () + set(MINGW_RUNTIME gcc_s gcc) + endif() + set(MINGW_LIBRARIES mingw32 ${MINGW_RUNTIME} moldname mingwex msvcrt advapi32 + shell32 user32 kernel32 mingw32 ${MINGW_RUNTIME} + moldname mingwex msvcrt) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${MINGW_LIBRARIES}) endif() if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all") Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/include/__config Mon May 29 16:26:10 2017 (r319146) @@ -1126,6 +1126,10 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit # define _LIBCPP_HAS_NO_IS_AGGREGATE #endif +#if !defined(__cpp_coroutines) || __cpp_coroutines < 201703L +# define _LIBCPP_HAS_NO_COROUTINES +#endif + #endif // __cplusplus // Decide whether to use availability macros. Modified: vendor/libc++/dist/include/__threading_support ============================================================================== --- vendor/libc++/dist/include/__threading_support Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/include/__threading_support Mon May 29 16:26:10 2017 (r319146) @@ -27,7 +27,7 @@ # include # include #elif defined(_LIBCPP_HAS_THREAD_API_WIN32) -#include +#include #include #include #include <__undef_min_max> Modified: vendor/libc++/dist/include/algorithm ============================================================================== --- vendor/libc++/dist/include/algorithm Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/include/algorithm Mon May 29 16:26:10 2017 (r319146) @@ -35,6 +35,9 @@ template + InputIterator for_each_n(InputIterator first, Size n, Function f); // C++17 + template InputIterator find(InputIterator first, InputIterator last, const T& value); @@ -961,6 +964,26 @@ for_each(_InputIterator __first, _InputI return __f; } +#if _LIBCPP_STD_VER > 14 +// for_each_n + +template +inline _LIBCPP_INLINE_VISIBILITY +_InputIterator +for_each_n(_InputIterator __first, _Size __orig_n, _Function __f) +{ + typedef decltype(__convert_to_integral(__orig_n)) _IntegralSize; + _IntegralSize __n = __orig_n; + while (__n > 0) + { + __f(*__first); + ++__first; + --__n; + } + return __first; +} +#endif + // find template Modified: vendor/libc++/dist/include/experimental/__config ============================================================================== --- vendor/libc++/dist/include/experimental/__config Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/include/experimental/__config Mon May 29 16:26:10 2017 (r319146) @@ -44,6 +44,13 @@ #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_FILESYSTEM \ } } _LIBCPP_END_NAMESPACE_EXPERIMENTAL +#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_COROUTINES \ + _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace coroutines_v1 { + +#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_COROUTINES \ + } _LIBCPP_END_NAMESPACE_EXPERIMENTAL + +#define _VSTD_CORO _VSTD_EXPERIMENTAL::coroutines_v1 #define _VSTD_FS ::std::experimental::filesystem::v1 Added: vendor/libc++/dist/include/experimental/coroutine ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/include/experimental/coroutine Mon May 29 16:26:10 2017 (r319146) @@ -0,0 +1,270 @@ +// -*- C++ -*- +//===----------------------------- coroutine -----------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP_EXPERIMENTAL_COROUTINE +#define _LIBCPP_EXPERIMENTAL_COROUTINE + +/** + experimental/coroutine synopsis + +// C++next + +namespace std { +namespace experimental { +inline namespace coroutines_v1 { + + // 18.11.1 coroutine traits +template +class coroutine_traits; +// 18.11.2 coroutine handle +template +class coroutine_handle; +// 18.11.2.7 comparison operators: +bool operator==(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT; +bool operator!=(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT; +bool operator<(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT; +bool operator<=(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT; +bool operator>=(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT; +bool operator>(coroutine_handle<> x, coroutine_handle<> y) _NOEXCEPT; +// 18.11.3 trivial awaitables +struct suspend_never; +struct suspend_always; +// 18.11.2.8 hash support: +template struct hash; +template struct hash>; + +} // namespace coroutines_v1 +} // namespace experimental +} // namespace std + + */ + +#include +#include +#include +#include +#include // for hash +#include +#include +#include <__debug> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +#ifdef _LIBCPP_HAS_NO_COROUTINES +# if defined(_LIBCPP_WARNING) + _LIBCPP_WARNING(" cannot be used with this compiler") +# else +# warning cannot be used with this compiler +# endif +#endif + +#ifndef _LIBCPP_HAS_NO_COROUTINES + +_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_COROUTINES + +template +struct __coroutine_traits_sfinae {}; + +template +struct __coroutine_traits_sfinae< + _Tp, typename __void_t::type> +{ + using promise_type = typename _Tp::promise_type; +}; + +template +struct _LIBCPP_TEMPLATE_VIS coroutine_traits + : public __coroutine_traits_sfinae<_Ret> +{ +}; + +template +class _LIBCPP_TEMPLATE_VIS coroutine_handle; + +template <> +class _LIBCPP_TEMPLATE_VIS coroutine_handle { +public: + _LIBCPP_ALWAYS_INLINE + _LIBCPP_CONSTEXPR coroutine_handle() _NOEXCEPT : __handle_(nullptr) {} + + _LIBCPP_ALWAYS_INLINE + _LIBCPP_CONSTEXPR coroutine_handle(nullptr_t) _NOEXCEPT : __handle_(nullptr) {} + + _LIBCPP_ALWAYS_INLINE + coroutine_handle& operator=(nullptr_t) _NOEXCEPT { + __handle_ = nullptr; + return *this; + } + + _LIBCPP_ALWAYS_INLINE + _LIBCPP_CONSTEXPR void* address() const _NOEXCEPT { return __handle_; } + + _LIBCPP_ALWAYS_INLINE + _LIBCPP_CONSTEXPR explicit operator bool() const _NOEXCEPT { return __handle_; } + + _LIBCPP_ALWAYS_INLINE + void operator()() { resume(); } + + _LIBCPP_ALWAYS_INLINE + void resume() { + _LIBCPP_ASSERT(__is_suspended(), + "resume() can only be called on suspended coroutines"); + _LIBCPP_ASSERT(!done(), + "resume() has undefined behavior when the coroutine is done"); + __builtin_coro_resume(__handle_); + } + + _LIBCPP_ALWAYS_INLINE + void destroy() { + _LIBCPP_ASSERT(__is_suspended(), + "destroy() can only be called on suspended coroutines"); + __builtin_coro_destroy(__handle_); + } + + _LIBCPP_ALWAYS_INLINE + bool done() const { + _LIBCPP_ASSERT(__is_suspended(), + "done() can only be called on suspended coroutines"); + return __builtin_coro_done(__handle_); + } + +public: + _LIBCPP_ALWAYS_INLINE + static coroutine_handle from_address(void* __addr) _NOEXCEPT { + coroutine_handle __tmp; + __tmp.__handle_ = __addr; + return __tmp; + } + +private: + bool __is_suspended() const _NOEXCEPT { + // FIXME actually implement a check for if the coro is suspended. + return __handle_; + } + + template friend class coroutine_handle; + void* __handle_; +}; + +// 18.11.2.7 comparison operators: +inline _LIBCPP_ALWAYS_INLINE +bool operator==(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { + return __x.address() == __y.address(); +} +inline _LIBCPP_ALWAYS_INLINE +bool operator!=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { + return !(__x == __y); +} +inline _LIBCPP_ALWAYS_INLINE +bool operator<(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { + return less()(__x.address(), __y.address()); +} +inline _LIBCPP_ALWAYS_INLINE +bool operator>(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { + return __y < __x; +} +inline _LIBCPP_ALWAYS_INLINE +bool operator<=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { + return !(__x > __y); +} +inline _LIBCPP_ALWAYS_INLINE +bool operator>=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { + return !(__x < __y); +} + +template +class _LIBCPP_TEMPLATE_VIS coroutine_handle : public coroutine_handle<> { + using _Base = coroutine_handle<>; +public: +#ifndef _LIBCPP_CXX03_LANG + // 18.11.2.1 construct/reset + using coroutine_handle<>::coroutine_handle; +#else + _LIBCPP_ALWAYS_INLINE coroutine_handle() _NOEXCEPT : _Base() {} + _LIBCPP_ALWAYS_INLINE coroutine_handle(nullptr_t) _NOEXCEPT : _Base(nullptr) {} +#endif + _LIBCPP_INLINE_VISIBILITY + coroutine_handle& operator=(nullptr_t) _NOEXCEPT { + _Base::operator=(nullptr); + return *this; + } + + _LIBCPP_INLINE_VISIBILITY + _Promise& promise() const { + return *reinterpret_cast<_Promise*>( + __builtin_coro_promise(this->__handle_, __alignof(_Promise), false)); + } + +public: + _LIBCPP_ALWAYS_INLINE + static coroutine_handle from_address(void* __addr) _NOEXCEPT { + coroutine_handle __tmp; + __tmp.__handle_ = __addr; + return __tmp; + } + + // NOTE: this overload isn't required by the standard but is needed so + // the deleted _Promise* overload doesn't make from_address(nullptr) + // ambiguous. + // FIXME: should from_address work with nullptr? + _LIBCPP_ALWAYS_INLINE + static coroutine_handle from_address(nullptr_t) _NOEXCEPT { + return {}; + } + + // from_address cannot be used with the coroutines promise type. + static coroutine_handle from_address(_Promise*) = delete; + + _LIBCPP_ALWAYS_INLINE + static coroutine_handle from_promise(_Promise& __promise) _NOEXCEPT { + coroutine_handle __tmp; + __tmp.__handle_ = __builtin_coro_promise(_VSTD::addressof(__promise), + __alignof(_Promise), true); + return __tmp; + } +}; + +struct _LIBCPP_TYPE_VIS suspend_never { + _LIBCPP_ALWAYS_INLINE + bool await_ready() const _NOEXCEPT { return true; } + _LIBCPP_ALWAYS_INLINE + void await_suspend(coroutine_handle<>) const _NOEXCEPT {} + _LIBCPP_ALWAYS_INLINE + void await_resume() const _NOEXCEPT {} +}; + +struct _LIBCPP_TYPE_VIS suspend_always { + _LIBCPP_ALWAYS_INLINE + bool await_ready() const _NOEXCEPT { return false; } + _LIBCPP_ALWAYS_INLINE + void await_suspend(coroutine_handle<>) const _NOEXCEPT {} + _LIBCPP_ALWAYS_INLINE + void await_resume() const _NOEXCEPT {} +}; + +_LIBCPP_END_NAMESPACE_EXPERIMENTAL_COROUTINES + +_LIBCPP_BEGIN_NAMESPACE_STD + +template +struct hash<_VSTD_CORO::coroutine_handle<_Tp> > { + using __arg_type = _VSTD_CORO::coroutine_handle<_Tp>; + _LIBCPP_INLINE_VISIBILITY + size_t operator()(__arg_type const& __v) const _NOEXCEPT + {return hash()(__v.address());} +}; + +_LIBCPP_END_NAMESPACE_STD + +#endif // !defined(_LIBCPP_HAS_NO_COROUTINES) + +#endif /* _LIBCPP_EXPERIMENTAL_COROUTINE */ Modified: vendor/libc++/dist/include/iterator ============================================================================== --- vendor/libc++/dist/include/iterator Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/include/iterator Mon May 29 16:26:10 2017 (r319146) @@ -990,7 +990,6 @@ public: _LIBCPP_INLINE_VISIBILITY char_type operator*() const {return static_cast(__sbuf_->sgetc());} - _LIBCPP_INLINE_VISIBILITY char_type* operator->() const {return nullptr;} _LIBCPP_INLINE_VISIBILITY istreambuf_iterator& operator++() { __sbuf_->sbumpc(); Modified: vendor/libc++/dist/include/memory ============================================================================== --- vendor/libc++/dist/include/memory Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/include/memory Mon May 29 16:26:10 2017 (r319146) @@ -2251,6 +2251,8 @@ void swap(__compressed_pair<_T1, _T2>& _ template struct _LIBCPP_TEMPLATE_VIS default_delete { + static_assert(!is_function<_Tp>::value, + "default_delete cannot be instantiated for function types"); #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY constexpr default_delete() noexcept = default; #else @@ -3653,6 +3655,18 @@ __shared_ptr_emplace<_Tp, _Alloc>::__on_ __a.deallocate(_PTraits::pointer_to(*this), 1); } +struct __shared_ptr_dummy_rebind_allocator_type; +template <> +class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type> +{ +public: + template + struct rebind + { + typedef allocator<_Other> other; + }; +}; + template class _LIBCPP_TEMPLATE_VIS enable_shared_from_this; template @@ -3921,6 +3935,17 @@ public: #endif // _LIBCPP_HAS_NO_VARIADICS private: + template ::value> + struct __shared_ptr_default_allocator + { + typedef allocator<_Yp> type; + }; + + template + struct __shared_ptr_default_allocator<_Yp, true> + { + typedef allocator<__shared_ptr_dummy_rebind_allocator_type> type; + }; template _LIBCPP_INLINE_VISIBILITY @@ -3939,8 +3964,7 @@ private: } } - _LIBCPP_INLINE_VISIBILITY - void __enable_weak_this(const volatile void*, const volatile void*) _NOEXCEPT {} + _LIBCPP_INLINE_VISIBILITY void __enable_weak_this(...) _NOEXCEPT {} template friend class _LIBCPP_TEMPLATE_VIS shared_ptr; template friend class _LIBCPP_TEMPLATE_VIS weak_ptr; @@ -3972,8 +3996,9 @@ shared_ptr<_Tp>::shared_ptr(_Yp* __p, : __ptr_(__p) { unique_ptr<_Yp> __hold(__p); - typedef __shared_ptr_pointer<_Yp*, default_delete<_Yp>, allocator<_Yp> > _CntrlBlk; - __cntrl_ = new _CntrlBlk(__p, default_delete<_Yp>(), allocator<_Yp>()); + typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT; + typedef __shared_ptr_pointer<_Yp*, default_delete<_Yp>, _AllocT > _CntrlBlk; + __cntrl_ = new _CntrlBlk(__p, default_delete<_Yp>(), _AllocT()); __hold.release(); __enable_weak_this(__p, __p); } @@ -3988,8 +4013,9 @@ shared_ptr<_Tp>::shared_ptr(_Yp* __p, _D try { #endif // _LIBCPP_NO_EXCEPTIONS - typedef __shared_ptr_pointer<_Yp*, _Dp, allocator<_Yp> > _CntrlBlk; - __cntrl_ = new _CntrlBlk(__p, __d, allocator<_Yp>()); + typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT; + typedef __shared_ptr_pointer<_Yp*, _Dp, _AllocT > _CntrlBlk; + __cntrl_ = new _CntrlBlk(__p, __d, _AllocT()); __enable_weak_this(__p, __p); #ifndef _LIBCPP_NO_EXCEPTIONS } @@ -4010,8 +4036,9 @@ shared_ptr<_Tp>::shared_ptr(nullptr_t __ try { #endif // _LIBCPP_NO_EXCEPTIONS - typedef __shared_ptr_pointer > _CntrlBlk; - __cntrl_ = new _CntrlBlk(__p, __d, allocator<_Tp>()); + typedef typename __shared_ptr_default_allocator<_Tp>::type _AllocT; + typedef __shared_ptr_pointer _CntrlBlk; + __cntrl_ = new _CntrlBlk(__p, __d, _AllocT()); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) @@ -4179,8 +4206,9 @@ shared_ptr<_Tp>::shared_ptr(unique_ptr<_ else #endif { - typedef __shared_ptr_pointer<_Yp*, _Dp, allocator<_Yp> > _CntrlBlk; - __cntrl_ = new _CntrlBlk(__r.get(), __r.get_deleter(), allocator<_Yp>()); + typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT; + typedef __shared_ptr_pointer<_Yp*, _Dp, _AllocT > _CntrlBlk; + __cntrl_ = new _CntrlBlk(__r.get(), __r.get_deleter(), _AllocT()); __enable_weak_this(__r.get(), __r.get()); } __r.release(); @@ -4208,10 +4236,11 @@ shared_ptr<_Tp>::shared_ptr(unique_ptr<_ else #endif { + typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT; typedef __shared_ptr_pointer<_Yp*, reference_wrapper::type>, - allocator<_Yp> > _CntrlBlk; - __cntrl_ = new _CntrlBlk(__r.get(), ref(__r.get_deleter()), allocator<_Yp>()); + _AllocT > _CntrlBlk; + __cntrl_ = new _CntrlBlk(__r.get(), ref(__r.get_deleter()), _AllocT()); __enable_weak_this(__r.get(), __r.get()); } __r.release(); Modified: vendor/libc++/dist/include/module.modulemap ============================================================================== --- vendor/libc++/dist/include/module.modulemap Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/include/module.modulemap Mon May 29 16:26:10 2017 (r319146) @@ -501,6 +501,10 @@ module std [system] { header "experimental/chrono" export * } + module coroutine { + header "experimental/coroutine" + export * + } module deque { header "experimental/deque" export * Modified: vendor/libc++/dist/lib/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/lib/CMakeLists.txt Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/lib/CMakeLists.txt Mon May 29 16:26:10 2017 (r319146) @@ -242,14 +242,11 @@ endif() if (LIBCXX_ENABLE_STATIC) add_library(cxx_static STATIC $) target_link_libraries(cxx_static ${LIBCXX_LIBRARIES}) - set(STATIC_OUTPUT_NAME "c++") - if (WIN32) - set(STATIC_OUTPUT_NAME "libc++") - endif() + set(CMAKE_STATIC_LIBRARY_PREFIX "lib") set_target_properties(cxx_static PROPERTIES LINK_FLAGS "${LIBCXX_LINK_FLAGS}" - OUTPUT_NAME "${STATIC_OUTPUT_NAME}" + OUTPUT_NAME "c++" ) list(APPEND LIBCXX_TARGETS "cxx_static") Modified: vendor/libc++/dist/test/libcxx/double_include.sh.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/double_include.sh.cpp Mon May 29 16:26:06 2017 (r319145) +++ vendor/libc++/dist/test/libcxx/double_include.sh.cpp Mon May 29 16:26:10 2017 (r319146) @@ -137,6 +137,9 @@ #include #include #include +#if defined(__cpp_coroutines) +#include +#endif #include #include #include Added: vendor/libc++/dist/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/experimental/language.support/support.coroutines/dialect_support.sh.cpp Mon May 29 16:26:10 2017 (r319146) @@ -0,0 +1,59 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: fcoroutines-ts + +// RUN: %build -fcoroutines-ts +// RUN: %run + +// A simple "breathing" test that checks that +// can be parsed and used in all dialects, including C++03 in order to match +// Clang's behavior. + +#include + +namespace coro = std::experimental::coroutines_v1; + +coro::suspend_always sa; +coro::suspend_never sn; + +struct MyFuture { + struct promise_type { + typedef coro::coroutine_handle HandleT; + coro::suspend_never initial_suspend() { return sn; } + coro::suspend_always final_suspend() { return sa; } + coro::suspend_never yield_value(int) { return sn; } + MyFuture get_return_object() { + MyFuture f(HandleT::from_promise(*this)); + return f; + } + void return_void() {} + void unhandled_exception() {} + }; + typedef promise_type::HandleT HandleT; + MyFuture() : p() {} + MyFuture(HandleT h) : p(h) {} + + coro::coroutine_handle p; +}; + +MyFuture test_coro() { + co_await sn; + co_yield 42; + co_return; +} + +int main() +{ + MyFuture f = test_coro(); + while (!f.p.done()) + f.p.resume(); + f.p.destroy(); +} Added: vendor/libc++/dist/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/experimental/language.support/support.coroutines/version.sh.cpp Mon May 29 16:26:10 2017 (r319146) @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11 +// REQUIRES: fcoroutines-ts + +// RUN: %build -fcoroutines-ts +// RUN: %run + +#include + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION must be defined +#endif + +int main() +{ +} Added: vendor/libc++/dist/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp Mon May 29 16:26:10 2017 (r319146) @@ -0,0 +1,44 @@ +// UNSUPPORTED: c++98, c++03 + +#include + +template struct Tag {}; + +template +using SPtr = std::shared_ptr)>; + +template +using FnType = void(Tag); + +template +void TestFn(Tag) {} + +template +FnType* getFn() { + return &TestFn; +} + +struct Deleter { + template + void operator()(Tp) const { + using RawT = typename std::remove_pointer::type; + static_assert(std::is_function::value || + std::is_same::type, + std::nullptr_t>::value, + ""); + } +}; + +int main() { + { + SPtr<0> s; // OK + SPtr<1> s1(nullptr); // OK + SPtr<2> s2(getFn<2>(), Deleter{}); // OK + SPtr<3> s3(nullptr, Deleter{}); // OK + } + // expected-error@memory:* 2 {{static_assert failed "default_delete cannot be instantiated for function types"}} + { + SPtr<4> s4(getFn<4>()); // expected-note {{requested here}} + SPtr<5> s5(getFn<5>(), std::default_delete>{}); // expected-note {{requested here}} + } +} Added: vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp Mon May 29 16:26:10 2017 (r319146) @@ -0,0 +1,61 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// template +// InputIterator for_each_n(InputIterator first, Size n, Function f); + + +#include +#include + +#include "test_iterators.h" + +struct for_each_test +{ + for_each_test(int c) : count(c) {} + int count; + void operator()(int& i) {++i; ++count;} +}; + +int main() +{ + typedef input_iterator Iter; + int ia[] = {0, 1, 2, 3, 4, 5}; + const unsigned s = sizeof(ia)/sizeof(ia[0]); + + { + auto f = for_each_test(0); + Iter it = std::for_each_n(Iter(ia), 0, std::ref(f)); + assert(it == Iter(ia)); + assert(f.count == 0); + } + + { + auto f = for_each_test(0); + Iter it = std::for_each_n(Iter(ia), s, std::ref(f)); + + assert(it == Iter(ia+s)); + assert(f.count == s); + for (unsigned i = 0; i < s; ++i) + assert(ia[i] == static_cast(i+1)); + } + + { + auto f = for_each_test(0); + Iter it = std::for_each_n(Iter(ia), 1, std::ref(f)); + + assert(it == Iter(ia+1)); + assert(f.count == 1); + for (unsigned i = 0; i < 1; ++i) + assert(ia[i] == static_cast(i+2)); + } +} Added: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.sh.cpp Mon May 29 16:26:10 2017 (r319146) @@ -0,0 +1,62 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11 +// REQUIRES: fcoroutines-ts + +// RUN: %build -fcoroutines-ts +// RUN: %run + +// + +// template +// struct coroutine_handle; + +// constexpr explicit operator bool() const noexcept + +#include +#include +#include + +#include "test_macros.h" + +namespace coro = std::experimental; + +template +void do_test() { + static_assert(std::is_nothrow_constructible::value, ""); + static_assert(!std::is_convertible::value, ""); + { + constexpr C c; ((void)c); + static_assert(bool(c) == false, ""); + } + { // null case + const C c = {}; ((void)c); + ASSERT_NOEXCEPT(bool(c)); + if (c) + assert(false); + else + assert(true); + assert(c.address() == nullptr); + assert(bool(c) == false); + } + { // non-null case + char dummy = 42; + C c = C::from_address((void*)&dummy); + assert(c.address() == &dummy); + assert(bool(c) == true); + } +} + +int main() +{ + do_test>(); + do_test>(); +} Added: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.sh.cpp Mon May 29 16:26:10 2017 (r319146) @@ -0,0 +1,64 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11 +// REQUIRES: fcoroutines-ts + +// RUN: %build -fcoroutines-ts +// RUN: %run + +// + +// template +// struct coroutine_handle; + +// bool operator==(coroutine_handle<>, coroutine_handle<>) noexcept +// bool operator!=(coroutine_handle<>, coroutine_handle<>) noexcept + +#include +#include +#include +#include +#include + +#include "test_macros.h" + +namespace coro = std::experimental; + +template +void do_test(uintptr_t LHSVal, uintptr_t RHSVal) { + const C LHS = C::from_address(reinterpret_cast(LHSVal)); + const C RHS = C::from_address(reinterpret_cast(RHSVal)); + const bool ExpectIsEqual = (LHSVal == RHSVal); + assert((LHS == RHS) == ExpectIsEqual); + assert((RHS == LHS) == ExpectIsEqual); + assert((LHS != RHS) == !ExpectIsEqual); + assert((RHS != LHS) == !ExpectIsEqual); + { + static_assert(noexcept(LHS == RHS), ""); + static_assert(noexcept(LHS != RHS), ""); + ASSERT_SAME_TYPE(decltype(LHS == RHS), bool); + ASSERT_SAME_TYPE(decltype(LHS != RHS), bool); + } +} + +int main() +{ + std::pair const TestCases[] = { + {0, 0}, + {16, 16}, + {0, 16}, + {16, 0} + }; + for (auto& TC : TestCases) { + do_test>(TC.first, TC.second); + do_test>(TC.first, TC.second); + } +} Added: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.sh.cpp Mon May 29 16:26:10 2017 (r319146) @@ -0,0 +1,73 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11 +// REQUIRES: fcoroutines-ts + +// RUN: %build -fcoroutines-ts +// RUN: %run + +// + +// template +// struct coroutine_handle; + +// bool operator<(coroutine_handle<>, coroutine_handle<>) noexcept +// bool operator>(coroutine_handle<>, coroutine_handle<>) noexcept +// bool operator>=(coroutine_handle<>, coroutine_handle<>) noexcept +// bool operator<=(coroutine_handle<>, coroutine_handle<>) noexcept + +#include +#include +#include +#include +#include + +#include "test_macros.h" + +namespace coro = std::experimental; + +template +void do_test(uintptr_t LHSVal, uintptr_t RHSVal) { + const C LHS = C::from_address(reinterpret_cast(LHSVal)); + const C RHS = C::from_address(reinterpret_cast(RHSVal)); + assert((LHS < RHS) == (LHSVal < RHSVal)); + assert((RHS < LHS) == (RHSVal < LHSVal)); + assert((LHS > RHS) == (LHSVal > RHSVal)); + assert((RHS > LHS) == (RHSVal > LHSVal)); + assert((LHS <= RHS) == (LHSVal <= RHSVal)); + assert((RHS <= LHS) == (RHSVal <= LHSVal)); + assert((LHS >= RHS) == (LHSVal >= RHSVal)); + assert((RHS >= LHS) == (RHSVal >= LHSVal)); + { + static_assert(noexcept(LHS < RHS), ""); + static_assert(noexcept(LHS > RHS), ""); + static_assert(noexcept(LHS <= RHS), ""); + static_assert(noexcept(LHS >= RHS), ""); + ASSERT_SAME_TYPE(decltype(LHS < RHS), bool); + ASSERT_SAME_TYPE(decltype(LHS > RHS), bool); + ASSERT_SAME_TYPE(decltype(LHS <= RHS), bool); + ASSERT_SAME_TYPE(decltype(LHS >= RHS), bool); + } +} + +int main() +{ + std::pair const TestCases[] = { + {0, 0}, + {16, 16}, + {0, 16}, + {16, 0} + }; + for (auto& TC : TestCases) { + do_test>(TC.first, TC.second); + do_test>(TC.first, TC.second); + } +} Added: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.sh.cpp Mon May 29 16:26:10 2017 (r319146) @@ -0,0 +1,48 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11 +// REQUIRES: fcoroutines-ts + +// RUN: %build -fcoroutines-ts +// RUN: %run + +// + +// template +// struct coroutine_handle; + +// bool done() const + +#include +#include +#include +#include +#include +#include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 29 16:26:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FD19D77914; Mon, 29 May 2017 16:26:18 +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 0841A80D90; Mon, 29 May 2017 16:26:17 +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 v4TGQHtW083371; Mon, 29 May 2017 16:26:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGQHXx083370; Mon, 29 May 2017 16:26:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291626.v4TGQHXx083370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319147 - vendor/libc++/libc++-trunk-r304149 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:26:18 -0000 Author: dim Date: Mon May 29 16:26:16 2017 New Revision: 319147 URL: https://svnweb.freebsd.org/changeset/base/319147 Log: Tag libc++ trunk r304149. Added: vendor/libc++/libc++-trunk-r304149/ - copied from r319146, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Mon May 29 16:26:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C4BCD77992; Mon, 29 May 2017 16:26: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 E425380E23; Mon, 29 May 2017 16:26:23 +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 v4TGQNB0083439; Mon, 29 May 2017 16:26:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGQKom083418; Mon, 29 May 2017 16:26:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291626.v4TGQKom083418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319148 - in vendor/lld/dist: COFF ELF test/COFF test/COFF/Inputs test/ELF test/ELF/Inputs test/ELF/linkerscript test/ELF/lto test/ELF/lto/Inputs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:26:24 -0000 Author: dim Date: Mon May 29 16:26:20 2017 New Revision: 319148 URL: https://svnweb.freebsd.org/changeset/base/319148 Log: Vendor import of lld trunk r304149: https://llvm.org/svn/llvm-project/lld/trunk@304149 Added: vendor/lld/dist/test/COFF/Inputs/delayimports-error.yaml vendor/lld/dist/test/COFF/Inputs/oldname.yaml vendor/lld/dist/test/COFF/delayimports-error.test vendor/lld/dist/test/COFF/dllimport-gc.test vendor/lld/dist/test/ELF/Inputs/rodynamic.s (contents, props changed) vendor/lld/dist/test/ELF/gdb-index-dup-types.s (contents, props changed) vendor/lld/dist/test/ELF/linkerscript/arm-lscript.s (contents, props changed) vendor/lld/dist/test/ELF/lto/Inputs/relocation-model-pic.ll vendor/lld/dist/test/ELF/lto/relocation-model.ll vendor/lld/dist/test/ELF/relocatable-comdat.s (contents, props changed) vendor/lld/dist/test/ELF/rodynamic.s (contents, props changed) Modified: vendor/lld/dist/COFF/ICF.cpp vendor/lld/dist/COFF/InputFiles.cpp vendor/lld/dist/COFF/InputFiles.h vendor/lld/dist/COFF/MarkLive.cpp vendor/lld/dist/COFF/PDB.cpp vendor/lld/dist/COFF/Symbols.cpp vendor/lld/dist/COFF/Symbols.h vendor/lld/dist/COFF/Writer.cpp vendor/lld/dist/ELF/Config.h vendor/lld/dist/ELF/Driver.cpp vendor/lld/dist/ELF/ICF.cpp vendor/lld/dist/ELF/InputFiles.cpp vendor/lld/dist/ELF/InputSection.cpp vendor/lld/dist/ELF/InputSection.h vendor/lld/dist/ELF/LTO.cpp vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/LinkerScript.h vendor/lld/dist/ELF/MapFile.cpp vendor/lld/dist/ELF/Options.td vendor/lld/dist/ELF/OutputSections.cpp vendor/lld/dist/ELF/OutputSections.h vendor/lld/dist/ELF/SyntheticSections.cpp vendor/lld/dist/ELF/SyntheticSections.h vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/ELF/Writer.h vendor/lld/dist/test/COFF/Inputs/import.yaml vendor/lld/dist/test/ELF/amdgpu-globals.s vendor/lld/dist/test/ELF/build-id.s vendor/lld/dist/test/ELF/gc-sections.s vendor/lld/dist/test/ELF/i386-tls-ie-shared.s vendor/lld/dist/test/ELF/linkerscript/sections-constraint.s vendor/lld/dist/test/ELF/relocation-size-shared.s vendor/lld/dist/test/ELF/relocation-size.s vendor/lld/dist/test/ELF/reproduce.s vendor/lld/dist/test/ELF/section-layout.s vendor/lld/dist/test/ELF/tls-i686.s Modified: vendor/lld/dist/COFF/ICF.cpp ============================================================================== --- vendor/lld/dist/COFF/ICF.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/COFF/ICF.cpp Mon May 29 16:26:20 2017 (r319148) @@ -56,7 +56,6 @@ private: std::vector Chunks; int Cnt = 0; - std::atomic NextId = {1}; std::atomic Repeat = {false}; }; @@ -98,10 +97,10 @@ void ICF::segregate(size_t Begin, size_t }); size_t Mid = Bound - Chunks.begin(); - // Split [Begin, End) into [Begin, Mid) and [Mid, End). - uint32_t Id = NextId++; + // Split [Begin, End) into [Begin, Mid) and [Mid, End). We use Mid as an + // equivalence class ID because every group ends with a unique index. for (size_t I = Begin; I < Mid; ++I) - Chunks[I]->Class[(Cnt + 1) % 2] = Id; + Chunks[I]->Class[(Cnt + 1) % 2] = Mid; // If we created a group, we need to iterate the main loop again. if (Mid != End) @@ -186,6 +185,7 @@ void ICF::forEachClass(std::function &Vec) { // Collect only mergeable sections and group by hash value. + uint32_t NextId = 1; for (Chunk *C : Vec) { - auto *SC = dyn_cast(C); - if (!SC) - continue; - - if (isEligible(SC)) { - // Set MSB to 1 to avoid collisions with non-hash classs. - SC->Class[0] = getHash(SC) | (1 << 31); - Chunks.push_back(SC); - } else { - SC->Class[0] = NextId++; + if (auto *SC = dyn_cast(C)) { + if (isEligible(SC)) + Chunks.push_back(SC); + else + SC->Class[0] = NextId++; } } - if (Chunks.empty()) - return; + // Initially, we use hash values to partition sections. + for (SectionChunk *SC : Chunks) + // Set MSB to 1 to avoid collisions with non-hash classs. + SC->Class[0] = getHash(SC) | (1 << 31); // From now on, sections in Chunks are ordered so that sections in // the same group are consecutive in the vector. @@ -229,14 +228,12 @@ void ICF::run(const std::vector // Compare static contents and assign unique IDs for each static content. forEachClass([&](size_t Begin, size_t End) { segregate(Begin, End, true); }); - ++Cnt; // Split groups by comparing relocations until convergence is obtained. do { Repeat = false; forEachClass( [&](size_t Begin, size_t End) { segregate(Begin, End, false); }); - ++Cnt; } while (Repeat); log("ICF needed " + Twine(Cnt) + " iterations"); Modified: vendor/lld/dist/COFF/InputFiles.cpp ============================================================================== --- vendor/lld/dist/COFF/InputFiles.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/COFF/InputFiles.cpp Mon May 29 16:26:20 2017 (r319148) @@ -48,13 +48,11 @@ namespace coff { /// alias to Target. static void checkAndSetWeakAlias(SymbolTable *Symtab, InputFile *F, SymbolBody *Source, SymbolBody *Target) { - auto *U = dyn_cast(Source); - if (!U) - return; - else if (!U->WeakAlias) + if (auto *U = dyn_cast(Source)) { + if (U->WeakAlias && U->WeakAlias != Target) + Symtab->reportDuplicate(Source->symbol(), F); U->WeakAlias = Target; - else if (U->WeakAlias != Target) - Symtab->reportDuplicate(Source->symbol(), F); + } } ArchiveFile::ArchiveFile(MemoryBufferRef M) : InputFile(ArchiveKind, M) {} @@ -153,8 +151,10 @@ void ObjectFile::initializeSymbols() { uint32_t NumSymbols = COFFObj->getNumberOfSymbols(); SymbolBodies.reserve(NumSymbols); SparseSymbolBodies.resize(NumSymbols); + SmallVector, 8> WeakAliases; int32_t LastSectionNumber = 0; + for (uint32_t I = 0; I < NumSymbols; ++I) { // Get a COFFSymbolRef object. ErrorOr SymOrErr = COFFObj->getSymbol(I); @@ -185,9 +185,12 @@ void ObjectFile::initializeSymbols() { I += Sym.getNumberOfAuxSymbols(); LastSectionNumber = Sym.getSectionNumber(); } - for (auto WeakAlias : WeakAliases) - checkAndSetWeakAlias(Symtab, this, WeakAlias.first, - SparseSymbolBodies[WeakAlias.second]); + + for (auto &KV : WeakAliases) { + SymbolBody *Sym = KV.first; + uint32_t Idx = KV.second; + checkAndSetWeakAlias(Symtab, this, Sym, SparseSymbolBodies[Idx]); + } } SymbolBody *ObjectFile::createUndefined(COFFSymbolRef Sym) { Modified: vendor/lld/dist/COFF/InputFiles.h ============================================================================== --- vendor/lld/dist/COFF/InputFiles.h Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/COFF/InputFiles.h Mon May 29 16:26:20 2017 (r319148) @@ -10,6 +10,7 @@ #ifndef LLD_COFF_INPUT_FILES_H #define LLD_COFF_INPUT_FILES_H +#include "Config.h" #include "lld/Core/LLVM.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseSet.h" @@ -161,7 +162,9 @@ private: // for details about the format. class ImportFile : public InputFile { public: - explicit ImportFile(MemoryBufferRef M) : InputFile(ImportKind, M) {} + explicit ImportFile(MemoryBufferRef M) + : InputFile(ImportKind, M), Live(!Config->DoGC) {} + static bool classof(const InputFile *F) { return F->kind() == ImportKind; } DefinedImportData *ImpSym = nullptr; @@ -176,6 +179,14 @@ public: StringRef ExternalName; const coff_import_header *Hdr; Chunk *Location = nullptr; + + // We want to eliminate dllimported symbols if no one actually refers them. + // This "Live" bit is used to keep track of which import library members + // are actually in use. + // + // If the Live bit is turned off by MarkLive, Writer will ignore dllimported + // symbols provided by this import library member. + bool Live; }; // Used for LTO. Modified: vendor/lld/dist/COFF/MarkLive.cpp ============================================================================== --- vendor/lld/dist/COFF/MarkLive.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/COFF/MarkLive.cpp Mon May 29 16:26:20 2017 (r319148) @@ -37,19 +37,26 @@ void markLive(const std::vector Worklist.push_back(C); }; + auto AddSym = [&](SymbolBody *B) { + if (auto *Sym = dyn_cast(B)) + Enqueue(Sym->getChunk()); + else if (auto *Sym = dyn_cast(B)) + Sym->File->Live = true; + else if (auto *Sym = dyn_cast(B)) + Sym->WrappedSym->File->Live = true; + }; + // Add GC root chunks. for (SymbolBody *B : Config->GCRoot) - if (auto *D = dyn_cast(B)) - Enqueue(D->getChunk()); + AddSym(B); while (!Worklist.empty()) { SectionChunk *SC = Worklist.pop_back_val(); assert(SC->isLive() && "We mark as live when pushing onto the worklist!"); // Mark all symbols listed in the relocation table for this section. - for (SymbolBody *S : SC->symbols()) - if (auto *D = dyn_cast(S)) - Enqueue(D->getChunk()); + for (SymbolBody *B : SC->symbols()) + AddSym(B); // Mark associative sections if any. for (SectionChunk *C : SC->children()) Modified: vendor/lld/dist/COFF/PDB.cpp ============================================================================== --- vendor/lld/dist/COFF/PDB.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/COFF/PDB.cpp Mon May 29 16:26:20 2017 (r319148) @@ -99,6 +99,12 @@ static void addTypeInfo(pdb::TpiStreamBu static void mergeDebugT(SymbolTable *Symtab, pdb::PDBFileBuilder &Builder, codeview::TypeTableBuilder &TypeTable, codeview::TypeTableBuilder &IDTable) { + // Follow type servers. If the same type server is encountered more than + // once for this instance of `PDBTypeServerHandler` (for example if many + // object files reference the same TypeServer), the types from the + // TypeServer will only be visited once. + pdb::PDBTypeServerHandler Handler; + // Visit all .debug$T sections to add them to Builder. for (ObjectFile *File : Symtab->ObjectFiles) { ArrayRef Data = getDebugSection(File, ".debug$T"); @@ -109,16 +115,11 @@ static void mergeDebugT(SymbolTable *Sym codeview::CVTypeArray Types; BinaryStreamReader Reader(Stream); SmallVector SourceToDest; - // Follow type servers. If the same type server is encountered more than - // once for this instance of `PDBTypeServerHandler` (for example if many - // object files reference the same TypeServer), the types from the - // TypeServer will only be visited once. - pdb::PDBTypeServerHandler Handler; Handler.addSearchPath(llvm::sys::path::parent_path(File->getName())); if (auto EC = Reader.readArray(Types, Reader.getLength())) fatal(EC, "Reader::readArray failed"); - if (auto Err = codeview::mergeTypeStreams(IDTable, TypeTable, SourceToDest, - &Handler, Types)) + if (auto Err = codeview::mergeTypeAndIdRecords( + IDTable, TypeTable, SourceToDest, &Handler, Types)) fatal(Err, "codeview::mergeTypeStreams failed"); } Modified: vendor/lld/dist/COFF/Symbols.cpp ============================================================================== --- vendor/lld/dist/COFF/Symbols.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/COFF/Symbols.cpp Mon May 29 16:26:20 2017 (r319148) @@ -61,16 +61,19 @@ COFFSymbolRef DefinedCOFF::getCOFFSymbol return COFFSymbolRef(reinterpret_cast(Sym)); } +static Chunk *makeImportThunk(DefinedImportData *S, uint16_t Machine) { + if (Machine == AMD64) + return make(S); + if (Machine == I386) + return make(S); + assert(Machine == ARMNT); + return make(S); +} + DefinedImportThunk::DefinedImportThunk(StringRef Name, DefinedImportData *S, uint16_t Machine) - : Defined(DefinedImportThunkKind, Name) { - switch (Machine) { - case AMD64: Data = make(S); return; - case I386: Data = make(S); return; - case ARMNT: Data = make(S); return; - default: llvm_unreachable("unknown machine type"); - } -} + : Defined(DefinedImportThunkKind, Name), WrappedSym(S), + Data(makeImportThunk(S, Machine)) {} Defined *Undefined::getWeakAlias() { // A weak alias may be a weak alias to another symbol, so check recursively. Modified: vendor/lld/dist/COFF/Symbols.h ============================================================================== --- vendor/lld/dist/COFF/Symbols.h Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/COFF/Symbols.h Mon May 29 16:26:20 2017 (r319148) @@ -300,7 +300,6 @@ public: void setLocation(Chunk *AddressTable) { File->Location = AddressTable; } uint16_t getOrdinal() { return File->Hdr->OrdinalHint; } -private: ImportFile *File; }; @@ -320,6 +319,8 @@ public: uint64_t getRVA() { return Data->getRVA(); } Chunk *getChunk() { return Data; } + DefinedImportData *WrappedSym; + private: Chunk *Data; }; Modified: vendor/lld/dist/COFF/Writer.cpp ============================================================================== --- vendor/lld/dist/COFF/Writer.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/COFF/Writer.cpp Mon May 29 16:26:20 2017 (r319148) @@ -365,6 +365,9 @@ void Writer::createImportTables() { // the same order as in the command line. (That affects DLL // initialization order, and this ordering is MSVC-compatible.) for (ImportFile *File : Symtab->ImportFiles) { + if (!File->Live) + continue; + std::string DLL = StringRef(File->DLLName).lower(); if (Config->DLLOrder.count(DLL) == 0) Config->DLLOrder[DLL] = Config->DLLOrder.size(); @@ -372,19 +375,28 @@ void Writer::createImportTables() { OutputSection *Text = createSection(".text"); for (ImportFile *File : Symtab->ImportFiles) { + if (!File->Live) + continue; + if (DefinedImportThunk *Thunk = File->ThunkSym) Text->addChunk(Thunk->getChunk()); + if (Config->DelayLoads.count(StringRef(File->DLLName).lower())) { + if (!File->ThunkSym) + fatal("cannot delay-load " + toString(File) + + " due to import of data: " + toString(*File->ImpSym)); DelayIdata.add(File->ImpSym); } else { Idata.add(File->ImpSym); } } + if (!Idata.empty()) { OutputSection *Sec = createSection(".idata"); for (Chunk *C : Idata.getChunks()) Sec->addChunk(C); } + if (!DelayIdata.empty()) { Defined *Helper = cast(Config->DelayLoadHelper); DelayIdata.create(Helper); @@ -437,6 +449,14 @@ Optional Writer::createSy if (!D->getChunk()->isLive()) return None; + if (auto *Sym = dyn_cast(Def)) + if (!Sym->File->Live) + return None; + + if (auto *Sym = dyn_cast(Def)) + if (!Sym->WrappedSym->File->Live) + return None; + coff_symbol16 Sym; StringRef Name = Def->getName(); if (Name.size() > COFF::NameSize) { @@ -491,14 +511,17 @@ void Writer::createSymbolAndStringTable( Sec->setStringTableOff(addEntryToStringTable(Name)); } - for (lld::coff::ObjectFile *File : Symtab->ObjectFiles) - for (SymbolBody *B : File->getSymbols()) - if (auto *D = dyn_cast(B)) - if (!D->WrittenToSymtab) { - D->WrittenToSymtab = true; - if (Optional Sym = createSymbol(D)) - OutputSymtab.push_back(*Sym); - } + for (lld::coff::ObjectFile *File : Symtab->ObjectFiles) { + for (SymbolBody *B : File->getSymbols()) { + auto *D = dyn_cast(B); + if (!D || D->WrittenToSymtab) + continue; + D->WrittenToSymtab = true; + + if (Optional Sym = createSymbol(D)) + OutputSymtab.push_back(*Sym); + } + } OutputSection *LastSection = OutputSections.back(); // We position the symbol table to be adjacent to the end of the last section. @@ -782,19 +805,15 @@ void Writer::writeBuildId() { if (BuildId == nullptr) return; - MD5 Hash; - MD5::MD5Result Res; - - Hash.update(ArrayRef{Buffer->getBufferStart(), - Buffer->getBufferEnd()}); - Hash.final(Res); - assert(BuildId->DI->Signature.CVSignature == OMF::Signature::PDB70 && "only PDB 7.0 is supported"); - assert(sizeof(Res) == sizeof(BuildId->DI->PDB70.Signature) && + assert(sizeof(BuildId->DI->PDB70.Signature) == 16 && "signature size mismatch"); - memcpy(BuildId->DI->PDB70.Signature, Res.Bytes.data(), - sizeof(codeview::PDB70DebugInfo::Signature)); + + // Compute an MD5 hash. + ArrayRef Buf(Buffer->getBufferStart(), Buffer->getBufferEnd()); + memcpy(BuildId->DI->PDB70.Signature, MD5::hash(Buf).data(), 16); + // TODO(compnerd) track the Age BuildId->DI->PDB70.Age = 1; } Modified: vendor/lld/dist/ELF/Config.h ============================================================================== --- vendor/lld/dist/ELF/Config.h Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/Config.h Mon May 29 16:26:20 2017 (r319148) @@ -145,6 +145,7 @@ struct Configuration { bool ZNow; bool ZOrigin; bool ZRelro; + bool ZRodynamic; bool ZText; bool ExitEarly; bool ZWxneeded; Modified: vendor/lld/dist/ELF/Driver.cpp ============================================================================== --- vendor/lld/dist/ELF/Driver.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/Driver.cpp Mon May 29 16:26:20 2017 (r319148) @@ -572,10 +572,14 @@ static std::pair getHashStyl // -build-id=sha1 are actually tree hashes for performance reasons. static std::pair> getBuildId(opt::InputArgList &Args) { - if (Args.hasArg(OPT_build_id)) + auto *Arg = Args.getLastArg(OPT_build_id, OPT_build_id_eq); + if (!Arg) + return {BuildIdKind::None, {}}; + + if (Arg->getOption().getID() == OPT_build_id) return {BuildIdKind::Fast, {}}; - StringRef S = getString(Args, OPT_build_id_eq, "none"); + StringRef S = Arg->getValue(); if (S == "md5") return {BuildIdKind::Md5, {}}; if (S == "sha1" || S == "tree") @@ -688,6 +692,7 @@ void LinkerDriver::readConfigs(opt::Inpu Config->ZNow = hasZOption(Args, "now"); Config->ZOrigin = hasZOption(Args, "origin"); Config->ZRelro = !hasZOption(Args, "norelro"); + Config->ZRodynamic = hasZOption(Args, "rodynamic"); Config->ZStackSize = getZOptionValue(Args, "stack-size", 0); Config->ZText = !hasZOption(Args, "notext"); Config->ZWxneeded = hasZOption(Args, "wxneeded"); Modified: vendor/lld/dist/ELF/ICF.cpp ============================================================================== --- vendor/lld/dist/ELF/ICF.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/ICF.cpp Mon May 29 16:26:20 2017 (r319148) @@ -326,9 +326,9 @@ void ICF::forEachClass(std::functi size_t NumShards = 256; size_t Step = Sections.size() / NumShards; parallelForEachN(0, NumShards, [&](size_t I) { - forEachClassRange(I * Step, (I + 1) * Step, Fn); + size_t End = (I == NumShards - 1) ? Sections.size() : (I + 1) * Step; + forEachClassRange(I * Step, End, Fn); }); - forEachClassRange(Step * NumShards, Sections.size(), Fn); ++Cnt; } Modified: vendor/lld/dist/ELF/InputFiles.cpp ============================================================================== --- vendor/lld/dist/ELF/InputFiles.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/InputFiles.cpp Mon May 29 16:26:20 2017 (r319148) @@ -281,18 +281,20 @@ bool elf::ObjectFile::shouldMerge( template void elf::ObjectFile::initializeSections( DenseSet &ComdatGroups) { + const ELFFile &Obj = this->getObj(); + ArrayRef ObjSections = check(this->getObj().sections(), toString(this)); - const ELFFile &Obj = this->getObj(); uint64_t Size = ObjSections.size(); this->Sections.resize(Size); - unsigned I = -1; + StringRef SectionStringTable = check(Obj.getSectionStringTable(ObjSections), toString(this)); - for (const Elf_Shdr &Sec : ObjSections) { - ++I; + + for (size_t I = 0, E = ObjSections.size(); I < E; I++) { if (this->Sections[I] == &InputSection::Discarded) continue; + const Elf_Shdr &Sec = ObjSections[I]; // SHF_EXCLUDE'ed sections are discarded by the linker. However, // if -r is given, we'll let the final link discard such sections. @@ -303,13 +305,22 @@ void elf::ObjectFile::initializeSe } switch (Sec.sh_type) { - case SHT_GROUP: - this->Sections[I] = &InputSection::Discarded; - if (ComdatGroups - .insert( - CachedHashStringRef(getShtGroupSignature(ObjSections, Sec))) - .second) + case SHT_GROUP: { + // We discard comdat sections usually. When -r we should not do that. We + // still do deduplication in this case to simplify implementation, because + // otherwise merging group sections together would requre additional + // regeneration of its contents. + bool New = ComdatGroups + .insert(CachedHashStringRef( + getShtGroupSignature(ObjSections, Sec))) + .second; + if (New && Config->Relocatable) + this->Sections[I] = createInputSection(Sec, SectionStringTable); + else + this->Sections[I] = &InputSection::Discarded; + if (New) continue; + for (uint32_t SecIndex : getShtGroupEntries(Sec)) { if (SecIndex >= Size) fatal(toString(this) + @@ -317,6 +328,7 @@ void elf::ObjectFile::initializeSe this->Sections[SecIndex] = &InputSection::Discarded; } break; + } case SHT_SYMTAB: this->initSymtab(ObjSections, &Sec); break; Modified: vendor/lld/dist/ELF/InputSection.cpp ============================================================================== --- vendor/lld/dist/ELF/InputSection.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/InputSection.cpp Mon May 29 16:26:20 2017 (r319148) @@ -23,6 +23,7 @@ #include "llvm/Support/Compression.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Path.h" +#include "llvm/Support/Threading.h" #include using namespace llvm; @@ -172,7 +173,8 @@ void InputSectionBase::uncompress() { if (Error E = Dec.decompress({OutputBuf, Size})) fatal(toString(this) + ": decompress failed: " + llvm::toString(std::move(E))); - Data = ArrayRef((uint8_t *)OutputBuf, Size); + this->Data = ArrayRef((uint8_t *)OutputBuf, Size); + this->Flags &= ~(uint64_t)SHF_COMPRESSED; } uint64_t SectionBase::getOffset(const DefinedRegular &Sym) const { @@ -293,6 +295,24 @@ bool InputSectionBase::classof(const Sec return S->kind() != Output; } +void InputSection::copyShtGroup(uint8_t *Buf) { + assert(this->Type == SHT_GROUP); + + ArrayRef From = getDataAs(); + uint32_t *To = reinterpret_cast(Buf); + + // First entry is a flag word, we leave it unchanged. + *To++ = From[0]; + + // Here we adjust indices of sections that belong to group as it + // might change during linking. + ArrayRef Sections = this->File->getSections(); + for (uint32_t Val : From.slice(1)) { + uint32_t Index = read32(&Val, Config->Endianness); + write32(To++, Sections[Index]->OutSec->SectionIndex, Config->Endianness); + } +} + InputSectionBase *InputSection::getRelocatedSection() { assert(this->Type == SHT_RELA || this->Type == SHT_REL); ArrayRef Sections = this->File->getSections(); @@ -678,6 +698,13 @@ template void InputSection: return; } + // If -r is given, linker should keep SHT_GROUP sections. We should fixup + // them, see copyShtGroup(). + if (this->Type == SHT_GROUP) { + copyShtGroup(Buf + OutSecOff); + return; + } + // Copy section contents from source object file to output file // and then apply relocations. memcpy(Buf + OutSecOff, Data.data(), Data.size()); @@ -866,7 +893,7 @@ const SectionPiece *MergeInputSection::g // it is not just an addition to a base output offset. uint64_t MergeInputSection::getOffset(uint64_t Offset) const { // Initialize OffsetMap lazily. - std::call_once(InitOffsetMap, [&] { + llvm::call_once(InitOffsetMap, [&] { OffsetMap.reserve(Pieces.size()); for (const SectionPiece &Piece : Pieces) OffsetMap[Piece.InputOff] = Piece.OutputOff; Modified: vendor/lld/dist/ELF/InputSection.h ============================================================================== --- vendor/lld/dist/ELF/InputSection.h Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/InputSection.h Mon May 29 16:26:20 2017 (r319148) @@ -18,6 +18,7 @@ #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/TinyPtrVector.h" #include "llvm/Object/ELF.h" +#include "llvm/Support/Threading.h" #include namespace lld { @@ -248,7 +249,7 @@ private: std::vector Hashes; mutable llvm::DenseMap OffsetMap; - mutable std::once_flag InitOffsetMap; + mutable llvm::once_flag InitOffsetMap; llvm::DenseSet LiveOffsets; }; @@ -318,6 +319,8 @@ public: private: template void copyRelocations(uint8_t *Buf, llvm::ArrayRef Rels); + + void copyShtGroup(uint8_t *Buf); }; // The list of all input sections. Modified: vendor/lld/dist/ELF/LTO.cpp ============================================================================== --- vendor/lld/dist/ELF/LTO.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/LTO.cpp Mon May 29 16:26:20 2017 (r319148) @@ -73,7 +73,12 @@ static std::unique_ptr createL Conf.Options = InitTargetOptionsFromCodeGenFlags(); Conf.Options.RelaxELFRelocations = true; - Conf.RelocModel = Config->Pic ? Reloc::PIC_ : Reloc::Static; + if (Config->Relocatable) + Conf.RelocModel = None; + else if (Config->Pic) + Conf.RelocModel = Reloc::PIC_; + else + Conf.RelocModel = Reloc::Static; Conf.CodeModel = GetCodeModelFromCMModel(); Conf.DisableVerify = Config->DisableVerify; Conf.DiagHandler = diagnosticHandler; Modified: vendor/lld/dist/ELF/LinkerScript.cpp ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/LinkerScript.cpp Mon May 29 16:26:20 2017 (r319148) @@ -20,6 +20,8 @@ #include "SymbolTable.h" #include "Symbols.h" #include "SyntheticSections.h" +#include "Target.h" +#include "Threads.h" #include "Writer.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" @@ -198,6 +200,15 @@ bool OutputSectionCommand::classof(const return C->Kind == OutputSectionKind; } +// Fill [Buf, Buf + Size) with Filler. +// This is used for linker script "=fillexp" command. +static void fill(uint8_t *Buf, size_t Size, uint32_t Filler) { + size_t I = 0; + for (; I + 4 < Size; I += 4) + memcpy(Buf + I, &Filler, 4); + memcpy(Buf + I, &Filler, Size - I); +} + bool InputSectionDescription::classof(const BaseCommand *C) { return C->Kind == InputSectionKind; } @@ -263,16 +274,16 @@ static bool matchConstraints(ArrayRef +std::vector LinkerScript::computeInputSections(const InputSectionDescription *Cmd) { - std::vector Ret; + std::vector Ret; // Collects all sections that satisfy constraints of Cmd. for (const SectionPattern &Pat : Cmd->SectionPatterns) { @@ -294,7 +305,7 @@ LinkerScript::computeInputSections(const !Pat.SectionPat.match(Sec->Name)) continue; - Ret.push_back(Sec); + Ret.push_back(cast(Sec)); Sec->Assigned = true; } @@ -309,8 +320,8 @@ LinkerScript::computeInputSections(const // --sort-section is handled as an inner SORT command. // 3. If one SORT command is given, and if it is SORT_NONE, don't sort. // 4. If no SORT command is given, sort according to --sort-section. - InputSectionBase **Begin = Ret.data() + SizeBefore; - InputSectionBase **End = Ret.data() + Ret.size(); + InputSection **Begin = Ret.data() + SizeBefore; + InputSection **End = Ret.data() + Ret.size(); if (Pat.SortOuter != SortSectionPolicy::None) { if (Pat.SortInner == SortSectionPolicy::Default) sortSections(Begin, End, Config->SortSection); @@ -493,7 +504,7 @@ void LinkerScript::addOrphanSections(Out Sec->SectionIndex = Index; } auto *ISD = make(""); - ISD->Sections.push_back(S); + ISD->Sections.push_back(cast(S)); Cmd->Commands.push_back(ISD); } } @@ -684,7 +695,6 @@ void LinkerScript::adjustSectionsBeforeS // '.' is assigned to, but creating these section should not have any bad // consequeces and gives us a section to put the symbol in. uint64_t Flags = SHF_ALLOC; - uint32_t Type = SHT_PROGBITS; for (int I = 0, E = Opt.Commands.size(); I != E; ++I) { auto *Cmd = dyn_cast(Opt.Commands[I]); @@ -692,14 +702,13 @@ void LinkerScript::adjustSectionsBeforeS continue; if (OutputSection *Sec = Cmd->Sec) { Flags = Sec->Flags; - Type = Sec->Type; continue; } if (isAllSectionDescription(*Cmd)) continue; - auto *OutSec = make(Cmd->Name, Type, Flags); + auto *OutSec = make(Cmd->Name, SHT_PROGBITS, Flags); OutSec->SectionIndex = I; OutputSections->push_back(OutSec); Cmd->Sec = OutSec; @@ -875,20 +884,20 @@ void LinkerScript::synchronize() { if (!Cmd) continue; ArrayRef Sections = Cmd->Sec->Sections; - std::vector ScriptSections; - DenseSet ScriptSectionsSet; + std::vector ScriptSections; + DenseSet ScriptSectionsSet; for (BaseCommand *Base : Cmd->Commands) { auto *ISD = dyn_cast(Base); if (!ISD) continue; - for (InputSectionBase *&IS : ISD->Sections) { + for (InputSection *&IS : ISD->Sections) { if (IS->Live) { ScriptSections.push_back(&IS); ScriptSectionsSet.insert(IS); } } } - std::vector Missing; + std::vector Missing; for (InputSection *IS : Sections) if (!ScriptSectionsSet.count(IS)) Missing.push_back(IS); @@ -896,7 +905,7 @@ void LinkerScript::synchronize() { auto ISD = make(""); ISD->Sections = Missing; Cmd->Commands.push_back(ISD); - for (InputSectionBase *&IS : ISD->Sections) + for (InputSection *&IS : ISD->Sections) if (IS->Live) ScriptSections.push_back(&IS); } @@ -1034,10 +1043,12 @@ OutputSectionCommand *LinkerScript::getC return I->second; } -Optional LinkerScript::getFiller(OutputSection *Sec) { - if (OutputSectionCommand *Cmd = getCmd(Sec)) - return Cmd->Filler; - return None; +uint32_t OutputSectionCommand::getFiller() { + if (Filler) + return *Filler; + if (Sec->Flags & SHF_EXECINSTR) + return Target->TrapInstr; + return 0; } static void writeInt(uint8_t *Buf, uint64_t Data, uint64_t Size) { @@ -1053,11 +1064,45 @@ static void writeInt(uint8_t *Buf, uint6 llvm_unreachable("unsupported Size argument"); } -void LinkerScript::writeDataBytes(OutputSection *Sec, uint8_t *Buf) { - if (OutputSectionCommand *Cmd = getCmd(Sec)) - for (BaseCommand *Base : Cmd->Commands) - if (auto *Data = dyn_cast(Base)) - writeInt(Buf + Data->Offset, Data->Expression().getValue(), Data->Size); +template void OutputSectionCommand::writeTo(uint8_t *Buf) { + Sec->Loc = Buf; + + // We may have already rendered compressed content when using + // -compress-debug-sections option. Write it together with header. + if (!Sec->CompressedData.empty()) { + memcpy(Buf, Sec->ZDebugHeader.data(), Sec->ZDebugHeader.size()); + memcpy(Buf + Sec->ZDebugHeader.size(), Sec->CompressedData.data(), + Sec->CompressedData.size()); + return; + } + + // Write leading padding. + ArrayRef Sections = Sec->Sections; + uint32_t Filler = getFiller(); + if (Filler) + fill(Buf, Sections.empty() ? Sec->Size : Sections[0]->OutSecOff, Filler); + + parallelForEachN(0, Sections.size(), [=](size_t I) { + InputSection *IS = Sections[I]; + IS->writeTo(Buf); + + // Fill gaps between sections. + if (Filler) { + uint8_t *Start = Buf + IS->OutSecOff + IS->getSize(); + uint8_t *End; + if (I + 1 == Sections.size()) + End = Buf + Sec->Size; + else + End = Buf + Sections[I + 1]->OutSecOff; + fill(Start, End - Start, Filler); + } + }); + + // Linker scripts may have BYTE()-family commands with which you + // can write arbitrary bytes to the output. Process them if any. + for (BaseCommand *Base : Commands) + if (auto *Data = dyn_cast(Base)) + writeInt(Buf + Data->Offset, Data->Expression().getValue(), Data->Size); } bool LinkerScript::hasLMA(OutputSection *Sec) { @@ -1104,3 +1149,8 @@ size_t LinkerScript::getPhdrIndex(const error(Loc + ": section header '" + PhdrName + "' is not listed in PHDRS"); return 0; } + +template void OutputSectionCommand::writeTo(uint8_t *Buf); +template void OutputSectionCommand::writeTo(uint8_t *Buf); +template void OutputSectionCommand::writeTo(uint8_t *Buf); +template void OutputSectionCommand::writeTo(uint8_t *Buf); Modified: vendor/lld/dist/ELF/LinkerScript.h ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.h Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/LinkerScript.h Mon May 29 16:26:20 2017 (r319148) @@ -130,6 +130,9 @@ struct OutputSectionCommand : BaseComman ConstraintKind Constraint = ConstraintKind::NoConstraint; std::string Location; std::string MemoryRegionName; + + template void writeTo(uint8_t *Buf); + uint32_t getFiller(); }; // This struct represents one section match pattern in SECTIONS() command. @@ -157,7 +160,7 @@ struct InputSectionDescription : BaseCom // will be associated with this InputSectionDescription. std::vector SectionPatterns; - std::vector Sections; + std::vector Sections; }; // Represents an ASSERT(). @@ -213,11 +216,10 @@ struct ScriptConfiguration { class LinkerScript final { llvm::DenseMap SecToCommand; - OutputSectionCommand *getCmd(OutputSection *Sec) const; void assignSymbol(SymbolAssignment *Cmd, bool InSec); void setDot(Expr E, const Twine &Loc, bool InSec); - std::vector + std::vector computeInputSections(const InputSectionDescription *); std::vector @@ -244,6 +246,7 @@ class LinkerScript final { MemoryRegion *CurMemRegion = nullptr; public: + OutputSectionCommand *getCmd(OutputSection *Sec) const; bool hasPhdrsCommands() { return !Opt.PhdrsCommands.empty(); } uint64_t getDot() { return Dot; } OutputSection *getOutputSection(const Twine &Loc, StringRef S); @@ -263,7 +266,6 @@ public: std::vector createPhdrs(); bool ignoreInterpSection(); - llvm::Optional getFiller(OutputSection *Sec); bool hasLMA(OutputSection *Sec); bool shouldKeep(InputSectionBase *S); void assignOffsets(OutputSectionCommand *Cmd); @@ -272,7 +274,6 @@ public: void synchronize(); void assignAddresses(std::vector &Phdrs); - void writeDataBytes(OutputSection *Sec, uint8_t *Buf); void addSymbol(SymbolAssignment *Cmd); void processCommands(OutputSectionFactory &Factory); Modified: vendor/lld/dist/ELF/MapFile.cpp ============================================================================== --- vendor/lld/dist/ELF/MapFile.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/MapFile.cpp Mon May 29 16:26:20 2017 (r319148) @@ -132,12 +132,17 @@ void elf::writeMapFile(llvm::ArrayRefName << '\n'; // Dump symbols for each input section. - for (InputSection *IS : OSec->Sections) { - writeHeader(OS, OSec->Addr + IS->OutSecOff, IS->getSize(), - IS->Alignment); - OS << indent(1) << toString(IS) << '\n'; - for (DefinedRegular *Sym : SectionSyms[IS]) - OS << SymStr[Sym] << '\n'; + for (BaseCommand *Base : Cmd->Commands) { + auto *ISD = dyn_cast(Base); + if (!ISD) + continue; + for (InputSection *IS : ISD->Sections) { + writeHeader(OS, OSec->Addr + IS->OutSecOff, IS->getSize(), + IS->Alignment); + OS << indent(1) << toString(IS) << '\n'; + for (DefinedRegular *Sym : SectionSyms[IS]) + OS << SymStr[Sym] << '\n'; + } } } } Modified: vendor/lld/dist/ELF/Options.td ============================================================================== --- vendor/lld/dist/ELF/Options.td Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/Options.td Mon May 29 16:26:20 2017 (r319148) @@ -313,6 +313,7 @@ def alias_o_output2 : Separate<["--"], " def alias_pie_pic_executable: F<"pic-executable">, Alias; def alias_print_map_M: Flag<["-"], "M">, Alias; def alias_relocatable_r: Flag<["-"], "r">, Alias; +def alias_reproduce_eq: J<"reproduce=">, Alias; def alias_retain_symbols_file: S<"retain-symbols-file">, Alias; def alias_rpath_R: JoinedOrSeparate<["-"], "R">, Alias; def alias_rpath_rpath: J<"rpath=">, Alias; Modified: vendor/lld/dist/ELF/OutputSections.cpp ============================================================================== --- vendor/lld/dist/ELF/OutputSections.cpp Mon May 29 16:26:16 2017 (r319147) +++ vendor/lld/dist/ELF/OutputSections.cpp Mon May 29 16:26:20 2017 (r319148) @@ -103,7 +103,7 @@ template void OutputSection // Write section contents to a temporary buffer and compress it. std::vector Buf(Size); - writeTo(Buf.data()); + Script->getCmd(this)->writeTo(Buf.data()); if (Error E = zlib::compress(toStringRef(Buf), CompressedData)) fatal("compress failed: " + llvm::toString(std::move(E))); @@ -112,6 +112,19 @@ template void OutputSection Flags |= SHF_COMPRESSED; } +template static void finalizeShtGroup(OutputSection *Sec) { + // sh_link field for SHT_GROUP sections should contain the section index of + // the symbol table. + Sec->Link = InX::SymTab->OutSec->SectionIndex; + + // sh_link then contain index of an entry in symbol table section which + // provides signature of the section group. + elf::ObjectFile *Obj = Sec->Sections[0]->getFile(); + assert(Config->Relocatable && Sec->Sections.size() == 1); + ArrayRef Symbols = Obj->getSymbols(); + Sec->Info = InX::SymTab->getSymbolIndex(Symbols[Sec->Sections[0]->Info - 1]); +} + template void OutputSection::finalize() { if ((this->Flags & SHF_LINK_ORDER) && !this->Sections.empty()) { std::sort(Sections.begin(), Sections.end(), compareByFilePosition); @@ -126,6 +139,11 @@ template void OutputSection } uint32_t Type = this->Type; + if (Type == SHT_GROUP) { + finalizeShtGroup(this); + return; + } + if (!Config->CopyRelocs || (Type != SHT_RELA && Type != SHT_REL)) return; @@ -259,69 +277,6 @@ void OutputSection::sortCtorsDtors() { std::stable_sort(Sections.begin(), Sections.end(), compCtors); } -// Fill [Buf, Buf + Size) with Filler. -// This is used for linker script "=fillexp" command. -static void fill(uint8_t *Buf, size_t Size, uint32_t Filler) { - size_t I = 0; - for (; I + 4 < Size; I += 4) - memcpy(Buf + I, &Filler, 4); - memcpy(Buf + I, &Filler, Size - I); -} - -uint32_t OutputSection::getFiller() { - // Determine what to fill gaps between InputSections with, as specified by the - // linker script. If nothing is specified and this is an executable section, - // fall back to trap instructions to prevent bad diassembly and detect invalid - // jumps to padding. - if (Optional Filler = Script->getFiller(this)) - return *Filler; - if (Flags & SHF_EXECINSTR) - return Target->TrapInstr; - return 0; -} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 29 16:26:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8582ED77A87; Mon, 29 May 2017 16:26: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 3B67880F8B; Mon, 29 May 2017 16:26: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 v4TGQbtY083601; Mon, 29 May 2017 16:26:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGQb99083600; Mon, 29 May 2017 16:26:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291626.v4TGQb99083600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319151 - vendor/lldb/lldb-trunk-r304149 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:26:38 -0000 Author: dim Date: Mon May 29 16:26:37 2017 New Revision: 319151 URL: https://svnweb.freebsd.org/changeset/base/319151 Log: Tag lldb trunk r304149. Added: vendor/lldb/lldb-trunk-r304149/ - copied from r319150, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Mon May 29 16:26:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E64DD779BC; Mon, 29 May 2017 16:26:28 +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 12F7C80E93; Mon, 29 May 2017 16:26:28 +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 v4TGQRWV083488; Mon, 29 May 2017 16:26:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGQRda083487; Mon, 29 May 2017 16:26:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291626.v4TGQRda083487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319149 - vendor/lld/lld-trunk-r304149 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:26:28 -0000 Author: dim Date: Mon May 29 16:26:26 2017 New Revision: 319149 URL: https://svnweb.freebsd.org/changeset/base/319149 Log: Tag lld trunk r304149. Added: vendor/lld/lld-trunk-r304149/ - copied from r319148, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Mon May 29 16:26:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EB64D77A4E; Mon, 29 May 2017 16:26:34 +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 24D0180F34; Mon, 29 May 2017 16:26:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TGQXju083552; Mon, 29 May 2017 16:26:33 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TGQVhR083535; Mon, 29 May 2017 16:26:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705291626.v4TGQVhR083535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 May 2017 16:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319150 - in vendor/lldb/dist: docs include/lldb include/lldb/API include/lldb/Core include/lldb/Host include/lldb/Host/common include/lldb/Target include/lldb/Utility packages/Python/l... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 16:26:34 -0000 Author: dim Date: Mon May 29 16:26:31 2017 New Revision: 319150 URL: https://svnweb.freebsd.org/changeset/base/319150 Log: Vendor import of lldb trunk r304149: https://llvm.org/svn/llvm-project/lldb/trunk@304149 Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/num_threads/ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/num_threads/main.cpp (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/sbstructureddata/ vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py (contents, props changed) Deleted: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/Makefile vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/TestNumThreads.py vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/main.cpp Modified: vendor/lldb/dist/docs/lldb-gdb-remote.txt vendor/lldb/dist/include/lldb/API/SBStructuredData.h vendor/lldb/dist/include/lldb/API/SBTrace.h vendor/lldb/dist/include/lldb/Core/StructuredData.h vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h vendor/lldb/dist/include/lldb/Core/TraceOptions.h vendor/lldb/dist/include/lldb/Host/Editline.h vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h vendor/lldb/dist/include/lldb/Target/Process.h vendor/lldb/dist/include/lldb/Utility/StringExtractor.h vendor/lldb/dist/include/lldb/lldb-enumerations.h vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/unwind_expression/main.cpp vendor/lldb/dist/scripts/interface/SBStructuredData.i vendor/lldb/dist/scripts/lldb.swig vendor/lldb/dist/source/API/SBProcess.cpp vendor/lldb/dist/source/API/SBStructuredData.cpp vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/API/SBTrace.cpp vendor/lldb/dist/source/Commands/CommandObjectThread.cpp vendor/lldb/dist/source/Core/FormatEntity.cpp vendor/lldb/dist/source/Core/StructuredData.cpp vendor/lldb/dist/source/Host/common/Editline.cpp vendor/lldb/dist/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp vendor/lldb/dist/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h vendor/lldb/dist/source/Target/Process.cpp vendor/lldb/dist/source/Target/Thread.cpp vendor/lldb/dist/source/Utility/StringExtractor.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.h vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp vendor/lldb/dist/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp Modified: vendor/lldb/dist/docs/lldb-gdb-remote.txt ============================================================================== --- vendor/lldb/dist/docs/lldb-gdb-remote.txt Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/docs/lldb-gdb-remote.txt Mon May 29 16:26:31 2017 (r319150) @@ -209,6 +209,163 @@ send packet: QListThreadsInStopReply read packet: OK //---------------------------------------------------------------------- +// jTraceStart: +// +// BRIEF +// Packet for starting trace of type lldb::TraceType. The following +// parameters should be appended to the packet formatted as a JSON +// dictionary, where the schematic for the JSON dictionary in terms of +// the recognized Keys is given below in the table. +// Different tracing types could require different custom parameters. +// Such custom tracing parameters if needed should be collectively +// specified in a JSON dictionary and the dictionary can be appended +// to this packet (as Value corresponding to "params"). Since sending +// JSON data over gdb-remote protocol has certain limitations, binary +// escaping convention should be used. +// +// Following is the list of parameters - +// +// Key Value (Integer) (O)Optional/ +// (except params which should be a (M)Mandatory +// JSON dictionary) +// ========== ==================================================== +// +// type The type of trace to start (see M +// lldb-enumerations for TraceType) +// +// buffersize The size of the buffer to allocate M +// for trace gathering. +// +// threadid The id of the thread to start tracing O +// on. +// +// metabuffersize The size of buffer to hold meta data O +// used for decoding the trace data. +// +// params Any parameters that are specific to O +// certain trace technologies should be +// collectively specified as a JSON +// dictionary +// ========== ==================================================== +// +// Each tracing instance is identified by a trace id which is returned +// as the reply to this packet. In case the tracing failed to begin an +// error code is returned instead. +//---------------------------------------------------------------------- + +send packet: jTraceStart:{"type":,"buffersize":}] +read packet: /E + +//---------------------------------------------------------------------- +// jTraceStop: +// +// BRIEF +// Stop tracing instance with trace id , of course trace +// needs to be started before. The following parameters should be +// formatted as a JSON dictionary to the packet. Since sending +// JSON data over gdb-remote protocol has certain limitations, binary +// escaping convention should be used. +// +// Following is the list of parameters - +// +// Key Value (Integer) (O)Optional/ +// (M)Mandatory +// ========== ==================================================== +// +// traceid The trace id of the tracing instance M +// +// threadid The id of the thread to stop tracing O +// on. Since could map to +// multiple trace instances (in case it +// maps to the complete process), the +// threadid of a particular thread could +// be appended as "threadid:;" +// to stop tracing on that thread. +// ========== ==================================================== +// +// An OK response is sent in case of success else an error code is +// returned. +//---------------------------------------------------------------------- + +send packet: jTraceStop:{"traceid":}] +read packet: /E + +//---------------------------------------------------------------------- +// jTraceBufferRead: +// +// BRIEF +// Packet for reading the trace for tracing instance , i.e the +// id obtained from StartTrace API. The following parameters should be +// formatted as a JSON dictionary to the packet. Since sending +// JSON data over gdb-remote protocol has certain limitations, binary +// escaping convention should be used. +// +// Following is the list of parameters - +// +// Key Value (Integer) (O)Optional/ +// (M)Mandatory +// ========== ==================================================== +// traceid The trace id of the tracing instance M +// +// offset The offset to start reading the data M +// from. +// +// buffersize The size of the data intended to read. M +// +// threadid The id of the thread to retrieve data O +// from. +// ========== ==================================================== +// +// The trace data is sent as raw binary data if the read was successful +// else an error code is sent. +//---------------------------------------------------------------------- + +send packet: jTraceBufferRead:{"traceid":,"offset":,"buffersize":}] +read packet: /E + +//---------------------------------------------------------------------- +// jTraceMetaRead: +// +// BRIEF +// Similar Packet as above except it reads meta data. +//---------------------------------------------------------------------- + +/---------------------------------------------------------------------- +// jTraceConfigRead: +// +// BRIEF +// Request the trace configuration for the tracing instance with id +// . +// +// Following is the list of parameters - +// +// Key Value (Integer) (O)Optional/ +// (M)Mandatory +// ========== ==================================================== +// traceid The trace id of the tracing instance M +// +// threadid The id of the thread to obtain trace O +// configuration from. Since +// could map to multiple trace instances +// (in case it maps to the complete +// process), the threadid of a particular +// thread could be appended as +// "threadid:;" to obtain the +// trace configuration of that thread. +// ========== ==================================================== +// +// In the response packet the trace configuration is sent as text, +// formatted as a JSON dictionary. Since sending JSON data over +// gdb-remote protocol has certain limitations, binary escaping +// convention is used. +// In case the trace instance with the was not found, an +// error code is returned. +//---------------------------------------------------------------------- + +send packet: jTraceConfigRead:{"traceid":} +read packet: {"conf1":,"conf2":,"params":{"paramName":paramValue}]}];/E + +//---------------------------------------------------------------------- // "qRegisterInfo" // // BRIEF Modified: vendor/lldb/dist/include/lldb/API/SBStructuredData.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBStructuredData.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/API/SBStructuredData.h Mon May 29 16:26:31 2017 (r319150) @@ -37,11 +37,70 @@ public: lldb::SBError GetDescription(lldb::SBStream &stream) const; + //------------------------------------------------------------------ + /// Return the type of data in this data structure + //------------------------------------------------------------------ + lldb::StructuredDataType GetType() const; + + //------------------------------------------------------------------ + /// Return the size (i.e. number of elements) in this data structure + /// if it is an array or dictionary type. For other types, 0 will be + // returned. + //------------------------------------------------------------------ + size_t GetSize() const; + + //------------------------------------------------------------------ + /// Return the value corresponding to a key if this data structure + /// is a dictionary type. + //------------------------------------------------------------------ + lldb::SBStructuredData GetValueForKey(const char *key) const; + + //------------------------------------------------------------------ + /// Return the value corresponding to an index if this data structure + /// is array. + //------------------------------------------------------------------ + lldb::SBStructuredData GetItemAtIndex(size_t idx) const; + + //------------------------------------------------------------------ + /// Return the integer value if this data structure is an integer type. + //------------------------------------------------------------------ + uint64_t GetIntegerValue(uint64_t fail_value = 0) const; + + //------------------------------------------------------------------ + /// Return the floating point value if this data structure is a floating + /// type. + //------------------------------------------------------------------ + double GetFloatValue(double fail_value = 0.0) const; + + //------------------------------------------------------------------ + /// Return the boolean value if this data structure is a boolean type. + //------------------------------------------------------------------ + bool GetBooleanValue(bool fail_value = false) const; + + //------------------------------------------------------------------ + /// Provides the string value if this data structure is a string type. + /// + /// @param[out] dst + /// pointer where the string value will be written. In case it is null, + /// nothing will be written at @dst. + /// + /// @param[in] dst_len + /// max number of characters that can be written at @dst. In case it is + /// zero, nothing will be written at @dst. If this length is not enough + /// to write the complete string value, (dst_len-1) bytes of the string + /// value will be written at @dst followed by a null character. + /// + /// @return + /// Returns the byte size needed to completely write the string value at + /// @dst in all cases. + //------------------------------------------------------------------ + size_t GetStringValue(char *dst, size_t dst_len) const; + protected: friend class SBTraceOptions; StructuredDataImplUP m_impl_up; }; -} +} // namespace lldb #endif /* SBStructuredData_h */ Modified: vendor/lldb/dist/include/lldb/API/SBTrace.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBTrace.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/API/SBTrace.h Mon May 29 16:26:31 2017 (r319150) @@ -40,7 +40,7 @@ public: /// /// @param[in] thread_id /// Tracing could be started for the complete process or a - /// single thread, in the first case the uid obtained would + /// single thread, in the first case the traceid obtained would /// map to all the threads existing within the process and the /// ones spawning later. The thread_id parameter can be used in /// such a scenario to select the trace data for a specific @@ -68,16 +68,17 @@ public: /// An error explaining what went wrong. /// /// @param[in] thread_id - /// The user id could map to a tracing instance for a thread + /// The trace id could map to a tracing instance for a thread /// or could also map to a group of threads being traced with /// the same trace options. A thread_id is normally optional /// except in the case of tracing a complete process and tracing /// needs to switched off on a particular thread. /// A situation could occur where initially a thread (lets say - /// thread A) is being individually traced with a particular uid - /// and then tracing is started on the complete process, in this - /// case thread A will continue without any change. All newly - /// spawned threads would be traced with the uid of the process. + /// thread A) is being individually traced with a particular + /// trace id and then tracing is started on the complete + /// process, in this case thread A will continue without any + /// change. All newly spawned threads would be traced with the + /// trace id of the process. /// Now if the StopTrace API is called for the whole process, /// thread A will not be stopped and must be stopped separately. //------------------------------------------------------------------ Modified: vendor/lldb/dist/include/lldb/Core/StructuredData.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/StructuredData.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/Core/StructuredData.h Mon May 29 16:26:31 2017 (r319150) @@ -13,7 +13,8 @@ #include "llvm/ADT/StringRef.h" #include "lldb/Utility/ConstString.h" -#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/Utility/FileSpec.h" // for FileSpec +#include "lldb/lldb-enumerations.h" // for StructuredDataType #include #include @@ -71,46 +72,38 @@ public: typedef std::shared_ptr DictionarySP; typedef std::shared_ptr GenericSP; - enum class Type { - eTypeInvalid = -1, - eTypeNull = 0, - eTypeGeneric, - eTypeArray, - eTypeInteger, - eTypeFloat, - eTypeBoolean, - eTypeString, - eTypeDictionary - }; - class Object : public std::enable_shared_from_this { public: - Object(Type t = Type::eTypeInvalid) : m_type(t) {} + Object(lldb::StructuredDataType t = lldb::eStructuredDataTypeInvalid) + : m_type(t) {} virtual ~Object() = default; virtual bool IsValid() const { return true; } - virtual void Clear() { m_type = Type::eTypeInvalid; } + virtual void Clear() { m_type = lldb::eStructuredDataTypeInvalid; } - Type GetType() const { return m_type; } + lldb::StructuredDataType GetType() const { return m_type; } - void SetType(Type t) { m_type = t; } + void SetType(lldb::StructuredDataType t) { m_type = t; } Array *GetAsArray() { - return ((m_type == Type::eTypeArray) ? static_cast(this) - : nullptr); + return ((m_type == lldb::eStructuredDataTypeArray) + ? static_cast(this) + : nullptr); } Dictionary *GetAsDictionary() { - return ((m_type == Type::eTypeDictionary) - ? static_cast(this) - : nullptr); + return ( + (m_type == lldb::eStructuredDataTypeDictionary) + ? static_cast(this) + : nullptr); } Integer *GetAsInteger() { - return ((m_type == Type::eTypeInteger) ? static_cast(this) - : nullptr); + return ((m_type == lldb::eStructuredDataTypeInteger) + ? static_cast(this) + : nullptr); } uint64_t GetIntegerValue(uint64_t fail_value = 0) { @@ -119,8 +112,9 @@ public: } Float *GetAsFloat() { - return ((m_type == Type::eTypeFloat) ? static_cast(this) - : nullptr); + return ((m_type == lldb::eStructuredDataTypeFloat) + ? static_cast(this) + : nullptr); } double GetFloatValue(double fail_value = 0.0) { @@ -129,8 +123,9 @@ public: } Boolean *GetAsBoolean() { - return ((m_type == Type::eTypeBoolean) ? static_cast(this) - : nullptr); + return ((m_type == lldb::eStructuredDataTypeBoolean) + ? static_cast(this) + : nullptr); } bool GetBooleanValue(bool fail_value = false) { @@ -139,8 +134,9 @@ public: } String *GetAsString() { - return ((m_type == Type::eTypeString) ? static_cast(this) - : nullptr); + return ((m_type == lldb::eStructuredDataTypeString) + ? static_cast(this) + : nullptr); } llvm::StringRef GetStringValue(const char *fail_value = nullptr) { @@ -152,8 +148,9 @@ public: } Generic *GetAsGeneric() { - return ((m_type == Type::eTypeGeneric) ? static_cast(this) - : nullptr); + return ((m_type == lldb::eStructuredDataTypeGeneric) + ? static_cast(this) + : nullptr); } ObjectSP GetObjectForDotSeparatedPath(llvm::StringRef path); @@ -163,12 +160,12 @@ public: virtual void Dump(Stream &s, bool pretty_print = true) const = 0; private: - Type m_type; + lldb::StructuredDataType m_type; }; class Array : public Object { public: - Array() : Object(Type::eTypeArray) {} + Array() : Object(lldb::eStructuredDataTypeArray) {} ~Array() override = default; @@ -288,7 +285,8 @@ public: class Integer : public Object { public: - Integer(uint64_t i = 0) : Object(Type::eTypeInteger), m_value(i) {} + Integer(uint64_t i = 0) + : Object(lldb::eStructuredDataTypeInteger), m_value(i) {} ~Integer() override = default; @@ -304,7 +302,8 @@ public: class Float : public Object { public: - Float(double d = 0.0) : Object(Type::eTypeFloat), m_value(d) {} + Float(double d = 0.0) : Object(lldb::eStructuredDataTypeFloat), + m_value(d) {} ~Float() override = default; @@ -320,7 +319,8 @@ public: class Boolean : public Object { public: - Boolean(bool b = false) : Object(Type::eTypeBoolean), m_value(b) {} + Boolean(bool b = false) : Object(lldb::eStructuredDataTypeBoolean), + m_value(b) {} ~Boolean() override = default; @@ -336,9 +336,10 @@ public: class String : public Object { public: - String() : Object(Type::eTypeString) {} + String() : Object(lldb::eStructuredDataTypeString) {} explicit String(llvm::StringRef S) - : Object(Type::eTypeString), m_value(S) {} + : Object(lldb::eStructuredDataTypeString), + m_value(S) {} void SetValue(llvm::StringRef S) { m_value = S; } @@ -352,7 +353,8 @@ public: class Dictionary : public Object { public: - Dictionary() : Object(Type::eTypeDictionary), m_dict() {} + Dictionary() : Object(lldb::eStructuredDataTypeDictionary), + m_dict() {} ~Dictionary() override = default; @@ -522,7 +524,7 @@ public: class Null : public Object { public: - Null() : Object(Type::eTypeNull) {} + Null() : Object(lldb::eStructuredDataTypeNull) {} ~Null() override = default; @@ -534,7 +536,7 @@ public: class Generic : public Object { public: explicit Generic(void *object = nullptr) - : Object(Type::eTypeGeneric), m_object(object) {} + : Object(lldb::eStructuredDataTypeGeneric), m_object(object) {} void SetValue(void *value) { m_object = value; } Modified: vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/Core/StructuredDataImpl.h Mon May 29 16:26:31 2017 (r319150) @@ -15,7 +15,9 @@ #include "lldb/Target/StructuredDataPlugin.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/Stream.h" +#include "lldb/lldb-enumerations.h" #include "lldb/lldb-forward.h" +#include "llvm/ADT/StringRef.h" #pragma mark-- #pragma mark StructuredDataImpl @@ -78,18 +80,77 @@ public: return plugin_sp->GetDescription(m_data_sp, stream); } - StructuredData::ObjectSP GetObjectSP() { - return m_data_sp; + StructuredData::ObjectSP GetObjectSP() { return m_data_sp; } + + void SetObjectSP(const StructuredData::ObjectSP &obj) { m_data_sp = obj; } + + lldb::StructuredDataType GetType() const { + return (m_data_sp ? m_data_sp->GetType() : + lldb::eStructuredDataTypeInvalid); + } + + size_t GetSize() const { + if (!m_data_sp) + return 0; + + if (m_data_sp->GetType() == lldb::eStructuredDataTypeDictionary) { + auto dict = m_data_sp->GetAsDictionary(); + return (dict->GetSize()); + } else if (m_data_sp->GetType() == lldb::eStructuredDataTypeArray) { + auto array = m_data_sp->GetAsArray(); + return (array->GetSize()); + } else + return 0; + } + + StructuredData::ObjectSP GetValueForKey(const char *key) const { + if (m_data_sp) { + auto dict = m_data_sp->GetAsDictionary(); + if (dict) + return dict->GetValueForKey(llvm::StringRef(key)); + } + return StructuredData::ObjectSP(); + } + + StructuredData::ObjectSP GetItemAtIndex(size_t idx) const { + if (m_data_sp) { + auto array = m_data_sp->GetAsArray(); + if (array) + return array->GetItemAtIndex(idx); + } + return StructuredData::ObjectSP(); } - void SetObjectSP(const StructuredData::ObjectSP &obj) { - m_data_sp = obj; + uint64_t GetIntegerValue(uint64_t fail_value = 0) const { + return (m_data_sp ? m_data_sp->GetIntegerValue(fail_value) : fail_value); } -private: + double GetFloatValue(double fail_value = 0.0) const { + return (m_data_sp ? m_data_sp->GetFloatValue(fail_value) : fail_value); + } + bool GetBooleanValue(bool fail_value = false) const { + return (m_data_sp ? m_data_sp->GetBooleanValue(fail_value) : fail_value); + } + + size_t GetStringValue(char *dst, size_t dst_len) const { + if (!m_data_sp) + return 0; + + llvm::StringRef result = m_data_sp->GetStringValue(); + if (result.empty()) + return 0; + + if (!dst || !dst_len) { + char s[1]; + return (::snprintf(s, 1, "%s", result.data())); + } + return (::snprintf(dst, dst_len, "%s", result.data())); + } + +private: lldb::StructuredDataPluginWP m_plugin_wp; StructuredData::ObjectSP m_data_sp; }; -} +} // namespace lldb_private #endif Modified: vendor/lldb/dist/include/lldb/Core/TraceOptions.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/TraceOptions.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/Core/TraceOptions.h Mon May 29 16:26:31 2017 (r319150) @@ -18,8 +18,7 @@ namespace lldb_private { class TraceOptions { public: - TraceOptions() - : m_trace_params(new StructuredData::Dictionary()) {} + TraceOptions() : m_trace_params(new StructuredData::Dictionary()) {} const StructuredData::DictionarySP &getTraceParams() const { return m_trace_params; @@ -43,7 +42,7 @@ public: void setThreadID(lldb::tid_t thread_id) { m_thread_id = thread_id; } - lldb::tid_t getThreadID() { return m_thread_id; } + lldb::tid_t getThreadID() const { return m_thread_id; } private: lldb::TraceType m_type; Modified: vendor/lldb/dist/include/lldb/Host/Editline.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/Editline.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/Host/Editline.h Mon May 29 16:26:31 2017 (r319150) @@ -82,8 +82,14 @@ using EditLineStringStreamType = std::st using EditLineCharType = char; #endif +#ifdef EL_CLIENTDATA /* editline with wide support + wide char read function */ +using EditLineGetCharType = wchar_t; +#else +using EditLineGetCharType = char; +#endif + typedef int (*EditlineGetCharCallbackType)(::EditLine *editline, - EditLineCharType *c); + EditLineGetCharType *c); typedef unsigned char (*EditlineCommandCallbackType)(::EditLine *editline, int ch); typedef const char *(*EditlinePromptCallbackType)(::EditLine *editline); @@ -270,7 +276,7 @@ private: /// Character reading implementation for EditLine that supports our multi-line /// editing trickery. - int GetCharacter(EditLineCharType *c); + int GetCharacter(EditLineGetCharType *c); /// Prompt implementation for EditLine. const char *Prompt(); @@ -323,7 +329,7 @@ private: /// single or multi-line editing. void ConfigureEditor(bool multiline); - bool CompleteCharacter(char ch, EditLineCharType &out); + bool CompleteCharacter(char ch, EditLineGetCharType &out); private: #if LLDB_EDITLINE_USE_WCHAR Modified: vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Mon May 29 16:26:31 2017 (r319150) @@ -10,6 +10,7 @@ #ifndef liblldb_NativeProcessProtocol_h_ #define liblldb_NativeProcessProtocol_h_ +#include "lldb/Core/TraceOptions.h" #include "lldb/Host/MainLoop.h" #include "lldb/Utility/Status.h" #include "lldb/lldb-private-forward.h" @@ -308,6 +309,108 @@ public: static Status Attach(lldb::pid_t pid, NativeDelegate &native_delegate, MainLoop &mainloop, NativeProcessProtocolSP &process_sp); + //------------------------------------------------------------------ + /// StartTracing API for starting a tracing instance with the + /// TraceOptions on a specific thread or process. + /// + /// @param[in] config + /// The configuration to use when starting tracing. + /// + /// @param[out] error + /// Status indicates what went wrong. + /// + /// @return + /// The API returns a user_id which can be used to get trace + /// data, trace configuration or stopping the trace instance. + /// The user_id is a key to identify and operate with a tracing + /// instance. It may refer to the complete process or a single + /// thread. + //------------------------------------------------------------------ + virtual lldb::user_id_t StartTrace(const TraceOptions &config, + Status &error) { + error.SetErrorString("Not implemented"); + return LLDB_INVALID_UID; + } + + //------------------------------------------------------------------ + /// StopTracing API as the name suggests stops a tracing instance. + /// + /// @param[in] uid + /// The user id of the trace intended to be stopped. Now a + /// user_id may map to multiple threads in which case this API + /// could be used to stop the tracing for a specific thread by + /// supplying its thread id. + /// + /// @param[in] thread + /// Thread is needed when the complete process is being traced + /// and the user wishes to stop tracing on a particular thread. + /// + /// @return + /// Status indicating what went wrong. + //------------------------------------------------------------------ + virtual Status StopTrace(lldb::user_id_t uid, + lldb::tid_t thread = LLDB_INVALID_THREAD_ID) { + return Status("Not implemented"); + } + + //------------------------------------------------------------------ + /// This API provides the trace data collected in the form of raw + /// data. + /// + /// @param[in] uid thread + /// The uid and thread provide the context for the trace + /// instance. + /// + /// @param[in] buffer + /// The buffer provides the destination buffer where the trace + /// data would be read to. The buffer should be truncated to the + /// filled length by this function. + /// + /// @param[in] offset + /// There is possibility to read partially the trace data from + /// a specified offset where in such cases the buffer provided + /// may be smaller than the internal trace collection container. + /// + /// @return + /// The size of the data actually read. + //------------------------------------------------------------------ + virtual Status GetData(lldb::user_id_t uid, lldb::tid_t thread, + llvm::MutableArrayRef &buffer, + size_t offset = 0) { + return Status("Not implemented"); + } + + //------------------------------------------------------------------ + /// Similar API as above except it aims to provide any extra data + /// useful for decoding the actual trace data. + //------------------------------------------------------------------ + virtual Status GetMetaData(lldb::user_id_t uid, lldb::tid_t thread, + llvm::MutableArrayRef &buffer, + size_t offset = 0) { + return Status("Not implemented"); + } + + //------------------------------------------------------------------ + /// API to query the TraceOptions for a given user id + /// + /// @param[in] uid + /// The user id of the tracing instance. + /// + /// @param[in] config + /// The thread id of the tracing instance, in case configuration + /// for a specific thread is needed should be specified in the + /// config. + /// + /// @param[out] error + /// Status indicates what went wrong. + /// + /// @param[out] config + /// The actual configuration being used for tracing. + //------------------------------------------------------------------ + virtual Status GetTraceConfig(lldb::user_id_t uid, TraceOptions &config) { + return Status("Not implemented"); + } + protected: lldb::pid_t m_pid; @@ -381,6 +484,6 @@ protected: private: void SynchronouslyNotifyProcessStateChanged(lldb::StateType state); }; -} +} // namespace lldb_private #endif // #ifndef liblldb_NativeProcessProtocol_h_ Modified: vendor/lldb/dist/include/lldb/Target/Process.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/Process.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/Target/Process.h Mon May 29 16:26:31 2017 (r319150) @@ -2781,7 +2781,7 @@ public: /// GetTraceConfig should supply the actual used trace /// configuration. //------------------------------------------------------------------ - virtual lldb::user_id_t StartTrace(lldb::TraceOptionsSP &options, + virtual lldb::user_id_t StartTrace(const TraceOptions &options, Status &error) { error.SetErrorString("Not implemented"); return LLDB_INVALID_UID; @@ -2796,9 +2796,8 @@ public: /// In the other case that tracing on an individual thread needs /// to be stopped a thread_id can be supplied. //------------------------------------------------------------------ - virtual void StopTrace(lldb::user_id_t uid, lldb::tid_t thread_id, - Status &error) { - error.SetErrorString("Not implemented"); + virtual Status StopTrace(lldb::user_id_t uid, lldb::tid_t thread_id) { + return Status("Not implemented"); } //------------------------------------------------------------------ @@ -2809,21 +2808,19 @@ public: /// may not. The thread_id should be used to select a particular /// thread for trace extraction. //------------------------------------------------------------------ - virtual size_t GetData(lldb::user_id_t uid, lldb::tid_t thread_id, - Status &error, void *buf, size_t size, + virtual Status GetData(lldb::user_id_t uid, lldb::tid_t thread_id, + llvm::MutableArrayRef &buffer, size_t offset = 0) { - error.SetErrorString("Not implemented"); - return 0; + return Status("Not implemented"); } //------------------------------------------------------------------ /// Similar API as above except for obtaining meta data //------------------------------------------------------------------ - virtual size_t GetMetaData(lldb::user_id_t uid, lldb::tid_t thread_id, - Status &error, void *buf, size_t size, + virtual Status GetMetaData(lldb::user_id_t uid, lldb::tid_t thread_id, + llvm::MutableArrayRef &buffer, size_t offset = 0) { - error.SetErrorString("Not implemented"); - return 0; + return Status("Not implemented"); } //------------------------------------------------------------------ @@ -2835,10 +2832,8 @@ public: /// configuration used by a specific thread. The thread_id specified /// should also match the uid otherwise an error will be returned. //------------------------------------------------------------------ - virtual void GetTraceConfig(lldb::user_id_t uid, Status &error, - lldb::TraceOptionsSP &options) { - error.SetErrorString("Not implemented"); - return; + virtual Status GetTraceConfig(lldb::user_id_t uid, TraceOptions &options) { + return Status("Not implemented"); } protected: Modified: vendor/lldb/dist/include/lldb/Utility/StringExtractor.h ============================================================================== --- vendor/lldb/dist/include/lldb/Utility/StringExtractor.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/Utility/StringExtractor.h Mon May 29 16:26:31 2017 (r319150) @@ -111,6 +111,8 @@ public: size_t GetHexByteStringTerminatedBy(std::string &str, char terminator); + bool ConsumeFront(const llvm::StringRef &str); + const char *Peek() { if (m_index < m_packet.size()) return m_packet.c_str() + m_index; Modified: vendor/lldb/dist/include/lldb/lldb-enumerations.h ============================================================================== --- vendor/lldb/dist/include/lldb/lldb-enumerations.h Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/include/lldb/lldb-enumerations.h Mon May 29 16:26:31 2017 (r319150) @@ -725,6 +725,18 @@ enum TraceType { eTraceTypeProcessorTrace }; +enum StructuredDataType { + eStructuredDataTypeInvalid = -1, + eStructuredDataTypeNull = 0, + eStructuredDataTypeGeneric, + eStructuredDataTypeArray, + eStructuredDataTypeInteger, + eStructuredDataTypeFloat, + eStructuredDataTypeBoolean, + eStructuredDataTypeString, + eStructuredDataTypeDictionary +}; + FLAGS_ENUM(TypeClass){ eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0), eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2), Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py Mon May 29 16:26:31 2017 (r319150) @@ -18,15 +18,9 @@ from lldbsuite.test import lldbutil class UnwindFromExpressionTest(TestBase): mydir = TestBase.compute_mydir(__file__) + main_spec = lldb.SBFileSpec("main.cpp", False) - def setUp(self): - # Call super's setUp(). - TestBase.setUp(self) - - @add_test_categories(['pyapi']) - @expectedFailureAll(oslist=["windows"]) - def test_unwind_expression(self): - """Test unwinding from an expression.""" + def build_and_run_to_bkpt(self): self.build() exe = os.path.join(os.getcwd(), "a.out") @@ -35,9 +29,8 @@ class UnwindFromExpressionTest(TestBase) self.assertTrue(target, VALID_TARGET) # Create the breakpoint. - main_spec = lldb.SBFileSpec("main.cpp", False) breakpoint = target.BreakpointCreateBySourceRegex( - "// Set a breakpoint here to get started", main_spec) + "// Set a breakpoint here to get started", self.main_spec) self.assertTrue(breakpoint, VALID_BREAKPOINT) # Launch the process, and do not stop at the entry point. @@ -52,24 +45,60 @@ class UnwindFromExpressionTest(TestBase) "instead the actual state is: '%s'" % lldbutil.state_type_to_str(process.GetState())) - thread = lldbutil.get_one_thread_stopped_at_breakpoint( + self.thread = lldbutil.get_one_thread_stopped_at_breakpoint( process, breakpoint) self.assertIsNotNone( - thread, "Expected one thread to be stopped at the breakpoint") + self.thread, "Expected one thread to be stopped at the breakpoint") + + # Next set a breakpoint in this function, set up Expression options to stop on + # breakpoint hits, and call the function. + self.fun_bkpt = self.target().BreakpointCreateBySourceRegex( + "// Stop inside the function here.", self.main_spec) + self.assertTrue(self.fun_bkpt, VALID_BREAKPOINT) + + + @no_debug_info_test + @expectedFailureAll(bugnumber="llvm.org/pr33164") + def test_conditional_bktp(self): + """ + Test conditional breakpoint handling in the IgnoreBreakpoints = False case + """ + self.build_and_run_to_bkpt() + + self.fun_bkpt.SetCondition("0") # Should not get hit + options = lldb.SBExpressionOptions() + options.SetIgnoreBreakpoints(False) + options.SetUnwindOnError(False) + + main_frame = self.thread.GetFrameAtIndex(0) + val = main_frame.EvaluateExpression("second_function(47)", options) + self.assertTrue( + val.GetError().Success(), + "We did complete the execution.") + self.assertEquals(47, val.GetValueAsSigned()) + + @add_test_categories(['pyapi']) + @expectedFailureAll(oslist=["windows"]) + def test_unwind_expression(self): + """Test unwinding from an expression.""" + self.build_and_run_to_bkpt() + + # Run test with varying one thread timeouts to also test the halting + # logic in the IgnoreBreakpoints = False case + self.do_unwind_test(self.thread, self.fun_bkpt, 1000) + self.do_unwind_test(self.thread, self.fun_bkpt, 100000) + + def do_unwind_test(self, thread, bkpt, timeout): # # Use Python API to evaluate expressions while stopped in a stack frame. # main_frame = thread.GetFrameAtIndex(0) - # Next set a breakpoint in this function, set up Expression options to stop on - # breakpoint hits, and call the function. - fun_bkpt = target.BreakpointCreateBySourceRegex( - "// Stop inside the function here.", main_spec) - self.assertTrue(fun_bkpt, VALID_BREAKPOINT) options = lldb.SBExpressionOptions() options.SetIgnoreBreakpoints(False) options.SetUnwindOnError(False) + options.SetOneThreadTimeoutInMicroSeconds(timeout) val = main_frame.EvaluateExpression("a_function_to_call()", options) @@ -82,7 +111,7 @@ class UnwindFromExpressionTest(TestBase) "And the reason was right.") thread = lldbutil.get_one_thread_stopped_at_breakpoint( - process, fun_bkpt) + self.process(), bkpt) self.assertTrue( thread.IsValid(), "We are indeed stopped at our breakpoint") Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/unwind_expression/main.cpp ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/unwind_expression/main.cpp Mon May 29 16:26:26 2017 (r319149) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/unwind_expression/main.cpp Mon May 29 16:26:31 2017 (r319150) @@ -7,8 +7,16 @@ a_function_to_call() return static_value; } +int second_function(int x){ + for(int i=0; i<10; ++i) { + a_function_to_call(); + } + return x; +} + int main (int argc, char const *argv[]) { a_function_to_call(); // Set a breakpoint here to get started + second_function(1); return 0; } Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile Mon May 29 16:26:31 2017 (r319150) @@ -0,0 +1,5 @@ +LEVEL = ../../../make + +CXX_SOURCES := main.cpp +ENABLE_THREADS := YES +include $(LEVEL)/Makefile.rules Added: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py Mon May 29 16:26:31 2017 (r319150) @@ -0,0 +1,61 @@ +""" +Test number of threads. +""" + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 29 18:11:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFE53D7CB04; Mon, 29 May 2017 18:11:46 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::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 4FB898415B; Mon, 29 May 2017 18:11:46 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id b84so19599026wmh.0; Mon, 29 May 2017 11:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Ap1pOPr7aRTzYzfDfZ/KYI6se++1iaXxKmwnK2s1egQ=; b=hnTvilDSIBfzx0haY+UilX/4Pj105QNqIU/UzFLh7TEDsLIkmqZLtDsUeNd5ZlI4Uk +3494rcSWxBvZ5wK+5DoZGNHqfMVZ6yOqGWMnNXaPwjED1V/qtlDisxRnTQd1JjXAWgn hk5zT/tya509m4W0NVAmNqzhxz0o3I1yK4NQOPkALJHp2cfhVSpegOx506JMFa20RmCL aj8qHRi9Ny1rJ0uMSABvDtap1QsINbEpvNCW1ax6sMGI0RGzfhEM+QfX7+08C47gS/70 hRI/p4VDzsH/7Og6QE1cbdQ6RKTd0VozjDiiMNY90uRJZTVkogq4g95ilCF28eYWktJX iOXg== 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=Ap1pOPr7aRTzYzfDfZ/KYI6se++1iaXxKmwnK2s1egQ=; b=ZgO52kXGi/wsAIspieRct0kq5QnJUmgyVIZT/f4Ha3ONp0nMN0iGBRd9h6Eab8aZRH tcqlNhY7pVW+KdbjUr+ByV9Y0zv8zIDh8NMzssxZLsYllPl8pRQnRs4B4KgISivFnhDc ybWB2N31Xnn9QOjwADtC/5Z/i9Q3NJYF+hUpFcc6zqJQZzU/0l8uyObnRCHY97GHw3z6 xBuvegBkj2BTPT3BWkEbOY8VVbKrVH2A2Nn7CdzmcUAKP+YIZuSyLhBfCTr3xha6iHX3 uqJR8dv1O2Ck35+gjrZZN7kYxPEcvF6ybsoB9GUstwNav3MdJUCwqA/W2S5Y8Y6OGq2c Ph1Q== X-Gm-Message-State: AODbwcAlm8DXyq/wJVwVfU40JlgHY5yiR2KP9YU7wOaPJFC1f6lV/i76 1yEiRE0OG4OtvxPe X-Received: by 10.223.151.107 with SMTP id r98mr6034349wrb.6.1496081504838; Mon, 29 May 2017 11:11:44 -0700 (PDT) Received: from brick (cpc92310-cmbg19-2-0-cust934.5-4.cable.virginm.net. [82.9.227.167]) by smtp.gmail.com with ESMTPSA id m11sm16554593wmg.34.2017.05.29.11.11.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 May 2017 11:11:44 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 29 May 2017 19:11:41 +0100 From: Edward Tomasz Napierala To: "Rodney W. Grimes" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r319080 - head/share/man/man5 Message-ID: <20170529181141.GA25108@brick> Mail-Followup-To: "Rodney W. Grimes" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705281809.v4SI9nT2024664@repo.freebsd.org> <201705290308.v4T38w6k020345@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705290308.v4T38w6k020345@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 18:11:46 -0000 On 0528T2008, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: trasz > > Date: Sun May 28 18:09:49 2017 > > New Revision: 319080 > > URL: https://svnweb.freebsd.org/changeset/base/319080 > > > > Log: > > Fix Xrs; they were pointing to the wrong section. > > > > MFC after: 2 weeks > > > > Modified: > > head/share/man/man5/mount.conf.5 > > > > Modified: head/share/man/man5/mount.conf.5 > > ============================================================================== > > --- head/share/man/man5/mount.conf.5 Sun May 28 18:07:53 2017 (r319079) > > +++ head/share/man/man5/mount.conf.5 Sun May 28 18:09:49 2017 (r319080) > > @@ -52,7 +52,7 @@ The logic for this is in > > .Fn vfs_mountroot_conf0 . > > .It > > The kernel will first mount > > -.Xr devfs 8 > > +.Xr devfs 5 > > as the root file system. > > Um, no, devfs(8) is the command, devfs(5) is the config > file that descripts what devfs(8) well do. This sentence > does read very well to me: > The kernel will first mount devfs(8) as the root file system? > Neither devfs(8) or (5) is a file system one is a utility > command and the other is a config file. Erm, no - devfs(5) is the filesystem man page. The config file is devfs.rules(5). Yeah, it's kind of weird that filesystems are in section 5. From owner-svn-src-all@freebsd.org Mon May 29 18:16:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95147D7CDEB; Mon, 29 May 2017 18:16:19 +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 129E184424; Mon, 29 May 2017 18:16: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 v4TIGHwk023352; Mon, 29 May 2017 11:16:17 -0700 (PDT) (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 v4TIGHQg023351; Mon, 29 May 2017 11:16:17 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201705291816.v4TIGHQg023351@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r319080 - head/share/man/man5 In-Reply-To: <20170529181141.GA25108@brick> To: Edward Tomasz Napierala Date: Mon, 29 May 2017 11:16:17 -0700 (PDT) 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 18:16:19 -0000 > On 0528T2008, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > > Author: trasz > > > Date: Sun May 28 18:09:49 2017 > > > New Revision: 319080 > > > URL: https://svnweb.freebsd.org/changeset/base/319080 > > > > > > Log: > > > Fix Xrs; they were pointing to the wrong section. > > > > > > MFC after: 2 weeks > > > > > > Modified: > > > head/share/man/man5/mount.conf.5 > > > > > > Modified: head/share/man/man5/mount.conf.5 > > > ============================================================================== > > > --- head/share/man/man5/mount.conf.5 Sun May 28 18:07:53 2017 (r319079) > > > +++ head/share/man/man5/mount.conf.5 Sun May 28 18:09:49 2017 (r319080) > > > @@ -52,7 +52,7 @@ The logic for this is in > > > .Fn vfs_mountroot_conf0 . > > > .It > > > The kernel will first mount > > > -.Xr devfs 8 > > > +.Xr devfs 5 > > > as the root file system. > > > > Um, no, devfs(8) is the command, devfs(5) is the config > > file that descripts what devfs(8) well do. This sentence > > does read very well to me: > > The kernel will first mount devfs(8) as the root file system? > > Neither devfs(8) or (5) is a file system one is a utility > > command and the other is a config file. > > Erm, no - devfs(5) is the filesystem man page. The config file > is devfs.rules(5). > > Yeah, it's kind of weird that filesystems are in section 5. Yes, ignore me, sorry for the noise. I realized that we had devfs(5) and devfs.rules(5) after I sent this. And yes, filesystems being in 5 is odd, but appears to be the best (for some very small value of best) fit. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon May 29 18:17:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31B35D7CE89; Mon, 29 May 2017 18:17:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0AC084568; Mon, 29 May 2017 18:17:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TIHZpp028757; Mon, 29 May 2017 18:17:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TIHYlq028745; Mon, 29 May 2017 18:17:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705291817.v4TIHYlq028745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 18:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319152 - in stable/11: . share/man/man4 sys/cam/ctl sys/conf sys/modules sys/modules/cfiscsi sys/modules/ctl usr.sbin/ctladm usr.sbin/ctld X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 18:17:37 -0000 Author: ngie Date: Mon May 29 18:17:34 2017 New Revision: 319152 URL: https://svnweb.freebsd.org/changeset/base/319152 Log: MFC r314659,r314676: r314659: usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output r314676: Fix build after r314656 Some of the changes I introduced to use .ALLSRC were correct in spirit, but incorrect in reality -- in particular, ../Makefile.inc hadn't been pulled in via bsd.init.mk (via bsd.lib.mk, bsd.prog.mk), so the value of .ALLSRC (evaluated immediately) was empty. .include bsd.init.mk explicitly so we can be certain that the values used as dependencies in the targets are defined when the target recipe has been evaluated. Reminder: thou shalt separate out separate functional changes before committing them. (YUGE) Pointyhat to: ngie In collaboration with: bdrewery Added: stable/11/share/man/man4/cfiscsi.4 - copied unchanged from r316212, head/share/man/man4/cfiscsi.4 stable/11/sys/modules/cfiscsi/ - copied from r316212, head/sys/modules/cfiscsi/ Modified: stable/11/UPDATING stable/11/share/man/man4/Makefile stable/11/share/man/man4/ctl.4 stable/11/sys/cam/ctl/ctl_frontend_iscsi.c stable/11/sys/conf/files stable/11/sys/modules/Makefile stable/11/sys/modules/ctl/Makefile stable/11/usr.sbin/ctladm/Makefile stable/11/usr.sbin/ctladm/ctladm.c stable/11/usr.sbin/ctld/Makefile stable/11/usr.sbin/ctld/kernel.c Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Mon May 29 16:26:37 2017 (r319151) +++ stable/11/UPDATING Mon May 29 18:17:34 2017 (r319152) @@ -22,6 +22,19 @@ from older version of current across the installed. To continue using aarch64-binutils, set CROSS_BINUTILS_PREFIX=/usr/local/aarch64-freebsd/bin . +20170529: + The ctl.ko module no longer implements the iSCSI target frontend: + cfiscsi.ko does instead. + + If building cfiscsi.ko as a kernel module, the module can be loaded + via one of the following methods: + - `cfiscsi_load="YES"` in loader.conf(5). + - Add `cfiscsi` to `$kld_list` in rc.conf(5). + - ctladm(8)/ctld(8), when compiled with iSCSI support + (`WITH_ISCSI=yes` in src.conf(5)) + + Please see cfiscsi(4) for more details. + 20170511: The mmcsd.ko module now additionally depends on geom_flashmap.ko. Also, mmc.ko and mmcsd.ko need to be a matching pair built from the Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Mon May 29 16:26:37 2017 (r319151) +++ stable/11/share/man/man4/Makefile Mon May 29 18:17:34 2017 (r319152) @@ -894,6 +894,7 @@ _dtrace_udp.4= dtrace_udp.4 .endif .if ${MK_ISCSI} != "no" +MAN+= cfiscsi.4 MAN+= iscsi.4 MAN+= iscsi_initiator.4 MAN+= iser.4 Copied: stable/11/share/man/man4/cfiscsi.4 (from r316212, head/share/man/man4/cfiscsi.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man4/cfiscsi.4 Mon May 29 18:17:34 2017 (r319152, copy of r316212, head/share/man/man4/cfiscsi.4) @@ -0,0 +1,104 @@ +.\" Copyright (c) 2013 Edward Tomasz Napierala +.\" Copyright (c) 2015-2017 Alexander Motin +.\" Copyright (c) 2017 Ngie Cooper +.\" 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 March 29, 2017 +.Dt CFISCSI 4 +.Os +.Sh NAME +.Nm cfiscsi +.Nd CAM Target Layer iSCSI target frontend +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device cfiscsi" +.Cd "device ctl" +.Cd "device iscsi" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +cfiscsi_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +subsystem provides iSCSI target device emulation via +.Xr ctl 4 +and +.Xr iscsi 4 . +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va kern.cam.ctl.iscsi.debug +Verbosity level for log messages from the kernel part of iSCSI target. +Set to 0 to disable logging or 1 to warn about potential problems. +Larger values enable debugging output. +Defaults to 1. +.It Va kern.cam.ctl.iscsi.maxtags +The number of outstanding commands to advertise to each iSCSI initiator. +Current implementation is not very accurate, so do not set this below 2. +Defaults to 256. +.It Va kern.cam.ctl.iscsi.ping_timeout +The number of seconds to wait for the iSCSI initiator to respond to a NOP-In +PDU. +In the event that there is no response within that time the session gets +forcibly terminated. +Set to 0 to disable sending NOP-In PDUs. +Defaults to 5. +.El +.Sh SEE ALSO +.Xr ctl 4 , +.Xr iscsi 4 +.Sh HISTORY +The +.Nm +subsystem first appeared in +.Fx 10.0 +as part of the +.Xr ctl 4 +driver. +It was split off of +.Xr ctl 4 +in +.Fx 12.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +subsystem was developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. +This manual page was written by +.An Ngie Cooper Aq Mt ngie@FreeBSD.org . Modified: stable/11/share/man/man4/ctl.4 ============================================================================== --- stable/11/share/man/man4/ctl.4 Mon May 29 16:26:37 2017 (r319151) +++ stable/11/share/man/man4/ctl.4 Mon May 29 18:17:34 2017 (r319152) @@ -24,18 +24,17 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd March 19, 2017 +.Dd March 29, 2017 .Dt CTL 4 .Os .Sh NAME .Nm ctl -.Nd CAM Target Layer / iSCSI target subsystem +.Nd CAM Target Layer .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent -.Cd "device iscsi" .Cd "device ctl" .Ed .Pp @@ -106,11 +105,8 @@ Provides access for local user-level app .Xr ioctl 2 based API. .It iscsi -Combined with -.Xr iscsi 4 -and -.Xr ctld 8 , -provides access for remote systems via iSCSI protocol. +Provides access for remote systems via the iSCSI protocol using +.Xr cfiscsi 4 . .It tpc Internal frontend used to receive requests from Third Party Copy engine, implementing copy offload operations. @@ -194,24 +190,9 @@ the opposite change -- opens. If there is no primary node (both nodes are secondary, or secondary node has no connection to primary one), secondary node(s) report Transitioning state. State with two primary nodes is illegal (split brain condition). -.It Va kern.cam.ctl.iscsi.debug -Verbosity level for log messages from the kernel part of iSCSI target. -Set to 0 to disable logging or 1 to warn about potential problems. -Larger values enable debugging output. -Defaults to 1. -.It Va kern.cam.ctl.iscsi.maxtags -The number of outstanding commands to advertise to each iSCSI initiator. -Current implementation is not very accurate, so do not set this below 2. -Defaults to 256. -.It Va kern.cam.ctl.iscsi.ping_timeout -The number of seconds to wait for the iSCSI initiator to respond to a NOP-In -PDU. -In the event that there is no response within that time the session gets -forcibly terminated. -Set to 0 to disable sending NOP-In PDUs. -Defaults to 5. .El .Sh SEE ALSO +.Xr cfiscsi 4 , .Xr cfumass 4 , .Xr ctladm 8 , .Xr ctld 8 , Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Mon May 29 16:26:37 2017 (r319151) +++ stable/11/sys/cam/ctl/ctl_frontend_iscsi.c Mon May 29 18:17:34 2017 (r319152) @@ -184,8 +184,8 @@ static struct ctl_frontend cfiscsi_front .ioctl = cfiscsi_ioctl, .shutdown = cfiscsi_shutdown, }; -CTL_FRONTEND_DECLARE(ctlcfiscsi, cfiscsi_frontend); -MODULE_DEPEND(ctlcfiscsi, icl, 1, 1, 1); +CTL_FRONTEND_DECLARE(cfiscsi, cfiscsi_frontend); +MODULE_DEPEND(cfiscsi, icl, 1, 1, 1); static struct icl_pdu * cfiscsi_pdu_new_response(struct icl_pdu *request, int flags) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Mon May 29 16:26:37 2017 (r319151) +++ stable/11/sys/conf/files Mon May 29 18:17:34 2017 (r319152) @@ -102,7 +102,7 @@ cam/ctl/ctl_cmd_table.c optional ctl cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl cam/ctl/ctl_frontend_ioctl.c optional ctl -cam/ctl/ctl_frontend_iscsi.c optional ctl +cam/ctl/ctl_frontend_iscsi.c optional ctl cfiscsi cam/ctl/ctl_ha.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl cam/ctl/ctl_tpc.c optional ctl @@ -1750,10 +1750,10 @@ ipw_monitor.fw optional ipwmonitorfw | compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_monitor.fw" -dev/iscsi/icl.c optional iscsi | ctl -dev/iscsi/icl_conn_if.m optional iscsi | ctl -dev/iscsi/icl_soft.c optional iscsi | ctl -dev/iscsi/icl_soft_proxy.c optional iscsi | ctl +dev/iscsi/icl.c optional iscsi +dev/iscsi/icl_conn_if.m optional cfiscsi | iscsi +dev/iscsi/icl_soft.c optional iscsi +dev/iscsi/icl_soft_proxy.c optional iscsi dev/iscsi/iscsi.c optional iscsi scbus dev/iscsi_initiator/iscsi.c optional iscsi_initiator scbus dev/iscsi_initiator/iscsi_subr.c optional iscsi_initiator scbus Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Mon May 29 16:26:37 2017 (r319151) +++ stable/11/sys/modules/Makefile Mon May 29 18:17:34 2017 (r319152) @@ -492,6 +492,7 @@ _ipfilter= ipfilter .endif .if ${MK_ISCSI} != "no" || defined(ALL_MODULES) +SUBDIR+= cfiscsi SUBDIR+= iscsi SUBDIR+= iscsi_initiator .endif Modified: stable/11/sys/modules/ctl/Makefile ============================================================================== --- stable/11/sys/modules/ctl/Makefile Mon May 29 16:26:37 2017 (r319151) +++ stable/11/sys/modules/ctl/Makefile Mon May 29 18:17:34 2017 (r319152) @@ -12,7 +12,6 @@ SRCS+= ctl_cmd_table.c SRCS+= ctl_frontend.c SRCS+= ctl_frontend_cam_sim.c SRCS+= ctl_frontend_ioctl.c -SRCS+= ctl_frontend_iscsi.c SRCS+= ctl_ha.c SRCS+= ctl_scsi_all.c SRCS+= ctl_tpc.c @@ -23,11 +22,10 @@ SRCS+= scsi_ctl.c SRCS+= bus_if.h SRCS+= device_if.h SRCS+= vnode_if.h -SRCS+= icl_conn_if.h SRCS+= opt_cam.h #CFLAGS+=-DICL_KERNEL_PROXY -MFILES= kern/bus_if.m kern/device_if.m dev/iscsi/icl_conn_if.m +MFILES= kern/bus_if.m kern/device_if.m .include Modified: stable/11/usr.sbin/ctladm/Makefile ============================================================================== --- stable/11/usr.sbin/ctladm/Makefile Mon May 29 16:26:37 2017 (r319151) +++ stable/11/usr.sbin/ctladm/Makefile Mon May 29 18:17:34 2017 (r319152) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= ctladm SRCS= ctladm.c util.c ctl_util.c ctl_scsi_all.c .PATH: ${SRCTOP}/sys/cam/ctl @@ -17,4 +19,8 @@ WARNS?= 3 LIBADD= cam sbuf bsdxml util MAN= ctladm.8 +.if ${MK_ISCSI} != "no" +CFLAGS+= -DWANT_ISCSI +.endif + .include Modified: stable/11/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/11/usr.sbin/ctladm/ctladm.c Mon May 29 16:26:37 2017 (r319151) +++ stable/11/usr.sbin/ctladm/ctladm.c Mon May 29 18:17:34 2017 (r319152) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -4147,6 +4148,13 @@ main(int argc, char **argv) retval = 1; goto bailout; } +#ifdef WANT_ISCSI + else { + if (modfind("cfiscsi") == -1 && + kldload("cfiscsi") == -1) + warn("couldn't load cfiscsi"); + } +#endif } else if ((command != CTLADM_CMD_HELP) && ((cmdargs & CTLADM_ARG_DEVICE) == 0)) { fprintf(stderr, "%s: you must specify a device with the " Modified: stable/11/usr.sbin/ctld/Makefile ============================================================================== --- stable/11/usr.sbin/ctld/Makefile Mon May 29 16:26:37 2017 (r319151) +++ stable/11/usr.sbin/ctld/Makefile Mon May 29 18:17:34 2017 (r319152) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + CFLAGS+=-I${SRCTOP}/contrib/libucl/include .PATH: ${SRCTOP}/contrib/libucl/include @@ -21,4 +23,8 @@ CLEANFILES= y.tab.c y.tab.h y.output WARNS?= 6 NO_WMISSING_VARIABLE_DECLARATIONS= +.if ${MK_ISCSI} != "no" +CFLAGS+= -DWANT_ISCSI +.endif + .include Modified: stable/11/usr.sbin/ctld/kernel.c ============================================================================== --- stable/11/usr.sbin/ctld/kernel.c Mon May 29 16:26:37 2017 (r319151) +++ stable/11/usr.sbin/ctld/kernel.c Mon May 29 18:17:34 2017 (r319152) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -90,6 +91,14 @@ kernel_init(void) } if (ctl_fd < 0) log_err(1, "failed to open %s", CTL_DEFAULT_DEV); +#ifdef WANT_ISCSI + else { + saved_errno = errno; + if (modfind("cfiscsi") == -1 && kldload("cfiscsi") == -1) + log_warn("couldn't load cfiscsi"); + errno = saved_errno; + } +#endif } /* From owner-svn-src-all@freebsd.org Mon May 29 18:19:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFA13D7CF63; Mon, 29 May 2017 18:19:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EC3B846B9; Mon, 29 May 2017 18:19:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TIJWda028907; Mon, 29 May 2017 18:19:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TIJWoB028906; Mon, 29 May 2017 18:19:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705291819.v4TIJWoB028906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 18:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319153 - stable/11/tools/regression/geom_gpt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 18:19:33 -0000 Author: ngie Date: Mon May 29 18:19:32 2017 New Revision: 319153 URL: https://svnweb.freebsd.org/changeset/base/319153 Log: MFC r317313: gctl_test.t: catch errors with the mdcfg directive While here, add a note about certain testcases relying on `count=1024` in the "create" portion. Modified: stable/11/tools/regression/geom_gpt/gctl_test.t Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/regression/geom_gpt/gctl_test.t ============================================================================== --- stable/11/tools/regression/geom_gpt/gctl_test.t Mon May 29 18:17:34 2017 (r319152) +++ stable/11/tools/regression/geom_gpt/gctl_test.t Mon May 29 18:19:32 2017 (r319153) @@ -172,20 +172,32 @@ foreach my $key (sort keys %steps) { ($errmsg eq "" ? "" : " - $errmsg")); unlink $out; } elsif ($action =~ "^mdcfg") { + my $errmsg = ""; if ($args =~ "^create") { - system("dd if=/dev/zero of=$disk count=1024 2>&1"); - if ($args =~ "corrupted") { - system("gpt create -p $disk"); + # NOTE: `count=1024` affects $key => {"025" "054", "065"}. + if (system("dd if=/dev/zero of=$disk count=1024 2>&1") == 0) { + chomp($dev = `mdconfig -a -t vnode -f $disk`); + if ($? == 0) { + if (system("gpart create -s GPT $dev") != 0) { + $errmsg = "gpart create failed"; + } + } else { + $errmsg = "mdconfig -a failed"; + } + } else { + $errmsg = "dd failed"; } - $dev = `mdconfig -a -t vnode -f $disk`; - chomp $dev; } elsif ($args =~ "^destroy") { $dev =~ s/md/-u /g; - system("mdconfig -d $dev"); + if (system("mdconfig -d $dev") != 0) { + $errmsg = "mdconfig -d failed"; + } unlink $disk; $dev = "n/a"; } - print "ok $nr \# mdcfg($key)\n"; + printf("%sok $nr # mdcfg($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); } elsif ($action =~ "^conf") { system("sysctl -b kern.geom.conftxt | grep -a $dev | sed -e s:$disk:DISK:g -e s:$dev:DEV:g | sort | md5 -p | tee $out 2>&1"); $st = `tail -1 $out`; From owner-svn-src-all@freebsd.org Mon May 29 18:20:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A572D7CFF8; Mon, 29 May 2017 18:20:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EED2E847E5; Mon, 29 May 2017 18:20:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TIKUr5029023; Mon, 29 May 2017 18:20:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TIKUOb029022; Mon, 29 May 2017 18:20:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705291820.v4TIKUOb029022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 18:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319154 - stable/10/tools/regression/geom_gpt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 18:20:31 -0000 Author: ngie Date: Mon May 29 18:20:29 2017 New Revision: 319154 URL: https://svnweb.freebsd.org/changeset/base/319154 Log: MFC r317313: gctl_test.t: catch errors with the mdcfg directive While here, add a note about certain testcases relying on `count=1024` in the "create" portion. Modified: stable/10/tools/regression/geom_gpt/gctl_test.t Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/geom_gpt/gctl_test.t ============================================================================== --- stable/10/tools/regression/geom_gpt/gctl_test.t Mon May 29 18:19:32 2017 (r319153) +++ stable/10/tools/regression/geom_gpt/gctl_test.t Mon May 29 18:20:29 2017 (r319154) @@ -172,20 +172,32 @@ foreach my $key (sort keys %steps) { ($errmsg eq "" ? "" : " - $errmsg")); unlink $out; } elsif ($action =~ "^mdcfg") { + my $errmsg = ""; if ($args =~ "^create") { - system("dd if=/dev/zero of=$disk count=1024 2>&1"); - if ($args =~ "corrupted") { - system("gpt create -p $disk"); + # NOTE: `count=1024` affects $key => {"025" "054", "065"}. + if (system("dd if=/dev/zero of=$disk count=1024 2>&1") == 0) { + chomp($dev = `mdconfig -a -t vnode -f $disk`); + if ($? == 0) { + if (system("gpart create -s GPT $dev") != 0) { + $errmsg = "gpart create failed"; + } + } else { + $errmsg = "mdconfig -a failed"; + } + } else { + $errmsg = "dd failed"; } - $dev = `mdconfig -a -t vnode -f $disk`; - chomp $dev; } elsif ($args =~ "^destroy") { $dev =~ s/md/-u /g; - system("mdconfig -d $dev"); + if (system("mdconfig -d $dev") != 0) { + $errmsg = "mdconfig -d failed"; + } unlink $disk; $dev = "n/a"; } - print "ok $nr \# mdcfg($key)\n"; + printf("%sok $nr # mdcfg($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); } elsif ($action =~ "^conf") { system("sysctl -b kern.geom.conftxt | grep -a $dev | sed -e s:$disk:DISK:g -e s:$dev:DEV:g | sort | md5 -p | tee $out 2>&1"); $st = `tail -1 $out`; From owner-svn-src-all@freebsd.org Mon May 29 18:34:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FAC9D7D525; Mon, 29 May 2017 18:34:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DDFA85192; Mon, 29 May 2017 18:34:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TIYjvg037082; Mon, 29 May 2017 18:34:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TIYjqJ037081; Mon, 29 May 2017 18:34:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705291834.v4TIYjqJ037081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 18:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319155 - head/lib/libnv/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 18:34:46 -0000 Author: ngie Date: Mon May 29 18:34:45 2017 New Revision: 319155 URL: https://svnweb.freebsd.org/changeset/base/319155 Log: lib/libnv/tests/dnv_test: fix memory leaks for memory allocated via either strdup or one of the dnvlist* libcalls. Reported by: Coverity CID: 1362056-1362060 Sponsored by: Dell EMC Isilon Modified: head/lib/libnv/tests/dnv_tests.cc Modified: head/lib/libnv/tests/dnv_tests.cc ============================================================================== --- head/lib/libnv/tests/dnv_tests.cc Mon May 29 18:20:29 2017 (r319154) +++ head/lib/libnv/tests/dnv_tests.cc Mon May 29 18:34:45 2017 (r319155) @@ -391,6 +391,7 @@ ATF_TEST_CASE_BODY(dnvlist_take_string__ ATF_REQUIRE_EQ(strcmp(actual_val, default_val), 0); free(actual_val); + free(default_val); nvlist_destroy(nvl); } @@ -408,6 +409,7 @@ ATF_TEST_CASE_BODY(dnvlist_take_string__ ATF_REQUIRE_EQ(strcmp(actual_val, default_val), 0); free(actual_val); + free(default_val); nvlist_destroy(nvl); } @@ -496,6 +498,7 @@ ATF_TEST_CASE_BODY(dnvlist_take_binary__ free(actual_val); free(default_val); + free(value); nvlist_destroy(nvl); } @@ -515,6 +518,7 @@ ATF_TEST_CASE_BODY(dnvlist_take_binary__ ATF_REQUIRE_EQ(memcmp(actual_val, default_val, actual_size), 0); free(actual_val); + free(default_val); nvlist_destroy(nvl); } @@ -535,6 +539,7 @@ ATF_TEST_CASE_BODY(dnvlist_take_binary__ ATF_REQUIRE_EQ(memcmp(actual_val, default_val, default_size), 0); free(actual_val); + free(default_val); nvlist_destroy(nvl); } From owner-svn-src-all@freebsd.org Mon May 29 18:39:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C13B3D7D599; Mon, 29 May 2017 18:39:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82B15852FC; Mon, 29 May 2017 18:39:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TIdSCH037304; Mon, 29 May 2017 18:39:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TIdSUT037303; Mon, 29 May 2017 18:39:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705291839.v4TIdSUT037303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 18:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319156 - head/lib/libnv/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 18:39:29 -0000 Author: ngie Date: Mon May 29 18:39:28 2017 New Revision: 319156 URL: https://svnweb.freebsd.org/changeset/base/319156 Log: :nvlist_unpack__duplicate_key : check the result of nvlist_pack(3) This fixes a potential NULL pointer dereference. MFC after: 3 days Reported by: Coverity CID: 1362051 Sponsored by: Dell EMC Isilon Modified: head/lib/libnv/tests/nv_tests.cc Modified: head/lib/libnv/tests/nv_tests.cc ============================================================================== --- head/lib/libnv/tests/nv_tests.cc Mon May 29 18:34:45 2017 (r319155) +++ head/lib/libnv/tests/nv_tests.cc Mon May 29 18:39:28 2017 (r319156) @@ -640,6 +640,7 @@ ATF_TEST_CASE_BODY(nvlist_unpack__duplic nvlist_add_number(nvl, key2, 10); packed = nvlist_pack(nvl, &size); + ATF_REQUIRE(packed != NULL); /* * Mangle the packed nvlist by replacing key1 with key2, creating a From owner-svn-src-all@freebsd.org Mon May 29 18:45:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC787D7D710; Mon, 29 May 2017 18:45:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90A97856B8; Mon, 29 May 2017 18:45:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TIjAqi041187; Mon, 29 May 2017 18:45:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TIjAOP041186; Mon, 29 May 2017 18:45:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705291845.v4TIjAOP041186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 18:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319157 - head/lib/msun/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 18:45:11 -0000 Author: ngie Date: Mon May 29 18:45:10 2017 New Revision: 319157 URL: https://svnweb.freebsd.org/changeset/base/319157 Log: fma_test: mute a warning about unreachable code on amd64 by restructuring the #ifdef block to only handle the rest of the logic in the loop in the #else case. MFC after: 3 days Reported by: Coverity CID: 1346844 Sponsored by: Dell EMC Isilon Modified: head/lib/msun/tests/fma_test.c Modified: head/lib/msun/tests/fma_test.c ============================================================================== --- head/lib/msun/tests/fma_test.c Mon May 29 18:39:28 2017 (r319156) +++ head/lib/msun/tests/fma_test.c Mon May 29 18:45:10 2017 (r319157) @@ -498,11 +498,12 @@ main(void) printf("ok %d # SKIP testcase fails assertion on " "amd64\n", j); continue; -#endif +#else printf("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_infinities(); printf("ok %d - fma infinities\n", j); +#endif } fesetround(FE_TONEAREST); From owner-svn-src-all@freebsd.org Mon May 29 18:49:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB354D7D83B; Mon, 29 May 2017 18:49:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88B908595C; Mon, 29 May 2017 18:49:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TInSXA041383; Mon, 29 May 2017 18:49:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TInStq041382; Mon, 29 May 2017 18:49:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705291849.v4TInStq041382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 18:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319158 - head/lib/msun/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 18:49:29 -0000 Author: ngie Date: Mon May 29 18:49:28 2017 New Revision: 319158 URL: https://svnweb.freebsd.org/changeset/base/319158 Log: logarithm_test: assert that feclearexcept succeeds This helps ensure that test preconditons are fulfilled. MFC after: 3 days Reported by: Coverity CID: 1346572 Sponsored by: Dell EMC Isilon Modified: head/lib/msun/tests/logarithm_test.c Modified: head/lib/msun/tests/logarithm_test.c ============================================================================== --- head/lib/msun/tests/logarithm_test.c Mon May 29 18:45:10 2017 (r319157) +++ head/lib/msun/tests/logarithm_test.c Mon May 29 18:49:28 2017 (r319158) @@ -137,7 +137,7 @@ run_log2_tests(void) * We should insist that log2() return exactly the correct * result and not raise an inexact exception for powers of 2. */ - feclearexcept(FE_ALL_EXCEPT); + assert(feclearexcept(FE_ALL_EXCEPT) == 0); for (i = FLT_MIN_EXP - FLT_MANT_DIG; i < FLT_MAX_EXP; i++) { assert(log2f(ldexpf(1.0, i)) == i); assert(fetestexcept(ALL_STD_EXCEPT) == 0); From owner-svn-src-all@freebsd.org Mon May 29 19:02:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7953AD7DB68; Mon, 29 May 2017 19:02:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44CEC85FD9; Mon, 29 May 2017 19:02:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TJ2qpX049606; Mon, 29 May 2017 19:02:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TJ2qMP049605; Mon, 29 May 2017 19:02:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705291902.v4TJ2qMP049605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 29 May 2017 19:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319159 - head/lib/libnv/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 19:02:53 -0000 Author: ngie Date: Mon May 29 19:02:52 2017 New Revision: 319159 URL: https://svnweb.freebsd.org/changeset/base/319159 Log: :dnvlist_get_string__default_value: fix a bogus string comparison test Check actual_value vs "5", not "5" vs itself. MFC after: 3 days Reported by: Coverity CID: 1362021 Sponsored by: Dell EMC Isilon Modified: head/lib/libnv/tests/dnv_tests.cc Modified: head/lib/libnv/tests/dnv_tests.cc ============================================================================== --- head/lib/libnv/tests/dnv_tests.cc Mon May 29 18:49:28 2017 (r319158) +++ head/lib/libnv/tests/dnv_tests.cc Mon May 29 19:02:52 2017 (r319159) @@ -150,7 +150,7 @@ ATF_TEST_CASE_BODY(dnvlist_get_string__d ATF_REQUIRE_EQ(strcmp(dnvlist_get_string(nvl, "hthth", "fd"), "fd"), 0); actual_value = dnvlist_get_string(nvl, "5", "5"); - ATF_REQUIRE_EQ(strcmp("5", "5"), 0); + ATF_REQUIRE_EQ(strcmp(actual_value, "5"), 0); nvlist_destroy(nvl); } From owner-svn-src-all@freebsd.org Mon May 29 20:11:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED6E1D7E83D; Mon, 29 May 2017 20:11:28 +0000 (UTC) (envelope-from kwm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0E2B1F6A; Mon, 29 May 2017 20:11:28 +0000 (UTC) (envelope-from kwm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TKBRtB077480; Mon, 29 May 2017 20:11:27 GMT (envelope-from kwm@FreeBSD.org) Received: (from kwm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TKBRth077479; Mon, 29 May 2017 20:11:27 GMT (envelope-from kwm@FreeBSD.org) Message-Id: <201705292011.v4TKBRth077479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kwm set sender to kwm@FreeBSD.org using -f From: Koop Mast Date: Mon, 29 May 2017 20:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319160 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 20:11:29 -0000 Author: kwm (ports committer) Date: Mon May 29 20:11:27 2017 New Revision: 319160 URL: https://svnweb.freebsd.org/changeset/base/319160 Log: 64-bit inode commit bumped libarchive library version, record the old one. Approved by: emaste@ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon May 29 19:02:52 2017 (r319159) +++ head/ObsoleteFiles.inc Mon May 29 20:11:27 2017 (r319160) @@ -112,6 +112,8 @@ OLD_FILES+=usr/share/doc/usd/21.troff/pa OLD_FILES+=usr/share/doc/usd/22.trofftut/paper.ascii.gz OLD_FILES+=usr/share/doc/usd/Title.ascii.gz OLD_FILES+=usr/share/doc/usd/contents.ascii.gz +# 20170523: 64-bit inode support, libarchive version bump +OLD_LIBS+=usr/lib/libarchive.so.6 # 20170427: NATM configuration support removed OLD_FILES+=etc/rc.d/atm1 OLD_FILES+=etc/rc.d/atm2 From owner-svn-src-all@freebsd.org Mon May 29 20:27:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DBFFD7EDE8; Mon, 29 May 2017 20:27:33 +0000 (UTC) (envelope-from kwm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 093472965; Mon, 29 May 2017 20:27:32 +0000 (UTC) (envelope-from kwm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TKRWYq082632; Mon, 29 May 2017 20:27:32 GMT (envelope-from kwm@FreeBSD.org) Received: (from kwm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TKRWpR082631; Mon, 29 May 2017 20:27:32 GMT (envelope-from kwm@FreeBSD.org) Message-Id: <201705292027.v4TKRWpR082631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kwm set sender to kwm@FreeBSD.org using -f From: Koop Mast Date: Mon, 29 May 2017 20:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319161 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 20:27:33 -0000 Author: kwm (ports committer) Date: Mon May 29 20:27:31 2017 New Revision: 319161 URL: https://svnweb.freebsd.org/changeset/base/319161 Log: Also add libzfs and libmilter to the 64-bit inode library bump list. Make the comment more generic. Approved by: emaste@ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon May 29 20:11:27 2017 (r319160) +++ head/ObsoleteFiles.inc Mon May 29 20:27:31 2017 (r319161) @@ -112,8 +112,10 @@ OLD_FILES+=usr/share/doc/usd/21.troff/pa OLD_FILES+=usr/share/doc/usd/22.trofftut/paper.ascii.gz OLD_FILES+=usr/share/doc/usd/Title.ascii.gz OLD_FILES+=usr/share/doc/usd/contents.ascii.gz -# 20170523: 64-bit inode support, libarchive version bump +# 20170523: 64-bit inode support, library version bumps +OLD_LIBS+=lib/libzfs.so.2 OLD_LIBS+=usr/lib/libarchive.so.6 +OLD_LIBS+=usr/lib/libmilter.so.5 # 20170427: NATM configuration support removed OLD_FILES+=etc/rc.d/atm1 OLD_FILES+=etc/rc.d/atm2 From owner-svn-src-all@freebsd.org Mon May 29 20:43:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9706D7F43E; Mon, 29 May 2017 20:43:01 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8126342C; Mon, 29 May 2017 20:43:01 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TKh0Qh090576; Mon, 29 May 2017 20:43:00 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TKh0xB090575; Mon, 29 May 2017 20:43:00 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201705292043.v4TKh0xB090575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Mon, 29 May 2017 20:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319162 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 20:43:02 -0000 Author: wulf Date: Mon May 29 20:43:00 2017 New Revision: 319162 URL: https://svnweb.freebsd.org/changeset/base/319162 Log: psm: add support for evdev protocol Both relative and absolute multitouch modes are supported. To enable psm(4) evdev support one should: 1. Add `device evdev` and `options EVDEV_SUPPORT` to kernel config file 2. Add hw.psm.elantech_support=1 or hw.psm.synaptics_support=1 to /boot/loader.conf for activation of absolute mode on touchpads 3. Add kern.evdev.rcpt_mask=12 to /etc/sysctl.conf to enable psm event sourcing and disable sysmouse Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10265 Tested by: wulf, Jan Kokemueller (Lenovo devs) Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Mon May 29 20:27:31 2017 (r319161) +++ head/sys/dev/atkbdc/psm.c Mon May 29 20:43:00 2017 (r319162) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" #include "opt_psm.h" +#include "opt_evdev.h" #include #include @@ -90,6 +91,11 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef EVDEV_SUPPORT +#include +#include +#endif + #include #include @@ -325,8 +331,14 @@ typedef struct elantechhw { #define ELANTECH_REG_RDWR 0x00 #define ELANTECH_CUSTOM_CMD 0xf8 +#ifdef EVDEV_SUPPORT +#define ELANTECH_MAX_FINGERS 5 +#else #define ELANTECH_MAX_FINGERS PSM_FINGERS +#endif +#define ELANTECH_FINGER_MAX_P 255 +#define ELANTECH_FINGER_MAX_W 15 #define ELANTECH_FINGER_SET_XYP(pb) (finger_t) { \ .x = (((pb)->ipacket[1] & 0x0f) << 8) | (pb)->ipacket[2], \ .y = (((pb)->ipacket[4] & 0x0f) << 8) | (pb)->ipacket[5], \ @@ -418,6 +430,10 @@ struct psm_softc { /* Driver status inf int cmdcount; struct sigio *async; /* Processes waiting for SIGIO */ int extended_buttons; +#ifdef EVDEV_SUPPORT + struct evdev_dev *evdev_a; /* Absolute reporting device */ + struct evdev_dev *evdev_r; /* Relative reporting device */ +#endif }; static devclass_t psm_devclass; @@ -427,6 +443,8 @@ static devclass_t psm_devclass; #define PSM_ASLP 2 /* Waiting for mouse data */ #define PSM_SOFTARMED 4 /* Software interrupt armed */ #define PSM_NEED_SYNCBITS 8 /* Set syncbits using next data pkt */ +#define PSM_EV_OPEN_R 0x10 /* Relative evdev device is open */ +#define PSM_EV_OPEN_A 0x20 /* Absolute evdev device is open */ /* driver configuration flags (config) */ #define PSM_CONFIG_RESOLUTION 0x000f /* resolution */ @@ -532,13 +550,23 @@ static int psmattach(device_t); static int psmdetach(device_t); static int psmresume(device_t); -static d_open_t psmopen; -static d_close_t psmclose; +static d_open_t psm_cdev_open; +static d_close_t psm_cdev_close; static d_read_t psmread; static d_write_t psmwrite; static d_ioctl_t psmioctl; static d_poll_t psmpoll; +static int psmopen(struct psm_softc *); +static int psmclose(struct psm_softc *); + +#ifdef EVDEV_SUPPORT +static evdev_open_t psm_ev_open_r; +static evdev_close_t psm_ev_close_r; +static evdev_open_t psm_ev_open_a; +static evdev_close_t psm_ev_close_a; +#endif + static int enable_aux_dev(KBDC); static int disable_aux_dev(KBDC); static int get_mouse_status(KBDC, int *, int, int); @@ -668,8 +696,8 @@ static driver_t psm_driver = { static struct cdevsw psm_cdevsw = { .d_version = D_VERSION, .d_flags = D_NEEDGIANT, - .d_open = psmopen, - .d_close = psmclose, + .d_open = psm_cdev_open, + .d_close = psm_cdev_close, .d_read = psmread, .d_write = psmwrite, .d_ioctl = psmioctl, @@ -677,6 +705,17 @@ static struct cdevsw psm_cdevsw = { .d_name = PSM_DRIVER_NAME, }; +#ifdef EVDEV_SUPPORT +static const struct evdev_methods psm_ev_methods_r = { + .ev_open = psm_ev_open_r, + .ev_close = psm_ev_close_r, +}; +static const struct evdev_methods psm_ev_methods_a = { + .ev_open = psm_ev_open_a, + .ev_close = psm_ev_close_a, +}; +#endif + /* device I/O routines */ static int enable_aux_dev(KBDC kbdc) @@ -1197,7 +1236,8 @@ reinitialize(struct psm_softc *sc, int d splx(s); /* restore the driver state */ - if ((sc->state & PSM_OPEN) && (err == 0)) { + if ((sc->state & (PSM_OPEN | PSM_EV_OPEN_R | PSM_EV_OPEN_A)) && + (err == 0)) { /* enable the aux device and the port again */ err = doopen(sc, c); if (err != 0) @@ -1578,6 +1618,270 @@ psmprobe(device_t dev) return (0); } +#ifdef EVDEV_SUPPORT +/* Values are taken from Linux drivers for userland software compatibility */ +#define PS2_MOUSE_VENDOR 0x0002 +#define PS2_MOUSE_GENERIC_PRODUCT 0x0001 +#define PS2_MOUSE_SYNAPTICS_NAME "SynPS/2 Synaptics TouchPad" +#define PS2_MOUSE_SYNAPTICS_PRODUCT 0x0007 +#define PS2_MOUSE_TRACKPOINT_NAME "TPPS/2 IBM TrackPoint" +#define PS2_MOUSE_TRACKPOINT_PRODUCT 0x000A +#define PS2_MOUSE_ELANTECH_NAME "ETPS/2 Elantech Touchpad" +#define PS2_MOUSE_ELANTECH_ST_NAME "ETPS/2 Elantech TrackPoint" +#define PS2_MOUSE_ELANTECH_PRODUCT 0x000E + +#define ABSINFO_END { ABS_CNT, 0, 0, 0 } + +static void +psm_support_abs_bulk(struct evdev_dev *evdev, const uint16_t info[][4]) +{ + size_t i; + + for (i = 0; info[i][0] != ABS_CNT; i++) + evdev_support_abs(evdev, info[i][0], 0, info[i][1], info[i][2], + 0, 0, info[i][3]); +} + +static void +psm_push_mt_finger(struct psm_softc *sc, int id, const finger_t *f) +{ + int y = sc->synhw.minimumYCoord + sc->synhw.maximumYCoord - f->y; + + evdev_push_abs(sc->evdev_a, ABS_MT_SLOT, id); + evdev_push_abs(sc->evdev_a, ABS_MT_TRACKING_ID, id); + evdev_push_abs(sc->evdev_a, ABS_MT_POSITION_X, f->x); + evdev_push_abs(sc->evdev_a, ABS_MT_POSITION_Y, y); + evdev_push_abs(sc->evdev_a, ABS_MT_PRESSURE, f->p); +} + +static void +psm_push_st_finger(struct psm_softc *sc, const finger_t *f) +{ + int y = sc->synhw.minimumYCoord + sc->synhw.maximumYCoord - f->y; + + evdev_push_abs(sc->evdev_a, ABS_X, f->x); + evdev_push_abs(sc->evdev_a, ABS_Y, y); + evdev_push_abs(sc->evdev_a, ABS_PRESSURE, f->p); + if (sc->synhw.capPalmDetect) + evdev_push_abs(sc->evdev_a, ABS_TOOL_WIDTH, f->w); +} + +static void +psm_release_mt_slot(struct evdev_dev *evdev, int32_t slot) +{ + + evdev_push_abs(evdev, ABS_MT_SLOT, slot); + evdev_push_abs(evdev, ABS_MT_TRACKING_ID, -1); +} + +static int +psm_register(device_t dev, int model_code) +{ + struct psm_softc *sc = device_get_softc(dev); + struct evdev_dev *evdev_r; + int error, i, nbuttons, nwheels, product; + bool is_pointing_stick; + const char *name; + + name = model_name(model_code); + nbuttons = sc->hw.buttons; + product = PS2_MOUSE_GENERIC_PRODUCT; + nwheels = 0; + is_pointing_stick = false; + + switch (model_code) { + case MOUSE_MODEL_TRACKPOINT: + name = PS2_MOUSE_TRACKPOINT_NAME; + product = PS2_MOUSE_TRACKPOINT_PRODUCT; + nbuttons = 3; + is_pointing_stick = true; + break; + + case MOUSE_MODEL_ELANTECH: + name = PS2_MOUSE_ELANTECH_ST_NAME; + product = PS2_MOUSE_ELANTECH_PRODUCT; + nbuttons = 3; + is_pointing_stick = true; + break; + + case MOUSE_MODEL_MOUSEMANPLUS: + case MOUSE_MODEL_4D: + nwheels = 2; + break; + + case MOUSE_MODEL_EXPLORER: + case MOUSE_MODEL_INTELLI: + case MOUSE_MODEL_NET: + case MOUSE_MODEL_NETSCROLL: + case MOUSE_MODEL_4DPLUS: + nwheels = 1; + break; + } + + evdev_r = evdev_alloc(); + evdev_set_name(evdev_r, name); + evdev_set_phys(evdev_r, device_get_nameunit(dev)); + evdev_set_id(evdev_r, BUS_I8042, PS2_MOUSE_VENDOR, product, 0); + evdev_set_methods(evdev_r, sc, &psm_ev_methods_r); + + evdev_support_prop(evdev_r, INPUT_PROP_POINTER); + if (is_pointing_stick) + evdev_support_prop(evdev_r, INPUT_PROP_POINTING_STICK); + evdev_support_event(evdev_r, EV_SYN); + evdev_support_event(evdev_r, EV_KEY); + evdev_support_event(evdev_r, EV_REL); + evdev_support_rel(evdev_r, REL_X); + evdev_support_rel(evdev_r, REL_Y); + switch (nwheels) { + case 2: + evdev_support_rel(evdev_r, REL_HWHEEL); + /* FALLTHROUGH */ + case 1: + evdev_support_rel(evdev_r, REL_WHEEL); + } + for (i = 0; i < nbuttons; i++) + evdev_support_key(evdev_r, BTN_MOUSE + i); + + error = evdev_register_mtx(evdev_r, &Giant); + if (error) + evdev_free(evdev_r); + else + sc->evdev_r = evdev_r; + return (error); +} + +static int +psm_register_synaptics(device_t dev) +{ + struct psm_softc *sc = device_get_softc(dev); + const uint16_t synaptics_absinfo_st[][4] = { + { ABS_X, sc->synhw.minimumXCoord, + sc->synhw.maximumXCoord, sc->synhw.infoXupmm }, + { ABS_Y, sc->synhw.minimumYCoord, + sc->synhw.maximumYCoord, sc->synhw.infoYupmm }, + { ABS_PRESSURE, 0, ELANTECH_FINGER_MAX_P, 0 }, + ABSINFO_END, + }; + const uint16_t synaptics_absinfo_mt[][4] = { + { ABS_MT_SLOT, 0, PSM_FINGERS-1, 0}, + { ABS_MT_TRACKING_ID, -1, PSM_FINGERS-1, 0}, + { ABS_MT_POSITION_X, sc->synhw.minimumXCoord, + sc->synhw.maximumXCoord, sc->synhw.infoXupmm }, + { ABS_MT_POSITION_Y, sc->synhw.minimumYCoord, + sc->synhw.maximumYCoord, sc->synhw.infoYupmm }, + { ABS_MT_PRESSURE, 0, ELANTECH_FINGER_MAX_P, 0 }, + ABSINFO_END, + }; + struct evdev_dev *evdev_a; + int error, i, guest_model; + + evdev_a = evdev_alloc(); + evdev_set_name(evdev_a, PS2_MOUSE_SYNAPTICS_NAME); + evdev_set_phys(evdev_a, device_get_nameunit(dev)); + evdev_set_id(evdev_a, BUS_I8042, PS2_MOUSE_VENDOR, + PS2_MOUSE_SYNAPTICS_PRODUCT, 0); + evdev_set_methods(evdev_a, sc, &psm_ev_methods_a); + + evdev_support_event(evdev_a, EV_SYN); + evdev_support_event(evdev_a, EV_KEY); + evdev_support_event(evdev_a, EV_ABS); + evdev_support_prop(evdev_a, INPUT_PROP_POINTER); + if (sc->synhw.capAdvancedGestures) + evdev_support_prop(evdev_a, INPUT_PROP_SEMI_MT); + if (sc->synhw.capClickPad) + evdev_support_prop(evdev_a, INPUT_PROP_BUTTONPAD); + evdev_support_key(evdev_a, BTN_TOUCH); + evdev_support_nfingers(evdev_a, 3); + psm_support_abs_bulk(evdev_a, synaptics_absinfo_st); + if (sc->synhw.capAdvancedGestures || sc->synhw.capReportsV) + psm_support_abs_bulk(evdev_a, synaptics_absinfo_mt); + if (sc->synhw.capPalmDetect) + evdev_support_abs(evdev_a, ABS_TOOL_WIDTH, 0, 0, 15, 0, 0, 0); + evdev_support_key(evdev_a, BTN_LEFT); + if (!sc->synhw.capClickPad) { + evdev_support_key(evdev_a, BTN_RIGHT); + if (sc->synhw.capExtended && sc->synhw.capMiddle) + evdev_support_key(evdev_a, BTN_MIDDLE); + } + if (sc->synhw.capExtended && sc->synhw.capFourButtons) { + evdev_support_key(evdev_a, BTN_BACK); + evdev_support_key(evdev_a, BTN_FORWARD); + } + if (sc->synhw.capExtended && (sc->synhw.nExtendedButtons > 0)) + for (i = 0; i < sc->synhw.nExtendedButtons; i++) + evdev_support_key(evdev_a, BTN_0 + i); + + error = evdev_register_mtx(evdev_a, &Giant); + if (!error && sc->synhw.capPassthrough) { + guest_model = sc->tpinfo.sysctl_tree != NULL ? + MOUSE_MODEL_TRACKPOINT : MOUSE_MODEL_GENERIC; + error = psm_register(dev, guest_model); + } + if (error) + evdev_free(evdev_a); + else + sc->evdev_a = evdev_a; + return (error); +} + +static int +psm_register_elantech(device_t dev) +{ + struct psm_softc *sc = device_get_softc(dev); + const uint16_t elantech_absinfo[][4] = { + { ABS_X, 0, sc->elanhw.sizex, + sc->elanhw.dpmmx }, + { ABS_Y, 0, sc->elanhw.sizey, + sc->elanhw.dpmmy }, + { ABS_PRESSURE, 0, ELANTECH_FINGER_MAX_P, 0 }, + { ABS_TOOL_WIDTH, 0, ELANTECH_FINGER_MAX_W, 0 }, + { ABS_MT_SLOT, 0, ELANTECH_MAX_FINGERS - 1, 0 }, + { ABS_MT_TRACKING_ID, -1, ELANTECH_MAX_FINGERS - 1, 0 }, + { ABS_MT_POSITION_X, 0, sc->elanhw.sizex, + sc->elanhw.dpmmx }, + { ABS_MT_POSITION_Y, 0, sc->elanhw.sizey, + sc->elanhw.dpmmy }, + { ABS_MT_PRESSURE, 0, ELANTECH_FINGER_MAX_P, 0 }, + { ABS_MT_TOUCH_MAJOR, 0, ELANTECH_FINGER_MAX_W * + sc->elanhw.dptracex, 0 }, + ABSINFO_END, + }; + struct evdev_dev *evdev_a; + int error; + + evdev_a = evdev_alloc(); + evdev_set_name(evdev_a, PS2_MOUSE_ELANTECH_NAME); + evdev_set_phys(evdev_a, device_get_nameunit(dev)); + evdev_set_id(evdev_a, BUS_I8042, PS2_MOUSE_VENDOR, + PS2_MOUSE_ELANTECH_PRODUCT, 0); + evdev_set_methods(evdev_a, sc, &psm_ev_methods_a); + + evdev_support_event(evdev_a, EV_SYN); + evdev_support_event(evdev_a, EV_KEY); + evdev_support_event(evdev_a, EV_ABS); + evdev_support_prop(evdev_a, INPUT_PROP_POINTER); + if (sc->elanhw.issemimt) + evdev_support_prop(evdev_a, INPUT_PROP_SEMI_MT); + if (sc->elanhw.isclickpad) + evdev_support_prop(evdev_a, INPUT_PROP_BUTTONPAD); + evdev_support_key(evdev_a, BTN_TOUCH); + evdev_support_nfingers(evdev_a, ELANTECH_MAX_FINGERS); + evdev_support_key(evdev_a, BTN_LEFT); + if (!sc->elanhw.isclickpad) + evdev_support_key(evdev_a, BTN_RIGHT); + psm_support_abs_bulk(evdev_a, elantech_absinfo); + + error = evdev_register_mtx(evdev_a, &Giant); + if (!error && sc->elanhw.hastrackpoint) + error = psm_register(dev, MOUSE_MODEL_ELANTECH); + if (error) + evdev_free(evdev_a); + else + sc->evdev_a = evdev_a; + return (error); +} +#endif + static int psmattach(device_t dev) { @@ -1609,6 +1913,24 @@ psmattach(device_t dev) sc->bdev = make_dev(&psm_cdevsw, 0, 0, 0, 0666, "bpsm%d", unit); sc->bdev->si_drv1 = sc; +#ifdef EVDEV_SUPPORT + switch (sc->hw.model) { + case MOUSE_MODEL_SYNAPTICS: + error = psm_register_synaptics(dev); + break; + + case MOUSE_MODEL_ELANTECH: + error = psm_register_elantech(dev); + break; + + default: + error = psm_register(dev, sc->hw.model); + } + + if (error) + return (error); +#endif + /* Some touchpad devices need full reinitialization after suspend. */ switch (sc->hw.model) { case MOUSE_MODEL_SYNAPTICS: @@ -1657,6 +1979,11 @@ psmdetach(device_t dev) if (sc->state & PSM_OPEN) return (EBUSY); +#ifdef EVDEV_SUPPORT + evdev_free(sc->evdev_r); + evdev_free(sc->evdev_a); +#endif + rid = KBDC_RID_AUX; bus_teardown_intr(dev, sc->intr, sc->ih); bus_release_resource(dev, SYS_RES_IRQ, rid, sc->intr); @@ -1670,13 +1997,83 @@ psmdetach(device_t dev) return (0); } +#ifdef EVDEV_SUPPORT static int -psmopen(struct cdev *dev, int flag, int fmt, struct thread *td) +psm_ev_open_r(struct evdev_dev *evdev, void *ev_softc) +{ + struct psm_softc *sc = (struct psm_softc *)ev_softc; + int err = 0; + + /* Get device data */ + if ((sc->state & PSM_VALID) == 0) { + /* the device is no longer valid/functioning */ + return (ENXIO); + } + + if (!(sc->state & (PSM_OPEN | PSM_EV_OPEN_A))) + err = psmopen(sc); + + if (err == 0) + sc->state |= PSM_EV_OPEN_R; + + return (err); +} + +static void +psm_ev_close_r(struct evdev_dev *evdev, void *ev_softc) +{ + struct psm_softc *sc = (struct psm_softc *)ev_softc; + + sc->state &= ~PSM_EV_OPEN_R; + + if (sc->state & (PSM_OPEN | PSM_EV_OPEN_A)) + return; + + if (sc->state & PSM_VALID) + psmclose(sc); +} + +static int +psm_ev_open_a(struct evdev_dev *evdev, void *ev_softc) +{ + struct psm_softc *sc = (struct psm_softc *)ev_softc; + int err = 0; + + /* Get device data */ + if ((sc->state & PSM_VALID) == 0) { + /* the device is no longer valid/functioning */ + return (ENXIO); + } + + if (!(sc->state & (PSM_OPEN | PSM_EV_OPEN_R))) + err = psmopen(sc); + + if (err == 0) + sc->state |= PSM_EV_OPEN_A; + + return (err); +} + +static void +psm_ev_close_a(struct evdev_dev *evdev, void *ev_softc) +{ + struct psm_softc *sc = (struct psm_softc *)ev_softc; + + sc->state &= ~PSM_EV_OPEN_A; + + if (sc->state & (PSM_OPEN | PSM_EV_OPEN_R)) + return; + + if (sc->state & PSM_VALID) + psmclose(sc); +} +#endif + +static int +psm_cdev_open(struct cdev *dev, int flag, int fmt, struct thread *td) { struct psm_softc *sc; - int command_byte; - int err; - int s; + int err = 0; /* Get device data */ sc = dev->si_drv1; @@ -1691,6 +2088,59 @@ psmopen(struct cdev *dev, int flag, int device_busy(devclass_get_device(psm_devclass, sc->unit)); +#ifdef EVDEV_SUPPORT + /* Already opened by evdev */ + if (!(sc->state & (PSM_EV_OPEN_R | PSM_EV_OPEN_A))) +#endif + err = psmopen(sc); + + if (err == 0) + sc->state |= PSM_OPEN; + else + device_unbusy(devclass_get_device(psm_devclass, sc->unit)); + + return (err); +} + +static int +psm_cdev_close(struct cdev *dev, int flag, int fmt, struct thread *td) +{ + struct psm_softc *sc; + int err = 0; + + /* Get device data */ + sc = dev->si_drv1; + if ((sc == NULL) || (sc->state & PSM_VALID) == 0) { + /* the device is no longer valid/functioning */ + return (ENXIO); + } + +#ifdef EVDEV_SUPPORT + /* Still opened by evdev */ + if (!(sc->state & (PSM_EV_OPEN_R | PSM_EV_OPEN_A))) +#endif + err = psmclose(sc); + + if (err == 0) { + sc->state &= ~PSM_OPEN; + /* clean up and sigio requests */ + if (sc->async != NULL) { + funsetown(&sc->async); + sc->async = NULL; + } + device_unbusy(devclass_get_device(psm_devclass, sc->unit)); + } + + return (err); +} + +static int +psmopen(struct psm_softc *sc) +{ + int command_byte; + int err; + int s; + /* Initialize state */ sc->mode.level = sc->dflt_mode.level; sc->mode.protocol = sc->dflt_mode.protocol; @@ -1750,16 +2200,13 @@ psmopen(struct cdev *dev, int flag, int err = doopen(sc, command_byte); /* done */ - if (err == 0) - sc->state |= PSM_OPEN; kbdc_lock(sc->kbdc, FALSE); return (err); } static int -psmclose(struct cdev *dev, int flag, int fmt, struct thread *td) +psmclose(struct psm_softc *sc) { - struct psm_softc *sc = dev->si_drv1; int stat[3]; int command_byte; int s; @@ -1836,16 +2283,8 @@ psmclose(struct cdev *dev, int flag, int /* remove anything left in the output buffer */ empty_aux_buffer(sc->kbdc, 10); - /* clean up and sigio requests */ - if (sc->async != NULL) { - funsetown(&sc->async); - sc->async = NULL; - } - /* close is almost always successful */ - sc->state &= ~PSM_OPEN; kbdc_lock(sc->kbdc, FALSE); - device_unbusy(devclass_get_device(psm_devclass, sc->unit)); return (0); } @@ -2496,7 +2935,7 @@ psmintr(void *arg) pb = &sc->pqueue[sc->pqueue_end]; /* discard the byte if the device is not open */ - if ((sc->state & PSM_OPEN) == 0) + if (!(sc->state & (PSM_OPEN | PSM_EV_OPEN_R | PSM_EV_OPEN_A))) continue; getmicrouptime(&now); @@ -2854,7 +3293,15 @@ proc_synaptics(struct psm_softc *sc, pac guest_buttons |= MOUSE_BUTTON2DOWN; if (pb->ipacket[1] & 0x02) guest_buttons |= MOUSE_BUTTON3DOWN; - +#ifdef EVDEV_SUPPORT + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { + evdev_push_rel(sc->evdev_r, REL_X, *x); + evdev_push_rel(sc->evdev_r, REL_Y, -*y); + evdev_push_mouse_btn(sc->evdev_r, + guest_buttons); + evdev_sync(sc->evdev_r); + } +#endif ms->button = touchpad_buttons | guest_buttons | sc->extended_buttons; } @@ -2965,6 +3412,24 @@ proc_synaptics(struct psm_softc *sc, pac int mask = 0; maskedbits = (sc->synhw.nExtendedButtons + 1) >> 1; mask = (1 << maskedbits) - 1; +#ifdef EVDEV_SUPPORT + int i; + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { + if (sc->synhw.capPassthrough) { + evdev_push_mouse_btn(sc->evdev_r, + extended_buttons); + evdev_sync(sc->evdev_r); + } + for (i = 0; i < maskedbits; i++) { + evdev_push_key(sc->evdev_a, + BTN_0 + i * 2, + pb->ipacket[4] & (1 << i)); + evdev_push_key(sc->evdev_a, + BTN_0 + i * 2 + 1, + pb->ipacket[5] & (1 << i)); + } + } +#endif pb->ipacket[4] &= ~(mask); pb->ipacket[5] &= ~(mask); } else if (!sc->syninfo.directional_scrolls && @@ -3016,6 +3481,31 @@ proc_synaptics(struct psm_softc *sc, pac if (id >= nfingers) PSM_FINGER_RESET(f[id]); +#ifdef EVDEV_SUPPORT + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { + for (id = 0; id < PSM_FINGERS; id++) { + if (PSM_FINGER_IS_SET(f[id])) + psm_push_mt_finger(sc, id, &f[id]); + else + psm_release_mt_slot(sc->evdev_a, id); + } + evdev_push_key(sc->evdev_a, BTN_TOUCH, nfingers > 0); + evdev_push_nfingers(sc->evdev_a, nfingers); + if (nfingers > 0) + psm_push_st_finger(sc, &f[0]); + else + evdev_push_abs(sc->evdev_a, ABS_PRESSURE, 0); + evdev_push_mouse_btn(sc->evdev_a, touchpad_buttons); + if (sc->synhw.capExtended && sc->synhw.capFourButtons) { + evdev_push_key(sc->evdev_a, BTN_FORWARD, + touchpad_buttons & MOUSE_BUTTON4DOWN); + evdev_push_key(sc->evdev_a, BTN_BACK, + touchpad_buttons & MOUSE_BUTTON5DOWN); + } + evdev_sync(sc->evdev_a); + } +#endif + ms->button = touchpad_buttons; psmgestures(sc, &f[0], nfingers, ms); @@ -4015,7 +4505,12 @@ proc_elantech(struct psm_softc *sc, pack ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) | ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0) | ((pb->ipacket[0] & 0x04) ? MOUSE_BUTTON2DOWN : 0); - +#ifdef EVDEV_SUPPORT + evdev_push_rel(sc->evdev_r, REL_X, *x); + evdev_push_rel(sc->evdev_r, REL_Y, -*y); + evdev_push_mouse_btn(sc->evdev_r, trackpoint_button); + evdev_sync(sc->evdev_r); +#endif ms->button = touchpad_button | trackpoint_button; return (0); @@ -4042,6 +4537,31 @@ proc_elantech(struct psm_softc *sc, pack ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0); } +#ifdef EVDEV_SUPPORT + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { + for (id = 0; id < ELANTECH_MAX_FINGERS; id++) { + if (PSM_FINGER_IS_SET(f[id])) { + psm_push_mt_finger(sc, id, &f[id]); + /* Convert touch width to surface units */ + evdev_push_abs(sc->evdev_a, ABS_MT_TOUCH_MAJOR, + f[id].w * sc->elanhw.dptracex); + } + if (sc->elanaction.mask & (1 << id) && + !(mask & (1 << id))) + psm_release_mt_slot(sc->evdev_a, id); + } + evdev_push_key(sc->evdev_a, BTN_TOUCH, nfingers > 0); + evdev_push_nfingers(sc->evdev_a, nfingers); + if (nfingers > 0) { + if (PSM_FINGER_IS_SET(f[0])) + psm_push_st_finger(sc, &f[0]); + } else + evdev_push_abs(sc->evdev_a, ABS_PRESSURE, 0); + evdev_push_mouse_btn(sc->evdev_a, touchpad_button); + evdev_sync(sc->evdev_a); + } +#endif + ms->button = touchpad_button | trackpoint_button; /* Send finger 1 position to gesture processor */ @@ -4382,6 +4902,41 @@ psmsoftintr(void *arg) break; } +#ifdef EVDEV_SUPPORT + if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE && + sc->hw.model != MOUSE_MODEL_ELANTECH && + sc->hw.model != MOUSE_MODEL_SYNAPTICS) { + evdev_push_rel(sc->evdev_r, EV_REL, x); + evdev_push_rel(sc->evdev_r, EV_REL, -y); + + switch (sc->hw.model) { + case MOUSE_MODEL_EXPLORER: + case MOUSE_MODEL_INTELLI: + case MOUSE_MODEL_NET: + case MOUSE_MODEL_NETSCROLL: + case MOUSE_MODEL_4DPLUS: + evdev_push_rel(sc->evdev_r, REL_WHEEL, -z); + break; + case MOUSE_MODEL_MOUSEMANPLUS: + case MOUSE_MODEL_4D: + switch (z) { + case 1: + case -1: + evdev_push_rel(sc->evdev_r, REL_WHEEL, -z); + break; + case 2: + case -2: + evdev_push_rel(sc->evdev_r, REL_HWHEEL, z / 2); + break; + } + break; + } + + evdev_push_mouse_btn(sc->evdev_r, ms.button); + evdev_sync(sc->evdev_r); + } +#endif + /* scale values */ if (sc->mode.accelfactor >= 1) { if (x != 0) { @@ -6494,6 +7049,9 @@ psmresume(device_t dev) } DRIVER_MODULE(psm, atkbdc, psm_driver, psm_devclass, 0, 0); +#ifdef EVDEV_SUPPORT +MODULE_DEPEND(psm, evdev, 1, 1, 1); +#endif #ifdef DEV_ISA From owner-svn-src-all@freebsd.org Mon May 29 21:48:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74060D823AA; Mon, 29 May 2017 21:48:03 +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 403C564D57; Mon, 29 May 2017 21:48:03 +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 v4TLm2BR015253; Mon, 29 May 2017 21:48:02 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TLm2Ts015251; Mon, 29 May 2017 21:48:02 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705292148.v4TLm2Ts015251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Mon, 29 May 2017 21:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319163 - in stable/11: etc/mtree usr.bin/compress usr.bin/compress/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 21:48:03 -0000 Author: jilles Date: Mon May 29 21:48:02 2017 New Revision: 319163 URL: https://svnweb.freebsd.org/changeset/base/319163 Log: MFC r318591: compress: Add basic tests. Added: stable/11/usr.bin/compress/tests/ - copied from r318591, head/usr.bin/compress/tests/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/usr.bin/compress/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Mon May 29 20:43:00 2017 (r319162) +++ stable/11/etc/mtree/BSD.tests.dist Mon May 29 21:48:02 2017 (r319163) @@ -594,6 +594,8 @@ .. cmp .. + compress + .. cpio .. col Modified: stable/11/usr.bin/compress/Makefile ============================================================================== --- stable/11/usr.bin/compress/Makefile Mon May 29 20:43:00 2017 (r319162) +++ stable/11/usr.bin/compress/Makefile Mon May 29 21:48:02 2017 (r319163) @@ -1,6 +1,8 @@ # @(#)Makefile 8.2 (Berkeley) 4/17/94 # $FreeBSD$ +.include + PROG= compress SRCS= compress.c zopen.c LINKS= ${BINDIR}/compress ${BINDIR}/uncompress @@ -9,4 +11,8 @@ MLINKS= compress.1 uncompress.1 # XXX zopen is not part of libc # MAN=zopen.3 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include From owner-svn-src-all@freebsd.org Tue May 30 02:25:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE66EA922DD; Tue, 30 May 2017 02:25:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CC59716CC; Tue, 30 May 2017 02:25:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U2Plwx034955; Tue, 30 May 2017 02:25:47 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U2Plgr034954; Tue, 30 May 2017 02:25:47 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201705300225.v4U2Plgr034954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 30 May 2017 02:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319167 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 02:25:48 -0000 Author: mjg Date: Tue May 30 02:25:47 2017 New Revision: 319167 URL: https://svnweb.freebsd.org/changeset/base/319167 Log: mtx: fix whitespace damage in _mtx_trylock_flags_ MFC after: 3 days Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Mon May 29 22:25:56 2017 (r319166) +++ head/sys/kern/kern_mutex.c Tue May 30 02:25:47 2017 (r319167) @@ -410,10 +410,10 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, c if (v == tid && ((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || (opts & MTX_RECURSE) != 0)) { - m->mtx_recurse++; - atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); - recursed = true; - break; + m->mtx_recurse++; + atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); + recursed = true; + break; } rval = 0; break; From owner-svn-src-all@freebsd.org Tue May 30 02:53:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7681EAF7FB0; Tue, 30 May 2017 02:53:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 407F7728B6; Tue, 30 May 2017 02:53:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U2r0AW047039; Tue, 30 May 2017 02:53:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U2r0R5047038; Tue, 30 May 2017 02:53:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300253.v4U2r0R5047038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 02:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319168 - stable/11/sys/tests/callout_test X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 02:53:04 -0000 Author: ngie Date: Tue May 30 02:53:00 2017 New Revision: 319168 URL: https://svnweb.freebsd.org/changeset/base/319168 Log: MFC r318010: style(9): sort headers Modified: stable/11/sys/tests/callout_test/callout_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/tests/callout_test/callout_test.c ============================================================================== --- stable/11/sys/tests/callout_test/callout_test.c Tue May 30 02:25:47 2017 (r319167) +++ stable/11/sys/tests/callout_test/callout_test.c Tue May 30 02:53:00 2017 (r319168) @@ -27,23 +27,23 @@ __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 From owner-svn-src-all@freebsd.org Tue May 30 02:56:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98EB3AF81EE; Tue, 30 May 2017 02:56:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 690E772AD4; Tue, 30 May 2017 02:56:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U2uH4Y047254; Tue, 30 May 2017 02:56:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U2uHTs047253; Tue, 30 May 2017 02:56:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300256.v4U2uHTs047253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 02:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319169 - stable/11/tools/regression/geom_gpt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 02:56:18 -0000 Author: ngie Date: Tue May 30 02:56:17 2017 New Revision: 319169 URL: https://svnweb.freebsd.org/changeset/base/319169 Log: MFC r319015: Use calloc instead of malloc + memset Modified: stable/11/tools/regression/geom_gpt/gctl_test_helper.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/regression/geom_gpt/gctl_test_helper.c ============================================================================== --- stable/11/tools/regression/geom_gpt/gctl_test_helper.c Tue May 30 02:53:00 2017 (r319168) +++ stable/11/tools/regression/geom_gpt/gctl_test_helper.c Tue May 30 02:56:17 2017 (r319169) @@ -87,10 +87,9 @@ parse(char *arg, char **param, char **value, int *len) return (EINVAL); if (*len <= 0 || *len > PATH_MAX) return (EINVAL); - *value = malloc(*len); + *value = calloc(*len, sizeof(char)); if (*value == NULL) return (ENOMEM); - memset(*value, 0, *len); if (equal != NULL) { if (strlen(equal) >= PATH_MAX) return (ENOMEM); From owner-svn-src-all@freebsd.org Tue May 30 02:56:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3BE7AF8265; Tue, 30 May 2017 02:56:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91F3A72BFD; Tue, 30 May 2017 02:56:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U2ubIU047318; Tue, 30 May 2017 02:56:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U2ubo8047317; Tue, 30 May 2017 02:56:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300256.v4U2ubo8047317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 02:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319170 - stable/10/tools/regression/geom_gpt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 02:56:38 -0000 Author: ngie Date: Tue May 30 02:56:37 2017 New Revision: 319170 URL: https://svnweb.freebsd.org/changeset/base/319170 Log: MFC r319015: Use calloc instead of malloc + memset Modified: stable/10/tools/regression/geom_gpt/gctl_test_helper.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/geom_gpt/gctl_test_helper.c ============================================================================== --- stable/10/tools/regression/geom_gpt/gctl_test_helper.c Tue May 30 02:56:17 2017 (r319169) +++ stable/10/tools/regression/geom_gpt/gctl_test_helper.c Tue May 30 02:56:37 2017 (r319170) @@ -87,10 +87,9 @@ parse(char *arg, char **param, char **value, int *len) return (EINVAL); if (*len <= 0 || *len > PATH_MAX) return (EINVAL); - *value = malloc(*len); + *value = calloc(*len, sizeof(char)); if (*value == NULL) return (ENOMEM); - memset(*value, 0, *len); if (equal != NULL) { if (strlen(equal) >= PATH_MAX) return (ENOMEM); From owner-svn-src-all@freebsd.org Tue May 30 03:02:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2810AAF85B5; Tue, 30 May 2017 03:02:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7AF473209; Tue, 30 May 2017 03:02:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U3280O050495; Tue, 30 May 2017 03:02:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U32752050478; Tue, 30 May 2017 03:02:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300302.v4U32752050478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 03:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319171 - in stable/11/sys: conf modules modules/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:02:09 -0000 Author: ngie Date: Tue May 30 03:02:07 2017 New Revision: 319171 URL: https://svnweb.freebsd.org/changeset/base/319171 Log: MFC r318007,r318008,r318009,r318011: r318007: Add intermediary Makefile for compiling all items in the directory r318008: Only compile tests/ if MK_TESTS != no or ALL_MODULES is defined r318009: Add MK_TESTS to kern.opts.mk to support r31800 MFC with: r318008 Pointyhat to: ngie r318011: Mark this Makefile SUBDIR_PARALLEL I inserted the necessary SUBDIR+= .WAIT in the previous commit Added: stable/11/sys/modules/tests/Makefile - copied, changed from r318007, head/sys/modules/tests/Makefile Modified: stable/11/sys/conf/kern.opts.mk stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kern.opts.mk ============================================================================== --- stable/11/sys/conf/kern.opts.mk Tue May 30 02:56:37 2017 (r319170) +++ stable/11/sys/conf/kern.opts.mk Tue May 30 03:02:07 2017 (r319171) @@ -41,6 +41,7 @@ __DEFAULT_YES_OPTIONS = \ PF \ SOURCELESS_HOST \ SOURCELESS_UCODE \ + TESTS \ USB_GADGET_EXAMPLES \ ZFS Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Tue May 30 02:56:37 2017 (r319170) +++ stable/11/sys/modules/Makefile Tue May 30 03:02:07 2017 (r319171) @@ -368,8 +368,6 @@ SUBDIR= \ ${_ti} \ ${_tcp_fastpath} \ ${_tcpmd5} \ - tests/framework \ - tests/callout_test \ tl \ tmpfs \ ${_toecore} \ @@ -534,6 +532,10 @@ _txp= txp ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \ ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "riscv" _cxgbe= cxgbe +.endif + +.if ${MK_TESTS} != "no" || defined(ALL_MODULES) +SUBDIR+= tests .endif .if ${MK_ZFS} != "no" || defined(ALL_MODULES) Copied and modified: stable/11/sys/modules/tests/Makefile (from r318007, head/sys/modules/tests/Makefile) ============================================================================== --- head/sys/modules/tests/Makefile Tue May 9 04:56:14 2017 (r318007, copy source) +++ stable/11/sys/modules/tests/Makefile Tue May 30 03:02:07 2017 (r319171) @@ -4,4 +4,6 @@ SUBDIR+= framework SUBDIR+= .WAIT SUBDIR+= callout_test +SUBDIR_PARALLEL= + .include From owner-svn-src-all@freebsd.org Tue May 30 03:05:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89FC5AF88F3; Tue, 30 May 2017 03:05:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 632EA734BB; Tue, 30 May 2017 03:05:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U35MFN053032; Tue, 30 May 2017 03:05:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U35MhE053031; Tue, 30 May 2017 03:05:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300305.v4U35MhE053031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 03:05:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319172 - stable/11/tests/sys/aio X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:05:23 -0000 Author: ngie Date: Tue May 30 03:05:22 2017 New Revision: 319172 URL: https://svnweb.freebsd.org/changeset/base/319172 Log: MFC r318094,r318098,r318099: r318094: style(9): clean up trailing whitespace r318098: Refactor ATF_REQUIRE_UNSAFE_AIO and PLAIN_REQUIRE_UNSAFE_AIO This is being done to reduce duplication between the two macros. r318099: Print out when unsafe AIO is enabled to debugging purposes Modified: stable/11/tests/sys/aio/local.h Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/aio/local.h ============================================================================== --- stable/11/tests/sys/aio/local.h Tue May 30 03:02:07 2017 (r319171) +++ stable/11/tests/sys/aio/local.h Tue May 30 03:05:22 2017 (r319172) @@ -39,36 +39,51 @@ #include -#define ATF_REQUIRE_UNSAFE_AIO() do { \ - size_t _len; \ - int _unsafe; \ - \ - _len = sizeof(_unsafe); \ - if (sysctlbyname("vfs.aio.enable_unsafe", &_unsafe, &_len, NULL,\ - 0) < 0) { \ - if (errno != ENOENT) \ - atf_libc_error(errno, \ - "Failed to read vfs.aio.enable_unsafe"); \ - } else if (_unsafe == 0) \ - atf_tc_skip("Unsafe AIO is disabled"); \ +static const char *sysctl_oid_name = "vfs.aio.enable_unsafe"; + +static int +is_unsafe_aio_enabled(void) +{ + size_t len; + int unsafe; + + len = sizeof(unsafe); + if (sysctlbyname(sysctl_oid_name, &unsafe, &len, NULL, 0) < 0) { + if (errno == ENOENT) + return (-1); + return (0); + } + return (unsafe == 0 ? 0 : 1); +} + +#define ATF_REQUIRE_UNSAFE_AIO() do { \ + switch (is_unsafe_aio_enabled()) { \ + case -1: \ + atf_libc_error(errno, "Failed to read %s", sysctl_oid_name); \ + break; \ + case 0: \ + atf_tc_skip("Unsafe AIO is disabled"); \ + break; \ + default: \ + printf("Unsafe AIO is enabled\n"); \ + break; \ + } \ } while (0) - -#define PLAIN_REQUIRE_UNSAFE_AIO(_exit_code) do { \ - size_t _len; \ - int _unsafe; \ - \ - _len = sizeof(_unsafe); \ - if (sysctlbyname("vfs.aio.enable_unsafe", &_unsafe, &_len, NULL,\ - 0) < 0) { \ - if (errno != ENOENT) { \ - printf("Failed to read vfs.aio.enable_unsafe: %s\n",\ - strerror(errno)); \ - _exit(1); \ - } \ - } else if (_unsafe == 0) { \ - printf("Unsafe AIO is disabled"); \ - _exit(_exit_code); \ - } \ + +#define PLAIN_REQUIRE_UNSAFE_AIO(_exit_code) do { \ + switch (is_unsafe_aio_enabled()) { \ + case -1: \ + printf("Failed to read %s", sysctl_oid_name); \ + _exit(_exit_code); \ + break; \ + case 0: \ + printf("Unsafe AIO is disabled\n"); \ + _exit(_exit_code); \ + break; \ + default: \ + printf("Unsafe AIO is enabled\n"); \ + break; \ + } \ } while (0) #endif /* !_AIO_TEST_LOCAL_H_ */ From owner-svn-src-all@freebsd.org Tue May 30 03:09:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A30DAF8BDA; Tue, 30 May 2017 03:09:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 528A67377A; Tue, 30 May 2017 03:09:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U391F3053282; Tue, 30 May 2017 03:09:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3911t053281; Tue, 30 May 2017 03:09:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300309.v4U3911t053281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 03:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319173 - stable/11/tests/sys/aio X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:09:02 -0000 Author: ngie Date: Tue May 30 03:09:01 2017 New Revision: 319173 URL: https://svnweb.freebsd.org/changeset/base/319173 Log: MFC r312913,r318100,r318107: r312913 (by asomers): Improve the aio tests * Add tests for aio_suspend(2). * Add tests for polled completion notification. * Test the full matrix of file descriptor types and completion notification mechanisms. * Don't bother with mkstemp, because ATF runs every test in its own temp dir. * Fix some typos. * Remove extraneous ATF_REQUIRE_KERNEL_MODULE calls. r318100: style(9): move function definition curly braces to column 0 r318107: Remove unused constant (PATH_TEMPLATE) It was made unnecessary in r312913. MFC with: r312913 Modified: stable/11/tests/sys/aio/aio_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/aio/aio_test.c ============================================================================== --- stable/11/tests/sys/aio/aio_test.c Tue May 30 03:05:22 2017 (r319172) +++ stable/11/tests/sys/aio/aio_test.c Tue May 30 03:09:01 2017 (r319173) @@ -33,7 +33,7 @@ * reading it from a second descriptor using AIO. For some targets, the same * fd is used for write and read (i.e., file, md device), but for others the * operation is performed on a peer (pty, socket, fifo, etc). A timeout is - * initiated to detect undo blocking. This test does not attempt to exercise + * initiated to detect undue blocking. This test does not attempt to exercise * error cases or more subtle asynchronous behavior, just make sure that the * basic operations work on some basic object types. */ @@ -63,8 +63,6 @@ #include "freebsd_test_suite/macros.h" #include "local.h" -#define PATH_TEMPLATE "aio.XXXXXXXXXX" - /* * GLOBAL_MAX sets the largest usable buffer size to be read and written, as * it sizes ac_buffer in the aio_context structure. It is also the default @@ -74,6 +72,13 @@ #define GLOBAL_MAX 16384 #define BUFFER_MAX GLOBAL_MAX + +/* + * A completion function will block until the aio has completed, then return + * the result of the aio. errno will be set appropriately. + */ +typedef ssize_t (*completion)(struct aiocb*); + struct aio_context { int ac_read_fd, ac_write_fd; long ac_seed; @@ -179,6 +184,48 @@ aio_context_init(struct aio_context *ac, int read_fd, ac->ac_cleanup_arg = cleanup_arg; } +static ssize_t +poll(struct aiocb *aio) +{ + int err; + + while ((err = aio_error(aio)) == EINPROGRESS && !aio_timedout) + usleep(25000); + switch (err) { + case EINPROGRESS: + errno = EINTR; + return (-1); + case 0: + return (aio_return(aio)); + default: + return (err); + } +} + +static ssize_t +suspend(struct aiocb *aio) +{ + const struct aiocb *const iocbs[] = {aio}; + int err; + + err = aio_suspend(iocbs, 1, NULL); + if (err == 0) + return (aio_return(aio)); + else + return (err); +} + +static ssize_t +waitcomplete(struct aiocb *aio) +{ + struct aiocb *aiop; + ssize_t ret; + + ret = aio_waitcomplete(&aiop, NULL); + ATF_REQUIRE_EQ(aio, aiop); + return (ret); +} + /* * Each tester can register a callback to clean up in the event the test * fails. Preserve the value of errno so that subsequent calls to errx() @@ -201,13 +248,11 @@ aio_cleanup(struct aio_context *ac) * file descriptor. */ static void -aio_write_test(struct aio_context *ac) +aio_write_test(struct aio_context *ac, completion comp) { - struct aiocb aio, *aiop; + struct aiocb aio; ssize_t len; - ATF_REQUIRE_KERNEL_MODULE("aio"); - bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; aio.aio_nbytes = ac->ac_buflen; @@ -227,24 +272,23 @@ aio_write_test(struct aio_context *ac) atf_tc_fail("aio_write failed: %s", strerror(errno)); } - len = aio_waitcomplete(&aiop, NULL); + len = comp(&aio); if (len < 0) { if (errno == EINTR) { if (aio_timedout) { aio_cleanup(ac); - atf_tc_fail("aio_waitcomplete timed out"); + atf_tc_fail("aio timed out"); } } aio_cleanup(ac); - atf_tc_fail("aio_waitcomplete failed: %s", strerror(errno)); + atf_tc_fail("aio failed: %s", strerror(errno)); } aio_timeout_stop(); if (len != ac->ac_buflen) { aio_cleanup(ac); - atf_tc_fail("aio_waitcomplete short write (%jd)", - (intmax_t)len); + atf_tc_fail("aio short write (%jd)", (intmax_t)len); } } @@ -253,13 +297,11 @@ aio_write_test(struct aio_context *ac) * provided file descriptor. */ static void -aio_read_test(struct aio_context *ac) +aio_read_test(struct aio_context *ac, completion comp) { - struct aiocb aio, *aiop; + struct aiocb aio; ssize_t len; - ATF_REQUIRE_KERNEL_MODULE("aio"); - bzero(ac->ac_buffer, ac->ac_buflen); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -273,30 +315,30 @@ aio_read_test(struct aio_context *ac) if (errno == EINTR) { if (aio_timedout) { aio_cleanup(ac); - atf_tc_fail("aio_write timed out"); + atf_tc_fail("aio_read timed out"); } } aio_cleanup(ac); atf_tc_fail("aio_read failed: %s", strerror(errno)); } - len = aio_waitcomplete(&aiop, NULL); + len = comp(&aio); if (len < 0) { if (errno == EINTR) { if (aio_timedout) { aio_cleanup(ac); - atf_tc_fail("aio_waitcomplete timed out"); + atf_tc_fail("aio timed out"); } } aio_cleanup(ac); - atf_tc_fail("aio_waitcomplete failed: %s", strerror(errno)); + atf_tc_fail("aio failed: %s", strerror(errno)); } aio_timeout_stop(); if (len != ac->ac_buflen) { aio_cleanup(ac); - atf_tc_fail("aio_waitcomplete short read (%jd)", + atf_tc_fail("aio short read (%jd)", (intmax_t)len); } @@ -316,9 +358,11 @@ aio_read_test(struct aio_context *ac) * Test with a classic file. Assumes we can create a moderate size temporary * file. */ +#define FILE_LEN GLOBAL_MAX +#define FILE_PATHNAME "testfile" +#define FILE_TIMEOUT 30 struct aio_file_arg { int afa_fd; - char *afa_pathname; }; static void @@ -328,15 +372,12 @@ aio_file_cleanup(void *arg) afa = arg; close(afa->afa_fd); - unlink(afa->afa_pathname); + unlink(FILE_PATHNAME); } -#define FILE_LEN GLOBAL_MAX -#define FILE_TIMEOUT 30 -ATF_TC_WITHOUT_HEAD(aio_file_test); -ATF_TC_BODY(aio_file_test, tc) +static void +aio_file_test(completion comp) { - char pathname[PATH_MAX]; struct aio_file_arg arg; struct aio_context ac; int fd; @@ -344,25 +385,43 @@ ATF_TC_BODY(aio_file_test, tc) ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_UNSAFE_AIO(); - strcpy(pathname, PATH_TEMPLATE); - fd = mkstemp(pathname); - ATF_REQUIRE_MSG(fd != -1, "mkstemp failed: %s", strerror(errno)); + fd = open(FILE_PATHNAME, O_RDWR | O_CREAT); + ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); arg.afa_fd = fd; - arg.afa_pathname = pathname; aio_context_init(&ac, fd, fd, FILE_LEN, FILE_TIMEOUT, aio_file_cleanup, &arg); - aio_write_test(&ac); - aio_read_test(&ac); + aio_write_test(&ac, comp); + aio_read_test(&ac, comp); aio_file_cleanup(&arg); } +ATF_TC_WITHOUT_HEAD(file_poll); +ATF_TC_BODY(file_poll, tc) +{ + aio_file_test(poll); +} + +ATF_TC_WITHOUT_HEAD(file_suspend); +ATF_TC_BODY(file_suspend, tc) +{ + aio_file_test(suspend); +} + +ATF_TC_WITHOUT_HEAD(file_waitcomplete); +ATF_TC_BODY(file_waitcomplete, tc) +{ + aio_file_test(waitcomplete); +} + +#define FIFO_LEN 256 +#define FIFO_PATHNAME "testfifo" +#define FIFO_TIMEOUT 30 struct aio_fifo_arg { int afa_read_fd; int afa_write_fd; - char *afa_pathname; }; static void @@ -375,39 +434,25 @@ aio_fifo_cleanup(void *arg) close(afa->afa_read_fd); if (afa->afa_write_fd != -1) close(afa->afa_write_fd); - unlink(afa->afa_pathname); + unlink(FIFO_PATHNAME); } -#define FIFO_LEN 256 -#define FIFO_TIMEOUT 30 -ATF_TC_WITHOUT_HEAD(aio_fifo_test); -ATF_TC_BODY(aio_fifo_test, tc) +static void +aio_fifo_test(completion comp) { int error, read_fd = -1, write_fd = -1; struct aio_fifo_arg arg; - char pathname[PATH_MAX]; struct aio_context ac; ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_UNSAFE_AIO(); - /* - * In theory, mkstemp() can return a name that is then collided with. - * Because this is a regression test, we treat that as a test failure - * rather than retrying. - */ - strcpy(pathname, PATH_TEMPLATE); - ATF_REQUIRE_MSG(mkstemp(pathname) != -1, - "mkstemp failed: %s", strerror(errno)); - ATF_REQUIRE_MSG(unlink(pathname) == 0, - "unlink failed: %s", strerror(errno)); - ATF_REQUIRE_MSG(mkfifo(pathname, 0600) != -1, + ATF_REQUIRE_MSG(mkfifo(FIFO_PATHNAME, 0600) != -1, "mkfifo failed: %s", strerror(errno)); - arg.afa_pathname = pathname; arg.afa_read_fd = -1; arg.afa_write_fd = -1; - read_fd = open(pathname, O_RDONLY | O_NONBLOCK); + read_fd = open(FIFO_PATHNAME, O_RDONLY | O_NONBLOCK); if (read_fd == -1) { error = errno; aio_fifo_cleanup(&arg); @@ -417,7 +462,7 @@ ATF_TC_BODY(aio_fifo_test, tc) } arg.afa_read_fd = read_fd; - write_fd = open(pathname, O_WRONLY); + write_fd = open(FIFO_PATHNAME, O_WRONLY); if (write_fd == -1) { error = errno; aio_fifo_cleanup(&arg); @@ -429,12 +474,30 @@ ATF_TC_BODY(aio_fifo_test, tc) aio_context_init(&ac, read_fd, write_fd, FIFO_LEN, FIFO_TIMEOUT, aio_fifo_cleanup, &arg); - aio_write_test(&ac); - aio_read_test(&ac); + aio_write_test(&ac, comp); + aio_read_test(&ac, comp); aio_fifo_cleanup(&arg); } +ATF_TC_WITHOUT_HEAD(fifo_poll); +ATF_TC_BODY(fifo_poll, tc) +{ + aio_fifo_test(poll); +} + +ATF_TC_WITHOUT_HEAD(fifo_suspend); +ATF_TC_BODY(fifo_suspend, tc) +{ + aio_fifo_test(waitcomplete); +} + +ATF_TC_WITHOUT_HEAD(fifo_waitcomplete); +ATF_TC_BODY(fifo_waitcomplete, tc) +{ + aio_fifo_test(waitcomplete); +} + struct aio_unix_socketpair_arg { int asa_sockets[2]; }; @@ -451,8 +514,8 @@ aio_unix_socketpair_cleanup(void *arg) #define UNIX_SOCKETPAIR_LEN 256 #define UNIX_SOCKETPAIR_TIMEOUT 30 -ATF_TC_WITHOUT_HEAD(aio_unix_socketpair_test); -ATF_TC_BODY(aio_unix_socketpair_test, tc) +static void +aio_unix_socketpair_test(completion comp) { struct aio_unix_socketpair_arg arg; struct aio_context ac; @@ -471,12 +534,12 @@ ATF_TC_BODY(aio_unix_socketpair_test, tc) aio_unix_socketpair_cleanup, &arg); ATF_REQUIRE_MSG(getrusage(RUSAGE_SELF, &ru_before) != -1, "getrusage failed: %s", strerror(errno)); - aio_write_test(&ac); + aio_write_test(&ac, comp); ATF_REQUIRE_MSG(getrusage(RUSAGE_SELF, &ru_after) != -1, "getrusage failed: %s", strerror(errno)); ATF_REQUIRE(ru_after.ru_msgsnd == ru_before.ru_msgsnd + 1); ru_before = ru_after; - aio_read_test(&ac); + aio_read_test(&ac, comp); ATF_REQUIRE_MSG(getrusage(RUSAGE_SELF, &ru_after) != -1, "getrusage failed: %s", strerror(errno)); ATF_REQUIRE(ru_after.ru_msgrcv == ru_before.ru_msgrcv + 1); @@ -484,6 +547,24 @@ ATF_TC_BODY(aio_unix_socketpair_test, tc) aio_unix_socketpair_cleanup(&arg); } +ATF_TC_WITHOUT_HEAD(socket_poll); +ATF_TC_BODY(socket_poll, tc) +{ + aio_unix_socketpair_test(poll); +} + +ATF_TC_WITHOUT_HEAD(socket_suspend); +ATF_TC_BODY(socket_suspend, tc) +{ + aio_unix_socketpair_test(suspend); +} + +ATF_TC_WITHOUT_HEAD(socket_waitcomplete); +ATF_TC_BODY(socket_waitcomplete, tc) +{ + aio_unix_socketpair_test(waitcomplete); +} + struct aio_pty_arg { int apa_read_fd; int apa_write_fd; @@ -501,8 +582,8 @@ aio_pty_cleanup(void *arg) #define PTY_LEN 256 #define PTY_TIMEOUT 30 -ATF_TC_WITHOUT_HEAD(aio_pty_test); -ATF_TC_BODY(aio_pty_test, tc) +static void +aio_pty_test(completion comp) { struct aio_pty_arg arg; struct aio_context ac; @@ -535,12 +616,30 @@ ATF_TC_BODY(aio_pty_test, tc) aio_context_init(&ac, read_fd, write_fd, PTY_LEN, PTY_TIMEOUT, aio_pty_cleanup, &arg); - aio_write_test(&ac); - aio_read_test(&ac); + aio_write_test(&ac, comp); + aio_read_test(&ac, comp); aio_pty_cleanup(&arg); } +ATF_TC_WITHOUT_HEAD(pty_poll); +ATF_TC_BODY(pty_poll, tc) +{ + aio_pty_test(poll); +} + +ATF_TC_WITHOUT_HEAD(pty_suspend); +ATF_TC_BODY(pty_suspend, tc) +{ + aio_pty_test(suspend); +} + +ATF_TC_WITHOUT_HEAD(pty_waitcomplete); +ATF_TC_BODY(pty_waitcomplete, tc) +{ + aio_pty_test(waitcomplete); +} + static void aio_pipe_cleanup(void *arg) { @@ -552,8 +651,8 @@ aio_pipe_cleanup(void *arg) #define PIPE_LEN 256 #define PIPE_TIMEOUT 30 -ATF_TC_WITHOUT_HEAD(aio_pipe_test); -ATF_TC_BODY(aio_pipe_test, tc) +static void +aio_pipe_test(completion comp) { struct aio_context ac; int pipes[2]; @@ -566,12 +665,30 @@ ATF_TC_BODY(aio_pipe_test, tc) aio_context_init(&ac, pipes[0], pipes[1], PIPE_LEN, PIPE_TIMEOUT, aio_pipe_cleanup, pipes); - aio_write_test(&ac); - aio_read_test(&ac); + aio_write_test(&ac, comp); + aio_read_test(&ac, comp); aio_pipe_cleanup(pipes); } +ATF_TC_WITHOUT_HEAD(pipe_poll); +ATF_TC_BODY(pipe_poll, tc) +{ + aio_pipe_test(poll); +} + +ATF_TC_WITHOUT_HEAD(pipe_suspend); +ATF_TC_BODY(pipe_suspend, tc) +{ + aio_pipe_test(suspend); +} + +ATF_TC_WITHOUT_HEAD(pipe_waitcomplete); +ATF_TC_BODY(pipe_waitcomplete, tc) +{ + aio_pipe_test(waitcomplete); +} + struct aio_md_arg { int ama_mdctl_fd; int ama_unit; @@ -608,14 +725,9 @@ aio_md_cleanup(void *arg) #define MD_LEN GLOBAL_MAX #define MD_TIMEOUT 30 -ATF_TC(aio_md_test); -ATF_TC_HEAD(aio_md_test, tc) +static void +aio_md_test(completion comp) { - - atf_tc_set_md_var(tc, "require.user", "root"); -} -ATF_TC_BODY(aio_md_test, tc) -{ int error, fd, mdctl_fd, unit; char pathname[PATH_MAX]; struct aio_md_arg arg; @@ -654,16 +766,48 @@ ATF_TC_BODY(aio_md_test, tc) aio_context_init(&ac, fd, fd, MD_LEN, MD_TIMEOUT, aio_md_cleanup, &arg); - aio_write_test(&ac); - aio_read_test(&ac); + aio_write_test(&ac, comp); + aio_read_test(&ac, comp); aio_md_cleanup(&arg); } +ATF_TC(md_poll); +ATF_TC_HEAD(md_poll, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(md_poll, tc) +{ + aio_md_test(poll); +} + +ATF_TC(md_suspend); +ATF_TC_HEAD(md_suspend, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(md_suspend, tc) +{ + aio_md_test(suspend); +} + +ATF_TC(md_waitcomplete); +ATF_TC_HEAD(md_waitcomplete, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(md_waitcomplete, tc) +{ + aio_md_test(waitcomplete); +} + ATF_TC_WITHOUT_HEAD(aio_large_read_test); ATF_TC_BODY(aio_large_read_test, tc) { - char pathname[PATH_MAX]; struct aiocb cb, *cbp; ssize_t nread; size_t len; @@ -689,11 +833,10 @@ ATF_TC_BODY(aio_large_read_test, tc) len = INT_MAX; #endif - strcpy(pathname, PATH_TEMPLATE); - fd = mkstemp(pathname); - ATF_REQUIRE_MSG(fd != -1, "mkstemp failed: %s", strerror(errno)); + fd = open(FILE_PATHNAME, O_RDWR | O_CREAT); + ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); - unlink(pathname); + unlink(FILE_PATHNAME); memset(&cb, 0, sizeof(cb)); cb.aio_nbytes = len; @@ -937,7 +1080,6 @@ ATF_TC_BODY(aio_fsync_test, tc) char *buffer; } buffers[16]; struct stat sb; - char pathname[PATH_MAX]; ssize_t rval; unsigned i; int fd; @@ -945,10 +1087,9 @@ ATF_TC_BODY(aio_fsync_test, tc) ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_UNSAFE_AIO(); - strcpy(pathname, PATH_TEMPLATE); - fd = mkstemp(pathname); - ATF_REQUIRE_MSG(fd != -1, "mkstemp failed: %s", strerror(errno)); - unlink(pathname); + fd = open(FILE_PATHNAME, O_RDWR | O_CREAT); + ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); + unlink(FILE_PATHNAME); ATF_REQUIRE(fstat(fd, &sb) == 0); ATF_REQUIRE(sb.st_blksize != 0); @@ -1009,12 +1150,24 @@ ATF_TC_BODY(aio_fsync_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, aio_file_test); - ATF_TP_ADD_TC(tp, aio_fifo_test); - ATF_TP_ADD_TC(tp, aio_unix_socketpair_test); - ATF_TP_ADD_TC(tp, aio_pty_test); - ATF_TP_ADD_TC(tp, aio_pipe_test); - ATF_TP_ADD_TC(tp, aio_md_test); + ATF_TP_ADD_TC(tp, file_poll); + ATF_TP_ADD_TC(tp, file_suspend); + ATF_TP_ADD_TC(tp, file_waitcomplete); + ATF_TP_ADD_TC(tp, fifo_poll); + ATF_TP_ADD_TC(tp, fifo_suspend); + ATF_TP_ADD_TC(tp, fifo_waitcomplete); + ATF_TP_ADD_TC(tp, socket_poll); + ATF_TP_ADD_TC(tp, socket_suspend); + ATF_TP_ADD_TC(tp, socket_waitcomplete); + ATF_TP_ADD_TC(tp, pty_poll); + ATF_TP_ADD_TC(tp, pty_suspend); + ATF_TP_ADD_TC(tp, pty_waitcomplete); + ATF_TP_ADD_TC(tp, pipe_poll); + ATF_TP_ADD_TC(tp, pipe_suspend); + ATF_TP_ADD_TC(tp, pipe_waitcomplete); + ATF_TP_ADD_TC(tp, md_poll); + ATF_TP_ADD_TC(tp, md_suspend); + ATF_TP_ADD_TC(tp, md_waitcomplete); ATF_TP_ADD_TC(tp, aio_large_read_test); ATF_TP_ADD_TC(tp, aio_socket_two_reads); ATF_TP_ADD_TC(tp, aio_socket_blocking_short_write); From owner-svn-src-all@freebsd.org Tue May 30 03:10:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A368AF8D40; Tue, 30 May 2017 03:10:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AD6273942; Tue, 30 May 2017 03:10:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U3A5fH053406; Tue, 30 May 2017 03:10:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3A57k053405; Tue, 30 May 2017 03:10:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300310.v4U3A57k053405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 03:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319174 - stable/11/sys/tests/framework X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:10:06 -0000 Author: ngie Date: Tue May 30 03:10:05 2017 New Revision: 319174 URL: https://svnweb.freebsd.org/changeset/base/319174 Log: MFC r318006: style(9): sort headers and remove duplicates Modified: stable/11/sys/tests/framework/kern_testfrwk.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/tests/framework/kern_testfrwk.c ============================================================================== --- stable/11/sys/tests/framework/kern_testfrwk.c Tue May 30 03:09:01 2017 (r319173) +++ stable/11/sys/tests/framework/kern_testfrwk.c Tue May 30 03:10:05 2017 (r319174) @@ -27,22 +27,20 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include #include #include #include -#include #include #include #include #include +#include #include #include +#include #include #include -#include #include #include #ifdef SMP From owner-svn-src-all@freebsd.org Tue May 30 03:22:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5D59AF9720; Tue, 30 May 2017 03:22:20 +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 7FB4374374; Tue, 30 May 2017 03:22:20 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U3MJlh061099; Tue, 30 May 2017 03:22:19 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3MIaa061087; Tue, 30 May 2017 03:22:18 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705300322.v4U3MIaa061087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 30 May 2017 03:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319175 - in stable/11/contrib/ipfilter: . iplang ipsd ipsend lib tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:22:20 -0000 Author: cy Date: Tue May 30 03:22:18 2017 New Revision: 319175 URL: https://svnweb.freebsd.org/changeset/base/319175 Log: MFC r315368: calloc() and realloc() modernization. This commit replaces calloc calls, which called calloc() as if it were malloc() by allocating a multiple of objects as a sizeof multiplied by the number of objects. The patch rectifies this by calling calloc() as it was meant to be called. This commit also replaces realloc() with reallocarray() in a similar fashion as above. Instead of calculating the memory to reallocated (changed) by multiplying sizeof by the number of objects, the sizeof and number are passed as separate arguments to reallocarray(), letting reallocarray() do the multiplication instead. Like the calloc() adjustment above, this is approach is cleaner and more elegant than than the previous code. This has been tested on my production firewall and a laptop (also running ipfilter). Submitted by: pfg Modified: stable/11/contrib/ipfilter/ip_fil.c stable/11/contrib/ipfilter/iplang/iplang_l.l stable/11/contrib/ipfilter/ipsd/ipsd.c stable/11/contrib/ipfilter/ipsd/ipsdr.c stable/11/contrib/ipfilter/ipsend/lsock.c stable/11/contrib/ipfilter/ipsend/sock.c stable/11/contrib/ipfilter/lib/parsefields.c stable/11/contrib/ipfilter/lib/parseipfexpr.c stable/11/contrib/ipfilter/radix_ipf.c stable/11/contrib/ipfilter/tools/ipf_y.y stable/11/contrib/ipfilter/tools/ipfcomp.c stable/11/contrib/ipfilter/tools/ipfstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ipfilter/ip_fil.c ============================================================================== --- stable/11/contrib/ipfilter/ip_fil.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/ip_fil.c Tue May 30 03:22:18 2017 (r319175) @@ -317,8 +317,8 @@ get_unit(name, family) } else { old_ifneta = ifneta; nifs++; - ifneta = (struct ifnet **)realloc(ifneta, - (nifs + 1) * sizeof(ifp)); + ifneta = (struct ifnet **)reallocarray(ifneta, nifs + 1, + sizeof(ifp)); if (!ifneta) { free(old_ifneta); nifs = 0; Modified: stable/11/contrib/ipfilter/iplang/iplang_l.l ============================================================================== --- stable/11/contrib/ipfilter/iplang/iplang_l.l Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/iplang/iplang_l.l Tue May 30 03:22:18 2017 (r319175) @@ -195,7 +195,8 @@ void push_proto() if (!prstack) prstack = (int *)malloc(sizeof(int)); else - prstack = (int *)realloc((char *)prstack, numpr * sizeof(int)); + prstack = (int *)reallocarray((char *)prstack, numpr, + sizeof(int)); prstack[numpr - 1] = oldipproto; } Modified: stable/11/contrib/ipfilter/ipsd/ipsd.c ============================================================================== --- stable/11/contrib/ipfilter/ipsd/ipsd.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/ipsd/ipsd.c Tue May 30 03:22:18 2017 (r319175) @@ -129,7 +129,7 @@ int detect(ip, tcp) if (++ihp->sd_cnt == ihp->sd_sz) { ihp->sd_sz += 8; - sh = realloc(sh, ihp->sd_sz * sizeof(*sh)); + sh = reallocarray(sh, ihp->sd_sz, sizeof(*sh)); ihp->sd_hit = sh; } qsort(sh, ihp->sd_cnt, sizeof(*sh), ipcmp); Modified: stable/11/contrib/ipfilter/ipsd/ipsdr.c ============================================================================== --- stable/11/contrib/ipfilter/ipsd/ipsdr.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/ipsd/ipsdr.c Tue May 30 03:22:18 2017 (r319175) @@ -140,7 +140,7 @@ int detect(srcip, dport, date) if (++ihp->sd_cnt == ihp->sd_sz) { ihp->sd_sz += 8; - sh = realloc(sh, ihp->sd_sz * sizeof(*sh)); + sh = reallocarray(sh, ihp->sd_sz, sizeof(*sh)); ihp->sd_hit = sh; } qsort(sh, ihp->sd_cnt, sizeof(*sh), ipcmp); Modified: stable/11/contrib/ipfilter/ipsend/lsock.c ============================================================================== --- stable/11/contrib/ipfilter/ipsend/lsock.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/ipsend/lsock.c Tue May 30 03:22:18 2017 (r319175) @@ -163,7 +163,7 @@ struct sock *find_tcp(fd, ti) return NULL; fs = p->files; - o = (struct file **)calloc(1, sizeof(*o) * (fs->count + 1)); + o = (struct file **)calloc(fs->count + 1, sizeof(*o)); if (KMCPY(o, fs->fd, (fs->count + 1) * sizeof(*o)) == -1) { fprintf(stderr, "read(%#x,%#x,%d) - fd - failed\n", Modified: stable/11/contrib/ipfilter/ipsend/sock.c ============================================================================== --- stable/11/contrib/ipfilter/ipsend/sock.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/ipsend/sock.c Tue May 30 03:22:18 2017 (r319175) @@ -226,7 +226,7 @@ struct tcpcb *find_tcp(fd, ti) } #endif - o = (struct file **)calloc(1, sizeof(*o) * (up->u_lastfile + 1)); + o = (struct file **)calloc(up->u_lastfile + 1, sizeof(*o)); if (KMCPY(o, up->u_ofile, (up->u_lastfile + 1) * sizeof(*o)) == -1) { fprintf(stderr, "read(%#x,%#x,%d) - u_ofile - failed\n", @@ -330,7 +330,7 @@ struct tcpcb *find_tcp(tfd, ti) i = NULL; t = NULL; - o = (struct file **)calloc(1, sizeof(*o) * (fd->fd_lastfile + 1)); + o = (struct file **)calloc(fd->fd_lastfile + 1, sizeof(*o)); if (KMCPY(o, fd->fd_ofiles, (fd->fd_lastfile + 1) * sizeof(*o)) == -1) { fprintf(stderr, "read(%#lx,%#lx,%lu) - u_ofile - failed\n", Modified: stable/11/contrib/ipfilter/lib/parsefields.c ============================================================================== --- stable/11/contrib/ipfilter/lib/parsefields.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/lib/parsefields.c Tue May 30 03:22:18 2017 (r319175) @@ -32,7 +32,7 @@ wordtab_t *parsefields(table, arg) if (fields == NULL) { fields = malloc(2 * sizeof(*fields)); } else { - fields = realloc(fields, (num + 1) * sizeof(*fields)); + fields = reallocarray(fields, num + 1, sizeof(*fields)); if (fields == NULL) { warnx("memory allocation error at %d in %s in %s", __LINE__, __FUNCTION__, __FILE__); abort(); Modified: stable/11/contrib/ipfilter/lib/parseipfexpr.c ============================================================================== --- stable/11/contrib/ipfilter/lib/parseipfexpr.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/lib/parseipfexpr.c Tue May 30 03:22:18 2017 (r319175) @@ -123,9 +123,9 @@ parseipfexpr(line, errorptr) osize = asize; asize += 4 + (items * e->ipoe_nbasearg * e->ipoe_argsize); if (oplist == NULL) - oplist = calloc(1, sizeof(int) * (asize + 2)); + oplist = calloc(asize + 2, sizeof(int)); else - oplist = realloc(oplist, sizeof(int) * (asize + 2)); + oplist = reallocarray(oplist, asize + 2, sizeof(int)); if (oplist == NULL) { error = "oplist alloc failed"; goto parseerror; Modified: stable/11/contrib/ipfilter/radix_ipf.c ============================================================================== --- stable/11/contrib/ipfilter/radix_ipf.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/radix_ipf.c Tue May 30 03:22:18 2017 (r319175) @@ -1192,7 +1192,7 @@ buildtab(void) if (lines == 1) tab = malloc(sizeof(*tab) * 2); else - tab = realloc(tab, (lines + 1) * sizeof(*tab)); + tab = reallocarray(tab, lines + 1, sizeof(*tab)); tab[lines - 1].host = strdup(line); s = strchr(tab[lines - 1].host, '/'); *s++ = '\0'; Modified: stable/11/contrib/ipfilter/tools/ipf_y.y ============================================================================== --- stable/11/contrib/ipfilter/tools/ipf_y.y Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/tools/ipf_y.y Tue May 30 03:22:18 2017 (r319175) @@ -2195,7 +2195,7 @@ char *phrase; for (i = 0, s = strtok(phrase, " \r\n\t"); s != NULL; s = strtok(NULL, " \r\n\t"), i++) { - fb = realloc(fb, (i / 4 + 1) * sizeof(*fb)); + fb = reallocarray(fb, i / 4 + 1, sizeof(*fb)); if (fb == NULL) { warnx("memory allocation error at %d in %s in %s", __LINE__, __FUNCTION__, __FILE__); abort(); Modified: stable/11/contrib/ipfilter/tools/ipfcomp.c ============================================================================== --- stable/11/contrib/ipfilter/tools/ipfcomp.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/tools/ipfcomp.c Tue May 30 03:22:18 2017 (r319175) @@ -965,7 +965,7 @@ void printC(dir) frgroup_t *g; if (m == NULL) - m = (mc_t *)calloc(1, sizeof(*m) * FRC_MAX); + m = (mc_t *)calloc(FRC_MAX, sizeof(*m)); for (g = groups; g != NULL; g = g->fg_next) { if ((dir == 0) && ((g->fg_flags & FR_INQUE) != 0)) Modified: stable/11/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- stable/11/contrib/ipfilter/tools/ipfstat.c Tue May 30 03:10:05 2017 (r319174) +++ stable/11/contrib/ipfilter/tools/ipfstat.c Tue May 30 03:22:18 2017 (r319175) @@ -1422,8 +1422,8 @@ static void topipstates(saddr, daddr, sport, dport, pr tsentry++; if (!maxtsentries || tsentry == maxtsentries) { maxtsentries += STGROWSIZE; - tstable = realloc(tstable, - maxtsentries * sizeof(statetop_t)); + tstable = reallocarray(tstable, maxtsentries, + sizeof(statetop_t)); if (tstable == NULL) { perror("realloc"); exit(-1); From owner-svn-src-all@freebsd.org Tue May 30 03:25:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A60E6AF983C; Tue, 30 May 2017 03:25:06 +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 738E474559; Tue, 30 May 2017 03:25:06 +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 v4U3P5Ja061262; Tue, 30 May 2017 03:25:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3P5kh061261; Tue, 30 May 2017 03:25:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705300325.v4U3P5kh061261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 30 May 2017 03:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319176 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:25:06 -0000 Author: cy Date: Tue May 30 03:25:05 2017 New Revision: 319176 URL: https://svnweb.freebsd.org/changeset/base/319176 Log: MFC r318745: Remove redundant variable declaration. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Tue May 30 03:22:18 2017 (r319175) +++ stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Tue May 30 03:25:05 2017 (r319176) @@ -1677,10 +1677,6 @@ ipf_nat_siocdelnat(softc, softn, n, getlock) ipnat_t *n; int getlock; { -#ifdef IPF_NAT6 - int i; -#endif - if (getlock) { WRITE_ENTER(&softc->ipf_nat); } From owner-svn-src-all@freebsd.org Tue May 30 03:25:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C39FEAF9840; Tue, 30 May 2017 03:25:06 +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 91A2A7455A; Tue, 30 May 2017 03:25:06 +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 v4U3P5Fl061268; Tue, 30 May 2017 03:25:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3P5uM061267; Tue, 30 May 2017 03:25:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705300325.v4U3P5uM061267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 30 May 2017 03:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319176 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:25:06 -0000 Author: cy Date: Tue May 30 03:25:05 2017 New Revision: 319176 URL: https://svnweb.freebsd.org/changeset/base/319176 Log: MFC r318745: Remove redundant variable declaration. Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Tue May 30 03:22:18 2017 (r319175) +++ stable/10/sys/contrib/ipfilter/netinet/ip_nat.c Tue May 30 03:25:05 2017 (r319176) @@ -1682,10 +1682,6 @@ ipf_nat_siocdelnat(softc, softn, n, getlock) ipnat_t *n; int getlock; { -#ifdef IPF_NAT6 - int i; -#endif - if (getlock) { WRITE_ENTER(&softc->ipf_nat); } From owner-svn-src-all@freebsd.org Tue May 30 03:28:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F290AF9B05; Tue, 30 May 2017 03:28:01 +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 F1BC9748D6; Tue, 30 May 2017 03:28:00 +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 v4U3S0rr061497; Tue, 30 May 2017 03:28:00 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3S0Lh061496; Tue, 30 May 2017 03:28:00 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705300328.v4U3S0Lh061496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 30 May 2017 03:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319177 - in stable: 10/usr.sbin/nscd 11/usr.sbin/nscd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:28:01 -0000 Author: cy Date: Tue May 30 03:27:59 2017 New Revision: 319177 URL: https://svnweb.freebsd.org/changeset/base/319177 Log: MFC r318578: Fix non-recoverable name resolution failures due to negative cache entries never expiring. This patch honours the negative cache timeout. To test/experience the failure do the following: 1. Edit /etc/ncd.conf to adjust the cache timeouts as follows: positive-time-to-live hosts 30 negative-time-to-live hosts 1 2. Ensure that nsswitch.conf hosts line contains something like: hosts: files cache dns Note that cache must be specified before dns. 3. Start nscd. 4. Run the following command: while true; do nc -z -w 3 www.google.com 80; sleep 5; done 5. While running the command, remove or comment out all nameserver statements in /etc/resolv.conf. After a short while you will notice non-recoverable name rsolution failures. 6. Uncomment or replace all nameserver statements back into /etc/resolv.conf. Take note that name resolution never recovers. To recover nscd must be restarted. This patch fixes this. PR: 207804 Submitted by: Jov Modified: stable/11/usr.sbin/nscd/query.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/nscd/query.c Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.sbin/nscd/query.c ============================================================================== --- stable/11/usr.sbin/nscd/query.c Tue May 30 03:25:05 2017 (r319176) +++ stable/11/usr.sbin/nscd/query.c Tue May 30 03:27:59 2017 (r319177) @@ -743,9 +743,14 @@ on_read_request_process(struct query_state *qstate) &read_response->data_size); if (read_response->error_code == -2) { - read_response->error_code = 0; - read_response->data = NULL; - read_response->data_size = 0; + read_response->data = malloc( + read_response->data_size); + assert(read_response != NULL); + read_response->error_code = cache_read(neg_c_entry, + read_request->cache_key, + read_request->cache_key_size, + read_response->data, + &read_response->data_size); } } configuration_unlock_entry(qstate->config_entry, CELT_NEGATIVE); From owner-svn-src-all@freebsd.org Tue May 30 03:28:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A4D9AF9B09; Tue, 30 May 2017 03:28:01 +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 2A758748D7; Tue, 30 May 2017 03:28:01 +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 v4U3S0fh061503; Tue, 30 May 2017 03:28:00 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3S0eS061502; Tue, 30 May 2017 03:28:00 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705300328.v4U3S0eS061502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 30 May 2017 03:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319177 - in stable: 10/usr.sbin/nscd 11/usr.sbin/nscd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:28:01 -0000 Author: cy Date: Tue May 30 03:27:59 2017 New Revision: 319177 URL: https://svnweb.freebsd.org/changeset/base/319177 Log: MFC r318578: Fix non-recoverable name resolution failures due to negative cache entries never expiring. This patch honours the negative cache timeout. To test/experience the failure do the following: 1. Edit /etc/ncd.conf to adjust the cache timeouts as follows: positive-time-to-live hosts 30 negative-time-to-live hosts 1 2. Ensure that nsswitch.conf hosts line contains something like: hosts: files cache dns Note that cache must be specified before dns. 3. Start nscd. 4. Run the following command: while true; do nc -z -w 3 www.google.com 80; sleep 5; done 5. While running the command, remove or comment out all nameserver statements in /etc/resolv.conf. After a short while you will notice non-recoverable name rsolution failures. 6. Uncomment or replace all nameserver statements back into /etc/resolv.conf. Take note that name resolution never recovers. To recover nscd must be restarted. This patch fixes this. PR: 207804 Submitted by: Jov Modified: stable/10/usr.sbin/nscd/query.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/nscd/query.c Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.sbin/nscd/query.c ============================================================================== --- stable/10/usr.sbin/nscd/query.c Tue May 30 03:25:05 2017 (r319176) +++ stable/10/usr.sbin/nscd/query.c Tue May 30 03:27:59 2017 (r319177) @@ -743,9 +743,14 @@ on_read_request_process(struct query_state *qstate) &read_response->data_size); if (read_response->error_code == -2) { - read_response->error_code = 0; - read_response->data = NULL; - read_response->data_size = 0; + read_response->data = malloc( + read_response->data_size); + assert(read_response != NULL); + read_response->error_code = cache_read(neg_c_entry, + read_request->cache_key, + read_request->cache_key_size, + read_response->data, + &read_response->data_size); } } configuration_unlock_entry(qstate->config_entry, CELT_NEGATIVE); From owner-svn-src-all@freebsd.org Tue May 30 03:30:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74CD7AF9DBA; Tue, 30 May 2017 03:30: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 3FF9374C18; Tue, 30 May 2017 03:30: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 v4U3UrwH061767; Tue, 30 May 2017 03:30:53 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3Ur4v061766; Tue, 30 May 2017 03:30:53 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705300330.v4U3Ur4v061766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 30 May 2017 03:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319178 - in stable: 10/usr.sbin/nscd 11/usr.sbin/nscd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:30:54 -0000 Author: cy Date: Tue May 30 03:30:53 2017 New Revision: 319178 URL: https://svnweb.freebsd.org/changeset/base/319178 Log: MFC r318588: Fix up two assertions following malloc(). vangyzen@ notified me of the second one. The first one is fixed as well. Reported by: vangyzen@ Modified: stable/11/usr.sbin/nscd/query.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/nscd/query.c Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.sbin/nscd/query.c ============================================================================== --- stable/11/usr.sbin/nscd/query.c Tue May 30 03:27:59 2017 (r319177) +++ stable/11/usr.sbin/nscd/query.c Tue May 30 03:30:53 2017 (r319178) @@ -725,7 +725,7 @@ on_read_request_process(struct query_state *qstate) if (read_response->error_code == -2) { read_response->data = malloc( read_response->data_size); - assert(read_response != NULL); + assert(read_response->data != NULL); read_response->error_code = cache_read(c_entry, read_request->cache_key, read_request->cache_key_size, @@ -745,7 +745,7 @@ on_read_request_process(struct query_state *qstate) if (read_response->error_code == -2) { read_response->data = malloc( read_response->data_size); - assert(read_response != NULL); + assert(read_response->data != NULL); read_response->error_code = cache_read(neg_c_entry, read_request->cache_key, read_request->cache_key_size, From owner-svn-src-all@freebsd.org Tue May 30 03:30:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B453FAF9DBF; Tue, 30 May 2017 03:30: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 8215874C1A; Tue, 30 May 2017 03:30: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 v4U3Ur18061773; Tue, 30 May 2017 03:30:53 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3UrvN061772; Tue, 30 May 2017 03:30:53 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705300330.v4U3UrvN061772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 30 May 2017 03:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319178 - in stable: 10/usr.sbin/nscd 11/usr.sbin/nscd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:30:54 -0000 Author: cy Date: Tue May 30 03:30:53 2017 New Revision: 319178 URL: https://svnweb.freebsd.org/changeset/base/319178 Log: MFC r318588: Fix up two assertions following malloc(). vangyzen@ notified me of the second one. The first one is fixed as well. Reported by: vangyzen@ Modified: stable/10/usr.sbin/nscd/query.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/nscd/query.c Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.sbin/nscd/query.c ============================================================================== --- stable/10/usr.sbin/nscd/query.c Tue May 30 03:27:59 2017 (r319177) +++ stable/10/usr.sbin/nscd/query.c Tue May 30 03:30:53 2017 (r319178) @@ -725,7 +725,7 @@ on_read_request_process(struct query_state *qstate) if (read_response->error_code == -2) { read_response->data = malloc( read_response->data_size); - assert(read_response != NULL); + assert(read_response->data != NULL); read_response->error_code = cache_read(c_entry, read_request->cache_key, read_request->cache_key_size, @@ -745,7 +745,7 @@ on_read_request_process(struct query_state *qstate) if (read_response->error_code == -2) { read_response->data = malloc( read_response->data_size); - assert(read_response != NULL); + assert(read_response->data != NULL); read_response->error_code = cache_read(neg_c_entry, read_request->cache_key, read_request->cache_key_size, From owner-svn-src-all@freebsd.org Tue May 30 03:33:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4F9DAFA11A; Tue, 30 May 2017 03:33:49 +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 8A77A7520D; Tue, 30 May 2017 03:33:49 +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 v4U3Xmek065650; Tue, 30 May 2017 03:33:48 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3XmLg065649; Tue, 30 May 2017 03:33:48 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705300333.v4U3XmLg065649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 30 May 2017 03:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319179 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:33:50 -0000 Author: cy Date: Tue May 30 03:33:48 2017 New Revision: 319179 URL: https://svnweb.freebsd.org/changeset/base/319179 Log: MFC r318606: Refactor & compact struct i6addr_t #ifdef: remove redundant structure definintion when USE_INET6 is false. Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_fil.h Tue May 30 03:30:53 2017 (r319178) +++ stable/10/sys/contrib/ipfilter/netinet/ip_fil.h Tue May 30 03:33:48 2017 (r319179) @@ -143,11 +143,12 @@ typedef int (* lookupfunc_t) __P((struct ipf_main_soft * i6addr is used as a container for both IPv4 and IPv6 addresses, as well * as other types of objects, depending on its qualifier. */ -#ifdef USE_INET6 typedef union i6addr { u_32_t i6[4]; struct in_addr in4; +#ifdef USE_INET6 struct in6_addr in6; +#endif void *vptr[2]; lookupfunc_t lptr[2]; struct { @@ -156,19 +157,6 @@ typedef union i6addr { int name; } i6un; } i6addr_t; -#else -typedef union i6addr { - u_32_t i6[4]; - struct in_addr in4; - void *vptr[2]; - lookupfunc_t lptr[2]; - struct { - u_short type; - u_short subtype; - int name; - } i6un; -} i6addr_t; -#endif #define in4_addr in4.s_addr #define iplookupnum i6[1] From owner-svn-src-all@freebsd.org Tue May 30 03:33:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC85FAFA115; Tue, 30 May 2017 03:33:49 +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 7494C7520C; Tue, 30 May 2017 03:33:49 +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 v4U3Xm6B065644; Tue, 30 May 2017 03:33:48 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3XmvG065643; Tue, 30 May 2017 03:33:48 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705300333.v4U3XmvG065643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 30 May 2017 03:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319179 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:33:49 -0000 Author: cy Date: Tue May 30 03:33:48 2017 New Revision: 319179 URL: https://svnweb.freebsd.org/changeset/base/319179 Log: MFC r318606: Refactor & compact struct i6addr_t #ifdef: remove redundant structure definintion when USE_INET6 is false. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Tue May 30 03:30:53 2017 (r319178) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Tue May 30 03:33:48 2017 (r319179) @@ -143,11 +143,12 @@ typedef int (* lookupfunc_t) __P((struct ipf_main_soft * i6addr is used as a container for both IPv4 and IPv6 addresses, as well * as other types of objects, depending on its qualifier. */ -#ifdef USE_INET6 typedef union i6addr { u_32_t i6[4]; struct in_addr in4; +#ifdef USE_INET6 struct in6_addr in6; +#endif void *vptr[2]; lookupfunc_t lptr[2]; struct { @@ -156,19 +157,6 @@ typedef union i6addr { int name; } i6un; } i6addr_t; -#else -typedef union i6addr { - u_32_t i6[4]; - struct in_addr in4; - void *vptr[2]; - lookupfunc_t lptr[2]; - struct { - u_short type; - u_short subtype; - int name; - } i6un; -} i6addr_t; -#endif #define in4_addr in4.s_addr #define iplookupnum i6[1] From owner-svn-src-all@freebsd.org Tue May 30 03:55:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B516AFABCE; Tue, 30 May 2017 03:55:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F4F875ECD; Tue, 30 May 2017 03:55:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U3tcYa073966; Tue, 30 May 2017 03:55:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U3tcfl073965; Tue, 30 May 2017 03:55:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300355.v4U3tcfl073965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 03:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319180 - stable/11/sys/dev/bhnd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 03:55:39 -0000 Author: ngie Date: Tue May 30 03:55:38 2017 New Revision: 319180 URL: https://svnweb.freebsd.org/changeset/base/319180 Log: MFC r308161: r308161 (by lwhsu): - Fix `make` in sys/modules/bhnd Modified: stable/11/sys/dev/bhnd/bhnd_debug.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/bhnd/bhnd_debug.h ============================================================================== --- stable/11/sys/dev/bhnd/bhnd_debug.h Tue May 30 03:33:48 2017 (r319179) +++ stable/11/sys/dev/bhnd/bhnd_debug.h Tue May 30 03:55:38 2017 (r319180) @@ -70,8 +70,6 @@ #include -#include "opt_global.h" - #define BHND_ERROR_LEVEL 0x00 #define BHND_ERROR_MSG "ERROR" #define BHND_WARN_LEVEL 0x10 From owner-svn-src-all@freebsd.org Tue May 30 04:00:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41A80AFACBE; Tue, 30 May 2017 04:00:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F3B976079; Tue, 30 May 2017 04:00:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U40QeO074254; Tue, 30 May 2017 04:00:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U40QuT074253; Tue, 30 May 2017 04:00:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300400.v4U40QuT074253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319181 - stable/11/sys/modules/gpio/gpiospi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:00:27 -0000 Author: ngie Date: Tue May 30 04:00:26 2017 New Revision: 319181 URL: https://svnweb.freebsd.org/changeset/base/319181 Log: MFC r307698: r307698 (by lwhsu): - Add required header for fixing `make` in sys/modules/gpio Modified: stable/11/sys/modules/gpio/gpiospi/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/gpio/gpiospi/Makefile ============================================================================== --- stable/11/sys/modules/gpio/gpiospi/Makefile Tue May 30 03:55:38 2017 (r319180) +++ stable/11/sys/modules/gpio/gpiospi/Makefile Tue May 30 04:00:26 2017 (r319181) @@ -34,7 +34,7 @@ KMOD= gpiospi SRCS= gpiospi.c SRCS+= device_if.h bus_if.h gpio_if.h gpiobus_if.h spibus_if.h -SRCS+= ofw_bus_if.h opt_gpio.h +SRCS+= ofw_bus_if.h opt_gpio.h opt_platform.h CFLAGS+= -I. -I${.CURDIR}/../../../dev/gpio/ From owner-svn-src-all@freebsd.org Tue May 30 04:11:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 588D3AFB055; Tue, 30 May 2017 04:11:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD84E765A6; Tue, 30 May 2017 04:11:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U4BMNk081302; Tue, 30 May 2017 04:11:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U4BD2a081212; Tue, 30 May 2017 04:11:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300411.v4U4BD2a081212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319182 - in stable/11/sys/modules: . 3dfx 3dfx_linux aac aac/aac_linux aacraid aacraid/aacraid_linux accf_data accf_dns accf_http acl_nfs4 acl_posix1e acpi/acpi_asus acpi/acpi_asus_wmi... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:11:23 -0000 Author: ngie Date: Tue May 30 04:11:12 2017 New Revision: 319182 URL: https://svnweb.freebsd.org/changeset/base/319182 Log: MFC r314651,r318439,r318440: r314651: sys/modules: normalize .CURDIR-relative paths to SRCTOP This simplifies make output/logic Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 r318439: Normalize .PATH on SRCTOP This will help Jenkins dedupe 9 warnings between the static build and the module build of ipsec(4). Missed in SRCTOP conversion in r314651. MFC with: r314651 r318440: Normalize SYSDIR on SRCTOP instead of .CURDIR This is being done to simplify pathing for CFLAGS and source files. Modified: stable/11/sys/modules/3dfx/Makefile stable/11/sys/modules/3dfx_linux/Makefile stable/11/sys/modules/Makefile stable/11/sys/modules/aac/Makefile stable/11/sys/modules/aac/aac_linux/Makefile stable/11/sys/modules/aacraid/Makefile stable/11/sys/modules/aacraid/aacraid_linux/Makefile stable/11/sys/modules/accf_data/Makefile stable/11/sys/modules/accf_dns/Makefile stable/11/sys/modules/accf_http/Makefile stable/11/sys/modules/acl_nfs4/Makefile stable/11/sys/modules/acl_posix1e/Makefile stable/11/sys/modules/acpi/acpi_asus/Makefile stable/11/sys/modules/acpi/acpi_asus_wmi/Makefile stable/11/sys/modules/acpi/acpi_dock/Makefile stable/11/sys/modules/acpi/acpi_fujitsu/Makefile stable/11/sys/modules/acpi/acpi_hp/Makefile stable/11/sys/modules/acpi/acpi_ibm/Makefile stable/11/sys/modules/acpi/acpi_panasonic/Makefile stable/11/sys/modules/acpi/acpi_rapidstart/Makefile stable/11/sys/modules/acpi/acpi_sony/Makefile stable/11/sys/modules/acpi/acpi_toshiba/Makefile stable/11/sys/modules/acpi/acpi_video/Makefile stable/11/sys/modules/acpi/acpi_wmi/Makefile stable/11/sys/modules/acpi/aibs/Makefile stable/11/sys/modules/ae/Makefile stable/11/sys/modules/aesni/Makefile stable/11/sys/modules/age/Makefile stable/11/sys/modules/agp/Makefile stable/11/sys/modules/aha/Makefile stable/11/sys/modules/ahci/Makefile stable/11/sys/modules/aic/Makefile stable/11/sys/modules/aic7xxx/ahc/Makefile stable/11/sys/modules/aic7xxx/ahc/ahc_isa/Makefile stable/11/sys/modules/aic7xxx/ahc/ahc_pci/Makefile stable/11/sys/modules/aic7xxx/ahd/Makefile stable/11/sys/modules/aic7xxx/aicasm/Makefile stable/11/sys/modules/alc/Makefile stable/11/sys/modules/ale/Makefile stable/11/sys/modules/alq/Makefile stable/11/sys/modules/am335x_dmtpps/Makefile stable/11/sys/modules/amd_ecc_inject/Makefile stable/11/sys/modules/amdsbwd/Makefile stable/11/sys/modules/amdtemp/Makefile stable/11/sys/modules/amr/Makefile stable/11/sys/modules/amr/amr_cam/Makefile stable/11/sys/modules/amr/amr_linux/Makefile stable/11/sys/modules/an/Makefile stable/11/sys/modules/aout/Makefile stable/11/sys/modules/apm/Makefile stable/11/sys/modules/ar71xx/ar71xx_ehci/Makefile stable/11/sys/modules/ar71xx/ar71xx_ohci/Makefile stable/11/sys/modules/arcmsr/Makefile stable/11/sys/modules/arcnet/Makefile stable/11/sys/modules/asmc/Makefile stable/11/sys/modules/ata/atacard/Makefile stable/11/sys/modules/ata/atacore/Makefile stable/11/sys/modules/ata/ataisa/Makefile stable/11/sys/modules/ata/atapci/Makefile stable/11/sys/modules/ata/atapci/chipsets/ataacard/Makefile stable/11/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile stable/11/sys/modules/ata/atapci/chipsets/ataamd/Makefile stable/11/sys/modules/ata/atapci/chipsets/ataati/Makefile stable/11/sys/modules/ata/atapci/chipsets/atacenatek/Makefile stable/11/sys/modules/ata/atapci/chipsets/atacypress/Makefile stable/11/sys/modules/ata/atapci/chipsets/atacyrix/Makefile stable/11/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile stable/11/sys/modules/ata/atapci/chipsets/ataintel/Makefile stable/11/sys/modules/ata/atapci/chipsets/ataite/Makefile stable/11/sys/modules/ata/atapci/chipsets/atajmicron/Makefile stable/11/sys/modules/ata/atapci/chipsets/atamarvell/Makefile stable/11/sys/modules/ata/atapci/chipsets/atamicron/Makefile stable/11/sys/modules/ata/atapci/chipsets/atanational/Makefile stable/11/sys/modules/ata/atapci/chipsets/atanetcell/Makefile stable/11/sys/modules/ata/atapci/chipsets/atanvidia/Makefile stable/11/sys/modules/ata/atapci/chipsets/atapromise/Makefile stable/11/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile stable/11/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile stable/11/sys/modules/ata/atapci/chipsets/atasis/Makefile stable/11/sys/modules/ata/atapci/chipsets/atavia/Makefile stable/11/sys/modules/ath_ahb/Makefile stable/11/sys/modules/ath_pci/Makefile stable/11/sys/modules/autofs/Makefile stable/11/sys/modules/auxio/Makefile stable/11/sys/modules/bce/Makefile stable/11/sys/modules/bfe/Makefile stable/11/sys/modules/bge/Makefile stable/11/sys/modules/bhnd/Makefile stable/11/sys/modules/bhnd/bcma/Makefile stable/11/sys/modules/bhnd/bcma_bhndb/Makefile stable/11/sys/modules/bhnd/bhndb/Makefile stable/11/sys/modules/bhnd/bhndb_pci/Makefile stable/11/sys/modules/bhnd/cores/bhnd_pci/Makefile stable/11/sys/modules/bhnd/cores/bhnd_pci_hostb/Makefile stable/11/sys/modules/bhnd/cores/bhnd_pcib/Makefile stable/11/sys/modules/bhnd/siba/Makefile stable/11/sys/modules/bhnd/siba_bhndb/Makefile stable/11/sys/modules/bios/smapi/Makefile stable/11/sys/modules/bios/smbios/Makefile stable/11/sys/modules/bios/vpd/Makefile stable/11/sys/modules/bktr/bktr/Makefile stable/11/sys/modules/bktr/bktr_mem/Makefile stable/11/sys/modules/bm/Makefile stable/11/sys/modules/bnxt/Makefile stable/11/sys/modules/bridgestp/Makefile stable/11/sys/modules/bwi/Makefile stable/11/sys/modules/bwn/Makefile stable/11/sys/modules/bwn_pci/Makefile stable/11/sys/modules/bxe/Makefile stable/11/sys/modules/bytgpio/Makefile stable/11/sys/modules/cam/Makefile stable/11/sys/modules/cardbus/Makefile stable/11/sys/modules/carp/Makefile stable/11/sys/modules/cas/Makefile stable/11/sys/modules/cbb/Makefile stable/11/sys/modules/cc/cc_cdg/Makefile stable/11/sys/modules/cc/cc_chd/Makefile stable/11/sys/modules/cc/cc_cubic/Makefile stable/11/sys/modules/cc/cc_dctcp/Makefile stable/11/sys/modules/cc/cc_hd/Makefile stable/11/sys/modules/cc/cc_htcp/Makefile stable/11/sys/modules/cc/cc_vegas/Makefile stable/11/sys/modules/cd9660/Makefile stable/11/sys/modules/cd9660_iconv/Makefile stable/11/sys/modules/ce/Makefile stable/11/sys/modules/cfi/Makefile stable/11/sys/modules/chromebook_platform/Makefile stable/11/sys/modules/ciss/Makefile stable/11/sys/modules/cloudabi/Makefile stable/11/sys/modules/cloudabi32/Makefile stable/11/sys/modules/cloudabi64/Makefile stable/11/sys/modules/cm/Makefile stable/11/sys/modules/cmx/Makefile stable/11/sys/modules/coff/Makefile stable/11/sys/modules/coretemp/Makefile stable/11/sys/modules/cp/Makefile stable/11/sys/modules/cpsw/Makefile stable/11/sys/modules/cpuctl/Makefile stable/11/sys/modules/cpufreq/Makefile stable/11/sys/modules/crypto/Makefile stable/11/sys/modules/cryptodev/Makefile stable/11/sys/modules/cs/Makefile stable/11/sys/modules/ctau/Makefile stable/11/sys/modules/ctl/Makefile stable/11/sys/modules/cuse/Makefile stable/11/sys/modules/cx/Makefile stable/11/sys/modules/cxgb/Makefile stable/11/sys/modules/cxgb/cxgb/Makefile stable/11/sys/modules/cxgb/cxgb_t3fw/Makefile stable/11/sys/modules/cxgb/iw_cxgb/Makefile stable/11/sys/modules/cxgb/tom/Makefile stable/11/sys/modules/cxgbe/Makefile stable/11/sys/modules/cxgbe/cxgbei/Makefile stable/11/sys/modules/cxgbe/if_cc/Makefile stable/11/sys/modules/cxgbe/if_ccv/Makefile stable/11/sys/modules/cxgbe/if_cxgbe/Makefile stable/11/sys/modules/cxgbe/if_cxgbev/Makefile stable/11/sys/modules/cxgbe/if_cxl/Makefile stable/11/sys/modules/cxgbe/if_cxlv/Makefile stable/11/sys/modules/cxgbe/iw_cxgbe/Makefile stable/11/sys/modules/cxgbe/t4_firmware/Makefile stable/11/sys/modules/cxgbe/t5_firmware/Makefile stable/11/sys/modules/cxgbe/t6_firmware/Makefile stable/11/sys/modules/cxgbe/tom/Makefile stable/11/sys/modules/dc/Makefile stable/11/sys/modules/dcons/Makefile stable/11/sys/modules/dcons_crom/Makefile stable/11/sys/modules/de/Makefile stable/11/sys/modules/dpms/Makefile stable/11/sys/modules/dpt/Makefile stable/11/sys/modules/drm/Makefile stable/11/sys/modules/drm/drm/Makefile stable/11/sys/modules/drm/i915/Makefile stable/11/sys/modules/drm/mach64/Makefile stable/11/sys/modules/drm/mga/Makefile stable/11/sys/modules/drm/r128/Makefile stable/11/sys/modules/drm/radeon/Makefile stable/11/sys/modules/drm/savage/Makefile stable/11/sys/modules/drm/sis/Makefile stable/11/sys/modules/drm/tdfx/Makefile stable/11/sys/modules/drm/via/Makefile stable/11/sys/modules/drm2/Makefile stable/11/sys/modules/drm2/drm2/Makefile stable/11/sys/modules/drm2/i915kms/Makefile stable/11/sys/modules/drm2/radeonkms/Makefile stable/11/sys/modules/drm2/radeonkmsfw/Makefile.inc stable/11/sys/modules/dtrace/dtmalloc/Makefile stable/11/sys/modules/dtrace/dtnfscl/Makefile stable/11/sys/modules/dtrace/dtrace/Makefile stable/11/sys/modules/dtrace/dtrace_test/Makefile stable/11/sys/modules/dtrace/dtraceall/Makefile stable/11/sys/modules/dtrace/fasttrap/Makefile stable/11/sys/modules/dtrace/fbt/Makefile stable/11/sys/modules/dtrace/profile/Makefile stable/11/sys/modules/dtrace/prototype/Makefile stable/11/sys/modules/dtrace/sdt/Makefile stable/11/sys/modules/dtrace/systrace/Makefile stable/11/sys/modules/dtrace/systrace_freebsd32/Makefile stable/11/sys/modules/dtrace/systrace_linux/Makefile stable/11/sys/modules/dtrace/systrace_linux32/Makefile stable/11/sys/modules/dummynet/Makefile stable/11/sys/modules/ed/Makefile stable/11/sys/modules/efirt/Makefile stable/11/sys/modules/elink/Makefile stable/11/sys/modules/em/Makefile stable/11/sys/modules/en/Makefile stable/11/sys/modules/ep/Makefile stable/11/sys/modules/epic/Makefile stable/11/sys/modules/esp/Makefile stable/11/sys/modules/et/Makefile stable/11/sys/modules/evdev/Makefile stable/11/sys/modules/ex/Makefile stable/11/sys/modules/exca/Makefile stable/11/sys/modules/ext2fs/Makefile stable/11/sys/modules/fatm/Makefile stable/11/sys/modules/fdc/Makefile stable/11/sys/modules/fdescfs/Makefile stable/11/sys/modules/fe/Makefile stable/11/sys/modules/filemon/Makefile stable/11/sys/modules/firewire/firewire/Makefile stable/11/sys/modules/firewire/fwe/Makefile stable/11/sys/modules/firewire/fwip/Makefile stable/11/sys/modules/firewire/sbp/Makefile stable/11/sys/modules/firewire/sbp_targ/Makefile stable/11/sys/modules/firmware/Makefile stable/11/sys/modules/fuse/Makefile stable/11/sys/modules/fxp/Makefile stable/11/sys/modules/gem/Makefile stable/11/sys/modules/geom/Makefile stable/11/sys/modules/geom/geom_bde/Makefile stable/11/sys/modules/geom/geom_bsd/Makefile stable/11/sys/modules/geom/geom_cache/Makefile stable/11/sys/modules/geom/geom_ccd/Makefile stable/11/sys/modules/geom/geom_concat/Makefile stable/11/sys/modules/geom/geom_eli/Makefile stable/11/sys/modules/geom/geom_flashmap/Makefile stable/11/sys/modules/geom/geom_fox/Makefile stable/11/sys/modules/geom/geom_gate/Makefile stable/11/sys/modules/geom/geom_journal/Makefile stable/11/sys/modules/geom/geom_label/Makefile stable/11/sys/modules/geom/geom_linux_lvm/Makefile stable/11/sys/modules/geom/geom_map/Makefile stable/11/sys/modules/geom/geom_mbr/Makefile stable/11/sys/modules/geom/geom_mirror/Makefile stable/11/sys/modules/geom/geom_mountver/Makefile stable/11/sys/modules/geom/geom_multipath/Makefile stable/11/sys/modules/geom/geom_nop/Makefile stable/11/sys/modules/geom/geom_part/geom_part_apm/Makefile stable/11/sys/modules/geom/geom_part/geom_part_bsd/Makefile stable/11/sys/modules/geom/geom_part/geom_part_bsd64/Makefile stable/11/sys/modules/geom/geom_part/geom_part_ebr/Makefile stable/11/sys/modules/geom/geom_part/geom_part_gpt/Makefile stable/11/sys/modules/geom/geom_part/geom_part_ldm/Makefile stable/11/sys/modules/geom/geom_part/geom_part_mbr/Makefile stable/11/sys/modules/geom/geom_part/geom_part_vtoc8/Makefile stable/11/sys/modules/geom/geom_raid/Makefile stable/11/sys/modules/geom/geom_raid3/Makefile stable/11/sys/modules/geom/geom_sched/Makefile.inc stable/11/sys/modules/geom/geom_shsec/Makefile stable/11/sys/modules/geom/geom_stripe/Makefile stable/11/sys/modules/geom/geom_sunlabel/Makefile stable/11/sys/modules/geom/geom_uzip/Makefile stable/11/sys/modules/geom/geom_vinum/Makefile stable/11/sys/modules/geom/geom_virstor/Makefile stable/11/sys/modules/geom/geom_vol_ffs/Makefile stable/11/sys/modules/geom/geom_zero/Makefile stable/11/sys/modules/glxiic/Makefile stable/11/sys/modules/glxsb/Makefile stable/11/sys/modules/gpio/gpiobus/Makefile stable/11/sys/modules/gpio/gpioiic/Makefile stable/11/sys/modules/gpio/gpiokeys/Makefile stable/11/sys/modules/gpio/gpioled/Makefile stable/11/sys/modules/gpio/gpiopps/Makefile stable/11/sys/modules/gpio/gpiospi/Makefile stable/11/sys/modules/hatm/Makefile stable/11/sys/modules/hifn/Makefile stable/11/sys/modules/hme/Makefile stable/11/sys/modules/hpt27xx/Makefile stable/11/sys/modules/hptiop/Makefile stable/11/sys/modules/hptmv/Makefile stable/11/sys/modules/hptnr/Makefile stable/11/sys/modules/hptrr/Makefile stable/11/sys/modules/hwpmc/Makefile stable/11/sys/modules/hyperv/netvsc/Makefile stable/11/sys/modules/hyperv/pcib/Makefile stable/11/sys/modules/hyperv/storvsc/Makefile stable/11/sys/modules/hyperv/utilities/Makefile stable/11/sys/modules/hyperv/vmbus/Makefile stable/11/sys/modules/i2c/controllers/alpm/Makefile stable/11/sys/modules/i2c/controllers/amdpm/Makefile stable/11/sys/modules/i2c/controllers/amdsmb/Makefile stable/11/sys/modules/i2c/controllers/ichiic/Makefile stable/11/sys/modules/i2c/controllers/ichsmb/Makefile stable/11/sys/modules/i2c/controllers/intpm/Makefile stable/11/sys/modules/i2c/controllers/ismt/Makefile stable/11/sys/modules/i2c/controllers/lpbb/Makefile stable/11/sys/modules/i2c/controllers/nfsmb/Makefile stable/11/sys/modules/i2c/controllers/pcf/Makefile stable/11/sys/modules/i2c/controllers/viapm/Makefile stable/11/sys/modules/i2c/cyapa/Makefile stable/11/sys/modules/i2c/if_ic/Makefile stable/11/sys/modules/i2c/iic/Makefile stable/11/sys/modules/i2c/iicbb/Makefile stable/11/sys/modules/i2c/iicbus/Makefile stable/11/sys/modules/i2c/iicsmb/Makefile stable/11/sys/modules/i2c/isl/Makefile stable/11/sys/modules/i2c/jedec_ts/Makefile stable/11/sys/modules/i2c/smb/Makefile stable/11/sys/modules/i2c/smbus/Makefile stable/11/sys/modules/ibcore/Makefile stable/11/sys/modules/ibcs2/Makefile stable/11/sys/modules/ichwd/Makefile stable/11/sys/modules/ida/Makefile stable/11/sys/modules/if_bridge/Makefile stable/11/sys/modules/if_disc/Makefile stable/11/sys/modules/if_edsc/Makefile stable/11/sys/modules/if_enc/Makefile stable/11/sys/modules/if_epair/Makefile stable/11/sys/modules/if_gif/Makefile stable/11/sys/modules/if_gre/Makefile stable/11/sys/modules/if_lagg/Makefile stable/11/sys/modules/if_me/Makefile stable/11/sys/modules/if_ndis/Makefile stable/11/sys/modules/if_stf/Makefile stable/11/sys/modules/if_tap/Makefile stable/11/sys/modules/if_tun/Makefile stable/11/sys/modules/if_vlan/Makefile stable/11/sys/modules/if_vxlan/Makefile stable/11/sys/modules/iir/Makefile stable/11/sys/modules/imgact_binmisc/Makefile stable/11/sys/modules/intelspi/Makefile stable/11/sys/modules/io/Makefile stable/11/sys/modules/ioat/Makefile stable/11/sys/modules/ip6_mroute_mod/Makefile stable/11/sys/modules/ip_mroute_mod/Makefile stable/11/sys/modules/ipdivert/Makefile stable/11/sys/modules/ipfilter/Makefile stable/11/sys/modules/ipfw/Makefile stable/11/sys/modules/ipfw_nat/Makefile stable/11/sys/modules/ipfw_nat64/Makefile stable/11/sys/modules/ipfw_nptv6/Makefile stable/11/sys/modules/ipmi/Makefile stable/11/sys/modules/ipmi/ipmi_linux/Makefile stable/11/sys/modules/ipoib/Makefile stable/11/sys/modules/ips/Makefile stable/11/sys/modules/ipsec/Makefile stable/11/sys/modules/ipw/Makefile stable/11/sys/modules/ipwfw/ipw_bss/Makefile stable/11/sys/modules/ipwfw/ipw_ibss/Makefile stable/11/sys/modules/ipwfw/ipw_monitor/Makefile stable/11/sys/modules/isci/Makefile stable/11/sys/modules/iscsi/Makefile stable/11/sys/modules/iscsi_initiator/Makefile stable/11/sys/modules/iser/Makefile stable/11/sys/modules/isp/Makefile stable/11/sys/modules/ispfw/isp_1000/Makefile stable/11/sys/modules/ispfw/isp_1040/Makefile stable/11/sys/modules/ispfw/isp_1080/Makefile stable/11/sys/modules/ispfw/isp_12160/Makefile stable/11/sys/modules/ispfw/isp_2100/Makefile stable/11/sys/modules/ispfw/isp_2200/Makefile stable/11/sys/modules/ispfw/isp_2300/Makefile stable/11/sys/modules/ispfw/isp_2322/Makefile stable/11/sys/modules/ispfw/isp_2400/Makefile stable/11/sys/modules/ispfw/isp_2500/Makefile stable/11/sys/modules/ispfw/ispfw/Makefile stable/11/sys/modules/iwi/Makefile stable/11/sys/modules/iwifw/iwi_bss/Makefile stable/11/sys/modules/iwifw/iwi_ibss/Makefile stable/11/sys/modules/iwifw/iwi_monitor/Makefile stable/11/sys/modules/iwm/Makefile stable/11/sys/modules/iwmfw/Makefile.inc stable/11/sys/modules/iwn/Makefile stable/11/sys/modules/iwnfw/Makefile.inc stable/11/sys/modules/ix/Makefile stable/11/sys/modules/ixgb/Makefile stable/11/sys/modules/ixl/Makefile stable/11/sys/modules/ixlv/Makefile stable/11/sys/modules/ixv/Makefile stable/11/sys/modules/jme/Makefile stable/11/sys/modules/joy/Makefile stable/11/sys/modules/kbdmux/Makefile stable/11/sys/modules/kgssapi/Makefile stable/11/sys/modules/kgssapi_krb5/Makefile stable/11/sys/modules/khelp/h_ertt/Makefile stable/11/sys/modules/krpc/Makefile stable/11/sys/modules/ksyms/Makefile stable/11/sys/modules/le/Makefile stable/11/sys/modules/lge/Makefile stable/11/sys/modules/libalias/libalias/Makefile stable/11/sys/modules/libalias/modules/Makefile.inc stable/11/sys/modules/libiconv/Makefile stable/11/sys/modules/libmbpool/Makefile stable/11/sys/modules/libmchain/Makefile stable/11/sys/modules/linprocfs/Makefile stable/11/sys/modules/linsysfs/Makefile stable/11/sys/modules/linux/Makefile stable/11/sys/modules/linux64/Makefile stable/11/sys/modules/linux_common/Makefile stable/11/sys/modules/linuxkpi/Makefile stable/11/sys/modules/lmc/Makefile stable/11/sys/modules/lpt/Makefile stable/11/sys/modules/mac_biba/Makefile stable/11/sys/modules/mac_bsdextended/Makefile stable/11/sys/modules/mac_ifoff/Makefile stable/11/sys/modules/mac_lomac/Makefile stable/11/sys/modules/mac_mls/Makefile stable/11/sys/modules/mac_none/Makefile stable/11/sys/modules/mac_partition/Makefile stable/11/sys/modules/mac_portacl/Makefile stable/11/sys/modules/mac_seeotheruids/Makefile stable/11/sys/modules/mac_stub/Makefile stable/11/sys/modules/mac_test/Makefile stable/11/sys/modules/malo/Makefile stable/11/sys/modules/md/Makefile stable/11/sys/modules/mdio/Makefile stable/11/sys/modules/mem/Makefile stable/11/sys/modules/mfi/Makefile stable/11/sys/modules/mfi/mfi_linux/Makefile stable/11/sys/modules/mfi/mfip/Makefile stable/11/sys/modules/mii/Makefile stable/11/sys/modules/mlx/Makefile stable/11/sys/modules/mlx4/Makefile stable/11/sys/modules/mlx4ib/Makefile stable/11/sys/modules/mlx5/Makefile stable/11/sys/modules/mlx5en/Makefile stable/11/sys/modules/mly/Makefile stable/11/sys/modules/mmc/Makefile stable/11/sys/modules/mmcsd/Makefile stable/11/sys/modules/mpr/Makefile stable/11/sys/modules/mps/Makefile stable/11/sys/modules/mpt/Makefile stable/11/sys/modules/mqueue/Makefile stable/11/sys/modules/mrsas/Makefile stable/11/sys/modules/mrsas/mrsas_linux/Makefile stable/11/sys/modules/msdosfs/Makefile stable/11/sys/modules/msdosfs_iconv/Makefile stable/11/sys/modules/mse/Makefile stable/11/sys/modules/msk/Makefile stable/11/sys/modules/mthca/Makefile stable/11/sys/modules/mvs/Makefile stable/11/sys/modules/mwl/Makefile stable/11/sys/modules/mwlfw/Makefile stable/11/sys/modules/mxge/mxge/Makefile stable/11/sys/modules/mxge/mxge_eth_z8e/Makefile stable/11/sys/modules/mxge/mxge_ethp_z8e/Makefile stable/11/sys/modules/mxge/mxge_rss_eth_z8e/Makefile stable/11/sys/modules/mxge/mxge_rss_ethp_z8e/Makefile stable/11/sys/modules/my/Makefile stable/11/sys/modules/nand/Makefile stable/11/sys/modules/nandfs/Makefile stable/11/sys/modules/nandsim/Makefile stable/11/sys/modules/ncr/Makefile stable/11/sys/modules/nctgpio/Makefile stable/11/sys/modules/ncv/Makefile stable/11/sys/modules/ndis/Makefile stable/11/sys/modules/netfpga10g/nf10bmac/Makefile stable/11/sys/modules/netgraph/Makefile stable/11/sys/modules/netgraph/Makefile.inc stable/11/sys/modules/netgraph/atm/atm/Makefile stable/11/sys/modules/netgraph/atm/atmbase/Makefile stable/11/sys/modules/netgraph/atm/ccatm/Makefile stable/11/sys/modules/netgraph/atm/sscfu/Makefile stable/11/sys/modules/netgraph/atm/sscop/Makefile stable/11/sys/modules/netgraph/atm/uni/Makefile stable/11/sys/modules/netgraph/bluetooth/bluetooth/Makefile stable/11/sys/modules/netgraph/bluetooth/bt3c/Makefile stable/11/sys/modules/netgraph/bluetooth/h4/Makefile stable/11/sys/modules/netgraph/bluetooth/hci/Makefile stable/11/sys/modules/netgraph/bluetooth/l2cap/Makefile stable/11/sys/modules/netgraph/bluetooth/socket/Makefile stable/11/sys/modules/netgraph/bluetooth/ubt/Makefile stable/11/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile stable/11/sys/modules/netgraph/bpf/Makefile stable/11/sys/modules/netgraph/mppc/Makefile stable/11/sys/modules/netgraph/netflow/Makefile stable/11/sys/modules/netgraph/vjc/Makefile stable/11/sys/modules/netmap/Makefile stable/11/sys/modules/nfe/Makefile stable/11/sys/modules/nfscl/Makefile stable/11/sys/modules/nfscommon/Makefile stable/11/sys/modules/nfsd/Makefile stable/11/sys/modules/nfslock/Makefile stable/11/sys/modules/nfslockd/Makefile stable/11/sys/modules/nfssvc/Makefile stable/11/sys/modules/nge/Makefile stable/11/sys/modules/nmdm/Makefile stable/11/sys/modules/nsp/Makefile stable/11/sys/modules/ntb/if_ntb/Makefile stable/11/sys/modules/ntb/ntb/Makefile stable/11/sys/modules/ntb/ntb_hw/Makefile stable/11/sys/modules/ntb/ntb_transport/Makefile stable/11/sys/modules/nullfs/Makefile stable/11/sys/modules/nvd/Makefile stable/11/sys/modules/nvme/Makefile stable/11/sys/modules/nvram/Makefile stable/11/sys/modules/nxge/Makefile stable/11/sys/modules/oce/Makefile stable/11/sys/modules/opensolaris/Makefile stable/11/sys/modules/otus/Makefile stable/11/sys/modules/otusfw/otusfw_init/Makefile stable/11/sys/modules/otusfw/otusfw_main/Makefile stable/11/sys/modules/ow/Makefile stable/11/sys/modules/ow/ow/Makefile stable/11/sys/modules/ow/ow_temp/Makefile stable/11/sys/modules/ow/owc/Makefile stable/11/sys/modules/padlock/Makefile stable/11/sys/modules/padlock_rng/Makefile stable/11/sys/modules/patm/Makefile stable/11/sys/modules/pccard/Makefile stable/11/sys/modules/pcfclock/Makefile stable/11/sys/modules/pcn/Makefile stable/11/sys/modules/pf/Makefile stable/11/sys/modules/pflog/Makefile stable/11/sys/modules/pfsync/Makefile stable/11/sys/modules/plip/Makefile stable/11/sys/modules/pms/Makefile stable/11/sys/modules/powermac_nvram/Makefile stable/11/sys/modules/ppbus/Makefile stable/11/sys/modules/ppc/Makefile stable/11/sys/modules/ppi/Makefile stable/11/sys/modules/pps/Makefile stable/11/sys/modules/procfs/Makefile stable/11/sys/modules/proto/Makefile stable/11/sys/modules/pseudofs/Makefile stable/11/sys/modules/pst/Makefile stable/11/sys/modules/pty/Makefile stable/11/sys/modules/puc/Makefile stable/11/sys/modules/qlxgb/Makefile stable/11/sys/modules/qlxgbe/Makefile stable/11/sys/modules/qlxge/Makefile stable/11/sys/modules/ral/Makefile stable/11/sys/modules/ralfw/Makefile.inc stable/11/sys/modules/random_fortuna/Makefile stable/11/sys/modules/random_other/Makefile stable/11/sys/modules/random_yarrow/Makefile stable/11/sys/modules/rc/Makefile stable/11/sys/modules/rc4/Makefile stable/11/sys/modules/rccgpio/Makefile stable/11/sys/modules/rdma/krping/Makefile stable/11/sys/modules/rdrand_rng/Makefile stable/11/sys/modules/re/Makefile stable/11/sys/modules/rl/Makefile stable/11/sys/modules/rndtest/Makefile stable/11/sys/modules/rp/Makefile stable/11/sys/modules/rpi_ft5406/Makefile stable/11/sys/modules/rtwn/Makefile stable/11/sys/modules/rtwnfw/Makefile.inc stable/11/sys/modules/s3/Makefile stable/11/sys/modules/safe/Makefile stable/11/sys/modules/sbni/Makefile stable/11/sys/modules/scc/Makefile stable/11/sys/modules/scsi_low/Makefile stable/11/sys/modules/sdhci/Makefile stable/11/sys/modules/sdhci_acpi/Makefile stable/11/sys/modules/sdhci_pci/Makefile stable/11/sys/modules/sem/Makefile stable/11/sys/modules/send/Makefile stable/11/sys/modules/sf/Makefile stable/11/sys/modules/sfxge/Makefile stable/11/sys/modules/sge/Makefile stable/11/sys/modules/siba_bwn/Makefile stable/11/sys/modules/siftr/Makefile stable/11/sys/modules/siis/Makefile stable/11/sys/modules/sio/Makefile stable/11/sys/modules/sis/Makefile stable/11/sys/modules/sk/Makefile stable/11/sys/modules/smbfs/Makefile stable/11/sys/modules/sn/Makefile stable/11/sys/modules/snp/Makefile stable/11/sys/modules/sound/driver/Makefile stable/11/sys/modules/sound/driver/ad1816/Makefile stable/11/sys/modules/sound/driver/ai2s/Makefile stable/11/sys/modules/sound/driver/als4000/Makefile stable/11/sys/modules/sound/driver/atiixp/Makefile stable/11/sys/modules/sound/driver/audiocs/Makefile stable/11/sys/modules/sound/driver/cmi/Makefile stable/11/sys/modules/sound/driver/cs4281/Makefile stable/11/sys/modules/sound/driver/csa/Makefile stable/11/sys/modules/sound/driver/davbus/Makefile stable/11/sys/modules/sound/driver/driver/Makefile stable/11/sys/modules/sound/driver/ds1/Makefile stable/11/sys/modules/sound/driver/emu10k1/Makefile stable/11/sys/modules/sound/driver/emu10kx/Makefile stable/11/sys/modules/sound/driver/envy24/Makefile stable/11/sys/modules/sound/driver/envy24ht/Makefile stable/11/sys/modules/sound/driver/es137x/Makefile stable/11/sys/modules/sound/driver/ess/Makefile stable/11/sys/modules/sound/driver/fm801/Makefile stable/11/sys/modules/sound/driver/hda/Makefile stable/11/sys/modules/sound/driver/hdspe/Makefile stable/11/sys/modules/sound/driver/ich/Makefile stable/11/sys/modules/sound/driver/maestro/Makefile stable/11/sys/modules/sound/driver/maestro3/Makefile stable/11/sys/modules/sound/driver/mss/Makefile stable/11/sys/modules/sound/driver/neomagic/Makefile stable/11/sys/modules/sound/driver/sb16/Makefile stable/11/sys/modules/sound/driver/sb8/Makefile stable/11/sys/modules/sound/driver/sbc/Makefile stable/11/sys/modules/sound/driver/solo/Makefile stable/11/sys/modules/sound/driver/spicds/Makefile stable/11/sys/modules/sound/driver/t4dwave/Makefile stable/11/sys/modules/sound/driver/uaudio/Makefile stable/11/sys/modules/sound/driver/via8233/Makefile stable/11/sys/modules/sound/driver/via82c686/Makefile stable/11/sys/modules/sound/driver/vibes/Makefile stable/11/sys/modules/sound/sound/Makefile stable/11/sys/modules/speaker/Makefile stable/11/sys/modules/splash/bmp/Makefile stable/11/sys/modules/splash/pcx/Makefile stable/11/sys/modules/splash/txt/Makefile stable/11/sys/modules/sppp/Makefile stable/11/sys/modules/ste/Makefile stable/11/sys/modules/stg/Makefile stable/11/sys/modules/stge/Makefile stable/11/sys/modules/sym/Makefile stable/11/sys/modules/syscons/apm/Makefile stable/11/sys/modules/syscons/beastie/Makefile stable/11/sys/modules/syscons/blank/Makefile stable/11/sys/modules/syscons/daemon/Makefile stable/11/sys/modules/syscons/dragon/Makefile stable/11/sys/modules/syscons/fade/Makefile stable/11/sys/modules/syscons/fire/Makefile stable/11/sys/modules/syscons/green/Makefile stable/11/sys/modules/syscons/logo/Makefile stable/11/sys/modules/syscons/plasma/Makefile stable/11/sys/modules/syscons/rain/Makefile stable/11/sys/modules/syscons/snake/Makefile stable/11/sys/modules/syscons/star/Makefile stable/11/sys/modules/syscons/warp/Makefile stable/11/sys/modules/sysvipc/sysvmsg/Makefile stable/11/sys/modules/sysvipc/sysvsem/Makefile stable/11/sys/modules/sysvipc/sysvshm/Makefile stable/11/sys/modules/tcp/fastpath/Makefile stable/11/sys/modules/tcp/tcpmd5/Makefile stable/11/sys/modules/tests/callout_test/Makefile stable/11/sys/modules/tests/framework/Makefile stable/11/sys/modules/ti/Makefile stable/11/sys/modules/tl/Makefile stable/11/sys/modules/tmpfs/Makefile stable/11/sys/modules/toecore/Makefile stable/11/sys/modules/tpm/Makefile stable/11/sys/modules/trm/Makefile stable/11/sys/modules/tsec/Makefile stable/11/sys/modules/twa/Makefile stable/11/sys/modules/twe/Makefile stable/11/sys/modules/tws/Makefile stable/11/sys/modules/tx/Makefile stable/11/sys/modules/txp/Makefile stable/11/sys/modules/uart/Makefile stable/11/sys/modules/ubsec/Makefile stable/11/sys/modules/ubser/Makefile stable/11/sys/modules/uchcom/Makefile stable/11/sys/modules/ucycom/Makefile stable/11/sys/modules/udf/Makefile stable/11/sys/modules/udf_iconv/Makefile stable/11/sys/modules/ufs/Makefile stable/11/sys/modules/uinput/Makefile stable/11/sys/modules/unionfs/Makefile stable/11/sys/modules/usb/Makefile stable/11/sys/modules/usb/at91dci/Makefile stable/11/sys/modules/usb/atmegadci/Makefile stable/11/sys/modules/usb/atp/Makefile stable/11/sys/modules/usb/aue/Makefile stable/11/sys/modules/usb/avr32dci/Makefile stable/11/sys/modules/usb/axe/Makefile stable/11/sys/modules/usb/axge/Makefile stable/11/sys/modules/usb/cdce/Makefile stable/11/sys/modules/usb/cfumass/Makefile stable/11/sys/modules/usb/cue/Makefile stable/11/sys/modules/usb/dwc_otg/Makefile stable/11/sys/modules/usb/ehci/Makefile stable/11/sys/modules/usb/g_audio/Makefile stable/11/sys/modules/usb/g_keyboard/Makefile stable/11/sys/modules/usb/g_modem/Makefile stable/11/sys/modules/usb/g_mouse/Makefile stable/11/sys/modules/usb/ipheth/Makefile stable/11/sys/modules/usb/kue/Makefile stable/11/sys/modules/usb/mos/Makefile stable/11/sys/modules/usb/musb/Makefile stable/11/sys/modules/usb/ohci/Makefile stable/11/sys/modules/usb/quirk/Makefile stable/11/sys/modules/usb/rsu/Makefile stable/11/sys/modules/usb/rsufw/Makefile.inc stable/11/sys/modules/usb/rue/Makefile stable/11/sys/modules/usb/rum/Makefile stable/11/sys/modules/usb/run/Makefile stable/11/sys/modules/usb/runfw/Makefile stable/11/sys/modules/usb/saf1761otg/Makefile stable/11/sys/modules/usb/smsc/Makefile stable/11/sys/modules/usb/template/Makefile stable/11/sys/modules/usb/u3g/Makefile stable/11/sys/modules/usb/uark/Makefile stable/11/sys/modules/usb/uath/Makefile stable/11/sys/modules/usb/ubsa/Makefile stable/11/sys/modules/usb/ubser/Makefile stable/11/sys/modules/usb/uchcom/Makefile stable/11/sys/modules/usb/ucom/Makefile stable/11/sys/modules/usb/ucycom/Makefile stable/11/sys/modules/usb/udav/Makefile stable/11/sys/modules/usb/udbp/Makefile stable/11/sys/modules/usb/udl/Makefile stable/11/sys/modules/usb/uep/Makefile stable/11/sys/modules/usb/uether/Makefile stable/11/sys/modules/usb/ufm/Makefile stable/11/sys/modules/usb/ufoma/Makefile stable/11/sys/modules/usb/uftdi/Makefile stable/11/sys/modules/usb/ugensa/Makefile stable/11/sys/modules/usb/ugold/Makefile stable/11/sys/modules/usb/uhci/Makefile stable/11/sys/modules/usb/uhid/Makefile stable/11/sys/modules/usb/uhso/Makefile stable/11/sys/modules/usb/uipaq/Makefile stable/11/sys/modules/usb/ukbd/Makefile stable/11/sys/modules/usb/uled/Makefile stable/11/sys/modules/usb/ulpt/Makefile stable/11/sys/modules/usb/umass/Makefile stable/11/sys/modules/usb/umcs/Makefile stable/11/sys/modules/usb/umct/Makefile stable/11/sys/modules/usb/umodem/Makefile stable/11/sys/modules/usb/umoscom/Makefile stable/11/sys/modules/usb/ums/Makefile stable/11/sys/modules/usb/upgt/Makefile stable/11/sys/modules/usb/uplcom/Makefile stable/11/sys/modules/usb/ural/Makefile stable/11/sys/modules/usb/ure/Makefile stable/11/sys/modules/usb/urio/Makefile stable/11/sys/modules/usb/urndis/Makefile stable/11/sys/modules/usb/urtw/Makefile stable/11/sys/modules/usb/usb/Makefile stable/11/sys/modules/usb/usfs/Makefile stable/11/sys/modules/usb/usie/Makefile stable/11/sys/modules/usb/uslcom/Makefile stable/11/sys/modules/usb/uss820dci/Makefile stable/11/sys/modules/usb/uvisor/Makefile stable/11/sys/modules/usb/uvscom/Makefile stable/11/sys/modules/usb/wsp/Makefile stable/11/sys/modules/usb/xhci/Makefile stable/11/sys/modules/usb/zyd/Makefile stable/11/sys/modules/utopia/Makefile stable/11/sys/modules/vesa/Makefile stable/11/sys/modules/vge/Makefile stable/11/sys/modules/viawd/Makefile stable/11/sys/modules/videomode/Makefile stable/11/sys/modules/virtio/balloon/Makefile stable/11/sys/modules/virtio/block/Makefile stable/11/sys/modules/virtio/console/Makefile stable/11/sys/modules/virtio/network/Makefile stable/11/sys/modules/virtio/pci/Makefile stable/11/sys/modules/virtio/random/Makefile stable/11/sys/modules/virtio/scsi/Makefile stable/11/sys/modules/virtio/virtio/Makefile stable/11/sys/modules/vkbd/Makefile stable/11/sys/modules/vmm/Makefile stable/11/sys/modules/vmware/vmxnet3/Makefile stable/11/sys/modules/vnic/Makefile stable/11/sys/modules/vnic/mrmlbus/Makefile stable/11/sys/modules/vnic/thunder_bgx/Makefile stable/11/sys/modules/vnic/thunder_mdio/Makefile stable/11/sys/modules/vnic/vnicpf/Makefile stable/11/sys/modules/vnic/vnicvf/Makefile stable/11/sys/modules/vpo/Makefile stable/11/sys/modules/vr/Makefile stable/11/sys/modules/vte/Makefile stable/11/sys/modules/vx/Makefile stable/11/sys/modules/vxge/Makefile stable/11/sys/modules/wb/Makefile stable/11/sys/modules/wbwd/Makefile stable/11/sys/modules/wi/Makefile stable/11/sys/modules/wlan/Makefile stable/11/sys/modules/wlan_acl/Makefile stable/11/sys/modules/wlan_amrr/Makefile stable/11/sys/modules/wlan_ccmp/Makefile stable/11/sys/modules/wlan_rssadapt/Makefile stable/11/sys/modules/wlan_tkip/Makefile stable/11/sys/modules/wlan_wep/Makefile stable/11/sys/modules/wlan_xauth/Makefile stable/11/sys/modules/wpi/Makefile stable/11/sys/modules/wpifw/Makefile stable/11/sys/modules/wtap/Makefile stable/11/sys/modules/x86bios/Makefile stable/11/sys/modules/xe/Makefile stable/11/sys/modules/xl/Makefile stable/11/sys/modules/zfs/Makefile stable/11/sys/modules/zlib/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/3dfx/Makefile ============================================================================== --- stable/11/sys/modules/3dfx/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/3dfx/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,11 +1,10 @@ # $FreeBSD$ -.PATH: $(.CURDIR)/../../dev/tdfx +.PATH: ${SRCTOP}/sys/dev/tdfx KMOD= 3dfx SRCS= bus_if.h pci_if.h device_if.h tdfx_pci.h tdfx_io.h\ tdfx_vars.h tdfx_pci.c -INCSRC= ../../sys # Uncomment this for debugging messages #CFLAGS+= -DDEBUG Modified: stable/11/sys/modules/3dfx_linux/Makefile ============================================================================== --- stable/11/sys/modules/3dfx_linux/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/3dfx_linux/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/tdfx +.PATH: ${SRCTOP}/sys/dev/tdfx KMOD= 3dfx_linux SRCS= tdfx_linux.c Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -SYSDIR?=${.CURDIR}/.. +SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" SUBDIR_PARALLEL= @@ -436,7 +436,7 @@ SUBDIR+= opensolaris .endif .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) -.if exists(${.CURDIR}/../opencrypto) +.if exists(${SRCTOP}/sys/opencrypto) _crypto= crypto _cryptodev= cryptodev _random_fortuna=random_fortuna Modified: stable/11/sys/modules/aac/Makefile ============================================================================== --- stable/11/sys/modules/aac/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aac/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/aac +.PATH: ${SRCTOP}/sys/dev/aac .if ${MACHINE_CPUARCH} == "i386" SUBDIR= aac_linux Modified: stable/11/sys/modules/aac/aac_linux/Makefile ============================================================================== --- stable/11/sys/modules/aac/aac_linux/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aac/aac_linux/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/aac +.PATH: ${SRCTOP}/sys/dev/aac KMOD= aac_linux SRCS= aac_linux.c Modified: stable/11/sys/modules/aacraid/Makefile ============================================================================== --- stable/11/sys/modules/aacraid/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aacraid/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/aacraid +.PATH: ${SRCTOP}/sys/dev/aacraid .if ${MACHINE_CPUARCH} == "i386" SUBDIR= aacraid_linux Modified: stable/11/sys/modules/aacraid/aacraid_linux/Makefile ============================================================================== --- stable/11/sys/modules/aacraid/aacraid_linux/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aacraid/aacraid_linux/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/aacraid +.PATH: ${SRCTOP}/sys/dev/aacraid KMOD= aacraid_linux SRCS= aacraid_linux.c Modified: stable/11/sys/modules/accf_data/Makefile ============================================================================== --- stable/11/sys/modules/accf_data/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/accf_data/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../netinet +.PATH: ${SRCTOP}/sys/netinet KMOD= accf_data SRCS= accf_data.c Modified: stable/11/sys/modules/accf_dns/Makefile ============================================================================== --- stable/11/sys/modules/accf_dns/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/accf_dns/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../netinet +.PATH: ${SRCTOP}/sys/netinet KMOD= accf_dns SRCS= accf_dns.c Modified: stable/11/sys/modules/accf_http/Makefile ============================================================================== --- stable/11/sys/modules/accf_http/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/accf_http/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../netinet +.PATH: ${SRCTOP}/sys/netinet KMOD= accf_http SRCS= accf_http.c Modified: stable/11/sys/modules/acl_nfs4/Makefile ============================================================================== --- stable/11/sys/modules/acl_nfs4/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acl_nfs4/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../kern +.PATH: ${SRCTOP}/sys/kern KMOD= acl_nfs4 SRCS= vnode_if.h subr_acl_nfs4.c Modified: stable/11/sys/modules/acl_posix1e/Makefile ============================================================================== --- stable/11/sys/modules/acl_posix1e/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acl_posix1e/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../kern +.PATH: ${SRCTOP}/sys/kern KMOD= acl_posix1e SRCS= vnode_if.h subr_acl_posix1e.c Modified: stable/11/sys/modules/acpi/acpi_asus/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_asus/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_asus/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_asus SRCS= acpi_asus.c opt_acpi.h acpi_if.h bus_if.h device_if.h Modified: stable/11/sys/modules/acpi/acpi_asus_wmi/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_asus_wmi/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_asus_wmi/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,9 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_asus_wmi -CFLAGS+=-I${.CURDIR}/../../../dev/acpi_support +CFLAGS+=-I${SRCTOP}/sys/dev/acpi_support SRCS= acpi_asus_wmi.c opt_acpi.h acpi_if.h acpi_wmi_if.h device_if.h bus_if.h .include Modified: stable/11/sys/modules/acpi/acpi_dock/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_dock/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_dock/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpica +.PATH: ${SRCTOP}/sys/dev/acpica KMOD= acpi_dock SRCS= acpi_dock.c opt_acpi.h device_if.h bus_if.h acpi_if.h SRCS+= opt_ddb.h Modified: stable/11/sys/modules/acpi/acpi_fujitsu/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_fujitsu/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_fujitsu/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,9 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_fujitsu -CFLAGS+=-I${.CURDIR}/../../../dev/acpi_support +CFLAGS+=-I${SRCTOP}/sys/dev/acpi_support SRCS= acpi_fujitsu.c opt_acpi.h acpi_if.h device_if.h bus_if.h .include Modified: stable/11/sys/modules/acpi/acpi_hp/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_hp/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_hp/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,9 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_hp -CFLAGS+=-I${.CURDIR}/../../../dev/acpi_support +CFLAGS+=-I${SRCTOP}/sys/dev/acpi_support SRCS= acpi_hp.c opt_acpi.h acpi_if.h acpi_wmi_if.h device_if.h bus_if.h .include Modified: stable/11/sys/modules/acpi/acpi_ibm/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_ibm/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_ibm/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_ibm SRCS= acpi_ibm.c opt_acpi.h device_if.h bus_if.h acpi_if.h SRCS+= opt_ddb.h Modified: stable/11/sys/modules/acpi/acpi_panasonic/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_panasonic/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_panasonic/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_panasonic SRCS= acpi_panasonic.c opt_acpi.h acpi_if.h bus_if.h device_if.h Modified: stable/11/sys/modules/acpi/acpi_rapidstart/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_rapidstart/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_rapidstart/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_rapidstart SRCS= acpi_rapidstart.c opt_acpi.h device_if.h bus_if.h acpi_if.h Modified: stable/11/sys/modules/acpi/acpi_sony/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_sony/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_sony/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_sony SRCS= acpi_sony.c opt_acpi.h device_if.h bus_if.h acpi_if.h Modified: stable/11/sys/modules/acpi/acpi_toshiba/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_toshiba/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_toshiba/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_toshiba SRCS= acpi_toshiba.c opt_acpi.h acpi_if.h bus_if.h device_if.h Modified: stable/11/sys/modules/acpi/acpi_video/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_video/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_video/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpica +.PATH: ${SRCTOP}/sys/dev/acpica KMOD= acpi_video SRCS= acpi_video.c Modified: stable/11/sys/modules/acpi/acpi_wmi/Makefile ============================================================================== --- stable/11/sys/modules/acpi/acpi_wmi/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/acpi_wmi/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,9 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_wmi -CFLAGS+=-I${.CURDIR}/../../../dev/acpi_support +CFLAGS+=-I${SRCTOP}/sys/dev/acpi_support SRCS= acpi_wmi.c opt_acpi.h acpi_if.h acpi_wmi_if.h device_if.h bus_if.h .include Modified: stable/11/sys/modules/acpi/aibs/Makefile ============================================================================== --- stable/11/sys/modules/acpi/aibs/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/acpi/aibs/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/acpi_support +.PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= aibs SRCS= atk0110.c Modified: stable/11/sys/modules/ae/Makefile ============================================================================== --- stable/11/sys/modules/ae/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ae/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/ae +.PATH: ${SRCTOP}/sys/dev/ae KMOD= if_ae SRCS= if_ae.c device_if.h bus_if.h pci_if.h miibus_if.h Modified: stable/11/sys/modules/aesni/Makefile ============================================================================== --- stable/11/sys/modules/aesni/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aesni/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../crypto/aesni +.PATH: ${SRCTOP}/sys/crypto/aesni KMOD= aesni SRCS= aesni.c Modified: stable/11/sys/modules/age/Makefile ============================================================================== --- stable/11/sys/modules/age/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/age/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/age +.PATH: ${SRCTOP}/sys/dev/age KMOD= if_age SRCS= if_age.c device_if.h bus_if.h pci_if.h miibus_if.h Modified: stable/11/sys/modules/agp/Makefile ============================================================================== --- stable/11/sys/modules/agp/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/agp/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/agp +.PATH: ${SRCTOP}/sys/dev/agp KMOD= agp SRCS= agp.c agp_if.c Modified: stable/11/sys/modules/aha/Makefile ============================================================================== --- stable/11/sys/modules/aha/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aha/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/aha +.PATH: ${SRCTOP}/sys/dev/aha KMOD= aha SRCS= aha.c aha_isa.c ahareg.h opt_cam.h device_if.h bus_if.h \ Modified: stable/11/sys/modules/ahci/Makefile ============================================================================== --- stable/11/sys/modules/ahci/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ahci/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/ahci +.PATH: ${SRCTOP}/sys/dev/ahci KMOD= ahci SRCS= ahci.c ahci_pci.c ahciem.c ahci.h device_if.h bus_if.h pci_if.h opt_cam.h Modified: stable/11/sys/modules/aic/Makefile ============================================================================== --- stable/11/sys/modules/aic/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aic/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/aic +.PATH: ${SRCTOP}/sys/dev/aic KMOD= aic SRCS= aic.c aic_pccard.c Modified: stable/11/sys/modules/aic7xxx/ahc/Makefile ============================================================================== --- stable/11/sys/modules/aic7xxx/ahc/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aic7xxx/ahc/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,7 +1,7 @@ # $FreeBSD$ -SYSDIR?=${.CURDIR}/../../.. +SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" .PATH: ${SYSDIR}/dev/aic7xxx Modified: stable/11/sys/modules/aic7xxx/ahc/ahc_isa/Makefile ============================================================================== --- stable/11/sys/modules/aic7xxx/ahc/ahc_isa/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aic7xxx/ahc/ahc_isa/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,13 +1,13 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../dev/aic7xxx +.PATH: ${SRCTOP}/sys/dev/aic7xxx KMOD= ahc_isa SRCS= ahc_isa.c SRCS+= device_if.h bus_if.h pci_if.h isa_if.h SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h -CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I.. +CFLAGS+= -I${SRCTOP}/sys/dev/aic7xxx -I.. .include Modified: stable/11/sys/modules/aic7xxx/ahc/ahc_pci/Makefile ============================================================================== --- stable/11/sys/modules/aic7xxx/ahc/ahc_pci/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aic7xxx/ahc/ahc_pci/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,14 +1,14 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../dev/aic7xxx +.PATH: ${SRCTOP}/sys/dev/aic7xxx KMOD= ahc_pci SRCS= ahc_pci.c aic7xxx_pci.c SRCS+= device_if.h bus_if.h pci_if.h SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h -CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I.. +CFLAGS+= -I${SRCTOP}/sys/dev/aic7xxx -I.. .include Modified: stable/11/sys/modules/aic7xxx/ahd/Makefile ============================================================================== --- stable/11/sys/modules/aic7xxx/ahd/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aic7xxx/ahd/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,7 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/aic7xxx +.PATH: ${SRCTOP}/sys/dev/aic7xxx KMOD= ahd GENSRCS= aic79xx_seq.h aic79xx_reg.h @@ -17,14 +17,14 @@ BEFORE_DEPEND= ${GENSRCS} .if make(ahdfirmware) ahdfirmware: ${GENSRCS} ${GENSRCS}: \ - ${.CURDIR}/../../../dev/aic7xxx/aic79xx.{reg,seq} \ - ${.CURDIR}/../../../cam/scsi/scsi_message.h - aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ - -I${.CURDIR}/../../../dev/aic7xxx \ + ${SRCTOP}/sys/dev/aic7xxx/aic79xx.{reg,seq} \ + ${SRCTOP}/sys/cam/scsi/scsi_message.h + aicasm ${INCLUDES} -I${SRCTOP}/sys/cam/scsi \ + -I${SRCTOP}/sys/dev/aic7xxx \ -o aic79xx_seq.h -r aic79xx_reg.h \ ${REG_PRINT_OPT} \ - -i ${.CURDIR}/../../../dev/aic7xxx/aic79xx_osm.h \ - ${.CURDIR}/../../../dev/aic7xxx/aic79xx.seq + -i ${SRCTOP}/sys/dev/aic7xxx/aic79xx_osm.h \ + ${SRCTOP}/sys/dev/aic7xxx/aic79xx.seq .else ${GENSRCS}: .NOMETA @echo "Error: ${.TARGET} is missing. Run 'make ahdfirmware'." Modified: stable/11/sys/modules/aic7xxx/aicasm/Makefile ============================================================================== --- stable/11/sys/modules/aic7xxx/aicasm/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aic7xxx/aicasm/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,9 +1,9 @@ # $FreeBSD$ -MAKESRCPATH= ${.CURDIR}/../../../dev/aic7xxx/aicasm +MAKESRCPATH= ${SRCTOP}/sys/dev/aic7xxx/aicasm install: -.include "${.CURDIR}/../../../dev/aic7xxx/aicasm/Makefile" +.include "${SRCTOP}/sys/dev/aic7xxx/aicasm/Makefile" build-tools: ${PROG} Modified: stable/11/sys/modules/alc/Makefile ============================================================================== --- stable/11/sys/modules/alc/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/alc/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/alc +.PATH: ${SRCTOP}/sys/dev/alc KMOD= if_alc SRCS= if_alc.c device_if.h bus_if.h pci_if.h miibus_if.h Modified: stable/11/sys/modules/ale/Makefile ============================================================================== --- stable/11/sys/modules/ale/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ale/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/ale +.PATH: ${SRCTOP}/sys/dev/ale KMOD= if_ale SRCS= if_ale.c device_if.h bus_if.h pci_if.h miibus_if.h Modified: stable/11/sys/modules/alq/Makefile ============================================================================== --- stable/11/sys/modules/alq/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/alq/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../kern +.PATH: ${SRCTOP}/sys/kern KMOD= alq SRCS= opt_mac.h vnode_if.h kern_alq.c Modified: stable/11/sys/modules/am335x_dmtpps/Makefile ============================================================================== --- stable/11/sys/modules/am335x_dmtpps/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/am335x_dmtpps/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../arm/ti/am335x +.PATH: ${SRCTOP}/sys/arm/ti/am335x KMOD= am335x_dmtpps SRCS= am335x_dmtpps.c Modified: stable/11/sys/modules/amd_ecc_inject/Makefile ============================================================================== --- stable/11/sys/modules/amd_ecc_inject/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/amd_ecc_inject/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/amd_ecc_inject +.PATH: ${SRCTOP}/sys/dev/amd_ecc_inject KMOD= amd_ecc_inject SRCS= ecc_inject.c bus_if.h device_if.h pci_if.h Modified: stable/11/sys/modules/amdsbwd/Makefile ============================================================================== --- stable/11/sys/modules/amdsbwd/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/amdsbwd/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/amdsbwd +.PATH: ${SRCTOP}/sys/dev/amdsbwd KMOD = amdsbwd SRCS = amdsbwd.c SRCS += device_if.h bus_if.h pci_if.h isa_if.h Modified: stable/11/sys/modules/amdtemp/Makefile ============================================================================== --- stable/11/sys/modules/amdtemp/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/amdtemp/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/amdtemp +.PATH: ${SRCTOP}/sys/dev/amdtemp KMOD= amdtemp SRCS= amdtemp.c bus_if.h device_if.h pci_if.h Modified: stable/11/sys/modules/amr/Makefile ============================================================================== --- stable/11/sys/modules/amr/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/amr/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/amr +.PATH: ${SRCTOP}/sys/dev/amr SUBDIR= amr_cam .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" Modified: stable/11/sys/modules/amr/amr_cam/Makefile ============================================================================== --- stable/11/sys/modules/amr/amr_cam/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/amr/amr_cam/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/amr +.PATH: ${SRCTOP}/sys/dev/amr KMOD= amr_cam SRCS= amr_cam.c device_if.h bus_if.h Modified: stable/11/sys/modules/amr/amr_linux/Makefile ============================================================================== --- stable/11/sys/modules/amr/amr_linux/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/amr/amr_linux/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/amr +.PATH: ${SRCTOP}/sys/dev/amr KMOD= amr_linux SRCS= amr_linux.c device_if.h bus_if.h Modified: stable/11/sys/modules/an/Makefile ============================================================================== --- stable/11/sys/modules/an/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/an/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/an +.PATH: ${SRCTOP}/sys/dev/an KMOD= if_an SRCS= if_an.c if_an_pccard.c if_an_pci.c if_an_isa.c Modified: stable/11/sys/modules/aout/Makefile ============================================================================== --- stable/11/sys/modules/aout/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/aout/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../kern +.PATH: ${SRCTOP}/sys/kern KMOD= aout SRCS= imgact_aout.c \ Modified: stable/11/sys/modules/apm/Makefile ============================================================================== --- stable/11/sys/modules/apm/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/apm/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../i386/bios +.PATH: ${SRCTOP}/sys/i386/bios .if ${MACHINE} == "pc98" .PATH: ${.CURDIR}/../../pc98/apm .endif Modified: stable/11/sys/modules/ar71xx/ar71xx_ehci/Makefile ============================================================================== --- stable/11/sys/modules/ar71xx/ar71xx_ehci/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ar71xx/ar71xx_ehci/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -29,15 +29,15 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/../../../mips/atheros/ +.PATH: ${SRCTOP}/sys/mips/atheros/ KMOD= ar71xx_ehci SRCS= ar71xx_ehci.c SRCS+= device_if.h bus_if.h usb_if.h opt_usb.h opt_bus.h -.PATH: ${.CURDIR}/../../../dev/usb/controller/ +.PATH: ${SRCTOP}/sys/dev/usb/controller/ SRCS+= ehci.c -CFLAGS+= -I. -I${.CURDIR}/../../../mips/atheros +CFLAGS+= -I. -I${SRCTOP}/sys/mips/atheros .include Modified: stable/11/sys/modules/ar71xx/ar71xx_ohci/Makefile ============================================================================== --- stable/11/sys/modules/ar71xx/ar71xx_ohci/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ar71xx/ar71xx_ohci/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -29,15 +29,15 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/../../../mips/atheros/ +.PATH: ${SRCTOP}/sys/mips/atheros/ KMOD= ar71xx_ohci SRCS= ar71xx_ohci.c SRCS+= device_if.h bus_if.h usb_if.h opt_usb.h opt_bus.h -CFLAGS+= -I. -I${.CURDIR}/../../../mips/atheros +CFLAGS+= -I. -I${SRCTOP}/sys/mips/atheros -.PATH: ${.CURDIR}/../../../dev/usb/controller/ +.PATH: ${SRCTOP}/sys/dev/usb/controller/ SRCS+= ohci.c .include Modified: stable/11/sys/modules/arcmsr/Makefile ============================================================================== --- stable/11/sys/modules/arcmsr/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/arcmsr/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/arcmsr +.PATH: ${SRCTOP}/sys/dev/arcmsr KMOD= arcmsr SRCS= arcmsr.c Modified: stable/11/sys/modules/arcnet/Makefile ============================================================================== --- stable/11/sys/modules/arcnet/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/arcnet/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../net +.PATH: ${SRCTOP}/sys/net KMOD= arcnet SRCS= if_arcsubr.c Modified: stable/11/sys/modules/asmc/Makefile ============================================================================== --- stable/11/sys/modules/asmc/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/asmc/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/asmc +.PATH: ${SRCTOP}/sys/dev/asmc KMOD= asmc SRCS= asmc.c opt_acpi.h opt_intr_filter.h acpi_if.h bus_if.h device_if.h Modified: stable/11/sys/modules/ata/atacard/Makefile ============================================================================== --- stable/11/sys/modules/ata/atacard/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atacard/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/ata +.PATH: ${SRCTOP}/sys/dev/ata KMOD= atacard SRCS= ata-card.c Modified: stable/11/sys/modules/ata/atacore/Makefile ============================================================================== --- stable/11/sys/modules/ata/atacore/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atacore/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/ata +.PATH: ${SRCTOP}/sys/dev/ata KMOD= ata SRCS= ata-all.c ata_if.c ata-lowlevel.c Modified: stable/11/sys/modules/ata/ataisa/Makefile ============================================================================== --- stable/11/sys/modules/ata/ataisa/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/ataisa/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../dev/ata +.PATH: ${SRCTOP}/sys/dev/ata KMOD= ataisa SRCS= ata-isa.c Modified: stable/11/sys/modules/ata/atapci/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -2,7 +2,7 @@ SUBDIR += chipsets -.PATH: ${.CURDIR}/../../../dev/ata +.PATH: ${SRCTOP}/sys/dev/ata KMOD= atapci SRCS= ata-pci.c ata-dma.c ata-sata.c Modified: stable/11/sys/modules/ata/atapci/chipsets/ataacard/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/ataacard/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/ataacard/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataacard SRCS= ata-acard.c Modified: stable/11/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataacerlabs SRCS= ata-acerlabs.c Modified: stable/11/sys/modules/ata/atapci/chipsets/ataamd/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/ataamd/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/ataamd/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataamd SRCS= ata-amd.c Modified: stable/11/sys/modules/ata/atapci/chipsets/ataati/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/ataati/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/ataati/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataati SRCS= ata-ati.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atacenatek/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atacenatek/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atacenatek/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atacenatek SRCS= ata-cenatek.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atacypress/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atacypress/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atacypress/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atacypress SRCS= ata-cypress.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atacyrix/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atacyrix/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atacyrix/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atacyrix SRCS= ata-cyrix.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atahighpoint SRCS= ata-highpoint.c Modified: stable/11/sys/modules/ata/atapci/chipsets/ataintel/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/ataintel/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/ataintel/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataintel SRCS= ata-intel.c Modified: stable/11/sys/modules/ata/atapci/chipsets/ataite/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/ataite/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/ataite/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataite SRCS= ata-ite.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atajmicron/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atajmicron/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atajmicron/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atajmicron SRCS= ata-jmicron.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atamarvell/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atamarvell/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atamarvell/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atamarvell SRCS= ata-marvell.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atamicron/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atamicron/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atamicron/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atamicron SRCS= ata-micron.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atanational/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atanational/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atanational/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atanational SRCS= ata-national.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atanetcell/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atanetcell/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atanetcell/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atanetcell SRCS= ata-netcell.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atanvidia/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atanvidia/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atanvidia/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atanvidia SRCS= ata-nvidia.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atapromise/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atapromise/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atapromise/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atapromise SRCS= ata-promise.c Modified: stable/11/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataserverworks SRCS= ata-serverworks.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atasiliconimage SRCS= ata-siliconimage.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atasis/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atasis/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atasis/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atasis SRCS= ata-sis.c Modified: stable/11/sys/modules/ata/atapci/chipsets/atavia/Makefile ============================================================================== --- stable/11/sys/modules/ata/atapci/chipsets/atavia/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ata/atapci/chipsets/atavia/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../../../dev/ata/chipsets +.PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atavia SRCS= ata-via.c Modified: stable/11/sys/modules/ath_ahb/Makefile ============================================================================== --- stable/11/sys/modules/ath_ahb/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ath_ahb/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -29,13 +29,13 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/../../dev/ath -.PATH: ${.CURDIR}/../../dev/ath/ath_hal +.PATH: ${SRCTOP}/sys/dev/ath +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal KMOD= if_ath_ahb SRCS= if_ath_ahb.c SRCS+= device_if.h bus_if.h opt_wlan.h opt_ath.h opt_ah.h -CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal +CFLAGS+= -I. -I${SRCTOP}/sys/dev/ath -I${SRCTOP}/sys/dev/ath/ath_hal .include Modified: stable/11/sys/modules/ath_pci/Makefile ============================================================================== --- stable/11/sys/modules/ath_pci/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/ath_pci/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -29,13 +29,13 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/../../dev/ath -.PATH: ${.CURDIR}/../../dev/ath/ath_hal +.PATH: ${SRCTOP}/sys/dev/ath +.PATH: ${SRCTOP}/sys/dev/ath/ath_hal KMOD= if_ath_pci SRCS= if_ath_pci.c SRCS+= device_if.h bus_if.h pci_if.h opt_wlan.h opt_ath.h opt_ah.h -CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal +CFLAGS+= -I. -I${SRCTOP}/sys/dev/ath -I${SRCTOP}/sys/dev/ath/ath_hal .include Modified: stable/11/sys/modules/autofs/Makefile ============================================================================== --- stable/11/sys/modules/autofs/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/autofs/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../fs/autofs +.PATH: ${SRCTOP}/sys/fs/autofs KMOD= autofs SRCS= vnode_if.h \ Modified: stable/11/sys/modules/auxio/Makefile ============================================================================== --- stable/11/sys/modules/auxio/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/auxio/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/auxio +.PATH: ${SRCTOP}/sys/dev/auxio KMOD= auxio Modified: stable/11/sys/modules/bce/Makefile ============================================================================== --- stable/11/sys/modules/bce/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/bce/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/bce +.PATH: ${SRCTOP}/sys/dev/bce KMOD= if_bce SRCS= opt_bce.h if_bce.c miibus_if.h miidevs.h device_if.h bus_if.h pci_if.h Modified: stable/11/sys/modules/bfe/Makefile ============================================================================== --- stable/11/sys/modules/bfe/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/bfe/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/bfe +.PATH: ${SRCTOP}/sys/dev/bfe KMOD= if_bfe SRCS= if_bfe.c miibus_if.h miidevs.h device_if.h bus_if.h pci_if.h Modified: stable/11/sys/modules/bge/Makefile ============================================================================== --- stable/11/sys/modules/bge/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/bge/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/bge +.PATH: ${SRCTOP}/sys/dev/bge KMOD= if_bge SRCS= if_bge.c miibus_if.h miidevs.h device_if.h bus_if.h pci_if.h Modified: stable/11/sys/modules/bhnd/Makefile ============================================================================== --- stable/11/sys/modules/bhnd/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/bhnd/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,7 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../dev/bhnd -.PATH: ${.CURDIR}/../../dev/bhnd/nvram +.PATH: ${SRCTOP}/sys/dev/bhnd +.PATH: ${SRCTOP}/sys/dev/bhnd/nvram KMOD= bhnd SRCS= bhnd.c bhnd_subr.c \ Modified: stable/11/sys/modules/bhnd/bcma/Makefile ============================================================================== --- stable/11/sys/modules/bhnd/bcma/Makefile Tue May 30 04:00:26 2017 (r319181) +++ stable/11/sys/modules/bhnd/bcma/Makefile Tue May 30 04:11:12 2017 (r319182) @@ -1,6 +1,6 @@ # $FreeBSD$ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 30 04:13:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D4CBAFB2DF; Tue, 30 May 2017 04:13:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33EDC76A01; Tue, 30 May 2017 04:13:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U4D73e082183; Tue, 30 May 2017 04:13:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U4D6lr082172; Tue, 30 May 2017 04:13:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300413.v4U4D6lr082172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319183 - in stable/11/kerberos5: . lib/libgssapi_krb5 lib/libgssapi_ntlm lib/libgssapi_spnego lib/libhdb lib/libkafs5 lib/libkrb5 libexec/hprop libexec/kpasswdd tools/asn1_compile tool... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:13:08 -0000 Author: ngie Date: Tue May 30 04:13:06 2017 New Revision: 319183 URL: https://svnweb.freebsd.org/changeset/base/319183 Log: MFC r314657: kerberos5: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output Modified: stable/11/kerberos5/Makefile stable/11/kerberos5/Makefile.inc stable/11/kerberos5/lib/libgssapi_krb5/Makefile stable/11/kerberos5/lib/libgssapi_ntlm/Makefile stable/11/kerberos5/lib/libgssapi_spnego/Makefile stable/11/kerberos5/lib/libhdb/Makefile stable/11/kerberos5/lib/libkafs5/Makefile stable/11/kerberos5/lib/libkrb5/Makefile stable/11/kerberos5/libexec/hprop/Makefile stable/11/kerberos5/libexec/kpasswdd/Makefile stable/11/kerberos5/tools/asn1_compile/Makefile stable/11/kerberos5/tools/slc/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/kerberos5/Makefile ============================================================================== --- stable/11/kerberos5/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -11,7 +11,7 @@ KPROGS= lib/libpam \ # This target is used to rebuild these programs WITH Kerberos. kerberize: .for entry in ${KPROGS} - cd ${.CURDIR}/../${entry}; \ + cd ${.CURDIR:H}/${entry}; \ ${MAKE} cleandir; \ ${MAKE} obj; \ ${MAKE} all; \ @@ -21,7 +21,7 @@ kerberize: # This target is used to rebuild these programs WITHOUT Kerberos. dekerberize: .for entry in ${KPROGS} - cd ${.CURDIR}/../${entry}; \ + cd ${.CURDIR:H}/${entry}; \ ${MAKE} MK_KERBEROS=no cleandir; \ ${MAKE} MK_KERBEROS=no obj; \ ${MAKE} MK_KERBEROS=no all; \ Modified: stable/11/kerberos5/Makefile.inc ============================================================================== --- stable/11/kerberos5/Makefile.inc Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/Makefile.inc Tue May 30 04:13:06 2017 (r319183) @@ -4,9 +4,9 @@ NO_LINT= -KRB5DIR= ${.CURDIR}/../../../crypto/heimdal +KRB5DIR= ${SRCTOP}/crypto/heimdal -CFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR}/../../include +CFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR:H:H}/include .if ${MK_OPENLDAP} != "no" && !defined(COMPAT_32BIT) OPENLDAPBASE?= /usr/local Modified: stable/11/kerberos5/lib/libgssapi_krb5/Makefile ============================================================================== --- stable/11/kerberos5/lib/libgssapi_krb5/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/lib/libgssapi_krb5/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -82,4 +82,4 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I. .include -.PATH: ${KRB5DIR}/lib/gssapi/krb5 ${.CURDIR}/../../../lib/libgssapi +.PATH: ${KRB5DIR}/lib/gssapi/krb5 ${SRCTOP}/lib/libgssapi Modified: stable/11/kerberos5/lib/libgssapi_ntlm/Makefile ============================================================================== --- stable/11/kerberos5/lib/libgssapi_ntlm/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/lib/libgssapi_ntlm/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -45,4 +45,4 @@ CFLAGS+=-I${KRB5DIR}/lib/ntlm .include -.PATH: ${KRB5DIR}/lib/gssapi/ntlm ${.CURDIR}/../../../lib/libgssapi ${.CURDIR}/../libgssapi_krb5 +.PATH: ${KRB5DIR}/lib/gssapi/ntlm ${SRCTOP}/lib/libgssapi ${.CURDIR:H}/libgssapi_krb5 Modified: stable/11/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- stable/11/kerberos5/lib/libgssapi_spnego/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/lib/libgssapi_spnego/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -31,7 +31,7 @@ CFLAGS+=-I${KRB5DIR}/lib/gssapi CFLAGS+=-I${KRB5DIR}/lib/gssapi/gssapi CFLAGS+=-I${KRB5DIR}/lib/gssapi/spnego CFLAGS+=-I${KRB5DIR}/lib/asn1 -CFLAGS+=-I${.CURDIR}/../../../lib/libgssapi +CFLAGS+=-I${SRCTOP}/lib/libgssapi CFLAGS+=-I${KRB5DIR}/lib/roken -I. CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} \ @@ -45,7 +45,7 @@ ${GEN}: spnego.asn1 spnego.opt .SUFFIXES: .h .c .x .hx -.x.c: +.x.c: ${CP} ${.IMPSRC} ${.TARGET} .hx.h: @@ -55,4 +55,4 @@ ${GEN}: spnego.asn1 spnego.opt .SUFFIXES: .h .c .x .hx -.PATH: ${KRB5DIR}/lib/gssapi/spnego ${.CURDIR}/../../../lib/libgssapi ${.CURDIR}/../libgssapi_krb5 +.PATH: ${KRB5DIR}/lib/gssapi/spnego ${SRCTOP}/lib/libgssapi ${.CURDIR:H}/libgssapi_krb5 Modified: stable/11/kerberos5/lib/libhdb/Makefile ============================================================================== --- stable/11/kerberos5/lib/libhdb/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/lib/libhdb/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -57,7 +57,7 @@ SRCS= common.c \ ${GEN:S/.x$/.c/:S/.hx$/.h/} CFLAGS+=-I${KRB5DIR}/lib/hdb -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/lib/roken -I${.CURDIR}/../../../contrib/sqlite3/ \ + -I${KRB5DIR}/lib/roken -I${SRCTOP}/contrib/sqlite3/ \ -I${KRB5DIR}/lib/krb5 \ -I. ${LDAPCFLAGS} CFLAGS+=-DHDB_DB_DIR="\"/var/heimdal\"" Modified: stable/11/kerberos5/lib/libkafs5/Makefile ============================================================================== --- stable/11/kerberos5/lib/libkafs5/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/lib/libkafs5/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -26,7 +26,7 @@ SRCS= afssys.c afskrb5.c common.c krb5_err.h CFLAGS+= -I${KRB5DIR}/lib/kafs \ -I${KRB5DIR}/lib/krb5 \ - -I${.OBJDIR}/../libkrb5/ \ + -I${.OBJDIR:H}/libkrb5/ \ -I${KRB5DIR}/lib/roken CLEANFILES= kafs5.3 Modified: stable/11/kerberos5/lib/libkrb5/Makefile ============================================================================== --- stable/11/kerberos5/lib/libkrb5/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/lib/libkrb5/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -625,4 +625,4 @@ CFLAGS+= -I${KRB5DIR}/lib/krb5 \ .include -.PATH: ${KRB5DIR}/lib/krb5 ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include ${.CURDIR}/../../include ${KRB5DIR}/doc/doxyout/krb5/man/man3/ +.PATH: ${KRB5DIR}/lib/krb5 ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include ${SRCTOP}/kerberos5/include ${KRB5DIR}/doc/doxyout/krb5/man/man3/ Modified: stable/11/kerberos5/libexec/hprop/Makefile ============================================================================== --- stable/11/kerberos5/libexec/hprop/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/libexec/hprop/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -9,7 +9,7 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 CFLAGS+=-I${KRB5DIR}/lib/hx509 CFLAGS+=-I${KRB5DIR}/lib/ntlm CFLAGS+=-I${KRB5DIR}/kdc -CFLAGS+=-I${.OBJDIR}/../../lib/libkrb5 +CFLAGS+=-I${.OBJDIR:H:H}/lib/libkrb5 LIBADD= hdb krb5 roken vers DPADD= ${LDAPDPADD} LDADD= ${LDAPLDADD} Modified: stable/11/kerberos5/libexec/kpasswdd/Makefile ============================================================================== --- stable/11/kerberos5/libexec/kpasswdd/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/libexec/kpasswdd/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -2,7 +2,7 @@ PROG= kpasswdd MAN= kpasswdd.8 -CFLAGS+=-I${KRB5DIR}/lib/roken -I../../lib/libhdb ${LDAPCFLAGS} +CFLAGS+=-I${KRB5DIR}/lib/roken -I${.CURDIR:H:H}/lib/libhdb ${LDAPCFLAGS} LIBADD= kadm5srv hdb krb5 roken vers asn1 DPADD= ${LDAPDPADD} LDADD= ${LDAPLDADD} Modified: stable/11/kerberos5/tools/asn1_compile/Makefile ============================================================================== --- stable/11/kerberos5/tools/asn1_compile/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/tools/asn1_compile/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -2,7 +2,7 @@ PROG= asn1_compile MAN= -LIBROKEN_A= ${.OBJDIR}/../../lib/libroken/libroken.a +LIBROKEN_A= ${.OBJDIR:H:H}/lib/libroken/libroken.a LIBADD= vers LDADD= ${LIBROKEN_A} DPADD= ${LIBROKEN_A} Modified: stable/11/kerberos5/tools/slc/Makefile ============================================================================== --- stable/11/kerberos5/tools/slc/Makefile Tue May 30 04:11:12 2017 (r319182) +++ stable/11/kerberos5/tools/slc/Makefile Tue May 30 04:13:06 2017 (r319183) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= slc -LIBROKEN_A= ${.OBJDIR}/../../lib/libroken/libroken.a +LIBROKEN_A= ${.OBJDIR:H:H}/lib/libroken/libroken.a LIBADD= vers LDADD= ${LIBROKEN_A} DPADD= ${LIBROKEN_A} @@ -18,7 +18,7 @@ CLEANFILES= roken.h slc-gram.c slc-lex.c roken.h: ${MAKE_ROKEN} > ${.TARGET} -# ${.OBJDIR}/../make-roken/make-roken > ${.TARGET} +# ${.OBJDIR:H}/make-roken/make-roken > ${.TARGET} .include From owner-svn-src-all@freebsd.org Tue May 30 04:15:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADE94AFB3F4; Tue, 30 May 2017 04:15:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87B2176B75; Tue, 30 May 2017 04:15:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U4Fffe082359; Tue, 30 May 2017 04:15:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U4FfqE082354; Tue, 30 May 2017 04:15:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300415.v4U4FfqE082354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319184 - in stable/11/bin: csh df freebsd-version rmail sh X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:15:42 -0000 Author: ngie Date: Tue May 30 04:15:40 2017 New Revision: 319184 URL: https://svnweb.freebsd.org/changeset/base/319184 Log: MFC r314655: bin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output Modified: stable/11/bin/csh/Makefile stable/11/bin/df/Makefile stable/11/bin/freebsd-version/Makefile stable/11/bin/rmail/Makefile stable/11/bin/sh/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/csh/Makefile ============================================================================== --- stable/11/bin/csh/Makefile Tue May 30 04:13:06 2017 (r319183) +++ stable/11/bin/csh/Makefile Tue May 30 04:15:40 2017 (r319184) @@ -9,7 +9,7 @@ .include PACKAGE=runtime -TCSHDIR= ${.CURDIR}/../../contrib/tcsh +TCSHDIR= ${SRCTOP}/contrib/tcsh .PATH: ${TCSHDIR} PROG= csh Modified: stable/11/bin/df/Makefile ============================================================================== --- stable/11/bin/df/Makefile Tue May 30 04:13:06 2017 (r319183) +++ stable/11/bin/df/Makefile Tue May 30 04:15:40 2017 (r319184) @@ -2,7 +2,7 @@ # $FreeBSD$ PACKAGE=runtime -MOUNT= ${.CURDIR}/../../sbin/mount +MOUNT= ${SRCTOP}/sbin/mount .PATH: ${MOUNT} PROG= df Modified: stable/11/bin/freebsd-version/Makefile ============================================================================== --- stable/11/bin/freebsd-version/Makefile Tue May 30 04:13:06 2017 (r319183) +++ stable/11/bin/freebsd-version/Makefile Tue May 30 04:15:40 2017 (r319184) @@ -4,7 +4,7 @@ PACKAGE=runtime SCRIPTS = freebsd-version MAN = freebsd-version.1 CLEANFILES = freebsd-version freebsd-version.sh -NEWVERS = ${.CURDIR}/../../sys/conf/newvers.sh +NEWVERS = ${SRCTOP}/sys/conf/newvers.sh freebsd-version.sh: ${.CURDIR}/freebsd-version.sh.in ${NEWVERS} eval $$(egrep '^(TYPE|REVISION|BRANCH)=' ${NEWVERS}) ; \ Modified: stable/11/bin/rmail/Makefile ============================================================================== --- stable/11/bin/rmail/Makefile Tue May 30 04:13:06 2017 (r319183) +++ stable/11/bin/rmail/Makefile Tue May 30 04:15:40 2017 (r319184) @@ -2,7 +2,7 @@ # $FreeBSD$ PACKAGE=sendmail -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/rmail # Not much point this being static. It calls a shared sendmail... Modified: stable/11/bin/sh/Makefile ============================================================================== --- stable/11/bin/sh/Makefile Tue May 30 04:13:06 2017 (r319183) +++ stable/11/bin/sh/Makefile Tue May 30 04:15:40 2017 (r319184) @@ -28,9 +28,9 @@ WARNS?= 2 WFORMAT=0 .PATH: ${.CURDIR}/bltin \ - ${.CURDIR}/../kill \ - ${.CURDIR}/../test \ - ${.CURDIR}/../../usr.bin/printf + ${.CURDIR:H}/kill \ + ${.CURDIR:H}/test \ + ${SRCTOP}/usr.bin/printf CLEANFILES+= mknodes mknodes.o \ mksyntax mksyntax.o From owner-svn-src-all@freebsd.org Tue May 30 04:17:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 544FCAFB496; Tue, 30 May 2017 04:17:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FD7C76CAD; Tue, 30 May 2017 04:17:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U4HSEC082538; Tue, 30 May 2017 04:17:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U4HMQF082473; Tue, 30 May 2017 04:17:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300417.v4U4HMQF082473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319185 - in stable/11/sbin: atm/atmconfig bsdlabel dhclient/tests etherswitchcfg fdisk ffsinfo fsck_ffs fsck_msdosfs fsdb gbde geom/class geom/class/cache geom/class/concat geom/class/... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:17:29 -0000 Author: ngie Date: Tue May 30 04:17:22 2017 New Revision: 319185 URL: https://svnweb.freebsd.org/changeset/base/319185 Log: MFC r314655: bin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output Modified: stable/11/sbin/atm/atmconfig/Makefile stable/11/sbin/bsdlabel/Makefile stable/11/sbin/dhclient/tests/Makefile stable/11/sbin/etherswitchcfg/Makefile stable/11/sbin/fdisk/Makefile stable/11/sbin/ffsinfo/Makefile stable/11/sbin/fsck_ffs/Makefile stable/11/sbin/fsck_msdosfs/Makefile stable/11/sbin/fsdb/Makefile stable/11/sbin/gbde/Makefile stable/11/sbin/geom/class/Makefile.inc stable/11/sbin/geom/class/cache/Makefile stable/11/sbin/geom/class/concat/Makefile stable/11/sbin/geom/class/eli/Makefile stable/11/sbin/geom/class/journal/Makefile stable/11/sbin/geom/class/label/Makefile stable/11/sbin/geom/class/mirror/Makefile stable/11/sbin/geom/class/mountver/Makefile stable/11/sbin/geom/class/multipath/Makefile stable/11/sbin/geom/class/nop/Makefile stable/11/sbin/geom/class/part/Makefile stable/11/sbin/geom/class/raid/Makefile stable/11/sbin/geom/class/raid3/Makefile stable/11/sbin/geom/class/sched/Makefile stable/11/sbin/geom/class/shsec/Makefile stable/11/sbin/geom/class/stripe/Makefile stable/11/sbin/geom/class/virstor/Makefile stable/11/sbin/geom/core/Makefile stable/11/sbin/ggate/ggatec/Makefile stable/11/sbin/ggate/ggated/Makefile stable/11/sbin/ggate/ggatel/Makefile stable/11/sbin/growfs/Makefile stable/11/sbin/gvinum/Makefile stable/11/sbin/hastctl/Makefile stable/11/sbin/init/Makefile stable/11/sbin/ipf/Makefile.inc stable/11/sbin/ipf/ipf/Makefile stable/11/sbin/ipf/ipftest/Makefile stable/11/sbin/ipf/ipresend/Makefile stable/11/sbin/iscontrol/Makefile stable/11/sbin/ldconfig/Makefile stable/11/sbin/mksnap_ffs/Makefile stable/11/sbin/mount_cd9660/Makefile stable/11/sbin/mount_fusefs/Makefile stable/11/sbin/mount_msdosfs/Makefile stable/11/sbin/mount_nfs/Makefile stable/11/sbin/mount_nullfs/Makefile stable/11/sbin/mount_udf/Makefile stable/11/sbin/mount_unionfs/Makefile stable/11/sbin/newfs/Makefile stable/11/sbin/nvmecontrol/Makefile stable/11/sbin/pfctl/Makefile stable/11/sbin/pflogd/Makefile stable/11/sbin/quotacheck/Makefile stable/11/sbin/resolvconf/Makefile stable/11/sbin/restore/Makefile stable/11/sbin/rtsol/Makefile stable/11/sbin/setkey/Makefile stable/11/sbin/sunlabel/Makefile stable/11/sbin/umount/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/atm/atmconfig/Makefile ============================================================================== --- stable/11/sbin/atm/atmconfig/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/atm/atmconfig/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -34,8 +34,8 @@ WARNS?= 3 FILES= atmconfig.help atmconfig_device.help FILESDIR= ${SHAREDIR}/doc/atm -SNMP_ATM_DEF= ${.CURDIR}/../../../contrib/ngatm/snmp_atm/atm_tree.def \ - ${.CURDIR}/../../../usr.sbin/bsnmpd/modules/snmp_atm/atm_freebsd.def +SNMP_ATM_DEF= ${SRCTOP}/contrib/ngatm/snmp_atm/atm_tree.def \ + ${SRCTOP}/usr.sbin/bsnmpd/modules/snmp_atm/atm_freebsd.def oid.h: atm_oid.list ${SNMP_ATM_DEF} cat ${SNMP_ATM_DEF} | gensnmptree -e `tail -n +2 ${.CURDIR}/atm_oid.list` \ Modified: stable/11/sbin/bsdlabel/Makefile ============================================================================== --- stable/11/sbin/bsdlabel/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/bsdlabel/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 3/17/94 # $FreeBSD$ -.PATH: ${.CURDIR}/../../sys/geom +.PATH: ${SRCTOP}/sys/geom PACKAGE=runtime PROG= bsdlabel Modified: stable/11/sbin/dhclient/tests/Makefile ============================================================================== --- stable/11/sbin/dhclient/tests/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/dhclient/tests/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -5,7 +5,7 @@ PLAIN_TESTS_C= option-domain-search_test SRCS.option-domain-search_test= alloc.c convert.c hash.c options.c \ tables.c fake.c option-domain-search.c -CFLAGS.option-domain-search_test+= -I${.CURDIR}/.. +CFLAGS.option-domain-search_test+= -I${.CURDIR:H} LIBADD.option-domain-search_test= util WARNS?= 2 Modified: stable/11/sbin/etherswitchcfg/Makefile ============================================================================== --- stable/11/sbin/etherswitchcfg/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/etherswitchcfg/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -5,6 +5,6 @@ PACKAGE=runtime PROG= etherswitchcfg MAN= etherswitchcfg.8 SRCS= etherswitchcfg.c ifmedia.c -CFLAGS+= -I${.CURDIR}/../../sys +CFLAGS+= -I${SRCTOP}/sys .include Modified: stable/11/sbin/fdisk/Makefile ============================================================================== --- stable/11/sbin/fdisk/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/fdisk/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -6,7 +6,7 @@ SRCS= fdisk.c geom_mbr_enc.c WARNS?= 4 MAN= fdisk.8 -.PATH: ${.CURDIR}/../../sys/geom +.PATH: ${SRCTOP}/sys/geom LIBADD= geom Modified: stable/11/sbin/ffsinfo/Makefile ============================================================================== --- stable/11/sbin/ffsinfo/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/ffsinfo/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -4,7 +4,7 @@ # $FreeBSD$ # -GROWFS= ${.CURDIR}/../growfs +GROWFS= ${.CURDIR:H}/growfs .PATH: ${GROWFS} PACKAGE=runtime Modified: stable/11/sbin/fsck_ffs/Makefile ============================================================================== --- stable/11/sbin/fsck_ffs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/fsck_ffs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -12,8 +12,8 @@ SRCS= dir.c ea.c fsutil.c inode.c main.c pass1.c pass1 globs.c LIBADD= ufs WARNS?= 2 -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mount +CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/mount -.PATH: ${.CURDIR}/../../sys/ufs/ffs ${.CURDIR}/../mount +.PATH: ${SRCTOP}/sys/ufs/ffs ${.CURDIR:H}/mount .include Modified: stable/11/sbin/fsck_msdosfs/Makefile ============================================================================== --- stable/11/sbin/fsck_msdosfs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/fsck_msdosfs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.6 1997/05/08 21:11:11 gwr Exp $ # $FreeBSD$ -FSCK= ${.CURDIR}/../fsck +FSCK= ${.CURDIR:H}/fsck .PATH: ${FSCK} PACKAGE=runtime Modified: stable/11/sbin/fsdb/Makefile ============================================================================== --- stable/11/sbin/fsdb/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/fsdb/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -8,9 +8,9 @@ MAN= fsdb.8 SRCS= fsdb.c fsdbutil.c \ dir.c ea.c fsutil.c inode.c pass1.c pass1b.c pass2.c pass3.c pass4.c \ pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c globs.c -CFLAGS+= -I${.CURDIR}/../fsck_ffs +CFLAGS+= -I${.CURDIR:H}/fsck_ffs WARNS?= 2 LIBADD= edit -.PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs +.PATH: ${.CURDIR:H}/fsck_ffs ${SRCTOP}/sys/ufs/ffs .include Modified: stable/11/sbin/gbde/Makefile ============================================================================== --- stable/11/sbin/gbde/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/gbde/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -13,10 +13,10 @@ SRCS+= g_bde_lock.c NO_WCAST_ALIGN= NO_WMISSING_VARIABLE_DECLARATIONS= -CFLAGS+= -I${.CURDIR}/../../sys -.PATH: ${.CURDIR}/../../sys/geom/bde \ - ${.CURDIR}/../../sys/crypto/rijndael \ - ${.CURDIR}/../../sys/crypto/sha2 +CFLAGS+= -I${SRCTOP}/sys +.PATH: ${SRCTOP}/sys/geom/bde \ + ${SRCTOP}/sys/crypto/rijndael \ + ${SRCTOP}/sys/crypto/sha2 CLEANFILES+= template.c Modified: stable/11/sbin/geom/class/Makefile.inc ============================================================================== --- stable/11/sbin/geom/class/Makefile.inc Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/Makefile.inc Tue May 30 04:17:22 2017 (r319185) @@ -8,6 +8,6 @@ SRCS+= geom_${GEOM_CLASS}.c subr.c NO_WMISSING_VARIABLE_DECLARATIONS= -CFLAGS+= -I${.CURDIR}/../.. +CFLAGS+= -I${.CURDIR:H:H} .include "../Makefile.inc" Modified: stable/11/sbin/geom/class/cache/Makefile ============================================================================== --- stable/11/sbin/geom/class/cache/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/cache/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= cache Modified: stable/11/sbin/geom/class/concat/Makefile ============================================================================== --- stable/11/sbin/geom/class/concat/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/concat/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= concat Modified: stable/11/sbin/geom/class/eli/Makefile ============================================================================== --- stable/11/sbin/geom/class/eli/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/eli/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc ${.CURDIR}/../../../../sys/geom/eli ${.CURDIR}/../../../../sys/crypto/sha2 +.PATH: ${.CURDIR:H:H}/misc ${SRCTOP}/sys/geom/eli ${SRCTOP}/sys/crypto/sha2 GEOM_CLASS= eli SRCS= g_eli_crypto.c @@ -15,6 +15,6 @@ LIBADD= md crypto WARNS?= 3 -CFLAGS+=-I${.CURDIR}/../../../../sys +CFLAGS+=-I${SRCTOP}/sys .include Modified: stable/11/sbin/geom/class/journal/Makefile ============================================================================== --- stable/11/sbin/geom/class/journal/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/journal/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,13 +1,13 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= journal SRCS+= geom_journal_ufs.c LIBADD= ufs md -CFLAGS+=-I${.CURDIR}/../../../../sys +CFLAGS+=-I${SRCTOP}/sys .include Modified: stable/11/sbin/geom/class/label/Makefile ============================================================================== --- stable/11/sbin/geom/class/label/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/label/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= label Modified: stable/11/sbin/geom/class/mirror/Makefile ============================================================================== --- stable/11/sbin/geom/class/mirror/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/mirror/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= mirror Modified: stable/11/sbin/geom/class/mountver/Makefile ============================================================================== --- stable/11/sbin/geom/class/mountver/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/mountver/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= mountver Modified: stable/11/sbin/geom/class/multipath/Makefile ============================================================================== --- stable/11/sbin/geom/class/multipath/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/multipath/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,10 +1,10 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= multipath -CFLAGS+= -I${.CURDIR}/../../../../sys +CFLAGS+= -I${SRCTOP}/sys .include Modified: stable/11/sbin/geom/class/nop/Makefile ============================================================================== --- stable/11/sbin/geom/class/nop/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/nop/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= nop Modified: stable/11/sbin/geom/class/part/Makefile ============================================================================== --- stable/11/sbin/geom/class/part/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/part/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= part Modified: stable/11/sbin/geom/class/raid/Makefile ============================================================================== --- stable/11/sbin/geom/class/raid/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/raid/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= raid Modified: stable/11/sbin/geom/class/raid3/Makefile ============================================================================== --- stable/11/sbin/geom/class/raid3/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/raid3/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= raid3 Modified: stable/11/sbin/geom/class/sched/Makefile ============================================================================== --- stable/11/sbin/geom/class/sched/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/sched/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -2,7 +2,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= sched Modified: stable/11/sbin/geom/class/shsec/Makefile ============================================================================== --- stable/11/sbin/geom/class/shsec/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/shsec/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= shsec Modified: stable/11/sbin/geom/class/stripe/Makefile ============================================================================== --- stable/11/sbin/geom/class/stripe/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/stripe/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc +.PATH: ${.CURDIR:H:H}/misc GEOM_CLASS= stripe Modified: stable/11/sbin/geom/class/virstor/Makefile ============================================================================== --- stable/11/sbin/geom/class/virstor/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/class/virstor/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -.PATH: ${.CURDIR}/../../misc ${.CURDIR}/../../../../sys/geom/virstor +.PATH: ${.CURDIR:H:H}/misc ${SRCTOP}/sys/geom/virstor GEOM_CLASS= virstor Modified: stable/11/sbin/geom/core/Makefile ============================================================================== --- stable/11/sbin/geom/core/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/geom/core/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../misc +.PATH: ${.CURDIR:H}/misc PACKAGE=runtime PROG= geom @@ -10,7 +10,7 @@ SRCS= geom.c subr.c NO_SHARED=NO CFLAGS+= -DGEOM_CLASS_DIR=\"${GEOM_CLASS_DIR}\" -CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/.. +CFLAGS+= -I${SRCTOP}/sys -I${.CURDIR} -I${.CURDIR:H} LIBADD= geom util Modified: stable/11/sbin/ggate/ggatec/Makefile ============================================================================== --- stable/11/sbin/ggate/ggatec/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/ggate/ggatec/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../shared +.PATH: ${.CURDIR:H}/shared PROG= ggatec MAN= ggatec.8 @@ -8,7 +8,7 @@ SRCS= ggatec.c ggate.c CFLAGS+= -DMAX_SEND_SIZE=32768 CFLAGS+= -DLIBGEOM -CFLAGS+= -I${.CURDIR}/../shared +CFLAGS+= -I${.CURDIR:H}/shared LIBADD= geom util pthread Modified: stable/11/sbin/ggate/ggated/Makefile ============================================================================== --- stable/11/sbin/ggate/ggated/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/ggate/ggated/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../shared +.PATH: ${.CURDIR:H}/shared PROG= ggated MAN= ggated.8 @@ -8,6 +8,6 @@ SRCS= ggated.c ggate.c LIBADD= pthread util -CFLAGS+= -I${.CURDIR}/../shared +CFLAGS+= -I${.CURDIR:H}/shared .include Modified: stable/11/sbin/ggate/ggatel/Makefile ============================================================================== --- stable/11/sbin/ggate/ggatel/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/ggate/ggatel/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,13 +1,13 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../shared +.PATH: ${.CURDIR:H}/shared PROG= ggatel MAN= ggatel.8 SRCS= ggatel.c ggate.c CFLAGS+= -DLIBGEOM -CFLAGS+= -I${.CURDIR}/../shared +CFLAGS+= -I${.CURDIR:H}/shared LIBADD= geom util Modified: stable/11/sbin/growfs/Makefile ============================================================================== --- stable/11/sbin/growfs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/growfs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -6,19 +6,19 @@ .include -.PATH: ${.CURDIR}/../mount +.PATH: ${.CURDIR:H}/mount PACKAGE=runtime PROG= growfs SRCS= growfs.c getmntopts.c MAN= growfs.8 -CFLAGS+=-I${.CURDIR}/../mount +CFLAGS+=-I${.CURDIR:H}/mount .if defined(GFSDBG) SRCS+= debug.c CFLAGS+= -DFS_DEBUG NO_WCAST_ALIGN= yes -.endif +.endif LIBADD= util Modified: stable/11/sbin/gvinum/Makefile ============================================================================== --- stable/11/sbin/gvinum/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/gvinum/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -6,10 +6,10 @@ SRCS= gvinum.c gvinum.h geom_vinum_share.c MAN= gvinum.8 WARNS?= 2 -CFLAGS+= -I${.CURDIR}/../../sys -I${DESTDIR}/${INCLUDEDIR}/edit +CFLAGS+= -I${SRCTOP}/sys -I${DESTDIR}/${INCLUDEDIR}/edit LIBADD= edit geom -.PATH: ${.CURDIR}/../../sys/geom/vinum +.PATH: ${SRCTOP}/sys/geom/vinum .include Modified: stable/11/sbin/hastctl/Makefile ============================================================================== --- stable/11/sbin/hastctl/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/hastctl/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -3,7 +3,7 @@ .include PACKAGE=hast -.PATH: ${.CURDIR}/../hastd +.PATH: ${.CURDIR:H}/hastd PROG= hastctl SRCS= activemap.c @@ -23,7 +23,7 @@ MAN= hastctl.8 NO_WFORMAT= NO_WCAST_ALIGN= NO_WMISSING_VARIABLE_DECLARATIONS= -CFLAGS+=-I${.CURDIR}/../hastd +CFLAGS+=-I${.CURDIR:H}/hastd CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DINET .if ${MK_INET6_SUPPORT} != "no" Modified: stable/11/sbin/init/Makefile ============================================================================== --- stable/11/sbin/init/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/init/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -11,7 +11,7 @@ CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYS LIBADD= util crypt # Needed for getmntopts.c -MOUNT= ${.CURDIR}/../../sbin/mount +MOUNT= ${SRCTOP}/sbin/mount CFLAGS+=-I${MOUNT} .PATH: ${MOUNT} Modified: stable/11/sbin/ipf/Makefile.inc ============================================================================== --- stable/11/sbin/ipf/Makefile.inc Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/ipf/Makefile.inc Tue May 30 04:17:22 2017 (r319185) @@ -6,10 +6,10 @@ WARNS?= 2 NO_WFORMAT= NO_WARRAY_BOUNDS= -CFLAGS+= -I${.CURDIR}/../../../contrib/ipfilter -CFLAGS+= -I${.CURDIR}/../../../contrib/ipfilter/tools -CFLAGS+= -I${.CURDIR}/../../../sys -CFLAGS+= -I${.CURDIR}/../../../sys/contrib/ipfilter +CFLAGS+= -I${SRCTOP}/contrib/ipfilter +CFLAGS+= -I${SRCTOP}/contrib/ipfilter/tools +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/sys/contrib/ipfilter CFLAGS+= -DSTATETOP -D__UIO_EXPOSE .if ${MK_INET6_SUPPORT} != "no" @@ -24,9 +24,9 @@ LIBADD+= ipf CLEANFILES+= y.tab.c y.tab.h -.PATH: ${.CURDIR}/../../../contrib/ipfilter \ - ${.CURDIR}/../../../contrib/ipfilter/lib \ - ${.CURDIR}/../../../contrib/ipfilter/tools \ - ${.CURDIR}/../../../contrib/ipfilter/man +.PATH: ${SRCTOP}/contrib/ipfilter \ + ${SRCTOP}/contrib/ipfilter/lib \ + ${SRCTOP}/contrib/ipfilter/tools \ + ${SRCTOP}/contrib/ipfilter/man .include "../Makefile.inc" Modified: stable/11/sbin/ipf/ipf/Makefile ============================================================================== --- stable/11/sbin/ipf/ipf/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/ipf/ipf/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -31,7 +31,7 @@ ipf_l.h: lexer.h ${.ALLSRC} > ${.TARGET} .if defined(RESCUE) -LIBIPF_SRCS!= cd ${.CURDIR}/../libipf && ${MAKE} -V SRCS +LIBIPF_SRCS!= cd ${.CURDIR:H}/libipf && ${MAKE} -V SRCS SRCS+= ${LIBIPF_SRCS} .else LIBADD+= pcap Modified: stable/11/sbin/ipf/ipftest/Makefile ============================================================================== --- stable/11/sbin/ipf/ipftest/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/ipf/ipftest/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -20,11 +20,11 @@ CFLAGS+= -DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER # XXX CFLAGS+= -DIPFILTER_SCAN -.PATH: ${.CURDIR}/../../../sys/contrib/ipfilter/netinet +.PATH: ${SRCTOP}/sys/contrib/ipfilter/netinet GENHDRS= ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h -CLEANFILES+= ${GENHDRS} +CLEANFILES+= ${GENHDRS} CLEANFILES+= ipf_y.c ipf_l.c CLEANFILES+= ipf.tab.c ipf.tab.h CLEANFILES+= ipnat_y.c ipnat_l.c Modified: stable/11/sbin/ipf/ipresend/Makefile ============================================================================== --- stable/11/sbin/ipf/ipresend/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/ipf/ipresend/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -5,6 +5,6 @@ PROG= ipresend SRCS= ipresend.c ip.c resend.c sbpf.c sock.c 44arp.c MAN= ipresend.1 -.PATH: ${.CURDIR}/../../../contrib/ipfilter/ipsend +.PATH: ${SRCTOP}/contrib/ipfilter/ipsend .include Modified: stable/11/sbin/iscontrol/Makefile ============================================================================== --- stable/11/sbin/iscontrol/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/iscontrol/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -4,7 +4,7 @@ PACKAGE=iscsi_legacy SRCS= iscontrol.c pdu.c fsm.c config.c login.c auth_subr.c misc.c PROG= iscontrol LIBADD= cam md -S= ${.CURDIR}/../../sys +S= ${SRCTOP}/sys WARNS?= 3 CFLAGS+= -I$S Modified: stable/11/sbin/ldconfig/Makefile ============================================================================== --- stable/11/sbin/ldconfig/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/ldconfig/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -3,7 +3,7 @@ PACKAGE=runtime PROG= ldconfig SRCS= elfhints.c ldconfig.c shlib.c support.c -LDDIR?= ${.CURDIR}/../../libexec/rtld-aout +LDDIR?= ${SRCTOP}/libexec/rtld-aout CFLAGS+=-I${LDDIR} -DFREEBSD_AOUT MAN= ldconfig.8 Modified: stable/11/sbin/mksnap_ffs/Makefile ============================================================================== --- stable/11/sbin/mksnap_ffs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/mksnap_ffs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../mount +.PATH: ${.CURDIR:H}/mount PACKAGE=runtime PROG= mksnap_ffs @@ -8,7 +8,7 @@ SRCS= mksnap_ffs.c getmntopts.c MAN= mksnap_ffs.8 WARNS?= 2 -CFLAGS+=-I${.CURDIR}/../mount +CFLAGS+=-I${.CURDIR:H}/mount .if defined(NOSUID) BINMODE=554 Modified: stable/11/sbin/mount_cd9660/Makefile ============================================================================== --- stable/11/sbin/mount_cd9660/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/mount_cd9660/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -7,7 +7,7 @@ SRCS= mount_cd9660.c getmntopts.c MAN= mount_cd9660.8 LIBADD= kiconv -MOUNT= ${.CURDIR}/../mount +MOUNT= ${.CURDIR:H}/mount CFLAGS+= -I${MOUNT} # Needs to be dynamically linked for optional dlopen() access to Modified: stable/11/sbin/mount_fusefs/Makefile ============================================================================== --- stable/11/sbin/mount_fusefs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/mount_fusefs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -25,7 +25,7 @@ PROG= mount_fusefs SRCS= mount_fusefs.c getmntopts.c MAN8= mount_fusefs.8 -MOUNT= ${.CURDIR}/../mount +MOUNT= ${.CURDIR:H}/mount CFLAGS+= -I${MOUNT} .PATH: ${MOUNT} Modified: stable/11/sbin/mount_msdosfs/Makefile ============================================================================== --- stable/11/sbin/mount_msdosfs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/mount_msdosfs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -8,7 +8,7 @@ SRCS= mount_msdosfs.c getmntopts.c MAN= mount_msdosfs.8 LIBADD= kiconv -MOUNT= ${.CURDIR}/../mount +MOUNT= ${.CURDIR:H}/mount CFLAGS+= -I${MOUNT} # Needs to be dynamically linked for optional dlopen() access to Modified: stable/11/sbin/mount_nfs/Makefile ============================================================================== --- stable/11/sbin/mount_nfs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/mount_nfs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -7,8 +7,8 @@ PROG= mount_nfs SRCS= mount_nfs.c getmntopts.c mounttab.c MAN= mount_nfs.8 -MOUNT= ${.CURDIR}/../mount -UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall +MOUNT= ${.CURDIR:H}/mount +UMNTALL= ${SRCTOP}/usr.sbin/rpc.umntall CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL} .PATH: ${MOUNT} ${UMNTALL} Modified: stable/11/sbin/mount_nullfs/Makefile ============================================================================== --- stable/11/sbin/mount_nullfs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/mount_nullfs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -6,7 +6,7 @@ PROG= mount_nullfs SRCS= mount_nullfs.c getmntopts.c MAN= mount_nullfs.8 -MOUNT= ${.CURDIR}/../mount +MOUNT= ${.CURDIR:H}/mount CFLAGS+=-I${MOUNT} .PATH: ${MOUNT} Modified: stable/11/sbin/mount_udf/Makefile ============================================================================== --- stable/11/sbin/mount_udf/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/mount_udf/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -6,8 +6,8 @@ SRCS= mount_udf.c getmntopts.c MAN= mount_udf.8 LIBADD= kiconv -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${MOUNT} -I${.CURDIR}/../../sys +MOUNT= ${.CURDIR:H}/mount +CFLAGS+= -I${MOUNT} -I${SRCTOP}/sys .PATH: ${MOUNT} # Needs to be dynamically linked for optional dlopen() access to Modified: stable/11/sbin/mount_unionfs/Makefile ============================================================================== --- stable/11/sbin/mount_unionfs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/mount_unionfs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -6,7 +6,7 @@ PROG= mount_unionfs SRCS= mount_unionfs.c getmntopts.c MAN= mount_unionfs.8 -MOUNT= ${.CURDIR}/../mount +MOUNT= ${.CURDIR:H}/mount CFLAGS+=-I${MOUNT} .PATH: ${MOUNT} Modified: stable/11/sbin/newfs/Makefile ============================================================================== --- stable/11/sbin/newfs/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/newfs/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 3/27/94 # $FreeBSD$ -.PATH: ${.CURDIR}/../../sys/geom +.PATH: ${SRCTOP}/sys/geom PROG= newfs LIBADD= ufs util @@ -13,7 +13,7 @@ MAN= newfs.8 .include test: ${PROG} - sh ${.CURDIR}/runtest01.sh + sh ${.CURDIR}/runtest01.sh sh ${.CURDIR}/runtest00.sh | tee _.test diff --ignore-matching-lines=FreeBSD _.test ${.CURDIR}/ref.test echo All Tests Passed Modified: stable/11/sbin/nvmecontrol/Makefile ============================================================================== --- stable/11/sbin/nvmecontrol/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/nvmecontrol/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -6,6 +6,6 @@ SRCS= nvmecontrol.c devlist.c firmware.c identify.c lo perftest.c reset.c nvme_util.c power.c MAN= nvmecontrol.8 -.PATH: ${.CURDIR}/../../sys/dev/nvme +.PATH: ${SRCTOP}/sys/dev/nvme .include Modified: stable/11/sbin/pfctl/Makefile ============================================================================== --- stable/11/sbin/pfctl/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/pfctl/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -3,7 +3,7 @@ .include # pf_ruleset.c is shared between kernel and pfctl -.PATH: ${.CURDIR}/../../sys/netpfil/pf +.PATH: ${SRCTOP}/sys/netpfil/pf PACKAGE=pf PROG= pfctl Modified: stable/11/sbin/pflogd/Makefile ============================================================================== --- stable/11/sbin/pflogd/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/pflogd/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,13 +1,13 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/pf/pflogd +.PATH: ${SRCTOP}/contrib/pf/pflogd PACKAGE=pf PROG= pflogd SRCS= pflogd.c pidfile.c privsep.c privsep_fdpass.c MAN= pflogd.8 -CFLAGS+=-include ${.CURDIR}/../../lib/libpcap/config.h +CFLAGS+=-include ${SRCTOP}/lib/libpcap/config.h LIBADD= pcap Modified: stable/11/sbin/quotacheck/Makefile ============================================================================== --- stable/11/sbin/quotacheck/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/quotacheck/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -8,6 +8,6 @@ WARNS?= 2 MAN= quotacheck.8 LIBADD= util -.PATH: ${.CURDIR}/../fsck ${.CURDIR}/../fsck_ffs +.PATH: ${.CURDIR:H}/fsck ${.CURDIR:H}/fsck_ffs .include Modified: stable/11/sbin/resolvconf/Makefile ============================================================================== --- stable/11/sbin/resolvconf/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/resolvconf/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # $FreeBSD$ PACKAGE=runtime -DIST= ${.CURDIR}/../../contrib/openresolv +DIST= ${SRCTOP}/contrib/openresolv .PATH: ${DIST} SCRIPTS= resolvconf Modified: stable/11/sbin/restore/Makefile ============================================================================== --- stable/11/sbin/restore/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/restore/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,7 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ -.PATH: ${.CURDIR}/../dump +.PATH: ${.CURDIR:H}/dump PACKAGE=runtime PROG= restore Modified: stable/11/sbin/rtsol/Makefile ============================================================================== --- stable/11/sbin/rtsol/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/rtsol/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -14,7 +14,7 @@ # # $FreeBSD$ -.PATH: ${.CURDIR}/../../usr.sbin/rtsold +.PATH: ${SRCTOP}/usr.sbin/rtsold PACKAGE=runtime PROG= rtsol Modified: stable/11/sbin/setkey/Makefile ============================================================================== --- stable/11/sbin/setkey/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/setkey/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -35,7 +35,7 @@ MAN= setkey.8 SRCS= setkey.c parse.y token.l WARNS?= 1 -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libipsec +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/lib/libipsec YFLAGS= -d LIBADD= l y @@ -44,9 +44,9 @@ CLEANFILES= y.tab.c y.tab.h key_test.o keytest # libpfkey # ipsec_strerror.c is for avoiding shlib reference to non-exported function. -.PATH: ${.CURDIR}/../../lib/libipsec ${.CURDIR}/../../sys/netipsec +.PATH: ${SRCTOP}/lib/libipsec ${SRCTOP}/sys/netipsec SRCS+= pfkey.c pfkey_dump.c key_debug.c ipsec_strerror.c -CFLAGS+= -I${.CURDIR}/../../lib/libipsec -I${.CURDIR}/../../sys/netipsec +CFLAGS+= -I${SRCTOP}/lib/libipsec -I${SRCTOP}/sys/netipsec SRCS+= y.tab.h y.tab.h: parse.y Modified: stable/11/sbin/sunlabel/Makefile ============================================================================== --- stable/11/sbin/sunlabel/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/sunlabel/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../sys/geom +.PATH: ${SRCTOP}/sys/geom PROG= sunlabel SRCS= sunlabel.c geom_sunlabel_enc.c Modified: stable/11/sbin/umount/Makefile ============================================================================== --- stable/11/sbin/umount/Makefile Tue May 30 04:15:40 2017 (r319184) +++ stable/11/sbin/umount/Makefile Tue May 30 04:17:22 2017 (r319185) @@ -7,8 +7,8 @@ PROG= umount SRCS= umount.c vfslist.c mounttab.c MAN= umount.8 -MOUNT= ${.CURDIR}/../mount -UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall +MOUNT= ${.CURDIR:H}/mount +UMNTALL= ${SRCTOP}/usr.sbin/rpc.umntall CFLAGS+= -I${MOUNT} -I${UMNTALL} .PATH: ${MOUNT} ${UMNTALL} From owner-svn-src-all@freebsd.org Tue May 30 04:27:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDDC5AFB9B5; Tue, 30 May 2017 04:27:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A73DC77202; Tue, 30 May 2017 04:27:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U4RBbb086974; Tue, 30 May 2017 04:27:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U4R6r2086912; Tue, 30 May 2017 04:27:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300427.v4U4R6r2086912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319186 - in stable/11/usr.bin: bsdiff/bsdiff bzip2 bzip2recover chkey chpass compile_et cpio ctlstat drill ee elfcopy factor file ftp host ipcrm iscsictl kdump less lessecho lesskey le... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:27:13 -0000 Author: ngie Date: Tue May 30 04:27:05 2017 New Revision: 319186 URL: https://svnweb.freebsd.org/changeset/base/319186 Log: MFC r315170: r315170 (by imp): Adopt SRCTOP in usr.bin Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo over ${.CURDIR}/../foo for paths in Makefiles. Silence on: arch@ (twice) Modified: stable/11/usr.bin/bsdiff/bsdiff/Makefile stable/11/usr.bin/bzip2/Makefile stable/11/usr.bin/bzip2recover/Makefile stable/11/usr.bin/chkey/Makefile stable/11/usr.bin/chpass/Makefile stable/11/usr.bin/compile_et/Makefile stable/11/usr.bin/cpio/Makefile stable/11/usr.bin/ctlstat/Makefile stable/11/usr.bin/drill/Makefile stable/11/usr.bin/ee/Makefile stable/11/usr.bin/elfcopy/Makefile stable/11/usr.bin/factor/Makefile stable/11/usr.bin/file/Makefile stable/11/usr.bin/ftp/Makefile stable/11/usr.bin/host/Makefile stable/11/usr.bin/ipcrm/Makefile stable/11/usr.bin/iscsictl/Makefile stable/11/usr.bin/kdump/Makefile stable/11/usr.bin/less/Makefile.common stable/11/usr.bin/lessecho/Makefile stable/11/usr.bin/lesskey/Makefile stable/11/usr.bin/lex/Makefile stable/11/usr.bin/lex/lib/Makefile stable/11/usr.bin/locale/Makefile stable/11/usr.bin/localedef/Makefile stable/11/usr.bin/lzmainfo/Makefile stable/11/usr.bin/m4/Makefile stable/11/usr.bin/mandoc/Makefile stable/11/usr.bin/minigzip/Makefile stable/11/usr.bin/mkcsmapper/Makefile stable/11/usr.bin/mkcsmapper/Makefile.inc stable/11/usr.bin/mkcsmapper_static/Makefile stable/11/usr.bin/mkesdb/Makefile stable/11/usr.bin/mkesdb_static/Makefile stable/11/usr.bin/mklocale/Makefile stable/11/usr.bin/nc/Makefile stable/11/usr.bin/opieinfo/Makefile stable/11/usr.bin/opiekey/Makefile stable/11/usr.bin/opiepasswd/Makefile stable/11/usr.bin/pamtest/Makefile stable/11/usr.bin/readelf/Makefile stable/11/usr.bin/rsh/Makefile stable/11/usr.bin/smbutil/Makefile stable/11/usr.bin/svn/lib/Makefile.inc stable/11/usr.bin/tar/Makefile stable/11/usr.bin/telnet/Makefile stable/11/usr.bin/tftp/Makefile stable/11/usr.bin/top/Makefile stable/11/usr.bin/truss/Makefile stable/11/usr.bin/unvis/Makefile stable/11/usr.bin/vacation/Makefile stable/11/usr.bin/vi/Makefile stable/11/usr.bin/vis/Makefile stable/11/usr.bin/w/Makefile stable/11/usr.bin/xinstall/Makefile stable/11/usr.bin/xz/Makefile stable/11/usr.bin/xzdec/Makefile stable/11/usr.bin/yacc/Makefile stable/11/usr.bin/ypwhich/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/bsdiff/bsdiff/Makefile ============================================================================== --- stable/11/usr.bin/bsdiff/bsdiff/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/bsdiff/bsdiff/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -4,11 +4,11 @@ PROG= bsdiff # libdivsufsort configured with: # cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_DIVSUFSORT64=ON -.PATH: ${.CURDIR}/../../../contrib/libdivsufsort/lib +.PATH: ${SRCTOP}/contrib/libdivsufsort/lib CFLAGS+= -DHAVE_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE CFLAGS+= -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS CFLAGS+= -D__STDC_LIMIT_MACROS -DBUILD_DIVSUFSORT64 -CFLAGS+= -I${.CURDIR}/../../../contrib/libdivsufsort/include -I${.CURDIR} +CFLAGS+= -I${SRCTOP}/contrib/libdivsufsort/include -I${.CURDIR} SRCS= divsufsort.c sssort.c trsort.c utils.c SRCS+= bsdiff.c Modified: stable/11/usr.bin/bzip2/Makefile ============================================================================== --- stable/11/usr.bin/bzip2/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/bzip2/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -BZ2DIR= ${.CURDIR}/../../contrib/bzip2 +BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} PROG= bzip2 Modified: stable/11/usr.bin/bzip2recover/Makefile ============================================================================== --- stable/11/usr.bin/bzip2recover/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/bzip2recover/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -BZ2DIR= ${.CURDIR}/../../contrib/bzip2 +BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} PROG= bzip2recover Modified: stable/11/usr.bin/chkey/Makefile ============================================================================== --- stable/11/usr.bin/chkey/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/chkey/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -2,11 +2,11 @@ .include -.PATH: ${.CURDIR}/../newkey +.PATH: ${SRCTOP}/usr.bin/newkey PROG= chkey SRCS= chkey.c generic.c update.c -CFLAGS+= -I${.CURDIR}/../newkey +CFLAGS+= -I${SRCTOP}/usr.bin/newkey .if ${MK_NIS} != "no" CFLAGS+= -DYP .endif Modified: stable/11/usr.bin/chpass/Makefile ============================================================================== --- stable/11/usr.bin/chpass/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/chpass/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -3,7 +3,7 @@ .include -.PATH: ${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../lib/libc/gen +.PATH: ${SRCTOP}/usr.sbin/pwd_mkdb ${SRCTOP}/lib/libc/gen PROG= chpass SRCS= chpass.c edit.c field.c pw_scan.c table.c util.c @@ -15,7 +15,7 @@ CFLAGS+= -DYP .endif #Some people need this, uncomment to activate #CFLAGS+=-DRESTRICT_FULLNAME_CHANGE -CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I. +CFLAGS+=-I${SRCTOP}/usr.sbin/pwd_mkdb -I${SRCTOP}/lib/libc/gen -I. LIBADD= crypt util .if ${MK_NIS} != "no" Modified: stable/11/usr.bin/compile_et/Makefile ============================================================================== --- stable/11/usr.bin/compile_et/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/compile_et/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,11 +1,11 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/com_err +.PATH: ${SRCTOP}/contrib/com_err PROG= compile_et SRCS= compile_et.c parse.y lex.l LIBADD= roken vers -CFLAGS+=-I. -I${.CURDIR}/../../contrib/com_err +CFLAGS+=-I. -I${SRCTOP}/contrib/com_err WARNS?= 0 Modified: stable/11/usr.bin/cpio/Makefile ============================================================================== --- stable/11/usr.bin/cpio/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/cpio/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -2,8 +2,8 @@ .include -_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive -_LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive +_LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcpio BSDCPIO_VERSION_STRING= 3.3.1 Modified: stable/11/usr.bin/ctlstat/Makefile ============================================================================== --- stable/11/usr.bin/ctlstat/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/ctlstat/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -2,7 +2,7 @@ PROG= ctlstat MAN= ctlstat.8 -SDIR= ${.CURDIR}/../../sys +SDIR= ${SRCTOP}/sys CFLAGS+= -I${SDIR} .include Modified: stable/11/usr.bin/drill/Makefile ============================================================================== --- stable/11/usr.bin/drill/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/drill/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,7 +1,7 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR= ${.CURDIR}/../../contrib/ldns +LDNSDIR= ${SRCTOP}/contrib/ldns .PATH: ${LDNSDIR}/drill Modified: stable/11/usr.bin/ee/Makefile ============================================================================== --- stable/11/usr.bin/ee/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/ee/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/ee +.PATH: ${SRCTOP}/contrib/ee CFLAGS+= -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \ -DHAS_SYS_WAIT @@ -29,7 +29,7 @@ NLSSRCFILES=ee.msg . if exists(${.CURDIR}/nls/${lang}/ee.msg) NLSSRCDIR_${lang}= ${.CURDIR}/nls/${lang} . else -NLSSRCDIR_${lang}= ${.CURDIR}/../../contrib/ee +NLSSRCDIR_${lang}= ${SRCTOP}/contrib/ee . endif .endfor Modified: stable/11/usr.bin/elfcopy/Makefile ============================================================================== --- stable/11/usr.bin/elfcopy/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/elfcopy/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -32,7 +32,7 @@ LINKS= ${BINDIR}/${PROG} ${BINDIR}/strip # This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile # We need to link against the correct version of these files. One -# solution is to include ../../sys in the include path. This causes +# solution is to include SRCTOP/sys in the include path. This causes # problems when a header file in sys depends on a file in another # part of the tree, e.g. a machine dependent header. # Modified: stable/11/usr.bin/factor/Makefile ============================================================================== --- stable/11/usr.bin/factor/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/factor/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -5,7 +5,7 @@ PROG= factor SRCS= factor.c pr_tbl.c -CFLAGS+=-I${.CURDIR}/../primes +CFLAGS+=-I${SRCTOP}/usr.bin/primes .if ${MK_OPENSSL} != "no" CFLAGS+=-DHAVE_OPENSSL @@ -14,6 +14,6 @@ LIBADD+=crypto MAN= factor.6 MLINKS+=factor.6 primes.6 -.PATH: ${.CURDIR}/../primes +.PATH: ${SRCTOP}/usr.bin/primes .include Modified: stable/11/usr.bin/file/Makefile ============================================================================== --- stable/11/usr.bin/file/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/file/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -20,7 +20,7 @@ # ever read sources, credits must appear in the documentation. # 4. This notice may not be removed or altered. -SRCDIR= ${.CURDIR}/../../contrib/file +SRCDIR= ${SRCTOP}/contrib/file .PATH: ${SRCDIR}/src .PATH: ${SRCDIR}/doc @@ -29,12 +29,12 @@ PROG= file MAGICPATH?= /usr/share/misc CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H -CFLAGS+= -I${.CURDIR}/../../lib/libmagic +CFLAGS+= -I${SRCTOP}/lib/libmagic LIBADD= magic FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ - ${.CURDIR}/../../lib/libmagic/config.h + ${SRCTOP}/lib/libmagic/config.h CLEANFILES+= ${MAN} Modified: stable/11/usr.bin/ftp/Makefile ============================================================================== --- stable/11/usr.bin/ftp/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/ftp/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -8,7 +8,7 @@ # #CFLAGS+=-DGATE_SERVER=\"ftp-gw.host\" # -DGATE_PORT=21 -TNFTP= ${.CURDIR}/../../contrib/tnftp +TNFTP= ${SRCTOP}/contrib/tnftp .PATH: ${TNFTP}/src PROG= ftp Modified: stable/11/usr.bin/host/Makefile ============================================================================== --- stable/11/usr.bin/host/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/host/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,7 +1,7 @@ # $FreeBSD$ -LDNSDIR= ${.CURDIR}/../../contrib/ldns -LDNSHOSTDIR= ${.CURDIR}/../../contrib/ldns-host +LDNSDIR= ${SRCTOP}/contrib/ldns +LDNSHOSTDIR= ${SRCTOP}/contrib/ldns-host .PATH: ${LDNSHOSTDIR} Modified: stable/11/usr.bin/ipcrm/Makefile ============================================================================== --- stable/11/usr.bin/ipcrm/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/ipcrm/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -3,8 +3,8 @@ PROG= ipcrm SRCS= ipcrm.c ipc.c LIBADD= kvm -CFLAGS+=-I${.CURDIR}/../ipcs -.PATH: ${.CURDIR}/../ipcs +CFLAGS+=-I${SRCTOP}/usr.bin/ipcs +.PATH: ${SRCTOP}/usr.bin/ipcs WARNS?= 0 Modified: stable/11/usr.bin/iscsictl/Makefile ============================================================================== --- stable/11/usr.bin/iscsictl/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/iscsictl/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -4,7 +4,7 @@ PACKAGE= iscsi PROG= iscsictl SRCS= iscsictl.c periphs.c parse.y token.l y.tab.h CFLAGS+= -I${.CURDIR} -CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi +CFLAGS+= -I${SRCTOP}/sys/dev/iscsi MAN= iscsi.conf.5 iscsictl.8 LIBADD= xo Modified: stable/11/usr.bin/kdump/Makefile ============================================================================== --- stable/11/usr.bin/kdump/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/kdump/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -3,11 +3,11 @@ .include -.PATH: ${.CURDIR}/../ktrace +.PATH: ${SRCTOP}/usr.bin/ktrace PROG= kdump SRCS= kdump.c subr.c -CFLAGS+= -I${.CURDIR}/../ktrace #-I${.CURDIR}/../... +CFLAGS+= -I${SRCTOP}/usr.bin/ktrace LIBADD= sysdecode .if ${MK_CASPER} != "no" Modified: stable/11/usr.bin/less/Makefile.common ============================================================================== --- stable/11/usr.bin/less/Makefile.common Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/less/Makefile.common Tue May 30 04:27:05 2017 (r319186) @@ -1,9 +1,9 @@ # $FreeBSD$ -LSDIR= ${.CURDIR}/../../contrib/less +LSDIR= ${SRCTOP}/contrib/less .PATH: ${LSDIR} -CFLAGS+=-I${.CURDIR}/../less -I${LSDIR} +CFLAGS+=-I${SRCTOP}/usr.bin/less -I${LSDIR} WARNS?= 1 .SUFFIXES: .nro .1 Modified: stable/11/usr.bin/lessecho/Makefile ============================================================================== --- stable/11/usr.bin/lessecho/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/lessecho/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -4,5 +4,5 @@ PROG= lessecho SRCS= lessecho.c version.c CLEANFILES= lessecho.1 -.include "${.CURDIR}/../less/Makefile.common" +.include "${SRCTOP}/usr.bin/less/Makefile.common" .include Modified: stable/11/usr.bin/lesskey/Makefile ============================================================================== --- stable/11/usr.bin/lesskey/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/lesskey/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -4,5 +4,5 @@ PROG= lesskey SRCS= lesskey.c version.c CLEANFILES= lesskey.1 -.include "${.CURDIR}/../less/Makefile.common" +.include "${SRCTOP}/usr.bin/less/Makefile.common" .include Modified: stable/11/usr.bin/lex/Makefile ============================================================================== --- stable/11/usr.bin/lex/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/lex/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -14,7 +14,7 @@ LINKS+= ${BINDIR}/lex ${BINDIR}/lex++ LINKS+= ${BINDIR}/lex ${BINDIR}/flex LINKS+= ${BINDIR}/lex ${BINDIR}/flex++ -FLEXDIR= ${.CURDIR}/../../contrib/flex +FLEXDIR= ${SRCTOP}/contrib/flex .PATH: ${FLEXDIR} Modified: stable/11/usr.bin/lex/lib/Makefile ============================================================================== --- stable/11/usr.bin/lex/lib/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/lex/lib/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../../contrib/flex +.PATH: ${SRCTOP}/contrib/flex LIB= ln SRCS= libmain.c libyywrap.c Modified: stable/11/usr.bin/locale/Makefile ============================================================================== --- stable/11/usr.bin/locale/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/locale/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ PROG= locale -CFLAGS+= -I${.CURDIR}/../../lib/libc/locale +CFLAGS+= -I${SRCTOP}/lib/libc/locale .include Modified: stable/11/usr.bin/localedef/Makefile ============================================================================== --- stable/11/usr.bin/localedef/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/localedef/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -20,7 +20,7 @@ parser.h: parser.y IGNORE_PRAGMA= yes CFLAGS+= -I. -I${.CURDIR} -CFLAGS+= -I${.CURDIR}/../../lib/libc/locale -CFLAGS+= -I${.CURDIR}/../../lib/libc/stdtime +CFLAGS+= -I${SRCTOP}/lib/libc/locale +CFLAGS+= -I${SRCTOP}/lib/libc/stdtime .include Modified: stable/11/usr.bin/lzmainfo/Makefile ============================================================================== --- stable/11/usr.bin/lzmainfo/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/lzmainfo/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -2,8 +2,8 @@ PROG= lzmainfo -XZDIR= ${.CURDIR}/../../contrib/xz/src -LZMALIBDIR= ${.CURDIR}/../../lib/liblzma +XZDIR= ${SRCTOP}/contrib/xz/src +LZMALIBDIR= ${SRCTOP}/lib/liblzma .PATH: ${XZDIR}/lzmainfo SRCS+= lzmainfo.c Modified: stable/11/usr.bin/m4/Makefile ============================================================================== --- stable/11/usr.bin/m4/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/m4/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -7,7 +7,7 @@ .include PROG= m4 -CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/../../lib/libopenbsd +CFLAGS+=-DEXTENDED -I${.CURDIR} -I${SRCTOP}/lib/libopenbsd LIBADD= y l m openbsd NO_WMISSING_VARIABLE_DECLARATIONS= Modified: stable/11/usr.bin/mandoc/Makefile ============================================================================== --- stable/11/usr.bin/mandoc/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/mandoc/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -2,7 +2,7 @@ .include -MDOCMLDIR= ${.CURDIR}/../../contrib/mdocml +MDOCMLDIR= ${SRCTOP}/contrib/mdocml .PATH: ${MDOCMLDIR} PROG= mandoc @@ -90,7 +90,7 @@ SRCS= ${LIB_SRCS} \ WARNS?= 3 CFLAGS+= -DHAVE_CONFIG_H \ -D_WITH_GETLINE \ - -I${.CURDIR}/../../lib/libopenbsd/ + -I${SRCTOP}/lib/libopenbsd/ LIBADD= openbsd z .include Modified: stable/11/usr.bin/minigzip/Makefile ============================================================================== --- stable/11/usr.bin/minigzip/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/minigzip/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -SRCDIR= ${.CURDIR}/../../contrib/zlib/test +SRCDIR= ${SRCTOP}/contrib/zlib/test .PATH: ${SRCDIR} PROG= minigzip Modified: stable/11/usr.bin/mkcsmapper/Makefile ============================================================================== --- stable/11/usr.bin/mkcsmapper/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/mkcsmapper/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,9 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../lib/libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv PROG= mkcsmapper -LDFLAGS+= -L${.CURDIR}/../../lib/libc +LDFLAGS+= -L${SRCTOP}/lib/libc NO_WMISSING_VARIABLE_DECLARATIONS= Modified: stable/11/usr.bin/mkcsmapper/Makefile.inc ============================================================================== --- stable/11/usr.bin/mkcsmapper/Makefile.inc Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/mkcsmapper/Makefile.inc Tue May 30 04:27:05 2017 (r319186) @@ -3,7 +3,7 @@ .include SRCS+= lex.l yacc.y -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkcsmapper \ - -I${.CURDIR}/../../lib/libc/iconv \ - -I${.CURDIR}/../../lib/libiconv_modules/mapper_std +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/usr.bin/mkcsmapper \ + -I${SRCTOP}/lib/libc/iconv \ + -I${SRCTOP}/lib/libiconv_modules/mapper_std CFLAGS.gcc+= --param max-inline-insns-single=64 Modified: stable/11/usr.bin/mkcsmapper_static/Makefile ============================================================================== --- stable/11/usr.bin/mkcsmapper_static/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/mkcsmapper_static/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../lib/libc/iconv ${.CURDIR}/../mkcsmapper +.PATH: ${SRCTOP}/lib/libc/iconv ${SRCTOP}/usr.bin/mkcsmapper PROG= mkcsmapper_static SRCS= citrus_bcs.c citrus_db_factory.c citrus_db_hash.c \ @@ -11,7 +11,7 @@ NO_WMISSING_VARIABLE_DECLARATIONS= build-tools: mkcsmapper_static -.include "${.CURDIR}/../mkcsmapper/Makefile.inc" +.include "${SRCTOP}/usr.bin/mkcsmapper/Makefile.inc" .include ${PROG}: ${BUILD_TOOLS_META} Modified: stable/11/usr.bin/mkesdb/Makefile ============================================================================== --- stable/11/usr.bin/mkesdb/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/mkesdb/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../lib/libc/iconv +.PATH: ${SRCTOP}/lib/libc/iconv PROG= mkesdb Modified: stable/11/usr.bin/mkesdb_static/Makefile ============================================================================== --- stable/11/usr.bin/mkesdb_static/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/mkesdb_static/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../lib/libc/iconv ${.CURDIR}/../mkesdb +.PATH: ${SRCTOP}/lib/libc/iconv ${SRCTOP}/usr.bin/mkesdb PROG= mkesdb_static SRCS= citrus_bcs.c citrus_db_factory.c citrus_db_hash.c \ @@ -11,7 +11,7 @@ NO_WMISSING_VARIABLE_DECLARATIONS= build-tools: mkesdb_static -.include "${.CURDIR}/../mkesdb/Makefile.inc" +.include "${SRCTOP}/usr.bin/mkesdb/Makefile.inc" .include ${PROG}: ${BUILD_TOOLS_META} Modified: stable/11/usr.bin/mklocale/Makefile ============================================================================== --- stable/11/usr.bin/mklocale/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/mklocale/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -3,7 +3,7 @@ PROG= mklocale SRCS= yacc.y lex.l y.tab.h -CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc/locale +CFLAGS+= -I. -I${.CURDIR} -I${SRCTOP}/lib/libc/locale NO_WMISSING_VARIABLE_DECLARATIONS= Modified: stable/11/usr.bin/nc/Makefile ============================================================================== --- stable/11/usr.bin/nc/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/nc/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../contrib/netcat +.PATH: ${SRCTOP}/contrib/netcat PROG= nc SRCS= netcat.c atomicio.c socks.c Modified: stable/11/usr.bin/opieinfo/Makefile ============================================================================== --- stable/11/usr.bin/opieinfo/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/opieinfo/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,10 +1,10 @@ # $FreeBSD$ # -OPIE_DIST?= ${.CURDIR}/../../contrib/opie +OPIE_DIST?= ${SRCTOP}/contrib/opie PROG= opieinfo -CFLAGS+=-I${.CURDIR}/../../lib/libopie +CFLAGS+=-I${SRCTOP}/lib/libopie CFLAGS+=-I${OPIE_DIST} CFLAGS+=-DINSECURE_OVERRIDE Modified: stable/11/usr.bin/opiekey/Makefile ============================================================================== --- stable/11/usr.bin/opiekey/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/opiekey/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,10 +1,10 @@ # $FreeBSD$ # -OPIE_DIST?= ${.CURDIR}/../../contrib/opie +OPIE_DIST?= ${SRCTOP}/contrib/opie PROG= opiekey -CFLAGS+=-I${.CURDIR}/../../lib/libopie +CFLAGS+=-I${SRCTOP}/lib/libopie CFLAGS+=-I${OPIE_DIST} CFLAGS+=-DINSECURE_OVERRIDE Modified: stable/11/usr.bin/opiepasswd/Makefile ============================================================================== --- stable/11/usr.bin/opiepasswd/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/opiepasswd/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,10 +1,10 @@ # $FreeBSD$ # -OPIE_DIST?= ${.CURDIR}/../../contrib/opie +OPIE_DIST?= ${SRCTOP}/contrib/opie PROG= opiepasswd -CFLAGS+=-I${.CURDIR}/../../lib/libopie +CFLAGS+=-I${SRCTOP}/lib/libopie CFLAGS+=-I${OPIE_DIST} CFLAGS+=-DINSECURE_OVERRIDE Modified: stable/11/usr.bin/pamtest/Makefile ============================================================================== --- stable/11/usr.bin/pamtest/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/pamtest/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -OPENPAM= ${.CURDIR}/../../contrib/openpam +OPENPAM= ${SRCTOP}/contrib/openpam .PATH: ${OPENPAM}/include ${OPENPAM}/bin/pamtest PROG= pamtest Modified: stable/11/usr.bin/readelf/Makefile ============================================================================== --- stable/11/usr.bin/readelf/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/readelf/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -14,7 +14,7 @@ CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common # This same hack is in lib/libelf/Makefile and lib/libdwarf/Makefile # We need to link against the correct version of these files. One -# solution is to include ../../sys in the include path. This causes +# solution is to include SRCTOP/sys in the include path. This causes # problems when a header file in sys depends on a file in another # part of the tree, e.g. a machine dependent header. # Modified: stable/11/usr.bin/rsh/Makefile ============================================================================== --- stable/11/usr.bin/rsh/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/rsh/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= rsh -CFLAGS+=-I${.CURDIR}/../../libexec/rlogind +CFLAGS+=-I${SRCTOP}/libexec/rlogind PACKAGE=rcmds Modified: stable/11/usr.bin/smbutil/Makefile ============================================================================== --- stable/11/usr.bin/smbutil/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/smbutil/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -5,7 +5,7 @@ SRCS= smbutil.c dumptree.c login.c lookup.c view.c pri LIBADD= smb -CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs +CONTRIBDIR= ${SRCTOP}/contrib/smbfs CFLAGS+= -I${CONTRIBDIR}/include WARNS?= 0 Modified: stable/11/usr.bin/svn/lib/Makefile.inc ============================================================================== --- stable/11/usr.bin/svn/lib/Makefile.inc Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/svn/lib/Makefile.inc Tue May 30 04:27:05 2017 (r319186) @@ -2,11 +2,11 @@ .if !defined(SVNDIR) -SVNDIR= ${.CURDIR}/../../../../contrib/subversion/subversion -APRU= ${.CURDIR}/../../../../contrib/apr-util -APR= ${.CURDIR}/../../../../contrib/apr -SQLITE= ${.CURDIR}/../../../../contrib/sqlite3 -SERF= ${.CURDIR}/../../../../contrib/serf +SVNDIR= ${SRCTOP}/contrib/subversion/subversion +APRU= ${SRCTOP}/contrib/apr-util +APR= ${SRCTOP}/contrib/apr +SQLITE= ${SRCTOP}/contrib/sqlite3 +SERF= ${SRCTOP}/contrib/serf WARNS?= 0 # definitely not ready Modified: stable/11/usr.bin/tar/Makefile ============================================================================== --- stable/11/usr.bin/tar/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/tar/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,7 +1,7 @@ # $FreeBSD$ .include -_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive PROG= bsdtar BSDTAR_VERSION_STRING= 3.3.1 @@ -27,7 +27,7 @@ CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST .endif CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" -CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../lib/libarchive/config_freebsd.h\" +CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" CFLAGS+= -I${_LIBARCHIVEDIR}/tar -I${_LIBARCHIVEDIR}/libarchive CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar Modified: stable/11/usr.bin/telnet/Makefile ============================================================================== --- stable/11/usr.bin/telnet/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/telnet/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -2,7 +2,7 @@ .include -TELNETDIR= ${.CURDIR}/../../contrib/telnet +TELNETDIR= ${SRCTOP}/contrib/telnet .PATH: ${TELNETDIR}/telnet PROG= telnet Modified: stable/11/usr.bin/tftp/Makefile ============================================================================== --- stable/11/usr.bin/tftp/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/tftp/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,12 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -.PATH: ${.CURDIR}/../../libexec/tftpd +.PATH: ${SRCTOP}/libexec/tftpd PROG= tftp SRCS= main.c tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c SRCS+= tftp-utils.c tftp.c -CFLAGS+=-I${.CURDIR}/../../libexec/tftpd +CFLAGS+=-I${SRCTOP}/libexec/tftpd LIBADD= edit Modified: stable/11/usr.bin/top/Makefile ============================================================================== --- stable/11/usr.bin/top/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/top/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -TOPDIR= ${.CURDIR}/../../contrib/top +TOPDIR= ${SRCTOP}/contrib/top .PATH: ${TOPDIR} PROG= top @@ -24,7 +24,7 @@ CFLAGS+= -D"Table_size=${TOP_TABLE_SIZE}" LIBADD= ncursesw m kvm jail CLEANFILES= sigdesc.h -SIGCONV_AWK= ${.CURDIR}/../../contrib/top/sigconv.awk +SIGCONV_AWK= ${SRCTOP}/contrib/top/sigconv.awk STAGED_INCLUDE_DIR?= ${DESTDIR}/usr/include SIGNAL_H= ${STAGED_INCLUDE_DIR}/sys/signal.h sigdesc.h: ${SIGCONV_AWK} ${SIGNAL_H} Modified: stable/11/usr.bin/truss/Makefile ============================================================================== --- stable/11/usr.bin/truss/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/truss/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -6,8 +6,8 @@ SRCS= main.c setup.c syscalls.c LIBADD= sysdecode -#CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys -CFLAGS+= -I${.CURDIR}/../../sys +#CFLAGS+= -I${.CURDIR} -I. -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/sys ABIS+= freebsd # Each ABI is expected to have an ABI.c, MACHINE_ARCH-ABI.c or Modified: stable/11/usr.bin/unvis/Makefile ============================================================================== --- stable/11/usr.bin/unvis/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/unvis/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -3,6 +3,6 @@ PROG= unvis -.PATH: ${.CURDIR}/../../contrib/unvis +.PATH: ${SRCTOP}/contrib/unvis .include Modified: stable/11/usr.bin/vacation/Makefile ============================================================================== --- stable/11/usr.bin/vacation/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/vacation/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,6 +1,6 @@ # $FreeBSD$ -SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/vacation PROG= vacation Modified: stable/11/usr.bin/vi/Makefile ============================================================================== --- stable/11/usr.bin/vi/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/vi/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -5,7 +5,7 @@ .include PACKAGE= vi -SRCDIR= ${.CURDIR}/../../contrib/nvi +SRCDIR= ${SRCTOP}/contrib/nvi SUBDIR+= catalog WARNS?= 0 # some warn issues on 32 bit machines Modified: stable/11/usr.bin/vis/Makefile ============================================================================== --- stable/11/usr.bin/vis/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/vis/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -4,7 +4,7 @@ PROG= vis SRCS= vis.c foldit.c -.PATH: ${.CURDIR}/../../contrib/vis -CFLAGS+= -I${.CURDIR}/../../contrib/vis +.PATH: ${SRCTOP}/contrib/vis +CFLAGS+= -I${SRCTOP}/contrib/vis .include Modified: stable/11/usr.bin/w/Makefile ============================================================================== --- stable/11/usr.bin/w/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/w/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -7,6 +7,6 @@ MAN= w.1 uptime.1 LIBADD= kvm sbuf xo util LINKS= ${BINDIR}/w ${BINDIR}/uptime -.PATH: ${.CURDIR}/../../bin/ps +.PATH: ${SRCTOP}/bin/ps .include Modified: stable/11/usr.bin/xinstall/Makefile ============================================================================== --- stable/11/usr.bin/xinstall/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/xinstall/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -8,9 +8,9 @@ PROGNAME= install SRCS= xinstall.c getid.c MAN= install.1 -.PATH: ${.CURDIR}/../../contrib/mtree -CFLAGS+= -I${.CURDIR}/../../contrib/mtree -CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd +.PATH: ${SRCTOP}/contrib/mtree +CFLAGS+= -I${SRCTOP}/contrib/mtree +CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= md Modified: stable/11/usr.bin/xz/Makefile ============================================================================== --- stable/11/usr.bin/xz/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/xz/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -10,8 +10,8 @@ LINKS+= ${BINDIR}/xz ${BINDIR}/lzcat MLINKS= xz.1 unxz.1 xz.1 lzma.1 xz.1 unlzma.1 xz.1 xzcat.1 xz.1 lzcat.1 -XZDIR= ${.CURDIR}/../../contrib/xz/src -LZMALIBDIR= ${.CURDIR}/../../lib/liblzma +XZDIR= ${SRCTOP}/contrib/xz/src +LZMALIBDIR= ${SRCTOP}/lib/liblzma .PATH: ${XZDIR}/xz Modified: stable/11/usr.bin/xzdec/Makefile ============================================================================== --- stable/11/usr.bin/xzdec/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/xzdec/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -6,8 +6,8 @@ LINKS= ${BINDIR}/xzdec ${BINDIR}/lzdec MLINKS= xzdec.1 lzmadec.1 -XZDIR= ${.CURDIR}/../../contrib/xz/src -LZMALIBDIR= ${.CURDIR}/../../lib/liblzma +XZDIR= ${SRCTOP}/contrib/xz/src +LZMALIBDIR= ${SRCTOP}/lib/liblzma .PATH: ${XZDIR}/xzdec Modified: stable/11/usr.bin/yacc/Makefile ============================================================================== --- stable/11/usr.bin/yacc/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/yacc/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -3,7 +3,7 @@ .include -BYACC_SRC= ${.CURDIR}/../../contrib/byacc +BYACC_SRC= ${SRCTOP}/contrib/byacc .PATH: ${BYACC_SRC} PROG= yacc Modified: stable/11/usr.bin/ypwhich/Makefile ============================================================================== --- stable/11/usr.bin/ypwhich/Makefile Tue May 30 04:17:22 2017 (r319185) +++ stable/11/usr.bin/ypwhich/Makefile Tue May 30 04:27:05 2017 (r319186) @@ -1,7 +1,7 @@ # from: @(#)Makefile 5.8 (Berkeley) 7/28/90 # $FreeBSD$ -YPSERV=${.CURDIR}/../../usr.sbin/ypserv/common +YPSERV=${SRCTOP}/usr.sbin/ypserv/common .PATH: ${YPSERV} PROG= ypwhich From owner-svn-src-all@freebsd.org Tue May 30 04:31:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55E5CAFBC15; Tue, 30 May 2017 04:31:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D0C277466; Tue, 30 May 2017 04:31:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U4VZ0T087938; Tue, 30 May 2017 04:31:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U4VZ8m087937; Tue, 30 May 2017 04:31:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300431.v4U4VZ8m087937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:31:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319187 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:31:36 -0000 Author: ngie Date: Tue May 30 04:31:35 2017 New Revision: 319187 URL: https://svnweb.freebsd.org/changeset/base/319187 Log: MFC r307741: r307741 (by emaste): Allow all subdirectories to be optional via SUBDIR.${MK_*} Tested by: br Pointy hat to: emaste Modified: stable/11/share/mk/bsd.subdir.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.subdir.mk ============================================================================== --- stable/11/share/mk/bsd.subdir.mk Tue May 30 04:27:05 2017 (r319186) +++ stable/11/share/mk/bsd.subdir.mk Tue May 30 04:31:35 2017 (r319187) @@ -113,7 +113,7 @@ install: beforeinstall realinstall afterinstall # SUBDIR recursing may be disabled for MK_DIRDEPS_BUILD .if !target(_SUBDIR) -.if defined(SUBDIR) +.if defined(SUBDIR) || defined(SUBDIR.yes) SUBDIR:=${SUBDIR} ${SUBDIR.yes} SUBDIR:=${SUBDIR:u} .endif From owner-svn-src-all@freebsd.org Tue May 30 04:36:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37082AFBDAC; Tue, 30 May 2017 04:36:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04F0F77825; Tue, 30 May 2017 04:36:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U4aCcq091026; Tue, 30 May 2017 04:36:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U4aCZm091025; Tue, 30 May 2017 04:36:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300436.v4U4aCZm091025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:36:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319188 - stable/11/sys/modules/ipsec X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:36:13 -0000 Author: ngie Date: Tue May 30 04:36:11 2017 New Revision: 319188 URL: https://svnweb.freebsd.org/changeset/base/319188 Log: MFC r318439: Normalize .PATH on SRCTOP This will help Jenkins dedupe 9 warnings between the static build and the module build of ipsec(4). Missed in SRCTOP conversion in r314651. MFC with: r314651 Modified: stable/11/sys/modules/ipsec/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/ipsec/Makefile ============================================================================== --- stable/11/sys/modules/ipsec/Makefile Tue May 30 04:31:35 2017 (r319187) +++ stable/11/sys/modules/ipsec/Makefile Tue May 30 04:36:11 2017 (r319188) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/net ${.CURDIR}/../../netipsec +.PATH: ${SRCTOP}/sys/net ${SRCTOP}/sys/netipsec KMOD= ipsec SRCS= if_ipsec.c ipsec.c ipsec_input.c ipsec_mbuf.c ipsec_mod.c \ From owner-svn-src-all@freebsd.org Tue May 30 04:42:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCD9CAFC1D9; Tue, 30 May 2017 04:42:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8F5977CC7; Tue, 30 May 2017 04:42:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U4gavX095391; Tue, 30 May 2017 04:42:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U4gaik095385; Tue, 30 May 2017 04:42:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300442.v4U4gaik095385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319189 - in stable/11/secure: . lib lib/libcrypto lib/libcrypto/engines lib/libssh X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:42:38 -0000 Author: ngie Date: Tue May 30 04:42:36 2017 New Revision: 319189 URL: https://svnweb.freebsd.org/changeset/base/319189 Log: MFC r314658: crypto: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output Modified: stable/11/secure/Makefile stable/11/secure/Makefile.inc stable/11/secure/lib/Makefile.inc stable/11/secure/lib/libcrypto/Makefile.inc stable/11/secure/lib/libcrypto/engines/Makefile.inc stable/11/secure/lib/libssh/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/secure/Makefile ============================================================================== --- stable/11/secure/Makefile Tue May 30 04:36:11 2017 (r319188) +++ stable/11/secure/Makefile Tue May 30 04:42:36 2017 (r319189) @@ -21,7 +21,7 @@ SPROGS+=usr.sbin/sendmail # This target is used to rebuild these programs with crypto. secure: .MAKE .PHONY .for entry in ${SPROGS} - cd ${.CURDIR}/../${entry}; \ + cd ${.CURDIR:H}/${entry}; \ ${MAKE} cleandir; \ ${MAKE} obj; \ ${MAKE} all; \ @@ -31,7 +31,7 @@ secure: .MAKE .PHONY # This target is used to rebuild these programs without crypto. insecure: .MAKE .PHONY .for entry in ${SPROGS} - cd ${.CURDIR}/../${entry}; \ + cd ${.CURDIR:H}/${entry}; \ ${MAKE} MK_CRYPT=no cleandir; \ ${MAKE} MK_CRYPT=no obj; \ ${MAKE} MK_CRYPT=no all; \ Modified: stable/11/secure/Makefile.inc ============================================================================== --- stable/11/secure/Makefile.inc Tue May 30 04:36:11 2017 (r319188) +++ stable/11/secure/Makefile.inc Tue May 30 04:42:36 2017 (r319189) @@ -2,14 +2,14 @@ .include -.if exists(${.CURDIR}/../../lib/libcrypt/obj) -CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt/obj +.if exists(${.CURDIR:H:H}/lib/libcrypt/obj) +CRYPTOBJDIR= ${.CURDIR:H:H}/lib/libcrypt/obj .else -CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt +CRYPTOBJDIR= ${.CURDIR:H:H}/lib/libcrypt .endif .if ${MK_OPENSSH} != "no" -SSHDIR= ${.CURDIR}/../../../crypto/openssh +SSHDIR= ${SRCTOP}/crypto/openssh .endif WARNS?= 0 Modified: stable/11/secure/lib/Makefile.inc ============================================================================== --- stable/11/secure/lib/Makefile.inc Tue May 30 04:36:11 2017 (r319188) +++ stable/11/secure/lib/Makefile.inc Tue May 30 04:42:36 2017 (r319189) @@ -1,6 +1,6 @@ # $FreeBSD$ .include "../Makefile.inc" -.if exists(${.CURDIR}/../../../lib/Makefile.inc) -.include "${.CURDIR}/../../../lib/Makefile.inc" +.if exists(${.CURDIR:H:H:H}/lib/Makefile.inc) +.include "${.CURDIR:H:H:H}/lib/Makefile.inc" .endif Modified: stable/11/secure/lib/libcrypto/Makefile.inc ============================================================================== --- stable/11/secure/lib/libcrypto/Makefile.inc Tue May 30 04:36:11 2017 (r319188) +++ stable/11/secure/lib/libcrypto/Makefile.inc Tue May 30 04:42:36 2017 (r319189) @@ -6,7 +6,7 @@ OPENSSL_VER= 1.0.2k OPENSSL_DATE= 2017-01-26 -LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl +LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc CFLAGS+= -I${LCRYPTO_SRC} Modified: stable/11/secure/lib/libcrypto/engines/Makefile.inc ============================================================================== --- stable/11/secure/lib/libcrypto/engines/Makefile.inc Tue May 30 04:36:11 2017 (r319188) +++ stable/11/secure/lib/libcrypto/engines/Makefile.inc Tue May 30 04:42:36 2017 (r319189) @@ -1,6 +1,6 @@ # $FreeBSD$ -LCRYPTO_SRC= ${.CURDIR}/../../../../../crypto/openssl +LCRYPTO_SRC= ${SRCTOP}/crypto/openssl .PATH: ${LCRYPTO_SRC}/engines ${LCRYPTO_SRC}/engines/ccgost SHLIBDIR?= /usr/lib/engines Modified: stable/11/secure/lib/libssh/Makefile ============================================================================== --- stable/11/secure/lib/libssh/Makefile Tue May 30 04:36:11 2017 (r319188) +++ stable/11/secure/lib/libssh/Makefile Tue May 30 04:42:36 2017 (r319189) @@ -37,7 +37,7 @@ SRCS+= bcrypt_pbkdf.c blowfish.c bsd-misc.c explicit_b .if ${MK_LDNS} == "no" SRCS+= getrrsetbyname.c .else -LDNSDIR= ${.CURDIR}/../../../contrib/ldns +LDNSDIR= ${SRCTOP}/contrib/ldns CFLAGS+= -DHAVE_LDNS=1 -I${LDNSDIR} SRCS+= getrrsetbyname-ldns.c LIBADD+= ldns From owner-svn-src-all@freebsd.org Tue May 30 04:45:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DB23AFC2E0; Tue, 30 May 2017 04:45:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C4B277E57; Tue, 30 May 2017 04:45:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U4jCw8095823; Tue, 30 May 2017 04:45:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U4jBuA095815; Tue, 30 May 2017 04:45:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300445.v4U4jBuA095815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 04:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319190 - in stable/11/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_passphrase wpa_priv wpa_supplicant X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 04:45:13 -0000 Author: ngie Date: Tue May 30 04:45:11 2017 New Revision: 319190 URL: https://svnweb.freebsd.org/changeset/base/319190 Log: MFC r314541: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. Modified: stable/11/usr.sbin/wpa/Makefile.inc stable/11/usr.sbin/wpa/hostapd/Makefile stable/11/usr.sbin/wpa/hostapd_cli/Makefile stable/11/usr.sbin/wpa/wpa_cli/Makefile stable/11/usr.sbin/wpa/wpa_passphrase/Makefile stable/11/usr.sbin/wpa/wpa_priv/Makefile stable/11/usr.sbin/wpa/wpa_supplicant/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/wpa/Makefile.inc ============================================================================== --- stable/11/usr.sbin/wpa/Makefile.inc Tue May 30 04:42:36 2017 (r319189) +++ stable/11/usr.sbin/wpa/Makefile.inc Tue May 30 04:45:11 2017 (r319190) @@ -2,11 +2,11 @@ BINDIR?= /usr/sbin -WPA_DISTDIR?= ${.CURDIR}/../../../contrib/wpa/ +WPA_DISTDIR?= ${SRCTOP}/contrib/wpa/ WPA_SUPPLICANT_DISTDIR?=${WPA_DISTDIR}/wpa_supplicant HOSTAPD_DISTDIR?= ${WPA_DISTDIR}/hostapd -.PATH.c:${.CURDIR}/.. \ +.PATH.c:${.CURDIR:H} \ ${WPA_DISTDIR}/src/ap \ ${WPA_DISTDIR}/src/common \ ${WPA_DISTDIR}/src/crypto \ Modified: stable/11/usr.sbin/wpa/hostapd/Makefile ============================================================================== --- stable/11/usr.sbin/wpa/hostapd/Makefile Tue May 30 04:42:36 2017 (r319189) +++ stable/11/usr.sbin/wpa/hostapd/Makefile Tue May 30 04:45:11 2017 (r319190) @@ -1,7 +1,7 @@ # $FreeBSD$ .include -.include "${.CURDIR}/../Makefile.inc" +.include "../Makefile.inc" .PATH.c:${HOSTAPD_DISTDIR} \ ${WPA_DISTDIR}/src/drivers @@ -117,6 +117,6 @@ SRCS+= eap_server_sake.c \ eap_sake_common.c .endif -.include "${.CURDIR}/../Makefile.crypto" +.include "../Makefile.crypto" .include Modified: stable/11/usr.sbin/wpa/hostapd_cli/Makefile ============================================================================== --- stable/11/usr.sbin/wpa/hostapd_cli/Makefile Tue May 30 04:42:36 2017 (r319189) +++ stable/11/usr.sbin/wpa/hostapd_cli/Makefile Tue May 30 04:45:11 2017 (r319190) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../Makefile.inc" +.include "../Makefile.inc" .PATH.c:${HOSTAPD_DISTDIR} Modified: stable/11/usr.sbin/wpa/wpa_cli/Makefile ============================================================================== --- stable/11/usr.sbin/wpa/wpa_cli/Makefile Tue May 30 04:42:36 2017 (r319189) +++ stable/11/usr.sbin/wpa/wpa_cli/Makefile Tue May 30 04:45:11 2017 (r319190) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../Makefile.inc" +.include "../Makefile.inc" .PATH.c:${WPA_SUPPLICANT_DISTDIR} Modified: stable/11/usr.sbin/wpa/wpa_passphrase/Makefile ============================================================================== --- stable/11/usr.sbin/wpa/wpa_passphrase/Makefile Tue May 30 04:42:36 2017 (r319189) +++ stable/11/usr.sbin/wpa/wpa_passphrase/Makefile Tue May 30 04:45:11 2017 (r319190) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../Makefile.inc" +.include "../Makefile.inc" .PATH.c:${WPA_SUPPLICANT_DISTDIR} Modified: stable/11/usr.sbin/wpa/wpa_priv/Makefile ============================================================================== --- stable/11/usr.sbin/wpa/wpa_priv/Makefile Tue May 30 04:42:36 2017 (r319189) +++ stable/11/usr.sbin/wpa/wpa_priv/Makefile Tue May 30 04:45:11 2017 (r319190) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${.CURDIR}/../Makefile.inc" +.include "../Makefile.inc" .PATH.c:${WPA_SUPPLICANT_DISTDIR} \ ${WPA_DISTDIR}/src/drivers @@ -11,6 +11,6 @@ SRCS= drivers.c os_unix.c eloop.c common.c wpa_debug.c LIBADD= pcap -.include "${.CURDIR}/../Makefile.crypto" +.include "../Makefile.crypto" .include Modified: stable/11/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- stable/11/usr.sbin/wpa/wpa_supplicant/Makefile Tue May 30 04:42:36 2017 (r319189) +++ stable/11/usr.sbin/wpa/wpa_supplicant/Makefile Tue May 30 04:45:11 2017 (r319190) @@ -2,7 +2,7 @@ .include -.include "${.CURDIR}/../Makefile.inc" +.include "../Makefile.inc" .PATH.c:${WPA_SUPPLICANT_DISTDIR} \ ${WPA_DISTDIR}/src/drivers @@ -142,6 +142,6 @@ SRCS+= eap_sake.c \ eap_sake_common.c .endif -.include "${.CURDIR}/../Makefile.crypto" +.include "../Makefile.crypto" .include From owner-svn-src-all@freebsd.org Tue May 30 05:15:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21A33AFCC3A; Tue, 30 May 2017 05:15:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEE32789EC; Tue, 30 May 2017 05:15:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U5FEHL011095; Tue, 30 May 2017 05:15:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U5FAiA011047; Tue, 30 May 2017 05:15:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300515.v4U5FAiA011047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 05:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319191 - in stable/11/usr.sbin: fstyp ntp/doc ntp/doc/drivers ntp/doc/drivers/icons ntp/doc/drivers/scripts ntp/doc/hints ntp/doc/icons ntp/doc/pic ntp/doc/scripts ntp/libntp ntp/libnt... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 05:15:15 -0000 Author: ngie Date: Tue May 30 05:15:09 2017 New Revision: 319191 URL: https://svnweb.freebsd.org/changeset/base/319191 Log: MFC r314451,r314452,r314453,r314456,r314457,r314458,r314459,r314460,r314461,r314462,r314464,r314466,r314468,r314470,r314472,r314478: r314451: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones The SRCTOP conversion simplifies pathing in make/displayed output. Also, while here, change a hardcoded path to ar5523.bin.uu in the make target with ${.ALLSRC} . r314452: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones r314453: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones r314456: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. r314457: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones The SRCTOP conversion simplifies pathing in make/displayed output. Also, while here, change a hardcoded path to ${RPCDIR}/ypupdate_prot.x in the make targets with ${.ALLSRC} . r314458: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. r314459: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. r314460: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. r314461: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. r314462: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones The SRCTOP conversion simplifies pathing in make/displayed output. Also, while here, change a hardcoded path to ${RPCDIR}/ypxfrd.x in the make targets with ${.ALLSRC} . r314464: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. r314466: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. r314468: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones Also, use :H where possible/sensical to manipulate .CURDIR-relative paths This simplifies pathing in make/displayed output. r314470: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. r314472: Simplify/improve idioms in usr.sbin/ntp Makefiles - Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones. This simplifies pathing in make/displayed output. - Also, use :H where possible/sensical to manipulate .CURDIR-relative paths - Remove superfluous bsd.own.mk .includes which are already handled via src.opts.mk .includes r314478: Simplify idioms in Makefiles further - Use SRCTOP-relative paths instead of .CURDIR-relative ones where possible - Use :H to manipulate .CURDIR in areas instead of ..-relative paths. Modified: stable/11/usr.sbin/fstyp/Makefile stable/11/usr.sbin/ntp/doc/Makefile stable/11/usr.sbin/ntp/doc/drivers/Makefile stable/11/usr.sbin/ntp/doc/drivers/icons/Makefile stable/11/usr.sbin/ntp/doc/drivers/scripts/Makefile stable/11/usr.sbin/ntp/doc/hints/Makefile stable/11/usr.sbin/ntp/doc/icons/Makefile stable/11/usr.sbin/ntp/doc/pic/Makefile stable/11/usr.sbin/ntp/doc/scripts/Makefile stable/11/usr.sbin/ntp/libntp/Makefile stable/11/usr.sbin/ntp/libntpevent/Makefile stable/11/usr.sbin/ntp/libopts/Makefile stable/11/usr.sbin/ntp/libparse/Makefile stable/11/usr.sbin/ntp/ntp-keygen/Makefile stable/11/usr.sbin/ntp/ntpd/Makefile stable/11/usr.sbin/ntp/ntpdate/Makefile stable/11/usr.sbin/ntp/ntpdc/Makefile stable/11/usr.sbin/ntp/ntpq/Makefile stable/11/usr.sbin/ntp/ntptime/Makefile stable/11/usr.sbin/ntp/sntp/Makefile stable/11/usr.sbin/rpc.yppasswdd/Makefile stable/11/usr.sbin/rpc.ypupdated/Makefile stable/11/usr.sbin/rpc.ypxfrd/Makefile stable/11/usr.sbin/tcpdchk/Makefile stable/11/usr.sbin/tcpdmatch/Makefile stable/11/usr.sbin/traceroute/Makefile stable/11/usr.sbin/traceroute6/Makefile stable/11/usr.sbin/uathload/Makefile stable/11/usr.sbin/unbound/anchor/Makefile stable/11/usr.sbin/unbound/checkconf/Makefile stable/11/usr.sbin/unbound/control/Makefile stable/11/usr.sbin/unbound/daemon/Makefile stable/11/usr.sbin/yp_mkdb/Makefile stable/11/usr.sbin/ypldap/Makefile stable/11/usr.sbin/yppush/Makefile stable/11/usr.sbin/ypserv/Makefile stable/11/usr.sbin/zic/Makefile.inc stable/11/usr.sbin/zic/zdump/Makefile stable/11/usr.sbin/zic/zic/Makefile stable/11/usr.sbin/zonectl/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/fstyp/Makefile ============================================================================== --- stable/11/usr.sbin/fstyp/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/fstyp/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -24,15 +24,15 @@ CFLAGS+=-I${SRCTOP}/sys IGNORE_PRAGMA= YES CFLAGS+= -DNEED_SOLARIS_BOOLEAN -DHAVE_ZFS -CFLAGS+= -I${.CURDIR}/../../sys/cddl/compat/opensolaris -CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/include -CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/sys -CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/head +CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head .endif LIBADD= geom md Modified: stable/11/usr.sbin/ntp/doc/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/doc/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/doc/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -25,10 +25,9 @@ FILES= access.html accopt.html assoc.html audio.html a MAN= ntp.conf.5 ntp.keys.5 MAN+= ntp-keygen.8 ntpd.8 ntpdate.8 ntpdc.8 ntpq.8 ntptime.8 sntp.8 -.PATH: ${.CURDIR}/../../../contrib/ntp/html \ - ${.CURDIR}/../../../contrib/ntp/util \ - ${.CURDIR}/../../../contrib/ntp/util \ - ${.CURDIR}/../../../contrib/ntp/ntpd \ - ${.CURDIR}/../../../contrib/ntp/ntpsnmpd +.PATH: ${SRCTOP}/contrib/ntp/html \ + ${SRCTOP}/contrib/ntp/util \ + ${SRCTOP}/contrib/ntp/ntpd \ + ${SRCTOP}/contrib/ntp/ntpsnmpd .include Modified: stable/11/usr.sbin/ntp/doc/drivers/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/doc/drivers/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/doc/drivers/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -16,6 +16,6 @@ FILES= driver1.html driver10.html driver11.html driver driver9.html mx4200data.html oncore-shmem.html tf582_4.html .endif -.PATH: ${.CURDIR}/../../../../contrib/ntp/html/drivers +.PATH: ${SRCTOP}/contrib/ntp/html/drivers .include Modified: stable/11/usr.sbin/ntp/doc/drivers/icons/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/doc/drivers/icons/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/doc/drivers/icons/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -8,6 +8,6 @@ FILESDIR= ${SHAREDIR}/doc/ntp/drivers/icons FILES= home.gif mail2.gif .endif -.PATH: ${.CURDIR}/../../../../../contrib/ntp/html/drivers/icons +.PATH: ${SRCTOP}/contrib/ntp/html/drivers/icons .include Modified: stable/11/usr.sbin/ntp/doc/drivers/scripts/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/doc/drivers/scripts/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/doc/drivers/scripts/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -8,6 +8,6 @@ FILESDIR= ${SHAREDIR}/doc/ntp/drivers/scripts FILES= footer.txt style.css .endif -.PATH: ${.CURDIR}/../../../../../contrib/ntp/html/drivers/scripts +.PATH: ${SRCTOP}/contrib/ntp/html/drivers/scripts .include Modified: stable/11/usr.sbin/ntp/doc/hints/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/doc/hints/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/doc/hints/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -12,6 +12,6 @@ FILES= a-ux aix bsdi changes decosf1 decosf2 freebsd h sun4 svr4-dell svr4_package todo vxworks.html winnt.html .endif -.PATH: ${.CURDIR}/../../../../contrib/ntp/html/hints +.PATH: ${SRCTOP}/contrib/ntp/html/hints .include Modified: stable/11/usr.sbin/ntp/doc/icons/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/doc/icons/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/doc/icons/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -8,6 +8,6 @@ FILESDIR= ${SHAREDIR}/doc/ntp/icons FILES= home.gif mail2.gif sitemap.png .endif -.PATH: ${.CURDIR}/../../../../contrib/ntp/html/icons +.PATH: ${SRCTOP}/contrib/ntp/html/icons .include Modified: stable/11/usr.sbin/ntp/doc/pic/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/doc/pic/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/doc/pic/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -22,6 +22,6 @@ FILES= 9400n.jpg alice11.gif alice13.gif alice15.gif a wingdorothy.gif .endif -.PATH: ${.CURDIR}/../../../../contrib/ntp/html/pic +.PATH: ${SRCTOP}/contrib/ntp/html/pic .include Modified: stable/11/usr.sbin/ntp/doc/scripts/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/doc/scripts/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/doc/scripts/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -10,6 +10,6 @@ FILES= accopt.txt audio.txt authopt.txt clockopt.txt c misc.txt miscopt.txt monopt.txt refclock.txt special.txt style.css .endif -.PATH: ${.CURDIR}/../../../../contrib/ntp/html/scripts +.PATH: ${SRCTOP}/contrib/ntp/html/scripts .include Modified: stable/11/usr.sbin/ntp/libntp/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/libntp/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/libntp/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,10 +1,10 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/ntp/libntp \ - ${.CURDIR}/../../../contrib/ntp/lib/isc \ - ${.CURDIR}/../../../contrib/ntp/lib/isc/nls \ - ${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads \ - ${.CURDIR}/../../../contrib/ntp/lib/isc/unix \ +.PATH: ${SRCTOP}/contrib/ntp/libntp \ + ${SRCTOP}/contrib/ntp/lib/isc \ + ${SRCTOP}/contrib/ntp/lib/isc/nls \ + ${SRCTOP}/contrib/ntp/lib/isc/pthreads \ + ${SRCTOP}/contrib/ntp/lib/isc/unix \ LIB= ntp INTERNALLIB= @@ -73,14 +73,14 @@ ISC_SRCS= assertions.c \ SRCS= ${NTP_SRCS} ${ISC_SRCS} version.c -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \ - -I${.CURDIR}/../../../contrib/ntp/sntp/libopts \ - -I${.CURDIR}/../../../lib/libc/${MACHINE_ARCH} \ - -I${.CURDIR}/../../../lib/libedit/edit \ - -I${.CURDIR}/../ \ +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${SRCTOP}/lib/libc/${MACHINE_ARCH} \ + -I${SRCTOP}/lib/libedit/edit \ + -I${.CURDIR:H} \ -I${.CURDIR}/ CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H @@ -88,6 +88,6 @@ CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H CLEANFILES+= .version version.c version.c: - sh -e ${.CURDIR}/../scripts/mkver ntpd + sh -e ${.CURDIR:H}/scripts/mkver ntpd .include Modified: stable/11/usr.sbin/ntp/libntpevent/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/libntpevent/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/libntpevent/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/ntp/sntp/libevent +.PATH: ${SRCTOP}/contrib/ntp/sntp/libevent LIB= ntpevent INTERNALLIB= @@ -25,8 +25,8 @@ NTP_ATOMIC=sparc64 NTP_ATOMIC=noatomic .endif -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/sntp/libevent/include \ +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/sntp/libevent/include \ -I${.CURDIR}/ CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H Modified: stable/11/usr.sbin/ntp/libopts/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/libopts/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/libopts/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,14 +1,14 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/ntp/sntp/libopts +.PATH: ${SRCTOP}/contrib/ntp/sntp/libopts LIB= opts INTERNALLIB= SRCS= libopts.c -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/sntp/libopts \ - -I${.CURDIR}/../ +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR:H} .include Modified: stable/11/usr.sbin/ntp/libparse/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/libparse/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/libparse/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/ntp/libparse +.PATH: ${SRCTOP}/contrib/ntp/libparse LIB= parse INTERNALLIB= @@ -12,8 +12,8 @@ SRCS= binio.c clk_computime.c clk_dcf7000.c clk_hopf60 info_trimble.c mfp_mul.c parse.c parse_conf.c \ trim_info.c -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/include -I${.CURDIR}/../ +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/include -I${.CURDIR:H} .include Modified: stable/11/usr.sbin/ntp/ntp-keygen/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/ntp-keygen/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/ntp-keygen/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -4,21 +4,21 @@ MAN= .include -.PATH: ${.CURDIR}/../../../contrib/ntp/util \ - ${.CURDIR}/../../../contrib/ntp/ntpd +.PATH: ${SRCTOP}/contrib/ntp/util \ + ${SRCTOP}/contrib/ntp/ntpd PROG= ntp-keygen SRCS= ntp-keygen.c ntp-keygen-opts.c -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/${NTP_ATOMIC}/include \ - -I${.CURDIR}/../../../contrib/ntp/sntp/libopts \ - -I${.CURDIR}/../../../lib/libc/${MACHINE_ARCH} \ - -I${.CURDIR}/../ +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/${NTP_ATOMIC}/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR}/lib/libc/${MACHINE_ARCH} \ + -I${.CURDIR:H} LIBADD+= ntp opts pthread Modified: stable/11/usr.sbin/ntp/ntpd/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/ntpd/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/ntpd/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -4,7 +4,7 @@ MAN= .include -.PATH: ${.CURDIR}/../../../contrib/ntp/ntpd \ +.PATH: ${SRCTOP}/contrib/ntp/ntpd \ ${.OBJDIR} PROG= ntpd @@ -27,13 +27,13 @@ SRCS= cmd_args.c ntp_config.c ntp_control.c ntp_crypto refclock_tt560.c refclock_ulink.c refclock_wwv.c refclock_wwvb.c \ refclock_zyfer.c version.c -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/ntpd \ - -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \ - -I${.CURDIR}/../../../contrib/ntp/sntp/libopts \ - -I${.CURDIR}/../ \ +CFLAGS+= -I${SRCTOP}/contrib/ntp/ntpd \ + -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR:H} \ -I${.CURDIR} LIBADD= parse ntp m opts pthread @@ -46,7 +46,7 @@ LIBADD+= md CLEANFILES+= .version version.c -version.c: - sh -e ${.CURDIR}/../scripts/mkver ntpd +version.c: + sh -e ${.CURDIR:H}/scripts/mkver ntpd .include Modified: stable/11/usr.sbin/ntp/ntpdate/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/ntpdate/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/ntpdate/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -2,17 +2,17 @@ .include -.PATH: ${.CURDIR}/../../../contrib/ntp/ntpdate +.PATH: ${SRCTOP}/contrib/ntp/ntpdate PROG= ntpdate MAN= SRCS= ntpdate.c version.c -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/include/ \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include/ \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \ - -I${.CURDIR}/../ +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/include/ \ + -I${SRCTOP}/contrib/ntp/lib/isc/unix/include/ \ + -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ + -I${.CURDIR:H} LIBADD= ntp m pthread @@ -24,7 +24,7 @@ LIBADD+= md CLEANFILES+= .version version.c -version.c: - sh -e ${.CURDIR}/../scripts/mkver ntpdate +version.c: + sh -e ${.CURDIR:H}/scripts/mkver ntpdate .include Modified: stable/11/usr.sbin/ntp/ntpdc/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/ntpdc/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/ntpdc/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -3,20 +3,19 @@ MAN= .include -.include -.PATH: ${.CURDIR}/../../../contrib/ntp/ntpdc +.PATH: ${SRCTOP}/contrib/ntp/ntpdc PROG= ntpdc SRCS= ntpdc.c ntpdc_ops.c ntpdc-opts.c version.c -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \ - -I${.CURDIR}/../../../contrib/ntp/sntp/libopts \ - -I${.CURDIR}/../../../lib/libc/${MACHINE_ARCH} \ - -I${.CURDIR}/../ -I${.CURDIR} +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR}/lib/libc/${MACHINE_ARCH} \ + -I${.CURDIR:H} -I${.CURDIR} LIBADD= edit ntp m opts pthread CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ @@ -31,6 +30,6 @@ LIBADD+= md CLEANFILES+= .version version.c version.c: - sh -e ${.CURDIR}/../scripts/mkver ntpdc + sh -e ${.CURDIR:H}/scripts/mkver ntpdc .include Modified: stable/11/usr.sbin/ntp/ntpq/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/ntpq/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/ntpq/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -3,23 +3,22 @@ MAN= .include -.include -.PATH: ${.CURDIR}/../../../contrib/ntp/ntpq +.PATH: ${SRCTOP}/contrib/ntp/ntpq BINDIR= /usr/bin PROG= ntpq SRCS= ntpq.c ntpq-opts.c ntpq-subs.c version.c -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/${NTP_ATOMIC}/include \ - -I${.CURDIR}/../../../contrib/ntp/sntp/libopts \ - -I${.CURDIR}/../ +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/${NTP_ATOMIC}/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR:H} LIBADD+= edit ntp opts m pthread @@ -35,6 +34,6 @@ CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ CLEANFILES+= .version version.c version.c: - sh -e ${.CURDIR}/../scripts/mkver ntpq + sh -e ${.CURDIR:H}/scripts/mkver ntpq .include Modified: stable/11/usr.sbin/ntp/ntptime/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/ntptime/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/ntptime/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,15 +1,15 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/ntp/util +.PATH: ${SRCTOP}/contrib/ntp/util PROG= ntptime MAN= -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/include/ \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include/ \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \ - -I${.CURDIR}/../ +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/include/ \ + -I${SRCTOP}/contrib/ntp/lib/isc/unix/include/ \ + -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ + -I${.CURDIR:H} LIBADD= ntp pthread Modified: stable/11/usr.sbin/ntp/sntp/Makefile ============================================================================== --- stable/11/usr.sbin/ntp/sntp/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ntp/sntp/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -2,23 +2,23 @@ .include -.PATH: ${.CURDIR}/../../../contrib/ntp/sntp +.PATH: ${SRCTOP}/contrib/ntp/sntp PROG= sntp MAN= SRCS= crypto.c kod_management.c log.c main.c networking.c \ sntp-opts.c sntp.c utilities.c -CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \ - -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \ - -I${.CURDIR}/../../../contrib/ntp/sntp \ - -I${.CURDIR}/../../../contrib/ntp/sntp/libopts \ - -I${.CURDIR}/../../../contrib/ntp/sntp/libevent/include \ - -I${.CURDIR}/../libntpevent \ - -I${.CURDIR}/../ +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/sntp \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${SRCTOP}/contrib/ntp/sntp/libevent/include \ + -I${.CURDIR:H}/libntpevent \ + -I${.CURDIR:H} LIBADD= m opts ntp ntpevent pthread Modified: stable/11/usr.sbin/rpc.yppasswdd/Makefile ============================================================================== --- stable/11/usr.sbin/rpc.yppasswdd/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/rpc.yppasswdd/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -2,8 +2,8 @@ RPCDIR= ${DESTDIR}/usr/include/rpcsvc -.PATH: ${.CURDIR}/../../usr.sbin/ypserv ${.CURDIR}/../../usr.bin/chpass \ - ${.CURDIR}/../../libexec/ypxfr ${RPCDIR} +.PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/usr.bin/chpass \ + ${SRCTOP}/libexec/ypxfr ${RPCDIR} PROG= rpc.yppasswdd SCRIPTS=yppwupdate @@ -16,9 +16,9 @@ GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_private.h y WARNS?= 5 CFLAGS+= -fno-strict-aliasing -CFLAGS+= -I${.CURDIR}/../../usr.sbin/vipw \ - -I${.CURDIR}/../../usr.sbin/ypserv \ - -I${.CURDIR}/../../libexec/ypxfr \ +CFLAGS+= -I${SRCTOP}/usr.sbin/vipw \ + -I${SRCTOP}/usr.sbin/ypserv \ + -I${SRCTOP}/libexec/ypxfr \ -I${.CURDIR} -I. LIBADD= rpcsvc crypt util Modified: stable/11/usr.sbin/rpc.ypupdated/Makefile ============================================================================== --- stable/11/usr.sbin/rpc.ypupdated/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/rpc.ypupdated/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../ypserv ${.CURDIR}/../../libexec/ypxfr +.PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr PROG= rpc.ypupdated MAN= @@ -9,7 +9,7 @@ SRCS= ypupdate_prot_svc.c ypupdate_prot.h ypupdated_ma yp_dblookup.c yp_dbwrite.c yp_dbdelete.c yp_dbupdate.c #CFLAGS+= -DYP -CFLAGS+= -I${.CURDIR}/../ypserv -I. -I${.CURDIR}/../../libexec/ypxfr +CFLAGS+= -I${SRCTOP}/usr.sbin/ypserv -I. -I${SRCTOP}/libexec/ypxfr WARNS?= 1 @@ -24,10 +24,10 @@ RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C # ypupdated_main.c can see it. ypupdate_prot_svc.c: ${RPCDIR}/ypupdate_prot.x rm -f ${.TARGET} - ${RPCGEN} -m ${RPCDIR}/ypupdate_prot.x | \ + ${RPCGEN} -m ${.ALLSRC} | \ sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET} ypupdate_prot.h: ${RPCDIR}/ypupdate_prot.x - ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypupdate_prot.x + ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC} .include Modified: stable/11/usr.sbin/rpc.ypxfrd/Makefile ============================================================================== --- stable/11/usr.sbin/rpc.ypxfrd/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/rpc.ypxfrd/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../usr.sbin/ypserv +.PATH: ${SRCTOP}/usr.sbin/ypserv PROG= rpc.ypxfrd MAN= rpc.ypxfrd.8 @@ -15,14 +15,14 @@ LIBADD= rpcsvc CLEANFILES= ypxfrd_svc.c ypxfrd.h -RPCDIR= ${.CURDIR}/../../include/rpcsvc +RPCDIR= ${SRCTOP}/include/rpcsvc RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C # We need to remove the 'static' keyword from _rpcsvcstate so that # ypxfrd_main.c can see it. ypxfrd_svc.c: ${RPCDIR}/ypxfrd.x rm -f ${.TARGET} - ${RPCGEN} -m ${RPCDIR}/ypxfrd.x | \ + ${RPCGEN} -m ${.ALLSRC} | \ sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET} # ypxfrd_xdr.c: ${RPCDIR}/ypxfrd.x @@ -31,6 +31,6 @@ ypxfrd_svc.c: ${RPCDIR}/ypxfrd.x ypxfrd.h: ${RPCDIR}/ypxfrd.x rm -f ${.TARGET} - ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypxfrd.x + ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC} .include Modified: stable/11/usr.sbin/tcpdchk/Makefile ============================================================================== --- stable/11/usr.sbin/tcpdchk/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/tcpdchk/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../contrib/tcp_wrappers +.PATH: ${SRCTOP}/contrib/tcp_wrappers PROG= tcpdchk MAN= tcpdchk.8 Modified: stable/11/usr.sbin/tcpdmatch/Makefile ============================================================================== --- stable/11/usr.sbin/tcpdmatch/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/tcpdmatch/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../contrib/tcp_wrappers +.PATH: ${SRCTOP}/contrib/tcp_wrappers PROG= tcpdmatch MAN= tcpdmatch.8 Modified: stable/11/usr.sbin/traceroute/Makefile ============================================================================== --- stable/11/usr.sbin/traceroute/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/traceroute/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,6 +1,6 @@ # $FreeBSD$ -TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute +TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute .PATH: ${TRACEROUTE_DISTDIR} PROG= traceroute Modified: stable/11/usr.sbin/traceroute6/Makefile ============================================================================== --- stable/11/usr.sbin/traceroute6/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/traceroute6/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -13,7 +13,7 @@ # A PARTICULAR PURPOSE. # $FreeBSD$ -TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute +TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute .PATH: ${TRACEROUTE_DISTDIR} PROG= traceroute6 Modified: stable/11/usr.sbin/uathload/Makefile ============================================================================== --- stable/11/usr.sbin/uathload/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/uathload/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -10,7 +10,7 @@ FILESMODE= 444 CLEANFILES= ar5523.bin -ar5523.bin: ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu - uudecode -p ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu > ${.TARGET} +ar5523.bin: ${SRCTOP}/sys/contrib/dev/uath/ar5523.bin.uu + uudecode -p ${.ALLSRC} > ${.TARGET} .include Modified: stable/11/usr.sbin/unbound/anchor/Makefile ============================================================================== --- stable/11/usr.sbin/unbound/anchor/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/unbound/anchor/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,9 +1,9 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR= ${.CURDIR}/../../../contrib/ldns -UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound -EXPATDIR= ${.CURDIR}/../../../contrib/expat +LDNSDIR= ${SRCTOP}/contrib/ldns +UNBOUNDDIR= ${SRCTOP}/contrib/unbound +EXPATDIR= ${SRCTOP}/contrib/expat .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/doc Modified: stable/11/usr.sbin/unbound/checkconf/Makefile ============================================================================== --- stable/11/usr.sbin/unbound/checkconf/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/unbound/checkconf/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,8 +1,8 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR= ${.CURDIR}/../../../contrib/ldns -UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound +LDNSDIR= ${SRCTOP}/contrib/ldns +UNBOUNDDIR= ${SRCTOP}/contrib/unbound .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/util ${UNBOUNDDIR}/doc Modified: stable/11/usr.sbin/unbound/control/Makefile ============================================================================== --- stable/11/usr.sbin/unbound/control/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/unbound/control/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,8 +1,8 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR= ${.CURDIR}/../../../contrib/ldns -UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound +LDNSDIR= ${SRCTOP}/contrib/ldns +UNBOUNDDIR= ${SRCTOP}/contrib/unbound .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/util ${UNBOUNDDIR}/doc Modified: stable/11/usr.sbin/unbound/daemon/Makefile ============================================================================== --- stable/11/usr.sbin/unbound/daemon/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/unbound/daemon/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,8 +1,8 @@ # $FreeBSD$ # Vendor sources and generated files -LDNSDIR= ${.CURDIR}/../../../contrib/ldns -UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound +LDNSDIR= ${SRCTOP}/contrib/ldns +UNBOUNDDIR= ${SRCTOP}/contrib/unbound .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/daemon ${UNBOUNDDIR}/util ${UNBOUNDDIR}/doc Modified: stable/11/usr.sbin/yp_mkdb/Makefile ============================================================================== --- stable/11/usr.sbin/yp_mkdb/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/yp_mkdb/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,13 +1,13 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../libexec/ypxfr ${.CURDIR}/../ypserv +.PATH: ${SRCTOP}/libexec/ypxfr ${SRCTOP}/usr.sbin/ypserv PROG= yp_mkdb MAN= yp_mkdb.8 SRCS= yp_mkdb.c yp_dblookup.c yp_dbwrite.c CFLAGS+= -Dyp_error=warnx -CFLAGS+= -I${.CURDIR}/../../libexec/ypxfr -I${.CURDIR}/../../usr.sbin/ypserv +CFLAGS+= -I${SRCTOP}/libexec/ypxfr -I${SRCTOP}/usr.sbin/ypserv WARNS?= 1 Modified: stable/11/usr.sbin/ypldap/Makefile ============================================================================== --- stable/11/usr.sbin/ypldap/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ypldap/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -12,8 +12,8 @@ MAN= ypldap.8 ypldap.conf.5 LIBADD= openbsd event util rpcsvc CFLAGS+=-I${.CURDIR} -CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent -CFLAGS+=-I${.CURDIR}/../../lib/libopenbsd +CFLAGS+=-I${SRCTOP}/contrib/pf/libevent +CFLAGS+=-I${SRCTOP}/lib/libopenbsd WARNS= 2 Modified: stable/11/usr.sbin/yppush/Makefile ============================================================================== --- stable/11/usr.sbin/yppush/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/yppush/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,8 +1,7 @@ # $FreeBSD$ -RPCDIR= ${.CURDIR}/../../include/rpcsvc -.PATH: ${RPCDIR} ${.CURDIR}/../../usr.sbin/ypserv \ - ${.CURDIR}/../../libexec/ypxfr +RPCDIR= ${SRCTOP}/include/rpcsvc +.PATH: ${RPCDIR} ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr PROG= yppush MAN= yppush.8 @@ -10,7 +9,7 @@ SRCS= ypxfr_getmap.c yp_dblookup.c yp_error.c ypxfr_mi ${GENSRCS} GENSRCS=yp.h yp_clnt.c yppush_svc.c -CFLAGS+= -I. -I${.CURDIR}/../../libexec/ypxfr +CFLAGS+= -I. -I${SRCTOP}/libexec/ypxfr WARNS?= 2 Modified: stable/11/usr.sbin/ypserv/Makefile ============================================================================== --- stable/11/usr.sbin/ypserv/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/ypserv/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -2,9 +2,8 @@ .include -RPCDIR= ${.CURDIR}/../../include/rpcsvc -.PATH: ${RPCDIR} \ - ${.CURDIR}/common +RPCDIR= ${SRCTOP}/include/rpcsvc +.PATH: ${RPCDIR} ${.CURDIR}/common PROG= ypserv MAN= ypserv.8 ypinit.8 Modified: stable/11/usr.sbin/zic/Makefile.inc ============================================================================== --- stable/11/usr.sbin/zic/Makefile.inc Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/zic/Makefile.inc Tue May 30 05:15:09 2017 (r319191) @@ -1,3 +1,3 @@ # $FreeBSD$ -.include "${.CURDIR}/../../Makefile.inc" +.include "${SRCTOP}/usr.sbin/Makefile.inc" Modified: stable/11/usr.sbin/zic/zdump/Makefile ============================================================================== --- stable/11/usr.sbin/zic/zdump/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/zic/zdump/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/tzcode/zic +.PATH: ${SRCTOP}/contrib/tzcode/zic PROG= zdump MAN= zdump.8 @@ -8,7 +8,7 @@ SRCS= zdump.c ialloc.c scheck.c CFLAGS+= -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"${SHAREDIR}/zoneinfo\" -Demkdir=mkdir -CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../contrib/tzcode/stdtime +CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime WARNS?= 2 Modified: stable/11/usr.sbin/zic/zic/Makefile ============================================================================== --- stable/11/usr.sbin/zic/zic/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/zic/zic/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/tzcode/zic +.PATH: ${SRCTOP}/contrib/tzcode/zic PROG= zic MAN= zic.8 @@ -9,7 +9,7 @@ SRCS= zic.c ialloc.c scheck.c CFLAGS+= -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"${SHAREDIR}/zoneinfo\" -Demkdir=mkdir CFLAGS+= -DHAVE_STRERROR -DHAVE_UNISTD_H -CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../contrib/tzcode/stdtime +CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime WARNS?= 2 Modified: stable/11/usr.sbin/zonectl/Makefile ============================================================================== --- stable/11/usr.sbin/zonectl/Makefile Tue May 30 04:45:11 2017 (r319190) +++ stable/11/usr.sbin/zonectl/Makefile Tue May 30 05:15:09 2017 (r319191) @@ -2,7 +2,7 @@ PROG= zonectl SRCS= zonectl.c -SDIR= ${.CURDIR}/../../sys +SDIR= ${SRCTOP}/sys LIBADD= cam sbuf util MAN= zonectl.8 CFLAGS+=-g -O0 From owner-svn-src-all@freebsd.org Tue May 30 07:28:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87D7AAFE8FD; Tue, 30 May 2017 07:28:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 509D27B65E; Tue, 30 May 2017 07:28:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U7SSqa065674; Tue, 30 May 2017 07:28:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U7SRSx065664; Tue, 30 May 2017 07:28:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300728.v4U7SRSx065664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 07:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319192 - in stable/11: . gnu/usr.bin lib share/mk tools/build/mk tools/build/options usr.bin usr.sbin usr.sbin/tzsetup X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 07:28:29 -0000 Author: ngie Date: Tue May 30 07:28:27 2017 New Revision: 319192 URL: https://svnweb.freebsd.org/changeset/base/319192 Log: MFC r306375,r307802: r306375 (by emaste): Add a WITHOUT_DIALOG src.conf(5) knob It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup). r307802 (by bapt): Fix build of tzsetup when WITHOUT_DIALOG is set Hide dialog specific code behind HAVE_DIALOG. It allows to build a stripped down version (missing the dialog UI) but perfectly function tzsetup when world is built WITHOUT_DIALOG Reorganise a bit the code to limit the number of blocks under HAVE_DIALOG Added: stable/11/tools/build/options/WITHOUT_DIALOG - copied unchanged from r306375, head/tools/build/options/WITHOUT_DIALOG Modified: stable/11/Makefile.inc1 stable/11/gnu/usr.bin/Makefile stable/11/lib/Makefile stable/11/share/mk/src.opts.mk stable/11/tools/build/mk/OptionalObsoleteFiles.inc stable/11/usr.bin/Makefile stable/11/usr.sbin/Makefile stable/11/usr.sbin/tzsetup/Makefile stable/11/usr.sbin/tzsetup/tzsetup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Tue May 30 05:15:09 2017 (r319191) +++ stable/11/Makefile.inc1 Tue May 30 07:28:27 2017 (r319192) @@ -2049,8 +2049,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_cddl_lib_libctf} \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ - ${_secure_lib_libssh} ${_secure_lib_libssl} \ - gnu/lib/libdialog + ${_secure_lib_libssh} ${_secure_lib_libssl} .if ${MK_GNUCXX} != "no" _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ @@ -2058,6 +2057,11 @@ gnu/lib/libstdc++__L: lib/msun__L gnu/lib/libsupc++__L: gnu/lib/libstdc++__L .endif +.if ${MK_DIALOG} != "no" +_prebuild_libs+= gnu/lib/libdialog +gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _prebuild_libs+= lib/libc++ .endif @@ -2203,8 +2207,6 @@ lib/libproc__L: lib/libcxxrt__L lib/libproc__L: gnu/lib/libsupc++__L .endif .endif - -gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .MAKE Modified: stable/11/gnu/usr.bin/Makefile ============================================================================== --- stable/11/gnu/usr.bin/Makefile Tue May 30 05:15:09 2017 (r319191) +++ stable/11/gnu/usr.bin/Makefile Tue May 30 07:28:27 2017 (r319192) @@ -4,7 +4,6 @@ SUBDIR= ${_binutils} \ ${_cc} \ - dialog \ diff \ diff3 \ ${_dtc} \ @@ -48,6 +47,8 @@ _gdb= gdb .if ${MK_GCC} != "no" _cc= cc .endif + +SUBDIR.${MK_DIALOG}+= dialog SUBDIR_PARALLEL= Modified: stable/11/lib/Makefile ============================================================================== --- stable/11/lib/Makefile Tue May 30 05:15:09 2017 (r319191) +++ stable/11/lib/Makefile Tue May 30 07:28:27 2017 (r319192) @@ -46,7 +46,6 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libdevdctl \ libdevinfo \ libdevstat \ - libdpv \ libdwarf \ libedit \ ${_libefivar} \ @@ -192,6 +191,8 @@ _cuse= libcuse _libelftc= libelftc _libpe= libpe .endif + +SUBDIR.${MK_DIALOG}+= libdpv .if ${MK_FILE} != "no" _libmagic= libmagic Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Tue May 30 05:15:09 2017 (r319191) +++ stable/11/share/mk/src.opts.mk Tue May 30 07:28:27 2017 (r319192) @@ -76,6 +76,7 @@ __DEFAULT_YES_OPTIONS = \ CTM \ CUSE \ CXX \ + DIALOG \ DICT \ DMAGENT \ DYNAMICROOT \ @@ -330,6 +331,10 @@ MK_KERBEROS:= no MK_CLANG:= no MK_GROFF:= no MK_GNUCXX:= no +.endif + +.if ${MK_DIALOG} == "no" +MK_BSDINSTALL:= no .endif .if ${MK_MAIL} == "no" Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Tue May 30 05:15:09 2017 (r319191) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Tue May 30 07:28:27 2017 (r319192) @@ -1581,6 +1581,25 @@ OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus .endif +.if ${MK_DIALOG} == no +OLD_FILES+=usr/bin/dialog +OLD_FILES+=usr/bin/dpv +OLD_FILES+=usr/lib/libdialog.a +OLD_FILES+=usr/lib/libdialog.so +OLD_FILES+=usr/lib/libdialog.so.8 +OLD_FILES+=usr/lib/libdialog_p.a +OLD_FILES+=usr/lib/libdpv.a +OLD_FILES+=usr/lib/libdpv.so +OLD_FILES+=usr/lib/libdpv.so.1 +OLD_FILES+=usr/lib/libdpv_p.a +OLD_FILES+=usr/sbin/bsdconfig +OLD_FILES+=usr/share/man/man1/dialog.1.gz +OLD_FILES+=usr/share/man/man1/dpv.1.gz +OLD_FILES+=usr/share/man/man3/dialog.3.gz +OLD_FILES+=usr/share/man/man3/dpv.3.gz +OLD_FILES+=usr/share/man/man8/bsdconfig.8.gz +.endif + .if ${MK_FMTREE} == no OLD_FILES+=usr/sbin/fmtree OLD_FILES+=usr/share/man/man8/fmtree.8.gz Copied: stable/11/tools/build/options/WITHOUT_DIALOG (from r306375, head/tools/build/options/WITHOUT_DIALOG) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITHOUT_DIALOG Tue May 30 07:28:27 2017 (r319192, copy of r306375, head/tools/build/options/WITHOUT_DIALOG) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build dialog(1), dialog(1,3), and dpv(1,3). Modified: stable/11/usr.bin/Makefile ============================================================================== --- stable/11/usr.bin/Makefile Tue May 30 05:15:09 2017 (r319191) +++ stable/11/usr.bin/Makefile Tue May 30 07:28:27 2017 (r319192) @@ -36,7 +36,6 @@ SUBDIR= alias \ ctlstat \ cut \ dirname \ - dpv \ du \ elf2aout \ elfdump \ @@ -201,6 +200,7 @@ SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BSD_CPIO}+= cpio SUBDIR.${MK_CALENDAR}+= calendar SUBDIR.${MK_CLANG}+= clang +SUBDIR.${MK_DIALOG}+= dpv SUBDIR.${MK_EE}+= ee SUBDIR.${MK_FILE}+= file SUBDIR.${MK_FINGER}+= finger Modified: stable/11/usr.sbin/Makefile ============================================================================== --- stable/11/usr.sbin/Makefile Tue May 30 05:15:09 2017 (r319191) +++ stable/11/usr.sbin/Makefile Tue May 30 07:28:27 2017 (r319192) @@ -6,7 +6,6 @@ SUBDIR= adduser \ arp \ binmiscctl \ - bsdconfig \ camdd \ cdcontrol \ chkgrp \ @@ -123,6 +122,7 @@ SUBDIR.${MK_BOOTPARAMD}+= bootparamd SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd SUBDIR.${MK_CTM}+= ctm +SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_EFI}+= efivar efidp SUBDIR.${MK_FLOPPY}+= fdcontrol SUBDIR.${MK_FLOPPY}+= fdformat Modified: stable/11/usr.sbin/tzsetup/Makefile ============================================================================== --- stable/11/usr.sbin/tzsetup/Makefile Tue May 30 05:15:09 2017 (r319191) +++ stable/11/usr.sbin/tzsetup/Makefile Tue May 30 07:28:27 2017 (r319192) @@ -1,12 +1,16 @@ # $FreeBSD$ +.include + PROG= tzsetup MAN= tzsetup.8 -CFLAGS+= -I${.CURDIR}/../../contrib/dialog -I. +CFLAGS+= -I. +.if ${MK_DIALOG} != no WARNS?= 3 - +CFLAGS+= -I${.CURDIR}/../../contrib/dialog -DHAVE_DIALOG LIBADD= dialog ncursesw +.endif .include Modified: stable/11/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- stable/11/usr.sbin/tzsetup/tzsetup.c Tue May 30 05:15:09 2017 (r319191) +++ stable/11/usr.sbin/tzsetup/tzsetup.c Tue May 30 07:28:27 2017 (r319192) @@ -49,7 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef HAVE_DIALOG #include +#endif #define _PATH_ZONETAB "/usr/share/zoneinfo/zone.tab" #define _PATH_ISO3166 "/usr/share/misc/iso3166" @@ -72,6 +74,19 @@ __FBSDID("$FreeBSD$"); #define DITEM_LEAVE_MENU (1 << 16) #define DITEM_RECREATE (1 << 18) +static char path_zonetab[MAXPATHLEN], path_iso3166[MAXPATHLEN], + path_zoneinfo[MAXPATHLEN], path_localtime[MAXPATHLEN], + path_db[MAXPATHLEN], path_wall_cmos_clock[MAXPATHLEN]; + +static int reallydoit = 1; +static int reinstall = 0; +static char *chrootenv = NULL; + +static void usage(void); +static int install_zoneinfo(const char *zoneinfo); +static int install_zoneinfo_file(const char *zoneinfo_file); + +#ifdef HAVE_DIALOG /* for use in describing more exotic behaviors */ typedef struct dialogMenuItem { char *prompt; @@ -187,20 +202,10 @@ again: return result; } -static char path_zonetab[MAXPATHLEN], path_iso3166[MAXPATHLEN], - path_zoneinfo[MAXPATHLEN], path_localtime[MAXPATHLEN], - path_db[MAXPATHLEN], path_wall_cmos_clock[MAXPATHLEN]; - -static int reallydoit = 1; -static int reinstall = 0; static int usedialog = 1; -static char *chrootenv = NULL; -static void usage(void); static int confirm_zone(const char *filename); static int continent_country_menu(dialogMenuItem *); -static int install_zoneinfo(const char *zoneinfo); -static int install_zoneinfo_file(const char *zoneinfo_file); static int set_zone_multi(dialogMenuItem *); static int set_zone_whole_country(dialogMenuItem *); static int set_zone_menu(dialogMenuItem *); @@ -644,6 +649,53 @@ set_zone_utc(void) } static int +confirm_zone(const char *filename) +{ + char title[64], prompt[64]; + time_t t = time(0); + struct tm *tm; + int rv; + + setenv("TZ", filename == NULL ? "" : filename, 1); + tzset(); + tm = localtime(&t); + + snprintf(title, sizeof(title), "Confirmation"); + snprintf(prompt, sizeof(prompt), + "Does the abbreviation `%s' look reasonable?", tm->tm_zone); + rv = !dialog_yesno(title, prompt, 5, 72); + return (rv); +} + +static int +set_zone_multi(dialogMenuItem *dmi) +{ + struct zone *zp = dmi->data; + int rv; + + if (!confirm_zone(zp->filename)) + return (DITEM_FAILURE | DITEM_RECREATE); + + rv = install_zoneinfo(zp->filename); + return (rv); +} + +static int +set_zone_whole_country(dialogMenuItem *dmi) +{ + struct country *cp = dmi->data; + int rv; + + if (!confirm_zone(cp->filename)) + return (DITEM_FAILURE | DITEM_RECREATE); + + rv = install_zoneinfo(cp->filename); + return (rv); +} + +#endif + +static int install_zoneinfo_file(const char *zoneinfo_file) { char buf[1024]; @@ -672,9 +724,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Creating symbolic link %s to %s", path_localtime, zoneinfo_file); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); #endif @@ -685,9 +739,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Could not delete %s: %s", path_localtime, strerror(errno)); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); @@ -697,9 +753,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Could not delete %s: %s", path_db, strerror(errno)); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); @@ -708,9 +766,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(title, sizeof(title), "Done"); snprintf(prompt, sizeof(prompt), "Removed %s", path_localtime); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); #endif return (DITEM_LEAVE_MENU); @@ -723,9 +783,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Could not open %s: %s", zoneinfo_file, strerror(errno)); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); } @@ -734,10 +796,12 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Could not unlink %s: %s", path_localtime, strerror(errno)); +#ifdef HAVE_DIALOG if (usedialog) { snprintf(title, sizeof(title), "Error"); dialog_msgbox(title, prompt, 8, 72, 1); } else +#endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); } @@ -749,9 +813,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Could not open %s: %s", path_localtime, strerror(errno)); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); } @@ -765,9 +831,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Error copying %s to %s %s", zoneinfo_file, path_localtime, strerror(errno)); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); /* Better to leave none than a corrupt one. */ unlink(path_localtime); @@ -781,9 +849,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Cannot access %s: %s", zoneinfo_file, strerror(errno)); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); } @@ -791,10 +861,12 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Could not unlink %s: %s", path_localtime, strerror(errno)); +#ifdef HAVE_DIALOG if (usedialog) { snprintf(title, sizeof(title), "Error"); dialog_msgbox(title, prompt, 8, 72, 1); } else +#endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); } @@ -804,9 +876,11 @@ install_zoneinfo_file(const char *zoneinfo_file) "Cannot create symbolic link %s to %s: %s", path_localtime, zoneinfo_file, strerror(errno)); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); } @@ -822,9 +896,11 @@ install_zoneinfo_file(const char *zoneinfo_file) snprintf(prompt, sizeof(prompt), "Created symbolic link from %s to %s", zoneinfo_file, path_localtime); +#ifdef HAVE_DIALOG if (usedialog) dialog_msgbox(title, prompt, 8, 72, 1); else +#endif fprintf(stderr, "%s\n", prompt); #endif } /* reallydoit */ @@ -855,51 +931,6 @@ install_zoneinfo(const char *zoneinfo) return (rv); } -static int -confirm_zone(const char *filename) -{ - char title[64], prompt[64]; - time_t t = time(0); - struct tm *tm; - int rv; - - setenv("TZ", filename == NULL ? "" : filename, 1); - tzset(); - tm = localtime(&t); - - snprintf(title, sizeof(title), "Confirmation"); - snprintf(prompt, sizeof(prompt), - "Does the abbreviation `%s' look reasonable?", tm->tm_zone); - rv = !dialog_yesno(title, prompt, 5, 72); - return (rv); -} - -static int -set_zone_multi(dialogMenuItem *dmi) -{ - struct zone *zp = dmi->data; - int rv; - - if (!confirm_zone(zp->filename)) - return (DITEM_FAILURE | DITEM_RECREATE); - - rv = install_zoneinfo(zp->filename); - return (rv); -} - -static int -set_zone_whole_country(dialogMenuItem *dmi) -{ - struct country *cp = dmi->data; - int rv; - - if (!confirm_zone(cp->filename)) - return (DITEM_FAILURE | DITEM_RECREATE); - - rv = install_zoneinfo(cp->filename); - return (rv); -} - static void usage(void) { @@ -912,8 +943,11 @@ usage(void) int main(int argc, char **argv) { +#ifdef HAVE_DIALOG char title[64], prompt[128]; - int c, fd, rv, skiputc; + int fd; +#endif + int c, rv, skiputc; char vm_guest[16] = ""; size_t len = sizeof(vm_guest); @@ -934,7 +968,9 @@ main(int argc, char **argv) break; case 'r': reinstall = 1; +#ifdef HAVE_DIALOG usedialog = 0; +#endif break; case 's': skiputc = 1; @@ -998,12 +1034,15 @@ main(int argc, char **argv) struct stat sb; if (stat(argv[optind], &sb) != 0) { +#ifdef HAVE_DIALOG usedialog = 0; +#endif rv = install_zoneinfo(argv[optind]); exit(rv & ~DITEM_LEAVE_MENU); } /* FALLTHROUGH */ } +#ifdef HAVE_DIALOG read_iso3166_table(); read_zones(); @@ -1064,5 +1103,8 @@ main(int argc, char **argv) dlg_clear(); end_dialog(); +#else + usage(); +#endif return (0); } From owner-svn-src-all@freebsd.org Tue May 30 07:29:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46AB0AFE965; Tue, 30 May 2017 07:29:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 147007B78B; Tue, 30 May 2017 07:29:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U7TIib065772; Tue, 30 May 2017 07:29:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U7TIeX065771; Tue, 30 May 2017 07:29:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300729.v4U7TIeX065771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 07:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319193 - stable/11/usr.sbin/tzsetup X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 07:29:19 -0000 Author: ngie Date: Tue May 30 07:29:18 2017 New Revision: 319193 URL: https://svnweb.freebsd.org/changeset/base/319193 Log: MFC r314463: Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output. Modified: stable/11/usr.sbin/tzsetup/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/tzsetup/Makefile ============================================================================== --- stable/11/usr.sbin/tzsetup/Makefile Tue May 30 07:28:27 2017 (r319192) +++ stable/11/usr.sbin/tzsetup/Makefile Tue May 30 07:29:18 2017 (r319193) @@ -9,7 +9,7 @@ CFLAGS+= -I. .if ${MK_DIALOG} != no WARNS?= 3 -CFLAGS+= -I${.CURDIR}/../../contrib/dialog -DHAVE_DIALOG +CFLAGS+= -I${SRCTOP}/contrib/dialog -DHAVE_DIALOG LIBADD= dialog ncursesw .endif From owner-svn-src-all@freebsd.org Tue May 30 07:31:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70E6EAFEA51; Tue, 30 May 2017 07:31:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F15C7B980; Tue, 30 May 2017 07:31:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4U7V2QC065915; Tue, 30 May 2017 07:31:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4U7V2md065914; Tue, 30 May 2017 07:31:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705300731.v4U7V2md065914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 07:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319194 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 07:31:03 -0000 Author: ngie Date: Tue May 30 07:31:02 2017 New Revision: 319194 URL: https://svnweb.freebsd.org/changeset/base/319194 Log: Regenerate src.conf(5) after MK_DIALOG was added Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Tue May 30 07:29:18 2017 (r319193) +++ stable/11/share/man/man5/src.conf.5 Tue May 30 07:31:02 2017 (r319194) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 21, 2017 +.Dd May 30, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -441,6 +441,14 @@ When set, it also enforces the following options: .It Va WITHOUT_DEBUG_FILES Set to avoid building or installing standalone debug files for each executable binary and shared library. +.It Va WITHOUT_DIALOG +Set to not build dialog(1), dialog(1,3), and dpv(1,3). +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_BSDINSTALL +.El .It Va WITHOUT_DICT Set to not build the Webster dictionary files. .It Va WITH_DIRDEPS_BUILD From owner-svn-src-all@freebsd.org Tue May 30 10:50:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF4F4B791D5; Tue, 30 May 2017 10:50:16 +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 9F8AC80858; Tue, 30 May 2017 10:50:16 +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 v4UAoFL2047044; Tue, 30 May 2017 10:50:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UAoFJP047043; Tue, 30 May 2017 10:50:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301050.v4UAoFJP047043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 10:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319195 - stable/11/lib/libc/aarch64/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 10:50:16 -0000 Author: andrew Date: Tue May 30 10:50:15 2017 New Revision: 319195 URL: https://svnweb.freebsd.org/changeset/base/319195 Log: MFC r312703: Fix the error value we write in cerror. __error returns an int *, however we were writing a 64 bit value meaning the 32 bits after this would be trashed. Modified: stable/11/lib/libc/aarch64/sys/cerror.S Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/aarch64/sys/cerror.S ============================================================================== --- stable/11/lib/libc/aarch64/sys/cerror.S Tue May 30 07:31:02 2017 (r319194) +++ stable/11/lib/libc/aarch64/sys/cerror.S Tue May 30 10:50:15 2017 (r319195) @@ -34,7 +34,7 @@ ENTRY(cerror) stp x0, lr, [sp] bl _C_LABEL(__error) ldp x1, lr, [sp] - str x1, [x0] + str w1, [x0] movn x0, #0 movn x1, #0 add sp, sp, #16 From owner-svn-src-all@freebsd.org Tue May 30 11:03:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFA2DB7977E; Tue, 30 May 2017 11:03:06 +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 BCCB1811BE; Tue, 30 May 2017 11:03:06 +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 v4UB350H055150; Tue, 30 May 2017 11:03:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UB35nW055148; Tue, 30 May 2017 11:03:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301103.v4UB35nW055148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 11:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319196 - in stable/11/sys/arm64: arm64 include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 11:03:07 -0000 Author: andrew Date: Tue May 30 11:03:05 2017 New Revision: 319196 URL: https://svnweb.freebsd.org/changeset/base/319196 Log: MFC r316755: Add SCTLR bits added in ARMv8.1 and ARMv8.2 and start to use them in the early boot code. Modified: stable/11/sys/arm64/arm64/locore.S stable/11/sys/arm64/include/armreg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/locore.S ============================================================================== --- stable/11/sys/arm64/arm64/locore.S Tue May 30 10:50:15 2017 (r319195) +++ stable/11/sys/arm64/arm64/locore.S Tue May 30 11:03:05 2017 (r319196) @@ -624,12 +624,13 @@ tcr: TCR_CACHE_ATTRS | TCR_SMP_ATTRS) sctlr_set: /* Bits to set */ - .quad (SCTLR_UCI | SCTLR_nTWE | SCTLR_nTWI | SCTLR_UCT | SCTLR_DZE | \ + .quad (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_UCI | SCTLR_SPAN | \ + SCTLR_nTWE | SCTLR_nTWI | SCTLR_UCT | SCTLR_DZE | \ SCTLR_I | SCTLR_SED | SCTLR_SA0 | SCTLR_SA | SCTLR_C | SCTLR_M) sctlr_clear: /* Bits to clear */ - .quad (SCTLR_EE | SCTLR_EOE | SCTLR_WXN | SCTLR_UMA | SCTLR_ITD | \ - SCTLR_THEE | SCTLR_CP15BEN | SCTLR_A) + .quad (SCTLR_EE | SCTLR_EOE | SCTLR_IESB | SCTLR_WXN | SCTLR_UMA | \ + SCTLR_ITD | SCTLR_THEE | SCTLR_CP15BEN | SCTLR_A) .globl abort abort: Modified: stable/11/sys/arm64/include/armreg.h ============================================================================== --- stable/11/sys/arm64/include/armreg.h Tue May 30 10:50:15 2017 (r319195) +++ stable/11/sys/arm64/include/armreg.h Tue May 30 11:03:05 2017 (r319196) @@ -380,8 +380,8 @@ #define PAR_S_MASK (0x1 << PAR_S_SHIFT) /* SCTLR_EL1 - System Control Register */ -#define SCTLR_RES0 0xc8222400 /* Reserved, write 0 */ -#define SCTLR_RES1 0x30d00800 /* Reserved, write 1 */ +#define SCTLR_RES0 0xc8222400 /* Reserved ARMv8.0, write 0 */ +#define SCTLR_RES1 0x30d00800 /* Reserved ARMv8.0, write 1 */ #define SCTLR_M 0x00000001 #define SCTLR_A 0x00000002 @@ -399,9 +399,13 @@ #define SCTLR_nTWI 0x00010000 #define SCTLR_nTWE 0x00040000 #define SCTLR_WXN 0x00080000 +#define SCTLR_IESB 0x00200000 +#define SCTLR_SPAN 0x00800000 #define SCTLR_EOE 0x01000000 #define SCTLR_EE 0x02000000 #define SCTLR_UCI 0x04000000 +#define SCTLR_nTLSMD 0x10000000 +#define SCTLR_LSMAOE 0x20000000 /* SPSR_EL1 */ /* From owner-svn-src-all@freebsd.org Tue May 30 11:53:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 012D4B7ADE8; Tue, 30 May 2017 11:53:20 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFBEB82AED; Tue, 30 May 2017 11:53:19 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UBrJbV075764; Tue, 30 May 2017 11:53:19 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UBrIYi075761; Tue, 30 May 2017 11:53:18 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705301153.v4UBrIYi075761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 30 May 2017 11:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319197 - head/sys/dev/ena X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 11:53:20 -0000 Author: zbb Date: Tue May 30 11:53:18 2017 New Revision: 319197 URL: https://svnweb.freebsd.org/changeset/base/319197 Log: Add mbuf defragmentation to the ENA driver When mbuf chain is too long and device cannot handle that number of segments in DMA transaction, mbuf chain will be defragmented. Initially, driver was dropping all mbuf chains that were exceeding supported number of segments. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Differential revision: https://reviews.freebsd.org/D10923 Modified: head/sys/dev/ena/ena.c head/sys/dev/ena/ena.h head/sys/dev/ena/ena_sysctl.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue May 30 11:03:05 2017 (r319196) +++ head/sys/dev/ena/ena.c Tue May 30 11:53:18 2017 (r319197) @@ -155,7 +155,7 @@ static void ena_update_hwassist(struct ena_adapter *); static int ena_setup_ifnet(device_t, struct ena_adapter *, struct ena_com_dev_get_features_ctx *); static void ena_tx_csum(struct ena_com_tx_ctx *, struct mbuf *); -static int ena_xmit_mbuf(struct ena_ring *, struct mbuf *); +static int ena_xmit_mbuf(struct ena_ring *, struct mbuf **); static void ena_start_xmit(struct ena_ring *); static int ena_mq_start(if_t, struct mbuf *); static void ena_deferred_mq_start(void *, int); @@ -2601,9 +2601,36 @@ ena_tx_csum(struct ena_com_tx_ctx *ena_tx_ctx, struct } static int -ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf *mbuf) +ena_check_and_defragment_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) { struct ena_adapter *adapter; + struct mbuf *defrag_mbuf; + int num_frags; + + adapter = tx_ring->adapter; + num_frags = ena_mbuf_count(*mbuf); + + /* One segment must be reserved for configuration descriptor. */ + if (num_frags < adapter->max_tx_sgl_size) + return (0); + counter_u64_add(tx_ring->tx_stats.defragment, 1); + + defrag_mbuf = m_defrag(*mbuf, M_NOWAIT); + if (defrag_mbuf == NULL) { + counter_u64_add(tx_ring->tx_stats.defragment_err, 1); + return (ENOMEM); + } + + /* If mbuf was defragmented succesfully, original mbuf is released. */ + *mbuf = defrag_mbuf; + + return (0); +} + +static int +ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) +{ + struct ena_adapter *adapter; struct ena_tx_buffer *tx_info; struct ena_com_tx_ctx ena_tx_ctx; struct ena_com_dev *ena_dev; @@ -2617,40 +2644,40 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf *m uint16_t ena_qid; uint32_t len, nsegs, header_len; int i, rc; - int nb_hw_desc, num_frags; + int nb_hw_desc; ena_qid = ENA_IO_TXQ_IDX(tx_ring->que->id); adapter = tx_ring->que->adapter; ena_dev = adapter->ena_dev; io_sq = &adapter->ena_dev->io_sq_queues[ena_qid]; - ENA_ASSERT(mbuf, "mbuf is NULL\n"); + ENA_ASSERT(*mbuf, "mbuf is NULL\n"); - num_frags = ena_mbuf_count(mbuf); - if (num_frags > (adapter->max_tx_sgl_size - 2)) { - device_printf(adapter->pdev, - "too many fragments. Last fragment: %d!\n", num_frags); - return (ENA_COM_INVAL); + rc = ena_check_and_defragment_mbuf(tx_ring, mbuf); + if (rc) { + ena_trace(ENA_WARNING, + "Failed to defragment mbuf! err: %d", rc); + return (rc); } next_to_use = tx_ring->next_to_use; req_id = tx_ring->free_tx_ids[next_to_use]; tx_info = &tx_ring->tx_buffer_info[req_id]; - tx_info->mbuf = mbuf; + tx_info->mbuf = *mbuf; tx_info->num_of_bufs = 0; ena_buf = tx_info->bufs; - len = mbuf->m_len; + len = (*mbuf)->m_len; - ena_trace(ENA_DBG | ENA_TXPTH, "Tx: %d bytes", mbuf->m_pkthdr.len); + ena_trace(ENA_DBG | ENA_TXPTH, "Tx: %d bytes", (*mbuf)->m_pkthdr.len); push_len = 0; header_len = min_t(uint32_t, len, tx_ring->tx_max_header_size); push_hdr = NULL; rc = bus_dmamap_load_mbuf_sg(adapter->tx_buf_tag, tx_info->map, - mbuf, segs, &nsegs, BUS_DMA_NOWAIT); + *mbuf, segs, &nsegs, BUS_DMA_NOWAIT); if (rc || (nsegs == 0)) { ena_trace(ENA_WARNING, @@ -2678,7 +2705,7 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf *m ena_tx_ctx.header_len = header_len; /* Set flags and meta data */ - ena_tx_csum(&ena_tx_ctx, mbuf); + ena_tx_csum(&ena_tx_ctx, *mbuf); /* Prepare the packet's descriptors and send them to device */ rc = ena_com_prepare_tx(io_sq, &ena_tx_ctx, &nb_hw_desc); if (rc != 0) { @@ -2692,7 +2719,7 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf *m counter_enter(); counter_u64_add_protected(tx_ring->tx_stats.cnt, 1); - counter_u64_add_protected(tx_ring->tx_stats.bytes, mbuf->m_pkthdr.len); + counter_u64_add_protected(tx_ring->tx_stats.bytes, (*mbuf)->m_pkthdr.len); counter_exit(); tx_info->tx_descs = nb_hw_desc; @@ -2740,7 +2767,7 @@ ena_start_xmit(struct ena_ring *tx_ring) if (ena_com_sq_empty_space(io_sq) < ENA_TX_CLEANUP_TRESHOLD) ena_tx_cleanup(tx_ring); - if ((ret = ena_xmit_mbuf(tx_ring, mbuf)) != 0) { + if ((ret = ena_xmit_mbuf(tx_ring, &mbuf)) != 0) { if (ret == ENA_COM_NO_MEM) { drbr_putback(adapter->ifp, tx_ring->br, mbuf); } else if (ret == ENA_COM_NO_SPACE) { Modified: head/sys/dev/ena/ena.h ============================================================================== --- head/sys/dev/ena/ena.h Tue May 30 11:03:05 2017 (r319196) +++ head/sys/dev/ena/ena.h Tue May 30 11:53:18 2017 (r319197) @@ -226,6 +226,8 @@ struct ena_stats_tx { counter_u64_t doorbells; counter_u64_t missing_tx_comp; counter_u64_t bad_req_id; + counter_u64_t defragment; + counter_u64_t defragment_err; }; struct ena_stats_rx { Modified: head/sys/dev/ena/ena_sysctl.c ============================================================================== --- head/sys/dev/ena/ena_sysctl.c Tue May 30 11:03:05 2017 (r319196) +++ head/sys/dev/ena/ena_sysctl.c Tue May 30 11:53:18 2017 (r319197) @@ -155,6 +155,14 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, "stops", CTLFLAG_RD, &tx_stats->queue_stop, "Queue stops"); + SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, + "defragmentations", CTLFLAG_RD, + &tx_stats->defragment, + "Mbuf defragmentations"); + SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, + "defragmentation_err", CTLFLAG_RD, + &tx_stats->defragment_err, + "Mbuf defragmentation failures"); /* RX specific stats */ rx_node = SYSCTL_ADD_NODE(ctx, queue_list, OID_AUTO, From owner-svn-src-all@freebsd.org Tue May 30 11:55:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C8C1B7AE5A; Tue, 30 May 2017 11:55:04 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0E1C82C41; Tue, 30 May 2017 11:55:03 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UBt3Ao075889; Tue, 30 May 2017 11:55:03 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UBt2GL075888; Tue, 30 May 2017 11:55:02 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705301155.v4UBt2GL075888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 30 May 2017 11:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319198 - head/sys/dev/ena X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 11:55:04 -0000 Author: zbb Date: Tue May 30 11:55:02 2017 New Revision: 319198 URL: https://svnweb.freebsd.org/changeset/base/319198 Log: Add locks before each ena_up and ena_down Lock only ena_up and ena_down calls in ioctl handler, instead of whole ioctl. Locking ioctl with sx lock that is sleepable, is not allowed in some cases, e.g. when multicast options are being changed. Additional locking was added in deatch function to prevent race condition with ioctl function. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Differential revision: https://reviews.freebsd.org/D10924 Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue May 30 11:53:18 2017 (r319197) +++ head/sys/dev/ena/ena.c Tue May 30 11:55:02 2017 (r319198) @@ -2285,16 +2285,16 @@ ena_ioctl(if_t ifp, u_long command, caddr_t data) /* * Acquiring lock to prevent from running up and down routines parallel. */ - sx_xlock(&adapter->ioctl_sx); - rc = 0; switch (command) { case SIOCSIFMTU: + sx_xlock(&adapter->ioctl_sx); ena_down(adapter); ena_change_mtu(ifp, ifr->ifr_mtu); rc = ena_up(adapter); + sx_unlock(&adapter->ioctl_sx); break; case SIOCSIFFLAGS: @@ -2306,11 +2306,16 @@ ena_ioctl(if_t ifp, u_long command, caddr_t data) "ioctl promisc/allmulti\n"); } } else { + sx_xlock(&adapter->ioctl_sx); rc = ena_up(adapter); + sx_unlock(&adapter->ioctl_sx); } } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + sx_xlock(&adapter->ioctl_sx); ena_down(adapter); + sx_unlock(&adapter->ioctl_sx); + } } break; @@ -2333,8 +2338,10 @@ ena_ioctl(if_t ifp, u_long command, caddr_t data) } if (reinit && (ifp->if_drv_flags & IFF_DRV_RUNNING)) { + sx_xlock(&adapter->ioctl_sx); ena_down(adapter); rc = ena_up(adapter); + sx_unlock(&adapter->ioctl_sx); } } @@ -2344,8 +2351,6 @@ ena_ioctl(if_t ifp, u_long command, caddr_t data) break; } - sx_unlock(&adapter->ioctl_sx); - return (rc); } @@ -3666,7 +3671,9 @@ ena_detach(device_t pdev) taskqueue_drain(adapter->reset_tq, &adapter->reset_task); taskqueue_free(adapter->reset_tq); + sx_xlock(&adapter->ioctl_sx); ena_down(adapter); + sx_unlock(&adapter->ioctl_sx); if (adapter->ifp != NULL) { ether_ifdetach(adapter->ifp); From owner-svn-src-all@freebsd.org Tue May 30 11:56:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 928FBB7AEDC; Tue, 30 May 2017 11:56:55 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60FD582DAC; Tue, 30 May 2017 11:56:55 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UBusgO075993; Tue, 30 May 2017 11:56:54 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UBusAl075992; Tue, 30 May 2017 11:56:54 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705301156.v4UBusAl075992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 30 May 2017 11:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319199 - head/sys/dev/ena X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 11:56:55 -0000 Author: zbb Date: Tue May 30 11:56:54 2017 New Revision: 319199 URL: https://svnweb.freebsd.org/changeset/base/319199 Log: Add error handling to the ENA driver if init of the reset task fails Also, to simplify cleaning routine, reset task is initialized before allocating statistics and other resources. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Differential revision: https://reviews.freebsd.org/D10925 Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue May 30 11:55:02 2017 (r319198) +++ head/sys/dev/ena/ena.c Tue May 30 11:56:54 2017 (r319199) @@ -3604,6 +3604,18 @@ ena_attach(device_t pdev) goto err_ifp_free; } + /* Initialize reset task queue */ + TASK_INIT(&adapter->reset_task, 0, ena_reset_task, adapter); + adapter->reset_tq = taskqueue_create("ena_reset_enqueue", + M_WAITOK | M_ZERO, taskqueue_thread_enqueue, &adapter->reset_tq); + if (adapter->reset_tq == NULL) { + device_printf(adapter->pdev, + "Unable to create reset task queue\n"); + goto err_reset_tq; + } + taskqueue_start_threads(&adapter->reset_tq, 1, PI_NET, + "%s rstq", device_get_nameunit(adapter->pdev)); + /* Initialize statistics */ ena_alloc_counters((counter_u64_t *)&adapter->dev_stats, sizeof(struct ena_stats_dev)); @@ -3613,16 +3625,12 @@ ena_attach(device_t pdev) /* Tell the stack that the interface is not active */ if_setdrvflagbits(adapter->ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); - /* Initialize reset task queue */ - TASK_INIT(&adapter->reset_task, 0, ena_reset_task, adapter); - adapter->reset_tq = taskqueue_create("ena_reset_enqueue", - M_WAITOK | M_ZERO, taskqueue_thread_enqueue, &adapter->reset_tq); - taskqueue_start_threads(&adapter->reset_tq, 1, PI_NET, - "%s rstq", device_get_nameunit(adapter->pdev)); - adapter->running = true; return (0); +err_reset_tq: + ena_free_mgmnt_irq(adapter); + ena_disable_msix(adapter); err_ifp_free: if_detach(adapter->ifp); if_free(adapter->ifp); From owner-svn-src-all@freebsd.org Tue May 30 11:58:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10F10B7AF57; Tue, 30 May 2017 11:58:53 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE9B182F25; Tue, 30 May 2017 11:58:52 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UBwpdc076094; Tue, 30 May 2017 11:58:51 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UBwpv0076092; Tue, 30 May 2017 11:58:51 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705301158.v4UBwpv0076092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 30 May 2017 11:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319200 - head/sys/dev/ena X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 11:58:53 -0000 Author: zbb Date: Tue May 30 11:58:51 2017 New Revision: 319200 URL: https://svnweb.freebsd.org/changeset/base/319200 Log: Move ENA's hw stats updating routine to separate task Initially, stats were being updated each time OS was requesting for the first statistic. To read statistics from hw, condvar was used. cv_timedwait cannot be called when unsleepable lock is held, and this happens when FreeBSD is requesting statistic. Seperate task is reading statistics from NIC each 1 second. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Differential revision: https://reviews.freebsd.org/D10926 Modified: head/sys/dev/ena/ena.c head/sys/dev/ena/ena.h Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue May 30 11:56:54 2017 (r319199) +++ head/sys/dev/ena/ena.c Tue May 30 11:58:51 2017 (r319200) @@ -141,6 +141,7 @@ static void ena_free_irqs(struct ena_adapter*); static void ena_disable_msix(struct ena_adapter *); static void ena_unmask_all_io_irqs(struct ena_adapter *); static int ena_rss_configure(struct ena_adapter *); +static void ena_update_hw_stats(void *, int); static int ena_up_complete(struct ena_adapter *); static int ena_up(struct ena_adapter *); static void ena_down(struct ena_adapter *); @@ -2058,6 +2059,25 @@ static int ena_rss_configure(struct ena_adapter *adapt return 0; } +static void +ena_update_hw_stats(void *arg, int pending) +{ + struct ena_adapter *adapter = arg; + int rc; + + for (;;) { + if (!adapter->up) + return; + + rc = ena_update_stats_counters(adapter); + if (rc) + ena_trace(ENA_WARNING, + "Error updating stats counters, rc = %d", rc); + + pause("ena update hw stats", hz); + } +} + static int ena_up_complete(struct ena_adapter *adapter) { @@ -2141,6 +2161,8 @@ ena_up(struct ena_adapter *adapter) callout_reset_sbt(&adapter->timer_service, SBT_1S, SBT_1S, ena_timer_service, (void *)adapter, 0); + taskqueue_enqueue(adapter->stats_tq, &adapter->stats_task); + adapter->up = true; } @@ -2193,24 +2215,8 @@ ena_get_counter(if_t ifp, ift_counter cnt) { struct ena_adapter *adapter; struct ena_hw_stats *stats; - int rc; adapter = if_getsoftc(ifp); - - /* - * Update only when asking for first counter and interface is up. - * Usually asks for all statistics in sequence. - */ - if (adapter->up) { - if (cnt == 0) { - rc = ena_update_stats_counters(adapter); - if (rc) { - ena_trace(ENA_WARNING, - "Error updating stats counters, rc = %d", - rc); - } - } - } stats = &adapter->hw_stats; switch (cnt) { @@ -2501,6 +2507,10 @@ ena_down(struct ena_adapter *adapter) if_setdrvflagbits(adapter->ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); + /* Drain task responsible for updating hw stats */ + while (taskqueue_cancel(adapter->stats_tq, &adapter->stats_task, NULL)) + taskqueue_drain(adapter->stats_tq, &adapter->stats_task); + ena_free_io_irq(adapter); ena_destroy_all_io_queues(adapter); @@ -3616,6 +3626,18 @@ ena_attach(device_t pdev) taskqueue_start_threads(&adapter->reset_tq, 1, PI_NET, "%s rstq", device_get_nameunit(adapter->pdev)); + /* Initialize task queue responsible for updating hw stats */ + TASK_INIT(&adapter->stats_task, 0, ena_update_hw_stats, adapter); + adapter->stats_tq = taskqueue_create_fast("ena_stats_update", + M_WAITOK | M_ZERO, taskqueue_thread_enqueue, &adapter->stats_tq); + if (adapter->stats_tq == NULL) { + device_printf(adapter->pdev, + "Unable to create taskqueue for updating hw stats\n"); + goto err_stats_tq; + } + taskqueue_start_threads(&adapter->stats_tq, 1, PI_REALTIME, + "%s stats tq", device_get_nameunit(adapter->pdev)); + /* Initialize statistics */ ena_alloc_counters((counter_u64_t *)&adapter->dev_stats, sizeof(struct ena_stats_dev)); @@ -3628,6 +3650,8 @@ ena_attach(device_t pdev) adapter->running = true; return (0); +err_stats_tq: + taskqueue_free(adapter->reset_tq); err_reset_tq: ena_free_mgmnt_irq(adapter); ena_disable_msix(adapter); @@ -3682,6 +3706,8 @@ ena_detach(device_t pdev) sx_xlock(&adapter->ioctl_sx); ena_down(adapter); sx_unlock(&adapter->ioctl_sx); + + taskqueue_free(adapter->stats_tq); if (adapter->ifp != NULL) { ether_ifdetach(adapter->ifp); Modified: head/sys/dev/ena/ena.h ============================================================================== --- head/sys/dev/ena/ena.h Tue May 30 11:56:54 2017 (r319199) +++ head/sys/dev/ena/ena.h Tue May 30 11:58:51 2017 (r319200) @@ -403,6 +403,10 @@ struct ena_adapter { uint32_t missing_tx_max_queues; uint32_t missing_tx_threshold; + /* Task updating hw stats */ + struct task stats_task; + struct taskqueue *stats_tq; + /* Statistics */ struct ena_stats_dev dev_stats; struct ena_hw_stats hw_stats; From owner-svn-src-all@freebsd.org Tue May 30 12:00:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 131B0B7B53B; Tue, 30 May 2017 12:00:58 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D53FE8333B; Tue, 30 May 2017 12:00:57 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UC0vhl076251; Tue, 30 May 2017 12:00:57 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UC0vv3076250; Tue, 30 May 2017 12:00:57 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201705301200.v4UC0vv3076250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 30 May 2017 12:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319201 - head/sys/dev/ena X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 12:00:58 -0000 Author: zbb Date: Tue May 30 12:00:56 2017 New Revision: 319201 URL: https://svnweb.freebsd.org/changeset/base/319201 Log: Introduce additional locks when releasing TX resources and buffers in ENA There could be race condition with TX cleaning routine when cleaning mbufs, when it was called directly from main sending thread (ena_mq_start). Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Differential revision: https://reviews.freebsd.org/D10927 Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue May 30 11:58:51 2017 (r319200) +++ head/sys/dev/ena/ena.c Tue May 30 12:00:56 2017 (r319201) @@ -713,6 +713,7 @@ ena_free_tx_resources(struct ena_adapter *adapter, int drbr_flush(adapter->ifp, tx_ring->br); /* Free buffer DMA maps, */ + ENA_RING_MTX_LOCK(tx_ring); for (int i = 0; i < tx_ring->ring_size; i++) { m_freem(tx_ring->tx_buffer_info[i].mbuf); tx_ring->tx_buffer_info[i].mbuf = NULL; @@ -721,6 +722,7 @@ ena_free_tx_resources(struct ena_adapter *adapter, int bus_dmamap_destroy(adapter->tx_buf_tag, tx_ring->tx_buffer_info[i].map); } + ENA_RING_MTX_UNLOCK(tx_ring); /* And free allocated memory. */ ENA_MEM_FREE(adapter->ena_dev->dmadev, tx_ring->tx_buffer_info); @@ -1121,6 +1123,7 @@ ena_free_tx_bufs(struct ena_adapter *adapter, unsigned { struct ena_ring *tx_ring = &adapter->tx_ring[qid]; + ENA_RING_MTX_LOCK(tx_ring); for (int i = 0; i < tx_ring->ring_size; i++) { struct ena_tx_buffer *tx_info = &tx_ring->tx_buffer_info[i]; @@ -1134,6 +1137,7 @@ ena_free_tx_bufs(struct ena_adapter *adapter, unsigned m_free(tx_info->mbuf); tx_info->mbuf = NULL; } + ENA_RING_MTX_UNLOCK(tx_ring); return; } From owner-svn-src-all@freebsd.org Tue May 30 12:26:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3735DB7BC67; Tue, 30 May 2017 12:26:38 +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 034CE83EF8; Tue, 30 May 2017 12:26:37 +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 v4UCQbdd088156; Tue, 30 May 2017 12:26:37 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UCQaOl088149; Tue, 30 May 2017 12:26:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301226.v4UCQaOl088149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 12:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319202 - in stable/11/sys/arm64: arm64 include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 12:26:38 -0000 Author: andrew Date: Tue May 30 12:26:36 2017 New Revision: 319202 URL: https://svnweb.freebsd.org/changeset/base/319202 Log: MFC r316732, r316756: Enable Privileged Access Never on arm64. r316732: Use the unprivileged variant of the load and store instructions most places possible in the kernel. This forces these functions to fail if userspace is unable to access a given memory location, even if it is in the user memory range. This will simplify adding Privileged Access Never support later. r316756: In ARMv8.1 ARM has added a process state bit to disable access to userspace from the kernel. Make use of this to restrict accessing userspace to just the functions that explicitly handle crossing the user kernel boundary. Modified: stable/11/sys/arm64/arm64/copyinout.S stable/11/sys/arm64/arm64/machdep.c stable/11/sys/arm64/arm64/mp_machdep.c stable/11/sys/arm64/arm64/support.S stable/11/sys/arm64/include/armreg.h stable/11/sys/arm64/include/asm.h stable/11/sys/arm64/include/cpufunc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/copyinout.S ============================================================================== --- stable/11/sys/arm64/arm64/copyinout.S Tue May 30 12:00:56 2017 (r319201) +++ stable/11/sys/arm64/arm64/copyinout.S Tue May 30 12:26:36 2017 (r319202) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); */ ENTRY(copyio_fault) SET_FAULT_HANDLER(xzr, x1) /* Clear the handler */ + EXIT_USER_ACCESS_CHECK(w0, x1) copyio_fault_nopcb: mov x0, #EFAULT ret @@ -99,19 +100,23 @@ ENTRY(copyinstr) adr x6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(x6, x7) /* Set the handler */ + ENTER_USER_ACCESS(w6, x7) ldr x7, =VM_MAXUSER_ADDRESS 1: cmp x0, x7 b.cs copyio_fault - ldrb w4, [x0], #1 /* Load from uaddr */ + ldtrb w4, [x0] /* Load from uaddr */ + add x0, x0, #1 /* Next char */ strb w4, [x1], #1 /* Store in kaddr */ add x5, x5, #1 /* count++ */ cbz w4, 2f /* Break when NUL-terminated */ sub x2, x2, #1 /* len-- */ cbnz x2, 1b -2: SET_FAULT_HANDLER(xzr, x7) /* Clear the handler */ +2: EXIT_USER_ACCESS(w6) + SET_FAULT_HANDLER(xzr, x7) /* Clear the handler */ + 3: cbz x3, 4f /* Check if done != NULL */ str x5, [x3] /* done = count */ @@ -144,8 +149,8 @@ END(copyinstr) copycommon: adr x6, copyio_fault /* Get the handler address */ SET_FAULT_HANDLER(x6, x7) /* Set the handler */ + ENTER_USER_ACCESS(w6, x7) - /* Check alignment */ orr x3, x0, x1 ands x3, x3, 0x07 @@ -213,6 +218,7 @@ last_byte: strb w3, [x1] ending: + EXIT_USER_ACCESS_CHECK(w6, x7) SET_FAULT_HANDLER(xzr, x7) /* Clear the handler */ mov x0, xzr /* return 0 */ Modified: stable/11/sys/arm64/arm64/machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/machdep.c Tue May 30 12:00:56 2017 (r319201) +++ stable/11/sys/arm64/arm64/machdep.c Tue May 30 12:26:36 2017 (r319202) @@ -109,6 +109,7 @@ int64_t dcache_line_size; /* The minimum D cache line int64_t icache_line_size; /* The minimum I cache line size */ int64_t idcache_line_size; /* The minimum cache line size */ int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */ +int has_pan; /* pagezero_* implementations are provided in support.S */ void pagezero_simple(void *); @@ -118,6 +119,37 @@ void pagezero_cache(void *); void (*pagezero)(void *p) = pagezero_simple; static void +pan_setup(void) +{ + uint64_t id_aa64mfr1; + + id_aa64mfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); + if (ID_AA64MMFR1_PAN(id_aa64mfr1) != ID_AA64MMFR1_PAN_NONE) + has_pan = 1; +} + +void +pan_enable(void) +{ + + /* + * The LLVM integrated assembler doesn't understand the PAN + * PSTATE field. Because of this we need to manually create + * the instruction in an asm block. This is equivalent to: + * msr pan, #1 + * + * This sets the PAN bit, stopping the kernel from accessing + * memory when userspace can also access it unless the kernel + * uses the userspace load/store instructions. + */ + if (has_pan) { + WRITE_SPECIALREG(sctlr_el1, + READ_SPECIALREG(sctlr_el1) & ~SCTLR_SPAN); + __asm __volatile(".inst 0xd500409f | (0x1 << 8)"); + } +} + +static void cpu_startup(void *dummy) { @@ -920,6 +952,7 @@ initarm(struct arm64_bootparams *abp) init_param1(); cache_setup(); + pan_setup(); /* Bootstrap enough of pmap to enter the kernel proper */ pmap_bootstrap(abp->kern_l0pt, abp->kern_l1pt, @@ -936,6 +969,7 @@ initarm(struct arm64_bootparams *abp) dbg_monitor_init(); kdb_init(); + pan_enable(); early_boot = 0; } Modified: stable/11/sys/arm64/arm64/mp_machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/mp_machdep.c Tue May 30 12:00:56 2017 (r319201) +++ stable/11/sys/arm64/arm64/mp_machdep.c Tue May 30 12:26:36 2017 (r319202) @@ -278,6 +278,7 @@ init_secondary(uint64_t cpu) #endif dbg_monitor_init(); + pan_enable(); /* Enable interrupts */ intr_enable(); Modified: stable/11/sys/arm64/arm64/support.S ============================================================================== --- stable/11/sys/arm64/arm64/support.S Tue May 30 12:00:56 2017 (r319201) +++ stable/11/sys/arm64/arm64/support.S Tue May 30 12:26:36 2017 (r319202) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); */ ENTRY(fsu_fault) SET_FAULT_HANDLER(xzr, x1) /* Reset the handler function */ + EXIT_USER_ACCESS_CHECK(w0, x1) fsu_fault_nopcb: mov x0, #-1 ret @@ -57,11 +58,13 @@ ENTRY(casueword32) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x4) /* And set it */ + ENTER_USER_ACCESS(w6, x4) 1: ldxr w4, [x0] /* Load-exclusive the data */ cmp w4, w1 /* Compare */ b.ne 2f /* Not equal, exit */ stxr w5, w3, [x0] /* Store the new data */ cbnz w5, 1b /* Retry on failure */ + EXIT_USER_ACCESS(w6) 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str w4, [x2] /* Store the read data */ mov x0, #0 /* Success */ @@ -77,11 +80,13 @@ ENTRY(casueword) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x4) /* And set it */ + ENTER_USER_ACCESS(w6, x4) 1: ldxr x4, [x0] /* Load-exclusive the data */ cmp x4, x1 /* Compare */ b.ne 2f /* Not equal, exit */ stxr w5, x3, [x0] /* Store the new data */ cbnz w5, 1b /* Retry on failure */ + EXIT_USER_ACCESS(w6) 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str x4, [x2] /* Store the read data */ mov x0, #0 /* Success */ @@ -97,7 +102,7 @@ ENTRY(fubyte) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x1) /* And set it */ - ldrb w0, [x0] /* Try loading the data */ + ldtrb w0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x1) /* Reset the fault handler */ ret /* Return */ END(fubyte) @@ -111,7 +116,7 @@ ENTRY(fuword16) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x1) /* And set it */ - ldrh w0, [x0] /* Try loading the data */ + ldtrh w0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x1) /* Reset the fault handler */ ret /* Return */ END(fuword16) @@ -125,7 +130,7 @@ ENTRY(fueword32) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - ldr w0, [x0] /* Try loading the data */ + ldtr w0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ str w0, [x1] /* Save the data in kernel space */ mov w0, #0 /* Success */ @@ -143,7 +148,7 @@ EENTRY(fueword64) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - ldr x0, [x0] /* Try loading the data */ + ldtr x0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ str x0, [x1] /* Save the data in kernel space */ mov x0, #0 /* Success */ @@ -160,7 +165,7 @@ ENTRY(subyte) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - strb w1, [x0] /* Try storing the data */ + sttrb w1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ @@ -175,7 +180,7 @@ ENTRY(suword16) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - strh w1, [x0] /* Try storing the data */ + sttrh w1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ @@ -190,7 +195,7 @@ ENTRY(suword32) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - str w1, [x0] /* Try storing the data */ + sttr w1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ @@ -206,7 +211,7 @@ EENTRY(suword64) b.cs fsu_fault_nopcb adr x6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - str x1, [x0] /* Try storing the data */ + sttr x1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ @@ -224,6 +229,7 @@ END(suword) */ ENTRY(fsu_intr_fault) SET_FAULT_HANDLER(xzr, x1) /* Reset the handler function */ + EXIT_USER_ACCESS_CHECK(w0, x1) mov x0, #-1 ret END(fsu_fault) @@ -237,7 +243,7 @@ ENTRY(fuswintr) b.cs fsu_fault_nopcb adr x6, fsu_intr_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x1) /* And set it */ - ldr w0, [x0] /* Try loading the data */ + ldtr w0, [x0] /* Try loading the data */ SET_FAULT_HANDLER(xzr, x1) /* Reset the fault handler */ ret /* Return */ END(fuswintr) @@ -251,7 +257,7 @@ ENTRY(suswintr) b.cs fsu_fault_nopcb adr x6, fsu_intr_fault /* Load the fault handler */ SET_FAULT_HANDLER(x6, x2) /* And set it */ - str w1, [x0] /* Try storing the data */ + sttr w1, [x0] /* Try storing the data */ SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ mov x0, #0 /* Success */ ret /* Return */ Modified: stable/11/sys/arm64/include/armreg.h ============================================================================== --- stable/11/sys/arm64/include/armreg.h Tue May 30 12:00:56 2017 (r319201) +++ stable/11/sys/arm64/include/armreg.h Tue May 30 12:26:36 2017 (r319202) @@ -312,6 +312,7 @@ #define ID_AA64MMFR1_PAN(x) ((x) & ID_AA64MMFR1_PAN_MASK) #define ID_AA64MMFR1_PAN_NONE (0x0 << ID_AA64MMFR1_PAN_SHIFT) #define ID_AA64MMFR1_PAN_IMPL (0x1 << ID_AA64MMFR1_PAN_SHIFT) +#define ID_AA64MMFR1_PAN_ATS1E1 (0x2 << ID_AA64MMFR1_PAN_SHIFT) /* ID_AA64PFR0_EL1 */ #define ID_AA64PFR0_MASK 0x0fffffff Modified: stable/11/sys/arm64/include/asm.h ============================================================================== --- stable/11/sys/arm64/include/asm.h Tue May 30 12:00:56 2017 (r319201) +++ stable/11/sys/arm64/include/asm.h Tue May 30 12:26:36 2017 (r319202) @@ -68,4 +68,23 @@ ldr tmp, [tmp, #TD_PCB]; /* Load the pcb */ \ str handler, [tmp, #PCB_ONFAULT] /* Set the handler */ +#define ENTER_USER_ACCESS(reg, tmp) \ + ldr tmp, =has_pan; /* Get the addr of has_pan */ \ + ldr reg, [tmp]; /* Read it */ \ + cbz reg, 997f; /* If no PAN skip */ \ + .inst 0xd500409f | (0 << 8); /* Clear PAN */ \ + 997: + +#define EXIT_USER_ACCESS(reg) \ + cbz reg, 998f; /* If no PAN skip */ \ + .inst 0xd500409f | (1 << 8); /* Set PAN */ \ + 998: + +#define EXIT_USER_ACCESS_CHECK(reg, tmp) \ + ldr tmp, =has_pan; /* Get the addr of has_pan */ \ + ldr reg, [tmp]; /* Read it */ \ + cbz reg, 999f; /* If no PAN skip */ \ + .inst 0xd500409f | (1 << 8); /* Set PAN */ \ + 999: + #endif /* _MACHINE_ASM_H_ */ Modified: stable/11/sys/arm64/include/cpufunc.h ============================================================================== --- stable/11/sys/arm64/include/cpufunc.h Tue May 30 12:00:56 2017 (r319201) +++ stable/11/sys/arm64/include/cpufunc.h Tue May 30 12:26:36 2017 (r319202) @@ -33,6 +33,8 @@ #include +void pan_enable(void); + static __inline void breakpoint(void) { From owner-svn-src-all@freebsd.org Tue May 30 12:44:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F9CB7C086; Tue, 30 May 2017 12:44:03 +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 EED9E84785; Tue, 30 May 2017 12:44:02 +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 v4UCi2sh096020; Tue, 30 May 2017 12:44:02 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UCi1t1096018; Tue, 30 May 2017 12:44:01 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301244.v4UCi1t1096018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 12:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319203 - in stable/11/sys/arm64: arm64 include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 12:44:03 -0000 Author: andrew Date: Tue May 30 12:44:01 2017 New Revision: 319203 URL: https://svnweb.freebsd.org/changeset/base/319203 Log: MFC r316734, r316761: Support Execute-Never bit in the arm64 pmap. r316734: Start to use the User and Privileged execute-never bits in the arm64 pagetables. This sets both bits when entering an address we know shouldn't be executed. I expect we could mark all userspace pages as Privileged execute-never to ensure the kernel doesn't branch to one of these addresses. While here add the ARMv8.1 upper attributes. r316761: Set the arm64 Execute-never bits in more places. We need to set the Execute-never bits when mapping device memory as the hardware may perform speculative instruction fetches. Set the Privileged Execute-ever bit on userspace memory to stop the kernel if it is tricked into executing it. Modified: stable/11/sys/arm64/arm64/pmap.c stable/11/sys/arm64/include/pte.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/pmap.c ============================================================================== --- stable/11/sys/arm64/arm64/pmap.c Tue May 30 12:26:36 2017 (r319202) +++ stable/11/sys/arm64/arm64/pmap.c Tue May 30 12:44:01 2017 (r319203) @@ -606,7 +606,7 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t mi l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); pmap_load_store(&pagetable_dmap[l1_slot], - (pa & ~L1_OFFSET) | ATTR_DEFAULT | + (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN | ATTR_IDX(CACHED_MEMORY) | L1_BLOCK); } @@ -1127,7 +1127,7 @@ static void pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode) { pd_entry_t *pde; - pt_entry_t *pte; + pt_entry_t *pte, attr; vm_offset_t va; int lvl; @@ -1138,6 +1138,10 @@ pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_ KASSERT((size & PAGE_MASK) == 0, ("pmap_kenter: Mapping is not page-sized")); + attr = ATTR_DEFAULT | ATTR_IDX(mode) | L3_PAGE; + if (mode == DEVICE_MEMORY) + attr |= ATTR_XN; + va = sva; while (size != 0) { pde = pmap_pde(kernel_pmap, va, &lvl); @@ -1146,8 +1150,7 @@ pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_ KASSERT(lvl == 2, ("pmap_kenter: Invalid level %d", lvl)); pte = pmap_l2_to_l3(pde, va); - pmap_load_store(pte, (pa & ~L3_OFFSET) | ATTR_DEFAULT | - ATTR_IDX(mode) | L3_PAGE); + pmap_load_store(pte, (pa & ~L3_OFFSET) | attr); PTE_SYNC(pte); va += PAGE_SIZE; @@ -1259,6 +1262,8 @@ pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count) m = ma[i]; pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_AP(ATTR_AP_RW) | ATTR_IDX(m->md.pv_memattr) | L3_PAGE; + if (m->md.pv_memattr == DEVICE_MEMORY) + pa |= ATTR_XN; pte = pmap_l2_to_l3(pde, va); pmap_load_store(pte, pa); PTE_SYNC(pte); @@ -2428,14 +2433,16 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t { vm_offset_t va, va_next; pd_entry_t *l0, *l1, *l2; - pt_entry_t *l3p, l3; + pt_entry_t *l3p, l3, nbits; - if ((prot & VM_PROT_READ) == VM_PROT_NONE) { + KASSERT((prot & ~VM_PROT_ALL) == 0, ("invalid prot %x", prot)); + if (prot == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); return; } - if ((prot & VM_PROT_WRITE) == VM_PROT_WRITE) + if ((prot & (VM_PROT_WRITE | VM_PROT_EXECUTE)) == + (VM_PROT_WRITE | VM_PROT_EXECUTE)) return; PMAP_LOCK(pmap); @@ -2480,17 +2487,25 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t for (l3p = pmap_l2_to_l3(l2, sva); sva != va_next; l3p++, sva += L3_SIZE) { l3 = pmap_load(l3p); - if (pmap_l3_valid(l3)) { + if (!pmap_l3_valid(l3)) + continue; + + nbits = 0; + if ((prot & VM_PROT_WRITE) == 0) { if ((l3 & ATTR_SW_MANAGED) && pmap_page_dirty(l3)) { vm_page_dirty(PHYS_TO_VM_PAGE(l3 & ~ATTR_MASK)); } - pmap_set(l3p, ATTR_AP(ATTR_AP_RO)); - PTE_SYNC(l3p); - /* XXX: Use pmap_invalidate_range */ - pmap_invalidate_page(pmap, va); + nbits |= ATTR_AP(ATTR_AP_RO); } + if ((prot & VM_PROT_EXECUTE) == 0) + nbits |= ATTR_XN; + + pmap_set(l3p, nbits); + PTE_SYNC(l3p); + /* XXX: Use pmap_invalidate_range */ + pmap_invalidate_page(pmap, va); } } PMAP_UNLOCK(pmap); @@ -2709,10 +2724,12 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v L3_PAGE); if ((prot & VM_PROT_WRITE) == 0) new_l3 |= ATTR_AP(ATTR_AP_RO); + if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == DEVICE_MEMORY) + new_l3 |= ATTR_XN; if ((flags & PMAP_ENTER_WIRED) != 0) new_l3 |= ATTR_SW_WIRED; if ((va >> 63) == 0) - new_l3 |= ATTR_AP(ATTR_AP_USER); + new_l3 |= ATTR_AP(ATTR_AP_USER) | ATTR_PXN; CTR2(KTR_PMAP, "pmap_enter: %.16lx -> %.16lx", va, pa); @@ -3115,6 +3132,10 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_IDX(m->md.pv_memattr) | ATTR_AP(ATTR_AP_RO) | L3_PAGE; + if ((prot & VM_PROT_EXECUTE) == 0 || m->md.pv_memattr == DEVICE_MEMORY) + pa |= ATTR_XN; + else if (va < VM_MAXUSER_ADDRESS) + pa |= ATTR_PXN; /* * Now validate mapping with RO protection @@ -4251,6 +4272,8 @@ pmap_change_attr_locked(vm_offset_t va, vm_size_t size l3 = pmap_load(pte); l3 &= ~ATTR_IDX_MASK; l3 |= ATTR_IDX(mode); + if (mode == DEVICE_MEMORY) + l3 |= ATTR_XN; pmap_update_entry(kernel_pmap, pte, l3, tmpva, PAGE_SIZE); Modified: stable/11/sys/arm64/include/pte.h ============================================================================== --- stable/11/sys/arm64/include/pte.h Tue May 30 12:26:36 2017 (r319202) +++ stable/11/sys/arm64/include/pte.h Tue May 30 12:44:01 2017 (r319203) @@ -46,6 +46,11 @@ typedef uint64_t pt_entry_t; /* page table entry */ /* Bits 58:55 are reserved for software */ #define ATTR_SW_MANAGED (1UL << 56) #define ATTR_SW_WIRED (1UL << 55) +#define ATTR_UXN (1UL << 54) +#define ATTR_PXN (1UL << 53) +#define ATTR_XN (ATTR_PXN | ATTR_UXN) +#define ATTR_CONTIGUOUS (1UL << 52) +#define ATTR_DBM (1UL << 51) #define ATTR_nG (1 << 11) #define ATTR_AF (1 << 10) #define ATTR_SH(x) ((x) << 8) From owner-svn-src-all@freebsd.org Tue May 30 13:02:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C882CB7C7D5; Tue, 30 May 2017 13:02:11 +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 8C69189; Tue, 30 May 2017 13:02:11 +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 v4UD2Ajv003757; Tue, 30 May 2017 13:02:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UD2AOv003348; Tue, 30 May 2017 13:02:10 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301302.v4UD2AOv003348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 13:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319204 - in stable/11/sys/arm64: arm64 include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 13:02:11 -0000 Author: andrew Date: Tue May 30 13:02:10 2017 New Revision: 319204 URL: https://svnweb.freebsd.org/changeset/base/319204 Log: MFC r313396: Push reading of ESR_EL1 to assembly. Among other uses this will allow us to expose this to signal handlers, e.g. for the clang sanitizers. Modified: stable/11/sys/arm64/arm64/exception.S stable/11/sys/arm64/arm64/genassym.c stable/11/sys/arm64/arm64/trap.c stable/11/sys/arm64/include/frame.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/exception.S ============================================================================== --- stable/11/sys/arm64/arm64/exception.S Tue May 30 12:44:01 2017 (r319203) +++ stable/11/sys/arm64/arm64/exception.S Tue May 30 13:02:10 2017 (r319204) @@ -56,10 +56,12 @@ __FBSDID("$FreeBSD$"); stp x0, x1, [sp, #(TF_X + 0 * 8)] mrs x10, elr_el1 mrs x11, spsr_el1 + mrs x12, esr_el1 .if \el == 0 mrs x18, sp_el0 .endif - stp x10, x11, [sp, #(TF_ELR)] + str x10, [sp, #(TF_ELR)] + stp w11, w12, [sp, #(TF_SPSR)] stp x18, lr, [sp, #(TF_SP)] mrs x18, tpidr_el1 add x29, sp, #(TF_SIZE) Modified: stable/11/sys/arm64/arm64/genassym.c ============================================================================== --- stable/11/sys/arm64/arm64/genassym.c Tue May 30 12:44:01 2017 (r319203) +++ stable/11/sys/arm64/arm64/genassym.c Tue May 30 13:02:10 2017 (r319204) @@ -62,4 +62,5 @@ ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(TF_SIZE, sizeof(struct trapframe)); ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); ASSYM(TF_ELR, offsetof(struct trapframe, tf_elr)); +ASSYM(TF_SPSR, offsetof(struct trapframe, tf_spsr)); ASSYM(TF_X, offsetof(struct trapframe, tf_x)); Modified: stable/11/sys/arm64/arm64/trap.c ============================================================================== --- stable/11/sys/arm64/arm64/trap.c Tue May 30 12:44:01 2017 (r319203) +++ stable/11/sys/arm64/arm64/trap.c Tue May 30 13:02:10 2017 (r319204) @@ -254,7 +254,7 @@ print_registers(struct trapframe *frame) printf(" sp: %16lx\n", frame->tf_sp); printf(" lr: %16lx\n", frame->tf_lr); printf(" elr: %16lx\n", frame->tf_elr); - printf("spsr: %16lx\n", frame->tf_spsr); + printf("spsr: %8x\n", frame->tf_spsr); } void @@ -264,7 +264,7 @@ do_el1h_sync(struct trapframe *frame) uint64_t esr, far; /* Read the esr register to get the exception details */ - esr = READ_SPECIALREG(esr_el1); + esr = frame->tf_esr; exception = ESR_ELx_EXCEPTION(esr); #ifdef KDTRACE_HOOKS @@ -341,7 +341,7 @@ do_el0_sync(struct trapframe *frame) td = curthread; td->td_frame = frame; - esr = READ_SPECIALREG(esr_el1); + esr = frame->tf_esr; exception = ESR_ELx_EXCEPTION(esr); switch (exception) { case EXCP_UNKNOWN: Modified: stable/11/sys/arm64/include/frame.h ============================================================================== --- stable/11/sys/arm64/include/frame.h Tue May 30 12:44:01 2017 (r319203) +++ stable/11/sys/arm64/include/frame.h Tue May 30 13:02:10 2017 (r319204) @@ -45,7 +45,8 @@ struct trapframe { uint64_t tf_sp; uint64_t tf_lr; uint64_t tf_elr; - uint64_t tf_spsr; + uint32_t tf_spsr; + uint32_t tf_esr; uint64_t tf_x[30]; }; From owner-svn-src-all@freebsd.org Tue May 30 13:16:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6481CB7CA63; Tue, 30 May 2017 13:16:08 +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 3B14C94B; Tue, 30 May 2017 13:16:08 +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 v4UDG7bA008420; Tue, 30 May 2017 13:16:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UDG7FY008417; Tue, 30 May 2017 13:16:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301316.v4UDG7FY008417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 13:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319205 - stable/11/sys/arm64/arm64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 13:16:08 -0000 Author: andrew Date: Tue May 30 13:16:06 2017 New Revision: 319205 URL: https://svnweb.freebsd.org/changeset/base/319205 Log: MFC r317192: Push loading curthread into assembly in the synchronous exception handlers. This will help investigating the performance impact of moving parts of the switch statement in do_el0_sync into assembly. Modified: stable/11/sys/arm64/arm64/exception.S stable/11/sys/arm64/arm64/genassym.c stable/11/sys/arm64/arm64/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/exception.S ============================================================================== --- stable/11/sys/arm64/arm64/exception.S Tue May 30 13:02:10 2017 (r319204) +++ stable/11/sys/arm64/arm64/exception.S Tue May 30 13:16:06 2017 (r319205) @@ -143,7 +143,8 @@ __FBSDID("$FreeBSD$"); ENTRY(handle_el1h_sync) save_registers 1 - mov x0, sp + ldr x0, [x18, #PC_CURTHREAD] + mov x1, sp bl do_el1h_sync restore_registers 1 eret @@ -163,7 +164,9 @@ END(handle_el1h_error) ENTRY(handle_el0_sync) save_registers 0 - mov x0, sp + ldr x0, [x18, #PC_CURTHREAD] + mov x1, sp + str x1, [x0, #TD_FRAME] bl do_el0_sync do_ast restore_registers 0 Modified: stable/11/sys/arm64/arm64/genassym.c ============================================================================== --- stable/11/sys/arm64/arm64/genassym.c Tue May 30 13:02:10 2017 (r319204) +++ stable/11/sys/arm64/arm64/genassym.c Tue May 30 13:16:06 2017 (r319205) @@ -57,6 +57,7 @@ ASSYM(SF_UC, offsetof(struct sigframe, sf_uc)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); +ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(TF_SIZE, sizeof(struct trapframe)); Modified: stable/11/sys/arm64/arm64/trap.c ============================================================================== --- stable/11/sys/arm64/arm64/trap.c Tue May 30 13:02:10 2017 (r319204) +++ stable/11/sys/arm64/arm64/trap.c Tue May 30 13:16:06 2017 (r319205) @@ -72,8 +72,8 @@ __FBSDID("$FreeBSD$"); extern register_t fsu_intr_fault; /* Called from exception.S */ -void do_el1h_sync(struct trapframe *); -void do_el0_sync(struct trapframe *); +void do_el1h_sync(struct thread *, struct trapframe *); +void do_el0_sync(struct thread *, struct trapframe *); void do_el0_error(struct trapframe *); static void print_registers(struct trapframe *frame); @@ -130,23 +130,20 @@ cpu_fetch_syscall_args(struct thread *td, struct sysca #include "../../kern/subr_syscall.c" static void -svc_handler(struct trapframe *frame) +svc_handler(struct thread *td, struct trapframe *frame) { struct syscall_args sa; - struct thread *td; int error; - td = curthread; - error = syscallenter(td, &sa); syscallret(td, error, &sa); } static void -data_abort(struct trapframe *frame, uint64_t esr, uint64_t far, int lower) +data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, + uint64_t far, int lower) { struct vm_map *map; - struct thread *td; struct proc *p; struct pcb *pcb; vm_prot_t ftype; @@ -167,7 +164,6 @@ data_abort(struct trapframe *frame, uint64_t esr, uint } #endif - td = curthread; pcb = td->td_pcb; /* @@ -258,7 +254,7 @@ print_registers(struct trapframe *frame) } void -do_el1h_sync(struct trapframe *frame) +do_el1h_sync(struct thread *td, struct trapframe *frame) { uint32_t exception; uint64_t esr, far; @@ -273,8 +269,8 @@ do_el1h_sync(struct trapframe *frame) #endif CTR4(KTR_TRAP, - "do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", - curthread, esr, frame->tf_elr, frame); + "do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", td, + esr, frame->tf_elr, frame); switch(exception) { case EXCP_FP_SIMD: @@ -286,7 +282,7 @@ do_el1h_sync(struct trapframe *frame) case EXCP_DATA_ABORT: far = READ_SPECIALREG(far_el1); intr_enable(); - data_abort(frame, esr, far, 0); + data_abort(td, frame, esr, far, 0); break; case EXCP_BRK: #ifdef KDTRACE_HOOKS @@ -327,9 +323,8 @@ el0_excp_unknown(struct trapframe *frame, uint64_t far } void -do_el0_sync(struct trapframe *frame) +do_el0_sync(struct thread *td, struct trapframe *frame) { - struct thread *td; uint32_t exception; uint64_t esr, far; @@ -338,9 +333,6 @@ do_el0_sync(struct trapframe *frame) ("Invalid pcpu address from userland: %p (tpidr %lx)", get_pcpu(), READ_SPECIALREG(tpidr_el1))); - td = curthread; - td->td_frame = frame; - esr = frame->tf_esr; exception = ESR_ELx_EXCEPTION(esr); switch (exception) { @@ -353,8 +345,8 @@ do_el0_sync(struct trapframe *frame) intr_enable(); CTR4(KTR_TRAP, - "do_el0_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", - curthread, esr, frame->tf_elr, frame); + "do_el0_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", td, esr, + frame->tf_elr, frame); switch(exception) { case EXCP_FP_SIMD: @@ -366,12 +358,12 @@ do_el0_sync(struct trapframe *frame) #endif break; case EXCP_SVC: - svc_handler(frame); + svc_handler(td, frame); break; case EXCP_INSN_ABORT_L: case EXCP_DATA_ABORT_L: case EXCP_DATA_ABORT: - data_abort(frame, esr, far, 1); + data_abort(td, frame, esr, far, 1); break; case EXCP_UNKNOWN: el0_excp_unknown(frame, far); From owner-svn-src-all@freebsd.org Tue May 30 13:21:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E37AEB7CD5C; Tue, 30 May 2017 13:21:44 +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 ACEAF1041; Tue, 30 May 2017 13:21:44 +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 v4UDLhj7009964; Tue, 30 May 2017 13:21:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UDLhYb009963; Tue, 30 May 2017 13:21:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301321.v4UDLhYb009963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 13:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319206 - stable/11/sys/arm64/arm64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 13:21:45 -0000 Author: andrew Date: Tue May 30 13:21:43 2017 New Revision: 319206 URL: https://svnweb.freebsd.org/changeset/base/319206 Log: MFC r317197: Restrict the arm64 supervisor all instructions to only allow a zero immediate value for system calls. We may wish to use other values in the future for other purposes. Modified: stable/11/sys/arm64/arm64/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/trap.c ============================================================================== --- stable/11/sys/arm64/arm64/trap.c Tue May 30 13:16:06 2017 (r319205) +++ stable/11/sys/arm64/arm64/trap.c Tue May 30 13:21:43 2017 (r319206) @@ -135,8 +135,13 @@ svc_handler(struct thread *td, struct trapframe *frame struct syscall_args sa; int error; - error = syscallenter(td, &sa); - syscallret(td, error, &sa); + if ((frame->tf_esr & ESR_ELx_ISS_MASK) == 0) { + error = syscallenter(td, &sa); + syscallret(td, error, &sa); + } else { + call_trapsignal(td, SIGILL, ILL_ILLOPN, (void *)frame->tf_elr); + userret(td, frame); + } } static void From owner-svn-src-all@freebsd.org Tue May 30 13:26:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6E01B7CE91; Tue, 30 May 2017 13:26:38 +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 C29D813CD; Tue, 30 May 2017 13:26:38 +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 v4UDQbsM012953; Tue, 30 May 2017 13:26:37 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UDQbdq012949; Tue, 30 May 2017 13:26:37 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301326.v4UDQbdq012949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 13:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319207 - in stable/11/sys: arm64/arm64 conf dev/psci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 13:26:39 -0000 Author: andrew Date: Tue May 30 13:26:37 2017 New Revision: 319207 URL: https://svnweb.freebsd.org/changeset/base/319207 Log: MFC r317361: Call the PSCI reset from cpu_reset on arm64. When rebooting from DDB the kernel calls this directly so the event handler is not called, meaning the computer fails to reboot. Modified: stable/11/sys/arm64/arm64/vm_machdep.c stable/11/sys/conf/options.arm64 stable/11/sys/dev/psci/psci.c stable/11/sys/dev/psci/psci.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/vm_machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/vm_machdep.c Tue May 30 13:21:43 2017 (r319206) +++ stable/11/sys/arm64/arm64/vm_machdep.c Tue May 30 13:26:37 2017 (r319207) @@ -25,6 +25,8 @@ * */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -52,6 +54,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef DEV_PSCI +#include +#endif + /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child @@ -112,7 +118,11 @@ void cpu_reset(void) { - printf("cpu_reset"); +#ifdef DEV_PSCI + psci_reset(); +#endif + + printf("cpu_reset failed"); while(1) __asm volatile("wfi" ::: "memory"); } Modified: stable/11/sys/conf/options.arm64 ============================================================================== --- stable/11/sys/conf/options.arm64 Tue May 30 13:21:43 2017 (r319206) +++ stable/11/sys/conf/options.arm64 Tue May 30 13:26:37 2017 (r319207) @@ -7,6 +7,8 @@ SOCDEV_VA opt_global.h THUNDERX_PASS_1_1_ERRATA opt_global.h VFP opt_global.h +DEV_PSCI opt_platform.h + # SoC Support SOC_CAVM_THUNDERX opt_soc.h SOC_HISI_HI6220 opt_soc.h Modified: stable/11/sys/dev/psci/psci.c ============================================================================== --- stable/11/sys/dev/psci/psci.c Tue May 30 13:21:43 2017 (r319206) +++ stable/11/sys/dev/psci/psci.c Tue May 30 13:26:37 2017 (r319207) @@ -221,6 +221,13 @@ psci_shutdown(void *xsc, int howto) /* System reset and off do not return. */ } +void +psci_reset(void) +{ + + psci_shutdown(NULL, 0); +} + static int psci_v0_1_init(device_t dev) { Modified: stable/11/sys/dev/psci/psci.h ============================================================================== --- stable/11/sys/dev/psci/psci.h Tue May 30 13:21:43 2017 (r319206) +++ stable/11/sys/dev/psci/psci.h Tue May 30 13:26:37 2017 (r319207) @@ -36,7 +36,7 @@ typedef int (*psci_callfn_t)(register_t, register_t, r extern int psci_present; -void psci_system_reset(void); +void psci_reset(void); int psci_cpu_on(unsigned long, unsigned long, unsigned long); int psci_hvc_despatch(register_t, register_t, register_t, register_t); int psci_smc_despatch(register_t, register_t, register_t, register_t); From owner-svn-src-all@freebsd.org Tue May 30 13:35:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DCD2B7D199; Tue, 30 May 2017 13:35:55 +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 195F61CE4; Tue, 30 May 2017 13:35:55 +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 v4UDZsma017208; Tue, 30 May 2017 13:35:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UDZsTl017207; Tue, 30 May 2017 13:35:54 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301335.v4UDZsTl017207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 13:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319210 - stable/11/sys/arm64/arm64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 13:35:55 -0000 Author: andrew Date: Tue May 30 13:35:54 2017 New Revision: 319210 URL: https://svnweb.freebsd.org/changeset/base/319210 Log: MFC r317824: Add reclaim_pv_chunk on arm64. This is based on the amd64 code so should operate similarly, other than not needing the delayed invalidation. It has been tested with artificial injection of vm_page_alloc failures while running 'sort /dev/zero'. Modified: stable/11/sys/arm64/arm64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/pmap.c ============================================================================== --- stable/11/sys/arm64/arm64/pmap.c Tue May 30 13:31:18 2017 (r319209) +++ stable/11/sys/arm64/arm64/pmap.c Tue May 30 13:35:54 2017 (r319210) @@ -1849,8 +1849,129 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp) { + struct pch new_tail; + struct pv_chunk *pc; + struct md_page *pvh; + pd_entry_t *pde; + pmap_t pmap; + pt_entry_t *pte, tpte; + pv_entry_t pv; + vm_offset_t va; + vm_page_t m, m_pc; + struct spglist free; + uint64_t inuse; + int bit, field, freed, lvl; - panic("ARM64TODO: reclaim_pv_chunk"); + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + KASSERT(lockp != NULL, ("reclaim_pv_chunk: lockp is NULL")); + pmap = NULL; + m_pc = NULL; + SLIST_INIT(&free); + TAILQ_INIT(&new_tail); + mtx_lock(&pv_chunks_mutex); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && SLIST_EMPTY(&free)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + mtx_unlock(&pv_chunks_mutex); + if (pmap != pc->pc_pmap) { + if (pmap != NULL && pmap != locked_pmap) + PMAP_UNLOCK(pmap); + pmap = pc->pc_pmap; + /* Avoid deadlock and lock recursion. */ + if (pmap > locked_pmap) { + RELEASE_PV_LIST_LOCK(lockp); + PMAP_LOCK(pmap); + } else if (pmap != locked_pmap && + !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + mtx_lock(&pv_chunks_mutex); + continue; + } + } + + /* + * Destroy every non-wired, 4 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = ffsl(inuse) - 1; + pv = &pc->pc_pventry[field * 64 + bit]; + va = pv->pv_va; + pde = pmap_pde(pmap, va, &lvl); + if (lvl != 2) + continue; + pte = pmap_l2_to_l3(pde, va); + tpte = pmap_load(pte); + if ((tpte & ATTR_SW_WIRED) != 0) + continue; + tpte = pmap_load_clear(pte); + PTE_SYNC(pte); + pmap_invalidate_page(pmap, va); + m = PHYS_TO_VM_PAGE(tpte & ~ATTR_MASK); + if (pmap_page_dirty(tpte)) + vm_page_dirty(m); + if ((tpte & ATTR_AF) != 0) + vm_page_aflag_set(m, PGA_REFERENCED); + CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); + m->md.pv_gen++; + if (TAILQ_EMPTY(&m->md.pv_list) && + (m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + if (TAILQ_EMPTY(&pvh->pv_list)) { + vm_page_aflag_clear(m, + PGA_WRITEABLE); + } + } + pc->pc_map[field] |= 1UL << bit; + pmap_unuse_l3(pmap, va, pmap_load(pde), &free); + freed++; + } + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + mtx_lock(&pv_chunks_mutex); + continue; + } + /* Every freed mapping is for a 4 KB page. */ + pmap_resident_count_dec(pmap, freed); + PV_STAT(atomic_add_long(&pv_entry_frees, freed)); + PV_STAT(atomic_add_int(&pv_entry_spare, freed)); + PV_STAT(atomic_subtract_long(&pv_entry_count, freed)); + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + if (pc->pc_map[0] == PC_FREE0 && pc->pc_map[1] == PC_FREE1 && + pc->pc_map[2] == PC_FREE2) { + PV_STAT(atomic_subtract_int(&pv_entry_spare, _NPCPV)); + PV_STAT(atomic_subtract_int(&pc_chunk_count, 1)); + PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); + /* Entire chunk is free; return it. */ + m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m_pc->phys_addr); + mtx_lock(&pv_chunks_mutex); + break; + } + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + mtx_lock(&pv_chunks_mutex); + /* One freed pv entry in locked_pmap is sufficient. */ + if (pmap == locked_pmap) + break; + } + TAILQ_CONCAT(&pv_chunks, &new_tail, pc_lru); + mtx_unlock(&pv_chunks_mutex); + if (pmap != NULL && pmap != locked_pmap) + PMAP_UNLOCK(pmap); + if (m_pc == NULL && !SLIST_EMPTY(&free)) { + m_pc = SLIST_FIRST(&free); + SLIST_REMOVE_HEAD(&free, plinks.s.ss); + /* Recycle a freed page table page. */ + m_pc->wire_count = 1; + atomic_add_int(&vm_cnt.v_wire_count, 1); + } + pmap_free_zero_pages(&free); + return (m_pc); } /* From owner-svn-src-all@freebsd.org Tue May 30 13:35:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3966B7D1A8; Tue, 30 May 2017 13:35:56 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 643E61CE8; Tue, 30 May 2017 13:35:56 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1dFhJL-000NxN-N6; Tue, 30 May 2017 16:35:47 +0300 Date: Tue, 30 May 2017 16:35:47 +0300 From: Slawa Olhovchenkov To: Eric Badger Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r317529 - in stable: 10/sys/sys 11/sys/sys Message-ID: <20170530133547.GB3182@zxy.spb.ru> References: <201704272228.v3RMSoIg000680@repo.freebsd.org> <20170509203244.GA3182@zxy.spb.ru> <6dc19869-1d5e-cd7d-9dca-64379c482f3f@FreeBSD.org> <20170510125721.GE3165@zxy.spb.ru> <7b33f65d-380a-bb0e-032f-d84253871536@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7b33f65d-380a-bb0e-032f-d84253871536@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 13:35:56 -0000 On Tue, May 23, 2017 at 07:43:43AM -0500, Eric Badger wrote: > On 05/10/2017 07:57 AM, Slawa Olhovchenkov wrote: > > On Tue, May 09, 2017 at 09:14:20PM -0500, Eric Badger wrote: > > > >> On 05/09/2017 03:32 PM, Slawa Olhovchenkov wrote: > >>> On Thu, Apr 27, 2017 at 10:28:50PM +0000, Eric Badger wrote: > >>> > >>>> Author: badger > >>>> Date: Thu Apr 27 22:28:49 2017 > >>>> New Revision: 317529 > >>>> URL: https://svnweb.freebsd.org/changeset/base/317529 > >>>> > >>>> Log: > >>>> Move td_sigqueue to the end of struct thread > >>>> > >>>> In order to preserve KBI in stable branches, replace the existing > >>>> td_sigqueue slot with padding and move the expanded (as of r315949) > >>>> td_sigqueue to the end of the struct. > >>>> > >>>> Reported by: jhb > >>>> Suggested by: kib > >>>> Reviewed by: jhb, kib, vangyzen > >>>> Sponsored by: Dell EMC > >>>> Differential Revision: https://reviews.freebsd.org/D10515 > >>>> > >>>> Modified: > >>>> stable/10/sys/sys/proc.h > >>> > >>> Is this resolve only crash related to nvidia-driver? > >>> Like virtualbox related crash still occur. > >>> > >> > >> Yes, this was intended to address nvidia driver crashes. Is the virtual > >> box problem the same as the one described here? > >> > >> https://lists.freebsd.org/pipermail/freebsd-stable/2017-March/087028.html > > > > I am use GENERIC and GENERIC kernel just reboot, w/o create crush > > dump. > > I mean need to add DDB and KDB to kernel config? > > > > This should be fixed as of r318743. Work for me, 10x! From owner-svn-src-all@freebsd.org Tue May 30 13:53:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 430C8B7D7E6; Tue, 30 May 2017 13:53:05 +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 0EC0E2BF6; Tue, 30 May 2017 13:53: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 v4UDr4YF025487; Tue, 30 May 2017 13:53:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UDr4cl025486; Tue, 30 May 2017 13:53:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705301353.v4UDr4cl025486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 30 May 2017 13:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319212 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 13:53:05 -0000 Author: avg Date: Tue May 30 13:53:03 2017 New Revision: 319212 URL: https://svnweb.freebsd.org/changeset/base/319212 Log: fix indentation MFC after: 4 days Modified: head/sys/x86/x86/identcpu.c Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Tue May 30 13:46:22 2017 (r319211) +++ head/sys/x86/x86/identcpu.c Tue May 30 13:53:03 2017 (r319212) @@ -906,7 +906,7 @@ printcpuinfo(void) "\033DBE" /* Data Breakpoint extension */ "\034PTSC" /* Performance TSC */ "\035PL2I" /* L2I perf count */ - "\036MWAITX" /* MONITORX/MWAITX instructions */ + "\036MWAITX" /* MONITORX/MWAITX instructions */ "\037" "\040" ); From owner-svn-src-all@freebsd.org Tue May 30 13:56:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B7D8B7D91B; Tue, 30 May 2017 13:56:40 +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 E98F32E31; Tue, 30 May 2017 13:56:39 +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 v4UDudTr025666; Tue, 30 May 2017 13:56:39 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UDuc6I025663; Tue, 30 May 2017 13:56:38 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705301356.v4UDuc6I025663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 May 2017 13:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319213 - in stable/11/sys/arm64: arm64 include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 13:56:40 -0000 Author: andrew Date: Tue May 30 13:56:38 2017 New Revision: 319213 URL: https://svnweb.freebsd.org/changeset/base/319213 Log: MFC r307334, r318252: Support write-through caches on arm64 r307334: Create macros for the MAIR memory attributes. While here add an uncached memory type, however the VM code still needs to be taught about this. r318252: Add the VM_MEMATTR_WRITE_THROUGH memory type to arm64 and use it to support VM_MEMATTR_WRITE_COMBINING in the kernel. This fixes a bug where Xorg would use write back cached memory for its graphics buffers. This would produce artifacts on the screen as cachelines were written to memory. Modified: stable/11/sys/arm64/arm64/locore.S stable/11/sys/arm64/include/armreg.h stable/11/sys/arm64/include/vm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/locore.S ============================================================================== --- stable/11/sys/arm64/arm64/locore.S Tue May 30 13:53:03 2017 (r319212) +++ stable/11/sys/arm64/arm64/locore.S Tue May 30 13:56:38 2017 (r319213) @@ -617,8 +617,10 @@ start_mmu: .align 3 mair: - /* Device Normal, no cache Normal, write-back */ - .quad MAIR_ATTR(0x00, 0) | MAIR_ATTR(0x44, 1) | MAIR_ATTR(0xff, 2) + .quad MAIR_ATTR(MAIR_DEVICE_nGnRnE, 0) | \ + MAIR_ATTR(MAIR_NORMAL_NC, 1) | \ + MAIR_ATTR(MAIR_NORMAL_WB, 2) | \ + MAIR_ATTR(MAIR_NORMAL_WT, 3) tcr: .quad (TCR_TxSZ(64 - VIRT_BITS) | TCR_ASID_16 | TCR_TG1_4K | \ TCR_CACHE_ATTRS | TCR_SMP_ATTRS) Modified: stable/11/sys/arm64/include/armreg.h ============================================================================== --- stable/11/sys/arm64/include/armreg.h Tue May 30 13:53:03 2017 (r319212) +++ stable/11/sys/arm64/include/armreg.h Tue May 30 13:56:38 2017 (r319213) @@ -358,6 +358,10 @@ /* MAIR_EL1 - Memory Attribute Indirection Register */ #define MAIR_ATTR_MASK(idx) (0xff << ((n)* 8)) #define MAIR_ATTR(attr, idx) ((attr) << ((idx) * 8)) +#define MAIR_DEVICE_nGnRnE 0x00 +#define MAIR_NORMAL_NC 0x44 +#define MAIR_NORMAL_WT 0x88 +#define MAIR_NORMAL_WB 0xff /* PAR_EL1 - Physical Address Register */ #define PAR_F_SHIFT 0 Modified: stable/11/sys/arm64/include/vm.h ============================================================================== --- stable/11/sys/arm64/include/vm.h Tue May 30 13:53:03 2017 (r319212) +++ stable/11/sys/arm64/include/vm.h Tue May 30 13:56:38 2017 (r319213) @@ -30,9 +30,15 @@ #define _MACHINE_VM_H_ /* Memory attribute configuration. */ -#define VM_MEMATTR_DEVICE 0 -#define VM_MEMATTR_UNCACHEABLE 1 -#define VM_MEMATTR_WRITE_BACK 2 +#define VM_MEMATTR_DEVICE 0 +#define VM_MEMATTR_UNCACHEABLE 1 +#define VM_MEMATTR_WRITE_BACK 2 +#define VM_MEMATTR_WRITE_THROUGH 3 + +#ifdef _KERNEL +/* If defined vmstat will try to use both of these in a switch statement */ +#define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WRITE_THROUGH +#endif #define VM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK From owner-svn-src-all@freebsd.org Tue May 30 14:32:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB5D0B7E5E1; Tue, 30 May 2017 14:32:45 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB6436433D; Tue, 30 May 2017 14:32:45 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UEWio8043354; Tue, 30 May 2017 14:32:44 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UEWip8043351; Tue, 30 May 2017 14:32:44 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201705301432.v4UEWip8043351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 30 May 2017 14:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319214 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 14:32:46 -0000 Author: jtl Date: Tue May 30 14:32:44 2017 New Revision: 319214 URL: https://svnweb.freebsd.org/changeset/base/319214 Log: Enforce the limit on ICMP messages before doing work to formulate the response. Delete an unneeded rate limit for UDP under IPv6. Because ICMP6 messages have their own rate limit, it is unnecessary to apply a second rate limit to UDP messages. Reviewed by: glebius MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D10387 Modified: head/sys/netinet/ip_icmp.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Tue May 30 13:56:38 2017 (r319213) +++ head/sys/netinet/ip_icmp.c Tue May 30 14:32:44 2017 (r319214) @@ -540,11 +540,10 @@ icmp_input(struct mbuf **mp, int *offp, int proto) ICMPSTAT_INC(icps_bmcastecho); break; } - icp->icmp_type = ICMP_ECHOREPLY; if (badport_bandlim(BANDLIM_ICMP_ECHO) < 0) goto freeit; - else - goto reflect; + icp->icmp_type = ICMP_ECHOREPLY; + goto reflect; case ICMP_TSTAMP: if (V_icmptstamprepl == 0) @@ -558,13 +557,12 @@ icmp_input(struct mbuf **mp, int *offp, int proto) ICMPSTAT_INC(icps_badlen); break; } + if (badport_bandlim(BANDLIM_ICMP_TSTAMP) < 0) + goto freeit; icp->icmp_type = ICMP_TSTAMPREPLY; icp->icmp_rtime = iptime(); icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */ - if (badport_bandlim(BANDLIM_ICMP_TSTAMP) < 0) - goto freeit; - else - goto reflect; + goto reflect; case ICMP_MASKREQ: if (V_icmpmaskrepl == 0) Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Tue May 30 13:56:38 2017 (r319213) +++ head/sys/netinet6/udp6_usrreq.c Tue May 30 14:32:44 2017 (r319214) @@ -104,9 +104,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include @@ -480,8 +478,6 @@ udp6_input(struct mbuf **mp, int *offp, int proto) goto badunlocked; } if (V_udp_blackhole) - goto badunlocked; - if (badport_bandlim(BANDLIM_ICMP6_UNREACH) < 0) goto badunlocked; icmp6_error(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOPORT, 0); return (IPPROTO_DONE); From owner-svn-src-all@freebsd.org Tue May 30 14:41:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07E99B7E843; Tue, 30 May 2017 14:41:33 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC4026488F; Tue, 30 May 2017 14:41:32 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UEfWa5050278; Tue, 30 May 2017 14:41:32 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UEfW0q050277; Tue, 30 May 2017 14:41:32 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201705301441.v4UEfW0q050277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 30 May 2017 14:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319215 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 14:41:33 -0000 Author: jtl Date: Tue May 30 14:41:31 2017 New Revision: 319215 URL: https://svnweb.freebsd.org/changeset/base/319215 Log: Fix two places in the ICMP6 code where we could dereference a NULL pointer in the icmp6_input() function. When processing an ICMP6_ECHO_REQUEST, if IP6_EXTHDR_GET fails, it will set nicmp6 and n to NULL. Therefore, we should condition our modification to nicmp6 on n being not NULL. And, when processing an ICMP6_WRUREQUEST in the (mode != FQDN) case, if m_dup_pkthdr() fails, the code will set n to NULL. However, the very next line dereferences n. Therefore, when m_dup_pkthdr() fails, we should discontinue further processing and follow the same path as when m_gethdr() fails. Reported by: clang static analyzer Reviewed by: ae MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D10941 Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Tue May 30 14:32:44 2017 (r319214) +++ head/sys/netinet6/icmp6.c Tue May 30 14:41:31 2017 (r319215) @@ -597,9 +597,9 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) sizeof(*nicmp6)); noff = off; } - nicmp6->icmp6_type = ICMP6_ECHO_REPLY; - nicmp6->icmp6_code = 0; if (n) { + nicmp6->icmp6_type = ICMP6_ECHO_REPLY; + nicmp6->icmp6_code = 0; ICMP6STAT_INC(icp6s_reflect); ICMP6STAT_INC(icp6s_outhist[ICMP6_ECHO_REPLY]); icmp6_reflect(n, noff); @@ -689,6 +689,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) */ m_free(n); n = NULL; + break; } maxhlen = M_TRAILINGSPACE(n) - (sizeof(*nip6) + sizeof(*nicmp6) + 4); From owner-svn-src-all@freebsd.org Tue May 30 14:50:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9AC8B7EA8A; Tue, 30 May 2017 14:50:29 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 982D664D8F; Tue, 30 May 2017 14:50:29 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UEoSiQ053663; Tue, 30 May 2017 14:50:28 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UEoSAV053662; Tue, 30 May 2017 14:50:28 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201705301450.v4UEoSAV053662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 30 May 2017 14:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319216 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 14:50:29 -0000 Author: jtl Date: Tue May 30 14:50:28 2017 New Revision: 319216 URL: https://svnweb.freebsd.org/changeset/base/319216 Log: Fix an unnecessary/incorrect check in the PKTOPT_EXTHDRCPY macro. This macro allocates memory and, if malloc does not return NULL, copies data into the new memory. However, it doesn't just check whether malloc returns NULL. It also checks whether we called malloc with M_NOWAIT. That is not necessary. While it may be that malloc() will only return NULL when the M_NOWAIT flag is set, we don't need to check for this when checking malloc's return value. Further, in this case, the check was not completely accurate, because it checked for flags == M_NOWAIT, rather than treating it as a bit field and checking for (flags & M_NOWAIT). Reviewed by: ae MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D10942 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Tue May 30 14:41:31 2017 (r319215) +++ head/sys/netinet6/ip6_output.c Tue May 30 14:50:28 2017 (r319216) @@ -2465,7 +2465,7 @@ do {\ if (src->type) {\ int hlen = (((struct ip6_ext *)src->type)->ip6e_len + 1) << 3;\ dst->type = malloc(hlen, M_IP6OPT, canwait);\ - if (dst->type == NULL && canwait == M_NOWAIT)\ + if (dst->type == NULL)\ goto bad;\ bcopy(src->type, dst->type, hlen);\ }\ From owner-svn-src-all@freebsd.org Tue May 30 15:18:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C896CB7F366; Tue, 30 May 2017 15:18:23 +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 965A765C26; Tue, 30 May 2017 15:18:23 +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 v4UFIMbW075396; Tue, 30 May 2017 15:18:22 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UFIMce075394; Tue, 30 May 2017 15:18:22 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705301518.v4UFIMce075394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 15:18:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319217 - in stable/11: usr.bin/mkuzip usr.sbin/pw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 15:18:23 -0000 Author: asomers Date: Tue May 30 15:18:22 2017 New Revision: 319217 URL: https://svnweb.freebsd.org/changeset/base/319217 Log: MFC r318141, r318143-r318144 r318141: strcpy => strlcpy Reported by: Coverity CID: 1352771 Sponsored by: Spectra Logic Corp r318143: strcpy => strlcpy Reported by: Coverity CID: 1006715 Sponsored by: Spectra Logic Corp r318144: Don't depend on assert(3) getting evaluated Reported by: imp X-MFC-With: 318141, 318143 Sponsored by: Spectra Logic Corp Modified: stable/11/usr.bin/mkuzip/mkuzip.c stable/11/usr.sbin/pw/pw_user.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mkuzip/mkuzip.c ============================================================================== --- stable/11/usr.bin/mkuzip/mkuzip.c Tue May 30 14:50:28 2017 (r319216) +++ stable/11/usr.bin/mkuzip/mkuzip.c Tue May 30 15:18:22 2017 (r319217) @@ -108,7 +108,7 @@ int main(int argc, char **argv) struct mkuz_conveyor *cvp; void *c_ctx; struct mkuz_blk_info *chit; - size_t ncpusz, ncpu; + size_t ncpusz, ncpu, magiclen; double st, et; st = getdtime(); @@ -192,7 +192,8 @@ int main(int argc, char **argv) /* Not reached */ } - strcpy(hdr.magic, cfs.handler->magic); + magiclen = strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)); + assert(magiclen < sizeof(hdr.magic)); if (cfs.en_dedup != 0) { hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; Modified: stable/11/usr.sbin/pw/pw_user.c ============================================================================== --- stable/11/usr.sbin/pw/pw_user.c Tue May 30 14:50:28 2017 (r319216) +++ stable/11/usr.sbin/pw/pw_user.c Tue May 30 15:18:22 2017 (r319217) @@ -33,6 +33,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -490,6 +491,7 @@ pw_pwcrypt(char *password) char salt[SALTSIZE + 1]; char *cryptpw; static char buf[256]; + size_t pwlen; /* * Calculate a salt value @@ -501,7 +503,9 @@ pw_pwcrypt(char *password) cryptpw = crypt(password, salt); if (cryptpw == NULL) errx(EX_CONFIG, "crypt(3) failure"); - return strcpy(buf, cryptpw); + pwlen = strlcpy(buf, cryptpw, sizeof(buf)); + assert(pwlen < sizeof(buf)); + return (buf); } static char * From owner-svn-src-all@freebsd.org Tue May 30 15:33:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2371B7FC72; Tue, 30 May 2017 15:33:28 +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 A75F067A94; Tue, 30 May 2017 15:33:28 +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 v4UFXRZ7091452; Tue, 30 May 2017 15:33:27 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UFXR7R091451; Tue, 30 May 2017 15:33:27 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705301533.v4UFXR7R091451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 15:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319218 - stable/11/tests/sys/aio X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 15:33:28 -0000 Author: asomers Date: Tue May 30 15:33:27 2017 New Revision: 319218 URL: https://svnweb.freebsd.org/changeset/base/319218 Log: MFC r318593: Fix build of AIO tests with -DDEBUG Also, redefine some constants for clarity. No functional change. Modified: stable/11/tests/sys/aio/aio_kqueue_test.c stable/11/tests/sys/aio/lio_kqueue_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- stable/11/tests/sys/aio/aio_kqueue_test.c Tue May 30 15:18:22 2017 (r319217) +++ stable/11/tests/sys/aio/aio_kqueue_test.c Tue May 30 15:33:27 2017 (r319218) @@ -163,7 +163,8 @@ main (int argc, char *argv[]) printf("kevent %d %d errno %d return.ident %p " "return.data %p return.udata %p %p\n", i, result, error, - kq_returned.ident, kq_returned.data, + (void*)kq_returned.ident, + (void*)kq_returned.data, kq_returned.udata, kq_iocb); #endif @@ -171,7 +172,7 @@ main (int argc, char *argv[]) if (kq_iocb) break; #ifdef DEBUG - printf("Try again left %d out of %d %d\n", + printf("Try again left %d out of %lu %d\n", pending, nitems(iocb), cancel); #endif } Modified: stable/11/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- stable/11/tests/sys/aio/lio_kqueue_test.c Tue May 30 15:18:22 2017 (r319217) +++ stable/11/tests/sys/aio/lio_kqueue_test.c Tue May 30 15:33:27 2017 (r319218) @@ -55,7 +55,8 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" #define LIO_MAX 5 -#define MAX_IOCBS LIO_MAX * 16 +#define IOCBS_PER_LIO 16 +#define MAX_IOCBS (LIO_MAX * IOCBS_PER_LIO) #define MAX_RUNS 300 int @@ -103,9 +104,9 @@ main(int argc, char *argv[]) #endif for (j = 0; j < LIO_MAX; j++) { lio[j] = - malloc(sizeof(struct aiocb *) * MAX_IOCBS/LIO_MAX); - for (i = 0; i < MAX_IOCBS / LIO_MAX; i++) { - k = (MAX_IOCBS / LIO_MAX * j) + i; + malloc(sizeof(struct aiocb *) * IOCBS_PER_LIO); + for (i = 0; i < IOCBS_PER_LIO; i++) { + k = (IOCBS_PER_LIO * j) + i; lio[j][i] = iocb[k] = calloc(1, sizeof(struct aiocb)); iocb[k]->aio_nbytes = sizeof(buffer); @@ -115,7 +116,7 @@ main(int argc, char *argv[]) = iocb[k]->aio_nbytes * k * (run + 1); #ifdef DEBUG - printf("hello iocb[k] %d\n", + printf("hello iocb[k] %ld\n", iocb[k]->aio_offset); #endif iocb[k]->aio_lio_opcode = LIO_WRITE; @@ -125,11 +126,11 @@ main(int argc, char *argv[]) sig.sigev_notify = SIGEV_KEVENT; time(&time1); result = lio_listio(LIO_NOWAIT, lio[j], - MAX_IOCBS / LIO_MAX, &sig); + IOCBS_PER_LIO, &sig); error = errno; time(&time2); #ifdef DEBUG - printf("Time %d %d %d result -> %d\n", + printf("Time %ld %ld %ld result -> %d\n", time1, time2, time2-time1, result); #endif if (result != 0) { @@ -169,7 +170,8 @@ main(int argc, char *argv[]) printf("kevent %d %d errno %d return.ident %p " "return.data %p return.udata %p %p\n", i, result, error, - kq_returned.ident, kq_returned.data, + (void*)kq_returned.ident, + (void*)kq_returned.data, kq_returned.udata, lio[j]); #endif From owner-svn-src-all@freebsd.org Tue May 30 15:46:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 980E0B8205D; Tue, 30 May 2017 15:46:57 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) (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 3642768235; Tue, 30 May 2017 15:46:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wr0-f177.google.com with SMTP id g76so3143741wrd.1; Tue, 30 May 2017 08:46:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=5P6aMxCqibTpctP981PtKgoslZpDr+GPQiv+UC+I+6E=; b=aiEP2freMqUqNs2wd3Dywv2YQf0GZYkXBXpDhyGPECbqYcKtCxVGKF7hiNYF6wq9cZ iM1eP1IArFfw82x7VR3yX94MePyUXvpAOp+zg4uXcMkRa/ktrjw9d3UCsexxGb32m0BZ V8XDBUgPVtGc4dfyy295S+bl3pt93Mw3+xCYUP2cQmfSiCoAVAh7FxbYh7WxC/ILzdu9 NZpUguE7447KJ4DKLsRu9rPUxOffvvB16xBw+ji9gJRJDXqgRh49NQaLMAhbELLJ8X3q F81QY6k8/lCjEDffP/k8fkF448WFwbUs9qgmh9nNhM57qtQAZ0gd5Bc8SDiKifX6ONTy HLSw== X-Gm-Message-State: AODbwcASYOd9co+nl5vIBQCQbbi862WcN19ejFaTnPZ7BfSVymN24kvS fU+1SWixSjUrMEW52QM= X-Received: by 10.223.160.70 with SMTP id l6mr17782373wrl.0.1496159208484; Tue, 30 May 2017 08:46:48 -0700 (PDT) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com. [74.125.82.48]) by smtp.gmail.com with ESMTPSA id j65sm17439245wmg.0.2017.05.30.08.46.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 May 2017 08:46:48 -0700 (PDT) Received: by mail-wm0-f48.google.com with SMTP id e127so104443863wmg.1; Tue, 30 May 2017 08:46:48 -0700 (PDT) X-Received: by 10.80.184.129 with SMTP id l1mr16826833ede.88.1496159208165; Tue, 30 May 2017 08:46:48 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.38 with HTTP; Tue, 30 May 2017 08:46:47 -0700 (PDT) In-Reply-To: <201705262217.v4QMHiSd045273@repo.freebsd.org> References: <201705262217.v4QMHiSd045273@repo.freebsd.org> From: Conrad Meyer Date: Tue, 30 May 2017 08:46:47 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r318969 - in head: lib/libprocstat sys/kern sys/sys usr.bin/procstat To: svn-src-all@freebsd.org Cc: src-committers , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 15:46:57 -0000 Whoops, the commit message for this revision was slightly stale (previous version of the patch). On Fri, May 26, 2017 at 3:17 PM, Conrad Meyer wrote: > Author: cem > Date: Fri May 26 22:17:44 2017 > New Revision: 318969 > URL: https://svnweb.freebsd.org/changeset/base/318969 > > Log: > procstat(1): Add TCP socket send/recv buffer size > > Add TCP socket send and receive buffer size to procstat -f output. This should read something like: Add streaming socket send/recv buffer size Support was added for TCP and unix domain sockets, and could be added for SCTP. Best, Conrad From owner-svn-src-all@freebsd.org Tue May 30 15:51:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13109B821FA; Tue, 30 May 2017 15:51:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6565D68497; Tue, 30 May 2017 15:51:49 +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 v4UFpmws099489; Tue, 30 May 2017 15:51:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UFpmMb099488; Tue, 30 May 2017 15:51:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705301551.v4UFpmMb099488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 May 2017 15:51:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319219 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 15:51:50 -0000 Author: emaste Date: Tue May 30 15:51:48 2017 New Revision: 319219 URL: https://svnweb.freebsd.org/changeset/base/319219 Log: add a rescue/sh sanity check before installworld on the running system FreeBSD does not guarantee kernel forward compatibility (that is, running a newer userland on an older kernel). The documented upgrade procedure specifies that installkernel should be performed, followed by a reboot and then installworld. As a sanity check when installing onto the running system (DESTDIR is / or unset), attempt to run "sh echo OK" using rescue from the objdir. If rescue fails (e.g., because the system has not been rebooted and the "old" kernel lacks a system call required by the to-be-installed world), abort the installation. This should avoid ino64 foot-shooting when the proper upgrade procedure is not followed. Reviewed by: allanjude, gjb, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10987 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue May 30 15:33:27 2017 (r319218) +++ head/Makefile.inc1 Tue May 30 15:51:48 2017 (r319219) @@ -975,6 +975,22 @@ __installcheck_UGID: .PHONY fi .endfor .endif +# +# If installing over the running system (DESTDIR is / or unset) and the install +# includes rescue, try running rescue from the objdir as a sanity check. If +# rescue is not functional (e.g., because it depends on a system call not +# supported by the currently running kernel), abort the installation. +# +.if !make(distributeworld) && ${MK_RESCUE} != "no" && \ + (empty(DESTDIR) || ${DESTDIR} == "/") && empty(BYPASS_INSTALLCHECK_SH) +_installcheck_world: __installcheck_sh_check +__installcheck_sh_check: .PHONY + @if [ "`${OBJTREE}${.CURDIR}/rescue/rescue/rescue sh -c 'echo OK'`" != \ + OK ]; then \ + echo "rescue/sh check failed, installation aborted" >&2; \ + false; \ + fi +.endif # # Required install tools to be saved in a scratch dir for safety. From owner-svn-src-all@freebsd.org Tue May 30 16:05:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3C52B827E1; Tue, 30 May 2017 16:05: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 A1E1468F1E; Tue, 30 May 2017 16:05: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 v4UG5Bxx006150; Tue, 30 May 2017 16:05:11 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UG5B1Z006149; Tue, 30 May 2017 16:05:11 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705301605.v4UG5B1Z006149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 16:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319220 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 16:05:12 -0000 Author: asomers Date: Tue May 30 16:05:11 2017 New Revision: 319220 URL: https://svnweb.freebsd.org/changeset/base/319220 Log: MFC r301207: Fix exit status of "service routing start " etc/rc.d/routing Ignore the exit status of options_{inet,inet6,atm}. It's meaningless. Reviewed by: hrs Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6687 Modified: stable/10/etc/rc.d/routing Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/routing ============================================================================== --- stable/10/etc/rc.d/routing Tue May 30 15:51:48 2017 (r319219) +++ stable/10/etc/rc.d/routing Tue May 30 16:05:11 2017 (r319220) @@ -89,18 +89,23 @@ routing_stop() setroutes() { + local _ret + _ret=0 case $1 in static) static_$2 add $3 + _ret=$? ;; options) options_$2 ;; doall) static_$2 add $3 + _ret=$? options_$2 ;; esac + return $_ret } routing_stop_inet() From owner-svn-src-all@freebsd.org Tue May 30 16:09:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A633B828A0; Tue, 30 May 2017 16:09:56 +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 BE7DD6A0B6; Tue, 30 May 2017 16:09:55 +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 v4UG9saC006438; Tue, 30 May 2017 16:09:54 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UG9s3o006436; Tue, 30 May 2017 16:09:54 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705301609.v4UG9s3o006436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 16:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319221 - in stable/10/etc/periodic: daily monthly weekly X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 16:09:56 -0000 Author: asomers Date: Tue May 30 16:09:54 2017 New Revision: 319221 URL: https://svnweb.freebsd.org/changeset/base/319221 Log: MFC r313069: Allow 999.local to run scripts in any language If one of the scripts listed in (daily|weekly|monthly)_local is executable, 999.local should simply execute it. Only if the script isn't executable should 999.local assume it needs /bin/sh. Reviewed by: brian Sponsored by: Spectra Logic Corp Modified: stable/10/etc/periodic/daily/999.local stable/10/etc/periodic/monthly/999.local stable/10/etc/periodic/weekly/999.local Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/daily/999.local ============================================================================== --- stable/10/etc/periodic/daily/999.local Tue May 30 16:05:11 2017 (r319220) +++ stable/10/etc/periodic/daily/999.local Tue May 30 16:09:54 2017 (r319221) @@ -20,7 +20,12 @@ do echo '' case "$script" in /*) - if [ -f "$script" ] + if [ -x "$script" ] + then + echo "Running $script:" + + $script || rc=3 + elif [ -f "$script" ] then echo "Running $script:" Modified: stable/10/etc/periodic/monthly/999.local ============================================================================== --- stable/10/etc/periodic/monthly/999.local Tue May 30 16:05:11 2017 (r319220) +++ stable/10/etc/periodic/monthly/999.local Tue May 30 16:09:54 2017 (r319221) @@ -17,7 +17,12 @@ do echo '' case "$script" in /*) - if [ -f "$script" ] + if [ -x "$script" ] + then + echo "Running $script:" + + $script || rc=3 + elif [ -f "$script" ] then echo "Running $script:" Modified: stable/10/etc/periodic/weekly/999.local ============================================================================== --- stable/10/etc/periodic/weekly/999.local Tue May 30 16:05:11 2017 (r319220) +++ stable/10/etc/periodic/weekly/999.local Tue May 30 16:09:54 2017 (r319221) @@ -17,7 +17,12 @@ do echo '' case "$script" in /*) - if [ -f "$script" ] + if [ -x "$script" ] + then + echo "Running $script:" + + $script || rc=3 + elif [ -f "$script" ] then echo "Running $script:" From owner-svn-src-all@freebsd.org Tue May 30 16:15:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC3DDB82AC6; Tue, 30 May 2017 16:15:53 +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 AC8A46A4D1; Tue, 30 May 2017 16:15:53 +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 v4UGFq4Y010216; Tue, 30 May 2017 16:15:52 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UGFqZR010214; Tue, 30 May 2017 16:15:52 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705301615.v4UGFqZR010214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 16:15:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319222 - stable/10/sys/dev/xen/netback X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 16:15:54 -0000 Author: asomers Date: Tue May 30 16:15:52 2017 New Revision: 319222 URL: https://svnweb.freebsd.org/changeset/base/319222 Log: MFC r314148, r314150 r314148: Misc Coverity fixes in xnb(4) Most of these are null pointer dereferences or missing error checks in the unit tests. One is a missing error check in xnb_attach_failed. None can cause real problems in running systems. Reported by: Coverity CIDs: 1092469 1092468 1092467 2092466 1092465 1092512 1092511 1092510 CIDs: 1092510 1092509 1092508 1092507 Reviewed by: royger Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9234 r314150: Fix the xnb(4) unit tests One test was inadvertently expecting a bug in the kernel's sscanf implementation circa 2012. I don't know when that bug got fixed. Reported by: royger Reviewed by: royger Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9766 Modified: stable/10/sys/dev/xen/netback/netback.c stable/10/sys/dev/xen/netback/netback_unit_tests.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/xen/netback/netback.c ============================================================================== --- stable/10/sys/dev/xen/netback/netback.c Tue May 30 16:09:54 2017 (r319221) +++ stable/10/sys/dev/xen/netback/netback.c Tue May 30 16:15:52 2017 (r319222) @@ -1111,14 +1111,13 @@ xnb_attach_failed(struct xnb_softc *xnb, int err, cons xs_vprintf(XST_NIL, xenbus_get_node(xnb->dev), "hotplug-error", fmt, ap_hotplug); va_end(ap_hotplug); - xs_printf(XST_NIL, xenbus_get_node(xnb->dev), + (void)xs_printf(XST_NIL, xenbus_get_node(xnb->dev), "hotplug-status", "error"); xenbus_dev_vfatal(xnb->dev, err, fmt, ap); va_end(ap); - xs_printf(XST_NIL, xenbus_get_node(xnb->dev), - "online", "0"); + (void)xs_printf(XST_NIL, xenbus_get_node(xnb->dev), "online", "0"); xnb_detach(xnb->dev); } Modified: stable/10/sys/dev/xen/netback/netback_unit_tests.c ============================================================================== --- stable/10/sys/dev/xen/netback/netback_unit_tests.c Tue May 30 16:09:54 2017 (r319221) +++ stable/10/sys/dev/xen/netback/netback_unit_tests.c Tue May 30 16:15:52 2017 (r319222) @@ -1227,6 +1227,10 @@ xnb_txpkt2gnttab_2cluster(char *buffer, size_t buflen) xnb_ring2pkt(&pkt, &xnb_unit_pvt.txb, xnb_unit_pvt.txb.req_cons); pMbuf = xnb_pkt2mbufc(&pkt, xnb_unit_pvt.ifp); + XNB_ASSERT(pMbuf != NULL); + if (pMbuf == NULL) + return; + n_entries = xnb_txpkt2gnttab(&pkt, pMbuf, xnb_unit_pvt.gnttab, &xnb_unit_pvt.txb, DOMID_FIRST_RESERVED); @@ -1271,8 +1275,7 @@ xnb_txpkt2gnttab_2cluster(char *buffer, size_t buflen) /* should never get here */ XNB_ASSERT(0); } - if (pMbuf != NULL) - m_freem(pMbuf); + m_freem(pMbuf); } @@ -1494,15 +1497,14 @@ xnb_mbufc2pkt_2short(char *buffer, size_t buflen) { struct mbuf *mbufc, *mbufc2; mbufc = m_getm(NULL, size1, M_WAITOK, MT_DATA); - mbufc->m_flags |= M_PKTHDR; - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } + mbufc->m_flags |= M_PKTHDR; mbufc2 = m_getm(mbufc, size2, M_WAITOK, MT_DATA); + XNB_ASSERT(mbufc2 != NULL); if (mbufc2 == NULL) { - XNB_ASSERT(mbufc2 != NULL); safe_m_freem(&mbufc); return; } @@ -1537,11 +1539,10 @@ xnb_mbufc2pkt_long(char *buffer, size_t buflen) { struct mbuf *mbufc, *m; mbufc = m_getm(NULL, size, M_WAITOK, MT_DATA); - mbufc->m_flags |= M_PKTHDR; - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } + mbufc->m_flags |= M_PKTHDR; mbufc->m_pkthdr.len = size; size_remaining = size; @@ -1576,10 +1577,9 @@ xnb_mbufc2pkt_extra(char *buffer, size_t buflen) { struct mbuf *mbufc, *m; mbufc = m_getm(NULL, size, M_WAITOK, MT_DATA); - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } mbufc->m_flags |= M_PKTHDR; mbufc->m_pkthdr.len = size; @@ -1619,11 +1619,10 @@ xnb_mbufc2pkt_nospace(char *buffer, size_t buflen) { int error; mbufc = m_getm(NULL, size, M_WAITOK, MT_DATA); - mbufc->m_flags |= M_PKTHDR; - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } + mbufc->m_flags |= M_PKTHDR; mbufc->m_pkthdr.len = size; size_remaining = size; @@ -1840,10 +1839,9 @@ xnb_rxpkt2rsp_extra(char *buffer, size_t buflen) struct netif_extra_info *ext; mbufc = m_getm(NULL, size, M_WAITOK, MT_DATA); - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } mbufc->m_flags |= M_PKTHDR; mbufc->m_pkthdr.len = size; @@ -1974,11 +1972,10 @@ xnb_rxpkt2rsp_2short(char *buffer, size_t buflen) { struct mbuf *mbufc; mbufc = m_getm(NULL, size1, M_WAITOK, MT_DATA); - mbufc->m_flags |= M_PKTHDR; - if (mbufc == NULL) { - XNB_ASSERT(mbufc != NULL); + XNB_ASSERT(mbufc != NULL); + if (mbufc == NULL) return; - } + mbufc->m_flags |= M_PKTHDR; m_getm(mbufc, size2, M_WAITOK, MT_DATA); XNB_ASSERT(mbufc->m_next != NULL); @@ -2451,7 +2448,7 @@ xnb_sscanf_hhu(char *buffer, size_t buflen) for (i = 0; i < 12; i++) dest[i] = 'X'; - sscanf(mystr, "%hhu", &dest[4]); + XNB_ASSERT(sscanf(mystr, "%hhu", &dest[4]) == 1); for (i = 0; i < 12; i++) XNB_ASSERT(dest[i] == (i == 4 ? 137 : 'X')); } @@ -2469,7 +2466,7 @@ xnb_sscanf_hhd(char *buffer, size_t buflen) for (i = 0; i < 12; i++) dest[i] = 'X'; - sscanf(mystr, "%hhd", &dest[4]); + XNB_ASSERT(sscanf(mystr, "%hhd", &dest[4]) == 1); for (i = 0; i < 12; i++) XNB_ASSERT(dest[i] == (i == 4 ? -27 : 'X')); } @@ -2487,7 +2484,7 @@ xnb_sscanf_lld(char *buffer, size_t buflen) for (i = 0; i < 3; i++) dest[i] = (long long)0xdeadbeefdeadbeef; - sscanf(mystr, "%lld", &dest[1]); + XNB_ASSERT(sscanf(mystr, "%lld", &dest[1]) == 1); for (i = 0; i < 3; i++) XNB_ASSERT(dest[i] == (i != 1 ? (long long)0xdeadbeefdeadbeef : -123456789012345)); @@ -2506,7 +2503,7 @@ xnb_sscanf_llu(char *buffer, size_t buflen) for (i = 0; i < 3; i++) dest[i] = (long long)0xdeadbeefdeadbeef; - sscanf(mystr, "%llu", &dest[1]); + XNB_ASSERT(sscanf(mystr, "%llu", &dest[1]) == 1); for (i = 0; i < 3; i++) XNB_ASSERT(dest[i] == (i != 1 ? (long long)0xdeadbeefdeadbeef : 12802747070103273189ull)); @@ -2528,10 +2525,10 @@ xnb_sscanf_hhn(char *buffer, size_t buflen) for (i = 0; i < 12; i++) dest[i] = (unsigned char)'X'; - sscanf(mystr, + XNB_ASSERT(sscanf(mystr, "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f" "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f" - "404142434445464748494a4b4c4d4e4f%hhn", &dest[4]); + "404142434445464748494a4b4c4d4e4f%hhn", &dest[4]) == 0); for (i = 0; i < 12; i++) XNB_ASSERT(dest[i] == (i == 4 ? 160 : 'X')); } From owner-svn-src-all@freebsd.org Tue May 30 16:17:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54076B82B45; Tue, 30 May 2017 16:17:02 +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 1F2016A617; Tue, 30 May 2017 16:17:02 +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 v4UGH1Jk010311; Tue, 30 May 2017 16:17:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UGH1PT010310; Tue, 30 May 2017 16:17:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705301617.v4UGH1PT010310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 16:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319223 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 16:17:02 -0000 Author: asomers Date: Tue May 30 16:17:00 2017 New Revision: 319223 URL: https://svnweb.freebsd.org/changeset/base/319223 Log: MFC r314341: Update devd.conf for ports change 421360 Ports change 421360 changed the name and UID of the postgres user Reviewed by: trasz, imp, girgen Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9746 Modified: stable/10/etc/devd.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd.conf ============================================================================== --- stable/10/etc/devd.conf Tue May 30 16:15:52 2017 (r319222) +++ stable/10/etc/devd.conf Tue May 30 16:17:00 2017 (r319223) @@ -310,10 +310,10 @@ notify 10 { }; # This example works around a memory leak in PostgreSQL, restarting -# it when the "user:pgsql:swap:devctl=1G" rctl(8) rule gets triggered. +# it when the "user:postgres:swap:devctl=1G" rctl(8) rule gets triggered. notify 0 { match "system" "RCTL"; - match "rule" "user:70:swap:.*"; + match "rule" "user:770:swap:.*"; action "/usr/local/etc/rc.d/postgresql restart"; }; From owner-svn-src-all@freebsd.org Tue May 30 16:31:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 009ABB8768C; Tue, 30 May 2017 16:31:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2E416E1DF; Tue, 30 May 2017 16:31:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 8ABAA10AFA2; Tue, 30 May 2017 12:31:12 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318997 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfsclient kern sys Date: Sun, 28 May 2017 06:48:38 -0700 Message-ID: <2187407.D9lHvpEUce@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705271700.v4RH0USD004310@repo.freebsd.org> References: <201705271700.v4RH0USD004310@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 30 May 2017 12:31:12 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 16:31:14 -0000 On Saturday, May 27, 2017 05:00:30 PM Konstantin Belousov wrote: > Author: kib > Date: Sat May 27 17:00:30 2017 > New Revision: 318997 > URL: https://svnweb.freebsd.org/changeset/base/318997 > > Log: > Use whole mnt_stat.f_fsid bits for st_dev. > > Since ino64 expanded dev_t to 64bit, make VOP_GETATTR(9) provide all > bits of mnt_stat.f_fsid as va_fsid for vnodes on filesystems which use > f_fsid. In particular, NFSv3 and sometimes NFSv4, and ZFS use this > method or reporting st_dev by stat(2). > > Provide a new helper vn_fsid() to avoid duplicating code to copy > f_fsid to va_fsid. > > Note that the change is mostly cosmetic. Its motivation is to avoid > sign-extension of f_fsid[0] into 64bit dev_t value which happens after > dev_t becomes 64bit.. > > Reviewed by: avg(zfs), rmacklem (nfs) (both for previous version) > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > head/sys/fs/nfsclient/nfs_clport.c > head/sys/kern/vfs_vnops.c > head/sys/sys/vnode.h > > Modified: head/sys/fs/nfsclient/nfs_clport.c > ============================================================================== > --- head/sys/fs/nfsclient/nfs_clport.c Sat May 27 16:53:39 2017 (r318996) > +++ head/sys/fs/nfsclient/nfs_clport.c Sat May 27 17:00:30 2017 (r318997) > @@ -490,14 +490,13 @@ nfscl_loadattrcache(struct vnode **vpp, > * from the value used for the top level server volume > * in the mounted subtree. > */ > - if (vp->v_mount->mnt_stat.f_fsid.val[0] != > - (uint32_t)np->n_vattr.na_filesid[0]) > - vap->va_fsid = (uint32_t)np->n_vattr.na_filesid[0]; > - else > - vap->va_fsid = (uint32_t)hash32_buf( > + vn_fsid(vp, vap); > + vap->va_fsid = np->n_vattr.na_filesid[0]; > + if (vap->va_fsid == np->n_vattr.na_filesid[0]) > + vap->va_fsid = hash32_buf( > np->n_vattr.na_filesid, 2 * sizeof(uint64_t), 0); Won't this always be true now since you've done 'a = b; if (a == b) ...'? Also, does the assignment to 'va_fsid' before the 'if' overwrite the work of vn_fsid()? -- John Baldwin From owner-svn-src-all@freebsd.org Tue May 30 16:34:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE407B8794E; Tue, 30 May 2017 16:34:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 987E06E67B; Tue, 30 May 2017 16:34:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UGYIXR018881; Tue, 30 May 2017 16:34:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UGYIGU018880; Tue, 30 May 2017 16:34:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705301634.v4UGYIGU018880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 30 May 2017 16:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319224 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 16:34:19 -0000 Author: mav Date: Tue May 30 16:34:18 2017 New Revision: 319224 URL: https://svnweb.freebsd.org/changeset/base/319224 Log: MFC r318689: Add parent interface reference counting to if_vlan. Using plain ifunit() looks like a request for troubles. Modified: stable/11/sys/net/if_vlan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_vlan.c ============================================================================== --- stable/11/sys/net/if_vlan.c Tue May 30 16:17:00 2017 (r319223) +++ stable/11/sys/net/if_vlan.c Tue May 30 16:34:18 2017 (r319224) @@ -469,6 +469,7 @@ trunk_destroy(struct ifvlantrunk *trunk) trunk->parent->if_vlantrunk = NULL; TRUNK_UNLOCK(trunk); TRUNK_LOCK_DESTROY(trunk); + if_rele(trunk->parent); free(trunk, M_VLAN); } @@ -843,16 +844,20 @@ vlan_clone_match_ethervid(const char *name, int *vidp) if ((cp = strchr(ifname, '.')) == NULL) return (NULL); *cp = '\0'; - if ((ifp = ifunit(ifname)) == NULL) + if ((ifp = ifunit_ref(ifname)) == NULL) return (NULL); /* Parse VID. */ - if (*++cp == '\0') + if (*++cp == '\0') { + if_rele(ifp); return (NULL); + } vid = 0; for(; *cp >= '0' && *cp <= '9'; cp++) vid = (vid * 10) + (*cp - '0'); - if (*cp != '\0') + if (*cp != '\0') { + if_rele(ifp); return (NULL); + } if (vidp != NULL) *vidp = vid; @@ -885,7 +890,6 @@ vlan_clone_create(struct if_clone *ifc, char *name, si int unit; int error; int vid; - int ethertag; struct ifvlan *ifv; struct ifnet *ifp; struct ifnet *p; @@ -910,23 +914,21 @@ vlan_clone_create(struct if_clone *ifc, char *name, si error = copyin(params, &vlr, sizeof(vlr)); if (error) return error; - p = ifunit(vlr.vlr_parent); + p = ifunit_ref(vlr.vlr_parent); if (p == NULL) return (ENXIO); error = ifc_name2unit(name, &unit); - if (error != 0) + if (error != 0) { + if_rele(p); return (error); - - ethertag = 1; + } vid = vlr.vlr_tag; wildcard = (unit < 0); } else if ((p = vlan_clone_match_ethervid(name, &vid)) != NULL) { - ethertag = 1; unit = -1; wildcard = 0; } else { - ethertag = 0; - + p = NULL; error = ifc_name2unit(name, &unit); if (error != 0) return (error); @@ -935,8 +937,11 @@ vlan_clone_create(struct if_clone *ifc, char *name, si } error = ifc_alloc_unit(ifc, &unit); - if (error != 0) + if (error != 0) { + if (p != NULL) + if_rele(p); return (error); + } /* In the wildcard case, we need to update the name. */ if (wildcard) { @@ -952,6 +957,8 @@ vlan_clone_create(struct if_clone *ifc, char *name, si if (ifp == NULL) { ifc_free_unit(ifc, unit); free(ifv, M_VLAN); + if (p != NULL) + if_rele(p); return (ENOSPC); } SLIST_INIT(&ifv->vlan_mc_listhead); @@ -982,8 +989,9 @@ vlan_clone_create(struct if_clone *ifc, char *name, si sdl = (struct sockaddr_dl *)ifa->ifa_addr; sdl->sdl_type = IFT_L2VLAN; - if (ethertag) { + if (p != NULL) { error = vlan_config(ifv, p, vid); + if_rele(p); if (error != 0) { /* * Since we've partially failed, we need to back @@ -1270,6 +1278,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1 TRUNK_LOCK(trunk); p->if_vlantrunk = trunk; trunk->parent = p; + if_ref(trunk->parent); } else { VLAN_LOCK(); exists: @@ -1676,8 +1685,10 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data VLAN_LOCK(); if (TRUNK(ifv) != NULL) { p = PARENT(ifv); + if_ref(p); VLAN_UNLOCK(); error = (*p->if_ioctl)(p, SIOCGIFMEDIA, data); + if_rele(p); /* Limit the result to the parent's current config. */ if (error == 0) { struct ifmediareq *ifmr; @@ -1739,12 +1750,13 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data vlan_unconfig(ifp); break; } - p = ifunit(vlr.vlr_parent); + p = ifunit_ref(vlr.vlr_parent); if (p == NULL) { error = ENOENT; break; } error = vlan_config(ifv, p, vlr.vlr_tag); + if_rele(p); if (error) break; From owner-svn-src-all@freebsd.org Tue May 30 16:46:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31B7BB87C70; Tue, 30 May 2017 16:46:27 +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 F3E1A6EE12; Tue, 30 May 2017 16:46:26 +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 v4UGkQlE023486; Tue, 30 May 2017 16:46:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UGkQGF023485; Tue, 30 May 2017 16:46:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705301646.v4UGkQGF023485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 30 May 2017 16:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319225 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 16:46:27 -0000 Author: gjb Date: Tue May 30 16:46:25 2017 New Revision: 319225 URL: https://svnweb.freebsd.org/changeset/base/319225 Log: Document r315433, libarchive 3.3.1. Document r316958, tcsh 6.20.00. Document r310490, amd(8) 6.2. Document r316350, tzdata 2017b. Document r309848, file(1) 5.29. Document r309512, Subversion 1.9.5. Document r312516, xz(1) 5.2.3. Prune comments. Bump copyright year. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 30 16:34:18 2017 (r319224) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 30 16:46:25 2017 (r319225) @@ -27,11 +27,8 @@ $FreeBSD$ - - - - 2016 + 2017 The &os; Documentation Project @@ -177,7 +174,32 @@ Contributed Software -   + Subversion + has been updated to version 1.9.5. + + &man.file.1; has been updated to version + 5.29. + + The &man.amd.8; utility has been updated + to version 6.2. + + &man.xz.1; has been updated to version + 5.2.3. + + &man.zlib.3; has been updated to version + 1.2.11. + + &man.libarchive.3; has been updated to + version 3.3.1. + + &man.ntpd.8; has been updated to version + 4.2.8p10. + + Timezone data files have been updated to + version 2017b. + + &man.tcsh.1; has been updated to version + 6.20.00. From owner-svn-src-all@freebsd.org Tue May 30 16:55:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46187B8821F; Tue, 30 May 2017 16:55:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA916F5A4; Tue, 30 May 2017 16:55:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UGtGbe027633; Tue, 30 May 2017 16:55:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UGtGLp027631; Tue, 30 May 2017 16:55:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705301655.v4UGtGLp027631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 May 2017 16:55:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319226 - stable/11/usr.bin/uniq X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 16:55:17 -0000 Author: emaste Date: Tue May 30 16:55:15 2017 New Revision: 319226 URL: https://svnweb.freebsd.org/changeset/base/319226 Log: MFC r318316: uniq: allow -c to be used with -d or -u Bring in some bits from NetBSD and lift the restriction in uniq(1) that -c cannot be used with the -d and -u options. This restriction seems unnecessary and is supported at least by GNU, OpenBSD, and NetBSD. Lift the restriction and simplify the show() logic a little bit to maintain functionality when -c is provided with -d/-u. Also with this change, -d and -u are now actually a mutually exclusive, albeit valid, combination. Given that they both indicate opposite behavior, uniq(1) will no longer output anything if both -d and -u are supplied. This is in line with NetBSD as well as GNU. Adjust the man page and usage() to reflect that -c is its own standalone option. PR: 200553 Submitted by: Kyle Evans Modified: stable/11/usr.bin/uniq/uniq.1 stable/11/usr.bin/uniq/uniq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/uniq/uniq.1 ============================================================================== --- stable/11/usr.bin/uniq/uniq.1 Tue May 30 16:46:25 2017 (r319225) +++ stable/11/usr.bin/uniq/uniq.1 Tue May 30 16:55:15 2017 (r319226) @@ -31,7 +31,7 @@ .\" From: @(#)uniq.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 17, 2009 +.Dd May 15, 2017 .Dt UNIQ 1 .Os .Sh NAME @@ -39,7 +39,8 @@ .Nd report or filter out repeated lines in a file .Sh SYNOPSIS .Nm -.Op Fl c | Fl d | Fl u +.Op Fl c +.Op Fl d | Fl u .Op Fl i .Op Fl f Ar num .Op Fl s Ar chars Modified: stable/11/usr.bin/uniq/uniq.c ============================================================================== --- stable/11/usr.bin/uniq/uniq.c Tue May 30 16:46:25 2017 (r319225) +++ stable/11/usr.bin/uniq/uniq.c Tue May 30 16:55:15 2017 (r319226) @@ -130,13 +130,6 @@ main (int argc, char *argv[]) argc -= optind; argv += optind; - /* If no flags are set, default is -d -u. */ - if (cflag) { - if (dflag || uflag) - usage(); - } else if (!dflag && !uflag) - dflag = uflag = 1; - if (argc > 2) usage(); @@ -183,9 +176,6 @@ main (int argc, char *argv[]) } tprev = convert(prevline); - if (!cflag && uflag && dflag) - show(ofp, prevline); - tthis = NULL; while (getline(&thisline, &thisbuflen, ifp) >= 0) { if (tthis != NULL) @@ -201,8 +191,7 @@ main (int argc, char *argv[]) if (comp) { /* If different, print; set previous to new value. */ - if (cflag || !dflag || !uflag) - show(ofp, prevline); + show(ofp, prevline); p = prevline; b1 = prevbuflen; prevline = thisline; @@ -210,8 +199,6 @@ main (int argc, char *argv[]) if (tprev != NULL) free(tprev); tprev = tthis; - if (!cflag && uflag && dflag) - show(ofp, prevline); thisline = p; thisbuflen = b1; tthis = NULL; @@ -221,8 +208,7 @@ main (int argc, char *argv[]) } if (ferror(ifp)) err(1, "%s", ifn); - if (cflag || !dflag || !uflag) - show(ofp, prevline); + show(ofp, prevline); exit(0); } @@ -287,9 +273,11 @@ static void show(FILE *ofp, const char *str) { + if ((dflag && repeats == 0) || (uflag && repeats > 0)) + return; if (cflag) (void)fprintf(ofp, "%4d %s", repeats + 1, str); - if ((dflag && repeats) || (uflag && !repeats)) + else (void)fprintf(ofp, "%s", str); } @@ -352,6 +340,6 @@ static void usage(void) { (void)fprintf(stderr, -"usage: uniq [-c | -d | -u] [-i] [-f fields] [-s chars] [input [output]]\n"); +"usage: uniq [-c] [-d | -u] [-i] [-f fields] [-s chars] [input [output]]\n"); exit(1); } From owner-svn-src-all@freebsd.org Tue May 30 17:07:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50E7FB888BD; Tue, 30 May 2017 17:07:41 +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 2ADEB6FC46; Tue, 30 May 2017 17:07:41 +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 v4UH7eqL031829; Tue, 30 May 2017 17:07:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UH7eft031827; Tue, 30 May 2017 17:07:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705301707.v4UH7eft031827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 May 2017 17:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319227 - stable/11/share/man/man7 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:07:41 -0000 Author: emaste Date: Tue May 30 17:07:40 2017 New Revision: 319227 URL: https://svnweb.freebsd.org/changeset/base/319227 Log: MFC arch.7 man page describing some arch-specific details MFC of r318386, r317938, r317844, r317843, r317840, r317835, r317809, r317790, r317754, r317708, r317681, r312563, r308251, r308130, r307687, r303153, r303134, r303045, r303044, r303033 Changes by br, emaste, jhb, jhibbits, kevlo, kib Sponsored by: The FreeBSD Foundation Added: stable/11/share/man/man7/arch.7 - copied, changed from r303033, head/share/man/man7/arch.7 Modified: stable/11/share/man/man7/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man7/Makefile ============================================================================== --- stable/11/share/man/man7/Makefile Tue May 30 16:55:15 2017 (r319226) +++ stable/11/share/man/man7/Makefile Tue May 30 17:07:40 2017 (r319227) @@ -7,6 +7,7 @@ PACKAGE=runtime-manuals #MISSING: eqnchar.7 ms.7 term.7 MAN= adding_user.7 \ + arch.7 \ ascii.7 \ bsd.snmpmod.mk.7 \ build.7 \ Copied and modified: stable/11/share/man/man7/arch.7 (from r303033, head/share/man/man7/arch.7) ============================================================================== --- head/share/man/man7/arch.7 Tue Jul 19 17:46:09 2016 (r303033, copy source) +++ stable/11/share/man/man7/arch.7 Tue May 30 17:07:40 2017 (r319227) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2016 The FreeBSD Foundation. All rights reserved. +.\" Copyright (c) 2016-2017 The FreeBSD Foundation. All rights reserved. .\" .\" This documentation was created by Ed Maste under sponsorship of .\" The FreeBSD Foundation. @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 19, 2016 +.Dd May 16, 2017 .Dt ARCH 7 .Os .Sh NAME @@ -35,9 +35,140 @@ .Sh DESCRIPTION Differences between CPU architectures and platforms supported by .Fx . +.Ss Introduction +This document is a quick reference of key ABI details of +.Fx +architecture ports. +For full details consult the processor-specific ABI supplement +documentation. .Pp +If not explicitly mentioned, sizes are in bytes. +The architecture details in this document apply to +.Fx 10.0 +and later, unless otherwise noted. +.Pp +.Fx +uses a flat address space. +Variables of types +.Vt unsigned long , +.Vt uintptr_t , +and +.Vt size_t +and pointers all have the same representation. +.Pp +In order to maximize compatibility with future pointer integrity mechanisms, +manipulations of pointers as integers should be performed via +.Vt uintptr_t +or +.Vt intptr_t +and no other types. +In particular, +.Vt long +and +.Vt ptrdiff_t +should be avoided. +.Pp +On some architectures, e.g. +.Dv sparc64 , +.Dv powerpc +and AIM variants of +.Dv powerpc64 , +the kernel uses a separate address space. +On other architectures, kernel and a user mode process share a +single address space. +The kernel is located at the highest addresses. +.Pp +On each architecture, the main user mode thread's stack starts near +the highest user address and grows down. +.Pp +.Fx +architecture support varies by release. +This table shows the first +.Fx +release to support each architecture, and, for discontinued +architectures, the final release. +.Pp +.Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final Release" +.It Sy Architecture Ta Sy Initial Release Ta Sy Final Release +.It alpha Ta 3.2 Ta 6.4 +.It amd64 Ta 5.1 +.It arm Ta 6.0 +.It armeb Ta 8.0 +.It armv6 Ta 10.0 +.It arm64 Ta 11.0 +.It ia64 Ta 5.0 Ta 10.x +.It i386 Ta 1.0 +.It mips Ta 8.0 +.It mipsel Ta 9.0 +.It mipselhf Ta 12.0 +.It mipshf Ta 12.0 +.It mipsn32 Ta 9.0 +.It mips64 Ta 9.0 +.It mips64el Ta 9.0 +.It mips64elhf Ta 12.0 +.It mips64hf Ta 12.0 +.It pc98 Ta 2.2 Ta 11.x +.It powerpc Ta 6.0 +.It powerpcspe Ta 12.0 +.It powerpc64 Ta 6.0 +.It riscv64 Ta 12.0 +.It riscv64sf Ta 12.0 +.It sparc64 Ta 5.0 +.El .Ss Type sizes -On all supported architectures, +All +.Fx +architectures use some variant of the ELF (see +.Xr elf 5 ) +.Sy Application Binary Interface +(ABI) for the machine processor. +All supported ABIs can be divided into two groups: +.Bl -tag -width "Dv ILP32" +.It Dv ILP32 +.Vt int , +.Vt long , +.Vt void * +types machine representations all have 4-byte size. +.It Dv LP64 +.Vt int +type machine representation uses 4 bytes, +while +.Vt long +and +.Vt void * +are 8 bytes. +.El +Compilers define the +.Dv _LP64 +symbol when compiling for an +.Dv LP64 +ABI. +.Pp +Some machines support more that one +.Fx +ABI. +Typically these are 64-bit machines, where the +.Dq native +.Dv LP64 +execution environment is accompanied by the +.Dq legacy +.Dv ILP32 +environment, which was historical 32-bit predecessor for 64-bit evolution. +Examples are: +.Bl -column -offset indent "Dv powerpc64" "Sy ILP32 counterpart" +.It Sy LP64 Ta Sy ILP32 counterpart +.It Dv amd64 Ta Dv i386 +.It Dv powerpc64 Ta Dv powerpc +.It Dv mips64* Ta Dv mips* +.El +.Dv arm64 +currently does not support execution of +.Dv armv6 +binaries, even if the CPU implements +.Dv AArch32 +execution state. +.Pp +On all supported architectures: .Bl -column -offset -indent "long long" "Size" .It Sy Type Ta Sy Size .It short Ta 2 @@ -47,26 +178,44 @@ On all supported architectures, .It float Ta 4 .It double Ta 8 .El -.Bl -column -offset indent ".Sy Architecture" ".Sy sizeof(void *)" ".Sy "sizeof(long double)" -.It Sy Architecture Ta Sy sizeof(void *) Ta Sy sizeof(long double) -.It amd64 Ta 8 Ta 16 -.It arm Ta 4 Ta 8 -.It armeb Ta 4 Ta 8 -.It armv6 Ta 4 Ta 8 -.It arm64 Ta 8 Ta 16 -.It i386 Ta 4 Ta 12 -.It mips Ta 4 Ta 8 -.It mipsel Ta 4 Ta 8 -.It mipsn32 Ta 4 Ta 8 -.It mips64 Ta 8 Ta 8 -.It mips64el Ta 8 Ta 8 -.It powerpc Ta 4 Ta 8 -.It powerpc64 Ta 8 Ta 8 -.It riscv Ta 8 Ta -.It sparc64 Ta 8 Ta 16 +Integers are represented in two's complement. +Alignment of integer and pointer types is natural, that is, +the address of the variable must be congruent to zero modulo the type size. +Most ILP32 ABIs, except +.Dv arm , +require only 4-byte alignment for 64-bit integers. +.Pp +Machine-dependent type sizes: +.Bl -column -offset indent "Sy Architecture" "Sy void *" "Sy long double" "Sy time_t" +.It Sy Architecture Ta Sy void * Ta Sy long double Ta Sy time_t +.It amd64 Ta 8 Ta 16 Ta 8 +.It arm Ta 4 Ta 8 Ta 8 +.It armeb Ta 4 Ta 8 Ta 8 +.It armv6 Ta 4 Ta 8 Ta 8 +.It arm64 Ta 8 Ta 16 Ta 8 +.It i386 Ta 4 Ta 12 Ta 4 +.It mips Ta 4 Ta 8 Ta 8 +.It mipsel Ta 4 Ta 8 Ta 8 +.It mipselhf Ta 4 Ta 8 Ta 8 +.It mipshf Ta 4 Ta 8 Ta 8 +.It mipsn32 Ta 4 Ta 8 Ta 8 +.It mips64 Ta 8 Ta 8 Ta 8 +.It mips64el Ta 8 Ta 8 Ta 8 +.It mips64elhf Ta 8 Ta 8 Ta 8 +.It mips64hf Ta 8 Ta 8 Ta 8 +.It powerpc Ta 4 Ta 8 Ta 4 +.It powerpcspe Ta 4 Ta 8 Ta 4 +.It powerpc64 Ta 8 Ta 8 Ta 8 +.It riscv64 Ta 8 Ta 16 Ta 8 +.It riscv64sf Ta 8 Ta 16 Ta 8 +.It sparc64 Ta 8 Ta 16 Ta 8 .El +.Pp +.Sy time_t +is 8 bytes on all supported architectures except i386 and 32-bit +variants of powerpc. .Ss Endianness and Char Signedness -.Bl -column -offset indent ".Sy Architecture" ".Sy Endianness" ".Sy "char Signedness" +.Bl -column -offset indent "Sy Architecture" "Sy Endianness" "Sy char Signedness" .It Sy Architecture Ta Sy Endianness Ta Sy char Signedness .It amd64 Ta little Ta signed .It arm Ta little Ta unsigned @@ -74,54 +223,77 @@ On all supported architectures, .It armv6 Ta little Ta unsigned .It arm64 Ta little Ta unsigned .It i386 Ta little Ta signed -.It mips Ta little Ta signed -.It mipsel Ta big Ta signed -.It mipsn32 Ta little Ta signed -.It mips64 Ta little Ta signed +.It mips Ta big Ta signed +.It mipsel Ta little Ta signed +.It mipselhf Ta little Ta signed +.It mipshf Ta big Ta signed +.It mipsn32 Ta big Ta signed +.It mips64 Ta big Ta signed .It mips64el Ta little Ta signed +.It mips64elhf Ta little Ta signed +.It mips64hf Ta big Ta signed .It powerpc Ta big Ta unsigned +.It powerpcspe Ta big Ta unsigned .It powerpc64 Ta big Ta unsigned -.It riscv Ta little Ta signed +.It riscv64 Ta little Ta signed +.It riscv64sf Ta little Ta signed .It sparc64 Ta big Ta signed .El .Ss Page Size -.Bl -column -offset indent ".Sy Architecture" ".Sy Page Sizes" +.Bl -column -offset indent "Sy Architecture" "Sy Page Sizes" .It Sy Architecture Ta Sy Page Sizes .It amd64 Ta 4K, 2M, 1G .It arm Ta 4K .It armeb Ta 4K -.It armv6 Ta 4K +.It armv6 Ta 4K, 1M .It arm64 Ta 4K, 2M, 1G .It i386 Ta 4K, 2M (PAE), 4M .It mips Ta 4K .It mipsel Ta 4K +.It mipselhf Ta 4K +.It mipshf Ta 4K .It mipsn32 Ta 4K .It mips64 Ta 4K .It mips64el Ta 4K +.It mips64elhf Ta 4K +.It mips64hf Ta 4K .It powerpc Ta 4K +.It powerpcspe Ta 4K .It powerpc64 Ta 4K -.It riscv Ta 4K +.It riscv64 Ta 4K +.It riscv64sf Ta 4K .It sparc64 Ta 8K .El .Ss Floating Point -.Bl -column -offset indent ".Sy Architecture" ".Sy float, double" ".Sy long double" +.Bl -column -offset indent "Sy Architecture" "Sy float, double" "Sy long double" .It Sy Architecture Ta Sy float, double Ta Sy long double .It amd64 Ta hard Ta hard, 80 bit .It arm Ta soft Ta soft, double precision .It armeb Ta soft Ta soft, double precision -.It armv6 Ta hard Ta hard, double precision +.It armv6 Ta hard(1) Ta hard, double precision .It arm64 Ta hard Ta soft, quad precision .It i386 Ta hard Ta hard, 80 bit .It mips Ta soft Ta identical to double .It mipsel Ta soft Ta identical to double -.It mipsn32 Ta soft Ta identical to double +.It mipselhf Ta hard Ta identical to double +.It mipshf Ta hard Ta identical to double +.It mipsn32 Ta soft Ta identical to double .It mips64 Ta soft Ta identical to double .It mips64el Ta soft Ta identical to double +.It mips64elhf Ta hard Ta identical to double +.It mips64hf Ta hard Ta identical to double .It powerpc Ta hard Ta hard, double precision +.It powerpcspe Ta hard Ta hard, double precision .It powerpc64 Ta hard Ta hard, double precision -.It riscv Ta +.It riscv64 Ta hard Ta hard, double precision +.It riscv64sf Ta soft Ta soft, double precision .It sparc64 Ta hard Ta hard, quad precision .El +.Pp +(1) Prior to +.Fx 11.0 , +armv6 used the softfp ABI even though it supported only processors +with a floating point unit. .Ss Predefined Macros The compiler provides a number of predefined macros. Some of these provide architecture-specific details and are explained below. @@ -130,20 +302,22 @@ included here. .Pp The full set of predefined macros can be obtained with this command: .Bd -literal -offset indent -cc -x c -Dm -E /dev/null +cc -x c -dM -E /dev/null .Ed .Pp Common type size and endianness macros: -.Bl -column -offset indent "BYTE_ORDER" ".Sy Meaning" +.Bl -column -offset indent "BYTE_ORDER" "Sy Meaning" .It Sy Macro Ta Sy Meaning .It Dv __LP64__ Ta 64-bit (8-byte) long and pointer, 32-bit (4-byte) int .It Dv __ILP32__ Ta 32-bit (4-byte) int, long and pointer .It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN . -.Dv PDP11_ENDIAN is not used on FreeBSD. +.Dv PDP11_ENDIAN +is not used on +.Fx . .El .Pp Architecture-specific macros: -.Bl -column -offset indent ".Sy Architecture" ".Sy Predefined macros" +.Bl -column -offset indent "Sy Architecture" "Sy Predefined macros" .It Sy Architecture Ta Sy Predefined macros .It amd64 Ta Dv __amd64__, Dv __x86_64__ .It arm Ta Dv __arm__ @@ -153,12 +327,18 @@ Architecture-specific macros: .It i386 Ta Dv __i386__ .It mips Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_o32 .It mipsel Ta Dv __mips__, Dv __mips_o32 +.It mipselhf Ta Dv __mips__, Dv __mips_o32 +.It mipshf Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_o32 .It mipsn32 Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_n32 .It mips64 Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_n64 .It mips64el Ta Dv __mips__, Dv __mips_n64 +.It mips64elhf Ta Dv __mips__, Dv __mips_n64 +.It mips64hf Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_n64 .It powerpc Ta Dv __powerpc__ +.It powerpcspe Ta Dv __powerpc__, Dv __SPE__ .It powerpc64 Ta Dv __powerpc__, Dv __powerpc64__ -.It riscv Ta Dv __riscv__, Dv __riscv64 +.It riscv64 Ta Dv __riscv__, Dv __riscv64 +.It riscv64sf Ta Dv __riscv__, Dv __riscv64 .It sparc64 Ta Dv __sparc64__ .El .Sh SEE ALSO From owner-svn-src-all@freebsd.org Tue May 30 17:09:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55D7CB88A53; Tue, 30 May 2017 17:09:48 +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 2033E6FEAE; Tue, 30 May 2017 17:09:48 +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 v4UH9lZ4032062; Tue, 30 May 2017 17:09:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UH9lcv032061; Tue, 30 May 2017 17:09:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705301709.v4UH9lcv032061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 May 2017 17:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319228 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:09:48 -0000 Author: emaste Date: Tue May 30 17:09:47 2017 New Revision: 319228 URL: https://svnweb.freebsd.org/changeset/base/319228 Log: MFC r318305: makeman: reword description, based on feedback from wblock Modified: stable/11/tools/build/options/makeman Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/makeman ============================================================================== --- stable/11/tools/build/options/makeman Tue May 30 17:07:40 2017 (r319227) +++ stable/11/tools/build/options/makeman Tue May 30 17:09:47 2017 (r319228) @@ -3,15 +3,15 @@ # This file is in the public domain. # $FreeBSD$ # -# This script is used to create the src.conf.5 man page, using template text -# contained herein and the contents of the WITH_* and WITHOUT_* files in the -# same directory. Each WITH_* and WITHOUT_* file documents the effect of the +# This script creates the src.conf.5 man page using template text contained +# herein and the contents of the WITH_* and WITHOUT_* files in the same +# directory. Each WITH_* and WITHOUT_* file documents the effect of the # /etc/src.conf knob with the same name. # -# This script invokes "make showconfig" for each supported architecture in -# order to determine, for each option, whether the default setting is always -# WITH, always WITHOUT, or is architecture-dependent. It also determines -# and describes dependencies between options. +# For each supported architecture, "make showconfig" is invoked to determine +# the default setting of every option: always WITH_, always WITHOUT_, or +# architecture-dependent WITH_/WITHOUT_. It also determines and describes +# dependencies between options. # # Usage: # From owner-svn-src-all@freebsd.org Tue May 30 17:16:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0CBAB88EDE; Tue, 30 May 2017 17:16: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 B29207042A; Tue, 30 May 2017 17:16: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 v4UHG9Yc035974; Tue, 30 May 2017 17:16:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHG9JZ035966; Tue, 30 May 2017 17:16:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705301716.v4UHG9JZ035966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 30 May 2017 17:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319229 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:16:11 -0000 Author: markj Date: Tue May 30 17:16:08 2017 New Revision: 319229 URL: https://svnweb.freebsd.org/changeset/base/319229 Log: Add some miscellaneous definitions to support DRM drivers. Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10985 Modified: head/sys/compat/linuxkpi/common/include/linux/compiler.h head/sys/compat/linuxkpi/common/include/linux/device.h head/sys/compat/linuxkpi/common/include/linux/io.h head/sys/compat/linuxkpi/common/include/linux/kernel.h head/sys/compat/linuxkpi/common/include/linux/module.h head/sys/compat/linuxkpi/common/include/linux/pci.h head/sys/compat/linuxkpi/common/include/linux/preempt.h head/sys/compat/linuxkpi/common/include/linux/types.h Modified: head/sys/compat/linuxkpi/common/include/linux/compiler.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/compiler.h Tue May 30 17:09:47 2017 (r319228) +++ head/sys/compat/linuxkpi/common/include/linux/compiler.h Tue May 30 17:16:08 2017 (r319229) @@ -56,6 +56,7 @@ #define __devexit #define __exit #define __rcu +#define __malloc #define ___stringify(...) #__VA_ARGS__ #define __stringify(...) ___stringify(__VA_ARGS__) #define __attribute_const__ __attribute__((__const__)) Modified: head/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/device.h Tue May 30 17:09:47 2017 (r319228) +++ head/sys/compat/linuxkpi/common/include/linux/device.h Tue May 30 17:16:08 2017 (r319229) @@ -61,6 +61,23 @@ struct class { char * (*devnode)(struct device *dev, umode_t *mode); }; +struct dev_pm_ops { + int (*suspend)(struct device *dev); + int (*suspend_late)(struct device *dev); + int (*resume)(struct device *dev); + int (*resume_early)(struct device *dev); + int (*freeze)(struct device *dev); + int (*freeze_late)(struct device *dev); + int (*thaw)(struct device *dev); + int (*poweroff)(struct device *dev); + int (*poweroff_late)(struct device *dev); + int (*restore)(struct device *dev); + int (*restore_early)(struct device *dev); + int (*runtime_suspend)(struct device *dev); + int (*runtime_resume)(struct device *dev); + int (*runtime_idle)(struct device *dev); +}; + struct device { struct device *parent; struct list_head irqents; Modified: head/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/io.h Tue May 30 17:09:47 2017 (r319228) +++ head/sys/compat/linuxkpi/common/include/linux/io.h Tue May 30 17:16:08 2017 (r319229) @@ -36,6 +36,7 @@ #include #include +#include static inline uint32_t __raw_readl(const volatile void *addr) Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue May 30 17:09:47 2017 (r319228) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue May 30 17:16:08 2017 (r319229) @@ -87,7 +87,9 @@ #define S64_C(x) x ## LL #define U64_C(x) x ## ULL -#define BUILD_BUG_ON(x) CTASSERT(!(x)) +#define BUILD_BUG_ON(x) CTASSERT(!(x)) +#define BUILD_BUG_ON_MSG(x, msg) BUILD_BUG_ON(x) +#define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x)) #define BUG() panic("BUG at %s:%d", __FILE__, __LINE__) #define BUG_ON(cond) do { \ @@ -118,6 +120,8 @@ } \ unlikely(__ret); \ }) + +#define oops_in_progress SCHEDULER_STOPPED() #undef ALIGN #define ALIGN(x, y) roundup2((x), (y)) Modified: head/sys/compat/linuxkpi/common/include/linux/module.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/module.h Tue May 30 17:09:47 2017 (r319228) +++ head/sys/compat/linuxkpi/common/include/linux/module.h Tue May 30 17:16:08 2017 (r319229) @@ -45,6 +45,8 @@ #define MODULE_AUTHOR(name) #define MODULE_DESCRIPTION(name) #define MODULE_LICENSE(name) +#define MODULE_INFO(tag, info) +#define MODULE_FIRMWARE(firmware) #define THIS_MODULE ((struct module *)0) Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Tue May 30 17:09:47 2017 (r319228) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Tue May 30 17:16:08 2017 (r319229) @@ -72,16 +72,20 @@ struct pci_device_id { #define PCI_VENDOR_ID_IBM 0x1014 #define PCI_VENDOR_ID_INTEL 0x8086 #define PCI_VENDOR_ID_MELLANOX 0x15b3 +#define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4 #define PCI_VENDOR_ID_SERVERWORKS 0x1166 #define PCI_VENDOR_ID_SONY 0x104d #define PCI_VENDOR_ID_TOPSPIN 0x1867 #define PCI_VENDOR_ID_VIA 0x1106 +#define PCI_SUBVENDOR_ID_REDHAT_QUMRANET 0x1af4 +#define PCI_DEVICE_ID_ATI_RADEON_QY 0x5159 #define PCI_DEVICE_ID_MELLANOX_TAVOR 0x5a44 #define PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE 0x5a46 #define PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT 0x6278 #define PCI_DEVICE_ID_MELLANOX_ARBEL 0x6282 #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 +#define PCI_SUBDEVICE_ID_QEMU 0x1100 #define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) Modified: head/sys/compat/linuxkpi/common/include/linux/preempt.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/preempt.h Tue May 30 17:09:47 2017 (r319228) +++ head/sys/compat/linuxkpi/common/include/linux/preempt.h Tue May 30 17:16:08 2017 (r319229) @@ -34,4 +34,7 @@ #define in_interrupt() \ (curthread->td_intr_nesting_level || curthread->td_critnest) +#define preempt_disable() critical_enter() +#define preempt_enable() critical_exit() + #endif /* _LINUX_PREEMPT_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/types.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/types.h Tue May 30 17:09:47 2017 (r319228) +++ head/sys/compat/linuxkpi/common/include/linux/types.h Tue May 30 17:16:08 2017 (r319229) @@ -65,6 +65,8 @@ typedef u64 phys_addr_t; #define DECLARE_BITMAP(n, bits) \ unsigned long n[howmany(bits, sizeof(long) * 8)] +typedef unsigned long irq_hw_number_t; + struct rcu_head { void *raw[2]; } __aligned(sizeof(void *)); From owner-svn-src-all@freebsd.org Tue May 30 17:19:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A4F8B94213; Tue, 30 May 2017 17:19:11 +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 90DDD7086C; Tue, 30 May 2017 17:19:10 +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 v4UHJ59N055971 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 30 May 2017 20:19:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4UHJ59N055971 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4UHJ4YE055969; Tue, 30 May 2017 20:19:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 30 May 2017 20:19:04 +0300 From: Konstantin Belousov To: John Baldwin Cc: Rick Macklem , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318997 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfsclient kern sys Message-ID: <20170530171904.GL82323@kib.kiev.ua> References: <201705271700.v4RH0USD004310@repo.freebsd.org> <2187407.D9lHvpEUce@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2187407.D9lHvpEUce@ralph.baldwin.cx> User-Agent: Mutt/1.8.2 (2017-04-18) 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:19:11 -0000 On Sun, May 28, 2017 at 06:48:38AM -0700, John Baldwin wrote: > On Saturday, May 27, 2017 05:00:30 PM Konstantin Belousov wrote: > > */ > > - if (vp->v_mount->mnt_stat.f_fsid.val[0] != > > - (uint32_t)np->n_vattr.na_filesid[0]) > > - vap->va_fsid = (uint32_t)np->n_vattr.na_filesid[0]; > > - else > > - vap->va_fsid = (uint32_t)hash32_buf( > > + vn_fsid(vp, vap); > > + vap->va_fsid = np->n_vattr.na_filesid[0]; > > + if (vap->va_fsid == np->n_vattr.na_filesid[0]) > > + vap->va_fsid = hash32_buf( > > np->n_vattr.na_filesid, 2 * sizeof(uint64_t), 0); > > Won't this always be true now since you've done 'a = b; if (a == b) ...'? > Also, does the assignment to 'va_fsid' before the 'if' overwrite the work > of vn_fsid()? Thank you. Indeed, the asignment should have been removed. Below is the proposed correction. diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index 509c38b8614..44c0eae0179 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -491,8 +491,7 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsvattr *nap, void *nvaper, * in the mounted subtree. */ vn_fsid(vp, vap); - vap->va_fsid = np->n_vattr.na_filesid[0]; - if (vap->va_fsid == np->n_vattr.na_filesid[0]) + if ((uint32_t)vap->va_fsid == np->n_vattr.na_filesid[0]) vap->va_fsid = hash32_buf( np->n_vattr.na_filesid, 2 * sizeof(uint64_t), 0); } else From owner-svn-src-all@freebsd.org Tue May 30 17:37:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBFE8B94A8C; Tue, 30 May 2017 17:37: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 A28807156E; Tue, 30 May 2017 17:37: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 v4UHbb4a045665; Tue, 30 May 2017 17:37:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHbbbU045664; Tue, 30 May 2017 17:37:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301737.v4UHbbbU045664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319231 - vendor/llvm/llvm-trunk-r304222 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:37:39 -0000 Author: dim Date: Tue May 30 17:37:37 2017 New Revision: 319231 URL: https://svnweb.freebsd.org/changeset/base/319231 Log: Tag llvm trunk r304222. Added: vendor/llvm/llvm-trunk-r304222/ - copied from r319230, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Tue May 30 17:37:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF82EB94A7C; Tue, 30 May 2017 17:37:34 +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 7A6DB71569; Tue, 30 May 2017 17:37:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UHbXwe045619; Tue, 30 May 2017 17:37:33 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHbWpE045604; Tue, 30 May 2017 17:37:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301737.v4UHbWpE045604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319230 - in vendor/llvm/dist: docs docs/Proposals include/llvm/Analysis include/llvm/CodeGen include/llvm/DebugInfo/CodeView include/llvm/DebugInfo/PDB/Native include/llvm/MC include/l... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:37:34 -0000 Author: dim Date: Tue May 30 17:37:31 2017 New Revision: 319230 URL: https://svnweb.freebsd.org/changeset/base/319230 Log: Vendor import of llvm trunk r304222: https://llvm.org/svn/llvm-project/llvm/trunk@304222 Added: vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugUnknownSubsection.h (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsection.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionVisitor.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSymbolsSubsection.cpp (contents, props changed) vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrDFP.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrHFP.td vendor/llvm/dist/test/CodeGen/AArch64/reg-scavenge-frame.mir vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-scalar-ops.mir vendor/llvm/dist/test/CodeGen/X86/bitcast-and-setcc-128.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-and-setcc-256.ll vendor/llvm/dist/test/CodeGen/X86/xchg-nofold.ll vendor/llvm/dist/test/MC/Mips/macro-li.d.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/macro-li.s.s (contents, props changed) Deleted: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugFragmentVisitor.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/ModuleDebugUnknownFragment.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/StringTable.h vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugFragmentRecord.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugFragmentVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/ModuleDebugLineFragment.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/StringTable.cpp vendor/llvm/dist/test/Transforms/LoopVectorize/AArch64/no_vector_instructions.ll vendor/llvm/dist/tools/llvm-readobj/CodeView.h Modified: vendor/llvm/dist/docs/Vectorizers.rst vendor/llvm/dist/docs/index.rst vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/CodeGen/DIE.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeView.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBStringTable.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h vendor/llvm/dist/include/llvm/MC/ConstantPools.h vendor/llvm/dist/include/llvm/Support/ManagedStatic.h vendor/llvm/dist/include/llvm/TableGen/Record.h vendor/llvm/dist/include/llvm/Transforms/Scalar/GVNExpression.h vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.h vendor/llvm/dist/lib/CodeGen/GlobalISel/Localizer.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringBase.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/CodeView/EnumTables.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolDumper.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp vendor/llvm/dist/lib/MC/MCCodeView.cpp vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/TableGen/Record.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FrameLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFoldOperands.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIPeepholeSDWA.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZ.td vendor/llvm/dist/lib/Target/SystemZ/SystemZFeatures.td vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFP.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFormats.td vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZ13.td vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZ196.td vendor/llvm/dist/lib/Target/SystemZ/SystemZScheduleZEC12.td vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.h vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/test/CodeGen/AMDGPU/add.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bfe-combine.ll vendor/llvm/dist/test/CodeGen/AMDGPU/commute-compares.ll vendor/llvm/dist/test/CodeGen/AMDGPU/commute_modifiers.ll vendor/llvm/dist/test/CodeGen/AMDGPU/copy-illegal-type.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fabs.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fabs.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fadd.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fadd64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fcanonicalize.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmul.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg-fabs.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg-fabs.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg-fabs.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fract.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fsub.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fsub64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/immv216.ll vendor/llvm/dist/test/CodeGen/AMDGPU/insert_vector_elt.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.div.fixup.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.div.fmas.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.fcmp.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.fmul.legacy.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.barrier.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.fma.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.fmuladd.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.maxnum.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.minnum.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mad24-get-global-id.ll vendor/llvm/dist/test/CodeGen/AMDGPU/madak.ll vendor/llvm/dist/test/CodeGen/AMDGPU/madmk.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mul.ll vendor/llvm/dist/test/CodeGen/AMDGPU/scratch-simple.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdiv.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-peephole.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shift-and-i128-ubfe.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shift-and-i64-ubfe.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sminmax.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/srem.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sub.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/udiv.ll vendor/llvm/dist/test/CodeGen/AMDGPU/urem.ll vendor/llvm/dist/test/CodeGen/AMDGPU/use-sgpr-multiple-times.ll vendor/llvm/dist/test/CodeGen/AMDGPU/v_mac_f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/wqm.ll vendor/llvm/dist/test/CodeGen/WebAssembly/negative-base-reg.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-i16.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-i32.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-i64.ll vendor/llvm/dist/test/CodeGen/X86/setcc-lowering.ll vendor/llvm/dist/test/CodeGen/X86/vector-sext.ll vendor/llvm/dist/test/MC/AArch64/ldr-pseudo.s vendor/llvm/dist/test/MC/Disassembler/SystemZ/insns-z13.txt vendor/llvm/dist/test/MC/Disassembler/SystemZ/insns.txt vendor/llvm/dist/test/MC/SystemZ/insn-bad-z13.s vendor/llvm/dist/test/MC/SystemZ/insn-bad-z196.s vendor/llvm/dist/test/MC/SystemZ/insn-bad-zEC12.s vendor/llvm/dist/test/MC/SystemZ/insn-bad.s vendor/llvm/dist/test/MC/SystemZ/insn-good-z13.s vendor/llvm/dist/test/MC/SystemZ/insn-good-z196.s vendor/llvm/dist/test/MC/SystemZ/insn-good-zEC12.s vendor/llvm/dist/test/MC/SystemZ/insn-good.s vendor/llvm/dist/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp vendor/llvm/dist/tools/llvm-pdbdump/C13DebugFragmentVisitor.h vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.cpp vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp vendor/llvm/dist/unittests/Support/ManagedStatic.cpp vendor/llvm/dist/utils/TableGen/GlobalISelEmitter.cpp vendor/llvm/dist/utils/TableGen/X86FoldTablesEmitter.cpp Added: vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/docs/Proposals/VectorizationPlan.rst Tue May 30 17:37:31 2017 (r319230) @@ -0,0 +1,182 @@ +================== +Vectorization Plan +================== + +.. contents:: + :local: + +Abstract +======== +The vectorization transformation can be rather complicated, involving several +potential alternatives, especially for outer-loops [1]_ but also possibly for +innermost loops. These alternatives may have significant performance impact, +both positive and negative. A cost model is therefore employed to identify the +best alternative, including the alternative of avoiding any transformation +altogether. + +The Vectorization Plan is an explicit model for describing vectorization +candidates. It serves for both optimizing candidates including estimating their +cost reliably, and for performing their final translation into IR. This +facilitates dealing with multiple vectorization candidates. + +High-level Design +================= + +Vectorization Workflow +---------------------- +VPlan-based vectorization involves three major steps, taking a "scenario-based +approach" to vectorization planning: + +1. Legal Step: check if a loop can be legally vectorized; encode contraints and + artifacts if so. +2. Plan Step: + + a. Build initial VPlans following the constraints and decisions taken by + Legal Step 1, and compute their cost. + b. Apply optimizations to the VPlans, possibly forking additional VPlans. + Prune sub-optimal VPlans having relatively high cost. +3. Execute Step: materialize the best VPlan. Note that this is the only step + that modifies the IR. + +Design Guidelines +----------------- +In what follows, the term "input IR" refers to code that is fed into the +vectorizer whereas the term "output IR" refers to code that is generated by the +vectorizer. The output IR contains code that has been vectorized or "widened" +according to a loop Vectorization Factor (VF), and/or loop unroll-and-jammed +according to an Unroll Factor (UF). +The design of VPlan follows several high-level guidelines: + +1. Analysis-like: building and manipulating VPlans must not modify the input IR. + In particular, if the best option is not to vectorize at all, the + vectorization process terminates before reaching Step 3, and compilation + should proceed as if VPlans had not been built. + +2. Align Cost & Execute: each VPlan must support both estimating the cost and + generating the output IR code, such that the cost estimation evaluates the + to-be-generated code reliably. + +3. Support vectorizing additional constructs: + + a. Outer-loop vectorization. In particular, VPlan must be able to model the + control-flow of the output IR which may include multiple basic-blocks and + nested loops. + b. SLP vectorization. + c. Combinations of the above, including nested vectorization: vectorizing + both an inner loop and an outer-loop at the same time (each with its own + VF and UF), mixed vectorization: vectorizing a loop with SLP patterns + inside [4]_, (re)vectorizing input IR containing vector code. + d. Function vectorization [2]_. + +4. Support multiple candidates efficiently. In particular, similar candidates + related to a range of possible VF's and UF's must be represented efficiently. + Potential versioning needs to be supported efficiently. + +5. Support vectorizing idioms, such as interleaved groups of strided loads or + stores. This is achieved by modeling a sequence of output instructions using + a "Recipe", which is responsible for computing its cost and generating its + code. + +6. Encapsulate Single-Entry Single-Exit regions (SESE). During vectorization + such regions may need to be, for example, predicated and linearized, or + replicated VF*UF times to handle scalarized and predicated instructions. + Innerloops are also modelled as SESE regions. + +Low-level Design +================ +The low-level design of VPlan comprises of the following classes. + +:LoopVectorizationPlanner: + A LoopVectorizationPlanner is designed to handle the vectorization of a loop + or a loop nest. It can construct, optimize and discard one or more VPlans, + each VPlan modelling a distinct way to vectorize the loop or the loop nest. + Once the best VPlan is determined, including the best VF and UF, this VPlan + drives the generation of output IR. + +:VPlan: + A model of a vectorized candidate for a given input IR loop or loop nest. This + candidate is represented using a Hierarchical CFG. VPlan supports estimating + the cost and driving the generation of the output IR code it represents. + +:Hierarchical CFG: + A control-flow graph whose nodes are basic-blocks or Hierarchical CFG's. The + Hierarchical CFG data structure is similar to the Tile Tree [5]_, where + cross-Tile edges are lifted to connect Tiles instead of the original + basic-blocks as in Sharir [6]_, promoting the Tile encapsulation. The terms + Region and Block are used rather than Tile [5]_ to avoid confusion with loop + tiling. + +:VPBlockBase: + The building block of the Hierarchical CFG. A pure-virtual base-class of + VPBasicBlock and VPRegionBlock, see below. VPBlockBase models the hierarchical + control-flow relations with other VPBlocks. Note that in contrast to the IR + BasicBlock, a VPBlockBase models its control-flow successors and predecessors + directly, rather than through a Terminator branch or through predecessor + branches that "use" the VPBlockBase. + +:VPBasicBlock: + VPBasicBlock is a subclass of VPBlockBase, and serves as the leaves of the + Hierarchical CFG. It represents a sequence of output IR instructions that will + appear consecutively in an output IR basic-block. The instructions of this + basic-block originate from one or more VPBasicBlocks. VPBasicBlock holds a + sequence of zero or more VPRecipes that model the cost and generation of the + output IR instructions. + +:VPRegionBlock: + VPRegionBlock is a subclass of VPBlockBase. It models a collection of + VPBasicBlocks and VPRegionBlocks which form a SESE subgraph of the output IR + CFG. A VPRegionBlock may indicate that its contents are to be replicated a + constant number of times when output IR is generated, effectively representing + a loop with constant trip-count that will be completely unrolled. This is used + to support scalarized and predicated instructions with a single model for + multiple candidate VF's and UF's. + +:VPRecipeBase: + A pure-virtual base class modeling a sequence of one or more output IR + instructions, possibly based on one or more input IR instructions. These + input IR instructions are referred to as "Ingredients" of the Recipe. A Recipe + may specify how its ingredients are to be transformed to produce the output IR + instructions; e.g., cloned once, replicated multiple times or widened + according to selected VF. + +:VPTransformState: + Stores information used for generating output IR, passed from + LoopVectorizationPlanner to its selected VPlan for execution, and used to pass + additional information down to VPBlocks and VPRecipes. + +Related LLVM components +----------------------- +1. SLP Vectorizer: one can compare the VPlan model with LLVM's existing SLP + tree, where TSLP [3]_ adds Plan Step 2.b. + +2. RegionInfo: one can compare VPlan's H-CFG with the Region Analysis as used by + Polly [7]_. + +References +---------- +.. [1] "Outer-loop vectorization: revisited for short SIMD architectures", Dorit + Nuzman and Ayal Zaks, PACT 2008. + +.. [2] "Proposal for function vectorization and loop vectorization with function + calls", Xinmin Tian, [`cfe-dev + `_]., + March 2, 2016. + See also `review `_. + +.. [3] "Throttling Automatic Vectorization: When Less is More", Vasileios + Porpodas and Tim Jones, PACT 2015 and LLVM Developers' Meeting 2015. + +.. [4] "Exploiting mixed SIMD parallelism by reducing data reorganization + overhead", Hao Zhou and Jingling Xue, CGO 2016. + +.. [5] "Register Allocation via Hierarchical Graph Coloring", David Callahan and + Brian Koblenz, PLDI 1991 + +.. [6] "Structural analysis: A new approach to flow analysis in optimizing + compilers", M. Sharir, Journal of Computer Languages, Jan. 1980 + +.. [7] "Enabling Polyhedral Optimizations in LLVM", Tobias Grosser, Diploma + thesis, 2011. + +.. [8] "Introducing VPlan to the Loop Vectorizer", Gil Rapaport and Ayal Zaks, + European LLVM Developers' Meeting 2017. Modified: vendor/llvm/dist/docs/Vectorizers.rst ============================================================================== --- vendor/llvm/dist/docs/Vectorizers.rst Tue May 30 17:16:08 2017 (r319229) +++ vendor/llvm/dist/docs/Vectorizers.rst Tue May 30 17:37:31 2017 (r319230) @@ -382,6 +382,17 @@ And Linpack-pc with the same configuration. Result is .. image:: linpack-pc.png +Ongoing Development Directions +------------------------------ + +.. toctree:: + :hidden: + + Proposals/VectorizationPlan + +:doc:`Proposals/VectorizationPlan` + Modeling the process and upgrading the infrastructure of LLVM's Loop Vectorizer. + .. _slp-vectorizer: The SLP Vectorizer Modified: vendor/llvm/dist/docs/index.rst ============================================================================== --- vendor/llvm/dist/docs/index.rst Tue May 30 17:16:08 2017 (r319229) +++ vendor/llvm/dist/docs/index.rst Tue May 30 17:37:31 2017 (r319230) @@ -528,6 +528,7 @@ can be better. CodeOfConduct Proposals/GitHubMove + Proposals/VectorizationPlan :doc:`CodeOfConduct` Proposal to adopt a code of conduct on the LLVM social spaces (lists, events, @@ -536,6 +537,8 @@ can be better. :doc:`Proposals/GitHubMove` Proposal to move from SVN/Git to GitHub. +:doc:`Proposals/VectorizationPlan` + Proposal to model the process and upgrade the infrastructure of LLVM's Loop Vectorizer. Indices and tables ================== Modified: vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Tue May 30 17:16:08 2017 (r319229) +++ vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Tue May 30 17:37:31 2017 (r319230) @@ -1536,8 +1536,7 @@ class ScalarEvolution { (public) /// Determine if the SCEV can be evaluated at loop's entry. It is true if it /// doesn't depend on a SCEVUnknown of an instruction which is dominated by /// the header of loop L. - bool isAvailableAtLoopEntry(const SCEV *S, const Loop *L, DominatorTree &DT, - LoopInfo &LI); + bool isAvailableAtLoopEntry(const SCEV *S, const Loop *L); /// Return true if the given SCEV changes value in a known way in the /// specified loop. This property being true implies that the value is Modified: vendor/llvm/dist/include/llvm/CodeGen/DIE.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/DIE.h Tue May 30 17:16:08 2017 (r319229) +++ vendor/llvm/dist/include/llvm/CodeGen/DIE.h Tue May 30 17:37:31 2017 (r319230) @@ -383,11 +383,11 @@ class DIEValue { (private) return; #define HANDLE_DIEVALUE_SMALL(T) \ case is##T: \ - destruct(); + destruct(); \ return; #define HANDLE_DIEVALUE_LARGE(T) \ case is##T: \ - destruct(); + destruct(); \ return; #include "llvm/CodeGen/DIEValue.def" } Modified: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeView.h ============================================================================== --- vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeView.h Tue May 30 17:16:08 2017 (r319229) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeView.h Tue May 30 17:37:31 2017 (r319230) @@ -13,6 +13,8 @@ #include #include +#include "llvm/Support/Endian.h" + namespace llvm { namespace codeview { @@ -291,7 +293,7 @@ enum class ModifierOptions : uint16_t { }; CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(ModifierOptions) -enum class ModuleDebugFragmentKind : uint32_t { +enum class DebugSubsectionKind : uint32_t { None = 0, Symbols = 0xf1, Lines = 0xf2, @@ -549,6 +551,24 @@ enum class FileChecksumKind : uint8_t { None, MD5, SHA enum LineFlags : uint16_t { LF_None = 0, LF_HaveColumns = 1, // CV_LINES_HAVE_COLUMNS +}; + +/// Data in the the SUBSEC_FRAMEDATA subection. +struct FrameData { + support::ulittle32_t RvaStart; + support::ulittle32_t CodeSize; + support::ulittle32_t LocalSize; + support::ulittle32_t ParamsSize; + support::ulittle32_t MaxStackSize; + support::ulittle32_t FrameFunc; + support::ulittle16_t PrologSize; + support::ulittle16_t SavedRegsSize; + support::ulittle32_t Flags; + enum : uint32_t { + HasSEH = 1 << 0, + HasEH = 1 << 1, + IsFunctionStart = 1 << 2, + }; }; } } Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h Tue May 30 17:37:31 2017 (r319230) @@ -0,0 +1,98 @@ +//===- DebugChecksumsSubsection.h -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGCHECKSUMSSUBSECTION_H +#define LLVM_DEBUGINFO_CODEVIEW_DEBUGCHECKSUMSSUBSECTION_H + +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/DebugInfo/CodeView/DebugSubsection.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/BinaryStreamArray.h" +#include "llvm/Support/BinaryStreamReader.h" +#include "llvm/Support/Endian.h" + +namespace llvm { +namespace codeview { + +class DebugStringTableSubsection; + +struct FileChecksumEntry { + uint32_t FileNameOffset; // Byte offset of filename in global stringtable. + FileChecksumKind Kind; // The type of checksum. + ArrayRef Checksum; // The bytes of the checksum. +}; +} +} + +namespace llvm { +template <> struct VarStreamArrayExtractor { +public: + typedef void ContextType; + + static Error extract(BinaryStreamRef Stream, uint32_t &Len, + codeview::FileChecksumEntry &Item); +}; +} + +namespace llvm { +namespace codeview { +class DebugChecksumsSubsectionRef final : public DebugSubsectionRef { + typedef VarStreamArray FileChecksumArray; + typedef FileChecksumArray::Iterator Iterator; + +public: + DebugChecksumsSubsectionRef() + : DebugSubsectionRef(DebugSubsectionKind::FileChecksums) {} + + static bool classof(const DebugSubsectionRef *S) { + return S->kind() == DebugSubsectionKind::FileChecksums; + } + + bool valid() const { return Checksums.valid(); } + + Error initialize(BinaryStreamReader Reader); + Error initialize(BinaryStreamRef Stream); + + Iterator begin() { return Checksums.begin(); } + Iterator end() { return Checksums.end(); } + + const FileChecksumArray &getArray() const { return Checksums; } + +private: + FileChecksumArray Checksums; +}; + +class DebugChecksumsSubsection final : public DebugSubsection { +public: + explicit DebugChecksumsSubsection(DebugStringTableSubsection &Strings); + + static bool classof(const DebugSubsection *S) { + return S->kind() == DebugSubsectionKind::FileChecksums; + } + + void addChecksum(StringRef FileName, FileChecksumKind Kind, + ArrayRef Bytes); + + uint32_t calculateSerializedSize() const override; + Error commit(BinaryStreamWriter &Writer) const override; + uint32_t mapChecksumOffset(StringRef FileName) const; + +private: + DebugStringTableSubsection &Strings; + + DenseMap OffsetMap; + uint32_t SerializedSize = 0; + llvm::BumpPtrAllocator Storage; + std::vector Checksums; +}; +} +} + +#endif Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h Tue May 30 17:37:31 2017 (r319230) @@ -0,0 +1,59 @@ +//===- DebugFrameDataSubsection.h ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H +#define LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H + +#include "llvm/DebugInfo/CodeView/CodeView.h" +#include "llvm/DebugInfo/CodeView/DebugSubsection.h" +#include "llvm/Support/BinaryStreamReader.h" +#include "llvm/Support/Error.h" + +namespace llvm { +namespace codeview { +class DebugFrameDataSubsectionRef final : public DebugSubsectionRef { +public: + DebugFrameDataSubsectionRef() + : DebugSubsectionRef(DebugSubsectionKind::FrameData) {} + static bool classof(const DebugSubsection *S) { + return S->kind() == DebugSubsectionKind::FrameData; + } + + Error initialize(BinaryStreamReader Reader); + + FixedStreamArray::Iterator begin() const { return Frames.begin(); } + FixedStreamArray::Iterator end() const { return Frames.end(); } + + const void *getRelocPtr() const { return RelocPtr; } + +private: + const uint32_t *RelocPtr = nullptr; + FixedStreamArray Frames; +}; + +class DebugFrameDataSubsection final : public DebugSubsection { +public: + DebugFrameDataSubsection() + : DebugSubsection(DebugSubsectionKind::FrameData) {} + static bool classof(const DebugSubsection *S) { + return S->kind() == DebugSubsectionKind::FrameData; + } + + uint32_t calculateSerializedSize() const override; + Error commit(BinaryStreamWriter &Writer) const override; + + void addFrameData(const FrameData &Frame); + +private: + std::vector Frames; +}; +} +} + +#endif Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h Tue May 30 17:37:31 2017 (r319230) @@ -0,0 +1,105 @@ +//===- DebugInlineeLinesSubsection.h ----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_BUGINLINEELINESSUBSECTION_H +#define LLVM_DEBUGINFO_CODEVIEW_BUGINLINEELINESSUBSECTION_H + +#include "llvm/DebugInfo/CodeView/DebugSubsection.h" +#include "llvm/DebugInfo/CodeView/Line.h" +#include "llvm/Support/BinaryStreamArray.h" +#include "llvm/Support/BinaryStreamReader.h" +#include "llvm/Support/Error.h" + +namespace llvm { +namespace codeview { + +class DebugInlineeLinesSubsectionsRef; +class DebugChecksumsSubsection; + +enum class InlineeLinesSignature : uint32_t { + Normal, // CV_INLINEE_SOURCE_LINE_SIGNATURE + ExtraFiles // CV_INLINEE_SOURCE_LINE_SIGNATURE_EX +}; + +struct InlineeSourceLineHeader { + TypeIndex Inlinee; // ID of the function that was inlined. + support::ulittle32_t FileID; // Offset into FileChecksums subsection. + support::ulittle32_t SourceLineNum; // First line of inlined code. + // If extra files present: + // ulittle32_t ExtraFileCount; + // ulittle32_t Files[]; +}; + +struct InlineeSourceLine { + const InlineeSourceLineHeader *Header; + FixedStreamArray ExtraFiles; +}; +} + +template <> struct VarStreamArrayExtractor { + typedef bool ContextType; + + static Error extract(BinaryStreamRef Stream, uint32_t &Len, + codeview::InlineeSourceLine &Item, bool HasExtraFiles); +}; + +namespace codeview { +class DebugInlineeLinesSubsectionRef final : public DebugSubsectionRef { + typedef VarStreamArray LinesArray; + typedef LinesArray::Iterator Iterator; + +public: + DebugInlineeLinesSubsectionRef(); + + static bool classof(const DebugSubsectionRef *S) { + return S->kind() == DebugSubsectionKind::InlineeLines; + } + + Error initialize(BinaryStreamReader Reader); + bool hasExtraFiles() const; + + Iterator begin() const { return Lines.begin(); } + Iterator end() const { return Lines.end(); } + +private: + InlineeLinesSignature Signature; + VarStreamArray Lines; +}; + +class DebugInlineeLinesSubsection final : public DebugSubsection { +public: + DebugInlineeLinesSubsection(DebugChecksumsSubsection &Checksums, + bool HasExtraFiles); + + static bool classof(const DebugSubsection *S) { + return S->kind() == DebugSubsectionKind::InlineeLines; + } + + Error commit(BinaryStreamWriter &Writer) const override; + uint32_t calculateSerializedSize() const override; + + void addInlineSite(TypeIndex FuncId, StringRef FileName, uint32_t SourceLine); + void addExtraFile(StringRef FileName); + +private: + DebugChecksumsSubsection &Checksums; + + bool HasExtraFiles = false; + uint32_t ExtraFileCount = 0; + + struct Entry { + std::vector ExtraFiles; + InlineeSourceLineHeader Header; + }; + std::vector Entries; +}; +} +} + +#endif Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h Tue May 30 17:37:31 2017 (r319230) @@ -0,0 +1,143 @@ +//===- DebugLinesSubsection.h --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGLINEFRAGMENT_H +#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGLINEFRAGMENT_H + +#include "llvm/DebugInfo/CodeView/DebugSubsection.h" +#include "llvm/DebugInfo/CodeView/Line.h" +#include "llvm/Support/BinaryStreamArray.h" +#include "llvm/Support/BinaryStreamReader.h" +#include "llvm/Support/Error.h" + +namespace llvm { +namespace codeview { + +class DebugChecksumsSubsection; +class DebugStringTableSubsection; + +// Corresponds to the `CV_DebugSLinesHeader_t` structure. +struct LineFragmentHeader { + support::ulittle32_t RelocOffset; // Code offset of line contribution. + support::ulittle16_t RelocSegment; // Code segment of line contribution. + support::ulittle16_t Flags; // See LineFlags enumeration. + support::ulittle32_t CodeSize; // Code size of this line contribution. +}; + +// Corresponds to the `CV_DebugSLinesFileBlockHeader_t` structure. +struct LineBlockFragmentHeader { + support::ulittle32_t NameIndex; // Offset of FileChecksum entry in File + // checksums buffer. The checksum entry then + // contains another offset into the string + // table of the actual name. + support::ulittle32_t NumLines; // Number of lines + support::ulittle32_t BlockSize; // Code size of block, in bytes. + // The following two variable length arrays appear immediately after the + // header. The structure definitions follow. + // LineNumberEntry Lines[NumLines]; + // ColumnNumberEntry Columns[NumLines]; +}; + +// Corresponds to `CV_Line_t` structure +struct LineNumberEntry { + support::ulittle32_t Offset; // Offset to start of code bytes for line number + support::ulittle32_t Flags; // Start:24, End:7, IsStatement:1 +}; + +// Corresponds to `CV_Column_t` structure +struct ColumnNumberEntry { + support::ulittle16_t StartColumn; + support::ulittle16_t EndColumn; +}; + +struct LineColumnEntry { + support::ulittle32_t NameIndex; + FixedStreamArray LineNumbers; + FixedStreamArray Columns; +}; + +class LineColumnExtractor { +public: + typedef const LineFragmentHeader *ContextType; + + static Error extract(BinaryStreamRef Stream, uint32_t &Len, + LineColumnEntry &Item, const LineFragmentHeader *Ctx); +}; + +class DebugLinesSubsectionRef final : public DebugSubsectionRef { + friend class LineColumnExtractor; + typedef VarStreamArray LineInfoArray; + typedef LineInfoArray::Iterator Iterator; + +public: + DebugLinesSubsectionRef(); + + static bool classof(const DebugSubsectionRef *S) { + return S->kind() == DebugSubsectionKind::Lines; + } + + Error initialize(BinaryStreamReader Reader); + + Iterator begin() const { return LinesAndColumns.begin(); } + Iterator end() const { return LinesAndColumns.end(); } + + const LineFragmentHeader *header() const { return Header; } + + bool hasColumnInfo() const; + +private: + const LineFragmentHeader *Header = nullptr; + LineInfoArray LinesAndColumns; +}; + +class DebugLinesSubsection final : public DebugSubsection { + struct Block { + Block(uint32_t ChecksumBufferOffset) + : ChecksumBufferOffset(ChecksumBufferOffset) {} + + uint32_t ChecksumBufferOffset; + std::vector Lines; + std::vector Columns; + }; + +public: + DebugLinesSubsection(DebugChecksumsSubsection &Checksums, + DebugStringTableSubsection &Strings); + + static bool classof(const DebugSubsection *S) { + return S->kind() == DebugSubsectionKind::Lines; + } + + void createBlock(StringRef FileName); + void addLineInfo(uint32_t Offset, const LineInfo &Line); + void addLineAndColumnInfo(uint32_t Offset, const LineInfo &Line, + uint32_t ColStart, uint32_t ColEnd); + + uint32_t calculateSerializedSize() const override; + Error commit(BinaryStreamWriter &Writer) const override; + + void setRelocationAddress(uint16_t Segment, uint16_t Offset); + void setCodeSize(uint32_t Size); + void setFlags(LineFlags Flags); + + bool hasColumnInfo() const; + +private: + DebugChecksumsSubsection &Checksums; + + uint16_t RelocOffset = 0; + uint16_t RelocSegment = 0; + uint32_t CodeSize = 0; + LineFlags Flags = LF_None; + std::vector Blocks; +}; +} +} + +#endif Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h Tue May 30 17:37:31 2017 (r319230) @@ -0,0 +1,86 @@ +//===- DebugStringTableSubsection.h - CodeView String Table -----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSTRINGTABLESUBSECTION_H +#define LLVM_DEBUGINFO_CODEVIEW_DEBUGSTRINGTABLESUBSECTION_H + +#include "llvm/ADT/StringMap.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/DebugInfo/CodeView/DebugSubsection.h" +#include "llvm/Support/BinaryStreamRef.h" +#include "llvm/Support/Error.h" + +#include + +namespace llvm { + +class BinaryStreamReader; +class BinaryStreamRef; +class BinaryStreamWriter; + +namespace codeview { + +/// Represents a read-only view of a CodeView string table. This is a very +/// simple flat buffer consisting of null-terminated strings, where strings +/// are retrieved by their offset in the buffer. DebugStringTableSubsectionRef +/// does not own the underlying storage for the buffer. +class DebugStringTableSubsectionRef : public DebugSubsectionRef { +public: + DebugStringTableSubsectionRef(); + + static bool classof(const DebugSubsectionRef *S) { + return S->kind() == DebugSubsectionKind::StringTable; + } + + Error initialize(BinaryStreamRef Contents); + + Expected getString(uint32_t Offset) const; + + bool valid() const { return Stream.valid(); } + +private: + BinaryStreamRef Stream; +}; + +/// Represents a read-write view of a CodeView string table. +/// DebugStringTableSubsection owns the underlying storage for the table, and is +/// capable of serializing the string table into a format understood by +/// DebugStringTableSubsectionRef. +class DebugStringTableSubsection : public DebugSubsection { +public: + DebugStringTableSubsection(); + + static bool classof(const DebugSubsection *S) { + return S->kind() == DebugSubsectionKind::StringTable; + } + + // If string S does not exist in the string table, insert it. + // Returns the ID for S. + uint32_t insert(StringRef S); + + // Return the ID for string S. Assumes S exists in the table. + uint32_t getStringId(StringRef S) const; + + uint32_t calculateSerializedSize() const override; + Error commit(BinaryStreamWriter &Writer) const override; + + uint32_t size() const; + + StringMap::const_iterator begin() const { return Strings.begin(); } + + StringMap::const_iterator end() const { return Strings.end(); } + +private: + StringMap Strings; + uint32_t StringSize = 1; +}; +} +} + +#endif Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsection.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsection.h Tue May 30 17:37:31 2017 (r319230) @@ -0,0 +1,52 @@ +//===- DebugSubsection.h ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H +#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H + +#include "llvm/DebugInfo/CodeView/CodeView.h" +#include "llvm/Support/BinaryStreamWriter.h" +#include "llvm/Support/Casting.h" + +namespace llvm { +namespace codeview { + +class DebugSubsectionRef { +public: + explicit DebugSubsectionRef(DebugSubsectionKind Kind) : Kind(Kind) {} + virtual ~DebugSubsectionRef(); + + static bool classof(const DebugSubsectionRef *S) { return true; } + + DebugSubsectionKind kind() const { return Kind; } + +protected: + DebugSubsectionKind Kind; +}; + +class DebugSubsection { +public: + explicit DebugSubsection(DebugSubsectionKind Kind) : Kind(Kind) {} + virtual ~DebugSubsection(); + + static bool classof(const DebugSubsection *S) { return true; } + + DebugSubsectionKind kind() const { return Kind; } + + virtual Error commit(BinaryStreamWriter &Writer) const = 0; + virtual uint32_t calculateSerializedSize() const = 0; + +protected: + DebugSubsectionKind Kind; +}; + +} // namespace codeview +} // namespace llvm + +#endif // LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h Tue May 30 17:37:31 2017 (r319230) @@ -0,0 +1,77 @@ +//===- DebugSubsection.h ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTRECORD_H +#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTRECORD_H + +#include "llvm/DebugInfo/CodeView/CodeView.h" +#include "llvm/Support/BinaryStreamArray.h" +#include "llvm/Support/BinaryStreamRef.h" +#include "llvm/Support/BinaryStreamWriter.h" +#include "llvm/Support/Endian.h" +#include "llvm/Support/Error.h" + +namespace llvm { +namespace codeview { + +class DebugSubsection; + +// Corresponds to the `CV_DebugSSubsectionHeader_t` structure. +struct DebugSubsectionHeader { + support::ulittle32_t Kind; // codeview::DebugSubsectionKind enum + support::ulittle32_t Length; // number of bytes occupied by this record. +}; + +class DebugSubsectionRecord { +public: + DebugSubsectionRecord(); + DebugSubsectionRecord(DebugSubsectionKind Kind, BinaryStreamRef Data); + + static Error initialize(BinaryStreamRef Stream, DebugSubsectionRecord &Info); + + uint32_t getRecordLength() const; + DebugSubsectionKind kind() const; + BinaryStreamRef getRecordData() const; + +private: + DebugSubsectionKind Kind; + BinaryStreamRef Data; +}; + +class DebugSubsectionRecordBuilder { +public: + DebugSubsectionRecordBuilder(DebugSubsectionKind Kind, DebugSubsection &Frag); + uint32_t calculateSerializedLength(); + Error commit(BinaryStreamWriter &Writer); + +private: + DebugSubsectionKind Kind; + DebugSubsection &Frag; +}; + +} // namespace codeview + +template <> struct VarStreamArrayExtractor { + typedef void ContextType; + + static Error extract(BinaryStreamRef Stream, uint32_t &Length, + codeview::DebugSubsectionRecord &Info) { + if (auto EC = codeview::DebugSubsectionRecord::initialize(Stream, Info)) + return EC; + Length = Info.getRecordLength(); + return Error::success(); + } +}; + +namespace codeview { +typedef VarStreamArray DebugSubsectionArray; +} +} // namespace llvm + +#endif // LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTRECORD_H Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h Tue May 30 17:37:31 2017 (r319230) @@ -0,0 +1,66 @@ +//===- DebugSubsectionVisitor.h -----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTVISITOR_H +#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENTVISITOR_H + +#include "llvm/Support/Error.h" +#include + +namespace llvm { + +namespace codeview { + +class DebugChecksumsSubsectionRef; +class DebugSubsectionRecord; +class DebugInlineeLinesSubsectionRef; +class DebugLinesSubsectionRef; +class DebugUnknownSubsectionRef; + +class DebugSubsectionVisitor { +public: + virtual ~DebugSubsectionVisitor() = default; + + virtual Error visitUnknown(DebugUnknownSubsectionRef &Unknown) { + return Error::success(); + } + virtual Error visitLines(DebugLinesSubsectionRef &Lines) { + return Error::success(); + } + + virtual Error visitFileChecksums(DebugChecksumsSubsectionRef &Checksums) { + return Error::success(); + } + + virtual Error visitInlineeLines(DebugInlineeLinesSubsectionRef &Inlinees) { + return Error::success(); + } + + virtual Error finished() { return Error::success(); } +}; + +Error visitDebugSubsection(const DebugSubsectionRecord &R, + DebugSubsectionVisitor &V); + +template +Error visitDebugSubsections(T &&FragmentRange, DebugSubsectionVisitor &V) { + for (const auto &L : FragmentRange) { + if (auto EC = visitDebugSubsection(L, V)) + return EC; + } + if (auto EC = V.finished()) + return EC; + return Error::success(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 30 17:37:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA9EEB94AB5; Tue, 30 May 2017 17:37:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 877F771580; Tue, 30 May 2017 17:37:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UHbeIc045717; Tue, 30 May 2017 17:37:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHbeJ7045715; Tue, 30 May 2017 17:37:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705301737.v4UHbeJ7045715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 17:37:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319232 - stable/11/usr.sbin/rpcbind X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:37:41 -0000 Author: ngie Date: Tue May 30 17:37:40 2017 New Revision: 319232 URL: https://svnweb.freebsd.org/changeset/base/319232 Log: MFC r317155,r317162,r317163,r317164: r317155: rpcbind(8): wordsmith -h description and mention -W in the SYNOPSIS section -W was already documented in the OPTIONS section. r317162: rpcbind(8): add a description for /var/run/rpcbind.sock under the FILES section r317163: rpcbind(8): post-humously document -w (warmstart) support added in r74462 warmstart support saves portmap/rpcbind(8) registration state on exit and restores the saved registration state on restart. r317164: Fix indentation per style.Makefile(5) Modified: stable/11/usr.sbin/rpcbind/Makefile stable/11/usr.sbin/rpcbind/rpcbind.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/rpcbind/Makefile ============================================================================== --- stable/11/usr.sbin/rpcbind/Makefile Tue May 30 17:37:37 2017 (r319231) +++ stable/11/usr.sbin/rpcbind/Makefile Tue May 30 17:37:40 2017 (r319232) @@ -15,12 +15,12 @@ CFLAGS+= -DINET6 .endif .if ${MK_TCP_WRAPPERS} != "no" -CFLAGS+= -DLIBWRAP -LIBADD+= wrap +CFLAGS+= -DLIBWRAP +LIBADD+= wrap .endif .if ${MK_TESTS} != "no" -SUBDIR+= tests +SUBDIR+= tests .endif WARNS?= 1 Modified: stable/11/usr.sbin/rpcbind/rpcbind.8 ============================================================================== --- stable/11/usr.sbin/rpcbind/rpcbind.8 Tue May 30 17:37:37 2017 (r319231) +++ stable/11/usr.sbin/rpcbind/rpcbind.8 Tue May 30 17:37:40 2017 (r319232) @@ -2,7 +2,7 @@ .\" Copyright 1989 AT&T .\" Copyright 1991 Sun Microsystems, Inc. .\" $FreeBSD$ -.Dd March 6, 2014 +.Dd April 19, 2017 .Dt RPCBIND 8 .Os .Sh NAME @@ -10,7 +10,7 @@ .Nd universal addresses to RPC program number mapper .Sh SYNOPSIS .Nm -.Op Fl 6adiLls +.Op Fl 6adiLlswW .Op Fl h Ar bindip .Sh DESCRIPTION The @@ -85,7 +85,7 @@ is also specified. With this option, the name-to-address translation consistency checks are shown in detail. .It Fl h Ar bindip -Specify specific IP addresses to bind to for TCP and UDP requests. +IP addresses to bind to when servicing TCP and UDP requests. This option may be specified multiple times and is typically necessary when running on a multi-homed host. @@ -135,6 +135,22 @@ clients from using to connect to services from a privileged port. .It Fl W Enable libwrap (TCP wrappers) support. +.It Fl w +Enable the warmstart feature. +.Pp +The warmstart feature saves RPC registrations on termination. +Any saved RPC registrations are restored on restart if +.Fl w +is specified. +This feature helps avoid RPC service interruption when restarting +.Nm . +warmstart support must be compiled in to +.Nm . +Portmap registrations are stored in +.Pa /tmp/portmap.file . +.Nm +registrations are stored in +.Pa /tmp/rpcbind.file . .El .Sh NOTES All RPC servers must be restarted if @@ -142,7 +158,14 @@ All RPC servers must be restarted if is restarted. .Sh FILES .Bl -tag -width /var/run/rpcbind.sock -compact +.It Pa /tmp/portmap.file +saved portmap registrations file. +.It Pa /tmp/rpcbind.file +saved +.Nm +registrations file. .It Pa /var/run/rpcbind.sock +socket used for local connections. .El .Sh SEE ALSO .Xr rpcbind 3 , From owner-svn-src-all@freebsd.org Tue May 30 17:37:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8C4BB94B0B; Tue, 30 May 2017 17:37:48 +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 4AB997161F; Tue, 30 May 2017 17:37:48 +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 v4UHblek045793; Tue, 30 May 2017 17:37:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHbik6045762; Tue, 30 May 2017 17:37:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301737.v4UHbik6045762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319233 - in vendor/clang/dist: include/clang-c include/clang/Basic include/clang/Frontend include/clang/Lex include/clang/Serialization include/clang/StaticAnalyzer/Checkers include/cl... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:37:48 -0000 Author: dim Date: Tue May 30 17:37:44 2017 New Revision: 319233 URL: https://svnweb.freebsd.org/changeset/base/319233 Log: Vendor import of clang trunk r304222: https://llvm.org/svn/llvm-project/cfe/trunk@304222 Added: vendor/clang/dist/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp (contents, props changed) vendor/clang/dist/test/Analysis/iterator-range.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/altivec-ct.c (contents, props changed) vendor/clang/dist/test/Lexer/preamble2.c (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess/c.h (contents, props changed) vendor/clang/dist/test/Modules/preprocess-nested.cpp (contents, props changed) vendor/clang/dist/test/Modules/preprocess-unavailable.cpp (contents, props changed) vendor/clang/dist/test/SemaOpenCL/arithmetic-conversions.cl Deleted: vendor/clang/dist/lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp vendor/clang/dist/test/Analysis/iterator-past-end.cpp Modified: vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/PreprocessorLexer.h vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/SerializedDiagnosticPrinter.cpp vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaOpenMP.cpp vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CMakeLists.txt vendor/clang/dist/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ProgramState.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/RegionStore.cpp vendor/clang/dist/test/Analysis/Inputs/system-header-simulator-cxx.h vendor/clang/dist/test/Analysis/diagnostics/explicit-suppression.cpp vendor/clang/dist/test/Analysis/pthreadlock.c vendor/clang/dist/test/Analysis/taint-generic.c vendor/clang/dist/test/CodeGen/arm_neon_intrinsics.c vendor/clang/dist/test/CodeGen/union-align.c vendor/clang/dist/test/CodeGenOpenCL/bool_cast.cl vendor/clang/dist/test/Lexer/preamble.c vendor/clang/dist/test/Modules/Inputs/preprocess/module.modulemap vendor/clang/dist/test/OpenMP/target_data_messages.c vendor/clang/dist/test/OpenMP/target_enter_data_map_messages.c vendor/clang/dist/test/OpenMP/target_enter_data_nowait_messages.cpp vendor/clang/dist/test/OpenMP/target_exit_data_map_messages.c vendor/clang/dist/test/OpenMP/target_exit_data_nowait_messages.cpp vendor/clang/dist/test/OpenMP/target_map_messages.cpp vendor/clang/dist/test/OpenMP/target_teams_map_messages.cpp vendor/clang/dist/test/SemaOpenCL/clang-builtin-version.cl vendor/clang/dist/test/SemaOpenCL/cond.cl vendor/clang/dist/test/SemaOpenCL/to_addr_builtin.cl vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/libclang.exports Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang-c/Index.h Tue May 30 17:37:44 2017 (r319233) @@ -32,7 +32,7 @@ * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable. */ #define CINDEX_VERSION_MAJOR 0 -#define CINDEX_VERSION_MINOR 40 +#define CINDEX_VERSION_MINOR 41 #define CINDEX_VERSION_ENCODE(major, minor) ( \ ((major) * 10000) \ @@ -1417,6 +1417,15 @@ enum CXSaveError { CINDEX_LINKAGE int clang_saveTranslationUnit(CXTranslationUnit TU, const char *FileName, unsigned options); + +/** + * \brief Suspend a translation unit in order to free memory associated with it. + * + * A suspended translation unit uses significantly less memory but on the other + * side does not support any other calls than \c clang_reparseTranslationUnit + * to resume it or \c clang_disposeTranslationUnit to dispose it completely. + */ +CINDEX_LINKAGE unsigned clang_suspendTranslationUnit(CXTranslationUnit); /** * \brief Destroy the specified CXTranslationUnit object. Modified: vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td Tue May 30 17:37:44 2017 (r319233) @@ -525,6 +525,8 @@ def err_pp_module_begin_without_module_end : Error< def err_pp_module_end_without_module_begin : Error< "no matching '#pragma clang module begin' for this " "'#pragma clang module end'">; +def note_pp_module_begin_here : Note< + "entering module '%0' due to this pragma">; def err_defined_macro_name : Error<"'defined' cannot be used as a macro name">; def err_paste_at_start : Error< Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Tue May 30 17:37:44 2017 (r319233) @@ -8312,8 +8312,13 @@ def err_opencl_bitfields : Error< "bit-fields are not supported in OpenCL">; def err_opencl_vla : Error< "variable length arrays are not supported in OpenCL">; +def err_opencl_scalar_type_rank_greater_than_vector_type : Error< + "scalar operand type has greater rank than the type of the vector " + "element. (%0 and %1)">; def err_bad_kernel_param_type : Error< "%0 cannot be used as the type of a kernel parameter">; +def err_opencl_implicit_function_decl : Error< + "implicit declaration of function %0 is invalid in OpenCL">; def err_record_with_pointers_kernel_param : Error< "%select{struct|union}0 kernel parameters may not contain pointers">; def note_within_field_of_type : Note< @@ -8744,8 +8749,8 @@ def err_omp_not_mappable_type : Error< "type %0 is not mappable to target">; def err_omp_invalid_map_type_for_directive : Error< "%select{map type '%1' is not allowed|map type must be specified}0 for '#pragma omp %2'">; -def err_omp_no_map_for_directive : Error< - "expected at least one map clause for '#pragma omp %0'">; +def err_omp_no_clause_for_directive : Error< + "expected at least one %0 clause for '#pragma omp %1'">; def note_omp_polymorphic_in_target : Note< "mappable type cannot be polymorphic">; def note_omp_static_member_in_target : Note< Modified: vendor/clang/dist/include/clang/Frontend/ASTUnit.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/ASTUnit.h Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/Frontend/ASTUnit.h Tue May 30 17:37:44 2017 (r319233) @@ -878,6 +878,11 @@ class ASTUnit : public ModuleLoader { (public) ArrayRef RemappedFiles = None, IntrusiveRefCntPtr VFS = nullptr); + /// \brief Free data that will be re-generated on the next parse. + /// + /// Preamble-related data is not affected. + void ResetForParse(); + /// \brief Perform code completion at the given file, line, and /// column within this translation unit. /// Modified: vendor/clang/dist/include/clang/Lex/Preprocessor.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/Preprocessor.h Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/Lex/Preprocessor.h Tue May 30 17:37:44 2017 (r319233) @@ -283,6 +283,44 @@ class Preprocessor { /// This is used when loading a precompiled preamble. std::pair SkipMainFilePreamble; + class PreambleConditionalStackStore { + enum State { + Off = 0, + Recording = 1, + Replaying = 2, + }; + + public: + PreambleConditionalStackStore() : ConditionalStackState(Off) {} + + void startRecording() { ConditionalStackState = Recording; } + void startReplaying() { ConditionalStackState = Replaying; } + bool isRecording() const { return ConditionalStackState == Recording; } + bool isReplaying() const { return ConditionalStackState == Replaying; } + + ArrayRef getStack() const { + return ConditionalStack; + } + + void doneReplaying() { + ConditionalStack.clear(); + ConditionalStackState = Off; + } + + void setStack(ArrayRef s) { + if (!isRecording() && !isReplaying()) + return; + ConditionalStack.clear(); + ConditionalStack.append(s.begin(), s.end()); + } + + bool hasRecordedPreamble() const { return !ConditionalStack.empty(); } + + private: + SmallVector ConditionalStack; + State ConditionalStackState; + } PreambleConditionalStack; + /// \brief The current top of the stack that we're lexing from if /// not expanding a macro and we are lexing directly from source code. /// @@ -1695,6 +1733,11 @@ class Preprocessor { /// \brief Return true if we're in the top-level file, not in a \#include. bool isInPrimaryFile() const; + /// \brief Return true if we're in the main file (specifically, if we are 0 + /// (zero) levels deep \#include. This is used by the lexer to determine if + /// it needs to generate errors about unterminated \#if directives. + bool isInMainFile() const; + /// \brief Handle cases where the \#include name is expanded /// from a macro as multiple tokens, which need to be glued together. /// @@ -1931,6 +1974,27 @@ class Preprocessor { const FileEntry *getModuleHeaderToIncludeForDiagnostics(SourceLocation IncLoc, Module *M, SourceLocation MLoc); + + bool isRecordingPreamble() const { + return PreambleConditionalStack.isRecording(); + } + + bool hasRecordedPreamble() const { + return PreambleConditionalStack.hasRecordedPreamble(); + } + + ArrayRef getPreambleConditionalStack() const { + return PreambleConditionalStack.getStack(); + } + + void setRecordedPreambleConditionalStack(ArrayRef s) { + PreambleConditionalStack.setStack(s); + } + + void setReplayablePreambleConditionalStack(ArrayRef s) { + PreambleConditionalStack.startReplaying(); + PreambleConditionalStack.setStack(s); + } private: // Macro handling. Modified: vendor/clang/dist/include/clang/Lex/PreprocessorLexer.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/PreprocessorLexer.h Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/Lex/PreprocessorLexer.h Tue May 30 17:37:44 2017 (r319233) @@ -17,6 +17,7 @@ #include "clang/Lex/MultipleIncludeOpt.h" #include "clang/Lex/Token.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallVector.h" namespace clang { @@ -175,6 +176,11 @@ class PreprocessorLexer { (public) } conditional_iterator conditional_end() const { return ConditionalStack.end(); + } + + void setConditionalLevels(ArrayRef CL) { + ConditionalStack.clear(); + ConditionalStack.append(CL.begin(), CL.end()); } }; Modified: vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h Tue May 30 17:37:44 2017 (r319233) @@ -80,7 +80,14 @@ class PreprocessorOptions { (public) /// The boolean indicates whether the preamble ends at the start of a new /// line. std::pair PrecompiledPreambleBytes; - + + /// \brief True indicates that a preamble is being generated. + /// + /// When the lexer is done, one of the things that need to be preserved is the + /// conditional #if stack, so the ASTWriter/ASTReader can save/restore it when + /// processing the rest of the file. + bool GeneratePreamble; + /// The implicit PTH input included at the start of the translation unit, or /// empty. std::string ImplicitPTHInclude; @@ -144,6 +151,7 @@ class PreprocessorOptions { (public) AllowPCHWithCompilerErrors(false), DumpDeserializedPCHDecls(false), PrecompiledPreambleBytes(0, true), + GeneratePreamble(false), RemappedFilesKeepOriginalName(true), RetainRemappedFileBuffers(false), ObjCXXARCStandardLibrary(ARCXX_nolib) { } Modified: vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h ============================================================================== --- vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h Tue May 30 17:37:44 2017 (r319233) @@ -607,6 +607,9 @@ namespace clang { /// \brief Record code for \#pragma pack options. PACK_PRAGMA_OPTIONS = 61, + + /// \brief The stack of open #ifs/#ifdefs recorded in a preamble. + PP_CONDITIONAL_STACK = 62, }; /// \brief Record types used within a source manager block. Modified: vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td ============================================================================== --- vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td Tue May 30 17:37:44 2017 (r319233) @@ -279,14 +279,14 @@ def VirtualCallChecker : Checker<"VirtualCall">, let ParentPackage = CplusplusAlpha in { +def IteratorRangeChecker : Checker<"IteratorRange">, + HelpText<"Check for iterators used outside their valid ranges">, + DescFile<"IteratorChecker.cpp">; + def MisusedMovedObjectChecker: Checker<"MisusedMovedObject">, HelpText<"Method calls on a moved-from object and copying a moved-from " "object will be reported">, DescFile<"MisusedMovedObjectChecker.cpp">; - -def IteratorPastEndChecker : Checker<"IteratorPastEnd">, - HelpText<"Check iterators used past end">, - DescFile<"IteratorPastEndChecker.cpp">; } // end: "alpha.cplusplus" Modified: vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h ============================================================================== --- vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h Tue May 30 17:37:44 2017 (r319233) @@ -43,6 +43,7 @@ typedef std::unique_ptr(*Constraint ProgramStateManager &, SubEngine *); typedef std::unique_ptr(*StoreManagerCreator)( ProgramStateManager &); +typedef llvm::ImmutableMap TaintedSubRegions; //===----------------------------------------------------------------------===// // ProgramStateTrait - Traits used by the Generic Data Map of a ProgramState. @@ -343,6 +344,9 @@ class ProgramState : public llvm::FoldingSetNode { (pu ProgramStateRef addTaint(const Stmt *S, const LocationContext *LCtx, TaintTagType Kind = TaintTagGeneric) const; + /// Create a new state in which the value is marked as tainted. + ProgramStateRef addTaint(SVal V, TaintTagType Kind = TaintTagGeneric) const; + /// Create a new state in which the symbol is marked as tainted. ProgramStateRef addTaint(SymbolRef S, TaintTagType Kind = TaintTagGeneric) const; @@ -351,6 +355,14 @@ class ProgramState : public llvm::FoldingSetNode { (pu ProgramStateRef addTaint(const MemRegion *R, TaintTagType Kind = TaintTagGeneric) const; + /// Create a new state in a which a sub-region of a given symbol is tainted. + /// This might be necessary when referring to regions that can not have an + /// individual symbol, e.g. if they are represented by the default binding of + /// a LazyCompoundVal. + ProgramStateRef addPartialTaint(SymbolRef ParentSym, + const SubRegion *SubRegion, + TaintTagType Kind = TaintTagGeneric) const; + /// Check if the statement is tainted in the current state. bool isTainted(const Stmt *S, const LocationContext *LCtx, TaintTagType Kind = TaintTagGeneric) const; @@ -453,6 +465,7 @@ class ProgramStateManager { (private) std::unique_ptr ConstraintMgr; ProgramState::GenericDataMap::Factory GDMFactory; + TaintedSubRegions::Factory TSRFactory; typedef llvm::DenseMap > GDMContextsTy; GDMContextsTy GDMContexts; Modified: vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h ============================================================================== --- vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h Tue May 30 17:37:44 2017 (r319233) @@ -35,6 +35,16 @@ template<> struct ProgramStateTrait static void *GDMIndex() { static int index = 0; return &index; } }; +/// The GDM component mapping derived symbols' parent symbols to their +/// underlying regions. This is used to efficiently check whether a symbol is +/// tainted when it represents a sub-region of a tainted symbol. +struct DerivedSymTaint {}; +typedef llvm::ImmutableMap DerivedSymTaintImpl; +template<> struct ProgramStateTrait + : public ProgramStatePartialTrait { + static void *GDMIndex() { static int index; return &index; } +}; + class TaintManager { TaintManager() {} Modified: vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp Tue May 30 17:37:44 2017 (r319233) @@ -578,8 +578,7 @@ void CodeGenFunction::EmitCoroutineBody(const Coroutin EmitBlock(FinalBB); CurCoro.Data->CurrentAwaitKind = AwaitKind::Final; EmitStmt(S.getFinalSuspendStmt()); - } - else { + } else { // We don't need FinalBB. Emit it to make sure the block is deleted. EmitBlock(FinalBB, /*IsFinished=*/true); } Modified: vendor/clang/dist/lib/Frontend/ASTUnit.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/ASTUnit.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Frontend/ASTUnit.cpp Tue May 30 17:37:44 2017 (r319233) @@ -1036,8 +1036,6 @@ static void checkAndSanitizeDiags(SmallVectorImpl PCHContainerOps, std::unique_ptr OverrideMainBuffer, IntrusiveRefCntPtr VFS) { - SavedMainFileBuffer.reset(); - if (!Invocation) return true; @@ -1090,17 +1088,11 @@ bool ASTUnit::Parse(std::shared_ptrcreateFileManager(); FileMgr = &Clang->getFileManager(); } - SourceMgr = new SourceManager(getDiagnostics(), *FileMgr, - UserFilesAreVolatile); - TheSema.reset(); - Ctx = nullptr; - PP = nullptr; - Reader = nullptr; - // Clear out old caches and data. - TopLevelDecls.clear(); - clearFileLevelDecls(); + ResetForParse(); + SourceMgr = new SourceManager(getDiagnostics(), *FileMgr, + UserFilesAreVolatile); if (!OverrideMainBuffer) { checkAndRemoveNonDriverDiags(StoredDiagnostics); TopLevelDeclsInPreamble.clear(); @@ -1999,6 +1991,7 @@ ASTUnit *ASTUnit::LoadFromCommandLine( PreprocessorOptions &PPOpts = CI->getPreprocessorOpts(); PPOpts.RemappedFilesKeepOriginalName = RemappedFilesKeepOriginalName; PPOpts.AllowPCHWithCompilerErrors = AllowPCHWithCompilerErrors; + PPOpts.GeneratePreamble = PrecompilePreambleAfterNParses != 0; // Override the resources path. CI->getHeaderSearchOpts().ResourceDir = ResourceFilesPath; @@ -2113,6 +2106,19 @@ bool ASTUnit::Reparse(std::shared_ptrAdd(BitCodeAbbrevOp(RECORD_FILENAME)); Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 10)); // Mapped file ID. Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // Size. - Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // Modifcation time. + Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // Modification time. Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 16)); // Text size. Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); // File name text. Abbrevs.set(RECORD_FILENAME, Stream.EmitBlockInfoAbbrev(BLOCK_DIAG, Modified: vendor/clang/dist/lib/Headers/altivec.h ============================================================================== --- vendor/clang/dist/lib/Headers/altivec.h Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Headers/altivec.h Tue May 30 17:37:44 2017 (r319233) @@ -2887,87 +2887,79 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn /* vec_ctf */ -static __inline__ vector float __ATTRS_o_ai vec_ctf(vector int __a, int __b) { - return __builtin_altivec_vcfsx(__a, __b); -} - -static __inline__ vector float __ATTRS_o_ai vec_ctf(vector unsigned int __a, - int __b) { - return __builtin_altivec_vcfux((vector int)__a, __b); -} - #ifdef __VSX__ -static __inline__ vector double __ATTRS_o_ai -vec_ctf(vector unsigned long long __a, int __b) { - vector double __ret = __builtin_convertvector(__a, vector double); - __ret *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52); - return __ret; -} - -static __inline__ vector double __ATTRS_o_ai -vec_ctf(vector signed long long __a, int __b) { - vector double __ret = __builtin_convertvector(__a, vector double); - __ret *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52); - return __ret; -} +#define vec_ctf(__a, __b) \ + _Generic((__a), vector int \ + : (vector float)__builtin_altivec_vcfsx((__a), (__b)), \ + vector unsigned int \ + : (vector float)__builtin_altivec_vcfux((vector int)(__a), (__b)), \ + vector unsigned long long \ + : (__builtin_convertvector((vector unsigned long long)(__a), \ + vector double) * \ + (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ + << 52)), \ + vector signed long long \ + : (__builtin_convertvector((vector signed long long)(__a), \ + vector double) * \ + (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ + << 52))) +#else +#define vec_ctf(__a, __b) \ + _Generic((__a), vector int \ + : (vector float)__builtin_altivec_vcfsx((__a), (__b)), \ + vector unsigned int \ + : (vector float)__builtin_altivec_vcfux((vector int)(__a), (__b))) #endif /* vec_vcfsx */ -static __inline__ vector float __attribute__((__always_inline__)) -vec_vcfsx(vector int __a, int __b) { - return __builtin_altivec_vcfsx(__a, __b); -} +#define vec_vcfux __builtin_altivec_vcfux /* vec_vcfux */ -static __inline__ vector float __attribute__((__always_inline__)) -vec_vcfux(vector unsigned int __a, int __b) { - return __builtin_altivec_vcfux((vector int)__a, __b); -} +#define vec_vcfsx(__a, __b) __builtin_altivec_vcfsx((vector int)(__a), (__b)) /* vec_cts */ -static __inline__ vector int __ATTRS_o_ai vec_cts(vector float __a, int __b) { - return __builtin_altivec_vctsxs(__a, __b); -} - #ifdef __VSX__ -static __inline__ vector signed long long __ATTRS_o_ai -vec_cts(vector double __a, int __b) { - __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52); - return __builtin_convertvector(__a, vector signed long long); -} +#define vec_cts(__a, __b) \ + _Generic((__a), vector float \ + : __builtin_altivec_vctsxs((__a), (__b)), vector double \ + : __extension__({ \ + vector double __ret = \ + (__a) * \ + (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \ + << 52); \ + __builtin_convertvector(__ret, vector signed long long); \ + })) +#else +#define vec_cts __builtin_altivec_vctsxs #endif /* vec_vctsxs */ -static __inline__ vector int __attribute__((__always_inline__)) -vec_vctsxs(vector float __a, int __b) { - return __builtin_altivec_vctsxs(__a, __b); -} +#define vec_vctsxs __builtin_altivec_vctsxs /* vec_ctu */ -static __inline__ vector unsigned int __ATTRS_o_ai vec_ctu(vector float __a, - int __b) { - return __builtin_altivec_vctuxs(__a, __b); -} - #ifdef __VSX__ -static __inline__ vector unsigned long long __ATTRS_o_ai -vec_ctu(vector double __a, int __b) { - __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52); - return __builtin_convertvector(__a, vector unsigned long long); -} +#define vec_ctu(__a, __b) \ + _Generic((__a), vector float \ + : __builtin_altivec_vctuxs((__a), (__b)), vector double \ + : __extension__({ \ + vector double __ret = \ + (__a) * \ + (vector double)(vector unsigned long long)((0x3ffULL + __b) \ + << 52); \ + __builtin_convertvector(__ret, vector unsigned long long); \ + })) +#else +#define vec_ctu __builtin_altivec_vctuxs #endif /* vec_vctuxs */ -static __inline__ vector unsigned int __attribute__((__always_inline__)) -vec_vctuxs(vector float __a, int __b) { - return __builtin_altivec_vctuxs(__a, __b); -} +#define vec_vctuxs __builtin_altivec_vctuxs /* vec_signed */ Modified: vendor/clang/dist/lib/Lex/Lexer.cpp ============================================================================== --- vendor/clang/dist/lib/Lex/Lexer.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Lex/Lexer.cpp Tue May 30 17:37:44 2017 (r319233) @@ -550,8 +550,6 @@ namespace { enum PreambleDirectiveKind { PDK_Skipped, - PDK_StartIf, - PDK_EndIf, PDK_Unknown }; @@ -574,8 +572,6 @@ std::pair Lexer::ComputePreamble(Strin bool InPreprocessorDirective = false; Token TheTok; - Token IfStartTok; - unsigned IfCount = 0; SourceLocation ActiveCommentLoc; unsigned MaxLineOffset = 0; @@ -658,33 +654,18 @@ std::pair Lexer::ComputePreamble(Strin .Case("sccs", PDK_Skipped) .Case("assert", PDK_Skipped) .Case("unassert", PDK_Skipped) - .Case("if", PDK_StartIf) - .Case("ifdef", PDK_StartIf) - .Case("ifndef", PDK_StartIf) + .Case("if", PDK_Skipped) + .Case("ifdef", PDK_Skipped) + .Case("ifndef", PDK_Skipped) .Case("elif", PDK_Skipped) .Case("else", PDK_Skipped) - .Case("endif", PDK_EndIf) + .Case("endif", PDK_Skipped) .Default(PDK_Unknown); switch (PDK) { case PDK_Skipped: continue; - case PDK_StartIf: - if (IfCount == 0) - IfStartTok = HashTok; - - ++IfCount; - continue; - - case PDK_EndIf: - // Mismatched #endif. The preamble ends here. - if (IfCount == 0) - break; - - --IfCount; - continue; - case PDK_Unknown: // We don't know what this directive is; stop at the '#'. break; @@ -705,16 +686,13 @@ std::pair Lexer::ComputePreamble(Strin } while (true); SourceLocation End; - if (IfCount) - End = IfStartTok.getLocation(); - else if (ActiveCommentLoc.isValid()) + if (ActiveCommentLoc.isValid()) End = ActiveCommentLoc; // don't truncate a decl comment. else End = TheTok.getLocation(); return std::make_pair(End.getRawEncoding() - StartLoc.getRawEncoding(), - IfCount? IfStartTok.isAtStartOfLine() - : TheTok.isAtStartOfLine()); + TheTok.isAtStartOfLine()); } /// AdvanceToTokenCharacter - Given a location that specifies the start of a @@ -2570,6 +2548,11 @@ bool Lexer::LexEndOfFile(Token &Result, const char *Cu return true; } + if (PP->isRecordingPreamble() && !PP->isInMainFile()) { + PP->setRecordedPreambleConditionalStack(ConditionalStack); + ConditionalStack.clear(); + } + // Issue diagnostics for unterminated #if and missing newline. // If we are in a #if directive, emit an error. Modified: vendor/clang/dist/lib/Lex/PPDirectives.cpp ============================================================================== --- vendor/clang/dist/lib/Lex/PPDirectives.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Lex/PPDirectives.cpp Tue May 30 17:37:44 2017 (r319233) @@ -1906,6 +1906,25 @@ void Preprocessor::HandleIncludeDirective(SourceLocati } } + // The #included file will be considered to be a system header if either it is + // in a system include directory, or if the #includer is a system include + // header. + SrcMgr::CharacteristicKind FileCharacter = + SourceMgr.getFileCharacteristic(FilenameTok.getLocation()); + if (File) + FileCharacter = std::max(HeaderInfo.getFileDirFlavor(File), FileCharacter); + + // Ask HeaderInfo if we should enter this #include file. If not, #including + // this file will have no effect. + bool SkipHeader = false; + if (ShouldEnter && File && + !HeaderInfo.ShouldEnterIncludeFile(*this, File, isImport, + getLangOpts().Modules, + SuggestedModule.getModule())) { + ShouldEnter = false; + SkipHeader = true; + } + if (Callbacks) { // Notify the callback object that we've seen an inclusion directive. Callbacks->InclusionDirective( @@ -1913,18 +1932,13 @@ void Preprocessor::HandleIncludeDirective(SourceLocati LangOpts.MSVCCompat ? NormalizedPath.c_str() : Filename, isAngled, FilenameRange, File, SearchPath, RelativePath, ShouldEnter ? nullptr : SuggestedModule.getModule()); + if (SkipHeader && !SuggestedModule.getModule()) + Callbacks->FileSkipped(*File, FilenameTok, FileCharacter); } if (!File) return; - // The #included file will be considered to be a system header if either it is - // in a system include directory, or if the #includer is a system include - // header. - SrcMgr::CharacteristicKind FileCharacter = - std::max(HeaderInfo.getFileDirFlavor(File), - SourceMgr.getFileCharacteristic(FilenameTok.getLocation())); - // FIXME: If we have a suggested module, and we've already visited this file, // don't bother entering it again. We know it has no further effect. @@ -1962,19 +1976,6 @@ void Preprocessor::HandleIncludeDirective(SourceLocati Diag(FilenameTok, DiagId) << Path << FixItHint::CreateReplacement(Range, Path); } - } - - // Ask HeaderInfo if we should enter this #include file. If not, #including - // this file will have no effect. - bool SkipHeader = false; - if (ShouldEnter && - !HeaderInfo.ShouldEnterIncludeFile(*this, File, isImport, - getLangOpts().Modules, - SuggestedModule.getModule())) { - ShouldEnter = false; - SkipHeader = true; - if (Callbacks) - Callbacks->FileSkipped(*File, FilenameTok, FileCharacter); } // If we don't need to enter the file, stop now. Modified: vendor/clang/dist/lib/Lex/PPLexerChange.cpp ============================================================================== --- vendor/clang/dist/lib/Lex/PPLexerChange.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Lex/PPLexerChange.cpp Tue May 30 17:37:44 2017 (r319233) @@ -46,6 +46,12 @@ bool Preprocessor::isInPrimaryFile() const { }); } +bool Preprocessor::isInMainFile() const { + if (IsFileLexer()) + return IncludeMacroStack.size() == 0; + return true; +} + /// getCurrentLexer - Return the current file lexer being lexed from. Note /// that this ignores any potentially active macro expansions and _Pragma /// expansions going on at the time. Modified: vendor/clang/dist/lib/Lex/Pragma.cpp ============================================================================== --- vendor/clang/dist/lib/Lex/Pragma.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Lex/Pragma.cpp Tue May 30 17:37:44 2017 (r319233) @@ -1407,6 +1407,24 @@ struct PragmaModuleBeginHandler : public PragmaHandler M = NewM; } + // If the module isn't available, it doesn't make sense to enter it. + if (!M->isAvailable()) { + Module::Requirement Requirement; + Module::UnresolvedHeaderDirective MissingHeader; + (void)M->isAvailable(PP.getLangOpts(), PP.getTargetInfo(), + Requirement, MissingHeader); + if (MissingHeader.FileNameLoc.isValid()) { + PP.Diag(MissingHeader.FileNameLoc, diag::err_module_header_missing) + << MissingHeader.IsUmbrella << MissingHeader.FileName; + } else { + PP.Diag(M->DefinitionLoc, diag::err_module_unavailable) + << M->getFullModuleName() << Requirement.second << Requirement.first; + } + PP.Diag(BeginLoc, diag::note_pp_module_begin_here) + << M->getTopLevelModuleName(); + return; + } + // Enter the scope of the submodule. PP.EnterSubmodule(M, BeginLoc, /*ForPragma*/true); PP.EnterAnnotationToken(SourceRange(BeginLoc, ModuleName.back().second), Modified: vendor/clang/dist/lib/Lex/Preprocessor.cpp ============================================================================== --- vendor/clang/dist/lib/Lex/Preprocessor.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Lex/Preprocessor.cpp Tue May 30 17:37:44 2017 (r319233) @@ -150,6 +150,9 @@ Preprocessor::Preprocessor(std::shared_ptrPPOpts->GeneratePreamble) + PreambleConditionalStack.startRecording(); } Preprocessor::~Preprocessor() { @@ -532,6 +535,12 @@ void Preprocessor::EnterMainSourceFile() { // Start parsing the predefines. EnterSourceFile(FID, nullptr, SourceLocation()); + + // Restore the conditional stack from the preamble, if there is one. + if (PreambleConditionalStack.isReplaying()) { + CurPPLexer->setConditionalLevels(PreambleConditionalStack.getStack()); + PreambleConditionalStack.doneReplaying(); + } } void Preprocessor::EndSourceFile() { Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Tue May 30 17:37:44 2017 (r319233) @@ -12509,6 +12509,9 @@ NamedDecl *Sema::ImplicitlyDefineFunction(SourceLocati unsigned diag_id; if (II.getName().startswith("__builtin_")) diag_id = diag::warn_builtin_unknown; + // OpenCL v2.0 s6.9.u - Implicit function declaration is not supported. + else if (getLangOpts().OpenCL) + diag_id = diag::err_opencl_implicit_function_decl; else if (getLangOpts().C99) diag_id = diag::ext_implicit_function_decl; else Modified: vendor/clang/dist/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExpr.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Sema/SemaExpr.cpp Tue May 30 17:37:44 2017 (r319233) @@ -8074,28 +8074,38 @@ QualType Sema::InvalidLogicalVectorOperands(SourceLoca /// rank; for C, Obj-C, and C++ we allow any real scalar conversion except /// for float->int. /// +/// OpenCL V2.0 6.2.6.p2: +/// An error shall occur if any scalar operand type has greater rank +/// than the type of the vector element. +/// /// \param scalar - if non-null, actually perform the conversions /// \return true if the operation fails (but without diagnosing the failure) static bool tryVectorConvertAndSplat(Sema &S, ExprResult *scalar, QualType scalarTy, QualType vectorEltTy, - QualType vectorTy) { + QualType vectorTy, + unsigned &DiagID) { // The conversion to apply to the scalar before splatting it, // if necessary. CastKind scalarCast = CK_Invalid; if (vectorEltTy->isIntegralType(S.Context)) { + if (S.getLangOpts().OpenCL && (scalarTy->isRealFloatingType() || + (scalarTy->isIntegerType() && + S.Context.getIntegerTypeOrder(vectorEltTy, scalarTy) < 0))) { + DiagID = diag::err_opencl_scalar_type_rank_greater_than_vector_type; + return true; + } if (!scalarTy->isIntegralType(S.Context)) return true; - if (S.getLangOpts().OpenCL && - S.Context.getIntegerTypeOrder(vectorEltTy, scalarTy) < 0) - return true; scalarCast = CK_IntegralCast; } else if (vectorEltTy->isRealFloatingType()) { if (scalarTy->isRealFloatingType()) { if (S.getLangOpts().OpenCL && - S.Context.getFloatingTypeOrder(vectorEltTy, scalarTy) < 0) + S.Context.getFloatingTypeOrder(vectorEltTy, scalarTy) < 0) { + DiagID = diag::err_opencl_scalar_type_rank_greater_than_vector_type; return true; + } scalarCast = CK_FloatingCast; } else if (scalarTy->isIntegralType(S.Context)) @@ -8341,10 +8351,12 @@ QualType Sema::CheckVectorOperands(ExprResult &LHS, Ex // If there's a vector type and a scalar, try to convert the scalar to // the vector element type and splat. + unsigned DiagID = diag::err_typecheck_vector_not_convertable; if (!RHSVecType) { if (isa(LHSVecType)) { if (!tryVectorConvertAndSplat(*this, &RHS, RHSType, - LHSVecType->getElementType(), LHSType)) + LHSVecType->getElementType(), LHSType, + DiagID)) return LHSType; } else { if (!tryGCCVectorConvertAndSplat(*this, &RHS, &LHS)) @@ -8355,7 +8367,7 @@ QualType Sema::CheckVectorOperands(ExprResult &LHS, Ex if (isa(RHSVecType)) { if (!tryVectorConvertAndSplat(*this, (IsCompAssign ? nullptr : &LHS), LHSType, RHSVecType->getElementType(), - RHSType)) + RHSType, DiagID)) return RHSType; } else { if (LHS.get()->getValueKind() == VK_LValue || @@ -8431,7 +8443,7 @@ QualType Sema::CheckVectorOperands(ExprResult &LHS, Ex } // Otherwise, use the generic diagnostic. - Diag(Loc, diag::err_typecheck_vector_not_convertable) + Diag(Loc, DiagID) << LHSType << RHSType << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); return QualType(); Modified: vendor/clang/dist/lib/Sema/SemaOpenMP.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaOpenMP.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Sema/SemaOpenMP.cpp Tue May 30 17:37:44 2017 (r319233) @@ -5929,16 +5929,17 @@ StmtResult Sema::ActOnOpenMPTargetParallelForDirective B, DSAStack->isCancelRegion()); } -/// \brief Check for existence of a map clause in the list of clauses. -static bool HasMapClause(ArrayRef Clauses) { - for (ArrayRef::iterator I = Clauses.begin(), E = Clauses.end(); - I != E; ++I) { - if (*I != nullptr && (*I)->getClauseKind() == OMPC_map) { - return true; - } - } +/// Check for existence of a map clause in the list of clauses. +static bool hasClauses(ArrayRef Clauses, + const OpenMPClauseKind K) { + return llvm::any_of( + Clauses, [K](const OMPClause *C) { return C->getClauseKind() == K; }); +} - return false; +template +static bool hasClauses(ArrayRef Clauses, const OpenMPClauseKind K, + const Params... ClauseTypes) { + return hasClauses(Clauses, K) || hasClauses(Clauses, ClauseTypes...); } StmtResult Sema::ActOnOpenMPTargetDataDirective(ArrayRef Clauses, @@ -5952,8 +5953,9 @@ StmtResult Sema::ActOnOpenMPTargetDataDirective(ArrayR // OpenMP [2.10.1, Restrictions, p. 97] // At least one map clause must appear on the directive. - if (!HasMapClause(Clauses)) { - Diag(StartLoc, diag::err_omp_no_map_for_directive) + if (!hasClauses(Clauses, OMPC_map, OMPC_use_device_ptr)) { + Diag(StartLoc, diag::err_omp_no_clause_for_directive) + << "'map' or 'use_device_ptr'" << getOpenMPDirectiveName(OMPD_target_data); return StmtError(); } @@ -5970,9 +5972,9 @@ Sema::ActOnOpenMPTargetEnterDataDirective(ArrayRef Clauses, SourceLocation StartLoc, SourceLocation EndLoc) { - bool seenMotionClause = false; - for (auto *C : Clauses) { - if (C->getClauseKind() == OMPC_to || C->getClauseKind() == OMPC_from) - seenMotionClause = true; - } - if (!seenMotionClause) { + if (!hasClauses(Clauses, OMPC_to, OMPC_from)) { Diag(StartLoc, diag::err_omp_at_least_one_motion_clause_required); return StmtError(); } Modified: vendor/clang/dist/lib/Serialization/ASTReader.cpp ============================================================================== --- vendor/clang/dist/lib/Serialization/ASTReader.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Serialization/ASTReader.cpp Tue May 30 17:37:44 2017 (r319233) @@ -2925,6 +2925,21 @@ ASTReader::ReadASTBlock(ModuleFile &F, unsigned Client } break; + case PP_CONDITIONAL_STACK: + if (!Record.empty()) { + SmallVector ConditionalStack; + for (unsigned Idx = 0, N = Record.size() - 1; Idx < N; /* in loop */) { + auto Loc = ReadSourceLocation(F, Record, Idx); + bool WasSkipping = Record[Idx++]; + bool FoundNonSkip = Record[Idx++]; + bool FoundElse = Record[Idx++]; + ConditionalStack.push_back( + {Loc, WasSkipping, FoundNonSkip, FoundElse}); + } + PP.setReplayablePreambleConditionalStack(ConditionalStack); + } + break; + case PP_COUNTER_VALUE: if (!Record.empty() && Listener) Listener->ReadCounter(F, Record[0]); Modified: vendor/clang/dist/lib/Serialization/ASTWriter.cpp ============================================================================== --- vendor/clang/dist/lib/Serialization/ASTWriter.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/Serialization/ASTWriter.cpp Tue May 30 17:37:44 2017 (r319233) @@ -1093,6 +1093,7 @@ void ASTWriter::WriteBlockInfoBlock() { RECORD(UNUSED_LOCAL_TYPEDEF_NAME_CANDIDATES); RECORD(DELETE_EXPRS_TO_ANALYZE); RECORD(CUDA_PRAGMA_FORCE_HOST_DEVICE_DEPTH); + RECORD(PP_CONDITIONAL_STACK); // SourceManager Block. BLOCK(SOURCE_MANAGER_BLOCK); @@ -2300,6 +2301,18 @@ void ASTWriter::WritePreprocessor(const Preprocessor & if (PP.getCounterValue() != 0) { RecordData::value_type Record[] = {PP.getCounterValue()}; Stream.EmitRecord(PP_COUNTER_VALUE, Record); + } + + if (PP.isRecordingPreamble() && PP.hasRecordedPreamble()) { + assert(!IsModule); + for (const auto &Cond : PP.getPreambleConditionalStack()) { + AddSourceLocation(Cond.IfLoc, Record); + Record.push_back(Cond.WasSkipping); + Record.push_back(Cond.FoundNonSkip); + Record.push_back(Cond.FoundElse); + } + Stream.EmitRecord(PP_CONDITIONAL_STACK, Record); + Record.clear(); } // Enter the preprocessor block. Modified: vendor/clang/dist/lib/StaticAnalyzer/Checkers/CMakeLists.txt ============================================================================== --- vendor/clang/dist/lib/StaticAnalyzer/Checkers/CMakeLists.txt Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/StaticAnalyzer/Checkers/CMakeLists.txt Tue May 30 17:37:44 2017 (r319233) @@ -39,7 +39,7 @@ add_clang_library(clangStaticAnalyzerCheckers GenericTaintChecker.cpp GTestChecker.cpp IdenticalExprChecker.cpp - IteratorPastEndChecker.cpp + IteratorChecker.cpp IvarInvalidationChecker.cpp LLVMConventionsChecker.cpp LocalizationChecker.cpp Modified: vendor/clang/dist/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp ============================================================================== --- vendor/clang/dist/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp Tue May 30 17:37:40 2017 (r319232) +++ vendor/clang/dist/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp Tue May 30 17:37:44 2017 (r319233) @@ -65,22 +65,9 @@ class GenericTaintChecker : public Checker< check::Pos /// and thus, is tainted. static bool isStdin(const Expr *E, CheckerContext &C); - /// This is called from getPointedToSymbol() to resolve symbol references for - /// the region underlying a LazyCompoundVal. This is the default binding - /// for the LCV, which could be a conjured symbol from a function call that *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 30 17:37:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E3DCB94B59; Tue, 30 May 2017 17:37:56 +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 B2532716D4; Tue, 30 May 2017 17:37:55 +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 v4UHbsuE045893; Tue, 30 May 2017 17:37:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHbsgf045892; Tue, 30 May 2017 17:37:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301737.v4UHbsgf045892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319235 - vendor/compiler-rt/compiler-rt-trunk-r304222 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:37:56 -0000 Author: dim Date: Tue May 30 17:37:54 2017 New Revision: 319235 URL: https://svnweb.freebsd.org/changeset/base/319235 Log: Tag compiler-rt trunk r304222. Added: vendor/compiler-rt/compiler-rt-trunk-r304222/ - copied from r319234, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Tue May 30 17:38:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 705B2B94B93; Tue, 30 May 2017 17:38:03 +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 2697971783; Tue, 30 May 2017 17:38:03 +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 v4UHc2nP046011; Tue, 30 May 2017 17:38:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHc2l5046010; Tue, 30 May 2017 17:38:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301738.v4UHc2l5046010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319237 - vendor/libc++/libc++-trunk-r304222 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:38:03 -0000 Author: dim Date: Tue May 30 17:38:02 2017 New Revision: 319237 URL: https://svnweb.freebsd.org/changeset/base/319237 Log: Tag libc++ trunk r304222. Added: vendor/libc++/libc++-trunk-r304222/ - copied from r319236, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Tue May 30 17:38:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B956B94BC6; Tue, 30 May 2017 17:38:07 +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 D75CC717FC; Tue, 30 May 2017 17:38:06 +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 v4UHc5PU046072; Tue, 30 May 2017 17:38:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHc4Hl046059; Tue, 30 May 2017 17:38:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301738.v4UHc4Hl046059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319238 - in vendor/lld/dist: ELF test/ELF/linkerscript X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:38:07 -0000 Author: dim Date: Tue May 30 17:38:04 2017 New Revision: 319238 URL: https://svnweb.freebsd.org/changeset/base/319238 Log: Vendor import of lld trunk r304222: https://llvm.org/svn/llvm-project/lld/trunk@304222 Added: vendor/lld/dist/test/ELF/linkerscript/bss-fill.s (contents, props changed) Modified: vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/LinkerScript.h vendor/lld/dist/ELF/MapFile.cpp vendor/lld/dist/ELF/MapFile.h vendor/lld/dist/ELF/OutputSections.cpp vendor/lld/dist/ELF/ScriptParser.cpp vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/test/ELF/linkerscript/align.s vendor/lld/dist/test/ELF/linkerscript/merge-sections.s vendor/lld/dist/test/ELF/linkerscript/symbol-reserved.s Modified: vendor/lld/dist/ELF/LinkerScript.cpp ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.cpp Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/ELF/LinkerScript.cpp Tue May 30 17:38:04 2017 (r319238) @@ -52,11 +52,12 @@ LinkerScript *elf::Script; uint64_t ExprValue::getValue() const { if (Sec) { if (Sec->getOutputSection()) - return Sec->getOffset(Val) + Sec->getOutputSection()->Addr; + return alignTo(Sec->getOffset(Val) + Sec->getOutputSection()->Addr, + Alignment); error("unable to evaluate expression: input section " + Sec->Name + " has no output section assigned"); } - return Val; + return alignTo(Val, Alignment); } uint64_t ExprValue::getSecAddr() const { @@ -143,7 +144,7 @@ void LinkerScript::assignSymbol(SymbolAssignment *Cmd, } else { Sym->Section = V.Sec; if (Sym->Section->Flags & SHF_ALLOC) - Sym->Value = V.Val; + Sym->Value = alignTo(V.Val, V.Alignment); else Sym->Value = V.getValue(); } @@ -290,6 +291,9 @@ LinkerScript::computeInputSections(const InputSectionD size_t SizeBefore = Ret.size(); for (InputSectionBase *Sec : InputSections) { + if (!isa(Sec)) + continue; + if (Sec->Assigned) continue; @@ -1075,6 +1079,9 @@ template void OutputSectionCommand::write Sec->CompressedData.size()); return; } + + if (Sec->Type == SHT_NOBITS) + return; // Write leading padding. ArrayRef Sections = Sec->Sections; Modified: vendor/lld/dist/ELF/LinkerScript.h ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.h Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/ELF/LinkerScript.h Tue May 30 17:38:04 2017 (r319238) @@ -41,7 +41,12 @@ struct ExprValue { SectionBase *Sec; uint64_t Val; bool ForceAbsolute; + uint64_t Alignment = 1; + ExprValue(SectionBase *Sec, bool ForceAbsolute, uint64_t Val, + uint64_t Alignment) + : Sec(Sec), Val(Val), ForceAbsolute(ForceAbsolute), Alignment(Alignment) { + } ExprValue(SectionBase *Sec, bool ForceAbsolute, uint64_t Val) : Sec(Sec), Val(Val), ForceAbsolute(ForceAbsolute) {} ExprValue(SectionBase *Sec, uint64_t Val) : ExprValue(Sec, false, Val) {} Modified: vendor/lld/dist/ELF/MapFile.cpp ============================================================================== --- vendor/lld/dist/ELF/MapFile.cpp Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/ELF/MapFile.cpp Tue May 30 17:38:04 2017 (r319238) @@ -100,7 +100,7 @@ getSymbolStrings(ArrayRef Syms) { } template -void elf::writeMapFile(llvm::ArrayRef Script) { +void elf::writeMapFile(llvm::ArrayRef Script) { if (Config->MapFile.empty()) return; @@ -123,10 +123,7 @@ void elf::writeMapFile(llvm::ArrayRef S << " Align Out In Symbol\n"; // Print out file contents. - for (BaseCommand *Base : Script) { - auto *Cmd = dyn_cast(Base); - if (!Cmd) - continue; + for (OutputSectionCommand *Cmd : Script) { OutputSection *OSec = Cmd->Sec; writeHeader(OS, OSec->Addr, OSec->Size, OSec->Alignment); OS << OSec->Name << '\n'; @@ -147,7 +144,7 @@ void elf::writeMapFile(llvm::ArrayRef S } } -template void elf::writeMapFile(ArrayRef); -template void elf::writeMapFile(ArrayRef); -template void elf::writeMapFile(ArrayRef); -template void elf::writeMapFile(ArrayRef); +template void elf::writeMapFile(ArrayRef); +template void elf::writeMapFile(ArrayRef); +template void elf::writeMapFile(ArrayRef); +template void elf::writeMapFile(ArrayRef); Modified: vendor/lld/dist/ELF/MapFile.h ============================================================================== --- vendor/lld/dist/ELF/MapFile.h Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/ELF/MapFile.h Tue May 30 17:38:04 2017 (r319238) @@ -14,8 +14,9 @@ namespace lld { namespace elf { -struct BaseCommand; -template void writeMapFile(llvm::ArrayRef Script); +struct OutputSectionCommand; +template +void writeMapFile(llvm::ArrayRef Script); } } Modified: vendor/lld/dist/ELF/OutputSections.cpp ============================================================================== --- vendor/lld/dist/ELF/OutputSections.cpp Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/ELF/OutputSections.cpp Tue May 30 17:38:04 2017 (r319238) @@ -117,7 +117,7 @@ template static void finalizeShtGroup(Out // the symbol table. Sec->Link = InX::SymTab->OutSec->SectionIndex; - // sh_link then contain index of an entry in symbol table section which + // sh_info then contain index of an entry in symbol table section which // provides signature of the section group. elf::ObjectFile *Obj = Sec->Sections[0]->getFile(); assert(Config->Relocatable && Sec->Sections.size() == 1); Modified: vendor/lld/dist/ELF/ScriptParser.cpp ============================================================================== --- vendor/lld/dist/ELF/ScriptParser.cpp Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/ELF/ScriptParser.cpp Tue May 30 17:38:04 2017 (r319238) @@ -859,7 +859,11 @@ Expr ScriptParser::readPrimary() { expect(","); Expr E2 = readExpr(); expect(")"); - return [=] { return alignTo(E().getValue(), E2().getValue()); }; + return [=] { + ExprValue V = E(); + V.Alignment = E2().getValue(); + return V; + }; } if (Tok == "ALIGNOF") { StringRef Name = readParenLiteral(); Modified: vendor/lld/dist/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist/ELF/Writer.cpp Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/ELF/Writer.cpp Tue May 30 17:38:04 2017 (r319238) @@ -74,6 +74,7 @@ template class Writer { (private) std::unique_ptr Buffer; std::vector OutputSections; + std::vector OutputSectionCommands; OutputSectionFactory Factory{OutputSections}; void addRelIpltSymbols(); @@ -262,6 +263,10 @@ template void Writer::run() { Script->fabricateDefaultCommands(); } + for (BaseCommand *Base : Script->Opt.Commands) + if (auto *Cmd = dyn_cast(Base)) + OutputSectionCommands.push_back(Cmd); + // If -compressed-debug-sections is specified, we need to compress // .debug_* sections. Do it right now because it changes the size of // output sections. @@ -311,7 +316,7 @@ template void Writer::run() { // Handle -Map option. - writeMapFile(Script->Opt.Commands); + writeMapFile(OutputSectionCommands); if (ErrorCount) return; @@ -1201,8 +1206,6 @@ template void Writer::finalizeSecti if (ErrorCount) return; - // So far we have added sections from input object files. - // This function adds linker-created Out::* sections. addPredefinedSections(); removeUnusedSyntheticSections(OutputSections); @@ -1270,8 +1273,20 @@ template void Writer::addPredefined // ARM ABI requires .ARM.exidx to be terminated by some piece of data. // We have the terminater synthetic section class. Add that at the end. auto *OS = dyn_cast_or_null(findSection(".ARM.exidx")); - if (OS && !OS->Sections.empty() && !Config->Relocatable) - OS->addSection(make()); + if (!OS || OS->Sections.empty() || Config->Relocatable) + return; + + auto *Sentinel = make(); + OS->addSection(Sentinel); + // If there are linker script commands existing at this point then add the + // sentinel to the last of these too. + if (OutputSectionCommand *C = Script->getCmd(OS)) { + auto ISD = std::find_if(C->Commands.rbegin(), C->Commands.rend(), + [](const BaseCommand *Base) { + return isa(Base); + }); + cast(*ISD)->Sections.push_back(Sentinel); + } } // The linker is expected to define SECNAME_start and SECNAME_end @@ -1315,10 +1330,9 @@ void Writer::addStartStopSymbols(OutputSection * template OutputSectionCommand *Writer::findSectionCommand(StringRef Name) { - for (BaseCommand *Base : Script->Opt.Commands) - if (auto *Cmd = dyn_cast(Base)) - if (Cmd->Name == Name) - return Cmd; + for (OutputSectionCommand *Cmd : OutputSectionCommands) + if (Cmd->Name == Name) + return Cmd; return nullptr; } @@ -1713,7 +1727,7 @@ template void Writer::writeHeader() EHdr->e_ehsize = sizeof(Elf_Ehdr); EHdr->e_phnum = Phdrs.size(); EHdr->e_shentsize = sizeof(Elf_Shdr); - EHdr->e_shnum = OutputSections.size() + 1; + EHdr->e_shnum = OutputSectionCommands.size() + 1; EHdr->e_shstrndx = InX::ShStrTab->OutSec->SectionIndex; if (Config->EMachine == EM_ARM) @@ -1745,8 +1759,8 @@ template void Writer::writeHeader() // Write the section header table. Note that the first table entry is null. auto *SHdrs = reinterpret_cast(Buf + EHdr->e_shoff); - for (OutputSection *Sec : OutputSections) - Sec->writeHeaderTo(++SHdrs); + for (OutputSectionCommand *Cmd : OutputSectionCommands) + Cmd->Sec->writeHeaderTo(++SHdrs); } // Open a result file. @@ -1769,10 +1783,7 @@ template void Writer::openFile() { template void Writer::writeSectionsBinary() { uint8_t *Buf = Buffer->getBufferStart(); - for (BaseCommand *Base : Script->Opt.Commands) { - auto *Cmd = dyn_cast(Base); - if (!Cmd) - continue; + for (OutputSectionCommand *Cmd : OutputSectionCommands) { OutputSection *Sec = Cmd->Sec; if (Sec->Flags & SHF_ALLOC) Cmd->writeTo(Buf + Sec->Offset); @@ -1799,19 +1810,13 @@ template void Writer::writeSections // In -r or -emit-relocs mode, write the relocation sections first as in // ELf_Rel targets we might find out that we need to modify the relocated // section while doing it. - for (BaseCommand *Base : Script->Opt.Commands) { - auto *Cmd = dyn_cast(Base); - if (!Cmd) - continue; + for (OutputSectionCommand *Cmd : OutputSectionCommands) { OutputSection *Sec = Cmd->Sec; if (Sec->Type == SHT_REL || Sec->Type == SHT_RELA) Cmd->writeTo(Buf + Sec->Offset); } - for (BaseCommand *Base : Script->Opt.Commands) { - auto *Cmd = dyn_cast(Base); - if (!Cmd) - continue; + for (OutputSectionCommand *Cmd : OutputSectionCommands) { OutputSection *Sec = Cmd->Sec; if (Sec != Out::Opd && Sec != EhFrameHdr && Sec->Type != SHT_REL && Sec->Type != SHT_RELA) Modified: vendor/lld/dist/test/ELF/linkerscript/align.s ============================================================================== --- vendor/lld/dist/test/ELF/linkerscript/align.s Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/test/ELF/linkerscript/align.s Tue May 30 17:38:04 2017 (r319238) @@ -64,7 +64,7 @@ # SYMBOLS-NEXT: 0000000000010000 *ABS* 00000000 __code_base__ # SYMBOLS-NEXT: 0000000000001000 *ABS* 00000000 VAR # SYMBOLS-NEXT: 0000000000011000 .bbb 00000000 __start_bbb -# SYMBOLS-NEXT: 0000000000012000 *ABS* 00000000 __end_bbb +# SYMBOLS-NEXT: 0000000000012000 .bbb 00000000 __end_bbb .global _start _start: Added: vendor/lld/dist/test/ELF/linkerscript/bss-fill.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/ELF/linkerscript/bss-fill.s Tue May 30 17:38:04 2017 (r319238) @@ -0,0 +1,7 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +# RUN: echo "SECTIONS { .bss : { . += 0x10000; *(.bss) } =0xFF };" > %t.script +# RUN: ld.lld -o %t --script %t.script %t.o + +.section .bss,"",@nobits +.short 0 Modified: vendor/lld/dist/test/ELF/linkerscript/merge-sections.s ============================================================================== --- vendor/lld/dist/test/ELF/linkerscript/merge-sections.s Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/test/ELF/linkerscript/merge-sections.s Tue May 30 17:38:04 2017 (r319238) @@ -31,6 +31,16 @@ # 0x19E = begin + sizeof(.foo) = 0x190 + 0xE # CHECK-NEXT: Value: 0x19E +# Check that we don't crash with --gc-sections +# RUN: ld.lld --gc-sections -o %t2 --script %t.script %t -shared +# RUN: llvm-readobj -s -t %t2 | FileCheck %s --check-prefix=GC + +# GC: Name: .foo +# GC-NEXT: Type: SHT_PROGBITS +# GC-NEXT: Flags [ +# GC-NEXT: SHF_ALLOC +# GC-NEXT: ] + .section .foo.1a,"aMS",@progbits,1 .asciz "foo" Modified: vendor/lld/dist/test/ELF/linkerscript/symbol-reserved.s ============================================================================== --- vendor/lld/dist/test/ELF/linkerscript/symbol-reserved.s Tue May 30 17:38:02 2017 (r319237) +++ vendor/lld/dist/test/ELF/linkerscript/symbol-reserved.s Tue May 30 17:38:04 2017 (r319238) @@ -11,6 +11,12 @@ # SHARED: 0000000000000005 .dynsym 00000000 .hidden newsym +# RUN: echo "PROVIDE_HIDDEN(newsym = ALIGN(__ehdr_start, CONSTANT(MAXPAGESIZE)) + 5);" > %t.script +# RUN: ld.lld -o %t1 %t.script %t +# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=ALIGNED %s + +# ALIGNED: 0000000000200005 .text 00000000 .hidden newsym + .global _start _start: lea newsym(%rip),%rax From owner-svn-src-all@freebsd.org Tue May 30 17:38:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA55EB94BF0; Tue, 30 May 2017 17:38:09 +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 8DBD97184C; Tue, 30 May 2017 17:38:09 +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 v4UHc8HV046123; Tue, 30 May 2017 17:38:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHc88t046122; Tue, 30 May 2017 17:38:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301738.v4UHc88t046122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319239 - vendor/lld/lld-trunk-r304222 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:38:10 -0000 Author: dim Date: Tue May 30 17:38:08 2017 New Revision: 319239 URL: https://svnweb.freebsd.org/changeset/base/319239 Log: Tag lld trunk r304222. Added: vendor/lld/lld-trunk-r304222/ - copied from r319238, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Tue May 30 17:37:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11F72B94B37; Tue, 30 May 2017 17:37:53 +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 B9A5971684; Tue, 30 May 2017 17:37:52 +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 v4UHbpJW045845; Tue, 30 May 2017 17:37:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHbpYD045844; Tue, 30 May 2017 17:37:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301737.v4UHbpYD045844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319234 - vendor/clang/clang-trunk-r304222 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:37:53 -0000 Author: dim Date: Tue May 30 17:37:51 2017 New Revision: 319234 URL: https://svnweb.freebsd.org/changeset/base/319234 Log: Tag clang trunk r304222. Added: vendor/clang/clang-trunk-r304222/ - copied from r319233, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Tue May 30 17:38:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83891B94B82; Tue, 30 May 2017 17:38:00 +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 605C071738; Tue, 30 May 2017 17:38:00 +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 v4UHbxx9045952; Tue, 30 May 2017 17:37:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHbxYP045948; Tue, 30 May 2017 17:37:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301737.v4UHbxYP045948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319236 - in vendor/libc++/dist: include include/experimental test/std/experimental/language.support/support.coroutines test/std/experimental/language.support/support.coroutines/corouti... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:38:00 -0000 Author: dim Date: Tue May 30 17:37:59 2017 New Revision: 319236 URL: https://svnweb.freebsd.org/changeset/base/319236 Log: Vendor import of libc++ trunk r304222: https://llvm.org/svn/llvm-project/libcxx/trunk@304222 Added: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/lit.local.cfg Modified: vendor/libc++/dist/include/experimental/coroutine vendor/libc++/dist/include/module.modulemap Modified: vendor/libc++/dist/include/experimental/coroutine ============================================================================== --- vendor/libc++/dist/include/experimental/coroutine Tue May 30 17:37:54 2017 (r319235) +++ vendor/libc++/dist/include/experimental/coroutine Tue May 30 17:37:59 2017 (r319236) @@ -145,6 +145,19 @@ class _LIBCPP_TEMPLATE_VIS coroutine_handle { (p return __tmp; } + // FIXME: Should from_address(nullptr) be allowed? + _LIBCPP_ALWAYS_INLINE + static coroutine_handle from_address(nullptr_t) _NOEXCEPT { + return coroutine_handle(nullptr); + } + + template + static coroutine_handle from_address(_Tp*) { + static_assert(_CallIsValid, + "coroutine_handle::from_address cannot be called with " + "non-void pointers"); + } + private: bool __is_suspended() const _NOEXCEPT { // FIXME actually implement a check for if the coro is suspended. @@ -218,11 +231,22 @@ class _LIBCPP_TEMPLATE_VIS coroutine_handle : public c // FIXME: should from_address work with nullptr? _LIBCPP_ALWAYS_INLINE static coroutine_handle from_address(nullptr_t) _NOEXCEPT { - return {}; + return coroutine_handle(nullptr); } - // from_address cannot be used with the coroutines promise type. - static coroutine_handle from_address(_Promise*) = delete; + template + static coroutine_handle from_address(_Tp*) { + static_assert(_CallIsValid, + "coroutine_handle::from_address cannot be called with " + "non-void pointers"); + } + + template + static coroutine_handle from_address(_Promise*) { + static_assert(_CallIsValid, + "coroutine_handle::from_address cannot be used with " + "pointers to the coroutine's promise type; use 'from_promise' instead"); + } _LIBCPP_ALWAYS_INLINE static coroutine_handle from_promise(_Promise& __promise) _NOEXCEPT { Modified: vendor/libc++/dist/include/module.modulemap ============================================================================== --- vendor/libc++/dist/include/module.modulemap Tue May 30 17:37:54 2017 (r319235) +++ vendor/libc++/dist/include/module.modulemap Tue May 30 17:37:59 2017 (r319236) @@ -502,6 +502,7 @@ module std [system] { export * } module coroutine { + requires coroutines header "experimental/coroutine" export * } Added: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp Tue May 30 17:37:59 2017 (r319236) @@ -0,0 +1,46 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11 +// + +// template +// struct coroutine_handle; + +// static coroutine_handle from_address(void*) noexcept + +// Test that `from_address` is explicitly ill-formed when called with a typed +// pointer. The user cannot possibly have a typed pointer to the coroutine. +// FIXME: This behavior is an extension, and should upstreamed into the TS or +// the test removed if the TS changes are rejected. + +#include +#include +#include + +namespace coro = std::experimental; + +int main() +{ + { + using H = coro::coroutine_handle<>; + // expected-error@experimental/coroutine:* 3 {{coroutine_handle::from_address cannot be called with non-void pointers}} + H::from_address((int*)nullptr); // expected-note {{requested here}} + H::from_address((const void*)nullptr); // expected-note {{requested here}} + H::from_address((const char*)nullptr); // expected-note {{requested here}} + } + { + using H = coro::coroutine_handle; + // expected-error@experimental/coroutine:* 1 {{static_assert failed "coroutine_handle::from_address cannot be used with pointers to the coroutine's promise type; use 'from_promise' instead"}} + H::from_address((const char*)nullptr); // expected-note {{requested here}} + // expected-error@experimental/coroutine:* 1 {{coroutine_handle::from_address cannot be called with non-void pointers}} + H::from_address((int*)nullptr); // expected-note {{requested here}} + } +} Added: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/lit.local.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/lit.local.cfg Tue May 30 17:37:59 2017 (r319236) @@ -0,0 +1,9 @@ +# If the compiler doesn't support coroutines mark all of the tests under +# this directory as unsupported. Otherwise add the required `-fcoroutines-ts` +# flag. +if 'fcoroutines-ts' not in config.available_features: + config.unsupported = True +else: + import copy + config.test_format.cxx = copy.deepcopy(config.test_format.cxx) + config.test_format.cxx.compile_flags += ['-fcoroutines-ts'] From owner-svn-src-all@freebsd.org Tue May 30 17:38:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A959AB94C4B; Tue, 30 May 2017 17:38:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C22B7191D; Tue, 30 May 2017 17:38:16 +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 v4UHcFG5046228; Tue, 30 May 2017 17:38:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHcFrD046227; Tue, 30 May 2017 17:38:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301738.v4UHcFrD046227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:38:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319241 - vendor/lldb/lldb-trunk-r304222 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:38:16 -0000 Author: dim Date: Tue May 30 17:38:15 2017 New Revision: 319241 URL: https://svnweb.freebsd.org/changeset/base/319241 Log: Tag lldb trunk r304222. Added: vendor/lldb/lldb-trunk-r304222/ - copied from r319240, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Tue May 30 17:38:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8932DB94C20; Tue, 30 May 2017 17:38:13 +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 55265718C3; Tue, 30 May 2017 17:38:13 +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 v4UHcCMq046176; Tue, 30 May 2017 17:38:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHcCe5046175; Tue, 30 May 2017 17:38:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705301738.v4UHcCe5046175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 May 2017 17:38:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319240 - vendor/lldb/dist/include/lldb/Utility X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:38:13 -0000 Author: dim Date: Tue May 30 17:38:12 2017 New Revision: 319240 URL: https://svnweb.freebsd.org/changeset/base/319240 Log: Vendor import of lldb trunk r304222: https://llvm.org/svn/llvm-project/lldb/trunk@304222 Modified: vendor/lldb/dist/include/lldb/Utility/Log.h Modified: vendor/lldb/dist/include/lldb/Utility/Log.h ============================================================================== --- vendor/lldb/dist/include/lldb/Utility/Log.h Tue May 30 17:38:08 2017 (r319239) +++ vendor/lldb/dist/include/lldb/Utility/Log.h Tue May 30 17:38:12 2017 (r319240) @@ -18,6 +18,7 @@ #include "llvm/ADT/StringMap.h" // for StringMap #include "llvm/ADT/StringRef.h" // for StringRef, StringLiteral #include "llvm/Support/FormatVariadic.h" +#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/RWMutex.h" #include @@ -29,9 +30,6 @@ namespace llvm { class raw_ostream; -} -namespace llvm { -template class ManagedStatic; } //---------------------------------------------------------------------- // Logging Options From owner-svn-src-all@freebsd.org Tue May 30 17:42:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58F00B95058; Tue, 30 May 2017 17:42:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34AAB7259C; Tue, 30 May 2017 17:42:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UHgmB0050233; Tue, 30 May 2017 17:42:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHgmgs050231; Tue, 30 May 2017 17:42:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705301742.v4UHgmgs050231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 17:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319242 - stable/10/usr.sbin/rpcbind X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:42:49 -0000 Author: ngie Date: Tue May 30 17:42:48 2017 New Revision: 319242 URL: https://svnweb.freebsd.org/changeset/base/319242 Log: MFC r317154,r317155,r317162,r317163,r317164: r317154: Print out the signal number on exit in terminate(..) if WARMSTART is compiled into rpcbind. The signal number can provide helpful diagnostic info. Obtained from: Isilon OneFS r317155: rpcbind(8): wordsmith -h description and mention -W in the SYNOPSIS section -W was already documented in the OPTIONS section. r317162: rpcbind(8): add a description for /var/run/rpcbind.sock under the FILES section r317163: rpcbind(8): post-humously document -w (warmstart) support added in r74462 warmstart support saves portmap/rpcbind(8) registration state on exit and restores the saved registration state on restart. r317164: Fix indentation per style.Makefile(5) Modified: stable/10/usr.sbin/rpcbind/Makefile stable/10/usr.sbin/rpcbind/rpcbind.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpcbind/Makefile ============================================================================== --- stable/10/usr.sbin/rpcbind/Makefile Tue May 30 17:38:15 2017 (r319241) +++ stable/10/usr.sbin/rpcbind/Makefile Tue May 30 17:42:48 2017 (r319242) @@ -15,17 +15,17 @@ CFLAGS+= -DINET6 .endif .if ${MK_TCP_WRAPPERS} != "no" -CFLAGS+= -DLIBWRAP -DPADD+= ${LIBWRAP} -LDADD+= -lwrap +CFLAGS+= -DLIBWRAP +DPADD+= ${LIBWRAP} +LDADD+= -lwrap .endif .if ${MK_TESTS} != "no" -SUBDIR+= tests +SUBDIR+= tests .endif -DPADD+= ${LIBUTIL} -LDADD+= -lutil +DPADD+= ${LIBUTIL} +LDADD+= -lutil WARNS?= 1 Modified: stable/10/usr.sbin/rpcbind/rpcbind.8 ============================================================================== --- stable/10/usr.sbin/rpcbind/rpcbind.8 Tue May 30 17:38:15 2017 (r319241) +++ stable/10/usr.sbin/rpcbind/rpcbind.8 Tue May 30 17:42:48 2017 (r319242) @@ -2,7 +2,7 @@ .\" Copyright 1989 AT&T .\" Copyright 1991 Sun Microsystems, Inc. .\" $FreeBSD$ -.Dd April 23, 2007 +.Dd April 19, 2017 .Dt RPCBIND 8 .Os .Sh NAME @@ -10,7 +10,7 @@ .Nd universal addresses to RPC program number mapper .Sh SYNOPSIS .Nm -.Op Fl 6adiLls +.Op Fl 6adiLlswW .Op Fl h Ar bindip .Sh DESCRIPTION The @@ -85,7 +85,7 @@ is also specified. With this option, the name-to-address translation consistency checks are shown in detail. .It Fl h Ar bindip -Specify specific IP addresses to bind to for TCP and UDP requests. +IP addresses to bind to when servicing TCP and UDP requests. This option may be specified multiple times and is typically necessary when running on a multi-homed host. @@ -133,6 +133,22 @@ to use non-privileged ports for outgoing connections, clients from using .Nm to connect to services from a privileged port. +.It Fl w +Enable the warmstart feature. +.Pp +The warmstart feature saves RPC registrations on termination. +Any saved RPC registrations are restored on restart if +.Fl w +is specified. +This feature helps avoid RPC service interruption when restarting +.Nm . +warmstart support must be compiled in to +.Nm . +Portmap registrations are stored in +.Pa /tmp/portmap.file . +.Nm +registrations are stored in +.Pa /tmp/rpcbind.file . .El .Sh NOTES All RPC servers must be restarted if @@ -140,7 +156,14 @@ All RPC servers must be restarted if is restarted. .Sh FILES .Bl -tag -width /var/run/rpcbind.sock -compact +.It Pa /tmp/portmap.file +saved portmap registrations file. +.It Pa /tmp/rpcbind.file +saved +.Nm +registrations file. .It Pa /var/run/rpcbind.sock +socket used for local connections. .El .Sh SEE ALSO .Xr rpcbind 3 , From owner-svn-src-all@freebsd.org Tue May 30 17:46:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BE59B9513A; Tue, 30 May 2017 17:46:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55DBB727C4; Tue, 30 May 2017 17:46:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UHkK0L050497; Tue, 30 May 2017 17:46:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHkKwG050494; Tue, 30 May 2017 17:46:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705301746.v4UHkKwG050494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 17:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319243 - in stable/10: share/mk tools/build/options usr.sbin/rpcbind X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:46:21 -0000 Author: ngie Date: Tue May 30 17:46:19 2017 New Revision: 319243 URL: https://svnweb.freebsd.org/changeset/base/319243 Log: MFC r317168: Add a knob, WITH*_RPCBIND_WARMSTART_SUPPORT, to allow the end-user to build rpcbind(8) with/without warmstart support. The knob defaults to off to preserve POLA for the feature. See rpcbind(8) for more details about the warmstart feature. Relnotes: yes Added: stable/10/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT - copied unchanged from r317168, head/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT Modified: stable/10/share/mk/bsd.own.mk stable/10/usr.sbin/rpcbind/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Tue May 30 17:42:48 2017 (r319242) +++ stable/10/share/mk/bsd.own.mk Tue May 30 17:46:19 2017 (r319243) @@ -406,6 +406,7 @@ __DEFAULT_NO_OPTIONS = \ NAND \ OFED \ PKGTOOLS \ + RPCBIND_WARMSTART_SUPPORT \ SHARED_TOOLCHAIN \ SVN \ TESTS \ Copied: stable/10/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT (from r317168, head/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT Tue May 30 17:46:19 2017 (r319243, copy of r317168, head/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to build +.Xr rpcbind 8 +with warmstart support. Modified: stable/10/usr.sbin/rpcbind/Makefile ============================================================================== --- stable/10/usr.sbin/rpcbind/Makefile Tue May 30 17:42:48 2017 (r319242) +++ stable/10/usr.sbin/rpcbind/Makefile Tue May 30 17:46:19 2017 (r319243) @@ -14,6 +14,10 @@ CFLAGS+= -DPORTMAP CFLAGS+= -DINET6 .endif +.if ${MK_RPCBIND_WARMSTART_SUPPORT} != "no" +CFLAGS+= -DWARMSTART +.endif + .if ${MK_TCP_WRAPPERS} != "no" CFLAGS+= -DLIBWRAP DPADD+= ${LIBWRAP} From owner-svn-src-all@freebsd.org Tue May 30 17:47:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1661B951A4; Tue, 30 May 2017 17:47:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED32728FC; Tue, 30 May 2017 17:47:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UHlJLk050596; Tue, 30 May 2017 17:47:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHlJR9050589; Tue, 30 May 2017 17:47:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705301747.v4UHlJR9050589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 17:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319244 - in stable/11: share/man/man5 share/mk tools/build/options usr.sbin/rpcbind X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:47:20 -0000 Author: ngie Date: Tue May 30 17:47:19 2017 New Revision: 319244 URL: https://svnweb.freebsd.org/changeset/base/319244 Log: MFC r317168: Add a knob, WITH*_RPCBIND_WARMSTART_SUPPORT, to allow the end-user to build rpcbind(8) with/without warmstart support. The knob defaults to off to preserve POLA for the feature. See rpcbind(8) for more details about the warmstart feature. Relnotes: yes Added: stable/11/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT - copied unchanged from r317168, head/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT Modified: stable/11/share/man/man5/src.conf.5 stable/11/share/mk/src.opts.mk stable/11/usr.sbin/rpcbind/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Tue May 30 17:46:19 2017 (r319243) +++ stable/11/share/man/man5/src.conf.5 Tue May 30 17:47:19 2017 (r319244) @@ -724,781 +724,3 @@ You should consider installing the textproc/groff port .Xr man 1 . .It Va WITHOUT_GSSAPI Set to not build libgssapi. -.It Va WITHOUT_HAST -Set to not build -.Xr hastd 8 -and related utilities. -.It Va WITH_HESIOD -Set to build Hesiod support. -.It Va WITHOUT_HTML -Set to not build HTML docs. -.It Va WITHOUT_HYPERV -Set to not build or install HyperV utilities. -.It Va WITHOUT_ICONV -Set to not build iconv as part of libc. -.It Va WITHOUT_INCLUDES -Set to not install header files. -This option used to be spelled -.Va NO_INCS . -.Bf -symbolic -The option does not work for build targets. -.Ef -.It Va WITHOUT_INET -Set to not build programs and libraries related to IPv4 networking. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_INET_SUPPORT -.El -.It Va WITHOUT_INET6 -Set to not build -programs and libraries related to IPv6 networking. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_INET6_SUPPORT -.El -.It Va WITHOUT_INET6_SUPPORT -Set to build libraries, programs, and kernel modules without IPv6 support. -.It Va WITHOUT_INETD -Set to not build -.Xr inetd 8 . -.It Va WITHOUT_INET_SUPPORT -Set to build libraries, programs, and kernel modules without IPv4 support. -.It Va WITHOUT_INSTALLLIB -Set this if you do not want to install optional libraries. -For example when creating a -.Xr nanobsd 8 -image. -.Bf -symbolic -The option does not work for build targets. -.Ef -.It Va WITH_INSTALL_AS_USER -Set to make install targets succeed for non-root users by installing -files with owner and group attributes set to that of the user running -the -.Xr make 1 -command. -The user still has to set the -.Va DESTDIR -variable to point to a directory where the user has write permissions. -.It Va WITHOUT_IPFILTER -Set to not build IP Filter package. -.It Va WITHOUT_IPFW -Set to not build IPFW tools. -.It Va WITHOUT_IPSEC_SUPPORT -Set to not build the kernel with -.Xr ipsec 4 -support. -This option is needed for -.Xr ipsec 4 -and -.Xr tcpmd5 4 . -.It Va WITHOUT_ISCSI -Set to not build -.Xr iscid 8 -and related utilities. -.It Va WITHOUT_JAIL -Set to not build tools for the support of jails; e.g., -.Xr jail 8 . -.It Va WITHOUT_KDUMP -Set to not build -.Xr kdump 1 -and -.Xr truss 1 . -.It Va WITHOUT_KERBEROS -Set this if you do not want to build Kerberos 5 (KTH Heimdal). -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_KERBEROS_SUPPORT -.El -.Pp -When set, the following options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_GSSAPI -(unless -.Va WITH_GSSAPI -is set explicitly) -.El -.It Va WITHOUT_KERBEROS_SUPPORT -Set to build some programs without Kerberos support, like -.Xr ssh 1 , -.Xr telnet 1 , -.Xr sshd 8 , -and -.Xr telnetd 8 . -.It Va WITHOUT_KERNEL_SYMBOLS -Set to not install kernel symbol files. -.Bf -symbolic -This option is recommended for those people who have small root partitions. -.Ef -.It Va WITHOUT_KVM -Set to not build the -.Nm libkvm -library as a part of the base system. -.Bf -symbolic -The option has no effect yet. -.Ef -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_KVM_SUPPORT -.El -.It Va WITHOUT_KVM_SUPPORT -Set to build some programs without optional -.Nm libkvm -support. -.It Va WITHOUT_LDNS -Setting this variable will prevent the LDNS library from being built. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_LDNS_UTILS -.It -.Va WITHOUT_UNBOUND -.El -.It Va WITHOUT_LDNS_UTILS -Setting this variable will prevent building the LDNS utilities -.Xr drill 1 -and -.Xr host 1 . -.It Va WITHOUT_LEGACY_CONSOLE -Set to not build programs that support a legacy PC console; e.g., -.Xr kbdcontrol 1 -and -.Xr vidcontrol 1 . -.It Va WITHOUT_LIB32 -On 64-bit platforms, set to not build 32-bit library set and a -.Nm ld-elf32.so.1 -runtime linker. -.It Va WITHOUT_LIBCPLUSPLUS -Set to avoid building libcxxrt and libc++. -.It Va WITHOUT_LIBPTHREAD -Set to not build the -.Nm libpthread -providing library, -.Nm libthr . -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_LIBTHR -.El -.It Va WITH_LIBSOFT -On armv6 only, set to enable soft float ABI compatibility libraries. -This option is for transitioning to the new hard float ABI. -.It Va WITHOUT_LIBTHR -Set to not build the -.Nm libthr -(1:1 threading) -library. -.It Va WITHOUT_LLD -Set to not build LLVM's lld linker. -.Pp -It is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_LLD -Set to build LLVM's lld linker. -.Pp -It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. -.It Va WITHOUT_LLDB -Set to not build the LLDB debugger. -.Pp -It is a default setting on -arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_LLDB -Set to build the LLDB debugger. -.Pp -It is a default setting on -amd64/amd64 and arm64/aarch64. -.It Va WITHOUT_LLD_BOOTSTRAP -Set to not build the LLD linker during the bootstrap phase of -the build. -To be able to build the system, either Binutils or LLD bootstrap must be -enabled unless an alternate linker is provided via XLD. -.Pp -It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_LLD_BOOTSTRAP -Set to build the LLD linker during the bootstrap phase of the build. -.Pp -It is a default setting on -arm64/aarch64. -.It Va WITHOUT_LLD_IS_LD -Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. -.Pp -It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_LLD_IS_LD -Set to use LLVM's LLD as the system linker, instead of GNU binutils ld. -.Pp -It is a default setting on -arm64/aarch64. -.It Va WITHOUT_LLVM_LIBUNWIND -Set to use GCC's stack unwinder (instead of LLVM's libunwind). -.Pp -It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_LLVM_LIBUNWIND -Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder). -.Pp -It is a default setting on -arm64/aarch64. -.It Va WITHOUT_LOCALES -Set to not build localization files; see -.Xr locale 1 . -.It Va WITHOUT_LOCATE -Set to not build -.Xr locate 1 -and related programs. -.It Va WITHOUT_LPR -Set to not build -.Xr lpr 1 -and related programs. -.It Va WITHOUT_LS_COLORS -Set to build -.Xr ls 1 -without support for colors to distinguish file types. -.It Va WITHOUT_LZMA_SUPPORT -Set to build some programs without optional lzma compression support. -.It Va WITHOUT_MAIL -Set to not build any mail support (MUA or MTA). -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_DMAGENT -.It -.Va WITHOUT_MAILWRAPPER -.It -.Va WITHOUT_SENDMAIL -.El -.It Va WITHOUT_MAILWRAPPER -Set to not build the -.Xr mailwrapper 8 -MTA selector. -.It Va WITHOUT_MAKE -Set to not install -.Xr make 1 -and related support files. -.It Va WITHOUT_MAN -Set to not build manual pages. -When set, the following options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_MAN_UTILS -(unless -.Va WITH_MAN_UTILS -is set explicitly) -.El -.It Va WITHOUT_MANCOMPRESS -Set to not to install compressed man pages. -Only the uncompressed versions will be installed. -.It Va WITHOUT_MANDOCDB -Use the version of -.Xr makewhatis 1 -introduced in -.Fx 2.1 , -instead of the -.Xr makewhatis 8 -database and utilities from -.Xr mandoc 1 . -.It Va WITHOUT_MAN_UTILS -Set to not build utilities for manual pages, -.Xr apropos 1 , -.Xr catman 1 , -.Xr makewhatis 1 , -.Xr man 1 , -.Xr whatis 1 , -.Xr manctl 8 , -and related support files. -.It Va WITH_META_MODE -Creates -.Xr make 1 -meta files when building, which can provide a reliable incremental build when -using -.Xr filemon 4 . -The meta file is created in the OBJDIR as -.Pa target.meta . -These meta files track the command ran, its output, and the current directory. -The -.Xr filemon 4 -module is required unless -.Va NO_FILEMON -is defined. -When the module is loaded, any files used by the commands executed will be -tracked as -dependencies for the target in its meta file. -The target will be considered out-of-date and rebuilt if any of the following -are true compared to the last build: -.Bl -bullet -compact -.It -The command to execute changes. -.It -The current working directory changes. -.It -The target's meta file is missing. -.It -The target's meta file is missing filemon data when filemon is loaded -and a previous run did not have it loaded. -.It -[requires -.Xr filemon 4 ] -Files read, executed or linked to are newer than the target. -.It -[requires -.Xr filemon 4 ] -Files read, written, executed or linked are missing. -.El -The meta files can also be useful for debugging. -.Pp -The build will hide commands ran unless -.Va NO_SILENT -is defined. -Errors will cause -.Xr make 1 -to show some of its environment for further debugging. -.Pp -The build operates as it normally would otherwise. -This option originally invoked a different build system but that was renamed -to -.Va WITH_DIRDEPS_BUILD . -.Pp -Currently this also enforces -.Va WITHOUT_SYSTEM_COMPILER . -When set, the following options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_SYSTEM_COMPILER -(unless -.Va WITH_SYSTEM_COMPILER -is set explicitly) -.El -.Pp -This must be set in the environment, make command line, or -.Pa /etc/src-env.conf , -not -.Pa /etc/src.conf . -.It Va WITH_NAND -Set to build the NAND Flash components. -.It Va WITHOUT_NDIS -Set to not build programs and libraries -related to NDIS emulation support. -.It Va WITHOUT_NETCAT -Set to not build -.Xr nc 1 -utility. -.It Va WITHOUT_NETGRAPH -Set to not build applications to support -.Xr netgraph 4 . -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_ATM -.It -.Va WITHOUT_BLUETOOTH -.It -.Va WITHOUT_NETGRAPH_SUPPORT -.El -.It Va WITHOUT_NETGRAPH_SUPPORT -Set to build libraries, programs, and kernel modules without netgraph support. -.It Va WITHOUT_NIS -Set to not build -.Xr NIS 8 -support and related programs. -If set, you might need to adopt your -.Xr nsswitch.conf 5 -and remove -.Sq nis -entries. -.It Va WITHOUT_NLS -Set to not build NLS catalogs. -.It Va WITHOUT_NLS_CATALOGS -Set to not build NLS catalog support for -.Xr csh 1 . -.It Va WITHOUT_NS_CACHING -Set to disable name caching in the -.Pa nsswitch -subsystem. -The generic caching daemon, -.Xr nscd 8 , -will not be built either if this option is set. -.It Va WITHOUT_NTP -Set to not build -.Xr ntpd 8 -and related programs. -.It Va WITH_OFED -Set to build the -.Dq "OpenFabrics Enterprise Distribution" -Infiniband software stack. -.It Va WITH_OPENLDAP -Enable building openldap support for kerberos. -.It Va WITHOUT_OPENSSH -Set to not build OpenSSH. -.It Va WITHOUT_OPENSSL -Set to not build OpenSSL. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_KERBEROS -.It -.Va WITHOUT_KERBEROS_SUPPORT -.It -.Va WITHOUT_OPENSSH -.El -.Pp -When set, the following options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_GSSAPI -(unless -.Va WITH_GSSAPI -is set explicitly) -.El -.It Va WITHOUT_PAM -Set to not build PAM library and modules. -.Bf -symbolic -This option is deprecated and does nothing. -.Ef -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_PAM_SUPPORT -.El -.It Va WITHOUT_PAM_SUPPORT -Set to build some programs without PAM support, particularly -.Xr ftpd 8 -and -.Xr ppp 8 . -.It Va WITHOUT_PC_SYSINSTALL -Set to not build -.Xr pc-sysinstall 8 -and related programs. -.It Va WITHOUT_PF -Set to not build PF firewall package. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_AUTHPF -.El -.It Va WITHOUT_PKGBOOTSTRAP -Set to not build -.Xr pkg 7 -bootstrap tool. -.It Va WITHOUT_PMC -Set to not build -.Xr pmccontrol 8 -and related programs. -.It Va WITHOUT_PORTSNAP -Set to not build or install -.Xr portsnap 8 -and related files. -.It Va WITHOUT_PPP -Set to not build -.Xr ppp 8 -and related programs. -.It Va WITHOUT_PROFILE -Set to avoid compiling profiled libraries. -.It Va WITHOUT_QUOTAS -Set to not build -.Xr quota 1 -and related programs. -.It Va WITHOUT_RADIUS_SUPPORT -Set to not build radius support into various applications, like -.Xr pam_radius 8 -and -.Xr ppp 8 . -.It Va WITHOUT_RBOOTD -Set to not build or install -.Xr rbootd 8 . -.It Va WITHOUT_RCMDS -Disable building of the -.Bx -r-commands. -This includes -.Xr rlogin 1 , -.Xr rsh 1 , -etc. -.It Va WITHOUT_RCS -Set to not build -.Xr rcs 1 , -.Xr etcupdate 8 , -and related utilities. -.It Va WITH_REPRODUCIBLE_BUILD -Set to exclude build metadata (such as the build time, user, or host) -from the kernel, boot loaders, and uname output, so that builds produce -bit-for-bit identical output. -.It Va WITHOUT_RESCUE -Set to not build -.Xr rescue 8 . -.It Va WITHOUT_ROUTED -Set to not build -.Xr routed 8 -utility. -.It Va WITHOUT_SENDMAIL -Set to not build -.Xr sendmail 8 -and related programs. -.It Va WITHOUT_SETUID_LOGIN -Set this to disable the installation of -.Xr login 1 -as a set-user-ID root program. -.It Va WITHOUT_SHAREDOCS -Set to not build the -.Bx 4.4 -legacy docs. -.It Va WITH_SHARED_TOOLCHAIN -Set to build the toolchain binaries shared. -The set includes -.Xr cc 1 , -.Xr make 1 -and necessary utilities like assembler, linker and library archive manager. -.It Va WITH_SORT_THREADS -Set to enable threads in -.Xr sort 1 . -.It Va WITHOUT_SOURCELESS -Set to not build kernel modules that include sourceless code (either microcode or native code for host CPU). -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_SOURCELESS_HOST -.It -.Va WITHOUT_SOURCELESS_UCODE -.El -.It Va WITHOUT_SOURCELESS_HOST -Set to not build kernel modules that include sourceless native code for host CPU. -.It Va WITHOUT_SOURCELESS_UCODE -Set to not build kernel modules that include sourceless microcode. -.It Va WITHOUT_SSP -Set to not build world with propolice stack smashing protection. -.It Va WITH_STAGING -Enable staging of files to a stage tree. -This can be best thought of as auto-install to -.Va DESTDIR -with some extra meta data to ensure dependencies can be tracked. -Depends on -.Va WITH_DIRDEPS_BUILD . -When set, the following options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITH_STAGING_MAN -(unless -.Va WITHOUT_STAGING_MAN -is set explicitly) -.It Va WITH_STAGING_PROG -(unless -.Va WITHOUT_STAGING_PROG -is set explicitly) -.El -.Pp -This must be set in the environment, make command line, or -.Pa /etc/src-env.conf , -not -.Pa /etc/src.conf . -.It Va WITH_STAGING_MAN -Enable staging of MAN pages to stage tree. -.It Va WITH_STAGING_PROG -Enable staging of PROGs to stage tree. -.It Va WITH_STALE_STAGED -Check staged files are not stale. -.It Va WITH_SVN -Set to install -.Xr svnlite 1 -as -.Xr svn 1 . -.It Va WITHOUT_SVNLITE -Set to not build -.Xr svnlite 1 -and related programs. -.It Va WITHOUT_SYMVER -Set to disable symbol versioning when building shared libraries. -.It Va WITHOUT_SYSCONS -Set to not build -.Xr syscons 4 -support files such as keyboard maps, fonts, and screen output maps. -.It Va WITH_SYSROOT -Enable use of sysroot during build. -Depends on -.Va WITH_DIRDEPS_BUILD . -.Pp -This must be set in the environment, make command line, or -.Pa /etc/src-env.conf , -not -.Pa /etc/src.conf . -.It Va WITHOUT_SYSTEM_COMPILER -Set to not opportunistically skip building a cross-compiler during the -bootstrap phase of the build. -Normally, if the currently installed compiler matches the planned bootstrap -compiler type and revision, then it will not be built. -This does not prevent a compiler from being built for installation though, -only for building one for the build itself. -The -.Va WITHOUT_CLANG -and -.Va WITHOUT_GCC -options control those. -.It Va WITHOUT_TALK -Set to not build or install -.Xr talk 1 -and -.Xr talkd 8 . -.It Va WITHOUT_TCP_WRAPPERS -Set to not build or install -.Xr tcpd 8 , -and related utilities. -.It Va WITHOUT_TCSH -Set to not build and install -.Pa /bin/csh -(which is -.Xr tcsh 1 ) . -.It Va WITHOUT_TELNET -Set to not build -.Xr telnet 1 -and related programs. -.It Va WITHOUT_TESTS -Set to not build nor install the -.Fx -Test Suite in -.Pa /usr/tests/ . -See -.Xr tests 7 -for more details. -This also disables the build of all test-related dependencies, including ATF. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_DTRACE_TESTS -.It -.Va WITHOUT_TESTS_SUPPORT -.El -.It Va WITHOUT_TESTS_SUPPORT -Set to disables the build of all test-related dependencies, including ATF. -.It Va WITHOUT_TEXTPROC -Set to not build -programs used for text processing. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_GROFF -.El -.It Va WITHOUT_TFTP -Set to not build or install -.Xr tftp 1 -and -.Xr tftpd 8 . -.It Va WITHOUT_TIMED -Set to not build or install -.Xr timed 8 . -.It Va WITHOUT_TOOLCHAIN -Set to not install header or -programs used for program development, -compilers, debuggers etc. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_BINUTILS -.It -.Va WITHOUT_CLANG -.It -.Va WITHOUT_CLANG_EXTRAS -.It -.Va WITHOUT_CLANG_FULL -.It -.Va WITHOUT_GCC -.It -.Va WITHOUT_GDB -.It -.Va WITHOUT_INCLUDES -.It -.Va WITHOUT_LLD -.It -.Va WITHOUT_LLDB -.El -.It Va WITHOUT_UNBOUND -Set to not build -.Xr unbound 8 -and related programs. -.It Va WITHOUT_USB -Set to not build USB-related programs and libraries. -.It Va WITHOUT_USB_GADGET_EXAMPLES -Set to not build USB gadget kernel modules. -.It Va WITHOUT_UTMPX -Set to not build user accounting tools such as -.Xr last 1 , -.Xr users 1 , -.Xr who 1 , -.Xr ac 8 , -.Xr lastlogin 8 -and -.Xr utx 8 . -.It Va WITHOUT_VI -Set to not build and install vi, view, ex and related programs. -.It Va WITHOUT_VT -Set to not build -.Xr vt 4 -support files (fonts and keymaps). -.It Va WITHOUT_WARNS -Set this to not add warning flags to the compiler invocations. -Useful as a temporary workaround when code enters the tree -which triggers warnings in environments that differ from the -original developer. -.It Va WITHOUT_WIRELESS -Set to not build programs used for 802.11 wireless networks; especially -.Xr wpa_supplicant 8 -and -.Xr hostapd 8 . -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_WIRELESS_SUPPORT -.El -.It Va WITHOUT_WIRELESS_SUPPORT -Set to build libraries, programs, and kernel modules without -802.11 wireless support. -.It Va WITHOUT_WPA_SUPPLICANT_EAPOL -Build -.Xr wpa_supplicant 8 -without support for the IEEE 802.1X protocol and without -support for EAP-PEAP, EAP-TLS, EAP-LEAP, and EAP-TTLS -protocols (usable only via 802.1X). -.It Va WITHOUT_ZFS -Set to not build ZFS file system. -.It Va WITHOUT_ZONEINFO -Set to not build the timezone database. -.El -.Sh FILES -.Bl -tag -compact -width Pa -.It Pa /etc/src.conf -.It Pa /etc/src-env.conf -.It Pa /usr/share/mk/bsd.own.mk -.El -.Sh SEE ALSO -.Xr make 1 , -.Xr make.conf 5 , -.Xr build 7 , -.Xr ports 7 -.Sh HISTORY -The -.Nm -file appeared in -.Fx 7.0 . -.Sh AUTHORS -This manual page was autogenerated by -.An tools/build/options/makeman . Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Tue May 30 17:46:19 2017 (r319243) +++ stable/11/share/mk/src.opts.mk Tue May 30 17:47:19 2017 (r319244) @@ -190,6 +190,7 @@ __DEFAULT_NO_OPTIONS = \ OFED \ OPENLDAP \ REPRODUCIBLE_BUILD \ + RPCBIND_WARMSTART_SUPPORT \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN \ Copied: stable/11/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT (from r317168, head/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT Tue May 30 17:47:19 2017 (r319244, copy of r317168, head/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to build +.Xr rpcbind 8 +with warmstart support. Modified: stable/11/usr.sbin/rpcbind/Makefile ============================================================================== --- stable/11/usr.sbin/rpcbind/Makefile Tue May 30 17:46:19 2017 (r319243) +++ stable/11/usr.sbin/rpcbind/Makefile Tue May 30 17:47:19 2017 (r319244) @@ -14,6 +14,10 @@ CFLAGS+= -DPORTMAP CFLAGS+= -DINET6 .endif +.if ${MK_RPCBIND_WARMSTART_SUPPORT} != "no" +CFLAGS+= -DWARMSTART +.endif + .if ${MK_TCP_WRAPPERS} != "no" CFLAGS+= -DLIBWRAP LIBADD+= wrap From owner-svn-src-all@freebsd.org Tue May 30 17:48:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAAA2B95257; Tue, 30 May 2017 17:48:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8ECB72A4C; Tue, 30 May 2017 17:48:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UHmfi6050707; Tue, 30 May 2017 17:48:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UHmfOv050706; Tue, 30 May 2017 17:48:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705301748.v4UHmfOv050706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 17:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319245 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 17:48:43 -0000 Author: ngie Date: Tue May 30 17:48:41 2017 New Revision: 319245 URL: https://svnweb.freebsd.org/changeset/base/319245 Log: Regenerate src.conf(5) after adding MK_RPCBIND_WARMSTART_SUPPORT Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Tue May 30 17:47:19 2017 (r319244) +++ stable/10/share/man/man5/src.conf.5 Tue May 30 17:48:41 2017 (r319245) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 06:08:20Z ngie .\" $FreeBSD$ -.Dd May 21, 2017 +.Dd May 30, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -994,6 +994,11 @@ Set to not build Set to not build .Xr routed 8 utility. +.It Va WITH_RPCBIND_WARMSTART_SUPPORT +.\" from FreeBSD: stable/10/tools/build/options/WITH_RPCBIND_WARMSTART_SUPPORT 319243 2017-05-30 17:46:19Z ngie +Set to build +.Xr rpcbind 8 +with warmstart support. .It Va WITHOUT_SENDMAIL .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru Set to not build From owner-svn-src-all@freebsd.org Tue May 30 18:03:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01D73B958AA; Tue, 30 May 2017 18:03:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C405273481; Tue, 30 May 2017 18:03:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UI3YQr058781; Tue, 30 May 2017 18:03:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UI3YZT058779; Tue, 30 May 2017 18:03:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705301803.v4UI3YZT058779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 18:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319246 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 18:03:36 -0000 Author: ngie Date: Tue May 30 18:03:34 2017 New Revision: 319246 URL: https://svnweb.freebsd.org/changeset/base/319246 Log: Use .Xr to reference libblacklist(3), blacklistctl(8), and blacklistd(8) MFC after: now Sponsored by: Dell EMC Isilon Modified: head/tools/build/options/WITHOUT_BLACKLIST head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT Modified: head/tools/build/options/WITHOUT_BLACKLIST ============================================================================== --- head/tools/build/options/WITHOUT_BLACKLIST Tue May 30 17:48:41 2017 (r319245) +++ head/tools/build/options/WITHOUT_BLACKLIST Tue May 30 18:03:34 2017 (r319246) @@ -1,2 +1,5 @@ .\" $FreeBSD$ -Set this if you do not want to build blacklistd/blacklistctl. +Set this if you do not want to build +.Xr blacklistd 8 +and +.Xr blacklistctl 8 . Modified: head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT ============================================================================== --- head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT Tue May 30 17:48:41 2017 (r319245) +++ head/tools/build/options/WITHOUT_BLACKLIST_SUPPORT Tue May 30 18:03:34 2017 (r319246) @@ -1,5 +1,7 @@ .\" $FreeBSD$ -Set to build some programs without blacklistd support, like +Set to build some programs without +.Xr libblacklist 3 +support, like .Xr fingerd 8 , .Xr ftpd 8 , .Xr rlogind 8 , From owner-svn-src-all@freebsd.org Tue May 30 18:04:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05CC8B9591C; Tue, 30 May 2017 18:04:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DA39735D1; Tue, 30 May 2017 18:04:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UI4uXb058929; Tue, 30 May 2017 18:04:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UI4tjI058913; Tue, 30 May 2017 18:04:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705301804.v4UI4tjI058913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 18:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319247 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 18:04:58 -0000 Author: ngie Date: Tue May 30 18:04:55 2017 New Revision: 319247 URL: https://svnweb.freebsd.org/changeset/base/319247 Log: MFC r313169,r319246: r313169 (by wblock): Clarify some option descriptions, add a line of text to makeman to add the slightest hint of a shade of a clue of what it does. r319246: Use .Xr to reference libblacklist(3), blacklistctl(8), and blacklistd(8) Modified: stable/11/tools/build/options/WITHOUT_BLACKLIST stable/11/tools/build/options/WITHOUT_BLACKLIST_SUPPORT stable/11/tools/build/options/WITHOUT_CLANG_BOOTSTRAP stable/11/tools/build/options/WITHOUT_CROSS_COMPILER stable/11/tools/build/options/WITHOUT_DIALOG stable/11/tools/build/options/WITHOUT_DMAGENT stable/11/tools/build/options/WITHOUT_DOCCOMPRESS stable/11/tools/build/options/WITHOUT_GPL_DTC stable/11/tools/build/options/WITHOUT_INSTALLLIB stable/11/tools/build/options/WITHOUT_KERBEROS stable/11/tools/build/options/WITH_CCACHE_BUILD stable/11/tools/build/options/WITH_DIRDEPS_BUILD stable/11/tools/build/options/WITH_INSTALL_AS_USER stable/11/tools/build/options/WITH_META_MODE stable/11/tools/build/options/WITH_STAGING_MAN stable/11/tools/build/options/makeman Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/WITHOUT_BLACKLIST ============================================================================== --- stable/11/tools/build/options/WITHOUT_BLACKLIST Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_BLACKLIST Tue May 30 18:04:55 2017 (r319247) @@ -1,2 +1,5 @@ .\" $FreeBSD$ -Set this if you do not want to build blacklistd / blacklistctl. +Set this if you do not want to build +.Xr blacklistd 8 +and +.Xr blacklistctl 8 . Modified: stable/11/tools/build/options/WITHOUT_BLACKLIST_SUPPORT ============================================================================== --- stable/11/tools/build/options/WITHOUT_BLACKLIST_SUPPORT Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_BLACKLIST_SUPPORT Tue May 30 18:04:55 2017 (r319247) @@ -1,5 +1,7 @@ .\" $FreeBSD$ -Set to build some programs without blacklistd support, like +Set to build some programs without +.Xr libblacklist 3 +support, like .Xr fingerd 8 , .Xr ftpd 8 , .Xr rlogind 8 , Modified: stable/11/tools/build/options/WITHOUT_CLANG_BOOTSTRAP ============================================================================== --- stable/11/tools/build/options/WITHOUT_CLANG_BOOTSTRAP Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_CLANG_BOOTSTRAP Tue May 30 18:04:55 2017 (r319247) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. -You must enable either gcc or clang bootstrap to be able to build the system, -unless an alternative compiler is provided via -XCC. +Set to not build the Clang C/C++ compiler during the bootstrap phase of +the build. +To be able to build the system, either gcc or clang bootstrap must be +enabled unless an alternate compiler is provided via XCC. Modified: stable/11/tools/build/options/WITHOUT_CROSS_COMPILER ============================================================================== --- stable/11/tools/build/options/WITHOUT_CROSS_COMPILER Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_CROSS_COMPILER Tue May 30 18:04:55 2017 (r319247) @@ -1,10 +1,10 @@ .\" $FreeBSD$ Set to not build any cross compiler in the cross-tools stage of buildworld. -If you are compiling a different version of +When compiling a different version of .Fx -than what is installed on the system, you will need to provide an alternate +than what is installed on the system, provide an alternate compiler with XCC to ensure success. -If you are compiling with an identical version of +When compiling with an identical version of .Fx to the host, this option may be safely used. This option may also be safe when the host version of Modified: stable/11/tools/build/options/WITHOUT_DIALOG ============================================================================== --- stable/11/tools/build/options/WITHOUT_DIALOG Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_DIALOG Tue May 30 18:04:55 2017 (r319247) @@ -1,2 +1,7 @@ .\" $FreeBSD$ -Set to not build dialog(1), dialog(1,3), and dpv(1,3). +Set to not build +.Xr dialog 1 , +.Xr dialog 3 , +.Xr dpv 1 , +and +.Xr dpv 3 . Modified: stable/11/tools/build/options/WITHOUT_DMAGENT ============================================================================== --- stable/11/tools/build/options/WITHOUT_DMAGENT Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_DMAGENT Tue May 30 18:04:55 2017 (r319247) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to not build dma Mail Transport Agent +Set to not build dma Mail Transport Agent. Modified: stable/11/tools/build/options/WITHOUT_DOCCOMPRESS ============================================================================== --- stable/11/tools/build/options/WITHOUT_DOCCOMPRESS Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_DOCCOMPRESS Tue May 30 18:04:55 2017 (r319247) @@ -1,3 +1,3 @@ .\" $FreeBSD$ -Set to not to install compressed system documentation. +Set to not install compressed system documentation. Only the uncompressed version will be installed. Modified: stable/11/tools/build/options/WITHOUT_GPL_DTC ============================================================================== --- stable/11/tools/build/options/WITHOUT_GPL_DTC Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_GPL_DTC Tue May 30 18:04:55 2017 (r319247) @@ -1,3 +1,3 @@ .\" $FreeBSD$ -Set to build the BSD licensed version of the device tree compiler, instead of the -GPL'd one from elinux.org. +Set to build the BSD licensed version of the device tree compiler rather +than the GPLed one from elinux.org. Modified: stable/11/tools/build/options/WITHOUT_INSTALLLIB ============================================================================== --- stable/11/tools/build/options/WITHOUT_INSTALLLIB Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_INSTALLLIB Tue May 30 18:04:55 2017 (r319247) @@ -1,6 +1,6 @@ .\" $FreeBSD$ -Set this if you do not want to install optional libraries. -For example when creating a +Set this if to not install optional libraries. +For example, when creating a .Xr nanobsd 8 image. .Bf -symbolic Modified: stable/11/tools/build/options/WITHOUT_KERBEROS ============================================================================== --- stable/11/tools/build/options/WITHOUT_KERBEROS Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITHOUT_KERBEROS Tue May 30 18:04:55 2017 (r319247) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set this if you do not want to build Kerberos 5 (KTH Heimdal). +Set this to not build Kerberos 5 (KTH Heimdal). Modified: stable/11/tools/build/options/WITH_CCACHE_BUILD ============================================================================== --- stable/11/tools/build/options/WITH_CCACHE_BUILD Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITH_CCACHE_BUILD Tue May 30 18:04:55 2017 (r319247) @@ -5,9 +5,9 @@ for the build. No configuration is required except to install the .Sy devel/ccache package. -Using with -.Xr distcc 1 -should set +When using with +.Xr distcc 1 , +set .Sy CCACHE_PREFIX=/usr/local/bin/distcc . The default cache directory of .Pa $HOME/.ccache Modified: stable/11/tools/build/options/WITH_DIRDEPS_BUILD ============================================================================== --- stable/11/tools/build/options/WITH_DIRDEPS_BUILD Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITH_DIRDEPS_BUILD Tue May 30 18:04:55 2017 (r319247) @@ -11,23 +11,24 @@ Makefile.depend files found in each directory. .Pp The build can be started from anywhere, and behaves the same. The initial instance of -.Xr make 1 +.Xr make 1 recursively reads .Va DIRDEPS -from Makefile.depend +from +.Pa Makefile.depend , computing a graph of tree dependencies from the current origin. Setting .Va NO_DIRDEPS -will skip checking dirdep dependencies and will only build in the current +skips checking dirdep dependencies and will only build in the current and child directories. .Va NO_DIRDEPS_BELOW -will skip building any dirdeps and only build the current directory. +skips building any dirdeps and only build the current directory. .Pp This also utilizes the .Va WITH_META_MODE logic for incremental builds. .Pp -The build will hide commands ran unless +The build hides commands executed unless .Va NO_SILENT is defined. .Pp Modified: stable/11/tools/build/options/WITH_INSTALL_AS_USER ============================================================================== --- stable/11/tools/build/options/WITH_INSTALL_AS_USER Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITH_INSTALL_AS_USER Tue May 30 18:04:55 2017 (r319247) @@ -4,6 +4,6 @@ files with owner and group attributes set to that of t the .Xr make 1 command. -The user still has to set the +The user still must set the .Va DESTDIR variable to point to a directory where the user has write permissions. Modified: stable/11/tools/build/options/WITH_META_MODE ============================================================================== --- stable/11/tools/build/options/WITH_META_MODE Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITH_META_MODE Tue May 30 18:04:55 2017 (r319247) @@ -1,22 +1,22 @@ .\" $FreeBSD$ -Creates +Create .Xr make 1 meta files when building, which can provide a reliable incremental build when using .Xr filemon 4 . -The meta file is created in the OBJDIR as +The meta file is created in OBJDIR as .Pa target.meta . -These meta files track the command ran, its output, and the current directory. +These meta files track the command that was executed, its output, and the +current directory. The .Xr filemon 4 module is required unless .Va NO_FILEMON is defined. -When the module is loaded, any files used by the commands executed will be -tracked as -dependencies for the target in its meta file. -The target will be considered out-of-date and rebuilt if any of the following -are true compared to the last build: +When the module is loaded, any files used by the commands executed are +tracked as dependencies for the target in its meta file. +The target is considered out-of-date and rebuilt if any of these +conditions are true compared to the last build: .Bl -bullet -compact .It The command to execute changes. @@ -38,10 +38,10 @@ Files read, written, executed or linked are missing. .El The meta files can also be useful for debugging. .Pp -The build will hide commands ran unless +The build hides commands that are executed unless .Va NO_SILENT is defined. -Errors will cause +Errors cause .Xr make 1 to show some of its environment for further debugging. .Pp Modified: stable/11/tools/build/options/WITH_STAGING_MAN ============================================================================== --- stable/11/tools/build/options/WITH_STAGING_MAN Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/WITH_STAGING_MAN Tue May 30 18:04:55 2017 (r319247) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Enable staging of MAN pages to stage tree. +Enable staging of man pages to stage tree. Modified: stable/11/tools/build/options/makeman ============================================================================== --- stable/11/tools/build/options/makeman Tue May 30 18:03:34 2017 (r319246) +++ stable/11/tools/build/options/makeman Tue May 30 18:04:55 2017 (r319247) @@ -22,7 +22,7 @@ set -o errexit export LC_ALL=C t=$(mktemp -d -t makeman) -trap 'test -d $t && rm -rf $t' exit +# trap 'test -d $t && rm -rf $t' exit srcdir=$(realpath ../../..) make="make -C $srcdir -m $srcdir/share/mk" @@ -132,6 +132,7 @@ show() main() { + echo "building src.conf.5 man page from files in ${PWD}" >&2 fbsdid='$'FreeBSD'$' cat < Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31463B95A96; Tue, 30 May 2017 18:06:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BA0B73840; Tue, 30 May 2017 18:06:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UI6KmT059155; Tue, 30 May 2017 18:06:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UI6Kmi059154; Tue, 30 May 2017 18:06:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705301806.v4UI6Kmi059154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 18:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319248 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 18:06:21 -0000 Author: ngie Date: Tue May 30 18:06:19 2017 New Revision: 319248 URL: https://svnweb.freebsd.org/changeset/base/319248 Log: Regenerate src.conf(5) This contains a number of content changes due to src.opts.mk changes. Sponsored by: Dell EMC Isilon Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue May 30 18:04:55 2017 (r319247) +++ head/share/man/man5/src.conf.5 Tue May 30 18:06:19 2017 (r319248) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd April 21, 2017 +.Dd May 30, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -180,7 +180,10 @@ as part of the bootstrap process. This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. .It Va WITHOUT_BLACKLIST -Set this if you do not want to build blacklistd/blacklistctl. +Set this if you do not want to build +.Xr blacklistd 8 +and +.Xr blacklistctl 8 . When set, it enforces these options: .Pp .Bl -item -compact @@ -188,7 +191,9 @@ When set, it enforces these options: .Va WITHOUT_BLACKLIST_SUPPORT .El .It Va WITHOUT_BLACKLIST_SUPPORT -Set to build some programs without blacklistd support, like +Set to build some programs without +.Xr libblacklist 3 +support, like .Xr fingerd 8 , .Xr ftpd 8 , .Xr rlogind 8 , @@ -705,13 +710,34 @@ Set to not build .Xr gdb 1 . .Pp This is a default setting on -amd64/amd64, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. +arm64/aarch64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_GDB Set to build .Xr gdb 1 . .Pp This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64. +.It Va WITHOUT_GDB_LIBEXEC +Set to install +.Xr gdb 1 +into +.Pa /usr/bin . +.Pp +This is a default setting on arm/arm, arm/armeb, arm/armv6 and sparc64/sparc64. +.It Va WITH_GDB_LIBEXEC +Set to install +.Xr gdb 1 +into +.Pa /usr/libexec . +This permits +.Xr gdb 1 +to be used as a fallback for +.Xr crashinfo 8 +if a newer version is not installed. +.Pp +This is a default setting on +amd64/amd64, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_GNUCXX Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. @@ -943,12 +969,6 @@ Set to not build LLVM's lld linker. .Pp This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. -When set, it enforces these options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_LLD_IS_LD -.El .It Va WITH_LLD Set to build LLVM's lld linker. .Pp @@ -987,14 +1007,6 @@ Set to use LLVM's LLD as the system linker, instead of .Pp This is a default setting on arm64/aarch64. -When set, these options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_SYSTEM_COMPILER -(unless -.Va WITH_SYSTEM_COMPILER -is set explicitly) -.El .It Va WITHOUT_LLVM_LIBUNWIND Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp @@ -1412,24 +1424,6 @@ The and .Va WITHOUT_GCC options control those. -.Pp -This is a default setting on -arm64/aarch64. -.It Va WITH_SYSTEM_COMPILER -Set to opportunistically skip building a cross-compiler during the -bootstrap phase of the build. -If the currently installed compiler matches the planned bootstrap compiler -type and revision, then it will not be built. -This does not prevent a compiler from being built for installation though, -only for building one for the build itself. -The -.Va WITHOUT_CLANG -and -.Va WITHOUT_GCC -options control those. -.Pp -This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITHOUT_TALK Set to not build or install .Xr talk 1 From owner-svn-src-all@freebsd.org Tue May 30 18:08:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BFCAB95B6D; Tue, 30 May 2017 18:08:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA4A73997; Tue, 30 May 2017 18:08:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4UI8X8f059274; Tue, 30 May 2017 18:08:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UI8X5Y059273; Tue, 30 May 2017 18:08:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705301808.v4UI8X5Y059273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 30 May 2017 18:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319249 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 18:08:35 -0000 Author: ngie Date: Tue May 30 18:08:33 2017 New Revision: 319249 URL: https://svnweb.freebsd.org/changeset/base/319249 Log: Regenerate src.conf(5) Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Tue May 30 18:06:19 2017 (r319248) +++ stable/11/share/man/man5/src.conf.5 Tue May 30 18:08:33 2017 (r319249) @@ -85,11 +85,11 @@ even if they would be set to .Dq Li FALSE or .Dq Li NO . -Just the existence of an option will cause -it to be honoured by +The presence of an option causes +it to be honored by .Xr make 1 . .Pp -The following list provides a name and short description for variables +This list provides a name and short description for variables that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT @@ -149,13 +149,13 @@ Set to not build or install binutils (as, ld, objcopy, of the normal system build. The resulting system cannot build programs from source. .Pp -It is a default setting on +This is a default setting on arm64/aarch64. .It Va WITH_BINUTILS Set to build and install binutils (as, ld, objcopy, and objdump) as part of the normal system build. .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP Set to not build binutils (as, ld, objcopy and objdump) @@ -165,24 +165,29 @@ The option does not work for build targets unless some toolchain is provided. .Ef .Pp -It is a default setting on +This is a default setting on arm64/aarch64. .It Va WITH_BINUTILS_BOOTSTRAP Set build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BLACKLIST -Set this if you do not want to build blacklistd / blacklistctl. -When set, it also enforces the following options: +Set this if you do not want to build +.Xr blacklistd 8 +and +.Xr blacklistctl 8 . +When set, it enforces these options: .Pp .Bl -item -compact .It .Va WITHOUT_BLACKLIST_SUPPORT .El .It Va WITHOUT_BLACKLIST_SUPPORT -Set to build some programs without blacklistd support, like +Set to build some programs without +.Xr libblacklist 3 +support, like .Xr fingerd 8 , .Xr ftpd 8 , .Xr rlogind 8 , @@ -218,7 +223,7 @@ Set to not build contributed bzip2 software as a part .Bf -symbolic The option has no effect yet. .Ef -When set, it also enforces the following options: +When set, it enforces these options: .Pp .Bl -item -compact .It @@ -231,7 +236,7 @@ Set to not build .Xr calendar 1 . .It Va WITHOUT_CAPSICUM Set to not build Capsicum support into system programs. -When set, it also enforces the following options: +When set, it enforces these options: .Pp .Bl -item -compact .It @@ -246,9 +251,9 @@ for the build. No configuration is required except to install the .Sy devel/ccache package. -Using with -.Xr distcc 1 -should set +When using with +.Xr distcc 1 , +set .Sy CCACHE_PREFIX=/usr/local/bin/distcc . The default cache directory of .Pa $HOME/.ccache @@ -284,7 +289,7 @@ Set to not build and related utilities. .It Va WITHOUT_CDDL Set to not build code licensed under Sun's CDDL. -When set, it also enforces the following options: +When set, it enforces these options: .Pp .Bl -item -compact .It @@ -295,9 +300,9 @@ When set, it also enforces the following options: .It Va WITHOUT_CLANG Set to not build the Clang C/C++ compiler during the regular phase of the build. .Pp -It is a default setting on +This is a default setting on sparc64/sparc64. -When set, it also enforces the following options: +When set, it enforces these options: .Pp .Bl -item -compact .It @@ -308,20 +313,20 @@ When set, it also enforces the following options: .It Va WITH_CLANG Set to build the Clang C/C++ compiler during the normal phase of the build. .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_BOOTSTRAP -Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. -You must enable either gcc or clang bootstrap to be able to build the system, -unless an alternative compiler is provided via -XCC. +Set to not build the Clang C/C++ compiler during the bootstrap phase of +the build. +To be able to build the system, either gcc or clang bootstrap must be +enabled unless an alternate compiler is provided via XCC. .Pp -It is a default setting on +This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_BOOTSTRAP Set to build the Clang C/C++ compiler during the bootstrap phase of the build. .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_CLANG_EXTRAS Set to build additional clang and llvm tools, such as bugpoint. @@ -329,13 +334,13 @@ Set to build additional clang and llvm tools, such as Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp -It is a default setting on +This is a default setting on sparc64/sparc64. .It Va WITH_CLANG_FULL Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_IS_CC Set to install the GCC compiler as @@ -344,7 +349,7 @@ Set to install the GCC compiler as and .Pa /usr/bin/cpp . .Pp -It is a default setting on +This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_IS_CC Set to install the Clang C/C++ compiler as @@ -353,25 +358,25 @@ Set to install the Clang C/C++ compiler as and .Pa /usr/bin/cpp . .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITHOUT_CPP Set to not build .Xr cpp 1 . .It Va WITHOUT_CROSS_COMPILER Set to not build any cross compiler in the cross-tools stage of buildworld. -If you are compiling a different version of +When compiling a different version of .Fx -than what is installed on the system, you will need to provide an alternate +than what is installed on the system, provide an alternate compiler with XCC to ensure success. -If you are compiling with an identical version of +When compiling with an identical version of .Fx to the host, this option may be safely used. This option may also be safe when the host version of .Fx is close to the sources being built, but all bets are off if there have been any changes to the toolchain between the versions. -When set, it also enforces the following options: +When set, it enforces these options: .Pp .Bl -item -compact .It @@ -385,7 +390,7 @@ When set, it also enforces the following options: .El .It Va WITHOUT_CRYPT Set to not build any crypto code. -When set, it also enforces the following options: +When set, it enforces these options: .Pp .Bl -item -compact .It @@ -398,7 +403,7 @@ When set, it also enforces the following options: .Va WITHOUT_OPENSSL .El .Pp -When set, the following options are also in effect: +When set, these options are also in effect: .Pp .Bl -inset -compact .It Va WITHOUT_GSSAPI @@ -424,7 +429,7 @@ It will also prevent building of .Xr gperf 1 and .Xr devd 8 . -When set, it also enforces the following options: +When set, it enforces these options: .Pp .Bl -item -compact .It @@ -442,8 +447,13 @@ When set, it also enforces the following options: Set to avoid building or installing standalone debug files for each executable binary and shared library. .It Va WITHOUT_DIALOG -Set to not build dialog(1), dialog(1,3), and dpv(1,3). -When set, it also enforces the following options: +Set to not build +.Xr dialog 1 , +.Xr dialog 3 , +.Xr dpv 1 , +and +.Xr dpv 3 . +When set, it enforces these options: .Pp .Bl -item -compact .It @@ -464,36 +474,37 @@ Makefile.depend files found in each directory. .Pp The build can be started from anywhere, and behaves the same. The initial instance of -.Xr make 1 +.Xr make 1 recursively reads .Va DIRDEPS -from Makefile.depend +from +.Pa Makefile.depend , computing a graph of tree dependencies from the current origin. Setting .Va NO_DIRDEPS -will skip checking dirdep dependencies and will only build in the current +skips checking dirdep dependencies and will only build in the current and child directories. .Va NO_DIRDEPS_BELOW -will skip building any dirdeps and only build the current directory. +skips building any dirdeps and only build the current directory. .Pp This also utilizes the .Va WITH_META_MODE logic for incremental builds. .Pp -The build will hide commands ran unless +The build hides commands executed unless .Va NO_SILENT is defined. .Pp Note that there is currently no mass install feature for this. .Pp -When set, it also enforces the following options: +When set, it enforces these options: .Pp .Bl -item -compact .It .Va WITH_INSTALL_AS_USER .El .Pp -When set, the following options are also in effect: +When set, these options are also in effect: .Pp .Bl -inset -compact .It Va WITHOUT_SYSTEM_COMPILER @@ -541,9 +552,9 @@ This must be set in the environment, make command line not .Pa /etc/src.conf . .It Va WITHOUT_DMAGENT -Set to not build dma Mail Transport Agent +Set to not build dma Mail Transport Agent. .It Va WITHOUT_DOCCOMPRESS -Set to not to install compressed system documentation. +Set to not install compressed system documentation. Only the uncompressed version will be installed. .It Va WITH_DTRACE_TESTS Set to build and install the DTrace test suite in @@ -571,7 +582,7 @@ Set not to build and .Xr efivar 8 . .Pp -It is a default setting on +This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_EFI Set to build @@ -579,7 +590,7 @@ Set to build and .Xr efivar 8 . .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_EISA Set to build EISA kernel modules. @@ -642,12 +653,12 @@ Set to not build games. .It Va WITHOUT_GCC Set to not build and install gcc and g++ as part of the normal build process. .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GCC Set to build and install gcc and g++. .Pp -It is a default setting on +This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCC_BOOTSTRAP Set to not build gcc and g++ as part of the bootstrap process. @@ -655,12 +666,12 @@ You must enable either gcc or clang bootstrap to be ab unless an alternative compiler is provided via XCC. .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GCC_BOOTSTRAP Set to build gcc and g++ as part of the bootstrap process. .Pp -It is a default setting on +This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCOV Set to not build the @@ -670,13 +681,13 @@ tool. Set to not build .Xr gdb 1 . .Pp -It is a default setting on +This is a default setting on arm64/aarch64. .It Va WITH_GDB Set to build .Xr gdb 1 . .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU Set to not build contributed GNU software as a part of the base system. @@ -685,7 +696,7 @@ covered by the GNU Public License due to legal reasons .Bf -symbolic The option has no effect yet. .Ef -When set, it also enforces the following options: +When set, it enforces these options: .Pp .Bl -item -compact .It @@ -695,13 +706,13 @@ When set, it also enforces the following options: Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. .Pp -It is a default setting on +This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GNUCXX Build the GNU C++ stack (g++, libstdc++). This is the default on platforms where gcc is the system compiler. .Pp -It is a default setting on +This is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_GREP_COMPAT Set this option to omit the gnu extensions to grep from being included in @@ -713,8 +724,8 @@ Set to not build .Xr gpioctl 8 as part of the base system. .It Va WITHOUT_GPL_DTC -Set to build the BSD licensed version of the device tree compiler, instead of the -GPL'd one from elinux.org. +Set to build the BSD licensed version of the device tree compiler rather +than the GPLed one from elinux.org. .It Va WITHOUT_GROFF Set to not build .Xr groff 1 @@ -724,3 +735,785 @@ You should consider installing the textproc/groff port .Xr man 1 . .It Va WITHOUT_GSSAPI Set to not build libgssapi. +.It Va WITHOUT_HAST +Set to not build +.Xr hastd 8 +and related utilities. +.It Va WITH_HESIOD +Set to build Hesiod support. +.It Va WITHOUT_HTML +Set to not build HTML docs. +.It Va WITHOUT_HYPERV +Set to not build or install HyperV utilities. +.It Va WITHOUT_ICONV +Set to not build iconv as part of libc. +.It Va WITHOUT_INCLUDES +Set to not install header files. +This option used to be spelled +.Va NO_INCS . +.Bf -symbolic +The option does not work for build targets. +.Ef +.It Va WITHOUT_INET +Set to not build programs and libraries related to IPv4 networking. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_INET_SUPPORT +.El +.It Va WITHOUT_INET6 +Set to not build +programs and libraries related to IPv6 networking. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_INET6_SUPPORT +.El +.It Va WITHOUT_INET6_SUPPORT +Set to build libraries, programs, and kernel modules without IPv6 support. +.It Va WITHOUT_INETD +Set to not build +.Xr inetd 8 . +.It Va WITHOUT_INET_SUPPORT +Set to build libraries, programs, and kernel modules without IPv4 support. +.It Va WITHOUT_INSTALLLIB +Set this if to not install optional libraries. +For example, when creating a +.Xr nanobsd 8 +image. +.Bf -symbolic +The option does not work for build targets. +.Ef +.It Va WITH_INSTALL_AS_USER +Set to make install targets succeed for non-root users by installing +files with owner and group attributes set to that of the user running +the +.Xr make 1 +command. +The user still must set the +.Va DESTDIR +variable to point to a directory where the user has write permissions. +.It Va WITHOUT_IPFILTER +Set to not build IP Filter package. +.It Va WITHOUT_IPFW +Set to not build IPFW tools. +.It Va WITHOUT_IPSEC_SUPPORT +Set to not build the kernel with +.Xr ipsec 4 +support. +This option is needed for +.Xr ipsec 4 +and +.Xr tcpmd5 4 . +.It Va WITHOUT_ISCSI +Set to not build +.Xr iscid 8 +and related utilities. +.It Va WITHOUT_JAIL +Set to not build tools for the support of jails; e.g., +.Xr jail 8 . +.It Va WITHOUT_KDUMP +Set to not build +.Xr kdump 1 +and +.Xr truss 1 . +.It Va WITHOUT_KERBEROS +Set this to not build Kerberos 5 (KTH Heimdal). +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_KERBEROS_SUPPORT +.El +.Pp +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_GSSAPI +(unless +.Va WITH_GSSAPI +is set explicitly) +.El +.It Va WITHOUT_KERBEROS_SUPPORT +Set to build some programs without Kerberos support, like +.Xr ssh 1 , +.Xr telnet 1 , +.Xr sshd 8 , +and +.Xr telnetd 8 . +.It Va WITHOUT_KERNEL_SYMBOLS +Set to not install kernel symbol files. +.Bf -symbolic +This option is recommended for those people who have small root partitions. +.Ef +.It Va WITHOUT_KVM +Set to not build the +.Nm libkvm +library as a part of the base system. +.Bf -symbolic +The option has no effect yet. +.Ef +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_KVM_SUPPORT +.El +.It Va WITHOUT_KVM_SUPPORT +Set to build some programs without optional +.Nm libkvm +support. +.It Va WITHOUT_LDNS +Setting this variable will prevent the LDNS library from being built. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_LDNS_UTILS +.It +.Va WITHOUT_UNBOUND +.El +.It Va WITHOUT_LDNS_UTILS +Setting this variable will prevent building the LDNS utilities +.Xr drill 1 +and +.Xr host 1 . +.It Va WITHOUT_LEGACY_CONSOLE +Set to not build programs that support a legacy PC console; e.g., +.Xr kbdcontrol 1 +and +.Xr vidcontrol 1 . +.It Va WITHOUT_LIB32 +On 64-bit platforms, set to not build 32-bit library set and a +.Nm ld-elf32.so.1 +runtime linker. +.It Va WITHOUT_LIBCPLUSPLUS +Set to avoid building libcxxrt and libc++. +.It Va WITHOUT_LIBPTHREAD +Set to not build the +.Nm libpthread +providing library, +.Nm libthr . +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_LIBTHR +.El +.It Va WITH_LIBSOFT +On armv6 only, set to enable soft float ABI compatibility libraries. +This option is for transitioning to the new hard float ABI. +.It Va WITHOUT_LIBTHR +Set to not build the +.Nm libthr +(1:1 threading) +library. +.It Va WITHOUT_LLD +Set to not build LLVM's lld linker. +.Pp +This is a default setting on +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_LLD +Set to build LLVM's lld linker. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. +.It Va WITHOUT_LLDB +Set to not build the LLDB debugger. +.Pp +This is a default setting on +arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_LLDB +Set to build the LLDB debugger. +.Pp +This is a default setting on +amd64/amd64 and arm64/aarch64. +.It Va WITHOUT_LLD_BOOTSTRAP +Set to not build the LLD linker during the bootstrap phase of +the build. +To be able to build the system, either Binutils or LLD bootstrap must be +enabled unless an alternate linker is provided via XLD. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_LLD_BOOTSTRAP +Set to build the LLD linker during the bootstrap phase of the build. +.Pp +This is a default setting on +arm64/aarch64. +.It Va WITHOUT_LLD_IS_LD +Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_LLD_IS_LD +Set to use LLVM's LLD as the system linker, instead of GNU binutils ld. +.Pp +This is a default setting on +arm64/aarch64. +.It Va WITHOUT_LLVM_LIBUNWIND +Set to use GCC's stack unwinder (instead of LLVM's libunwind). +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_LLVM_LIBUNWIND +Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder). +.Pp +This is a default setting on +arm64/aarch64. +.It Va WITHOUT_LOCALES +Set to not build localization files; see +.Xr locale 1 . +.It Va WITHOUT_LOCATE +Set to not build +.Xr locate 1 +and related programs. +.It Va WITHOUT_LPR +Set to not build +.Xr lpr 1 +and related programs. +.It Va WITHOUT_LS_COLORS +Set to build +.Xr ls 1 +without support for colors to distinguish file types. +.It Va WITHOUT_LZMA_SUPPORT +Set to build some programs without optional lzma compression support. +.It Va WITHOUT_MAIL +Set to not build any mail support (MUA or MTA). +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_DMAGENT +.It +.Va WITHOUT_MAILWRAPPER +.It +.Va WITHOUT_SENDMAIL +.El +.It Va WITHOUT_MAILWRAPPER +Set to not build the +.Xr mailwrapper 8 +MTA selector. +.It Va WITHOUT_MAKE +Set to not install +.Xr make 1 +and related support files. +.It Va WITHOUT_MAN +Set to not build manual pages. +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_MAN_UTILS +(unless +.Va WITH_MAN_UTILS +is set explicitly) +.El +.It Va WITHOUT_MANCOMPRESS +Set to not to install compressed man pages. +Only the uncompressed versions will be installed. +.It Va WITHOUT_MANDOCDB +Use the version of +.Xr makewhatis 1 +introduced in +.Fx 2.1 , +instead of the +.Xr makewhatis 8 +database and utilities from +.Xr mandoc 1 . +.It Va WITHOUT_MAN_UTILS +Set to not build utilities for manual pages, +.Xr apropos 1 , +.Xr catman 1 , +.Xr makewhatis 1 , +.Xr man 1 , +.Xr whatis 1 , +.Xr manctl 8 , +and related support files. +.It Va WITH_META_MODE +Create +.Xr make 1 +meta files when building, which can provide a reliable incremental build when +using +.Xr filemon 4 . +The meta file is created in OBJDIR as +.Pa target.meta . +These meta files track the command that was executed, its output, and the +current directory. +The +.Xr filemon 4 +module is required unless +.Va NO_FILEMON +is defined. +When the module is loaded, any files used by the commands executed are +tracked as dependencies for the target in its meta file. +The target is considered out-of-date and rebuilt if any of these +conditions are true compared to the last build: +.Bl -bullet -compact +.It +The command to execute changes. +.It +The current working directory changes. +.It +The target's meta file is missing. +.It +The target's meta file is missing filemon data when filemon is loaded +and a previous run did not have it loaded. +.It +[requires +.Xr filemon 4 ] +Files read, executed or linked to are newer than the target. +.It +[requires +.Xr filemon 4 ] +Files read, written, executed or linked are missing. +.El +The meta files can also be useful for debugging. +.Pp +The build hides commands that are executed unless +.Va NO_SILENT +is defined. +Errors cause +.Xr make 1 +to show some of its environment for further debugging. +.Pp +The build operates as it normally would otherwise. +This option originally invoked a different build system but that was renamed +to +.Va WITH_DIRDEPS_BUILD . +.Pp +Currently this also enforces +.Va WITHOUT_SYSTEM_COMPILER . +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_SYSTEM_COMPILER +(unless +.Va WITH_SYSTEM_COMPILER +is set explicitly) +.El +.Pp +This must be set in the environment, make command line, or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . +.It Va WITH_NAND +Set to build the NAND Flash components. +.It Va WITHOUT_NDIS +Set to not build programs and libraries +related to NDIS emulation support. +.It Va WITHOUT_NETCAT +Set to not build +.Xr nc 1 +utility. +.It Va WITHOUT_NETGRAPH +Set to not build applications to support +.Xr netgraph 4 . +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_ATM +.It +.Va WITHOUT_BLUETOOTH +.It +.Va WITHOUT_NETGRAPH_SUPPORT +.El +.It Va WITHOUT_NETGRAPH_SUPPORT +Set to build libraries, programs, and kernel modules without netgraph support. +.It Va WITHOUT_NIS +Set to not build +.Xr NIS 8 +support and related programs. +If set, you might need to adopt your +.Xr nsswitch.conf 5 +and remove +.Sq nis +entries. +.It Va WITHOUT_NLS +Set to not build NLS catalogs. +.It Va WITHOUT_NLS_CATALOGS +Set to not build NLS catalog support for +.Xr csh 1 . +.It Va WITHOUT_NS_CACHING +Set to disable name caching in the +.Pa nsswitch +subsystem. +The generic caching daemon, +.Xr nscd 8 , +will not be built either if this option is set. +.It Va WITHOUT_NTP +Set to not build +.Xr ntpd 8 +and related programs. +.It Va WITH_OFED +Set to build the +.Dq "OpenFabrics Enterprise Distribution" +Infiniband software stack. +.It Va WITH_OPENLDAP +Enable building openldap support for kerberos. +.It Va WITHOUT_OPENSSH +Set to not build OpenSSH. +.It Va WITHOUT_OPENSSL +Set to not build OpenSSL. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_KERBEROS +.It +.Va WITHOUT_KERBEROS_SUPPORT +.It +.Va WITHOUT_OPENSSH +.El +.Pp +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_GSSAPI +(unless +.Va WITH_GSSAPI +is set explicitly) +.El +.It Va WITHOUT_PAM +Set to not build PAM library and modules. +.Bf -symbolic +This option is deprecated and does nothing. +.Ef +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_PAM_SUPPORT +.El +.It Va WITHOUT_PAM_SUPPORT +Set to build some programs without PAM support, particularly +.Xr ftpd 8 +and +.Xr ppp 8 . +.It Va WITHOUT_PC_SYSINSTALL +Set to not build +.Xr pc-sysinstall 8 +and related programs. +.It Va WITHOUT_PF +Set to not build PF firewall package. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_AUTHPF +.El +.It Va WITHOUT_PKGBOOTSTRAP +Set to not build +.Xr pkg 7 +bootstrap tool. +.It Va WITHOUT_PMC +Set to not build +.Xr pmccontrol 8 +and related programs. +.It Va WITHOUT_PORTSNAP +Set to not build or install +.Xr portsnap 8 +and related files. +.It Va WITHOUT_PPP +Set to not build +.Xr ppp 8 +and related programs. +.It Va WITHOUT_PROFILE +Set to avoid compiling profiled libraries. +.It Va WITHOUT_QUOTAS +Set to not build +.Xr quota 1 +and related programs. +.It Va WITHOUT_RADIUS_SUPPORT +Set to not build radius support into various applications, like +.Xr pam_radius 8 +and +.Xr ppp 8 . +.It Va WITHOUT_RBOOTD +Set to not build or install +.Xr rbootd 8 . +.It Va WITHOUT_RCMDS +Disable building of the +.Bx +r-commands. +This includes +.Xr rlogin 1 , +.Xr rsh 1 , +etc. +.It Va WITHOUT_RCS +Set to not build +.Xr rcs 1 , +.Xr etcupdate 8 , +and related utilities. +.It Va WITH_REPRODUCIBLE_BUILD +Set to exclude build metadata (such as the build time, user, or host) +from the kernel, boot loaders, and uname output, so that builds produce +bit-for-bit identical output. +.It Va WITHOUT_RESCUE +Set to not build +.Xr rescue 8 . +.It Va WITHOUT_ROUTED +Set to not build +.Xr routed 8 +utility. +.It Va WITH_RPCBIND_WARMSTART_SUPPORT +Set to build +.Xr rpcbind 8 +with warmstart support. +.It Va WITHOUT_SENDMAIL +Set to not build +.Xr sendmail 8 +and related programs. +.It Va WITHOUT_SETUID_LOGIN +Set this to disable the installation of +.Xr login 1 +as a set-user-ID root program. +.It Va WITHOUT_SHAREDOCS +Set to not build the +.Bx 4.4 +legacy docs. +.It Va WITH_SHARED_TOOLCHAIN +Set to build the toolchain binaries shared. +The set includes +.Xr cc 1 , +.Xr make 1 +and necessary utilities like assembler, linker and library archive manager. +.It Va WITH_SORT_THREADS +Set to enable threads in +.Xr sort 1 . +.It Va WITHOUT_SOURCELESS +Set to not build kernel modules that include sourceless code (either microcode or native code for host CPU). +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_SOURCELESS_HOST +.It +.Va WITHOUT_SOURCELESS_UCODE +.El +.It Va WITHOUT_SOURCELESS_HOST +Set to not build kernel modules that include sourceless native code for host CPU. +.It Va WITHOUT_SOURCELESS_UCODE +Set to not build kernel modules that include sourceless microcode. +.It Va WITHOUT_SSP +Set to not build world with propolice stack smashing protection. +.It Va WITH_STAGING +Enable staging of files to a stage tree. +This can be best thought of as auto-install to +.Va DESTDIR +with some extra meta data to ensure dependencies can be tracked. +Depends on +.Va WITH_DIRDEPS_BUILD . +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITH_STAGING_MAN +(unless +.Va WITHOUT_STAGING_MAN +is set explicitly) +.It Va WITH_STAGING_PROG +(unless +.Va WITHOUT_STAGING_PROG +is set explicitly) +.El +.Pp +This must be set in the environment, make command line, or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . +.It Va WITH_STAGING_MAN +Enable staging of man pages to stage tree. +.It Va WITH_STAGING_PROG +Enable staging of PROGs to stage tree. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 30 19:25:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC903BDA0BF for ; Tue, 30 May 2017 19:25:06 +0000 (UTC) (envelope-from stephen.mcconnell@broadcom.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 9791F75F6C for ; Tue, 30 May 2017 19:25:06 +0000 (UTC) (envelope-from stephen.mcconnell@broadcom.com) Received: by mail-it0-x22a.google.com with SMTP id g126so47573217ith.0 for ; Tue, 30 May 2017 12:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:references:in-reply-to:mime-version:thread-index:date :message-id:subject:to:cc; bh=KGaU3T/IHg9vvrFF/ZJ6qw82OdGxupLPvwCSJ98tNPk=; b=AeYz/ZjELtQzrM8DtD+Xs7BdQT5RsBwwLb8HHj7npaY8k0Jg+GhTwmbA0Zizz3RjAb Ew2EVUjtqr34v0A1BvEgnQooityaa4mfkBSOkeqHQf0xWcmuY5NBwiAGW3TTxes8OlvJ ZOSfKUH9tvdzss6D6Z38E/K8IxVD6VVQOGhCo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc; bh=KGaU3T/IHg9vvrFF/ZJ6qw82OdGxupLPvwCSJ98tNPk=; b=BNKulGPIZ4xJ6gXj+FuF7Mx7XH+AG9QfX8CxQNB2QP5eEEj8t7Jy9+MKIPlkLaoVsM lM3iKQRqR7FJrYJIGJMSGh87g3hd1TvMy24c6YIpFI/VkW46XE/mUjL9KqIO7AVnlAbC tkyupsshXtStXo9kz+/vol6VTT0sAQpe24PAtz1p2Ujpadr02bXAWhC5RD9VRkl8ONLb gFV0uiSqkLZztWHg6p7MrxavV/8hZ4L4zjq6iI9b0EDQTS7COTabepDGziSwK+u34czL N32rg5EeTuLsObTj1AHEsSn959CxcQKPjTsIHNR4V3oMd8713+fIbJYa626byrFtucgB 326w== X-Gm-Message-State: AODbwcBZlVUp1/yoJLR69osmrwerrLfBFuSvkUC+pqxTx9ZOiueOn8Qs Hix5ozbDMqqKIGJRUNTO0TkEJALjgK3D X-Received: by 10.36.238.129 with SMTP id b123mr3481448iti.10.1496172306054; Tue, 30 May 2017 12:25:06 -0700 (PDT) From: Stephen Mcconnell References: <201705251914.v4PJEi3l075183@repo.freebsd.org> <20170525191702.GB27521@FreeBSD.org> In-Reply-To: <20170525191702.GB27521@FreeBSD.org> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQLj1fAhdrBVtZQZ8rtwlWyF43D99AL+iBECn9NTsaA= Date: Tue, 30 May 2017 13:25:05 -0600 Message-ID: <5de43913ae47381a74b7b8def9d0f82c@mail.gmail.com> Subject: RE: svn commit: r318895 - in head: share/man/man4 sys/dev/mps To: Alexey Dokuchaev , Stephen McConnell 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 19:25:06 -0000 > -----Original Message----- > From: Alexey Dokuchaev [mailto:danfe@FreeBSD.org] > Sent: Thursday, May 25, 2017 1:17 PM > To: Stephen McConnell > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r318895 - in head: share/man/man4 sys/dev/mps > > On Thu, May 25, 2017 at 07:14:44PM +0000, Stephen McConnell wrote: > > New Revision: 318895 > > URL: https://svnweb.freebsd.org/changeset/base/318895 > > > > Log: > > Fix several problems with mapping code. > > > > Reviewed by: ken, scottl, asomers, ambrisko, mav > > Approved by: ken, mav > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D10878 > > It would be nice to mention, at least briefly, what were those problems in the > commit log. You're right. Normally I would have done that. Not sure why I didn't this time. > > ./danfe From owner-svn-src-all@freebsd.org Tue May 30 20:03:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D42F9BEB1FA; Tue, 30 May 2017 20:03:58 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670056.outbound.protection.outlook.com [40.107.67.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 875337735B; Tue, 30 May 2017 20:03:56 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0191.CANPRD01.PROD.OUTLOOK.COM (10.165.218.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Tue, 30 May 2017 20:03:54 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.1124.016; Tue, 30 May 2017 20:03:54 +0000 From: Rick Macklem To: Konstantin Belousov , John Baldwin CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r318997 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfsclient kern sys Thread-Topic: svn commit: r318997 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/nfsclient kern sys Thread-Index: AQHS2WI0J0VJA24VSkmHe10YcdO3DKINHucAgAAtB/g= Date: Tue, 30 May 2017 20:03:54 +0000 Message-ID: References: <201705271700.v4RH0USD004310@repo.freebsd.org> <2187407.D9lHvpEUce@ralph.baldwin.cx>,<20170530171904.GL82323@kib.kiev.ua> In-Reply-To: <20170530171904.GL82323@kib.kiev.ua> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTXPR01MB0191; 7:pUiQNLL09grRRVlm0Uvf2gsJYSV7ziUEDZ+QXCmJ0JrUFz+VfaXJXD5agkeiRmX4PQXs/VsDTY+6OdkLAFHuIaZ7HuufU+wTuCm25omCxqJ7Ay4D2wPRw7tZzDRwSOvdPOn/laW3vrDWS7i8JVhyzIqX859s4OaglpKIHVKEUOz5AY1aEXbv2UxL7Z+VukHEG+LxQx8F34aRlRkxsOj4Jomo7Bal2qQDseY77YCS3/kkoiojL0g8mfNSk6swAXccffx79UMiP+OgqZe0NpWN9VmdLA8bhoavnGKVQIPKKyY80lfsxP/P4hXkZ67dzDsAjtnW2q2pYvr+wkloV6TfyA== x-ms-traffictypediagnostic: YTXPR01MB0191: x-ms-office365-filtering-correlation-id: 7028968d-252b-4588-a95b-08d4a797001d x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:YTXPR01MB0191; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123564025)(20161123558100)(20161123560025)(20161123562025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148); SRVR:YTXPR01MB0191; BCL:0; PCL:0; RULEID:; SRVR:YTXPR01MB0191; x-forefront-prvs: 032334F434 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39840400002)(39450400003)(39400400002)(39410400002)(39850400002)(24454002)(102836003)(122556002)(74482002)(38730400002)(50986999)(305945005)(54356999)(2900100001)(8676002)(478600001)(81166006)(5660300001)(74316002)(14454004)(6246003)(76176999)(77096006)(68736007)(8936002)(53936002)(229853002)(6436002)(6506006)(39060400002)(33656002)(189998001)(4326008)(2950100002)(9686003)(25786009)(86362001)(3660700001)(3280700002)(7696004)(575784001)(2906002)(55016002)(54906002); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0191; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 30 May 2017 20:03:54.8520 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0191 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 20:03:58 -0000 Konstantin Belousov wrote: >Thank you. >Indeed, the asignment should have been removed. Below is the proposed >correction. > >diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c >index 509c38b8614..44c0eae0179 100644 >--- a/sys/fs/nfsclient/nfs_clport.c >+++ b/sys/fs/nfsclient/nfs_clport.c >@@ -491,8 +491,7 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsvatt= r *nap, void > *nvaper, > * in the mounted subtree. > */ > vn_fsid(vp, vap); > - vap->va_fsid =3D np->n_vattr.na_filesid[0]; > - if (vap->va_fsid =3D=3D np->n_vattr.na_filesid[0]) > + if ((uint32_t)vap->va_fsid =3D=3D np->n_vattr.na_filesid[= 0]) > vap->va_fsid =3D hash32_buf( > np->n_vattr.na_filesid, 2 * sizeof(uint64_t), = 0); > } else Yep. Yhis revised one looks fine to me, rick From owner-svn-src-all@freebsd.org Tue May 30 21:03:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6555BEDB73; Tue, 30 May 2017 21:03:45 +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 B160879D76; Tue, 30 May 2017 21:03:45 +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 v4UL3iF8034355; Tue, 30 May 2017 21:03:44 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UL3ivh034348; Tue, 30 May 2017 21:03:44 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302103.v4UL3ivh034348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 21:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319252 - in stable/10: lib/libc/tests/iconv lib/libc/tests/nss lib/libcrypt/tests lib/libmp/tests lib/libutil/tests lib/msun/tests usr.sbin/pw/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 21:03:45 -0000 Author: asomers Date: Tue May 30 21:03:44 2017 New Revision: 319252 URL: https://svnweb.freebsd.org/changeset/base/319252 Log: MFC r315032-r315036, r315039, r315041 r315032: Increase WARNS for iconv tests ATF tests have a default WARNS of 0, unlike other usermode programs. Reviewed by: ngie Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 r315033: Increase WARNS for nss tests ATF tests have a default WARNS of 0, unlike other usermode programs. Reviewed by: ngie Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 r315034: Document that the msun tests require WARNS=0 ATF tests have a default WARNS of 0, unlike other usermode programs. This change is technically a noop, but it documents that the msun tests don't work with any warnings enabled, at least not on all architectures. Reviewed by: ngie Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 r315035: Increase WARNS for libcrypt tests ATF tests have a default WARNS of 0, unlike other usermode programs. Reviewed by: ngie, julian Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 r315036: Increase WARNS for libmp tests ATF tests have a default WARNS of 0, unlike other usermode programs. Reviewed by: ngie, julian Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 r315039: Increase WARNS for libutil tests ATF tests have a default WARNS of 0, unlike other usermode programs. Reviewed by: ngie, julian Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 r315041: Increase WARNS for pw tests ATF tests have a default WARNS of 0, unlike other usermode programs. Reviewed by: ngie, julian Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 Modified: stable/10/lib/libc/tests/iconv/Makefile stable/10/lib/libc/tests/nss/Makefile stable/10/lib/libcrypt/tests/Makefile stable/10/lib/libmp/tests/Makefile stable/10/lib/libutil/tests/Makefile stable/10/lib/msun/tests/Makefile stable/10/usr.sbin/pw/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/iconv/Makefile ============================================================================== --- stable/10/lib/libc/tests/iconv/Makefile Tue May 30 19:31:02 2017 (r319251) +++ stable/10/lib/libc/tests/iconv/Makefile Tue May 30 21:03:44 2017 (r319252) @@ -5,5 +5,6 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/lib/libc/iconv ATF_TESTS_C+= iconvctl_test +WARNS?= 2 .include Modified: stable/10/lib/libc/tests/nss/Makefile ============================================================================== --- stable/10/lib/libc/tests/nss/Makefile Tue May 30 19:31:02 2017 (r319251) +++ stable/10/lib/libc/tests/nss/Makefile Tue May 30 21:03:44 2017 (r319252) @@ -7,6 +7,7 @@ BINDIR= ${TESTSDIR} FILES+= mach +WARNS?= 1 CFLAGS+= -I${SRCTOP}/tests ATF_TESTS_C+= getaddrinfo_test Modified: stable/10/lib/libcrypt/tests/Makefile ============================================================================== --- stable/10/lib/libcrypt/tests/Makefile Tue May 30 19:31:02 2017 (r319251) +++ stable/10/lib/libcrypt/tests/Makefile Tue May 30 21:03:44 2017 (r319252) @@ -6,6 +6,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libcrypt NETBSD_ATF_TESTS_C+= crypt_test +WARNS?= 6 CFLAGS+= -I${.CURDIR:H} DPADD+= ${LIBCRYPT} LDADD+= -lcrypt Modified: stable/10/lib/libmp/tests/Makefile ============================================================================== --- stable/10/lib/libmp/tests/Makefile Tue May 30 19:31:02 2017 (r319251) +++ stable/10/lib/libmp/tests/Makefile Tue May 30 21:03:44 2017 (r319252) @@ -4,5 +4,6 @@ TAP_TESTS_C+= legacy_test DPADD+= ${LIBCRYPTO} ${LIBMP} LDADD+= -lcrypto -lmp +WARNS?= 3 .include Modified: stable/10/lib/libutil/tests/Makefile ============================================================================== --- stable/10/lib/libutil/tests/Makefile Tue May 30 19:31:02 2017 (r319251) +++ stable/10/lib/libutil/tests/Makefile Tue May 30 21:03:44 2017 (r319252) @@ -9,5 +9,6 @@ TAP_TESTS_C+= trimdomain-nodomain_test DPADD+= ${LIBUTIL} LDADD+= -lutil +WARNS?= 2 .include Modified: stable/10/lib/msun/tests/Makefile ============================================================================== --- stable/10/lib/msun/tests/Makefile Tue May 30 19:31:02 2017 (r319251) +++ stable/10/lib/msun/tests/Makefile Tue May 30 21:03:44 2017 (r319252) @@ -2,6 +2,8 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libm +WARNS?= 0 + # All architectures on FreeBSD have fenv.h CFLAGS+= -DHAVE_FENV_H # For isqemu.h Modified: stable/10/usr.sbin/pw/tests/Makefile ============================================================================== --- stable/10/usr.sbin/pw/tests/Makefile Tue May 30 19:31:02 2017 (r319251) +++ stable/10/usr.sbin/pw/tests/Makefile Tue May 30 21:03:44 2017 (r319252) @@ -4,6 +4,7 @@ BINDIR= ${TESTSDIR} PROGS+= crypt LDADD+= -lcrypt +WARNS?= 6 ATF_TESTS_SH= pw_etcdir_test \ pw_lock_test \ From owner-svn-src-all@freebsd.org Tue May 30 21:20:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAEEBBEE5F2; Tue, 30 May 2017 21:20:55 +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 99ABD7AC99; Tue, 30 May 2017 21:20:55 +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 v4ULKsek039194; Tue, 30 May 2017 21:20:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ULKslG039193; Tue, 30 May 2017 21:20:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705302120.v4ULKslG039193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 30 May 2017 21:20:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319253 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 21:20:55 -0000 Author: kib Date: Tue May 30 21:20:54 2017 New Revision: 319253 URL: https://svnweb.freebsd.org/changeset/base/319253 Log: Fix bug in r318997: remove the line which overrides vn_fsid() calculation. Noted by: jhb Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Tue May 30 21:03:44 2017 (r319252) +++ head/sys/fs/nfsclient/nfs_clport.c Tue May 30 21:20:54 2017 (r319253) @@ -491,8 +491,7 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsvatt * in the mounted subtree. */ vn_fsid(vp, vap); - vap->va_fsid = np->n_vattr.na_filesid[0]; - if (vap->va_fsid == np->n_vattr.na_filesid[0]) + if ((uint32_t)vap->va_fsid == np->n_vattr.na_filesid[0]) vap->va_fsid = hash32_buf( np->n_vattr.na_filesid, 2 * sizeof(uint64_t), 0); } else From owner-svn-src-all@freebsd.org Tue May 30 21:55:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDFC9BEEFD1; Tue, 30 May 2017 21:55:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7DCA7BFA4; Tue, 30 May 2017 21:55:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ULtrQq055289; Tue, 30 May 2017 21:55:53 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ULtm8u055281; Tue, 30 May 2017 21:55:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705302155.v4ULtm8u055281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 30 May 2017 21:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319254 - stable/11/contrib/ofed/libcxgb4/src X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 21:55:54 -0000 Author: np Date: Tue May 30 21:55:48 2017 New Revision: 319254 URL: https://svnweb.freebsd.org/changeset/base/319254 Log: MFC r314176 and r318973. r314176: Add support for RDMA from userspace with T6 cards. r318973: libcxgb4: Use memcpy instead of copying WRs 8B at a time in the userspace RDMA library for cxgbe(4). Sponsored by: Chelsio Communications Modified: stable/11/contrib/ofed/libcxgb4/src/dev.c stable/11/contrib/ofed/libcxgb4/src/qp.c stable/11/contrib/ofed/libcxgb4/src/t4.h stable/11/contrib/ofed/libcxgb4/src/t4_chip_type.h stable/11/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h stable/11/contrib/ofed/libcxgb4/src/t4_regs.h stable/11/contrib/ofed/libcxgb4/src/verbs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ofed/libcxgb4/src/dev.c ============================================================================== --- stable/11/contrib/ofed/libcxgb4/src/dev.c Tue May 30 21:20:54 2017 (r319253) +++ stable/11/contrib/ofed/libcxgb4/src/dev.c Tue May 30 21:55:48 2017 (r319254) @@ -145,10 +145,10 @@ static struct ibv_context *c4iw_alloc_context(struct i context->ibv_ctx.ops = c4iw_ctx_ops; switch (rhp->chip_version) { + case CHELSIO_T6: case CHELSIO_T5: - PDBG("%s T5/T4 device\n", __FUNCTION__); case CHELSIO_T4: - PDBG("%s T4 device\n", __FUNCTION__); + PDBG("%s T%d device\n", __FUNCTION__, rhp->chip_version); context->ibv_ctx.ops.async_event = c4iw_async_event; context->ibv_ctx.ops.post_send = c4iw_post_send; context->ibv_ctx.ops.post_recv = c4iw_post_receive; @@ -390,29 +390,26 @@ static struct ibv_device *cxgb4_driver_init(const char int abi_version) { char devstr[IBV_SYSFS_PATH_MAX], ibdev[16], value[128], *cp; - char t5nexstr[IBV_SYSFS_PATH_MAX]; + char dev_str[IBV_SYSFS_PATH_MAX]; struct c4iw_dev *dev; unsigned vendor, device, fw_maj, fw_min; int i; - char devnum=0; + char devnum; char ib_param[16]; #ifndef __linux__ if (ibv_read_sysfs_file(uverbs_sys_path, "ibdev", ibdev, sizeof ibdev) < 0) return NULL; - /* - * Extract the non-numeric part of ibdev - * say "t5nex0" -> devname=="t5nex", devnum=0 - */ - if (strstr(ibdev,"t5nex")) { - devnum = atoi(ibdev+strlen("t5nex")); - sprintf(t5nexstr, "/dev/t5nex/%d", devnum); + + if (ibdev[0] == 't' && ibdev[1] >= '4' && ibdev[1] <= '6' && + strstr(&ibdev[2], "nex") && (devnum = atoi(&ibdev[5])) >= 0) { + snprintf(dev_str, sizeof(dev_str), "/dev/t%cnex/%d", ibdev[1], + devnum); } else return NULL; - if (ibv_read_sysfs_file(t5nexstr, "\%pnpinfo", - value, sizeof value) < 0) + if (ibv_read_sysfs_file(dev_str, "\%pnpinfo", value, sizeof value) < 0) return NULL; else { if (strstr(value,"vendor=")) { @@ -449,7 +446,7 @@ found: #ifndef __linux__ - if (ibv_read_sysfs_file(t5nexstr, "firmware_version", + if (ibv_read_sysfs_file(dev_str, "firmware_version", value, sizeof value) < 0) return NULL; #else Modified: stable/11/contrib/ofed/libcxgb4/src/qp.c ============================================================================== --- stable/11/contrib/ofed/libcxgb4/src/qp.c Tue May 30 21:20:54 2017 (r319253) +++ stable/11/contrib/ofed/libcxgb4/src/qp.c Tue May 30 21:55:48 2017 (r319254) @@ -47,39 +47,49 @@ struct c4iw_stats c4iw_stats; static void copy_wr_to_sq(struct t4_wq *wq, union t4_wr *wqe, u8 len16) { - u64 *src, *dst; + void *src, *dst; + uintptr_t end; + int total, len; - src = (u64 *)wqe; - dst = (u64 *)((u8 *)wq->sq.queue + wq->sq.wq_pidx * T4_EQ_ENTRY_SIZE); + src = &wqe->flits[0]; + dst = &wq->sq.queue->flits[wq->sq.wq_pidx * + (T4_EQ_ENTRY_SIZE / sizeof(__be64))]; if (t4_sq_onchip(wq)) { len16 = align(len16, 4); wc_wmb(); } - while (len16) { - *dst++ = *src++; - if (dst == (u64 *)&wq->sq.queue[wq->sq.size]) - dst = (u64 *)wq->sq.queue; - *dst++ = *src++; - if (dst == (u64 *)&wq->sq.queue[wq->sq.size]) - dst = (u64 *)wq->sq.queue; - len16--; + + total = len16 * 16; + end = (uintptr_t)&wq->sq.queue[wq->sq.size]; + if (__predict_true((uintptr_t)dst + total <= end)) { + /* Won't wrap around. */ + memcpy(dst, src, total); + } else { + len = end - (uintptr_t)dst; + memcpy(dst, src, len); + memcpy(wq->sq.queue, src + len, total - len); } } static void copy_wr_to_rq(struct t4_wq *wq, union t4_recv_wr *wqe, u8 len16) { - u64 *src, *dst; + void *src, *dst; + uintptr_t end; + int total, len; - src = (u64 *)wqe; - dst = (u64 *)((u8 *)wq->rq.queue + wq->rq.wq_pidx * T4_EQ_ENTRY_SIZE); - while (len16) { - *dst++ = *src++; - if (dst >= (u64 *)&wq->rq.queue[wq->rq.size]) - dst = (u64 *)wq->rq.queue; - *dst++ = *src++; - if (dst >= (u64 *)&wq->rq.queue[wq->rq.size]) - dst = (u64 *)wq->rq.queue; - len16--; + src = &wqe->flits[0]; + dst = &wq->rq.queue->flits[wq->rq.wq_pidx * + (T4_EQ_ENTRY_SIZE / sizeof(__be64))]; + + total = len16 * 16; + end = (uintptr_t)&wq->rq.queue[wq->rq.size]; + if (__predict_true((uintptr_t)dst + total <= end)) { + /* Won't wrap around. */ + memcpy(dst, src, total); + } else { + len = end - (uintptr_t)dst; + memcpy(dst, src, len); + memcpy(wq->rq.queue, src + len, total - len); } } @@ -393,7 +403,7 @@ int c4iw_post_send(struct ibv_qp *ibqp, struct ibv_sen idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); } - t4_ring_sq_db(&qhp->wq, idx, dev_is_t5(qhp->rhp), + t4_ring_sq_db(&qhp->wq, idx, dev_is_t4(qhp->rhp), len16, wqe); qhp->wq.sq.queue[qhp->wq.sq.size].status.host_wq_pidx = \ (qhp->wq.sq.wq_pidx); @@ -457,7 +467,7 @@ int c4iw_post_receive(struct ibv_qp *ibqp, struct ibv_ num_wrs--; } - t4_ring_rq_db(&qhp->wq, idx, dev_is_t5(qhp->rhp), + t4_ring_rq_db(&qhp->wq, idx, dev_is_t4(qhp->rhp), len16, wqe); qhp->wq.rq.queue[qhp->wq.rq.size].status.host_wq_pidx = \ (qhp->wq.rq.wq_pidx); Modified: stable/11/contrib/ofed/libcxgb4/src/t4.h ============================================================================== --- stable/11/contrib/ofed/libcxgb4/src/t4.h Tue May 30 21:20:54 2017 (r319253) +++ stable/11/contrib/ofed/libcxgb4/src/t4.h Tue May 30 21:55:48 2017 (r319254) @@ -484,11 +484,11 @@ static void copy_wqe_to_udb(volatile u32 *udb_offset, extern int ma_wr; extern int t5_en_wc; -static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16, +static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, u8 t4, u8 len16, union t4_wr *wqe) { wc_wmb(); - if (t5) { + if (!t4) { if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) { PDBG("%s: WC wq->sq.pidx = %d; len16=%d\n", __func__, wq->sq.pidx, len16); @@ -517,11 +517,11 @@ static inline void t4_ring_sq_db(struct t4_wq *wq, u16 writel(V_QID(wq->sq.qid & wq->qid_mask) | V_PIDX(inc), wq->sq.udb); } -static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16, +static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, u8 t4, u8 len16, union t4_recv_wr *wqe) { wc_wmb(); - if (t5) { + if (!t4) { if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) { PDBG("%s: WC wq->rq.pidx = %d; len16=%d\n", __func__, wq->rq.pidx, len16); Modified: stable/11/contrib/ofed/libcxgb4/src/t4_chip_type.h ============================================================================== --- stable/11/contrib/ofed/libcxgb4/src/t4_chip_type.h Tue May 30 21:20:54 2017 (r319253) +++ stable/11/contrib/ofed/libcxgb4/src/t4_chip_type.h Tue May 30 21:55:48 2017 (r319254) @@ -1,7 +1,7 @@ /* - * This file is part of the Chelsio T4 Ethernet driver. + * This file is part of the Chelsio T4/T5/T6 Ethernet driver. * - * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. + * Copyright (C) 2003-2016 Chelsio Communications. All rights reserved. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -30,6 +30,8 @@ #define CHELSIO_T4_FPGA 0xa #define CHELSIO_T5 0x5 #define CHELSIO_T5_FPGA 0xb +#define CHELSIO_T6 0x6 +#define CHELSIO_T6_FPGA 0xc /* * Translate a PCI Device ID to a base Chelsio Chip Version -- CHELSIO_T4, @@ -43,12 +45,26 @@ * Finally: This will of course need to be expanded as future chips are * developed. */ -#define CHELSIO_PCI_ID_CHIP_VERSION(__DeviceID) \ - (CHELSIO_PCI_ID_VER(__DeviceID) == CHELSIO_T4 || \ - CHELSIO_PCI_ID_VER(__DeviceID) == CHELSIO_T4_FPGA \ - ? CHELSIO_T4 \ - : CHELSIO_T5) +static inline unsigned int +CHELSIO_PCI_ID_CHIP_VERSION(unsigned int DeviceID) +{ + switch (CHELSIO_PCI_ID_VER(DeviceID)) { + case CHELSIO_T4: + case CHELSIO_T4_FPGA: + return CHELSIO_T4; + case CHELSIO_T5: + case CHELSIO_T5_FPGA: + return CHELSIO_T5; + + case CHELSIO_T6: + case CHELSIO_T6_FPGA: + return CHELSIO_T6; + } + + return 0; +} + /* * Internally we code the Chelsio T4 Family "Chip Code" as a tuple: * @@ -72,9 +88,13 @@ enum chip_type { T4_LAST_REV = T4_A2, T5_A0 = CHELSIO_CHIP_CODE(CHELSIO_T5, 0), - T5_A1 = CHELSIO_CHIP_CODE(CHELSIO_T5, 0), + T5_A1 = CHELSIO_CHIP_CODE(CHELSIO_T5, 1), T5_FIRST_REV = T5_A0, T5_LAST_REV = T5_A1, + + T6_A0 = CHELSIO_CHIP_CODE(CHELSIO_T6, 0), + T6_FIRST_REV = T6_A0, + T6_LAST_REV = T6_A0, }; static inline int is_t4(enum chip_type chip) @@ -86,6 +106,11 @@ static inline int is_t5(enum chip_type chip) { return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T5); +} + +static inline int is_t6(enum chip_type chip) +{ + return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T6); } static inline int is_fpga(enum chip_type chip) Modified: stable/11/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h ============================================================================== --- stable/11/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h Tue May 30 21:20:54 2017 (r319253) +++ stable/11/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h Tue May 30 21:55:48 2017 (r319254) @@ -1,7 +1,7 @@ /* - * This file is part of the Chelsio T4 Ethernet driver. + * This file is part of the Chelsio T4/T5/T6 Ethernet driver. * - * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. + * Copyright (C) 2003-2017 Chelsio Communications. All rights reserved. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -44,7 +44,6 @@ * -- If defined, indicates that the OS Driver has support for Bypass * -- Adapters. */ -#ifdef CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN /* * Some sanity checks ... @@ -96,10 +95,13 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_ENTRY(0xa000), /* PE10K FPGA */ CH_PCI_ID_TABLE_ENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */ CH_PCI_ID_TABLE_ENTRY(0xb001), /* PF0 T5 PE10K FPGA */ + CH_PCI_ID_TABLE_ENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */ #else CH_PCI_ID_TABLE_FENTRY(0xa000), /* PE10K FPGA */ CH_PCI_ID_TABLE_FENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */ CH_PCI_ID_TABLE_FENTRY(0xb001), /* PF0 T5 PE10K FPGA */ + CH_PCI_ID_TABLE_FENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */ + CH_PCI_ID_TABLE_FENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */ #endif /* @@ -108,6 +110,7 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN #if ((CH_PCI_DEVICE_ID_FUNCTION == 5) || (CH_PCI_DEVICE_ID_FUNCTION == 6)) CH_PCI_ID_TABLE_ENTRY(0xa001), /* PF1 PE10K FPGA FCOE */ CH_PCI_ID_TABLE_ENTRY(0xa002), /* PE10K FPGA iSCSI */ + CH_PCI_ID_TABLE_ENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */ #endif /* @@ -166,10 +169,50 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_FENTRY(0x5013), /* T580-chr */ CH_PCI_ID_TABLE_FENTRY(0x5014), /* T580-so */ CH_PCI_ID_TABLE_FENTRY(0x5015), /* T502-bt */ + CH_PCI_ID_TABLE_FENTRY(0x5016), /* T580-OCP-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5017), /* T520-OCP-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5018), /* T540-BT */ CH_PCI_ID_TABLE_FENTRY(0x5080), /* Custom T540-cr */ CH_PCI_ID_TABLE_FENTRY(0x5081), /* Custom T540-LL-cr */ -CH_PCI_DEVICE_ID_TABLE_DEFINE_END; + CH_PCI_ID_TABLE_FENTRY(0x5082), /* Custom T504-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5083), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5084), /* Custom T580-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5085), /* Custom 3x T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5086), /* Custom 2x T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5087), /* Custom T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5088), /* Custom T570-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5089), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5091), /* Custom T522-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5092), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5093), /* Custom SECA */ + CH_PCI_ID_TABLE_FENTRY(0x5094), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5095), /* Custom T540-CR-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5096), /* Custom T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5097), /* Custom T520-KR */ + CH_PCI_ID_TABLE_FENTRY(0x5098), /* Custom 2x40G QSFP */ + CH_PCI_ID_TABLE_FENTRY(0x5099), /* Custom 2x40G QSFP */ + CH_PCI_ID_TABLE_FENTRY(0x509A), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x509B), /* Custom T540-CR LOM */ + CH_PCI_ID_TABLE_FENTRY(0x509c), /* Custom T520-CR SFP+ LOM */ + CH_PCI_ID_TABLE_FENTRY(0x509d), /* Custom T540-CR SFP+ */ -#endif /* CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN */ + /* T6 adapter */ + CH_PCI_ID_TABLE_FENTRY(0x6000), + CH_PCI_ID_TABLE_FENTRY(0x6001), + CH_PCI_ID_TABLE_FENTRY(0x6002), + CH_PCI_ID_TABLE_FENTRY(0x6003), + CH_PCI_ID_TABLE_FENTRY(0x6004), + CH_PCI_ID_TABLE_FENTRY(0x6005), + CH_PCI_ID_TABLE_FENTRY(0x6006), + CH_PCI_ID_TABLE_FENTRY(0x6007), + CH_PCI_ID_TABLE_FENTRY(0x6008), + CH_PCI_ID_TABLE_FENTRY(0x6009), + CH_PCI_ID_TABLE_FENTRY(0x600d), + CH_PCI_ID_TABLE_FENTRY(0x6010), + CH_PCI_ID_TABLE_FENTRY(0x6011), + CH_PCI_ID_TABLE_FENTRY(0x6014), + CH_PCI_ID_TABLE_FENTRY(0x6015), +CH_PCI_DEVICE_ID_TABLE_DEFINE_END; #endif /* __T4_PCI_ID_TBL_H__ */ Modified: stable/11/contrib/ofed/libcxgb4/src/t4_regs.h ============================================================================== --- stable/11/contrib/ofed/libcxgb4/src/t4_regs.h Tue May 30 21:20:54 2017 (r319253) +++ stable/11/contrib/ofed/libcxgb4/src/t4_regs.h Tue May 30 21:55:48 2017 (r319254) @@ -1,4 +1,8 @@ /* This file is automatically generated --- changes will be lost */ +/* Generation Date : Fri Oct 28 19:22:40 IST 2016 */ +/* Directory name: t4_reg.txt, Changeset: */ +/* Directory name: t5_reg.txt, Changeset: 6938:9111c5bdce6e */ +/* Directory name: t6_reg.txt, Changeset: 4252:437fb8972e44 */ #define MYPF_BASE 0x1b000 #define MYPF_REG(reg_addr) (MYPF_BASE + (reg_addr)) @@ -339,9 +343,141 @@ #define EDC_H_ECC_ERR_DATA_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) #define NUM_EDC_H_ECC_ERR_DATA_INSTANCES 16 +#define SGE_DEBUG1_DBP_THREAD(idx) (A_SGE_DEBUG1_DBP_THREAD + (idx) * 4) +#define NUM_SGE_DEBUG1_DBP_THREAD_INSTANCES 4 + +#define SGE_DEBUG0_DBP_THREAD(idx) (A_SGE_DEBUG0_DBP_THREAD + (idx) * 4) +#define NUM_SGE_DEBUG0_DBP_THREAD_INSTANCES 5 + +#define SGE_WC_EGRS_BAR2_OFF_PF(idx) (A_SGE_WC_EGRS_BAR2_OFF_PF + (idx) * 4) +#define NUM_SGE_WC_EGRS_BAR2_OFF_PF_INSTANCES 8 + +#define SGE_WC_EGRS_BAR2_OFF_VF(idx) (A_SGE_WC_EGRS_BAR2_OFF_VF + (idx) * 4) +#define NUM_SGE_WC_EGRS_BAR2_OFF_VF_INSTANCES 8 + +#define PCIE_T6_DMA_REG(reg_addr, idx) ((reg_addr) + (idx) * 16) +#define NUM_PCIE_T6_DMA_INSTANCES 2 + +#define PCIE_T6_CMD_REG(reg_addr, idx) ((reg_addr) + (idx) * 16) +#define NUM_PCIE_T6_CMD_INSTANCES 1 + +#define PCIE_VF_256_INT_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_PCIE_VF_256_INT_INSTANCES 128 + +#define MPS_CLS_REQUEST_TRACE_MAC_DA_L(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_DA_L + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_DA_L_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_DA_H(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_DA_H + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_DA_H_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_SA_L(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_SA_L + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_SA_L_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_SA_H(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_SA_H + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_SA_H_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_PORT_VLAN(idx) (A_MPS_CLS_REQUEST_TRACE_PORT_VLAN + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_PORT_VLAN_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_ENCAP(idx) (A_MPS_CLS_REQUEST_TRACE_ENCAP + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_ENCAP_INSTANCES 8 + +#define MPS_CLS_RESULT_TRACE(idx) (A_MPS_CLS_RESULT_TRACE + (idx) * 4) +#define NUM_MPS_CLS_RESULT_TRACE_INSTANCES 8 + +#define MPS_CLS_DIPIPV4_ID_TABLE(idx) (A_MPS_CLS_DIPIPV4_ID_TABLE + (idx) * 8) +#define NUM_MPS_CLS_DIPIPV4_ID_TABLE_INSTANCES 4 + +#define MPS_CLS_DIPIPV4_MASK_TABLE(idx) (A_MPS_CLS_DIPIPV4_MASK_TABLE + (idx) * 8) +#define NUM_MPS_CLS_DIPIPV4_MASK_TABLE_INSTANCES 4 + +#define MPS_CLS_DIPIPV6ID_0_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_0_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_0_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_1_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_1_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_1_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_2_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_2_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_2_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_3_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_3_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_3_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_0_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_0_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_0_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_1_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_1_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_1_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_2_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_2_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_2_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_3_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_3_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_3_TABLE_INSTANCES 2 + +#define MPS_RX_HASH_LKP_TABLE(idx) (A_MPS_RX_HASH_LKP_TABLE + (idx) * 4) +#define NUM_MPS_RX_HASH_LKP_TABLE_INSTANCES 4 + +#define LE_DB_DBG_MATCH_DATA_MASK(idx) (A_LE_DB_DBG_MATCH_DATA_MASK + (idx) * 4) +#define NUM_LE_DB_DBG_MATCH_DATA_MASK_INSTANCES 8 + +#define LE_DB_DBG_MATCH_DATA(idx) (A_LE_DB_DBG_MATCH_DATA + (idx) * 4) +#define NUM_LE_DB_DBG_MATCH_DATA_INSTANCES 8 + +#define LE_DB_DBGI_REQ_DATA_T6(idx) (A_LE_DB_DBGI_REQ_DATA + (idx) * 4) +#define NUM_LE_DB_DBGI_REQ_DATA_T6_INSTANCES 11 + +#define LE_DB_DBGI_REQ_MASK_T6(idx) (A_LE_DB_DBGI_REQ_MASK + (idx) * 4) +#define NUM_LE_DB_DBGI_REQ_MASK_T6_INSTANCES 11 + +#define LE_DB_DBGI_RSP_DATA_T6(idx) (A_LE_DB_DBGI_RSP_DATA + (idx) * 4) +#define NUM_LE_DB_DBGI_RSP_DATA_T6_INSTANCES 11 + +#define LE_DB_ACTIVE_MASK_IPV6_T6(idx) (A_LE_DB_ACTIVE_MASK_IPV6 + (idx) * 4) +#define NUM_LE_DB_ACTIVE_MASK_IPV6_T6_INSTANCES 8 + +#define LE_HASH_MASK_GEN_IPV4T6(idx) (A_LE_HASH_MASK_GEN_IPV4T5 + (idx) * 4) +#define NUM_LE_HASH_MASK_GEN_IPV4T6_INSTANCES 8 + +#define T6_LE_HASH_MASK_GEN_IPV6T5(idx) (A_T6_LE_HASH_MASK_GEN_IPV6T5 + (idx) * 4) +#define NUM_T6_LE_HASH_MASK_GEN_IPV6T5_INSTANCES 8 + +#define LE_DB_PSV_FILTER_MASK_TUP_IPV4(idx) (A_LE_DB_PSV_FILTER_MASK_TUP_IPV4 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_TUP_IPV4_INSTANCES 3 + +#define LE_DB_PSV_FILTER_MASK_FLT_IPV4(idx) (A_LE_DB_PSV_FILTER_MASK_FLT_IPV4 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_FLT_IPV4_INSTANCES 2 + +#define LE_DB_PSV_FILTER_MASK_TUP_IPV6(idx) (A_LE_DB_PSV_FILTER_MASK_TUP_IPV6 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_TUP_IPV6_INSTANCES 9 + +#define LE_DB_PSV_FILTER_MASK_FLT_IPV6(idx) (A_LE_DB_PSV_FILTER_MASK_FLT_IPV6 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_FLT_IPV6_INSTANCES 2 + +#define LE_DB_SECOND_GEN_HASH_MASK_IPV4_T6(idx) (A_LE_DB_SECOND_GEN_HASH_MASK_IPV4 + (idx) * 4) +#define NUM_LE_DB_SECOND_GEN_HASH_MASK_IPV4_T6_INSTANCES 8 + +#define MC_DDRPHY_DP18_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 512) +#define NUM_MC_DDRPHY_DP18_T6_INSTANCES 9 + +#define MC_CE_ERR_DATA_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_MC_CE_ERR_DATA_T6_INSTANCES 16 + +#define MC_UE_ERR_DATA_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_MC_UE_ERR_DATA_T6_INSTANCES 16 + +#define CIM_CTL_MAILBOX_VF_STATUS_T6(idx) (A_CIM_CTL_MAILBOX_VF_STATUS + (idx) * 4) +#define NUM_CIM_CTL_MAILBOX_VF_STATUS_T6_INSTANCES 8 + +#define CIM_CTL_MAILBOX_VFN_CTL_T6(idx) (A_CIM_CTL_MAILBOX_VFN_CTL + (idx) * 4) +#define NUM_CIM_CTL_MAILBOX_VFN_CTL_T6_INSTANCES 256 + #define EDC_STRIDE (EDC_1_BASE_ADDR - EDC_0_BASE_ADDR) #define EDC_REG(reg, idx) (reg + EDC_STRIDE * idx) +#define EDC_T5_STRIDE (EDC_T51_BASE_ADDR - EDC_T50_BASE_ADDR) +#define EDC_T5_REG(reg, idx) (reg + EDC_T5_STRIDE * idx) + /* registers for module SGE */ #define SGE_BASE_ADDR 0x1000 @@ -372,6 +508,10 @@ #define V_PIDX_T5(x) ((x) << S_PIDX_T5) #define G_PIDX_T5(x) (((x) >> S_PIDX_T5) & M_PIDX_T5) +#define S_SYNC_T6 14 +#define V_SYNC_T6(x) ((x) << S_SYNC_T6) +#define F_SYNC_T6 V_SYNC_T6(1U) + #define A_SGE_PF_GTS 0x4 #define S_INGRESSQID 16 @@ -764,6 +904,14 @@ #define V_PERR_PC_CHPI_RSP2(x) ((x) << S_PERR_PC_CHPI_RSP2) #define F_PERR_PC_CHPI_RSP2 V_PERR_PC_CHPI_RSP2(1U) +#define S_PERR_PC_RSP 23 +#define V_PERR_PC_RSP(x) ((x) << S_PERR_PC_RSP) +#define F_PERR_PC_RSP V_PERR_PC_RSP(1U) + +#define S_PERR_PC_REQ 22 +#define V_PERR_PC_REQ(x) ((x) << S_PERR_PC_REQ) +#define F_PERR_PC_REQ V_PERR_PC_REQ(1U) + #define A_SGE_INT_ENABLE1 0x1028 #define A_SGE_PERR_ENABLE1 0x102c #define A_SGE_INT_CAUSE2 0x1030 @@ -908,6 +1056,26 @@ #define V_PERR_PC_DBP2(x) ((x) << S_PERR_PC_DBP2) #define F_PERR_PC_DBP2 V_PERR_PC_DBP2(1U) +#define S_DEQ_LL_PERR 21 +#define V_DEQ_LL_PERR(x) ((x) << S_DEQ_LL_PERR) +#define F_DEQ_LL_PERR V_DEQ_LL_PERR(1U) + +#define S_ENQ_PERR 20 +#define V_ENQ_PERR(x) ((x) << S_ENQ_PERR) +#define F_ENQ_PERR V_ENQ_PERR(1U) + +#define S_DEQ_OUT_PERR 19 +#define V_DEQ_OUT_PERR(x) ((x) << S_DEQ_OUT_PERR) +#define F_DEQ_OUT_PERR V_DEQ_OUT_PERR(1U) + +#define S_BUF_PERR 18 +#define V_BUF_PERR(x) ((x) << S_BUF_PERR) +#define F_BUF_PERR V_BUF_PERR(1U) + +#define S_PERR_DB_FIFO 3 +#define V_PERR_DB_FIFO(x) ((x) << S_PERR_DB_FIFO) +#define F_PERR_DB_FIFO V_PERR_DB_FIFO(1U) + #define A_SGE_INT_ENABLE2 0x1034 #define A_SGE_PERR_ENABLE2 0x1038 #define A_SGE_INT_CAUSE3 0x103c @@ -1040,6 +1208,14 @@ #define V_ERR_INV_CTXT0(x) ((x) << S_ERR_INV_CTXT0) #define F_ERR_INV_CTXT0 V_ERR_INV_CTXT0(1U) +#define S_DBP_TBUF_FULL 8 +#define V_DBP_TBUF_FULL(x) ((x) << S_DBP_TBUF_FULL) +#define F_DBP_TBUF_FULL V_DBP_TBUF_FULL(1U) + +#define S_FATAL_WRE_LEN 7 +#define V_FATAL_WRE_LEN(x) ((x) << S_FATAL_WRE_LEN) +#define F_FATAL_WRE_LEN V_FATAL_WRE_LEN(1U) + #define A_SGE_INT_ENABLE3 0x1040 #define A_SGE_FL_BUFFER_SIZE0 0x1044 @@ -1048,21 +1224,116 @@ #define V_SIZE(x) ((x) << S_SIZE) #define G_SIZE(x) (((x) >> S_SIZE) & M_SIZE) +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE1 0x1048 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE2 0x104c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE3 0x1050 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE4 0x1054 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE5 0x1058 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE6 0x105c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE7 0x1060 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE8 0x1064 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE9 0x1068 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE10 0x106c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE11 0x1070 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE12 0x1074 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE13 0x1078 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE14 0x107c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE15 0x1080 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_DBQ_CTXT_BADDR 0x1084 #define S_BASEADDR 3 @@ -1117,6 +1388,15 @@ #define V_CREDITCNTPACKING(x) ((x) << S_CREDITCNTPACKING) #define G_CREDITCNTPACKING(x) (((x) >> S_CREDITCNTPACKING) & M_CREDITCNTPACKING) +#define S_NULLPTR 20 +#define M_NULLPTR 0xfU +#define V_NULLPTR(x) ((x) << S_NULLPTR) +#define G_NULLPTR(x) (((x) >> S_NULLPTR) & M_NULLPTR) + +#define S_NULLPTREN 19 +#define V_NULLPTREN(x) ((x) << S_NULLPTREN) +#define F_NULLPTREN V_NULLPTREN(1U) + #define A_SGE_CONM_CTRL 0x1094 #define S_EGRTHRESHOLD 8 @@ -1142,6 +1422,16 @@ #define V_EGRTHRESHOLDPACKING(x) ((x) << S_EGRTHRESHOLDPACKING) #define G_EGRTHRESHOLDPACKING(x) (((x) >> S_EGRTHRESHOLDPACKING) & M_EGRTHRESHOLDPACKING) +#define S_T6_EGRTHRESHOLDPACKING 16 +#define M_T6_EGRTHRESHOLDPACKING 0xffU +#define V_T6_EGRTHRESHOLDPACKING(x) ((x) << S_T6_EGRTHRESHOLDPACKING) +#define G_T6_EGRTHRESHOLDPACKING(x) (((x) >> S_T6_EGRTHRESHOLDPACKING) & M_T6_EGRTHRESHOLDPACKING) + +#define S_T6_EGRTHRESHOLD 8 +#define M_T6_EGRTHRESHOLD 0xffU +#define V_T6_EGRTHRESHOLD(x) ((x) << S_T6_EGRTHRESHOLD) +#define G_T6_EGRTHRESHOLD(x) (((x) >> S_T6_EGRTHRESHOLD) & M_T6_EGRTHRESHOLD) + #define A_SGE_TIMESTAMP_LO 0x1098 #define A_SGE_TIMESTAMP_HI 0x109c @@ -1217,6 +1507,21 @@ #define V_LP_COUNT_T5(x) ((x) << S_LP_COUNT_T5) #define G_LP_COUNT_T5(x) (((x) >> S_LP_COUNT_T5) & M_LP_COUNT_T5) +#define S_VFIFO_CNT 15 +#define M_VFIFO_CNT 0x1ffffU +#define V_VFIFO_CNT(x) ((x) << S_VFIFO_CNT) +#define G_VFIFO_CNT(x) (((x) >> S_VFIFO_CNT) & M_VFIFO_CNT) + +#define S_COAL_CTL_FIFO_CNT 8 +#define M_COAL_CTL_FIFO_CNT 0x3fU +#define V_COAL_CTL_FIFO_CNT(x) ((x) << S_COAL_CTL_FIFO_CNT) +#define G_COAL_CTL_FIFO_CNT(x) (((x) >> S_COAL_CTL_FIFO_CNT) & M_COAL_CTL_FIFO_CNT) + +#define S_MERGE_FIFO_CNT 0 +#define M_MERGE_FIFO_CNT 0x3fU +#define V_MERGE_FIFO_CNT(x) ((x) << S_MERGE_FIFO_CNT) +#define G_MERGE_FIFO_CNT(x) (((x) >> S_MERGE_FIFO_CNT) & M_MERGE_FIFO_CNT) + #define A_SGE_DOORBELL_CONTROL 0x10a8 #define S_HINTDEPTHCTL 27 @@ -1286,6 +1591,32 @@ #define V_DROPPED_DB(x) ((x) << S_DROPPED_DB) #define F_DROPPED_DB V_DROPPED_DB(1U) +#define S_T6_DROP_TIMEOUT 7 +#define M_T6_DROP_TIMEOUT 0x3fU +#define V_T6_DROP_TIMEOUT(x) ((x) << S_T6_DROP_TIMEOUT) +#define G_T6_DROP_TIMEOUT(x) (((x) >> S_T6_DROP_TIMEOUT) & M_T6_DROP_TIMEOUT) + +#define S_INVONDBSYNC 6 +#define V_INVONDBSYNC(x) ((x) << S_INVONDBSYNC) +#define F_INVONDBSYNC V_INVONDBSYNC(1U) + +#define S_INVONGTSSYNC 5 +#define V_INVONGTSSYNC(x) ((x) << S_INVONGTSSYNC) +#define F_INVONGTSSYNC V_INVONGTSSYNC(1U) + +#define S_DB_DBG_EN 4 +#define V_DB_DBG_EN(x) ((x) << S_DB_DBG_EN) +#define F_DB_DBG_EN V_DB_DBG_EN(1U) + +#define S_GTS_DBG_TIMER_REG 1 +#define M_GTS_DBG_TIMER_REG 0x7U +#define V_GTS_DBG_TIMER_REG(x) ((x) << S_GTS_DBG_TIMER_REG) +#define G_GTS_DBG_TIMER_REG(x) (((x) >> S_GTS_DBG_TIMER_REG) & M_GTS_DBG_TIMER_REG) + +#define S_GTS_DBG_EN 0 +#define V_GTS_DBG_EN(x) ((x) << S_GTS_DBG_EN) +#define F_GTS_DBG_EN V_GTS_DBG_EN(1U) + #define A_SGE_DROPPED_DOORBELL 0x10ac #define A_SGE_DOORBELL_THROTTLE_CONTROL 0x10b0 @@ -1331,6 +1662,11 @@ #define V_LL_READ_WAIT_DISABLE(x) ((x) << S_LL_READ_WAIT_DISABLE) #define F_LL_READ_WAIT_DISABLE V_LL_READ_WAIT_DISABLE(1U) +#define S_TSCALE 28 +#define M_TSCALE 0xfU +#define V_TSCALE(x) ((x) << S_TSCALE) +#define G_TSCALE(x) (((x) >> S_TSCALE) & M_TSCALE) + #define A_SGE_TIMER_VALUE_0_AND_1 0x10b8 #define S_TIMERVALUE0 16 @@ -1397,6 +1733,39 @@ #define V_MAXRSPCNT1(x) ((x) << S_MAXRSPCNT1) #define G_MAXRSPCNT1(x) (((x) >> S_MAXRSPCNT1) & M_MAXRSPCNT1) +#define A_SGE_GK_CONTROL 0x10c4 + +#define S_EN_FLM_FIFTH 29 +#define V_EN_FLM_FIFTH(x) ((x) << S_EN_FLM_FIFTH) +#define F_EN_FLM_FIFTH V_EN_FLM_FIFTH(1U) + +#define S_FL_PROG_THRESH 20 +#define M_FL_PROG_THRESH 0x1ffU +#define V_FL_PROG_THRESH(x) ((x) << S_FL_PROG_THRESH) +#define G_FL_PROG_THRESH(x) (((x) >> S_FL_PROG_THRESH) & M_FL_PROG_THRESH) + +#define S_COAL_ALL_THREAD 19 +#define V_COAL_ALL_THREAD(x) ((x) << S_COAL_ALL_THREAD) +#define F_COAL_ALL_THREAD V_COAL_ALL_THREAD(1U) + +#define S_EN_PSHB 18 +#define V_EN_PSHB(x) ((x) << S_EN_PSHB) +#define F_EN_PSHB V_EN_PSHB(1U) + +#define S_EN_DB_FIFTH 17 +#define V_EN_DB_FIFTH(x) ((x) << S_EN_DB_FIFTH) +#define F_EN_DB_FIFTH V_EN_DB_FIFTH(1U) + +#define S_DB_PROG_THRESH 8 +#define M_DB_PROG_THRESH 0x1ffU +#define V_DB_PROG_THRESH(x) ((x) << S_DB_PROG_THRESH) +#define G_DB_PROG_THRESH(x) (((x) >> S_DB_PROG_THRESH) & M_DB_PROG_THRESH) + +#define S_100NS_TIMER 0 +#define M_100NS_TIMER 0xffU +#define V_100NS_TIMER(x) ((x) << S_100NS_TIMER) +#define G_100NS_TIMER(x) (((x) >> S_100NS_TIMER) & M_100NS_TIMER) + #define A_SGE_PD_RSP_CREDIT23 0x10c8 #define S_RSPCREDITEN2 31 @@ -1427,6 +1796,23 @@ #define V_MAXRSPCNT3(x) ((x) << S_MAXRSPCNT3) #define G_MAXRSPCNT3(x) (((x) >> S_MAXRSPCNT3) & M_MAXRSPCNT3) +#define A_SGE_GK_CONTROL2 0x10c8 + +#define S_DBQ_TIMER_TICK 16 +#define M_DBQ_TIMER_TICK 0xffffU +#define V_DBQ_TIMER_TICK(x) ((x) << S_DBQ_TIMER_TICK) +#define G_DBQ_TIMER_TICK(x) (((x) >> S_DBQ_TIMER_TICK) & M_DBQ_TIMER_TICK) + +#define S_FL_MERGE_CNT_THRESH 8 +#define M_FL_MERGE_CNT_THRESH 0xfU +#define V_FL_MERGE_CNT_THRESH(x) ((x) << S_FL_MERGE_CNT_THRESH) +#define G_FL_MERGE_CNT_THRESH(x) (((x) >> S_FL_MERGE_CNT_THRESH) & M_FL_MERGE_CNT_THRESH) + +#define S_MERGE_CNT_THRESH 0 +#define M_MERGE_CNT_THRESH 0x3fU +#define V_MERGE_CNT_THRESH(x) ((x) << S_MERGE_CNT_THRESH) +#define G_MERGE_CNT_THRESH(x) (((x) >> S_MERGE_CNT_THRESH) & M_MERGE_CNT_THRESH) + #define A_SGE_DEBUG_INDEX 0x10cc #define A_SGE_DEBUG_DATA_HIGH 0x10d0 #define A_SGE_DEBUG_DATA_LOW 0x10d4 @@ -1553,6 +1939,30 @@ #define V_ERR_RX_CPL_PACKET_SIZE0(x) ((x) << S_ERR_RX_CPL_PACKET_SIZE0) #define F_ERR_RX_CPL_PACKET_SIZE0 V_ERR_RX_CPL_PACKET_SIZE0(1U) +#define S_ERR_ISHIFT_UR1 31 +#define V_ERR_ISHIFT_UR1(x) ((x) << S_ERR_ISHIFT_UR1) +#define F_ERR_ISHIFT_UR1 V_ERR_ISHIFT_UR1(1U) + +#define S_ERR_ISHIFT_UR0 30 +#define V_ERR_ISHIFT_UR0(x) ((x) << S_ERR_ISHIFT_UR0) +#define F_ERR_ISHIFT_UR0 V_ERR_ISHIFT_UR0(1U) + +#define S_ERR_TH3_MAX_FETCH 14 +#define V_ERR_TH3_MAX_FETCH(x) ((x) << S_ERR_TH3_MAX_FETCH) +#define F_ERR_TH3_MAX_FETCH V_ERR_TH3_MAX_FETCH(1U) + +#define S_ERR_TH2_MAX_FETCH 13 +#define V_ERR_TH2_MAX_FETCH(x) ((x) << S_ERR_TH2_MAX_FETCH) +#define F_ERR_TH2_MAX_FETCH V_ERR_TH2_MAX_FETCH(1U) + +#define S_ERR_TH1_MAX_FETCH 12 +#define V_ERR_TH1_MAX_FETCH(x) ((x) << S_ERR_TH1_MAX_FETCH) +#define F_ERR_TH1_MAX_FETCH V_ERR_TH1_MAX_FETCH(1U) + +#define S_ERR_TH0_MAX_FETCH 11 +#define V_ERR_TH0_MAX_FETCH(x) ((x) << S_ERR_TH0_MAX_FETCH) +#define F_ERR_TH0_MAX_FETCH V_ERR_TH0_MAX_FETCH(1U) + #define A_SGE_INT_ENABLE4 0x10e0 #define A_SGE_STAT_TOTAL 0x10e4 #define A_SGE_STAT_MATCH 0x10e8 @@ -1587,6 +1997,11 @@ #define V_STATSOURCE_T5(x) ((x) << S_STATSOURCE_T5) #define G_STATSOURCE_T5(x) (((x) >> S_STATSOURCE_T5) & M_STATSOURCE_T5) +#define S_T6_STATMODE 0 +#define M_T6_STATMODE 0xfU +#define V_T6_STATMODE(x) ((x) << S_T6_STATMODE) +#define G_T6_STATMODE(x) (((x) >> S_T6_STATMODE) & M_T6_STATMODE) + #define A_SGE_HINT_CFG 0x10f0 #define S_HINTSALLOWEDNOHDR 6 @@ -1660,6 +2075,7 @@ #define V_MINTAG0(x) ((x) << S_MINTAG0) #define G_MINTAG0(x) (((x) >> S_MINTAG0) & M_MINTAG0) +#define A_SGE_IDMA0_DROP_CNT 0x1104 #define A_SGE_SHARED_TAG_POOL_CFG 0x1108 #define S_TAGPOOLTOTAL 0 @@ -1667,6 +2083,7 @@ #define V_TAGPOOLTOTAL(x) ((x) << S_TAGPOOLTOTAL) #define G_TAGPOOLTOTAL(x) (((x) >> S_TAGPOOLTOTAL) & M_TAGPOOLTOTAL) +#define A_SGE_IDMA1_DROP_CNT 0x1108 #define A_SGE_INT_CAUSE5 0x110c #define S_ERR_T_RXCRC 31 @@ -1963,6 +2380,90 @@ #define V_EDMA0_SLEEP_REQ(x) ((x) << S_EDMA0_SLEEP_REQ) #define F_EDMA0_SLEEP_REQ V_EDMA0_SLEEP_REQ(1U) +#define A_SGE_INT_CAUSE6 0x1128 + +#define S_ERR_DB_SYNC 21 +#define V_ERR_DB_SYNC(x) ((x) << S_ERR_DB_SYNC) +#define F_ERR_DB_SYNC V_ERR_DB_SYNC(1U) + +#define S_ERR_GTS_SYNC 20 +#define V_ERR_GTS_SYNC(x) ((x) << S_ERR_GTS_SYNC) +#define F_ERR_GTS_SYNC V_ERR_GTS_SYNC(1U) + +#define S_FATAL_LARGE_COAL 19 +#define V_FATAL_LARGE_COAL(x) ((x) << S_FATAL_LARGE_COAL) +#define F_FATAL_LARGE_COAL V_FATAL_LARGE_COAL(1U) + +#define S_PL_BAR2_FRM_ERR 18 +#define V_PL_BAR2_FRM_ERR(x) ((x) << S_PL_BAR2_FRM_ERR) +#define F_PL_BAR2_FRM_ERR V_PL_BAR2_FRM_ERR(1U) + +#define S_SILENT_DROP_TX_COAL 17 +#define V_SILENT_DROP_TX_COAL(x) ((x) << S_SILENT_DROP_TX_COAL) +#define F_SILENT_DROP_TX_COAL V_SILENT_DROP_TX_COAL(1U) + +#define S_ERR_INV_CTXT4 16 +#define V_ERR_INV_CTXT4(x) ((x) << S_ERR_INV_CTXT4) +#define F_ERR_INV_CTXT4 V_ERR_INV_CTXT4(1U) + +#define S_ERR_BAD_DB_PIDX4 15 +#define V_ERR_BAD_DB_PIDX4(x) ((x) << S_ERR_BAD_DB_PIDX4) +#define F_ERR_BAD_DB_PIDX4 V_ERR_BAD_DB_PIDX4(1U) + +#define S_ERR_BAD_UPFL_INC_CREDIT4 14 +#define V_ERR_BAD_UPFL_INC_CREDIT4(x) ((x) << S_ERR_BAD_UPFL_INC_CREDIT4) +#define F_ERR_BAD_UPFL_INC_CREDIT4 V_ERR_BAD_UPFL_INC_CREDIT4(1U) + +#define S_FATAL_TAG_MISMATCH 13 +#define V_FATAL_TAG_MISMATCH(x) ((x) << S_FATAL_TAG_MISMATCH) +#define F_FATAL_TAG_MISMATCH V_FATAL_TAG_MISMATCH(1U) + +#define S_FATAL_ENQ_CTL_RDY 12 +#define V_FATAL_ENQ_CTL_RDY(x) ((x) << S_FATAL_ENQ_CTL_RDY) +#define F_FATAL_ENQ_CTL_RDY V_FATAL_ENQ_CTL_RDY(1U) + +#define S_ERR_PC_RSP_LEN3 11 +#define V_ERR_PC_RSP_LEN3(x) ((x) << S_ERR_PC_RSP_LEN3) +#define F_ERR_PC_RSP_LEN3 V_ERR_PC_RSP_LEN3(1U) + +#define S_ERR_PC_RSP_LEN2 10 +#define V_ERR_PC_RSP_LEN2(x) ((x) << S_ERR_PC_RSP_LEN2) +#define F_ERR_PC_RSP_LEN2 V_ERR_PC_RSP_LEN2(1U) + +#define S_ERR_PC_RSP_LEN1 9 +#define V_ERR_PC_RSP_LEN1(x) ((x) << S_ERR_PC_RSP_LEN1) +#define F_ERR_PC_RSP_LEN1 V_ERR_PC_RSP_LEN1(1U) + +#define S_ERR_PC_RSP_LEN0 8 +#define V_ERR_PC_RSP_LEN0(x) ((x) << S_ERR_PC_RSP_LEN0) +#define F_ERR_PC_RSP_LEN0 V_ERR_PC_RSP_LEN0(1U) + +#define S_FATAL_ENQ2LL_VLD 7 +#define V_FATAL_ENQ2LL_VLD(x) ((x) << S_FATAL_ENQ2LL_VLD) +#define F_FATAL_ENQ2LL_VLD V_FATAL_ENQ2LL_VLD(1U) + +#define S_FATAL_LL_EMPTY 6 +#define V_FATAL_LL_EMPTY(x) ((x) << S_FATAL_LL_EMPTY) +#define F_FATAL_LL_EMPTY V_FATAL_LL_EMPTY(1U) + +#define S_FATAL_OFF_WDENQ 5 +#define V_FATAL_OFF_WDENQ(x) ((x) << S_FATAL_OFF_WDENQ) +#define F_FATAL_OFF_WDENQ V_FATAL_OFF_WDENQ(1U) + +#define S_FATAL_DEQ_DRDY 3 +#define M_FATAL_DEQ_DRDY 0x3U +#define V_FATAL_DEQ_DRDY(x) ((x) << S_FATAL_DEQ_DRDY) +#define G_FATAL_DEQ_DRDY(x) (((x) >> S_FATAL_DEQ_DRDY) & M_FATAL_DEQ_DRDY) + +#define S_FATAL_OUTP_DRDY 1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 30 21:57:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B26CBEF082; Tue, 30 May 2017 21:57:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 439767C110; Tue, 30 May 2017 21:57:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ULvT4h055405; Tue, 30 May 2017 21:57:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ULvP72055397; Tue, 30 May 2017 21:57:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705302157.v4ULvP72055397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 30 May 2017 21:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319255 - stable/10/contrib/ofed/libcxgb4/src X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 21:57:30 -0000 Author: np Date: Tue May 30 21:57:25 2017 New Revision: 319255 URL: https://svnweb.freebsd.org/changeset/base/319255 Log: MFC r314176 and r318973. r314176: Add support for RDMA from userspace with T6 cards. r318973: libcxgb4: Use memcpy instead of copying WRs 8B at a time in the userspace RDMA library for cxgbe(4). Sponsored by: Chelsio Communications Modified: stable/10/contrib/ofed/libcxgb4/src/dev.c stable/10/contrib/ofed/libcxgb4/src/qp.c stable/10/contrib/ofed/libcxgb4/src/t4.h stable/10/contrib/ofed/libcxgb4/src/t4_chip_type.h stable/10/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h stable/10/contrib/ofed/libcxgb4/src/t4_regs.h stable/10/contrib/ofed/libcxgb4/src/verbs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/libcxgb4/src/dev.c ============================================================================== --- stable/10/contrib/ofed/libcxgb4/src/dev.c Tue May 30 21:55:48 2017 (r319254) +++ stable/10/contrib/ofed/libcxgb4/src/dev.c Tue May 30 21:57:25 2017 (r319255) @@ -145,10 +145,10 @@ static struct ibv_context *c4iw_alloc_context(struct i context->ibv_ctx.ops = c4iw_ctx_ops; switch (rhp->chip_version) { + case CHELSIO_T6: case CHELSIO_T5: - PDBG("%s T5/T4 device\n", __FUNCTION__); case CHELSIO_T4: - PDBG("%s T4 device\n", __FUNCTION__); + PDBG("%s T%d device\n", __FUNCTION__, rhp->chip_version); context->ibv_ctx.ops.async_event = c4iw_async_event; context->ibv_ctx.ops.post_send = c4iw_post_send; context->ibv_ctx.ops.post_recv = c4iw_post_receive; @@ -390,29 +390,26 @@ static struct ibv_device *cxgb4_driver_init(const char int abi_version) { char devstr[IBV_SYSFS_PATH_MAX], ibdev[16], value[128], *cp; - char t5nexstr[IBV_SYSFS_PATH_MAX]; + char dev_str[IBV_SYSFS_PATH_MAX]; struct c4iw_dev *dev; unsigned vendor, device, fw_maj, fw_min; int i; - char devnum=0; + char devnum; char ib_param[16]; #ifndef __linux__ if (ibv_read_sysfs_file(uverbs_sys_path, "ibdev", ibdev, sizeof ibdev) < 0) return NULL; - /* - * Extract the non-numeric part of ibdev - * say "t5nex0" -> devname=="t5nex", devnum=0 - */ - if (strstr(ibdev,"t5nex")) { - devnum = atoi(ibdev+strlen("t5nex")); - sprintf(t5nexstr, "/dev/t5nex/%d", devnum); + + if (ibdev[0] == 't' && ibdev[1] >= '4' && ibdev[1] <= '6' && + strstr(&ibdev[2], "nex") && (devnum = atoi(&ibdev[5])) >= 0) { + snprintf(dev_str, sizeof(dev_str), "/dev/t%cnex/%d", ibdev[1], + devnum); } else return NULL; - if (ibv_read_sysfs_file(t5nexstr, "\%pnpinfo", - value, sizeof value) < 0) + if (ibv_read_sysfs_file(dev_str, "\%pnpinfo", value, sizeof value) < 0) return NULL; else { if (strstr(value,"vendor=")) { @@ -449,7 +446,7 @@ found: #ifndef __linux__ - if (ibv_read_sysfs_file(t5nexstr, "firmware_version", + if (ibv_read_sysfs_file(dev_str, "firmware_version", value, sizeof value) < 0) return NULL; #else Modified: stable/10/contrib/ofed/libcxgb4/src/qp.c ============================================================================== --- stable/10/contrib/ofed/libcxgb4/src/qp.c Tue May 30 21:55:48 2017 (r319254) +++ stable/10/contrib/ofed/libcxgb4/src/qp.c Tue May 30 21:57:25 2017 (r319255) @@ -47,39 +47,49 @@ struct c4iw_stats c4iw_stats; static void copy_wr_to_sq(struct t4_wq *wq, union t4_wr *wqe, u8 len16) { - u64 *src, *dst; + void *src, *dst; + uintptr_t end; + int total, len; - src = (u64 *)wqe; - dst = (u64 *)((u8 *)wq->sq.queue + wq->sq.wq_pidx * T4_EQ_ENTRY_SIZE); + src = &wqe->flits[0]; + dst = &wq->sq.queue->flits[wq->sq.wq_pidx * + (T4_EQ_ENTRY_SIZE / sizeof(__be64))]; if (t4_sq_onchip(wq)) { len16 = align(len16, 4); wc_wmb(); } - while (len16) { - *dst++ = *src++; - if (dst == (u64 *)&wq->sq.queue[wq->sq.size]) - dst = (u64 *)wq->sq.queue; - *dst++ = *src++; - if (dst == (u64 *)&wq->sq.queue[wq->sq.size]) - dst = (u64 *)wq->sq.queue; - len16--; + + total = len16 * 16; + end = (uintptr_t)&wq->sq.queue[wq->sq.size]; + if (__predict_true((uintptr_t)dst + total <= end)) { + /* Won't wrap around. */ + memcpy(dst, src, total); + } else { + len = end - (uintptr_t)dst; + memcpy(dst, src, len); + memcpy(wq->sq.queue, src + len, total - len); } } static void copy_wr_to_rq(struct t4_wq *wq, union t4_recv_wr *wqe, u8 len16) { - u64 *src, *dst; + void *src, *dst; + uintptr_t end; + int total, len; - src = (u64 *)wqe; - dst = (u64 *)((u8 *)wq->rq.queue + wq->rq.wq_pidx * T4_EQ_ENTRY_SIZE); - while (len16) { - *dst++ = *src++; - if (dst >= (u64 *)&wq->rq.queue[wq->rq.size]) - dst = (u64 *)wq->rq.queue; - *dst++ = *src++; - if (dst >= (u64 *)&wq->rq.queue[wq->rq.size]) - dst = (u64 *)wq->rq.queue; - len16--; + src = &wqe->flits[0]; + dst = &wq->rq.queue->flits[wq->rq.wq_pidx * + (T4_EQ_ENTRY_SIZE / sizeof(__be64))]; + + total = len16 * 16; + end = (uintptr_t)&wq->rq.queue[wq->rq.size]; + if (__predict_true((uintptr_t)dst + total <= end)) { + /* Won't wrap around. */ + memcpy(dst, src, total); + } else { + len = end - (uintptr_t)dst; + memcpy(dst, src, len); + memcpy(wq->rq.queue, src + len, total - len); } } @@ -393,7 +403,7 @@ int c4iw_post_send(struct ibv_qp *ibqp, struct ibv_sen idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); } - t4_ring_sq_db(&qhp->wq, idx, dev_is_t5(qhp->rhp), + t4_ring_sq_db(&qhp->wq, idx, dev_is_t4(qhp->rhp), len16, wqe); qhp->wq.sq.queue[qhp->wq.sq.size].status.host_wq_pidx = \ (qhp->wq.sq.wq_pidx); @@ -457,7 +467,7 @@ int c4iw_post_receive(struct ibv_qp *ibqp, struct ibv_ num_wrs--; } - t4_ring_rq_db(&qhp->wq, idx, dev_is_t5(qhp->rhp), + t4_ring_rq_db(&qhp->wq, idx, dev_is_t4(qhp->rhp), len16, wqe); qhp->wq.rq.queue[qhp->wq.rq.size].status.host_wq_pidx = \ (qhp->wq.rq.wq_pidx); Modified: stable/10/contrib/ofed/libcxgb4/src/t4.h ============================================================================== --- stable/10/contrib/ofed/libcxgb4/src/t4.h Tue May 30 21:55:48 2017 (r319254) +++ stable/10/contrib/ofed/libcxgb4/src/t4.h Tue May 30 21:57:25 2017 (r319255) @@ -484,11 +484,11 @@ static void copy_wqe_to_udb(volatile u32 *udb_offset, extern int ma_wr; extern int t5_en_wc; -static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16, +static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, u8 t4, u8 len16, union t4_wr *wqe) { wc_wmb(); - if (t5) { + if (!t4) { if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) { PDBG("%s: WC wq->sq.pidx = %d; len16=%d\n", __func__, wq->sq.pidx, len16); @@ -517,11 +517,11 @@ static inline void t4_ring_sq_db(struct t4_wq *wq, u16 writel(V_QID(wq->sq.qid & wq->qid_mask) | V_PIDX(inc), wq->sq.udb); } -static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16, +static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, u8 t4, u8 len16, union t4_recv_wr *wqe) { wc_wmb(); - if (t5) { + if (!t4) { if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) { PDBG("%s: WC wq->rq.pidx = %d; len16=%d\n", __func__, wq->rq.pidx, len16); Modified: stable/10/contrib/ofed/libcxgb4/src/t4_chip_type.h ============================================================================== --- stable/10/contrib/ofed/libcxgb4/src/t4_chip_type.h Tue May 30 21:55:48 2017 (r319254) +++ stable/10/contrib/ofed/libcxgb4/src/t4_chip_type.h Tue May 30 21:57:25 2017 (r319255) @@ -1,7 +1,7 @@ /* - * This file is part of the Chelsio T4 Ethernet driver. + * This file is part of the Chelsio T4/T5/T6 Ethernet driver. * - * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. + * Copyright (C) 2003-2016 Chelsio Communications. All rights reserved. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -30,6 +30,8 @@ #define CHELSIO_T4_FPGA 0xa #define CHELSIO_T5 0x5 #define CHELSIO_T5_FPGA 0xb +#define CHELSIO_T6 0x6 +#define CHELSIO_T6_FPGA 0xc /* * Translate a PCI Device ID to a base Chelsio Chip Version -- CHELSIO_T4, @@ -43,12 +45,26 @@ * Finally: This will of course need to be expanded as future chips are * developed. */ -#define CHELSIO_PCI_ID_CHIP_VERSION(__DeviceID) \ - (CHELSIO_PCI_ID_VER(__DeviceID) == CHELSIO_T4 || \ - CHELSIO_PCI_ID_VER(__DeviceID) == CHELSIO_T4_FPGA \ - ? CHELSIO_T4 \ - : CHELSIO_T5) +static inline unsigned int +CHELSIO_PCI_ID_CHIP_VERSION(unsigned int DeviceID) +{ + switch (CHELSIO_PCI_ID_VER(DeviceID)) { + case CHELSIO_T4: + case CHELSIO_T4_FPGA: + return CHELSIO_T4; + case CHELSIO_T5: + case CHELSIO_T5_FPGA: + return CHELSIO_T5; + + case CHELSIO_T6: + case CHELSIO_T6_FPGA: + return CHELSIO_T6; + } + + return 0; +} + /* * Internally we code the Chelsio T4 Family "Chip Code" as a tuple: * @@ -72,9 +88,13 @@ enum chip_type { T4_LAST_REV = T4_A2, T5_A0 = CHELSIO_CHIP_CODE(CHELSIO_T5, 0), - T5_A1 = CHELSIO_CHIP_CODE(CHELSIO_T5, 0), + T5_A1 = CHELSIO_CHIP_CODE(CHELSIO_T5, 1), T5_FIRST_REV = T5_A0, T5_LAST_REV = T5_A1, + + T6_A0 = CHELSIO_CHIP_CODE(CHELSIO_T6, 0), + T6_FIRST_REV = T6_A0, + T6_LAST_REV = T6_A0, }; static inline int is_t4(enum chip_type chip) @@ -86,6 +106,11 @@ static inline int is_t5(enum chip_type chip) { return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T5); +} + +static inline int is_t6(enum chip_type chip) +{ + return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T6); } static inline int is_fpga(enum chip_type chip) Modified: stable/10/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h ============================================================================== --- stable/10/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h Tue May 30 21:55:48 2017 (r319254) +++ stable/10/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h Tue May 30 21:57:25 2017 (r319255) @@ -1,7 +1,7 @@ /* - * This file is part of the Chelsio T4 Ethernet driver. + * This file is part of the Chelsio T4/T5/T6 Ethernet driver. * - * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. + * Copyright (C) 2003-2017 Chelsio Communications. All rights reserved. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -44,7 +44,6 @@ * -- If defined, indicates that the OS Driver has support for Bypass * -- Adapters. */ -#ifdef CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN /* * Some sanity checks ... @@ -96,10 +95,13 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_ENTRY(0xa000), /* PE10K FPGA */ CH_PCI_ID_TABLE_ENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */ CH_PCI_ID_TABLE_ENTRY(0xb001), /* PF0 T5 PE10K FPGA */ + CH_PCI_ID_TABLE_ENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */ #else CH_PCI_ID_TABLE_FENTRY(0xa000), /* PE10K FPGA */ CH_PCI_ID_TABLE_FENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */ CH_PCI_ID_TABLE_FENTRY(0xb001), /* PF0 T5 PE10K FPGA */ + CH_PCI_ID_TABLE_FENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */ + CH_PCI_ID_TABLE_FENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */ #endif /* @@ -108,6 +110,7 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN #if ((CH_PCI_DEVICE_ID_FUNCTION == 5) || (CH_PCI_DEVICE_ID_FUNCTION == 6)) CH_PCI_ID_TABLE_ENTRY(0xa001), /* PF1 PE10K FPGA FCOE */ CH_PCI_ID_TABLE_ENTRY(0xa002), /* PE10K FPGA iSCSI */ + CH_PCI_ID_TABLE_ENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */ #endif /* @@ -166,10 +169,50 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_FENTRY(0x5013), /* T580-chr */ CH_PCI_ID_TABLE_FENTRY(0x5014), /* T580-so */ CH_PCI_ID_TABLE_FENTRY(0x5015), /* T502-bt */ + CH_PCI_ID_TABLE_FENTRY(0x5016), /* T580-OCP-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5017), /* T520-OCP-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5018), /* T540-BT */ CH_PCI_ID_TABLE_FENTRY(0x5080), /* Custom T540-cr */ CH_PCI_ID_TABLE_FENTRY(0x5081), /* Custom T540-LL-cr */ -CH_PCI_DEVICE_ID_TABLE_DEFINE_END; + CH_PCI_ID_TABLE_FENTRY(0x5082), /* Custom T504-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5083), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5084), /* Custom T580-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5085), /* Custom 3x T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5086), /* Custom 2x T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5087), /* Custom T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5088), /* Custom T570-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5089), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5091), /* Custom T522-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5092), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5093), /* Custom SECA */ + CH_PCI_ID_TABLE_FENTRY(0x5094), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5095), /* Custom T540-CR-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5096), /* Custom T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5097), /* Custom T520-KR */ + CH_PCI_ID_TABLE_FENTRY(0x5098), /* Custom 2x40G QSFP */ + CH_PCI_ID_TABLE_FENTRY(0x5099), /* Custom 2x40G QSFP */ + CH_PCI_ID_TABLE_FENTRY(0x509A), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x509B), /* Custom T540-CR LOM */ + CH_PCI_ID_TABLE_FENTRY(0x509c), /* Custom T520-CR SFP+ LOM */ + CH_PCI_ID_TABLE_FENTRY(0x509d), /* Custom T540-CR SFP+ */ -#endif /* CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN */ + /* T6 adapter */ + CH_PCI_ID_TABLE_FENTRY(0x6000), + CH_PCI_ID_TABLE_FENTRY(0x6001), + CH_PCI_ID_TABLE_FENTRY(0x6002), + CH_PCI_ID_TABLE_FENTRY(0x6003), + CH_PCI_ID_TABLE_FENTRY(0x6004), + CH_PCI_ID_TABLE_FENTRY(0x6005), + CH_PCI_ID_TABLE_FENTRY(0x6006), + CH_PCI_ID_TABLE_FENTRY(0x6007), + CH_PCI_ID_TABLE_FENTRY(0x6008), + CH_PCI_ID_TABLE_FENTRY(0x6009), + CH_PCI_ID_TABLE_FENTRY(0x600d), + CH_PCI_ID_TABLE_FENTRY(0x6010), + CH_PCI_ID_TABLE_FENTRY(0x6011), + CH_PCI_ID_TABLE_FENTRY(0x6014), + CH_PCI_ID_TABLE_FENTRY(0x6015), +CH_PCI_DEVICE_ID_TABLE_DEFINE_END; #endif /* __T4_PCI_ID_TBL_H__ */ Modified: stable/10/contrib/ofed/libcxgb4/src/t4_regs.h ============================================================================== --- stable/10/contrib/ofed/libcxgb4/src/t4_regs.h Tue May 30 21:55:48 2017 (r319254) +++ stable/10/contrib/ofed/libcxgb4/src/t4_regs.h Tue May 30 21:57:25 2017 (r319255) @@ -1,4 +1,8 @@ /* This file is automatically generated --- changes will be lost */ +/* Generation Date : Fri Oct 28 19:22:40 IST 2016 */ +/* Directory name: t4_reg.txt, Changeset: */ +/* Directory name: t5_reg.txt, Changeset: 6938:9111c5bdce6e */ +/* Directory name: t6_reg.txt, Changeset: 4252:437fb8972e44 */ #define MYPF_BASE 0x1b000 #define MYPF_REG(reg_addr) (MYPF_BASE + (reg_addr)) @@ -339,9 +343,141 @@ #define EDC_H_ECC_ERR_DATA_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) #define NUM_EDC_H_ECC_ERR_DATA_INSTANCES 16 +#define SGE_DEBUG1_DBP_THREAD(idx) (A_SGE_DEBUG1_DBP_THREAD + (idx) * 4) +#define NUM_SGE_DEBUG1_DBP_THREAD_INSTANCES 4 + +#define SGE_DEBUG0_DBP_THREAD(idx) (A_SGE_DEBUG0_DBP_THREAD + (idx) * 4) +#define NUM_SGE_DEBUG0_DBP_THREAD_INSTANCES 5 + +#define SGE_WC_EGRS_BAR2_OFF_PF(idx) (A_SGE_WC_EGRS_BAR2_OFF_PF + (idx) * 4) +#define NUM_SGE_WC_EGRS_BAR2_OFF_PF_INSTANCES 8 + +#define SGE_WC_EGRS_BAR2_OFF_VF(idx) (A_SGE_WC_EGRS_BAR2_OFF_VF + (idx) * 4) +#define NUM_SGE_WC_EGRS_BAR2_OFF_VF_INSTANCES 8 + +#define PCIE_T6_DMA_REG(reg_addr, idx) ((reg_addr) + (idx) * 16) +#define NUM_PCIE_T6_DMA_INSTANCES 2 + +#define PCIE_T6_CMD_REG(reg_addr, idx) ((reg_addr) + (idx) * 16) +#define NUM_PCIE_T6_CMD_INSTANCES 1 + +#define PCIE_VF_256_INT_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_PCIE_VF_256_INT_INSTANCES 128 + +#define MPS_CLS_REQUEST_TRACE_MAC_DA_L(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_DA_L + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_DA_L_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_DA_H(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_DA_H + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_DA_H_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_SA_L(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_SA_L + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_SA_L_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_SA_H(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_SA_H + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_SA_H_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_PORT_VLAN(idx) (A_MPS_CLS_REQUEST_TRACE_PORT_VLAN + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_PORT_VLAN_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_ENCAP(idx) (A_MPS_CLS_REQUEST_TRACE_ENCAP + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_ENCAP_INSTANCES 8 + +#define MPS_CLS_RESULT_TRACE(idx) (A_MPS_CLS_RESULT_TRACE + (idx) * 4) +#define NUM_MPS_CLS_RESULT_TRACE_INSTANCES 8 + +#define MPS_CLS_DIPIPV4_ID_TABLE(idx) (A_MPS_CLS_DIPIPV4_ID_TABLE + (idx) * 8) +#define NUM_MPS_CLS_DIPIPV4_ID_TABLE_INSTANCES 4 + +#define MPS_CLS_DIPIPV4_MASK_TABLE(idx) (A_MPS_CLS_DIPIPV4_MASK_TABLE + (idx) * 8) +#define NUM_MPS_CLS_DIPIPV4_MASK_TABLE_INSTANCES 4 + +#define MPS_CLS_DIPIPV6ID_0_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_0_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_0_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_1_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_1_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_1_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_2_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_2_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_2_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_3_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_3_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_3_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_0_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_0_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_0_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_1_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_1_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_1_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_2_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_2_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_2_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_3_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_3_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_3_TABLE_INSTANCES 2 + +#define MPS_RX_HASH_LKP_TABLE(idx) (A_MPS_RX_HASH_LKP_TABLE + (idx) * 4) +#define NUM_MPS_RX_HASH_LKP_TABLE_INSTANCES 4 + +#define LE_DB_DBG_MATCH_DATA_MASK(idx) (A_LE_DB_DBG_MATCH_DATA_MASK + (idx) * 4) +#define NUM_LE_DB_DBG_MATCH_DATA_MASK_INSTANCES 8 + +#define LE_DB_DBG_MATCH_DATA(idx) (A_LE_DB_DBG_MATCH_DATA + (idx) * 4) +#define NUM_LE_DB_DBG_MATCH_DATA_INSTANCES 8 + +#define LE_DB_DBGI_REQ_DATA_T6(idx) (A_LE_DB_DBGI_REQ_DATA + (idx) * 4) +#define NUM_LE_DB_DBGI_REQ_DATA_T6_INSTANCES 11 + +#define LE_DB_DBGI_REQ_MASK_T6(idx) (A_LE_DB_DBGI_REQ_MASK + (idx) * 4) +#define NUM_LE_DB_DBGI_REQ_MASK_T6_INSTANCES 11 + +#define LE_DB_DBGI_RSP_DATA_T6(idx) (A_LE_DB_DBGI_RSP_DATA + (idx) * 4) +#define NUM_LE_DB_DBGI_RSP_DATA_T6_INSTANCES 11 + +#define LE_DB_ACTIVE_MASK_IPV6_T6(idx) (A_LE_DB_ACTIVE_MASK_IPV6 + (idx) * 4) +#define NUM_LE_DB_ACTIVE_MASK_IPV6_T6_INSTANCES 8 + +#define LE_HASH_MASK_GEN_IPV4T6(idx) (A_LE_HASH_MASK_GEN_IPV4T5 + (idx) * 4) +#define NUM_LE_HASH_MASK_GEN_IPV4T6_INSTANCES 8 + +#define T6_LE_HASH_MASK_GEN_IPV6T5(idx) (A_T6_LE_HASH_MASK_GEN_IPV6T5 + (idx) * 4) +#define NUM_T6_LE_HASH_MASK_GEN_IPV6T5_INSTANCES 8 + +#define LE_DB_PSV_FILTER_MASK_TUP_IPV4(idx) (A_LE_DB_PSV_FILTER_MASK_TUP_IPV4 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_TUP_IPV4_INSTANCES 3 + +#define LE_DB_PSV_FILTER_MASK_FLT_IPV4(idx) (A_LE_DB_PSV_FILTER_MASK_FLT_IPV4 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_FLT_IPV4_INSTANCES 2 + +#define LE_DB_PSV_FILTER_MASK_TUP_IPV6(idx) (A_LE_DB_PSV_FILTER_MASK_TUP_IPV6 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_TUP_IPV6_INSTANCES 9 + +#define LE_DB_PSV_FILTER_MASK_FLT_IPV6(idx) (A_LE_DB_PSV_FILTER_MASK_FLT_IPV6 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_FLT_IPV6_INSTANCES 2 + +#define LE_DB_SECOND_GEN_HASH_MASK_IPV4_T6(idx) (A_LE_DB_SECOND_GEN_HASH_MASK_IPV4 + (idx) * 4) +#define NUM_LE_DB_SECOND_GEN_HASH_MASK_IPV4_T6_INSTANCES 8 + +#define MC_DDRPHY_DP18_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 512) +#define NUM_MC_DDRPHY_DP18_T6_INSTANCES 9 + +#define MC_CE_ERR_DATA_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_MC_CE_ERR_DATA_T6_INSTANCES 16 + +#define MC_UE_ERR_DATA_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_MC_UE_ERR_DATA_T6_INSTANCES 16 + +#define CIM_CTL_MAILBOX_VF_STATUS_T6(idx) (A_CIM_CTL_MAILBOX_VF_STATUS + (idx) * 4) +#define NUM_CIM_CTL_MAILBOX_VF_STATUS_T6_INSTANCES 8 + +#define CIM_CTL_MAILBOX_VFN_CTL_T6(idx) (A_CIM_CTL_MAILBOX_VFN_CTL + (idx) * 4) +#define NUM_CIM_CTL_MAILBOX_VFN_CTL_T6_INSTANCES 256 + #define EDC_STRIDE (EDC_1_BASE_ADDR - EDC_0_BASE_ADDR) #define EDC_REG(reg, idx) (reg + EDC_STRIDE * idx) +#define EDC_T5_STRIDE (EDC_T51_BASE_ADDR - EDC_T50_BASE_ADDR) +#define EDC_T5_REG(reg, idx) (reg + EDC_T5_STRIDE * idx) + /* registers for module SGE */ #define SGE_BASE_ADDR 0x1000 @@ -372,6 +508,10 @@ #define V_PIDX_T5(x) ((x) << S_PIDX_T5) #define G_PIDX_T5(x) (((x) >> S_PIDX_T5) & M_PIDX_T5) +#define S_SYNC_T6 14 +#define V_SYNC_T6(x) ((x) << S_SYNC_T6) +#define F_SYNC_T6 V_SYNC_T6(1U) + #define A_SGE_PF_GTS 0x4 #define S_INGRESSQID 16 @@ -764,6 +904,14 @@ #define V_PERR_PC_CHPI_RSP2(x) ((x) << S_PERR_PC_CHPI_RSP2) #define F_PERR_PC_CHPI_RSP2 V_PERR_PC_CHPI_RSP2(1U) +#define S_PERR_PC_RSP 23 +#define V_PERR_PC_RSP(x) ((x) << S_PERR_PC_RSP) +#define F_PERR_PC_RSP V_PERR_PC_RSP(1U) + +#define S_PERR_PC_REQ 22 +#define V_PERR_PC_REQ(x) ((x) << S_PERR_PC_REQ) +#define F_PERR_PC_REQ V_PERR_PC_REQ(1U) + #define A_SGE_INT_ENABLE1 0x1028 #define A_SGE_PERR_ENABLE1 0x102c #define A_SGE_INT_CAUSE2 0x1030 @@ -908,6 +1056,26 @@ #define V_PERR_PC_DBP2(x) ((x) << S_PERR_PC_DBP2) #define F_PERR_PC_DBP2 V_PERR_PC_DBP2(1U) +#define S_DEQ_LL_PERR 21 +#define V_DEQ_LL_PERR(x) ((x) << S_DEQ_LL_PERR) +#define F_DEQ_LL_PERR V_DEQ_LL_PERR(1U) + +#define S_ENQ_PERR 20 +#define V_ENQ_PERR(x) ((x) << S_ENQ_PERR) +#define F_ENQ_PERR V_ENQ_PERR(1U) + +#define S_DEQ_OUT_PERR 19 +#define V_DEQ_OUT_PERR(x) ((x) << S_DEQ_OUT_PERR) +#define F_DEQ_OUT_PERR V_DEQ_OUT_PERR(1U) + +#define S_BUF_PERR 18 +#define V_BUF_PERR(x) ((x) << S_BUF_PERR) +#define F_BUF_PERR V_BUF_PERR(1U) + +#define S_PERR_DB_FIFO 3 +#define V_PERR_DB_FIFO(x) ((x) << S_PERR_DB_FIFO) +#define F_PERR_DB_FIFO V_PERR_DB_FIFO(1U) + #define A_SGE_INT_ENABLE2 0x1034 #define A_SGE_PERR_ENABLE2 0x1038 #define A_SGE_INT_CAUSE3 0x103c @@ -1040,6 +1208,14 @@ #define V_ERR_INV_CTXT0(x) ((x) << S_ERR_INV_CTXT0) #define F_ERR_INV_CTXT0 V_ERR_INV_CTXT0(1U) +#define S_DBP_TBUF_FULL 8 +#define V_DBP_TBUF_FULL(x) ((x) << S_DBP_TBUF_FULL) +#define F_DBP_TBUF_FULL V_DBP_TBUF_FULL(1U) + +#define S_FATAL_WRE_LEN 7 +#define V_FATAL_WRE_LEN(x) ((x) << S_FATAL_WRE_LEN) +#define F_FATAL_WRE_LEN V_FATAL_WRE_LEN(1U) + #define A_SGE_INT_ENABLE3 0x1040 #define A_SGE_FL_BUFFER_SIZE0 0x1044 @@ -1048,21 +1224,116 @@ #define V_SIZE(x) ((x) << S_SIZE) #define G_SIZE(x) (((x) >> S_SIZE) & M_SIZE) +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE1 0x1048 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE2 0x104c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE3 0x1050 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE4 0x1054 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE5 0x1058 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE6 0x105c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE7 0x1060 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE8 0x1064 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE9 0x1068 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE10 0x106c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE11 0x1070 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE12 0x1074 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE13 0x1078 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE14 0x107c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE15 0x1080 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_DBQ_CTXT_BADDR 0x1084 #define S_BASEADDR 3 @@ -1117,6 +1388,15 @@ #define V_CREDITCNTPACKING(x) ((x) << S_CREDITCNTPACKING) #define G_CREDITCNTPACKING(x) (((x) >> S_CREDITCNTPACKING) & M_CREDITCNTPACKING) +#define S_NULLPTR 20 +#define M_NULLPTR 0xfU +#define V_NULLPTR(x) ((x) << S_NULLPTR) +#define G_NULLPTR(x) (((x) >> S_NULLPTR) & M_NULLPTR) + +#define S_NULLPTREN 19 +#define V_NULLPTREN(x) ((x) << S_NULLPTREN) +#define F_NULLPTREN V_NULLPTREN(1U) + #define A_SGE_CONM_CTRL 0x1094 #define S_EGRTHRESHOLD 8 @@ -1142,6 +1422,16 @@ #define V_EGRTHRESHOLDPACKING(x) ((x) << S_EGRTHRESHOLDPACKING) #define G_EGRTHRESHOLDPACKING(x) (((x) >> S_EGRTHRESHOLDPACKING) & M_EGRTHRESHOLDPACKING) +#define S_T6_EGRTHRESHOLDPACKING 16 +#define M_T6_EGRTHRESHOLDPACKING 0xffU +#define V_T6_EGRTHRESHOLDPACKING(x) ((x) << S_T6_EGRTHRESHOLDPACKING) +#define G_T6_EGRTHRESHOLDPACKING(x) (((x) >> S_T6_EGRTHRESHOLDPACKING) & M_T6_EGRTHRESHOLDPACKING) + +#define S_T6_EGRTHRESHOLD 8 +#define M_T6_EGRTHRESHOLD 0xffU +#define V_T6_EGRTHRESHOLD(x) ((x) << S_T6_EGRTHRESHOLD) +#define G_T6_EGRTHRESHOLD(x) (((x) >> S_T6_EGRTHRESHOLD) & M_T6_EGRTHRESHOLD) + #define A_SGE_TIMESTAMP_LO 0x1098 #define A_SGE_TIMESTAMP_HI 0x109c @@ -1217,6 +1507,21 @@ #define V_LP_COUNT_T5(x) ((x) << S_LP_COUNT_T5) #define G_LP_COUNT_T5(x) (((x) >> S_LP_COUNT_T5) & M_LP_COUNT_T5) +#define S_VFIFO_CNT 15 +#define M_VFIFO_CNT 0x1ffffU +#define V_VFIFO_CNT(x) ((x) << S_VFIFO_CNT) +#define G_VFIFO_CNT(x) (((x) >> S_VFIFO_CNT) & M_VFIFO_CNT) + +#define S_COAL_CTL_FIFO_CNT 8 +#define M_COAL_CTL_FIFO_CNT 0x3fU +#define V_COAL_CTL_FIFO_CNT(x) ((x) << S_COAL_CTL_FIFO_CNT) +#define G_COAL_CTL_FIFO_CNT(x) (((x) >> S_COAL_CTL_FIFO_CNT) & M_COAL_CTL_FIFO_CNT) + +#define S_MERGE_FIFO_CNT 0 +#define M_MERGE_FIFO_CNT 0x3fU +#define V_MERGE_FIFO_CNT(x) ((x) << S_MERGE_FIFO_CNT) +#define G_MERGE_FIFO_CNT(x) (((x) >> S_MERGE_FIFO_CNT) & M_MERGE_FIFO_CNT) + #define A_SGE_DOORBELL_CONTROL 0x10a8 #define S_HINTDEPTHCTL 27 @@ -1286,6 +1591,32 @@ #define V_DROPPED_DB(x) ((x) << S_DROPPED_DB) #define F_DROPPED_DB V_DROPPED_DB(1U) +#define S_T6_DROP_TIMEOUT 7 +#define M_T6_DROP_TIMEOUT 0x3fU +#define V_T6_DROP_TIMEOUT(x) ((x) << S_T6_DROP_TIMEOUT) +#define G_T6_DROP_TIMEOUT(x) (((x) >> S_T6_DROP_TIMEOUT) & M_T6_DROP_TIMEOUT) + +#define S_INVONDBSYNC 6 +#define V_INVONDBSYNC(x) ((x) << S_INVONDBSYNC) +#define F_INVONDBSYNC V_INVONDBSYNC(1U) + +#define S_INVONGTSSYNC 5 +#define V_INVONGTSSYNC(x) ((x) << S_INVONGTSSYNC) +#define F_INVONGTSSYNC V_INVONGTSSYNC(1U) + +#define S_DB_DBG_EN 4 +#define V_DB_DBG_EN(x) ((x) << S_DB_DBG_EN) +#define F_DB_DBG_EN V_DB_DBG_EN(1U) + +#define S_GTS_DBG_TIMER_REG 1 +#define M_GTS_DBG_TIMER_REG 0x7U +#define V_GTS_DBG_TIMER_REG(x) ((x) << S_GTS_DBG_TIMER_REG) +#define G_GTS_DBG_TIMER_REG(x) (((x) >> S_GTS_DBG_TIMER_REG) & M_GTS_DBG_TIMER_REG) + +#define S_GTS_DBG_EN 0 +#define V_GTS_DBG_EN(x) ((x) << S_GTS_DBG_EN) +#define F_GTS_DBG_EN V_GTS_DBG_EN(1U) + #define A_SGE_DROPPED_DOORBELL 0x10ac #define A_SGE_DOORBELL_THROTTLE_CONTROL 0x10b0 @@ -1331,6 +1662,11 @@ #define V_LL_READ_WAIT_DISABLE(x) ((x) << S_LL_READ_WAIT_DISABLE) #define F_LL_READ_WAIT_DISABLE V_LL_READ_WAIT_DISABLE(1U) +#define S_TSCALE 28 +#define M_TSCALE 0xfU +#define V_TSCALE(x) ((x) << S_TSCALE) +#define G_TSCALE(x) (((x) >> S_TSCALE) & M_TSCALE) + #define A_SGE_TIMER_VALUE_0_AND_1 0x10b8 #define S_TIMERVALUE0 16 @@ -1397,6 +1733,39 @@ #define V_MAXRSPCNT1(x) ((x) << S_MAXRSPCNT1) #define G_MAXRSPCNT1(x) (((x) >> S_MAXRSPCNT1) & M_MAXRSPCNT1) +#define A_SGE_GK_CONTROL 0x10c4 + +#define S_EN_FLM_FIFTH 29 +#define V_EN_FLM_FIFTH(x) ((x) << S_EN_FLM_FIFTH) +#define F_EN_FLM_FIFTH V_EN_FLM_FIFTH(1U) + +#define S_FL_PROG_THRESH 20 +#define M_FL_PROG_THRESH 0x1ffU +#define V_FL_PROG_THRESH(x) ((x) << S_FL_PROG_THRESH) +#define G_FL_PROG_THRESH(x) (((x) >> S_FL_PROG_THRESH) & M_FL_PROG_THRESH) + +#define S_COAL_ALL_THREAD 19 +#define V_COAL_ALL_THREAD(x) ((x) << S_COAL_ALL_THREAD) +#define F_COAL_ALL_THREAD V_COAL_ALL_THREAD(1U) + +#define S_EN_PSHB 18 +#define V_EN_PSHB(x) ((x) << S_EN_PSHB) +#define F_EN_PSHB V_EN_PSHB(1U) + +#define S_EN_DB_FIFTH 17 +#define V_EN_DB_FIFTH(x) ((x) << S_EN_DB_FIFTH) +#define F_EN_DB_FIFTH V_EN_DB_FIFTH(1U) + +#define S_DB_PROG_THRESH 8 +#define M_DB_PROG_THRESH 0x1ffU +#define V_DB_PROG_THRESH(x) ((x) << S_DB_PROG_THRESH) +#define G_DB_PROG_THRESH(x) (((x) >> S_DB_PROG_THRESH) & M_DB_PROG_THRESH) + +#define S_100NS_TIMER 0 +#define M_100NS_TIMER 0xffU +#define V_100NS_TIMER(x) ((x) << S_100NS_TIMER) +#define G_100NS_TIMER(x) (((x) >> S_100NS_TIMER) & M_100NS_TIMER) + #define A_SGE_PD_RSP_CREDIT23 0x10c8 #define S_RSPCREDITEN2 31 @@ -1427,6 +1796,23 @@ #define V_MAXRSPCNT3(x) ((x) << S_MAXRSPCNT3) #define G_MAXRSPCNT3(x) (((x) >> S_MAXRSPCNT3) & M_MAXRSPCNT3) +#define A_SGE_GK_CONTROL2 0x10c8 + +#define S_DBQ_TIMER_TICK 16 +#define M_DBQ_TIMER_TICK 0xffffU +#define V_DBQ_TIMER_TICK(x) ((x) << S_DBQ_TIMER_TICK) +#define G_DBQ_TIMER_TICK(x) (((x) >> S_DBQ_TIMER_TICK) & M_DBQ_TIMER_TICK) + +#define S_FL_MERGE_CNT_THRESH 8 +#define M_FL_MERGE_CNT_THRESH 0xfU +#define V_FL_MERGE_CNT_THRESH(x) ((x) << S_FL_MERGE_CNT_THRESH) +#define G_FL_MERGE_CNT_THRESH(x) (((x) >> S_FL_MERGE_CNT_THRESH) & M_FL_MERGE_CNT_THRESH) + +#define S_MERGE_CNT_THRESH 0 +#define M_MERGE_CNT_THRESH 0x3fU +#define V_MERGE_CNT_THRESH(x) ((x) << S_MERGE_CNT_THRESH) +#define G_MERGE_CNT_THRESH(x) (((x) >> S_MERGE_CNT_THRESH) & M_MERGE_CNT_THRESH) + #define A_SGE_DEBUG_INDEX 0x10cc #define A_SGE_DEBUG_DATA_HIGH 0x10d0 #define A_SGE_DEBUG_DATA_LOW 0x10d4 @@ -1553,6 +1939,30 @@ #define V_ERR_RX_CPL_PACKET_SIZE0(x) ((x) << S_ERR_RX_CPL_PACKET_SIZE0) #define F_ERR_RX_CPL_PACKET_SIZE0 V_ERR_RX_CPL_PACKET_SIZE0(1U) +#define S_ERR_ISHIFT_UR1 31 +#define V_ERR_ISHIFT_UR1(x) ((x) << S_ERR_ISHIFT_UR1) +#define F_ERR_ISHIFT_UR1 V_ERR_ISHIFT_UR1(1U) + +#define S_ERR_ISHIFT_UR0 30 +#define V_ERR_ISHIFT_UR0(x) ((x) << S_ERR_ISHIFT_UR0) +#define F_ERR_ISHIFT_UR0 V_ERR_ISHIFT_UR0(1U) + +#define S_ERR_TH3_MAX_FETCH 14 +#define V_ERR_TH3_MAX_FETCH(x) ((x) << S_ERR_TH3_MAX_FETCH) +#define F_ERR_TH3_MAX_FETCH V_ERR_TH3_MAX_FETCH(1U) + +#define S_ERR_TH2_MAX_FETCH 13 +#define V_ERR_TH2_MAX_FETCH(x) ((x) << S_ERR_TH2_MAX_FETCH) +#define F_ERR_TH2_MAX_FETCH V_ERR_TH2_MAX_FETCH(1U) + +#define S_ERR_TH1_MAX_FETCH 12 +#define V_ERR_TH1_MAX_FETCH(x) ((x) << S_ERR_TH1_MAX_FETCH) +#define F_ERR_TH1_MAX_FETCH V_ERR_TH1_MAX_FETCH(1U) + +#define S_ERR_TH0_MAX_FETCH 11 +#define V_ERR_TH0_MAX_FETCH(x) ((x) << S_ERR_TH0_MAX_FETCH) +#define F_ERR_TH0_MAX_FETCH V_ERR_TH0_MAX_FETCH(1U) + #define A_SGE_INT_ENABLE4 0x10e0 #define A_SGE_STAT_TOTAL 0x10e4 #define A_SGE_STAT_MATCH 0x10e8 @@ -1587,6 +1997,11 @@ #define V_STATSOURCE_T5(x) ((x) << S_STATSOURCE_T5) #define G_STATSOURCE_T5(x) (((x) >> S_STATSOURCE_T5) & M_STATSOURCE_T5) +#define S_T6_STATMODE 0 +#define M_T6_STATMODE 0xfU +#define V_T6_STATMODE(x) ((x) << S_T6_STATMODE) +#define G_T6_STATMODE(x) (((x) >> S_T6_STATMODE) & M_T6_STATMODE) + #define A_SGE_HINT_CFG 0x10f0 #define S_HINTSALLOWEDNOHDR 6 @@ -1660,6 +2075,7 @@ #define V_MINTAG0(x) ((x) << S_MINTAG0) #define G_MINTAG0(x) (((x) >> S_MINTAG0) & M_MINTAG0) +#define A_SGE_IDMA0_DROP_CNT 0x1104 #define A_SGE_SHARED_TAG_POOL_CFG 0x1108 #define S_TAGPOOLTOTAL 0 @@ -1667,6 +2083,7 @@ #define V_TAGPOOLTOTAL(x) ((x) << S_TAGPOOLTOTAL) #define G_TAGPOOLTOTAL(x) (((x) >> S_TAGPOOLTOTAL) & M_TAGPOOLTOTAL) +#define A_SGE_IDMA1_DROP_CNT 0x1108 #define A_SGE_INT_CAUSE5 0x110c #define S_ERR_T_RXCRC 31 @@ -1963,6 +2380,90 @@ #define V_EDMA0_SLEEP_REQ(x) ((x) << S_EDMA0_SLEEP_REQ) #define F_EDMA0_SLEEP_REQ V_EDMA0_SLEEP_REQ(1U) +#define A_SGE_INT_CAUSE6 0x1128 + +#define S_ERR_DB_SYNC 21 +#define V_ERR_DB_SYNC(x) ((x) << S_ERR_DB_SYNC) +#define F_ERR_DB_SYNC V_ERR_DB_SYNC(1U) + +#define S_ERR_GTS_SYNC 20 +#define V_ERR_GTS_SYNC(x) ((x) << S_ERR_GTS_SYNC) +#define F_ERR_GTS_SYNC V_ERR_GTS_SYNC(1U) + +#define S_FATAL_LARGE_COAL 19 +#define V_FATAL_LARGE_COAL(x) ((x) << S_FATAL_LARGE_COAL) +#define F_FATAL_LARGE_COAL V_FATAL_LARGE_COAL(1U) + +#define S_PL_BAR2_FRM_ERR 18 +#define V_PL_BAR2_FRM_ERR(x) ((x) << S_PL_BAR2_FRM_ERR) +#define F_PL_BAR2_FRM_ERR V_PL_BAR2_FRM_ERR(1U) + +#define S_SILENT_DROP_TX_COAL 17 +#define V_SILENT_DROP_TX_COAL(x) ((x) << S_SILENT_DROP_TX_COAL) +#define F_SILENT_DROP_TX_COAL V_SILENT_DROP_TX_COAL(1U) + +#define S_ERR_INV_CTXT4 16 +#define V_ERR_INV_CTXT4(x) ((x) << S_ERR_INV_CTXT4) +#define F_ERR_INV_CTXT4 V_ERR_INV_CTXT4(1U) + +#define S_ERR_BAD_DB_PIDX4 15 +#define V_ERR_BAD_DB_PIDX4(x) ((x) << S_ERR_BAD_DB_PIDX4) +#define F_ERR_BAD_DB_PIDX4 V_ERR_BAD_DB_PIDX4(1U) + +#define S_ERR_BAD_UPFL_INC_CREDIT4 14 +#define V_ERR_BAD_UPFL_INC_CREDIT4(x) ((x) << S_ERR_BAD_UPFL_INC_CREDIT4) +#define F_ERR_BAD_UPFL_INC_CREDIT4 V_ERR_BAD_UPFL_INC_CREDIT4(1U) + +#define S_FATAL_TAG_MISMATCH 13 +#define V_FATAL_TAG_MISMATCH(x) ((x) << S_FATAL_TAG_MISMATCH) +#define F_FATAL_TAG_MISMATCH V_FATAL_TAG_MISMATCH(1U) + +#define S_FATAL_ENQ_CTL_RDY 12 +#define V_FATAL_ENQ_CTL_RDY(x) ((x) << S_FATAL_ENQ_CTL_RDY) +#define F_FATAL_ENQ_CTL_RDY V_FATAL_ENQ_CTL_RDY(1U) + +#define S_ERR_PC_RSP_LEN3 11 +#define V_ERR_PC_RSP_LEN3(x) ((x) << S_ERR_PC_RSP_LEN3) +#define F_ERR_PC_RSP_LEN3 V_ERR_PC_RSP_LEN3(1U) + +#define S_ERR_PC_RSP_LEN2 10 +#define V_ERR_PC_RSP_LEN2(x) ((x) << S_ERR_PC_RSP_LEN2) +#define F_ERR_PC_RSP_LEN2 V_ERR_PC_RSP_LEN2(1U) + +#define S_ERR_PC_RSP_LEN1 9 +#define V_ERR_PC_RSP_LEN1(x) ((x) << S_ERR_PC_RSP_LEN1) +#define F_ERR_PC_RSP_LEN1 V_ERR_PC_RSP_LEN1(1U) + +#define S_ERR_PC_RSP_LEN0 8 +#define V_ERR_PC_RSP_LEN0(x) ((x) << S_ERR_PC_RSP_LEN0) +#define F_ERR_PC_RSP_LEN0 V_ERR_PC_RSP_LEN0(1U) + +#define S_FATAL_ENQ2LL_VLD 7 +#define V_FATAL_ENQ2LL_VLD(x) ((x) << S_FATAL_ENQ2LL_VLD) +#define F_FATAL_ENQ2LL_VLD V_FATAL_ENQ2LL_VLD(1U) + +#define S_FATAL_LL_EMPTY 6 +#define V_FATAL_LL_EMPTY(x) ((x) << S_FATAL_LL_EMPTY) +#define F_FATAL_LL_EMPTY V_FATAL_LL_EMPTY(1U) + +#define S_FATAL_OFF_WDENQ 5 +#define V_FATAL_OFF_WDENQ(x) ((x) << S_FATAL_OFF_WDENQ) +#define F_FATAL_OFF_WDENQ V_FATAL_OFF_WDENQ(1U) + +#define S_FATAL_DEQ_DRDY 3 +#define M_FATAL_DEQ_DRDY 0x3U +#define V_FATAL_DEQ_DRDY(x) ((x) << S_FATAL_DEQ_DRDY) +#define G_FATAL_DEQ_DRDY(x) (((x) >> S_FATAL_DEQ_DRDY) & M_FATAL_DEQ_DRDY) + +#define S_FATAL_OUTP_DRDY 1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue May 30 21:58:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E87EBEF100; Tue, 30 May 2017 21:58:54 +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 5E1487C264; Tue, 30 May 2017 21:58:54 +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 v4ULwrv8055514; Tue, 30 May 2017 21:58:53 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ULwrMB055511; Tue, 30 May 2017 21:58:53 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302158.v4ULwrMB055511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 21:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319256 - in stable/10/usr.bin: banner limits rpcinfo X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 21:58:54 -0000 Author: asomers Date: Tue May 30 21:58:53 2017 New Revision: 319256 URL: https://svnweb.freebsd.org/changeset/base/319256 Log: MFC r316500 (except the part to usr.bin/fortune) strcpy => strlcpy, strcat => strlcat Reported by: Coverity CID: 1006703 978863 1006745 1347163 Reviewed by: cem Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10192 Modified: stable/10/usr.bin/banner/banner.c stable/10/usr.bin/limits/limits.c stable/10/usr.bin/rpcinfo/rpcinfo.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/banner/banner.c ============================================================================== --- stable/10/usr.bin/banner/banner.c Tue May 30 21:57:25 2017 (r319255) +++ stable/10/usr.bin/banner/banner.c Tue May 30 21:58:53 2017 (r319256) @@ -1064,8 +1064,8 @@ main(int argc, char *argv[]) err(1, "malloc"); strcpy(message, *argv); while (*++argv) { - strcat(message, " "); - strcat(message, *argv); + strlcat(message, " ", j); + strlcat(message, *argv, j); } nchars = strlen(message); } else { Modified: stable/10/usr.bin/limits/limits.c ============================================================================== --- stable/10/usr.bin/limits/limits.c Tue May 30 21:57:25 2017 (r319255) +++ stable/10/usr.bin/limits/limits.c Tue May 30 21:58:53 2017 (r319256) @@ -549,7 +549,7 @@ print_limit(rlim_t limit, unsigned divisor, const char char numbr[64]; if (limit == RLIM_INFINITY) - strcpy(numbr, inf); + strlcpy(numbr, inf, sizeof(numbr)); else sprintf(numbr, "%jd", (intmax_t)((limit + divisor/2) / divisor)); printf(pfx, which, numbr); Modified: stable/10/usr.bin/rpcinfo/rpcinfo.c ============================================================================== --- stable/10/usr.bin/rpcinfo/rpcinfo.c Tue May 30 21:57:25 2017 (r319255) +++ stable/10/usr.bin/rpcinfo/rpcinfo.c Tue May 30 21:58:53 2017 (r319256) @@ -854,9 +854,9 @@ failed: printf("%-10s", buf); buf[0] = '\0'; for (nl = rs->nlist; nl; nl = nl->next) { - strcat(buf, nl->netid); + strlcat(buf, nl->netid, sizeof(buf)); if (nl->next) - strcat(buf, ","); + strlcat(buf, ",", sizeof(buf)); } printf("%-32s", buf); rpc = getrpcbynumber(rs->prog); From owner-svn-src-all@freebsd.org Tue May 30 22:02:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20103BEF31E; Tue, 30 May 2017 22:02: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 EFF097C74A; Tue, 30 May 2017 22:02:56 +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 v4UM2uWq059267; Tue, 30 May 2017 22:02:56 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UM2tCH059264; Tue, 30 May 2017 22:02:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302202.v4UM2tCH059264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:02:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319257 - in stable/10: etc/mtree usr.bin/pr usr.bin/pr/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:02:57 -0000 Author: asomers Date: Tue May 30 22:02:55 2017 New Revision: 319257 URL: https://svnweb.freebsd.org/changeset/base/319257 Log: MFC r316501, r316523 r316501: Fix file descriptor and memory leaks in pr(1) Also, hook NetBSD's pr test into the build, and add three more test cases. Reported by: Coverity, Valgrind CID: 271650 271651 271652 271653 271654 271655 271656 271656 CID: 271657 271658 271659 1006939 1006940 1006941 1006942 1009098 Reviewed by: ngie Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9137 r316523: Remove a duplicate fclose() that snuck into r316501 Reported by: Coverity CID: 1373338 X-MFC-With: 316501 Sponsored by: Spectra Logic Corp Added: stable/10/usr.bin/pr/tests/ - copied from r316501, head/usr.bin/pr/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/usr.bin/pr/Makefile stable/10/usr.bin/pr/pr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Tue May 30 21:58:53 2017 (r319256) +++ stable/10/etc/mtree/BSD.tests.dist Tue May 30 22:02:55 2017 (r319257) @@ -606,6 +606,8 @@ .. opensm .. + pr + .. printf .. sed Modified: stable/10/usr.bin/pr/Makefile ============================================================================== --- stable/10/usr.bin/pr/Makefile Tue May 30 21:58:53 2017 (r319256) +++ stable/10/usr.bin/pr/Makefile Tue May 30 22:02:55 2017 (r319257) @@ -1,7 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= pr SRCS= pr.c egetopt.c + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/usr.bin/pr/pr.c ============================================================================== --- stable/10/usr.bin/pr/pr.c Tue May 30 21:58:53 2017 (r319256) +++ stable/10/usr.bin/pr/pr.c Tue May 30 22:02:55 2017 (r319257) @@ -103,7 +103,7 @@ static char schar; /* text column separation characte static int sflag; /* -s option for multiple columns */ static int nohead; /* do not write head and trailer */ static int pgwd; /* page width with multiple col output */ -static const char *timefrmt; /* time conversion string */ +static char *timefrmt; /* time conversion string */ /* * misc globals @@ -135,6 +135,7 @@ main(int argc, char *argv[]) ret_val = horzcol(argc, argv); else ret_val = vertcol(argc, argv); + free(timefrmt); } else usage(); flsh_errs(); @@ -207,6 +208,7 @@ onecol(int argc, char *argv[]) * allocate header buffer */ if ((hbuf = malloc((unsigned)(HDBUF + offst)*sizeof(char))) == NULL) { + free(obuf); mfail(); return(1); } @@ -259,7 +261,7 @@ onecol(int argc, char *argv[]) break; if (!linecnt && !nohead && prhead(hbuf, fname, pagecnt)) - return(1); + goto err; /* * start of new line. @@ -268,9 +270,9 @@ onecol(int argc, char *argv[]) if (num) addnum(nbuf, num, ++lncnt); if (otln(obuf,cnt+off, &ips, &ops, mor)) - return(1); + goto err; } else if (otln(lbuf, cnt, &ips, &ops, mor)) - return(1); + goto err; /* * if line bigger than buffer, get more @@ -293,7 +295,7 @@ onecol(int argc, char *argv[]) * fill to end of page */ if (linecnt && prtail(lines-linecnt-lrgln, lrgln)) - return(1); + goto err; /* * On EOF go to next file @@ -306,8 +308,14 @@ onecol(int argc, char *argv[]) (void)fclose(inf); } if (eoptind < argc) - return(1); + goto err; + free(hbuf); + free(obuf); return(0); +err: + free(hbuf); + free(obuf); + return(1); } /* @@ -317,27 +325,27 @@ int vertcol(int argc, char *argv[]) { char *ptbf; - char **lstdat; + char **lstdat = NULL; int i; int j; int cnt = -1; int pln; - int *indy; + int *indy = NULL; int cvc; - int *lindy; + int *lindy = NULL; int lncnt; int stp; int pagecnt; int col = colwd + 1; int mxlen = pgwd + offst + 1; int mclcnt = clcnt - 1; - struct vcol *vc; + struct vcol *vc = NULL; int mvc; int tvc; int cw = nmwd + 1; int fullcol; - char *buf; - char *hbuf; + char *buf = NULL; + char *hbuf = NULL; char *ohbuf; const char *fname; FILE *inf; @@ -345,6 +353,7 @@ vertcol(int argc, char *argv[]) int cps = 0; int ops = 0; int mor = 0; + int retval = 1; /* * allocate page buffer @@ -359,7 +368,7 @@ vertcol(int argc, char *argv[]) */ if ((hbuf = malloc((unsigned)(HDBUF + offst)*sizeof(char))) == NULL) { mfail(); - return(1); + goto out; } ohbuf = hbuf + offst; if (offst) @@ -372,7 +381,7 @@ vertcol(int argc, char *argv[]) if ((vc = (struct vcol *)malloc((unsigned)mvc*sizeof(struct vcol))) == NULL) { mfail(); - return(1); + goto out; } /* @@ -380,7 +389,7 @@ vertcol(int argc, char *argv[]) */ if ((lstdat = (char **)malloc((unsigned)lines*sizeof(char *))) == NULL){ mfail(); - return(1); + goto out; } /* @@ -388,11 +397,11 @@ vertcol(int argc, char *argv[]) */ if ((indy = (int *)malloc((unsigned)lines*sizeof(int))) == NULL) { mfail(); - return(1); + goto out; } if ((lindy = (int *)malloc((unsigned)lines*sizeof(int))) == NULL) { mfail(); - return(1); + goto out; } if (nmwd) @@ -533,12 +542,13 @@ vertcol(int argc, char *argv[]) * print header */ if (!nohead && prhead(hbuf, fname, pagecnt)) - return(1); + goto out; for (i = 0; i < pln; ++i) { ips = 0; ops = 0; - if (offst&& otln(buf,offst,&ips,&ops,1)) - return(1); + if (offst && + otln(buf,offst,&ips,&ops,1)) + goto out; tvc = i; for (j = 0; j < clcnt; ++j) { @@ -563,7 +573,7 @@ vertcol(int argc, char *argv[]) cnt = fullcol; if (otln(vc[tvc].pt, cnt, &ips, &ops, 1)) - return(1); + goto out; tvc += pln; if (tvc >= cvc) break; @@ -572,13 +582,13 @@ vertcol(int argc, char *argv[]) * terminate line */ if (otln(buf, 0, &ips, &ops, 0)) - return(1); + goto out; } /* * pad to end of page */ if (prtail((lines - pln), 0)) - return(1); + goto out; /* * done with output, go to next file */ @@ -597,7 +607,7 @@ vertcol(int argc, char *argv[]) * print header */ if (pln && !nohead && prhead(hbuf, fname, pagecnt)) - return(1); + goto out; /* * output each line @@ -607,14 +617,14 @@ vertcol(int argc, char *argv[]) if ((j = lstdat[i] - ptbf) <= offst) break; if (otln(ptbf, j, &ips, &ops, 0)) - return(1); + goto out; } /* * pad to end of page */ if (pln && prtail((lines - pln), 0)) - return(1); + goto out; /* * if EOF go to next file @@ -627,8 +637,16 @@ vertcol(int argc, char *argv[]) (void)fclose(inf); } if (eoptind < argc) - return(1); - return(0); + goto out; + retval = 0; +out: + free(lindy); + free(indy); + free(lstdat); + free(vc); + free(hbuf); + free(buf); + return(retval); } /* @@ -665,6 +683,7 @@ horzcol(int argc, char *argv[]) * page header */ if ((hbuf = malloc((unsigned)(HDBUF + offst)*sizeof(char))) == NULL) { + free(buf); mfail(); return(1); } @@ -744,19 +763,19 @@ horzcol(int argc, char *argv[]) break; if (!i && !nohead && prhead(hbuf, fname, pagecnt)) - return(1); + goto err; /* * output line */ if (otln(buf, j, &ips, &ops, 0)) - return(1); + goto err; } /* * pad to end of page */ if (i && prtail(lines-i, 0)) - return(1); + goto err; /* * if EOF go to next file @@ -769,8 +788,14 @@ horzcol(int argc, char *argv[]) (void)fclose(inf); } if (eoptind < argc) - return(1); + goto err; + free(hbuf); + free(buf); return(0); +err: + free(hbuf); + free(buf); + return(1); } /* @@ -786,27 +811,28 @@ mulfile(int argc, char *argv[]) int cnt; char *lstdat; int i; - FILE **fbuf; + FILE **fbuf = NULL; int actf; int lncnt; int col; int pagecnt; int fproc; - char *buf; - char *hbuf; + char *buf = NULL; + char *hbuf = NULL; char *ohbuf; const char *fname; int ips = 0; int cps = 0; int ops = 0; int mor = 0; + int retval = 1; /* * array of FILE *, one for each operand */ if ((fbuf = (FILE **)malloc((unsigned)clcnt*sizeof(FILE *))) == NULL) { mfail(); - return(1); + goto out; } /* @@ -814,7 +840,7 @@ mulfile(int argc, char *argv[]) */ if ((hbuf = malloc((unsigned)(HDBUF + offst)*sizeof(char))) == NULL) { mfail(); - return(1); + goto out; } ohbuf = hbuf + offst; @@ -838,7 +864,7 @@ mulfile(int argc, char *argv[]) * if no files, exit */ if (!j) - return(1); + goto out; /* * calculate page boundaries based on open file count @@ -854,7 +880,7 @@ mulfile(int argc, char *argv[]) if (colwd < 1) { (void)fprintf(err, "pr: page width too small for %d columns\n", clcnt); - return(1); + goto out; } actf = clcnt; col = colwd + 1; @@ -864,7 +890,7 @@ mulfile(int argc, char *argv[]) */ if ((buf = malloc((unsigned)(pgwd+offst+1)*sizeof(char))) == NULL) { mfail(); - return(1); + goto out; } if (offst) { (void)memset(buf, (int)' ', offst); @@ -951,13 +977,13 @@ mulfile(int argc, char *argv[]) break; if (!i && !nohead && prhead(hbuf, fname, pagecnt)) - return(1); + goto out; /* * output line */ if (otln(buf, j, &ips, &ops, 0)) - return(1); + goto out; /* * if no more active files, done @@ -972,12 +998,17 @@ mulfile(int argc, char *argv[]) * pad to end of page */ if (i && prtail(lines-i, 0)) - return(1); + goto out; ++pagecnt; } if (eoptind < argc) - return(1); - return(0); + goto out; + retval = 0; +out: + free(buf); + free(hbuf); + free(fbuf); + return(retval); } /* @@ -1344,6 +1375,7 @@ nxtfile(int argc, char **argv, const char **fname, cha (void)fprintf(err, "pr: cannot get time of day, %s\n", strerror(errno)); + fclose(inf); return(NULL); } timeptr = localtime(&tv_sec); @@ -1725,7 +1757,9 @@ setup(int argc, char *argv[]) break; case 'w': ++wflag; - if (!isdigit((unsigned char)*eoptarg) || ((pgwd = atoi(eoptarg)) < 1)){ + if ((eoptarg == NULL ) || + !isdigit((unsigned char)*eoptarg) || + ((pgwd = atoi(eoptarg)) < 1)){ (void)fputs( "pr: -w width must be 1 or more \n",err); return(1); From owner-svn-src-all@freebsd.org Tue May 30 22:33:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B471DBEFB94; Tue, 30 May 2017 22:33:25 +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 847827D41E; Tue, 30 May 2017 22:33:25 +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 v4UMXOIb071482; Tue, 30 May 2017 22:33:24 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMXO7I071480; Tue, 30 May 2017 22:33:24 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302233.v4UMXO7I071480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:33:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319258 - in stable/10/sbin/geom: class/part misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:33:25 -0000 Author: asomers Date: Tue May 30 22:33:24 2017 New Revision: 319258 URL: https://svnweb.freebsd.org/changeset/base/319258 Log: MFC r316535: Fix memory leak in "gpart bootcode" Also, annotate that gpart_issue never returns Reported by: Coverity CID: 1007105 Sponsored by: Spectra Logic Corp Modified: stable/10/sbin/geom/class/part/geom_part.c stable/10/sbin/geom/misc/subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/10/sbin/geom/class/part/geom_part.c Tue May 30 22:02:55 2017 (r319257) +++ stable/10/sbin/geom/class/part/geom_part.c Tue May 30 22:33:24 2017 (r319258) @@ -81,7 +81,7 @@ static int gpart_autofill(struct gctl_req *); static int gpart_autofill_resize(struct gctl_req *); static void gpart_bootcode(struct gctl_req *, unsigned int); static void *gpart_bootfile_read(const char *, ssize_t *); -static void gpart_issue(struct gctl_req *, unsigned int); +static _Noreturn void gpart_issue(struct gctl_req *, unsigned int); static void gpart_show(struct gctl_req *, unsigned int); static void gpart_show_geom(struct ggeom *, const char *, int); static int gpart_show_hasopt(struct gctl_req *, const char *, const char *); @@ -1259,6 +1259,7 @@ gpart_bootcode(struct gctl_req *req, unsigned int fl) gpart_issue(req, fl); geom_deletetree(&mesh); + free(partcode); } static void @@ -1279,7 +1280,7 @@ gpart_print_error(const char *errstr) warnx("%s", errmsg); } -static void +static _Noreturn void gpart_issue(struct gctl_req *req, unsigned int fl __unused) { char buf[4096]; Modified: stable/10/sbin/geom/misc/subr.c ============================================================================== --- stable/10/sbin/geom/misc/subr.c Tue May 30 22:02:55 2017 (r319257) +++ stable/10/sbin/geom/misc/subr.c Tue May 30 22:33:24 2017 (r319258) @@ -336,7 +336,7 @@ g_metadata_clear(const char *name, const char *magic) goto out; } sectorsize = g_sectorsize(fd); - if (sectorsize == 0) { + if (sectorsize <= 0) { error = errno; goto out; } @@ -365,8 +365,7 @@ g_metadata_clear(const char *name, const char *magic) } (void)g_flush(fd); out: - if (sector != NULL) - free(sector); + free(sector); g_close(fd); return (error); } From owner-svn-src-all@freebsd.org Tue May 30 22:34:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AF7CBEFCBC; Tue, 30 May 2017 22:34:44 +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 656F37D672; Tue, 30 May 2017 22:34:44 +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 v4UMYhQ7071584; Tue, 30 May 2017 22:34:43 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMYhdY071581; Tue, 30 May 2017 22:34:43 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302234.v4UMYhdY071581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319259 - in stable/10/etc/periodic: daily monthly weekly X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:34:44 -0000 Author: asomers Date: Tue May 30 22:34:43 2017 New Revision: 319259 URL: https://svnweb.freebsd.org/changeset/base/319259 Log: MFC r316548: Quiet 450.status-security when *_inline="YES" Previously, 450.status-security would always set rc=3 in inline mode, because it doesn't know whether "periodic security" is going to find anything interesting. But this annoyingly results in daily reports that simply say "Security check: \n\n-- End of daily output --". This change fixes that by testing whether "periodic security" printed anything, and setting 450.status-security's exit status to 3 if it did. An alternative would be to change the exit status of periodic(8) to be the worst of its scripts' exit statuses, but that would be a more intrusive change. Reviewed by: brian Differential Revision: https://reviews.freebsd.org/D10267 Modified: stable/10/etc/periodic/daily/450.status-security stable/10/etc/periodic/monthly/450.status-security stable/10/etc/periodic/weekly/450.status-security Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/daily/450.status-security ============================================================================== --- stable/10/etc/periodic/daily/450.status-security Tue May 30 22:33:24 2017 (r319258) +++ stable/10/etc/periodic/daily/450.status-security Tue May 30 22:34:43 2017 (r319259) @@ -22,19 +22,25 @@ case "$daily_status_security_enable" in esac export security_output="${daily_status_security_output}" + rc=0 case "${daily_status_security_output}" in "") - rc=3;; + if tempfile=`mktemp ${TMPDIR:-/tmp}/450.status-security.XXXXXX` + then + periodic security > $tempfile || rc=3 + if [ -s "$tempfile" ]; then + cat "$tempfile" + rc=3 + fi + rm -f "$tempfile" + fi;; /*) echo " (output logged separately)" - rc=0;; + periodic security || rc=3;; *) echo " (output mailed separately)" - rc=0;; - esac - - periodic security || rc=3;; - + periodic security || rc=3;; + esac;; *) rc=0;; esac Modified: stable/10/etc/periodic/monthly/450.status-security ============================================================================== --- stable/10/etc/periodic/monthly/450.status-security Tue May 30 22:33:24 2017 (r319258) +++ stable/10/etc/periodic/monthly/450.status-security Tue May 30 22:34:43 2017 (r319259) @@ -22,19 +22,25 @@ case "$monthly_status_security_enable" in esac export security_output="${monthly_status_security_output}" + rc=0 case "${monthly_status_security_output}" in "") - rc=3;; + if tempfile=`mktemp ${TMPDIR:-/tmp}/450.status-security.XXXXXX` + then + periodic security > $tempfile || rc=3 + if [ -s "$tempfile" ]; then + cat "$tempfile" + rc=3 + fi + rm -f "$tempfile" + fi;; /*) echo " (output logged separately)" - rc=0;; + periodic security || rc=3;; *) echo " (output mailed separately)" - rc=0;; - esac - - periodic security || rc=3;; - + periodic security || rc=3;; + esac;; *) rc=0;; esac Modified: stable/10/etc/periodic/weekly/450.status-security ============================================================================== --- stable/10/etc/periodic/weekly/450.status-security Tue May 30 22:33:24 2017 (r319258) +++ stable/10/etc/periodic/weekly/450.status-security Tue May 30 22:34:43 2017 (r319259) @@ -22,19 +22,25 @@ case "$weekly_status_security_enable" in esac export security_output="${weekly_status_security_output}" + rc=0 case "${weekly_status_security_output}" in "") - rc=3;; + if tempfile=`mktemp ${TMPDIR:-/tmp}/450.status-security.XXXXXX` + then + periodic security > $tempfile || rc=3 + if [ -s "$tempfile" ]; then + cat "$tempfile" + rc=3 + fi + rm -f "$tempfile" + fi;; /*) echo " (output logged separately)" - rc=0;; + periodic security || rc=3;; *) echo " (output mailed separately)" - rc=0;; - esac - - periodic security || rc=3;; - + periodic security || rc=3;; + esac;; *) rc=0;; esac From owner-svn-src-all@freebsd.org Tue May 30 22:35:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3B66BEFDC2; Tue, 30 May 2017 22:35: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 83F267D8BA; Tue, 30 May 2017 22:35: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 v4UMZaPp071679; Tue, 30 May 2017 22:35:36 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMZafU071678; Tue, 30 May 2017 22:35:36 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302235.v4UMZafU071678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319260 - stable/10/usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:35:37 -0000 Author: asomers Date: Tue May 30 22:35:36 2017 New Revision: 319260 URL: https://svnweb.freebsd.org/changeset/base/319260 Log: MFC r316610: usr.bin/netstat: strcpy -> strlcpy Reported by: Coverity CID: 1006741, 1006744 Sponsored by: Spectra Logic Corp Modified: stable/10/usr.bin/netstat/inet6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/inet6.c ============================================================================== --- stable/10/usr.bin/netstat/inet6.c Tue May 30 22:34:43 2017 (r319259) +++ stable/10/usr.bin/netstat/inet6.c Tue May 30 22:35:36 2017 (r319260) @@ -527,7 +527,7 @@ ip6_ifstats(char *ifname) return; } - strcpy(ifr.ifr_name, ifname); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(s, SIOCGIFSTAT_IN6, (char *)&ifr) < 0) { if (errno != EPFNOSUPPORT) perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); @@ -921,7 +921,7 @@ icmp6_ifstats(char *ifname) return; } - strcpy(ifr.ifr_name, ifname); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(s, SIOCGIFSTAT_ICMP6, (char *)&ifr) < 0) { if (errno != EPFNOSUPPORT) perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); From owner-svn-src-all@freebsd.org Tue May 30 22:36:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4174BEFE93; Tue, 30 May 2017 22:36:25 +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 71E517DA3D; Tue, 30 May 2017 22:36:25 +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 v4UMaOCr071764; Tue, 30 May 2017 22:36:24 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMaOHF071763; Tue, 30 May 2017 22:36:24 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302236.v4UMaOHF071763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319261 - stable/10/sbin/mount X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:36:25 -0000 Author: asomers Date: Tue May 30 22:36:24 2017 New Revision: 319261 URL: https://svnweb.freebsd.org/changeset/base/319261 Log: MFC r316611: sbin/mount: strcpy -> strlcpy Reported by: Coverity CID: 1011173, 1011174 Sponsored by: Spectra Logic Corp Modified: stable/10/sbin/mount/mount.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount/mount.c ============================================================================== --- stable/10/sbin/mount/mount.c Tue May 30 22:35:36 2017 (r319260) +++ stable/10/sbin/mount/mount.c Tue May 30 22:36:24 2017 (r319261) @@ -597,7 +597,7 @@ mountfs(const char *vfstype, const char *spec, const c append_arg(&mnt_argv, execname); mangle(optbuf, &mnt_argv); if (mountprog != NULL) - strcpy(execname, mountprog); + strlcpy(execname, mountprog, sizeof(execname)); append_arg(&mnt_argv, strdup(spec)); append_arg(&mnt_argv, strdup(name)); @@ -905,8 +905,9 @@ putfsent(struct statfs *ent) if (strncmp(ent->f_mntfromname, "", 7) == 0 || strncmp(ent->f_mntfromname, "", 7) == 0) { - strcpy(ent->f_mntfromname, (strnstr(ent->f_mntfromname, ":", 8) - +1)); + strlcpy(ent->f_mntfromname, + (strnstr(ent->f_mntfromname, ":", 8) +1), + sizeof(ent->f_mntfromname)); } l = strlen(ent->f_mntfromname); From owner-svn-src-all@freebsd.org Tue May 30 22:41:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD31BBF0184; Tue, 30 May 2017 22:41:20 +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 881157DF3E; Tue, 30 May 2017 22:41:20 +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 v4UMfJce072655; Tue, 30 May 2017 22:41:19 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMfJTB072654; Tue, 30 May 2017 22:41:19 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302241.v4UMfJTB072654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319262 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:41:20 -0000 Author: asomers Date: Tue May 30 22:41:19 2017 New Revision: 319262 URL: https://svnweb.freebsd.org/changeset/base/319262 Log: MFC r316760: Fix vdev_geom_attach_by_guids for partitioned disks When opening a vdev whose path is unknown, vdev_geom must find a geom provider with a label whose guids match the desired vdev. However, due to partitioning, it is possible that two non-synonomous providers will share some labels. For example, if the first partition starts at the beginning of the drive, then ada0 and ada0p1 will share the first label. More troubling, if the last partition runs to the end of the drive, then ada0p3 and ada0 will share the last label. If vdev_geom opens ada0 when it should've opened ada0p3, then the pool won't be readable. If it opens ada0 when it should've opened ada0p1, then it will corrupt some other partition when it writes the 3rd and 4th labels. The easiest way to reproduce this problem is to install a mirrored root pool with the default partition layout, then swap the positions of the two boot drives and reboot. Whether the bug manifests depends on the order in which geom lists its providers, which is arbitrary. Fix this situation by modifying the search algorithm to prefer geom providers that have all four labels intact. If no such provider exists, then open whichever provider has the most. Reviewed by: mav Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10365 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue May 30 22:36:24 2017 (r319261) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue May 30 22:41:19 2017 (r319262) @@ -402,12 +402,17 @@ vdev_geom_io(struct g_consumer *cp, int *cmds, void ** kmem_free(bios, bios_size); } +/* + * Read the vdev config from a device. Return the number of valid labels that + * were found. The vdev config will be returned in config if and only if at + * least one valid label was found. + */ static int vdev_geom_read_config(struct g_consumer *cp, nvlist_t **config) { struct g_provider *pp; vdev_phys_t *vdev_lists[VDEV_LABELS]; - char *p, *buf; + char *buf; size_t buflen; uint64_t psize, state, txg; off_t offsets[VDEV_LABELS]; @@ -415,7 +420,7 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t off_t sizes[VDEV_LABELS]; int cmds[VDEV_LABELS]; int errors[VDEV_LABELS]; - int l, len; + int l, nlabels; g_topology_assert_not(); @@ -446,6 +451,7 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t VDEV_LABELS); /* Parse the labels */ + nlabels = 0; for (l = 0; l < VDEV_LABELS; l++) { if (errors[l] != 0) continue; @@ -471,14 +477,14 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t continue; } - break; + nlabels++; } /* Free the label storage */ for (l = 0; l < VDEV_LABELS; l++) kmem_free(vdev_lists[l], size); - return (*config == NULL ? ENOENT : 0); + return (nlabels); } static void @@ -561,7 +567,7 @@ vdev_geom_read_pool_label(const char *name, struct g_consumer *zcp; nvlist_t *vdev_cfg; uint64_t pool_guid; - int error; + int error, nlabels; DROP_GIANT(); g_topology_lock(); @@ -582,10 +588,10 @@ vdev_geom_read_pool_label(const char *name, if (zcp == NULL) continue; g_topology_unlock(); - error = vdev_geom_read_config(zcp, &vdev_cfg); + nlabels = vdev_geom_read_config(zcp, &vdev_cfg); g_topology_lock(); vdev_geom_detach(zcp, B_TRUE); - if (error) + if (nlabels == 0) continue; ZFS_LOG(1, "successfully read vdev config"); @@ -601,9 +607,13 @@ vdev_geom_read_pool_label(const char *name, } enum match { - NO_MATCH, - TOP_MATCH, - FULL_MATCH + NO_MATCH = 0, /* No matching labels found */ + TOPGUID_MATCH = 1, /* Labels match top guid, not vdev guid*/ + ZERO_MATCH = 1, /* Should never be returned */ + ONE_MATCH = 2, /* 1 label matching the vdev_guid */ + TWO_MATCH = 3, /* 2 label matching the vdev_guid */ + THREE_MATCH = 4, /* 3 label matching the vdev_guid */ + FULL_MATCH = 5 /* all labels match the vdev_guid */ }; static enum match @@ -612,6 +622,7 @@ vdev_attach_ok(vdev_t *vd, struct g_provider *pp) nvlist_t *config; uint64_t pool_guid, top_guid, vdev_guid; struct g_consumer *cp; + int nlabels; cp = vdev_geom_attach(pp, NULL); if (cp == NULL) { @@ -620,7 +631,8 @@ vdev_attach_ok(vdev_t *vd, struct g_provider *pp) return (NO_MATCH); } g_topology_unlock(); - if (vdev_geom_read_config(cp, &config) != 0) { + nlabels = vdev_geom_read_config(cp, &config); + if (nlabels == 0) { g_topology_lock(); vdev_geom_detach(cp, B_TRUE); ZFS_LOG(1, "Unable to read config from %s.", pp->name); @@ -655,10 +667,10 @@ vdev_attach_ok(vdev_t *vd, struct g_provider *pp) */ if (vdev_guid == vd->vdev_guid) { ZFS_LOG(1, "guids match for provider %s.", pp->name); - return (FULL_MATCH); + return (ZERO_MATCH + nlabels); } else if (top_guid == vd->vdev_guid && vd == vd->vdev_top) { ZFS_LOG(1, "top vdev guid match for provider %s.", pp->name); - return (TOP_MATCH); + return (TOPGUID_MATCH); } ZFS_LOG(1, "vdev guid mismatch for provider %s: %ju != %ju.", pp->name, (uintmax_t)vd->vdev_guid, (uintmax_t)vdev_guid); @@ -670,13 +682,15 @@ vdev_geom_attach_by_guids(vdev_t *vd) { struct g_class *mp; struct g_geom *gp; - struct g_provider *pp; + struct g_provider *pp, *best_pp; struct g_consumer *cp; - enum match m; + enum match match, best_match; g_topology_assert(); cp = NULL; + best_pp = NULL; + best_match = NO_MATCH; LIST_FOREACH(mp, &g_classes, class) { if (mp == &zfs_vdev_class) continue; @@ -684,24 +698,23 @@ vdev_geom_attach_by_guids(vdev_t *vd) if (gp->flags & G_GEOM_WITHER) continue; LIST_FOREACH(pp, &gp->provider, provider) { - m = vdev_attach_ok(vd, pp); - if (m == NO_MATCH) - continue; - if (cp != NULL) { - if (m == FULL_MATCH) - vdev_geom_detach(cp, B_TRUE); - else - continue; + match = vdev_attach_ok(vd, pp); + if (match > best_match) { + best_match = match; + best_pp = pp; } - cp = vdev_geom_attach(pp, vd); - if (cp == NULL) { - printf("ZFS WARNING: Unable to " - "attach to %s.\n", pp->name); - continue; - } - if (m == FULL_MATCH) - return (cp); + if (match == FULL_MATCH) + goto out; } + } + } + +out: + if (best_pp) { + cp = vdev_geom_attach(best_pp, vd); + if (cp == NULL) { + printf("ZFS WARNING: Unable to attach to %s.\n", + best_pp->name); } } return (cp); From owner-svn-src-all@freebsd.org Tue May 30 22:43:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89C3EBF0252; Tue, 30 May 2017 22:43:09 +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 577967E31F; Tue, 30 May 2017 22:43:09 +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 v4UMh8pu075618; Tue, 30 May 2017 22:43:08 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMh8eb075617; Tue, 30 May 2017 22:43:08 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302243.v4UMh8eb075617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319263 - stable/10/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:43:09 -0000 Author: asomers Date: Tue May 30 22:43:08 2017 New Revision: 319263 URL: https://svnweb.freebsd.org/changeset/base/319263 Log: MFC r316856: MFV 316855 7900 zdb shouldn't print the path of a znode at verbosity < 5 Reviewed by: Paul Dagnelie Reviewed by: Matt Ahrens Approved by: Dan McDonald Author: Alan Somers illumos/illumos-gate@e548d2fa41d1baa06662ed9abbb8bcec86e27dd9 https://www.illumos.org/issues/7900 Sponsored by: Spectra Logic Corp Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue May 30 22:41:19 2017 (r319262) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue May 30 22:43:08 2017 (r319263) @@ -1719,23 +1719,19 @@ dump_znode(objset_t *os, uint64_t object, void *data, return; } - error = zfs_obj_to_path(os, object, path, sizeof (path)); - if (error != 0) { - (void) snprintf(path, sizeof (path), "\?\?\?", - (u_longlong_t)object); - } - if (dump_opt['d'] < 3) { - (void) printf("\t%s\n", path); - (void) sa_handle_destroy(hdl); - return; - } - z_crtime = (time_t)crtm[0]; z_atime = (time_t)acctm[0]; z_mtime = (time_t)modtm[0]; z_ctime = (time_t)chgtm[0]; - (void) printf("\tpath %s\n", path); + if (dump_opt['d'] > 4) { + error = zfs_obj_to_path(os, object, path, sizeof (path)); + if (error != 0) { + (void) snprintf(path, sizeof (path), + "\?\?\?", (u_longlong_t)object); + } + (void) printf("\tpath %s\n", path); + } dump_uidgid(os, uid, gid); (void) printf("\tatime %s", ctime(&z_atime)); (void) printf("\tmtime %s", ctime(&z_mtime)); From owner-svn-src-all@freebsd.org Tue May 30 22:44:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2458EBF02C7; Tue, 30 May 2017 22:44:07 +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 E84267E483; Tue, 30 May 2017 22:44:06 +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 v4UMi6Ih075729; Tue, 30 May 2017 22:44:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMi6kE075728; Tue, 30 May 2017 22:44:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302244.v4UMi6kE075728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:44:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319264 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:44:07 -0000 Author: asomers Date: Tue May 30 22:44:05 2017 New Revision: 319264 URL: https://svnweb.freebsd.org/changeset/base/319264 Log: MFC r317715: ifconfig displays ND6_IFF_NO_DAD as "IGNORELOOP" PR: 218958 Reviewed by: kristof Differential Revision: https://reviews.freebsd.org/D10543 Modified: stable/10/sbin/ifconfig/af_nd6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/af_nd6.c ============================================================================== --- stable/10/sbin/ifconfig/af_nd6.c Tue May 30 22:43:08 2017 (r319263) +++ stable/10/sbin/ifconfig/af_nd6.c Tue May 30 22:44:05 2017 (r319264) @@ -58,8 +58,7 @@ static const char rcsid[] = #define MAX_SYSCTL_TRY 5 #define ND6BITS "\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \ "\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \ - "\007NO_RADR\010NO_PREFER_IFACE\011IGNORELOOP\012NO_DAD" \ - "\020DEFAULTIF" + "\007NO_RADR\010NO_PREFER_IFACE\011NO_DAD\020DEFAULTIF" static int isnd6defif(int); void setnd6flags(const char *, int, int, const struct afswtch *); From owner-svn-src-all@freebsd.org Tue May 30 22:45:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 698DCBF0335; Tue, 30 May 2017 22:45:03 +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 438617E5B9; Tue, 30 May 2017 22:45:03 +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 v4UMj2uU075857; Tue, 30 May 2017 22:45:02 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMj1CB075853; Tue, 30 May 2017 22:45:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302245.v4UMj1CB075853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:45:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319265 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:45:03 -0000 Author: asomers Date: Tue May 30 22:45:01 2017 New Revision: 319265 URL: https://svnweb.freebsd.org/changeset/base/319265 Log: MFC r317755, r317758 r317755: Various Coverity fixes in ifconfig(8) * Exit early if kldload(2) fails (1011259). This is the only change that affects ifconfig's behavior. * Close memory and resource leaks (1305624, 1305205, 1007100) * Mark usage() as _Noreturn (1305806, 1305750) * Fix some dereference after null checks (1011474, 270774) Reported by: Coverity CID: 1305624, 1305205, 1007100, 1305806, 1305750, 1011474, CID: 270774, 1011259 Reviewed by: cem Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10587 r317758: Unbreak ifconfig for mlx4en(4) after r317755 ifconfig doesn't correctly infer mlx interfaces' module names, so it will attempt to load the mlx(4) module even when not necessary. Reported by: rstone X-MFC-With: 317755 Sponsored by: Spectra Logic Corp Modified: stable/10/sbin/ifconfig/af_inet6.c stable/10/sbin/ifconfig/ifclone.c stable/10/sbin/ifconfig/ifconfig.c stable/10/sbin/ifconfig/iflagg.c stable/10/sbin/ifconfig/ifpfsync.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/10/sbin/ifconfig/af_inet6.c Tue May 30 22:44:05 2017 (r319264) +++ stable/10/sbin/ifconfig/af_inet6.c Tue May 30 22:45:01 2017 (r319265) @@ -336,12 +336,14 @@ in6_getaddr(const char *s, int which) bzero(&hints, sizeof(struct addrinfo)); hints.ai_family = AF_INET6; error = getaddrinfo(s, NULL, &hints, &res); + if (error != 0) { + if (inet_pton(AF_INET6, s, &sin->sin6_addr) != 1) + errx(1, "%s: bad value", s); + } else { + bcopy(res->ai_addr, sin, res->ai_addrlen); + freeaddrinfo(res); + } } - if (error != 0) { - if (inet_pton(AF_INET6, s, &sin->sin6_addr) != 1) - errx(1, "%s: bad value", s); - } else - bcopy(res->ai_addr, sin, res->ai_addrlen); } static int Modified: stable/10/sbin/ifconfig/ifclone.c ============================================================================== --- stable/10/sbin/ifconfig/ifclone.c Tue May 30 22:44:05 2017 (r319264) +++ stable/10/sbin/ifconfig/ifclone.c Tue May 30 22:45:01 2017 (r319265) @@ -87,6 +87,7 @@ list_cloners(void) putchar('\n'); free(buf); + close(s); } struct clone_defcb { Modified: stable/10/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.c Tue May 30 22:44:05 2017 (r319264) +++ stable/10/sbin/ifconfig/ifconfig.c Tue May 30 22:45:01 2017 (r319265) @@ -103,7 +103,7 @@ static int ifconfig(int argc, char *const *argv, int i static void status(const struct afswtch *afp, const struct sockaddr_dl *sdl, struct ifaddrs *ifa); static void tunnel_status(int s); -static void usage(void); +static void usage(void) _Noreturn; static struct afswtch *af_getbyname(const char *name); static struct afswtch *af_getbyfamily(int af); @@ -577,26 +577,24 @@ top: */ p = (setaddr ? &setifdstaddr_cmd : &setifaddr_cmd); } - if (p->c_u.c_func || p->c_u.c_func2) { - if (p->c_parameter == NEXTARG) { - if (argv[1] == NULL) - errx(1, "'%s' requires argument", - p->c_name); - p->c_u.c_func(argv[1], 0, s, afp); + if (p->c_parameter == NEXTARG && p->c_u.c_func) { + if (argv[1] == NULL) + errx(1, "'%s' requires argument", + p->c_name); + p->c_u.c_func(argv[1], 0, s, afp); + argc--, argv++; + } else if (p->c_parameter == OPTARG && p->c_u.c_func) { + p->c_u.c_func(argv[1], 0, s, afp); + if (argv[1] != NULL) argc--, argv++; - } else if (p->c_parameter == OPTARG) { - p->c_u.c_func(argv[1], 0, s, afp); - if (argv[1] != NULL) - argc--, argv++; - } else if (p->c_parameter == NEXTARG2) { - if (argc < 3) - errx(1, "'%s' requires 2 arguments", - p->c_name); - p->c_u.c_func2(argv[1], argv[2], s, afp); - argc -= 2, argv += 2; - } else - p->c_u.c_func(*argv, p->c_parameter, s, afp); - } + } else if (p->c_parameter == NEXTARG2 && p->c_u.c_func2) { + if (argc < 3) + errx(1, "'%s' requires 2 arguments", + p->c_name); + p->c_u.c_func2(argv[1], argv[2], s, afp); + argc -= 2, argv += 2; + } else if (p->c_u.c_func) + p->c_u.c_func(*argv, p->c_parameter, s, afp); argc--, argv++; } @@ -1086,8 +1084,8 @@ printb(const char *s, unsigned v, const char *bits) printf("%s=%o", s, v); else printf("%s=%x", s, v); - bits++; if (bits) { + bits++; putchar('<'); while ((i = *bits++) != '\0') { if (v & (1 << (i-1))) { @@ -1165,8 +1163,11 @@ ifmaybeload(const char *name) } } - /* not present, we should try to load it */ - kldload(ifkind); + /* + * Try to load the module. But ignore failures, because ifconfig can't + * infer the names of all drivers (eg mlx4en(4)). + */ + (void) kldload(ifkind); } static struct cmd basic_cmds[] = { Modified: stable/10/sbin/ifconfig/iflagg.c ============================================================================== --- stable/10/sbin/ifconfig/iflagg.c Tue May 30 22:44:05 2017 (r319264) +++ stable/10/sbin/ifconfig/iflagg.c Tue May 30 22:45:01 2017 (r319265) @@ -187,24 +187,17 @@ static void lagg_status(int s) { struct lagg_protos lpr[] = LAGG_PROTOS; - struct lagg_reqport rp, rpbuf[LAGG_MAX_PORTS]; + struct lagg_reqport rpbuf[LAGG_MAX_PORTS]; struct lagg_reqall ra; struct lagg_reqopts ro; struct lagg_reqflags rf; struct lacp_opreq *lp; const char *proto = ""; - int i, isport = 0; + int i; - bzero(&rp, sizeof(rp)); bzero(&ra, sizeof(ra)); bzero(&ro, sizeof(ro)); - strlcpy(rp.rp_ifname, name, sizeof(rp.rp_ifname)); - strlcpy(rp.rp_portname, name, sizeof(rp.rp_portname)); - - if (ioctl(s, SIOCGLAGGPORT, &rp) == 0) - isport = 1; - strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname)); ra.ra_size = sizeof(rpbuf); ra.ra_port = rpbuf; @@ -244,8 +237,6 @@ lagg_status(int s) sep = ","; } } - if (isport) - printf(" laggdev %s", rp.rp_ifname); putchar('\n'); if (verbose) { printf("\tlagg options:\n"); Modified: stable/10/sbin/ifconfig/ifpfsync.c ============================================================================== --- stable/10/sbin/ifconfig/ifpfsync.c Tue May 30 22:44:05 2017 (r319264) +++ stable/10/sbin/ifconfig/ifpfsync.c Tue May 30 22:45:01 2017 (r319265) @@ -120,6 +120,7 @@ setpfsync_syncpeer(const char *val, int d, int s, cons if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1) err(1, "SIOCSETPFSYNC"); + freeaddrinfo(peerres); } /* ARGSUSED */ From owner-svn-src-all@freebsd.org Tue May 30 22:46:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66BBBBF03A3; Tue, 30 May 2017 22:46:01 +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 34D637E6EA; Tue, 30 May 2017 22:46:01 +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 v4UMk0Vg075988; Tue, 30 May 2017 22:46:00 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMk0FW075987; Tue, 30 May 2017 22:46:00 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302246.v4UMk0FW075987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319266 - stable/10/sbin/camcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:46:01 -0000 Author: asomers Date: Tue May 30 22:46:00 2017 New Revision: 319266 URL: https://svnweb.freebsd.org/changeset/base/319266 Log: MFC r317759: Fix memory leaks in camcontrol Reported by: Coverity CID: 1331674, 1331675 Reviewed by: ken Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10588 Modified: stable/10/sbin/camcontrol/fwdownload.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/fwdownload.c ============================================================================== --- stable/10/sbin/camcontrol/fwdownload.c Tue May 30 22:45:01 2017 (r319265) +++ stable/10/sbin/camcontrol/fwdownload.c Tue May 30 22:46:00 2017 (r319266) @@ -550,8 +550,7 @@ fw_validate_ibm(struct cam_device *dev, int retry_coun fprintf(stdout, "Firmware file is valid for this drive.\n"); retval = 0; bailout: - if (ccb != NULL) - cam_freeccb(ccb); + cam_freeccb(ccb); return (retval); } @@ -744,8 +743,8 @@ fw_check_device_ready(struct cam_device *dev, camcontr goto bailout; } bailout: - if (ccb != NULL) - cam_freeccb(ccb); + free(ptr); + cam_freeccb(ccb); return (retval); } @@ -895,8 +894,7 @@ fw_download_img(struct cam_device *cam_dev, struct fw_ bailout: if (quiet == 0) progress_complete(&progress, size - img_size); - if (ccb != NULL) - cam_freeccb(ccb); + cam_freeccb(ccb); return (retval); } @@ -905,6 +903,7 @@ fwdownload(struct cam_device *device, int argc, char * char *combinedopt, int printerrors, int task_attr, int retry_count, int timeout) { + union ccb *ccb = NULL; struct fw_vendor *vp; char *fw_img_path = NULL; struct ata_params *ident_buf = NULL; @@ -947,8 +946,6 @@ fwdownload(struct cam_device *device, int argc, char * if ((devtype == CC_DT_ATA) || (devtype == CC_DT_ATA_BEHIND_SCSI)) { - union ccb *ccb; - ccb = cam_getccb(device); if (ccb == NULL) { warnx("couldn't allocate CCB"); @@ -958,7 +955,6 @@ fwdownload(struct cam_device *device, int argc, char * if (ata_do_identify(device, retry_count, timeout, ccb, &ident_buf) != 0) { - cam_freeccb(ccb); retval = 1; goto bailout; } @@ -1030,6 +1026,7 @@ fwdownload(struct cam_device *device, int argc, char * fprintf(stdout, "Firmware download successful\n"); bailout: + cam_freeccb(ccb); free(buf); return (retval); } From owner-svn-src-all@freebsd.org Tue May 30 22:48:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50549BF0426; Tue, 30 May 2017 22:48:18 +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 1FA977E82F; Tue, 30 May 2017 22:48:18 +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 v4UMmHsM076146; Tue, 30 May 2017 22:48:17 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMmHKC076144; Tue, 30 May 2017 22:48:17 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302248.v4UMmHKC076144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319267 - in stable/10: usr.bin/mkuzip usr.sbin/pw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:48:18 -0000 Author: asomers Date: Tue May 30 22:48:17 2017 New Revision: 319267 URL: https://svnweb.freebsd.org/changeset/base/319267 Log: MFC r318141, r318143-r318144 r318141: strcpy => strlcpy Reported by: Coverity CID: 1352771 Sponsored by: Spectra Logic Corp r318143: strcpy => strlcpy Reported by: Coverity CID: 1006715 Sponsored by: Spectra Logic Corp r318144: Don't depend on assert(3) getting evaluated Reported by: imp X-MFC-With: 318141, 318143 Sponsored by: Spectra Logic Corp Modified: stable/10/usr.bin/mkuzip/mkuzip.c stable/10/usr.sbin/pw/pw_user.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkuzip/mkuzip.c ============================================================================== --- stable/10/usr.bin/mkuzip/mkuzip.c Tue May 30 22:46:00 2017 (r319266) +++ stable/10/usr.bin/mkuzip/mkuzip.c Tue May 30 22:48:17 2017 (r319267) @@ -108,7 +108,7 @@ int main(int argc, char **argv) struct mkuz_conveyor *cvp; void *c_ctx; struct mkuz_blk_info *chit; - size_t ncpusz, ncpu; + size_t ncpusz, ncpu, magiclen; double st, et; st = getdtime(); @@ -192,7 +192,8 @@ int main(int argc, char **argv) /* Not reached */ } - strcpy(hdr.magic, cfs.handler->magic); + magiclen = strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)); + assert(magiclen < sizeof(hdr.magic)); if (cfs.en_dedup != 0) { hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Tue May 30 22:46:00 2017 (r319266) +++ stable/10/usr.sbin/pw/pw_user.c Tue May 30 22:48:17 2017 (r319267) @@ -35,6 +35,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -492,6 +493,7 @@ pw_pwcrypt(char *password) char salt[SALTSIZE + 1]; char *cryptpw; static char buf[256]; + size_t pwlen; /* * Calculate a salt value @@ -503,7 +505,9 @@ pw_pwcrypt(char *password) cryptpw = crypt(password, salt); if (cryptpw == NULL) errx(EX_CONFIG, "crypt(3) failure"); - return strcpy(buf, cryptpw); + pwlen = strlcpy(buf, cryptpw, sizeof(buf)); + assert(pwlen < sizeof(buf)); + return (buf); } static char * From owner-svn-src-all@freebsd.org Tue May 30 22:54:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2DEBBF0640; Tue, 30 May 2017 22:54:53 +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 ACF367EC4E; Tue, 30 May 2017 22:54:53 +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 v4UMsq72080419; Tue, 30 May 2017 22:54:52 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4UMsqW8080418; Tue, 30 May 2017 22:54:52 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705302254.v4UMsqW8080418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 30 May 2017 22:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319268 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2017 22:54:53 -0000 Author: asomers Date: Tue May 30 22:54:52 2017 New Revision: 319268 URL: https://svnweb.freebsd.org/changeset/base/319268 Log: MFC r318189: vdev_geom may associate multiple vdevs per g_consumer vdev_geom.c currently uses the g_consumer's private field to point to a vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For example, when you remove a disk, the vdev's status will change to REMOVED. However, vdev_geom will sometimes attach multiple vdevs to the same GEOM consumer. If this happens, then geom events will only be propagated to one of the vdevs. Fix this by storing a linked list of vdevs in g_consumer's private field. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c * g_consumer.private now stores a linked list of vdev pointers associated with the consumer instead of just a single vdev pointer. * Change vdev_geom_set_physpath's signature to more closely match vdev_geom_set_rotation_rate * Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed that we've already accessed the consumer by the time we get here. * Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it in vdev_geom_open, after we know that the open has succeeded. PR: 218634 Reviewed by: gibbs Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10391 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue May 30 22:48:17 2017 (r319267) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue May 30 22:54:52 2017 (r319268) @@ -49,6 +49,16 @@ struct g_class zfs_vdev_class = { .attrchanged = vdev_geom_attrchanged, }; +struct consumer_vdev_elem { + SLIST_ENTRY(consumer_vdev_elem) elems; + vdev_t *vd; +}; + +SLIST_HEAD(consumer_priv_t, consumer_vdev_elem); +_Static_assert(sizeof(((struct g_consumer*)NULL)->private) + == sizeof(struct consumer_priv_t*), + "consumer_priv_t* can't be stored in g_consumer.private"); + DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev); SYSCTL_DECL(_vfs_zfs_vdev); @@ -87,21 +97,16 @@ vdev_geom_set_rotation_rate(vdev_t *vd, struct g_consu } static void -vdev_geom_set_physpath(struct g_consumer *cp, boolean_t do_null_update) +vdev_geom_set_physpath(vdev_t *vd, struct g_consumer *cp, + boolean_t do_null_update) { boolean_t needs_update = B_FALSE; - vdev_t *vd; char *physpath; int error, physpath_len; - if (g_access(cp, 1, 0, 0) != 0) - return; - - vd = cp->private; physpath_len = MAXPATHLEN; physpath = g_malloc(physpath_len, M_WAITOK|M_ZERO); error = g_io_getattr("GEOM::physpath", cp, &physpath_len, physpath); - g_access(cp, -1, 0, 0); if (error == 0) { char *old_physpath; @@ -132,37 +137,40 @@ vdev_geom_set_physpath(struct g_consumer *cp, boolean_ static void vdev_geom_attrchanged(struct g_consumer *cp, const char *attr) { - vdev_t *vd; char *old_physpath; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; int error; - vd = cp->private; - if (vd == NULL) + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) return; - if (strcmp(attr, "GEOM::rotation_rate") == 0) { - vdev_geom_set_rotation_rate(vd, cp); - return; + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + if (strcmp(attr, "GEOM::rotation_rate") == 0) { + vdev_geom_set_rotation_rate(vd, cp); + return; + } + if (strcmp(attr, "GEOM::physpath") == 0) { + vdev_geom_set_physpath(vd, cp, /*null_update*/B_TRUE); + return; + } } - - if (strcmp(attr, "GEOM::physpath") == 0) { - vdev_geom_set_physpath(cp, /*do_null_update*/B_TRUE); - return; - } } static void vdev_geom_orphan(struct g_consumer *cp) { - vdev_t *vd; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; g_topology_assert(); - vd = cp->private; - if (vd == NULL) { + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) /* Vdev close in progress. Ignore the event. */ return; - } /* * Orphan callbacks occur from the GEOM event thread. @@ -178,8 +186,12 @@ vdev_geom_orphan(struct g_consumer *cp) * async removal support to invoke a close on this * vdev once it is safe to do so. */ - vd->vdev_remove_wanted = B_TRUE; - spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + + vd->vdev_remove_wanted = B_TRUE; + spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + } } static struct g_consumer * @@ -267,21 +279,8 @@ vdev_geom_attach(struct g_provider *pp, vdev_t *vd) } } - /* - * BUG: cp may already belong to a vdev. This could happen if: - * 1) That vdev is a shared spare, or - * 2) We are trying to reopen a missing vdev and we are scanning by - * guid. In that case, we'll ultimately fail to open this consumer, - * but not until after setting the private field. - * The solution is to: - * 1) Don't set the private field until after the open succeeds, and - * 2) Set it to a linked list of vdevs, not just a single vdev - */ - cp->private = vd; - if (vd != NULL) { + if (vd != NULL) vd->vdev_tsd = cp; - vdev_geom_set_physpath(cp, /*do_null_update*/B_FALSE); - } cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; return (cp); @@ -291,16 +290,12 @@ static void vdev_geom_detach(struct g_consumer *cp, boolean_t open_for_read) { struct g_geom *gp; - vdev_t *vd; g_topology_assert(); ZFS_LOG(1, "Detaching from %s.", cp->provider && cp->provider->name ? cp->provider->name : "NULL"); - vd = cp->private; - cp->private = NULL; - gp = cp->geom; if (open_for_read) g_access(cp, -1, 0, -1); @@ -326,16 +321,26 @@ static void vdev_geom_close_locked(vdev_t *vd) { struct g_consumer *cp; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem, *elem_temp; g_topology_assert(); cp = vd->vdev_tsd; - vd->vdev_tsd = NULL; vd->vdev_delayed_close = B_FALSE; if (cp == NULL) return; ZFS_LOG(1, "Closing access to %s.", cp->provider->name); + KASSERT(cp->private != NULL, ("%s: cp->private is NULL", __func__)); + priv = (struct consumer_priv_t*)&cp->private; + vd->vdev_tsd = NULL; + SLIST_FOREACH_SAFE(elem, priv, elems, elem_temp) { + if (elem->vd == vd) { + SLIST_REMOVE(priv, elem, consumer_vdev_elem, elems); + g_free(elem); + } + } vdev_geom_detach(cp, B_TRUE); } @@ -872,11 +877,27 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t * cp = NULL; } } + if (cp != NULL) { + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; + priv = (struct consumer_priv_t*)&cp->private; + if (cp->private == NULL) + SLIST_INIT(priv); + elem = g_malloc(sizeof(*elem), M_WAITOK|M_ZERO); + elem->vd = vd; + SLIST_INSERT_HEAD(priv, elem, elems); + } + /* Fetch initial physical path information for this device. */ - if (cp != NULL) + if (cp != NULL) { vdev_geom_attrchanged(cp, "GEOM::physpath"); + /* Set other GEOM characteristics */ + vdev_geom_set_physpath(vd, cp, /*do_null_update*/B_FALSE); + vdev_geom_set_rotation_rate(vd, cp); + } + g_topology_unlock(); PICKUP_GIANT(); if (cp == NULL) { @@ -906,11 +927,6 @@ skip_open: * we will try again. */ vd->vdev_nowritecache = B_FALSE; - - /* - * Determine the device's rotation rate. - */ - vdev_geom_set_rotation_rate(vd, cp); return (0); } From owner-svn-src-all@freebsd.org Wed May 31 00:16:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD2C8BF1769; Wed, 31 May 2017 00:16:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33A0280A1C; Wed, 31 May 2017 00:16:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V0G5n2012864; Wed, 31 May 2017 00:16:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V0G5n7012861; Wed, 31 May 2017 00:16:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705310016.v4V0G5n7012861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 31 May 2017 00:16:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319269 - in stable/11/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 00:16:06 -0000 Author: np Date: Wed May 31 00:16:05 2017 New Revision: 319269 URL: https://svnweb.freebsd.org/changeset/base/319269 Log: MFC r318762: cxgbe(4): Update the T4, T5, and T6 firmwares to 1.16.45.0. The latest firmware has a number of link related fixes, support for a new custom card, and the fix for a bug that affected rate limiting on FreeBSD. Relnotes: Yes Sponsored by: Chelsio Communications Added: stable/11/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu - copied unchanged from r318762, head/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu stable/11/sys/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu - copied unchanged from r318762, head/sys/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu stable/11/sys/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu - copied unchanged from r318762, head/sys/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu Deleted: stable/11/sys/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu stable/11/sys/dev/cxgbe/firmware/t5fw-1.16.26.0.bin.uu stable/11/sys/dev/cxgbe/firmware/t6fw-1.16.26.0.bin.uu Modified: stable/11/sys/conf/files stable/11/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/11/sys/dev/cxgbe/firmware/t4fw_interface.h stable/11/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt stable/11/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt stable/11/sys/modules/cxgbe/t4_firmware/Makefile stable/11/sys/modules/cxgbe/t5_firmware/Makefile stable/11/sys/modules/cxgbe/t6_firmware/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Tue May 30 22:54:52 2017 (r319268) +++ stable/11/sys/conf/files Wed May 31 00:16:05 2017 (r319269) @@ -1313,7 +1313,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1337,7 +1337,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.16.26.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1361,7 +1361,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.16.26.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Copied: stable/11/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu (from r318762, head/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu Wed May 31 00:16:05 2017 (r319269, copy of r318762, head/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu) @@ -0,0 +1,9729 @@ +/*- + * Copyright (c) 2017 Chelsio Communications, 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. + */ +begin-base64 644 t4fw +AAAEOAEQLQAAAQkEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAABBsEKgQyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IFRodSBNYXkgIDQgMDk6 +Mjg6NDAgUERUIDIwMTcgb24gdm5jNC5hc2ljZGVzaWduZXJzLmNvbTovaG9tZS9maXJtd2FyZS9j +dnMvZnctcmVsZWFzZSksIFZlcnNpb24gVDR4eCAwMS4xMC4yZC4wMAAAAAAAAAAAAAAAAI/sRllg +AMgA4QB78AAQAADhADC4eP///x/84UCAAAAB4QB7cAAAEAAf//2M4QGUcCAAAADhAZwE4QB5AAAC +AEDhAHmAAAYAQAACAAoABgAK4QB5BAAMAACAAAEC4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAA +AAAAgADhAHsAAABAAeEAe5wAAEAAREREQuAAAADjAARzREREQOMACAAgAAJcAAAAAB//ktAAAAAA +H/+S1AAAAAAf/5LYAAAAAB//ktwf/8AAAAAAAAAAAADAABL/zRP/zZMgEv/NE//NhCAEMwGTIBH/ +zBL/zJIQEf/MEv/MkhAR/8wB9DER/8siCv+SEADkMQAFMQECABL/yALnMQIWABH/x4EQAQFfwCEC +EQHJERH/xBL/xJIQEf/EEv/EkhBgAA8R/78S/8OSEBH/vxL/wpIQgRAR/8HAIJIREv/AkhLAIJIT +Ev+/khCCEALyUGUv9xH/vccvkhAR/7ySEBL/vBP/vJMgwDKTIRP/u5MigiIS/7oT/7qTICMiIRT/ +uQQzAck4E/+4gzADgxQIMxEU/7akM5MhE/+qkyJgAAjCMJMhE/+nkyIS/7GQIJAhkCKQI5AkkCWQ +JpAnkCiQKZAqkCuQLJAtkC6QLyAmECAmEYIiEv+kwDAtNzAtNzQtNzgtNzwjPQFyM+0AAgAS/6HA +MC83AC83EC83IC83MCM9AXIz7QACABL/l8AwKDcwKDc0KDc4KDc8Iz0BcjPtEv+VwDAnNwAnNxAn +NyAnNzAjPQFyM+0S/5AV/5AW/5HAMNcgBWYBYAAZAAAAAAAAAAQ2BQACANMP0w8FMwxuOxQHRxQH +BEN2MeYENgUFMwxvO+0AAgAS/4MV/4EjCgACJwIHBEMEPgUFMwwHRxRvO/ADAgAS/33JLoMghCGF +IrwidDsOhlC0VZYwtDN0M/Rj/+YAZT/iZV/fEv9xwDIDLgUDAgAS/2jAMCg3QCg3RCg3SCg3TCM9 +AXIz7QACABL/ay0nAMARAUkxAEgxAQIAwAAU/2gE0jEV/2eUUBT/ZwTTMRX/ZpRQFP9mBNQxFf9m +lFAU/2UE1TEV/2WUUBD/ZQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+KQOMACfgf/4pAH/+KQOMAFDgf +/4pAH/+KQOMAFDgf/4pAH/+L4OMAFDgf/4vgH/+SzOMAFdgf/5LQH/+z8OMAHMgf/7PwH/+z8OMA +Pegf/8AAH//+eeMAPeggAAAAIAABauMAfGQgAAF4IAABfOMAfdAgAAF8IAABheMAfdQgAAGYIAAB +nOMAfeAgAAGcIAABpeMAfeQgAAG4IAABvOMAffAgAAG8IAABxeMAffQgAAHYIAAB2OMAfgAgAAHc +IAAB4uMAfgAgAAH4IAAB+OMAfgggAAH8IAAB/OMAfgggAAIYIAACGOMAfgggAAIcIAACHOMAfggg +AAI4IAACOOMAfgggAAI8IAACPOMAfgggAAJYIAACWOMAfgggAAJcIAACYuMAfgggAAJ4IAACeOMA +fhAgAAJ8IAACguMAfhAgAAKYIAH4+eMAfhggAwAAIAMVtOMCdHwgAxW0IAMVtOMCijAgAxW4IAbx +XOMCijQgBvFgIAb00OMGZdwgCAAAIAgOYOMGaUwgCA5gIAkpjuMGd6wgCSmQIAkqXOMHktwgCwAA +IAsAAOMHk6ggCwAAIAsAAOMHk6ggCwAAIAuiCOMHk6gAAAAAAAAAAAAAAAAgABOOIAATgCAAF2og +ABOAIAAW5SAAE4AgABQyIAAWfSAAFgIgABOAIAAVsSAAFWogABT9IAATbSAAFKcgABOAIAATgCAA +E4AgABRSAAAAAP///////w/8///w////APwgALC+IACyMiAAsmIgALIoIACx6SAAsd8gALGuIACx +pCAAsZggALFHIACyYCAAsT0gALENIACyYiAAsQMgALDxARAYAQAEAAAAAAAAAAAAAAAAAAoAAAAK +AAAAFAAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEA +AQACAAMABAAFAAYABwAIAAkACgAOABEAFQAZAB4AIwAtADwAUABkAMgBLAGQAfQAAAAAAAAAAAAA +AAAAAAAAAAAAAQABAAIAAgADAAMAAwADAAQABAAEAAQABAAFAAUABQAFAAUABQAGAAYABwAHAAAA +AgAAAAYAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKA +AAADgAAABQEAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAA +AcAAAAKAAAADgAD/AAECAgAAABAgQAAAAAAABAACAAEAAIAAQAAgABAACCBAgAAAAAAAAAAAAAAA +AAAgCKlYIAipWCAIqQsgCKjYIAiooCAIqFsgCKhbIAiqiCAIqoggCKhbIAiqiCAIqoggCKhbIAio +WyAIqAYgCKqIIAiqiCAIqoggCKqIIAiqiCAIqoggCKqIIAiqiCAIqoggCKqIIAiqiCAIqoggCKqI +IAiqiCAIqoggCKqIIAioNyADCtAAAAABIAMK2AAAAAIgAw8YAAAA/yADCDAAAAD/IAMKvAAAAAIg +AwrAAAAAAyADCsgAAAAHAAAAAAAAAAAgAwqgAAAAASADCqQAAAACIAMKrAAAAAQgAw8YAAAA/yAD +CDAAAAD/AAAAAAAAAAAgAwgwAAAAACADDxgAAAAAIAMJbAAAAAEgAwl0AAAABCADCXwAAAAIIAMJ +iAAAACAgAwmYAAAAQCADCaAAAACAIAMJqAAAAQAgAwmwAAACACADCcQAAAQAIAMJ2AAACAAgAwnw +AAAQACADCgQAACAAIAMKFAAAQAAgAwogAACAACADCjQAAQAAIAMKRAACAAAgAwpUABAAACADCmwA +IAAAIAMKhABAAAAgAwqMAIAAACADCVgAAAAQIAMJYAAAABEgAwlAAAAAACADCUQAAAABIAMJSAAA +AAIgAwlQAAAAAwAAAAAAAP//AAAAAAAA//8gAwjAAAABACADCMwAAACAIAMI3AAAAEAgAwjsAAAA +ICADCPwAAAAQIAMJDAAAAAggAwkYAAAABCADCSQAAAACIAMJMAAAAAEAAAAAAAAAAAAAAAEAAAAB +AAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEA +AAAHAAAABwAAAAYAAAAGAAw1AAAQRqoAFFhVABhqAAAAK2gAACODAAAYagAADQYAAAsqAAAAAAAA +AAAAAAAAAABoKwAAaCsAAGyCAABvnAAASmgAAEpoAABNKQAASmgAAE7qAABMmAAAUj0AAE+4AAGG +oAABhqAAAgjWAAII1gACCNUAAgjVAAKLCwACiwsAAgjVAAK2cgACtnIAAw1AAAQGBwAAAAAAAAAA +AAAAAAACAgUFCAgLCw4OEREUFBcXGhodHSAgIyMmJikpLCwvLzIyNTU4ODs7AAAAAAAAAAEDEREI +CBAJAwEAAAAAAAAgBMzkIAGy9CAAN0ggAYJQIAGvQCABqbQgAWM4IAQ5LB//6jwgAJyoIACzGB// +3RAgAGjgIABaQAAAAAAAAAAAIAGECCAAiLAAAAAAAAAAAB//1fQf/8V8H//ClB//wDAgAFVAIABI +nCAARcggAKgwH//j8CAGxCgAAAAAAAAAACAATFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +IAG6XCABmnggAL1gIAC8lB//8RAf/9CgH//MOCAAhiggBUzoIAEzqCABE6wgAPrYIADvSCAA4rQg +ANUsIADAQCAE0NggAybgIAEosCADVVggAea8IABooAAAAAAgAL3EIAXFxCAAsDAgAY0MIAACmCAA +ofAAAAAAAAAAAB//9FggAL18IAMpkAAAAAAAAAAAIAOnvCAAJ4wgAAlwIAAmiAAAAAAgADKAIAAw +GCAALUgAAAAAIAA3CCABLHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgADSk +IATMhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAA2SCADsJggADVYAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAN0ggAJogAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAgLAAAAIAMTCAgAAAAgAxMUCAAAACADEyAKAAAAIAMT +LAwAAAAgAxM4EgAAACADE0gNAAAAIAMTXA4AAAAgAxNsEwAAACADE3wKAAAAIAMTkA4AAAAgAxOc +GAAAACADE6wNAAAAIAMTyA4AAAAgAxPYEAAAACADE+gSAAAAIAMT/A4AAAAgAxQQEAAAACADFCAR +AAAAIAMUNAoAAAAgAxRICwAAACADFFQNAAAAIAMUYBQAAAAgAxRwCgAAACADFIgPAAAAIAMUlAYA +AAAgAxSkBgAAACADFKwGAAAAIAMUtAYAAAAgAxS8BgAAACADFMQJAAAAIAMUzAYAAAAgAxTYBAAA +ACADFOAGAAAAIAMU6AsAAAAgAxTwCwAAACADFPwEAAAAIAMU4AQAAAAgAxUICQAAACADFRAJAAAA +IAMVHAAAAAAAAAAADQAAACADFSgKAAAAIAMVOAYAAAAgAxVEAgAAACADFUwDAAAAIAMO7AEAAAAg +AxVQAAAAAAAAAADXaqR46Me3ViQgcNvBvc7u9XwPr0eHxiqoMEYT/UaVAWmAmNiLRPev//9bsYlc +175rkBEi/Zhxk6Z5Q45JtAgh9h4lYsBAs0AmXlpR6bbHqtYvEF0CRBRT2KHmgefT+8gh4c3mwzcH +1vTVDYdFWhTtqePpBfzvo/hnbwLZjSpMiv/6OUKHcfaBbZ1hIv3lOAykvupES97Pqfa7S2C+v7xw +KJt+xuqhJ/rU7zCFBIgdBdnU0Dnm25nlH6J8+MSsVmX0KSJEQyr/l6uUI6f8k6A5ZVtZw48MzJL/ +7/R9hYRd0W+ofk/+LObgowFDFE4IEaH3U36CvTryNSrX0rvrhtORBwwRFgcMERYHDBEWBwwRFgUJ +DhQFCQ4UBQkOFAUJDhQECxAXBAsQFwQLEBcECxAXBgoPFQYKDxUGCg8VBgoPFR//wAAABAAgIAb0 +0CAG+YAf/N4AIAb1IB//rBQf/60kH/+wkAOAAACBAAAAH/+wgAD/+AABAAAAABAAAIEEAQCBBAAA +AQQAAAEEAQCAAAAAAAX//x//hTAGAAAAKgAAAB//z/ggBExcAgAAAIAQAABBQAAAQUABAIMAAAH/ +/7//v////x//mMwEAAAIIAMNCIGAAAAMAAAAH/+TIP//AAD//wD/AAEAAAAA//8f/7GAH/+oxA// +/////9Bk///TYB//Zowf/ODoIAbyrP//vvQf/2aAH/9nBP//wWAf/63cH/+e1B/84gAAAAi44P/+ +AOEBkgAf/5lAAP///x//nXQf/638BEEACAQBAAilAAAAwAAAAMAEAAAwAAAAH/+ugAAAHUAAAP+A +IAbxYCALYiDhAC4AH/+udB//qjwf/68wH/+qoAAAF4DgAACg4QAwuAAAgADhAGAQAABAAOECEADh +AjAA4QJQAOECcADhABAIH/zhQOEAe3Af/7OwH/+zqB/84Agf/7OsH/+zyB//s8Af/7PEH/+z4B// +s9gf/7PcIAb1IB//sYAf/6wUH/zeAB//rSQf/60gH/+twB//nYQf/7DMH/+qJCALAGAf/69MAAD/ +gAAAHiAf/5MgH/+vWB//r1Qf/6+4IAsGcAQAAAgFAAAAg/8AAIEAAAAAEAAAKgAAACAACbQgAwwo +H/+JgB//hTAf/4c0H/+wkGdFIwHvzauJmLrc/hAyVHYf/4AAAAA/KCADDuzP////IAsHYBAAAAA/ +////AgAAAEAAAAD//3//IAsIgB//sIAgACPAIAsIsCALCSAIAAAAAP///yALCZD3////IAsLgCAA +IGj//v//IAsWoIAAAAAgAw0ADAAAAAAAQAAAAP//AACAAP/7//8P9oAAIAsaECALGkAAAQAAAAQA +ACALeNAf/63QIAAygCAANGAgADAYIAsa0CAALUggCxtgIAsbsCALHEAEAQAI4AAAACALHMAgCxyA +UwAAACALHOBSAAAAIAsdIFEAAAAgAe/sH/+qkCALH7AgCyAQIAsf4CALIpAf/638IAsi4B//nXwf +/62gIAsk0BQAAACAAAACfFAAAIAAABCAAAAGgACwAAAACgAA/zSS///wD4AAsQDhAZoAAAIAACAL +JJAf/5r0AAB+QB//rdQA/8AAH/+t4B//k6QBAAAAKAAAACYAAAAgCyUAH/+T4AYAAAAFgAAAH/+p +6CsAAAAgAE+4IAt7gB//q4QDgAAAB////zUAAAADAAAAAD///4BAAAAID///H////yAAAAAAAMAA +H/+tuD0AAAAf/5lsBwAAAIEEAQCBBAAAH/+sAAAAOpjDAAAAAAAP/wBDAAAAAAgABAAAAB//q7wg +C3vgH/+zJB//saAf/5jMAAYAAOEAegAf/5k8H/+txCCgAAAf/6wYH/+djB//nXggC3wQAAMHgCAL +fIAf/5tYACAAAABAAAAAAAkAAAAwAv/8+H/AAAAAo/+7AKP/ugANAAAA4AMAAIP/tgAP////D//4 +AP8AAAAgC3zAIAsmYCALJpAgC31QAA8AAAAKAAD//wAPA//AAIP/wAAgC33QIAt+QB//rqAf/7IQ +/2DwAB//sfAf/5LgBIAACB//gFAARAAA/x///wDAAAABgMIAAACBAPAAAACBgAAA/3///x/84HQf +/6jE/7//////AAAAgAAAAACG3R//nswf/OIAH/+T0O4AAAAAAAm8H/ziDA8AAAAgCybQH/+uQAAA +CLwf/69EH/+fSB//mWgf/4BgIAbzAAAAMAAAACcQH//cgCALhKAgC4RwH/+upB//mWAAAP/+H/+d +bN6tvu8gAwfgNAAAAD8AAAAf/69gAACJBgCZAAAf/7DoEAAHAgHAgACZAAAAH/+v0ACIAAiCgAAB +H/+xOP//8AADFQAAAxEAAAAPA/8gCyzgH/+tpCALhPAgCy1AIAstkCALLiAgCy0QIADp7CALLfAg +Cy/AIAsv8CALMEAgCzCgIADvkCkAAAAAAIkUIAD19CALhWAgC4XAIAD/6B//rvDw8PDw/wD/AKqq +qqrMzMzMH/+yMAAAHxAf/7A4AAP//wAAJ/8gAQhoIAuGMAAPQkAgA1x4H/+ueAAJAAAAAEgAggAA +ACABLHggC4agH/+uJDsAAAgOAAAA0AAAAB//gKAAAB/KAAAIUAAAH0AgCznwIAs6ECALOjAACQAI +H/+xNDAAAAD///f/IAs8gCADYsQAAIP/IAb4SBWgAAAgBvlAH/+w+B//rcwAAAgGAACIzH8AAAAA +AA/+IAuLYCALi/AAAOAAIAuJQCALi8Af/5sMAAQD/woAAAAgBvWYH/+tkCAG9eAf/54gg/+3AIP/ +tiAgCzyw4QAAADMAAAAf/7EAH/+x9AP/4AB///8AAD/2kAAAH9gD//AAIAtnoCALZ2AgC2fAH/+z +ACALPTAaAAAAIAs9gCABepgf/7D8AA///x//ryAf/63cIAuMgB//nawf/6o8H/+sMCAAbQggBvKI +IAAFiB//qSAf/5qIH/+ZCB//qpggC0CQwAQAAB//rCQf/6w8H/+x4B//sVQgC42QIAtA0CADDbAg +AG3o4AEAAB//ntAgC47gIAtBECAArQgf/57IIACqCCALjmAgC46wH/+bLCALQyDg//4AIAtqQB// +ntQgC07AH/+t2B//lVwgC1jgIAtZcB//saQgC1mAIAtZsEgAAAAgAcIwH/+rlCABxDQf/5m8H/+p +NB//qVwAABgwAAAWPB//rGQgBvUUH/+p5B//mUDhAC4AH/+scOEAXgDhAg4A//+//+EADgDhAY4A +//++/x//nXQf/6psIAHJYCAB1YjgBQAAA/8AAB//qaQgAw0IH/y//zwAAAAABf//gwAAAB//qTwg +AeuAIAtl4B//rrQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYAAAAAAAAD/////////////////////H//8 +gB///IAf//xIH//8SB///Egf//xIH//10B//+Pgf//dUH//3VB//91QgBsYYAAAAAAAAAAAAAAAA +AAAAACAGyWAgBslgAAAAAAAAAAAAAAAAAAAAACAGxhggBsYYH//57B//+ewf//nsH//57B//+ewf +//nsAAAAACAByngAAAAAAAAAAAAAAAAAAAAAAgEAAAAAAAAAAAAAAAAAAAQAAAAAAAAAgYAAAAAA +ABAFAAAAAAAABAAAAAAAAAAAAAAAAAAAAACBAAAAAAAAGAUAAACAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAgCgAR8o8T8o/TDwPmMQECABbyjRfyjndrBpBgtGZ3Y/hUDzFVzCAPFABj//kAAABsEAgoIAUn +IAcpMQX4IIYV4BlFAPkADoVhdwEAiiIW8oD95QAF4AyVAPFXvA3gD6UA6vJ9G8cCgACmiCuCngp5 +CimSv/1gDYOiAJ0AKIKdCYgB6BYFJA1RgAAo0gj3AA2okgCdACtiruzycRWKuYAAKmKtLMJ/7KsB +BHP9AAD9QAoeIgCdAC7WCP1ACh4iAJ0ALyAUpP8PD0cvJBT14Axd0gCdABnyYy4iFiwhKYgVH/Jh +rsyfgOoiHi5nwoAA/QBmFaANJQD9AEYV4AtlAO3yWh1WAoAAC6oCixSagekAFQRAQQAAiRUIAIoo +PBD9IMYV4EwFAP0g5hWgDEUA7Ls2BMiBAABtuQUIAIYJAmHu8ksVoIeAAIgV7gAFDc8CgACpiOiM +ICWkNQAAC8kMbZkCCAJhLSEp0w/qISgm6AUAAA0NTy0lKf1AB3RiAJ0A/+R4BeAMFQD6IKgV4B7l +AOoiHi7NQoAA+CAmFeAIBQD4IAYVoA0FAOgWAiXZgQAAWIZM/uAAFzfFAQD3wABHMA2VAO3mnSgE +CoAA+YAFWVIAnQDAINEPAAAA6iQACdgEgADsRAAK6ASAAFiINdKg0Q8AAAAAwLAPiTTp1ggt9i4A +APpAaB2gG8UA/AACHaANFQBYjPlj/8EAAOokAArYBIAAWInO0qDRDwD/+VgNoAgFAOokAAPYYQAA +/AACHaANlQBYjO1j/5HAoFnFlh3yAojY+R/yCJAPpQBj/6TaIFgLjGP+cAAAAAAA/AACHeAKBQD6 +RSQdr/wqAIon60QACmgEgAD7RAAVoAwFAFiBxdKg0Q8AAABsEAYuIhCUEeUhGirQBIAAJiAH9kEo +FeAfxQDqFgAqx8KAAP8CUg3hZgEABwlC8SBwDeKFAQBkgfLU8CkgBfxASBWgG4UA/p4ADbAaRQD7 +IA+VIgCdAOXx2R4L1gAA5/HZG08CgAD0wAwSEgCdAKWZLZKe96AR61IAnQApkp0Hagoqor8KmQHu +lAAEjkmAAIwpiyoMBz4Muwz3YAkD4gCdACogTi0gTLGo+6AN7CALFQAoJE4qMAEpIhjzQA32kgCd +ACsgBy0hJPhgJBWgDFUA/UAEBTC7EQDgqhEN2oKAAAuqAhvxvwqIAiohBywhCQvdAvsGAAx6qgEA +6/G6HVMCgAAKzAIqISKY4IggnOOd5AuqApri/QAAFDAKZQAKiAKY4S0iEJ3lLCA4G/Gv+AAiHaBN +FQD5wSYVoMwZAAzYOR3xq5ToDL05+aYADrALBQCb5xjxnp3m7fGfFOAFAAAsJhib65nq6AAVB0jB +AAAJAIrt5g4hyEEAAO/mDyd5AQAACSCGDwJjCQCGDwJhDG4Rpe7q5p0jgLGAAIgpLyA4p4goJgnz +4AgXkgCdAIkQCQlH+SAHAVIAnQDAINEPnhLqJAAL2ASAAFiKpI4S/00QDeAfxQDsEgEpUASAAO0S +ACnYBIAAWIeR0qDRDwAe8XWK6PdABjiSAJ0ADGkRpZkrkp73YAaLUgCdACmSnQdrCiuyvwuZAWSQ +v7CsnOjulAAM834AAGAALAAAAAAA89/wSFIAnQAJVAz0nQAVr/gCAAAAAAAA6xIAKVAEgABYiR7S +oNEPAOokAANYYQAA/AAiHaANZQBYjD9j/2mNIsDkDt0C/EBGFe/9fgAAAAD4Q6gVpNkBAADRBAC8 +GgyIAvhDphWv+MYAiieNEcDA6qwgLtgEgABYgRrSoNEP2iBYhydj/vkAAP/3PA2gCQUAwKBZxNQe +8T+K6Plf+XiQH8UA//0oDaAJBQDAkMC6C6s0+8EGFe/87gAAAABsEA6VHCgiEC4iCSchNSkgByMW +DioyAv5giBXgDRUA/GBoHae1AQDjIRol2/kAAAvbOfohphXhmQEA5/82CbfCgAD+wlIN46oBAA4O +QvHAcA3i0wEAZNRjJiAFwej5/gAPMBdFAPbAJB1iAJ0AhyKLHvTl/A3gDoUAK7ABnxHzYCEnEgCd +AJkQmRqaFBjxEu3xExIoDQAA5RYLLK8CgADoVQgM34KAAK276xYJInAFAACJGp4YjRv1IAaqEgCd +ACtSnoYZ/WAKI+IAnQAvUp0mYr8G/wFk9DkZ8QCJmPcgCZiSAJ0AKoKuZKFSGvD9I4KtKqJ/HfD5 +CjsB6xYFJNv9AAD6YAnmIgCdAJvY+mAfZiIAnQCHKYYqDAM+B2YM8sAJq+IAnQApGgDzIjIN4Pr1 +ACsgFpwT+2AJ/SIAnQCLEYbDKiA49+DmFaAGBQD34SYVoEcFAPvhBhXgqhkACnY5F/DrlhYtIhcW +8Oid+i0iG537icQKdjmWF/lgEUriAJ0Ahh2eH+wWAyMN2YAAYAEIGfDSiZhqkS6LGypSno8Ze6NL +LVKdL/K/D90BnRWGFevwyhTT/QAA72QAAwHpgACauGX/E2ADSp4f/CBmFaAKBQBZxFUZ8MGJmBjw +vowT7hIPJI7bAAD//1wNoA8FAMCg+iCmFa/+5gAd8LjAugubNPuhBhXv/vYAAAAAAP/7FA2gDwUA +nh8vFhD8IGYVoAoFAFnEQRnwrYwTLxIQiZiOHxjwqfk/9XCSAJ0AYAK9wKCaFYsVFvClwNoNnTTt +Zggt9iYAAGACpJ4fLxYQnBPqJAAJ2ASAAFiJwowTLxIQ7hIPJXWhgABgAlqeHy8WEPpA8BWgDAUA +WImbjBMvEhDuEg8tdWYAAGADx44XixOIFIwR9iDIFa+KBQAqJDsMmQwIZgKZtKzYBu4CLSIQ6CYb +KVAEgABYiEiOH4wTGPCC+rOmFaEJBQBzmw0rIBYqCv/7YARNIgCdAIopKyA4DwIAo6rqJgkoBAqA +APNgBD+SAJ0AJiE1L8IEKyEaKSIQ5v82De/CgAB/2wsKCkJkoAULDUJk0HP+ICYV4B2FAPn+AA7w +ChUA+iGmFaAGNQD2IYYVr/XGAIonLxYQix7qrCAqYASAAFiE2C8SEJoTLSIb+UCIFe/83gAAAAAA +AADqIAcp4ASAAFiJNRjwV4wT/iHoFa/9ngDaIFiGNxjwUowTjh/6QSgVr/22AHGeiAq/DP/9ABXv +/goAixSKFi0iEBnwWAuqAhvwWApoAoYdGvBPCYgC6fBOGws+AAAjFhElFhImIAeFwCMhB/ZBJBXg +ZhEA61UBCzKCgAD2pgAKujMBAOYhIimbAoAAA3cCClUCIyEkCWYClfCFIJfzlvL94KYV45gBAOj2 +BizKAoAACTkC4xIRIlP5AADp9gQqrgKAAOXlAgZAgQAA5fYBJ8jBAADlEhIiFDUAAG2pBQgAhgkC +YSYgFKRmBgZHJiQU9MAINdIAnQCIGPizphWhBwUA8uHyDeD59QArIBb5YAjNYgCdACoiF7Gq6iYX +IYCpgACMKSsgOKPMnCnzYAefkgCdAI0dZdDPwCDRDy8gTmT72Q54AvhARhWgAIYAAAAAAADzH9zA +UgCdAA4/DP/9ABXv7jYAAAAAAADrEg4pUASAAO0SDCpgBIAAWIYX0qDRDwDrEgwpUASAAFiHutKg +0Q8A+kBoHaAbxQD8ACIdoA0VAFiK22P/wYsQ+kBoHaAMFQDtEgsl2GEAAFiK1WP/qQAAJiA7ZGBx +6iQADlgEgAD8ICgVr4kFAOkkOyxwBIAAWIen+iEGFaALBQArJhv6R2Yd7/vOAAAAAADrEgUpUASA +AFgJaWP+74on60QACmgEgAD7RAAVoAwFAFh/p9Kg0Q8A2iBYhbVj/wjqIAcp4ASAAFiIq2P+3AAA +JyEJJRYSIxYRJBYTJiAHhMAjIST0QOQV4GYRAOtEAQsygoAABkQCCkQC9kREFaq1AQDrIgct0wKA +AAp3AglmAiqxFZoSlPCFIJfzlvL94KYV40gBAOj2BioiAoAABDMC4/YEJdiBAAD0ImgVr8MFAAO7 +ASMSEeupCAquAoAABeUC5fYBJmCBAADlEhIkyQEAAOnLQ35ABIAALUz+DNYRpobmkzt34MEAAPSf +7/ESAJ0AbdkFCACGDAJhY/3tixD6QGgdoAwVAPtiQBXgDQUAWIqCY/5aAAAA+48ADD/+9gAInQwN +SRRtmQUIIIYMAmPv2ggFwQEAAOlMDAVIwQAA9Z/tQRIAnQArzP5tuQUIQIYJAmVj/ZQAAGwQBigg +BRzvhfffBgXgGkUA+wAKnSIAnQArIE6JyLC7KyRO9yAIyJIAnQAucq7t730XEXGAACtyrS3Sfw27 +Aea0AAWRKYAAsJ7uxggliDmAAC8gFLP/Dw9HLyQU9eAQxdIAnQAuIHP4Q6gV7/r1APvABADQCxUA +4LgaB2gFAAD7FwANNN0BAC0kcwmIAQi4OQqZAekmHSwHDgAAiiJ8pwQoIE7Jj32nCCsgTCkgTnuT +FMxsLCAU7SICLlgcAABk0cnAINEPAI4nx/MPrwHvJgInUMEAAFh2pOPvYRUBOYAAKKAA0w/TDwOI +CiiCEOygBy1YBIAA+kBoHaANRQALgABlr9yJJ9MPZJ+mKpkUyqeKmWSvnCigAAOICiiCEOygBy1Y +BIAA+kBoHaANNQALgABlr+Bj/3oAAP//VA2gCgUAwKBZwsoc7zWJyPk/9uiSAJ0AwGApIBSzmfhC +hh3v/B4AAAAAAAAAAOokAArYBIAAWIbs0qDRDwAqIAUrIAfB1P1ADmVhuwEABQVH+KAOeVIAnQCT +EI02nRLt7yEdmASAAPVgCYoSAJ0ADLoRp6ouop73wA2c0gCdACqinQ28CizCvwyqAWShPfpACBXg +DBUAWCJ/He8VKSEJGO8VKyEiLyAHHu8fLCEk+WYADbD/EQDoEgIv+oKAAA/MAg7MAiymAI4gm6L5 +QKYVoA8lAOmmAy92AoAAD+4C/0AmFaAJBQDtABUFUGEAALGZ6oMeDI/oAAAMORH3IABE8AilACiW +nfS/8rkSAJ0AiifrRAAKaASAAPtEABWgDAUAWH7DY/46//dsDaALBQDAugubNOvGCCtvBgAAY/7b +6iQAC1gEgABYCHX93cwFr/d2AIonwLD7RAAVoAwVAFiHcBnu8pmg/kAIFaAbxQD53eAFoAwVAPlA +RhWgDRUA/cAAFzAIFQDo7gINeASAAO72ASlQBIAAWIm8wCDRD4nI9yAEoJIAnQAMOhGnqi6invfA +BVTSAJ0AKqKdDT4KLuK/DqoBZKCYsJ+fyGWuwYgi6xYBJAThgAD4v+w5UgCdAIonKwoA+0QAFaAM +FQBYgzSLEB7uzp6gjCAd7s6dov2AABYwDRUADcwCnKGLtvtAZhXv9UoAAAAA61QACVAEgABYhnJj +/TyPM/4gRhXv+NYA//lkDaAKBQD6ICYV4AoFAFnCPBzuqInIixEd7qf5P/q4kgCdAP/9yA2gCgUA +AMCgwIoImDT5gQYVr/2KAAAAAOokAAXYYQAA/AAiHaANpQBYiYFj/1EAAGwQBCggFO+LHmoYBIAA +iif6YGgd4AwFAOqsICnoBIAAWH5h0qDRDwCLInO+SxTui4pIaqFHG+6ILLKuyscd7okssq0t0n8N +ywF9wBuwrp5IfcAhLyAU7yQUL9rQAADaIFgIDWP/p8CwwIoIqDToRggt/xYAAIkiyZXAINEPwKBZ +wguKSGuhrWP/6gAAAAAAAPpAaB2gG8UA/AAiHaANFQBYiVfAINEPAGwQCCwiDy8gByghNCcyB/5D +RBWn1QEA+b/AFeALFQDpuTkJsASAAOsiCSpQBIAA+CCGFeAEFQDodzYPT8KAAPciUg3h/wEACwlC +8SBwDeKOAQBkgnLBtOx7Hw6UdAAALCBP6SBNJmAFAAAMDEcsJE/9IBSjogCdACwgBfuAEv1iAJ0A +jSL6IAYVr/s1AP1gDljiAJ0AKCIZjjL5wBTVIgCdAIk4GO5HHO5E5JJib9+CgACaEJgRrLvo7j4V +SA0AAJkT6xYCL6cCgACoRPXgDSISAJ0AixMqQp77QBsb4gCdAIoSKUKd0w8qor8KmQHulAAEknGA +AIwpiyoMBT7TDwy7DPVgCdviAJ0ALRoA9aHyDeD49QArIBb5YBl1IgCdACwhIhnuOSghByohJCsh +CfxA8BXqiAEA6aoCDEMCgAAIuwIZ7jIY7iMNLUDpzAIO6oKAAAjdAp3giSCc4prk+8BmFeAKVQDr +7ioczgKAAAqZApnhiC+Y5SwgOPfBBhXgDQUA/cDmFeAKJQD93EQF4EklAPjAiBWgzBkADJo5mOkM +2zmNZZ3qHe4c/MDIFaAJBQDs5gsjh+GAAAqcEA3MApzsjBGJaJfvme6IaSjmEI1qLeYR7AAVB0kh +AAAJAIqIZ/jgC6OiAJ0AH+4BCr0CD90CnebAxfyTphWhCQUA9SHyDeD49QArIBb5YBOlIgCdACwi +GYopKyBPKSA45aoIBmAFAADsJhkl2/0AACskT5op8yAPj5IAnQCLFGWx78Ag0Q+fFZ8WnhfqJAAK +2ASAAFiG/44X7xIFJXWRgACMFGXP24on2zDsEgAlUMEAAFiCDsAg0Q8a7dCKqPdAEIiSAJ0AjBMr +Qp79YBFDogCdAIsSKUKdK7K/He3HC5kB5JIUZWP9AACc2O6UAAzyZgAAYACOKCA58R/4DhIAnQD/ +++QNoAkVAAAAAADzn+xIUgCdAAnnDPb9gBXv9foAAAAAwbN7yRQpIDqaEP4gxhXgDPUA/SAQ/SIA +nQDqJAAK2ASAAFiFbtKg0Q8A8AAYDaAa1QDAoYw3KyEJjTiOMuuvEQ3dAoAAD7sC5LsCCVAEgABY +hVLAINEPAAAA//9YDaAahQDqJAAH2GEAAPwgaBXgDBUAWIiBY/8FAAAKuAKY5sDV/JOmFeEMBQB1 +yw0rIBYpCv/5YA41YgCdAIoUZKFdi2qMZ4ppq3sHzAycZ/dg0g3gDgUAsaqMZZtqi2aaaazqq3t3 +uwGxqo4pm2aaZS0gOKXuninzoAo3kgCdAIknKJkUyoKLmcm+Ge2LKLAAnxWfFgmICiiCECywB/pA +aB2gDTUAC4AAjxWLIsej+1/ygOIAnQAoITSHZy4hGooviynodzYPZ8KAAHfLCgsJQsiUDgtCZLC0 +wdT6/gAOsAwVAPwghhWv8q4A2iBYg0Zj/gqKJ+qsMCtYBIAAWG2D0qDRDwAA//KoDaAJBQAAAJ8V +nxaeF/pA8BWgDAUAWIZdjhfvEgUtZf4AAOokAAfYSQAA/AAiHaANBQBYiDhj/eAAAAAAAOogByrg +BIAAWIYnY/2BnxX+IMYV4AoFAFnA2hrtRoqojxX5X+7YkgCdAP/34A2gCQUAwJAc7UDAugurNPuB +BhXv95oAAAAAAPNf+jhSAJ0ACecM9v2AFe/88gCKJ58V7xYGKdgEgADsEgAlUMEAAFiBbtag/iCo +Fe/6FgCfFe8WBilQBIAAWIMO/iCoFe/6tgAAAMFT+kBoHaALBQD8AAIdoA01AFh7mysgBY8WihD1 +f9qFYgCdAGP9IZ8VnxbqIAcq4ASAAFiF+P4gqBXv+K4AAAAAbBAOkxyVGogviikuIRonITQvMgT4 +QPAV57UBAPt/wBXgDRUAC9s56xYLKeAEgAD34QAP8ZkBAOcgBS83woAA/sHyDeKqAQDxQHAN4m4B +AGRkQcGkCPqN+uAjTSIAnQCOIosc9cRcDeAKhQArsAGfEvNgIFcSAJ0AmRHo7PgSWA0AAJsZG+z4 +6RYILK8CgADoVQgM14KAAKuq6hYHInAFAACGGJ4Wixn0wAXqEgCdACpSnoYX+0AJY+IAnQAvUp0m +Yr8G/wFk9CEZ7OaJmPcgCOCSAJ0AKoKuZKE5GuzjI4KtKqJ/HezfCjsB6xYDJNv9AAD6YAkeIgCd +AJvY+mAepiIAnQCHKYYqDAM+B2YM8sAI4+IAnQApGgDzIjIN4Pr1ACsgFpwQ+2AJJSIAnQAb7OQp +IDj72cQFoAYFAPfg5hWgRwUA/YCIFeCZGQAJdjkJujmLEpoUlhX9YBHS4gCdAIYbZGHTYAEDGey+ +iZhqkS6LGSpSno8Xe6NLLVKdL/K/D90BnROGE+vsthTT/QAA72QAAwHpgACauGX/K2ADSp4d/CAG +FaAKBQBZwEEZ7K2JmIwQGOyq7hINJI7bAAD//1wNoA8FAMCg+iBmFa/+5gAd7KTAugubNPuhBhXv +/vYAAAAAAP/7dA2gDwUAAJ4dnx78IAYVoAoFAFnALRnsmYwQjx6JmI4dGOyV+T/2OJIAnQBgAr7A +oJoTixMW7JHA2g2dNO1mCC327gAAYAKlnh2fHpwQ6iQACdgEgABYha6MEI8e7hINJXZ5gABgAl2e +HZ8e+kDwFaAMBQBYhYiMEI8e7hINLXZOAABgA8ScEP4hphWviQUA6SQ7JjhBAAAHAIbnEgInsIEA +AAYCYY3Hl/iKxInGrX0HqgyaxHfbCZ4d7BYAJMgFAACMEosQhhWOFJm2nbcG7gLtIg8pUASAAFiE +LI4dGOxmjBD6s6YVoQcFAHN7CCsgFikK/3m5foopKyA4o6rqJgkoBAqAAPNgBCeSAJ0AJiE0j8Qr +IRqJL+b/Ng3vwoAAf9sKCgpCyKQLDUJk0HP+IEYV4B1FAPn+AA7wChUA+iFmFaAGNQD2IUYVr/XG +AAAAAAAAnh2KJ58eixzqrCAqYASAAFiAvO8SDi1gBIAA/iGoFa/8UgDqIAcp4ASAAFiFG4wQGOw8 +/iGoFa/9tgDaIFiCHYwQGOw4jh36QSgVr/3CAHGeiAq/DP/9gBXv/goAF+w6G+w6Hew/BqkChhsa +7D7tmQIGQEEAAOVhVGfogQAAJRYQkx8lIAeDwAUlQOozAQqqgoAABTMCBzMCJyEHKiEiJiEJ9EHo +Fep3AQDrqgILuwKAAAdmAichJJPwgyCW85n2mvL14KYV46kBAOUSEC1SAoAACncC5/YEKZ4CgAAD +4wLj9gEiU/0AAOMSDyIMNQAAbakFCACGDQJhJiAUpGYGBkcmJBT0wAgd0gCdAIgW+LOmFaEHBQDy +4fIN4Pn1ACsgFvlgCLViAJ0AyD+LKSogOKO7mynzQAffkgCdAIwbZcDXwCDRDy0gTmTb8wroAvhA +RhWgAIYAAAAAAADzH93QUgCdAArvDP/9gBXv7r4AAAAAAADrEgwpUASAAO0SCipgBIAAWIID0qDR +DwDrEgopUASAAFiDptKg0Q8A+kBoHaAbxQD8ACIdoA0VAFiGx2P/wYsR+kBoHaAMFQDtEgkl2GEA +AFiGwWP/qQAAAAAAJiA7ZGB3K/qAKyQ77BICLlgEgAAIIIYNAmPs9ggs8ASAAO0iDylQBIAAWIOP ++iDGFaAMBQD8R2Ydr/vKAOsSAylQBIAAWAVTY/7yiifrRAAKaASAAPtEABWgDAUAWHuR0qDRDwDa +IFiBn2P/AOogByngBIAAWISVY/7fAAAAJyEHJBYRJiAHhMCTH/JERBXgZhEA6kQBCzKCgAAGRAIW +67YsISSKJwZEAiYhCfpmAAn6dwEA66EVK7sCgAAHZgKHL5TwhCCX9ZPy9+BmFaM5AQDp9gYpmgKA +AAPMAuMSDyomAoAABOQC7PYEJVCBAAD14CYVr8wFAAyqAaq85BIRJmEBAADsiz18SASAALBIDIYR +ppZ2wzb0n/CIkgCdAG2JBQlAhg0CZWP+AIsR+kBoHaAMFQD7YkAV4A0FAFiGcGP+YgAAAPsPAAz/ +/w4ACcwMDEgUbYkFCWCGDQJn780IBUkBAADoTAwGwIEAAPWf7diSAJ0AsM5t6QUJgIYIAmlj/agA +AABsEAYoIAUjIAckCgP9D0BEUTMBACggImSAbwIqAlh5VP1MwIDQDRUALCAhGOtpDwIA7DMRBn1W +gACoMykyng8CAG6TRSsynWSwP/pACBWg/uUADs4B/cYADvAPBQD8RCYd4AkFAPggBhXgDAUA+CAm +FeAOlQD4IEYV4A0FAFh/ePRzphWgAgUA0Q/AINEPAABsEAoqIAX4QPAV4AwVAPhgaB2ntQEA6BYA +Jdv5AADryzkKGASAAOsWBSwgBIAA/UHABFGZAQDBw/1AICUiAJ0AjSLv60EenBYAAOvrPRGwEQAA +5hYELPeCgACv7u4WAyzXAoAAq6rqFgcswASAAIcX9QAEIhIAnQCKFCdynoYTjxf64AdbogCdACZi +vy/ynQb/Ae8WBieaEYAAJSEbikKHKYYqBaU29U8ADnELBQB8swHVoJgaB2YM9MAF4+IAnQAqGgD1 +QjIN4Pz1ACsgFpga/WAF/SIAnQCKQvqgDnqiAJ0AjBUb6zKHQ5ga63cBBgj5gABgALYAABrrE4qo +6BYKJQzfgACLF4wUhhMrsp6PFyZiv3yzQy/ynRzrCgb/AeTwOWVb/QAAm8jvFgYv+24AAGACowAA +AAD4IWYV4AoFAFm+lBrrAIqoiRvoEgolDt8AAP//TA2gDwUAwPAc6vrAugurNPuBBhXv/wYAAAAA +AP/8eA2gDwUAmRvqJAAK2ASAAFiEFokb6BIKJXmpgABgAjUAmRv6QPAVoAwFAFiD8Ikb6BIKLXmW +AABgAxrw4ASIUgCdAC0hGowplxj4IUYVou0BAOkWCy8EFgAAlxj4IUYVouwBAOkWCycDgYAAmBrp +Fgsu/8KAAHX7Xg7VDPnV4AWgt+kA5kIDLdyCgAALeQKZGAhmAfaAZhWgAQIAiieZGysSAOqsICng +BIAAWH9AiRv4IUgVoAslAOukAi0gBIAA6qICKAQKgADy//u4UgCdAIwplxiYGpkbjhiPFuWtDApY +BIAA5cwICVAEgADtRgIq6ASAAOwmCSngBIAAWH9biBqJG48X+/OmFaEOBQB16wgrIBYmCv92uQzA +ofogphWv93YAAAAA6iAHKuAEgABYg4WJG/ghSBWv/4oAjykY6sGJFqX/nymMQ4tAjRXnxAAEyIEA +APwOAAU36wEA7hYBLojmAAAnIAcHB0EIdwoncp/urRANU8KAAO2qAgJAQQAA6ncBAdP9AADnxwIB +jD0AAG2pBQgAhgkCYYtAwICYEhnqrBrqqy8hGoYWHuqoJCEHGOql/CAoFaHXMQD/oABGukQBAO3Q +gConAoAA7MwPJnBBAAD4hgAKNMwdAORmACZgBQAADDwMFOqADV0M6CIAL/oCgACfZpdnnmOdZQyk +OQmJAulmBCxGAoAA5GYCIdAFAAAIqAKYYSYgFONmCA0gBIAA5iQUKAQKgADzYAQakgCdAIgX9ROm +FaEHBQD04fIN4Pn1ACsgFvlgBR1iAJ0AiBLSgNEPAIoVZKCjwCDRDwAAAAAAAADqJAAE2GEAAPwg +iBXgDBUAWIU/Y//Ziif8ISYVp9tBAOqsICgECoAA9aAEYdIAnQCMFisKAezMICnoBIAAWHoemhL6 +gAgV7/vOAACLFuxNEQlQBIAA/WAARfAMFQBYd/z0gGAVr/2iAGW7/Plf38jSAJ0ALyAg8f/fd5IA +nQBj/3MAAAAAAAAA6iAHKuAEgABYgxOIEtKA0Q+KJ9ww6xIAJVCBAABYfqjAsvtARh3gAgUA0Q8A +AAAA6zQADjgEgAD8YGgd4AwFAFh5+9tA7DQACugEgADqFgIr8ASAAO8SBilQBIAAWH7H+oAIFe/7 +FgDqJAAE2EkAAPwAIh2gDQUAWIUDY/7pAABsEAiSFJMVGeoniED4IEYVr8sFAOsqAQJwIQAA+iBm +FaeIQQDkgcBiUBEAAI8TLSEFqYwswACv3wTMC+/8QC5YBIAA/4ANiuIAnQD6ICYVoGgBAP4AIh3g +DQUABv04C98L690KB9ghAACCFZ4Q+QAARXAMJQDyQQAV4A8FAPJAgBWgAg4AjRQOVQz/4CAVoAMF +AO/kAARABQAA8Q5gDeB+AQCGEyKgAC3RBQQiC+bWCAlYBIAA4hYGIzEBAAD2QAZ6ogCdAAgGQPIA +Ih2gDQUABi04C9IL690KAVghAAD3IBAVoAIVAAcjOIcVB2YLF+n+pzcncKAGMgoGMwvsfAgBmCEA +AI7QCwCJBe42LiYAAwCLItIA6qwBJMgFAAD0X/sj4gCdAAUpDA4qDPugBhWgBxUA9WAoFeAGBQAJ +djgIaAgisgAF5QgltgF+WwIiLAHitgAmfRKAABbp5YsSHunk5rYBB5AFAAAGIgKGFe67AQxuAoAA +DbsCkmD6gAYV4SwdANEPixD8ICgV7/1SAAAA/E8ADf/8xgCFFRnptQXFC/gAChXgAgUAsSLlgx4J +D+gAAB3pzoYSGunO7W0BB9gFAAANuwKNFepmAQxOAoAACWYC69YAJhAFAAD2gAYVoSIdANEPAAAA +AOoWAS1oBIAA+8BoHe/51gD9jwAN//k+AGwQDPhASBWgCgUA6yAHKcgEgADygGgd58UBAP2fwBWg +BBUA7Ew5DLgEgAD8ISYVobsBAPMbXA3gDAUAmhacFZkTmxSbGxjphx3prB/phxXphObpqB33goAA +r+4uFgouIBbmFggtpwKAAPSAAEJw//UAf+ETAioCWC1OGOl6Heme6hYIJSoRgABgABcAAGZjy/jA +HyiQ+vUAKSAW+yAZTSIAnQCJiPcgBhCSAJ0AK1KuHOlvZLDRLMJ/K1KtDLsBZLDHsJmZiBzpjWSz +SyzAgCzMN/4haBWkzB0ArDzrFgImYB0AAPXABYISAJ0ALkKe/cAIK6IAnQCMGitCnSzCvwy7AesW +ACWZUYAAKnEMiXeZEf1ADqxiAJ0ALHAQ63IDJglBgAD5n/so0gCdAC5yA2Tg0I8WZfGwhhGPGI0U +7hIAKVAEgADm/zYL2ASAAO8WASngBIAAWCsEGOlDHeln568ubTAEgABgAvIAAMCgWbzRGOk9iYgd +6WD5P/mIkgCdAP/9CA2gCwUAwLDAqgqZNPkBBhXv/M4AAGqRJCtCnnyzQYwaK0KdLMK/DLsB5LA1 +ZPP9AAD/AQYVr/0qAAAAAAD8IaYVoAoFAFm8uhjpJomIHelK7BINJI8TAAD//IwNoAsFAMCwwPoP +nzT/AQYV7/xSAAAAAAAAAP/8GA2gCwUAAAAAihjAsZsW+V/5KuIAnQDA4J4W+V/4yuIAnQDrdAAJ +UASAAO0SCSngBIAAWCtA/gAiHeAHFQDnFgktOASAAP9AZhXv+7oAZLBJjxX+ACIdoAwFAA/sOGTA +jIgRhhjqJAAL2ASAAO0SBCngBIAA6GY2CPAEgADmFgEg+BEAAFgrzOjo+B0wBIAA/dI2Be/3/gAA +AACLGA8CAA8CAPlhNg3gDAUAeaMBwMH4ACId4A4FAAyeOOwWBSd8kYAA63QACVAEgADtEgkp4ASA +AFgsavdAaB3gCxUA+iEmFeAKFQD64GYVr/2eAIsQFej9KiEHiXAc6Pn/0cAF6qoBAP9AABU4mQEA +7KoCBMA9AAD8ISgVpIgdAOq2ACRACQAACDgMjiCZs+hfOQGz/QAA77YCL3YCgADubgIFqEEAAO62 +AS4O5gAAiBPojCAhlFUAAOo8/irIBIAAbakFCACGCQJhKzz+DLsRq1ubECggFCwgBKOI9YAImRIA +nQAICUcpJBT1IAouUgCdAIhyKCYciXHoFgctqASAAPMgCjBSAJ0A8TX4DeAHBQCnZiZGnSogFisK +/3uhCusSASlQBIAAWC/UjBllwOPAINEP6xIBKVAEgABYL88uIBYY6KP90Y4F4P/1AP/f5RxiAJ0A +Y/yHiBllj9IqcBDbcPxgaB2gCRUA+1/gFaANBQDqnTgJUASAAFgp9sAg0Q8AAAD6QGgdoBvFAPwA +Ih2gDRUAWIN3Y/+9AAAd6LMt0IDrEgQm6N0AAPpAaB2k3R0A/GAARvAMFQDt3Acl2GEAAFiDbGP/ +jy4gFi8K///f+vRiAJ0A6xIBKVAEgABYL6fAINEPixAMbBGsu/ogBhXv+5YAKCQUjXDxv/i6kgCd +APpAaB2gDAUAWHYq9sBgFa/8EgCKJ+s0AAnoBIAA+0QAFaAMBQBYeD3SoNEPAAAAAAAAAOsSAilQ +BIAAWAHz+iAIFe/6wgAAAAAAAOokAAxgBIAAWAN2iBeJcZoc56QADV8CgADrVQgE9U2AAOtUAAlQ +BIAA/QBoHeAMBQBYAzv3QABD//o6AIon/KBoHaALJQDqrCAp6ASAAFgp6CtwEPl/8TjSAJ0AKXAV +CQhFZI4ZK3EJHOhsKnEML3ARjicMqgyr/w+ICf3CpBWvzQUA7uwgJHiJAADt7gEEQEkAAAr4Oah9 +rs7u7EAm6IEAAO7bWn7QBIAADuowG+hcLaEB/UAEFaH5MQAL/worIhfv8p8uZAKAAAzdAgvuDA/u +LK7dqF79wCQd792BAP3ABB3v9nYAixT6QGgdoAwVAPtiQBXgDQUAWIMLY/4NAAD9rwANP/6aAGwQ +BCMgACQK7XQxBiIhA7wi0Q+EIYYg8kBoFaAIJQD3ZAACsJRxAPkPAAxzNgEA9GAAQfNmgQDl6Dkc +AQqAAABmGvZgAQG9RAEA5SIBAag5AADlIgwBmGkAAAQkLAQzKKMi0Q9sEAiKIicgB4kwlRX4QtAV +oXcBAPFdTA3omQEA+CAmFeD89QB8gR0FC0f7f8AV4AkVAOubOQlQBIAAWC9N81MwDeD89QAa5/SI +qBbn8vcADZiSAJ0ALmKuGefyZOHbKZJ/JWKtCVUBZFHRKIz/KKYI6VQAAo2BgAAb6A4lsIDt5+cS +qN0AAPggBhXkVR0A5UUIC88CgADmmQgCqA0AAPTgCJISAJ0AKJKe9QATO+IAnQAlkp0NeAoogr8I +VQFkUYgpIBb9IyYNoOvVACowEPtAElRiAJ0AKzELvLvaIFgu+SggFCwgBKSI9YAMQReYAQApJBT1 +IA4uUgCdAIoVHufljREoIQcc58kZ5+H/oeAV6ogBAP8AABQ0/x0A6YgCB/gFAAAPTwyYUIsgD+w5 +/KBmFeeqAQDsVgIt3gKAAOtLAgLIQQAA61YBIcBBAAD5QAlxUgCdAOhBDWJT/QAAbakFCACGCQJh +wICYFOkgBCJb/QAADLsRq1v1IAkJEgCdAIgyKCYc6TIBJdhBAACbEygWAvMgCbhQBQUAZpFQpUyI +FAx9Eabd7NadLBAEgADRDwAAAAAA9wAOkJIAnQAMeRGmmS6SnvXADvviAJ0AJZKdDXsKK7K/C1UB +ZFHNsI2dqGVe3WAAYwAAAAAAAADqJAAJ2ASAAO0SBSpgBIAAWH2h0qDRDwDAoFm7GBrng4io+R/y +GJD89QD/+VgNoAUFAAAAAAAAAPpAaB2gG8UA/AAiHaANFQBYgmFj/7HAUMDqDog0+UEGFa/4rgAd +55kt0IAt3Df64wAV5N0dAO1NCAlQBIAA/aBgFeAMFQBYglRj/3sAAAAA+EKGHa/6DgAAAACKJ/0g +aB2gCxUA6qwgKmgEgABYdzT6IIYVr/tKAIsw82AIopIAnQDiEgQr5wKAAKbMJMad0Q8AAAAAAAAA +6xIAKVAEgABYAONj/jAAAOokAAxgBIAAWAJoiTGLE4gS7KwRDSgEgADsuwgE9Z2AANog/QBoHeAM +BQBYAi+IFKWlpUwMfRGm3ezWnSwQBIAA0Q8AAAAAAP/2lA2gBQUAjTWMNB7nZvpg6BXgCSUA/HAA +B7CtcQD7LwAMu4whAPsgBADTzAEA6MwID/gKgAD/gAEGfd0BAO67AQZwOQAA7rsMBmBpAAANvSwN +zCj9YABFv/W6AAAAAOokAAPYSQAA/AAiHaANBQBYgg1j/mHAoFm6thrnIoioHeci+R/xCJD89QD/ ++PANoAUFAMBQwLoLizT7QQYV7/i2ALBLDLsR61sICVAEgAD7YgAV4AwFAFh0zLNM4hIEK+8CgACm +3SzWndEPAGwQBIk3F+c1KzAW+c5YBaMqBQAKKigLtgnoqAgLNwKAAKhmGOcvp2fkcr8pAQqAAP74 +CBWgDBUA6GYIDmgKgADmQRh0wCEAAIsymOCek5aSDbsCKHbAmzLRDwAAH+cir68p8r0AsQTt8sEu +cAqAAA6ZAvn3phXv/vUADt0DDZkBHuca5XLAKW8CgACu3ZnQjzKYUOaGACkBCoAA5YYBLiAKgAAE +/wIodsCfMtEPAAAAbBAKGecOCSkKKJJ/4hYIKWgEgAD7AAQA0AYVAOYWCisoCoAA+CCGFeBVTQAS +5wUb5wUc5vYY5tP1zggFoyoFAOraKA6/AoAA6ZJ/Juu5AACdFaSkqHesrJwWKHK5JEKf66oIBMv9 +AAD6IOYVo5kBAPghJhXgYwUA+IAEAjAAagCKGsCw/f/iHaBjBQDsVQMFAuGAAJsaLXK4BF4BDt0B +nRABAIcDNmBoPtWKGIsXjRUc5ueIFuM5CQHygQAA7hYJLM8CgACpiP0AAEY///UA4ogIDwEKgADo +gp8rSAqAAA+ZAwlEAQuAAGP/qgCKGYsUsaoKCkMqtn/RDwAAbBAEG+bUiiArsn8e5tP7TwANcy8F +AA+vKA7+CCnivyjivv3NnAXv+/UAC5kD6YsBDWcCgAD9gABGf/T1AP2ACBWgAxUA+Q7gHeANBQAZ +5sQY5rD5AABGfywBAOz8CAX9RIAAyykI6jApwr8v4sAJiAzo+xN+gQqAAC/ivgA4GgSIAwj/AS/m +vv2gIBXhux0A5LAsZmDBAAB/txRj/8QAAAnqMPmX5hXv/4YAAAAAAAD9oCAV4bsdAOW/3GZgwQAA +WC+owCDRDwBsEAQmIQn4QpAV7/gFACcgFeiYAQs2AoAA6JkMC7kCgAAHZgL4QoYd4AcFACc0APhg +Zh2gBBUABGYCljEV5mEkVq3RDwAAAABsEAQW5pQV5mvTD6YiBTUCJSaAJCKAZ0ALbQgFKCKAZ4AC +Y//z0Q8AbBAEE+aLIjaKY//8AAAAAGwQBCggBSUgB/pgqBWv9NUA+kBIFeADJQD9ASAR0VUBAMAg +0Q8AiCmaKw8CAPsACDwiAJ0AGuZ7CloJ6aH8JVALAAAqoQD7IASzogCdAPNgBHASAJ0AAioCWHQS +KyICDwIAA7oBZK+4iicEuwHrJgIlUMEAAFhthuPmQxUBOYAAKKAA0w/TDwOICiiCEOygBy1YBIAA ++kBoHaANRQALgABlr9yJJ9MPZJ92KpkUyqeKmWSvbCigAAOICiiCEOygBy1YBIAA+kBoHaANNQAL +gABlr+Bj/0oAAP//VA2gCgUA2iBYc/8rICLquwwJUASAAFh1SdpQ+gAiHeAMBQBYdvyLIgO6AfN/ ++uZiAJ0ALyAH2iD8ACIdoA0FAPVgBAcxvwEA7iYCJdh9AABYgO/AINEPAAAAAAAAAOsgIilQBIAA +WHU1KiAFwYN4oQxoqCmLIvNgBAV//EYAKSA6wL97mer6QGgdoAsFAPwAAh2gDSUAWHRsY//XAAD6 +QGgdoAsFAPwAAh2gDSUAWHPlY/+/AABsEAqIKx3mEy4gIYs3/GDIFaD/5QAP7gEuJCENzAEMuwzr +iQh4yASAAMAg0Q8DAIYJAmGbFSggBSUgB/ghBhXv9NUA/EBIFeADJQD9G0BB0VUBAIopHOYPmyv7 +QAgUYgCdAAxcCevB/CZgCwAALMEA/WAEo6IAnQDzoARgEgCdANogWHOkiyIDugFkr5uKJwS7Aesm +AiVQwQAAWG0ZCqsC4+XVFQEpgAAosADTDwOICiiCECywB/pAaB2gDUUAC4AA66QADX8eAACJJ2Sf +WiqZFCuSCcqoZL9PKLAAA4gKKIIQLLAH+kBoHaANNQALgADrpAANfy4AAGP/LQAAAAAA//9IDaAL +BQDaIFhzkSsgIuq7DAlQBIAAWHTb2lD6ACId4AwFAFh2josiA7oB83/6zmIAnQAvIAfaIPwAIh2g +DQUA9WAEBzG/AQDuJgIl2H0AAFiAgcAg0Q8AAAAAAAAA6yAiKVAEgABYdMcqIAXBg3ihDGioKYsi +82AEBX/8OgApIDrAv3uZ6vpAaB2gCwUA/AACHaANJQBYc/5j/9cAAPpAaB2gCwUA/AACHaANJQBY +c3dj/78AAGwQBBzltysyBCkwFv1gBAW1mR0A9SAIAJIAnQDq5bIUiIGAAP/LYgWv/eUA5OWEFKS1 +AAAsoX5plR18swoqzAT7YAijogCdACsgBrC7CwtH6yQGJYLRgADAINEPACyhftMP7LMMdngRAAD/ +YAfT4gCdACggBrCICAhH6CQGLH7WAACJJ4siKpkUDbsBmyKLmWSgtCiwAASICiiCENog/WDwFaAN +NQALgADAINEPAIsiiicPAgANuwHrJgIlUMEAAFhsocmtKKAABIgKKIIQ7KAHLVgEgAD6QGgdoA1F +AAuAAGWv4IknZJ9uKpkUZKBgiplkr2MooAAEiAooghDsoActWASAAPpAaB2gDTUAC4AAZa/gY/9B +AADqJAAJ2ASAAOxEAAroBIAAWHR/wCDRDwDqJAAJ2ASAAOxEAAroBIAAW/9BwCDRDwD//RwNoAsF +AP/+dA2gCgUAiDci4n8JiBH4QABBP/uSAIg3IuJ/CYgR+EAAQT/7+gBsEAQa5UEoottkgAsJ6jAr +otwLmQxnkAHRD1h2pNEPAGwQBB3lVCcgBxzlU/5BBBXg5xEADtw5nDCIIPvKLgXgCiUA+mBGFeAZ +BQDpNgMsRgKAAAqJAvhgJhXhdwEA5iB5K7wCgAD35gAPcA0FAPwEAh2gCzUA6eVBEwI5gACdNZwz +C4oCFuU+mjEa5T4G7gImIQmeNJo2BGYCIiAHnTmVO/jGAAtxIgEA5jYKKRQCgAAC/wIJ/wLvNggt +kASAANEPLCEIKyEJnTWVNwfMAgS7Agm7AgnMApw06zYGLRAEgADRDwBsEAQY5Q0e5SIsIAcd5SIZ +5SX6QQQV4PwRAP/NAA7xzAEA7TYALmQCgAAMuwIJuwLjgIApsASAAB3k3/xACBWgDgUAnmXtZgIh +uN0AAPrAhhXkdx0A6nz/LmYCgADsfAINVwKAAOxmASVT4QAAmmMCBImZZiNmBwYgiyUhCfTBZhWk +Mx0A5WYKK5AEgADogAUDKMEAAG05AgUCYdEPAAAAbBAGHeUBCysRrbMqMn8Z5P8X5NyIoMBA+OAA +RPAGFQDpuQgEAamAACwyeC8ye/mABXxiAJ0AZfEULDZ8KzJ5KzZ73UAN5BYBAgCUoA3kFsDJ/EAF +3CIAnQAvMnvBwO3k7BeDkYAAIjJ8KiEEjiDz4f4NproBACQ2fPRvZhWgAB4ALjZ87a8BBcP9AAAI +/wLvJQQljFkAACIyfLDM7zJ7IQDxgADJxmP/v9ogWHa/ZaDCKiEE/0EADBaaAQDIl9EP2iBYdrLR +D9ogWHZ00Q8AAAAAAAD6QGgdoAsFAFh3QtEPLiz46tKILwEKgAD8wAEF3/z1AAy7AwuqASrWiFm+ +QCQ2fCQ2e/pv6BWv/OIAAAAV5HwvUFhk8GpZs4VYdisoctvTD8iBWHYAKVBYZJ8pWHX6yK4V5Lgs +UmuwzOxWayYCyYAAWHWBY/8OAAAAABzksv5viBWgClUA/G9IFeALRQDtFgAha+UAAFm8cPpv6BWv ++zIALjJ74jZ8L3oeAAAiNnvRDx/kpi/yrnH2i/arBh2v/iIAAAAAAFmzTPqtZhWv/pIAbBAEFOSe +GeSY6OR1GV7CgACktCNCf6mI6LgIAYIhgAAqMgB4qQIqQnsc5JArMQQqRn8MugHqNQQp0ASAAFh2 +cc6pKTEE/yEADBbZAQDI19EP2jBYdmXRD9owWHYn0Q8A+kBoHaALBQBYdvbRDyNGf9EPAABsEATw +YOAN7/n1AIgiCTkDCYgBmCKKJyqsMFhrhuPkQhUBGYAAKKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA1F +AAuAAGWv4Ikny5IqmRTKpYqZya0ooAADiAooghDsoActWASAAPpAaB2gDTUAC4AAZa/g0Q8AAP// +XA2gCgUA0Q8AAGwQCB3kOhvkYhbkYPXILAWgGMUA4yzoJdOBAAD4QA3MJzMBAAw1EaRV6FKeKWbC +gACmxClAf/kAEJPiAJ0AKFKdZIIHmxHqCx4NSASAAJkQCiCGCwJlCwJjDQCHCQJhCQJhFuRNH+RL +7cMICQEKgADyIKYV4A4VAOPkDB9wCoAAnhOvz/4ghhXv//UA/9cAD3AHRQD+IEYVoAC6AACKmcmt +KKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA01AAuAAGWv4ClCIGSQ6y1AfB7kKYwVDdsJrt4MuwosQH2m +u4qyLuCAZKE4/ce+DaAIFQDA8A2POIgVD/8JCP8KL/0XL/wcL/Ib8eFwDeAMBQDAsQvbAwsLRytE +fAu7CQi7Cqa7/I+mHaAMBQCNsO9Snibz/wAALuD//+AEe6IAnQAvUp32/+AV4Pj1APHnwA3ndwEA +eHF06hIEJkAFAADoRH0m4+EAAFh19okT0qDrEgIkgGGAAIqiC6oBKiYCiicqrDBYaw7JrSigAAOI +CiiCEOygBy1YBIAA+kBoHaANRQALgABlr+CJJ2SfGyqZFGWu8v/7xA2gCgUAjBGLEAyAhgxghgsC +aQsCZ9EPjxGNEC5Efw/Ahg+ghg0CbQ0Ca9EPmxHqBx4NQASAAJgQCgCGCwJjCwJhDeCHCAJv6OwA +CdAEgABZsq9kr6/t47oZrwKAAORVCAlmwoAA94AAQj/5MgAAAP4gqBWgCxUA+7cADfAMBQD8j6Yd +p7sBACtEfAu7Cf9gAQWwDAUA92AARb/7egAAAAtghgtAhgoCZwoCZdEPAABsEAQY44ECA0cMMxGo +MysyhBnjjiiwAIqxCYgKCiGMAgo+KIIQAwI+/EBoHaANJQALgAAiNoTRD2wQBBTjcwIDRwwzEQQz +CCQyhCpCASZAAChACPqYaB2gqSUAAgU+AwI+eYEjGON6CGgKKIIQ6lQAClgEgAD8QGgdoA0lAAuA +ACI2hNEPAAAA6yQAClAEgABYdbvzQGgdr/82AAAAAAAAbBAEWbYTEuNYE+N5DAIAKSKCCRqOA6gK +iIQLgABj/+sS46AD6DAE7jAFsTCTIJQhlSIS45wT41uEIAQzApMgEuOawDAoN0AoN0QoN0goN0wj +PQFyM+0S45XAMJMgxy8T45QDIwMS45OEIAQ0AZQgEuOShCAENAGUIBLjkIQgBDQBlCAS44+EIAQ0 +AZQgxy/AMQMjAxLjjIQgBDQBlCBj//wAAAAS44mDIAMTFA8zEZMgEuOGwDAjJgBX/9kQ44WRAJIB +kwKUAxHjg4IQAeowohEB8DHAQATkFgACABHjf4IQIxoAAyICkhAR43zAIZIQBOQxhAODAoIBgQAA +0jABIwAAAAAQ43eRAJIBkwKUAxHjdYIQAeowohEB8THAQATkFgACABHjbYIQIyoAAyICkhAR423A +IZIQBOQxhAODAoIBgQAA0zABMwAAAAAQ42iRAJIBkwKUAxHjZoIQAeowohEB8jHAQATkFgACABHj +W4IQI0oAAyICkhAR417AIZIQBOQxhAODAoIBgQAA1DABQwAAAAAAXJQBXZQCXpQDX5QAQwAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFyQAV2QAl6QA1+Q +AFMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACclAAd +kAGdlAKelAOflAQIlAUJlAYKlAcLlABDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAnJABnZACnpAHHZADn5AEeJAFeZAGepAHe5AAUwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAANyUAB2QAd2UAt6UA9+UBASUBQWUBgaUBweUCAiUCQmUCgqUCwuUAEMAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAADckAHdkALekAsdkAPfkAS0kAW1kAa2kAe3kAi4kAm5kAq6kAu7kABT +AAAAH//9pADSMRD//goAAAAAAB///ewA0zEQ//4KAAAAAAAf//40ANQxEP/+CgAAAAAAAPQwCgAA +AAAA9DAKAAAAAAD0MAoAAAAAbBAIJyAHiCIW4lP9xJ4F4XcBAOWA8WvXAoAAGOJMLoCA5qoIB3Dd +AAD9U8gVpO4dAK5O6+JHF3AJAAD/gAhLoAmlACqinQt8CizCvwyqAeoWAiUH+YAAiNj3AAjwkgCd +AC9iruziPReFwYAAKmKtLMJ/7KsBBHP9AAD9QAUmIgCdAJ7Y/UAFLiIAnQAvIBSk/w8PRy8kFPXg +B65SAJ0A+CBIFeeFAQD5AAdxUgCdAOg8ECIMPQAAsEptqQUIAIYJAmHAUIgSjTLtJhwiS/0AAOsy +ASzPAoAAqYiYE/NgCkBQCgUA6hYALYtKAACLEOtLCAvnAoAA5swIBdv9AADrxp0qkASAANEP6iQA +CdgEgADsRAAK6ASAAFh3w9Kg0Q8AwLAJjDTs1ggt+x4AAI0iZd/V+kBoHaAbxQD8ACIdoA0VAFh8 +h2P/v//8DA2gCgUAAACOImXvsC2AgC3cN/rjABXk3R0A7U0ICVAEgAD9oEAV4AwVAFh8emP/jMCg +WbUjHeHyiNj5H/bAkAmlAGP/nNogW/sZY/8GAI4nnhGI6fvCpBXvyQUA5ekUJ2CBAAAJyQHpvQgK +VwKAAOpVDARAQQAAmOkIVTLl5RQm6QEAAP0ACDriAJ0AaKs9qKsrvPD7oATT4gCdAO8SAiIMdQAA +sE5t6QUIAIYPAmErwgELqwjlyQQl28EAAP1gBsxiAJ0A68YBLcAEgABkUKn1AGgd7/qWAAAAAAAA +6iQADuAEgADsFgQsWASAAFv8eIsxiBONFOoWAC1nAoAA7IgIBfT9gADaIPsAaB3gDAUAW/w/jRDt +rQgKkASAAO1NCAv3AoAA5u4IBuv9AAAt5p3RDwjdDPogSBXk/R0A0w9t+QUIIIYLAmMrEgLvTwwE +wQEAAO27CAeMQQAALvz/bekFCECGCwJlL8kEDagMqJgojDDoxgEv+tYAACqcQJrB+4AGFaAIBQD5 +gIQdr/0WAAuIDPnBJhWv+9oAKJxA+YAmFa/8sgBsEAQd4Zoa4Zsc4Zkt0pgqoX4swo6j3eo6DA7u +QoAA/YAARnALBQArxAQrxAVZEwj6QGgdoAsFAFv86tEPAAAAbBAEGOGNKYJ/KjAHLZECLpEE/SCk +FaAPBQDrkgAmiRGAAO7s/yaT/QAA4pUCL3cCgADuuwgOZwKAAP1vAA2wAMYAK5EFLZEEsbv/v+AV +r7sBAOuVBS93AoAA/WAGvGIAnQCMkO7MCA3fAoAAC8sMCwCHD99g6wAHBvMngAAe4W8pkQUr4n8J +mRGp2e3ifSWGEYAAjNGL0JvAi9CcsZ/Qn9Er4n+wuyvmf/WgBhwfuQEAjNn5owAVr8kFAPkABAR/ +EgUAotIrJjr/ogQd5UkFAOnVESQhAQAA5NYHLS8CgADk1gYqWASAAPWABOQiAJ0AJdUQ6FgIBHgb +AADsjEAn+gEAAP3gBGOiAJ0AyTLpRAAFAIGAAG2pBQMAhgkCYSsiQqtY/wAFjGIAnQDoJkImk+EA +ANEPL5UF//yYDaALBQDApf3CfgWgOyUAWbjbwCDRDy3igIzRi9CbwIvQnLGf0J/RK+KCsLv70EYV +7/z6AADAwPsP6BWgDRUAWHAcwCDRDwAAAAAAAADv1gkmk+EAANEPAMsw+mBoHeBcxQDsrDYKcASA +AG3JBQsghg4CY/hgAEXwXkUAfqENL6ys0w9t+QULQIYEAmUpjfvpJkImk+EAANEPAAAAAOQmQiaT +4QAA0Q8AAGwQBIIjAgJB0Q8AAGwQBIUjgyAU4RP4QIQVoVUBAOrhERquwoAA5FQIAYC5gAD7AAQE +Npg5AAmIAiglBCJCf9EPHeEIE+EJH+EJJkJ+KyEELkJ/kmCWIaP//WAEBfbLOQAMuwKvX+8mACco +BQAAJUZ/IkZ+6yUEKpAEgADRDwAAbBAEiiBloFAd4PrqIgMp9sKAAK7d/a/oFeAMFQD8gEAGMaoB +AAaqAg3ILAjdKCclBe3MDARYBQAA/W0ADD/7xQDrqgEMTkKAAAlZAgOqApojCYgCKCUE0Q+PIxvg +5g8PQQv+EavrLbJ/LLJ+ctka2cDzI/4NoAwFAMDALLZ/LLZ++kAIFaAASgAA2MDzDIYNoAwFAHLR +HY0hmtCOICmyfZ3hnCDsJgEky/0AAPlvphXv/WIAABngzBjgzamIqOh4oSHqtn8vgTYAAM2uKrJ9 +aqIZLbJ7/W/mFeAATgAAAAAAAAAA7LZ/J/8hgAD6QAgVr/6eABzgvRngvYghrJmp6fkPAAzwDAUA +Ccg4+W/GFa/+FgAAbBAE9cFwBeAGFQD0QGgdoAI1APaAQAMwABoAsCIoUn/oY/dyq4EAANEPAAAA +AAAAbBAEKCIc6zQACmAEgADtVAAJUASAAAuAANKg0Q8AAABsEAT0QkgVpCNBAPJaAAk/U4EABCIK +hCaCIQVEKApEEaQi0Q9sEAQqIhIjIAf6PgAEMAY1APUACRCRMwEACshR9QAJKJIAnQD6KAAGsDsF +AP3BJAWgClUAWbglF+CA5OB+Gc8CgAD0YAYSEgCdAKeZKpKe90AIidIAnQAqkp0EOworsr8LqgHx +TuAN50UBACghBxnggv/BBAWqiAEA6+CBHEcCgAAJiAKYoBjgf/xACBXgPAUAnKf7QKYV4BmFAJmj ++UBGFaAIBQCYpu7dAg7+AoAAnaQG/wKfoS8iEg+PQeimCC//AoAAn6nt4HAZ9wKAAKfuJuadLCIS +KiIQDcwC7CYSKVgEgABY5GdoQhmKJ/oAIh3gDAUA+0QAFaANFQBYb7vSoNEPAMAg0Q8c4EmLyGqx +Www5EaeZLZKebtNmKpKdBD0KLdK/DaoB5KBZZfP9AAD/gQYVr/zCAC8aAA+qAvpCRhWv+2IAKCoA +CKoC+kJGFa/7VgAAAIkiy5loQk3AINEPAAAAAP/77A2gCgUAwKBZs2Ac4C6LyGuxlv/7mA2gCgUA +AMCgwNoNvTT9gQYV7/taAAAAAOokAAHYYQAA/AACHaANNQBYeqdpQrGMJy/JFIrJ/4QAFa/IBQDo +7gEH+EEAAO/FFCVTwQAA6sYJJ3EBAAB+qyopwRUd4C2qmprJnaCMIPvAVgXgDRUA66YCLmYCgAAN +zAL9QCYVoAIFANEPHeAjnaCMIPvARAXgDRUA66YCLmYCgAANzAL9QCYVoAIFANEPAGwQGBTgHJIQ +jiAZ4BmLIy0iASwiAiwWIi0WJCsWI/ggxhXgCBUA+CDmFaAPNQD+ISYV4AoFAPogphWgD7UA/iIm +FeAKdQD6IaYVoAiVAPgh5hWgCYUA+CHGFeALZQD6IYYV4A1FAPwhRhXgDFUA/CFmFaANxQD8IkYV +4AzVAPwiZhWgC+UA+iKGFeAJ9QD4IqYV4AhFAJgUGt/5+iSmFaACJQDyIQYVoAKlACIWEBLf8oUW +KxIkKRIFJlF+LBIiJ1F/BpkoL0CAqXn4XogVo5kBAAOZCu6SAC9QBIAAJVI+LRIjCO4IC1AAjhcs +EiQtEiIG7igvQIGufvheqBWj7gEAA+4KjuAqFhbqEiMtWASAAKjuC1AAjhgsEhYtEiQG7igvQIKu +fvheyBWj7gEAA+4KjuAqFhfqEiItWASAAAjuCAtQAI4ZLBIXLRIWBu4oL0CDrn74XugVo+4BAAPu +Co7gKhYY6hIkLVgEgACo7gtQAI4aLBIYLRIXBu4oL0CErn74XwgVo+4BAAPuCo7gKhYZ6hIWLVgE +gACo7gtQAI4bLBIZLRIYBu4oL0CFrn74XygVo+4BAAPuCo7gKhYa6hIXLVgEgAAI7ggLUACOHCwS +Gi0SGQbuKC9Ahq5++F9IFaPuAQAD7gqO4CoWG+oSGC1YBIAAqO4LUACOHSwSGy0SGgbuKC9Ah65+ ++F9oFaPuAQAD7gqO4CoWHOoSGS1YBIAAqO4LUACOHiwSHC0SGwbuKC9AiA5+CPhfiBWj7gEAA+4K +LuIAKhYd6hIaLVgEgACo7gtQAI4fLBIdLRIcBu4oL0CJDn4I+F+oFaPuAQAD7gou4gAqFh7qEhst +WASAAAjuCAtQAC4SECwSHi0SHQbuKC9Aiq5++F/IFaPuAQAD7gqO4CoWH+oSHC1YBIAAqO4LUAAu +EhEsEh8tEh4G7igvQIuufvhf6BWj7gEAA+4KjuAqFiDqEh0tWASAAKjuC1AALBIgLhISLRIfKBIl +Bu4oL0CMrn75D+gVo+4BAAPuCi7iACoWIeoSHi1YBIAACO4IC1AALBIhLRIgLhITL0CNKBIlBu4o +mhOufvkQCBWj7gEAA+4KjuDqEh8tWASAAJsRqO4LUACMES0SIS4SFC9AjigSJQbuKJoSrn75ECgV +o+4BAAPuCo7g6hIgLVgEgAArFiOo7gtQACwSIy4SFY0TKBIlBu4oL0CPrn75EEgVo+4BAAPuCo7g +6hIhLTAEgAAmFiLo7ggLWASAAAtQAI4RKhYkKRISKxITKBIlLRIVjxXsEhQkQQEAAOgWJSboQQAA +7RYVJ/hBAADvFgUmYEEAAOwWFCXYQQAA6xYTJMhBAAApFhKLHYkcjB4vEhCNH+gSESZgQQAA7BYO +J/hBAADvFhAm6EEAAO0WDyRAQQAA6BYRJMhBAADpFgwl2EEAAJsdiRaLF4gbjRnvEgohEQEAAOwS +CCRAQQAA6BYLJuhBAADtFgkn+EEAAO8WCiIgQQAA7xIEJmBBAADsFggl2EEAAOsWByTIIQAA6RYG +J/v9AADvFgQv4WYAAIsQiBOMEo+wibONso6xrJmm3aruqP+fsJ6xnbKZs9EPAAAAbBAEKSIV+KAA +BPA4dQDpjAwBIEEAAPMgAEU/iwUA66QQJVBFAAD5AAXTYgCdACsKAFmvFywiFSsiFO3NEQlABIAA +/EJGFe6APQD9awANsAk1APpCZhXgCiUAbaoMjoQODo7uhgQkQBEAAA8CANMP0w9tmiHpggQkQEEA +AIqBi4KMgwkJjgoKjgsLjgwMjpmAmoGbgpyD60QACVAEgABb/q2KIIgiiSGPIwgIjgkJjg8PjgoK +jpognyMpJgHoJgIpQASAABnexAIAhgMCYfgAChXgCbUAbZoCCACK0Q8AAAAAAAAA/YEAFaALBQBZ +ruj4QGgdoAlFANMPbZoh6YIEJEBBAACKgYuCjIMJCY4KCo4LC44MDI6ZgJqBm4Kcg+okAApYBIAA +W/6L2kD/+/wNoDyFAABsEAYpIhX4QogVoEYFANMP+IAARXWZAQAJZgx0qwGxiComFQYqDOgmFCVR +QQAA9oAHs6IAnQDrNAALYASAAFmuvPhAaB2gCUUA0w/TD22aIemCBCRAQQAAioGLgoyDCQmOCgqO +CwuODAyOmYCagZuCnIMlLBDqJAAK2ASAAFv+aAZHDPbgBY7SAJ0A5jQICtAEgAD24GgdoAMFAOQW +ACpABIAA+MhoHaAJRQAKAmcIQIYKAmUIIIYKAmMIAIbqDAAJQASAAG2aIemCBCRAQQAAioGLgoyD +CQmOCgqOCwuODAyOmYCagZuCnIPqJAAK2ASAAFv+S+pUAAGYBQAA5mzAIiEBAADvbZpqQASAAIsQ +CjwRC8sI7HwMCtAEgABZroTRDwAAAAAAAOs0AApgBIAAWa5/0Q8AAAD2YABGMAMFAPwgBhWv/yYA +bBAEGN5YGd5WGt5UE95XkyOYIpkh+kAGFaALBQArJhUrJhTRDwAAAGwQBt4g5OIQKmAEgADnQgcr +0ASAAPu8iAXgGDUA40IVKZAEgADncg4i++kAAHj7JxjeRQj4CoiAmhOcEu4WASwAIoAAAJMQKrKl +7FQACVgEgABZsD1kpcfygqYV4AIFANEPAAAAACviEgubUu4WASX/QYAAGt4t4xYAKVgEgADqoscq +4ASAAFmwMGSlehreJtsg6qLJKuAEgABZsCsjfQXkps9hmgEAABreINsg6qLLKuAEgABZsCT3R+AN +44YFABreGtsg6qLNKuAEgABZsB5kpsQa3hXbIOqizyrgBIAAWbAZ+0BCiBIAnQArMOXBWPVgK+Bi +AJ0AabchJTTlixD6gqYV4AIFANEPkxAqsp3sVAAJWASAAFmwDGSnAosQ+oKmFeACBQDRDwCTECqy +q+xUAAlYBIAAWbAEZa8a+iBoHaALtQBY4Gv6ACId4AMFAOqzOAUA4YAA6hICK1gEgABZrojIqRzd ++I0RDKw2LNYXZTMljRD8gqYV4AIFANEPLkBuZO7SkxAqssHsVAAJWASAAFmv7WWuv/ogaB2gG2UA +WOBU+gAiHeACBQDqsjgFAKmAAOoSAitYBIAAWa5yLH0DKsUoZSLRjRD8gqYV4AIFANEPAACTECqy +s+xUAAlYBIAAWa/ZZKK3Gt3Q2yDTD+qinyrgBIAAWa/UZa5a+iBoHaALVQBY4Dv6ACId4AIFAOqy +OAUn6YAA6hICK1gEgABZrlgsQG/xgCc+0gCdAGSk34oT+gCiHeAM1QBY4BjSoNEPkxAqsrnsVAAJ +WASAAFmvvmWux/ogaB2gGyUAWOAlZKI1K0BuZLdv6hICK1gEgABZrkQsQhYKzDYsRhaLEPqCphXg +AgUA0Q+TECqyt+xUAAlYBIAAWa+sZKIzGt2j2yDqorEq4ASAAFmvp2WubfogaB2gC+UAWOAPZKHb +6hICK1gEgABZri8rfQIqtRSLEPqCphXgAgUA0Q+TECqyqexUAAlYBIAAWa+YZKIqGt2O2yDqorUq +4ASAAFmvk2Sjhxrditsg0w/qoqMq4ASAAFmvjmWuB/ogaB2gC3UAWN/1ZKF1K0BuZLbjGt1/ixLq +ou8rYASAAFmvhGWmRitAb8DIDLsCK0RvixD6gqYV4AIFANEPAACTECqyv+xUAAlYBIAAWa95ZKHv +Gt1w2yDTD+qioSrgBIAAWa90Za2f+iBoHaALZQBY39tkoQ0rQG5ktmoa3WWLEuqi7ytgBIAAWa9q +ZKZ5K0BvLAr9DLsBK0RvixD6gqYV4AIFANEPAJMQKrKn7FQACVgEgABZr19kobca3VbbINMP6qKb +KuAEgABZr1pkotoa3VDbIOqiuyrgBIAAWa9VZKxfGt1M2yDqosMq4ASAAFmvUGWsTBrdR4sS6qLd +K2AEgABZr0tlpFKLESuyEguZUsiZaJIH+SAPYdIAnQCMESvGEvKCphXgAgUA0Q+TECqyl+xUAAlY +BIAAWa8+ZKF6Gt002yDqopkq4ASAAFmvOWWstPogaB2gCyUAWN+gyqIa3SyLEuqi7ytgBIAAWa8x +ZayUihP6AEId4AzVAFjfgtKg0Q/AINEPAAAA+iBoHaAL9QBY35Jkr+rqEgIrWASAAFmts+sSACPg +CwAAKsUV+oKmFeACBQDRDwAA+iBoHaAbFQBY34Zkr7otQG5k1QYpQG/xP+GXkgCdAPE/4VfSAJ0A +6hICK1gEgABZraEuQhcK7jYuRheLEPqCphXgAgUA0Q8A+iBoHaALpQBY33Rkr3IvQG7TD2T0duoS +AitYBIAAWa2TKEE0+wAPAqIAnQCKE/oBQh3gDNUAWN9T0qDRDwAAAPogaB2gG1UAWN9kZK8y6hIB +KlgEgADsEgIraASAAFje7IsQ+oKmFeACBQDRDwAAAPogaB2gC5UAWN9YZK8CKUBuZJQZGtzjixLq +ou8rYASAAFmu52WiXCtAb40Q/IKmFeAMFQAMuwL6jeYd4AIFANEPAAAAAAAAAPogaB2gCxUAWN9G +ZK66GtzSixLTD+qi7ytgBIAAWa7WZaspihP6ACId4AzVAFjfJ9Kg0Q8AAAAA6hICK1gEgABZrVz1 +QBXykgCdAMcv0Q8A+iBoHaALhQBY3zL6ACId4AIFAOqyOAUBSYAALEBuDwIAZMODGtzC6xICK2AE +gABZrr5lom4tQG/A6A7dAi1Eb2UuNY8Q/oKmFeACBQDRDwDqEgEqWASAAFjfJ2WvnCsw5WP6cwAA +AAD6IGgdoBsFAFjfGGSuAihAbtMPZIL16hICK1gEgABZrTcpQhiLECtGFQqZNviDBhXgAgUA0Q8A +APogaB2gCzUAWN8KZK3KGtyWixLTD+qi1StgBIAAWa6a49ycHQcuAACLESuyEgvJUciZaJIH+T/5 +EdIAnQCOEYwQA70BLeYS/IKmFaACBQDRD2UthI8Q/oKmFeACBQDRD+oSAitYBIAAWa0WKkU0ghDy +gqYVoAIFANEPJX0E9LAAFeALBQD6oGgdoIwFAFmsp+oSAirYBIAAWN8/KzDlwMQMuwL6fCYdp7sB +APp8ph3v5f4ALTDl+iBIFaAOJQAO3QLtNOUrWASAAFms/isw5fp8hh2v5W4AAIoSWaDjLzDif6kU +ihJZoODcoOoSAiPYEwAAWa5lZKG3wKL9uMwFoDsFAFmz5ccv0Q8a3FeLEuqi1ytgBIAAWa5cZa4+ +ixErshILyVFokQpokgf5P/Fp0gCdAB7cWQO9AQ7dAo4RjBAt5hL8gqYVoAIFANEPihP6ASId4AzV +AFjeodKg0Q8AAAD6IGgdoAtFAFjesmSsahrcPosS0w/qotUrYASAAFmuQuPcRx0FZgAAixErshIL +6VHImWiSB/k/7hHSAJ0AjhGMEAO9AS3mEvyCphWgAgUA0Q8a3C2LEuqi3ytgBIAAWa4yZa2WixEr +shILmVJokQpokgf5P+wp0gCdAB/cMYIR778CA+gXAADvJhIm6gEAACzQ5cDhDswCLNTl8oKmFeAC +BQDRD4oT+gECHeAM1QBY3nPSoNEPI30FIzyAKzDlwMEMuwILC0f6fKYd7+ASAAAAGtwOixLqotcr +YASAAFmuEmWtF4sRK7ISC+lRaJEKaJIH+T/oMdIAnQAd3BIDvAENzAKNESzWEosQ+oKmFeACBQDR +DwAAAAAA9uAAQzALBQD6wGgdoIwFAFmsKMFQ6hICK1gEgABY3sArMOUFuwL6fCYdp7sBAPp8ph3v +3hIAAAArMOXAyAy7AgsLR/p8ph3v3b4AihP6AOId4AzVAFjeQ9Kg0Q+KE/oCAh3gDMUAWN4/0qDR +D4oT+gFCHeAMxQBY3jvSoNEPihP6ASId4AzFAFjeNtKg0Q8AihP6AQId4AzFAFjeMtKg0Q+KE/oC +Qh3gDMUAWN4u0qDRDwCKE/oCIh3gDMUAWN4p0qDRD4oT+gDCHeAMxQBY3iXSoNEPihP6AOId4AzF +AFjeIdKg0Q+KE/oAwh3gDNUAWN4c0qDRDwBsEAQkIhBkQGwpMBAqMBEsMBrrMBIszgKAAAqZAuow +EyzOAoAAC5kC6zAZLM4CgAAKmQLqMBgkhREAAAiqEQuqAuswGy1WAoAADKoCCKoRC6oCsarqJhYk +hI0AACkiEuvbthTAKIAAC5sBKyYSLEAFLQqVfcFJwCDRDwAuMBQvMBXoMBYvdgKAAA/uAu8wFy92 +AoAACO4CCO4RD+4C/ddgAFCNBQAvIhJ49yTApf23RgWgOwUAWbMcwCDRDwAAAAD6gGgdoAtlAFj6 +xsAg0Q8AjCcpyRSLyfmEABWvygUA6ogBBMkBAADpxRQl2wEAAOvGCSRBAQAAeLsGLsEVq+ubyRjb +j9mw+AAIHaAPRQBt+gIJAmEc23WcsIog/UAAFTAMRQAMqgKasSkwFCowFR7bhe8wFizOAoAACpkC +6jAXLM4CgAAPmQLutgIszgKAAAqZAum2BCHAIQAA6AYABfhhAAAPAIoqIhKJIg2qAuomEiz35gAA ++kBoHaANNQAL4ABj/ukAbBAGKCAEKQoYeYEDwCDRDyoiEiQiENMP80AKR9IAnQAvQG7TDw8CAP3n +AIDQnFUAK0AFfLHVHNtj/EAIFeAKJQD+gAgVoDsFAFmy1vqAaB2gDSUA/EymHeALFQBY+oDAINEP +ABzbWY0gjjYvMQv4Y/AVoApVAPggBhWgOwUAWbLJGttSJCIYLDELiCyJSoVH/QAARDALBQD4QYYV +oA0FAOVSDiSQSoAALUYeCp4C/oFGFaAAHgArQh7rWggB2IEAAFmrUi9CHi4xC41Ar+4uRh4qUAQs +UAUY2z7rUAYtVgKAAAyqAulQBy1WAoAAC6oC7Ns5HS4CgAAJVQIIVQH0oGAV7/jFAPigBAKwOwUA +/qBoHeAKVQBZsqMqIhMpMQsrQh4PAgAKmQjpJhMiwMEAAPl/9sUiAJ0AHdsoLEIKDcwB7EYKKVAE +gABY94f6QGgdoAsFAPwAAh2gDSUAWDfrwCDRDwAvIhMuMQv6QGgdoAsFAP/AAEdwDAUA/kJmFaAN +JQBYN+LAINEPAAAAbBAGHNsTLSIALjIF9EDoFadVAQD+v8AV4AgVAA+POfSCghWgClUA9CAGFaA7 +RQBZsnqJImWQmCYgBxfa0gYGQeoyBStHAoAAp4grgp4krB/5tZgF5EQdAHSzfCiCnQlrCiuyvwuI +Ae2EAAQDqYAAHNrwDACHbUkCCAJhiDQe2tGe0IkgHNrT6tYDJthBAADs1gIszgKAAOlJAgHggQAA +6dYBKVAEgAALgAAMbxGn/+T2nSKUdQAAiif6AUId4AwFAPtEABWgDaUAWGob0qDRD8Ag0Q8AAAAA +//4sDaAIBQDqJAAKaASAAPrDABXgDAUAWHUnwCDRDwBsEASHJyp5FB/azPjipBXvzQUA6HIIJVAH +AADscgslUoEAAOqTd3PYgQAADbsBq5nowXR0yQEAAC6NAep1FCdSgQAA6pNxfDAEgAB5oX2aeO8A +BQs4BIAABwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhF9qal2CFIJNllGTztWwFoAelAOJm +AiquAoAAB1UC5WYBKxAEgADRD8Ag0Q8AAAAAAAD3gGgdoAgFAPjhZhWv/nIACJoMCroMKq0BKqzg ++uEGFa/+IgAsvED84QYVr/32AABsEATHjwhYAwg4AghIA6ho6CIIC4EKgAACIhiiMtEPAGwQBAQ4 +AwhYA6ho6CIIC4EKgAACIhiiMtEPAABsEAQEOAMIWAEISAOoaOgiCAuBCoAAAiIYojLRDwAAAGwQ +BAVIAwg4AQhYA6ho6CIIC4EKgAACIhiiMtEPAAAAbBAEIyIQKDAF+EJIFeCUJQB0iUj/KKADEI0F +AHifPXCfGeraehS9WIAACpoB+kJGFaACBQDRDwAAAAAA/bTqBaAKVQD8YAgV4DsFAFmx3yswbtMP +abEFLDAFdMEGwCDRDwAAAPpgaB2gDSUA/EymHeALFQBY+YTAINEPAIwnL8kUi8n/hAAVr8gFAOju +AQf5AQAA78UUJdsBAADrxgkncQEAAH67BinBFaubm8kc2k3ZsPwACB2gCkUAbaoCCQJhHNoznLCJ +IB7aSPv/4h2gDEUA6rYELM4CgAAMmQKZsSgiEo8inrINiALoJhIv+4YAAPpAaB2gDTUAC+AAwCDR +D2wQBBPaRAMiAtEPAGwQBiYgB4giHNoJ9EIIFeFmAQDlgntrTwKAAKyZKJKeGtoC9wATitIAnQAk +kp0KaAoogr8IRAHo2hYSEumAACciEoop+EFIFeB3QQCXEAh3CidykOqZDAPYwQAA+yAPs+IAnQAr +IBYoCv94sRL6QPAVoAwFAFhyjuzZ7RURoYAAKyEHHdn6+bRCBeq7AQDv2fod3wKAAA27AptAiCD7 +tDoF4EoFAPqAZhWgBlUA70YCLHYCgAAG7gKeQS0iEo4QLyEa+7QmBaLdUQDq7hEO7YKAAA3uAgvu +AvsGAAwx3jEAqd0t0IDoRgQv+gKAAJ9GDX0M7kYHJujBAACdRSoiFYsp90AARX/pBQDnuwgFUMEA +AOomFSXYwQAA6yYJIlCBAAD4gAtsYgCdABvZ68SQ+gAIHeANBQAKAmEKAmEKAmEpRCAtRCQtRCct +RCb8hKYd74oFACpEIS9SEf6HZh3o/x0A/odGHej/HQD+hyYd6P8dAC9EOC4iFv6H5h2o7h0A/ofG +HajuHQD+h6YdqO4dAC5EPIo0GNnh79nVEfBhAAD1QAYYEPn1AO4GAAJQoQAACgCKKUQwKEQx/oZG +He/+9QAuRDOKNC1EI/qG5h2o/R0A/oRGHejqHQD+hsYdqO4dAP6Gph2o7h0ALkQ06wAFAkkBAAAJ +AmEoIAcICEEMiBGsiCaGnSsgFi8K/3+xCvpA8BWgPAUAWHH8iDRogCeKJ/oAgh3gDAUA+0QAFaAN +RQBYaOwrIhIs+n8MuwH6QkYV4AIFANEPHtm1LSISDt0C/EJGFe//LgDaIFhyNOzZdBVwKYAAYAAr +iF4Z2aixiJheCYgC+IZmHaj4HQD+hkYd6P8dAP6GJh3o/x0A/oYGHe/83gDAINEPAADrbBgpUASA +APwAIh2gDVUAWHPjwCDRDwDrbBIpUASAAPwAIh2gDQUAWHPdwCDRDwBsEAYkIhIqCo7pIhMifGyA +ACgxC6mI+EJmFaAJBQDpJhEskASAANEPLyIYL/B0evFUKCAFGtmJ6dmJFAJZgAArMQsKRAEkJhKN +OSwiE32YPy4iEavM7CYTImWegABk4JKN7H3XIIjr+8BoHaALBQD8AAIdoA0lAAuAAMCQ6SYRLJAE +gADRD8Ag0Q8AAAAAAAD9sugFoAolAP5ACBWgOwUAWbDVKiIQKaAFKwqVe5HWwML8TKYdoAsVAFj4 +fsAg0Q8c2WmN4P/AsBWgClUA9CAGFaA7BQBZsMgtIhLAkPhCJhXvvvUADt0B7SYSLJAEgADRDwDa +IFj1scCQ6SYRLJAEgADRD2wQCCoiEg8CAPNADyfQiOUALSIYK9B0+WAOtCIAnQApIAUc2VDv2VAU +jkGAAAyqAiomEvNAJztSAJ0AjiwoMgYkMCD8YUQVr/XFAP8AJ60lRAEADAxO/ZtgFaAmVQD1gAQG +cIW1APVgEtRgJxUAD6gCrOn4QYYV4DsVAPhCRhWgLCUA9oJGDeAKBQB2QQp7QQf8gCg9IgCdAC0w +MCoiEC4wMS8wMuqgcC7uAoAADt0C7jAzLu4CgAAP3QLo3REFeBkAAO7dAg+CCoAADQ4Z9cAj11X9 +AQAK5REF9QKVEfogBhWgOwUA/bJCBaAKVQBZsIEc2N0b2R8swqAvIhgrsoqlzO/wdC5mQoAArLv6 +QiYV4Ii1AOqwBS3oBIAA+eAYNSCepQD/QBf0IJi1APlAF7QiAJ0A9UAXcJCZlQD5QCClYA9FAPaA +BXxiAJ0A9oAFPCIAnQApMEEsMEAuMDwqMD3oMD4uZgKAAOnMAg92AoAACu4CKTA/6jBCL3YCgAAI +7gLoMEMuZgKAAOrMAg92AoAA6e4CDmYCgAAIzAIOyAzqIhAkBIuAACWiEn5RCAXoDGaAAi6mEi6i +E3zhCA7JDGaQAiymE4q8D6oCmrx2QT3DwfyACXwiAJ0A9oAPjGIAnQDC4v6AF3QiAJ0ALxAQZfMS +wCDRDwAAKDAjwJEImDkotEEoFBD2n/pdIgCdACowIX+nuykwQSwwQC4wPCowPegwPi5mAoAA6cwC +D3YCgAAK7gIpMD/qMEIvdgKAAAjuAugwQy5mAoAA6swCD3YCgADp7gIOZgKAAAjMAg7IDOoiECQE +i4AAJKISfkEIBOgMZoACLqYSLqITfOEIDskMZpACLKYTLjA4KDA5jLzpMDovdgKAAAjuAugwOy92 +AoAACe4C6ti0H3YCgAAI7gLvzAIHcAUAAC4mFpy8+2FmFa/8tgAAAPgAYh2jmuEA+R/s9mIAnQAo +MCQpMCXrMCYsRgKAAAmIAukwJyxGAoAAC4gCCIgR6YgCBlgRAAD5bQAOP/W+AAApMCHxIAfOEgCd +ACowJCwwJe4wJi1WAoAADKoC7DAnLVYCgAAOqgIIqhEMqgJloM8sMEwuME3vME4uZgKAAA7MAu4w +Ty5mAoAAD8wCCMwRDswC6iIQJgVpgAAuohj9wAUTogCdACy2EiowSC4wSe8wSi1WAoAADqoC7jBL +LVYCgAAPqgIIqhEOqgIqthQpMDQuMDXqMDYszgKAAA6ZAujYdRzOAoAACpkC+mbwFaAOBQAuthUu +thPotgsszgKAAAqZAvlhphXv+IYALjA4LzA56DA6L3YCgAAP7gLvMDsvdgKAAAjuAgjuEQ/uAuzY +YxdwBQAALiYW/WFmFa/3sgAAKiIQL6AFKAqV+f/vBCIAnQDAkvhMph3gCxUAWPdkwCDRDxzYVu2y +AC1wBIAA+kJIFaA7BQD6IAYVoApVAFmvrC0iEvpCCBWgTgUADt0CLSYSLjBBKzBALDA8LzA97TA+ +Ld4CgADuuwIOZgKAAA/MAi4wP+8wQi5mAoAADcwC7TBDLd4CgADvuwIOZgKAAO7MAg3eAoAADbsC +DL0M97/qaBIAnQAtohJ80QgNzwxm8AIsphIsohP7n+mcYgCdAAy4DGaNKPtCZhXgAgUA0Q8AAAAq +MDgsMDnuMDotVgKAAAyqAuwwOy1WAoAADqoCCKoRDKoC6dgjFVAFAAAqJhaZu4rXKTwg+0HIFaAL +NQBtugUJAIYKAmHAINEPKSIRZJB/iZeJnvkmABXgC2UAKjwg0w9tuQUKIIYJAmPAINEPAAAqIhBj +/rwAAP/uMA2v9fUAHNgNLzAwKTAxjrDoMDIv/gKAAAn/AukwMy/+AoAA6P8CDWgEgADoMCAv/gKA +APnmAA/wCiUA+CAGFaA7BQBZr1jAINEPAAAA+kImFa/9kgCJ1ysxC4mev7sLS0vlv3xkyMEAAGP8 +NQBsEAYrIgcmIAcPAgAouRQFDUf1YcgVoWYBAOOyCSQOUYAA+aAQUVIAnQAc1+koIgD/YEgVoApV +AP2/wBXgCRUA7Z05CXgEgAD4IAYVoDsFAFmvORzX4PxgEBXgClUA/koQFaA7BQBZrzQX147l140b +TwKAAPTAC8ISAJ0Ap5kqkp73QA9aUgCdACqSnQVrCiuyvwuqAWShpSshBykgQC8gB/WvJgXquwEA +7dfLHd8CgAD1IAuYke8BAPUgCRkSAJ0A9YAI2pIAnQDAwPmviAWg/xEA6SEIL/qCgAAPuwLtuwIP +dAKAAA6ZAgiZApugjiCYpvVARhXgPwUA+UCGFeANRQD/QGYV4AkFAOmmBSVYgQAA6aYHL3YCgAD9 +xgAPcA8lAO6mAS52AoAA7+4CBUkBAAADIIYLAmMDAIYLAmH/QSYVr5V1AASAhgkCaQRghgkCZwRA +hgkCZegiEitPAoAAp5ntlp0hISEAAPUMRg2vZ4UAFtebIyISDwIABzkIKpInJZR9LJImLKYAK5Im ++2AmFaAIBQDoliYhm4EAAOiWJynQBIAAWazh+gCiHaA7BQDsZAAJ6ASAAFmu3y8iEsDh0w/17wAP +sA0FAA/tOGTfpOUkBSlQBIAAWazUwCDRDwD8gFAVr/ueAP/42A2gAwUAHNcqi8hqsX8MaRGnmSiS +nvcABHJSAJ0AKpKdBW0KLdK/DaoBZKB8sL6eyGWueWAAHAAAAAAAAAD8EEIdr/p+AC8gQAj/EP5g +BhXv98IAjyJk8F8c12juIgApaASAAPngaB2gCRUA/y0ADHAKVQD4IAYVoDsFAFmutMAg0Q8AAAD/ ++IQNoAoFAMCgWao4HNcGi8j5f/uQkgCdAP/+NA2gCgUAwKDA2g29NP2BBhXv/foAAACPMOokAANY +YQAA/66cBaf/wQD+SAYd4AwVAP5gBhWgDUUAWHF6/kBIFe/93gBsEAiJJysgByiZFPTgAAZxuwEA +5pIJJAgJgAD5gAnhUgCdAC0gQRTW6+zW6R2YBIAA8bNMDeAFRQD2AAId4A0FAPVgBtoSAJ0ADLoR +pKouop71wA0b4gCdACminQy+Ci7ivw6ZAeqUAASJ6YAALyBBZfFmHNbrGdckKCEHLSAHHtcj/kEE +FeqIAQD8IAAF8N0RAOrdEAxHAoAA7YgCDdwCgAAL/wIO/wIJiAKYoIggn6T/QMYVoA0FAJ2l/UDm +FeA7BQD9QEYVoAlFAOumAyxGAoAACYgC6KYBJUiBAAAGIIYJAmMGAIYJAmH84AAVsAwlAAy7Apup +DDoRBKoI9VOmFe+ZdQDpJAUpUASAAFmsU8Ag0Q8AAAAA//v8DaAGBQAf1qqO+PfABriSAJ0ADDoR +pKooop71AAeD4gCdACqinQw4CiiCvwiqAeSg3mdL/QAAmfj5QGgd7/w6ACogQAiqEPrABhWv+voA +j54t8AQn8AUe1sjl8AYu7gKAAAfdAu/wBy7uAoAABd0CCN0RD90CDt0BJdxn9I4ACvCHlQD0oIAV +7/p+AI8i6xYEJ4R5gAAc1tvuIgApaASAAPngaB2gCRUA/y0ADHAKVQD4IAYVoDsFAFmuJcAg0Q8s +3Ejr3GcpcASAAP7AaB3kux0AWa0KY/5/AAAAAAD/+aQNoAkFAJsU/CCmFeAKBQBZqaAf1m6NFY74 +ixQc1m753/iAkgCdAP/8uA2gCgUAwKDAygzsNP3hBhWv/H4AAAAAjWDqJAAF2GEAAP2tbAWn3cEA +7SRAKugEgAD8wAYVoAwVAFhw4P5ASBXv/TIAbBAGiScjIAcomRQDA0HmkgkkBzGAABTWVfWspgXn +hQEA+QAIoVIAnQD0YAaaEgCdAAw5EaSZKpKeBTsKK7K/90AJ6lIAnQAqkp0LqgFkoPcpIAcrIQcc +1pL7QAAF8NkRAOrdEA3fAoAADbsCDLsCm6COIPmsogWgPwUA/0BmFeANRQDopgIvdgKAAA3uAp6h +LCBB+gACHeAPBQD5RAAV4ekBAOXA0W90AoAALCEIn6UOzAIe1nyfp56mDswCnKQGIIYJAmMGAIYJ +AmH9YAAVsAwlAAy7ApupDDkRpJn9M6YV75h1AOgkBSlQBIAAWavBwCDRDwAAAAD//GgNoAYFABfW +GIt4arF/DDkRpJktkp4FPArswr8oBAqAAPegBApSAJ0AKpKdDKoB5KB1Zev9AACdeGWvGWAADi4g +QAjuEP7ABhWv+5oAAI8iZPBlHNZb7iIAKWgEgAD54GgdoAkVAP8tAAxwClUA+CAGFaA7BQBZraPA +INEPAPoRIh3v/L4A//skDaAKBQDAoFmpJot4+X/7qJIAnQD//mANoAoFAADAoMDKDLw0/OEGFa/+ +IgAAAAAAj2DqJAAB2GEAAP+sgAWn/8EA/kgGHeAMFQD+wAYVoA1FAFhwaP5ASBXv/cYAbBAEiiqO +rxjWN+gmCyFIgQAA6eYAJXjhAADvJggpWASAAP5BJhWgDAUA+UHmFe+YhQD4QKYdoA0lAFhu1MAg +0Q8AAABsEAQb1igqMQzTDyuyfxzWCfhiEBXgFGUA+0P2DeAFBQB8oRfqJAAK2ASAAOw0AApoBIAA +WPRywCDRDwBokUFokiFolAnAQP//ZA2gBQUAfKHRe6vO2jBY9KDVoP//EA2gBAUA/UDmDaAUZQB7 +owJgAAHAQNowWPS3//6cDaAFBQDaMFj0y+WkAAUBEYAA/awMBaAKVQD8YCgV4DsFAFmtT//9/A2g +BAUAAAAA//3QDaAExQBsEAQpMBPxJgAN4PWFAGiRA8Ag0Q+EJ4ROHNX37TARIkAXAAAthGL+YlAV +oApVAP8MZh2gOwUAWa08Kk0E7DARIdhhAABY9NzlOwgCUBcAAOwwEiVTgQAAWPTX6iQAClgEgABY +9i3AINEPhCcPAgAPAgCEThzV4i0wES1EAv5iUBWgClUA/oBmHaA7BQBZrSbrPBgiUAsAAOwwESVT +IQAAWPTF5TsIAlAPAADsMBIlUqEAAFj0wcAg0Q8AAGwQBPRAYCXosx0AI1RX+qrGHeBENQD0qqYd +oAh1APiqhh2gCQUA+KpmHeBKBQAqVFLRDwBsEASPOP2rhAWgClUA/GIQFeA7BQD/4Ggdof/xAFmt +BikwEOrVvBSMkQAAaJJZaZQSiDYion8JiBGoIiggBSkKlXmBXsAg0Q8AAADaMFj3BP9fAA3gCXUA +i6eLviyyjgydVv0jQB3o7LkAwNN+0BD7YEAl4AwFAFj2zsAg0Q8AAFj16cAg0Q8AizYqon8JuxH7 +QABFcAsFAFj1dsAg0Q8AAAAAwKX9qzgFoDsFAFms4vpAaB2gCyUAWPSOwCDRDwBsEASILiMsOHOJ +BcAg0Q8AAIsuiLPsRAAK6ASAAOu84ClQBIAAC4AAjCLtIAUufu4AAGTf1Y4uc+nWY//NAAAAbBAY +JRYZlB4rIAcjFh6HNegyBCn4BIAA/+HkFeADFQDyIgYV4bsBAPojBhXgyFEALBYa/CPIFaDYWQD8 +I6YV4L95ACsWFSrAAP+DsBWj9vUA/YekFeB3+QD8ImYV7DgdAP4gBh2ge3UA7MIfJFRCgAAPCEn4 +IeYVoAAeAACWHxnVZygSGfwiJhWgDwUA+S/EFeAEBQD7QBG8Z4gBAC8WFAk5DPgi5hWvmQEAKRYW +9QBIcRIAnQCKIvtAVKCSAJ0A8OcQDeAOBQDuFhIjgFGAAAM6AlkAAMBQ8oXADeAGBQAtEh4t0IMN +XUIvEh0rEhr+AGIdoAwlAO/sOQvQBIAAWP/fpqbwgQAN4Ar1ACkSHimSKihsMAmGOXagbPQhphWk +th0A4xYMJdgFAAD6I2YV4AGaAAAALBIT0w8PAgD7gEZYEgCdAC0SHg8CAI3V8b/7u1IAnQDrEhMp +0ASAAPwiKBWgDhUA7hYSKOgEgABZAAv7QE4gUgCdAP4AYh3gBQUACvU6ZFGpw2CUHfIhhhXkhh0A +KBYbKRIYHNTAE9TC7tTAHKAEgAD1IAniEgCdAOsSGyy3AoAAo2YqYp77QFKL4gCdACZinQ6YCiiC +vwhmAQZrAu/CCC2wBIAA+2BOoBIAnQArFgX34E8QkgCdACkyrhrVDPsgTIgSAJ0ALjKtLaJg7esB +B9P9AAD9wEvuYgCdAJrI/cBMFmIAnQCNHiwgFK3MDAxHLCQU9YBNplIAnQAuEh3I6ykSFsCD+QBO +0OIAnQBkUPoqEhoPAgDIoWRQY+tkAAlQBIAA/ABiHaAdhQBY//3uEg8teASAAOYSDCK6GYAAHNTs +LRIV+ak2BeAKBQCa8przmvSa9elpAg9EAoAA6fYALuiCgADo3QIK9sKAAP+mAA6wG8UA/eAmFeAK +VQBZrCErEhf5YElpUgCdAMAg7BIbKm8CgACj3SzWndEPLhIeLuCD/kUABzAEFQD+IoYVr/b6AI/I +9+BJoJIAnQDpEhsqNwKAAKNmKGKe+QBJ++IAnQArYp0OTQot0r8NuwHmtAAIBAqAAPtgSVgSAJ0A +sP6eyPrAaB3v+qYAAAAA/JrMDeA2BQD/9rQNoA0FAC8SEmTwdusSBSlQBIAA/ABiHaAdhQBY/8AZ +1LMW1LGOHCgQACZinwnuAhnUhQgfFOaGCw/7AoAA6f8CBHycgAAsEhHtEhMjW/8AACiyPyuxfZ6g +n6Gdopyjm6T5QKYVoABuACwSES0SEythBYhjnqCfoZuimKOdpJylJqwYLRIVjB8C3RDtFgguZAKA +AOwWCSuwPgAALhIdGNRE/iGIFeAKBQDqFgYvcYKAAJ4XCP8C/iFGFeAPJQCfG+tkAAlQBIAA/ABi +HaAdhQBY/5OLHS8SHokW5hIeJZFBgAAmYIPv8gUkkXmAAIgdBk5A5IIYb3MCgAAoEh4ogIIIBkAK +ZhCMFwbtAv2GAA5w36EA86gAFrCPkQD9hgAOcN+JAOOIEA7ogoAA+aYADrCPmQAEiBAIzAIoEh6L +Gg3MAoiE+0AGFeP99QCdopylHNRp/UBmFamIAQCYpBjUZZihLhIL6ZwBJTBhAADpFgYnc/0AAO4W +Cy96RgAALxIU9eAs+JIAnQD14C2xEgCdAPXgLnGSAJ0A9eAvMhIAnQD14C/ykgCdAPXgMLMSAJ0A +9eAxc5IAnQCOHdMPZOBPLxIeL/IqZPBG62QACVAEgAD8AGIdoB2FAFj/USgSHhvUR4wa+QVIFaP9 +9QCdov1ABhWsCQUAmaP7QCYV6ZixAOmmBCxFgoAA6KYFJTBhAADrZAAJUASAAPwAYh2gHYUAWP8/ +HdQ3jxiMGfYhSBWgCQUAmRGZEpkTmRSZpPlAphXv+/UAm6Kbo5ag78wCCvbCgAAOzALuEh4lMGEA +AO3MAgDYIQAA7KYBIOhBAADqHAQg4DEAAFj9WPlAaB3gCBUA6ok5DSgEgADpFiElIzmAACQWIvoA +Ih3gCgUACbo45RYjJWNZgAAT1BeNGYQcGNPmH9QW5RIdKieCgAD4hgAKNgwFAPghCBWgChUA5aU5 +CvDCgAAF/Dn5xgAPMAk1AP3GAA7wCCUABZg5KBYgDs4CLhYc/YYADnAFBQD8I+YVoAR+AAAAAAAA +AP/3bA2gBgUAwOD/98gNoAYFAIgd/CPIFeQMBQD2YAAHMrYpAPELAA3gBgUALdIq7cY5DduCgAAs +EAD/YAAEcN/JAOvdEA5iAoAA7O4CDEUCgAD5xgAPMM/BAPWQABYwj3kA/YYADnDfqQD/QKYVoO+x +AODuEQ7rwoAA/6YADrDvgQDsiBEPdkKAAP8GAAwx72kABO4R/wYADDDvuQDtiAIPckKAAA6+AgyI +Ao0anaAc06ScoQjuAv7GAA8wCCUACO4CnqQY09CYoh7Tz/9AZhWv9i4AAAAAAPoAAh3gBgUA//1M +DaAOBQAAAAAAAACZoZSgnqKeo56knqWdpp2nnaidqS8SIOVcASUwoQAA/qARnGIAnQDrZAAJUASA +APwAgh2gLYUAWP685FBRas7CgAD0oApgkgCdACsSH8fv+yYADPANBQDjmQIL/S4AAI0TLBIejhKP +EYvMLMIQmaGbqfVABhWgCAUAmKKYpp+jnqSdp5yljBT9QQYVr/4mAC0SHSwSHBvTogyZAuuZAgaE +GYAA8OJADe/+9QCZoZSgnqKeo56k/0CmFaANBQCdpp2nnaj9QSYV7/02AC8SHiIWJSvyFibxOCLx +OizyFejxOSs0AoAABiICJvE7LfIb7vIaLEQCgAAIZgIo8hcv8hmfop6jnaScppunmKiWpZmhlKCS +qfIkqBWv+/YAAAAAAAAAAPDiQA3v+/UAmaGUoJuim6ObpPtAphXgCAUAmKaYp5io+UEmFa/7OgAs +Eh6NEi/BOybBOSjBOC7BOuvCGCs0AoAA5v8CDEQCgAAI7gImwhSIzCzCEJukmKeWqJmhnaKUoJyj +n6WeqYwU/UDGFa/6GgArEh3sEhwlg1GAABvTYMfv/SYADLANBQDrmQIDgPGAAJmhlKCeop6jnqSe +pZ2mnaedqP1BJhXv+TIALhIeIhYlLeISLOITK+IYiO2G7i/iFILvLuIRnqKdo5ykm6WYppann6mZ +oZSgkqjyJKgVr/hWACsSH8ff+yYADPAMBQDjmQIDgPGAAJmhlKCdop2jnaSdpZymnKecqP1BJhWv +95oAmaGUoI4T/iAoFeAIBQCYopijmKSYppinmKifpf9BJhWv9woAKhIeGdMyiqUT0sYlEiPkEiIl +TDCAAOPSwhOD4YAAHNMsixwMuwL7P0YV7+JeACUSEMDS960ACv/i4gAAwKX9pkoFoBvFAO4+EQno +BIAAWapZY/bd+iLIFaAOBQCeEZ4SnhOeFFj8RCQWIuUWIyVfYYAA+iLIFaALBQBY/DckFiL0JGYV +7+9aAC8SEfv/uZCSAJ0AY/atGtLjiBwKiAL5P0YVr+B+AADAoFlg/sinG9MKK7CAZLEsKhIWWPwv +6RIhLVweAAD6IsgVoAsVAFj8IvgkKBXv7cIA3GDqEgwpWASAAPwjyBXgDhUAWPzU90BoHa/p8gAA +ANxg6hIMKVgEgAD8I8gV4A41AFj8zPdAaB2v6XYAAAAA3GDqEgwpWASAAPwjyBXgDnUAWPzE90Bo +Ha/o9gAAAADcYOoSDClYBIAA/CPIFeAOtQBY/Lz3QGgdr+h2AAAAANxg6hIMKVgEgAD8I8gV4A7F +AFj8tPdAaB2v5/YAAAAA3GDqEgwpWASAAPwjyBXgDtUAWPys90BoHa/ndgAAAADcYOoSDClYBIAA +/CPIFeAO9QBY/KT3QGgdr+b2AOsSEynQBIAA7BIRKOgEgABY/XJj9ikAACsSHowe7RIZKVAEgABY +aAbSoNEPAAAAAPulfAWhSxUAWZNlLBoADKwC+6VyBaFLFQBZk2Vj/rMAwLDA2g39NJ3I+3+0MJIA +nQD6QGgdoBvFAPwAAh2gDRUAWGzBY/+gAAAAKxIY+kBoHaAMBQDtEhsl2GEAAFhsumP/hMCgWaVj +HNIyj8j5/7CgkgCdAGP/uNogW+tZY/ZHiieNHsDA6qwgLtgEgABYYZjSoOsSGypnAoAAo8wrxp3R +DwAAAAAAAP/W7A2gBgUA/9ikDaAFRQDAoFmlThzSHI/IHtId+f+1+JIAnQD/27ANoAYFAAAAAP/b +NA2gCwUAwNoN/TT9gQYV79tSAAAAAGwQBBTSgoIgJEJ/E9KBBCIMAyIC0Q8AAGwQDBjSfxrSDRnS +fCiAfSqiqSmShgmqEeqZCAR8RIAAJJ0B9JAAFaAAMgAAACSdAyRMgBnSOyhBKfkACAxiAJ0AGtIn +6gAFCMgEgAAJAmEJAmEJAmEJAmEZ0mwY0kQf0mmOIJ8S+CDGFaAKRQDpFgAvdgKAAArqApoRKUAH +L0Ep/aTGBaGZAQDj7gIMzAKAAAn/Agj/Ap8UKyA5/iFmFaANJQCdGQy7AusWCCgECoAA9GAEsZIA +nQCJRyqZFOSgf2TggQAAjZmLwP/4Ah2gJYUA7s4BBoIZgABtCC59sTgv0AAp0Ad18S8vwQXu+AgM +zwKAAOndCARBAQAA6NsRftAEgADtpAAFAImAAGP/ygAA/68ADX//vgD9bwANcAkFAAqdOObUAA6B +pgAA6kQACNgEgAD8AIIdoA0lAFhdWtEP//4MDaANBQAAACocOvpHQBXgDGUAWaH2Y/9cwnaOaPoA +oh2gO0UA7NIqG2gEgAD+RzAV4+4BAFmpVIpoCo9Xd/FtikcuoRX7RAAVr8sFAAurAavr62pwc2kB +AADvogAmgYGAAH3xKCzQANMPDwIAdcEdKdAHDJkR6d0IBcEBAADo2yR+0ASAAO2kAA1+xgAA/e8A +DfAKBQALrTjm1AAG+mGAAGP/dgAA/68ADT//cgAsIDkKDUN9yYiOIAjuEQ4+Ap5r0Q8AAAD/rwAO +v/5CAGwQBiggBSwgB8GUDwIA+QAQdWHMAQApIgJlkcMtMAEW0YHr0X8eOASAAP+hQAbQD6UALiBO +ZeJX7tF4Hk8CgAD1gArSEgCdAKaZKJKenBALywr3ABGU0gCdACuyvyqSnQurAesWASWOSYAAiuj3 +QA64kgCdAChiru3RbBQL+YAALGKtLdJ/7csBBUP9AAD9gAteYgCdAJjo/YALZmIAnQApIBSkmQkJ +RykkFPUgDXXSAJ0AHtFtG9FmjCD4ICgV4AoFACq2Mu7MAg5uAoAA/WcGFaAORQAO3QIttjEb0crc +kOsPHg3QBIAADAJnC0CGDAJlCyCGDAJjCwCG7AwABNkBAAAK4IYLAm8KwIYLAm0KoIYLAmsKgIYL +AmkuMQEoIQktIAcsMAEb0bgqIST8IAAGMN0RAOrdEA5kAoAADcwCDKoCHdGyLCEiC6oCKpYgDcwC +iyAd0U8oliMuliQsliL9YAAVsAwlAAy7AiuWIYoz6pYlJMgHAADtABUEymEAAAkAigx4EaaI/xOm +FeflAQD5wAa5UgCdAMAg0Q8AAIro90AH4JIAnQAMeRGmmS2Sngt7Ciuyv/egCGTSAJ0ALZKdC9sB +ZLEAsK2d6OsWAS305gAA/CAGFaABZgAAAAAAAOokAAnYBIAA7EQACugEgABYZsHSoNEPAAAAAMCw +D6k06eYILfTmAAD6QGgdoBvFAPwAIh2gDRUAWGuFY//BAADqJAAK2ASAAFhoWtKg0Q8AixD6QGgd +oAwVAPtjABXgDaUAWGt7Y/+XwKBZpCQe0PKK6Plf8PiQD6UAY/+q2iBb6hr/+TQNoA+lAACKJ+tE +AApoBIAA+0QAFaAMBQBYYFbSoNEPAAAAAP/3XA2gCwUAwLgLmwL6QEYV7/0eAAAAAPwgBhWgCgUA +WaQMHtDbiuiMEBvQ2/lf93iQD6UA//woDaALBQAAwLAPrTT9wQYV7/vyAABsEAYoIAUmIAfnNAAK +2ASAAPgCgh3gBTUA+QAPnWFmAQALCEdoghSKIhfQyRjQyORkAAUDyYAAwCDRDwArIh1lseGIJ4OI ++wKkFe/MBQDpggskcIEAAAzsAey7CAp/AoAA7BYAJdkBAADzIA38YgCdAC2JFKP6r90thRT7YA3r +ogCdAMl1yUPZMG1JBQcAhgkCYYrgDwIADwIAr6r7QBCsYgCdAPvABhWv/f4A7GoRAyTxAAAHqggr +op4PAgD3YArZ0gCdACqinQhrCiuyvwuqAWWgT+tsGClQBIAA/AAiHaANNQBYax3AINEPABvQlom4 +9yAMoJIAnQAMShEHqggsop73gA0B0gCdACqinQhMCizCvwyqAeShjmTr/QAALbYIZK+vGdCymaCI +IP+iCAXgCxUA66YCLEYCgAAFiAKYoYgzL/J//6E6BaiIHQCo/5+j7gAVBUhBAAD/oSAF4AgFALGI +6YMeDA/oAACfphnQ9PlBBhXgGAUAmKeOIAjuEQXuAp6pDE0Rp90l1p2OIiwgBoknC+4C69DrFmAF +AADsJAYkyIEAAIiR/SCCFe/MBQAMnAHuJgIkQ0EAAOiWASbowQAA7ZUEJmEBAAB8iyIqkQUd0HSo +qJiRnYCMIOuGAi5mAoAABcwC/QAmFaACBQDRDx3QbJ2AjCAb0NPrhgIuZgKAAAXMAv0AJhWgAgUA +0Q/aIFhnq9Kg0Q8AAAD/+sQNoAoFAFgAJ2P+FwAA8yBoHeAOBQD/AWYVr/e+AOO6DAOBuYAACksU +7LwIK8AEgADsTDYJyASAANMPbckFCACGCQJhiRCqeOtNDATJAQAAbdkFCCCGCQJjixAK/Aysuyu8 +QPvABhXv9ooAwKBZo18b0C2JuBjQLvk/8viSAJ0A//n8DaAKBQDAoMDaDZ00/WEGFe/5wgCPEC/8 +QP/ABhXv9aYAAABsEAYS0CIX0J/1oFYFoBOVAPhQyBWgpiUAKiKCf6cgKyKCf7cYKiKELKAIJaAH +dsE3iETAoAuAAAUzDGU/2tEPLSKEKSKHKiKH+WAABPuqgQB6mTAK6jArQkHDwgy7KKuq+puGFa/+ +6gAuoQsu7PgODkPu7Pwi6/0AAP+iAAq//s4AAAAADAIALyKCf//FJdAHblu/3HD6AKIdoAsFAP6g +ABcw/wUAWaeeJVzxylsoCnGYEcChWZt++iAoFeAJ9QAJWTaZEAm7DPogJhXgCgUAWYBkihAKVQxl +X9fAoVmbdPoOIh3gCgUAWYBeY/9lAABsEAYoIAUvIAfBlPkAFM1h/wEA9CAmFaeFAQCYEvUAD7kS +AJ0AiSIdz9rmz9wfoASAAOvP2RyRlgAA9eAPQhAHtQDvFgAv1wKAAKaqLKKeC/sKK7K/94AVu+IA +nQAsop0LywHntAAFkomAAI7Y98AS+JIAnQAsYq7q0EgWECmAAC9irSui5+v8AQdD/QAA++APjmIA +nQCY2PvgD6ZiAJ0AKyAUKTAHq5kJCUcpJBT1IBG10gCdAB/QOZ9wiSD8AIId4AUVAOV2AizOAoAA +DZkCmXGINhnQMyyiGv+flgWiiB0ACYgBqMz84GYVoCsFAO4AFQPIQQAACQCKm3cZz7vpdgYh4MEA +AOwHHgPAgQAACAJj7uMFA+DBAAAMAmEvdhCIIOV2EixGAoAADYgCKHYRjDMqohgMjBSsqup2EyP5 +gQAA7gAVA9FBAAAKAIopdhbrdhch0EEAAApghg8CZwpAhg8CZS0wAY8zGM/Z8aAFB9AchQAtIAcV +0Av6RIQVoN0RAOMxAS7qgoAACN0CLXYgiyApdiIsdiP9YAAVsAw1AAy7Aut2ISPIBwAA7uMFBMpB +AAAJAmEJAmEuIAcoIQny5SYV4BmlAP7lBhXgCwUA63YlLEUCgAD5BgAMce4BAOh2Ji90AoAADq4C +Be4C/uSGFaAJtQDsEgIqbwKAAKbdKdad+YAHqVIAnQDAINEPAAD//4QNoAmFAC4iHWTuBv4gBhXg +A+4Ajtj3wAfgkgCdAAxKEaaqKKKe9wAIo+IAnQAsop0LSAoogr8IzAHrxAAGCEGAALDpmdjntAAN +8H4AAP4gBhXgAVIA6iQACdgEgADsEgEq6ASAAFhk/dKg0Q8AAMDAwLoL6zTr1ggucKYAAPpAaB2g +G8UA/AAiHaANFQBYacFj/8EAAOokAArYBIAAWGaW0qDRDwCLEPpAaB2gDBUA+2MAFeANtQBYabdj +/5fAoFmiYB3PLo7Y+d/suJIAnQBj/6oAAADrxAAJUASAAFvoU/ufUgWv9v4AiieNEcDA6qwgLtgE +gABYXpHSoNEP//U8DaALBQAAAAAAAFv+/P4gCBXv9AYA/iAGFeAKBQBZokgdzxeO2I8QG88X+d/3 +eJIAnQD//DwNoAsFAAAAAP/74A2gDAUAwMoM7DT9oQYVr/veAAAAAGwQCuQiBypQBIAAiCL+QPAV +r88FAOVBFS1nAoAA7DwIAiCBAAAPRAGkVORMQC5YBIAA9YAl0qHuAQAtsAfs3P4tsASAAOSACGbo +DQAAwCDRDx/O9e0WACXAgQAAmBMdzvT1ACSaogCdAOXO8h8gBIAA9cAfYhIAnQAM6xGluymynu4W +ASZAIQAA+SAlm6IAnQArsp0N6Aoogr8IuwHntAAFoBmAAI34mhTTD/egIsiSAJ0AKVKu689eFKBB +gAAuUq0vsucbztkP6AHoFgImy/0AAP/AH4ZiAJ0Ambj/wB/GYgCdAC4gFC1gB67d+iCGFafdAQAt +JBT1oCFt0gCdABnPGh/PTo4giDTtzt0aXwKAAOW7CA92AoAA8QAE+lAFNQCDYyohJAXsAiggBy5h +AfzgRhXgFIUAlHP84CYVoIgRAOzO5xxCgoAA+QYADHAEBQD44AYVoAglAOwABQPgQQAAbYoCDAJh +LSEJLCAHlHX+4SYVoDilAON2CC7tAoAA+aYADrHMAQDtdgYuZAKAAAyqAg+qApp0KSEJAioC/sAk +FaAMBQDltp0s3QKAAPlmAA2wDQUAWGXqwCDRD4gTiID1gCAVoIkVAPXGAAo3iMEAeYkZlHHvzxcW +S/0AAP7gBhXhmR0A+OBGFeAAUgCUcYgTGc8TmXCIgQhYFJhyjzYZzwwoIgcUzwwpkhr1AqQV4v8d +AAT/ASUWBg+ZCO+CCSRAgQAA+OBmFe/JBQDpiAEFIAkAAOgWBSonAoAABP8ICFUI7KkIAqkBAADl +8wp0yAkAACgSBgj/DOoWBCzPAoAABJkM5JBFbicCgADvSAgDyEEAAJkX+KAOyqIAnQAPVQwFThTT +D23pBQ8AhgkCYYkVDs8Mp1jsjBAkyQEAAG35BQkghgwCYy4iAAjuERjO4vTgAESwDxUA/yDGFeAM +RQAM7AKYlBjO25yVjGMoghgVzt7/nOYF6MwdAKyImJcYztnvABUE8IEAAP+dsgXgDAUAsczugx4O +D+gAAP0hRhXgLAUAnJuHY4Q0jDUIRAHvzAELwkKAAAhEAgVEApScKGAJLmALJGAKJWAI787JH3EC +gADmRBAMQwKAAP0GAAwwxTEA7kQCDmHCgAAMRAIIRAKMNhjOaJSd9GFIFaXlHQDvzAEPcEKAAA7M +Av0hxhWkVQEA6EQBCqoCgAAFRAKIZZifhWYllhCPZySWEi+WEY5kLpYTLGAB8YAEp9IAnQAsIAce +znLywCQV4MwRAO8hJC5igoAADswCLJYUiCD+AwIdoAw1AO6WFyxGAoAADIgCHM5E/SLGFeAOBQD5 +IqYVoAglAOwABQThgQAAbYoCDAJhKCEJmhQtIAf7AAAUMBylAAyIAiiWGvmdGgWh3QEA7pYZLuwC +gAAN/QII3QKIECOWHSeWHO2WGCRADQAAmBCOFI8QL7adLWAHiif/oABGsAwFAOvUAAVQgQAAWF1n +0qDRDwAAZM5WbckFD0CGCQJlY/5EjfiaFPegBviSAJ0ADEsRpbsosp64yfkAB6viAJ0AGM3sKbKd +CEgKKIK/CJkB65QABIcxgACw2Zn417DuFgEt4C4AAI0QixH6QGgdoAwVAO3cAyXYYQAAWGhhwCDR +DwAAAMDgnhKIEhvN2MCaCdk06bYILGCGAAD6QGgdoBvFAPwAIh2gDRUAWGhVwCDRDwD1jwAN/+0a +AAWLDPogZhXv7aoAAAAAAAD8IQYVoAoFAFmg9h/NxY34ihSMGPm/3JiSAJ0AY/+wAJwY6xICKVAE +gABb5umKFPwhCBWv7xIAAP/tZA2gCwUAnhH8IQYVoAoFAFmg5h/NtIoUjfiMGI4R+b/4SJIAnQD/ +/LgNoAsFAP/8aA2gCQUAwIoI2DT54QYVr/xmAAAAAGwQBikgBSYgB9gw9gBiHeAaRQD7IA/NIWYB +AAUJR/0jAAFfxQUAiyITzaEZzZ/kZAAFg7GAAMAg0Q+IJ4uILoEV6YILJHiBAAAF+gHq7ggKbwKA +AOoWACdxAQAA+yAORGIAnQAsiRSdEavarcwshRT7wA4jogCdAMk0yULZsG1JBQMAhgkCYSwSASry +AAyqCP9AESQiAJ0AmvDTsPhgaB2v/hoAAAAAAOxqEQMk/QAAA6oILaKeCWsKK7K/96ALAdIAnQAq +op0PAgALqgFloE/rbBgpUASAAPwAIh2gDTUAWGf1wCDRDwAAAAAdzW2L2JgS92AMkJIAnQAMShGj *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 31 00:16:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BC3EBF17E8; Wed, 31 May 2017 00:16:45 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8708E80B5A; Wed, 31 May 2017 00:16:44 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V0GhUZ012938; Wed, 31 May 2017 00:16:43 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V0GhxH012935; Wed, 31 May 2017 00:16:43 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705310016.v4V0GhxH012935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 31 May 2017 00:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319270 - in stable/10/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 00:16:45 -0000 Author: np Date: Wed May 31 00:16:43 2017 New Revision: 319270 URL: https://svnweb.freebsd.org/changeset/base/319270 Log: MFC r318762: cxgbe(4): Update the T4, T5, and T6 firmwares to 1.16.45.0. The latest firmware has a number of link related fixes, support for a new custom card, and the fix for a bug that affected rate limiting on FreeBSD. Relnotes: Yes Sponsored by: Chelsio Communications Added: stable/10/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu - copied unchanged from r318762, head/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu stable/10/sys/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu - copied unchanged from r318762, head/sys/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu stable/10/sys/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu - copied unchanged from r318762, head/sys/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu Deleted: stable/10/sys/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu stable/10/sys/dev/cxgbe/firmware/t5fw-1.16.26.0.bin.uu stable/10/sys/dev/cxgbe/firmware/t6fw-1.16.26.0.bin.uu Modified: stable/10/sys/conf/files stable/10/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/10/sys/dev/cxgbe/firmware/t4fw_interface.h stable/10/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt stable/10/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt stable/10/sys/modules/cxgbe/t4_firmware/Makefile stable/10/sys/modules/cxgbe/t5_firmware/Makefile stable/10/sys/modules/cxgbe/t6_firmware/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed May 31 00:16:05 2017 (r319269) +++ stable/10/sys/conf/files Wed May 31 00:16:43 2017 (r319270) @@ -1195,7 +1195,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.16.26.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1219,7 +1219,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.16.26.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.16.45.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1243,7 +1243,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.16.26.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.16.45.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Copied: stable/10/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu (from r318762, head/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu Wed May 31 00:16:43 2017 (r319270, copy of r318762, head/sys/dev/cxgbe/firmware/t4fw-1.16.45.0.bin.uu) @@ -0,0 +1,9729 @@ +/*- + * Copyright (c) 2017 Chelsio Communications, 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. + */ +begin-base64 644 t4fw +AAAEOAEQLQAAAQkEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAABBsEKgQyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IFRodSBNYXkgIDQgMDk6 +Mjg6NDAgUERUIDIwMTcgb24gdm5jNC5hc2ljZGVzaWduZXJzLmNvbTovaG9tZS9maXJtd2FyZS9j +dnMvZnctcmVsZWFzZSksIFZlcnNpb24gVDR4eCAwMS4xMC4yZC4wMAAAAAAAAAAAAAAAAI/sRllg +AMgA4QB78AAQAADhADC4eP///x/84UCAAAAB4QB7cAAAEAAf//2M4QGUcCAAAADhAZwE4QB5AAAC +AEDhAHmAAAYAQAACAAoABgAK4QB5BAAMAACAAAEC4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAA +AAAAgADhAHsAAABAAeEAe5wAAEAAREREQuAAAADjAARzREREQOMACAAgAAJcAAAAAB//ktAAAAAA +H/+S1AAAAAAf/5LYAAAAAB//ktwf/8AAAAAAAAAAAADAABL/zRP/zZMgEv/NE//NhCAEMwGTIBH/ +zBL/zJIQEf/MEv/MkhAR/8wB9DER/8siCv+SEADkMQAFMQECABL/yALnMQIWABH/x4EQAQFfwCEC +EQHJERH/xBL/xJIQEf/EEv/EkhBgAA8R/78S/8OSEBH/vxL/wpIQgRAR/8HAIJIREv/AkhLAIJIT +Ev+/khCCEALyUGUv9xH/vccvkhAR/7ySEBL/vBP/vJMgwDKTIRP/u5MigiIS/7oT/7qTICMiIRT/ +uQQzAck4E/+4gzADgxQIMxEU/7akM5MhE/+qkyJgAAjCMJMhE/+nkyIS/7GQIJAhkCKQI5AkkCWQ +JpAnkCiQKZAqkCuQLJAtkC6QLyAmECAmEYIiEv+kwDAtNzAtNzQtNzgtNzwjPQFyM+0AAgAS/6HA +MC83AC83EC83IC83MCM9AXIz7QACABL/l8AwKDcwKDc0KDc4KDc8Iz0BcjPtEv+VwDAnNwAnNxAn +NyAnNzAjPQFyM+0S/5AV/5AW/5HAMNcgBWYBYAAZAAAAAAAAAAQ2BQACANMP0w8FMwxuOxQHRxQH +BEN2MeYENgUFMwxvO+0AAgAS/4MV/4EjCgACJwIHBEMEPgUFMwwHRxRvO/ADAgAS/33JLoMghCGF +IrwidDsOhlC0VZYwtDN0M/Rj/+YAZT/iZV/fEv9xwDIDLgUDAgAS/2jAMCg3QCg3RCg3SCg3TCM9 +AXIz7QACABL/ay0nAMARAUkxAEgxAQIAwAAU/2gE0jEV/2eUUBT/ZwTTMRX/ZpRQFP9mBNQxFf9m +lFAU/2UE1TEV/2WUUBD/ZQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+KQOMACfgf/4pAH/+KQOMAFDgf +/4pAH/+KQOMAFDgf/4pAH/+L4OMAFDgf/4vgH/+SzOMAFdgf/5LQH/+z8OMAHMgf/7PwH/+z8OMA +Pegf/8AAH//+eeMAPeggAAAAIAABauMAfGQgAAF4IAABfOMAfdAgAAF8IAABheMAfdQgAAGYIAAB +nOMAfeAgAAGcIAABpeMAfeQgAAG4IAABvOMAffAgAAG8IAABxeMAffQgAAHYIAAB2OMAfgAgAAHc +IAAB4uMAfgAgAAH4IAAB+OMAfgggAAH8IAAB/OMAfgggAAIYIAACGOMAfgggAAIcIAACHOMAfggg +AAI4IAACOOMAfgggAAI8IAACPOMAfgggAAJYIAACWOMAfgggAAJcIAACYuMAfgggAAJ4IAACeOMA +fhAgAAJ8IAACguMAfhAgAAKYIAH4+eMAfhggAwAAIAMVtOMCdHwgAxW0IAMVtOMCijAgAxW4IAbx +XOMCijQgBvFgIAb00OMGZdwgCAAAIAgOYOMGaUwgCA5gIAkpjuMGd6wgCSmQIAkqXOMHktwgCwAA +IAsAAOMHk6ggCwAAIAsAAOMHk6ggCwAAIAuiCOMHk6gAAAAAAAAAAAAAAAAgABOOIAATgCAAF2og +ABOAIAAW5SAAE4AgABQyIAAWfSAAFgIgABOAIAAVsSAAFWogABT9IAATbSAAFKcgABOAIAATgCAA +E4AgABRSAAAAAP///////w/8///w////APwgALC+IACyMiAAsmIgALIoIACx6SAAsd8gALGuIACx +pCAAsZggALFHIACyYCAAsT0gALENIACyYiAAsQMgALDxARAYAQAEAAAAAAAAAAAAAAAAAAoAAAAK +AAAAFAAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEA +AQACAAMABAAFAAYABwAIAAkACgAOABEAFQAZAB4AIwAtADwAUABkAMgBLAGQAfQAAAAAAAAAAAAA +AAAAAAAAAAAAAQABAAIAAgADAAMAAwADAAQABAAEAAQABAAFAAUABQAFAAUABQAGAAYABwAHAAAA +AgAAAAYAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKA +AAADgAAABQEAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAAAcAAAAKAAAADgAAABQAAA +AcAAAAKAAAADgAD/AAECAgAAABAgQAAAAAAABAACAAEAAIAAQAAgABAACCBAgAAAAAAAAAAAAAAA +AAAgCKlYIAipWCAIqQsgCKjYIAiooCAIqFsgCKhbIAiqiCAIqoggCKhbIAiqiCAIqoggCKhbIAio +WyAIqAYgCKqIIAiqiCAIqoggCKqIIAiqiCAIqoggCKqIIAiqiCAIqoggCKqIIAiqiCAIqoggCKqI +IAiqiCAIqoggCKqIIAioNyADCtAAAAABIAMK2AAAAAIgAw8YAAAA/yADCDAAAAD/IAMKvAAAAAIg +AwrAAAAAAyADCsgAAAAHAAAAAAAAAAAgAwqgAAAAASADCqQAAAACIAMKrAAAAAQgAw8YAAAA/yAD +CDAAAAD/AAAAAAAAAAAgAwgwAAAAACADDxgAAAAAIAMJbAAAAAEgAwl0AAAABCADCXwAAAAIIAMJ +iAAAACAgAwmYAAAAQCADCaAAAACAIAMJqAAAAQAgAwmwAAACACADCcQAAAQAIAMJ2AAACAAgAwnw +AAAQACADCgQAACAAIAMKFAAAQAAgAwogAACAACADCjQAAQAAIAMKRAACAAAgAwpUABAAACADCmwA +IAAAIAMKhABAAAAgAwqMAIAAACADCVgAAAAQIAMJYAAAABEgAwlAAAAAACADCUQAAAABIAMJSAAA +AAIgAwlQAAAAAwAAAAAAAP//AAAAAAAA//8gAwjAAAABACADCMwAAACAIAMI3AAAAEAgAwjsAAAA +ICADCPwAAAAQIAMJDAAAAAggAwkYAAAABCADCSQAAAACIAMJMAAAAAEAAAAAAAAAAAAAAAEAAAAB +AAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEA +AAAHAAAABwAAAAYAAAAGAAw1AAAQRqoAFFhVABhqAAAAK2gAACODAAAYagAADQYAAAsqAAAAAAAA +AAAAAAAAAABoKwAAaCsAAGyCAABvnAAASmgAAEpoAABNKQAASmgAAE7qAABMmAAAUj0AAE+4AAGG +oAABhqAAAgjWAAII1gACCNUAAgjVAAKLCwACiwsAAgjVAAK2cgACtnIAAw1AAAQGBwAAAAAAAAAA +AAAAAAACAgUFCAgLCw4OEREUFBcXGhodHSAgIyMmJikpLCwvLzIyNTU4ODs7AAAAAAAAAAEDEREI +CBAJAwEAAAAAAAAgBMzkIAGy9CAAN0ggAYJQIAGvQCABqbQgAWM4IAQ5LB//6jwgAJyoIACzGB// +3RAgAGjgIABaQAAAAAAAAAAAIAGECCAAiLAAAAAAAAAAAB//1fQf/8V8H//ClB//wDAgAFVAIABI +nCAARcggAKgwH//j8CAGxCgAAAAAAAAAACAATFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +IAG6XCABmnggAL1gIAC8lB//8RAf/9CgH//MOCAAhiggBUzoIAEzqCABE6wgAPrYIADvSCAA4rQg +ANUsIADAQCAE0NggAybgIAEosCADVVggAea8IABooAAAAAAgAL3EIAXFxCAAsDAgAY0MIAACmCAA +ofAAAAAAAAAAAB//9FggAL18IAMpkAAAAAAAAAAAIAOnvCAAJ4wgAAlwIAAmiAAAAAAgADKAIAAw +GCAALUgAAAAAIAA3CCABLHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgADSk +IATMhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAA2SCADsJggADVYAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAN0ggAJogAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAgLAAAAIAMTCAgAAAAgAxMUCAAAACADEyAKAAAAIAMT +LAwAAAAgAxM4EgAAACADE0gNAAAAIAMTXA4AAAAgAxNsEwAAACADE3wKAAAAIAMTkA4AAAAgAxOc +GAAAACADE6wNAAAAIAMTyA4AAAAgAxPYEAAAACADE+gSAAAAIAMT/A4AAAAgAxQQEAAAACADFCAR +AAAAIAMUNAoAAAAgAxRICwAAACADFFQNAAAAIAMUYBQAAAAgAxRwCgAAACADFIgPAAAAIAMUlAYA +AAAgAxSkBgAAACADFKwGAAAAIAMUtAYAAAAgAxS8BgAAACADFMQJAAAAIAMUzAYAAAAgAxTYBAAA +ACADFOAGAAAAIAMU6AsAAAAgAxTwCwAAACADFPwEAAAAIAMU4AQAAAAgAxUICQAAACADFRAJAAAA +IAMVHAAAAAAAAAAADQAAACADFSgKAAAAIAMVOAYAAAAgAxVEAgAAACADFUwDAAAAIAMO7AEAAAAg +AxVQAAAAAAAAAADXaqR46Me3ViQgcNvBvc7u9XwPr0eHxiqoMEYT/UaVAWmAmNiLRPev//9bsYlc +175rkBEi/Zhxk6Z5Q45JtAgh9h4lYsBAs0AmXlpR6bbHqtYvEF0CRBRT2KHmgefT+8gh4c3mwzcH +1vTVDYdFWhTtqePpBfzvo/hnbwLZjSpMiv/6OUKHcfaBbZ1hIv3lOAykvupES97Pqfa7S2C+v7xw +KJt+xuqhJ/rU7zCFBIgdBdnU0Dnm25nlH6J8+MSsVmX0KSJEQyr/l6uUI6f8k6A5ZVtZw48MzJL/ +7/R9hYRd0W+ofk/+LObgowFDFE4IEaH3U36CvTryNSrX0rvrhtORBwwRFgcMERYHDBEWBwwRFgUJ +DhQFCQ4UBQkOFAUJDhQECxAXBAsQFwQLEBcECxAXBgoPFQYKDxUGCg8VBgoPFR//wAAABAAgIAb0 +0CAG+YAf/N4AIAb1IB//rBQf/60kH/+wkAOAAACBAAAAH/+wgAD/+AABAAAAABAAAIEEAQCBBAAA +AQQAAAEEAQCAAAAAAAX//x//hTAGAAAAKgAAAB//z/ggBExcAgAAAIAQAABBQAAAQUABAIMAAAH/ +/7//v////x//mMwEAAAIIAMNCIGAAAAMAAAAH/+TIP//AAD//wD/AAEAAAAA//8f/7GAH/+oxA// +/////9Bk///TYB//Zowf/ODoIAbyrP//vvQf/2aAH/9nBP//wWAf/63cH/+e1B/84gAAAAi44P/+ +AOEBkgAf/5lAAP///x//nXQf/638BEEACAQBAAilAAAAwAAAAMAEAAAwAAAAH/+ugAAAHUAAAP+A +IAbxYCALYiDhAC4AH/+udB//qjwf/68wH/+qoAAAF4DgAACg4QAwuAAAgADhAGAQAABAAOECEADh +AjAA4QJQAOECcADhABAIH/zhQOEAe3Af/7OwH/+zqB/84Agf/7OsH/+zyB//s8Af/7PEH/+z4B// +s9gf/7PcIAb1IB//sYAf/6wUH/zeAB//rSQf/60gH/+twB//nYQf/7DMH/+qJCALAGAf/69MAAD/ +gAAAHiAf/5MgH/+vWB//r1Qf/6+4IAsGcAQAAAgFAAAAg/8AAIEAAAAAEAAAKgAAACAACbQgAwwo +H/+JgB//hTAf/4c0H/+wkGdFIwHvzauJmLrc/hAyVHYf/4AAAAA/KCADDuzP////IAsHYBAAAAA/ +////AgAAAEAAAAD//3//IAsIgB//sIAgACPAIAsIsCALCSAIAAAAAP///yALCZD3////IAsLgCAA +IGj//v//IAsWoIAAAAAgAw0ADAAAAAAAQAAAAP//AACAAP/7//8P9oAAIAsaECALGkAAAQAAAAQA +ACALeNAf/63QIAAygCAANGAgADAYIAsa0CAALUggCxtgIAsbsCALHEAEAQAI4AAAACALHMAgCxyA +UwAAACALHOBSAAAAIAsdIFEAAAAgAe/sH/+qkCALH7AgCyAQIAsf4CALIpAf/638IAsi4B//nXwf +/62gIAsk0BQAAACAAAACfFAAAIAAABCAAAAGgACwAAAACgAA/zSS///wD4AAsQDhAZoAAAIAACAL +JJAf/5r0AAB+QB//rdQA/8AAH/+t4B//k6QBAAAAKAAAACYAAAAgCyUAH/+T4AYAAAAFgAAAH/+p +6CsAAAAgAE+4IAt7gB//q4QDgAAAB////zUAAAADAAAAAD///4BAAAAID///H////yAAAAAAAMAA +H/+tuD0AAAAf/5lsBwAAAIEEAQCBBAAAH/+sAAAAOpjDAAAAAAAP/wBDAAAAAAgABAAAAB//q7wg +C3vgH/+zJB//saAf/5jMAAYAAOEAegAf/5k8H/+txCCgAAAf/6wYH/+djB//nXggC3wQAAMHgCAL +fIAf/5tYACAAAABAAAAAAAkAAAAwAv/8+H/AAAAAo/+7AKP/ugANAAAA4AMAAIP/tgAP////D//4 +AP8AAAAgC3zAIAsmYCALJpAgC31QAA8AAAAKAAD//wAPA//AAIP/wAAgC33QIAt+QB//rqAf/7IQ +/2DwAB//sfAf/5LgBIAACB//gFAARAAA/x///wDAAAABgMIAAACBAPAAAACBgAAA/3///x/84HQf +/6jE/7//////AAAAgAAAAACG3R//nswf/OIAH/+T0O4AAAAAAAm8H/ziDA8AAAAgCybQH/+uQAAA +CLwf/69EH/+fSB//mWgf/4BgIAbzAAAAMAAAACcQH//cgCALhKAgC4RwH/+upB//mWAAAP/+H/+d +bN6tvu8gAwfgNAAAAD8AAAAf/69gAACJBgCZAAAf/7DoEAAHAgHAgACZAAAAH/+v0ACIAAiCgAAB +H/+xOP//8AADFQAAAxEAAAAPA/8gCyzgH/+tpCALhPAgCy1AIAstkCALLiAgCy0QIADp7CALLfAg +Cy/AIAsv8CALMEAgCzCgIADvkCkAAAAAAIkUIAD19CALhWAgC4XAIAD/6B//rvDw8PDw/wD/AKqq +qqrMzMzMH/+yMAAAHxAf/7A4AAP//wAAJ/8gAQhoIAuGMAAPQkAgA1x4H/+ueAAJAAAAAEgAggAA +ACABLHggC4agH/+uJDsAAAgOAAAA0AAAAB//gKAAAB/KAAAIUAAAH0AgCznwIAs6ECALOjAACQAI +H/+xNDAAAAD///f/IAs8gCADYsQAAIP/IAb4SBWgAAAgBvlAH/+w+B//rcwAAAgGAACIzH8AAAAA +AA/+IAuLYCALi/AAAOAAIAuJQCALi8Af/5sMAAQD/woAAAAgBvWYH/+tkCAG9eAf/54gg/+3AIP/ +tiAgCzyw4QAAADMAAAAf/7EAH/+x9AP/4AB///8AAD/2kAAAH9gD//AAIAtnoCALZ2AgC2fAH/+z +ACALPTAaAAAAIAs9gCABepgf/7D8AA///x//ryAf/63cIAuMgB//nawf/6o8H/+sMCAAbQggBvKI +IAAFiB//qSAf/5qIH/+ZCB//qpggC0CQwAQAAB//rCQf/6w8H/+x4B//sVQgC42QIAtA0CADDbAg +AG3o4AEAAB//ntAgC47gIAtBECAArQgf/57IIACqCCALjmAgC46wH/+bLCALQyDg//4AIAtqQB// +ntQgC07AH/+t2B//lVwgC1jgIAtZcB//saQgC1mAIAtZsEgAAAAgAcIwH/+rlCABxDQf/5m8H/+p +NB//qVwAABgwAAAWPB//rGQgBvUUH/+p5B//mUDhAC4AH/+scOEAXgDhAg4A//+//+EADgDhAY4A +//++/x//nXQf/6psIAHJYCAB1YjgBQAAA/8AAB//qaQgAw0IH/y//zwAAAAABf//gwAAAB//qTwg +AeuAIAtl4B//rrQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYAAAAAAAAD/////////////////////H//8 +gB///IAf//xIH//8SB///Egf//xIH//10B//+Pgf//dUH//3VB//91QgBsYYAAAAAAAAAAAAAAAA +AAAAACAGyWAgBslgAAAAAAAAAAAAAAAAAAAAACAGxhggBsYYH//57B//+ewf//nsH//57B//+ewf +//nsAAAAACAByngAAAAAAAAAAAAAAAAAAAAAAgEAAAAAAAAAAAAAAAAAAAQAAAAAAAAAgYAAAAAA +ABAFAAAAAAAABAAAAAAAAAAAAAAAAAAAAACBAAAAAAAAGAUAAACAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAgCgAR8o8T8o/TDwPmMQECABbyjRfyjndrBpBgtGZ3Y/hUDzFVzCAPFABj//kAAABsEAgoIAUn +IAcpMQX4IIYV4BlFAPkADoVhdwEAiiIW8oD95QAF4AyVAPFXvA3gD6UA6vJ9G8cCgACmiCuCngp5 +CimSv/1gDYOiAJ0AKIKdCYgB6BYFJA1RgAAo0gj3AA2okgCdACtiruzycRWKuYAAKmKtLMJ/7KsB +BHP9AAD9QAoeIgCdAC7WCP1ACh4iAJ0ALyAUpP8PD0cvJBT14Axd0gCdABnyYy4iFiwhKYgVH/Jh +rsyfgOoiHi5nwoAA/QBmFaANJQD9AEYV4AtlAO3yWh1WAoAAC6oCixSagekAFQRAQQAAiRUIAIoo +PBD9IMYV4EwFAP0g5hWgDEUA7Ls2BMiBAABtuQUIAIYJAmHu8ksVoIeAAIgV7gAFDc8CgACpiOiM +ICWkNQAAC8kMbZkCCAJhLSEp0w/qISgm6AUAAA0NTy0lKf1AB3RiAJ0A/+R4BeAMFQD6IKgV4B7l +AOoiHi7NQoAA+CAmFeAIBQD4IAYVoA0FAOgWAiXZgQAAWIZM/uAAFzfFAQD3wABHMA2VAO3mnSgE +CoAA+YAFWVIAnQDAINEPAAAA6iQACdgEgADsRAAK6ASAAFiINdKg0Q8AAAAAwLAPiTTp1ggt9i4A +APpAaB2gG8UA/AACHaANFQBYjPlj/8EAAOokAArYBIAAWInO0qDRDwD/+VgNoAgFAOokAAPYYQAA +/AACHaANlQBYjO1j/5HAoFnFlh3yAojY+R/yCJAPpQBj/6TaIFgLjGP+cAAAAAAA/AACHeAKBQD6 +RSQdr/wqAIon60QACmgEgAD7RAAVoAwFAFiBxdKg0Q8AAABsEAYuIhCUEeUhGirQBIAAJiAH9kEo +FeAfxQDqFgAqx8KAAP8CUg3hZgEABwlC8SBwDeKFAQBkgfLU8CkgBfxASBWgG4UA/p4ADbAaRQD7 +IA+VIgCdAOXx2R4L1gAA5/HZG08CgAD0wAwSEgCdAKWZLZKe96AR61IAnQApkp0Hagoqor8KmQHu +lAAEjkmAAIwpiyoMBz4Muwz3YAkD4gCdACogTi0gTLGo+6AN7CALFQAoJE4qMAEpIhjzQA32kgCd +ACsgBy0hJPhgJBWgDFUA/UAEBTC7EQDgqhEN2oKAAAuqAhvxvwqIAiohBywhCQvdAvsGAAx6qgEA +6/G6HVMCgAAKzAIqISKY4IggnOOd5AuqApri/QAAFDAKZQAKiAKY4S0iEJ3lLCA4G/Gv+AAiHaBN +FQD5wSYVoMwZAAzYOR3xq5ToDL05+aYADrALBQCb5xjxnp3m7fGfFOAFAAAsJhib65nq6AAVB0jB +AAAJAIrt5g4hyEEAAO/mDyd5AQAACSCGDwJjCQCGDwJhDG4Rpe7q5p0jgLGAAIgpLyA4p4goJgnz +4AgXkgCdAIkQCQlH+SAHAVIAnQDAINEPnhLqJAAL2ASAAFiKpI4S/00QDeAfxQDsEgEpUASAAO0S +ACnYBIAAWIeR0qDRDwAe8XWK6PdABjiSAJ0ADGkRpZkrkp73YAaLUgCdACmSnQdrCiuyvwuZAWSQ +v7CsnOjulAAM834AAGAALAAAAAAA89/wSFIAnQAJVAz0nQAVr/gCAAAAAAAA6xIAKVAEgABYiR7S +oNEPAOokAANYYQAA/AAiHaANZQBYjD9j/2mNIsDkDt0C/EBGFe/9fgAAAAD4Q6gVpNkBAADRBAC8 +GgyIAvhDphWv+MYAiieNEcDA6qwgLtgEgABYgRrSoNEP2iBYhydj/vkAAP/3PA2gCQUAwKBZxNQe +8T+K6Plf+XiQH8UA//0oDaAJBQDAkMC6C6s0+8EGFe/87gAAAABsEA6VHCgiEC4iCSchNSkgByMW +DioyAv5giBXgDRUA/GBoHae1AQDjIRol2/kAAAvbOfohphXhmQEA5/82CbfCgAD+wlIN46oBAA4O +QvHAcA3i0wEAZNRjJiAFwej5/gAPMBdFAPbAJB1iAJ0AhyKLHvTl/A3gDoUAK7ABnxHzYCEnEgCd +AJkQmRqaFBjxEu3xExIoDQAA5RYLLK8CgADoVQgM34KAAK276xYJInAFAACJGp4YjRv1IAaqEgCd +ACtSnoYZ/WAKI+IAnQAvUp0mYr8G/wFk9DkZ8QCJmPcgCZiSAJ0AKoKuZKFSGvD9I4KtKqJ/HfD5 +CjsB6xYFJNv9AAD6YAnmIgCdAJvY+mAfZiIAnQCHKYYqDAM+B2YM8sAJq+IAnQApGgDzIjIN4Pr1 +ACsgFpwT+2AJ/SIAnQCLEYbDKiA49+DmFaAGBQD34SYVoEcFAPvhBhXgqhkACnY5F/DrlhYtIhcW +8Oid+i0iG537icQKdjmWF/lgEUriAJ0Ahh2eH+wWAyMN2YAAYAEIGfDSiZhqkS6LGypSno8Ze6NL +LVKdL/K/D90BnRWGFevwyhTT/QAA72QAAwHpgACauGX/E2ADSp4f/CBmFaAKBQBZxFUZ8MGJmBjw +vowT7hIPJI7bAAD//1wNoA8FAMCg+iCmFa/+5gAd8LjAugubNPuhBhXv/vYAAAAAAP/7FA2gDwUA +nh8vFhD8IGYVoAoFAFnEQRnwrYwTLxIQiZiOHxjwqfk/9XCSAJ0AYAK9wKCaFYsVFvClwNoNnTTt +Zggt9iYAAGACpJ4fLxYQnBPqJAAJ2ASAAFiJwowTLxIQ7hIPJXWhgABgAlqeHy8WEPpA8BWgDAUA +WImbjBMvEhDuEg8tdWYAAGADx44XixOIFIwR9iDIFa+KBQAqJDsMmQwIZgKZtKzYBu4CLSIQ6CYb +KVAEgABYiEiOH4wTGPCC+rOmFaEJBQBzmw0rIBYqCv/7YARNIgCdAIopKyA4DwIAo6rqJgkoBAqA +APNgBD+SAJ0AJiE1L8IEKyEaKSIQ5v82De/CgAB/2wsKCkJkoAULDUJk0HP+ICYV4B2FAPn+AA7w +ChUA+iGmFaAGNQD2IYYVr/XGAIonLxYQix7qrCAqYASAAFiE2C8SEJoTLSIb+UCIFe/83gAAAAAA +AADqIAcp4ASAAFiJNRjwV4wT/iHoFa/9ngDaIFiGNxjwUowTjh/6QSgVr/22AHGeiAq/DP/9ABXv +/goAixSKFi0iEBnwWAuqAhvwWApoAoYdGvBPCYgC6fBOGws+AAAjFhElFhImIAeFwCMhB/ZBJBXg +ZhEA61UBCzKCgAD2pgAKujMBAOYhIimbAoAAA3cCClUCIyEkCWYClfCFIJfzlvL94KYV45gBAOj2 +BizKAoAACTkC4xIRIlP5AADp9gQqrgKAAOXlAgZAgQAA5fYBJ8jBAADlEhIiFDUAAG2pBQgAhgkC +YSYgFKRmBgZHJiQU9MAINdIAnQCIGPizphWhBwUA8uHyDeD59QArIBb5YAjNYgCdACoiF7Gq6iYX +IYCpgACMKSsgOKPMnCnzYAefkgCdAI0dZdDPwCDRDy8gTmT72Q54AvhARhWgAIYAAAAAAADzH9zA +UgCdAA4/DP/9ABXv7jYAAAAAAADrEg4pUASAAO0SDCpgBIAAWIYX0qDRDwDrEgwpUASAAFiHutKg +0Q8A+kBoHaAbxQD8ACIdoA0VAFiK22P/wYsQ+kBoHaAMFQDtEgsl2GEAAFiK1WP/qQAAJiA7ZGBx +6iQADlgEgAD8ICgVr4kFAOkkOyxwBIAAWIen+iEGFaALBQArJhv6R2Yd7/vOAAAAAADrEgUpUASA +AFgJaWP+74on60QACmgEgAD7RAAVoAwFAFh/p9Kg0Q8A2iBYhbVj/wjqIAcp4ASAAFiIq2P+3AAA +JyEJJRYSIxYRJBYTJiAHhMAjIST0QOQV4GYRAOtEAQsygoAABkQCCkQC9kREFaq1AQDrIgct0wKA +AAp3AglmAiqxFZoSlPCFIJfzlvL94KYV40gBAOj2BioiAoAABDMC4/YEJdiBAAD0ImgVr8MFAAO7 +ASMSEeupCAquAoAABeUC5fYBJmCBAADlEhIkyQEAAOnLQ35ABIAALUz+DNYRpobmkzt34MEAAPSf +7/ESAJ0AbdkFCACGDAJhY/3tixD6QGgdoAwVAPtiQBXgDQUAWIqCY/5aAAAA+48ADD/+9gAInQwN +SRRtmQUIIIYMAmPv2ggFwQEAAOlMDAVIwQAA9Z/tQRIAnQArzP5tuQUIQIYJAmVj/ZQAAGwQBigg +BRzvhfffBgXgGkUA+wAKnSIAnQArIE6JyLC7KyRO9yAIyJIAnQAucq7t730XEXGAACtyrS3Sfw27 +Aea0AAWRKYAAsJ7uxggliDmAAC8gFLP/Dw9HLyQU9eAQxdIAnQAuIHP4Q6gV7/r1APvABADQCxUA +4LgaB2gFAAD7FwANNN0BAC0kcwmIAQi4OQqZAekmHSwHDgAAiiJ8pwQoIE7Jj32nCCsgTCkgTnuT +FMxsLCAU7SICLlgcAABk0cnAINEPAI4nx/MPrwHvJgInUMEAAFh2pOPvYRUBOYAAKKAA0w/TDwOI +CiiCEOygBy1YBIAA+kBoHaANRQALgABlr9yJJ9MPZJ+mKpkUyqeKmWSvnCigAAOICiiCEOygBy1Y +BIAA+kBoHaANNQALgABlr+Bj/3oAAP//VA2gCgUAwKBZwsoc7zWJyPk/9uiSAJ0AwGApIBSzmfhC +hh3v/B4AAAAAAAAAAOokAArYBIAAWIbs0qDRDwAqIAUrIAfB1P1ADmVhuwEABQVH+KAOeVIAnQCT +EI02nRLt7yEdmASAAPVgCYoSAJ0ADLoRp6ouop73wA2c0gCdACqinQ28CizCvwyqAWShPfpACBXg +DBUAWCJ/He8VKSEJGO8VKyEiLyAHHu8fLCEk+WYADbD/EQDoEgIv+oKAAA/MAg7MAiymAI4gm6L5 +QKYVoA8lAOmmAy92AoAAD+4C/0AmFaAJBQDtABUFUGEAALGZ6oMeDI/oAAAMORH3IABE8AilACiW +nfS/8rkSAJ0AiifrRAAKaASAAPtEABWgDAUAWH7DY/46//dsDaALBQDAugubNOvGCCtvBgAAY/7b +6iQAC1gEgABYCHX93cwFr/d2AIonwLD7RAAVoAwVAFiHcBnu8pmg/kAIFaAbxQD53eAFoAwVAPlA +RhWgDRUA/cAAFzAIFQDo7gINeASAAO72ASlQBIAAWIm8wCDRD4nI9yAEoJIAnQAMOhGnqi6invfA +BVTSAJ0AKqKdDT4KLuK/DqoBZKCYsJ+fyGWuwYgi6xYBJAThgAD4v+w5UgCdAIonKwoA+0QAFaAM +FQBYgzSLEB7uzp6gjCAd7s6dov2AABYwDRUADcwCnKGLtvtAZhXv9UoAAAAA61QACVAEgABYhnJj +/TyPM/4gRhXv+NYA//lkDaAKBQD6ICYV4AoFAFnCPBzuqInIixEd7qf5P/q4kgCdAP/9yA2gCgUA +AMCgwIoImDT5gQYVr/2KAAAAAOokAAXYYQAA/AAiHaANpQBYiYFj/1EAAGwQBCggFO+LHmoYBIAA +iif6YGgd4AwFAOqsICnoBIAAWH5h0qDRDwCLInO+SxTui4pIaqFHG+6ILLKuyscd7okssq0t0n8N +ywF9wBuwrp5IfcAhLyAU7yQUL9rQAADaIFgIDWP/p8CwwIoIqDToRggt/xYAAIkiyZXAINEPwKBZ +wguKSGuhrWP/6gAAAAAAAPpAaB2gG8UA/AAiHaANFQBYiVfAINEPAGwQCCwiDy8gByghNCcyB/5D +RBWn1QEA+b/AFeALFQDpuTkJsASAAOsiCSpQBIAA+CCGFeAEFQDodzYPT8KAAPciUg3h/wEACwlC +8SBwDeKOAQBkgnLBtOx7Hw6UdAAALCBP6SBNJmAFAAAMDEcsJE/9IBSjogCdACwgBfuAEv1iAJ0A +jSL6IAYVr/s1AP1gDljiAJ0AKCIZjjL5wBTVIgCdAIk4GO5HHO5E5JJib9+CgACaEJgRrLvo7j4V +SA0AAJkT6xYCL6cCgACoRPXgDSISAJ0AixMqQp77QBsb4gCdAIoSKUKd0w8qor8KmQHulAAEknGA +AIwpiyoMBT7TDwy7DPVgCdviAJ0ALRoA9aHyDeD49QArIBb5YBl1IgCdACwhIhnuOSghByohJCsh +CfxA8BXqiAEA6aoCDEMCgAAIuwIZ7jIY7iMNLUDpzAIO6oKAAAjdAp3giSCc4prk+8BmFeAKVQDr +7ioczgKAAAqZApnhiC+Y5SwgOPfBBhXgDQUA/cDmFeAKJQD93EQF4EklAPjAiBWgzBkADJo5mOkM +2zmNZZ3qHe4c/MDIFaAJBQDs5gsjh+GAAAqcEA3MApzsjBGJaJfvme6IaSjmEI1qLeYR7AAVB0kh +AAAJAIqIZ/jgC6OiAJ0AH+4BCr0CD90CnebAxfyTphWhCQUA9SHyDeD49QArIBb5YBOlIgCdACwi +GYopKyBPKSA45aoIBmAFAADsJhkl2/0AACskT5op8yAPj5IAnQCLFGWx78Ag0Q+fFZ8WnhfqJAAK +2ASAAFiG/44X7xIFJXWRgACMFGXP24on2zDsEgAlUMEAAFiCDsAg0Q8a7dCKqPdAEIiSAJ0AjBMr +Qp79YBFDogCdAIsSKUKdK7K/He3HC5kB5JIUZWP9AACc2O6UAAzyZgAAYACOKCA58R/4DhIAnQD/ +++QNoAkVAAAAAADzn+xIUgCdAAnnDPb9gBXv9foAAAAAwbN7yRQpIDqaEP4gxhXgDPUA/SAQ/SIA +nQDqJAAK2ASAAFiFbtKg0Q8A8AAYDaAa1QDAoYw3KyEJjTiOMuuvEQ3dAoAAD7sC5LsCCVAEgABY +hVLAINEPAAAA//9YDaAahQDqJAAH2GEAAPwgaBXgDBUAWIiBY/8FAAAKuAKY5sDV/JOmFeEMBQB1 +yw0rIBYpCv/5YA41YgCdAIoUZKFdi2qMZ4ppq3sHzAycZ/dg0g3gDgUAsaqMZZtqi2aaaazqq3t3 +uwGxqo4pm2aaZS0gOKXuninzoAo3kgCdAIknKJkUyoKLmcm+Ge2LKLAAnxWfFgmICiiCECywB/pA +aB2gDTUAC4AAjxWLIsej+1/ygOIAnQAoITSHZy4hGooviynodzYPZ8KAAHfLCgsJQsiUDgtCZLC0 +wdT6/gAOsAwVAPwghhWv8q4A2iBYg0Zj/gqKJ+qsMCtYBIAAWG2D0qDRDwAA//KoDaAJBQAAAJ8V +nxaeF/pA8BWgDAUAWIZdjhfvEgUtZf4AAOokAAfYSQAA/AAiHaANBQBYiDhj/eAAAAAAAOogByrg +BIAAWIYnY/2BnxX+IMYV4AoFAFnA2hrtRoqojxX5X+7YkgCdAP/34A2gCQUAwJAc7UDAugurNPuB +BhXv95oAAAAAAPNf+jhSAJ0ACecM9v2AFe/88gCKJ58V7xYGKdgEgADsEgAlUMEAAFiBbtag/iCo +Fe/6FgCfFe8WBilQBIAAWIMO/iCoFe/6tgAAAMFT+kBoHaALBQD8AAIdoA01AFh7mysgBY8WihD1 +f9qFYgCdAGP9IZ8VnxbqIAcq4ASAAFiF+P4gqBXv+K4AAAAAbBAOkxyVGogviikuIRonITQvMgT4 +QPAV57UBAPt/wBXgDRUAC9s56xYLKeAEgAD34QAP8ZkBAOcgBS83woAA/sHyDeKqAQDxQHAN4m4B +AGRkQcGkCPqN+uAjTSIAnQCOIosc9cRcDeAKhQArsAGfEvNgIFcSAJ0AmRHo7PgSWA0AAJsZG+z4 +6RYILK8CgADoVQgM14KAAKuq6hYHInAFAACGGJ4Wixn0wAXqEgCdACpSnoYX+0AJY+IAnQAvUp0m +Yr8G/wFk9CEZ7OaJmPcgCOCSAJ0AKoKuZKE5GuzjI4KtKqJ/HezfCjsB6xYDJNv9AAD6YAkeIgCd +AJvY+mAepiIAnQCHKYYqDAM+B2YM8sAI4+IAnQApGgDzIjIN4Pr1ACsgFpwQ+2AJJSIAnQAb7OQp +IDj72cQFoAYFAPfg5hWgRwUA/YCIFeCZGQAJdjkJujmLEpoUlhX9YBHS4gCdAIYbZGHTYAEDGey+ +iZhqkS6LGSpSno8Xe6NLLVKdL/K/D90BnROGE+vsthTT/QAA72QAAwHpgACauGX/K2ADSp4d/CAG +FaAKBQBZwEEZ7K2JmIwQGOyq7hINJI7bAAD//1wNoA8FAMCg+iBmFa/+5gAd7KTAugubNPuhBhXv +/vYAAAAAAP/7dA2gDwUAAJ4dnx78IAYVoAoFAFnALRnsmYwQjx6JmI4dGOyV+T/2OJIAnQBgAr7A +oJoTixMW7JHA2g2dNO1mCC327gAAYAKlnh2fHpwQ6iQACdgEgABYha6MEI8e7hINJXZ5gABgAl2e +HZ8e+kDwFaAMBQBYhYiMEI8e7hINLXZOAABgA8ScEP4hphWviQUA6SQ7JjhBAAAHAIbnEgInsIEA +AAYCYY3Hl/iKxInGrX0HqgyaxHfbCZ4d7BYAJMgFAACMEosQhhWOFJm2nbcG7gLtIg8pUASAAFiE +LI4dGOxmjBD6s6YVoQcFAHN7CCsgFikK/3m5foopKyA4o6rqJgkoBAqAAPNgBCeSAJ0AJiE0j8Qr +IRqJL+b/Ng3vwoAAf9sKCgpCyKQLDUJk0HP+IEYV4B1FAPn+AA7wChUA+iFmFaAGNQD2IUYVr/XG +AAAAAAAAnh2KJ58eixzqrCAqYASAAFiAvO8SDi1gBIAA/iGoFa/8UgDqIAcp4ASAAFiFG4wQGOw8 +/iGoFa/9tgDaIFiCHYwQGOw4jh36QSgVr/3CAHGeiAq/DP/9gBXv/goAF+w6G+w6Hew/BqkChhsa +7D7tmQIGQEEAAOVhVGfogQAAJRYQkx8lIAeDwAUlQOozAQqqgoAABTMCBzMCJyEHKiEiJiEJ9EHo +Fep3AQDrqgILuwKAAAdmAichJJPwgyCW85n2mvL14KYV46kBAOUSEC1SAoAACncC5/YEKZ4CgAAD +4wLj9gEiU/0AAOMSDyIMNQAAbakFCACGDQJhJiAUpGYGBkcmJBT0wAgd0gCdAIgW+LOmFaEHBQDy +4fIN4Pn1ACsgFvlgCLViAJ0AyD+LKSogOKO7mynzQAffkgCdAIwbZcDXwCDRDy0gTmTb8wroAvhA +RhWgAIYAAAAAAADzH93QUgCdAArvDP/9gBXv7r4AAAAAAADrEgwpUASAAO0SCipgBIAAWIID0qDR +DwDrEgopUASAAFiDptKg0Q8A+kBoHaAbxQD8ACIdoA0VAFiGx2P/wYsR+kBoHaAMFQDtEgkl2GEA +AFiGwWP/qQAAAAAAJiA7ZGB3K/qAKyQ77BICLlgEgAAIIIYNAmPs9ggs8ASAAO0iDylQBIAAWIOP ++iDGFaAMBQD8R2Ydr/vKAOsSAylQBIAAWAVTY/7yiifrRAAKaASAAPtEABWgDAUAWHuR0qDRDwDa +IFiBn2P/AOogByngBIAAWISVY/7fAAAAJyEHJBYRJiAHhMCTH/JERBXgZhEA6kQBCzKCgAAGRAIW +67YsISSKJwZEAiYhCfpmAAn6dwEA66EVK7sCgAAHZgKHL5TwhCCX9ZPy9+BmFaM5AQDp9gYpmgKA +AAPMAuMSDyomAoAABOQC7PYEJVCBAAD14CYVr8wFAAyqAaq85BIRJmEBAADsiz18SASAALBIDIYR +ppZ2wzb0n/CIkgCdAG2JBQlAhg0CZWP+AIsR+kBoHaAMFQD7YkAV4A0FAFiGcGP+YgAAAPsPAAz/ +/w4ACcwMDEgUbYkFCWCGDQJn780IBUkBAADoTAwGwIEAAPWf7diSAJ0AsM5t6QUJgIYIAmlj/agA +AABsEAYoIAUjIAckCgP9D0BEUTMBACggImSAbwIqAlh5VP1MwIDQDRUALCAhGOtpDwIA7DMRBn1W +gACoMykyng8CAG6TRSsynWSwP/pACBWg/uUADs4B/cYADvAPBQD8RCYd4AkFAPggBhXgDAUA+CAm +FeAOlQD4IEYV4A0FAFh/ePRzphWgAgUA0Q/AINEPAABsEAoqIAX4QPAV4AwVAPhgaB2ntQEA6BYA +Jdv5AADryzkKGASAAOsWBSwgBIAA/UHABFGZAQDBw/1AICUiAJ0AjSLv60EenBYAAOvrPRGwEQAA +5hYELPeCgACv7u4WAyzXAoAAq6rqFgcswASAAIcX9QAEIhIAnQCKFCdynoYTjxf64AdbogCdACZi +vy/ynQb/Ae8WBieaEYAAJSEbikKHKYYqBaU29U8ADnELBQB8swHVoJgaB2YM9MAF4+IAnQAqGgD1 +QjIN4Pz1ACsgFpga/WAF/SIAnQCKQvqgDnqiAJ0AjBUb6zKHQ5ga63cBBgj5gABgALYAABrrE4qo +6BYKJQzfgACLF4wUhhMrsp6PFyZiv3yzQy/ynRzrCgb/AeTwOWVb/QAAm8jvFgYv+24AAGACowAA +AAD4IWYV4AoFAFm+lBrrAIqoiRvoEgolDt8AAP//TA2gDwUAwPAc6vrAugurNPuBBhXv/wYAAAAA +AP/8eA2gDwUAmRvqJAAK2ASAAFiEFokb6BIKJXmpgABgAjUAmRv6QPAVoAwFAFiD8Ikb6BIKLXmW +AABgAxrw4ASIUgCdAC0hGowplxj4IUYVou0BAOkWCy8EFgAAlxj4IUYVouwBAOkWCycDgYAAmBrp +Fgsu/8KAAHX7Xg7VDPnV4AWgt+kA5kIDLdyCgAALeQKZGAhmAfaAZhWgAQIAiieZGysSAOqsICng +BIAAWH9AiRv4IUgVoAslAOukAi0gBIAA6qICKAQKgADy//u4UgCdAIwplxiYGpkbjhiPFuWtDApY +BIAA5cwICVAEgADtRgIq6ASAAOwmCSngBIAAWH9biBqJG48X+/OmFaEOBQB16wgrIBYmCv92uQzA +ofogphWv93YAAAAA6iAHKuAEgABYg4WJG/ghSBWv/4oAjykY6sGJFqX/nymMQ4tAjRXnxAAEyIEA +APwOAAU36wEA7hYBLojmAAAnIAcHB0EIdwoncp/urRANU8KAAO2qAgJAQQAA6ncBAdP9AADnxwIB +jD0AAG2pBQgAhgkCYYtAwICYEhnqrBrqqy8hGoYWHuqoJCEHGOql/CAoFaHXMQD/oABGukQBAO3Q +gConAoAA7MwPJnBBAAD4hgAKNMwdAORmACZgBQAADDwMFOqADV0M6CIAL/oCgACfZpdnnmOdZQyk +OQmJAulmBCxGAoAA5GYCIdAFAAAIqAKYYSYgFONmCA0gBIAA5iQUKAQKgADzYAQakgCdAIgX9ROm +FaEHBQD04fIN4Pn1ACsgFvlgBR1iAJ0AiBLSgNEPAIoVZKCjwCDRDwAAAAAAAADqJAAE2GEAAPwg +iBXgDBUAWIU/Y//Ziif8ISYVp9tBAOqsICgECoAA9aAEYdIAnQCMFisKAezMICnoBIAAWHoemhL6 +gAgV7/vOAACLFuxNEQlQBIAA/WAARfAMFQBYd/z0gGAVr/2iAGW7/Plf38jSAJ0ALyAg8f/fd5IA +nQBj/3MAAAAAAAAA6iAHKuAEgABYgxOIEtKA0Q+KJ9ww6xIAJVCBAABYfqjAsvtARh3gAgUA0Q8A +AAAA6zQADjgEgAD8YGgd4AwFAFh5+9tA7DQACugEgADqFgIr8ASAAO8SBilQBIAAWH7H+oAIFe/7 +FgDqJAAE2EkAAPwAIh2gDQUAWIUDY/7pAABsEAiSFJMVGeoniED4IEYVr8sFAOsqAQJwIQAA+iBm +FaeIQQDkgcBiUBEAAI8TLSEFqYwswACv3wTMC+/8QC5YBIAA/4ANiuIAnQD6ICYVoGgBAP4AIh3g +DQUABv04C98L690KB9ghAACCFZ4Q+QAARXAMJQDyQQAV4A8FAPJAgBWgAg4AjRQOVQz/4CAVoAMF +AO/kAARABQAA8Q5gDeB+AQCGEyKgAC3RBQQiC+bWCAlYBIAA4hYGIzEBAAD2QAZ6ogCdAAgGQPIA +Ih2gDQUABi04C9IL690KAVghAAD3IBAVoAIVAAcjOIcVB2YLF+n+pzcncKAGMgoGMwvsfAgBmCEA +AI7QCwCJBe42LiYAAwCLItIA6qwBJMgFAAD0X/sj4gCdAAUpDA4qDPugBhWgBxUA9WAoFeAGBQAJ +djgIaAgisgAF5QgltgF+WwIiLAHitgAmfRKAABbp5YsSHunk5rYBB5AFAAAGIgKGFe67AQxuAoAA +DbsCkmD6gAYV4SwdANEPixD8ICgV7/1SAAAA/E8ADf/8xgCFFRnptQXFC/gAChXgAgUAsSLlgx4J +D+gAAB3pzoYSGunO7W0BB9gFAAANuwKNFepmAQxOAoAACWYC69YAJhAFAAD2gAYVoSIdANEPAAAA +AOoWAS1oBIAA+8BoHe/51gD9jwAN//k+AGwQDPhASBWgCgUA6yAHKcgEgADygGgd58UBAP2fwBWg +BBUA7Ew5DLgEgAD8ISYVobsBAPMbXA3gDAUAmhacFZkTmxSbGxjphx3prB/phxXphObpqB33goAA +r+4uFgouIBbmFggtpwKAAPSAAEJw//UAf+ETAioCWC1OGOl6Heme6hYIJSoRgABgABcAAGZjy/jA +HyiQ+vUAKSAW+yAZTSIAnQCJiPcgBhCSAJ0AK1KuHOlvZLDRLMJ/K1KtDLsBZLDHsJmZiBzpjWSz +SyzAgCzMN/4haBWkzB0ArDzrFgImYB0AAPXABYISAJ0ALkKe/cAIK6IAnQCMGitCnSzCvwy7AesW +ACWZUYAAKnEMiXeZEf1ADqxiAJ0ALHAQ63IDJglBgAD5n/so0gCdAC5yA2Tg0I8WZfGwhhGPGI0U +7hIAKVAEgADm/zYL2ASAAO8WASngBIAAWCsEGOlDHeln568ubTAEgABgAvIAAMCgWbzRGOk9iYgd +6WD5P/mIkgCdAP/9CA2gCwUAwLDAqgqZNPkBBhXv/M4AAGqRJCtCnnyzQYwaK0KdLMK/DLsB5LA1 +ZPP9AAD/AQYVr/0qAAAAAAD8IaYVoAoFAFm8uhjpJomIHelK7BINJI8TAAD//IwNoAsFAMCwwPoP +nzT/AQYV7/xSAAAAAAAAAP/8GA2gCwUAAAAAihjAsZsW+V/5KuIAnQDA4J4W+V/4yuIAnQDrdAAJ +UASAAO0SCSngBIAAWCtA/gAiHeAHFQDnFgktOASAAP9AZhXv+7oAZLBJjxX+ACIdoAwFAA/sOGTA +jIgRhhjqJAAL2ASAAO0SBCngBIAA6GY2CPAEgADmFgEg+BEAAFgrzOjo+B0wBIAA/dI2Be/3/gAA +AACLGA8CAA8CAPlhNg3gDAUAeaMBwMH4ACId4A4FAAyeOOwWBSd8kYAA63QACVAEgADtEgkp4ASA +AFgsavdAaB3gCxUA+iEmFeAKFQD64GYVr/2eAIsQFej9KiEHiXAc6Pn/0cAF6qoBAP9AABU4mQEA +7KoCBMA9AAD8ISgVpIgdAOq2ACRACQAACDgMjiCZs+hfOQGz/QAA77YCL3YCgADubgIFqEEAAO62 +AS4O5gAAiBPojCAhlFUAAOo8/irIBIAAbakFCACGCQJhKzz+DLsRq1ubECggFCwgBKOI9YAImRIA +nQAICUcpJBT1IAouUgCdAIhyKCYciXHoFgctqASAAPMgCjBSAJ0A8TX4DeAHBQCnZiZGnSogFisK +/3uhCusSASlQBIAAWC/UjBllwOPAINEP6xIBKVAEgABYL88uIBYY6KP90Y4F4P/1AP/f5RxiAJ0A +Y/yHiBllj9IqcBDbcPxgaB2gCRUA+1/gFaANBQDqnTgJUASAAFgp9sAg0Q8AAAD6QGgdoBvFAPwA +Ih2gDRUAWIN3Y/+9AAAd6LMt0IDrEgQm6N0AAPpAaB2k3R0A/GAARvAMFQDt3Acl2GEAAFiDbGP/ +jy4gFi8K///f+vRiAJ0A6xIBKVAEgABYL6fAINEPixAMbBGsu/ogBhXv+5YAKCQUjXDxv/i6kgCd +APpAaB2gDAUAWHYq9sBgFa/8EgCKJ+s0AAnoBIAA+0QAFaAMBQBYeD3SoNEPAAAAAAAAAOsSAilQ +BIAAWAHz+iAIFe/6wgAAAAAAAOokAAxgBIAAWAN2iBeJcZoc56QADV8CgADrVQgE9U2AAOtUAAlQ +BIAA/QBoHeAMBQBYAzv3QABD//o6AIon/KBoHaALJQDqrCAp6ASAAFgp6CtwEPl/8TjSAJ0AKXAV +CQhFZI4ZK3EJHOhsKnEML3ARjicMqgyr/w+ICf3CpBWvzQUA7uwgJHiJAADt7gEEQEkAAAr4Oah9 +rs7u7EAm6IEAAO7bWn7QBIAADuowG+hcLaEB/UAEFaH5MQAL/worIhfv8p8uZAKAAAzdAgvuDA/u +LK7dqF79wCQd792BAP3ABB3v9nYAixT6QGgdoAwVAPtiQBXgDQUAWIMLY/4NAAD9rwANP/6aAGwQ +BCMgACQK7XQxBiIhA7wi0Q+EIYYg8kBoFaAIJQD3ZAACsJRxAPkPAAxzNgEA9GAAQfNmgQDl6Dkc +AQqAAABmGvZgAQG9RAEA5SIBAag5AADlIgwBmGkAAAQkLAQzKKMi0Q9sEAiKIicgB4kwlRX4QtAV +oXcBAPFdTA3omQEA+CAmFeD89QB8gR0FC0f7f8AV4AkVAOubOQlQBIAAWC9N81MwDeD89QAa5/SI +qBbn8vcADZiSAJ0ALmKuGefyZOHbKZJ/JWKtCVUBZFHRKIz/KKYI6VQAAo2BgAAb6A4lsIDt5+cS +qN0AAPggBhXkVR0A5UUIC88CgADmmQgCqA0AAPTgCJISAJ0AKJKe9QATO+IAnQAlkp0NeAoogr8I +VQFkUYgpIBb9IyYNoOvVACowEPtAElRiAJ0AKzELvLvaIFgu+SggFCwgBKSI9YAMQReYAQApJBT1 +IA4uUgCdAIoVHufljREoIQcc58kZ5+H/oeAV6ogBAP8AABQ0/x0A6YgCB/gFAAAPTwyYUIsgD+w5 +/KBmFeeqAQDsVgIt3gKAAOtLAgLIQQAA61YBIcBBAAD5QAlxUgCdAOhBDWJT/QAAbakFCACGCQJh +wICYFOkgBCJb/QAADLsRq1v1IAkJEgCdAIgyKCYc6TIBJdhBAACbEygWAvMgCbhQBQUAZpFQpUyI +FAx9Eabd7NadLBAEgADRDwAAAAAA9wAOkJIAnQAMeRGmmS6SnvXADvviAJ0AJZKdDXsKK7K/C1UB +ZFHNsI2dqGVe3WAAYwAAAAAAAADqJAAJ2ASAAO0SBSpgBIAAWH2h0qDRDwDAoFm7GBrng4io+R/y +GJD89QD/+VgNoAUFAAAAAAAAAPpAaB2gG8UA/AAiHaANFQBYgmFj/7HAUMDqDog0+UEGFa/4rgAd +55kt0IAt3Df64wAV5N0dAO1NCAlQBIAA/aBgFeAMFQBYglRj/3sAAAAA+EKGHa/6DgAAAACKJ/0g +aB2gCxUA6qwgKmgEgABYdzT6IIYVr/tKAIsw82AIopIAnQDiEgQr5wKAAKbMJMad0Q8AAAAAAAAA +6xIAKVAEgABYAONj/jAAAOokAAxgBIAAWAJoiTGLE4gS7KwRDSgEgADsuwgE9Z2AANog/QBoHeAM +BQBYAi+IFKWlpUwMfRGm3ezWnSwQBIAA0Q8AAAAAAP/2lA2gBQUAjTWMNB7nZvpg6BXgCSUA/HAA +B7CtcQD7LwAMu4whAPsgBADTzAEA6MwID/gKgAD/gAEGfd0BAO67AQZwOQAA7rsMBmBpAAANvSwN +zCj9YABFv/W6AAAAAOokAAPYSQAA/AAiHaANBQBYgg1j/mHAoFm6thrnIoioHeci+R/xCJD89QD/ ++PANoAUFAMBQwLoLizT7QQYV7/i2ALBLDLsR61sICVAEgAD7YgAV4AwFAFh0zLNM4hIEK+8CgACm +3SzWndEPAGwQBIk3F+c1KzAW+c5YBaMqBQAKKigLtgnoqAgLNwKAAKhmGOcvp2fkcr8pAQqAAP74 +CBWgDBUA6GYIDmgKgADmQRh0wCEAAIsymOCek5aSDbsCKHbAmzLRDwAAH+cir68p8r0AsQTt8sEu +cAqAAA6ZAvn3phXv/vUADt0DDZkBHuca5XLAKW8CgACu3ZnQjzKYUOaGACkBCoAA5YYBLiAKgAAE +/wIodsCfMtEPAAAAbBAKGecOCSkKKJJ/4hYIKWgEgAD7AAQA0AYVAOYWCisoCoAA+CCGFeBVTQAS +5wUb5wUc5vYY5tP1zggFoyoFAOraKA6/AoAA6ZJ/Juu5AACdFaSkqHesrJwWKHK5JEKf66oIBMv9 +AAD6IOYVo5kBAPghJhXgYwUA+IAEAjAAagCKGsCw/f/iHaBjBQDsVQMFAuGAAJsaLXK4BF4BDt0B +nRABAIcDNmBoPtWKGIsXjRUc5ueIFuM5CQHygQAA7hYJLM8CgACpiP0AAEY///UA4ogIDwEKgADo +gp8rSAqAAA+ZAwlEAQuAAGP/qgCKGYsUsaoKCkMqtn/RDwAAbBAEG+bUiiArsn8e5tP7TwANcy8F +AA+vKA7+CCnivyjivv3NnAXv+/UAC5kD6YsBDWcCgAD9gABGf/T1AP2ACBWgAxUA+Q7gHeANBQAZ +5sQY5rD5AABGfywBAOz8CAX9RIAAyykI6jApwr8v4sAJiAzo+xN+gQqAAC/ivgA4GgSIAwj/AS/m +vv2gIBXhux0A5LAsZmDBAAB/txRj/8QAAAnqMPmX5hXv/4YAAAAAAAD9oCAV4bsdAOW/3GZgwQAA +WC+owCDRDwBsEAQmIQn4QpAV7/gFACcgFeiYAQs2AoAA6JkMC7kCgAAHZgL4QoYd4AcFACc0APhg +Zh2gBBUABGYCljEV5mEkVq3RDwAAAABsEAQW5pQV5mvTD6YiBTUCJSaAJCKAZ0ALbQgFKCKAZ4AC +Y//z0Q8AbBAEE+aLIjaKY//8AAAAAGwQBCggBSUgB/pgqBWv9NUA+kBIFeADJQD9ASAR0VUBAMAg +0Q8AiCmaKw8CAPsACDwiAJ0AGuZ7CloJ6aH8JVALAAAqoQD7IASzogCdAPNgBHASAJ0AAioCWHQS +KyICDwIAA7oBZK+4iicEuwHrJgIlUMEAAFhthuPmQxUBOYAAKKAA0w/TDwOICiiCEOygBy1YBIAA ++kBoHaANRQALgABlr9yJJ9MPZJ92KpkUyqeKmWSvbCigAAOICiiCEOygBy1YBIAA+kBoHaANNQAL +gABlr+Bj/0oAAP//VA2gCgUA2iBYc/8rICLquwwJUASAAFh1SdpQ+gAiHeAMBQBYdvyLIgO6AfN/ ++uZiAJ0ALyAH2iD8ACIdoA0FAPVgBAcxvwEA7iYCJdh9AABYgO/AINEPAAAAAAAAAOsgIilQBIAA +WHU1KiAFwYN4oQxoqCmLIvNgBAV//EYAKSA6wL97mer6QGgdoAsFAPwAAh2gDSUAWHRsY//XAAD6 +QGgdoAsFAPwAAh2gDSUAWHPlY/+/AABsEAqIKx3mEy4gIYs3/GDIFaD/5QAP7gEuJCENzAEMuwzr +iQh4yASAAMAg0Q8DAIYJAmGbFSggBSUgB/ghBhXv9NUA/EBIFeADJQD9G0BB0VUBAIopHOYPmyv7 +QAgUYgCdAAxcCevB/CZgCwAALMEA/WAEo6IAnQDzoARgEgCdANogWHOkiyIDugFkr5uKJwS7Aesm +AiVQwQAAWG0ZCqsC4+XVFQEpgAAosADTDwOICiiCECywB/pAaB2gDUUAC4AA66QADX8eAACJJ2Sf +WiqZFCuSCcqoZL9PKLAAA4gKKIIQLLAH+kBoHaANNQALgADrpAANfy4AAGP/LQAAAAAA//9IDaAL +BQDaIFhzkSsgIuq7DAlQBIAAWHTb2lD6ACId4AwFAFh2josiA7oB83/6zmIAnQAvIAfaIPwAIh2g +DQUA9WAEBzG/AQDuJgIl2H0AAFiAgcAg0Q8AAAAAAAAA6yAiKVAEgABYdMcqIAXBg3ihDGioKYsi +82AEBX/8OgApIDrAv3uZ6vpAaB2gCwUA/AACHaANJQBYc/5j/9cAAPpAaB2gCwUA/AACHaANJQBY +c3dj/78AAGwQBBzltysyBCkwFv1gBAW1mR0A9SAIAJIAnQDq5bIUiIGAAP/LYgWv/eUA5OWEFKS1 +AAAsoX5plR18swoqzAT7YAijogCdACsgBrC7CwtH6yQGJYLRgADAINEPACyhftMP7LMMdngRAAD/ +YAfT4gCdACggBrCICAhH6CQGLH7WAACJJ4siKpkUDbsBmyKLmWSgtCiwAASICiiCENog/WDwFaAN +NQALgADAINEPAIsiiicPAgANuwHrJgIlUMEAAFhsocmtKKAABIgKKIIQ7KAHLVgEgAD6QGgdoA1F +AAuAAGWv4IknZJ9uKpkUZKBgiplkr2MooAAEiAooghDsoActWASAAPpAaB2gDTUAC4AAZa/gY/9B +AADqJAAJ2ASAAOxEAAroBIAAWHR/wCDRDwDqJAAJ2ASAAOxEAAroBIAAW/9BwCDRDwD//RwNoAsF +AP/+dA2gCgUAiDci4n8JiBH4QABBP/uSAIg3IuJ/CYgR+EAAQT/7+gBsEAQa5UEoottkgAsJ6jAr +otwLmQxnkAHRD1h2pNEPAGwQBB3lVCcgBxzlU/5BBBXg5xEADtw5nDCIIPvKLgXgCiUA+mBGFeAZ +BQDpNgMsRgKAAAqJAvhgJhXhdwEA5iB5K7wCgAD35gAPcA0FAPwEAh2gCzUA6eVBEwI5gACdNZwz +C4oCFuU+mjEa5T4G7gImIQmeNJo2BGYCIiAHnTmVO/jGAAtxIgEA5jYKKRQCgAAC/wIJ/wLvNggt +kASAANEPLCEIKyEJnTWVNwfMAgS7Agm7AgnMApw06zYGLRAEgADRDwBsEAQY5Q0e5SIsIAcd5SIZ +5SX6QQQV4PwRAP/NAA7xzAEA7TYALmQCgAAMuwIJuwLjgIApsASAAB3k3/xACBWgDgUAnmXtZgIh +uN0AAPrAhhXkdx0A6nz/LmYCgADsfAINVwKAAOxmASVT4QAAmmMCBImZZiNmBwYgiyUhCfTBZhWk +Mx0A5WYKK5AEgADogAUDKMEAAG05AgUCYdEPAAAAbBAGHeUBCysRrbMqMn8Z5P8X5NyIoMBA+OAA +RPAGFQDpuQgEAamAACwyeC8ye/mABXxiAJ0AZfEULDZ8KzJ5KzZ73UAN5BYBAgCUoA3kFsDJ/EAF +3CIAnQAvMnvBwO3k7BeDkYAAIjJ8KiEEjiDz4f4NproBACQ2fPRvZhWgAB4ALjZ87a8BBcP9AAAI +/wLvJQQljFkAACIyfLDM7zJ7IQDxgADJxmP/v9ogWHa/ZaDCKiEE/0EADBaaAQDIl9EP2iBYdrLR +D9ogWHZ00Q8AAAAAAAD6QGgdoAsFAFh3QtEPLiz46tKILwEKgAD8wAEF3/z1AAy7AwuqASrWiFm+ +QCQ2fCQ2e/pv6BWv/OIAAAAV5HwvUFhk8GpZs4VYdisoctvTD8iBWHYAKVBYZJ8pWHX6yK4V5Lgs +UmuwzOxWayYCyYAAWHWBY/8OAAAAABzksv5viBWgClUA/G9IFeALRQDtFgAha+UAAFm8cPpv6BWv ++zIALjJ74jZ8L3oeAAAiNnvRDx/kpi/yrnH2i/arBh2v/iIAAAAAAFmzTPqtZhWv/pIAbBAEFOSe +GeSY6OR1GV7CgACktCNCf6mI6LgIAYIhgAAqMgB4qQIqQnsc5JArMQQqRn8MugHqNQQp0ASAAFh2 +cc6pKTEE/yEADBbZAQDI19EP2jBYdmXRD9owWHYn0Q8A+kBoHaALBQBYdvbRDyNGf9EPAABsEATw +YOAN7/n1AIgiCTkDCYgBmCKKJyqsMFhrhuPkQhUBGYAAKKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA1F +AAuAAGWv4Ikny5IqmRTKpYqZya0ooAADiAooghDsoActWASAAPpAaB2gDTUAC4AAZa/g0Q8AAP// +XA2gCgUA0Q8AAGwQCB3kOhvkYhbkYPXILAWgGMUA4yzoJdOBAAD4QA3MJzMBAAw1EaRV6FKeKWbC +gACmxClAf/kAEJPiAJ0AKFKdZIIHmxHqCx4NSASAAJkQCiCGCwJlCwJjDQCHCQJhCQJhFuRNH+RL +7cMICQEKgADyIKYV4A4VAOPkDB9wCoAAnhOvz/4ghhXv//UA/9cAD3AHRQD+IEYVoAC6AACKmcmt +KKAAA4gKKIIQ7KAHLVgEgAD6QGgdoA01AAuAAGWv4ClCIGSQ6y1AfB7kKYwVDdsJrt4MuwosQH2m +u4qyLuCAZKE4/ce+DaAIFQDA8A2POIgVD/8JCP8KL/0XL/wcL/Ib8eFwDeAMBQDAsQvbAwsLRytE +fAu7CQi7Cqa7/I+mHaAMBQCNsO9Snibz/wAALuD//+AEe6IAnQAvUp32/+AV4Pj1APHnwA3ndwEA +eHF06hIEJkAFAADoRH0m4+EAAFh19okT0qDrEgIkgGGAAIqiC6oBKiYCiicqrDBYaw7JrSigAAOI +CiiCEOygBy1YBIAA+kBoHaANRQALgABlr+CJJ2SfGyqZFGWu8v/7xA2gCgUAjBGLEAyAhgxghgsC +aQsCZ9EPjxGNEC5Efw/Ahg+ghg0CbQ0Ca9EPmxHqBx4NQASAAJgQCgCGCwJjCwJhDeCHCAJv6OwA +CdAEgABZsq9kr6/t47oZrwKAAORVCAlmwoAA94AAQj/5MgAAAP4gqBWgCxUA+7cADfAMBQD8j6Yd +p7sBACtEfAu7Cf9gAQWwDAUA92AARb/7egAAAAtghgtAhgoCZwoCZdEPAABsEAQY44ECA0cMMxGo +MysyhBnjjiiwAIqxCYgKCiGMAgo+KIIQAwI+/EBoHaANJQALgAAiNoTRD2wQBBTjcwIDRwwzEQQz +CCQyhCpCASZAAChACPqYaB2gqSUAAgU+AwI+eYEjGON6CGgKKIIQ6lQAClgEgAD8QGgdoA0lAAuA +ACI2hNEPAAAA6yQAClAEgABYdbvzQGgdr/82AAAAAAAAbBAEWbYTEuNYE+N5DAIAKSKCCRqOA6gK +iIQLgABj/+sS46AD6DAE7jAFsTCTIJQhlSIS45wT41uEIAQzApMgEuOawDAoN0AoN0QoN0goN0wj +PQFyM+0S45XAMJMgxy8T45QDIwMS45OEIAQ0AZQgEuOShCAENAGUIBLjkIQgBDQBlCAS44+EIAQ0 +AZQgxy/AMQMjAxLjjIQgBDQBlCBj//wAAAAS44mDIAMTFA8zEZMgEuOGwDAjJgBX/9kQ44WRAJIB +kwKUAxHjg4IQAeowohEB8DHAQATkFgACABHjf4IQIxoAAyICkhAR43zAIZIQBOQxhAODAoIBgQAA +0jABIwAAAAAQ43eRAJIBkwKUAxHjdYIQAeowohEB8THAQATkFgACABHjbYIQIyoAAyICkhAR423A +IZIQBOQxhAODAoIBgQAA0zABMwAAAAAQ42iRAJIBkwKUAxHjZoIQAeowohEB8jHAQATkFgACABHj +W4IQI0oAAyICkhAR417AIZIQBOQxhAODAoIBgQAA1DABQwAAAAAAXJQBXZQCXpQDX5QAQwAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFyQAV2QAl6QA1+Q +AFMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACclAAd +kAGdlAKelAOflAQIlAUJlAYKlAcLlABDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAnJABnZACnpAHHZADn5AEeJAFeZAGepAHe5AAUwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAANyUAB2QAd2UAt6UA9+UBASUBQWUBgaUBweUCAiUCQmUCgqUCwuUAEMAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAADckAHdkALekAsdkAPfkAS0kAW1kAa2kAe3kAi4kAm5kAq6kAu7kABT +AAAAH//9pADSMRD//goAAAAAAB///ewA0zEQ//4KAAAAAAAf//40ANQxEP/+CgAAAAAAAPQwCgAA +AAAA9DAKAAAAAAD0MAoAAAAAbBAIJyAHiCIW4lP9xJ4F4XcBAOWA8WvXAoAAGOJMLoCA5qoIB3Dd +AAD9U8gVpO4dAK5O6+JHF3AJAAD/gAhLoAmlACqinQt8CizCvwyqAeoWAiUH+YAAiNj3AAjwkgCd +AC9iruziPReFwYAAKmKtLMJ/7KsBBHP9AAD9QAUmIgCdAJ7Y/UAFLiIAnQAvIBSk/w8PRy8kFPXg +B65SAJ0A+CBIFeeFAQD5AAdxUgCdAOg8ECIMPQAAsEptqQUIAIYJAmHAUIgSjTLtJhwiS/0AAOsy +ASzPAoAAqYiYE/NgCkBQCgUA6hYALYtKAACLEOtLCAvnAoAA5swIBdv9AADrxp0qkASAANEP6iQA +CdgEgADsRAAK6ASAAFh3w9Kg0Q8AwLAJjDTs1ggt+x4AAI0iZd/V+kBoHaAbxQD8ACIdoA0VAFh8 +h2P/v//8DA2gCgUAAACOImXvsC2AgC3cN/rjABXk3R0A7U0ICVAEgAD9oEAV4AwVAFh8emP/jMCg +WbUjHeHyiNj5H/bAkAmlAGP/nNogW/sZY/8GAI4nnhGI6fvCpBXvyQUA5ekUJ2CBAAAJyQHpvQgK +VwKAAOpVDARAQQAAmOkIVTLl5RQm6QEAAP0ACDriAJ0AaKs9qKsrvPD7oATT4gCdAO8SAiIMdQAA +sE5t6QUIAIYPAmErwgELqwjlyQQl28EAAP1gBsxiAJ0A68YBLcAEgABkUKn1AGgd7/qWAAAAAAAA +6iQADuAEgADsFgQsWASAAFv8eIsxiBONFOoWAC1nAoAA7IgIBfT9gADaIPsAaB3gDAUAW/w/jRDt +rQgKkASAAO1NCAv3AoAA5u4IBuv9AAAt5p3RDwjdDPogSBXk/R0A0w9t+QUIIIYLAmMrEgLvTwwE +wQEAAO27CAeMQQAALvz/bekFCECGCwJlL8kEDagMqJgojDDoxgEv+tYAACqcQJrB+4AGFaAIBQD5 +gIQdr/0WAAuIDPnBJhWv+9oAKJxA+YAmFa/8sgBsEAQd4Zoa4Zsc4Zkt0pgqoX4swo6j3eo6DA7u +QoAA/YAARnALBQArxAQrxAVZEwj6QGgdoAsFAFv86tEPAAAAbBAEGOGNKYJ/KjAHLZECLpEE/SCk +FaAPBQDrkgAmiRGAAO7s/yaT/QAA4pUCL3cCgADuuwgOZwKAAP1vAA2wAMYAK5EFLZEEsbv/v+AV +r7sBAOuVBS93AoAA/WAGvGIAnQCMkO7MCA3fAoAAC8sMCwCHD99g6wAHBvMngAAe4W8pkQUr4n8J +mRGp2e3ifSWGEYAAjNGL0JvAi9CcsZ/Qn9Er4n+wuyvmf/WgBhwfuQEAjNn5owAVr8kFAPkABAR/ +EgUAotIrJjr/ogQd5UkFAOnVESQhAQAA5NYHLS8CgADk1gYqWASAAPWABOQiAJ0AJdUQ6FgIBHgb +AADsjEAn+gEAAP3gBGOiAJ0AyTLpRAAFAIGAAG2pBQMAhgkCYSsiQqtY/wAFjGIAnQDoJkImk+EA +ANEPL5UF//yYDaALBQDApf3CfgWgOyUAWbjbwCDRDy3igIzRi9CbwIvQnLGf0J/RK+KCsLv70EYV +7/z6AADAwPsP6BWgDRUAWHAcwCDRDwAAAAAAAADv1gkmk+EAANEPAMsw+mBoHeBcxQDsrDYKcASA +AG3JBQsghg4CY/hgAEXwXkUAfqENL6ys0w9t+QULQIYEAmUpjfvpJkImk+EAANEPAAAAAOQmQiaT +4QAA0Q8AAGwQBIIjAgJB0Q8AAGwQBIUjgyAU4RP4QIQVoVUBAOrhERquwoAA5FQIAYC5gAD7AAQE +Npg5AAmIAiglBCJCf9EPHeEIE+EJH+EJJkJ+KyEELkJ/kmCWIaP//WAEBfbLOQAMuwKvX+8mACco +BQAAJUZ/IkZ+6yUEKpAEgADRDwAAbBAEiiBloFAd4PrqIgMp9sKAAK7d/a/oFeAMFQD8gEAGMaoB +AAaqAg3ILAjdKCclBe3MDARYBQAA/W0ADD/7xQDrqgEMTkKAAAlZAgOqApojCYgCKCUE0Q+PIxvg +5g8PQQv+EavrLbJ/LLJ+ctka2cDzI/4NoAwFAMDALLZ/LLZ++kAIFaAASgAA2MDzDIYNoAwFAHLR +HY0hmtCOICmyfZ3hnCDsJgEky/0AAPlvphXv/WIAABngzBjgzamIqOh4oSHqtn8vgTYAAM2uKrJ9 +aqIZLbJ7/W/mFeAATgAAAAAAAAAA7LZ/J/8hgAD6QAgVr/6eABzgvRngvYghrJmp6fkPAAzwDAUA +Ccg4+W/GFa/+FgAAbBAE9cFwBeAGFQD0QGgdoAI1APaAQAMwABoAsCIoUn/oY/dyq4EAANEPAAAA +AAAAbBAEKCIc6zQACmAEgADtVAAJUASAAAuAANKg0Q8AAABsEAT0QkgVpCNBAPJaAAk/U4EABCIK +hCaCIQVEKApEEaQi0Q9sEAQqIhIjIAf6PgAEMAY1APUACRCRMwEACshR9QAJKJIAnQD6KAAGsDsF +AP3BJAWgClUAWbglF+CA5OB+Gc8CgAD0YAYSEgCdAKeZKpKe90AIidIAnQAqkp0EOworsr8LqgHx +TuAN50UBACghBxnggv/BBAWqiAEA6+CBHEcCgAAJiAKYoBjgf/xACBXgPAUAnKf7QKYV4BmFAJmj ++UBGFaAIBQCYpu7dAg7+AoAAnaQG/wKfoS8iEg+PQeimCC//AoAAn6nt4HAZ9wKAAKfuJuadLCIS +KiIQDcwC7CYSKVgEgABY5GdoQhmKJ/oAIh3gDAUA+0QAFaANFQBYb7vSoNEPAMAg0Q8c4EmLyGqx +Www5EaeZLZKebtNmKpKdBD0KLdK/DaoB5KBZZfP9AAD/gQYVr/zCAC8aAA+qAvpCRhWv+2IAKCoA +CKoC+kJGFa/7VgAAAIkiy5loQk3AINEPAAAAAP/77A2gCgUAwKBZs2Ac4C6LyGuxlv/7mA2gCgUA +AMCgwNoNvTT9gQYV7/taAAAAAOokAAHYYQAA/AACHaANNQBYeqdpQrGMJy/JFIrJ/4QAFa/IBQDo +7gEH+EEAAO/FFCVTwQAA6sYJJ3EBAAB+qyopwRUd4C2qmprJnaCMIPvAVgXgDRUA66YCLmYCgAAN +zAL9QCYVoAIFANEPHeAjnaCMIPvARAXgDRUA66YCLmYCgAANzAL9QCYVoAIFANEPAGwQGBTgHJIQ +jiAZ4BmLIy0iASwiAiwWIi0WJCsWI/ggxhXgCBUA+CDmFaAPNQD+ISYV4AoFAPogphWgD7UA/iIm +FeAKdQD6IaYVoAiVAPgh5hWgCYUA+CHGFeALZQD6IYYV4A1FAPwhRhXgDFUA/CFmFaANxQD8IkYV +4AzVAPwiZhWgC+UA+iKGFeAJ9QD4IqYV4AhFAJgUGt/5+iSmFaACJQDyIQYVoAKlACIWEBLf8oUW +KxIkKRIFJlF+LBIiJ1F/BpkoL0CAqXn4XogVo5kBAAOZCu6SAC9QBIAAJVI+LRIjCO4IC1AAjhcs +EiQtEiIG7igvQIGufvheqBWj7gEAA+4KjuAqFhbqEiMtWASAAKjuC1AAjhgsEhYtEiQG7igvQIKu +fvheyBWj7gEAA+4KjuAqFhfqEiItWASAAAjuCAtQAI4ZLBIXLRIWBu4oL0CDrn74XugVo+4BAAPu +Co7gKhYY6hIkLVgEgACo7gtQAI4aLBIYLRIXBu4oL0CErn74XwgVo+4BAAPuCo7gKhYZ6hIWLVgE +gACo7gtQAI4bLBIZLRIYBu4oL0CFrn74XygVo+4BAAPuCo7gKhYa6hIXLVgEgAAI7ggLUACOHCwS +Gi0SGQbuKC9Ahq5++F9IFaPuAQAD7gqO4CoWG+oSGC1YBIAAqO4LUACOHSwSGy0SGgbuKC9Ah65+ ++F9oFaPuAQAD7gqO4CoWHOoSGS1YBIAAqO4LUACOHiwSHC0SGwbuKC9AiA5+CPhfiBWj7gEAA+4K +LuIAKhYd6hIaLVgEgACo7gtQAI4fLBIdLRIcBu4oL0CJDn4I+F+oFaPuAQAD7gou4gAqFh7qEhst +WASAAAjuCAtQAC4SECwSHi0SHQbuKC9Aiq5++F/IFaPuAQAD7gqO4CoWH+oSHC1YBIAAqO4LUAAu +EhEsEh8tEh4G7igvQIuufvhf6BWj7gEAA+4KjuAqFiDqEh0tWASAAKjuC1AALBIgLhISLRIfKBIl +Bu4oL0CMrn75D+gVo+4BAAPuCi7iACoWIeoSHi1YBIAACO4IC1AALBIhLRIgLhITL0CNKBIlBu4o +mhOufvkQCBWj7gEAA+4KjuDqEh8tWASAAJsRqO4LUACMES0SIS4SFC9AjigSJQbuKJoSrn75ECgV +o+4BAAPuCo7g6hIgLVgEgAArFiOo7gtQACwSIy4SFY0TKBIlBu4oL0CPrn75EEgVo+4BAAPuCo7g +6hIhLTAEgAAmFiLo7ggLWASAAAtQAI4RKhYkKRISKxITKBIlLRIVjxXsEhQkQQEAAOgWJSboQQAA +7RYVJ/hBAADvFgUmYEEAAOwWFCXYQQAA6xYTJMhBAAApFhKLHYkcjB4vEhCNH+gSESZgQQAA7BYO +J/hBAADvFhAm6EEAAO0WDyRAQQAA6BYRJMhBAADpFgwl2EEAAJsdiRaLF4gbjRnvEgohEQEAAOwS +CCRAQQAA6BYLJuhBAADtFgkn+EEAAO8WCiIgQQAA7xIEJmBBAADsFggl2EEAAOsWByTIIQAA6RYG +J/v9AADvFgQv4WYAAIsQiBOMEo+wibONso6xrJmm3aruqP+fsJ6xnbKZs9EPAAAAbBAEKSIV+KAA +BPA4dQDpjAwBIEEAAPMgAEU/iwUA66QQJVBFAAD5AAXTYgCdACsKAFmvFywiFSsiFO3NEQlABIAA +/EJGFe6APQD9awANsAk1APpCZhXgCiUAbaoMjoQODo7uhgQkQBEAAA8CANMP0w9tmiHpggQkQEEA +AIqBi4KMgwkJjgoKjgsLjgwMjpmAmoGbgpyD60QACVAEgABb/q2KIIgiiSGPIwgIjgkJjg8PjgoK +jpognyMpJgHoJgIpQASAABnexAIAhgMCYfgAChXgCbUAbZoCCACK0Q8AAAAAAAAA/YEAFaALBQBZ +ruj4QGgdoAlFANMPbZoh6YIEJEBBAACKgYuCjIMJCY4KCo4LC44MDI6ZgJqBm4Kcg+okAApYBIAA +W/6L2kD/+/wNoDyFAABsEAYpIhX4QogVoEYFANMP+IAARXWZAQAJZgx0qwGxiComFQYqDOgmFCVR +QQAA9oAHs6IAnQDrNAALYASAAFmuvPhAaB2gCUUA0w/TD22aIemCBCRAQQAAioGLgoyDCQmOCgqO +CwuODAyOmYCagZuCnIMlLBDqJAAK2ASAAFv+aAZHDPbgBY7SAJ0A5jQICtAEgAD24GgdoAMFAOQW +ACpABIAA+MhoHaAJRQAKAmcIQIYKAmUIIIYKAmMIAIbqDAAJQASAAG2aIemCBCRAQQAAioGLgoyD +CQmOCgqOCwuODAyOmYCagZuCnIPqJAAK2ASAAFv+S+pUAAGYBQAA5mzAIiEBAADvbZpqQASAAIsQ +CjwRC8sI7HwMCtAEgABZroTRDwAAAAAAAOs0AApgBIAAWa5/0Q8AAAD2YABGMAMFAPwgBhWv/yYA +bBAEGN5YGd5WGt5UE95XkyOYIpkh+kAGFaALBQArJhUrJhTRDwAAAGwQBt4g5OIQKmAEgADnQgcr +0ASAAPu8iAXgGDUA40IVKZAEgADncg4i++kAAHj7JxjeRQj4CoiAmhOcEu4WASwAIoAAAJMQKrKl +7FQACVgEgABZsD1kpcfygqYV4AIFANEPAAAAACviEgubUu4WASX/QYAAGt4t4xYAKVgEgADqoscq +4ASAAFmwMGSlehreJtsg6qLJKuAEgABZsCsjfQXkps9hmgEAABreINsg6qLLKuAEgABZsCT3R+AN +44YFABreGtsg6qLNKuAEgABZsB5kpsQa3hXbIOqizyrgBIAAWbAZ+0BCiBIAnQArMOXBWPVgK+Bi +AJ0AabchJTTlixD6gqYV4AIFANEPkxAqsp3sVAAJWASAAFmwDGSnAosQ+oKmFeACBQDRDwCTECqy +q+xUAAlYBIAAWbAEZa8a+iBoHaALtQBY4Gv6ACId4AMFAOqzOAUA4YAA6hICK1gEgABZrojIqRzd ++I0RDKw2LNYXZTMljRD8gqYV4AIFANEPLkBuZO7SkxAqssHsVAAJWASAAFmv7WWuv/ogaB2gG2UA +WOBU+gAiHeACBQDqsjgFAKmAAOoSAitYBIAAWa5yLH0DKsUoZSLRjRD8gqYV4AIFANEPAACTECqy +s+xUAAlYBIAAWa/ZZKK3Gt3Q2yDTD+qinyrgBIAAWa/UZa5a+iBoHaALVQBY4Dv6ACId4AIFAOqy +OAUn6YAA6hICK1gEgABZrlgsQG/xgCc+0gCdAGSk34oT+gCiHeAM1QBY4BjSoNEPkxAqsrnsVAAJ +WASAAFmvvmWux/ogaB2gGyUAWOAlZKI1K0BuZLdv6hICK1gEgABZrkQsQhYKzDYsRhaLEPqCphXg +AgUA0Q+TECqyt+xUAAlYBIAAWa+sZKIzGt2j2yDqorEq4ASAAFmvp2WubfogaB2gC+UAWOAPZKHb +6hICK1gEgABZri8rfQIqtRSLEPqCphXgAgUA0Q+TECqyqexUAAlYBIAAWa+YZKIqGt2O2yDqorUq +4ASAAFmvk2Sjhxrditsg0w/qoqMq4ASAAFmvjmWuB/ogaB2gC3UAWN/1ZKF1K0BuZLbjGt1/ixLq +ou8rYASAAFmvhGWmRitAb8DIDLsCK0RvixD6gqYV4AIFANEPAACTECqyv+xUAAlYBIAAWa95ZKHv +Gt1w2yDTD+qioSrgBIAAWa90Za2f+iBoHaALZQBY39tkoQ0rQG5ktmoa3WWLEuqi7ytgBIAAWa9q +ZKZ5K0BvLAr9DLsBK0RvixD6gqYV4AIFANEPAJMQKrKn7FQACVgEgABZr19kobca3VbbINMP6qKb +KuAEgABZr1pkotoa3VDbIOqiuyrgBIAAWa9VZKxfGt1M2yDqosMq4ASAAFmvUGWsTBrdR4sS6qLd +K2AEgABZr0tlpFKLESuyEguZUsiZaJIH+SAPYdIAnQCMESvGEvKCphXgAgUA0Q+TECqyl+xUAAlY +BIAAWa8+ZKF6Gt002yDqopkq4ASAAFmvOWWstPogaB2gCyUAWN+gyqIa3SyLEuqi7ytgBIAAWa8x +ZayUihP6AEId4AzVAFjfgtKg0Q/AINEPAAAA+iBoHaAL9QBY35Jkr+rqEgIrWASAAFmts+sSACPg +CwAAKsUV+oKmFeACBQDRDwAA+iBoHaAbFQBY34Zkr7otQG5k1QYpQG/xP+GXkgCdAPE/4VfSAJ0A +6hICK1gEgABZraEuQhcK7jYuRheLEPqCphXgAgUA0Q8A+iBoHaALpQBY33Rkr3IvQG7TD2T0duoS +AitYBIAAWa2TKEE0+wAPAqIAnQCKE/oBQh3gDNUAWN9T0qDRDwAAAPogaB2gG1UAWN9kZK8y6hIB +KlgEgADsEgIraASAAFje7IsQ+oKmFeACBQDRDwAAAPogaB2gC5UAWN9YZK8CKUBuZJQZGtzjixLq +ou8rYASAAFmu52WiXCtAb40Q/IKmFeAMFQAMuwL6jeYd4AIFANEPAAAAAAAAAPogaB2gCxUAWN9G +ZK66GtzSixLTD+qi7ytgBIAAWa7WZaspihP6ACId4AzVAFjfJ9Kg0Q8AAAAA6hICK1gEgABZrVz1 +QBXykgCdAMcv0Q8A+iBoHaALhQBY3zL6ACId4AIFAOqyOAUBSYAALEBuDwIAZMODGtzC6xICK2AE +gABZrr5lom4tQG/A6A7dAi1Eb2UuNY8Q/oKmFeACBQDRDwDqEgEqWASAAFjfJ2WvnCsw5WP6cwAA +AAD6IGgdoBsFAFjfGGSuAihAbtMPZIL16hICK1gEgABZrTcpQhiLECtGFQqZNviDBhXgAgUA0Q8A +APogaB2gCzUAWN8KZK3KGtyWixLTD+qi1StgBIAAWa6a49ycHQcuAACLESuyEgvJUciZaJIH+T/5 +EdIAnQCOEYwQA70BLeYS/IKmFaACBQDRD2UthI8Q/oKmFeACBQDRD+oSAitYBIAAWa0WKkU0ghDy +gqYVoAIFANEPJX0E9LAAFeALBQD6oGgdoIwFAFmsp+oSAirYBIAAWN8/KzDlwMQMuwL6fCYdp7sB +APp8ph3v5f4ALTDl+iBIFaAOJQAO3QLtNOUrWASAAFms/isw5fp8hh2v5W4AAIoSWaDjLzDif6kU +ihJZoODcoOoSAiPYEwAAWa5lZKG3wKL9uMwFoDsFAFmz5ccv0Q8a3FeLEuqi1ytgBIAAWa5cZa4+ +ixErshILyVFokQpokgf5P/Fp0gCdAB7cWQO9AQ7dAo4RjBAt5hL8gqYVoAIFANEPihP6ASId4AzV +AFjeodKg0Q8AAAD6IGgdoAtFAFjesmSsahrcPosS0w/qotUrYASAAFmuQuPcRx0FZgAAixErshIL +6VHImWiSB/k/7hHSAJ0AjhGMEAO9AS3mEvyCphWgAgUA0Q8a3C2LEuqi3ytgBIAAWa4yZa2WixEr +shILmVJokQpokgf5P+wp0gCdAB/cMYIR778CA+gXAADvJhIm6gEAACzQ5cDhDswCLNTl8oKmFeAC +BQDRD4oT+gECHeAM1QBY3nPSoNEPI30FIzyAKzDlwMEMuwILC0f6fKYd7+ASAAAAGtwOixLqotcr +YASAAFmuEmWtF4sRK7ISC+lRaJEKaJIH+T/oMdIAnQAd3BIDvAENzAKNESzWEosQ+oKmFeACBQDR +DwAAAAAA9uAAQzALBQD6wGgdoIwFAFmsKMFQ6hICK1gEgABY3sArMOUFuwL6fCYdp7sBAPp8ph3v +3hIAAAArMOXAyAy7AgsLR/p8ph3v3b4AihP6AOId4AzVAFjeQ9Kg0Q+KE/oCAh3gDMUAWN4/0qDR +D4oT+gFCHeAMxQBY3jvSoNEPihP6ASId4AzFAFjeNtKg0Q8AihP6AQId4AzFAFjeMtKg0Q+KE/oC +Qh3gDMUAWN4u0qDRDwCKE/oCIh3gDMUAWN4p0qDRD4oT+gDCHeAMxQBY3iXSoNEPihP6AOId4AzF +AFjeIdKg0Q+KE/oAwh3gDNUAWN4c0qDRDwBsEAQkIhBkQGwpMBAqMBEsMBrrMBIszgKAAAqZAuow +EyzOAoAAC5kC6zAZLM4CgAAKmQLqMBgkhREAAAiqEQuqAuswGy1WAoAADKoCCKoRC6oCsarqJhYk +hI0AACkiEuvbthTAKIAAC5sBKyYSLEAFLQqVfcFJwCDRDwAuMBQvMBXoMBYvdgKAAA/uAu8wFy92 +AoAACO4CCO4RD+4C/ddgAFCNBQAvIhJ49yTApf23RgWgOwUAWbMcwCDRDwAAAAD6gGgdoAtlAFj6 +xsAg0Q8AjCcpyRSLyfmEABWvygUA6ogBBMkBAADpxRQl2wEAAOvGCSRBAQAAeLsGLsEVq+ubyRjb +j9mw+AAIHaAPRQBt+gIJAmEc23WcsIog/UAAFTAMRQAMqgKasSkwFCowFR7bhe8wFizOAoAACpkC +6jAXLM4CgAAPmQLutgIszgKAAAqZAum2BCHAIQAA6AYABfhhAAAPAIoqIhKJIg2qAuomEiz35gAA ++kBoHaANNQAL4ABj/ukAbBAGKCAEKQoYeYEDwCDRDyoiEiQiENMP80AKR9IAnQAvQG7TDw8CAP3n +AIDQnFUAK0AFfLHVHNtj/EAIFeAKJQD+gAgVoDsFAFmy1vqAaB2gDSUA/EymHeALFQBY+oDAINEP +ABzbWY0gjjYvMQv4Y/AVoApVAPggBhWgOwUAWbLJGttSJCIYLDELiCyJSoVH/QAARDALBQD4QYYV +oA0FAOVSDiSQSoAALUYeCp4C/oFGFaAAHgArQh7rWggB2IEAAFmrUi9CHi4xC41Ar+4uRh4qUAQs +UAUY2z7rUAYtVgKAAAyqAulQBy1WAoAAC6oC7Ns5HS4CgAAJVQIIVQH0oGAV7/jFAPigBAKwOwUA +/qBoHeAKVQBZsqMqIhMpMQsrQh4PAgAKmQjpJhMiwMEAAPl/9sUiAJ0AHdsoLEIKDcwB7EYKKVAE +gABY94f6QGgdoAsFAPwAAh2gDSUAWDfrwCDRDwAvIhMuMQv6QGgdoAsFAP/AAEdwDAUA/kJmFaAN +JQBYN+LAINEPAAAAbBAGHNsTLSIALjIF9EDoFadVAQD+v8AV4AgVAA+POfSCghWgClUA9CAGFaA7 +RQBZsnqJImWQmCYgBxfa0gYGQeoyBStHAoAAp4grgp4krB/5tZgF5EQdAHSzfCiCnQlrCiuyvwuI +Ae2EAAQDqYAAHNrwDACHbUkCCAJhiDQe2tGe0IkgHNrT6tYDJthBAADs1gIszgKAAOlJAgHggQAA +6dYBKVAEgAALgAAMbxGn/+T2nSKUdQAAiif6AUId4AwFAPtEABWgDaUAWGob0qDRD8Ag0Q8AAAAA +//4sDaAIBQDqJAAKaASAAPrDABXgDAUAWHUnwCDRDwBsEASHJyp5FB/azPjipBXvzQUA6HIIJVAH +AADscgslUoEAAOqTd3PYgQAADbsBq5nowXR0yQEAAC6NAep1FCdSgQAA6pNxfDAEgAB5oX2aeO8A +BQs4BIAABwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhBwJhF9qal2CFIJNllGTztWwFoAelAOJm +AiquAoAAB1UC5WYBKxAEgADRD8Ag0Q8AAAAAAAD3gGgdoAgFAPjhZhWv/nIACJoMCroMKq0BKqzg ++uEGFa/+IgAsvED84QYVr/32AABsEATHjwhYAwg4AghIA6ho6CIIC4EKgAACIhiiMtEPAGwQBAQ4 +AwhYA6ho6CIIC4EKgAACIhiiMtEPAABsEAQEOAMIWAEISAOoaOgiCAuBCoAAAiIYojLRDwAAAGwQ +BAVIAwg4AQhYA6ho6CIIC4EKgAACIhiiMtEPAAAAbBAEIyIQKDAF+EJIFeCUJQB0iUj/KKADEI0F +AHifPXCfGeraehS9WIAACpoB+kJGFaACBQDRDwAAAAAA/bTqBaAKVQD8YAgV4DsFAFmx3yswbtMP +abEFLDAFdMEGwCDRDwAAAPpgaB2gDSUA/EymHeALFQBY+YTAINEPAIwnL8kUi8n/hAAVr8gFAOju +AQf5AQAA78UUJdsBAADrxgkncQEAAH67BinBFaubm8kc2k3ZsPwACB2gCkUAbaoCCQJhHNoznLCJ +IB7aSPv/4h2gDEUA6rYELM4CgAAMmQKZsSgiEo8inrINiALoJhIv+4YAAPpAaB2gDTUAC+AAwCDR +D2wQBBPaRAMiAtEPAGwQBiYgB4giHNoJ9EIIFeFmAQDlgntrTwKAAKyZKJKeGtoC9wATitIAnQAk +kp0KaAoogr8IRAHo2hYSEumAACciEoop+EFIFeB3QQCXEAh3CidykOqZDAPYwQAA+yAPs+IAnQAr +IBYoCv94sRL6QPAVoAwFAFhyjuzZ7RURoYAAKyEHHdn6+bRCBeq7AQDv2fod3wKAAA27AptAiCD7 +tDoF4EoFAPqAZhWgBlUA70YCLHYCgAAG7gKeQS0iEo4QLyEa+7QmBaLdUQDq7hEO7YKAAA3uAgvu +AvsGAAwx3jEAqd0t0IDoRgQv+gKAAJ9GDX0M7kYHJujBAACdRSoiFYsp90AARX/pBQDnuwgFUMEA +AOomFSXYwQAA6yYJIlCBAAD4gAtsYgCdABvZ68SQ+gAIHeANBQAKAmEKAmEKAmEpRCAtRCQtRCct +RCb8hKYd74oFACpEIS9SEf6HZh3o/x0A/odGHej/HQD+hyYd6P8dAC9EOC4iFv6H5h2o7h0A/ofG +HajuHQD+h6YdqO4dAC5EPIo0GNnh79nVEfBhAAD1QAYYEPn1AO4GAAJQoQAACgCKKUQwKEQx/oZG +He/+9QAuRDOKNC1EI/qG5h2o/R0A/oRGHejqHQD+hsYdqO4dAP6Gph2o7h0ALkQ06wAFAkkBAAAJ +AmEoIAcICEEMiBGsiCaGnSsgFi8K/3+xCvpA8BWgPAUAWHH8iDRogCeKJ/oAgh3gDAUA+0QAFaAN +RQBYaOwrIhIs+n8MuwH6QkYV4AIFANEPHtm1LSISDt0C/EJGFe//LgDaIFhyNOzZdBVwKYAAYAAr +iF4Z2aixiJheCYgC+IZmHaj4HQD+hkYd6P8dAP6GJh3o/x0A/oYGHe/83gDAINEPAADrbBgpUASA +APwAIh2gDVUAWHPjwCDRDwDrbBIpUASAAPwAIh2gDQUAWHPdwCDRDwBsEAYkIhIqCo7pIhMifGyA +ACgxC6mI+EJmFaAJBQDpJhEskASAANEPLyIYL/B0evFUKCAFGtmJ6dmJFAJZgAArMQsKRAEkJhKN +OSwiE32YPy4iEavM7CYTImWegABk4JKN7H3XIIjr+8BoHaALBQD8AAIdoA0lAAuAAMCQ6SYRLJAE +gADRD8Ag0Q8AAAAAAAD9sugFoAolAP5ACBWgOwUAWbDVKiIQKaAFKwqVe5HWwML8TKYdoAsVAFj4 +fsAg0Q8c2WmN4P/AsBWgClUA9CAGFaA7BQBZsMgtIhLAkPhCJhXvvvUADt0B7SYSLJAEgADRDwDa +IFj1scCQ6SYRLJAEgADRD2wQCCoiEg8CAPNADyfQiOUALSIYK9B0+WAOtCIAnQApIAUc2VDv2VAU +jkGAAAyqAiomEvNAJztSAJ0AjiwoMgYkMCD8YUQVr/XFAP8AJ60lRAEADAxO/ZtgFaAmVQD1gAQG +cIW1APVgEtRgJxUAD6gCrOn4QYYV4DsVAPhCRhWgLCUA9oJGDeAKBQB2QQp7QQf8gCg9IgCdAC0w +MCoiEC4wMS8wMuqgcC7uAoAADt0C7jAzLu4CgAAP3QLo3REFeBkAAO7dAg+CCoAADQ4Z9cAj11X9 +AQAK5REF9QKVEfogBhWgOwUA/bJCBaAKVQBZsIEc2N0b2R8swqAvIhgrsoqlzO/wdC5mQoAArLv6 +QiYV4Ii1AOqwBS3oBIAA+eAYNSCepQD/QBf0IJi1APlAF7QiAJ0A9UAXcJCZlQD5QCClYA9FAPaA +BXxiAJ0A9oAFPCIAnQApMEEsMEAuMDwqMD3oMD4uZgKAAOnMAg92AoAACu4CKTA/6jBCL3YCgAAI +7gLoMEMuZgKAAOrMAg92AoAA6e4CDmYCgAAIzAIOyAzqIhAkBIuAACWiEn5RCAXoDGaAAi6mEi6i +E3zhCA7JDGaQAiymE4q8D6oCmrx2QT3DwfyACXwiAJ0A9oAPjGIAnQDC4v6AF3QiAJ0ALxAQZfMS +wCDRDwAAKDAjwJEImDkotEEoFBD2n/pdIgCdACowIX+nuykwQSwwQC4wPCowPegwPi5mAoAA6cwC +D3YCgAAK7gIpMD/qMEIvdgKAAAjuAugwQy5mAoAA6swCD3YCgADp7gIOZgKAAAjMAg7IDOoiECQE +i4AAJKISfkEIBOgMZoACLqYSLqITfOEIDskMZpACLKYTLjA4KDA5jLzpMDovdgKAAAjuAugwOy92 +AoAACe4C6ti0H3YCgAAI7gLvzAIHcAUAAC4mFpy8+2FmFa/8tgAAAPgAYh2jmuEA+R/s9mIAnQAo +MCQpMCXrMCYsRgKAAAmIAukwJyxGAoAAC4gCCIgR6YgCBlgRAAD5bQAOP/W+AAApMCHxIAfOEgCd +ACowJCwwJe4wJi1WAoAADKoC7DAnLVYCgAAOqgIIqhEMqgJloM8sMEwuME3vME4uZgKAAA7MAu4w +Ty5mAoAAD8wCCMwRDswC6iIQJgVpgAAuohj9wAUTogCdACy2EiowSC4wSe8wSi1WAoAADqoC7jBL +LVYCgAAPqgIIqhEOqgIqthQpMDQuMDXqMDYszgKAAA6ZAujYdRzOAoAACpkC+mbwFaAOBQAuthUu +thPotgsszgKAAAqZAvlhphXv+IYALjA4LzA56DA6L3YCgAAP7gLvMDsvdgKAAAjuAgjuEQ/uAuzY +YxdwBQAALiYW/WFmFa/3sgAAKiIQL6AFKAqV+f/vBCIAnQDAkvhMph3gCxUAWPdkwCDRDxzYVu2y +AC1wBIAA+kJIFaA7BQD6IAYVoApVAFmvrC0iEvpCCBWgTgUADt0CLSYSLjBBKzBALDA8LzA97TA+ +Ld4CgADuuwIOZgKAAA/MAi4wP+8wQi5mAoAADcwC7TBDLd4CgADvuwIOZgKAAO7MAg3eAoAADbsC +DL0M97/qaBIAnQAtohJ80QgNzwxm8AIsphIsohP7n+mcYgCdAAy4DGaNKPtCZhXgAgUA0Q8AAAAq +MDgsMDnuMDotVgKAAAyqAuwwOy1WAoAADqoCCKoRDKoC6dgjFVAFAAAqJhaZu4rXKTwg+0HIFaAL +NQBtugUJAIYKAmHAINEPKSIRZJB/iZeJnvkmABXgC2UAKjwg0w9tuQUKIIYJAmPAINEPAAAqIhBj +/rwAAP/uMA2v9fUAHNgNLzAwKTAxjrDoMDIv/gKAAAn/AukwMy/+AoAA6P8CDWgEgADoMCAv/gKA +APnmAA/wCiUA+CAGFaA7BQBZr1jAINEPAAAA+kImFa/9kgCJ1ysxC4mev7sLS0vlv3xkyMEAAGP8 +NQBsEAYrIgcmIAcPAgAouRQFDUf1YcgVoWYBAOOyCSQOUYAA+aAQUVIAnQAc1+koIgD/YEgVoApV +AP2/wBXgCRUA7Z05CXgEgAD4IAYVoDsFAFmvORzX4PxgEBXgClUA/koQFaA7BQBZrzQX147l140b +TwKAAPTAC8ISAJ0Ap5kqkp73QA9aUgCdACqSnQVrCiuyvwuqAWShpSshBykgQC8gB/WvJgXquwEA +7dfLHd8CgAD1IAuYke8BAPUgCRkSAJ0A9YAI2pIAnQDAwPmviAWg/xEA6SEIL/qCgAAPuwLtuwIP +dAKAAA6ZAgiZApugjiCYpvVARhXgPwUA+UCGFeANRQD/QGYV4AkFAOmmBSVYgQAA6aYHL3YCgAD9 +xgAPcA8lAO6mAS52AoAA7+4CBUkBAAADIIYLAmMDAIYLAmH/QSYVr5V1AASAhgkCaQRghgkCZwRA +hgkCZegiEitPAoAAp5ntlp0hISEAAPUMRg2vZ4UAFtebIyISDwIABzkIKpInJZR9LJImLKYAK5Im ++2AmFaAIBQDoliYhm4EAAOiWJynQBIAAWazh+gCiHaA7BQDsZAAJ6ASAAFmu3y8iEsDh0w/17wAP +sA0FAA/tOGTfpOUkBSlQBIAAWazUwCDRDwD8gFAVr/ueAP/42A2gAwUAHNcqi8hqsX8MaRGnmSiS +nvcABHJSAJ0AKpKdBW0KLdK/DaoBZKB8sL6eyGWueWAAHAAAAAAAAAD8EEIdr/p+AC8gQAj/EP5g +BhXv98IAjyJk8F8c12juIgApaASAAPngaB2gCRUA/y0ADHAKVQD4IAYVoDsFAFmutMAg0Q8AAAD/ ++IQNoAoFAMCgWao4HNcGi8j5f/uQkgCdAP/+NA2gCgUAwKDA2g29NP2BBhXv/foAAACPMOokAANY +YQAA/66cBaf/wQD+SAYd4AwVAP5gBhWgDUUAWHF6/kBIFe/93gBsEAiJJysgByiZFPTgAAZxuwEA +5pIJJAgJgAD5gAnhUgCdAC0gQRTW6+zW6R2YBIAA8bNMDeAFRQD2AAId4A0FAPVgBtoSAJ0ADLoR +pKouop71wA0b4gCdACminQy+Ci7ivw6ZAeqUAASJ6YAALyBBZfFmHNbrGdckKCEHLSAHHtcj/kEE +FeqIAQD8IAAF8N0RAOrdEAxHAoAA7YgCDdwCgAAL/wIO/wIJiAKYoIggn6T/QMYVoA0FAJ2l/UDm +FeA7BQD9QEYVoAlFAOumAyxGAoAACYgC6KYBJUiBAAAGIIYJAmMGAIYJAmH84AAVsAwlAAy7Apup +DDoRBKoI9VOmFe+ZdQDpJAUpUASAAFmsU8Ag0Q8AAAAA//v8DaAGBQAf1qqO+PfABriSAJ0ADDoR +pKooop71AAeD4gCdACqinQw4CiiCvwiqAeSg3mdL/QAAmfj5QGgd7/w6ACogQAiqEPrABhWv+voA +j54t8AQn8AUe1sjl8AYu7gKAAAfdAu/wBy7uAoAABd0CCN0RD90CDt0BJdxn9I4ACvCHlQD0oIAV +7/p+AI8i6xYEJ4R5gAAc1tvuIgApaASAAPngaB2gCRUA/y0ADHAKVQD4IAYVoDsFAFmuJcAg0Q8s +3Ejr3GcpcASAAP7AaB3kux0AWa0KY/5/AAAAAAD/+aQNoAkFAJsU/CCmFeAKBQBZqaAf1m6NFY74 +ixQc1m753/iAkgCdAP/8uA2gCgUAwKDAygzsNP3hBhWv/H4AAAAAjWDqJAAF2GEAAP2tbAWn3cEA +7SRAKugEgAD8wAYVoAwVAFhw4P5ASBXv/TIAbBAGiScjIAcomRQDA0HmkgkkBzGAABTWVfWspgXn +hQEA+QAIoVIAnQD0YAaaEgCdAAw5EaSZKpKeBTsKK7K/90AJ6lIAnQAqkp0LqgFkoPcpIAcrIQcc +1pL7QAAF8NkRAOrdEA3fAoAADbsCDLsCm6COIPmsogWgPwUA/0BmFeANRQDopgIvdgKAAA3uAp6h +LCBB+gACHeAPBQD5RAAV4ekBAOXA0W90AoAALCEIn6UOzAIe1nyfp56mDswCnKQGIIYJAmMGAIYJ +AmH9YAAVsAwlAAy7ApupDDkRpJn9M6YV75h1AOgkBSlQBIAAWavBwCDRDwAAAAD//GgNoAYFABfW +GIt4arF/DDkRpJktkp4FPArswr8oBAqAAPegBApSAJ0AKpKdDKoB5KB1Zev9AACdeGWvGWAADi4g +QAjuEP7ABhWv+5oAAI8iZPBlHNZb7iIAKWgEgAD54GgdoAkVAP8tAAxwClUA+CAGFaA7BQBZraPA +INEPAPoRIh3v/L4A//skDaAKBQDAoFmpJot4+X/7qJIAnQD//mANoAoFAADAoMDKDLw0/OEGFa/+ +IgAAAAAAj2DqJAAB2GEAAP+sgAWn/8EA/kgGHeAMFQD+wAYVoA1FAFhwaP5ASBXv/cYAbBAEiiqO +rxjWN+gmCyFIgQAA6eYAJXjhAADvJggpWASAAP5BJhWgDAUA+UHmFe+YhQD4QKYdoA0lAFhu1MAg +0Q8AAABsEAQb1igqMQzTDyuyfxzWCfhiEBXgFGUA+0P2DeAFBQB8oRfqJAAK2ASAAOw0AApoBIAA +WPRywCDRDwBokUFokiFolAnAQP//ZA2gBQUAfKHRe6vO2jBY9KDVoP//EA2gBAUA/UDmDaAUZQB7 +owJgAAHAQNowWPS3//6cDaAFBQDaMFj0y+WkAAUBEYAA/awMBaAKVQD8YCgV4DsFAFmtT//9/A2g +BAUAAAAA//3QDaAExQBsEAQpMBPxJgAN4PWFAGiRA8Ag0Q+EJ4ROHNX37TARIkAXAAAthGL+YlAV +oApVAP8MZh2gOwUAWa08Kk0E7DARIdhhAABY9NzlOwgCUBcAAOwwEiVTgQAAWPTX6iQAClgEgABY +9i3AINEPhCcPAgAPAgCEThzV4i0wES1EAv5iUBWgClUA/oBmHaA7BQBZrSbrPBgiUAsAAOwwESVT +IQAAWPTF5TsIAlAPAADsMBIlUqEAAFj0wcAg0Q8AAGwQBPRAYCXosx0AI1RX+qrGHeBENQD0qqYd +oAh1APiqhh2gCQUA+KpmHeBKBQAqVFLRDwBsEASPOP2rhAWgClUA/GIQFeA7BQD/4Ggdof/xAFmt +BikwEOrVvBSMkQAAaJJZaZQSiDYion8JiBGoIiggBSkKlXmBXsAg0Q8AAADaMFj3BP9fAA3gCXUA +i6eLviyyjgydVv0jQB3o7LkAwNN+0BD7YEAl4AwFAFj2zsAg0Q8AAFj16cAg0Q8AizYqon8JuxH7 +QABFcAsFAFj1dsAg0Q8AAAAAwKX9qzgFoDsFAFms4vpAaB2gCyUAWPSOwCDRDwBsEASILiMsOHOJ +BcAg0Q8AAIsuiLPsRAAK6ASAAOu84ClQBIAAC4AAjCLtIAUufu4AAGTf1Y4uc+nWY//NAAAAbBAY +JRYZlB4rIAcjFh6HNegyBCn4BIAA/+HkFeADFQDyIgYV4bsBAPojBhXgyFEALBYa/CPIFaDYWQD8 +I6YV4L95ACsWFSrAAP+DsBWj9vUA/YekFeB3+QD8ImYV7DgdAP4gBh2ge3UA7MIfJFRCgAAPCEn4 +IeYVoAAeAACWHxnVZygSGfwiJhWgDwUA+S/EFeAEBQD7QBG8Z4gBAC8WFAk5DPgi5hWvmQEAKRYW +9QBIcRIAnQCKIvtAVKCSAJ0A8OcQDeAOBQDuFhIjgFGAAAM6AlkAAMBQ8oXADeAGBQAtEh4t0IMN +XUIvEh0rEhr+AGIdoAwlAO/sOQvQBIAAWP/fpqbwgQAN4Ar1ACkSHimSKihsMAmGOXagbPQhphWk +th0A4xYMJdgFAAD6I2YV4AGaAAAALBIT0w8PAgD7gEZYEgCdAC0SHg8CAI3V8b/7u1IAnQDrEhMp +0ASAAPwiKBWgDhUA7hYSKOgEgABZAAv7QE4gUgCdAP4AYh3gBQUACvU6ZFGpw2CUHfIhhhXkhh0A +KBYbKRIYHNTAE9TC7tTAHKAEgAD1IAniEgCdAOsSGyy3AoAAo2YqYp77QFKL4gCdACZinQ6YCiiC +vwhmAQZrAu/CCC2wBIAA+2BOoBIAnQArFgX34E8QkgCdACkyrhrVDPsgTIgSAJ0ALjKtLaJg7esB +B9P9AAD9wEvuYgCdAJrI/cBMFmIAnQCNHiwgFK3MDAxHLCQU9YBNplIAnQAuEh3I6ykSFsCD+QBO +0OIAnQBkUPoqEhoPAgDIoWRQY+tkAAlQBIAA/ABiHaAdhQBY//3uEg8teASAAOYSDCK6GYAAHNTs +LRIV+ak2BeAKBQCa8przmvSa9elpAg9EAoAA6fYALuiCgADo3QIK9sKAAP+mAA6wG8UA/eAmFeAK +VQBZrCErEhf5YElpUgCdAMAg7BIbKm8CgACj3SzWndEPLhIeLuCD/kUABzAEFQD+IoYVr/b6AI/I +9+BJoJIAnQDpEhsqNwKAAKNmKGKe+QBJ++IAnQArYp0OTQot0r8NuwHmtAAIBAqAAPtgSVgSAJ0A +sP6eyPrAaB3v+qYAAAAA/JrMDeA2BQD/9rQNoA0FAC8SEmTwdusSBSlQBIAA/ABiHaAdhQBY/8AZ +1LMW1LGOHCgQACZinwnuAhnUhQgfFOaGCw/7AoAA6f8CBHycgAAsEhHtEhMjW/8AACiyPyuxfZ6g +n6Gdopyjm6T5QKYVoABuACwSES0SEythBYhjnqCfoZuimKOdpJylJqwYLRIVjB8C3RDtFgguZAKA +AOwWCSuwPgAALhIdGNRE/iGIFeAKBQDqFgYvcYKAAJ4XCP8C/iFGFeAPJQCfG+tkAAlQBIAA/ABi +HaAdhQBY/5OLHS8SHokW5hIeJZFBgAAmYIPv8gUkkXmAAIgdBk5A5IIYb3MCgAAoEh4ogIIIBkAK +ZhCMFwbtAv2GAA5w36EA86gAFrCPkQD9hgAOcN+JAOOIEA7ogoAA+aYADrCPmQAEiBAIzAIoEh6L +Gg3MAoiE+0AGFeP99QCdopylHNRp/UBmFamIAQCYpBjUZZihLhIL6ZwBJTBhAADpFgYnc/0AAO4W +Cy96RgAALxIU9eAs+JIAnQD14C2xEgCdAPXgLnGSAJ0A9eAvMhIAnQD14C/ykgCdAPXgMLMSAJ0A +9eAxc5IAnQCOHdMPZOBPLxIeL/IqZPBG62QACVAEgAD8AGIdoB2FAFj/USgSHhvUR4wa+QVIFaP9 +9QCdov1ABhWsCQUAmaP7QCYV6ZixAOmmBCxFgoAA6KYFJTBhAADrZAAJUASAAPwAYh2gHYUAWP8/ +HdQ3jxiMGfYhSBWgCQUAmRGZEpkTmRSZpPlAphXv+/UAm6Kbo5ag78wCCvbCgAAOzALuEh4lMGEA +AO3MAgDYIQAA7KYBIOhBAADqHAQg4DEAAFj9WPlAaB3gCBUA6ok5DSgEgADpFiElIzmAACQWIvoA +Ih3gCgUACbo45RYjJWNZgAAT1BeNGYQcGNPmH9QW5RIdKieCgAD4hgAKNgwFAPghCBWgChUA5aU5 +CvDCgAAF/Dn5xgAPMAk1AP3GAA7wCCUABZg5KBYgDs4CLhYc/YYADnAFBQD8I+YVoAR+AAAAAAAA +AP/3bA2gBgUAwOD/98gNoAYFAIgd/CPIFeQMBQD2YAAHMrYpAPELAA3gBgUALdIq7cY5DduCgAAs +EAD/YAAEcN/JAOvdEA5iAoAA7O4CDEUCgAD5xgAPMM/BAPWQABYwj3kA/YYADnDfqQD/QKYVoO+x +AODuEQ7rwoAA/6YADrDvgQDsiBEPdkKAAP8GAAwx72kABO4R/wYADDDvuQDtiAIPckKAAA6+AgyI +Ao0anaAc06ScoQjuAv7GAA8wCCUACO4CnqQY09CYoh7Tz/9AZhWv9i4AAAAAAPoAAh3gBgUA//1M +DaAOBQAAAAAAAACZoZSgnqKeo56knqWdpp2nnaidqS8SIOVcASUwoQAA/qARnGIAnQDrZAAJUASA +APwAgh2gLYUAWP685FBRas7CgAD0oApgkgCdACsSH8fv+yYADPANBQDjmQIL/S4AAI0TLBIejhKP +EYvMLMIQmaGbqfVABhWgCAUAmKKYpp+jnqSdp5yljBT9QQYVr/4mAC0SHSwSHBvTogyZAuuZAgaE +GYAA8OJADe/+9QCZoZSgnqKeo56k/0CmFaANBQCdpp2nnaj9QSYV7/02AC8SHiIWJSvyFibxOCLx +OizyFejxOSs0AoAABiICJvE7LfIb7vIaLEQCgAAIZgIo8hcv8hmfop6jnaScppunmKiWpZmhlKCS +qfIkqBWv+/YAAAAAAAAAAPDiQA3v+/UAmaGUoJuim6ObpPtAphXgCAUAmKaYp5io+UEmFa/7OgAs +Eh6NEi/BOybBOSjBOC7BOuvCGCs0AoAA5v8CDEQCgAAI7gImwhSIzCzCEJukmKeWqJmhnaKUoJyj +n6WeqYwU/UDGFa/6GgArEh3sEhwlg1GAABvTYMfv/SYADLANBQDrmQIDgPGAAJmhlKCeop6jnqSe +pZ2mnaedqP1BJhXv+TIALhIeIhYlLeISLOITK+IYiO2G7i/iFILvLuIRnqKdo5ykm6WYppann6mZ +oZSgkqjyJKgVr/hWACsSH8ff+yYADPAMBQDjmQIDgPGAAJmhlKCdop2jnaSdpZymnKecqP1BJhWv +95oAmaGUoI4T/iAoFeAIBQCYopijmKSYppinmKifpf9BJhWv9woAKhIeGdMyiqUT0sYlEiPkEiIl +TDCAAOPSwhOD4YAAHNMsixwMuwL7P0YV7+JeACUSEMDS960ACv/i4gAAwKX9pkoFoBvFAO4+EQno +BIAAWapZY/bd+iLIFaAOBQCeEZ4SnhOeFFj8RCQWIuUWIyVfYYAA+iLIFaALBQBY/DckFiL0JGYV +7+9aAC8SEfv/uZCSAJ0AY/atGtLjiBwKiAL5P0YVr+B+AADAoFlg/sinG9MKK7CAZLEsKhIWWPwv +6RIhLVweAAD6IsgVoAsVAFj8IvgkKBXv7cIA3GDqEgwpWASAAPwjyBXgDhUAWPzU90BoHa/p8gAA +ANxg6hIMKVgEgAD8I8gV4A41AFj8zPdAaB2v6XYAAAAA3GDqEgwpWASAAPwjyBXgDnUAWPzE90Bo +Ha/o9gAAAADcYOoSDClYBIAA/CPIFeAOtQBY/Lz3QGgdr+h2AAAAANxg6hIMKVgEgAD8I8gV4A7F +AFj8tPdAaB2v5/YAAAAA3GDqEgwpWASAAPwjyBXgDtUAWPys90BoHa/ndgAAAADcYOoSDClYBIAA +/CPIFeAO9QBY/KT3QGgdr+b2AOsSEynQBIAA7BIRKOgEgABY/XJj9ikAACsSHowe7RIZKVAEgABY +aAbSoNEPAAAAAPulfAWhSxUAWZNlLBoADKwC+6VyBaFLFQBZk2Vj/rMAwLDA2g39NJ3I+3+0MJIA +nQD6QGgdoBvFAPwAAh2gDRUAWGzBY/+gAAAAKxIY+kBoHaAMBQDtEhsl2GEAAFhsumP/hMCgWaVj +HNIyj8j5/7CgkgCdAGP/uNogW+tZY/ZHiieNHsDA6qwgLtgEgABYYZjSoOsSGypnAoAAo8wrxp3R +DwAAAAAAAP/W7A2gBgUA/9ikDaAFRQDAoFmlThzSHI/IHtId+f+1+JIAnQD/27ANoAYFAAAAAP/b +NA2gCwUAwNoN/TT9gQYV79tSAAAAAGwQBBTSgoIgJEJ/E9KBBCIMAyIC0Q8AAGwQDBjSfxrSDRnS +fCiAfSqiqSmShgmqEeqZCAR8RIAAJJ0B9JAAFaAAMgAAACSdAyRMgBnSOyhBKfkACAxiAJ0AGtIn +6gAFCMgEgAAJAmEJAmEJAmEJAmEZ0mwY0kQf0mmOIJ8S+CDGFaAKRQDpFgAvdgKAAArqApoRKUAH +L0Ep/aTGBaGZAQDj7gIMzAKAAAn/Agj/Ap8UKyA5/iFmFaANJQCdGQy7AusWCCgECoAA9GAEsZIA +nQCJRyqZFOSgf2TggQAAjZmLwP/4Ah2gJYUA7s4BBoIZgABtCC59sTgv0AAp0Ad18S8vwQXu+AgM +zwKAAOndCARBAQAA6NsRftAEgADtpAAFAImAAGP/ygAA/68ADX//vgD9bwANcAkFAAqdOObUAA6B +pgAA6kQACNgEgAD8AIIdoA0lAFhdWtEP//4MDaANBQAAACocOvpHQBXgDGUAWaH2Y/9cwnaOaPoA +oh2gO0UA7NIqG2gEgAD+RzAV4+4BAFmpVIpoCo9Xd/FtikcuoRX7RAAVr8sFAAurAavr62pwc2kB +AADvogAmgYGAAH3xKCzQANMPDwIAdcEdKdAHDJkR6d0IBcEBAADo2yR+0ASAAO2kAA1+xgAA/e8A +DfAKBQALrTjm1AAG+mGAAGP/dgAA/68ADT//cgAsIDkKDUN9yYiOIAjuEQ4+Ap5r0Q8AAAD/rwAO +v/5CAGwQBiggBSwgB8GUDwIA+QAQdWHMAQApIgJlkcMtMAEW0YHr0X8eOASAAP+hQAbQD6UALiBO +ZeJX7tF4Hk8CgAD1gArSEgCdAKaZKJKenBALywr3ABGU0gCdACuyvyqSnQurAesWASWOSYAAiuj3 +QA64kgCdAChiru3RbBQL+YAALGKtLdJ/7csBBUP9AAD9gAteYgCdAJjo/YALZmIAnQApIBSkmQkJ +RykkFPUgDXXSAJ0AHtFtG9FmjCD4ICgV4AoFACq2Mu7MAg5uAoAA/WcGFaAORQAO3QIttjEb0crc +kOsPHg3QBIAADAJnC0CGDAJlCyCGDAJjCwCG7AwABNkBAAAK4IYLAm8KwIYLAm0KoIYLAmsKgIYL +AmkuMQEoIQktIAcsMAEb0bgqIST8IAAGMN0RAOrdEA5kAoAADcwCDKoCHdGyLCEiC6oCKpYgDcwC +iyAd0U8oliMuliQsliL9YAAVsAwlAAy7AiuWIYoz6pYlJMgHAADtABUEymEAAAkAigx4EaaI/xOm +FeflAQD5wAa5UgCdAMAg0Q8AAIro90AH4JIAnQAMeRGmmS2Sngt7Ciuyv/egCGTSAJ0ALZKdC9sB +ZLEAsK2d6OsWAS305gAA/CAGFaABZgAAAAAAAOokAAnYBIAA7EQACugEgABYZsHSoNEPAAAAAMCw +D6k06eYILfTmAAD6QGgdoBvFAPwAIh2gDRUAWGuFY//BAADqJAAK2ASAAFhoWtKg0Q8AixD6QGgd +oAwVAPtjABXgDaUAWGt7Y/+XwKBZpCQe0PKK6Plf8PiQD6UAY/+q2iBb6hr/+TQNoA+lAACKJ+tE +AApoBIAA+0QAFaAMBQBYYFbSoNEPAAAAAP/3XA2gCwUAwLgLmwL6QEYV7/0eAAAAAPwgBhWgCgUA +WaQMHtDbiuiMEBvQ2/lf93iQD6UA//woDaALBQAAwLAPrTT9wQYV7/vyAABsEAYoIAUmIAfnNAAK +2ASAAPgCgh3gBTUA+QAPnWFmAQALCEdoghSKIhfQyRjQyORkAAUDyYAAwCDRDwArIh1lseGIJ4OI ++wKkFe/MBQDpggskcIEAAAzsAey7CAp/AoAA7BYAJdkBAADzIA38YgCdAC2JFKP6r90thRT7YA3r +ogCdAMl1yUPZMG1JBQcAhgkCYYrgDwIADwIAr6r7QBCsYgCdAPvABhWv/f4A7GoRAyTxAAAHqggr +op4PAgD3YArZ0gCdACqinQhrCiuyvwuqAWWgT+tsGClQBIAA/AAiHaANNQBYax3AINEPABvQlom4 +9yAMoJIAnQAMShEHqggsop73gA0B0gCdACqinQhMCizCvwyqAeShjmTr/QAALbYIZK+vGdCymaCI +IP+iCAXgCxUA66YCLEYCgAAFiAKYoYgzL/J//6E6BaiIHQCo/5+j7gAVBUhBAAD/oSAF4AgFALGI +6YMeDA/oAACfphnQ9PlBBhXgGAUAmKeOIAjuEQXuAp6pDE0Rp90l1p2OIiwgBoknC+4C69DrFmAF +AADsJAYkyIEAAIiR/SCCFe/MBQAMnAHuJgIkQ0EAAOiWASbowQAA7ZUEJmEBAAB8iyIqkQUd0HSo +qJiRnYCMIOuGAi5mAoAABcwC/QAmFaACBQDRDx3QbJ2AjCAb0NPrhgIuZgKAAAXMAv0AJhWgAgUA +0Q/aIFhnq9Kg0Q8AAAD/+sQNoAoFAFgAJ2P+FwAA8yBoHeAOBQD/AWYVr/e+AOO6DAOBuYAACksU +7LwIK8AEgADsTDYJyASAANMPbckFCACGCQJhiRCqeOtNDATJAQAAbdkFCCCGCQJjixAK/Aysuyu8 +QPvABhXv9ooAwKBZo18b0C2JuBjQLvk/8viSAJ0A//n8DaAKBQDAoMDaDZ00/WEGFe/5wgCPEC/8 +QP/ABhXv9aYAAABsEAYS0CIX0J/1oFYFoBOVAPhQyBWgpiUAKiKCf6cgKyKCf7cYKiKELKAIJaAH +dsE3iETAoAuAAAUzDGU/2tEPLSKEKSKHKiKH+WAABPuqgQB6mTAK6jArQkHDwgy7KKuq+puGFa/+ +6gAuoQsu7PgODkPu7Pwi6/0AAP+iAAq//s4AAAAADAIALyKCf//FJdAHblu/3HD6AKIdoAsFAP6g +ABcw/wUAWaeeJVzxylsoCnGYEcChWZt++iAoFeAJ9QAJWTaZEAm7DPogJhXgCgUAWYBkihAKVQxl +X9fAoVmbdPoOIh3gCgUAWYBeY/9lAABsEAYoIAUvIAfBlPkAFM1h/wEA9CAmFaeFAQCYEvUAD7kS +AJ0AiSIdz9rmz9wfoASAAOvP2RyRlgAA9eAPQhAHtQDvFgAv1wKAAKaqLKKeC/sKK7K/94AVu+IA +nQAsop0LywHntAAFkomAAI7Y98AS+JIAnQAsYq7q0EgWECmAAC9irSui5+v8AQdD/QAA++APjmIA +nQCY2PvgD6ZiAJ0AKyAUKTAHq5kJCUcpJBT1IBG10gCdAB/QOZ9wiSD8AIId4AUVAOV2AizOAoAA +DZkCmXGINhnQMyyiGv+flgWiiB0ACYgBqMz84GYVoCsFAO4AFQPIQQAACQCKm3cZz7vpdgYh4MEA +AOwHHgPAgQAACAJj7uMFA+DBAAAMAmEvdhCIIOV2EixGAoAADYgCKHYRjDMqohgMjBSsqup2EyP5 +gQAA7gAVA9FBAAAKAIopdhbrdhch0EEAAApghg8CZwpAhg8CZS0wAY8zGM/Z8aAFB9AchQAtIAcV +0Av6RIQVoN0RAOMxAS7qgoAACN0CLXYgiyApdiIsdiP9YAAVsAw1AAy7Aut2ISPIBwAA7uMFBMpB +AAAJAmEJAmEuIAcoIQny5SYV4BmlAP7lBhXgCwUA63YlLEUCgAD5BgAMce4BAOh2Ji90AoAADq4C +Be4C/uSGFaAJtQDsEgIqbwKAAKbdKdad+YAHqVIAnQDAINEPAAD//4QNoAmFAC4iHWTuBv4gBhXg +A+4Ajtj3wAfgkgCdAAxKEaaqKKKe9wAIo+IAnQAsop0LSAoogr8IzAHrxAAGCEGAALDpmdjntAAN +8H4AAP4gBhXgAVIA6iQACdgEgADsEgEq6ASAAFhk/dKg0Q8AAMDAwLoL6zTr1ggucKYAAPpAaB2g +G8UA/AAiHaANFQBYacFj/8EAAOokAArYBIAAWGaW0qDRDwCLEPpAaB2gDBUA+2MAFeANtQBYabdj +/5fAoFmiYB3PLo7Y+d/suJIAnQBj/6oAAADrxAAJUASAAFvoU/ufUgWv9v4AiieNEcDA6qwgLtgE +gABYXpHSoNEP//U8DaALBQAAAAAAAFv+/P4gCBXv9AYA/iAGFeAKBQBZokgdzxeO2I8QG88X+d/3 +eJIAnQD//DwNoAsFAAAAAP/74A2gDAUAwMoM7DT9oQYVr/veAAAAAGwQCuQiBypQBIAAiCL+QPAV +r88FAOVBFS1nAoAA7DwIAiCBAAAPRAGkVORMQC5YBIAA9YAl0qHuAQAtsAfs3P4tsASAAOSACGbo +DQAAwCDRDx/O9e0WACXAgQAAmBMdzvT1ACSaogCdAOXO8h8gBIAA9cAfYhIAnQAM6xGluymynu4W +ASZAIQAA+SAlm6IAnQArsp0N6Aoogr8IuwHntAAFoBmAAI34mhTTD/egIsiSAJ0AKVKu689eFKBB +gAAuUq0vsucbztkP6AHoFgImy/0AAP/AH4ZiAJ0Ambj/wB/GYgCdAC4gFC1gB67d+iCGFafdAQAt +JBT1oCFt0gCdABnPGh/PTo4giDTtzt0aXwKAAOW7CA92AoAA8QAE+lAFNQCDYyohJAXsAiggBy5h +AfzgRhXgFIUAlHP84CYVoIgRAOzO5xxCgoAA+QYADHAEBQD44AYVoAglAOwABQPgQQAAbYoCDAJh +LSEJLCAHlHX+4SYVoDilAON2CC7tAoAA+aYADrHMAQDtdgYuZAKAAAyqAg+qApp0KSEJAioC/sAk +FaAMBQDltp0s3QKAAPlmAA2wDQUAWGXqwCDRD4gTiID1gCAVoIkVAPXGAAo3iMEAeYkZlHHvzxcW +S/0AAP7gBhXhmR0A+OBGFeAAUgCUcYgTGc8TmXCIgQhYFJhyjzYZzwwoIgcUzwwpkhr1AqQV4v8d +AAT/ASUWBg+ZCO+CCSRAgQAA+OBmFe/JBQDpiAEFIAkAAOgWBSonAoAABP8ICFUI7KkIAqkBAADl +8wp0yAkAACgSBgj/DOoWBCzPAoAABJkM5JBFbicCgADvSAgDyEEAAJkX+KAOyqIAnQAPVQwFThTT +D23pBQ8AhgkCYYkVDs8Mp1jsjBAkyQEAAG35BQkghgwCYy4iAAjuERjO4vTgAESwDxUA/yDGFeAM +RQAM7AKYlBjO25yVjGMoghgVzt7/nOYF6MwdAKyImJcYztnvABUE8IEAAP+dsgXgDAUAsczugx4O +D+gAAP0hRhXgLAUAnJuHY4Q0jDUIRAHvzAELwkKAAAhEAgVEApScKGAJLmALJGAKJWAI787JH3EC +gADmRBAMQwKAAP0GAAwwxTEA7kQCDmHCgAAMRAIIRAKMNhjOaJSd9GFIFaXlHQDvzAEPcEKAAA7M +Av0hxhWkVQEA6EQBCqoCgAAFRAKIZZifhWYllhCPZySWEi+WEY5kLpYTLGAB8YAEp9IAnQAsIAce +znLywCQV4MwRAO8hJC5igoAADswCLJYUiCD+AwIdoAw1AO6WFyxGAoAADIgCHM5E/SLGFeAOBQD5 +IqYVoAglAOwABQThgQAAbYoCDAJhKCEJmhQtIAf7AAAUMBylAAyIAiiWGvmdGgWh3QEA7pYZLuwC +gAAN/QII3QKIECOWHSeWHO2WGCRADQAAmBCOFI8QL7adLWAHiif/oABGsAwFAOvUAAVQgQAAWF1n +0qDRDwAAZM5WbckFD0CGCQJlY/5EjfiaFPegBviSAJ0ADEsRpbsosp64yfkAB6viAJ0AGM3sKbKd +CEgKKIK/CJkB65QABIcxgACw2Zn417DuFgEt4C4AAI0QixH6QGgdoAwVAO3cAyXYYQAAWGhhwCDR +DwAAAMDgnhKIEhvN2MCaCdk06bYILGCGAAD6QGgdoBvFAPwAIh2gDRUAWGhVwCDRDwD1jwAN/+0a +AAWLDPogZhXv7aoAAAAAAAD8IQYVoAoFAFmg9h/NxY34ihSMGPm/3JiSAJ0AY/+wAJwY6xICKVAE +gABb5umKFPwhCBWv7xIAAP/tZA2gCwUAnhH8IQYVoAoFAFmg5h/NtIoUjfiMGI4R+b/4SJIAnQD/ +/LgNoAsFAP/8aA2gCQUAwIoI2DT54QYVr/xmAAAAAGwQBikgBSYgB9gw9gBiHeAaRQD7IA/NIWYB +AAUJR/0jAAFfxQUAiyITzaEZzZ/kZAAFg7GAAMAg0Q+IJ4uILoEV6YILJHiBAAAF+gHq7ggKbwKA +AOoWACdxAQAA+yAORGIAnQAsiRSdEavarcwshRT7wA4jogCdAMk0yULZsG1JBQMAhgkCYSwSASry +AAyqCP9AESQiAJ0AmvDTsPhgaB2v/hoAAAAAAOxqEQMk/QAAA6oILaKeCWsKK7K/96ALAdIAnQAq +op0PAgALqgFloE/rbBgpUASAAPwAIh2gDTUAWGf1wCDRDwAAAAAdzW2L2JgS92AMkJIAnQAMShGj *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 31 00:43:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1394FBF20F0; Wed, 31 May 2017 00:43:36 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5768818DF; Wed, 31 May 2017 00:43:35 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V0hZww024926; Wed, 31 May 2017 00:43:35 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V0hZhI024925; Wed, 31 May 2017 00:43:35 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705310043.v4V0hZhI024925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 31 May 2017 00:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319271 - stable/11/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 00:43:36 -0000 Author: np Date: Wed May 31 00:43:34 2017 New Revision: 319271 URL: https://svnweb.freebsd.org/changeset/base/319271 Log: MFC r318774: cxgbe/iw_cxgbe: sodisconnect failures are harmless and should not be treated as fatal errors. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c Wed May 31 00:16:43 2017 (r319270) +++ stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c Wed May 31 00:43:34 2017 (r319271) @@ -2376,6 +2376,8 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, set_bit(EP_DISC_ABORT, &ep->com.history); close_complete_upcall(ep, -ECONNRESET); ret = send_abort(ep); + if (ret) + fatal = 1; } else { CTR2(KTR_IW_CXGBE, "%s:ced5 %p", __func__, ep); @@ -2383,13 +2385,9 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, if (!ep->parent_ep) __state_set(&ep->com, MORIBUND); - ret = sodisconnect(ep->com.so); + sodisconnect(ep->com.so); } - if (ret) { - - fatal = 1; - } } if (fatal) { From owner-svn-src-all@freebsd.org Wed May 31 00:43:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C767BF2139; Wed, 31 May 2017 00:43:54 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF05D81A01; Wed, 31 May 2017 00:43:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V0hq8l024979; Wed, 31 May 2017 00:43:52 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V0hqjH024978; Wed, 31 May 2017 00:43:52 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705310043.v4V0hqjH024978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 31 May 2017 00:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319272 - stable/10/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 00:43:54 -0000 Author: np Date: Wed May 31 00:43:52 2017 New Revision: 319272 URL: https://svnweb.freebsd.org/changeset/base/319272 Log: MFC r318774: cxgbe/iw_cxgbe: sodisconnect failures are harmless and should not be treated as fatal errors. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Wed May 31 00:43:34 2017 (r319271) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Wed May 31 00:43:52 2017 (r319272) @@ -2390,6 +2390,8 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, set_bit(EP_DISC_ABORT, &ep->com.history); close_complete_upcall(ep, -ECONNRESET); ret = send_abort(ep); + if (ret) + fatal = 1; } else { CTR2(KTR_IW_CXGBE, "%s:ced5 %p", __func__, ep); @@ -2397,13 +2399,9 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, if (!ep->parent_ep) __state_set(&ep->com, MORIBUND); - ret = sodisconnect(ep->com.so); + sodisconnect(ep->com.so); } - if (ret) { - - fatal = 1; - } } if (fatal) { From owner-svn-src-all@freebsd.org Wed May 31 03:11:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5324BF3FE5; Wed, 31 May 2017 03:11:26 +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 5153084ED7; Wed, 31 May 2017 03:11:26 +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 v4V3BP1r084663; Wed, 31 May 2017 03:11:25 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V3BPXM084662; Wed, 31 May 2017 03:11:25 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705310311.v4V3BPXM084662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 31 May 2017 03:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319273 - head/contrib/ipfilter/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 03:11:26 -0000 Author: cy Date: Wed May 31 03:11:25 2017 New Revision: 319273 URL: https://svnweb.freebsd.org/changeset/base/319273 Log: Remove NORESOLVE (-R) option from poollist() (ippool -l). It is not used in poollist(). Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Wed May 31 00:43:52 2017 (r319272) +++ head/contrib/ipfilter/tools/ippool.c Wed May 31 03:11:25 2017 (r319273) @@ -663,7 +663,7 @@ poollist(argc, argv) poolname = NULL; role = IPL_LOGALL; - while ((c = getopt(argc, argv, "dm:M:N:o:Rt:v")) != -1) + while ((c = getopt(argc, argv, "dm:M:N:o:t:v")) != -1) switch (c) { case 'd' : @@ -689,9 +689,6 @@ poollist(argc, argv) break; case 'O' : pool_fields = parsefields(poolfields, optarg); - break; - case 'R' : - opts |= OPT_NORESOLVE; break; case 't' : type = gettype(optarg, NULL); From owner-svn-src-all@freebsd.org Wed May 31 03:44:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D619BF45E3; Wed, 31 May 2017 03:44:32 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 110611249; Wed, 31 May 2017 03:44:31 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V3iVXf098557; Wed, 31 May 2017 03:44:31 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V3iV1B098556; Wed, 31 May 2017 03:44:31 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201705310344.v4V3iV1B098556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Wed, 31 May 2017 03:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319274 - head/usr.bin/uname X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 03:44:32 -0000 Author: danfe (ports committer) Date: Wed May 31 03:44:31 2017 New Revision: 319274 URL: https://svnweb.freebsd.org/changeset/base/319274 Log: - Add a simple example to uname(1) manual page to show how the hardware platform (returned by -m) can be different from the machine's processor architecture (-p) - Document that make(1) sets universal MACHINE and MACHINE_ARCH variables based on these values Reviewed by: imp, manpages (bjk) Approved by: bjk, imp (implied) Differential Revision: https://reviews.freebsd.org/D10489 Modified: head/usr.bin/uname/uname.1 Modified: head/usr.bin/uname/uname.1 ============================================================================== --- head/usr.bin/uname/uname.1 Wed May 31 03:11:25 2017 (r319273) +++ head/usr.bin/uname/uname.1 Wed May 31 03:44:31 2017 (r319274) @@ -28,7 +28,7 @@ .\" @(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd November 20, 2013 +.Dd May 31, 2017 .Dt UNAME 1 .Os .Sh NAME @@ -61,6 +61,11 @@ Write the version of the kernel. .It Fl m Write the type of the current hardware platform to standard output. +.Po Xr make 1 +uses it to set the +.Va MACHINE +variable. +.Pc .It Fl n Write the name of the system to standard output. .It Fl o @@ -69,6 +74,11 @@ This is a synonym for the option, for compatibility with other systems. .It Fl p Write the type of the machine processor architecture to standard output. +.Po Xr make 1 +uses it to set the +.Va MACHINE_ARCH +variable. +.Pc .It Fl r Write the current release level of the operating system to standard output. @@ -106,6 +116,19 @@ will allow the corresponding data to be set to the con of the environment variable. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +The hardware platform +.Pq Fl m +can be different from the machine's processor architecture +.Pq Fl p , +e.g., on 64-bit PowerPC, +.Fl m +would return +.Va powerpc +and +.Fl p +would return +.Va powerpc64 . .Sh SEE ALSO .Xr feature_present 3 , .Xr getosreldate 3 , From owner-svn-src-all@freebsd.org Wed May 31 05:00:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2954A922DA; Wed, 31 May 2017 05:00:03 +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 82A3030DB; Wed, 31 May 2017 05:00:03 +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 v4V502el027283; Wed, 31 May 2017 05:00:02 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V502ic027282; Wed, 31 May 2017 05:00:02 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310500.v4V502ic027282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319275 - stable/11/etc/rc.d X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:00:03 -0000 Author: delphij Date: Wed May 31 05:00:02 2017 New Revision: 319275 URL: https://svnweb.freebsd.org/changeset/base/319275 Log: MFC r318975: Tighten /entropy permissions. PR: 219527 Reported by: Lu Tung-Pin Submitted by: jilles Modified: stable/11/etc/rc.d/random Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.d/random ============================================================================== --- stable/11/etc/rc.d/random Wed May 31 03:44:31 2017 (r319274) +++ stable/11/etc/rc.d/random Wed May 31 05:00:02 2017 (r319275) @@ -20,12 +20,14 @@ saveseed_cmd="${name}_stop" save_dev_random() { + oumask=`umask` + umask 077 for f ; do - if :>>"$f" ; then - debug "saving entropy to $f" - dd if=/dev/random of="$f" bs=4096 count=1 2>/dev/null - fi + debug "saving entropy to $f" + dd if=/dev/random of="$f" bs=4096 count=1 status=none && + chmod 600 "$f" done + umask ${oumask} } feed_dev_random() From owner-svn-src-all@freebsd.org Wed May 31 05:05:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4653A9255E; Wed, 31 May 2017 05:05:33 +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 941C53503; Wed, 31 May 2017 05:05:33 +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 v4V55WdS031544; Wed, 31 May 2017 05:05:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V55WJe031543; Wed, 31 May 2017 05:05:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310505.v4V55WJe031543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319276 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:05:33 -0000 Author: delphij Date: Wed May 31 05:05:32 2017 New Revision: 319276 URL: https://svnweb.freebsd.org/changeset/base/319276 Log: MFC r315615: Make space style consistent with earlier entries. Modified: stable/11/lib/libc/sys/Symbol.map Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/Symbol.map ============================================================================== --- stable/11/lib/libc/sys/Symbol.map Wed May 31 05:00:02 2017 (r319275) +++ stable/11/lib/libc/sys/Symbol.map Wed May 31 05:05:32 2017 (r319276) @@ -399,8 +399,8 @@ FBSD_1.4 { }; FBSD_1.5 { - clock_nanosleep; - fdatasync; + clock_nanosleep; + fdatasync; }; FBSDprivate_1.0 { From owner-svn-src-all@freebsd.org Wed May 31 05:10:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A42BFA9263C; Wed, 31 May 2017 05:10:04 +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 751AF3646; Wed, 31 May 2017 05:10:04 +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 v4V5A3lK031850; Wed, 31 May 2017 05:10:03 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V5A3Sx031844; Wed, 31 May 2017 05:10:03 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310510.v4V5A3Sx031844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319277 - in stable/11: lib/libc/sys sys/sys sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:10:04 -0000 Author: delphij Date: Wed May 31 05:10:03 2017 New Revision: 319277 URL: https://svnweb.freebsd.org/changeset/base/319277 Log: MFC r315272, r315370 r315272: Implement INHERIT_ZERO for minherit(2). INHERIT_ZERO is an OpenBSD feature. When a page is marked as such, it would be zeroed upon fork(). This would be used in new arc4random(3) functions. PR: 182610 Reviewed by: kib (earlier version) Differential Revision: https://reviews.freebsd.org/D427 r315370: The adj_free and max_free values of new_entry will be calculated and assigned by subsequent vm_map_entry_link(), therefore, remove the pointless copying. Submitted by: alc Modified: stable/11/lib/libc/sys/minherit.2 stable/11/sys/sys/mman.h stable/11/sys/vm/vm.h stable/11/sys/vm/vm_map.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/minherit.2 ============================================================================== --- stable/11/lib/libc/sys/minherit.2 Wed May 31 05:05:32 2017 (r319276) +++ stable/11/lib/libc/sys/minherit.2 Wed May 31 05:10:03 2017 (r319277) @@ -29,7 +29,7 @@ .\" .\" @(#)minherit.2 8.1 (Berkeley) 6/9/93 .\" -.Dd October 30, 2007 +.Dd March 15, 2017 .Dt MINHERIT 2 .Os .Sh NAME @@ -91,6 +91,11 @@ it will no longer be shared in the parent after the parent forks and there is no way to get the previous shared-backing-store mapping without unmapping and remapping the address space in the parent. +.It Dv INHERIT_ZERO +This option causes the address space in question to be mapped as new +anonymous pages, +which would be initialized to all zero bytes, +in the child process. .El .Sh RETURN VALUES .Rv -std minherit @@ -130,6 +135,13 @@ system call first appeared in .Ox and then in .Fx 2.2 . +.Pp +The +.Dv INHERIT_ZERO +support first appeared in +.Ox 5.6 +and then in +.Fx 12.0 . .Sh BUGS Once you set inheritance to .Dv MAP_PRIVATE Modified: stable/11/sys/sys/mman.h ============================================================================== --- stable/11/sys/sys/mman.h Wed May 31 05:05:32 2017 (r319276) +++ stable/11/sys/sys/mman.h Wed May 31 05:10:03 2017 (r319277) @@ -43,6 +43,7 @@ #define INHERIT_SHARE 0 #define INHERIT_COPY 1 #define INHERIT_NONE 2 +#define INHERIT_ZERO 3 #endif /* Modified: stable/11/sys/vm/vm.h ============================================================================== --- stable/11/sys/vm/vm.h Wed May 31 05:05:32 2017 (r319276) +++ stable/11/sys/vm/vm.h Wed May 31 05:10:03 2017 (r319277) @@ -68,6 +68,7 @@ typedef char vm_inherit_t; /* inheritance codes */ #define VM_INHERIT_SHARE ((vm_inherit_t) 0) #define VM_INHERIT_COPY ((vm_inherit_t) 1) #define VM_INHERIT_NONE ((vm_inherit_t) 2) +#define VM_INHERIT_ZERO ((vm_inherit_t) 3) #define VM_INHERIT_DEFAULT VM_INHERIT_COPY typedef u_char vm_prot_t; /* protection codes */ Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Wed May 31 05:05:32 2017 (r319276) +++ stable/11/sys/vm/vm_map.c Wed May 31 05:10:03 2017 (r319277) @@ -2294,6 +2294,7 @@ vm_map_inherit(vm_map_t map, vm_offset_t start, vm_off case VM_INHERIT_NONE: case VM_INHERIT_COPY: case VM_INHERIT_SHARE: + case VM_INHERIT_ZERO: break; default: return (KERN_INVALID_ARGUMENT); @@ -3451,6 +3452,34 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c vmspace_map_entry_forked(vm1, vm2, new_entry); vm_map_copy_entry(old_map, new_map, old_entry, new_entry, fork_charge); + break; + + case VM_INHERIT_ZERO: + /* + * Create a new anonymous mapping entry modelled from + * the old one. + */ + new_entry = vm_map_entry_create(new_map); + memset(new_entry, 0, sizeof(*new_entry)); + + new_entry->start = old_entry->start; + new_entry->end = old_entry->end; + new_entry->avail_ssize = old_entry->avail_ssize; + new_entry->eflags = old_entry->eflags & + ~(MAP_ENTRY_USER_WIRED | MAP_ENTRY_IN_TRANSITION | + MAP_ENTRY_VN_WRITECNT); + new_entry->protection = old_entry->protection; + new_entry->max_protection = old_entry->max_protection; + new_entry->inheritance = VM_INHERIT_ZERO; + + vm_map_entry_link(new_map, new_map->header.prev, + new_entry); + vmspace_map_entry_forked(vm1, vm2, new_entry); + + new_entry->cred = curthread->td_ucred; + crhold(new_entry->cred); + *fork_charge += (new_entry->end - new_entry->start); + break; } old_entry = old_entry->next; From owner-svn-src-all@freebsd.org Wed May 31 05:11:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD7BEA92851; Wed, 31 May 2017 05:11:29 +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 98A7B3819; Wed, 31 May 2017 05:11:29 +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 v4V5BSgS034841; Wed, 31 May 2017 05:11:28 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V5BSed034837; Wed, 31 May 2017 05:11:28 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310511.v4V5BSed034837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319278 - in stable/10: lib/libc/sys sys/sys sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:11:29 -0000 Author: delphij Date: Wed May 31 05:11:28 2017 New Revision: 319278 URL: https://svnweb.freebsd.org/changeset/base/319278 Log: MFC r315272, r315370 r315272: Implement INHERIT_ZERO for minherit(2). INHERIT_ZERO is an OpenBSD feature. When a page is marked as such, it would be zeroed upon fork(). This would be used in new arc4random(3) functions. PR: 182610 Reviewed by: kib (earlier version) Differential Revision: https://reviews.freebsd.org/D427 r315370: The adj_free and max_free values of new_entry will be calculated and assigned by subsequent vm_map_entry_link(), therefore, remove the pointless copying. Submitted by: alc Modified: stable/10/lib/libc/sys/minherit.2 stable/10/sys/sys/mman.h stable/10/sys/vm/vm.h stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/minherit.2 ============================================================================== --- stable/10/lib/libc/sys/minherit.2 Wed May 31 05:10:03 2017 (r319277) +++ stable/10/lib/libc/sys/minherit.2 Wed May 31 05:11:28 2017 (r319278) @@ -29,7 +29,7 @@ .\" .\" @(#)minherit.2 8.1 (Berkeley) 6/9/93 .\" -.Dd October 30, 2007 +.Dd March 15, 2017 .Dt MINHERIT 2 .Os .Sh NAME @@ -91,6 +91,11 @@ it will no longer be shared in the parent after the parent forks and there is no way to get the previous shared-backing-store mapping without unmapping and remapping the address space in the parent. +.It Dv INHERIT_ZERO +This option causes the address space in question to be mapped as new +anonymous pages, +which would be initialized to all zero bytes, +in the child process. .El .Sh RETURN VALUES .Rv -std minherit @@ -130,6 +135,13 @@ system call first appeared in .Ox and then in .Fx 2.2 . +.Pp +The +.Dv INHERIT_ZERO +support first appeared in +.Ox 5.6 +and then in +.Fx 12.0 . .Sh BUGS Once you set inheritance to .Dv MAP_PRIVATE Modified: stable/10/sys/sys/mman.h ============================================================================== --- stable/10/sys/sys/mman.h Wed May 31 05:10:03 2017 (r319277) +++ stable/10/sys/sys/mman.h Wed May 31 05:11:28 2017 (r319278) @@ -43,6 +43,7 @@ #define INHERIT_SHARE 0 #define INHERIT_COPY 1 #define INHERIT_NONE 2 +#define INHERIT_ZERO 3 #endif /* Modified: stable/10/sys/vm/vm.h ============================================================================== --- stable/10/sys/vm/vm.h Wed May 31 05:10:03 2017 (r319277) +++ stable/10/sys/vm/vm.h Wed May 31 05:11:28 2017 (r319278) @@ -68,6 +68,7 @@ typedef char vm_inherit_t; /* inheritance codes */ #define VM_INHERIT_SHARE ((vm_inherit_t) 0) #define VM_INHERIT_COPY ((vm_inherit_t) 1) #define VM_INHERIT_NONE ((vm_inherit_t) 2) +#define VM_INHERIT_ZERO ((vm_inherit_t) 3) #define VM_INHERIT_DEFAULT VM_INHERIT_COPY typedef u_char vm_prot_t; /* protection codes */ Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Wed May 31 05:10:03 2017 (r319277) +++ stable/10/sys/vm/vm_map.c Wed May 31 05:11:28 2017 (r319278) @@ -2240,6 +2240,7 @@ vm_map_inherit(vm_map_t map, vm_offset_t start, vm_off case VM_INHERIT_NONE: case VM_INHERIT_COPY: case VM_INHERIT_SHARE: + case VM_INHERIT_ZERO: break; default: return (KERN_INVALID_ARGUMENT); @@ -3397,6 +3398,34 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c vmspace_map_entry_forked(vm1, vm2, new_entry); vm_map_copy_entry(old_map, new_map, old_entry, new_entry, fork_charge); + break; + + case VM_INHERIT_ZERO: + /* + * Create a new anonymous mapping entry modelled from + * the old one. + */ + new_entry = vm_map_entry_create(new_map); + memset(new_entry, 0, sizeof(*new_entry)); + + new_entry->start = old_entry->start; + new_entry->end = old_entry->end; + new_entry->avail_ssize = old_entry->avail_ssize; + new_entry->eflags = old_entry->eflags & + ~(MAP_ENTRY_USER_WIRED | MAP_ENTRY_IN_TRANSITION | + MAP_ENTRY_VN_WRITECNT); + new_entry->protection = old_entry->protection; + new_entry->max_protection = old_entry->max_protection; + new_entry->inheritance = VM_INHERIT_ZERO; + + vm_map_entry_link(new_map, new_map->header.prev, + new_entry); + vmspace_map_entry_forked(vm1, vm2, new_entry); + + new_entry->cred = curthread->td_ucred; + crhold(new_entry->cred); + *fork_charge += (new_entry->end - new_entry->start); + break; } old_entry = old_entry->next; From owner-svn-src-all@freebsd.org Wed May 31 05:21:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01485A9295A; Wed, 31 May 2017 05:21:02 +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 9EB363BDF; Wed, 31 May 2017 05:21:01 +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 v4V5L0eu035928; Wed, 31 May 2017 05:21:00 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V5KxL0035911; Wed, 31 May 2017 05:20:59 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310520.v4V5KxL0035911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319279 - in stable/11: . contrib/libpcap contrib/libpcap/bpf/net contrib/libpcap/config contrib/libpcap/lbl contrib/libpcap/missing contrib/libpcap/pcap contrib/libpcap/tests lib/libpc... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:21:02 -0000 Author: delphij Date: Wed May 31 05:20:59 2017 New Revision: 319279 URL: https://svnweb.freebsd.org/changeset/base/319279 Log: MFC r313695, r313760, r314769, r314863, r314865, r316125 r313695: MFV r313676: libpcap 1.8.1 r313760: MFV r313759: license change for a few headers (4 clause BSD to 3 clause BSD). X-MFC-with: r313695 r314769: Remove compatibility with old libpcap. Differential Revision: https://reviews.freebsd.org/D9606 r314863: Stop installing pcap-int.h, which is the internal interface for libpcap. Reference: https://github.com/the-tcpdump-group/libpcap/issues/560 PR: 217221 r314865: Bump __FreeBSD_version for removal of pcap-int.h. PR: 217221 r316125: MFV r316124: Fix build when WITHOUT_INET6. Reported by: Randy Westlund Added: stable/11/contrib/libpcap/config/ - copied from r313695, head/contrib/libpcap/config/ stable/11/contrib/libpcap/configure.ac - copied unchanged from r313695, head/contrib/libpcap/configure.ac stable/11/contrib/libpcap/extract.h - copied unchanged from r313695, head/contrib/libpcap/extract.h stable/11/contrib/libpcap/fad-helpers.c - copied unchanged from r313695, head/contrib/libpcap/fad-helpers.c stable/11/contrib/libpcap/gen_version_c.sh - copied unchanged from r313695, head/contrib/libpcap/gen_version_c.sh stable/11/contrib/libpcap/gen_version_header.sh - copied unchanged from r313695, head/contrib/libpcap/gen_version_header.sh stable/11/contrib/libpcap/lbl/os-aix7.h - copied unchanged from r313695, head/contrib/libpcap/lbl/os-aix7.h stable/11/contrib/libpcap/missing/getopt.c - copied unchanged from r313695, head/contrib/libpcap/missing/getopt.c stable/11/contrib/libpcap/missing/getopt.h - copied unchanged from r313695, head/contrib/libpcap/missing/getopt.h stable/11/contrib/libpcap/missing/strtok_r.c - copied unchanged from r313695, head/contrib/libpcap/missing/strtok_r.c stable/11/contrib/libpcap/missing/win_snprintf.c - copied unchanged from r313695, head/contrib/libpcap/missing/win_snprintf.c stable/11/contrib/libpcap/nametoaddr.h - copied unchanged from r313695, head/contrib/libpcap/nametoaddr.h stable/11/contrib/libpcap/pcap-new.c - copied unchanged from r313695, head/contrib/libpcap/pcap-new.c stable/11/contrib/libpcap/pcap-rpcap.c - copied unchanged from r313695, head/contrib/libpcap/pcap-rpcap.c stable/11/contrib/libpcap/pcap-rpcap.h - copied unchanged from r313695, head/contrib/libpcap/pcap-rpcap.h stable/11/contrib/libpcap/pcap-tc.c - copied unchanged from r313695, head/contrib/libpcap/pcap-tc.c stable/11/contrib/libpcap/pcap-tc.h - copied unchanged from r313695, head/contrib/libpcap/pcap-tc.h stable/11/contrib/libpcap/pcap/can_socketcan.h - copied unchanged from r313695, head/contrib/libpcap/pcap/can_socketcan.h stable/11/contrib/libpcap/pcap/dlt.h - copied, changed from r313695, head/contrib/libpcap/pcap/dlt.h stable/11/contrib/libpcap/pcap/export-defs.h - copied unchanged from r313695, head/contrib/libpcap/pcap/export-defs.h stable/11/contrib/libpcap/pcap_version.h.in - copied unchanged from r313695, head/contrib/libpcap/pcap_version.h.in stable/11/contrib/libpcap/portability.h - copied unchanged from r313695, head/contrib/libpcap/portability.h stable/11/contrib/libpcap/remote-ext.h - copied unchanged from r313695, head/contrib/libpcap/remote-ext.h stable/11/contrib/libpcap/sockutils.c - copied unchanged from r313695, head/contrib/libpcap/sockutils.c stable/11/contrib/libpcap/sockutils.h - copied unchanged from r313695, head/contrib/libpcap/sockutils.h stable/11/contrib/libpcap/tests/can_set_rfmon_test.c - copied unchanged from r313695, head/contrib/libpcap/tests/can_set_rfmon_test.c stable/11/sys/net/dlt.h - copied, changed from r313695, head/sys/net/dlt.h Deleted: stable/11/contrib/libpcap/configure.in stable/11/contrib/libpcap/fad-sita.c stable/11/contrib/libpcap/pcap-can-linux.c stable/11/contrib/libpcap/pcap-can-linux.h stable/11/contrib/libpcap/pcap-canusb-linux.c stable/11/contrib/libpcap/pcap-canusb-linux.h stable/11/contrib/libpcap/runlex.sh Modified: stable/11/ObsoleteFiles.inc stable/11/contrib/libpcap/CHANGES stable/11/contrib/libpcap/CREDITS stable/11/contrib/libpcap/INSTALL.txt stable/11/contrib/libpcap/LICENSE stable/11/contrib/libpcap/Makefile-devel-adds stable/11/contrib/libpcap/Makefile.in stable/11/contrib/libpcap/README stable/11/contrib/libpcap/TODO stable/11/contrib/libpcap/VERSION stable/11/contrib/libpcap/bpf/net/bpf_filter.c stable/11/contrib/libpcap/bpf_dump.c stable/11/contrib/libpcap/bpf_image.c stable/11/contrib/libpcap/config.guess stable/11/contrib/libpcap/config.h.in stable/11/contrib/libpcap/config.sub stable/11/contrib/libpcap/configure stable/11/contrib/libpcap/dlpisubs.c stable/11/contrib/libpcap/etherent.c stable/11/contrib/libpcap/ethertype.h stable/11/contrib/libpcap/fad-getad.c stable/11/contrib/libpcap/fad-gifc.c stable/11/contrib/libpcap/fad-glifc.c stable/11/contrib/libpcap/gencode.c stable/11/contrib/libpcap/gencode.h stable/11/contrib/libpcap/grammar.y stable/11/contrib/libpcap/inet.c stable/11/contrib/libpcap/install-sh stable/11/contrib/libpcap/lbl/os-osf4.h stable/11/contrib/libpcap/lbl/os-osf5.h stable/11/contrib/libpcap/lbl/os-solaris2.h stable/11/contrib/libpcap/lbl/os-sunos4.h stable/11/contrib/libpcap/lbl/os-ultrix4.h stable/11/contrib/libpcap/missing/snprintf.c stable/11/contrib/libpcap/mkdep stable/11/contrib/libpcap/nametoaddr.c stable/11/contrib/libpcap/optimize.c stable/11/contrib/libpcap/pcap-bpf.c stable/11/contrib/libpcap/pcap-bpf.h stable/11/contrib/libpcap/pcap-bt-linux.c stable/11/contrib/libpcap/pcap-bt-linux.h stable/11/contrib/libpcap/pcap-bt-monitor-linux.c stable/11/contrib/libpcap/pcap-common.c stable/11/contrib/libpcap/pcap-config.1 stable/11/contrib/libpcap/pcap-dag.c stable/11/contrib/libpcap/pcap-dag.h stable/11/contrib/libpcap/pcap-dbus.c stable/11/contrib/libpcap/pcap-dlpi.c stable/11/contrib/libpcap/pcap-dos.c stable/11/contrib/libpcap/pcap-dos.h stable/11/contrib/libpcap/pcap-filter.manmisc.in stable/11/contrib/libpcap/pcap-int.h stable/11/contrib/libpcap/pcap-libdlpi.c stable/11/contrib/libpcap/pcap-linktype.manmisc.in stable/11/contrib/libpcap/pcap-linux.c stable/11/contrib/libpcap/pcap-netfilter-linux.c stable/11/contrib/libpcap/pcap-netfilter-linux.h stable/11/contrib/libpcap/pcap-nit.c stable/11/contrib/libpcap/pcap-null.c stable/11/contrib/libpcap/pcap-pf.c stable/11/contrib/libpcap/pcap-savefile.manfile.in stable/11/contrib/libpcap/pcap-septel.c stable/11/contrib/libpcap/pcap-sita.c stable/11/contrib/libpcap/pcap-snf.c stable/11/contrib/libpcap/pcap-snit.c stable/11/contrib/libpcap/pcap-snoop.c stable/11/contrib/libpcap/pcap-stdinc.h stable/11/contrib/libpcap/pcap-tstamp.manmisc.in stable/11/contrib/libpcap/pcap-usb-linux.c stable/11/contrib/libpcap/pcap-usb-linux.h stable/11/contrib/libpcap/pcap-win32.c stable/11/contrib/libpcap/pcap.3pcap.in stable/11/contrib/libpcap/pcap.c stable/11/contrib/libpcap/pcap/bluetooth.h stable/11/contrib/libpcap/pcap/bpf.h stable/11/contrib/libpcap/pcap/namedb.h stable/11/contrib/libpcap/pcap/nflog.h stable/11/contrib/libpcap/pcap/pcap.h stable/11/contrib/libpcap/pcap/sll.h stable/11/contrib/libpcap/pcap/usb.h stable/11/contrib/libpcap/pcap_activate.3pcap stable/11/contrib/libpcap/pcap_breakloop.3pcap stable/11/contrib/libpcap/pcap_can_set_rfmon.3pcap stable/11/contrib/libpcap/pcap_close.3pcap stable/11/contrib/libpcap/pcap_compile.3pcap.in stable/11/contrib/libpcap/pcap_create.3pcap stable/11/contrib/libpcap/pcap_datalink.3pcap.in stable/11/contrib/libpcap/pcap_datalink_name_to_val.3pcap stable/11/contrib/libpcap/pcap_datalink_val_to_name.3pcap stable/11/contrib/libpcap/pcap_dump.3pcap stable/11/contrib/libpcap/pcap_dump_close.3pcap stable/11/contrib/libpcap/pcap_dump_file.3pcap stable/11/contrib/libpcap/pcap_dump_flush.3pcap stable/11/contrib/libpcap/pcap_dump_ftell.3pcap stable/11/contrib/libpcap/pcap_dump_open.3pcap.in stable/11/contrib/libpcap/pcap_file.3pcap stable/11/contrib/libpcap/pcap_fileno.3pcap stable/11/contrib/libpcap/pcap_findalldevs.3pcap stable/11/contrib/libpcap/pcap_freecode.3pcap stable/11/contrib/libpcap/pcap_get_selectable_fd.3pcap stable/11/contrib/libpcap/pcap_get_tstamp_precision.3pcap.in stable/11/contrib/libpcap/pcap_geterr.3pcap stable/11/contrib/libpcap/pcap_inject.3pcap stable/11/contrib/libpcap/pcap_is_swapped.3pcap stable/11/contrib/libpcap/pcap_lib_version.3pcap stable/11/contrib/libpcap/pcap_list_datalinks.3pcap.in stable/11/contrib/libpcap/pcap_list_tstamp_types.3pcap.in stable/11/contrib/libpcap/pcap_lookupdev.3pcap stable/11/contrib/libpcap/pcap_lookupnet.3pcap stable/11/contrib/libpcap/pcap_loop.3pcap stable/11/contrib/libpcap/pcap_major_version.3pcap stable/11/contrib/libpcap/pcap_next_ex.3pcap stable/11/contrib/libpcap/pcap_offline_filter.3pcap stable/11/contrib/libpcap/pcap_open_dead.3pcap.in stable/11/contrib/libpcap/pcap_open_live.3pcap stable/11/contrib/libpcap/pcap_open_offline.3pcap.in stable/11/contrib/libpcap/pcap_set_buffer_size.3pcap stable/11/contrib/libpcap/pcap_set_datalink.3pcap stable/11/contrib/libpcap/pcap_set_immediate_mode.3pcap stable/11/contrib/libpcap/pcap_set_promisc.3pcap stable/11/contrib/libpcap/pcap_set_rfmon.3pcap stable/11/contrib/libpcap/pcap_set_snaplen.3pcap stable/11/contrib/libpcap/pcap_set_timeout.3pcap stable/11/contrib/libpcap/pcap_set_tstamp_precision.3pcap.in stable/11/contrib/libpcap/pcap_set_tstamp_type.3pcap.in stable/11/contrib/libpcap/pcap_setdirection.3pcap stable/11/contrib/libpcap/pcap_setfilter.3pcap stable/11/contrib/libpcap/pcap_setnonblock.3pcap stable/11/contrib/libpcap/pcap_snapshot.3pcap stable/11/contrib/libpcap/pcap_stats.3pcap stable/11/contrib/libpcap/pcap_statustostr.3pcap stable/11/contrib/libpcap/pcap_strerror.3pcap stable/11/contrib/libpcap/pcap_tstamp_type_name_to_val.3pcap stable/11/contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap stable/11/contrib/libpcap/savefile.c stable/11/contrib/libpcap/scanner.l stable/11/contrib/libpcap/sf-pcap-ng.c stable/11/contrib/libpcap/sf-pcap.c stable/11/contrib/libpcap/tests/capturetest.c stable/11/contrib/libpcap/tests/filtertest.c stable/11/contrib/libpcap/tests/findalldevstest.c stable/11/contrib/libpcap/tests/opentest.c stable/11/contrib/libpcap/tests/reactivatetest.c stable/11/contrib/libpcap/tests/selpolltest.c stable/11/contrib/libpcap/tests/valgrindtest.c stable/11/lib/libpcap/Makefile stable/11/lib/libpcap/config.h stable/11/lib/libpcap/pcap-netmap.c stable/11/sbin/pflogd/Makefile stable/11/sys/net/bpf.h stable/11/sys/sys/param.h stable/11/usr.sbin/ipfwpcap/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Wed May 31 05:11:28 2017 (r319278) +++ stable/11/ObsoleteFiles.inc Wed May 31 05:20:59 2017 (r319279) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170531: remove pcap-int.h +OLD_FILES+=usr/include/pcap-int.h # 20170402: new libc++ import which bumps version from 3.9.1 to 4.0.0. OLD_FILES+=usr/include/c++/v1/__undef___deallocate OLD_FILES+=usr/include/c++/v1/tr1/__undef___deallocate Modified: stable/11/contrib/libpcap/CHANGES ============================================================================== --- stable/11/contrib/libpcap/CHANGES Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/CHANGES Wed May 31 05:20:59 2017 (r319279) @@ -1,5 +1,80 @@ +Tuesday, Oct. 25, 2016 mcr@sandelman.ca + Summary for 1.8.1 libpcap release + Add a target in Makefile.in for Exuberant Ctags use: 'extags'. + Rename configure.in to configure.ac: autoconf 2.59 + Clean up the name-to-DLT mapping table. + Add some newer DLT_ values: IPMI_HPM_2,ZWAVE_R1_R2,ZWAVE_R3,WATTSTOPPER_DLM,ISO_14443,RDS + Clarify what the return values are for both success and failure. + Many changes to build on windows + Check for the "break the loop" condition in the inner loop for TPACKET_V3. + Fix handling of packet count in the TPACKET_V3 inner loop: GitHub issue #493. + Filter out duplicate looped back CAN frames. + Fix the handling of loopback filters for IPv6 packets. + Add a link-layer header type for RDS (IEC 62106) groups. + Use different intermediate folders for x86 and x64 builds on Windows. + On Linux, handle all CAN captures with pcap-linux.c, in cooked mode. + Removes the need for the "host-endian" link-layer header type. + Compile with '-Wused-but-marked-unused' in devel mode if supported + Have separate DLTs for big-endian and host-endian SocketCAN headers. + Reflect version.h being renamed to pcap_version.h. + Require that version.h be generated: all build procedures we support generate version.h (autoconf, CMake, MSVC)! + Properly check for sock_recv() errors. + Re-impose some of Winsock's limitations on sock_recv(). + Replace sprintf() with pcap_snprintf(). + Fix signature of pcap_stats_ex_remote(). + Initial cmake support for remote packet capture. + Have rpcap_remoteact_getsock() return a SOCKET and supply an "is active" flag. + Clean up {DAG, Septel, Myricom SNF}-only builds. + Do UTF-16-to-ASCII conversion into the right place. + pcap_create_interface() needs the interface name on Linux. + Clean up hardware time stamp support: the "any" device does not support any time stamp types. + Add support for capturing on FreeBSD usbusN interfaces. + Add a LINKTYPE/DLT_ value for FreeBSD USB. + Go back to using PCAP_API on Windows. + CMake support + Add TurboCap support from WinPcap. + Recognize 802.1ad nested VLAN tag in vlan filter. + +Thursday Sep. 3, 2015 guy@alum.mit.edu + Summary for 1.7.5 libpcap release + Man page cleanups. + Add some allocation failure checks. + Fix a number of Linux/ucLinux configure/build issues. + Fix some memory leaks. + Recognize 802.1ad nested VLAN tag in vlan filter. + Fix building Bluetooth Linux Monitor support with BlueZ 5.1+ + +Saturday Jun. 27, 2015 mcr@sandelman.ca + Summary for 1.7.4 libpcap release + Include fix for GitHub issue #424 -- out of tree builds. + +Friday Apr. 10, 2015 guy@alum.mit.edu + Summary for 1.7.3 libpcap release + Work around a Linux bonding driver bug. + +Thursday Feb. 12, 2015 guy@alum.mit.edu/mcr@sandelman.ca + Summary for 1.7.2 libpcap release + Support for filtering Geneve encapsulated packets. + Generalize encapsulation handling, fixing some bugs. + Don't add null addresses to address lists. + Add pcap_dump_open_append() to open for appending. + Fix the swapping of isochronous descriptors in Linux USB. + Attempt to handle TPACKET_V1 with 32-bit userland and 64-bit kernel. + +Wednesday Nov. 12, 2014 guy@alum.mit.edu/mcr@sandelman.ca + Summary for 1.7.0 libpcap release + Fix handling of zones for BPF on Solaris + new DLT for ZWAVE + clarifications for read timeouts. + Use BPF extensions in compiled filters, fixing VLAN filters + some fixes to compilation without stdint.h + EBUSY can now be returned by SNFv3 code. + Fix the range checks in BPF loads + Various DAG fixes. + Various Linux fixes. + Monday Aug. 12, 2014 guy@alum.mit.edu - Summary for 1.6.2 tcpdump release + Summary for 1.6.2 libpcap release Don't crash on filters testing a non-existent link-layer type field. Fix sending in non-blocking mode on Linux with memory-mapped @@ -8,12 +83,12 @@ Monday Aug. 12, 2014 guy@alum.mit.edu machines. Saturday Jul. 19, 2014 mcr@sandelman.ca - Summary for 1.6.1 tcpdump release + Summary for 1.6.1 libpcap release some fixes for the any device - changes for how --enable-XXX works + changes for how --enable-XXX (--enable-sniffing, --enable-can) works Wednesday Jul. 2, 2014 mcr@sandelman.ca - Summary for 1.6.0 tcpdump release + Summary for 1.6.0 libpcap release Don't support D-Bus sniffing on OS X fixes for byte order issues with NFLOG captures Handle using cooked mode for DLT_NETLINK in activate_new(). Modified: stable/11/contrib/libpcap/CREDITS ============================================================================== --- stable/11/contrib/libpcap/CREDITS Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/CREDITS Wed May 31 05:20:59 2017 (r319279) @@ -2,11 +2,12 @@ This file lists people who have contributed to libpcap The current maintainers: Bill Fenner - Denis Ovsienko + Denis Ovsienko Fulvio Risso Guy Harris Hannes Gredler Michael Richardson + Francois-Xavier Le Bail Additional people who have contributed patches: @@ -45,7 +46,7 @@ Additional people who have contributed patches: David Young Dean Gaudet dhruv - Don Ebright + Don Ebright Dug Song Dustin Spicuzza dzejarczech @@ -83,6 +84,7 @@ Additional people who have contributed patches: Jefferson Ogata Jesper Dangaard Brouer Jesper Peterson + Jesse Gross Jiri Slaby Joerg Mayer John Bankier @@ -105,6 +107,7 @@ Additional people who have contributed patches: Mansour Behabadi Marcus Felipe Pereira Mark C. Brown + Mark Johnston Mark Pizzolato Markus Mayer Martin Husemann Modified: stable/11/contrib/libpcap/INSTALL.txt ============================================================================== --- stable/11/contrib/libpcap/INSTALL.txt Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/INSTALL.txt Wed May 31 05:20:59 2017 (r319279) @@ -16,7 +16,7 @@ does support packet capture but libpcap does not suppo particular type. (If you have HP-UX, see below.) If your system uses a packet capture not supported by libpcap, please send us patches; don't forget to include an autoconf fragment suitable for use in -configure.in. +configure.ac. It is possible to override the default packet capture type, although the circumstance where this works are limited. For example if you have @@ -31,41 +31,23 @@ You will need an ANSI C compiler to build libpcap. The will abort if your compiler is not ANSI compliant. If this happens, use the generally available GNU C compiler (GCC). -If you use flex, you must use version 2.4.6 or higher. The configure -script automatically detects the version of flex and will not use it -unless it is new enough. You can use "flex -V" to see what version you -have (unless it's really old). The current version of flex is available -at flex.sourceforge.net and often comes packaged by means of the OS. -As of this writing, the current version is 2.5.37. +You will need either Flex 2.5.31 or later, or a version of Lex +compatible with it (if any exist), to build libpcap. The configure +script will abort if there isn't any such program. If you have an older +version of Flex, or don't have a compatible version of Lex, the current +version of flex is available at flex.sourceforge.net. -If you use bison, you must use flex (and visa versa). The configure -script automatically falls back to lex and yacc if both flex and bison -are not found. +You will need either Bison, Berkeley YACC, or a version of YACC +compatible with them (if any exist), to build libpcap. The configure +script will abort if there isn't any such program. If you don't have +any such program, the current version of Bison can be found at +http://ftp.gnu.org/gnu/bison/ and the current version of Berkeley YACC +can be found at http://invisible-island.net/byacc/. -Sometimes the stock C compiler does not interact well with flex and -bison. The list of problems includes undefined references for alloca. -You can get around this by installing gcc or manually disabling flex -and bison with: +Sometimes the stock C compiler does not interact well with Flex and +Bison. The list of problems includes undefined references for alloca. +You can get around this by installing GCC. - ./configure --without-flex --without-bison - -If your system only has AT&T lex, this is okay unless your libpcap -program uses other lex/yacc generated code. (Although it's possible to -map the yy* identifiers with a script, we use flex and bison so we -don't feel this is necessary.) - -Some systems support the Berkeley Packet Filter natively; for example -out of the box OSF and BSD/OS have bpf. If your system does not support -bpf, you will need to pick up: - - ftp://ftp.ee.lbl.gov/bpf-*.tar.Z - -Note well: you MUST have kernel source for your operating system in -order to install bpf. An exception is SunOS 4; the bpf distribution -includes replacement kernel objects for some of the standard SunOS 4 -network device drivers. See the bpf INSTALL document for more -information. - If you use Solaris, there is a bug with bufmod(7) that is fixed in Solaris 2.3.2 (aka SunOS 5.3.2). Setting a snapshot length with the broken bufmod(7) results in data be truncated from the FRONT of the @@ -178,14 +160,14 @@ packet timestamps aren't very good. This appears to b handling of the timestamp in the kernel. Note well: there is rumoured to be a version of tcpdump floating around -called 3.0.3 that includes libpcap and is supposed to support Linux. +called 3.0.3 that includes libpcap and is supposed to support Linux. You should be advised that neither the Network Research Group at LBNL -nor the Tcpdump Group ever generated a release with this version number. +nor the Tcpdump Group ever generated a release with this version number. The LBNL Network Research Group notes with interest that a standard cracker trick to get people to install trojans is to distribute bogus -packages that have a version number higher than the current release. +packages that have a version number higher than the current release. They also noted with annoyance that 90% of the Linux related bug reports -they got are due to changes made to unofficial versions of their page. +they got are due to changes made to unofficial versions of their page. If you are having trouble but aren't using a version that came from tcpdump.org, please try that before submitting a bug report! @@ -239,11 +221,11 @@ the libpcap 0.6.2 source release, so this release of l build without changes on UnixWare 7. If linking tcpdump fails with "Undefined: _alloca" when using bison on -a Sun4, your version of bison is broken. In any case version 1.16 or +a Sun4, your version of Bison is broken. In any case version 1.16 or higher is recommended (1.14 is known to cause problems 1.16 is known to work). Either pick up a current version from: - ftp://ftp.gnu.org/pub/gnu/bison + http://ftp.gnu.org/gnu/bison/ or hack around it by inserting the lines: @@ -289,6 +271,7 @@ FILES CHANGES - description of differences between releases ChmodBPF/* - Mac OS X startup item to set ownership and permissions on /dev/bpf* +CMakeLists.txt - CMake file CREDITS - people that have helped libpcap along INSTALL.txt - this file LICENSE - the license under which tcpdump is distributed @@ -317,7 +300,7 @@ config.guess - autoconf support config.h.in - autoconf input config.sub - autoconf support configure - configure script (run this first) -configure.in - configure script source +configure.ac - configure script source dlpisubs.c - DLPI-related functions for pcap-dlpi.c and pcap-libdlpi.c dlpisubs.h - DLPI-related function declarations etherent.c - /etc/ethers support routines @@ -325,9 +308,6 @@ ethertype.h - Ethernet protocol types and names defini fad-getad.c - pcap_findalldevs() for systems with getifaddrs() fad-gifc.c - pcap_findalldevs() for systems with only SIOCGIFLIST fad-glifc.c - pcap_findalldevs() for systems with SIOCGLIFCONF -fad-null.c - pcap_findalldevs() for systems without capture support -fad-sita.c - pcap_findalldevs() for systems with SITA support -fad-win32.c - pcap_findalldevs() for WinPcap filtertest.c - test program for BPF compiler findalldevstest.c - test program for pcap_findalldevs() gencode.c - BPF code generation routines @@ -345,7 +325,6 @@ nametoaddr.c - hostname to address routines nlpid.h - OSI network layer protocol identifier definitions net - symlink to bpf/net optimize.c - BPF optimization routines -packaging - packaging information for building libpcap RPMs pcap/bluetooth.h - public definition of DLT_BLUETOOTH_HCI_H4_WITH_PHDR header pcap/bpf.h - BPF definitions pcap/namedb.h - public libpcap name database definitions @@ -389,7 +368,6 @@ pcap_*.3pcap - manual entries for library functions pcap-filter.4 - manual entry for filter syntax pcap-linktype.4 - manual entry for link-layer header types ppp.h - Point to Point Protocol definitions -runlex.sh - wrapper for Lex/Flex savefile.c - offline support scanner.l - filter string scanner sunatmpos.h - definitions for SunATM capturing Modified: stable/11/contrib/libpcap/LICENSE ============================================================================== --- stable/11/contrib/libpcap/LICENSE Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/LICENSE Wed May 31 05:20:59 2017 (r319279) @@ -1,9 +1,9 @@ License: BSD - + 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 @@ -13,7 +13,7 @@ are met: 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Modified: stable/11/contrib/libpcap/Makefile-devel-adds ============================================================================== --- stable/11/contrib/libpcap/Makefile-devel-adds Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/Makefile-devel-adds Wed May 31 05:20:59 2017 (r319279) @@ -2,12 +2,12 @@ # Auto-regenerate configure script or Makefile when things change. # From autoconf.info . Works best with GNU Make. # -${srcdir}/configure: configure.in aclocal.m4 +${srcdir}/configure: configure.ac aclocal.m4 cd ${srcdir} && autoconf # autoheader might not change config.h.in, so touch a stamp file. ${srcdir}/config.h.in: ${srcdir}/stamp-h.in -${srcdir}/stamp-h.in: configure.in aclocal.m4 +${srcdir}/stamp-h.in: configure.ac aclocal.m4 cd ${srcdir} && autoheader echo timestamp > ${srcdir}/stamp-h.in Modified: stable/11/contrib/libpcap/Makefile.in ============================================================================== --- stable/11/contrib/libpcap/Makefile.in Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/Makefile.in Wed May 31 05:20:59 2017 (r319279) @@ -49,12 +49,13 @@ LN_S = @LN_S@ MKDEP = @MKDEP@ CCOPT = @V_CCOPT@ INCLS = -I. @V_INCLS@ -DEFS = @DEFS@ @V_DEFS@ +DEFS = -DBUILDING_PCAP @DEFS@ @V_DEFS@ ADDLOBJS = @ADDLOBJS@ ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@ LIBS = @LIBS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ +CROSSFLAGS= +CFLAGS = @CFLAGS@ ${CROSSFLAGS} +LDFLAGS = @LDFLAGS@ ${CROSSFLAGS} DYEXT = @DYEXT@ V_RPATH_OPT = @V_RPATH_OPT@ DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ @@ -68,13 +69,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ RANLIB = @RANLIB@ -# -# Flex and bison allow you to specify the prefixes of the global symbols -# used by the generated parser. This allows programs to use lex/yacc -# and link against libpcap. If you don't have flex or bison, get them. -# -LEX = @V_LEX@ -YACC = @V_YACC@ +LEX = @LEX@ +YACC = @YACC@ # Explicitly define compilation rule since SunOS 4's make doesn't like gcc. # Also, gcc does not remove the .o before forking 'as', which can be a @@ -83,11 +79,11 @@ YACC = @V_YACC@ @rm -f $@ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@ -FSRC = fad-@V_FINDALLDEVS@.c +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @NETFILTER_SRC@ @DBUS_SRC@ +FSRC = @V_FINDALLDEVS@ SSRC = @SSRC@ -CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ - savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \ +CSRC = pcap.c inet.c fad-helpers.c gencode.c optimize.c nametoaddr.c \ + etherent.c savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \ bpf_image.c bpf_dump.c GENSRC = scanner.c grammar.c bpf_filter.c version.c LIBOBJS = @LIBOBJS@ @@ -103,6 +99,9 @@ PUBHDR = \ pcap-namedb.h \ pcap/bpf.h \ pcap/bluetooth.h \ + pcap/can_socketcan.h \ + pcap/dlt.h \ + pcap/export-defs.h \ pcap/ipnet.h \ pcap/namedb.h \ pcap/nflog.h \ @@ -115,37 +114,43 @@ HDR = $(PUBHDR) \ arcnet.h \ atmuni31.h \ ethertype.h \ + extract.h \ gencode.h \ ieee80211.h \ llc.h \ + nametoaddr.h \ nlpid.h \ pcap-common.h \ pcap-int.h \ pcap-stdinc.h \ + portability.h \ ppp.h \ sf-pcap.h \ sf-pcap-ng.h \ sunatmpos.h TESTS = \ + @VALGRINDTEST@ \ capturetest \ + can_set_rfmon_test \ filtertest \ findalldevstest \ opentest \ - selpolltest \ - valgrindtest + reactivatetest \ + selpolltest TESTS_SRC = \ + tests/valgrindtest.c \ tests/capturetest.c \ + tests/can_set_rfmon_test.c \ tests/filtertest.c \ tests/findalldevstest.c \ tests/opentest.c \ tests/reactivatetest.c \ - tests/selpolltest.c \ - tests/valgrindtest.c + tests/selpolltest.c GENHDR = \ - scanner.h tokdefs.h version.h + scanner.h grammar.h pcap_version.h TAGFILES = \ $(SRC) $(HDR) @@ -231,6 +236,8 @@ EXTRA_DIST = \ ChmodBPF/ChmodBPF \ ChmodBPF/StartupParameters.plist \ CREDITS \ + CMakeLists.txt \ + GenVersion.bat \ INSTALL.txt \ LICENSE \ Makefile.in \ @@ -253,29 +260,37 @@ EXTRA_DIST = \ aclocal.m4 \ bpf/net/bpf_filter.c \ chmod_bpf \ + cmakeconfig.h.in \ + cmake/preconfigure.cmake \ + config/have_siocglifconf.c \ config.guess \ config.h.in \ config.sub \ configure \ - configure.in \ + configure.ac \ dlpisubs.c \ dlpisubs.h \ fad-getad.c \ fad-gifc.c \ fad-glifc.c \ - fad-null.c \ - fad-sita.c \ - fad-win32.c \ + fad-helpers.c \ + gen_version_c.sh \ + gen_version_header.sh \ grammar.y \ install-sh \ lbl/os-aix4.h \ + lbl/os-aix7.h \ lbl/os-hpux11.h \ lbl/os-osf4.h \ lbl/os-osf5.h \ lbl/os-solaris2.h \ lbl/os-sunos4.h \ lbl/os-ultrix4.h \ + missing/getopt.c \ + missing/getopt.h \ missing/snprintf.c \ + missing/strtok_r.c \ + missing/win_snprintf.c \ mkdep \ msdos/bin2c.c \ msdos/common.dj \ @@ -291,16 +306,11 @@ EXTRA_DIST = \ msdos/pktdrvr.h \ msdos/readme.dos \ org.tcpdump.chmod_bpf.plist \ - packaging/pcap.spec.in \ pcap-bpf.c \ pcap-bt-linux.c \ pcap-bt-linux.h \ pcap-bt-monitor-linux.c \ pcap-bt-monitor-linux.h \ - pcap-can-linux.c \ - pcap-can-linux.h \ - pcap-canusb-linux.c \ - pcap-canusb-linux.h \ pcap-config.in \ pcap-dag.c \ pcap-dag.h \ @@ -314,11 +324,14 @@ EXTRA_DIST = \ pcap-libdlpi.c \ pcap-linux.c \ pcap-namedb.h \ + pcap-new.c \ pcap-netfilter-linux.c \ pcap-netfilter-linux.h \ pcap-nit.c \ pcap-null.c \ pcap-pf.c \ + pcap-rpcap.c \ + pcap-rpcap.h \ pcap-septel.c \ pcap-septel.h \ pcap-sita.h \ @@ -328,34 +341,22 @@ EXTRA_DIST = \ pcap-snf.h \ pcap-snit.c \ pcap-snoop.c \ + pcap-tc.c \ + pcap-tc.h \ pcap-usb-linux.c \ pcap-usb-linux.h \ pcap-win32.c \ - runlex.sh \ + remote-ext.h \ + sockutils.c \ + sockutils.h \ scanner.l \ + tests/CMakeLists.txt \ + pcap_version.h.in \ Win32/Include/Gnuc.h \ - Win32/Include/addrinfo.h \ - Win32/Include/bittypes.h \ - Win32/Include/cdecl_ext.h \ - Win32/Include/inetprivate.h \ - Win32/Include/ip6_misc.h \ - Win32/Include/sockstorage.h \ - Win32/Include/arpa/nameser.h \ Win32/Include/net/if.h \ - Win32/Include/net/netdb.h \ - Win32/Include/net/paths.h \ - Win32/Prj/libpcap.dsp \ - Win32/Prj/libpcap.dsw \ - Win32/Src/ffs.c \ - Win32/Src/gai_strerror.c \ - Win32/Src/getaddrinfo.c \ - Win32/Src/getnetbynm.c \ - Win32/Src/getnetent.c \ - Win32/Src/getopt.c \ - Win32/Src/getservent.c \ - Win32/Src/inet_aton.c \ - Win32/Src/inet_net.c \ - Win32/Src/inet_pton.c + Win32/Prj/wpcap.sln \ + Win32/Prj/wpcap.vcxproj \ + Win32/Prj/wpcap.vcxproj.filters all: libpcap.a shared pcap-config @@ -443,57 +444,55 @@ libpcap.shareda: $(OBJ) libpcap.none: scanner.c: $(srcdir)/scanner.l - @rm -f $@ - $(srcdir)/runlex.sh $(LEX) -o$@ $< + $(LEX) -P pcap_ --header-file=scanner.h --nounput -o scanner.c $< +scanner.h: scanner.c +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f scanner.c; \ + $(MAKE) $(MAKEFLAGS) scanner.c; \ + fi -scanner.o: scanner.c tokdefs.h +scanner.o: scanner.c grammar.h $(CC) $(FULL_CFLAGS) -c scanner.c -pcap.o: version.h +pcap.o: pcap_version.h -tokdefs.h: grammar.c grammar.c: $(srcdir)/grammar.y - @rm -f grammar.c tokdefs.h - $(YACC) -d $< - mv y.tab.c grammar.c - mv y.tab.h tokdefs.h + $(YACC) -p pcap_ -o grammar.c -d $< +grammar.h: grammar.c +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f grammar.c; \ + $(MAKE) $(MAKEFLAGS) grammar.c; \ + fi grammar.o: grammar.c - @rm -f $@ - $(CC) $(FULL_CFLAGS) -Dyylval=pcap_lval -c grammar.c + $(CC) $(FULL_CFLAGS) -c grammar.c +gencode.o: $(srcdir)/gencode.c grammar.h scanner.h + $(CC) $(FULL_CFLAGS) -c $(srcdir)/gencode.c + version.o: version.c $(CC) $(FULL_CFLAGS) -c version.c snprintf.o: $(srcdir)/missing/snprintf.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c -version.c: $(srcdir)/VERSION +strtok_r.o: $(srcdir)/missing/strtok_r.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strtok_r.c + +version.c: $(srcdir)/VERSION $(srcdir)/gen_version_c.sh + # + # Older programs import this if they want to show the + # libpcap version number, rather than calling + # pcap_lib_version(), so we need to export it. + # @rm -f $@ - if grep GIT ${srcdir}/VERSION >/dev/null; then \ - read ver <${srcdir}/VERSION; \ - echo $$ver | tr -d '\012'; \ - date +_%Y_%m_%d; \ - else \ - cat ${srcdir}/VERSION; \ - fi | sed -e 's/.*/char pcap_version[] = "&";/' > $@ + $(srcdir)/gen_version_c.sh $(srcdir)/VERSION $@ -# -# NOTE: this really is supposed to be static; importing a string -# from a shared library does not work very well on many -# versions of UNIX (Solaris, Linux, and the BSDs, for example), -# so we make the version string static and return it from -# a function, which does work. -# -version.h: $(srcdir)/VERSION +pcap_version.h: $(srcdir)/VERSION $(srcdir)/pcap_version.h.in $(srcdir)/gen_version_header.sh @rm -f $@ - if grep GIT ${srcdir}/VERSION >/dev/null; then \ - read ver <${srcdir}/VERSION; \ - echo $$ver | tr -d '\012'; \ - date +_%Y_%m_%d; \ - else \ - cat ${srcdir}/VERSION; \ - fi | sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' > $@ + $(srcdir)/gen_version_header.sh $(srcdir)/VERSION $(srcdir)/pcap_version.h.in $@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c rm -f bpf_filter.c @@ -530,6 +529,9 @@ tests: $(TESTS) capturetest: tests/capturetest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o capturetest $(srcdir)/tests/capturetest.c libpcap.a $(LIBS) +can_set_rfmon_test: tests/can_set_rfmon_test.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o can_set_rfmon_test $(srcdir)/tests/can_set_rfmon_test.c libpcap.a $(LIBS) + filtertest: tests/filtertest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/tests/filtertest.c libpcap.a $(LIBS) @@ -539,6 +541,9 @@ findalldevstest: tests/findalldevstest.c libpcap.a opentest: tests/opentest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/tests/opentest.c libpcap.a $(LIBS) +reactivatetest: tests/reactivatetest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o reactivatetest $(srcdir)/tests/reactivatetest.c libpcap.a $(LIBS) + selpolltest: tests/selpolltest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS) @@ -728,12 +733,11 @@ distclean: clean rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=) rm -rf autom4te.cache +extags: $(TAGFILES) + ctags $(TAGFILES) + tags: $(TAGFILES) ctags -wtd $(TAGFILES) - -packaging/pcap.spec: packaging/pcap.spec.in VERSION - RPMVERSION=`cat VERSION | sed s/-.*//g`; \ - sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $< > $@ releasetar: @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \ Modified: stable/11/contrib/libpcap/README ============================================================================== --- stable/11/contrib/libpcap/README Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/README Wed May 31 05:20:59 2017 (r319279) @@ -76,15 +76,15 @@ information on configuring that option. Note to Linux distributions and *BSD systems that include libpcap: -There's now a rule to make a shared library, which should work on Linux +There's now a rule to make a shared library, which should work on Linux and *BSD, among other platforms. -It sets the soname of the library to "libpcap.so.1"; this is what it -should be, *NOT* libpcap.so.1.x or libpcap.so.1.x.y or something such as +It sets the soname of the library to "libpcap.so.1"; this is what it +should be, *NOT* libpcap.so.1.x or libpcap.so.1.x.y or something such as that. -We've been maintaining binary compatibility between libpcap releases for -quite a while; there's no reason to tie a binary linked with libpcap to +We've been maintaining binary compatibility between libpcap releases for +quite a while; there's no reason to tie a binary linked with libpcap to a particular release of libpcap. Problems, bugs, questions, desirable enhancements, etc. should be sent Modified: stable/11/contrib/libpcap/TODO ============================================================================== --- stable/11/contrib/libpcap/TODO Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/TODO Wed May 31 05:20:59 2017 (r319279) @@ -6,11 +6,11 @@ Important stuff (to be done before the next release) General -- configure should not be in Git. Most open source projects have an - autogen.sh script to run autoconf etc. after checkout. I think we - should stick to the standard. +- configure should not be in Git. Most open source projects have an + autogen.sh script to run autoconf etc. after checkout. I think we + should stick to the standard. -- The source files should be better documented. There is no official +- The source files should be better documented. There is no official design guideline for what is done where. There should be a common coding style (okay, you can guess that by looking at the code) and a guide for what needs to be documented. @@ -18,7 +18,7 @@ General Less urgent items ----------------- -- Better documentation and cleanup of the interface. I am seeing a few +- Better documentation and cleanup of the interface. I am seeing a few problems at the first glance which needs fixing: + pcap_lookupnet makes little to no sense with protocols != IPv4 + not very well suited for interactive programs (think ethereal). There Modified: stable/11/contrib/libpcap/VERSION ============================================================================== --- stable/11/contrib/libpcap/VERSION Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/VERSION Wed May 31 05:20:59 2017 (r319279) @@ -1 +1 @@ -1.6.2 +1.8.1 Modified: stable/11/contrib/libpcap/bpf/net/bpf_filter.c ============================================================================== --- stable/11/contrib/libpcap/bpf/net/bpf_filter.c Wed May 31 05:11:28 2017 (r319278) +++ stable/11/contrib/libpcap/bpf/net/bpf_filter.c Wed May 31 05:20:59 2017 (r319279) @@ -42,11 +42,11 @@ #include "config.h" #endif -#ifdef WIN32 +#ifdef _WIN32 #include -#else /* WIN32 */ +#else /* _WIN32 */ #if HAVE_INTTYPES_H #include @@ -73,7 +73,7 @@ # define MLEN(m) ((m)->m_len) #endif /* defined(__hpux) || SOLARIS */ -#endif /* WIN32 */ +#endif /* _WIN32 */ #include @@ -99,7 +99,7 @@ #endif #ifndef LBL_ALIGN -#ifndef WIN32 +#ifndef _WIN32 #include #endif @@ -195,23 +195,41 @@ m_xhalf(m, k, err) } #endif +#ifdef __linux__ +#include +#include +#include +#endif + +enum { + BPF_S_ANC_NONE, + BPF_S_ANC_VLAN_TAG, + BPF_S_ANC_VLAN_TAG_PRESENT, +}; + /* * Execute the filter program starting at pc on the packet p * wirelen is the length of the original packet * buflen is the amount of data present + * aux_data is auxiliary data, currently used only when interpreting + * filters intended for the Linux kernel in cases where the kernel + * rejects the filter; it contains VLAN tag information * For the kernel, p is assumed to be a pointer to an mbuf if buflen is 0, * in all other cases, p is a pointer to a buffer and buflen is its size. + * + * Thanks to Ani Sinha for providing initial implementation */ u_int -bpf_filter(pc, p, wirelen, buflen) +bpf_filter_with_aux_data(pc, p, wirelen, buflen, aux_data) register const struct bpf_insn *pc; register const u_char *p; u_int wirelen; register u_int buflen; + register const struct bpf_aux_data *aux_data; { register u_int32 A, X; - register int k; - int32 mem[BPF_MEMWORDS]; + register bpf_u_int32 k; + u_int32 mem[BPF_MEMWORDS]; #if defined(KERNEL) || defined(_KERNEL) struct mbuf *m, *n; int merr, len; @@ -250,7 +268,7 @@ bpf_filter(pc, p, wirelen, buflen) case BPF_LD|BPF_W|BPF_ABS: k = pc->k; - if (k + sizeof(int32) > buflen) { + if (k > buflen || sizeof(int32_t) > buflen - k) { #if defined(KERNEL) || defined(_KERNEL) if (m == NULL) return 0; @@ -267,7 +285,7 @@ bpf_filter(pc, p, wirelen, buflen) case BPF_LD|BPF_H|BPF_ABS: k = pc->k; - if (k + sizeof(short) > buflen) { + if (k > buflen || sizeof(int16_t) > buflen - k) { #if defined(KERNEL) || defined(_KERNEL) if (m == NULL) return 0; @@ -283,22 +301,50 @@ bpf_filter(pc, p, wirelen, buflen) continue; case BPF_LD|BPF_B|BPF_ABS: - k = pc->k; - if (k >= buflen) { + { +#if defined(SKF_AD_VLAN_TAG) && defined(SKF_AD_VLAN_TAG_PRESENT) + int code = BPF_S_ANC_NONE; +#define ANCILLARY(CODE) case SKF_AD_OFF + SKF_AD_##CODE: \ + code = BPF_S_ANC_##CODE; \ + if (!aux_data) \ + return 0; \ + break; + + switch (pc->k) { + ANCILLARY(VLAN_TAG); + ANCILLARY(VLAN_TAG_PRESENT); + default : +#endif + k = pc->k; + if (k >= buflen) { #if defined(KERNEL) || defined(_KERNEL) - if (m == NULL) - return 0; - n = m; - MINDEX(len, n, k); - A = mtod(n, u_char *)[k]; - continue; + if (m == NULL) + return 0; + n = m; + MINDEX(len, n, k); + A = mtod(n, u_char *)[k]; + continue; #else - return 0; + return 0; #endif - } - A = p[k]; - continue; + } + A = p[k]; +#if defined(SKF_AD_VLAN_TAG) && defined(SKF_AD_VLAN_TAG_PRESENT) + } + switch (code) { + case BPF_S_ANC_VLAN_TAG: + if (aux_data) + A = aux_data->vlan_tag; + break; + case BPF_S_ANC_VLAN_TAG_PRESENT: + if (aux_data) + A = aux_data->vlan_tag_present; + break; + } +#endif + continue; + } case BPF_LD|BPF_W|BPF_LEN: A = wirelen; continue; @@ -309,7 +355,8 @@ bpf_filter(pc, p, wirelen, buflen) case BPF_LD|BPF_W|BPF_IND: k = X + pc->k; - if (k + sizeof(int32) > buflen) { + if (pc->k > buflen || X > buflen - pc->k || + sizeof(int32_t) > buflen - k) { #if defined(KERNEL) || defined(_KERNEL) if (m == NULL) return 0; @@ -326,7 +373,8 @@ bpf_filter(pc, p, wirelen, buflen) case BPF_LD|BPF_H|BPF_IND: k = X + pc->k; - if (k + sizeof(short) > buflen) { + if (X > buflen || pc->k > buflen - X || + sizeof(int16_t) > buflen - k) { #if defined(KERNEL) || defined(_KERNEL) if (m == NULL) return 0; @@ -343,7 +391,7 @@ bpf_filter(pc, p, wirelen, buflen) case BPF_LD|BPF_B|BPF_IND: k = X + pc->k; - if (k >= buflen) { + if (pc->k >= buflen || X >= buflen - pc->k) { #if defined(KERNEL) || defined(_KERNEL) if (m == NULL) return 0; @@ -531,7 +579,12 @@ bpf_filter(pc, p, wirelen, buflen) continue; case BPF_ALU|BPF_NEG: - A = -A; + /* + * Most BPF arithmetic is unsigned, but negation + * can't be unsigned; throw some casts to + * specify what we're trying to do. + */ + A = (u_int32)(-(int32)A); continue; case BPF_MISC|BPF_TAX: @@ -545,6 +598,17 @@ bpf_filter(pc, p, wirelen, buflen) } } +u_int +bpf_filter(pc, p, wirelen, buflen) + register const struct bpf_insn *pc; + register const u_char *p; + u_int wirelen; + register u_int buflen; +{ + return bpf_filter_with_aux_data(pc, p, wirelen, buflen, NULL); +} + + /* * Return true if the 'fcode' is a valid filter program. * The constraints are that each jump be forward and to a valid @@ -574,7 +638,7 @@ bpf_validate(f, len) return 0; #endif - for (i = 0; i < len; ++i) { + for (i = 0; i < (u_int)len; ++i) { p = &f[i]; switch (BPF_CLASS(p->code)) { /* @@ -675,7 +739,7 @@ bpf_validate(f, len) #if defined(KERNEL) || defined(_KERNEL) if (from + p->k < from || from + p->k >= len) #else - if (from + p->k >= len) + if (from + p->k >= (u_int)len) #endif return 0; break; @@ -683,7 +747,7 @@ bpf_validate(f, len) case BPF_JGT: case BPF_JGE: case BPF_JSET: - if (from + p->jt >= len || from + p->jf >= len) + if (from + p->jt >= (u_int)len || from + p->jf >= (u_int)len) return 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 31 05:24:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 917FBA92B66; Wed, 31 May 2017 05:24:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5F0E73FAC; Wed, 31 May 2017 05:24:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100] (may be forged)) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA20433; Wed, 31 May 2017 08:24:00 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1dFw6x-000ODN-Vt; Wed, 31 May 2017 08:24:00 +0300 Subject: Re: svn commit: r317591 - head/sys/dev/drm2/radeon To: Takahashi Yoshihiro , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201704290947.v3T9lF0r075921@repo.freebsd.org> From: Andriy Gapon Message-ID: <03e500d5-76b1-fd38-04c6-90d85a2ddfa8@FreeBSD.org> Date: Wed, 31 May 2017 08:22:38 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <201704290947.v3T9lF0r075921@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:24:09 -0000 On 29/04/2017 12:47, Takahashi Yoshihiro wrote: > Author: nyan > Date: Sat Apr 29 09:47:15 2017 > New Revision: 317591 > URL: https://svnweb.freebsd.org/changeset/base/317591 > > Log: > Add TUNABLE_INT to radeonkms driver parameters. > They are required by PowerMac G5 DP. > > PR: 217852 > Submitted by: Hiroo Ono > MFC after: 1 week I think that this solution that I had in my private tree is a little bit more powerful: https://people.freebsd.org/~avg/radeon_drv-knobs.diff The advantage is that it is less intrusive and also provides read-only sysctl in addition to the tunables. Also, hw.drm.radeon seems like a better place for the knobs than just drm.radeon. Do you mind if I commit this? > Modified: > head/sys/dev/drm2/radeon/radeon_drv.c > > Modified: head/sys/dev/drm2/radeon/radeon_drv.c > ============================================================================== > --- head/sys/dev/drm2/radeon/radeon_drv.c Sat Apr 29 09:26:30 2017 (r317590) > +++ head/sys/dev/drm2/radeon/radeon_drv.c Sat Apr 29 09:47:15 2017 (r317591) > @@ -127,54 +127,71 @@ int radeon_pcie_gen2 = -1; > int radeon_msi = -1; > int radeon_lockup_timeout = 10000; > > +TUNABLE_INT("drm.radeon.no_wb", &radeon_no_wb); > MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); > module_param_named(no_wb, radeon_no_wb, int, 0444); > > +TUNABLE_INT("drm.radeon.modeset", &radeon_modeset); > MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); > module_param_named(modeset, radeon_modeset, int, 0400); > > +TUNABLE_INT("drm.radeon.dynclks", &radeon_dynclks); > MODULE_PARM_DESC(dynclks, "Disable/Enable dynamic clocks"); > module_param_named(dynclks, radeon_dynclks, int, 0444); > > +TUNABLE_INT("drm.radeon.r4xx_atom", &radeon_r4xx_atom); > MODULE_PARM_DESC(r4xx_atom, "Enable ATOMBIOS modesetting for R4xx"); > module_param_named(r4xx_atom, radeon_r4xx_atom, int, 0444); > > +TUNABLE_INT("drm.radeon.vramlimit", &radeon_vram_limit); > MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing"); > module_param_named(vramlimit, radeon_vram_limit, int, 0600); > > +TUNABLE_INT("drm.radeon.agpmode", &radeon_agpmode); > MODULE_PARM_DESC(agpmode, "AGP Mode (-1 == PCI)"); > module_param_named(agpmode, radeon_agpmode, int, 0444); > > +TUNABLE_INT("drm.radeon.gartsize", &radeon_gart_size); > MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 64, etc)"); > module_param_named(gartsize, radeon_gart_size, int, 0600); > > +TUNABLE_INT("drm.radeon.benchmark", &radeon_benchmarking); > MODULE_PARM_DESC(benchmark, "Run benchmark"); > module_param_named(benchmark, radeon_benchmarking, int, 0444); > > +TUNABLE_INT("drm.radeon.test", &radeon_testing); > MODULE_PARM_DESC(test, "Run tests"); > module_param_named(test, radeon_testing, int, 0444); > > +TUNABLE_INT("drm.radeon.connector_table", &radeon_connector_table); > MODULE_PARM_DESC(connector_table, "Force connector table"); > module_param_named(connector_table, radeon_connector_table, int, 0444); > > +TUNABLE_INT("drm.radeon.tv", &radeon_tv); > MODULE_PARM_DESC(tv, "TV enable (0 = disable)"); > module_param_named(tv, radeon_tv, int, 0444); > > +TUNABLE_INT("drm.radeon.audio", &radeon_audio); > MODULE_PARM_DESC(audio, "Audio enable (1 = enable)"); > module_param_named(audio, radeon_audio, int, 0444); > > +TUNABLE_INT("drm.radeon.disp_priority", &radeon_disp_priority); > MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = high)"); > module_param_named(disp_priority, radeon_disp_priority, int, 0444); > > +TUNABLE_INT("drm.radeon.hw_i2c", &radeon_hw_i2c); > MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)"); > module_param_named(hw_i2c, radeon_hw_i2c, int, 0444); > > +TUNABLE_INT("drm.radeon.pcie_gen2", &radeon_pcie_gen2); > MODULE_PARM_DESC(pcie_gen2, "PCIE Gen2 mode (-1 = auto, 0 = disable, 1 = enable)"); > module_param_named(pcie_gen2, radeon_pcie_gen2, int, 0444); > > +TUNABLE_INT("drm.radeon.msi", &radeon_msi); > MODULE_PARM_DESC(msi, "MSI support (1 = enable, 0 = disable, -1 = auto)"); > module_param_named(msi, radeon_msi, int, 0444); > > +TUNABLE_INT("drm.radeon.lockup_timeout", &radeon_lockup_timeout); > MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms (defaul 10000 = 10 seconds, 0 = disable)"); > module_param_named(lockup_timeout, radeon_lockup_timeout, int, 0444); > > -- Andriy Gapon From owner-svn-src-all@freebsd.org Wed May 31 05:29:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCE7BA92CBF; Wed, 31 May 2017 05:29:21 +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 8D23E6411C; Wed, 31 May 2017 05:29:21 +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 v4V5TKDY039798; Wed, 31 May 2017 05:29:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V5TKMe039797; Wed, 31 May 2017 05:29:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310529.v4V5TKMe039797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319280 - stable/11/usr.bin/gzip X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:29:21 -0000 Author: delphij Date: Wed May 31 05:29:20 2017 New Revision: 319280 URL: https://svnweb.freebsd.org/changeset/base/319280 Log: MFC r313327: Reflect actual NetBSD revision we already have. Modified: stable/11/usr.bin/gzip/unxz.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/gzip/unxz.c ============================================================================== --- stable/11/usr.bin/gzip/unxz.c Wed May 31 05:20:59 2017 (r319279) +++ stable/11/usr.bin/gzip/unxz.c Wed May 31 05:29:20 2017 (r319280) @@ -1,4 +1,4 @@ -/* $NetBSD: unxz.c,v 1.5 2011/09/30 01:32:21 christos Exp $ */ +/* $NetBSD: unxz.c,v 1.6 2016/01/29 15:19:01 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. From owner-svn-src-all@freebsd.org Wed May 31 05:33:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8567CA92FED; Wed, 31 May 2017 05:33:33 +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 5525664619; Wed, 31 May 2017 05:33:33 +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 v4V5XWKf043720; Wed, 31 May 2017 05:33:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V5XWNB043719; Wed, 31 May 2017 05:33:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310533.v4V5XWNB043719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319281 - stable/10/usr.bin/gzip X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:33:33 -0000 Author: delphij Date: Wed May 31 05:33:32 2017 New Revision: 319281 URL: https://svnweb.freebsd.org/changeset/base/319281 Log: MFC r313327: Reflect actual NetBSD revision we already have. Modified: stable/10/usr.bin/gzip/unxz.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/gzip/unxz.c ============================================================================== --- stable/10/usr.bin/gzip/unxz.c Wed May 31 05:29:20 2017 (r319280) +++ stable/10/usr.bin/gzip/unxz.c Wed May 31 05:33:32 2017 (r319281) @@ -1,4 +1,4 @@ -/* $NetBSD: unxz.c,v 1.5 2011/09/30 01:32:21 christos Exp $ */ +/* $NetBSD: unxz.c,v 1.6 2016/01/29 15:19:01 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. From owner-svn-src-all@freebsd.org Wed May 31 05:37:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23F34AF71B0; Wed, 31 May 2017 05:37:53 +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 E7F00647B4; Wed, 31 May 2017 05:37:52 +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 v4V5bq1K043925; Wed, 31 May 2017 05:37:52 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V5bqbX043924; Wed, 31 May 2017 05:37:52 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310537.v4V5bqbX043924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:37:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319282 - stable/11/lib/libz X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:37:53 -0000 Author: delphij Date: Wed May 31 05:37:51 2017 New Revision: 319282 URL: https://svnweb.freebsd.org/changeset/base/319282 Log: MFC r316635: Enable 16-bit longest_match for x86. This gives a ~2% improvement in compression tests. Modified: stable/11/lib/libz/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libz/Makefile ============================================================================== --- stable/11/lib/libz/Makefile Wed May 31 05:33:32 2017 (r319281) +++ stable/11/lib/libz/Makefile Wed May 31 05:37:51 2017 (r319282) @@ -40,19 +40,9 @@ SRCS+= uncompr.c SRCS+= zopen.c SRCS+= zutil.c -#.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*} -#.PATH: ${ZLIBSRC}/contrib/asm686 -#SRCS+= match.S -#CFLAGS+= -DASMV -DNO_UNDERLINE -#ACFLAGS+= -Wa,--noexecstack -#.endif - -#.if ${MACHINE_ARCH} == "amd64" -#.PATH: ${ZLIBSRC}/contrib/gcc_gvmat64 -#SRCS+= gvmat64.S -#CFLAGS+= -DASMV -DNO_UNDERLINE -#ACFLAGS+= -Wa,--noexecstack -#.endif +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64 +CFLAGS+= -DUNALIGNED_OK +.endif VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map From owner-svn-src-all@freebsd.org Wed May 31 05:38:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 776FCAF7264; Wed, 31 May 2017 05:38:58 +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 47B93648DE; Wed, 31 May 2017 05:38:58 +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 v4V5cvP1044028; Wed, 31 May 2017 05:38:57 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V5cveI044027; Wed, 31 May 2017 05:38:57 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310538.v4V5cveI044027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319283 - stable/10/lib/libz X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:38:58 -0000 Author: delphij Date: Wed May 31 05:38:57 2017 New Revision: 319283 URL: https://svnweb.freebsd.org/changeset/base/319283 Log: MFC r316635: Enable 16-bit longest_match for x86. This gives a ~2% improvement in compression tests. Modified: stable/10/lib/libz/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libz/Makefile ============================================================================== --- stable/10/lib/libz/Makefile Wed May 31 05:37:51 2017 (r319282) +++ stable/10/lib/libz/Makefile Wed May 31 05:38:57 2017 (r319283) @@ -39,19 +39,9 @@ SRCS+= uncompr.c SRCS+= zopen.c SRCS+= zutil.c -#.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*} -#.PATH: ${ZLIBSRC}/contrib/asm686 -#SRCS+= match.S -#CFLAGS+= -DASMV -DNO_UNDERLINE -#ACFLAGS+= -Wa,--noexecstack -#.endif - -#.if ${MACHINE_ARCH} == "amd64" -#.PATH: ${ZLIBSRC}/contrib/gcc_gvmat64 -#SRCS+= gvmat64.S -#CFLAGS+= -DASMV -DNO_UNDERLINE -#ACFLAGS+= -Wa,--noexecstack -#.endif +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64 +CFLAGS+= -DUNALIGNED_OK +.endif VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map From owner-svn-src-all@freebsd.org Wed May 31 05:45:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E301AF74F9; Wed, 31 May 2017 05:45:09 +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 DD37B64CA7; Wed, 31 May 2017 05:45:08 +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 v4V5j8Rs048206; Wed, 31 May 2017 05:45:08 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V5j656048195; Wed, 31 May 2017 05:45:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310545.v4V5j656048195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319284 - stable/11/sys/libkern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:45:09 -0000 Author: delphij Date: Wed May 31 05:45:06 2017 New Revision: 319284 URL: https://svnweb.freebsd.org/changeset/base/319284 Log: MFC r311989 (cem): libkern: Remove obsolete 'register' keyword Modified: stable/11/sys/libkern/bcmp.c stable/11/sys/libkern/bsearch.c stable/11/sys/libkern/iconv_ucs.c stable/11/sys/libkern/iconv_xlat16.c stable/11/sys/libkern/memmem.c stable/11/sys/libkern/qdivrem.c stable/11/sys/libkern/qsort.c stable/11/sys/libkern/random.c stable/11/sys/libkern/scanc.c stable/11/sys/libkern/strcmp.c stable/11/sys/libkern/strncpy.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/libkern/bcmp.c ============================================================================== --- stable/11/sys/libkern/bcmp.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/bcmp.c Wed May 31 05:45:06 2017 (r319284) @@ -44,7 +44,7 @@ typedef const unsigned long *culp; int bcmp(b1, b2, length) const void *b1, *b2; - register size_t length; + size_t length; { #if BYTE_ORDER == LITTLE_ENDIAN /* Modified: stable/11/sys/libkern/bsearch.c ============================================================================== --- stable/11/sys/libkern/bsearch.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/bsearch.c Wed May 31 05:45:06 2017 (r319284) @@ -54,16 +54,16 @@ __FBSDID("$FreeBSD$"); */ void * bsearch(key, base0, nmemb, size, compar) - register const void *key; + const void *key; const void *base0; size_t nmemb; - register size_t size; - register int (*compar)(const void *, const void *); + size_t size; + int (*compar)(const void *, const void *); { - register const char *base = base0; - register size_t lim; - register int cmp; - register const void *p; + const char *base = base0; + size_t lim; + int cmp; + const void *p; for (lim = nmemb; lim != 0; lim >>= 1) { p = base + (lim >> 1) * size; Modified: stable/11/sys/libkern/iconv_ucs.c ============================================================================== --- stable/11/sys/libkern/iconv_ucs.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/iconv_ucs.c Wed May 31 05:45:06 2017 (r319284) @@ -523,14 +523,14 @@ ucs4_to_utf8(uint32_t ucs4, char *dst, size_t *utf8wid } static uint32_t -encode_surrogate(register uint32_t code) +encode_surrogate(uint32_t code) { return ((((code - 0x10000) << 6) & 0x3ff0000) | ((code - 0x10000) & 0x3ff) | 0xd800dc00); } static uint32_t -decode_surrogate(register const u_char *ucs) +decode_surrogate(const u_char *ucs) { return ((((ucs[0] & 0x3) << 18) | (ucs[1] << 10) | ((ucs[2] & 0x3) << 8) | ucs[3]) + 0x10000); Modified: stable/11/sys/libkern/iconv_xlat16.c ============================================================================== --- stable/11/sys/libkern/iconv_xlat16.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/iconv_xlat16.c Wed May 31 05:45:06 2017 (r319284) @@ -298,10 +298,10 @@ iconv_xlat16_name(struct iconv_converter_class *dcp) } static int -iconv_xlat16_tolower(void *d2p, register int c) +iconv_xlat16_tolower(void *d2p, int c) { struct iconv_xlat16 *dp = (struct iconv_xlat16*)d2p; - register int c1, c2, out; + int c1, c2, out; if (c < 0x100) { c1 = C2I1(c << 8); @@ -323,10 +323,10 @@ iconv_xlat16_tolower(void *d2p, register int c) } static int -iconv_xlat16_toupper(void *d2p, register int c) +iconv_xlat16_toupper(void *d2p, int c) { struct iconv_xlat16 *dp = (struct iconv_xlat16*)d2p; - register int c1, c2, out; + int c1, c2, out; if (c < 0x100) { c1 = C2I1(c << 8); Modified: stable/11/sys/libkern/memmem.c ============================================================================== --- stable/11/sys/libkern/memmem.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/memmem.c Wed May 31 05:45:06 2017 (r319284) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); void * memmem(const void *l, size_t l_len, const void *s, size_t s_len) { - register char *cur, *last; + char *cur, *last; const char *cl = (const char *)l; const char *cs = (const char *)s; Modified: stable/11/sys/libkern/qdivrem.c ============================================================================== --- stable/11/sys/libkern/qdivrem.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/qdivrem.c Wed May 31 05:45:06 2017 (r319284) @@ -59,9 +59,9 @@ typedef u_long digit; * We may assume len >= 0. NOTE THAT THIS WRITES len+1 DIGITS. */ static void -__shl(register digit *p, register int len, register int sh) +__shl(digit *p, int len, int sh) { - register int i; + int i; for (i = 0; i < len; i++) p[i] = LHALF(p[i] << sh) | (p[i + 1] >> (HALF_BITS - sh)); @@ -82,7 +82,7 @@ __qdivrem(uq, vq, arq) { union uu tmp; digit *u, *v, *q; - register digit v1, v2; + digit v1, v2; u_long qhat, rhat, t; int m, n, d, j, i; digit uspace[5], vspace[5], qspace[5]; @@ -192,7 +192,7 @@ __qdivrem(uq, vq, arq) v1 = v[1]; /* for D3 -- note that v[1..n] are constant */ v2 = v[2]; /* for D3 */ do { - register digit uj0, uj1, uj2; + digit uj0, uj1, uj2; /* * D3: Calculate qhat (\^q, in TeX notation). Modified: stable/11/sys/libkern/qsort.c ============================================================================== --- stable/11/sys/libkern/qsort.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/qsort.c Wed May 31 05:45:06 2017 (r319284) @@ -48,10 +48,10 @@ static __inline void swapfunc(char *, char *, int, in */ #define swapcode(TYPE, parmi, parmj, n) { \ long i = (n) / sizeof (TYPE); \ - register TYPE *pi = (TYPE *) (parmi); \ - register TYPE *pj = (TYPE *) (parmj); \ + TYPE *pi = (TYPE *) (parmi); \ + TYPE *pj = (TYPE *) (parmj); \ do { \ - register TYPE t = *pi; \ + TYPE t = *pi; \ *pi++ = *pj; \ *pj++ = t; \ } while (--i > 0); \ Modified: stable/11/sys/libkern/random.c ============================================================================== --- stable/11/sys/libkern/random.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/random.c Wed May 31 05:45:06 2017 (r319284) @@ -57,7 +57,7 @@ srandom(seed) u_long random() { - register long x, hi, lo, t; + long x, hi, lo, t; /* * Compute x[n + 1] = (7^5 * x[n]) mod (2^31 - 1). Modified: stable/11/sys/libkern/scanc.c ============================================================================== --- stable/11/sys/libkern/scanc.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/scanc.c Wed May 31 05:45:06 2017 (r319284) @@ -37,11 +37,11 @@ __FBSDID("$FreeBSD$"); int scanc(size, cp, table, mask0) u_int size; - register const u_char *cp, table[]; + const u_char *cp, table[]; int mask0; { - register const u_char *end; - register u_char mask; + const u_char *end; + u_char mask; mask = mask0; for (end = &cp[size]; cp < end; ++cp) { Modified: stable/11/sys/libkern/strcmp.c ============================================================================== --- stable/11/sys/libkern/strcmp.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/strcmp.c Wed May 31 05:45:06 2017 (r319284) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); */ int strcmp(s1, s2) - register const char *s1, *s2; + const char *s1, *s2; { while (*s1 == *s2++) if (*s1++ == 0) Modified: stable/11/sys/libkern/strncpy.c ============================================================================== --- stable/11/sys/libkern/strncpy.c Wed May 31 05:38:57 2017 (r319283) +++ stable/11/sys/libkern/strncpy.c Wed May 31 05:45:06 2017 (r319284) @@ -43,8 +43,8 @@ char * strncpy(char * __restrict dst, const char * __restrict src, size_t n) { if (n != 0) { - register char *d = dst; - register const char *s = src; + char *d = dst; + const char *s = src; do { if ((*d++ = *s++) == 0) { From owner-svn-src-all@freebsd.org Wed May 31 05:52:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0352EAF7721; Wed, 31 May 2017 05:52:34 +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 C22B665061; Wed, 31 May 2017 05:52:33 +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 v4V5qXO6052031; Wed, 31 May 2017 05:52:33 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V5qWDF052028; Wed, 31 May 2017 05:52:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310552.v4V5qWDF052028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 05:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319285 - in stable/11: kerberos5/lib/libroken lib/libc/stdlib sys/libkern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 05:52:34 -0000 Author: delphij Date: Wed May 31 05:52:32 2017 New Revision: 319285 URL: https://svnweb.freebsd.org/changeset/base/319285 Log: MFC r318514-r318515, r318517, r318917 r318514: Use size_t. Inspired by: OpenBSD src/lib/libc/stdlib/qsort.c,v 1.11 r318515: The current qsort(3) implementation ignores the sizes of partitions, and always perform recursion on the left partition, then use a tail call to handle the right partition. In the worst case this could require O(N) levels of recursions. Reduce the possible recursion level to log2(N) by always recursing on the smaller partition instead. Obtained from: PostgreSQL 9d6077abf9d6efd992a59f05ef5aba981ea32096 r318517: Sync qsort.c with userland r318515. (Note that MIN macro is removed in favor of sys/param.h's version). PR: 213922 r318917: Disconnect heimdal version of qsort.c from build because we are already using libc's version of qsort. PR: bin/213922 Modified: stable/11/kerberos5/lib/libroken/Makefile stable/11/lib/libc/stdlib/qsort.c stable/11/sys/libkern/qsort.c Directory Properties: stable/11/ (props changed) Modified: stable/11/kerberos5/lib/libroken/Makefile ============================================================================== --- stable/11/kerberos5/lib/libroken/Makefile Wed May 31 05:45:06 2017 (r319284) +++ stable/11/kerberos5/lib/libroken/Makefile Wed May 31 05:52:32 2017 (r319285) @@ -52,7 +52,6 @@ SRCS= base64.c \ parse_bytes.c \ parse_time.c \ parse_units.c \ - qsort.c \ rand.c \ realloc.c \ resolve.c \ Modified: stable/11/lib/libc/stdlib/qsort.c ============================================================================== --- stable/11/lib/libc/stdlib/qsort.c Wed May 31 05:45:06 2017 (r319284) +++ stable/11/lib/libc/stdlib/qsort.c Wed May 31 05:52:32 2017 (r319285) @@ -41,7 +41,7 @@ typedef int cmp_t(void *, const void *, const void * typedef int cmp_t(const void *, const void *); #endif static inline char *med3(char *, char *, char *, cmp_t *, void *); -static inline void swapfunc(char *, char *, int, int, int); +static inline void swapfunc(char *, char *, size_t, int, int); #define MIN(a, b) ((a) < (b) ? a : b) @@ -49,7 +49,7 @@ static inline void swapfunc(char *, char *, int, int, * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". */ #define swapcode(TYPE, parmi, parmj, n) { \ - long i = (n) / sizeof (TYPE); \ + size_t i = (n) / sizeof (TYPE); \ TYPE *pi = (TYPE *) (parmi); \ TYPE *pj = (TYPE *) (parmj); \ do { \ @@ -64,7 +64,7 @@ static inline void swapfunc(char *, char *, int, int, es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; static inline void -swapfunc( char *a, char *b, int n, int swaptype_long, int swaptype_int) +swapfunc(char *a, char *b, size_t n, int swaptype_long, int swaptype_int) { if (swaptype_long <= 1) swapcode(long, a, b, n) @@ -117,7 +117,7 @@ qsort(void *a, size_t n, size_t es, cmp_t *cmp) #endif { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; - size_t d, r; + size_t d1, d2; int cmp_result; int swaptype_long, swaptype_int, swap_cnt; @@ -137,7 +137,8 @@ loop: SWAPINIT(long, a, es); pl = a; pn = (char *)a + (n - 1) * es; if (n > 40) { - d = (n / 8) * es; + size_t d = (n / 8) * es; + pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); pm = med3(pm - d, pm, pm + d, cmp, thunk); pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); @@ -182,21 +183,43 @@ loop: SWAPINIT(long, a, es); } pn = (char *)a + n * es; - r = MIN(pa - (char *)a, pb - pa); - vecswap(a, pb - r, r); - r = MIN(pd - pc, pn - pd - es); - vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) + d1 = MIN(pa - (char *)a, pb - pa); + vecswap(a, pb - d1, d1); + d1 = MIN(pd - pc, pn - pd - es); + vecswap(pb, pn - d1, d1); + + d1 = pb - pa; + d2 = pd - pc; + if (d1 <= d2) { + /* Recurse on left partition, then iterate on right partition */ + if (d1 > es) { #ifdef I_AM_QSORT_R - qsort_r(a, r / es, es, thunk, cmp); + qsort_r(a, d1 / es, es, thunk, cmp); #else - qsort(a, r / es, es, cmp); + qsort(a, d1 / es, es, cmp); #endif - if ((r = pd - pc) > es) { - /* Iterate rather than recurse to save stack space */ - a = pn - r; - n = r / es; - goto loop; + } + if (d2 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(pn - d2, d2 / es, es, cmp); */ + a = pn - d2; + n = d2 / es; + goto loop; + } + } else { + /* Recurse on right partition, then iterate on left partition */ + if (d2 > es) { +#ifdef I_AM_QSORT_R + qsort_r(pn - d2, d2 / es, es, thunk, cmp); +#else + qsort(pn - d2, d2 / es, es, cmp); +#endif + } + if (d1 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(a, d1 / es, es, cmp); */ + n = d1 / es; + goto loop; + } } -/* qsort(pn - r, r / es, es, cmp);*/ } Modified: stable/11/sys/libkern/qsort.c ============================================================================== --- stable/11/sys/libkern/qsort.c Wed May 31 05:45:06 2017 (r319284) +++ stable/11/sys/libkern/qsort.c Wed May 31 05:52:32 2017 (r319285) @@ -33,51 +33,57 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef I_AM_QSORT_R -typedef int cmp_t(void *, const void *, const void *); +#ifdef I_AM_QSORT_R +typedef int cmp_t(void *, const void *, const void *); #else -typedef int cmp_t(const void *, const void *); +typedef int cmp_t(const void *, const void *); #endif -static __inline char *med3(char *, char *, char *, cmp_t *, void *); -static __inline void swapfunc(char *, char *, int, int); +static inline char *med3(char *, char *, char *, cmp_t *, void *); +static inline void swapfunc(char *, char *, size_t, int, int); -#define min(a, b) (a) < (b) ? (a) : (b) - /* * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". */ -#define swapcode(TYPE, parmi, parmj, n) { \ - long i = (n) / sizeof (TYPE); \ - TYPE *pi = (TYPE *) (parmi); \ - TYPE *pj = (TYPE *) (parmj); \ +#define swapcode(TYPE, parmi, parmj, n) { \ + size_t i = (n) / sizeof (TYPE); \ + TYPE *pi = (TYPE *) (parmi); \ + TYPE *pj = (TYPE *) (parmj); \ do { \ - TYPE t = *pi; \ + TYPE t = *pi; \ *pi++ = *pj; \ *pj++ = t; \ - } while (--i > 0); \ + } while (--i > 0); \ } -#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ - es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; +#define SWAPINIT(TYPE, a, es) swaptype_ ## TYPE = \ + ((char *)a - (char *)0) % sizeof(TYPE) || \ + es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; -static __inline void -swapfunc(char *a, char *b, int n, int swaptype) +static inline void +swapfunc(char *a, char *b, size_t n, int swaptype_long, int swaptype_int) { - if(swaptype <= 1) + if (swaptype_long <= 1) swapcode(long, a, b, n) + else if (swaptype_int <= 1) + swapcode(int, a, b, n) else swapcode(char, a, b, n) } -#define swap(a, b) \ - if (swaptype == 0) { \ +#define swap(a, b) \ + if (swaptype_long == 0) { \ long t = *(long *)(a); \ *(long *)(a) = *(long *)(b); \ *(long *)(b) = t; \ + } else if (swaptype_int == 0) { \ + int t = *(int *)(a); \ + *(int *)(a) = *(int *)(b); \ + *(int *)(b) = t; \ } else \ - swapfunc(a, b, es, swaptype) + swapfunc(a, b, es, swaptype_long, swaptype_int) -#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) +#define vecswap(a, b, n) \ + if ((n) > 0) swapfunc(a, b, n, swaptype_long, swaptype_int) #ifdef I_AM_QSORT_R #define CMP(t, x, y) (cmp((t), (x), (y))) @@ -85,16 +91,16 @@ swapfunc(char *a, char *b, int n, int swaptype) #define CMP(t, x, y) (cmp((x), (y))) #endif -static __inline char * +static inline char * med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk -#ifndef I_AM_QSORT_R +#ifndef I_AM_QSORT_R __unused #endif ) { return CMP(thunk, a, b) < 0 ? (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) - :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); + :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); } #ifdef I_AM_QSORT_R @@ -107,13 +113,17 @@ qsort(void *a, size_t n, size_t es, cmp_t *cmp) #endif { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; - int d, r, swaptype, swap_cnt; + size_t d1, d2; + int cmp_result; + int swaptype_long, swaptype_int, swap_cnt; -loop: SWAPINIT(a, es); +loop: SWAPINIT(long, a, es); + SWAPINIT(int, a, es); swap_cnt = 0; if (n < 7) { for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swap(pl, pl - es); return; @@ -123,7 +133,8 @@ loop: SWAPINIT(a, es); pl = a; pn = (char *)a + (n - 1) * es; if (n > 40) { - d = (n / 8) * es; + size_t d = (n / 8) * es; + pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); pm = med3(pm - d, pm, pm + d, cmp, thunk); pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); @@ -135,16 +146,16 @@ loop: SWAPINIT(a, es); pc = pd = (char *)a + (n - 1) * es; for (;;) { - while (pb <= pc && (r = CMP(thunk, pb, a)) <= 0) { - if (r == 0) { + while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { + if (cmp_result == 0) { swap_cnt = 1; swap(pa, pb); pa += es; } pb += es; } - while (pb <= pc && (r = CMP(thunk, pc, a)) >= 0) { - if (r == 0) { + while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { + if (cmp_result == 0) { swap_cnt = 1; swap(pc, pd); pd -= es; @@ -160,27 +171,51 @@ loop: SWAPINIT(a, es); } if (swap_cnt == 0) { /* Switch to insertion sort */ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swap(pl, pl - es); return; } pn = (char *)a + n * es; - r = min(pa - (char *)a, pb - pa); - vecswap(a, pb - r, r); - r = min(pd - pc, pn - pd - es); - vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) -#ifdef I_AM_QSORT_R - qsort_r(a, r / es, es, thunk, cmp); + d1 = MIN(pa - (char *)a, pb - pa); + vecswap(a, pb - d1, d1); + d1 = MIN(pd - pc, pn - pd - es); + vecswap(pb, pn - d1, d1); + + d1 = pb - pa; + d2 = pd - pc; + if (d1 <= d2) { + /* Recurse on left partition, then iterate on right partition */ + if (d1 > es) { +#ifdef I_AM_QSORT_R + qsort_r(a, d1 / es, es, thunk, cmp); #else - qsort(a, r / es, es, cmp); + qsort(a, d1 / es, es, cmp); #endif - if ((r = pd - pc) > es) { - /* Iterate rather than recurse to save stack space */ - a = pn - r; - n = r / es; - goto loop; + } + if (d2 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(pn - d2, d2 / es, es, cmp); */ + a = pn - d2; + n = d2 / es; + goto loop; + } + } else { + /* Recurse on right partition, then iterate on left partition */ + if (d2 > es) { +#ifdef I_AM_QSORT_R + qsort_r(pn - d2, d2 / es, es, thunk, cmp); +#else + qsort(pn - d2, d2 / es, es, cmp); +#endif + } + if (d1 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(a, d1 / es, es, cmp); */ + n = d1 / es; + goto loop; + } } } From owner-svn-src-all@freebsd.org Wed May 31 06:00:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08E5AAF7819; Wed, 31 May 2017 06:00:17 +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 D88966525B; Wed, 31 May 2017 06:00:16 +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 v4V60F0V052445; Wed, 31 May 2017 06:00:15 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V60EAj052436; Wed, 31 May 2017 06:00:14 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310600.v4V60EAj052436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 06:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319286 - stable/10/sys/libkern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 06:00:17 -0000 Author: delphij Date: Wed May 31 06:00:14 2017 New Revision: 319286 URL: https://svnweb.freebsd.org/changeset/base/319286 Log: MFC r311989 (cem): libkern: Remove obsolete 'register' keyword Modified: stable/10/sys/libkern/bcmp.c stable/10/sys/libkern/bsearch.c stable/10/sys/libkern/iconv_ucs.c stable/10/sys/libkern/iconv_xlat16.c stable/10/sys/libkern/qdivrem.c stable/10/sys/libkern/qsort.c stable/10/sys/libkern/random.c stable/10/sys/libkern/scanc.c stable/10/sys/libkern/strcmp.c stable/10/sys/libkern/strncpy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/libkern/bcmp.c ============================================================================== --- stable/10/sys/libkern/bcmp.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/bcmp.c Wed May 31 06:00:14 2017 (r319286) @@ -44,7 +44,7 @@ typedef const unsigned long *culp; int bcmp(b1, b2, length) const void *b1, *b2; - register size_t length; + size_t length; { #if BYTE_ORDER == LITTLE_ENDIAN /* Modified: stable/10/sys/libkern/bsearch.c ============================================================================== --- stable/10/sys/libkern/bsearch.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/bsearch.c Wed May 31 06:00:14 2017 (r319286) @@ -54,16 +54,16 @@ __FBSDID("$FreeBSD$"); */ void * bsearch(key, base0, nmemb, size, compar) - register const void *key; + const void *key; const void *base0; size_t nmemb; - register size_t size; - register int (*compar)(const void *, const void *); + size_t size; + int (*compar)(const void *, const void *); { - register const char *base = base0; - register size_t lim; - register int cmp; - register const void *p; + const char *base = base0; + size_t lim; + int cmp; + const void *p; for (lim = nmemb; lim != 0; lim >>= 1) { p = base + (lim >> 1) * size; Modified: stable/10/sys/libkern/iconv_ucs.c ============================================================================== --- stable/10/sys/libkern/iconv_ucs.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/iconv_ucs.c Wed May 31 06:00:14 2017 (r319286) @@ -523,14 +523,14 @@ ucs4_to_utf8(uint32_t ucs4, char *dst, size_t *utf8wid } static uint32_t -encode_surrogate(register uint32_t code) +encode_surrogate(uint32_t code) { return ((((code - 0x10000) << 6) & 0x3ff0000) | ((code - 0x10000) & 0x3ff) | 0xd800dc00); } static uint32_t -decode_surrogate(register const u_char *ucs) +decode_surrogate(const u_char *ucs) { return ((((ucs[0] & 0x3) << 18) | (ucs[1] << 10) | ((ucs[2] & 0x3) << 8) | ucs[3]) + 0x10000); Modified: stable/10/sys/libkern/iconv_xlat16.c ============================================================================== --- stable/10/sys/libkern/iconv_xlat16.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/iconv_xlat16.c Wed May 31 06:00:14 2017 (r319286) @@ -298,10 +298,10 @@ iconv_xlat16_name(struct iconv_converter_class *dcp) } static int -iconv_xlat16_tolower(void *d2p, register int c) +iconv_xlat16_tolower(void *d2p, int c) { struct iconv_xlat16 *dp = (struct iconv_xlat16*)d2p; - register int c1, c2, out; + int c1, c2, out; if (c < 0x100) { c1 = C2I1(c << 8); @@ -323,10 +323,10 @@ iconv_xlat16_tolower(void *d2p, register int c) } static int -iconv_xlat16_toupper(void *d2p, register int c) +iconv_xlat16_toupper(void *d2p, int c) { struct iconv_xlat16 *dp = (struct iconv_xlat16*)d2p; - register int c1, c2, out; + int c1, c2, out; if (c < 0x100) { c1 = C2I1(c << 8); Modified: stable/10/sys/libkern/qdivrem.c ============================================================================== --- stable/10/sys/libkern/qdivrem.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/qdivrem.c Wed May 31 06:00:14 2017 (r319286) @@ -59,9 +59,9 @@ typedef u_long digit; * We may assume len >= 0. NOTE THAT THIS WRITES len+1 DIGITS. */ static void -__shl(register digit *p, register int len, register int sh) +__shl(digit *p, int len, int sh) { - register int i; + int i; for (i = 0; i < len; i++) p[i] = LHALF(p[i] << sh) | (p[i + 1] >> (HALF_BITS - sh)); @@ -82,7 +82,7 @@ __qdivrem(uq, vq, arq) { union uu tmp; digit *u, *v, *q; - register digit v1, v2; + digit v1, v2; u_long qhat, rhat, t; int m, n, d, j, i; digit uspace[5], vspace[5], qspace[5]; @@ -192,7 +192,7 @@ __qdivrem(uq, vq, arq) v1 = v[1]; /* for D3 -- note that v[1..n] are constant */ v2 = v[2]; /* for D3 */ do { - register digit uj0, uj1, uj2; + digit uj0, uj1, uj2; /* * D3: Calculate qhat (\^q, in TeX notation). Modified: stable/10/sys/libkern/qsort.c ============================================================================== --- stable/10/sys/libkern/qsort.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/qsort.c Wed May 31 06:00:14 2017 (r319286) @@ -48,10 +48,10 @@ static __inline void swapfunc(char *, char *, int, in */ #define swapcode(TYPE, parmi, parmj, n) { \ long i = (n) / sizeof (TYPE); \ - register TYPE *pi = (TYPE *) (parmi); \ - register TYPE *pj = (TYPE *) (parmj); \ + TYPE *pi = (TYPE *) (parmi); \ + TYPE *pj = (TYPE *) (parmj); \ do { \ - register TYPE t = *pi; \ + TYPE t = *pi; \ *pi++ = *pj; \ *pj++ = t; \ } while (--i > 0); \ Modified: stable/10/sys/libkern/random.c ============================================================================== --- stable/10/sys/libkern/random.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/random.c Wed May 31 06:00:14 2017 (r319286) @@ -57,7 +57,7 @@ srandom(seed) u_long random() { - register long x, hi, lo, t; + long x, hi, lo, t; /* * Compute x[n + 1] = (7^5 * x[n]) mod (2^31 - 1). Modified: stable/10/sys/libkern/scanc.c ============================================================================== --- stable/10/sys/libkern/scanc.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/scanc.c Wed May 31 06:00:14 2017 (r319286) @@ -37,11 +37,11 @@ __FBSDID("$FreeBSD$"); int scanc(size, cp, table, mask0) u_int size; - register const u_char *cp, table[]; + const u_char *cp, table[]; int mask0; { - register const u_char *end; - register u_char mask; + const u_char *end; + u_char mask; mask = mask0; for (end = &cp[size]; cp < end; ++cp) { Modified: stable/10/sys/libkern/strcmp.c ============================================================================== --- stable/10/sys/libkern/strcmp.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/strcmp.c Wed May 31 06:00:14 2017 (r319286) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); */ int strcmp(s1, s2) - register const char *s1, *s2; + const char *s1, *s2; { while (*s1 == *s2++) if (*s1++ == 0) Modified: stable/10/sys/libkern/strncpy.c ============================================================================== --- stable/10/sys/libkern/strncpy.c Wed May 31 05:52:32 2017 (r319285) +++ stable/10/sys/libkern/strncpy.c Wed May 31 06:00:14 2017 (r319286) @@ -43,8 +43,8 @@ char * strncpy(char * __restrict dst, const char * __restrict src, size_t n) { if (n != 0) { - register char *d = dst; - register const char *s = src; + char *d = dst; + const char *s = src; do { if ((*d++ = *s++) == 0) { From owner-svn-src-all@freebsd.org Wed May 31 06:07:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8213BAF7A38; Wed, 31 May 2017 06:07:20 +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 475C7656FC; Wed, 31 May 2017 06:07:20 +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 v4V67JWm056430; Wed, 31 May 2017 06:07:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V67JBR056429; Wed, 31 May 2017 06:07:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310607.v4V67JBR056429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 06:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319287 - stable/11/lib/libz X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 06:07:20 -0000 Author: delphij Date: Wed May 31 06:07:19 2017 New Revision: 319287 URL: https://svnweb.freebsd.org/changeset/base/319287 Log: MFC r316649 (kan): Add missing double quote to fix r316635 commit. Modified: stable/11/lib/libz/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libz/Makefile ============================================================================== --- stable/11/lib/libz/Makefile Wed May 31 06:00:14 2017 (r319286) +++ stable/11/lib/libz/Makefile Wed May 31 06:07:19 2017 (r319287) @@ -40,7 +40,7 @@ SRCS+= uncompr.c SRCS+= zopen.c SRCS+= zutil.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64 +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" CFLAGS+= -DUNALIGNED_OK .endif From owner-svn-src-all@freebsd.org Wed May 31 06:08:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41AB2AF7ABE; Wed, 31 May 2017 06:08: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 0F62D6581D; Wed, 31 May 2017 06:08:11 +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 v4V68Bjg056512; Wed, 31 May 2017 06:08:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V68BRZ056511; Wed, 31 May 2017 06:08:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310608.v4V68BRZ056511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 06:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319288 - stable/10/lib/libz X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 06:08:12 -0000 Author: delphij Date: Wed May 31 06:08:11 2017 New Revision: 319288 URL: https://svnweb.freebsd.org/changeset/base/319288 Log: MFC r316649: Add missing double quote to fix r316635 commit. Modified: stable/10/lib/libz/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libz/Makefile ============================================================================== --- stable/10/lib/libz/Makefile Wed May 31 06:07:19 2017 (r319287) +++ stable/10/lib/libz/Makefile Wed May 31 06:08:11 2017 (r319288) @@ -39,7 +39,7 @@ SRCS+= uncompr.c SRCS+= zopen.c SRCS+= zutil.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64 +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" CFLAGS+= -DUNALIGNED_OK .endif From owner-svn-src-all@freebsd.org Wed May 31 06:13:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5AADAF7C98; Wed, 31 May 2017 06:13:34 +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 967C565BB6; Wed, 31 May 2017 06:13:34 +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 v4V6DXp0060387; Wed, 31 May 2017 06:13:33 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V6DXBq060386; Wed, 31 May 2017 06:13:33 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310613.v4V6DXBq060386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 06:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319289 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 06:13:34 -0000 Author: delphij Date: Wed May 31 06:13:33 2017 New Revision: 319289 URL: https://svnweb.freebsd.org/changeset/base/319289 Log: MFC r279663,r279666 (pfg): r279663: qsort(3): enhance to handle 32-bit aligned data on 64-bit systems Implement a small enhancement to the original qsort implementation: If the data is 32 bit aligned we can side-step the long type version and use int instead. The change brings a modest but significant improvement in 32 bit workloads. r279666: qsort(3): small style(9) cleanups. Basically spaces vs. tabs. No functional change. Modified: stable/10/lib/libc/stdlib/qsort.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/qsort.c ============================================================================== --- stable/10/lib/libc/stdlib/qsort.c Wed May 31 06:08:11 2017 (r319288) +++ stable/10/lib/libc/stdlib/qsort.c Wed May 31 06:13:33 2017 (r319289) @@ -41,47 +41,55 @@ typedef int cmp_t(void *, const void *, const void * typedef int cmp_t(const void *, const void *); #endif static inline char *med3(char *, char *, char *, cmp_t *, void *); -static inline void swapfunc(char *, char *, int, int); +static inline void swapfunc(char *, char *, int, int, int); -#define min(a, b) (a) < (b) ? a : b +#define MIN(a, b) ((a) < (b) ? a : b) /* * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". */ -#define swapcode(TYPE, parmi, parmj, n) { \ - long i = (n) / sizeof (TYPE); \ - TYPE *pi = (TYPE *) (parmi); \ - TYPE *pj = (TYPE *) (parmj); \ +#define swapcode(TYPE, parmi, parmj, n) { \ + long i = (n) / sizeof (TYPE); \ + TYPE *pi = (TYPE *) (parmi); \ + TYPE *pj = (TYPE *) (parmj); \ do { \ TYPE t = *pi; \ *pi++ = *pj; \ *pj++ = t; \ - } while (--i > 0); \ + } while (--i > 0); \ } -#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ - es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; +#define SWAPINIT(TYPE, a, es) swaptype_ ## TYPE = \ + ((char *)a - (char *)0) % sizeof(TYPE) || \ + es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; static inline void -swapfunc(a, b, n, swaptype) +swapfunc(a, b, n, swaptype_long, swaptype_int) char *a, *b; - int n, swaptype; + int n, swaptype_long, swaptype_int; { - if(swaptype <= 1) + if (swaptype_long <= 1) swapcode(long, a, b, n) + else if (swaptype_int <= 1) + swapcode(int, a, b, n) else swapcode(char, a, b, n) } -#define swap(a, b) \ - if (swaptype == 0) { \ +#define swap(a, b) \ + if (swaptype_long == 0) { \ long t = *(long *)(a); \ *(long *)(a) = *(long *)(b); \ *(long *)(b) = t; \ + } else if (swaptype_int == 0) { \ + int t = *(int *)(a); \ + *(int *)(a) = *(int *)(b); \ + *(int *)(b) = t; \ } else \ - swapfunc(a, b, es, swaptype) + swapfunc(a, b, es, swaptype_long, swaptype_int) -#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) +#define vecswap(a, b, n) \ + if ((n) > 0) swapfunc(a, b, n, swaptype_long, swaptype_int) #ifdef I_AM_QSORT_R #define CMP(t, x, y) (cmp((t), (x), (y))) @@ -98,14 +106,14 @@ __unused { return CMP(thunk, a, b) < 0 ? (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) - :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); + :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); } #ifdef I_AM_QSORT_R void qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp) #else -#define thunk NULL +#define thunk NULL void qsort(void *a, size_t n, size_t es, cmp_t *cmp) #endif @@ -113,9 +121,10 @@ qsort(void *a, size_t n, size_t es, cmp_t *cmp) char *pa, *pb, *pc, *pd, *pl, *pm, *pn; size_t d, r; int cmp_result; - int swaptype, swap_cnt; + int swaptype_long, swaptype_int, swap_cnt; -loop: SWAPINIT(a, es); +loop: SWAPINIT(long, a, es); + SWAPINIT(int, a, es); swap_cnt = 0; if (n < 7) { for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) @@ -175,9 +184,9 @@ loop: SWAPINIT(a, es); } pn = (char *)a + n * es; - r = min(pa - (char *)a, pb - pa); + r = MIN(pa - (char *)a, pb - pa); vecswap(a, pb - r, r); - r = min(pd - pc, pn - pd - es); + r = MIN(pd - pc, pn - pd - es); vecswap(pb, pn - r, r); if ((r = pb - pa) > es) #ifdef I_AM_QSORT_R From owner-svn-src-all@freebsd.org Wed May 31 06:19:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22533AF7D7F; Wed, 31 May 2017 06:19:14 +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 D9D9165D6E; Wed, 31 May 2017 06:19:13 +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 v4V6JDM3060646; Wed, 31 May 2017 06:19:13 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V6JDsP060645; Wed, 31 May 2017 06:19:13 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310619.v4V6JDsP060645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 06:19:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319290 - stable/10/lib/libc/stdlib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 06:19:14 -0000 Author: delphij Date: Wed May 31 06:19:12 2017 New Revision: 319290 URL: https://svnweb.freebsd.org/changeset/base/319290 Log: Partial MFC r288030 (rodrigc): Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. Modified: stable/10/lib/libc/stdlib/qsort.c Modified: stable/10/lib/libc/stdlib/qsort.c ============================================================================== --- stable/10/lib/libc/stdlib/qsort.c Wed May 31 06:13:33 2017 (r319289) +++ stable/10/lib/libc/stdlib/qsort.c Wed May 31 06:19:12 2017 (r319290) @@ -64,9 +64,7 @@ static inline void swapfunc(char *, char *, int, int, es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; static inline void -swapfunc(a, b, n, swaptype_long, swaptype_int) - char *a, *b; - int n, swaptype_long, swaptype_int; +swapfunc( char *a, char *b, int n, int swaptype_long, int swaptype_int) { if (swaptype_long <= 1) swapcode(long, a, b, n) From owner-svn-src-all@freebsd.org Wed May 31 06:26:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3F34AF8091; Wed, 31 May 2017 06:26:38 +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 D038566280; Wed, 31 May 2017 06:26:38 +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 v4V6Qcln064702; Wed, 31 May 2017 06:26:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V6Qbxn064699; Wed, 31 May 2017 06:26:37 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310626.v4V6Qbxn064699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 06:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319291 - in stable/10: kerberos5/lib/libroken lib/libc/stdlib sys/libkern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 06:26:39 -0000 Author: delphij Date: Wed May 31 06:26:37 2017 New Revision: 319291 URL: https://svnweb.freebsd.org/changeset/base/319291 Log: MFC r318514-r318515, r318517, r318917 r318514: Use size_t. Inspired by: OpenBSD src/lib/libc/stdlib/qsort.c,v 1.11 r318515: The current qsort(3) implementation ignores the sizes of partitions, and always perform recursion on the left partition, then use a tail call to handle the right partition. In the worst case this could require O(N) levels of recursions. Reduce the possible recursion level to log2(N) by always recursing on the smaller partition instead. Obtained from: PostgreSQL 9d6077abf9d6efd992a59f05ef5aba981ea32096 r318517: Sync qsort.c with userland r318515. (Note that MIN macro is removed in favor of sys/param.h's version). PR: 213922 r318917: Disconnect heimdal version of qsort.c from build because we are already using libc's version of qsort. PR: bin/213922 Modified: stable/10/kerberos5/lib/libroken/Makefile stable/10/lib/libc/stdlib/qsort.c stable/10/sys/libkern/qsort.c Directory Properties: stable/10/ (props changed) Modified: stable/10/kerberos5/lib/libroken/Makefile ============================================================================== --- stable/10/kerberos5/lib/libroken/Makefile Wed May 31 06:19:12 2017 (r319290) +++ stable/10/kerberos5/lib/libroken/Makefile Wed May 31 06:26:37 2017 (r319291) @@ -53,7 +53,6 @@ SRCS= base64.c \ parse_bytes.c \ parse_time.c \ parse_units.c \ - qsort.c \ rand.c \ realloc.c \ resolve.c \ Modified: stable/10/lib/libc/stdlib/qsort.c ============================================================================== --- stable/10/lib/libc/stdlib/qsort.c Wed May 31 06:19:12 2017 (r319290) +++ stable/10/lib/libc/stdlib/qsort.c Wed May 31 06:26:37 2017 (r319291) @@ -41,7 +41,7 @@ typedef int cmp_t(void *, const void *, const void * typedef int cmp_t(const void *, const void *); #endif static inline char *med3(char *, char *, char *, cmp_t *, void *); -static inline void swapfunc(char *, char *, int, int, int); +static inline void swapfunc(char *, char *, size_t, int, int); #define MIN(a, b) ((a) < (b) ? a : b) @@ -49,7 +49,7 @@ static inline void swapfunc(char *, char *, int, int, * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". */ #define swapcode(TYPE, parmi, parmj, n) { \ - long i = (n) / sizeof (TYPE); \ + size_t i = (n) / sizeof (TYPE); \ TYPE *pi = (TYPE *) (parmi); \ TYPE *pj = (TYPE *) (parmj); \ do { \ @@ -64,7 +64,7 @@ static inline void swapfunc(char *, char *, int, int, es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; static inline void -swapfunc( char *a, char *b, int n, int swaptype_long, int swaptype_int) +swapfunc(char *a, char *b, size_t n, int swaptype_long, int swaptype_int) { if (swaptype_long <= 1) swapcode(long, a, b, n) @@ -117,7 +117,7 @@ qsort(void *a, size_t n, size_t es, cmp_t *cmp) #endif { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; - size_t d, r; + size_t d1, d2; int cmp_result; int swaptype_long, swaptype_int, swap_cnt; @@ -137,7 +137,8 @@ loop: SWAPINIT(long, a, es); pl = a; pn = (char *)a + (n - 1) * es; if (n > 40) { - d = (n / 8) * es; + size_t d = (n / 8) * es; + pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); pm = med3(pm - d, pm, pm + d, cmp, thunk); pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); @@ -182,21 +183,43 @@ loop: SWAPINIT(long, a, es); } pn = (char *)a + n * es; - r = MIN(pa - (char *)a, pb - pa); - vecswap(a, pb - r, r); - r = MIN(pd - pc, pn - pd - es); - vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) + d1 = MIN(pa - (char *)a, pb - pa); + vecswap(a, pb - d1, d1); + d1 = MIN(pd - pc, pn - pd - es); + vecswap(pb, pn - d1, d1); + + d1 = pb - pa; + d2 = pd - pc; + if (d1 <= d2) { + /* Recurse on left partition, then iterate on right partition */ + if (d1 > es) { #ifdef I_AM_QSORT_R - qsort_r(a, r / es, es, thunk, cmp); + qsort_r(a, d1 / es, es, thunk, cmp); #else - qsort(a, r / es, es, cmp); + qsort(a, d1 / es, es, cmp); #endif - if ((r = pd - pc) > es) { - /* Iterate rather than recurse to save stack space */ - a = pn - r; - n = r / es; - goto loop; + } + if (d2 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(pn - d2, d2 / es, es, cmp); */ + a = pn - d2; + n = d2 / es; + goto loop; + } + } else { + /* Recurse on right partition, then iterate on left partition */ + if (d2 > es) { +#ifdef I_AM_QSORT_R + qsort_r(pn - d2, d2 / es, es, thunk, cmp); +#else + qsort(pn - d2, d2 / es, es, cmp); +#endif + } + if (d1 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(a, d1 / es, es, cmp); */ + n = d1 / es; + goto loop; + } } -/* qsort(pn - r, r / es, es, cmp);*/ } Modified: stable/10/sys/libkern/qsort.c ============================================================================== --- stable/10/sys/libkern/qsort.c Wed May 31 06:19:12 2017 (r319290) +++ stable/10/sys/libkern/qsort.c Wed May 31 06:26:37 2017 (r319291) @@ -33,51 +33,57 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef I_AM_QSORT_R -typedef int cmp_t(void *, const void *, const void *); +#ifdef I_AM_QSORT_R +typedef int cmp_t(void *, const void *, const void *); #else -typedef int cmp_t(const void *, const void *); +typedef int cmp_t(const void *, const void *); #endif -static __inline char *med3(char *, char *, char *, cmp_t *, void *); -static __inline void swapfunc(char *, char *, int, int); +static inline char *med3(char *, char *, char *, cmp_t *, void *); +static inline void swapfunc(char *, char *, size_t, int, int); -#define min(a, b) (a) < (b) ? (a) : (b) - /* * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". */ -#define swapcode(TYPE, parmi, parmj, n) { \ - long i = (n) / sizeof (TYPE); \ - TYPE *pi = (TYPE *) (parmi); \ - TYPE *pj = (TYPE *) (parmj); \ +#define swapcode(TYPE, parmi, parmj, n) { \ + size_t i = (n) / sizeof (TYPE); \ + TYPE *pi = (TYPE *) (parmi); \ + TYPE *pj = (TYPE *) (parmj); \ do { \ - TYPE t = *pi; \ + TYPE t = *pi; \ *pi++ = *pj; \ *pj++ = t; \ - } while (--i > 0); \ + } while (--i > 0); \ } -#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ - es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; +#define SWAPINIT(TYPE, a, es) swaptype_ ## TYPE = \ + ((char *)a - (char *)0) % sizeof(TYPE) || \ + es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; -static __inline void -swapfunc(char *a, char *b, int n, int swaptype) +static inline void +swapfunc(char *a, char *b, size_t n, int swaptype_long, int swaptype_int) { - if(swaptype <= 1) + if (swaptype_long <= 1) swapcode(long, a, b, n) + else if (swaptype_int <= 1) + swapcode(int, a, b, n) else swapcode(char, a, b, n) } -#define swap(a, b) \ - if (swaptype == 0) { \ +#define swap(a, b) \ + if (swaptype_long == 0) { \ long t = *(long *)(a); \ *(long *)(a) = *(long *)(b); \ *(long *)(b) = t; \ + } else if (swaptype_int == 0) { \ + int t = *(int *)(a); \ + *(int *)(a) = *(int *)(b); \ + *(int *)(b) = t; \ } else \ - swapfunc(a, b, es, swaptype) + swapfunc(a, b, es, swaptype_long, swaptype_int) -#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) +#define vecswap(a, b, n) \ + if ((n) > 0) swapfunc(a, b, n, swaptype_long, swaptype_int) #ifdef I_AM_QSORT_R #define CMP(t, x, y) (cmp((t), (x), (y))) @@ -85,16 +91,16 @@ swapfunc(char *a, char *b, int n, int swaptype) #define CMP(t, x, y) (cmp((x), (y))) #endif -static __inline char * +static inline char * med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk -#ifndef I_AM_QSORT_R +#ifndef I_AM_QSORT_R __unused #endif ) { return CMP(thunk, a, b) < 0 ? (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) - :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); + :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); } #ifdef I_AM_QSORT_R @@ -107,13 +113,17 @@ qsort(void *a, size_t n, size_t es, cmp_t *cmp) #endif { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; - int d, r, swaptype, swap_cnt; + size_t d1, d2; + int cmp_result; + int swaptype_long, swaptype_int, swap_cnt; -loop: SWAPINIT(a, es); +loop: SWAPINIT(long, a, es); + SWAPINIT(int, a, es); swap_cnt = 0; if (n < 7) { for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swap(pl, pl - es); return; @@ -123,7 +133,8 @@ loop: SWAPINIT(a, es); pl = a; pn = (char *)a + (n - 1) * es; if (n > 40) { - d = (n / 8) * es; + size_t d = (n / 8) * es; + pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); pm = med3(pm - d, pm, pm + d, cmp, thunk); pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); @@ -135,16 +146,16 @@ loop: SWAPINIT(a, es); pc = pd = (char *)a + (n - 1) * es; for (;;) { - while (pb <= pc && (r = CMP(thunk, pb, a)) <= 0) { - if (r == 0) { + while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { + if (cmp_result == 0) { swap_cnt = 1; swap(pa, pb); pa += es; } pb += es; } - while (pb <= pc && (r = CMP(thunk, pc, a)) >= 0) { - if (r == 0) { + while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { + if (cmp_result == 0) { swap_cnt = 1; swap(pc, pd); pd -= es; @@ -160,27 +171,51 @@ loop: SWAPINIT(a, es); } if (swap_cnt == 0) { /* Switch to insertion sort */ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swap(pl, pl - es); return; } pn = (char *)a + n * es; - r = min(pa - (char *)a, pb - pa); - vecswap(a, pb - r, r); - r = min(pd - pc, pn - pd - es); - vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) -#ifdef I_AM_QSORT_R - qsort_r(a, r / es, es, thunk, cmp); + d1 = MIN(pa - (char *)a, pb - pa); + vecswap(a, pb - d1, d1); + d1 = MIN(pd - pc, pn - pd - es); + vecswap(pb, pn - d1, d1); + + d1 = pb - pa; + d2 = pd - pc; + if (d1 <= d2) { + /* Recurse on left partition, then iterate on right partition */ + if (d1 > es) { +#ifdef I_AM_QSORT_R + qsort_r(a, d1 / es, es, thunk, cmp); #else - qsort(a, r / es, es, cmp); + qsort(a, d1 / es, es, cmp); #endif - if ((r = pd - pc) > es) { - /* Iterate rather than recurse to save stack space */ - a = pn - r; - n = r / es; - goto loop; + } + if (d2 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(pn - d2, d2 / es, es, cmp); */ + a = pn - d2; + n = d2 / es; + goto loop; + } + } else { + /* Recurse on right partition, then iterate on left partition */ + if (d2 > es) { +#ifdef I_AM_QSORT_R + qsort_r(pn - d2, d2 / es, es, thunk, cmp); +#else + qsort(pn - d2, d2 / es, es, cmp); +#endif + } + if (d1 > es) { + /* Iterate rather than recurse to save stack space */ + /* qsort(a, d1 / es, es, cmp); */ + n = d1 / es; + goto loop; + } } } From owner-svn-src-all@freebsd.org Wed May 31 06:47:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13124AF8616; Wed, 31 May 2017 06:47:58 +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 E1C8D66AC7; Wed, 31 May 2017 06:47: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 v4V6lv3T072940; Wed, 31 May 2017 06:47:57 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V6lu4R072931; Wed, 31 May 2017 06:47:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310647.v4V6lu4R072931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 06:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319292 - in stable/11: include lib/libc/string X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 06:47:58 -0000 Author: delphij Date: Wed May 31 06:47:56 2017 New Revision: 319292 URL: https://svnweb.freebsd.org/changeset/base/319292 Log: MFC r304106: Add timingsafe_bcmp and timingsafe_memcmp. Obtained from: OpenBSD Reviewed by: trasz Added: stable/11/lib/libc/string/timingsafe_bcmp.3 - copied unchanged from r304106, head/lib/libc/string/timingsafe_bcmp.3 stable/11/lib/libc/string/timingsafe_bcmp.c - copied unchanged from r304106, head/lib/libc/string/timingsafe_bcmp.c stable/11/lib/libc/string/timingsafe_memcmp.c - copied unchanged from r304106, head/lib/libc/string/timingsafe_memcmp.c Modified: stable/11/include/string.h stable/11/lib/libc/string/Makefile.inc stable/11/lib/libc/string/Symbol.map stable/11/lib/libc/string/bcmp.3 stable/11/lib/libc/string/memcmp.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/include/string.h ============================================================================== --- stable/11/include/string.h Wed May 31 06:26:37 2017 (r319291) +++ stable/11/include/string.h Wed May 31 06:47:56 2017 (r319292) @@ -134,6 +134,8 @@ typedef __ssize_t ssize_t; void swab(const void * __restrict, void * __restrict, ssize_t); #endif /* _SWAB_DECLARED */ +int timingsafe_bcmp(const void *, const void *, size_t); +int timingsafe_memcmp(const void *, const void *, size_t); #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) Modified: stable/11/lib/libc/string/Makefile.inc ============================================================================== --- stable/11/lib/libc/string/Makefile.inc Wed May 31 06:26:37 2017 (r319291) +++ stable/11/lib/libc/string/Makefile.inc Wed May 31 06:47:56 2017 (r319292) @@ -16,7 +16,10 @@ MISRCS+=bcmp.c bcopy.c bzero.c explicit_bzero.c \ strcspn.c strdup.c strerror.c strlcat.c strlcpy.c strlen.c strmode.c \ strncat.c strncmp.c strncpy.c strndup.c strnlen.c strnstr.c \ strpbrk.c strrchr.c strsep.c strsignal.c strspn.c strstr.c strtok.c \ - strxfrm.c swab.c wcpcpy.c wcpncpy.c wcscasecmp.c wcscat.c \ + strxfrm.c swab.c \ + timingsafe_bcmp.c \ + timingsafe_memcmp.c \ + wcpcpy.c wcpncpy.c wcscasecmp.c wcscat.c \ wcschr.c wcscmp.c wcscoll.c wcscpy.c wcscspn.c wcsdup.c \ wcslcat.c wcslcpy.c wcslen.c wcsncasecmp.c wcsncat.c wcsncmp.c \ wcsncpy.c wcsnlen.c wcspbrk.c \ @@ -34,7 +37,9 @@ MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 m memcmp.3 memcpy.3 memmem.3 memmove.3 memset.3 strcasecmp.3 strcat.3 \ strchr.3 strcmp.3 strcoll.3 strcpy.3 strdup.3 strerror.3 \ string.3 strlcpy.3 strlen.3 strmode.3 strpbrk.3 strsep.3 \ - strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 wcscoll.3 wcstok.3 \ + strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 \ + timingsafe_bcmp.3 \ + wcscoll.3 wcstok.3 \ wcswidth.3 wcsxfrm.3 wmemchr.3 MLINKS+=bzero.3 explicit_bzero.3 @@ -69,6 +74,7 @@ MLINKS+=strstr.3 strcasestr.3 \ strstr.3 strcasestr_l.3 MLINKS+=strtok.3 strtok_r.3 MLINKS+=strxfrm.3 strxfrm_l.3 +MLINKS+=timingsafe_bcmp.3 timingsafe_memcmp.3 MLINKS+=wmemchr.3 wcpcpy.3 \ wmemchr.3 wcpncpy.3 \ wmemchr.3 wcscasecmp.3 \ Modified: stable/11/lib/libc/string/Symbol.map ============================================================================== --- stable/11/lib/libc/string/Symbol.map Wed May 31 06:26:37 2017 (r319291) +++ stable/11/lib/libc/string/Symbol.map Wed May 31 06:47:56 2017 (r319292) @@ -106,6 +106,8 @@ FBSD_1.4 { FBSD_1.5 { memset_s; + timingsafe_bcmp; + timingsafe_memcmp; }; FBSDprivate_1.0 { Modified: stable/11/lib/libc/string/bcmp.3 ============================================================================== --- stable/11/lib/libc/string/bcmp.3 Wed May 31 06:26:37 2017 (r319291) +++ stable/11/lib/libc/string/bcmp.3 Wed May 31 06:47:56 2017 (r319292) @@ -30,7 +30,7 @@ .\" @(#)bcmp.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd August 15, 2016 .Dt BCMP 3 .Os .Sh NAME @@ -62,7 +62,8 @@ The strings may overlap. .Xr strcasecmp 3 , .Xr strcmp 3 , .Xr strcoll 3 , -.Xr strxfrm 3 +.Xr strxfrm 3 , +.Xr timingsafe_bcmp 3 .Sh HISTORY A .Fn bcmp Modified: stable/11/lib/libc/string/memcmp.3 ============================================================================== --- stable/11/lib/libc/string/memcmp.3 Wed May 31 06:26:37 2017 (r319291) +++ stable/11/lib/libc/string/memcmp.3 Wed May 31 06:47:56 2017 (r319292) @@ -32,7 +32,7 @@ .\" @(#)memcmp.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd August 15, 2016 .Dt MEMCMP 3 .Os .Sh NAME @@ -75,6 +75,7 @@ Zero-length strings are always identical. .Xr strcmp 3 , .Xr strcoll 3 , .Xr strxfrm 3 , +.Xr timingsafe_memcmp 3 , .Xr wmemcmp 3 .Sh STANDARDS The Copied: stable/11/lib/libc/string/timingsafe_bcmp.3 (from r304106, head/lib/libc/string/timingsafe_bcmp.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libc/string/timingsafe_bcmp.3 Wed May 31 06:47:56 2017 (r319292, copy of r304106, head/lib/libc/string/timingsafe_bcmp.3) @@ -0,0 +1,92 @@ +.\" $OpenBSD: timingsafe_bcmp.3,v 1.2 2014/06/21 20:22:15 tedu Exp $ +.\" +.\" Copyright (c) 2014 Google Inc. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" 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$ +.Dd August 15, 2016 +.Dt TIMINGSAFE_BCMP 3 +.Os +.Sh NAME +.Nm timingsafe_bcmp , +.Nm timingsafe_memcmp +.Nd timing-safe byte sequence comparisons +.Sh SYNOPSIS +.In string.h +.Ft int +.Fn timingsafe_bcmp "const void *b1" "const void *b2" "size_t len" +.Ft int +.Fn timingsafe_memcmp "const void *b1" "const void *b2" "size_t len" +.Sh DESCRIPTION +The +.Fn timingsafe_bcmp +and +.Fn timingsafe_memcmp +functions lexicographically compare the first +.Fa len +bytes (each interpreted as an +.Vt unsigned char ) +pointed to by +.Fa b1 +and +.Fa b2 . +.Pp +Additionally, their running times are independent of the byte sequences compared, +making them safe to use for comparing secret values such as cryptographic MACs. +In contrast, +.Xr bcmp 3 +and +.Xr memcmp 3 +may short-circuit after finding the first differing byte. +.Sh RETURN VALUES +The +.Fn timingsafe_bcmp +function returns 0 or not zero if the byte sequence pointed to by +.Fa b1 +compares equal to or not equal to (respectively) +the byte sequence pointed to by +.Fa b2 . +.Pp +The +.Fn timingsafe_memcmp +function returns a negative value, 0, or positive value if the byte sequence +pointed to by +.Fa b1 +compares less than, equal to, or greater than (respectively) +the byte sequence pointed to by +.Fa b2 . +.Sh SEE ALSO +.Xr bcmp 3 , +.Xr memcmp 3 +.Sh STANDARDS +The +.Fn timingsafe_bcmp +and +.Fn timingsafe_memcmp +functions are +.Fx +extensions. +.Sh HISTORY +The +.Fn timingsafe_bcmp +function first appeared in +.Ox 4.9 . +.Pp +The +.Fn timingsafe_memcmp +function first appeared in +.Ox 5.6 . +.Pp +Both functions first appeared in +.Fx 12.0 . Copied: stable/11/lib/libc/string/timingsafe_bcmp.c (from r304106, head/lib/libc/string/timingsafe_bcmp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libc/string/timingsafe_bcmp.c Wed May 31 06:47:56 2017 (r319292, copy of r304106, head/lib/libc/string/timingsafe_bcmp.c) @@ -0,0 +1,36 @@ +/* $OpenBSD: timingsafe_bcmp.c,v 1.3 2015/08/31 02:53:57 guenther Exp $ */ +/* + * Copyright (c) 2010 Damien Miller. All rights reserved. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +int __timingsafe_bcmp(const void *, const void *, size_t); + +int +__timingsafe_bcmp(const void *b1, const void *b2, size_t n) +{ + const unsigned char *p1 = b1, *p2 = b2; + int ret = 0; + + for (; n > 0; n--) + ret |= *p1++ ^ *p2++; + return (ret != 0); +} + +__weak_reference(__timingsafe_bcmp, timingsafe_bcmp); Copied: stable/11/lib/libc/string/timingsafe_memcmp.c (from r304106, head/lib/libc/string/timingsafe_memcmp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libc/string/timingsafe_memcmp.c Wed May 31 06:47:56 2017 (r319292, copy of r304106, head/lib/libc/string/timingsafe_memcmp.c) @@ -0,0 +1,53 @@ +/* $OpenBSD: timingsafe_memcmp.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */ +/* + * Copyright (c) 2014 Google Inc. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +int __timingsafe_memcmp(const void *, const void *, size_t); + +int +__timingsafe_memcmp(const void *b1, const void *b2, size_t len) +{ + const unsigned char *p1 = b1, *p2 = b2; + size_t i; + int res = 0, done = 0; + + for (i = 0; i < len; i++) { + /* lt is -1 if p1[i] < p2[i]; else 0. */ + int lt = (p1[i] - p2[i]) >> CHAR_BIT; + + /* gt is -1 if p1[i] > p2[i]; else 0. */ + int gt = (p2[i] - p1[i]) >> CHAR_BIT; + + /* cmp is 1 if p1[i] > p2[i]; -1 if p1[i] < p2[i]; else 0. */ + int cmp = lt - gt; + + /* set res = cmp if !done. */ + res |= cmp & ~done; + + /* set done if p1[i] != p2[i]. */ + done |= lt | gt; + } + + return (res); +} + +__weak_reference(__timingsafe_memcmp, timingsafe_memcmp); From owner-svn-src-all@freebsd.org Wed May 31 07:20:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25915AF8BF4; Wed, 31 May 2017 07:20:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::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 DCD0367A1D; Wed, 31 May 2017 07:20:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x241.google.com with SMTP id d68so1090439ita.1; Wed, 31 May 2017 00:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=xdJr061rrxuzE41mxNfLvNN4flkzE6R5j8NZpk2Fe38=; b=O1sK5qClmNilXtos4orgqRqEvtFjrAx3LAH8FfL78ouy+qxP7HUvOVY9IdLOswdqjH 1Y3koYGuwqPjo8incOxM9ANMyeVWCQ5jdjfdTV/93Ax8D6ZvR6MKNjrx++XvzFqPMXxY qW1CdAiLKv99nV7n7ctsMjMknKHUTtK7A1+sd7WetkLOlrOGxiEOB0ZCB/IMWBPji98x IU0AUng/TQExCTDWiM+IGdmBdHbqI2sSnPbSMXnVr7vJY60fb2BpjK+bGtVS4FVYdNVL lIhzxRZPDzcJR30Gopg6M4tr9OovRmERblNyf2eTuAPYBt/RCEjtMNwWrgNG2Yzle51Z wWuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=xdJr061rrxuzE41mxNfLvNN4flkzE6R5j8NZpk2Fe38=; b=VCI18hBIZzzGwXMo1FoFLjFpGHcE2OMpXcc7cIou3jd1XVtFYhUevzqk85pL06dtDh QmdN5ueCy2MMXDCfyizPrDxSEBHqsMXU+vmCaYEOAEmMOOQ0RiTXuCbD9fKe73Vk74vc nMApnooAxVNm4lQOh1JiTRfVbp0vg9px1sBV8mC0bc+iGxrVOSUBjdbr9mjp4K2xxN5j Ti4N1xemIQdQCNF+7vPuydsSr7yR10YsEvlfTwuDVJCLLtRJ1o5ha+oHo1PyHm3Vssl9 vZ3nZ8weXnuRE/W/RcHYEVWHkcC8+z87Fc/nbQSpvD3ZN6r4qmTW3QWg+XcTwS1xt2Kk uIKw== X-Gm-Message-State: AODbwcCCYidgigCRbAjRls2EsoChr2n6EFFz3gwGPGzguIsbdhSa4e0B lzQCkUZn+0/ActO72SE= X-Received: by 10.36.98.195 with SMTP id d186mr5369107itc.99.1496215248157; Wed, 31 May 2017 00:20:48 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y79sm6684785iod.13.2017.05.31.00.20.47 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 May 2017 00:20:47 -0700 (PDT) Subject: Re: svn commit: r319125 - head/usr.bin/mkimg Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3573CF6B-9741-42A4-80CA-343DE6225B68"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201705291251.v4TCp24h090283@repo.freebsd.org> Date: Wed, 31 May 2017 00:20:45 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201705291251.v4TCp24h090283@repo.freebsd.org> To: Emmanuel Vadot X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 07:20:49 -0000 --Apple-Mail=_3573CF6B-9741-42A4-80CA-343DE6225B68 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On May 29, 2017, at 05:51, Emmanuel Vadot wrote: >=20 > Author: manu > Date: Mon May 29 12:51:02 2017 > New Revision: 319125 > URL: https://svnweb.freebsd.org/changeset/base/319125 >=20 > Log: > mkimg: Correct an off by one error in the PMBR size >=20 > The PMBR last sector should be number of sector - 1 (As stated in = UEFI Spec > 2.6 page 118 table 17). > This fixes warning printed by linux tools like parted or fdisk. This commit broke all of the mkimg gpt tests. For example: = https://ci.freebsd.org/job/FreeBSD-head-amd64-test/3280/testReport/junit/u= sr.bin.mkimg/mkimg_test/gpt_1x1_4096_qcow/ . -Ngie --Apple-Mail=_3573CF6B-9741-42A4-80CA-343DE6225B68 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZLm7NAAoJEPWDqSZpMIYV57AP/3IK/qsZN+psDg46mHCo2Jq7 C/SAt7qamAtD2xBJCMt/L48yn9/mgnKIv9nrCp77vpjtQw8qkXHwMbv6d9nzELlo OgoPxR6XObtUC8t9bY8J8aqPxfswR6nEaEE0kIwqGllb6uewF1Vy1aE/KuWZsZrs o0waHvumleJc70Xl21FkWrbE4rszjENzkfePYgwCNU3uBmODnoWeTyHot7qu/D7x KkAGDHWu5+S2h0Pgrv8ixerOQna8HdWw/7Yn73RpF+q+IEe/2L71rO0skjCAh3en r1XkdQcj8vbcTlSyigVyEj3nymFItXYX9gx1FyLLz4sUWokBt/RSYjNkXN7FOzEA Z/W3rkK3GxR7eVG1FB94rGppLkMj+8cORXMrNrziiP2wUbQnfw16G4sDwZTcpBEs l+dyRzjxwx1B48cjZhGXFad1t8AU1m1ORZbZ7dvsAoN+yHlIVH3UDQd9sF6u5nmy F9whfQvbHchmFU2uqhBrBzLPYo2IHb37vGGvMO+01idyr/gwDfyWj/7amMGwWAMR pCN3II4CwumVGWH4FLNp1N0SRkmC1A3TtN/Kz0KzjVl1wIFyWbkD+RTdDeb3eRXK OY9M8OxJBzwTmhMWpiU1vZAjkcOfiHj1eNuoKQRK/3aBAgmGi3qqlBO/6EkbmjOa Fy4Gh1ur8Th0+VQ0N++2 =nFCT -----END PGP SIGNATURE----- --Apple-Mail=_3573CF6B-9741-42A4-80CA-343DE6225B68-- From owner-svn-src-all@freebsd.org Wed May 31 07:42:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF5B2AF925F; Wed, 31 May 2017 07:42:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAFE9687D2; Wed, 31 May 2017 07:42:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V7gE0e097189; Wed, 31 May 2017 07:42:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V7gEgP097188; Wed, 31 May 2017 07:42:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310742.v4V7gEgP097188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 07:42:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319293 - head/usr.bin/mkimg/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 07:42:16 -0000 Author: ngie Date: Wed May 31 07:42:14 2017 New Revision: 319293 URL: https://svnweb.freebsd.org/changeset/base/319293 Log: Formalize the dependent/dependency relationship for .gz.uu vs This helps ensure that the output files are regenerated if the input files change, after the output files have been created. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/usr.bin/mkimg/tests/Makefile Modified: head/usr.bin/mkimg/tests/Makefile ============================================================================== --- head/usr.bin/mkimg/tests/Makefile Wed May 31 06:47:56 2017 (r319292) +++ head/usr.bin/mkimg/tests/Makefile Wed May 31 07:42:14 2017 (r319293) @@ -1,5 +1,7 @@ # $FreeBSD$ +.PATH: ${.CURDIR} + PACKAGE= tests ATF_TESTS_SH= mkimg_test @@ -7,8 +9,10 @@ ATF_TESTS_SH= mkimg_test SOURCES!= cd ${.CURDIR}; echo *.uu ${PACKAGE}FILES+= ${SOURCES:S,.gz.uu,,g} -${${PACKAGE}FILES}: - uudecode -p ${.CURDIR}/${.TARGET}.gz.uu | gunzip -c > ${.TARGET} +.for f in ${${PACKAGE}FILES} +$f: $f.gz.uu + uudecode -p ${.ALLSRC} | gunzip -c > ${.TARGET} +.endfor CLEANFILES+= ${${PACKAGE}FILES}} From owner-svn-src-all@freebsd.org Wed May 31 07:49:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CCC3AF939D; Wed, 31 May 2017 07:49:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5785E68B00; Wed, 31 May 2017 07:49:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V7nnol097624; Wed, 31 May 2017 07:49:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V7nnbM097623; Wed, 31 May 2017 07:49:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310749.v4V7nnbM097623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 07:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319294 - head/usr.bin/mkimg/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 07:49:50 -0000 Author: ngie Date: Wed May 31 07:49:49 2017 New Revision: 319294 URL: https://svnweb.freebsd.org/changeset/base/319294 Log: Fix "make rebase" after ^/head@r315776 "make rebase" can be used for rebasing the output files from mkimg after making a change to mkimg. This will come in handy soon, per bug 219673. MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/usr.bin/mkimg/tests/Makefile Modified: head/usr.bin/mkimg/tests/Makefile ============================================================================== --- head/usr.bin/mkimg/tests/Makefile Wed May 31 07:42:14 2017 (r319293) +++ head/usr.bin/mkimg/tests/Makefile Wed May 31 07:49:49 2017 (r319294) @@ -4,7 +4,8 @@ PACKAGE= tests -ATF_TESTS_SH= mkimg_test +_REBASE_SCRIPT= mkimg_test +ATF_TESTS_SH= ${_REBASE_SCRIPT} SOURCES!= cd ${.CURDIR}; echo *.uu ${PACKAGE}FILES+= ${SOURCES:S,.gz.uu,,g} @@ -16,7 +17,7 @@ $f: $f.gz.uu CLEANFILES+= ${${PACKAGE}FILES}} -rebase: - (cd ${.CURDIR}; atf-sh mkimg.sh rebase) +rebase: .PHONY + (cd ${.CURDIR}; atf-sh ${_REBASE_SCRIPT}.sh rebase) .include From owner-svn-src-all@freebsd.org Wed May 31 08:01:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26E66AF995D; Wed, 31 May 2017 08:01:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A25376A095; Wed, 31 May 2017 08:01:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V81D0j004046; Wed, 31 May 2017 08:01:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V81CjO004032; Wed, 31 May 2017 08:01:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310801.v4V81CjO004032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319295 - head/usr.bin/mkimg/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:01:17 -0000 Author: ngie Date: Wed May 31 08:01:12 2017 New Revision: 319295 URL: https://svnweb.freebsd.org/changeset/base/319295 Log: Update the usr.bin/mkimg golden test output files after ^/head@r319125 ^/head@r319125 changed the location of the backup pmbr, requiring the output files to be regenerated, since they're binary disk dumps. The output files were regenerated with "make rebase"--fixed in ^/head@r319294. MFC with: r319125, r319294 PR: 219673 Sponsored by: Dell EMC Isilon Modified: head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.gz.uu Modified: head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uu Wed May 31 07:49:49 2017 (r319294) +++ head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uu Wed May 31 08:01:12 2017 (r319295) @@ -1,132 +1,132 @@ # $FreeBSD$ begin 644 img-1x1-4096-gpt.qcow.gz -M'XL("*XS(E0``VEM9RTQ>#$M-#`Y-BUG<'0N<6-O=RYO=70`K9W;;AS7M47? -M_16ENT1)5*^UJJJK=$^`!,B;$YSS=@Z0NCX&G7=]?-CDOI"KY]2*(=J$(4.H -MB>ZMP4'9'MX\'.[^:)I.FK9OVK'9Y^;F[].'-/?^YN%'\^/O?_W;]?T_?OQV -M-R:'GSSE_K[51M/<@ZT_-V5.ST\MS6'\+^9N/@3-W7MU]@=>W;TW>SEW]=O= -MF\7/*1NT!X--FCNDUR?D]-K_[O5]=V]7[D[O\=ZNDK?;L<'^P>#O:>Z?Z?4I -M>;M'-C<\F#NYMZOD[8YL;OHI+$I@F=G<$LRU\*F5S6W!7`>?VO&<_.37]FZN -MAT\)FX.?M]=-F3O"IXS-M0_F#M<9Z#PWP*<(=Q)R-\*G"'<2,.PNY0[XSQIV%W"'?&>/.0NZ0[XQQ9R%WR'?&N+.0.^0[8]RU -M(7?(=RWCK@VY0[YK&7=MQ)WBIPAW;<2=(M^UC+LVXDZ1[UK&71MQI\AW+>.N -MC;A3Y+N6<==&W"GR7*?-XZT/ND.]ZQET?.NC[@SY+N> -M<7>,N#/DNR/C[AAQ9\AW1\;=,>0.^>[(N#N&W"'?'1EWQY`[Y+LCX^X8ZFB+L.^6YB -MW$T1=QWRW<2XFR+N.N2[B7$W1=QUR'<3XR[_9T@^AWPW,^[FB+L.^6YFW,TA -M=\AW,^-N#KE#OIL9=W/('?+=S+B;0^Z0[V;&W1QRAWPW,^[FD#ODNYEQMX3< -M(=\MC+LEY`[Y;F'<+1%W/7Z*<+=$W/7(=POC;HFXZY'O%L;=$G'7(]\MC+LE -MXJY'OEL8=TO$78]\MS#NUHB['OEN9=RM$7<]\MW*N%M#[I#O5L;=&G*'?+\VQMT6<7=$ -MOML8=WO$W1'Y;F?<[1%W1^2[G7&WA]PAW^V,NSWD#OEN9]SM(7?(=SOC;@^Y -M0[[;&7=[R!WRWLOY.POQN`[X3U=Q+V=P/PG;#^3L+^;@"^$];?2=C?#OO).SO1N0[UM])V-^-R'>LOY.POQN1[UA_)V%_-R+?L?Y.POYN -M1+YC_9V$_=V(?,?Z.PG[NQ'YCO5W$O9W(_(=Z^\D[.]&Y#O6WTG8WXW(=ZR_ -MD["_&Y'O6'\G87\W(M^Q_D["_FY$OF/]G83]W8A\Q_H["?N["3]%N`O[NPGY -MCO5W$O9W$_(=Z^\D[.\FY#O6WTG8WTW(=ZR_D["_FY#O6'\G87\W(=^Q_D[" -M_FY"OF/]G83]W81\Q_H["?N["?F.]7<2]G<3\AWK[R3L[R;D.];?2=C?3]8?R=A?SOO).SO9N0[UM])V-_- -MR'>LOY.POYN1[UA_)V%_-R/?L?Y.POYNP4\1[L+^;D&^8_V=A/W=@GS'^CL) -M^[L%^8[U=Q+V=POR'>OO).SO%N0[UM])V-\MR'>LOY.POUN0[UA_)V%_MR#? -ML?Y.POYN0;YC_9V$_=V"?,?Z.PG[NP7YCO5W$O9W"_(=Z^\D[.\6Y#O6WTG8 -MWRW(=ZR_D["_6Y#O6'\G87^WXJ<(=V%_MR+?L?Y.POYN1;YC_9V$_=V*?,?Z -M.PG[NQ7YCO5W$O9W*_(=Z^\D[.]6Y#O6WTG8WZW(=ZR_D["_6Y'O6'\G87^W -M(M^Q_D["_FY%OF/]G83]W8I\Q_H["?N[%?F.]7<2]GOO).SO-N0[ -MUM])V-_M^"G"7=C?[]8?R=A?[^8_V=A/W= -MCGS'^CL)^[L=^8[U=Q+V=SOR'>OO).SO=N0[UM])V-_MR'>LOY.PO]N1[UA_ -M)V%_MR/?L?Y.POYN1[YC_9V$_=V.?,?Z.\T_<'--G0.^NWD*NO\OWZ365 -M.^`[9?V=NOZN2=PUF3L[X*OOU/5WSLOU/7 -MWSW)).Z>5.Z`[Y3U=^KZNR>)NR>5.^`[9?V=NO[NR>GB -M[(#OE/5WZOJ[OO\MS3.H=\ -MQ_H[=?W=TSQ7N4.^8_V=NO[N:>+N:>$.W7^GK+]3U]\]3=P]+=RA^^^4]7?J -M^KNG)W]VZ/X[9?V=NOZNG%V=0[YC_9VZ_@[,(=^Q_DY=?P?FD.]8?Z>NO\MS -MS^H<\AWK[]3U=\_R7.$.W7^GK+]3U]\]2]P]J]PAW['^3EU_]RQQ]ZQRAWS' -M^CMU_=VST\79(=^Q_DY=?U?.KLXAW['^3EU_!^:0[UA_IZZ_`W/(=ZR_4]?? -MY;GG=0[YCO5WZOJ[YWFNOOU/5W+_-GOS9H?OOE/5WZOJ[LOU/7W[W*O3A=GAWS'^CMU_5TYNSJ'?,?Z.W7]'9A#OF/] -MG;K^#LPAW['^3EU_E^=>USGD.];?J>OO7N>YRAWR'>OOU/5WKQ-WKPMWZ/X[ -M9?V=NO[N=>+N=>$.W7^GK+]3U]^]/OFS0_??*>OOU/5WY>SJ'/(=Z^_4]7=@ -M#OF.]7?J^CLPAWS'^CMU_5V>>U/GD.]8?Z>NOWN3YPIWZ/X[9?V=NO[N3>+N -M3>4.^8[U=^KZNS>)NS>5.^0[UM^IZ^_>G"[.#OF.]7?J^KMR=G4.^8[U=^KZ -M.S"'?,?Z.W7]'9A#OF/]G;K^+L]=U3GD.];?J>OOKO)$.W7^GK+]3U]]=)>ZN"G?H_CME_9VZ_N[JY,\.W7^GK+]3U]^5LZMSR'>L -MOU/7WX$YY#O6WZGK[\`<\AWK[]3U=WGN;9U#OF/]G;K^[FV>*]RA^^^4]7?J -M^KNWB;NWE3OD.];?J>OOWB;NWE;ND.]8?Z>NOWM[NC@[Y#O6WZGK[\K9U3GD -M.];?J>OOP!SR'>OOU/5W8`[YCO5WZOJ[//>NSB'?L?Y.77_W+L]5[I#O6'^G -MKK][E[A[5[A#]]\IZ^_4]7?O$G?O"G?H_CME_9VZ_N[=R9\=NO].67^GKK\K -M9U?GD.]8?Z>NOP-SR'>LOU/7WX$YY#O6WZGK[_+<^SJ'?,?Z.W7]W?L\5[A# -M]]\IZ^_4]7?O$W?O*W?(=ZR_4]??O4_LOU/7 -MWY6SJW/(=ZR_4]??@3GD.];?J>OOP!SR'>OOU/5W>>ZZSB'?L?Y.H_[.T/UW -MROH[C?H[0_??*>OO-.KO#-U_IZR_TZB_,W3_G;+^3J/^SM#]=\KZ.XWZ.T/W -MWRGK[S3J[PS=?Z>LOU/2WWVH<\AWK+]3U]]]R'.%.W3_G;+^3EU_]R%Q]Z%R -MAWS'^CMU_=V'Q-V'RAWR'>OOU/5W'TX79X=\Q_H[=?U=.;LZAWS'^CMU_1V8 -M0[YC_9VZ_@[,(=^Q_L[R#]S).*G?`=\;Z.W/]G9PNS@[XSEA_9ZZ_*V=7YX#O -MC/5WYOH[,`=\9ZR_,]??@3G@.V/]G;G^+L]IG4.^8_V=N?Y.\USE#OF.]7?F -M^CM-W&GA#MU_9ZR_,]??:>)."W?H_CMC_9VY_DY/_NS0_7?&^CMS_5TYNSJ' -M?,?Z.W/]'9A#OF/]G;G^#LPAW['^SEQ_E^>LSB'?L?[.7']G>:YPA^Z_,];? -MF>OO+'%GE3OD.];?F>OO+'%GE3OD.];?F>OO['1Q=LAWK+\SU]^5LZMSR'>L -MOS/7WX$YY#O6WYGK[\`<\AWK[\SU=WFNK7/(=ZR_,]??M7FNZ.#OD.];?F>OORMG5.>0[ -MUM^9Z^_`'/(=Z^_,]7=@#OF.]7?F^KL\U]NO^M/_NS0_7?&^CMS_5TYNSJ' -M?,?Z.W/]'9A#OF/]G;G^#LPAW['^SEQ_E^>.=0[YCO5WYOJ[8YXKW*'[[XSU -M=^;ZNV/B[EBY0[YC_9VY_NZ8N#M6[I#O6']GKK\[GB[.#OF.]7?F^KMR=G4. -M^8[U=^;Z.S"'?,?Z.W/]'9A#OF/]G;G^+L\-=0[YCO5WYOJ[(<]5[I#O6']G -MKK\;$G=#X0[=?V>LOS/7WPV)NZ%PA^Z_,];?F>OOAI,_.W3_G;'^SEQ_5\ZN -MSB'?L?[.7'\'YI#O6']GKK\#<\AWK+\SU]_EN;'.(=^Q_LYOOS/5W8`[YCO5WYOH[,(=\Q_H[<_U=GOM4YY#O6']GKK_[E.<* -M=^C^.V/]G;G^[E/B[E/E#OF.]7?F^KM/B;M/E3OD.];?F>OO/ITNS@[YCO5W -MYOJ[LOS/7WWW. -M?$W>?"';K_SEA_9ZZ_^WSR9X?N -MOS/6WYGK[\K9U3GD.];?F>OOP!SR'>OOS/5W8`[YCO5WYOJ[//>ESB'?L?[. -M7'_W)<\5[M#]=\;Z.W/]W9?$W9?*'?(=Z^_,]7=?$G=?*G?(=ZR_,]???3E= -MG!WR'>OOS/5WY>SJ'/(=Z^_,]7=@#OF.]7?F^CLPAWS'^CMS_5V>^UKGD.]8 -M?V>NO_N:YRIWR'>LOS/7WWU-W'TMW*'[[XSU=^;ZNZ^)NZ^%.W3_G;'^SEQ_ -M]_7DSP[=?V>LOS/7WY6SJW/(=ZR_,]??@3GD.];?F>OOP!SR'>OOS/5W>>Y; -MG4.^8_V=N?[N6YXKW*'[[XSU=^;ZNV^)NV^5.^0[UM^9Z^^^)>Z^5>Z0[UA_ -M9ZZ_^W:Z.#OD.];?F>OORMG5.>0[UM^9Z^_`'/(=Z^_,]7=@#OF.]7=M_H&; -M^U[G@.]:UM^UKK_[GNWYM=H<)O!7 -M_A,__GS]\,\R>'MWT!\8S*_PX5S^!>GN[@ZZC::V&W?NZ>,@]][P^9L>"W_# -M3Z[OS:'OS?PKYX>N^_G98-]]-V3=LW[9@N^>?[FMW#6;.Z0#D+?[O_[MWLW -M=_OE>_>GG>>,SCW!<[=?OM>?S*$//M?^[*F#TE=W\6M[-]<='CXUW'_J_-L, -M:_:IF58R]]7-H6\?_RODW=X<,/?-\>8?6F]^@R?-LI]_L/;G;[[;##>?)G?_ -M:49O_U^FL3G*^?^RNQG\\:^_7__K;NS]];_?IM=W=W.`X`_^$^ST[FX.&-C; -MS?]YD;_=YN$<^)W>KYW>^?M/=Z>%#.I\>_)3YU7C?/7V`G\E?_$C]^O'_YY-]BFP4=[A3>#RR-^=ISG'O&S -MXSSWB)\=Y[E'_>PX#S[B9\=Y[A$_.\YSC_C9<9Y[U,^.F\';?^?X2%_$SW-R -M]V5R7YM!F\W_AV[_Z=(_O2_Y,OXO@78WO$+^+GN9]_$=_^Z)M] -8Q"_BY[E'_2+>'HXWWOOM/_VP*B?UK``` +M'XL(",]Q+ED``VEM9RTQ>#$M-#`Y-BUG<'0N<6-O=RYO=70`K9W+CAS7L47G +M^HKDFVR2S8J(S*Q,OFW`!CR3C7MG]P+.Y]`HS_GQ[NH^C^ZHO1D6V!(A4"!R +MH^IP]2I*6CH\'.[^:)I.FK9OVK'9Y^;F[],W:>[]S<-OS8^___5OU_?_^/'; +MW9@Y`3Y%N).0NQ$^1;B3D+L)/D6XDY"[ +M&3Y%N).0NP4^1;B3D+L5/D6XTY"[#3Y%N".?%_>XV^%3A#N-N!/\%.%.(^X$ +M^4X9=QIQ)\AWRKC3B#M!OE/&G4;<"?*=,NXTXDZ0[Y1Q9Q%W@GQGC#N+N!/D +M.V/<6<@=\ITQ[BSD#OG.&'<6*GR+]:QET;<:?(=RWCKHNX4^2[CG'71=PI\EW'N.M"[I#O.L9=%W*'?-' +MW"'?S8R[.>0.^6YFW,TA=\AW,^-N#KE#OIL9=W/('?+=S+B;0^Z0[V;&W1)R +MAWRW,.Z6D#ODNX5QMT3<]?@IPMT2<=^6QAW2\1=CWRW,.Z6 +MB+L>^6YAW"T1=SWRW<*X6R/N>N2[E7&W1MSUR'2O\/G@._D0+B30\@=\)T<"'=RB+@;\%.8 +M.PG[NP'X3EA_)V%_-P#?">OO).SO!N`[8?V=A/W=`'PGK+^3L+\;@.^$]7<2 +M]G<#\)VP_D["_FX`OA/6WTG8WPW`=\+Z.PG[NP'X3EA_)V%_-P#?">OO).SO +M!N`[8?V=A/W=`'PGK+^3L+\;@.^$]7<2]G<#\AWK[R3L[P;D.];?2=C?C?@I +MPEW8WXW(=ZR_D["_&Y'O6'\G87\W(M^Q_D["_FY$OF/]G83]W8A\Q_H["?N[ +M$?F.]7<2]G]8?R=A?SOO).SO)OP4X2[L[R;D +M.];?2=C?3OO).SO)N0[UM])V-]-R'>LOY.POYN0[UA_)V%_-R'? +ML?Y.POYN0KYC_9V$_=V$?,?Z.PG[NPGYCO5W$O9W,WZ*OO).SO +M9N0[UM])V-_-R'>LOY.POYN1[UA_)V%_-R/?L?Y.POYN1KYC_9V$_=V,?,?Z +M.PG[NQGYCO5W$O9W,_(=Z^\D[.]FY#O6WTG8W\W(=ZR_D["_FY'O6'\G87\W +M(]^Q_D["_FY&OF/]G83]W8Q\Q_H["?N[!3]%N`O[NP7YCO5W$O9W"_(=Z^\D +M[.\6Y#O6WTG8WRW(=ZR_D["_6Y#O6'\G87^W(-^Q_D["_FY!OF/]G83]W8)\ +MQ_H["?N[!?F.]7<2]G<+\AWK[R3L[Q;D.];?2=C?+]8?R=A?[OO).SO5N0[UM])V-^MR'>LOY.POUN1[UA_ +M)V%_MR+?L?Y.POYNPT\1[L+^;D.^8_V=A/W=AGS'^CL)^[L-^8[U=Q+V=QOR +M'>OO).SO-N0[UM])V-]MR'>LOY.PO]N0[UA_)V%_MR'?L?Y.POYN0[YC_9V$ +M_=V&?,?Z.PG[NPWYCO5W$O9W&_(=Z^\D[.\VY#O6WTG8WVW(=ZR_D["_VY#O +M6'\G87^WXZ<(=V%_MR/?L?Y.POYN1[YC_9V$_=V.?,?Z.PG[NQWYCO5W$O9W +M._(=Z^\D[.]VY#O6WTG8W^W(=ZR_D["_VY'O6'\G87^W(]^Q_D["_FY'OF/] +MG83]W8Y\Q_H["?N['?F.]7<2]G<[\AWK[S1_Q\TU=0[X[N8IS)VZ_B[?I]=4 +M[H#OE/5WZOJ[)G'79.[L@)_"W*GK[YK$7?//,@=\IZR_4]??-2=W=H;NOU/6 +MWZGK[\K9U3G@.V7]G;K^#LP!WRGK[]3U=V`.^$Y9?Z>NO\MS3^H<\)VR_DY= +M?_+ +MLP.^4];?J>OORMG5.>`[9?V=NOX.S`'?*>OOU/5W8`[X3EE_IZZ_RW-/ZQSR +M'>OOU/5W3_-GOS9H?OOE/5WZOJ[LOU/7WSW+>USGD.];?J>OOGN>YRAWR'>OOU/5WSQ-WSPMWZ/X[9?V=NO[N>>+N>>$. +MW7^GK+]3U]\]/_FS0_??*>OOU/5WY>SJ'/(=Z^_4]7=@#OF.]7?J^CLPAWS' +M^CMU_5V>>U'GD.]8?Z>NOWN1YPIWZ/X[9?V=NO[N1>+N1>4.^8[U=^KZNQ>) +MNQ>5.^0[UM^IZ^]>G"[.#OF.]7?J^KMR=G4.^8[U=^KZ.S"'?,?Z.W7]'9A# +MOF/]G;K^+L^]K'/(=ZR_4]??OOO7B;N7A;NT/UWROH[=?W= +MR\3=R\(=NO].67^GKK][>?)GA^Z_4];?J>OORMG5.>0[UM^IZ^_`'/(=Z^_4 +M]7=@#OF.]7?J^KL\]ZK.(=^Q_DY=?_>0[UA_IZZ_>YWG*G?(=ZR_4]??O4[0[UM^IZ^_`'/(=Z^_4]7=Y[DV=0[YC_9VZ_NY-GBO>0[UA_IZZ_N\ISE3OD.];?J>OOKA)W +M5X4[=/^=LOY.77]WE;B[*MRA^^^4]7?J^KNKDS\[=/^=LOY.77]7SJ[.(=^Q +M_DY=?P?FD.]8?Z>NOP-SR'>LOU/7W^6YMW4.^8[U=^KZN[=YKG"'[K]3UM^I +MZ^_>)N[>5NZ0[UA_IZZ_>YNX>UNY0[YC_9VZ_N[MZ>+LD.]8?Z>NORMG5^>0 +M[UA_IZZ_`W/(=ZR_4]??@3GD.];?J>OO\MR[.H=\Q_H[=?W=NSQ7N4.^8_V= +MNO[N7>+N7>$.W7^GK+]3U]^]2]R]*]RA^^^4]7?J^KMW)W]VZ/X[9?V=NOZN +MG%V=0[YC_9VZ_@[,(=^Q_DY=?P?FD.]8?Z>NO\MS[^L<\AWK[]3U=^_S7.$. +MW7^GK+]3U]^]3]R]K]PAW['^3EU_]SYQ][YRAWS'^CMU_=W[T\79(=^Q_DY= +M?U?.KLXAW['^3EU_!^:0[UA_IZZ_`W/(=ZR_4]??Y;GK.H=\Q_H[C?H[0_?? +M*>OO-.KO#-U_IZR_TZB_,W3_G;+^3J/^SM#]=\KZ.XWZ.T/WWRGK[S3J[PS= +M?Z>LO].HOS-T_YVR_DY)?_>ASB'?L?Y.77_W(<\5[M#]=\KZ.W7]W8?$W8?* +M'?(=Z^_4]7OOU/5WY>SJ'/(=Z^_4]7=@ +M#OF.]7?J^CLPAWS'^CO+WW%SASH'?&>LO[OY@0?<93\=*G?`=\;Z.W/]W2'M +M'0IWZ/X[8_V=N?[ND+@[%.[0_7?&^CMS_=WAY,\.W7]GK+\SU]^5LZMSP'?& +M^CMS_1V8`[XSUM^9Z^_`'/"=L?[.7'^7YZ3.`=\9Z^_,]7>2YPIWZ/X[8_V= +MN?Y.TLN3RAWPG;'^SEQ_)XD[J=P!WQGK[\SU=W*Z.#O@.V/]G;G^KIQ=G0.^ +M,];?F>OOP!SPG;'^SEQ_!^:`[XSU=^;ZNSRG=0[YCO5WYOH[S7.5.^0[UM^9 +MZ^\T<:>%.W3_G;'^SEQ_IXD[+=RA^^^,]7?F^CL]^;-#]]\9Z^_,]7?E[.H< +M\AWK[\SU=V`.^8[U=^;Z.S"'?,?Z.W/]79ZS.H=\Q_H[<_V=Y;G"';K_SEA_ +M9ZZ_L\2=5>Z0[UA_9ZZ_L\2=5>Z0[UA_9ZZ_L]/%V2'?L?[.7']7SJ[.(=^Q +M_LYNOP-SR'>LOS/7W^6YMLXAW['^SEQ_U^:YRAWR'>OOS/5W +M;>*N+=RA^^^,]7?F^KLV<=<6[M#]=\;Z.W/]77OR9X?NOS/6WYGK[\K9U3GD +M.];?F>OOP!SR'>OOS/5W8`[YCO5WYOJ[/-?5.>0[UM^9Z^^Z/%>X0_??&>OO +MS/5W7>*NJ]PAW['^SEQ_UR7NNLH=\AWK[\SU=]WIXNR0[UA_9ZZ_*V=7YY#O +M6']GKK\#<\AWK+\SU]^!.>0[UM^9Z^_R7%_GD.]8?V>NO^OS7.4.^8[U=^;Z +MNSYQUQ?NT/UWQOH[<_U=G[CK"W?H_CMC_9VY_JX_^;-#]]\9Z^_,]7?E[.H< +M\AWK[\SU=V`.^8[U=^;Z.S"'?,?Z.W/]79X[UCGD.];?F>OOCGFN<(?NOS/6 +MWYGK[XZ)NV/E#OF.]7?F^KMCXNY8N4.^8_V=N?[N>+HX.^0[UM^9Z^_*V=4Y +MY#O6WYGK[\`<\AWK[\SU=V`.^8[U=^;ZNSPWU#GD.];?F>OOACQ7N4.^8_V= +MN?YN2-P-A3MT_YVQ_LYOOQL3=6+E#OF/]G;G^;CQ=G!WR'>OOS/5WY>SJ +M'/(=Z^_,]7=@#OF.]7?F^CLPAWS'^CMS_5V>^UCGD.]8?V>NO_N8YRIWR'>L +MOS/7WWU,W'TLW*'[[XSU=^;ZNX^)NX^%.W3_G;'^SEQ_]_'DSP[=?V>LOS/7 +MWY6SJW/(=ZR_,]??@3GD.];?F>OOP!SR'>OOS/5W>>Y3G4.^8_V=N?[N4YXK +MW*'[[XSU=^;ZNT^)NT^5.^0[UM^9Z^\^)>X^5>Z0[UA_9ZZ_^W2Z.#OD.];? +MF>OORMG5.>0[UM^9Z^_`'/(=Z^_,]7=@#OF.]7?F^KL\][G.(=^Q_LYNO_NNORMG5^>0[UA_9ZZ_`W/(=ZR_,]??@3GD.];?F>OO\MR7.H=\Q_H[ +M<_W=ESQ7N$/WWQGK[\SU=U\2=U\J=\AWK+\SU]]]2=Q]J=PAW['^SEQ_]^5T +M<7;(=ZR_,]??E;.K<\AWK+\SU]^!.>0[UM^9Z^_`'/(=Z^_,]7=Y[FN=0[YC +M_9VY_NYKGJO<(=^Q_LYU<(?NOS/6WYGK[[XF[KX6[M#]=\;Z.W/] +MW=>3/SMT_YVQ_LY0[UM^U^3MN +M[GN=`[YK67_7NO[N>YZKW`'?W3R%N6M=?_<]\%/D]SUV;_9[[HVO +MRQSZ_;;+4\'8.Z2#T[?Z_?[MW +M<[GG>>,SCW!<[ +M;O[/B_SM-@_GP*_T?NWTSK]>F;M'.[TQP8*^\1^@IS?=G1X^I//IP2^9'_>O +M$;T_!WZ]\BNGU]]^:IP_8R?P5_X#/WZ_?OCGW6";!A_M%=X,+H_XU7&>>\2O +MCO/<(WYUG.<>]:OC//B(7QWGN4?\ZCC//>)7QWGN4;\Z;@9O_YWC(WV(G^?D +M[F-R7YM!F\W^_F'^/9'W^PC +8?HB?YQ[U0[P]'&^\]]M_`$CJT>#UK``` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.gz.uu Wed May 31 07:49:49 2017 (r319294) +++ head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.gz.uu Wed May 31 08:01:12 2017 (r319295) @@ -1,26 +1,26 @@ # $FreeBSD$ begin 644 img-1x1-4096-gpt.qcow2.gz -M'XL("*([(U0``VEM9RTQ>#$M-#`Y-BUG<'0N<6-O=S(N;W5T`*V92V_4,!"` -M[_T5+F]:6.)7DN51:$LK]=8BN'')\UB)*PK\=N+8B9/)3-PNWK6BKJSY9#O? -MC)TT2>R',$)$(1U*3K@%Z]+C -M!(5+^+J#X[C9Z"2"$V/4&A3"*7)T6QT([N1H6+KA9N0@0AX"M#CR9APT/F'' -M!R/4@>,3L<PI7!'$2B2HI7!7$*22J -MIG!-$*>1J);`\8`J/2Y%HCB%$T%"N!R)HKSC8>_V2!3E'0][5R!1 -ME'<\[%V)1%'>\;!W%1)%>B -MA]0[07DG@'>G#O?&XY!Z)RCO!/#N[2X=Y['%+O).6=!-Y]<+B/'H?4.TEY)X%WGQSNS..0>B4^)-6-L)&ZL*Y$IW=!>[Y7<"#KG[ -M".`XPB7.35C;W+4/C$W#VM8UNU(N.)\=$)`)'^]FN#KR^@WI]@B@UJPH5L`? -MX_B&=.OSR[X;Z.W60S'0@FDUX8:YZFH^OJOK&W9[_NV[@?WTTQW2+2M8Q5F1 -MLP*.CE/3_8W9IVVZ92U<[1$G*=QT+`,X<[S(Z@TRV -M+88SUIYEW)S=>F!W?[>[M["WNU^G;GR*.R.P1G=0JZ>&RIQ3T\W\@P`Q7;;$ -M8:^1_FOU3%TN=;35VSM9L$9WD*M7V-7#%\FL'IHRW;AJ8\*-N#+NZG'["C,Q -M]7M]I3NZV]WR:X'*`:.-4*5M%3$[#"YB=AA(&9]PK,E8+\YRX^'_!UG;<#8^/Z^DV8FOKW]C$\9O11-S$ -B#6YS$\\:>K+V\Q=,-N(F;G!1-W&5F>/WT3\!FKQU%1H````` +M'XL(",]Q+ED``VEM9RTQ>#$M-#`Y-BUG<'0N<6-O=S(N;W5T`*V92V_<(!"` +M[_D5I.\FS=8,8'O[2)JD62FWI&IOO?AYC-1KY?:WUQALUGC&)%MVD945FD^` +MOQFPDR3FPYCB3*9,;EE;LOZW;<#V?LP;Z^YWMYO]3W=D8#PAHI`.*2;3,.&A^8 +M\?D1\L#Q0>SQ"7S]U!CG=Z3KXQ-F?'Y41N'R(`Z0J"V%*X(X@425%*X*XB02 +M55.X)HA32%1+X'A`E1Z7(E&-B[+1)%>/;>X%Q..8U&4=^!Y]]+B7CD<4N^`\@X\[UY;W!N'0^H=4-Z!Y]U;BSMQ +M.*3>`>4=>-Z=6MP[AT/J'5#>@>?=V<([CM0[H+P3GG?O+2MQ.*3>"-X)BY,.A]0[07DG/.^4Q:4.A]0[07DG/.\RB\L=#JEW@O). +M>-YM+>Z#PR'U3E#>"<^[CQ;WR>&0>B+.W7=A<5\< +M#JEWDO).>MY=6MR5PR'U3E+>2<^[:XO[.N$`BYJ\2Q*\6=S-(FE.VYSY$IWK`#SIP/)O5::M.R`@$S[>[.'JR.LWI-L3@$JQHE@` +M?XSC&]*MSR_S;J"W6PW%0`%3%/SI.3?JG-);W:6*V +M;1C.6%N6<7UVZX'=P_WFP<#.-K].[?@DMT9@C>Z@5D\.E3FGIINY!P%BNFR. +MPUXC_=?JZ;IO,*N'+Y)>/31ENG'5QH0;<67/F%6:B +MZ_?R2G=T=YOYUP"E!48;H4S;*F)V:%S$[-"XB-FA<5&S0P,C9H?&1ZB6<-/5GS^>M--N(FKG%1-W&9Z>/WT3]QQ=U%%1H````` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu Wed May 31 07:49:49 2017 (r319294) +++ head/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu Wed May 31 08:01:12 2017 (r319295) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-1x1-4096-gpt.raw.gz -M'XL("/#%'50``VEM9RTQ>#$M-#`Y-BUG<'0NU52W;V`262JW42MW2JMW:@3]FC-2=#U\?A@2(C1KIP$)(Q_UR]_#C(F4X -M`*,AJ\@U'>B?Q?+L=W>[@:;JVX#^]ZF$%5!X8,`U/B@U/>,3SAQ.?9BAFO/6=K7-O+Z7US<VLL(>^M^[#3@KEUG%/"MSJ#-T%:HV@7MG&12+VH -M9?I)M7^I;M.KTU -F^C>&>/QE.,8A3KCM(>YN;99QB!..=8@;_W]*RMT?5F[7A(@+```` +M'XL("-!Q+ED``VEM9RTQ>#$M-#`Y-BUG<'0N^"C'3;SSX^U0D*^6N,E`0TB&>7;FI2^S4H8# +M,!JRC%S3@>Y)+,_N<'OH::JZ#NA_GTI8`84'!ESM@U+3,\ZA;8FXT;,<,V4M5GIP!PG`FYLM[T.:"W*<@/\'.O3_>NP,#G,"=H_+V$4 +MK(8U?[B^5UO/ZWM^><7Y\?V#8%]3NUKY8.7S&Y09W$HDJ9+M?J_;#3A-61NU +M1UR6Q-W$<1EE-3NXV$KCS%Y6V$/_>[)D4/T="^Q!.."KHB8'=Y$Y<`NQ<_=T-]1@T[ +M(K;2@91ZIM\J1:K=(^WMW7:QQ&7/_3TEY^`7C-"Q#B`L````` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu Wed May 31 07:49:49 2017 (r319294) +++ head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu Wed May 31 08:01:12 2017 (r319295) @@ -1,22 +1,22 @@ # $FreeBSD$ begin 644 img-1x1-4096-gpt.vhd.gz -M'XL("`XUQ%4``VEM9RTQ>#$M-#`Y-BUG<'0N=FAD+F]U=`"MF$MOVS`,@._Y -M%0QVZS!#;R>7`2O0`KMUPX9==K$=IRN&=8_VT(/WWT?*4FS9EK&T=%0CB<+/ -M)$61K(3H+P"GP1W!M>`LO2\-N#V4.P"<#$/YNPP?H6M^WK?-X]U3$:YNT\.D -M&$NEXB2O-!A\2`FJHH>X`[V'+F**5U>W%W<_;B-.!9P*(%N2E%;@ZMES#'Z[ -MZ[4CTI<[]=TC+[^=M--S[08I_"L/(`Q(.?J%CMHAIOB;&FM0ZGCTP\&A)=G3 -M2#XD$X.Q$]]9,9$:J;GD5#$8NX1S:U+GX"XV82WZ4,'`*/$NP$DH%;W'L(E^ -MF`T,E:>'7]6?AW:BG\J$BCOI)V=S.F^N"J&BXH^#!H;">@(*Q?DZ*%9_G%R.K7T7ZX680U<(]/]%=%NGK!*SK -M\X#1@RGN9'#=D/]\'FC;P:(^2(*P-J!D=D',=N2_^L"\OO7Q/*"U4%4SX.>H -M7^.7PX)Q8/84&)@"?1W,;2A<&@5-"7L% -MJWGO+3B+O+6Z96-6*8IOB:E[O25\U<']@_I[?\Q/=39&^ -M>J`*98BMKJF02-DT-`'(IJ$)^Y=10]FN+N:YJVQ4J1@S#.$8,PSA&#,,X5@S -M#`$9,PSA&#,,X1@S#.%8,PP"C>!KA`CG&R&LX>A]3=!$C6Q+0_I=$TJGYAJU -MUC[E&Z',8AC&1HAPJXT0_A>=-]9?:F(L8R-$.-9&R(5$RG26X6(C--?A.6<9 -J+C9"8G#@"\XRW'(C]-RS#,(QGF40CO$L@W#,H2*Q=]G\`YT_-4@`$P`` +M'XL("-!Q+ED``VEM9RTQ>#$M-#`Y-BUG<'0N=FAD+F]U=`"MF$MOVS`,@._] +M%2QVZS!#;R>7`2O0`KMUPX9==K$=IPN&98_VT(/WWT?*4FS9EK&T=%0CB<+/ +M)$61K(3H+P"GP>W!M>`LO2\-N"V4&P"<#$/YNPP?H6M^'MOF\?!4A*N[Z&%2 +MC*52<9)7&@P^I`15T4/O8<@]]N +M>NV(].6@OGOD];>3=GJNW2"%?^4.A`$I1[_043O$%']38PU*[?=^.-BU)'L: +MR8=D8C!VXCLK)E(C-9><*@9CEW!N3>H\Q;*(? +M9@-#Y>GA5_7GH9WHIS*AXD[ZR=F7-3[TWH&"LGY-BQ>?YQOZ +M/&#T8(H[&5PWY#^?!]IVL*@/DB"L-2B971!].?)?O6->WWI_'M!:J*H9\'/4 +MK_'+8<$X,%L*#$P.1H)58(=P]K;:9JS?S>U[N'OW\1/!O@[F-A0NC8*FA*T" +MN9UH-]]IZ[FEH]UN?E3<[<>\M.(N\M;IE8U8KB,L75O-Z3OFK@_L#\/;_G)[J[(GWU +M0!7*$%M=4R&1LFEH`I!-0Q/V+Z.&LEU=S'-7V:A2,688PC%F&,(Q9AC"L688 +M`C)F&,(Q9AC",688PK%F&`0:P=<($#$M-#`Y-BUG<'0N=FAD9BYO=70`K9??B]0P$,?? -M]Z\8\>'DQ)#?[;X("J?XMAX>OOC2'\FQB"N"B`_]X\TD[37I)H63=$/I,IW/ -MSGKM<>1];C%8EP8^RU665#C",!M\BUSP,J!5UW!7Q8XN/^<2B0 -M&N01N+N?@F2@."CYA//:U1#'=_?A$YS>W7]!V+=5+F?..`A@'&2#E#0Z5I;[ -M\3Z5&W`N(,P^;[)B11%WL\U>P`G$C3NXW"KCY)X7Y66Q>9RBJ5<;>PD#O0#; -M03<6<&\W.%VY\B2:>PW-`-J`8C!8O!@U,`;0NC8)/<&!NQ"/T##@/0*GRV=R -M";`WY-?K.3[)YHK(K;*AE#V)I4+;DMP&:WM7+J0X43M[+69/5<2Z6W"H; -MBMGK0O;R2<+LY5K7X>:LD1:GANL/]_Z^/I<-TXFDGP"4,[!:A-+: -MH6)W(*YB=R"N8G<@KFIW(+!B=R"N8G<@KF)W(*YJ=SB@H?6&..*P]@R%1H-M -M<`.1A%$-PD<@W?&_T[0SS_,$S%(8ZXW2%N35'L[P]_WA<<'Q6M210->@E..C^2JY*Y7X]\^\>>5JCR[RF -M5)R]HP8J\143"Y^C.Z6EHOP.:!%K++02?9]6\B4Q9`L9<;Y4XIO_]]D&7.U2 -.<7\-#O\`_#?S";,-```` +M'XL("-!Q+ED``VEM9RTQ>#$M-#`Y-BUG<'0N=FAD9BYO=70`K9=/J]P@$,#O +M^RFFO,/"*Q4U:K*7!RV\EMZVCY9>>LD??2RE6PJE])`/7T?-1GMQHA93C,UJ# +M,6%2YK2\LOW-V[!><&0=>Q+AIHO6[2P+8ASQN,5=\S*@E-#W-\`OBWW](;]>!_L$"QF1FV5!*7H"4X5V)7=;S.U-=R'%-;6CUV'T9+7H'4*RY&99 +M4(Q>[Z.7#Q)&+U>Z%A>B1EZEN*%N])CK&K8^[/Y]>R\+YB-)+P\4`5C-0F', +M6+$Z$%>Q.A!7L3H05[4Z$%BQ.A!7L3H05[$Z$%>U.BQ0TWI-''&8>YI"J\"T +M>(!(S"BVXYG\L><*'/O$7<<<#QYUF/OT]_X^A)MS/#>DB^FJC/&TQ, +M94NDQY>H"=>1?7>/S_>G'\\+C@>OE@#*%K4:#FJX<5>F[GX]\>\.>5RMRVQ3 +M,H[>00$5N,7$C@?KCFFJ2'<"6IS5!CJ!NI>9_$@$V41&G$N5^.'__;8>5SM5 +-[%^#W3\[9-S+LPT````` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.gz.uu Wed May 31 07:49:49 2017 (r319294) +++ head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.gz.uu Wed May 31 08:01:12 2017 (r319295) @@ -1,87 +1,87 @@ # $FreeBSD$ begin 644 img-1x1-4096-gpt.vmdk.gz -M'XL("/'%'50``VEM9RTQ>#$M-#`Y-BUG<'0N=FUD:RYO=70`K5Q=C]S&$7SW -MKYC(#S829,%:DLOE@X+8D1T800!%=I*7/(2?\2&VI)P.A@WLCP^'G)HKWNT< -M*5^?]K3;8G?M=,^RN:HN,,N6'^>*UA6%*WI7GEP&-_W3\G!9?F],C^.9!RY_ -M>?77?QSX\_GAS5\Z&YOWM^]"^L[^KV=G(N3 -M]S]U'F%*K#KY%_Z`AZL]Q&EP>>]R^,/N9.\._A+G_ZYM7+\,G-#N^;6\+YJ&DATWM/>2CNZ>3\ -M[^/'O+KA[9U'',-/7)W?VU"<#R]?_/CN;:R=WUM?LGH&.L^%REV9>ZB0FB]?Z1']QV;>-7?YX>;N^YON -MVRG-#\.+PZ>.<"=?NVD#SV%=2]93R"FYL].R+U_]?#?EZ_JPLS>$FQ6QI@V_',ZQ7VQOGW]Q1O"G:>H -MR7-:X!0R);3*J5SR+Q]^+-WEVZ_<"Y_D=]\/\R>0:=&_XEQEY?NQ4T_ -M[:F'_<_P[D?"=%J'_TC4[VET/WRP\W -M;_OI1',O"=_%G8B&>K49T8_9[J -MG7QK&\1S?%@]?M6`O$[#\;L`/7.-*L0H5W"IVI6A=O2L-.HL1KV"2]7N%&I' -MSU:C.C'Z7N8:58A1KN!2M:M#[>A9:=19 -MC'H%EZI=$VI'SU:C.C'Z7JW1!J1\]6HSHQ^EW)CJ%V]!PURC\54KMB"Z[*0NWHF6M4 -M(4:Y@DO4KF*_HV>E46E4:=Q:A7<*G:L=_1L]6H3HQ^5[+L=_0<-N4848Y0HN53OV.WI6&G46HU[!I6K'?D?/5J,Z,?I=R;+? -MT7/4*/]$0@;R.@EWSD+MZ)EK5"%&N8)+U.[,?D?/2J/.8M0KN$3MSNQW]&PU -MJA.CWY4L^QT]1XWR3[74KMZ$8[^C9ZY1A1CE"BY5._8[>E8:=1:C7L&E:L=^ -M1\]6HSHQ^EW)LM_1<]0H_\3_/T%>I^'8[^B9:U0A1KF"2]6._8Z>E4:=Q:A7 -M<*G:L=_1L]6H3HQ^5[+L=_0<-H0HQR!9>J'?L=/2N- -M.HM1K^!2M6._HV>K49T8_:YDV>_H.6J4?^JD=MT67)V%VM$SUZA"C'(%EZA= -MS7Y'STJCSF+4*[A$[6KV.WJV&M6)T>]*EOV.GJ-&^:=>:M=OPK'?T3/7J$*, -M<@67JAW['3TKC3J+4:_@4K5COZ-GJU&=&/VN9-GOZ#EJE'\:I';#)AS['3US -MC2K$*%=PJ=JQW]&STJBS&/4*+E4[]CMZMAK5B='O2I;]CIZC1OFG46HW;L*Q -MW]$SUZA"C'(%EZH=^QT]*XTZBU&OX%*U8[^C9ZM1G1C]KF39[^@Y:E0FTS/( -MZR1^@_!V$O\,F?]>$?@?A[Z#\'82_PR9_UX1^!^'O -MH/P=A+_;D6SH=Q#^#LK?0?@[;%):3>AW$/X.RM]!^#ML\G=-Z'<0_@[*WT'X -M.VSR=TWH=Q#^#LK?0?B['^@_!V$O\,F?]>$?@?A[Z#\'82_VY%LZ'<0_@[*WT'X.VQ26FT6:B?\ -M'92_@_!WV.3O6O8[X>^@_!V$O\,F?]>RWPE_!^7O(/S=CF39[X2_@_)W$/X. -MFY16RWXG_!V4OX/P=]CD[UKV.^'OH/P=A+_#)G_7LM\)?P?E[R#\W8YDV>^$ -MOX/R=Q#^#IN45LM^)_P=E+^#\'?8Y.]:]COA[Z#\'82_PR9_U[+?"7\'Y>\@ -M_-V.9-GOA+^#\G<0_@Z;E%;+?B?\'92_@_!WV.3O6O8[X>^@_!V$O\,F?]>R -MWPE_!^7O(/S=CF39[X2_@_)W$/X.FY16EX7:"7\'Y>\@_!TV^;N._4[X.RA_ -M!^'OL,G?=>QWPM]!^3L(?[^@_!V$O\,FI=6QWPE_!^7O(/P=-OF[ -MCOU.^#LH?P?A[[#)WW7L=\+?0?D["'^W(UGV.^'OH/P=A+_#)J75L=\)?P?E -M[R#\'3;YNX[]3O@[*'\'X>^PR=]U['?"WT'Y.PA_MR-9]COA[Z#\'82_PR:E -MU;'?"7\'Y>\@_!TV^;N._4[X.RA_!^'OL,G?=>QWPM]!^3L(?[^@ -M_!V$O\,FI=5GH7;"WT'Y.PA_ATW^KF>_$_X.RM]!^#ML\G<]^YWP=U#^#L+? -M[4B6_4[X.RA_!^'OL$EI]>QWPM]!^3L(?X=-_JYGOQ/^#LK?0?@[;/)W/?N= -M\'=0_@["W^U(EOU.^#LH?P?A[[!):?7L=\+?0?D["'^'3?ZN9[\3_@[*WT'X -M.VSR=SW[G?!W4/X.PM_M2);]3O@[*'\'X>^P26GU['?"WT'Y.PA_ATW^KF>_ -M$_X.RM]!^#ML\G<]^YWP=U#^#L+?[4B6_4[X.RA_%\5TD-<"YY;?`#=D2^VN -M2LJO_%.LG;NZNL%:'SB.>P'SZ^GZ/8[I(GMR&1^_/LSZQ3CS6*K^ZP`7../Z -M(<[?I4SW<1^KKT2+\W41?B3A_-]%7(L[?3?25 -MB/-W$WTEXOS=1%^).'\WT5+\W41?B3A_-]%7(L[?3?25B/-W$WTEXOS=1%^).'\WT5#\W49?"<[?;?25X/S=1E\)SM]M])7@_-U& -M7PG.WVWTE>#\W49?"<[?;?25X/S=1E\)SM]M])7@_-U&7PG.WVWTE>#\W49? -M"<[?;?25X/S=1E\)SM]M])7@_-U&7PG.WVWTE>#\W49?"<[?;?25X/S=1E\) -MSM]M])7@_-U&7PG.WVWTE>#\W49?"<[?;?25X/S=1E\)SM]M])7@_-U&7PG. -MWVWTE>#\W49?B3A_I^>S])6(\W=Z/DM?B3A_I^>S])6(\W=Z/DM?B3A_-]%7 -M(L[?3?25B/-W$WTEXOS=1%^).'\WT5+\W41?B3A_-]%7(L[?3?25B/-W$WTEXOS=1%^).'\W -MT5+\W41?B3A_ -M-]%7(L[?3?25B/-W$WTEXOS=1%\)SM]M])483/65&$SUE1A,]9483/65&$SU -ME1A,]9483/65&$SUE1A,]9483/65&$SUE1A,]9483/65&$SUE1A,]948L\Q0 -M7XG15%^)T51?B=%47XG15%^)T51?B=%47XG15%^)T51?B=%47XG15%^)T51? -MB=%47XG15%^)T51?B=%47WG,LLQ07WE\=*_CG7"/DUWT@4>8ZBN/QR>7\?'K -M*^;Z+7=7??QW^L#ER\/Z3P1$^W&`7.$:C@D7\.?&HO4:!C>.X;$HY^XSC'>Q -MOI+PYP>!ZXWKMW]_ET=9NJ9Y!/AWKF_>WZ+T]V,NZOGFO+PS;UE$N#GWLM/U -M??7U-^[U%V^^\V#_ND]WOKUSEWNRK:@\RGIU2*?[YS>/SXYBOKWS5/UC=379 -M/`GWV;63K9AO[SSV3\!=>Z3ABJ>B/O9.X,5\>V>-4O6MRP?7YFYL7-,GX/[P -M`.YD_,F;[SS;GES5^?L'EW#=?+/G_N1I:7>>3I/EG#BZ8^^5"!7!X5?O-&JZUK5XY7S46X'9X.-.S -MH_`WC+2[B'LX+-^8JY,;*_\%8K6,Y.7XN; -G,1A>Q#WQ#V#$M-#`Y-BUG<'0N=FUD:RYO=70`K5Q=C]S&$7SW +MKYC(#PX29,%:DLOE@X+8.3LP@@"*["0O>0@_XT/LDW(Z&!&P/SX<'=S +MI'Q]VM-NB]VUTSW+YJJZP"Q;?IPK6E<4KNA=>7(9W/1/R\-E^;TQ/8YG'KC\ +M^>HO?S_PY]>'P^6S!0P^2D*0*9P8J_>Y'![\$.[X7-3JP/0X;L+E/JI]%!C@ +MCHD#2;AB.GA\*H2K:^;#O7\A<"X"N15<^41.R62?6]UO/@O%\^O+_1JF[3W5 +MKLK=J0VF.Y6SG;OJ.!_+7#4YC1/@Y^[J^L-_W-7PH;N]?G_W+JSOZ/=V80IL>KD7_@#'J[V$*?!Y;W+X0^[R^TWUS\.AY^'VP_7[VY>@^D>_=X6 +MN2MJOQSOG]T_5H9_D\R=X-_#7?[X[=7K\,G-#N^;6\+YJ&DATWM/>2CNZ>3\ +M[^/'O+KAYLXCCN$GKL[O;2A..;]WX5^4A:MJ-R^G]-C'Z7`?4IYKU]T.S=WP +M_^M+5L]`Y[E0N2MS#Q52\^4K/:+_V,R[YBX_7M_]<-U] +M-Z7Y87AU^-P1[N1K-VW@.:QKR7H*.25W=EKVY>O_W4WYNC[L[#7AYD7,24SO +M71Y=67FL:0/GK3BZO/"OIG^:%CQE4L`[N4X+G$*FA%8YE4O^Y<./I;M\][5[Y9/\_H=A_@02KEY.,^^\[`-F\^A?A*HM +M\+Z)%?[`O+/NJKEKW%?-A^'P^=755W%G&Y]L,3^FI0T>Y;1`^\_W7,ZI<,M. +M+QL];T7?MX>F;][?#;=^>^-6M+Y$?$ZY?:3EUA$H]>*L)W5WNJS;C?@AP>19:0!Y:V:I$ +M<3G+&TH#';J[=[?+PEY)/\X?7LM>VH^+1Y?4ZA<"+G#6ZSME#ZYGN<858I0K +M0'\5RZ;?/TR_;^[7=_+K.XEGI5%G,>H5W+\FB/>/TSWYL[`1SU:C.C'Z/=4[ +M^=8VB.?XL'K\J@%YG8;C=P%ZYAI5B%&NX%*U*T/MZ%EIU%F,>@67JMTIU(Z> +MK49U8O2[DJU"[>@Y:I1_XEK49U8O2[DFU#[>@Y:I1_8H.`O$[#=:%V],PUJA"C7,&E:M>' +MVM&STJBS&/4*+E6[(=2.GJU&=6+TNY(=0^WH.6J4?RJD=L467)6%VM$SUZA" +MC'(%EZA=Q7Y'STJCSF+4*[A$[2KV.WJV&M6)T>]*EOV.GJ-&^:=2:E=NPK'? +MT3/7J$*,<@67JAW['3TKC3J+4:_@4K5COZ-GJU&=&/VN9-GOZ#EJE'\Z2>U. +MFW#L=_3,-:H0HUS!I6K'?D?/2J/.8M0KN%3MV._HV6I4)T:_*UGV.WJ.&N6? +M^"4(\CH-QWY'SURC"C'*%5RJ=NQW]*PTZBQ&O8)+U8[]CIZM1G5B]+N29;^C +MYZA1_HF$#.1U$NZH0HQR!9>HW9G]CIZ51IW%J%=PB=J=V>_HV6I4 +M)T:_*UGV.WJ.&N6?:JE=O0G'?D?/7*,*,P:5JQWY'SU:C.C'Z7N4848Y0HN4;N: +M_8Z>E4:=Q:A7<(G:U>QW]&PUJA.CWY4L^QT]1XWR3[W4KM^$8[^C9ZY1A1CE +M"BY5._8[>E8:=1:C7L&E:L=^1\]6HSHQ^EW)LM_1<]0H_S1([89-./8[>N8: +M58A1KN!2M6._HV>E46-\D^CU&[N4848Y0HN53OV.WI6&G46HU[!I6K'?D?/5J,Z,?I=R;+?T7/4J$RF9Y#7 +M2;@F6VH7/7.-*L0H5W")VC6AWT7/2J/.8M0KN$3MFM#OHF>K49T8_:YD0[^+ +MGJ-&^9()?X=-2JL)_0["WT'Y.PA_ATW^K@G]#L+?0?D["'^'3?ZN"?T.PM]! +M^3L(?[^PR=^U['?"WT'Y.PA_ATW^KF6_$_X.RM]!^+L=R;+?"7\'Y>\@_!TV +M*:V6_4[X.RA_!^'OL,G?M>QWPM]!^3L(?X=-_JYEOQ/^#LK?0?B['^PR=^U['?"WT'Y.PA_ATW^KF6_ +M$_X.RM]!^+L=R;+?"7\'Y>\@_!TV*:TN"[43_@[*WT'X.VSR=QW[G?!W4/X. +MPM]AD[_KV.^$OX/R=Q#^;D>R['?"WT'Y.PA_ATU*JV._$_X.RM]!^#ML\G<= +M^YWP=U#^#L+?89._Z]COA+^#\G<0_FY'LNQWPM]!^3L(?X=-2JMCOQ/^#LK? +M0?@[;/)W'?N=\'=0_@["WV&3O^O8[X2_@_)W$/YN1[+L=\+?0?D["'^'34JK +M8[\3_@[*WT'X.VSR=QW[G?!W4/X.PM]AD[_KV.^$OX/R=Q#^;D>R['?"WT'Y +M.PA_ATU*J\]"[82_@_)W$/X.F_Q=SWXG_!V4OX/P=]CD[WKV.^'OH/P=A+_; +MD2S[G?!W4/X.PM]AD]+JV>^$OX/R=Q#^#IO\7<]^)_P=E+^#\'?8Y.]Z]COA +M[Z#\'82_VY$L^YWP=U#^#L+?89/2ZMGOA+^#\G<0_@Z;_%W/?B?\'92_@_!W +MV.3O>O8[X>^@_!V$O]N1+/N=\'=0_@["WV&3TNK9[X2_@_)W$/X.F_Q=SWXG +M_!V4OX/P=]CD[WKV.^'OH/P=A+_;D2S[G?!W4/XNBND@KP7.+;\!;LB6VCTI +M*7_BGV+MW).K&ZSU@>.X%S!_.EV_QS%=9,\NX]/7AUF_&&<>2]5_&>`"9UP_ +MQ/F[E.D^[E/UE8CS=SY>I*]$G+_S\2)])>+\G8\7Z2L1Y^\F^DK$^;N)OA)Q +M_FZBKT2?O)OI*Q/F[B;X2 +M?O)OI*Q/F[B;X2?O]'R1OA)Q_D[/%^DK$>?O]'R1OA)Q_D[/%^DK$>?O)OI* +MQ/F[B;X2?O)OI*Q/F[B;X2?O +M)OI*Q/F[B;X27Q^.PR/GU] +MQ5R_Y>ZJC_].'[A\=5C_B8!H/PV0*US#,>$"_MQ8M%[#X,8Q/!;E'#]!HSM6 +MZ82_.`A<;UR__?N[/,K2-51UJM#.MT_O7U\=A3S[9T?5YMP>1+N +MBZ=.MF*^O?/8/P/WU",-5SP7]:EW`B_FVSMKE*IO73ZX-G=CXYH^`??[!W`G +MXT_>?.?9]N2JSM\_N(3KYIL]]R=/2[OS=)HL__,[NF/OE0@5W-'?D?EPN?GK +MX68!^]WAO[\-ZUON/(NG'^D#J>H5\UW>SZETJT3#7K=Y@_K[2E6?7J +M\&%YZI$^D*Q>LU0O<56;JO?4J3O!\:KVJS5<:UN]'-9_ +M%L`B`)JML/"W%+0[.SRG9X0,.SP\,9GAT>SO#L\'"F9T?A +M;QAI=Q'W<%B^,57P\_2]PO]\L4IWYAR3E_YG+N)/;\9@ +E>!'W<,]>Q,!'W<*87\<+?O3/[[/^_O`I!M&4````` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.gz.uu Wed May 31 07:49:49 2017 (r319294) +++ head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.gz.uu Wed May 31 08:01:12 2017 (r319295) @@ -1,6 +1,6 @@ # $FreeBSD$ begin 644 img-1x1-512-gpt.qcow.gz -M'XL("*,S(E0``VEM9RTQ>#$M-3$R+6=P="YQ8V]W+F]U=`"MG?U +M'XL(",5Q+ED``VEM9RTQ>#$M-3$R+6=P="YQ8V]W+F]U=`"MG?U M%5=OB9*HC(C[U-MNM`'/RH9[UH.ZKQQU&]ES?7PSR?,@(_=6V!!51$$%X6YD M'BTNJE2KC@Z'NV]-TTG3]DT[-<>EN?GG]"'-O7]X^-'\^-M?_GI]_]N/W^[& MY/"3I]P_M]I(FGNP]>GUN8P_0MS-Q]P[MZKLW_CU=U[LY=S5[_=O5G\ @@ -117,16 +117,16 @@ M?_OOOB?NOF?NV@-^BORYQ^[-?L^]\7690W_>=GDJ MF+OW[<=O5W>#Z+ZJMF2`T>O[P[\^=%_5K[R^[O;\6FT.,_@[_X$??[Y^^%<9 -MO+T[Z-\8S*_PX5Q^P]W=W4&WT=1^X\YC^CC(_3<\UNOTP!M^#_Y5?W^UU/VW7M'W33NDBQU::3INN+7.W[[5;[[^^__S+ -M7YO?__3W?YS'_KN^W=OK?G9MAO7V#Q_8W*L3^G9_^+=[-W?[Y7OPIYWGC,X] -MP7.W7[Z[G\RA#S[7_NRI@])7=_%S>S?7'1X^-=Y_:NR:49O^YM^&9CKW/P_F -MT!\?_RODW=XV_OR'[S;CS:?)W7^:T=O_EVEJ!CG_ -M7W;GG]M__NWZGW=C[Z__[VUZ?76;I'.[TIP8(^^`_0TYOO3@\?TOE%P4^9'_>O$;T_!WZ]\DNG=_M_ -M-9Z_QL[@[_P'?OQ^_?"ON\$V#3[:*VP/_?J(GQWGN4?\[#C//>)GQWGN43\[ -MSH./^-EQGGO$SX[SW"-^=ISG'O6SXV;P]O<<'^F+^'GNS%YKS;PVZ]#T_HLX -M^W+\XS^NK_\7O-V[WW-D7_I_\D4<_V3LC_A%_#SW\R_B/?VYS=_AAN9_O;_@'C+'O6L```` +M7YO?__3W?YS'_KN^W=OK?G9MAO7V#Q_8W*L3^G9_^+=[-W?[Y?OBM/..[VRW?WDSGTP>?:GSUU4/KJ+GYN[^:ZP\.GQOM/C5TS:M/?_-O03.?^Y\$< +M^N/C?X6\VYL#EO[\<]O?_`)/FO5X_L[6G__PW6:\^32Y^T\S>OO_,DW-(.?_ +MR^[\<_O/OUW_\V[L_?7_O4VO[^[F`,$?_`?8Z=W=',"(..1LD;_=YN$<^)7> +MKYW>^=O/=Z>%#.K\H^"GSX_XUHO?GP*]7?NGT;O^O +MQO/7V!G\G?_`C]^O'_YU-]BFP4=[A>VA7Q_QL^,\]XB?'>>Y1_SL.,\]ZF?' +M>?`1/SO.>\3/CO/_I[C(WT1/\^=V6NMF==F'9K>?Q%G +M7XY__,?U]?^"MWOW>X[L2_]/OHCCGXS]$;^(G^=^_D6\IS^W^9M[LX_X1?P\ +4]ZA?Q-O#<"/3W_X?EY=\._6L```` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.gz.uu Wed May 31 07:49:49 2017 (r319294) +++ head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.gz.uu Wed May 31 08:01:12 2017 (r319295) @@ -1,26 +1,26 @@ # $FreeBSD$ begin 644 img-1x1-512-gpt.qcow2.gz -M'XL(")4[(U0``VEM9RTQ>#$M-3$R+6=P="YQ8V]W,BYO=70`K9A+;YPP$(#O -M^15.WTT:BLVL/+(]3%:EWVM]>C`T&,P/)UKMHE[N[CJ:?]LC`>$Q$(0-2C+@9Z]+A -M@,+%?#G`<=PD.X'@8(A:@K9PDLQN;0#!G1SU2]??C,R+$(<`#8Z\&0?E!R8_ -M/T(>F!^$SD_@ZZ>&.'\@6<]/F/S\J)3"99LX0*)R"E=LX@02M:=PY29.(E$5 -MA:LW<0J):@@0F+D.B*._XMG]*Y`H -MRCN^[=T>B:*\X]O>E4@4Y1W?]JY"HBCO@/"..5R-1%'>@>?=L<4]^%P2+\#RCOPO'MI<2<. -MA_0[H+P#S[M3BWOE<$B_`\H[\+P[6WC'D7X'E'?"\^ZU9<4.A_0[07DG/.^X -MQ8'#(?U.4-X)SSMA<=+AD'XG*.^$YYVRN,3AD'XG*.^$YUUJ<9G#(?U.4-X) -MS[OO;>X#PZ']#M!>2<][SY:W">' -M0_J=I+R3GG?G%G?A<$B_DY1WTO/NTN(^CSC`HD;OXAB_+.YJ4;.`]#N9W!.W -M6^+HAY5#CK/2';3`P(RX>-H@JL"KU]?;@\`*L6*8@'\ -M/N37EUM77^;=0&>WZIN!`J;DB.OGJLII?E>[:W9S_O6;AOUPT^W+3>-J_;!4 -M)%YVG)KNU1?$/F7*+6W\U1YP@L*-QS(/IX\7:;6"PR[6_B%P1TW;%LL4RX`E):L*$O=KADL"FR?U\#YA:JV"KEUM9L(L>(%>O,*N'+Y)."BV9=EBUH>`&W#[PZB5ZN*N/KG\O -M?^F!]B::?PU06F"P#&72E`&K0^,"5H?&!:P.C0M:'1H8L#HT+F!U:%S`ZM"X -MH-71`>LXW":N<=J]/&.J8KED335/@]R.V^@G.MT:UK;^E4T#$M-3$R+6=P="YQ8V]W,BYO=70`K9A+;YPP$(#O +M^15.WTT:BLVL/[`*G*E+OM+^]&!N\F!F<;+V+5HFL^30V +MWXP-:6H^C"G.9,9DR=HMZ_^W%["]?^87ZVXWU\G^ISLR,)X24&J($X@45L*MPOB)!)5 +M4[@FB%-(5$O@>$"5'I-X=6]PCAVN1*,H[ +M\+Q[;'%/)AS'HBCOP//NJ<4]/;>X%PZ']#N@O`//NY<6=^)P +M2+\#RCOPO#NUN%<.A_0[H+P#S[NSA7<2<\[UY;5NIP2+\3E'?"\XY; +M'#@"\DYXWBF+RQP.Z7>"\DYXWN465S@XO[X'!(OQ.4=]+S[J/%?7(X +MI-])RCOI>7=N<1<.A_0[27DG/>\N+>[SA`,L:O(N3?'+XJX6-0M(OY/9/7&; +M)8Y^6#GD."O=<9LCO_3`"K!X.)#<:Z4YI\2;L#(3UE95R"\]T%TD\^\$'&KW +M`<`QPSG.3EB9VC4/C$W#VM9>9J5L<-ZZ`P(RX>-D#U='7K^AW!X`5(I5U0+X +M?^OLR[@=YN-30#!4S)"3?,5>WV\[O:7+.;\Z_?-.R'F^Y0;AK7Z(>E +M*O.RX]1TK[X@]BE3;LO5'G&"PDW',@^GCQ=YO8+#+M;](7!R+6IZZ7"/>VMP +M*IU'[;XWT +M7ZNG^_)615N]TLJ"7?0`N7J563U\D712:,ETXZJ-!3?BMI%7+]/#?7WT_7OY +M2P]T-\G\:X#2`J-E*+-V%[$Z-"YB=6A(:I]TK"Z9J5DK6UO,TR.VX2WZBTVU@;>M?V<3QF]%$W,0U;G43 +>SQMRLO;SUYMLQ$U#$M-3$R+6=P="YR87.*>+8T+K=IG%GSBCWTO[.-."OG7G[JY2UX#:Z!MB)QGS.<8^X\ -M@^;:0=F`.X!5T'3XT#I0*L079.('2*AO"W('I0)=([`_OHACA-V(K^LQ/J/& -MCLAMVD!5S^BUCL"@_D@7YKB"NWH>JV?9JK<;FR6W:0-9O2I6+U\D4C)]JEI2 -M2,+5S-5S:`[Z"/_O\SMMZ/=B?D6@&8%L$8;F#$M-3$R+6=P="YR87EIJKH,&+Z/(6S'"-6>OQ:8-8YR(N)1N>QG06BC+!?`]Q:?[X[!@')@]Z/"^!*/` +M:K#F%]?G:NMQ?(]/SW"X?WU#V,;L1I]%I4 +M.^$*$K?-XXIXMC0NMVF<6?.*/?2_LXTX*Z=>?NSE+7@-KH:F)'&?$YQC[CR# +MYLK!K@9W!*N@;O&A<:!4B"_(Q/>04-\&Y!YV"G2%P.[T(DX1=B.^KH?XC!HZ +M(K=I`U4]H]@C_+^7=]K0'<3TBD`S`-DB#,WG&-6!.$9U((Y1'8AC50<"&=6! +M.$9U((Y1'8AC54<`>LDWQ!'7#W$#NP::`HKY$*?&<2>^Q6TF7:_71O_*$,\? +CAF<#$M-3$R+6=P="YV:&0N;W5T`*V82W/3,!"`[_T5 -MF^%6!H_>=F[0F3)P*PP,%RY^I62`\&@//9C_CE:6;,NV#&G743U)E/V\+ZVV -M8JR_`(P$K:K7&Q2;Z!6QO0\01.;4D->\E_Q+;':19+ -M%5.I0D-AMY`:FC*)^Q;AJ.MRB].5@;S&+5QSJ-U>WACY']>N[U:[G/B+61GDAYKQ5;&8%*_<-V_=2:C4ZI()NUJ6[6)<1>L][MI'NSYL_5[>TQ/=31:_ -M>J#PVQ#9OB9\(2734'D@F8;*KU]"#;G:#.:Y458B%X05!G&$%09QA!4&<:05 -M!H&$%09QA!4&<805!G&D%<8"73(3-4*(\WVS]7-E_Q6=J9%L:5"_EXB2L;E* -M;+5/Z48H$0Q%V`@A;K,1DNG8^DO,C"5LA!!'V@@97TB)SC),:(26.CSF+,.$ -H1HB-#GS"6899;X0>>Y:!.,*S#,01GF4@CCA5L&^Y^`N^QF[[`!,````` +M'XL(",9Q+ED``VEM9RTQ>#$M-3$R+6=P="YV:&0N;W5T`*V82W/3,!"`[_D5 +MV^%6!H_>=F[0F3)P*PP,%RY^I62`\&@//9C_CE:6;,NV#&G743U)E/V\+ZVV +M8JR_`(P$7Q^^W`2<\3GB0SE%*"C#5XCG*?EOTVB'I +MTU%\=^[=J:?2*2*&?3CBSF9-E?X5!'AQUX#A>F\92XXROTB>5" +M=*T3F`X3PID?>V]$P50_P]F&S]/!2.I7HGYV,;!RY9Z>Z*ZR^#4`J^H\8/!@ +MC!L,KFKTGZL#;3M:U">)%Y82!$\&1%Y,_%^^M.PF56ETR85?+LHL85]%ZC[OVT:X/6[^7]_1$=Y/%KQXH +M_#9$MJ\)7TC)-%0>2*:A\NN74$.N-H-Y;I25R`5AA4$<885!'&&%01QIA4$@ +M885!'&&%01QAA4$<:86Q0)?,1(T0XGS?;/UQ;=G\!II']:``3```` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu Wed May 31 07:49:49 2017 (r319294) +++ head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu Wed May 31 08:01:12 2017 (r319295) @@ -1,19 +1,19 @@ # $FreeBSD$ begin 644 img-1x1-512-gpt.vhdf.gz -M'XL("&$EAE4``VEM9RTQ>#$M-3$R+6=P="YV:&1F+F]U=`"ME\V.U#`,@._S -M%$9[6+1HJR9-TO8(TB)Q&V#17KCT)UF-@$%('#C,PV,GZ3:92;HL2FM5&;G^ -M:CMVW:EK=P`(#O60N.85IW=5?)YV-SM+8^/+@/A\B!X_TU"`:2@Q1/.!N[G$+_[MY_@/W;3_<$^[J&RQDJS03]#+HE1.P=VPCW -M/@[7X3CA#/`V&6R3Q5V?9\_A&L+-&[B4Y'%BR\K5T+_MK^OR^O><5I7\6G`PH/+.:A,&8JV!V$ -M*]@=A"O8'80KVAT$+-@=A"O8'80KV!V$*]H="-1UN2%..*J]&7/>@\0A'E=- -M?ARC?P^?K6/74;B:;XW^C2&>W@Q=<(@3;G.(&YT/UA]GP18=13[\/?\+L$8ZYBD@*V?.&"E.UP`=ZB)II -M'?AW=?=X<_CQN."XCVI)(-8?6C68L_$B7!F'^W#@WRQROWJ7>$W),'N]@EK0 -M*R8,W'NWCTM%VB^@)5AMH!-D^R31CTB1+&3"V5();_[?O76XTJ6"?PUV?P'7 -':/,?LPT````` +M'XL(",9Q+ED``VEM9RTQ>#$M-3$R+6=P="YV:&1F+F]U=`"METV/TS`0AN_] +M%8,X5%I$9#NVDQQ!6B1N!1;MA4L^G%4%%"%QX-`?SXSMM'9C!Q8YL:)4DWDR +M\V8FDS+F-@`I@/6)8]YP?EO%^WEWM[,T/CP/B/>G$&Z`%0(=;D0C$W2-,3#/ +M?C%NO9PS_A:-/U]PU77;5P%NNGBM5]X0XBJ'6]*=GP=4"OI^!?R\Q"?LXU`@ +M-<@.!%[/0')0`I2\X&SN:@SCNW_W'@YO/CX0[,LU7<'1.(_036`:0L31\8UT +M'^)T'4X0;J7V@JNSN/VM>@Y7$V[:P*56'B>WO%P-_=NS=3C%8J\V]&H5M`+T +M"%.?Q7V+<+IPY4DR#QJ:$;0!Q6&3Q^J +MDX.]KGZ^\O%)[BLBM?*&G'I2;%4$!?67="'&U:75:TD]54R]SA=+:N4-6?5Z +MIUY:)`HJU;J(\ZI5+V+<4%@]36;L#WQ_KX]YP_E0Q;L#2@\L%J&5TU^ +M'&-\CY]L8/LH72.V1O_&$$\_#%-PB!-N#$M-3$R+6=P="YV;61K+F]U=`"M7%V/W,81?/>O -MF,@/#A)DP5J22_)!0.S(!HP@@&(I\4L>LOR*#Y$EY70(8F!_?#CDU%SQ;N=( -M^?I,B=O:[MKI'K+W7%U@EBT_SA6M*PI7]*X\N0QN^J?E<%E^;TS'L>8;ES^_ -M^LO?#_SY[>%P^6(!@X^2$&0*)\;J;P6PM6=Y[=[_T+@7`1R*[CR2D[)9)]:W>^^",7SZ\O]&J;M/36N -MRMVI#:8[E;.=N^HXOY>Y:G(:)\`OW:N;3_]VKX9/W>W-Q[L/87U'O[>3XRY^^?_4R7+G9X>/YEG`^:EK(]-E3'HI[.CG_ -MY_$QKVYX?^<1Q_`35^?W-A2GG#^[\"_*PE6-FY=3>NSC]'8?4IYKU]T.Y[OA -M[2\?AYD1_V -M3&E^&EX=O2'FS -MRZ,K*X\U;>"\%4>7%_[5]$_3@J=,"G@G=_GP_O##C],M[HOUYO77/Q"NGJ(F -MSVF!4\B4T"JGK5-W%GSS[98CZFI0T>Y;1`^^M[+N=4N&6G -MEXV>MZ+OV\.Y/W^\&V[]]L:M:'V)^I"IW];B?AO7GU/-.S7Z*\9=7KH7-_VT -MIQ[V7\.'GPG7+9?QM`Y_231S8.Y?3%?/##^$3UBN&+]-'FZXN_WET/WR[N9] -M/]UH[B7A^J5VTW*6W;S?S&D#IQ5>7>!4NQ?SKL;E$6[PJ^L?+7#>SU#(N*CX -ML>[R\[R\GX9S/RUMPB;7V_OI-?WTD\*XVJQ6A6+8:U8G1[ZG> -MR;>V03S'A]7CKQJ0UVDX_BY`SURC"C'*%5RJ=F6H'3TKC:K%:%9PJ=J=0NWH -MV6I4)T:_*]DJU(Z>HT;Y$W^50K;CU[)3'6I'SURC"C'*%5RJ=DVH'3TKC:K% -M:%9PJ=J=0^WHV6I4)T:_*]DVU(Z>HT;Y$QL$Y'4:K@NUHV>N4848Y0HN5;L^ -MU(Z>E4;58C0KN%3MAE`[>K8:U8G1[TIV#+6CYZA1_E1([8HMN"H+M:-GKE&% -M&.4*+E&[BOV.GI5&U6(T*[A$[2KV.WJV&M6)T>]*EOV.GJ-&^5,IM2LWX=CO -MZ)EK5"%&N8)+U8[]CIZ51M5B-"NX5.W8[^C9:E0G1K\K6?8[>HX:Y4\GJ=UI -M$X[]CIZY1A5BE"NX5.W8[^A9:50M1K."2]6._8Z>K49U8O2[DF6_H^>H4?[$ -M7X(@K]-P['?TS#6J$*-]*EOV.GJ-&^5,CM6LVX=COZ)EK5"%&N8)+U8[]CIZ51M5B-"NX5.W8[^C9 -M:E0G1K\K6?8[>HX:Y4_\_R?(ZS0<^QT]J -M'?L=/5N-ZL3H=R7+?D?/4:/\B?PCY'4:COV.GKE&%6*4*[A4[=COZ%EI5"U& -MLX)+U8[]CIZM1G5B]+N29;^CYZA1_M1)[;HMN"8+M:-GKE&%&.4*+E&[AOV. -MGI5&U6(T*[A$[1KV.WJV&M6)T>]*EOV.GJ-&^5,OM>LWX=COZ)EK5"%&N8)+ -MU8[]CIZ51M5B-"NX5.W8[^C9:E0G1K\K6?8[>HX:Y4^#U&[8A&._HV>N4848 -MY0HN53OV.WI6&E6+T:S@4K5COZ-GJU&=&/VN9-GOZ#EJE#^-4KMQ$X[]CIZY -M1A5BE"NX5.W8[^A9:50M1K."2]6._8Z>K49U8O2[DF6_H^>H49E,SR"ODW#G -M;*E=],PUJA"C7,$E:G<._2YZ5AI5B]&LX!*U.X=^%SU;C>K$Z'^@_!V$O]N1+/N=\'=0 -M_@["WV&3TFK9[X2_@_)W$/X.F_Q=RWXG_!V4OX/P=]CD[UKV.^'OH/P=A+_; -MD2S[G?!W4/X.PM]AD])JV>^$OX/R=Q#^#IO\7]V),M^)_P=E+^#\'?8I+0Z]COA[Z#\'82_PR9_U['? -M"7\'Y>\@_!TV^;N._4[X.RA_!^'O=B3+?B?\'92_@_!WV*2T.O8[X>^@_!V$ -MO\,F?]>QWPE_!^7O(/P=-OF[COU.^#LH?P?A[W8DRWXG_!V4OX/P=]BDM#KV -M.^'OH/P=A+_#)G_7L=\)?P?E[R#\'3;YNX[]3O@[*'\'X>]V),M^)_P=E+^# -M\'?8I+3Z+-1.^#LH?P?A[[#)W_7L=\+?0?D["'^'3?ZN9[\3_@[*WT'XNQW) -MLM\)?P?E[R#\'38IK9[]3O@[*'\'X>^PR=_U['?"WT'Y.PA_ATW^KF>_$_X. -MRM]!^+L=R;+?"7\'Y>\@_!TV*:V>_4[X.RA_!^'OL,G?]>QWPM]!^3L(?X=- -M_JYGOQ/^#LK?0?B['NKFZPU@>.XU[`_'JZ?H]CNLB>7,;GKP^S?C'./):J_SK`!?O)OI*Q/F[B;X2?O)OI*Q/F[B;X2?O)OI*Q/F[B;X2?O)OI*Q/F[B;X2 -M?O)OI*6+1>P^#&,1R+N;][QT?=]^ -M][U[_?4/;SW8/^[3G1_O/':NZ=U0>8CUZO!$NF\?WQW%_'CGJ?K'ZFJR>1+N -MJVLW6S$_WGGLGX"[=J3ABJ>B/O=)X,7\>&>-4O6MJTM7'_WS>_MS$N[="NYD -M?.7-3YYM3Z[J_/.#2[AN?MAS?_*TM*NGVV2Y)X[NV'LE0@5W]$]D/ES>__7P -M?@'[P^$_OP_K6YX\B^M'^HU4]8KC4U>$7]1&NFX-EUM7S_^^TI9FU6O"Q7+M -M2+^1K-YYJ5[B6VU:U+5;=X+CM]IOUG"MX.#V=X=W@XP[O#PYG>'1[0\.[P<(9WAXV%>K=&?.,?G5_\27^/7-&`R_Q#W< -BDU_BXY!.-OP\2-;P2]S#F7Z)%_[IG=D7_P=,%9H/M&4````` +M'XL(",=Q+ED``VEM9RTQ>#$M-3$R+6=P="YV;61K+F]U=`"M7%V/W,81?/>O +MF,@/#A)DP5J2R^6#@-@Y&S""`(JEQ"]Y"#_C0^23N/SY +MZB]_/_#GMX?#Y8L%##Y*0I`IG!BK][D<'OP0[OA'PJA*MKYL.]?R%P+@*Y%5SY1$[)9)];W>^^",7SZ\O]&J;M/=6N +MRMVI#:8[E;.=N^HX'\M<-3F-$^"7[NKZT[_=U?"IN[W^>/ +M_]1YA"FQZN1?^`,>KO80I\'EOMPYF:'C\TMX7S4M)#IO:<\%/=TW7!SYQ''\!-7Y_T9\V\ZZYR_OKNY^NN[=3 +MFI^&5X%.OG;3!I[#NI:LIY!3G95^^_=_=E*_KP\Y>$VY>Q)S$]-[E +MT965QYHV<-Z*H\L+_VKZIVG!4R8%O).[?+@Y_/#C=(G[8KU]\_4/A#M/49/G +MM,`I9$IHE5.YY%\^/"W=Y>VW[I5/\MU/PWP&$JY>+C/OO.P#9O/H7X2J+?"^ +MB17^P+RS[JJY:]PWS:?A\.75U3=Q9QN?;#$_IJ4-'N6T0/OS>R[G5+AEIY>- +MGK>B[]M#TSUN-_&]?M4\TZ-_HQQE]?NU74_[:F' +M_=?PX6?"=[5O*MQ>80;_.KZ1PN<]S,4,BXJOJV[ +M_#PO[Z>AZ:>E3=B$&_WJCD^O(U3JP5M-Z.YR7[49]U.`R[/0`O+0RE8EBLM9 +MWE`:Z-#=?;A=%O9*^G'^\+/LI?VX>/216OU*P`7.>GVG[,'G6:YQA1CE"M!_ +MBF73[Q^GWS?WZSOY]9W$L]*HLQCU"NZ?$\3'Q^F>_%78B&>K49T8_9[JG7QK +M&\1S?%@]?M6`O$[#\;L`/7.-*L0H5W"IVI6A=O2L-.HL1KV"2]7N%&I'SU:C +M.C'Z7N8:58A1KN!2M:M#[>A9:=19C'H% +MEZI=$VI'SU:C.C'Z7JW1!J1\]6HSHQ^EW)CJ%V]!PURC\54KMB"Z[*0NWHF6M4(4:Y +M@DO4KF*_HV>E46E4:=Q:A7<*G:L=_1L]6H3HQ^5[+L=_0<-N4848Y0HN53OV.WI6&G46HU[!I6K'?D?/5J,Z,?I=R;+?T7/4 +M*/]$0@;R.@EWSD+MZ)EK5"%&N8)+U.[,?D?/2J/.8M0KN$3MSNQW]&PUJA.C +MWY4L^QT]1XWR3[74KMZ$8[^C9ZY1A1CE"BY5._8[>E8:=1:C7L&E:L=^1\]6 +MHSHQ^EW)LM_1<]0H_\3_/T%>I^'8[^B9:U0A1KF"2]6._8Z>E4:=Q:A7<*G: +ML=_1L]6H3HQ^5[+L=_0<-H0HQR!9>J'?L=/2N-.HM1 +MK^!2M6._HV>K49T8_:YDV>_H.6J4?^JD=MT67)V%VM$SUZA"C'(%EZA=S7Y' +MSTJCSF+4*[A$[6KV.WJV&M6)T>]*EOV.GJ-&^:=>:M=OPK'?T3/7J$*,<@67 +MJAW['3TKC3J+4:_@4K5COZ-GJU&=&/VN9-GOZ#EJE'\:I';#)AS['3USC2K$ +M*%=PJ=JQW]&STJBS&/4*+E4[]CMZMAK5B='O2I;]CIZC1OFG46HW;L*QW]$S +MUZA"C'(%EZH=^QT]*XTZBU&OX%*U8[^C9ZM1G1C]KF39[^@Y:E0FTS/(ZR1< +MDRVUBYZY1A5BE"NX1.V:T.^B9Z519S'J%5RB=DWH=]&SU:A.C'Y7LJ'?1<]1 +MHWS)A+_#)J75A'X'X>^@_!V$O\,F?]>$?@?A[Z#\'82_PR9_UX1^!^'OH/P= +MA+_;D6SH=Q#^#LK?0?@[;%):3>AW$/X.RM]!^#ML\G=-Z'<0_@[*WT'X.VSR +M=TWH=Q#^#LK?0?B['^@_!V$O\,F?]>$?@?A[Z#\'82_VY%LZ'<0_@[*WT'X.VQ26FT6:B?\'92_ +M@_!WV.3O6O8[X>^@_!V$O\,F?]>RWPE_!^7O(/S=CF39[X2_@_)W$/X.FY16 +MRWXG_!V4OX/P=]CD[UKV.^'OH/P=A+_#)G_7LM\)?P?E[R#\W8YDV>^$OX/R +M=Q#^#IN45LM^)_P=E+^#\'?8Y.]:]COA[Z#\'82_PR9_U[+?"7\'Y>\@_-V. +M9-GOA+^#\G<0_@Z;E%;+?B?\'92_@_!WV.3O6O8[X>^@_!V$O\,F?]>RWPE_ +M!^7O(/S=CF39[X2_@_)W$/X.FY16EX7:"7\'Y>\@_!TV^;N._4[X.RA_!^'O +ML,G?=>QWPM]!^3L(?[^@_!V$O\,FI=6QWPE_!^7O(/P=-OF[COU. +M^#LH?P?A[[#)WW7L=\+?0?D["'^W(UGV.^'OH/P=A+_#)J75L=\)?P?E[R#\ +M'3;YNX[]3O@[*'\'X>^PR=]U['?"WT'Y.PA_MR-9]COA[Z#\'82_PR:EU;'? +M"7\'Y>\@_!TV^;N._4[X.RA_!^'OL,G?=>QWPM]!^3L(?[^@_!V$ +MO\,FI=5GH7;"WT'Y.PA_ATW^KF>_$_X.RM]!^#ML\G<]^YWP=U#^#L+?[4B6 +M_4[X.RA_!^'OL$EI]>QWPM]!^3L(?X=-_JYGOQ/^#LK?0?@[;/)W/?N=\'=0 +M_@["W^U(EOU.^#LH?P?A[[!):?7L=\+?0?D["'^'3?ZN9[\3_@[*WT'X.VSR +M=SW[G?!W4/X.PM_M2);]3O@[*'\'X>^P26GU['?"WT'Y.PA_ATW^KF>_$_X. +MRM]!^#ML\G<]^YWP=U#^#L+?[4B6_4[X.RA_%\5TD-<"YY;?`#=D2^V>E)0_ +M\4^Q=N[)U0W6^L!QW`N8/YVNW^.8+K)GE_'YZ\.L7XPSCZ7JOPYP@3.N'^+\ +M7Y^DK$^3L?+])7(L[?^7B1OA)Q_L['B_25B/-W$WTEXOS=1%^).'\W +MT5+\W41?B3A_ +M-]%7(L[?3?25B/-W$WTEXOS=1%^).'\WT5+\W41?B3A_-]%7(L[?3?25B/-W$WTEXOS=1%^) +M.'\WT5#\W49?"<[?;?25X/S=1E\)SM]M])7@ +M_-U&7PG.WVWTE>#\W49?"<[?;?25X/S=1E\)SM]M])7@_-U&7PG.WVWTE>#\ +MW49?"<[?;?25X/S=1E\)SM]M])7@_-U&7PG.WVWTE>#\W49?"<[?;?25X/S= +M1E\)SM]M])7@_-U&7PG.WVWTE>#\W49?"<[?;?25X/S=1E\)SM]M])7@_-U& +M7PG.WVWTE8CS=WJ^2%^).'^GYXOTE8CS=WJ^2%^).'^GYXOTE8CS=Q-])>+\ +MW41?B3A_-]%7(L[?3?25B/-W$WTEXOS=1%^).'\WT5+\W41?B3A_-]%7(L[?3?25B/-W$WTE +MXOS=1%^).'\WT5+\W41?B3A_-]%7(L[?3?25X/S=1E^)P51?B<%47XG!5%^)P51?B<%47XG! +M5%^)P51?B<%47XG!5%^)P51?B<%47XG!5%^)P51?B<%47XG!5%^),'QV&9^_OF*N +MWW)WU<=_IP]7EGWK*(<'/N9:?K^_:[ +M[]V;KW]XY\'^<9_N?'OGL7-U[X;*0ZQ7AV?2???XZBCFVSL_KC;A\B3<5T]= +M;,5\>^>Q?P;NJ4<:KG@NZG/O!%[,MW?6*%7?NG/ISD=__]Z^2<*]7\&=C,^\ +M^EG;GZ3)9_N=W=,?>*Q$JN*._(_/A19//]('4M4KCL^=$7Y1&^FZ-5QN73W_?:4MS:I7AY/EJ4?Z +M0+)ZS5*]Q*?:M*BG+MT)CI]JOUG#M<;5FU7YB_#D\=_I`YVN#@]G>'5X.,.KP\.97AT>T/#J\'"&5X>',[PZ/)SIU5'X&T;:?8A[ +M.'_N]5/-:W\/_W)]UJ0_CJ?U_?AV7MA7JW1GSC'YT?_,A_C3FS$8?HA[N&<_ +@Q,9"LX8>XAS/]$"_\W3NS+_X/OKS-T+1E```` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.gz.uu Wed May 31 07:49:49 2017 (r319294) +++ head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.gz.uu Wed May 31 08:01:12 2017 (r319295) @@ -1,132 +1,132 @@ # $FreeBSD$ begin 644 img-63x255-4096-gpt.qcow.gz -M'XL(",8S(E0``VEM9RTV,W@R-34M-#`Y-BUG<'0N<6-O=RYO=70`K9W;;AS7 -MM47?_16ENT1)5*^UJJJK=$^`!,B;$YSS=@Z0NCX&G7=]?-CDOI"KY]2*(=J$ -M(4.HB>ZMP4'9'MX\'.[^:)I.FK9OVK'9Y^;F[].'-/?^YN%'\^/O?_W;]?T_ -M?OQV-R:'GSSE_K[51M/<@ZT_-V5.ST\MS6'\+^9N/@3-W7MU]@=>W;TW>SEW -M]=O=F\7/*1NT!X--FCNDUR?D]-K_[O5]=V]7[D[O\=ZNDK?;L<'^P>#O:>Z? -MZ?4I>;M'-C<\F#NYMZOD[8YL;OHI+$I@F=G<$LRU\*F5S6W!7`>?VO&<_.37 -M]FZNAT\)FX.?M]=-F3O"IXS-M0_F#M<9Z#PWP*<(=Q)R-\*G"'<2,.PNY0[XSQIV%W"'?&>/.0NZ0[XQQ9R%WR'?&N+.0.^0[ -M8]RU(7?(=RWCK@VY0[YK&7=MQ)WBIPAW;<2=(M^UC+LVXDZ1[UK&71MQI\AW -M+>.NC;A3Y+N6<==&W"GR7*?-XZT/ND.]ZQET?.NC[@S -MY+N><7>,N#/DNR/C[AAQ9\AW1\;=,>0.^>[(N#N&W"'?'1EWQY`[Y+LCX^X8 -MZFB+L. -M^6YBW$T1=QWRW<2XFR+N.N2[B7$W1=QUR'<3XR[_9T@^AWPW,^[FB+L.^6YF -MW,TA=\AW,^-N#KE#OIL9=W/('?+=S+B;0^Z0[V;&W1QRAWPW,^[FD#ODNYEQ -MMX3<(=\MC+LEY`[Y;F'<+1%W/7Z*<+=$W/7(=POC;HFXZY'O%L;=$G'7(]\M -MC+LEXJY'OEL8=TO$78]\MS#NUHB['OEN9=RM$7<]\MW*N%M#[I#O5L;=&G*' -M?+\VQMT6 -M<7=$OML8=WO$W1'Y;F?<[1%W1^2[G7&WA]PAW^V,NSWD#OEN9]SM(7?(=SOC -M;@^Y0[[;&7=[R!WRWLOY.POQN`[X3U=Q+V=P/PG;#^3L+^;@"^$];?2=C?# Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7942AF9BB0; Wed, 31 May 2017 08:07:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 978216A491; Wed, 31 May 2017 08:07:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V87pGx005784; Wed, 31 May 2017 08:07:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V87peV005783; Wed, 31 May 2017 08:07:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310807.v4V87peV005783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319296 - stable/11/tests/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:07:52 -0000 Author: ngie Date: Wed May 31 08:07:51 2017 New Revision: 319296 URL: https://svnweb.freebsd.org/changeset/base/319296 Log: MFC r319062: Initial `srv` before using it in bind(2) CID: 1357526 Modified: stable/11/tests/sys/netinet/tcp_user_cookie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/netinet/tcp_user_cookie.c ============================================================================== --- stable/11/tests/sys/netinet/tcp_user_cookie.c Wed May 31 08:01:12 2017 (r319295) +++ stable/11/tests/sys/netinet/tcp_user_cookie.c Wed May 31 08:07:51 2017 (r319296) @@ -72,6 +72,7 @@ main(int argc, char **argv) if (sock < 0) err(EXIT_FAILURE, "socket"); + memset(&srv, 0, sizeof(srv)); srv.sin_len = sizeof(srv); srv.sin_family = AF_INET; srv.sin_port = htons(port); From owner-svn-src-all@freebsd.org Wed May 31 08:21:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73530AF9E86; Wed, 31 May 2017 08:21:18 +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 070BB6AA56; Wed, 31 May 2017 08:21:17 +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 v4V8LH04012228; Wed, 31 May 2017 08:21:17 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8LHDu012226; Wed, 31 May 2017 08:21:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201705310821.v4V8LHDu012226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 31 May 2017 08:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319297 - in stable/11/contrib/byacc: . package package/debian package/pkgsrc test test/btyacc test/yacc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:21:18 -0000 Author: delphij Date: Wed May 31 08:21:16 2017 New Revision: 319297 URL: https://svnweb.freebsd.org/changeset/base/319297 Log: MFC r306691,310036: Merge byacc 20161202. Modified: stable/11/contrib/byacc/CHANGES stable/11/contrib/byacc/MANIFEST stable/11/contrib/byacc/VERSION stable/11/contrib/byacc/aclocal.m4 stable/11/contrib/byacc/btyaccpar.c stable/11/contrib/byacc/btyaccpar.skel stable/11/contrib/byacc/config.guess stable/11/contrib/byacc/config.sub stable/11/contrib/byacc/configure stable/11/contrib/byacc/defs.h stable/11/contrib/byacc/error.c stable/11/contrib/byacc/lalr.c stable/11/contrib/byacc/lr0.c stable/11/contrib/byacc/main.c stable/11/contrib/byacc/mkpar.c stable/11/contrib/byacc/mstring.c stable/11/contrib/byacc/output.c stable/11/contrib/byacc/package/byacc.spec stable/11/contrib/byacc/package/debian/changelog stable/11/contrib/byacc/package/mingw-byacc.spec stable/11/contrib/byacc/package/pkgsrc/Makefile stable/11/contrib/byacc/reader.c stable/11/contrib/byacc/skel2c stable/11/contrib/byacc/test/btyacc/btyacc_calc1.tab.c stable/11/contrib/byacc/test/btyacc/btyacc_demo.error stable/11/contrib/byacc/test/btyacc/btyacc_demo.output stable/11/contrib/byacc/test/btyacc/btyacc_demo.tab.c stable/11/contrib/byacc/test/btyacc/btyacc_demo.tab.h stable/11/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c stable/11/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c stable/11/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c stable/11/contrib/byacc/test/btyacc/calc.tab.c stable/11/contrib/byacc/test/btyacc/calc1.tab.c stable/11/contrib/byacc/test/btyacc/calc2.tab.c stable/11/contrib/byacc/test/btyacc/calc3.tab.c stable/11/contrib/byacc/test/btyacc/code_calc.code.c stable/11/contrib/byacc/test/btyacc/code_calc.tab.c stable/11/contrib/byacc/test/btyacc/code_calc.tab.h stable/11/contrib/byacc/test/btyacc/code_error.code.c stable/11/contrib/byacc/test/btyacc/code_error.tab.c stable/11/contrib/byacc/test/btyacc/empty.tab.c stable/11/contrib/byacc/test/btyacc/err_inherit1.tab.c stable/11/contrib/byacc/test/btyacc/err_inherit2.tab.c stable/11/contrib/byacc/test/btyacc/err_inherit3.output stable/11/contrib/byacc/test/btyacc/err_inherit3.tab.c stable/11/contrib/byacc/test/btyacc/err_inherit4.output stable/11/contrib/byacc/test/btyacc/err_inherit4.tab.c stable/11/contrib/byacc/test/btyacc/err_inherit4.tab.h stable/11/contrib/byacc/test/btyacc/err_inherit5.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax1.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax10.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax11.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax12.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax13.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax14.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax15.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax16.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax17.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax18.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax19.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax2.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax20.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax21.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax22.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax23.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax24.error stable/11/contrib/byacc/test/btyacc/err_syntax24.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax25.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax26.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax27.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax3.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax4.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax5.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax6.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax7.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax7a.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax7b.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax8.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax8a.tab.c stable/11/contrib/byacc/test/btyacc/err_syntax9.tab.c stable/11/contrib/byacc/test/btyacc/error.tab.c stable/11/contrib/byacc/test/btyacc/grammar.tab.c stable/11/contrib/byacc/test/btyacc/inherit0.tab.c stable/11/contrib/byacc/test/btyacc/inherit1.tab.c stable/11/contrib/byacc/test/btyacc/inherit2.output stable/11/contrib/byacc/test/btyacc/inherit2.tab.c stable/11/contrib/byacc/test/btyacc/ok_syntax1.tab.c stable/11/contrib/byacc/test/btyacc/pure_calc.tab.c stable/11/contrib/byacc/test/btyacc/pure_error.tab.c stable/11/contrib/byacc/test/btyacc/quote_calc-s.tab.c stable/11/contrib/byacc/test/btyacc/quote_calc.tab.c stable/11/contrib/byacc/test/btyacc/quote_calc2-s.tab.c stable/11/contrib/byacc/test/btyacc/quote_calc2.tab.c stable/11/contrib/byacc/test/btyacc/quote_calc3-s.tab.c stable/11/contrib/byacc/test/btyacc/quote_calc3.tab.c stable/11/contrib/byacc/test/btyacc/quote_calc4-s.tab.c stable/11/contrib/byacc/test/btyacc/quote_calc4.tab.c stable/11/contrib/byacc/test/btyacc/rename_debug.c stable/11/contrib/byacc/test/btyacc/varsyntax_calc1.tab.c stable/11/contrib/byacc/test/code_calc.y stable/11/contrib/byacc/test/err_inherit4.y stable/11/contrib/byacc/test/run_make.sh stable/11/contrib/byacc/test/yacc/calc.tab.c stable/11/contrib/byacc/test/yacc/calc1.tab.c stable/11/contrib/byacc/test/yacc/calc2.tab.c stable/11/contrib/byacc/test/yacc/calc3.tab.c stable/11/contrib/byacc/test/yacc/code_calc.code.c stable/11/contrib/byacc/test/yacc/code_calc.tab.c stable/11/contrib/byacc/test/yacc/code_calc.tab.h stable/11/contrib/byacc/test/yacc/code_error.code.c stable/11/contrib/byacc/test/yacc/empty.tab.c stable/11/contrib/byacc/test/yacc/err_syntax10.tab.c stable/11/contrib/byacc/test/yacc/err_syntax11.tab.c stable/11/contrib/byacc/test/yacc/err_syntax12.tab.c stable/11/contrib/byacc/test/yacc/err_syntax18.tab.c stable/11/contrib/byacc/test/yacc/err_syntax20.tab.c stable/11/contrib/byacc/test/yacc/err_syntax24.error stable/11/contrib/byacc/test/yacc/error.tab.c stable/11/contrib/byacc/test/yacc/grammar.tab.c stable/11/contrib/byacc/test/yacc/ok_syntax1.tab.c stable/11/contrib/byacc/test/yacc/pure_calc.tab.c stable/11/contrib/byacc/test/yacc/pure_error.tab.c stable/11/contrib/byacc/test/yacc/quote_calc-s.tab.c stable/11/contrib/byacc/test/yacc/quote_calc.tab.c stable/11/contrib/byacc/test/yacc/quote_calc2-s.tab.c stable/11/contrib/byacc/test/yacc/quote_calc2.tab.c stable/11/contrib/byacc/test/yacc/quote_calc3-s.tab.c stable/11/contrib/byacc/test/yacc/quote_calc3.tab.c stable/11/contrib/byacc/test/yacc/quote_calc4-s.tab.c stable/11/contrib/byacc/test/yacc/quote_calc4.tab.c stable/11/contrib/byacc/test/yacc/rename_debug.c stable/11/contrib/byacc/test/yacc/varsyntax_calc1.tab.c stable/11/contrib/byacc/verbose.c stable/11/contrib/byacc/yaccpar.c stable/11/contrib/byacc/yaccpar.skel Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/byacc/CHANGES ============================================================================== --- stable/11/contrib/byacc/CHANGES Wed May 31 08:07:51 2017 (r319296) +++ stable/11/contrib/byacc/CHANGES Wed May 31 08:21:16 2017 (r319297) @@ -1,5 +1,203 @@ -2016-03-24 Thomas E. Dickey +2016-12-02 Thomas E. Dickey + * test/btyacc/quote_calc4-s.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/rename_debug.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc /btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, btyaccpar.c: + regen + + * btyaccpar.skel: changes from NetBSD + + use YYINT rather than short in btyaccpar.skel + (some of this had already been done by Tom Shields) + + remove some casts of malloc/realloc + + * yaccpar.c, yaccpar.skel, output.c: changes from NetBSD + - Add some more bison stuff to make the mesa/gallium parser work: + %initial-action (add missing source struct member in location) + %debug (unimplemented) + %error-verbose (unimplemented) + + This changes some existing code: + + yylloc is now a pointer, so + + the first parameter to YYERROR_DECL() is a pointer + + struct YYLTYPE now has a "source" field + + * test/btyacc/btyacc_demo.tab.h, test/btyacc/code_calc.tab.c, test/btyacc/code_error.tab.c, test/btyacc/err_inherit4.tab.h: + regen + + * btyaccpar.c, btyaccpar.skel, reader.c: changes from NetBSD + - Add some more bison stuff to make the mesa/gallium parser work: + %initial-action (add missing source struct member in location) + %debug (unimplemented) + %error-verbose (unimplemented) + + This changes some existing code: + + yylloc is now a pointer, so + + the first parameter to YYERROR_DECL() is a pointer + + struct YYLTYPE now has a "source" field + + * reader.c: + fix from NetBSD: correct off-by-one when adding a null in copy_param() + + * reader.c: adapted from NetBSD + - Convert *most* error fingerprints to: + -unterminated_arglist(int a_lineno, char *a_line, char *a_cptr) + +unterminated_arglist(const struct ainfo *a) + - Cast new args to unsigned char + + * defs.h: changes from NetBSD + - Add some more bison stuff to make the mesa/gallium parser work: + %initial-action (add missing source struct member in location) + %debug (unimplemented) + %error-verbose (unimplemented) + + This changes some existing code: + + yylloc is now a pointer, so + + the first parameter to YYERROR_DECL() is a pointer + + struct YYLTYPE now has a "source" field + + * defs.h: adapted from NetBSD + - Convert *most* error fingerprints to: + -unterminated_arglist(int a_lineno, char *a_line, char *a_cptr) + +unterminated_arglist(const struct ainfo *a) + - Cast new args to unsigned char + + * main.c: changes from NetBSD + - Add some more bison stuff to make the mesa/gallium parser work: + %initial-action (add missing source struct member in location) + %debug (unimplemented) + %error-verbose (unimplemented) + + This changes some existing code: + + yylloc is now a pointer, so + + the first parameter to YYERROR_DECL() is a pointer + + struct YYLTYPE now has a "source" field + + * error.c: adapted from NetBSD + - Convert *most* error fingerprints to: + -unterminated_arglist(int a_lineno, char *a_line, char *a_cptr) + +unterminated_arglist(const struct ainfo *a) + - Cast new args to unsigned char + + * mstring.c: adapted change from NetBSD to add casts for ctype macros + + * test/btyacc/btyacc_demo.tab.h, test/btyacc/err_inherit4.tab.h: regen + + * output.c: reorder to eliminate a forward-reference + +2016-12-02 Tom.Shields + + * output.c: + modify output to enable compilation of a lexer generated by flex (using + "%option bison-bridge" and "%option bison-locations") to be used with a parser + generated by b(t)yacc (using directives "%locations" and "%pure-parser"). + +2016-12-02 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: Improved autoconf macros + CF_CC_ENV_FLAGS + + improve split between compiler and options, prompted by report where user + had "ccache" before the compiler + + leave non-preprocessor options in "$CC" (but still copy them to "$CFLAGS" + since that's where they should be) + CF_GNU_SOURCE,v + + recent glibc (Debian 2.23-4 for example) has misordered ifdef/checks for new + symbol _DEFAULT_SOURCE, producing warning messages when only _GNU_SOURCE is + defined. Add a followup check to define _DEFAULT_SOURCE. + CF_XOPEN_SOURCE + + add "uclinux" to list of Linux's (patch by Yann E. Morin) + + use _GNU_SOURCE for cygwin headers + + build-fixes for OS/2 + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2016-11-20 Thomas E. Dickey + + * config.sub: 2016-11-19 + + * config.guess: 2016-10-02 + +2016-06-06 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: improved autoconf macros: + CF_CC_ENV_FLAGS - don't limit the check to -I, -U and -D options, since the + added options can include various compiler options before and after + preprocessor options. + CF_PROG_LINT - add cpplint to programs to use; drop ad hoc tdlint and alint. + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * lalr.c: indented + + * btyaccpar.c: regen + + * skel2c: + adjust whitespace so that generated skeleton will follow the same format + as other code + + * mkpar.c, verbose.c, lr0.c, reader.c, error.c, output.c: indented + + * reader.c: fix two compiler warnings + + * test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/rename_debug.c, btyaccpar.c, test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/err_syntax20.tab.c, test/yacc/error.tab.c, test/yacc/grammar.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/rename_debug.c, yaccpar.c: + regen + +2016-06-06 Tom.Shields + + * btyaccpar.skel, yaccpar.skel: + small fix for an edge case of initialized data in Chris Dodd's btyacc changes: + "Avoid crash when input pops up an Action error at the first token" + +2016-06-01 Thomas E. Dickey + + * test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/err_syntax20.tab.c, test/yacc/err_syntax24.error, test/yacc/error.tab.c, test/yacc/grammar.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_calc.tab.c, test/yacc/code_calc.tab.h, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/rename_debug.c, yaccpar.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3- s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax13.tab.c, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax16.tab.c, test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax2.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax24.error, test/btyacc/err_syntax24.tab.c, test/btyacc/err_syntax25.tab.c, test/btyacc/err_syntax26.tab.c, test/btyacc/err_syntax27.tab.c, test/btyacc/err_syntax3.tab.c, test/btyacc/err_syntax4.tab.c, test/btyacc/err_syntax5.tab.c, test/btyacc/err_syntax6.tab.c, test/btyacc/err_syntax7.tab.c, test/btyacc/err_syntax7a.tab.c, test/btyacc/err_syntax7b.tab.c, test/btyacc/err_syntax8.tab.c, test/btyacc/err_syntax8a.tab.c, test/btyacc/err_syntax9.tab.c, te st/btyacc/error.tab.c, test/btyacc/grammar.t! ab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.output, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.error, test/btyacc/btyacc_demo.output, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_calc.tab.c, test/btyacc/code_calc.tab.h, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit1.tab.c, test/btyacc/err_inherit2.tab.c, test/btyacc/err_inherit3.output, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.output, test/btyacc/err_inherit4.tab.c, test/btyacc/err_inherit5.tab.c, test/btyacc/err_syntax1.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.t ab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/rename_debug.c, btyaccpar.c: + regen + +2016-06-01 Tom.Shields + + * btyaccpar.skel, defs.h, error.c, output.c, reader.c, test/code_calc.y, test/err_inherit4.y, test/run_make.sh, yaccpar.skel: + fixes for issues in btyacc (report by Francis Andre): + + + correction to the placement of the #line directive for a %union specification + + + recovery of a set of casts originally added into btyaccpar.c rather than into + btyaccpar.skel, and so are lost whenever building from scratch + + + Chris Dodd's btyacc improved handling of inherited attributes to eliminate + implicit empty copy rules that are not necessary, and thereby avoiding the + introduction of extra parsing ambiguity + + + Chris Dodd's added support for @-N syntax to reference inherited position + information + + + correction to bad interaction between %token-table and YYDEBUG, where YYDEBUG + was required to be defined in order to compile the generated code + + + correction to yyname[] access in code included with YYDEBUG defined for + single character symbols not recognized (e.g., input containing '&' character + where grammar doesn't define that as a symbol) - map to existing + "illegal-symbol" entry in byname[] + + + fixes to test/run_make.sh: skip test-err_* files; in the bison test phase + skip additional files that contain features not supported by bison and + inhibit new bison warning messages + + + minor changes to btyaccpar.skel & yaccpar.skel so they are more similar in + their commonality; makes it easier to maintain the pair of files using + vimdiff + + + changes to a couple of test cases for coverage of #3, #4 and #5 above + +2016-06-01 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2016-03-24 Thomas E. Dickey + * reader.c: unused variable * package/pkgsrc/Makefile, package/debian/copyright: bump @@ -11,7 +209,7 @@ the first occurrence of ".c" in the name in 2005-08-13 changes rather than at the end of the filename (patch by Jung-uk Kim) -2016-03-24 Thomas E. Dickey +2016-03-24 Thomas E. Dickey * aclocal.m4: update CF_WITH_MAN2HTML to use configured shell rather than /bin/sh @@ -19,11 +217,11 @@ * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: bump -2016-01-25 Thomas E. Dickey +2016-01-25 Thomas E. Dickey * config.guess, config.sub: 2016-01-01 -2015-07-10 Thomas E. Dickey +2015-07-10 Thomas E. Dickey * lr0.c: fix a duplicate-free in the leak-checking @@ -38,7 +236,7 @@ make relationship with format/size clearer (prompted by discussion with Pedro Giffuni, Oliver Pinter) -2015-07-05 Thomas E. Dickey +2015-07-05 Thomas E. Dickey * configure: regen @@ -52,13 +250,13 @@ * configure.in: add configure option --with-man2html -2015-05-02 Thomas E. Dickey +2015-05-02 Thomas E. Dickey * config.guess: 2015-03-04 * config.sub: 2015-03-08 -2014-11-28 Thomas E. Dickey +2014-11-28 Thomas E. Dickey * lr0.c: coverity #39181: memory leak @@ -80,7 +278,7 @@ Regards Jouk. -2014-10-06 Thomas E. Dickey +2014-10-06 Thomas E. Dickey * package/debian/source/format: change to native format to work around regression in Debian packaging. @@ -100,7 +298,7 @@ better fix for get_line, by ensuring there is enough space to null-terminate its result (prompted by discussion with Craig Rodrigues). -2014-10-05 Thomas E. Dickey +2014-10-05 Thomas E. Dickey * main.c: make change to umask before calling mkstemp, as suggested in Coverity #56902 @@ -171,7 +369,7 @@ modify copy_param() to handle resulting comma-separated list. Before, it only expected a single parameter. -2014-10-04 Thomas E. Dickey +2014-10-04 Thomas E. Dickey * reader.c: split-out save_param() from copy_param() @@ -192,28 +390,28 @@ * test/btyacc/btyacc_destroy3.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.error, test/btyacc/btyacc_destroy3.output, test/btyacc/btyacc_destroy3.tab.h, test/btyacc/btyacc_destroy2.error, test/btyacc/btyacc_destroy2.output, test/btyacc/btyacc_destroy2.tab.h: RCS_BASE -2014-10-03 Thomas E. Dickey +2014-10-03 Thomas E. Dickey * test/btyacc/btyacc_demo2.error, test/btyacc/btyacc_demo2.output, test/btyacc/btyacc_demo2.tab.c, test/btyacc/btyacc_demo2.tab.h, test/btyacc/btyacc_destroy1.error, test/btyacc/btyacc_destroy1.output, test/btyacc/btyacc_destroy1.tab.h, test/btyacc_destroy3.y, test/btyacc_destroy1.y, test/btyacc_destroy2.y: RCS_BASE -2014-10-02 Thomas E. Dickey +2014-10-02 Thomas E. Dickey * main.c, reader.c, defs.h: use calloc in get_line() when allocating line to ensure it is fully initialized, fixes a later uninitialized value in copy_param() (FreeBSD #193499). -2014-09-17 Thomas E. Dickey +2014-09-17 Thomas E. Dickey * closure.c, lalr.c, output.c, defs.h: rephrase odd addressing to fix Coverity #48848, #38950, #38860, not actually a bug. -2014-09-01 Thomas E. Dickey +2014-09-01 Thomas E. Dickey * config.sub: update to 2014-07-28 -2014-07-27 Thomas E. Dickey +2014-07-27 Thomas E. Dickey * configure: regen @@ -222,7 +420,7 @@ * package/pkgsrc/Makefile, VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec: bump -2014-07-15 Thomas E. Dickey +2014-07-15 Thomas E. Dickey * aclocal.m4: resync with my-autoconf (no change to configure script) @@ -233,7 +431,7 @@ make top-level "make check" work again, by adding another step to filtering the test results. -2014-07-14 Thomas E. Dickey +2014-07-14 Thomas E. Dickey * test/run_test.sh: changes from Garrett Cooper's patch: a) ensure that the script returns an error-code if there are differences @@ -252,12 +450,12 @@ * main.c: remove obsolete -D option from usage message -2014-05-27 Thomas E. Dickey +2014-05-27 Thomas E. Dickey * VERSION, package/byacc.spec, package/debian/changelog, test/yacc/big_b.output, test/yacc/big_l.output, test/yacc/help.output, test/yacc/no_b_opt.output, test/yacc/no_output2.output, test/yacc/no_p_opt.output, test/yacc/nostdin.output: bump -2014-04-22 Thomas E. Dickey +2014-04-22 Thomas E. Dickey * mstring.c: use vsnprintf() to ensure that msprintf's buffer is large enough. @@ -285,12 +483,12 @@ drop "NOTES-btyacc-Changes" and "NOTES-btyacc-Disposition", merging relevant content into README.BTYACC -2014-04-22 Thomas E. Dickey +2014-04-22 Thomas E. Dickey * package/pkgsrc/Makefile, VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec: bump -2014-04-19 Thomas E. Dickey +2014-04-19 Thomas E. Dickey * config.sub: 2014-04-03 @@ -300,7 +498,7 @@ * main.c, defs.h: patch to allow DEBUG build with WIN32 system -2014-04-09 Thomas E. Dickey +2014-04-09 Thomas E. Dickey * output.c, reader.c: gcc warnings @@ -341,7 +539,7 @@ * yacc.1: clarify relationship of btyacc features to default configuration. -2014-04-08 Thomas E. Dickey +2014-04-08 Thomas E. Dickey * test/yacc/ok_syntax1.output, test/yacc/ok_syntax1.tab.c, test/yacc/ok_syntax1.tab.h, test/btyacc/ok_syntax1.output, test/btyacc/ok_syntax1.tab.c, test/btyacc/ok_syntax1.tab.h: reference output for testing @@ -364,7 +562,7 @@ * mstring.c: minor reformatting to make coverage analysis simpler -2014-04-07 Thomas E. Dickey +2014-04-07 Thomas E. Dickey * test/run_test.sh: tidy @@ -399,7 +597,7 @@ YYPATCH #define's to make test-outputs easier to compare #line's (report by Tom Shields) -2014-04-06 Thomas E. Dickey +2014-04-06 Thomas E. Dickey * reader.c: fix for valgrind (the calloc's are intentional - valgrind reported use of uninitialized memory) @@ -503,7 +701,7 @@ * test/run_make.sh: modify to avoid use of VPATH, which has no standard implementation -2014-04-05 Thomas E. Dickey +2014-04-05 Thomas E. Dickey * test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c: discard a change which merged CountLines() with explicit comparisons against @@ -534,13 +732,13 @@ * test/btyacc_demo.y: fix prototypes -2014-04-04 Thomas E. Dickey +2014-04-04 Thomas E. Dickey * reader.c, defs.h, main.c: more merging of Tom Shield's btyacc changes. In the merge, I moved the symbol_pval inside the btyacc ifdef's and added some more btyacc ifdefs -2014-04-03 Thomas E. Dickey +2014-04-03 Thomas E. Dickey * reader.c: merge-in 3/4 of btyacc's changes, deferring those which change test-outputs. @@ -554,7 +752,7 @@ Some of the merge uses ifdef-changes which I applied to ongoing resync, e.g., the introduction of PER_STATE. -2014-04-02 Thomas E. Dickey +2014-04-02 Thomas E. Dickey * test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c: regen @@ -589,7 +787,7 @@ * main.c: changes for btyacc -2014-04-01 Thomas E. Dickey +2014-04-01 Thomas E. Dickey * reader.c: integrate change by Tom Shields to use bsearch rather than successive @@ -604,7 +802,7 @@ * verbose.c: changes for btyacc, ifdef'd -2014-04-01 Thomas E. Dickey +2014-04-01 Thomas E. Dickey * mkpar.c: eliminate most of the ifdef's using macros @@ -616,7 +814,7 @@ new functions used for reporting errors from the btyacc configuration (I reordered some, and ifdef'd the new ones -TD) -2014-03-31 Thomas E. Dickey +2014-03-31 Thomas E. Dickey * test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c: omit the GCC_UNUSED, as noted by Tom Shields not really essential @@ -624,7 +822,7 @@ * test/btyacc/empty.tab.c, test/btyacc/err_inherit1.tab.c, test/btyacc/err_inherit2.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_inherit5.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax16.tab.c, test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax24.tab.c: regen -2014-03-29 Thomas E. Dickey +2014-03-29 Thomas E. Dickey * test/yacc/err_syntax22.tab.c, test/yacc/err_syntax23.tab.c, test/yacc/err_syntax24.tab.c, test/yacc/err_syntax25.tab.c, test/yacc/err_syntax26.tab.c, test/yacc/err_syntax3.tab.c, test/yacc/err_syntax4.tab.c, test/yacc/err_syntax5.tab.c, test/yacc/err_syntax6.tab.c, test/yacc/err_syntax7.tab.c, test/yacc/err_syntax7a.tab.c, test/yacc/err_syntax7b.tab.c, test/yacc/err_syntax8.tab.c, test/yacc/err_syntax8a.tab.c, test/yacc/err_syntax9.tab.c, test/yacc/error.tab.c, test/yacc/grammar.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/y acc/err_syntax1.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/err_syntax13.tab.c, test/yacc/err_syntax14.tab.c, test/yacc/err_syntax15.tab.c, test/yacc/err_syntax16.tab.c, test/yacc/err_syntax17.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/err_syntax19.tab.c, test/yacc/err_syntax2.tab.c, test/yacc/err_syntax20.tab.c, test/yacc/err_syntax21.tab.c, skeleton.c: comment-out yysccsid in the banner because it produces unnecessary compiler @@ -634,7 +832,7 @@ * test/run_test.sh: for yacc, ignore the inherit testcases, since they are btyacc-specific -2014-03-28 Thomas E. Dickey +2014-03-28 Thomas E. Dickey * test/yacc/varsyntax_calc1.error, test/yacc/varsyntax_calc1.output, test/yacc/varsyntax_calc1.tab.c, test/yacc/varsyntax_calc1.tab.h, test/yacc/err_inherit3.error, test/yacc/err_inherit3.output, test/yacc/err_inherit3.tab.c, test/yacc/err_inherit3.tab.h, test/yacc/err_inherit4.error, test/yacc/err_inherit4.output, test/yacc/err_inherit4.tab.c, test/yacc/err_inherit4.tab.h, test/yacc/err_inherit5.error, test/yacc/err_inherit5.output, test/yacc/err_inherit5.tab.c, test/yacc/err_inherit5.tab.h, test/yacc/inherit0.error, test/yacc/inherit0.output, test/yacc/inherit0.tab.c, test/yacc/inherit0.tab.h, test/yacc/inherit1.error, test/yacc/inherit1.output, test/yacc/inherit1.tab.c, test/yacc/inherit1.tab.h, test/yacc/inherit2.error, test/yacc/inherit2.output, test/yacc/inherit2.tab.c, test/yacc/inherit2.tab.h, test/yacc/empty.error, test/yacc/empty.output, test/yacc/empty.tab.c, test/yacc/empty.tab.h, test/yacc/err_inherit1.error, test/yacc/err_inherit1.output, test/yacc/err_inherit1.tab.c, test/yacc/err_inherit1.tab.h, test/yacc/err_inherit2.error, test/yacc/err_inherit2.output, test/yacc/err_inherit2.tab.c, test/yacc/err_inherit2.tab.h: reference output for testing @@ -664,7 +862,7 @@ * yacc.1: document -L/-B features from btyacc -2014-03-25 Thomas E. Dickey +2014-03-25 Thomas E. Dickey * yacc.1: typo @@ -683,7 +881,7 @@ * mstring.c: byacc-btyacc-20140323 -2014-03-25 Thomas E. Dickey +2014-03-25 Thomas E. Dickey * test/btyacc/RCS, test/yacc/RCS: PERMIT FILE @@ -698,7 +896,7 @@ * test/btyacc/err_syntax1.output, test/btyacc/err_syntax1.tab.c, test/btyacc/err_syntax1.tab.h, test/btyacc/err_syntax10.error, test/btyacc/err_syntax10.output, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax10.tab.h, test/btyacc/err_syntax11.error, test/btyacc/err_syntax11.output, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax11.tab.h, test/btyacc/err_syntax12.error, test/btyacc/err_syntax12.output, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax12.tab.h, test/btyacc/err_syntax13.error, test/btyacc/err_syntax13.output, test/btyacc/err_syntax13.tab.c, test/btyacc/err_syntax13.tab.h, test/btyacc/err_syntax14.error, test/btyacc/err_syntax14.output, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax14.tab.h, test/btyacc/err_syntax15.error, test/btyacc/err_syntax15.output, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax15.tab.h, test/btyacc/err_syntax16.error, test/btyacc/err_syntax16.output, test/btyacc/err_syntax16.tab.c, test/btyacc/err_syntax16.tab. h, test/btyacc/err_syntax17.error, test/btyacc/err_syntax17.output, test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax17.tab.h, test/btyacc/err_syntax18.error, test/btyacc/err_syntax18.output, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax18.tab.h, test/btyacc/err_syntax19.error, test/btyacc/err_syntax19.output, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax19.tab.h, test/btyacc/err_syntax2.output, test/btyacc/err_syntax2.tab.c, test/btyacc/err_syntax2.tab.h, test/btyacc/err_syntax20.error, test/btyacc/err_syntax20.output, test/btyacc/err_syntax20.tab.c, test/btyacc/err_syntax20.tab.h, test/btyacc/err_syntax21.error, test/btyacc/err_syntax21.output, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax21.tab.h, test/btyacc/err_syntax22.error, test/btyacc/err_syntax22.output, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax22.tab.h, test/btyacc/err_syntax23.error, test/btyacc/err_syntax23.output, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax23.tab. h, test/btyacc/err_syntax24.error, test/btya! cc/err_syntax24.output, test/btyacc/err_syntax24.tab.c, test/btyacc/err_syntax24.tab.h, test/btyacc/err_syntax25.error, test/btyacc/err_syntax25.output, test/btyacc/err_syntax25.tab.c, test/btyacc/err_syntax25.tab.h, test/btyacc/err_syntax26.error, test/btyacc/err_syntax26.output, test/btyacc/err_syntax26.tab.c, test/btyacc/err_syntax26.tab.h, test/btyacc/err_syntax3.output, test/btyacc/err_syntax3.tab.c, test/btyacc/err_syntax3.tab.h, test/btyacc/err_syntax4.output, test/btyacc/err_syntax4.tab.c, test/btyacc/err_syntax4.tab.h, test/btyacc/err_syntax5.output, test/btyacc/err_syntax5.tab.c, test/btyacc/err_syntax5.tab.h, test/btyacc/err_syntax6.output, test/btyacc/err_syntax6.tab.c, test/btyacc/err_syntax6.tab.h, test/btyacc/err_syntax7.output, test/btyacc/err_syntax7.tab.c, test/btyacc/err_syntax7.tab.h, test/btyacc/err_syntax7a.output, test/btyacc/err_syntax7a.tab.c, test/btyacc/err_syntax7a.tab.h, test/btyacc/err_syntax7b.output, test/btyacc/err_syntax7b.tab.c, test/btyacc/err_syn tax7b.tab.h, test/btyacc/err_syntax8.output, test/btyacc/err_syntax8.tab.c, test/btyacc/err_syntax8.tab.h, test/btyacc/err_syntax8a.output, test/btyacc/err_syntax8a.tab.c, test/btyacc/err_syntax8a.tab.h, test/btyacc/err_syntax9.output, test/btyacc/err_syntax9.tab.c, test/btyacc/err_syntax9.tab.h: reference output for testing -2014-03-24 Thomas E. Dickey +2014-03-24 Thomas E. Dickey * defs.h: fix compiler warnings due to mputc() @@ -711,7 +909,7 @@ * test/varsyntax_calc1.y, test/btyacc_calc1.y: testcase for btyacc -2014-03-23 Thomas E. Dickey +2014-03-23 Thomas E. Dickey * test/err_syntax26.error, test/err_syntax26.output, test/err_syntax26.tab.c, test/err_syntax26.tab.h, test/yacc/err_syntax26.error, test/yacc/err_syntax26.output, test/yacc/err_syntax26.tab.c, test/yacc/err_syntax26.tab.h: reference output for testing @@ -733,7 +931,7 @@ * test/btyacc/quote_calc3-s.error, test/btyacc/quote_calc4-s.error, test/btyacc/quote_calc4.error, test/btyacc/grammar.dot, test/btyacc/grammar.error, test/btyacc/pure_calc.error, test/btyacc/pure_error.error, test/btyacc/quote_calc-s.error, test/btyacc/quote_calc.error, test/btyacc/quote_calc2-s.error, test/btyacc/quote_calc2.error, test/btyacc/quote_calc3.error, test/btyacc/err_syntax2.error, test/btyacc/err_syntax3.error, test/btyacc/err_syntax4.error, test/btyacc/err_syntax5.error, test/btyacc/err_syntax6.error, test/btyacc/err_syntax7.error, test/btyacc/err_syntax7a.error, test/btyacc/err_syntax7b.error, test/btyacc/err_syntax8.error, test/btyacc/err_syntax8a.error, test/btyacc/err_syntax9.error, test/btyacc/error.error, test/btyacc/calc1.error, test/btyacc/calc2.error, test/btyacc/calc3.error, test/btyacc/code_calc.error, test/btyacc/code_error.error, test/btyacc/empty.error, test/btyacc/err_syntax1.error, test/btyacc/btyacc_calc1.error, test/btyacc/btyacc_demo.error: reference output for testing -2014-03-23 Thomas E. Dickey +2014-03-23 Thomas E. Dickey * test/err_syntax23.error, test/err_syntax23.output, test/err_syntax23.tab.c, test/err_syntax23.tab.h, test/yacc/err_syntax23.error, test/yacc/err_syntax23.output, test/yacc/err_syntax23.tab.c, test/yacc/err_syntax23.tab.h: reference output for testing @@ -745,7 +943,7 @@ * test/run_test.sh: move test-outputs into subdirectories to keep btyacc/yacc results separate -2014-03-23 Thomas E. Dickey +2014-03-23 Thomas E. Dickey * test/err_syntax22.error, test/err_syntax22.output, test/err_syntax22.tab.c, test/err_syntax22.tab.h, test/yacc/err_syntax22.error, test/yacc/err_syntax22.output, test/yacc/err_syntax22.tab.c, test/yacc/err_syntax22.tab.h: reference output for testing @@ -774,7 +972,7 @@ * test/err_syntax17.y: testcase for unterminated_action() -2014-03-22 Thomas E. Dickey +2014-03-22 Thomas E. Dickey * test/err_syntax16.error, test/err_syntax16.output, test/err_syntax16.tab.c, test/err_syntax16.tab.h, test/yacc/err_syntax16.error, test/yacc/err_syntax16.output, test/yacc/err_syntax16.tab.c, test/yacc/err_syntax16.tab.h: reference output for testing @@ -812,7 +1010,7 @@ * test/err_syntax10.y: testcase for retyped_warning() -2014-03-21 Thomas E. Dickey +2014-03-21 Thomas E. Dickey * test/err_syntax9.error, test/err_syntax9.output, test/err_syntax9.tab.c, test/err_syntax9.tab.h, test/yacc/err_syntax9.error, test/yacc/err_syntax9.output, test/yacc/err_syntax9.tab.c, test/yacc/err_syntax9.tab.h: reference output for testing @@ -932,7 +1130,7 @@ * lalr.c: rename MAXSHORT to MAXYYINT -2014-01-01 Thomas E. Dickey +2014-01-01 Thomas E. Dickey * yacc.1: document %token-table, improve presentation of double-quotes @@ -956,7 +1154,7 @@ - add YYTRANSLATE() macro - recognize bison's %token-table declaration -2014-01-01 Thomas E. Dickey +2014-01-01 Thomas E. Dickey * configure: regen @@ -968,19 +1166,19 @@ * configure.in: use CF_MAKE_DOCS -2013-12-26 Thomas E. Dickey +2013-12-26 Thomas E. Dickey * config.guess: 2013-11-29 -2013-11-19 Thomas E. Dickey +2013-11-19 Thomas E. Dickey * aclocal.m4: resync with my-autoconf (fixes for clang and mingw) -2013-10-25 Thomas E. Dickey +2013-10-25 Thomas E. Dickey * config.sub: 2013-10-01 -2013-09-25 Thomas E. Dickey +2013-09-25 Thomas E. Dickey * reader.c: fix two loop-limits found by clang 3.3 --analyze @@ -1015,13 +1213,13 @@ * package/debian/changelog, VERSION, package/byacc.spec: bump -2013-09-07 Thomas E. Dickey +2013-09-07 Thomas E. Dickey * config.sub: update to 2013-09-15 * config.guess: update to 2013-06-10 -2013-03-04 Thomas E. Dickey +2013-03-04 Thomas E. Dickey * package/debian/changelog, VERSION, package/byacc.spec: bump @@ -1051,11 +1249,11 @@ * aclocal.m4: another fix for CF_GCC_VERSION to handle Debian's modification of gcc message. -2013-02-10 Thomas E. Dickey +2013-02-10 Thomas E. Dickey * config.sub, config.guess: update to 2013-02-04 -2012-10-03 Thomas E. Dickey +2012-10-03 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1077,7 +1275,7 @@ suggested patch: drop CF_ANSI_CC_REQD, CF_ANSI_CC_CHECK, CF_PROG_EXT since they are not needed. -2012-10-03 Thomas E. Dickey +2012-10-03 Thomas E. Dickey * aclocal.m4: split-out CF_CC_ENV_FLAGS from CF_ANSI_CC_CHECK to avoid losing it in @@ -1111,13 +1309,13 @@ CF_MIXEDCASE_FILENAMES CF_NO_LEAKS_OPTION -2012-10-03 Thomas E. Dickey +2012-10-03 Thomas E. Dickey * aclocal.m4: move existence-check for mkstemp out of the AC_TRY_RUN, to help with cross-compiles -2012-10-02 Thomas E. Dickey +2012-10-02 Thomas E. Dickey * config_h.in: Adrian Bunk request - replace this with the output from autoheader @@ -1135,7 +1333,7 @@ * makefile.in: add assignment for datarootdir variable. -2012-05-26 Thomas E. Dickey +2012-05-26 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1163,13 +1361,13 @@ use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation (no object change) -2012-05-25 Thomas E. Dickey +2012-05-25 Thomas E. Dickey * output.c, main.c, verbose.c, mkpar.c, lr0.c: use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation (no object change) -2012-01-15 Thomas E. Dickey +2012-01-15 Thomas E. Dickey * package/debian/copyright: bump @@ -1274,7 +1472,7 @@ * test/quote_calc2-s.tab.c, test/quote_calc3-s.tab.c, test/quote_calc4-s.tab.c, test/quote_calc-s.tab.c, test/quote_calc.tab.c, test/quote_calc2.tab.c, test/quote_calc3.tab.c, test/quote_calc4.tab.c: regen -2012-01-14 Thomas E. Dickey +2012-01-14 Thomas E. Dickey * test/calc2.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/calc1.tab.c: regen @@ -1305,7 +1503,7 @@ * test/run_test.sh: generate/test with "-s" option applied. -2012-01-13 Thomas E. Dickey +2012-01-13 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1337,7 +1535,7 @@ * aclocal.m4: resync with my-autoconf, i.e., fixes for CF_XOPEN_SOURCE -2011-12-19 Thomas E. Dickey +2011-12-19 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1351,7 +1549,7 @@ Simply suppressing the second #define makes the behavior closer to yacc. (report by Paulo Andrade). -2011-09-08 Thomas E. Dickey +2011-09-08 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1359,7 +1557,7 @@ fix some more interaction between -i and -d flags to ensure YYERRCODE and YYSTYPE are declared, tested with cproto. -2011-09-07 Thomas E. Dickey +2011-09-07 Thomas E. Dickey * yacc.1: document "-i" option. @@ -1373,14 +1571,14 @@ * skeleton.c, output.c, defs.h: changes to support "-i" option. -2011-09-06 Thomas E. Dickey +2011-09-06 Thomas E. Dickey * reader.c: pass explicit file-pointer to write_section() * main.c: add "-i" option, to generate interface-file (suggested by Denis M. Wilson) -2011-09-05 Thomas E. Dickey +2011-09-05 Thomas E. Dickey * configure: regen @@ -1391,15 +1589,15 @@ * defs.h, error.c, reader.c: add check for missing "}" on %parse-param and %lex-param lines (report by Denis M Wilson) -2011-04-01 Thomas E. Dickey +2011-04-01 Thomas E. Dickey * config.sub: update to 2011-04-01 -2011-02-02 Thomas E. Dickey +2011-02-02 Thomas E. Dickey * config.guess: update to 2011-01-01 -2010-12-29 Thomas E. Dickey +2010-12-29 Thomas E. Dickey * defs.h, skeleton.c: add const qualifier to skeleton data, per NetBSD changes (report by Christos Zoulas) @@ -1421,7 +1619,7 @@ * test/ftp.y: improve example, which was stuck in 19XX and assumed file sizes were longs. -2010-12-29 Thomas E. Dickey +2010-12-29 Thomas E. Dickey * test/ftp.tab.c, test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/calc2.tab.c, test/calc3.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c: regen @@ -1439,11 +1637,11 @@ * output.c: correct definition for YYERROR_DECL() -2010-12-29 Thomas E. Dickey +2010-12-29 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump -2010-12-26 Thomas E. Dickey +2010-12-26 Thomas E. Dickey * defs.h, main.c: change return-type of allocate() to avoid warnings of alignment problems @@ -1463,7 +1661,7 @@ * aclocal.m4: improve quoting, deprecate ${name-value} in favor of standard ${name:-value} -2010-12-25 Thomas E. Dickey +2010-12-25 Thomas E. Dickey * main.c: start revising use of tmpfile(), to make this work with MinGW. Start by @@ -1472,7 +1670,7 @@ * package/debian/changelog, package/byacc.spec, VERSION: bump -2010-11-27 Thomas E. Dickey +2010-11-27 Thomas E. Dickey * package/byacc.spec, package/debian/changelog, VERSION: bump @@ -1482,7 +1680,7 @@ corrected use of %parse-param value in yyerror(); it doesn't use &yylval (report by Clifford Yapp) -2010-11-26 Thomas E. Dickey +2010-11-26 Thomas E. Dickey * skeleton.c: typo @@ -1533,7 +1731,7 @@ * package/debian/changelog, package/byacc.spec, VERSION: bump -2010-11-24 Thomas E. Dickey +2010-11-24 Thomas E. Dickey * main.c, defs.h, symtab.c, error.c: reduce global variables @@ -1543,7 +1741,7 @@ amend fix for Redhat #112617 to still call default_action_warning() for empty rules (report by Bruce Cran). -2010-11-22 Thomas E. Dickey +2010-11-22 Thomas E. Dickey * output.c: add ifdef to guard against redefinition of YYSTYPE union (request by Clifford Yapp). @@ -1575,20 +1773,20 @@ * package/debian/changelog, package/byacc.spec, VERSION: bump -2010-09-28 Thomas E. Dickey +2010-09-28 Thomas E. Dickey * config.guess: update to 2010-09-24 -2010-09-10 Thomas E. Dickey +2010-09-10 Thomas E. Dickey * config.sub: update to 2010-09-11 -2010-06-10 Thomas E. Dickey +2010-06-10 Thomas E. Dickey * yacc.1, package/debian/changelog, package/byacc.spec, VERSION: bump to 2010/06/10 -2010-06-09 Thomas E. Dickey +2010-06-09 Thomas E. Dickey * reader.c: free declarations in leak-testing code. @@ -1631,7 +1829,7 @@ * test/ftp.tab.c, test/ftp.y, reader.c, symtab.c, verbose.c, lr0.c, main.c, mkpar.c, output.c, defs.h, closure.c: fix warnings from clang --analyze -2010-06-08 Thomas E. Dickey +2010-06-08 Thomas E. Dickey * output.c: fix to build with c89, etc. @@ -1663,7 +1861,7 @@ add check_make and check_lint rules to help validate the generated files in the test-directory -2010-06-07 Thomas E. Dickey +2010-06-07 Thomas E. Dickey * test/pure_calc.tab.c, test/pure_error.tab.c: RCS_BASE @@ -1728,11 +1926,11 @@ anyway. This allows for better compatibility with yacc sources written for bison. -2010-06-07 Thomas E. Dickey +2010-06-07 Thomas E. Dickey * VERSION: bump to 2010/06/07 -2010-06-06 Thomas E. Dickey +2010-06-06 Thomas E. Dickey * test/calc.tab.c, configure: regen @@ -1783,12 +1981,12 @@ c) CF_GCC_VERSION, ignore stderr d) CF_GCC_WARNINGS, adjust options to work with c89 wrapper of gcc -2010-04-20 Thomas E. Dickey +2010-04-20 Thomas E. Dickey * package/debian/changelog, package/debian/compat, package/debian/control, package/debian/copyright, package/debian/docs, package/debian/postinst, package/debian/prerm, package/debian/rules, package/debian/watch: scripts from Debian package -2010-02-16 Thomas E. Dickey +2010-02-16 Thomas E. Dickey * yacc.1: document -P and bison-extensions @@ -1840,24 +2038,24 @@ * skeleton.c: fix a memory leak in the generated skeleton -2010-01-01 Thomas E. Dickey +2010-01-01 Thomas E. Dickey * package/debian/source/format: scripts from Debian package -2009-12-31 Thomas E. Dickey +2009-12-31 Thomas E. Dickey * config.guess: update to 2009-12-30 * config.sub: update to 2009-12-31 -2009-10-27 Thomas E. Dickey +2009-10-27 Thomas E. Dickey * VERSION: 20091027 * output.c, mkpar.c, defs.h, lalr.c, closure.c, graph.c, lr0.c, verbose.c, main.c, reader.c: strict compiler warnings -2009-10-26 Thomas E. Dickey +2009-10-26 Thomas E. Dickey * test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/error.tab.c: resync @@ -1872,44 +2070,44 @@ * aclocal.m4: resync with my-autoconf -2009-08-25 Thomas E. Dickey +2009-08-25 Thomas E. Dickey * config.guess, config.sub: update to 2009-08-19 -2009-02-21 Thomas E. Dickey +2009-02-21 Thomas E. Dickey * VERSION: bump * output.c: restore "yylval" symbol, omitted in cleanup on 2008/8/25 -2008-12-26 Thomas E. Dickey +2008-12-26 Thomas E. Dickey * configure: regen with autoconf-2.52 (patched) -2008-12-25 Thomas E. Dickey +2008-12-25 Thomas E. Dickey * test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c: regenerated -2008-12-24 Thomas E. Dickey +2008-12-24 Thomas E. Dickey * VERSION: bump * skeleton.c: remove ifdef-lint from goto yyerrlab, to quiet gcc warning -2008-11-26 Thomas E. Dickey +2008-11-26 Thomas E. Dickey * verbose.c, main.c, defs.h, mkpar.c, reader.c: completed implementation of "%expect" (report by Perry E. Metzger). add "%expect-rr", which is (unlike bison) allowable in LALR parsers. -2008-11-24 Thomas E. Dickey +2008-11-24 Thomas E. Dickey * closure.c, defs.h, error.c, graph.c, lalr.c, lr0.c, main.c, mkpar.c, output.c, reader.c, skeleton.c, symtab.c, verbose.c, warshall.c: change indent-style (request by Perry E. Metzger) -2008-08-27 Thomas E. Dickey +2008-08-27 Thomas E. Dickey * test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c: better implementation of YYPARSE_PARAM, using YYPARSE_DECL() macro @@ -1948,12 +2146,12 @@ * test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c: remove 'register' keywords -2008-08-26 Thomas E. Dickey +2008-08-26 Thomas E. Dickey * warshall.c, verbose.c, symtab.c, skeleton.c, reader.c, output.c, mkpar.c, main.c, lr0.c, lalr.c, graph.c, error.c, closure.c: remove 'register' keywords -2008-08-25 Thomas E. Dickey +2008-08-25 Thomas E. Dickey * test/ftp.tab.c: regen'd @@ -1993,7 +2191,7 @@ * makefile.in: add dependency on VERSION file. -2008-08-24 Thomas E. Dickey +2008-08-24 Thomas E. Dickey * VERSION: bump *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 31 08:30:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B531DAFA171; Wed, 31 May 2017 08:30:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DCD76E05F; Wed, 31 May 2017 08:30:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8Uc7B014873; Wed, 31 May 2017 08:30:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8UbNl014864; Wed, 31 May 2017 08:30:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310830.v4V8UbNl014864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319298 - stable/10/lib/libc/tests/nss X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:30:39 -0000 Author: ngie Date: Wed May 31 08:30:37 2017 New Revision: 319298 URL: https://svnweb.freebsd.org/changeset/base/319298 Log: MFC r319027,r319028,r319029,r319030,r319031,r319033,r319034,r319035,r319036,r319037,r319038,r319039,r319040,r319041,r319042,r319043,r319044,r319045,r319046: r319027: lib/libc/tests/nss: use calloc appropriately The pattern used prior to this commit was `calloc(1, n * sizeof(type))`; the pattern that should be used however is `calloc(n, sizeof(type))`. r319028: Sort make variables to suit style.Makefile(5) This is being done prior to functional changes. r319029: Staticize functions and remove unused variables to aid with bumping WARNS r319030: Fix -Wsign-compare warnings r319031: getusershell_test: staticize run_tests(..) to fix warnings r319033: getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings r319034: getaddrinfo_test: fix -Wsign-compare warnings r319035: getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings r319036: getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings r319037: getaddrinfo_test: mark unused function parameters __unused to fix -Wunused warnings r319038: getusershell_test: mark mdata parameter in compare_usershell __unused r319039: getserv_test: mark unused parameters __unused to fix corresponding warnings r319040: getrpc_test: fix -Wunused warnings - Mark unused function parameters unused. - Remove an unused function prototype. r319041: getproto_test: fix -Wunused warnings Mark unused parameters __unused in functions. r319042: gethostby_test: fix multiple warning types - Fix -Wmissing-declaration warning by staticizing run_tests. - Fix -Wsign-compare warnings by casting size_t types to int for comparisons. Reindent some of the code in sdump_hostent(..) to accomodate the overall changes. r319043: getpw_test: fix -Wunused warnings - Mark unused parameters __unused. - Put dump_passwd under DEBUG as it's only used in that case. r319044: getgr_test: fix -Wunused warnings r319045: Fix -Wunused and -Wshadow warnings r319046: Fix a -Wunused-but-set-variable warning reported by gcc 6.3.0 Modified: stable/10/lib/libc/tests/nss/Makefile stable/10/lib/libc/tests/nss/getaddrinfo_test.c stable/10/lib/libc/tests/nss/getgr_test.c stable/10/lib/libc/tests/nss/gethostby_test.c stable/10/lib/libc/tests/nss/getproto_test.c stable/10/lib/libc/tests/nss/getpw_test.c stable/10/lib/libc/tests/nss/getrpc_test.c stable/10/lib/libc/tests/nss/getserv_test.c stable/10/lib/libc/tests/nss/getusershell_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/nss/Makefile ============================================================================== --- stable/10/lib/libc/tests/nss/Makefile Wed May 31 08:21:16 2017 (r319297) +++ stable/10/lib/libc/tests/nss/Makefile Wed May 31 08:30:37 2017 (r319298) @@ -1,14 +1,10 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/nss -BINDIR= ${TESTSDIR} - .PATH: ${.CURDIR:H}/resolv -FILES+= mach +TESTSDIR= ${TESTSBASE}/lib/libc/nss -WARNS?= 1 -CFLAGS+= -I${SRCTOP}/tests +BINDIR= ${TESTSDIR} ATF_TESTS_C+= getaddrinfo_test ATF_TESTS_C+= getgr_test @@ -19,5 +15,11 @@ ATF_TESTS_C+= getproto_test ATF_TESTS_C+= getrpc_test ATF_TESTS_C+= getserv_test ATF_TESTS_C+= getusershell_test + +FILES+= mach + +WARNS?= 1 + +CFLAGS+= -I${SRCTOP}/tests .include Modified: stable/10/lib/libc/tests/nss/getaddrinfo_test.c ============================================================================== --- stable/10/lib/libc/tests/nss/getaddrinfo_test.c Wed May 31 08:21:16 2017 (r319297) +++ stable/10/lib/libc/tests/nss/getaddrinfo_test.c Wed May 31 08:30:37 2017 (r319298) @@ -28,7 +28,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include @@ -125,7 +125,8 @@ compare_addrinfo_(struct addrinfo *ai1, struct addrinf } static int -compare_addrinfo(struct addrinfo *ai1, struct addrinfo *ai2, void *mdata) +compare_addrinfo(struct addrinfo *ai1, struct addrinfo *ai2, + void *mdata __unused) { int rv; @@ -144,7 +145,7 @@ compare_addrinfo(struct addrinfo *ai1, struct addrinfo return (rv); } -void +static void free_addrinfo(struct addrinfo *ai) { if (ai == NULL) @@ -164,30 +165,30 @@ sdump_addrinfo(struct addrinfo *ai, char *buffer, size ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; written = snprintf(buffer, buflen, "%s ", ai->ai_canonname == NULL ? "(null)" : ai->ai_canonname); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (ai->ai_addr == NULL) { written = snprintf(buffer, buflen, "(null)"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } else { - for (i = 0; i < ai->ai_addrlen; i++) { + for (i = 0; i < (int)ai->ai_addrlen; i++) { written = snprintf(buffer, buflen, - i + 1 != ai->ai_addrlen ? "%d." : "%d", + i + 1 != (int)ai->ai_addrlen ? "%d." : "%d", ((unsigned char *)ai->ai_addr)[i]); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -199,7 +200,7 @@ sdump_addrinfo(struct addrinfo *ai, char *buffer, size if (ai->ai_next != NULL) { written = snprintf(buffer, buflen, ":"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -309,12 +310,11 @@ addrinfo_read_snapshot_func(struct addrinfo *ai, char { struct addrinfo *ai2; char *s, *ps; - int i, rv; + int rv; printf("1 line read from snapshot:\n%s\n", line); rv = 0; - i = 0; ps = line; s = strsep(&ps, ":"); @@ -344,7 +344,7 @@ addrinfo_read_snapshot_func(struct addrinfo *ai, char } static int -addrinfo_test_correctness(struct addrinfo *ai, void *mdata) +addrinfo_test_correctness(struct addrinfo *ai, void *mdata __unused) { printf("testing correctness with the following data:\n"); @@ -409,7 +409,7 @@ addrinfo_read_hostlist_func(struct addrinfo *ai, char return (0); } -void +static void run_tests(char *hostlist_file, char *snapshot_file, int ai_family) { struct addrinfo_test_data td, td_snap; Modified: stable/10/lib/libc/tests/nss/getgr_test.c ============================================================================== --- stable/10/lib/libc/tests/nss/getgr_test.c Wed May 31 08:21:16 2017 (r319297) +++ stable/10/lib/libc/tests/nss/getgr_test.c Wed May 31 08:30:37 2017 (r319298) @@ -49,8 +49,6 @@ enum test_methods { TEST_BUILD_SNAPSHOT = 16, }; -static enum test_methods method = TEST_BUILD_SNAPSHOT; - DECLARE_TEST_DATA(group) DECLARE_TEST_FILE_SNAPSHOT(group) DECLARE_1PASS_TEST(group) @@ -104,7 +102,7 @@ clone_group(struct group *dest, struct group const *sr for (cp = src->gr_mem; *cp; ++cp) ++members_num; - dest->gr_mem = calloc(1, (members_num + 1) * sizeof(char *)); + dest->gr_mem = calloc(members_num + 1, sizeof(char *)); ATF_REQUIRE(dest->gr_mem != NULL); for (cp = src->gr_mem; *cp; ++cp) { @@ -179,7 +177,7 @@ sdump_group(struct group *grp, char *buffer, size_t bu written = snprintf(buffer, buflen, "%s %s %d", grp->gr_name, grp->gr_passwd, grp->gr_gid); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -188,7 +186,7 @@ sdump_group(struct group *grp, char *buffer, size_t bu for (cp = grp->gr_mem; *cp; ++cp) { written = snprintf(buffer, buflen, " %s",*cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -304,7 +302,7 @@ group_fill_test_data(struct group_test_data *td) } static int -group_test_correctness(struct group *grp, void *mdata) +group_test_correctness(struct group *grp, void *mdata __unused) { printf("testing correctness with the following data:\n"); dump_group(grp); @@ -382,7 +380,7 @@ group_test_getgrgid(struct group *grp_model, void *mda } static int -group_test_getgrent(struct group *grp, void *mdata) +group_test_getgrent(struct group *grp, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getgrent(). */ Modified: stable/10/lib/libc/tests/nss/gethostby_test.c ============================================================================== --- stable/10/lib/libc/tests/nss/gethostby_test.c Wed May 31 08:21:16 2017 (r319297) +++ stable/10/lib/libc/tests/nss/gethostby_test.c Wed May 31 08:30:37 2017 (r319298) @@ -87,8 +87,6 @@ static int hostent_test_gethostbyaddr(struct hostent * static int hostent_test_getaddrinfo_eq(struct hostent *, void *); static int hostent_test_getnameinfo_eq(struct hostent *, void *); -static void usage(void) __attribute__((__noreturn__)); - IMPLEMENT_TEST_DATA(hostent) IMPLEMENT_TEST_FILE_SNAPSHOT(hostent) IMPLEMENT_1PASS_TEST(hostent) @@ -163,8 +161,7 @@ clone_hostent(struct hostent *dest, struct hostent con for (cp = src->h_aliases; *cp; ++cp) ++aliases_num; - dest->h_aliases = calloc(1, (aliases_num + 1) * - sizeof(char *)); + dest->h_aliases = calloc(aliases_num + 1, sizeof(char *)); ATF_REQUIRE(dest->h_aliases != NULL); for (cp = src->h_aliases; *cp; ++cp) { @@ -178,7 +175,7 @@ clone_hostent(struct hostent *dest, struct hostent con for (cp = src->h_addr_list; *cp; ++cp) ++addrs_num; - dest->h_addr_list = calloc(1, (addrs_num + 1) * sizeof(char *)); + dest->h_addr_list = calloc(addrs_num + 1, sizeof(char *)); ATF_REQUIRE(dest->h_addr_list != NULL); for (cp = src->h_addr_list; *cp; ++cp) { @@ -413,7 +410,7 @@ sdump_hostent(struct hostent *ht, char *buffer, size_t written = snprintf(buffer, buflen, "%s %d %d", ht->h_name, ht->h_addrtype, ht->h_length); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -422,7 +419,7 @@ sdump_hostent(struct hostent *ht, char *buffer, size_t for (cp = ht->h_aliases; *cp; ++cp) { written = snprintf(buffer, buflen, " %s",*cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -432,59 +429,61 @@ sdump_hostent(struct hostent *ht, char *buffer, size_t } else { written = snprintf(buffer, buflen, " noaliases"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } } else { written = snprintf(buffer, buflen, " (null)"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } written = snprintf(buffer, buflen, " : "); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (ht->h_addr_list != NULL) { if (*(ht->h_addr_list) != NULL) { for (cp = ht->h_addr_list; *cp; ++cp) { - for (i = 0; i < ht->h_length; ++i ) { - written = snprintf(buffer, buflen, - i + 1 != ht->h_length ? "%d." : "%d", - (unsigned char)(*cp)[i]); - buffer += written; - if (written > buflen) - return; - buflen -= written; + for (i = 0; i < (size_t)ht->h_length; ++i) { + written = snprintf(buffer, buflen, + i + 1 != (size_t)ht->h_length ? + "%d." : "%d", + (unsigned char)(*cp)[i]); + buffer += written; + if (written > (int)buflen) + return; + buflen -= written; - if (buflen == 0) - return; - } + if (buflen == 0) + return; + } - if (*(cp + 1) ) { - written = snprintf(buffer, buflen, " "); - buffer += written; - if (written > buflen) - return; - buflen -= written; - } + if (*(cp + 1)) { + written = snprintf(buffer, buflen, + " "); + buffer += written; + if (written > (int)buflen) + return; + buflen -= written; + } } } else { written = snprintf(buffer, buflen, " noaddrs"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } } else { written = snprintf(buffer, buflen, " (null)"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } @@ -676,7 +675,7 @@ dump_hostent(struct hostent *result) } static int -hostent_test_correctness(struct hostent *ht, void *mdata) +hostent_test_correctness(struct hostent *ht, void *mdata __unused) { #ifdef DEBUG @@ -759,7 +758,7 @@ hostent_test_gethostbyaddr(struct hostent *he, void *m } static int -hostent_test_getaddrinfo_eq(struct hostent *he, void *mdata) +hostent_test_getaddrinfo_eq(struct hostent *he, void *mdata __unused) { struct addrinfo *ai, hints; int rv; @@ -798,7 +797,7 @@ hostent_test_getaddrinfo_eq(struct hostent *he, void * } static int -hostent_test_getnameinfo_eq(struct hostent *he, void *mdata) +hostent_test_getnameinfo_eq(struct hostent *he, void *mdata __unused) { char **cp; char buffer[NI_MAXHOST]; @@ -921,15 +920,15 @@ hostent_test_getnameinfo_eq(struct hostent *he, void * return (0); } -int -run_tests(const char *hostlist_file, const char *snapshot_file, int af_type, +static int +run_tests(const char *hostlist_file, const char *snapshot_file, int _af_type, enum test_methods method, bool use_ipv6_mapping) { struct hostent_test_data td, td_addr, td_snap; res_state statp; int rv = -2; - switch (af_type) { + switch (_af_type) { case AF_INET: ATF_REQUIRE_FEATURE("inet"); ATF_REQUIRE(!use_ipv6_mapping); @@ -938,7 +937,7 @@ run_tests(const char *hostlist_file, const char *snaps ATF_REQUIRE_FEATURE("inet6"); break; default: - atf_tc_fail("unhandled address family: %d", af_type); + atf_tc_fail("unhandled address family: %d", _af_type); break; } Modified: stable/10/lib/libc/tests/nss/getproto_test.c ============================================================================== --- stable/10/lib/libc/tests/nss/getproto_test.c Wed May 31 08:21:16 2017 (r319297) +++ stable/10/lib/libc/tests/nss/getproto_test.c Wed May 31 08:30:37 2017 (r319298) @@ -99,7 +99,7 @@ clone_protoent(struct protoent *dest, struct protoent for (cp = src->p_aliases; *cp; ++cp) ++aliases_num; - dest->p_aliases = calloc(1, (aliases_num+1) * sizeof(char *)); + dest->p_aliases = calloc(aliases_num + 1, sizeof(char *)); assert(dest->p_aliases != NULL); for (cp = src->p_aliases; *cp; ++cp) { @@ -172,16 +172,16 @@ sdump_protoent(struct protoent *pe, char *buffer, size written = snprintf(buffer, buflen, "%s %d", pe->p_name, pe->p_proto); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (pe->p_aliases != NULL) { if (*(pe->p_aliases) != '\0') { for (cp = pe->p_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -288,7 +288,7 @@ protoent_fill_test_data(struct protoent_test_data *td) } static int -protoent_test_correctness(struct protoent *pe, void *mdata) +protoent_test_correctness(struct protoent *pe, void *mdata __unused) { printf("testing correctness with the following data:\n"); dump_protoent(pe); @@ -388,14 +388,14 @@ protoent_test_getprotobynumber(struct protoent *pe_mod } static int -protoent_test_getprotoent(struct protoent *pe, void *mdata) +protoent_test_getprotoent(struct protoent *pe, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getprotoent(). */ return (protoent_test_correctness(pe, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct protoent_test_data td, td_snap, td_2pass; Modified: stable/10/lib/libc/tests/nss/getpw_test.c ============================================================================== --- stable/10/lib/libc/tests/nss/getpw_test.c Wed May 31 08:21:16 2017 (r319297) +++ stable/10/lib/libc/tests/nss/getpw_test.c Wed May 31 08:30:37 2017 (r319298) @@ -47,8 +47,6 @@ enum test_methods { TEST_BUILD_SNAPSHOT }; -static enum test_methods method = TEST_BUILD_SNAPSHOT; - DECLARE_TEST_DATA(passwd) DECLARE_TEST_FILE_SNAPSHOT(passwd) DECLARE_1PASS_TEST(passwd) @@ -59,7 +57,9 @@ static int compare_passwd(struct passwd *, struct pass static void free_passwd(struct passwd *); static void sdump_passwd(struct passwd *, char *, size_t); +#ifdef DEBUG static void dump_passwd(struct passwd *); +#endif static int passwd_read_snapshot_func(struct passwd *, char *); @@ -97,7 +97,7 @@ clone_passwd(struct passwd *dest, struct passwd const } static int -compare_passwd(struct passwd *pwd1, struct passwd *pwd2, void *mdata) +compare_passwd(struct passwd *pwd1, struct passwd *pwd2, void *mdata __unused) { ATF_REQUIRE(pwd1 != NULL); ATF_REQUIRE(pwd2 != NULL); @@ -142,6 +142,7 @@ sdump_passwd(struct passwd *pwd, char *buffer, size_t pwd->pw_fields); } +#ifdef DEBUG static void dump_passwd(struct passwd *pwd) { @@ -152,6 +153,7 @@ dump_passwd(struct passwd *pwd) } else printf("(null)\n"); } +#endif static int passwd_read_snapshot_func(struct passwd *pwd, char *line) @@ -251,7 +253,7 @@ passwd_fill_test_data(struct passwd_test_data *td) } static int -passwd_test_correctness(struct passwd *pwd, void *mdata) +passwd_test_correctness(struct passwd *pwd, void *mdata __unused) { #ifdef DEBUG @@ -363,7 +365,7 @@ passwd_test_getpwuid(struct passwd *pwd_model, void *m } static int -passwd_test_getpwent(struct passwd *pwd, void *mdata) +passwd_test_getpwent(struct passwd *pwd, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getpwent(). */ Modified: stable/10/lib/libc/tests/nss/getrpc_test.c ============================================================================== --- stable/10/lib/libc/tests/nss/getrpc_test.c Wed May 31 08:21:16 2017 (r319297) +++ stable/10/lib/libc/tests/nss/getrpc_test.c Wed May 31 08:30:37 2017 (r319298) @@ -70,8 +70,6 @@ static int rpcent_test_getrpcbyname(struct rpcent *, v static int rpcent_test_getrpcbynumber(struct rpcent *, void *); static int rpcent_test_getrpcent(struct rpcent *, void *); -static void usage(void) __attribute__((__noreturn__)); - IMPLEMENT_TEST_DATA(rpcent) IMPLEMENT_TEST_FILE_SNAPSHOT(rpcent) IMPLEMENT_1PASS_TEST(rpcent) @@ -100,7 +98,7 @@ clone_rpcent(struct rpcent *dest, struct rpcent const for (cp = src->r_aliases; *cp; ++cp) ++aliases_num; - dest->r_aliases = calloc(1, (aliases_num + 1) * sizeof(char *)); + dest->r_aliases = calloc(aliases_num + 1, sizeof(char *)); ATF_REQUIRE(dest->r_aliases != NULL); for (cp = src->r_aliases; *cp; ++cp) { @@ -173,16 +171,16 @@ sdump_rpcent(struct rpcent *rpc, char *buffer, size_t written = snprintf(buffer, buflen, "%s %d", rpc->r_name, rpc->r_number); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (rpc->r_aliases != NULL) { if (*(rpc->r_aliases) != '\0') { for (cp = rpc->r_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -289,7 +287,7 @@ rpcent_fill_test_data(struct rpcent_test_data *td) } static int -rpcent_test_correctness(struct rpcent *rpc, void *mdata) +rpcent_test_correctness(struct rpcent *rpc, void *mdata __unused) { printf("testing correctness with the following data:\n"); @@ -390,7 +388,7 @@ rpcent_test_getrpcbynumber(struct rpcent *rpc_model, v } static int -rpcent_test_getrpcent(struct rpcent *rpc, void *mdata) +rpcent_test_getrpcent(struct rpcent *rpc, void *mdata __unused) { /* @@ -400,7 +398,7 @@ rpcent_test_getrpcent(struct rpcent *rpc, void *mdata) return (rpcent_test_correctness(rpc, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct rpcent_test_data td, td_snap, td_2pass; Modified: stable/10/lib/libc/tests/nss/getserv_test.c ============================================================================== --- stable/10/lib/libc/tests/nss/getserv_test.c Wed May 31 08:21:16 2017 (r319297) +++ stable/10/lib/libc/tests/nss/getserv_test.c Wed May 31 08:30:37 2017 (r319298) @@ -102,7 +102,7 @@ clone_servent(struct servent *dest, struct servent con for (cp = src->s_aliases; *cp; ++cp) ++aliases_num; - dest->s_aliases = calloc(1, (aliases_num + 1) * sizeof(char *)); + dest->s_aliases = calloc(aliases_num + 1, sizeof(char *)); ATF_REQUIRE(dest->s_aliases != NULL); for (cp = src->s_aliases; *cp; ++cp) { @@ -177,16 +177,16 @@ sdump_servent(struct servent *serv, char *buffer, size written = snprintf(buffer, buflen, "%s %d %s", serv->s_name, ntohs(serv->s_port), serv->s_proto); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (serv->s_aliases != NULL) { if (*(serv->s_aliases) != '\0') { for (cp = serv->s_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -300,7 +300,7 @@ servent_fill_test_data(struct servent_test_data *td) } static int -servent_test_correctness(struct servent *serv, void *mdata) +servent_test_correctness(struct servent *serv, void *mdata __unused) { printf("testing correctness with the following data:\n"); dump_servent(serv); @@ -403,14 +403,14 @@ servent_test_getservbyport(struct servent *serv_model, } static int -servent_test_getservent(struct servent *serv, void *mdata) +servent_test_getservent(struct servent *serv, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getservent(). */ return (servent_test_correctness(serv, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct servent_test_data td, td_snap, td_2pass; Modified: stable/10/lib/libc/tests/nss/getusershell_test.c ============================================================================== --- stable/10/lib/libc/tests/nss/getusershell_test.c Wed May 31 08:21:16 2017 (r319297) +++ stable/10/lib/libc/tests/nss/getusershell_test.c Wed May 31 08:30:37 2017 (r319298) @@ -48,8 +48,6 @@ struct usershell { char *path; }; -static enum test_methods method = TEST_GETUSERSHELL; - DECLARE_TEST_DATA(usershell) DECLARE_TEST_FILE_SNAPSHOT(usershell) DECLARE_2PASS_TEST(usershell) @@ -78,7 +76,8 @@ clone_usershell(struct usershell *dest, struct usershe } static int -compare_usershell(struct usershell *us1, struct usershell *us2, void *mdata) +compare_usershell(struct usershell *us1, struct usershell *us2, + void *mdata __unused) { int rv; @@ -134,7 +133,7 @@ usershell_read_snapshot_func(struct usershell *us, cha return (0); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct usershell_test_data td, td_snap; From owner-svn-src-all@freebsd.org Wed May 31 08:32:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 943C4AFA2ED; Wed, 31 May 2017 08:32:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F63D6E37A; Wed, 31 May 2017 08:32:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8W6ss018580; Wed, 31 May 2017 08:32:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8W5YK018571; Wed, 31 May 2017 08:32:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310832.v4V8W5YK018571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319299 - stable/11/lib/libc/tests/nss X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:32:07 -0000 Author: ngie Date: Wed May 31 08:32:05 2017 New Revision: 319299 URL: https://svnweb.freebsd.org/changeset/base/319299 Log: MFC r319027,r319028,r319029,r319030,r319031,r319033,r319034,r319035,r319036,r319037,r319038,r319039,r319040,r319041,r319042,r319043,r319044,r319045,r319046: r319027: lib/libc/tests/nss: use calloc appropriately The pattern used prior to this commit was `calloc(1, n * sizeof(type))`; the pattern that should be used however is `calloc(n, sizeof(type))`. r319028: Sort make variables to suit style.Makefile(5) This is being done prior to functional changes. r319029: Staticize functions and remove unused variables to aid with bumping WARNS r319030: Fix -Wsign-compare warnings r319031: getusershell_test: staticize run_tests(..) to fix warnings r319033: getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings r319034: getaddrinfo_test: fix -Wsign-compare warnings r319035: getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings r319036: getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings r319037: getaddrinfo_test: mark unused function parameters __unused to fix -Wunused warnings r319038: getusershell_test: mark mdata parameter in compare_usershell __unused r319039: getserv_test: mark unused parameters __unused to fix corresponding warnings r319040: getrpc_test: fix -Wunused warnings - Mark unused function parameters unused. - Remove an unused function prototype. r319041: getproto_test: fix -Wunused warnings Mark unused parameters __unused in functions. r319042: gethostby_test: fix multiple warning types - Fix -Wmissing-declaration warning by staticizing run_tests. - Fix -Wsign-compare warnings by casting size_t types to int for comparisons. Reindent some of the code in sdump_hostent(..) to accomodate the overall changes. r319043: getpw_test: fix -Wunused warnings - Mark unused parameters __unused. - Put dump_passwd under DEBUG as it's only used in that case. r319044: getgr_test: fix -Wunused warnings r319045: Fix -Wunused and -Wshadow warnings r319046: Fix a -Wunused-but-set-variable warning reported by gcc 6.3.0 Modified: stable/11/lib/libc/tests/nss/Makefile stable/11/lib/libc/tests/nss/getaddrinfo_test.c stable/11/lib/libc/tests/nss/getgr_test.c stable/11/lib/libc/tests/nss/gethostby_test.c stable/11/lib/libc/tests/nss/getproto_test.c stable/11/lib/libc/tests/nss/getpw_test.c stable/11/lib/libc/tests/nss/getrpc_test.c stable/11/lib/libc/tests/nss/getserv_test.c stable/11/lib/libc/tests/nss/getusershell_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/tests/nss/Makefile ============================================================================== --- stable/11/lib/libc/tests/nss/Makefile Wed May 31 08:30:37 2017 (r319298) +++ stable/11/lib/libc/tests/nss/Makefile Wed May 31 08:32:05 2017 (r319299) @@ -1,18 +1,13 @@ # $FreeBSD$ +.PATH: ${.CURDIR:H}/resolv + PACKAGE= tests TESTSDIR= ${TESTSBASE}/lib/libc/nss BINDIR= ${TESTSDIR} -.PATH: ${.CURDIR:H}/resolv - -${PACKAGE}FILES+= mach - -WARNS?= 1 -CFLAGS+= -I${SRCTOP}/tests - ATF_TESTS_C+= getaddrinfo_test ATF_TESTS_C+= getgr_test ATF_TESTS_C+= gethostby_test @@ -22,5 +17,11 @@ ATF_TESTS_C+= getproto_test ATF_TESTS_C+= getrpc_test ATF_TESTS_C+= getserv_test ATF_TESTS_C+= getusershell_test + +${PACKAGE}FILES+= mach + +WARNS?= 1 + +CFLAGS+= -I${SRCTOP}/tests .include Modified: stable/11/lib/libc/tests/nss/getaddrinfo_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getaddrinfo_test.c Wed May 31 08:30:37 2017 (r319298) +++ stable/11/lib/libc/tests/nss/getaddrinfo_test.c Wed May 31 08:32:05 2017 (r319299) @@ -28,7 +28,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include @@ -125,7 +125,8 @@ compare_addrinfo_(struct addrinfo *ai1, struct addrinf } static int -compare_addrinfo(struct addrinfo *ai1, struct addrinfo *ai2, void *mdata) +compare_addrinfo(struct addrinfo *ai1, struct addrinfo *ai2, + void *mdata __unused) { int rv; @@ -144,7 +145,7 @@ compare_addrinfo(struct addrinfo *ai1, struct addrinfo return (rv); } -void +static void free_addrinfo(struct addrinfo *ai) { if (ai == NULL) @@ -164,30 +165,30 @@ sdump_addrinfo(struct addrinfo *ai, char *buffer, size ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; written = snprintf(buffer, buflen, "%s ", ai->ai_canonname == NULL ? "(null)" : ai->ai_canonname); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (ai->ai_addr == NULL) { written = snprintf(buffer, buflen, "(null)"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } else { - for (i = 0; i < ai->ai_addrlen; i++) { + for (i = 0; i < (int)ai->ai_addrlen; i++) { written = snprintf(buffer, buflen, - i + 1 != ai->ai_addrlen ? "%d." : "%d", + i + 1 != (int)ai->ai_addrlen ? "%d." : "%d", ((unsigned char *)ai->ai_addr)[i]); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -199,7 +200,7 @@ sdump_addrinfo(struct addrinfo *ai, char *buffer, size if (ai->ai_next != NULL) { written = snprintf(buffer, buflen, ":"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -309,12 +310,11 @@ addrinfo_read_snapshot_func(struct addrinfo *ai, char { struct addrinfo *ai2; char *s, *ps; - int i, rv; + int rv; printf("1 line read from snapshot:\n%s\n", line); rv = 0; - i = 0; ps = line; s = strsep(&ps, ":"); @@ -344,7 +344,7 @@ addrinfo_read_snapshot_func(struct addrinfo *ai, char } static int -addrinfo_test_correctness(struct addrinfo *ai, void *mdata) +addrinfo_test_correctness(struct addrinfo *ai, void *mdata __unused) { printf("testing correctness with the following data:\n"); @@ -409,7 +409,7 @@ addrinfo_read_hostlist_func(struct addrinfo *ai, char return (0); } -void +static void run_tests(char *hostlist_file, char *snapshot_file, int ai_family) { struct addrinfo_test_data td, td_snap; Modified: stable/11/lib/libc/tests/nss/getgr_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getgr_test.c Wed May 31 08:30:37 2017 (r319298) +++ stable/11/lib/libc/tests/nss/getgr_test.c Wed May 31 08:32:05 2017 (r319299) @@ -49,8 +49,6 @@ enum test_methods { TEST_BUILD_SNAPSHOT = 16, }; -static enum test_methods method = TEST_BUILD_SNAPSHOT; - DECLARE_TEST_DATA(group) DECLARE_TEST_FILE_SNAPSHOT(group) DECLARE_1PASS_TEST(group) @@ -104,7 +102,7 @@ clone_group(struct group *dest, struct group const *sr for (cp = src->gr_mem; *cp; ++cp) ++members_num; - dest->gr_mem = calloc(1, (members_num + 1) * sizeof(char *)); + dest->gr_mem = calloc(members_num + 1, sizeof(char *)); ATF_REQUIRE(dest->gr_mem != NULL); for (cp = src->gr_mem; *cp; ++cp) { @@ -179,7 +177,7 @@ sdump_group(struct group *grp, char *buffer, size_t bu written = snprintf(buffer, buflen, "%s:%s:%d:", grp->gr_name, grp->gr_passwd, grp->gr_gid); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -189,7 +187,7 @@ sdump_group(struct group *grp, char *buffer, size_t bu written = snprintf(buffer, buflen, "%s%s", cp == grp->gr_mem ? "" : ",", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -309,7 +307,7 @@ group_fill_test_data(struct group_test_data *td) } static int -group_test_correctness(struct group *grp, void *mdata) +group_test_correctness(struct group *grp, void *mdata __unused) { printf("testing correctness with the following data:\n"); dump_group(grp); @@ -387,7 +385,7 @@ group_test_getgrgid(struct group *grp_model, void *mda } static int -group_test_getgrent(struct group *grp, void *mdata) +group_test_getgrent(struct group *grp, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getgrent(). */ Modified: stable/11/lib/libc/tests/nss/gethostby_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/gethostby_test.c Wed May 31 08:30:37 2017 (r319298) +++ stable/11/lib/libc/tests/nss/gethostby_test.c Wed May 31 08:32:05 2017 (r319299) @@ -87,8 +87,6 @@ static int hostent_test_gethostbyaddr(struct hostent * static int hostent_test_getaddrinfo_eq(struct hostent *, void *); static int hostent_test_getnameinfo_eq(struct hostent *, void *); -static void usage(void) __attribute__((__noreturn__)); - IMPLEMENT_TEST_DATA(hostent) IMPLEMENT_TEST_FILE_SNAPSHOT(hostent) IMPLEMENT_1PASS_TEST(hostent) @@ -163,8 +161,7 @@ clone_hostent(struct hostent *dest, struct hostent con for (cp = src->h_aliases; *cp; ++cp) ++aliases_num; - dest->h_aliases = calloc(1, (aliases_num + 1) * - sizeof(char *)); + dest->h_aliases = calloc(aliases_num + 1, sizeof(char *)); ATF_REQUIRE(dest->h_aliases != NULL); for (cp = src->h_aliases; *cp; ++cp) { @@ -178,7 +175,7 @@ clone_hostent(struct hostent *dest, struct hostent con for (cp = src->h_addr_list; *cp; ++cp) ++addrs_num; - dest->h_addr_list = calloc(1, (addrs_num + 1) * sizeof(char *)); + dest->h_addr_list = calloc(addrs_num + 1, sizeof(char *)); ATF_REQUIRE(dest->h_addr_list != NULL); for (cp = src->h_addr_list; *cp; ++cp) { @@ -413,7 +410,7 @@ sdump_hostent(struct hostent *ht, char *buffer, size_t written = snprintf(buffer, buflen, "%s %d %d", ht->h_name, ht->h_addrtype, ht->h_length); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -422,7 +419,7 @@ sdump_hostent(struct hostent *ht, char *buffer, size_t for (cp = ht->h_aliases; *cp; ++cp) { written = snprintf(buffer, buflen, " %s",*cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -432,59 +429,61 @@ sdump_hostent(struct hostent *ht, char *buffer, size_t } else { written = snprintf(buffer, buflen, " noaliases"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } } else { written = snprintf(buffer, buflen, " (null)"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } written = snprintf(buffer, buflen, " : "); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (ht->h_addr_list != NULL) { if (*(ht->h_addr_list) != NULL) { for (cp = ht->h_addr_list; *cp; ++cp) { - for (i = 0; i < ht->h_length; ++i ) { - written = snprintf(buffer, buflen, - i + 1 != ht->h_length ? "%d." : "%d", - (unsigned char)(*cp)[i]); - buffer += written; - if (written > buflen) - return; - buflen -= written; + for (i = 0; i < (size_t)ht->h_length; ++i) { + written = snprintf(buffer, buflen, + i + 1 != (size_t)ht->h_length ? + "%d." : "%d", + (unsigned char)(*cp)[i]); + buffer += written; + if (written > (int)buflen) + return; + buflen -= written; - if (buflen == 0) - return; - } + if (buflen == 0) + return; + } - if (*(cp + 1) ) { - written = snprintf(buffer, buflen, " "); - buffer += written; - if (written > buflen) - return; - buflen -= written; - } + if (*(cp + 1)) { + written = snprintf(buffer, buflen, + " "); + buffer += written; + if (written > (int)buflen) + return; + buflen -= written; + } } } else { written = snprintf(buffer, buflen, " noaddrs"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } } else { written = snprintf(buffer, buflen, " (null)"); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; } @@ -676,7 +675,7 @@ dump_hostent(struct hostent *result) } static int -hostent_test_correctness(struct hostent *ht, void *mdata) +hostent_test_correctness(struct hostent *ht, void *mdata __unused) { #ifdef DEBUG @@ -759,7 +758,7 @@ hostent_test_gethostbyaddr(struct hostent *he, void *m } static int -hostent_test_getaddrinfo_eq(struct hostent *he, void *mdata) +hostent_test_getaddrinfo_eq(struct hostent *he, void *mdata __unused) { struct addrinfo *ai, hints; int rv; @@ -798,7 +797,7 @@ hostent_test_getaddrinfo_eq(struct hostent *he, void * } static int -hostent_test_getnameinfo_eq(struct hostent *he, void *mdata) +hostent_test_getnameinfo_eq(struct hostent *he, void *mdata __unused) { char **cp; char buffer[NI_MAXHOST]; @@ -921,15 +920,15 @@ hostent_test_getnameinfo_eq(struct hostent *he, void * return (0); } -int -run_tests(const char *hostlist_file, const char *snapshot_file, int af_type, +static int +run_tests(const char *hostlist_file, const char *snapshot_file, int _af_type, enum test_methods method, bool use_ipv6_mapping) { struct hostent_test_data td, td_addr, td_snap; res_state statp; int rv = -2; - switch (af_type) { + switch (_af_type) { case AF_INET: ATF_REQUIRE_FEATURE("inet"); ATF_REQUIRE(!use_ipv6_mapping); @@ -938,7 +937,7 @@ run_tests(const char *hostlist_file, const char *snaps ATF_REQUIRE_FEATURE("inet6"); break; default: - atf_tc_fail("unhandled address family: %d", af_type); + atf_tc_fail("unhandled address family: %d", _af_type); break; } Modified: stable/11/lib/libc/tests/nss/getproto_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getproto_test.c Wed May 31 08:30:37 2017 (r319298) +++ stable/11/lib/libc/tests/nss/getproto_test.c Wed May 31 08:32:05 2017 (r319299) @@ -99,7 +99,7 @@ clone_protoent(struct protoent *dest, struct protoent for (cp = src->p_aliases; *cp; ++cp) ++aliases_num; - dest->p_aliases = calloc(1, (aliases_num+1) * sizeof(char *)); + dest->p_aliases = calloc(aliases_num + 1, sizeof(char *)); assert(dest->p_aliases != NULL); for (cp = src->p_aliases; *cp; ++cp) { @@ -172,16 +172,16 @@ sdump_protoent(struct protoent *pe, char *buffer, size written = snprintf(buffer, buflen, "%s %d", pe->p_name, pe->p_proto); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (pe->p_aliases != NULL) { if (*(pe->p_aliases) != '\0') { for (cp = pe->p_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -288,7 +288,7 @@ protoent_fill_test_data(struct protoent_test_data *td) } static int -protoent_test_correctness(struct protoent *pe, void *mdata) +protoent_test_correctness(struct protoent *pe, void *mdata __unused) { printf("testing correctness with the following data:\n"); dump_protoent(pe); @@ -388,14 +388,14 @@ protoent_test_getprotobynumber(struct protoent *pe_mod } static int -protoent_test_getprotoent(struct protoent *pe, void *mdata) +protoent_test_getprotoent(struct protoent *pe, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getprotoent(). */ return (protoent_test_correctness(pe, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct protoent_test_data td, td_snap, td_2pass; Modified: stable/11/lib/libc/tests/nss/getpw_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getpw_test.c Wed May 31 08:30:37 2017 (r319298) +++ stable/11/lib/libc/tests/nss/getpw_test.c Wed May 31 08:32:05 2017 (r319299) @@ -47,8 +47,6 @@ enum test_methods { TEST_BUILD_SNAPSHOT }; -static enum test_methods method = TEST_BUILD_SNAPSHOT; - DECLARE_TEST_DATA(passwd) DECLARE_TEST_FILE_SNAPSHOT(passwd) DECLARE_1PASS_TEST(passwd) @@ -59,7 +57,9 @@ static int compare_passwd(struct passwd *, struct pass static void free_passwd(struct passwd *); static void sdump_passwd(struct passwd *, char *, size_t); +#ifdef DEBUG static void dump_passwd(struct passwd *); +#endif static int passwd_read_snapshot_func(struct passwd *, char *); @@ -97,7 +97,7 @@ clone_passwd(struct passwd *dest, struct passwd const } static int -compare_passwd(struct passwd *pwd1, struct passwd *pwd2, void *mdata) +compare_passwd(struct passwd *pwd1, struct passwd *pwd2, void *mdata __unused) { ATF_REQUIRE(pwd1 != NULL); ATF_REQUIRE(pwd2 != NULL); @@ -142,6 +142,7 @@ sdump_passwd(struct passwd *pwd, char *buffer, size_t pwd->pw_fields); } +#ifdef DEBUG static void dump_passwd(struct passwd *pwd) { @@ -152,6 +153,7 @@ dump_passwd(struct passwd *pwd) } else printf("(null)\n"); } +#endif static int passwd_read_snapshot_func(struct passwd *pwd, char *line) @@ -251,7 +253,7 @@ passwd_fill_test_data(struct passwd_test_data *td) } static int -passwd_test_correctness(struct passwd *pwd, void *mdata) +passwd_test_correctness(struct passwd *pwd, void *mdata __unused) { #ifdef DEBUG @@ -363,7 +365,7 @@ passwd_test_getpwuid(struct passwd *pwd_model, void *m } static int -passwd_test_getpwent(struct passwd *pwd, void *mdata) +passwd_test_getpwent(struct passwd *pwd, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getpwent(). */ Modified: stable/11/lib/libc/tests/nss/getrpc_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getrpc_test.c Wed May 31 08:30:37 2017 (r319298) +++ stable/11/lib/libc/tests/nss/getrpc_test.c Wed May 31 08:32:05 2017 (r319299) @@ -70,8 +70,6 @@ static int rpcent_test_getrpcbyname(struct rpcent *, v static int rpcent_test_getrpcbynumber(struct rpcent *, void *); static int rpcent_test_getrpcent(struct rpcent *, void *); -static void usage(void) __attribute__((__noreturn__)); - IMPLEMENT_TEST_DATA(rpcent) IMPLEMENT_TEST_FILE_SNAPSHOT(rpcent) IMPLEMENT_1PASS_TEST(rpcent) @@ -100,7 +98,7 @@ clone_rpcent(struct rpcent *dest, struct rpcent const for (cp = src->r_aliases; *cp; ++cp) ++aliases_num; - dest->r_aliases = calloc(1, (aliases_num + 1) * sizeof(char *)); + dest->r_aliases = calloc(aliases_num + 1, sizeof(char *)); ATF_REQUIRE(dest->r_aliases != NULL); for (cp = src->r_aliases; *cp; ++cp) { @@ -173,16 +171,16 @@ sdump_rpcent(struct rpcent *rpc, char *buffer, size_t written = snprintf(buffer, buflen, "%s %d", rpc->r_name, rpc->r_number); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (rpc->r_aliases != NULL) { if (*(rpc->r_aliases) != '\0') { for (cp = rpc->r_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -289,7 +287,7 @@ rpcent_fill_test_data(struct rpcent_test_data *td) } static int -rpcent_test_correctness(struct rpcent *rpc, void *mdata) +rpcent_test_correctness(struct rpcent *rpc, void *mdata __unused) { printf("testing correctness with the following data:\n"); @@ -390,7 +388,7 @@ rpcent_test_getrpcbynumber(struct rpcent *rpc_model, v } static int -rpcent_test_getrpcent(struct rpcent *rpc, void *mdata) +rpcent_test_getrpcent(struct rpcent *rpc, void *mdata __unused) { /* @@ -400,7 +398,7 @@ rpcent_test_getrpcent(struct rpcent *rpc, void *mdata) return (rpcent_test_correctness(rpc, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct rpcent_test_data td, td_snap, td_2pass; Modified: stable/11/lib/libc/tests/nss/getserv_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getserv_test.c Wed May 31 08:30:37 2017 (r319298) +++ stable/11/lib/libc/tests/nss/getserv_test.c Wed May 31 08:32:05 2017 (r319299) @@ -102,7 +102,7 @@ clone_servent(struct servent *dest, struct servent con for (cp = src->s_aliases; *cp; ++cp) ++aliases_num; - dest->s_aliases = calloc(1, (aliases_num + 1) * sizeof(char *)); + dest->s_aliases = calloc(aliases_num + 1, sizeof(char *)); ATF_REQUIRE(dest->s_aliases != NULL); for (cp = src->s_aliases; *cp; ++cp) { @@ -177,16 +177,16 @@ sdump_servent(struct servent *serv, char *buffer, size written = snprintf(buffer, buflen, "%s %d %s", serv->s_name, ntohs(serv->s_port), serv->s_proto); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; if (serv->s_aliases != NULL) { if (*(serv->s_aliases) != '\0') { for (cp = serv->s_aliases; *cp; ++cp) { - written = snprintf(buffer, buflen, " %s",*cp); + written = snprintf(buffer, buflen, " %s", *cp); buffer += written; - if (written > buflen) + if (written > (int)buflen) return; buflen -= written; @@ -300,7 +300,7 @@ servent_fill_test_data(struct servent_test_data *td) } static int -servent_test_correctness(struct servent *serv, void *mdata) +servent_test_correctness(struct servent *serv, void *mdata __unused) { printf("testing correctness with the following data:\n"); dump_servent(serv); @@ -403,14 +403,14 @@ servent_test_getservbyport(struct servent *serv_model, } static int -servent_test_getservent(struct servent *serv, void *mdata) +servent_test_getservent(struct servent *serv, void *mdata __unused) { /* Only correctness can be checked when doing 1-pass test for * getservent(). */ return (servent_test_correctness(serv, NULL)); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct servent_test_data td, td_snap, td_2pass; Modified: stable/11/lib/libc/tests/nss/getusershell_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getusershell_test.c Wed May 31 08:30:37 2017 (r319298) +++ stable/11/lib/libc/tests/nss/getusershell_test.c Wed May 31 08:32:05 2017 (r319299) @@ -48,8 +48,6 @@ struct usershell { char *path; }; -static enum test_methods method = TEST_GETUSERSHELL; - DECLARE_TEST_DATA(usershell) DECLARE_TEST_FILE_SNAPSHOT(usershell) DECLARE_2PASS_TEST(usershell) @@ -78,7 +76,8 @@ clone_usershell(struct usershell *dest, struct usershe } static int -compare_usershell(struct usershell *us1, struct usershell *us2, void *mdata) +compare_usershell(struct usershell *us1, struct usershell *us2, + void *mdata __unused) { int rv; @@ -134,7 +133,7 @@ usershell_read_snapshot_func(struct usershell *us, cha return (0); } -int +static int run_tests(const char *snapshot_file, enum test_methods method) { struct usershell_test_data td, td_snap; From owner-svn-src-all@freebsd.org Wed May 31 08:36:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12079AFA4B0; Wed, 31 May 2017 08:36:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0B046E69A; Wed, 31 May 2017 08:36:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8ai9E019037; Wed, 31 May 2017 08:36:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8ahYW019033; Wed, 31 May 2017 08:36:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310836.v4V8ahYW019033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319300 - stable/11/tests/sys/file X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:36:45 -0000 Author: ngie Date: Wed May 31 08:36:43 2017 New Revision: 319300 URL: https://svnweb.freebsd.org/changeset/base/319300 Log: MFC r319056,r319058,r319059,r319060,r319061,r319078: r319056: tests/sys/file/ftruncate_test: use an exit code of 1 instead of -1 with err*(3). An exit code of -1 is implementation defined -- it's best to stick with something well-defined (1). r319058: Create a deterministic file in the kyua sandbox, instead of a temporary file outside the kyua sandbox This helps ensure that the file is removed at test exit, and as a side effect, cures a warning about umasks with Coverity. r319059: Use an exit code of 1 instead of -1 for reasons noted in r319056 r319060: Use main(void) instead of main(argc __unused, argv __unused) r319061: Don't leak accept_fd on thread completion CID: 1296068 r319078: Tweak r319058 slightly - Specify an explicit mode when using O_CREAT per open(2). - Fix the error message (add missing enclosing parentheses). MFC with: r319058 Modified: stable/11/tests/sys/file/ftruncate_test.c stable/11/tests/sys/file/newfileops_on_fork_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/file/ftruncate_test.c ============================================================================== --- stable/11/tests/sys/file/ftruncate_test.c Wed May 31 08:32:05 2017 (r319299) +++ stable/11/tests/sys/file/ftruncate_test.c Wed May 31 08:36:43 2017 (r319300) @@ -60,14 +60,14 @@ int main(void) { int error, fd, fds[2], i, read_only_fd; - char path[PATH_MAX]; + char path[] = "ftruncate_file"; struct stat sb; ssize_t size; off_t len; char ch; /* - * Tests using a writable temporary file: grow and then shrink a file + * Tests using a writable file: grow and then shrink a file * using ftruncate and various lengths. Make sure that a negative * file length is rejected. Make sure that when we grow the file, * bytes now in the range of the file size return 0. @@ -75,37 +75,36 @@ main(void) * Save a read-only reference to the file to use later for read-only * descriptor tests. */ - snprintf(path, PATH_MAX, "/tmp/ftruncate.XXXXXXXXXXXXX"); - fd = mkstemp(path); + fd = open(path, O_RDWR|O_CREAT, 0600); if (fd < 0) - err(-1, "mkstemp"); + err(1, "open(%s, O_RDWR|O_CREAT, 0600)", path); read_only_fd = open(path, O_RDONLY); if (read_only_fd < 0) { error = errno; (void)unlink(path); errno = error; - err(-1, "open(%s, O_RDONLY)", path); + err(1, "open(%s, O_RDONLY)", path); } (void)unlink(path); if (ftruncate(fd, -1) == 0) - errx(-1, "ftruncate(fd, -1) succeeded"); + errx(1, "ftruncate(fd, -1) succeeded unexpectedly"); if (errno != EINVAL) - err(-1, "ftruncate(fd, -1) returned wrong error"); + err(1, "ftruncate(fd, -1) returned wrong error"); for (i = 0; i < lengths_count; i++) { len = lengths[i]; if (ftruncate(fd, len) < 0) - err(-1, "ftruncate(%jd) up", (intmax_t)len); + err(1, "ftruncate(%jd) up", (intmax_t)len); if (fstat(fd, &sb) < 0) - err(-1, "stat"); + err(1, "stat"); if (sb.st_size != len) errx(-1, "fstat with len=%jd returned len %jd up", (intmax_t)len, (intmax_t)sb.st_size); if (len != 0) { size = pread(fd, &ch, sizeof(ch), len - 1); if (size < 0) - err(-1, "pread on len %jd up", (intmax_t)len); + err(1, "pread on len %jd up", (intmax_t)len); if (size != sizeof(ch)) errx(-1, "pread len %jd size %jd up", (intmax_t)len, (intmax_t)size); @@ -119,9 +118,9 @@ main(void) for (i = lengths_count - 1; i >= 0; i--) { len = lengths[i]; if (ftruncate(fd, len) < 0) - err(-1, "ftruncate(%jd) down", (intmax_t)len); + err(1, "ftruncate(%jd) down", (intmax_t)len); if (fstat(fd, &sb) < 0) - err(-1, "stat"); + err(1, "stat"); if (sb.st_size != len) errx(-1, "fstat(%jd) returned %jd down", (intmax_t)len, sb.st_size); @@ -134,7 +133,7 @@ main(void) if (ftruncate(read_only_fd, 0) == 0) errx(-1, "ftruncate(read_only_fd) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(read_only_fd) returned wrong error"); + err(1, "ftruncate(read_only_fd) returned wrong error"); close(read_only_fd); /* @@ -142,22 +141,22 @@ main(void) */ fd = socket(PF_UNIX, SOCK_STREAM, 0); if (fd < 0) - err(-1, "socket(PF_UNIX, SOCK_STREAM, 0)"); + err(1, "socket(PF_UNIX, SOCK_STREAM, 0)"); if (ftruncate(fd, 0) == 0) errx(-1, "ftruncate(socket) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(socket) returned wrong error"); + err(1, "ftruncate(socket) returned wrong error"); close(fd); /* * Make sure that ftruncate on pipes doesn't work. */ if (pipe(fds) < 0) - err(-1, "pipe"); + err(1, "pipe"); if (ftruncate(fds[0], 0) == 0) errx(-1, "ftruncate(pipe) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(pipe) returned wrong error"); + err(1, "ftruncate(pipe) returned wrong error"); close(fds[0]); close(fds[1]); @@ -166,11 +165,11 @@ main(void) */ fd = kqueue(); if (fd < 0) - err(-1, "kqueue"); + err(1, "kqueue"); if (ftruncate(fds[0], 0) == 0) errx(-1, "ftruncate(kqueue) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(kqueue) returned wrong error"); + err(1, "ftruncate(kqueue) returned wrong error"); close(fd); return (0); Modified: stable/11/tests/sys/file/newfileops_on_fork_test.c ============================================================================== --- stable/11/tests/sys/file/newfileops_on_fork_test.c Wed May 31 08:32:05 2017 (r319299) +++ stable/11/tests/sys/file/newfileops_on_fork_test.c Wed May 31 08:36:43 2017 (r319300) @@ -61,8 +61,9 @@ do_accept(__unused void *arg) accept_fd = accept(listen_fd, NULL, NULL); if (accept_fd < 0) - err(-1, "accept"); + err(1, "accept"); + close(accept_fd); return (NULL); } @@ -73,7 +74,7 @@ do_fork(void) pid = fork(); if (pid < 0) - err(-1, "fork"); + err(1, "fork"); if (pid > 0) { waitpid(pid, NULL, 0); exit(0); @@ -84,37 +85,37 @@ do_fork(void) * listen_fd+1, and get back EBADF if it's not a valid descriptor, * and EINVAL if it is. This (currently) works fine in practice. */ - if (ftruncate(listen_fd + 1, 0 < 0)) { + if (ftruncate(listen_fd + 1, 0) < 0) { if (errno == EBADF) exit(0); else if (errno == EINVAL) - errx(-1, "file descriptor still open in child"); + errx(1, "file descriptor still open in child"); else - err(-1, "unexpected error"); + err(1, "unexpected error"); } else - errx(-1, "ftruncate succeeded"); + errx(1, "ftruncate succeeded"); } int -main(__unused int argc, __unused char *argv[]) +main(void) { struct sockaddr_in sin; pthread_t accept_thread; listen_fd = socket(PF_INET, SOCK_STREAM, 0); if (listen_fd < 0) - err(-1, "socket"); + err(1, "socket"); bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); sin.sin_port = htons(PORT); if (bind(listen_fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) - err(-1, "bind"); + err(1, "bind"); if (listen(listen_fd, -1) <0) - err(-1, "listen"); + err(1, "listen"); if (pthread_create(&accept_thread, NULL, do_accept, NULL) != 0) - err(-1, "pthread_create"); + err(1, "pthread_create"); sleep(1); /* Easier than using a CV. */ do_fork(); exit(0); From owner-svn-src-all@freebsd.org Wed May 31 08:36:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D08ABAFA4E4; Wed, 31 May 2017 08:36:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD7546E6AD; Wed, 31 May 2017 08:36:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8alES019085; Wed, 31 May 2017 08:36:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8alEB019083; Wed, 31 May 2017 08:36:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310836.v4V8alEB019083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319301 - stable/10/tests/sys/file X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:36:49 -0000 Author: ngie Date: Wed May 31 08:36:47 2017 New Revision: 319301 URL: https://svnweb.freebsd.org/changeset/base/319301 Log: MFC r319056,r319058,r319059,r319060,r319061,r319078: r319056: tests/sys/file/ftruncate_test: use an exit code of 1 instead of -1 with err*(3). An exit code of -1 is implementation defined -- it's best to stick with something well-defined (1). r319058: Create a deterministic file in the kyua sandbox, instead of a temporary file outside the kyua sandbox This helps ensure that the file is removed at test exit, and as a side effect, cures a warning about umasks with Coverity. r319059: Use an exit code of 1 instead of -1 for reasons noted in r319056 r319060: Use main(void) instead of main(argc __unused, argv __unused) r319061: Don't leak accept_fd on thread completion CID: 1296068 r319078: Tweak r319058 slightly - Specify an explicit mode when using O_CREAT per open(2). - Fix the error message (add missing enclosing parentheses). MFC with: r319058 Modified: stable/10/tests/sys/file/ftruncate_test.c stable/10/tests/sys/file/newfileops_on_fork_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/file/ftruncate_test.c ============================================================================== --- stable/10/tests/sys/file/ftruncate_test.c Wed May 31 08:36:43 2017 (r319300) +++ stable/10/tests/sys/file/ftruncate_test.c Wed May 31 08:36:47 2017 (r319301) @@ -60,14 +60,14 @@ int main(void) { int error, fd, fds[2], i, read_only_fd; - char path[PATH_MAX]; + char path[] = "ftruncate_file"; struct stat sb; ssize_t size; off_t len; char ch; /* - * Tests using a writable temporary file: grow and then shrink a file + * Tests using a writable file: grow and then shrink a file * using ftruncate and various lengths. Make sure that a negative * file length is rejected. Make sure that when we grow the file, * bytes now in the range of the file size return 0. @@ -75,37 +75,36 @@ main(void) * Save a read-only reference to the file to use later for read-only * descriptor tests. */ - snprintf(path, PATH_MAX, "/tmp/ftruncate.XXXXXXXXXXXXX"); - fd = mkstemp(path); + fd = open(path, O_RDWR|O_CREAT, 0600); if (fd < 0) - err(-1, "mkstemp"); + err(1, "open(%s, O_RDWR|O_CREAT, 0600)", path); read_only_fd = open(path, O_RDONLY); if (read_only_fd < 0) { error = errno; (void)unlink(path); errno = error; - err(-1, "open(%s, O_RDONLY)", path); + err(1, "open(%s, O_RDONLY)", path); } (void)unlink(path); if (ftruncate(fd, -1) == 0) - errx(-1, "ftruncate(fd, -1) succeeded"); + errx(1, "ftruncate(fd, -1) succeeded unexpectedly"); if (errno != EINVAL) - err(-1, "ftruncate(fd, -1) returned wrong error"); + err(1, "ftruncate(fd, -1) returned wrong error"); for (i = 0; i < lengths_count; i++) { len = lengths[i]; if (ftruncate(fd, len) < 0) - err(-1, "ftruncate(%jd) up", (intmax_t)len); + err(1, "ftruncate(%jd) up", (intmax_t)len); if (fstat(fd, &sb) < 0) - err(-1, "stat"); + err(1, "stat"); if (sb.st_size != len) errx(-1, "fstat with len=%jd returned len %jd up", (intmax_t)len, (intmax_t)sb.st_size); if (len != 0) { size = pread(fd, &ch, sizeof(ch), len - 1); if (size < 0) - err(-1, "pread on len %jd up", (intmax_t)len); + err(1, "pread on len %jd up", (intmax_t)len); if (size != sizeof(ch)) errx(-1, "pread len %jd size %jd up", (intmax_t)len, (intmax_t)size); @@ -119,9 +118,9 @@ main(void) for (i = lengths_count - 1; i >= 0; i--) { len = lengths[i]; if (ftruncate(fd, len) < 0) - err(-1, "ftruncate(%jd) down", (intmax_t)len); + err(1, "ftruncate(%jd) down", (intmax_t)len); if (fstat(fd, &sb) < 0) - err(-1, "stat"); + err(1, "stat"); if (sb.st_size != len) errx(-1, "fstat(%jd) returned %jd down", (intmax_t)len, sb.st_size); @@ -134,7 +133,7 @@ main(void) if (ftruncate(read_only_fd, 0) == 0) errx(-1, "ftruncate(read_only_fd) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(read_only_fd) returned wrong error"); + err(1, "ftruncate(read_only_fd) returned wrong error"); close(read_only_fd); /* @@ -142,22 +141,22 @@ main(void) */ fd = socket(PF_UNIX, SOCK_STREAM, 0); if (fd < 0) - err(-1, "socket(PF_UNIX, SOCK_STREAM, 0)"); + err(1, "socket(PF_UNIX, SOCK_STREAM, 0)"); if (ftruncate(fd, 0) == 0) errx(-1, "ftruncate(socket) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(socket) returned wrong error"); + err(1, "ftruncate(socket) returned wrong error"); close(fd); /* * Make sure that ftruncate on pipes doesn't work. */ if (pipe(fds) < 0) - err(-1, "pipe"); + err(1, "pipe"); if (ftruncate(fds[0], 0) == 0) errx(-1, "ftruncate(pipe) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(pipe) returned wrong error"); + err(1, "ftruncate(pipe) returned wrong error"); close(fds[0]); close(fds[1]); @@ -166,11 +165,11 @@ main(void) */ fd = kqueue(); if (fd < 0) - err(-1, "kqueue"); + err(1, "kqueue"); if (ftruncate(fds[0], 0) == 0) errx(-1, "ftruncate(kqueue) succeeded"); if (errno != EINVAL) - err(-1, "ftruncate(kqueue) returned wrong error"); + err(1, "ftruncate(kqueue) returned wrong error"); close(fd); return (0); Modified: stable/10/tests/sys/file/newfileops_on_fork_test.c ============================================================================== --- stable/10/tests/sys/file/newfileops_on_fork_test.c Wed May 31 08:36:43 2017 (r319300) +++ stable/10/tests/sys/file/newfileops_on_fork_test.c Wed May 31 08:36:47 2017 (r319301) @@ -61,8 +61,9 @@ do_accept(__unused void *arg) accept_fd = accept(listen_fd, NULL, NULL); if (accept_fd < 0) - err(-1, "accept"); + err(1, "accept"); + close(accept_fd); return (NULL); } @@ -73,7 +74,7 @@ do_fork(void) pid = fork(); if (pid < 0) - err(-1, "fork"); + err(1, "fork"); if (pid > 0) { waitpid(pid, NULL, 0); exit(0); @@ -84,37 +85,37 @@ do_fork(void) * listen_fd+1, and get back EBADF if it's not a valid descriptor, * and EINVAL if it is. This (currently) works fine in practice. */ - if (ftruncate(listen_fd + 1, 0 < 0)) { + if (ftruncate(listen_fd + 1, 0) < 0) { if (errno == EBADF) exit(0); else if (errno == EINVAL) - errx(-1, "file descriptor still open in child"); + errx(1, "file descriptor still open in child"); else - err(-1, "unexpected error"); + err(1, "unexpected error"); } else - errx(-1, "ftruncate succeeded"); + errx(1, "ftruncate succeeded"); } int -main(__unused int argc, __unused char *argv[]) +main(void) { struct sockaddr_in sin; pthread_t accept_thread; listen_fd = socket(PF_INET, SOCK_STREAM, 0); if (listen_fd < 0) - err(-1, "socket"); + err(1, "socket"); bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); sin.sin_port = htons(PORT); if (bind(listen_fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) - err(-1, "bind"); + err(1, "bind"); if (listen(listen_fd, -1) <0) - err(-1, "listen"); + err(1, "listen"); if (pthread_create(&accept_thread, NULL, do_accept, NULL) != 0) - err(-1, "pthread_create"); + err(1, "pthread_create"); sleep(1); /* Easier than using a CV. */ do_fork(); exit(0); From owner-svn-src-all@freebsd.org Wed May 31 08:40:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97620AFA6DA; Wed, 31 May 2017 08:40:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65CD76EAF2; Wed, 31 May 2017 08:40:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8edfx019358; Wed, 31 May 2017 08:40:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8ed19019357; Wed, 31 May 2017 08:40:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310840.v4V8ed19019357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319302 - stable/11/lib/libgeom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:40:40 -0000 Author: ngie Date: Wed May 31 08:40:39 2017 New Revision: 319302 URL: https://svnweb.freebsd.org/changeset/base/319302 Log: MFC r317311,r317312,r319019: r317311: Check for failures from getpagesize(3) Return errno on failure, similar to the open(2) call above it. CID: 1193753 r317312: Fix type for `pagesize` to match the return type for getpagesize(3) to fix the build Pointyhat to: ngie r319019: Remove getpagesize(3) error checking added in r317312 getpagesize(3) no longer fails as of r317436. Modified: stable/11/lib/libgeom/geom_stats.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libgeom/geom_stats.c ============================================================================== --- stable/11/lib/libgeom/geom_stats.c Wed May 31 08:36:47 2017 (r319301) +++ stable/11/lib/libgeom/geom_stats.c Wed May 31 08:40:39 2017 (r319302) @@ -42,8 +42,8 @@ #include /************************************************************/ -static uint npages, pagesize, spp; -static int statsfd = -1; +static uint npages, spp; +static int pagesize, statsfd = -1; static u_char *statp; void From owner-svn-src-all@freebsd.org Wed May 31 08:40:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79165AFA70E; Wed, 31 May 2017 08:40:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45B446EB23; Wed, 31 May 2017 08:40:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8ekab019409; Wed, 31 May 2017 08:40:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8ekda019408; Wed, 31 May 2017 08:40:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310840.v4V8ekda019408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319303 - stable/10/lib/libgeom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:40:47 -0000 Author: ngie Date: Wed May 31 08:40:46 2017 New Revision: 319303 URL: https://svnweb.freebsd.org/changeset/base/319303 Log: MFC r317311,r317312,r319019: r317311: Check for failures from getpagesize(3) Return errno on failure, similar to the open(2) call above it. CID: 1193753 r317312: Fix type for `pagesize` to match the return type for getpagesize(3) to fix the build Pointyhat to: ngie r319019: Remove getpagesize(3) error checking added in r317312 getpagesize(3) no longer fails as of r317436. Modified: stable/10/lib/libgeom/geom_stats.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libgeom/geom_stats.c ============================================================================== --- stable/10/lib/libgeom/geom_stats.c Wed May 31 08:40:39 2017 (r319302) +++ stable/10/lib/libgeom/geom_stats.c Wed May 31 08:40:46 2017 (r319303) @@ -42,8 +42,8 @@ #include /************************************************************/ -static uint npages, pagesize, spp; -static int statsfd = -1; +static uint npages, spp; +static int pagesize, statsfd = -1; static u_char *statp; void From owner-svn-src-all@freebsd.org Wed May 31 08:42:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0758AFA8B2; Wed, 31 May 2017 08:42:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80DAF6EF4D; Wed, 31 May 2017 08:42:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8gVNS023043; Wed, 31 May 2017 08:42:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8gVqO023042; Wed, 31 May 2017 08:42:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310842.v4V8gVqO023042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319304 - stable/11/sbin/savecore X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:42:32 -0000 Author: ngie Date: Wed May 31 08:42:31 2017 New Revision: 319304 URL: https://svnweb.freebsd.org/changeset/base/319304 Log: MFC r316740: Clarify `minfree` warning message in check_space(..) - State that the units are kB. - Be more complete/concise in terms of what is required (in this case `minfree` must be at least `X`kB) Modified: stable/11/sbin/savecore/savecore.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/savecore/savecore.c ============================================================================== --- stable/11/sbin/savecore/savecore.c Wed May 31 08:40:46 2017 (r319303) +++ stable/11/sbin/savecore/savecore.c Wed May 31 08:42:31 2017 (r319304) @@ -277,7 +277,8 @@ check_space(const char *savedir, off_t dumpsize, int b needed -= saved_dump_size(bounds); if ((minfree > 0 ? spacefree : totfree) - needed < minfree) { syslog(LOG_WARNING, - "no dump, not enough free space on device (%lld available, need %lld)", + "no dump: not enough free space on device (%lldkB " + "available; need at least %lldkB)", (long long)(minfree > 0 ? spacefree : totfree), (long long)needed); return (0); From owner-svn-src-all@freebsd.org Wed May 31 08:42:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9543FAFA8EC; Wed, 31 May 2017 08:42:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 615756EFFD; Wed, 31 May 2017 08:42:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8giRL023096; Wed, 31 May 2017 08:42:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8gis4023095; Wed, 31 May 2017 08:42:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310842.v4V8gis4023095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:42:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319305 - stable/10/sbin/savecore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:42:45 -0000 Author: ngie Date: Wed May 31 08:42:44 2017 New Revision: 319305 URL: https://svnweb.freebsd.org/changeset/base/319305 Log: MFC r316740: Clarify `minfree` warning message in check_space(..) - State that the units are kB. - Be more complete/concise in terms of what is required (in this case `minfree` must be at least `X`kB) Modified: stable/10/sbin/savecore/savecore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/savecore/savecore.c ============================================================================== --- stable/10/sbin/savecore/savecore.c Wed May 31 08:42:31 2017 (r319304) +++ stable/10/sbin/savecore/savecore.c Wed May 31 08:42:44 2017 (r319305) @@ -277,7 +277,8 @@ check_space(const char *savedir, off_t dumpsize, int b needed -= saved_dump_size(bounds); if ((minfree > 0 ? spacefree : totfree) - needed < minfree) { syslog(LOG_WARNING, - "no dump, not enough free space on device (%lld available, need %lld)", + "no dump: not enough free space on device (%lldkB " + "available; need at least %lldkB)", (long long)(minfree > 0 ? spacefree : totfree), (long long)needed); return (0); From owner-svn-src-all@freebsd.org Wed May 31 08:43:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 436CBAFA994; Wed, 31 May 2017 08:43:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 139846F1AA; Wed, 31 May 2017 08:43:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8hjcx023224; Wed, 31 May 2017 08:43:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8hjIK023223; Wed, 31 May 2017 08:43:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310843.v4V8hjIK023223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319306 - stable/10/sbin/savecore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:43:46 -0000 Author: ngie Date: Wed May 31 08:43:45 2017 New Revision: 319306 URL: https://svnweb.freebsd.org/changeset/base/319306 Log: MFC r316742: Clarify units for mediasize and sectorsize in DoFile(..) They're byte quantities. Modified: stable/10/sbin/savecore/savecore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/savecore/savecore.c ============================================================================== --- stable/10/sbin/savecore/savecore.c Wed May 31 08:42:44 2017 (r319305) +++ stable/10/sbin/savecore/savecore.c Wed May 31 08:43:45 2017 (r319306) @@ -480,8 +480,8 @@ DoFile(const char *savedir, const char *device) } if (verbose) { - printf("mediasize = %lld\n", (long long)mediasize); - printf("sectorsize = %u\n", sectorsize); + printf("mediasize = %lld bytes\n", (long long)mediasize); + printf("sectorsize = %u bytes\n", sectorsize); } lasthd = mediasize - sectorsize; From owner-svn-src-all@freebsd.org Wed May 31 08:43:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24BFBAFA99B; Wed, 31 May 2017 08:43:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E96BF6F1AC; Wed, 31 May 2017 08:43:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8hl4N023269; Wed, 31 May 2017 08:43:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8hlmg023268; Wed, 31 May 2017 08:43:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310843.v4V8hlmg023268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319307 - stable/11/sbin/savecore X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:43:48 -0000 Author: ngie Date: Wed May 31 08:43:46 2017 New Revision: 319307 URL: https://svnweb.freebsd.org/changeset/base/319307 Log: MFC r316742: Clarify units for mediasize and sectorsize in DoFile(..) They're byte quantities. Modified: stable/11/sbin/savecore/savecore.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/savecore/savecore.c ============================================================================== --- stable/11/sbin/savecore/savecore.c Wed May 31 08:43:45 2017 (r319306) +++ stable/11/sbin/savecore/savecore.c Wed May 31 08:43:46 2017 (r319307) @@ -487,8 +487,8 @@ DoFile(const char *savedir, const char *device) } if (verbose) { - printf("mediasize = %lld\n", (long long)mediasize); - printf("sectorsize = %u\n", sectorsize); + printf("mediasize = %lld bytes\n", (long long)mediasize); + printf("sectorsize = %u bytes\n", sectorsize); } if (sectorsize < sizeof(kdhl)) { From owner-svn-src-all@freebsd.org Wed May 31 08:46:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B5B5AFAA79; Wed, 31 May 2017 08:46:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BADE6F433; Wed, 31 May 2017 08:46:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8kdx0023467; Wed, 31 May 2017 08:46:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8kdrn023466; Wed, 31 May 2017 08:46:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310846.v4V8kdrn023466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319308 - stable/11/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:46:40 -0000 Author: ngie Date: Wed May 31 08:46:39 2017 New Revision: 319308 URL: https://svnweb.freebsd.org/changeset/base/319308 Log: MFC r317632: Fix "make cscope-clean" when .OBJDIR already exists The cscope generated files are always put in .CURDIR . Modified: stable/11/sys/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/Makefile ============================================================================== --- stable/11/sys/Makefile Wed May 31 08:43:46 2017 (r319307) +++ stable/11/sys/Makefile Wed May 31 08:46:39 2017 (r319308) @@ -32,7 +32,8 @@ ${.CURDIR}/cscope.files: .PHONY find ${CSCOPEDIRS} -name "*.[chSsly]" -a -type f > ${.TARGET} cscope-clean: - rm -f cscope.files cscope.out cscope.in.out cscope.po.out + cd ${.CURDIR}; \ + rm -f cscope.files cscope.out cscope.in.out cscope.po.out # # Installs SCM hooks to update the cscope database every time the source tree From owner-svn-src-all@freebsd.org Wed May 31 08:47:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD9D4AFAADE; Wed, 31 May 2017 08:47:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B6746F557; Wed, 31 May 2017 08:47:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4V8l9Oi023534; Wed, 31 May 2017 08:47:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V8l9jO023533; Wed, 31 May 2017 08:47:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705310847.v4V8l9jO023533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 31 May 2017 08:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319309 - stable/10/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 08:47:10 -0000 Author: ngie Date: Wed May 31 08:47:09 2017 New Revision: 319309 URL: https://svnweb.freebsd.org/changeset/base/319309 Log: MFC r317632: Fix "make cscope-clean" when .OBJDIR already exists The cscope generated files are always put in .CURDIR . Modified: stable/10/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/Makefile ============================================================================== --- stable/10/sys/Makefile Wed May 31 08:46:39 2017 (r319308) +++ stable/10/sys/Makefile Wed May 31 08:47:09 2017 (r319309) @@ -45,7 +45,8 @@ ${.CURDIR}/cscope.files: .PHONY find ${CSCOPEDIRS} -name "*.[chSsly]" -a -type f > ${.TARGET} cscope-clean: - rm -f cscope.files cscope.out cscope.in.out cscope.po.out + cd ${.CURDIR}; \ + rm -f cscope.files cscope.out cscope.in.out cscope.po.out # You need the devel/global and one of editor/emacs* ports for that. TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files From owner-svn-src-all@freebsd.org Wed May 31 09:23:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0290FAFB4D5; Wed, 31 May 2017 09:23:23 +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 C69D07071B; Wed, 31 May 2017 09:23:22 +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 v4V9NLr0040731; Wed, 31 May 2017 09:23:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V9NLPF040730; Wed, 31 May 2017 09:23:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705310923.v4V9NLPF040730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 31 May 2017 09:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319310 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 09:23:23 -0000 Author: kib Date: Wed May 31 09:23:21 2017 New Revision: 319310 URL: https://svnweb.freebsd.org/changeset/base/319310 Log: MFC r319086: Mention that the basep argument to getdirentries(2) can be NULL. Modified: stable/11/lib/libc/sys/getdirentries.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/getdirentries.2 ============================================================================== --- stable/11/lib/libc/sys/getdirentries.2 Wed May 31 08:47:09 2017 (r319309) +++ stable/11/lib/libc/sys/getdirentries.2 Wed May 31 09:23:21 2017 (r319310) @@ -124,7 +124,10 @@ or A value of zero is returned when the end of the directory has been reached. .Pp -The +If the +.Fa basep +pointer value is non-NULL , +the .Fn getdirentries system call writes the position of the block read into the location pointed to by .Fa basep . @@ -157,7 +160,7 @@ is not a valid file descriptor open for reading. .It Bq Er EFAULT Either .Fa buf -or +or non-NULL .Fa basep point outside the allocated address space. .It Bq Er EINVAL From owner-svn-src-all@freebsd.org Wed May 31 09:25:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A518BAFB549; Wed, 31 May 2017 09:25:48 +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 72843709D8; Wed, 31 May 2017 09:25:48 +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 v4V9PlxQ040889; Wed, 31 May 2017 09:25:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4V9PlQk040888; Wed, 31 May 2017 09:25:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705310925.v4V9PlQk040888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 31 May 2017 09:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319311 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 09:25:48 -0000 Author: kib Date: Wed May 31 09:25:47 2017 New Revision: 319311 URL: https://svnweb.freebsd.org/changeset/base/319311 Log: MFC r319086: Mention that the basep argument to getdirentries(2) can be NULL. Modified: stable/10/lib/libc/sys/getdirentries.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/getdirentries.2 ============================================================================== --- stable/10/lib/libc/sys/getdirentries.2 Wed May 31 09:23:21 2017 (r319310) +++ stable/10/lib/libc/sys/getdirentries.2 Wed May 31 09:25:47 2017 (r319311) @@ -124,7 +124,10 @@ or A value of zero is returned when the end of the directory has been reached. .Pp -The +If the +.Fa basep +pointer value is non-NULL , +the .Fn getdirentries system call writes the position of the block read into the location pointed to by .Fa basep . @@ -156,7 +159,7 @@ is not a valid file descriptor open for reading. .It Bq Er EFAULT Either .Fa buf -or +or non-NULL .Fa basep point outside the allocated address space. .It Bq Er EINVAL From owner-svn-src-all@freebsd.org Wed May 31 09:55:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07C73AFBB69; Wed, 31 May 2017 09:55:15 +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 05BC1716E2; Wed, 31 May 2017 09:55:13 +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 4fa48992; Wed, 31 May 2017 11:48:30 +0200 (CEST) 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=OBbIHgY/ykD9q8G2B5hpzzlc0/8=; b=mnaAQfr+CYLNOPPYutiqqtbZuNEP nHMtRKHMgtqRk2lxyJcFBve5G+hwhHPITDwV5LyVRkYwUomWsE7e5fNWTC75/Gyz qOM6FMRQyxLredKPsODE2JZECfgtcTyPnUMSuS429YNeiErWCL76dfkoaABdtUNl t1IhtA9XeACJ3Sc= 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=d7Y9ILpnqtakp2T2JbT32EWEInM6PCjF5yqg3uAntRTMq3a02juumFgC mo+U+D6afn74FIuKFnO9plmDdGyF/a70l6ksrgC6h56EfJaVwj7/mI72E4JWbZ7e wO1DP0bGu2SOWZ2DQVwvDGybqWZfrPvLY2+5zS8ybx83Lpyt8jo= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 2cc055a3 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 31 May 2017 11:48:30 +0200 (CEST) Date: Wed, 31 May 2017 11:48:29 +0200 From: Emmanuel Vadot To: "Ngie Cooper (yaneurabeya)" Cc: Emmanuel Vadot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r319125 - head/usr.bin/mkimg Message-Id: <20170531114829.28359de76187bdd184746b5a@bidouilliste.com> In-Reply-To: References: <201705291251.v4TCp24h090283@repo.freebsd.org> X-Mailer: Sylpheed 3.5.1 (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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 09:55:15 -0000 On Wed, 31 May 2017 00:20:45 -0700 "Ngie Cooper (yaneurabeya)" wrote: > > > On May 29, 2017, at 05:51, Emmanuel Vadot wrote: > > > > Author: manu > > Date: Mon May 29 12:51:02 2017 > > New Revision: 319125 > > URL: https://svnweb.freebsd.org/changeset/base/319125 > > > > Log: > > mkimg: Correct an off by one error in the PMBR size > > > > The PMBR last sector should be number of sector - 1 (As stated in UEFI Spec > > 2.6 page 118 table 17). > > This fixes warning printed by linux tools like parted or fdisk. > > This commit broke all of the mkimg gpt tests. For example: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/3280/testReport/junit/usr.bin.mkimg/mkimg_test/gpt_1x1_4096_qcow/ . > -Ngie Sorry about that and thanks for the fix. -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Wed May 31 10:01:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E519AFBD7C; Wed, 31 May 2017 10:01:16 +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 5C9897191A; Wed, 31 May 2017 10:01:16 +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 v4VA1Fk8057009; Wed, 31 May 2017 10:01:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VA1FwI057008; Wed, 31 May 2017 10:01:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311001.v4VA1FwI057008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 10:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319312 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 10:01:16 -0000 Author: hselasky Date: Wed May 31 10:01:15 2017 New Revision: 319312 URL: https://svnweb.freebsd.org/changeset/base/319312 Log: Make sure the thread's priority is restored for all three cases inside linux_synchronize_rcu_cb() in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_rcu.c Wed May 31 09:25:47 2017 (r319311) +++ head/sys/compat/linuxkpi/common/src/linux_rcu.c Wed May 31 10:01:15 2017 (r319312) @@ -236,7 +236,6 @@ linux_synchronize_rcu_cb(ck_epoch_t *epoch __unused, c if (record->cpuid == PCPU_GET(cpuid)) { bool is_sleeping = 0; u_char prio = 0; - u_char old_prio; /* * Find the lowest priority or sleeping thread which @@ -255,13 +254,10 @@ linux_synchronize_rcu_cb(ck_epoch_t *epoch __unused, c pause("W", 1); thread_lock(td); } else { - old_prio = td->td_priority; /* set new thread priority */ sched_prio(td, prio); /* task switch */ mi_switch(SW_VOL | SWT_RELINQUISH, NULL); - /* restore thread priority */ - sched_prio(td, old_prio); } } else { /* @@ -282,6 +278,7 @@ linux_synchronize_rcu(void) int was_bound; int old_cpu; int old_pinned; + u_char old_prio; if (RCU_SKIP()) return; @@ -301,6 +298,7 @@ linux_synchronize_rcu(void) old_cpu = PCPU_GET(cpuid); old_pinned = td->td_pinned; + old_prio = td->td_priority; td->td_pinned = 0; was_bound = sched_is_bound(td); sched_bind(td, old_cpu); @@ -319,6 +317,9 @@ linux_synchronize_rcu(void) } /* restore pinned after bind */ td->td_pinned = old_pinned; + + /* restore thread priority */ + sched_prio(td, old_prio); thread_unlock(td); PICKUP_GIANT(); From owner-svn-src-all@freebsd.org Wed May 31 12:03:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9DFBAFF25D; Wed, 31 May 2017 12:03:00 +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 823C575A7E; Wed, 31 May 2017 12:03:00 +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 v4VC2x5k007001; Wed, 31 May 2017 12:02:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VC2xod006998; Wed, 31 May 2017 12:02:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311202.v4VC2xod006998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 12:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319316 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 12:03:00 -0000 Author: hselasky Date: Wed May 31 12:02:59 2017 New Revision: 319316 URL: https://svnweb.freebsd.org/changeset/base/319316 Log: Fixes for refcounting "struct linux_file" in the LinuxKPI. - Allow "struct linux_file" to be refcounted when its "_file" member is NULL by using its "f_count" field. The reference counts are transferred to the file structure when the file descriptor is installed. - Add missing vdrop() calls for error cases during open(). - Set the "_file" member of "struct linux_file" during open. This allows use of refcounting through get_file() and fput() with LinuxKPI character devices. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/file.h head/sys/compat/linuxkpi/common/include/linux/fs.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/file.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/file.h Wed May 31 10:32:13 2017 (r319315) +++ head/sys/compat/linuxkpi/common/include/linux/file.h Wed May 31 12:02:59 2017 (r319316) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,19 +60,24 @@ linux_fget(unsigned int fd) return (struct linux_file *)file->f_data; } +extern void linux_file_free(struct linux_file *filp); + static inline void fput(struct linux_file *filp) { - if (filp->_file == NULL) { - kfree(filp); - return; + if (refcount_release(filp->_file == NULL ? + &filp->f_count : &filp->_file->f_count)) { + linux_file_free(filp); } - if (refcount_release(&filp->_file->f_count)) { - _fdrop(filp->_file, curthread); - kfree(filp); - } } +static inline unsigned int +file_count(struct linux_file *filp) +{ + return (filp->_file == NULL ? + filp->f_count : filp->_file->f_count); +} + static inline void put_unused_fd(unsigned int fd) { @@ -106,6 +111,10 @@ fd_install(unsigned int fd, struct linux_file *filp) } else { filp->_file = file; finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); + + /* transfer reference count from "filp" to "file" */ + while (refcount_release(&filp->f_count) == 0) + refcount_acquire(&file->f_count); } /* drop the extra reference */ @@ -150,6 +159,8 @@ alloc_file(int mode, const struct file_operations *fop filp = kzalloc(sizeof(*filp), GFP_KERNEL); if (filp == NULL) return (NULL); + + filp->f_count = 1; filp->f_op = fops; filp->f_mode = mode; @@ -171,7 +182,7 @@ static inline struct fd fdget(unsigned int fd) return (struct fd){f}; } -#define file linux_file -#define fget linux_fget +#define file linux_file +#define fget(...) linux_fget(__VA_ARGS__) #endif /* _LINUX_FILE_H_ */ Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/fs.h Wed May 31 10:32:13 2017 (r319315) +++ head/sys/compat/linuxkpi/common/include/linux/fs.h Wed May 31 12:02:59 2017 (r319316) @@ -79,6 +79,7 @@ struct linux_file { struct selinfo f_selinfo; struct sigio *f_sigio; struct vnode *f_vnode; + volatile u_int f_count; }; #define file linux_file @@ -218,6 +219,14 @@ iminor(struct inode *inode) { return (minor(dev2unit(inode->v_rdev))); +} + +static inline struct linux_file * +get_file(struct linux_file *f) +{ + + refcount_acquire(f->_file == NULL ? &f->f_count : &f->_file->f_count); + return (f); } static inline struct inode * Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 10:32:13 2017 (r319315) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 12:02:59 2017 (r319316) @@ -401,6 +401,20 @@ linux_file_dtor(void *cdp) kfree(filp); } +void +linux_file_free(struct linux_file *filp) +{ + if (filp->_file == NULL) { + kfree(filp); + } else { + /* + * The close method of the character device or file + * will free the linux_file structure: + */ + _fdrop(filp->_file, curthread); + } +} + static int linux_cdev_pager_populate(vm_object_t vm_obj, vm_pindex_t pidx, int fault_type, vm_prot_t max_prot, vm_pindex_t *first, vm_pindex_t *last) @@ -593,9 +607,12 @@ linux_dev_open(struct cdev *dev, int oflags, int devty vhold(file->f_vnode); filp->f_vnode = file->f_vnode; linux_set_current(td); + filp->_file = file; + if (filp->f_op->open) { error = -filp->f_op->open(file->f_vnode, filp); if (error) { + vdrop(filp->f_vnode); kfree(filp); goto done; } @@ -603,6 +620,7 @@ linux_dev_open(struct cdev *dev, int oflags, int devty error = devfs_set_cdevpriv(filp, linux_file_dtor); if (error) { filp->f_op->release(file->f_vnode, filp); + vdrop(filp->f_vnode); kfree(filp); } done: @@ -622,8 +640,7 @@ linux_dev_close(struct cdev *dev, int fflag, int devty if ((error = devfs_get_cdevpriv((void **)&filp)) != 0) return (error); filp->f_flags = file->f_flag; - devfs_clear_cdevpriv(); - + devfs_clear_cdevpriv(); return (0); } From owner-svn-src-all@freebsd.org Wed May 31 12:08:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD920AFF36B; Wed, 31 May 2017 12:08:26 +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 9E00775CAD; Wed, 31 May 2017 12:08:26 +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 v4VC8Pih007327; Wed, 31 May 2017 12:08:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VC8PmK007326; Wed, 31 May 2017 12:08:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311208.v4VC8PmK007326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 12:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319317 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 12:08:26 -0000 Author: hselasky Date: Wed May 31 12:08:25 2017 New Revision: 319317 URL: https://svnweb.freebsd.org/changeset/base/319317 Log: Fix a reference count leak in the LinuxKPI due to calling VM open when it shouldn't be called. Background: The Linux VM open operation is called when a new VMA is created on top of the current VMA. This is done through either mremap flow or split_vma, usually due to mlock, madvise, munmap and so on. This is currently not supported by the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 12:02:59 2017 (r319316) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 12:08:25 2017 (r319317) @@ -547,20 +547,9 @@ static int linux_cdev_pager_ctor(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t foff, struct ucred *cred, u_short *color) { - const struct vm_operations_struct *vm_ops; - struct vm_area_struct *vmap; - vmap = linux_cdev_handle_find(handle); - MPASS(vmap != NULL); - + MPASS(linux_cdev_handle_find(handle) != NULL); *color = 0; - - down_write(&vmap->vm_mm->mmap_sem); - vm_ops = vmap->vm_ops; - if (likely(vm_ops != NULL)) - vm_ops->open(vmap); - up_write(&vmap->vm_mm->mmap_sem); - return (0); } From owner-svn-src-all@freebsd.org Wed May 31 13:01:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80A86B795D2; Wed, 31 May 2017 13:01:28 +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 51098776E4; Wed, 31 May 2017 13:01:28 +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 v4VD1R2q028899; Wed, 31 May 2017 13:01:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VD1ReD028897; Wed, 31 May 2017 13:01:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311301.v4VD1ReD028897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 13:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319318 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:01:28 -0000 Author: hselasky Date: Wed May 31 13:01:27 2017 New Revision: 319318 URL: https://svnweb.freebsd.org/changeset/base/319318 Log: Don't acquire a reference on the VM-space when allocating the LinuxKPI task structure to avoid deadlock when tearing down the VM object during a process exit. Found by: markj @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/mm_types.h head/sys/compat/linuxkpi/common/src/linux_current.c head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/include/linux/mm_types.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/mm_types.h Wed May 31 12:08:25 2017 (r319317) +++ head/sys/compat/linuxkpi/common/include/linux/mm_types.h Wed May 31 13:01:27 2017 (r319318) @@ -38,11 +38,9 @@ struct vm_area_struct; struct task_struct; -struct vmspace; struct mm_struct { struct vm_area_struct *mmap; - struct vmspace *vmspace; atomic_t mm_count; atomic_t mm_users; size_t pinned_vm; Modified: head/sys/compat/linuxkpi/common/src/linux_current.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_current.c Wed May 31 12:08:25 2017 (r319317) +++ head/sys/compat/linuxkpi/common/src/linux_current.c Wed May 31 13:01:27 2017 (r319318) @@ -96,7 +96,6 @@ linux_alloc_current(struct thread *td, int flags) init_rwsem(&mm->mmap_sem); atomic_set(&mm->mm_count, 1); atomic_set(&mm->mm_users, 1); - mm->vmspace = vmspace_acquire_ref(proc); /* set mm_struct pointer */ ts->mm = mm; /* clear pointer to not free memory */ @@ -119,7 +118,7 @@ linux_get_task_mm(struct task_struct *task) struct mm_struct *mm; mm = task->mm; - if (mm != NULL && mm->vmspace != NULL) { + if (mm != NULL) { atomic_inc(&mm->mm_users); return (mm); } @@ -129,8 +128,6 @@ linux_get_task_mm(struct task_struct *task) void linux_mm_dtor(struct mm_struct *mm) { - if (mm->vmspace != NULL) - vmspace_free(mm->vmspace); free(mm, M_LINUX_CURRENT); } Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Wed May 31 12:08:25 2017 (r319317) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Wed May 31 13:01:27 2017 (r319318) @@ -268,7 +268,7 @@ get_user_pages_remote(struct task_struct *task, struct { vm_map_t map; - map = &mm->vmspace->vm_map; + map = &task->task_thread->td_proc->p_vmspace->vm_map; return (linux_get_user_pages_internal(map, start, nr_pages, !!(gup_flags & FOLL_WRITE), pages)); } From owner-svn-src-all@freebsd.org Wed May 31 13:05:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08F59B796A7; Wed, 31 May 2017 13:05:56 +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 D8C6977AEA; Wed, 31 May 2017 13:05:55 +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 v4VD5tBd032059; Wed, 31 May 2017 13:05:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VD5tSb032058; Wed, 31 May 2017 13:05:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311305.v4VD5tSb032058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 13:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319319 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:05:56 -0000 Author: hselasky Date: Wed May 31 13:05:54 2017 New Revision: 319319 URL: https://svnweb.freebsd.org/changeset/base/319319 Log: Remove the VMA handle from its list before calling the LinuxKPI VMA close operation to prevent other threads from reusing the VM object handle pointer. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 13:01:27 2017 (r319318) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 13:05:54 2017 (r319319) @@ -486,6 +486,15 @@ static struct rwlock linux_vma_lock; static TAILQ_HEAD(, vm_area_struct) linux_vma_head = TAILQ_HEAD_INITIALIZER(linux_vma_head); +static void +linux_cdev_handle_free(struct vm_area_struct *vmap) +{ + /* Drop reference on mm_struct */ + mmput(vmap->vm_mm); + + kfree(vmap); +} + static struct vm_area_struct * linux_cdev_handle_insert(void *handle, struct vm_area_struct *vmap) { @@ -495,20 +504,10 @@ linux_cdev_handle_insert(void *handle, struct vm_area_ TAILQ_FOREACH(ptr, &linux_vma_head, vm_entry) { if (ptr->vm_private_data == handle) { rw_wunlock(&linux_vma_lock); - kfree(vmap); + linux_cdev_handle_free(vmap); return (NULL); } } - /* - * The same VM object might be shared by multiple processes - * and the mm_struct is usually freed when a process exits. - * - * The atomic reference below makes sure the mm_struct is - * available as long as the vmap is in the linux_vma_head. - */ - if (atomic_inc_not_zero(&vmap->vm_mm->mm_users) == 0) - panic("linuxkpi: mm_users is zero\n"); - TAILQ_INSERT_TAIL(&linux_vma_head, vmap, vm_entry); rw_wunlock(&linux_vma_lock); return (vmap); @@ -517,16 +516,9 @@ linux_cdev_handle_insert(void *handle, struct vm_area_ static void linux_cdev_handle_remove(struct vm_area_struct *vmap) { - if (vmap == NULL) - return; - rw_wlock(&linux_vma_lock); TAILQ_REMOVE(&linux_vma_head, vmap, vm_entry); rw_wunlock(&linux_vma_lock); - - /* Drop reference on mm_struct */ - mmput(vmap->vm_mm); - kfree(vmap); } static struct vm_area_struct * @@ -562,13 +554,19 @@ linux_cdev_pager_dtor(void *handle) vmap = linux_cdev_handle_find(handle); MPASS(vmap != NULL); + /* + * Remove handle before calling close operation to prevent + * other threads from reusing the handle pointer. + */ + linux_cdev_handle_remove(vmap); + down_write(&vmap->vm_mm->mmap_sem); vm_ops = vmap->vm_ops; if (likely(vm_ops != NULL)) vm_ops->close(vmap); up_write(&vmap->vm_mm->mmap_sem); - linux_cdev_handle_remove(vmap); + linux_cdev_handle_free(vmap); } static struct cdev_pager_ops linux_cdev_pager_ops = { @@ -895,6 +893,7 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * vm_size_t size, struct vm_object **object, int nprot) { struct vm_area_struct *vmap; + struct mm_struct *mm; struct linux_file *filp; struct thread *td; struct file *file; @@ -914,6 +913,17 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * linux_set_current(td); + /* + * The same VM object might be shared by multiple processes + * and the mm_struct is usually freed when a process exits. + * + * The atomic reference below makes sure the mm_struct is + * available as long as the vmap is in the linux_vma_head. + */ + mm = current->mm; + if (atomic_inc_not_zero(&mm->mm_users) == 0) + return (EINVAL); + vmap = kzalloc(sizeof(*vmap), GFP_KERNEL); vmap->vm_start = 0; vmap->vm_end = size; @@ -922,7 +932,7 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * vmap->vm_flags = vmap->vm_page_prot = nprot; vmap->vm_ops = NULL; vmap->vm_file = filp; - vmap->vm_mm = current->mm; + vmap->vm_mm = mm; if (unlikely(down_write_killable(&vmap->vm_mm->mmap_sem))) { error = EINTR; @@ -932,7 +942,7 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * } if (error != 0) { - kfree(vmap); + linux_cdev_handle_free(vmap); return (error); } @@ -945,7 +955,7 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * vmap->vm_ops->open == NULL || vmap->vm_ops->close == NULL || vmap->vm_private_data == NULL) { - kfree(vmap); + linux_cdev_handle_free(vmap); return (EINVAL); } @@ -958,6 +968,7 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * if (*object == NULL) { linux_cdev_handle_remove(vmap); + linux_cdev_handle_free(vmap); return (EINVAL); } } else { @@ -969,7 +980,7 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * *object = vm_pager_allocate(OBJT_SG, sg, vmap->vm_len, nprot, 0, curthread->td_ucred); - kfree(vmap); + linux_cdev_handle_free(vmap); if (*object == NULL) { sglist_free(sg); From owner-svn-src-all@freebsd.org Wed May 31 13:07:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5979CB7972E; Wed, 31 May 2017 13:07:06 +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 2809977C40; Wed, 31 May 2017 13:07:06 +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 v4VD75tM032208; Wed, 31 May 2017 13:07:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VD75jr032207; Wed, 31 May 2017 13:07:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311307.v4VD75jr032207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 13:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319320 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:07:06 -0000 Author: hselasky Date: Wed May 31 13:07:05 2017 New Revision: 319320 URL: https://svnweb.freebsd.org/changeset/base/319320 Log: Make sure the VMAP's "vm_file" field is referenced in a Linux compatible way by the linux_dev_mmap_single() function in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 13:05:54 2017 (r319319) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 13:07:05 2017 (r319320) @@ -489,6 +489,10 @@ static TAILQ_HEAD(, vm_area_struct) linux_vma_head = static void linux_cdev_handle_free(struct vm_area_struct *vmap) { + /* Drop reference on vm_file */ + if (vmap->vm_file != NULL) + fput(vmap->vm_file); + /* Drop reference on mm_struct */ mmput(vmap->vm_mm); @@ -931,7 +935,7 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * vmap->vm_pfn = 0; vmap->vm_flags = vmap->vm_page_prot = nprot; vmap->vm_ops = NULL; - vmap->vm_file = filp; + vmap->vm_file = get_file(filp); vmap->vm_mm = mm; if (unlikely(down_write_killable(&vmap->vm_mm->mmap_sem))) { From owner-svn-src-all@freebsd.org Wed May 31 13:11:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 403FEB79D04; Wed, 31 May 2017 13:11:08 +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 0F017787E5; Wed, 31 May 2017 13:11:07 +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 v4VDB7nb037219; Wed, 31 May 2017 13:11:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDB7Ug037218; Wed, 31 May 2017 13:11:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311311.v4VDB7Ug037218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 13:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319321 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:11:08 -0000 Author: hselasky Date: Wed May 31 13:11:06 2017 New Revision: 319321 URL: https://svnweb.freebsd.org/changeset/base/319321 Log: Properly set the .d_name field in the cdevsw structure for the LinuxKPI. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 13:07:05 2017 (r319320) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 13:11:06 2017 (r319321) @@ -1011,6 +1011,7 @@ struct cdevsw linuxcdevsw = { .d_ioctl = linux_dev_ioctl, .d_mmap_single = linux_dev_mmap_single, .d_poll = linux_dev_poll, + .d_name = "lkpidev", }; static int From owner-svn-src-all@freebsd.org Wed May 31 13:33:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7021CB7A271; Wed, 31 May 2017 13:33:04 +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 3F85679DA7; Wed, 31 May 2017 13:33:04 +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 v4VDX348047785; Wed, 31 May 2017 13:33:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDX3gQ047784; Wed, 31 May 2017 13:33:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDX3gQ047784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319322 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:04 -0000 Author: gjb Date: Wed May 31 13:33:03 2017 New Revision: 319322 URL: https://svnweb.freebsd.org/changeset/base/319322 Log: Document r319269, cxgbe(4) firmware update. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:11:06 2017 (r319321) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:03 2017 (r319322) @@ -602,10 +602,6 @@ to support Microchip/Micrel KSZ9031 Gigabit ethernet cards. - The &man.cxgbe.4; driver has been updated - to firmware version 1.16.26.0 for T4, T5, and T6 cards. - The &man.alc.4; driver has been updated to provide support for Atheros® Killer E2400™ Gigabit ethernet cards. @@ -635,6 +631,10 @@ The &man.ixl.4; driver has been updated to version 1.7.12-k. + + The &man.cxgbe.4; driver has been updated + to firmware version 1.16.45.0 for T4, T5, and T6 cards. From owner-svn-src-all@freebsd.org Wed May 31 13:33:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67131B7A278; Wed, 31 May 2017 13:33:05 +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 315EE79DA8; Wed, 31 May 2017 13:33:05 +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 v4VDX4Cc047829; Wed, 31 May 2017 13:33:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDX4mW047828; Wed, 31 May 2017 13:33:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDX4mW047828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319323 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:05 -0000 Author: gjb Date: Wed May 31 13:33:04 2017 New Revision: 319323 URL: https://svnweb.freebsd.org/changeset/base/319323 Log: Document r319244, rpcbind(8) warmstart support knob. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:03 2017 (r319322) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:04 2017 (r319323) @@ -179,6 +179,12 @@ LLD has been enabled by default and installed as /usr/bin/ld on &os;/&arch.arm64;. + + The + WITH_RPCBIND_WARMSTART_SUPPORT + &man.src.conf.5; knob has been added, which when enabled + allows building &man.rpcbind.8; with + warmstart support. From owner-svn-src-all@freebsd.org Wed May 31 13:33:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D84F8B7A2B5; Wed, 31 May 2017 13:33:09 +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 A3C1679DD0; Wed, 31 May 2017 13:33:09 +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 v4VDX83I047878; Wed, 31 May 2017 13:33:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDX8qf047877; Wed, 31 May 2017 13:33:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDX8qf047877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319324 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:10 -0000 Author: gjb Date: Wed May 31 13:33:08 2017 New Revision: 319324 URL: https://svnweb.freebsd.org/changeset/base/319324 Log: Document r311507, cxgbe(4) firmware 1.16.26.0. Document r316485, qlnx(4) addition. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:04 2017 (r319323) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:08 2017 (r319324) @@ -282,7 +282,13 @@ Network Drivers -   + The &man.cxgbe.4; driver has been updated + to firmware version 1.16.26.0 for T4, T5, and T6 cards. + + The &man.qlnxe.4; driver has been added, + providing support for Cavium® Qlogic™ 45000 Series + adapters. From owner-svn-src-all@freebsd.org Wed May 31 13:33:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3E7FB7A2E2; Wed, 31 May 2017 13:33:12 +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 70CAE79E20; Wed, 31 May 2017 13:33:12 +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 v4VDXBvT048012; Wed, 31 May 2017 13:33:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDXBmY048011; Wed, 31 May 2017 13:33:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDXBmY048011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319327 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:12 -0000 Author: gjb Date: Wed May 31 13:33:11 2017 New Revision: 319327 URL: https://svnweb.freebsd.org/changeset/base/319327 Log: Document r313206, inetd(8) buildable without libwrap(3). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:10 2017 (r319326) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:11 2017 (r319327) @@ -162,7 +162,10 @@ Userland Configuration Changes -   + The &man.inetd.8; utility is now built + without libwrap support when + WITHOUT_TCP_WRAPPERS is set in + &man.src.conf.5;. From owner-svn-src-all@freebsd.org Wed May 31 13:33:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F8FFB7A2C7; Wed, 31 May 2017 13:33:11 +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 BFD1679DEB; Wed, 31 May 2017 13:33:10 +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 v4VDX9Hk047923; Wed, 31 May 2017 13:33:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDX9gQ047921; Wed, 31 May 2017 13:33:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDX9gQ047921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319325 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:11 -0000 Author: gjb Date: Wed May 31 13:33:09 2017 New Revision: 319325 URL: https://svnweb.freebsd.org/changeset/base/319325 Log: Document r312359, r314019: alc(4) Killer E2400/E2500 support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/sponsor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:08 2017 (r319324) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:09 2017 (r319325) @@ -286,6 +286,15 @@ sponsor="&chelsio;">The &man.cxgbe.4; driver has been updated to firmware version 1.16.26.0 for T4, T5, and T6 cards. + The &man.alc.4; driver has been updated + to provide support for Atheros® Killer E2400™ + Gigabit ethernet cards. + + The + &man.alc.4; driver has been updated to provide support for + Atheros® Killer E2500™ Gigabit ethernet + cards. + The &man.qlnxe.4; driver has been added, providing support for Cavium® Qlogic™ 45000 Series adapters. Modified: stable/10/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/10/release/doc/share/xml/sponsor.ent Wed May 31 13:33:08 2017 (r319324) +++ stable/10/release/doc/share/xml/sponsor.ent Wed May 31 13:33:09 2017 (r319325) @@ -30,6 +30,7 @@ + From owner-svn-src-all@freebsd.org Wed May 31 13:33:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CB9AB7A2D7; Wed, 31 May 2017 13:33:12 +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 C776F79E07; Wed, 31 May 2017 13:33:11 +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 v4VDXAti047968; Wed, 31 May 2017 13:33:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDXA2B047965; Wed, 31 May 2017 13:33:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDXA2B047965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319326 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:12 -0000 Author: gjb Date: Wed May 31 13:33:10 2017 New Revision: 319326 URL: https://svnweb.freebsd.org/changeset/base/319326 Log: Document r309340, GARP retransmit capability. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/sponsor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:09 2017 (r319325) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:10 2017 (r319326) @@ -387,7 +387,13 @@ Network Protocols -   + Support for GARP + (gratuitous ARP) retransmit has been added. + A new &man.sysctl.8;, + net.link.ether.inet.garp_rexmit_count, has + been added, which sets the maximum number of retransmissions + when set to a non-zero value. Modified: stable/10/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/10/release/doc/share/xml/sponsor.ent Wed May 31 13:33:09 2017 (r319325) +++ stable/10/release/doc/share/xml/sponsor.ent Wed May 31 13:33:10 2017 (r319326) @@ -17,6 +17,7 @@ + From owner-svn-src-all@freebsd.org Wed May 31 13:33:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 758CCB7A303; Wed, 31 May 2017 13:33:14 +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 3D16979E52; Wed, 31 May 2017 13:33:14 +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 v4VDXD5h048098; Wed, 31 May 2017 13:33:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDXDmb048097; Wed, 31 May 2017 13:33:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDXDmb048097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319329 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:14 -0000 Author: gjb Date: Wed May 31 13:33:13 2017 New Revision: 319329 URL: https://svnweb.freebsd.org/changeset/base/319329 Log: Document r308915, zfsbootcfg(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:12 2017 (r319328) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:13 2017 (r319329) @@ -177,7 +177,9 @@ Userland Application Changes -   + The &man.zfsbootcfg.8; utility has been + added, providing one-time &man.boot.config.5;-style options + for &man.zfsboot.8;. From owner-svn-src-all@freebsd.org Wed May 31 13:33:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0407DB7A31D; Wed, 31 May 2017 13:33:16 +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 BED1C79E82; Wed, 31 May 2017 13:33:15 +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 v4VDXEXS048184; Wed, 31 May 2017 13:33:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDXEA7048183; Wed, 31 May 2017 13:33:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDXEA7048183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319331 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:16 -0000 Author: gjb Date: Wed May 31 13:33:14 2017 New Revision: 319331 URL: https://svnweb.freebsd.org/changeset/base/319331 Log: Document r319270, cxgbe(4) firmware update. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:13 2017 (r319330) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:14 2017 (r319331) @@ -296,10 +296,6 @@ Network Drivers - The &man.cxgbe.4; driver has been updated - to firmware version 1.16.26.0 for T4, T5, and T6 cards. - The &man.alc.4; driver has been updated to provide support for Atheros® Killer E2400™ Gigabit ethernet cards. @@ -312,6 +308,10 @@ The &man.qlnxe.4; driver has been added, providing support for Cavium® Qlogic™ 45000 Series adapters. + + The &man.cxgbe.4; driver has been updated + to firmware version 1.16.45.0 for T4, T5, and T6 cards. From owner-svn-src-all@freebsd.org Wed May 31 13:33:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BDB3B7A2F0; Wed, 31 May 2017 13:33:13 +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 4A30479E3D; Wed, 31 May 2017 13:33:13 +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 v4VDXCHK048055; Wed, 31 May 2017 13:33:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDXCXF048054; Wed, 31 May 2017 13:33:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDXCXF048054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319328 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:13 -0000 Author: gjb Date: Wed May 31 13:33:12 2017 New Revision: 319328 URL: https://svnweb.freebsd.org/changeset/base/319328 Log: Document r316046, WITHOUT_LIBTHR properly removes optional files. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:11 2017 (r319327) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:12 2017 (r319328) @@ -166,6 +166,12 @@ without libwrap support when WITHOUT_TCP_WRAPPERS is set in &man.src.conf.5;. + + The &man.libthr.3; library and related + files are now evaluated and removed by the + delete-old-libs target when upgrading the + system if WITHOUT_LIBTHR is + set in &man.src.conf.5;. From owner-svn-src-all@freebsd.org Wed May 31 13:33:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D9C4B7A310; Wed, 31 May 2017 13:33:15 +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 DE15879E65; Wed, 31 May 2017 13:33:14 +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 v4VDXEqb048141; Wed, 31 May 2017 13:33:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDXEuL048140; Wed, 31 May 2017 13:33:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDXEuL048140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319330 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:15 -0000 Author: gjb Date: Wed May 31 13:33:13 2017 New Revision: 319330 URL: https://svnweb.freebsd.org/changeset/base/319330 Log: Document r317434, ipf(4) 'keep frags' no longer implicit with 'keep state' Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:13 2017 (r319329) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:13 2017 (r319330) @@ -256,7 +256,10 @@ Kernel Bug Fixes - + The &man.ipf.4; packet filter has been + updated to prevent keep state from + incorrectly implying keep frags, matching + the behavior documented in &man.ipf.5;. From owner-svn-src-all@freebsd.org Wed May 31 13:33:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE719B7A32C; Wed, 31 May 2017 13:33:16 +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 96B0779E93; Wed, 31 May 2017 13:33:16 +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 v4VDXF7L048227; Wed, 31 May 2017 13:33:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDXFfB048226; Wed, 31 May 2017 13:33:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311333.v4VDXFfB048226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319332 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:33:17 -0000 Author: gjb Date: Wed May 31 13:33:15 2017 New Revision: 319332 URL: https://svnweb.freebsd.org/changeset/base/319332 Log: Document r319243, rpcbind(8) warmstart support knob. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:14 2017 (r319331) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:15 2017 (r319332) @@ -172,6 +172,12 @@ delete-old-libs target when upgrading the system if WITHOUT_LIBTHR is set in &man.src.conf.5;. + + The + WITH_RPCBIND_WARMSTART_SUPPORT + &man.src.conf.5; knob has been added, which when enabled + allows building &man.rpcbind.8; with + warmstart support. From owner-svn-src-all@freebsd.org Wed May 31 13:44:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28AFCB7A7F1; Wed, 31 May 2017 13:44:55 +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 EAECC7AD97; Wed, 31 May 2017 13:44:54 +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 v4VDisdY052236; Wed, 31 May 2017 13:44:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDisSH052235; Wed, 31 May 2017 13:44:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311344.v4VDisSH052235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319334 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:44:55 -0000 Author: gjb Date: Wed May 31 13:44:53 2017 New Revision: 319334 URL: https://svnweb.freebsd.org/changeset/base/319334 Log: Document r316040, kvm_close(3) return error fix. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:44:53 2017 (r319333) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:44:53 2017 (r319334) @@ -242,7 +242,9 @@ Runtime Libraries and API -   + The &man.kvm.close.3; function has been + updated to return the accumulated error from previous + &man.close.2; calls. From owner-svn-src-all@freebsd.org Wed May 31 13:44:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 635E9B7A7EC; Wed, 31 May 2017 13:44:54 +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 23CAE7AD95; Wed, 31 May 2017 13:44:54 +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 v4VDirq9052193; Wed, 31 May 2017 13:44:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDir67052192; Wed, 31 May 2017 13:44:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311344.v4VDir67052192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319333 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:44:54 -0000 Author: gjb Date: Wed May 31 13:44:53 2017 New Revision: 319333 URL: https://svnweb.freebsd.org/changeset/base/319333 Log: Document r317375, RTT used for receive buffer auto resizing. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:33:15 2017 (r319332) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:44:53 2017 (r319333) @@ -404,6 +404,15 @@ This section describes changes that affect networking in &os;. + + General Networking Changes + + The TCP stack has + been changed to use the estimated RTT + instead of timestamps for receive buffer auto resizing. + + Network Protocols From owner-svn-src-all@freebsd.org Wed May 31 13:44:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBF4DB7A7F9; Wed, 31 May 2017 13:44:55 +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 BA3FD7AD98; Wed, 31 May 2017 13:44:55 +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 v4VDisXI052279; Wed, 31 May 2017 13:44:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VDisF1052278; Wed, 31 May 2017 13:44:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311344.v4VDisF1052278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 13:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319335 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 13:44:56 -0000 Author: gjb Date: Wed May 31 13:44:54 2017 New Revision: 319335 URL: https://svnweb.freebsd.org/changeset/base/319335 Log: Document r313558, garbage IP addresses in UDP log_in_vain messages fix. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:44:53 2017 (r319334) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 13:44:54 2017 (r319335) @@ -409,6 +409,12 @@ General Networking Changes + The network stack has been modified to fix + incorrect or invalid IP addresses if + multiple threads emit a UDP + log_in_vain message concurrently. + The TCP stack has been changed to use the estimated RTT From owner-svn-src-all@freebsd.org Wed May 31 14:53:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BCCFB7BF33; Wed, 31 May 2017 14:53:51 +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 EFB8D7D882; Wed, 31 May 2017 14:53:50 +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 v4VErobj081900; Wed, 31 May 2017 14:53:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VEroTW081899; Wed, 31 May 2017 14:53:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705311453.v4VEroTW081899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 31 May 2017 14:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319336 - head/usr.sbin/bootparamd/bootparamd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 14:53:51 -0000 Author: asomers Date: Wed May 31 14:53:50 2017 New Revision: 319336 URL: https://svnweb.freebsd.org/changeset/base/319336 Log: Fix uninitialized variable in bootparamd.c Restore line that was accidentally deleted in change 318790 Reported by: Coverity CID: 1375855 MFC after: 1 week X-MFC-With: 318790 Sponsored by: Spectra Logic Corp Modified: head/usr.sbin/bootparamd/bootparamd/bootparamd.c Modified: head/usr.sbin/bootparamd/bootparamd/bootparamd.c ============================================================================== --- head/usr.sbin/bootparamd/bootparamd/bootparamd.c Wed May 31 13:44:54 2017 (r319335) +++ head/usr.sbin/bootparamd/bootparamd/bootparamd.c Wed May 31 14:53:50 2017 (r319336) @@ -254,6 +254,7 @@ int blen; info of the file */ if (match) { + fid_len = strlen(fileid); #define AS_FORMAT(d) "%" #d "s" #define REXPAND(d) AS_FORMAT(d) /* Force another preprocessor expansion */ while ( ! res && (fscanf(bpf, REXPAND(INFOLEN), info)) > 0) { From owner-svn-src-all@freebsd.org Wed May 31 14:59:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F2F8B7C4ED; Wed, 31 May 2017 14:59:05 +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 4D4807EE20; Wed, 31 May 2017 14:59:05 +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 v4VEx4Jv084971; Wed, 31 May 2017 14:59:04 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VEx4Bm084970; Wed, 31 May 2017 14:59:04 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705311459.v4VEx4Bm084970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 31 May 2017 14:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319337 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 14:59:05 -0000 Author: asomers Date: Wed May 31 14:59:03 2017 New Revision: 319337 URL: https://svnweb.freebsd.org/changeset/base/319337 Log: Fix integer overflow in "camcontrol format" Reported by: Coverity CID: 1011426 MFC after: 1 week Sponsored by: Spectra Logic Corp Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Wed May 31 14:53:50 2017 (r319336) +++ head/sbin/camcontrol/camcontrol.c Wed May 31 14:59:03 2017 (r319337) @@ -6221,15 +6221,15 @@ doreport: if ((scsi_get_sks(sense, ccb->csio.sense_len - ccb->csio.sense_resid, sks) == 0) && (quiet == 0)) { - int val; + uint32_t val; u_int64_t percentage; val = scsi_2btoul(&sks[1]); - percentage = 10000 * val; + percentage = 10000ull * val; fprintf(stdout, "\rFormatting: %ju.%02u %% " - "(%d/%d) done", + "(%u/%d) done", (uintmax_t)(percentage / (0x10000 * 100)), (unsigned)((percentage / From owner-svn-src-all@freebsd.org Wed May 31 15:05:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89739B7C724; Wed, 31 May 2017 15:05:45 +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 572627F2EF; Wed, 31 May 2017 15:05:45 +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 v4VF5ij4089205; Wed, 31 May 2017 15:05:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VF5i1I089203; Wed, 31 May 2017 15:05:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311505.v4VF5i1I089203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 15:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319338 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 15:05:45 -0000 Author: hselasky Date: Wed May 31 15:05:44 2017 New Revision: 319338 URL: https://svnweb.freebsd.org/changeset/base/319338 Log: Implement in_atomic() function in the LinuxKPI. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kthread.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/kthread.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kthread.h Wed May 31 14:59:03 2017 (r319337) +++ head/sys/compat/linuxkpi/common/include/linux/kthread.h Wed May 31 15:05:44 2017 (r319338) @@ -48,10 +48,15 @@ __task; \ }) +#define in_atomic() ({ \ + linux_in_atomic(); \ +}) + extern int kthread_stop(struct task_struct *); extern bool kthread_should_stop_task(struct task_struct *); extern bool kthread_should_stop(void); extern void linux_kthread_fn(void *); extern struct task_struct *linux_kthread_setup_and_run(struct thread *, linux_task_fn_t *, void *arg); +extern int linux_in_atomic(void); #endif /* _LINUX_KTHREAD_H_ */ Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 14:59:03 2017 (r319337) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed May 31 15:05:44 2017 (r319338) @@ -73,8 +73,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include +#include #include #include #include @@ -1677,6 +1678,13 @@ linux_on_each_cpu(void callback(void *), void *data) smp_rendezvous(smp_no_rendezvous_barrier, callback, smp_no_rendezvous_barrier, data); return (0); +} + +int +linux_in_atomic(void) +{ + + return ((curthread->td_pflags & TDP_NOFAULTING) != 0); } struct linux_cdev * From owner-svn-src-all@freebsd.org Wed May 31 16:07:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FCD9B7D713; Wed, 31 May 2017 16:07:33 +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 5C2EC81505; Wed, 31 May 2017 16:07:33 +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 v4VG7WmC015052; Wed, 31 May 2017 16:07:32 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VG7WcO015049; Wed, 31 May 2017 16:07:32 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705311607.v4VG7WcO015049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 31 May 2017 16:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319339 - in head/bin/dd: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 16:07:33 -0000 Author: asomers Date: Wed May 31 16:07:32 2017 New Revision: 319339 URL: https://svnweb.freebsd.org/changeset/base/319339 Log: Fix integer overflow detection in dd dd(1) tried to detect whether the seek offset would overflow, but it failed to account for the case where the provided argument was negative and the file was a regular file (negative seeks are allowed for character devices). I fixed it, and added a regression test. Reported by: Coverity CID: 1368659 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Added: head/bin/dd/tests/dd2_test.sh (contents, props changed) Modified: head/bin/dd/position.c head/bin/dd/tests/Makefile Modified: head/bin/dd/position.c ============================================================================== --- head/bin/dd/position.c Wed May 31 15:05:44 2017 (r319338) +++ head/bin/dd/position.c Wed May 31 16:07:32 2017 (r319339) @@ -70,7 +70,7 @@ seek_offset(IO *io) * * Bail out if the calculation of a file offset would overflow. */ - if ((io->flags & ISCHR) == 0 && n > OFF_MAX / (ssize_t)sz) + if ((io->flags & ISCHR) == 0 && (n < 0 || n > OFF_MAX / (ssize_t)sz)) errx(1, "seek offsets cannot be larger than %jd", (intmax_t)OFF_MAX); else if ((io->flags & ISCHR) != 0 && (uint64_t)n > UINT64_MAX / sz) Modified: head/bin/dd/tests/Makefile ============================================================================== --- head/bin/dd/tests/Makefile Wed May 31 15:05:44 2017 (r319338) +++ head/bin/dd/tests/Makefile Wed May 31 16:07:32 2017 (r319339) @@ -1,5 +1,10 @@ # $FreeBSD$ +.include + +.PATH: ${.CURDIR}/.. + +ATF_TESTS_SH= dd2_test NETBSD_ATF_TESTS_SH= dd_test .include Added: head/bin/dd/tests/dd2_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/dd/tests/dd2_test.sh Wed May 31 16:07:32 2017 (r319339) @@ -0,0 +1,50 @@ +# +# 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 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. +# +# $FreeBSD$ + + +atf_test_case seek_overflow +seek_overflow_head() { + atf_set "descr" "dd(1) should reject too-large seek values" +} +seek_overflow_body() { + touch f.in + # Positive tests + seek=`echo "2^63 / 4096 - 1" | bc` + atf_check -s exit:0 -e ignore dd if=f.in of=f.out bs=4096 seek=$seek + + # Negative tests + seek=`echo "2^63 / 4096" | bc` + atf_check -s not-exit:0 -e match:"seek offsets cannot be larger than" \ + dd if=f.in of=f.out bs=4096 seek=$seek + atf_check -s not-exit:0 -e match:"seek offsets cannot be larger than" \ + dd if=f.in of=f.out bs=4096 seek=-1 +} + +atf_init_test_cases() +{ + atf_add_test_case seek_overflow +} From owner-svn-src-all@freebsd.org Wed May 31 16:08:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7893CB7D798; Wed, 31 May 2017 16:08:31 +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 4D2EA8164F; Wed, 31 May 2017 16:08:31 +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 v4VG8UpP015136; Wed, 31 May 2017 16:08:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VG8Uuk015134; Wed, 31 May 2017 16:08:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311608.v4VG8Uuk015134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 16:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319340 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 16:08:31 -0000 Author: hselasky Date: Wed May 31 16:08:30 2017 New Revision: 319340 URL: https://svnweb.freebsd.org/changeset/base/319340 Log: Properly implement idr_preload() and idr_preload_end() in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/idr.h head/sys/compat/linuxkpi/common/src/linux_idr.c Modified: head/sys/compat/linuxkpi/common/include/linux/idr.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/idr.h Wed May 31 16:07:32 2017 (r319339) +++ head/sys/compat/linuxkpi/common/include/linux/idr.h Wed May 31 16:08:30 2017 (r319340) @@ -75,9 +75,8 @@ struct idr { SYSINIT(name##_ida_sysinit, SI_SUB_DRIVERS, SI_ORDER_FIRST, \ ida_init, &(name)) -#define idr_preload(x) do { } while (0) -#define idr_preload_end() do { } while (0) - +void idr_preload(gfp_t gfp_mask); +void idr_preload_end(void); void *idr_find(struct idr *idp, int id); void *idr_get_next(struct idr *idp, int *nextid); int idr_pre_get(struct idr *idp, gfp_t gfp_mask); Modified: head/sys/compat/linuxkpi/common/src/linux_idr.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_idr.c Wed May 31 16:07:32 2017 (r319339) +++ head/sys/compat/linuxkpi/common/src/linux_idr.c Wed May 31 16:08:30 2017 (r319340) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,6 +46,17 @@ __FBSDID("$FreeBSD$"); #include #include +#define MAX_IDR_LEVEL ((MAX_IDR_SHIFT + IDR_BITS - 1) / IDR_BITS) +#define MAX_IDR_FREE (MAX_IDR_LEVEL * 2) + +struct linux_idr_cache { + spinlock_t lock; + struct idr_layer *head; + unsigned count; +}; + +static DPCPU_DEFINE(struct linux_idr_cache, linux_idr_cache); + /* * IDR Implementation. * @@ -55,6 +66,96 @@ __FBSDID("$FreeBSD$"); */ static MALLOC_DEFINE(M_IDR, "idr", "Linux IDR compat"); +static struct idr_layer * +idr_preload_dequeue_locked(struct linux_idr_cache *lic) +{ + struct idr_layer *retval; + + /* check if wrong thread is trying to dequeue */ + if (mtx_owned(&lic->lock.m) == 0) + return (NULL); + + retval = lic->head; + if (likely(retval != NULL)) { + lic->head = retval->ary[0]; + lic->count--; + retval->ary[0] = NULL; + } + return (retval); +} + +static void +idr_preload_init(void *arg) +{ + int cpu; + + CPU_FOREACH(cpu) { + struct linux_idr_cache *lic = + DPCPU_ID_PTR(cpu, linux_idr_cache); + + spin_lock_init(&lic->lock); + } +} +SYSINIT(idr_preload_init, SI_SUB_LOCK, SI_ORDER_FIRST, idr_preload_init, NULL); + +static void +idr_preload_uninit(void *arg) +{ + int cpu; + + CPU_FOREACH(cpu) { + struct idr_layer *cacheval; + struct linux_idr_cache *lic = + DPCPU_ID_PTR(cpu, linux_idr_cache); + + while (1) { + spin_lock(&lic->lock); + cacheval = idr_preload_dequeue_locked(lic); + spin_unlock(&lic->lock); + + if (cacheval == NULL) + break; + free(cacheval, M_IDR); + } + spin_lock_destroy(&lic->lock); + } +} +SYSUNINIT(idr_preload_uninit, SI_SUB_LOCK, SI_ORDER_FIRST, idr_preload_uninit, NULL); + +void +idr_preload(gfp_t gfp_mask) +{ + struct linux_idr_cache *lic; + struct idr_layer *cacheval; + + sched_pin(); + + lic = &DPCPU_GET(linux_idr_cache); + + /* fill up cache */ + spin_lock(&lic->lock); + while (lic->count < MAX_IDR_FREE) { + spin_unlock(&lic->lock); + cacheval = malloc(sizeof(*cacheval), M_IDR, M_ZERO | gfp_mask); + spin_lock(&lic->lock); + if (cacheval == NULL) + break; + cacheval->ary[0] = lic->head; + lic->head = cacheval; + lic->count++; + } +} + +void +idr_preload_end(void) +{ + struct linux_idr_cache *lic; + + lic = &DPCPU_GET(linux_idr_cache); + spin_unlock(&lic->lock); + sched_unpin(); +} + static inline int idr_max(struct idr *idr) { @@ -280,20 +381,32 @@ idr_pre_get(struct idr *idr, gfp_t gfp_mask) return (1); } -static inline struct idr_layer * -idr_get(struct idr *idr) +static struct idr_layer * +idr_free_list_get(struct idr *idp) { struct idr_layer *il; - il = idr->free; - if (il) { - idr->free = il->ary[0]; + if ((il = idp->free) != NULL) { + idp->free = il->ary[0]; il->ary[0] = NULL; - return (il); } - il = malloc(sizeof(*il), M_IDR, M_ZERO | M_NOWAIT); - if (il != NULL) + return (il); +} + +static inline struct idr_layer * +idr_get(struct idr *idp) +{ + struct idr_layer *il; + + if ((il = idr_free_list_get(idp)) != NULL) { + MPASS(il->bitmap != 0); + } else if ((il = malloc(sizeof(*il), M_IDR, M_ZERO | M_NOWAIT)) != NULL) { bitmap_fill(&il->bitmap, IDR_SIZE); + } else if ((il = idr_preload_dequeue_locked(&DPCPU_GET(linux_idr_cache))) != NULL) { + bitmap_fill(&il->bitmap, IDR_SIZE); + } else { + return (NULL); + } return (il); } From owner-svn-src-all@freebsd.org Wed May 31 16:24:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69B0FB7DDCB; Wed, 31 May 2017 16:24:03 +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 2A33D82232; Wed, 31 May 2017 16:24:03 +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 v4VGO2NE023169; Wed, 31 May 2017 16:24:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VGO2Th023168; Wed, 31 May 2017 16:24:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705311624.v4VGO2Th023168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 16:24:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319341 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 16:24:03 -0000 Author: hselasky Date: Wed May 31 16:24:02 2017 New Revision: 319341 URL: https://svnweb.freebsd.org/changeset/base/319341 Log: Implement print_hex_dump(), print_hex_dump_bytes() and printk_ratelimited() in the LinuxKPI. While at it fix the inclusion guard of printk.h to be similar to the rest of the LinuxKPI header files. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/printk.h Modified: head/sys/compat/linuxkpi/common/include/linux/printk.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/printk.h Wed May 31 16:08:30 2017 (r319340) +++ head/sys/compat/linuxkpi/common/include/linux/printk.h Wed May 31 16:24:02 2017 (r319341) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2017 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,9 +28,11 @@ * * $FreeBSD$ */ -#ifndef _FBSD_PRINTK_H_ -#define _FBSD_PRINTK_H_ +#ifndef _LINUX_PRINTK_H_ +#define _LINUX_PRINTK_H_ +#include + /* GID printing macros */ #define GID_PRINT_FMT "%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x" #define GID_PRINT_ARGS(gid_raw) htons(((u16 *)gid_raw)[0]), htons(((u16 *)gid_raw)[1]),\ @@ -38,4 +40,76 @@ htons(((u16 *)gid_raw)[4]), htons(((u16 *)gid_raw)[5]),\ htons(((u16 *)gid_raw)[6]), htons(((u16 *)gid_raw)[7]) -#endif /* _FBSD_PRINTK_H */ +enum { + DUMP_PREFIX_NONE, + DUMP_PREFIX_ADDRESS, + DUMP_PREFIX_OFFSET +}; + +static inline void +print_hex_dump(const char *level, const char *prefix_str, + const int prefix_type, const int rowsize, const int groupsize, + const void *buf, size_t len, const bool ascii) +{ + typedef const struct { long long value; } __packed *print_64p_t; + typedef const struct { uint32_t value; } __packed *print_32p_t; + typedef const struct { uint16_t value; } __packed *print_16p_t; + const void *buf_old = buf; + int row; + + while (len > 0) { + if (level != NULL) + printf("%s", level); + if (prefix_str != NULL) + printf("%s ", prefix_str); + + switch (prefix_type) { + case DUMP_PREFIX_ADDRESS: + printf("[%p] ", buf); + break; + case DUMP_PREFIX_OFFSET: + printf("[%p] ", (const char *)((const char *)buf - + (const char *)buf_old)); + break; + default: + break; + } + for (row = 0; row != rowsize; row++) { + if (groupsize == 8 && len > 7) { + printf("%016llx ", ((print_64p_t)buf)->value); + buf = (const uint8_t *)buf + 8; + len -= 8; + } else if (groupsize == 4 && len > 3) { + printf("%08x ", ((print_32p_t)buf)->value); + buf = (const uint8_t *)buf + 4; + len -= 4; + } else if (groupsize == 2 && len > 1) { + printf("%04x ", ((print_16p_t)buf)->value); + buf = (const uint8_t *)buf + 2; + len -= 2; + } else if (len > 0) { + printf("%02x ", *(const uint8_t *)buf); + buf = (const uint8_t *)buf + 1; + len--; + } else { + break; + } + } + printf("\n"); + } +} + +static inline void +print_hex_dump_bytes(const char *prefix_str, const int prefix_type, + const void *buf, size_t len) +{ + print_hex_dump(NULL, prefix_str, prefix_type, 16, 1, buf, len, 0); +} + +#define printk_ratelimited(...) do { \ + static linux_ratelimit_t __ratelimited; \ + if (linux_ratelimited(&__ratelimited)) \ + printk(__VA_ARGS__); \ +} while (0) + +#endif /* _LINUX_PRINTK_H_ */ From owner-svn-src-all@freebsd.org Wed May 31 16:28:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13086B7DE9C; Wed, 31 May 2017 16:28:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D57A0823B3; Wed, 31 May 2017 16:28:30 +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 v4VGSTnE023360; Wed, 31 May 2017 16:28:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VGSTQj023359; Wed, 31 May 2017 16:28:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705311628.v4VGSTQj023359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 31 May 2017 16:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319342 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 16:28:31 -0000 Author: emaste Date: Wed May 31 16:28:29 2017 New Revision: 319342 URL: https://svnweb.freebsd.org/changeset/base/319342 Log: makefs: free buf in case of error CID: 270190 Submitted by: Siva Mahadevan Reported by: Coverity Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11011 Modified: head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Wed May 31 16:24:02 2017 (r319341) +++ head/usr.sbin/makefs/ffs.c Wed May 31 16:28:29 2017 (r319342) @@ -523,6 +523,7 @@ ffs_create_image(const char *image, fsinfo_t *fsopts) if (fsopts->offset != 0) if (lseek(fsopts->fd, fsopts->offset, SEEK_SET) == -1) { warn("can't seek"); + free(buf); return -1; } From owner-svn-src-all@freebsd.org Wed May 31 16:32:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 225CBB7E048; Wed, 31 May 2017 16:32:35 +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 F032D82767; Wed, 31 May 2017 16:32:34 +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 v4VGWY7S027165; Wed, 31 May 2017 16:32:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VGWXb4027158; Wed, 31 May 2017 16:32:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705311632.v4VGWXb4027158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 31 May 2017 16:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319343 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 16:32:35 -0000 Author: adrian Date: Wed May 31 16:32:33 2017 New Revision: 319343 URL: https://svnweb.freebsd.org/changeset/base/319343 Log: [ar71xx] rename AR724X_BASE -> std.AR724X Added: head/sys/mips/conf/std.AR724X - copied, changed from r319342, head/sys/mips/conf/AR724X_BASE Deleted: head/sys/mips/conf/AR724X_BASE Modified: head/sys/mips/conf/AP91 head/sys/mips/conf/AP93 head/sys/mips/conf/ENH200 head/sys/mips/conf/PICOSTATION_M2HP head/sys/mips/conf/ROCKET_M2HP head/sys/mips/conf/WZR-300HP Modified: head/sys/mips/conf/AP91 ============================================================================== --- head/sys/mips/conf/AP91 Wed May 31 16:28:29 2017 (r319342) +++ head/sys/mips/conf/AP91 Wed May 31 16:32:33 2017 (r319343) @@ -14,7 +14,7 @@ #NO_UNIVERSE -include "AR724X_BASE" +include "std.AR724X" ident "AP91" hints "AP91.hints" Modified: head/sys/mips/conf/AP93 ============================================================================== --- head/sys/mips/conf/AP93 Wed May 31 16:28:29 2017 (r319342) +++ head/sys/mips/conf/AP93 Wed May 31 16:32:33 2017 (r319343) @@ -14,7 +14,7 @@ #NO_UNIVERSE -include "AR724X_BASE" +include "std.AR724X" ident "AP93" hints "AP93.hints" Modified: head/sys/mips/conf/ENH200 ============================================================================== --- head/sys/mips/conf/ENH200 Wed May 31 16:28:29 2017 (r319342) +++ head/sys/mips/conf/ENH200 Wed May 31 16:32:33 2017 (r319343) @@ -14,7 +14,7 @@ #NO_UNIVERSE -include "AR724X_BASE" +include "std.AR724X" ident "ENH200" hints "ENH200.hints" Modified: head/sys/mips/conf/PICOSTATION_M2HP ============================================================================== --- head/sys/mips/conf/PICOSTATION_M2HP Wed May 31 16:28:29 2017 (r319342) +++ head/sys/mips/conf/PICOSTATION_M2HP Wed May 31 16:32:33 2017 (r319343) @@ -14,7 +14,7 @@ #NO_UNIVERSE -include "AR724X_BASE" +include "std.AR724X" ident "PICOSTATION_M2HP" hints "PICOSTATION_M2HP.hints" Modified: head/sys/mips/conf/ROCKET_M2HP ============================================================================== --- head/sys/mips/conf/ROCKET_M2HP Wed May 31 16:28:29 2017 (r319342) +++ head/sys/mips/conf/ROCKET_M2HP Wed May 31 16:32:33 2017 (r319343) @@ -14,7 +14,7 @@ #NO_UNIVERSE -include "AR724X_BASE" +include "std.AR724X" ident "ROCKET_M2HP" hints "ROCKET_M2HP.hints" Modified: head/sys/mips/conf/WZR-300HP ============================================================================== --- head/sys/mips/conf/WZR-300HP Wed May 31 16:28:29 2017 (r319342) +++ head/sys/mips/conf/WZR-300HP Wed May 31 16:32:33 2017 (r319343) @@ -14,7 +14,7 @@ #NO_UNIVERSE -include "AR724X_BASE" +include "std.AR724X" ident "WZR-300HP" hints "WZR-300HP.hints" Copied and modified: head/sys/mips/conf/std.AR724X (from r319342, head/sys/mips/conf/AR724X_BASE) ============================================================================== --- head/sys/mips/conf/AR724X_BASE Wed May 31 16:28:29 2017 (r319342, copy source) +++ head/sys/mips/conf/std.AR724X Wed May 31 16:32:33 2017 (r319343) @@ -9,7 +9,7 @@ # machine mips mips -ident AR724X_BASE +#ident AR724X_BASE cpu CPU_MIPS24K makeoptions KERNLOADADDR=0x80050000 options HZ=1000 From owner-svn-src-all@freebsd.org Wed May 31 17:20:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A780BB7EB76; Wed, 31 May 2017 17:20:56 +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 838B883C3E; Wed, 31 May 2017 17:20:56 +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 v4VHKt3M045216; Wed, 31 May 2017 17:20:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VHKt0x045028; Wed, 31 May 2017 17:20:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705311720.v4VHKt0x045028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 31 May 2017 17:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319344 - stable/10/tests/sys/aio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 17:20:56 -0000 Author: asomers Date: Wed May 31 17:20:55 2017 New Revision: 319344 URL: https://svnweb.freebsd.org/changeset/base/319344 Log: MFC r318593: Fix build of AIO tests with -DDEBUG Also, redefine some constants for clarity. No functional change. Modified: stable/10/tests/sys/aio/aio_kqueue_test.c stable/10/tests/sys/aio/lio_kqueue_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- stable/10/tests/sys/aio/aio_kqueue_test.c Wed May 31 16:32:33 2017 (r319343) +++ stable/10/tests/sys/aio/aio_kqueue_test.c Wed May 31 17:20:55 2017 (r319344) @@ -161,7 +161,8 @@ main (int argc, char *argv[]) printf("kevent %d %d errno %d return.ident %p " "return.data %p return.udata %p %p\n", i, result, error, - kq_returned.ident, kq_returned.data, + (void*)kq_returned.ident, + (void*)kq_returned.data, kq_returned.udata, kq_iocb); #endif @@ -169,7 +170,7 @@ main (int argc, char *argv[]) if (kq_iocb) break; #ifdef DEBUG - printf("Try again left %d out of %d %d\n", + printf("Try again left %d out of %lu %d\n", pending, nitems(iocb), cancel); #endif } Modified: stable/10/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- stable/10/tests/sys/aio/lio_kqueue_test.c Wed May 31 16:32:33 2017 (r319343) +++ stable/10/tests/sys/aio/lio_kqueue_test.c Wed May 31 17:20:55 2017 (r319344) @@ -54,7 +54,8 @@ #define PATH_TEMPLATE "aio.XXXXXXXXXX" #define LIO_MAX 5 -#define MAX_IOCBS LIO_MAX * 16 +#define IOCBS_PER_LIO 16 +#define MAX_IOCBS (LIO_MAX * IOCBS_PER_LIO) #define MAX_RUNS 300 int @@ -101,9 +102,9 @@ main(int argc, char *argv[]) #endif for (j = 0; j < LIO_MAX; j++) { lio[j] = - malloc(sizeof(struct aiocb *) * MAX_IOCBS/LIO_MAX); - for (i = 0; i < MAX_IOCBS / LIO_MAX; i++) { - k = (MAX_IOCBS / LIO_MAX * j) + i; + malloc(sizeof(struct aiocb *) * IOCBS_PER_LIO); + for (i = 0; i < IOCBS_PER_LIO; i++) { + k = (IOCBS_PER_LIO * j) + i; lio[j][i] = iocb[k] = calloc(1, sizeof(struct aiocb)); iocb[k]->aio_nbytes = sizeof(buffer); @@ -113,7 +114,7 @@ main(int argc, char *argv[]) = iocb[k]->aio_nbytes * k * (run + 1); #ifdef DEBUG - printf("hello iocb[k] %d\n", + printf("hello iocb[k] %ld\n", iocb[k]->aio_offset); #endif iocb[k]->aio_lio_opcode = LIO_WRITE; @@ -123,11 +124,11 @@ main(int argc, char *argv[]) sig.sigev_notify = SIGEV_KEVENT; time(&time1); result = lio_listio(LIO_NOWAIT, lio[j], - MAX_IOCBS / LIO_MAX, &sig); + IOCBS_PER_LIO, &sig); error = errno; time(&time2); #ifdef DEBUG - printf("Time %d %d %d result -> %d\n", + printf("Time %ld %ld %ld result -> %d\n", time1, time2, time2-time1, result); #endif if (result != 0) { @@ -167,7 +168,8 @@ main(int argc, char *argv[]) printf("kevent %d %d errno %d return.ident %p " "return.data %p return.udata %p %p\n", i, result, error, - kq_returned.ident, kq_returned.data, + (void*)kq_returned.ident, + (void*)kq_returned.data, kq_returned.udata, lio[j]); #endif From owner-svn-src-all@freebsd.org Wed May 31 17:38:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5304B7F55F; Wed, 31 May 2017 17:38:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (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 A3971E9A; Wed, 31 May 2017 17:38:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x244.google.com with SMTP id h64so2654424pge.3; Wed, 31 May 2017 10:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=k+t8cgpRoYxlHUqOR9dSOhhJ73VtCHcqQvmBalJ2w5E=; b=PnRqv78nYQtVKkcNxaVpZOHF7KqWhPO5mwvyVEVOe1I/5KhV0RTX/MBCqztxjSr3DH Huoz65l7tx9BCwcJPo3/VMPNYGyfsUZjbbB36mk5/mtkkc8MzFuTn3MYTWTRPWowR8hT SRYESZEwXvbPQrpBSl6p5XcclOqz7eAwESG7ECknJ40izkfpHz8JJIBb9dYcDVtmlwac ZExNB8ZATjeylE9Ozngm+Yp8iCv3cUX3eqz6/X0fStbZyezkSzTx62hv5RQJOJxMIkyv 3TGHWWVSEQvT2giApJUxDfPwLT1nlHs2kL9nwctMLbKfjD5K2GsmGQ5GtH82WBXERi6x JtBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=k+t8cgpRoYxlHUqOR9dSOhhJ73VtCHcqQvmBalJ2w5E=; b=iP5IfwykRKZbi25+30hf7fiVHzo4C5Zse1pQRMCtlpQQJ1jmtAI3V5trvF7LtCbhpo QLXr7eBJZ7eBpiOxrXFMcRMHmbpOm/lS43a8yWi9f9+EyTgGuLTn4DGRdruZu2I1nK/i hzIabnD39kKx/ZCHTndSvKE5dxAeiA4wQ6YCSY+KxZ7ryfnqxZ7KvlirFxtPG7LQ8JKv lijMuZX0XHpX6NDdlnIXzCoCbS+5r4mFbOF5iPogNSAy3abot/RNUwX8pYlTY5PjWS7c vdk+P+H6H2tTCLeBrUR+Y3bLSaudhzl8bUzqWddDnWDbNHIN6xrqJNs0ZfDq3dwAdcBN 0euA== X-Gm-Message-State: AODbwcB/vciTksjWpOV4kEymjzhk1YPNwXnxuRmVgqC3KPoUXTTLJXwz rm/ueEw6NihD1SMWvlo= X-Received: by 10.98.156.133 with SMTP id u5mr30150738pfk.76.1496252333927; Wed, 31 May 2017 10:38:53 -0700 (PDT) Received: from ?IPv6:2607:fb90:834d:ae5f:d516:4603:4950:1427? ([2607:fb90:834d:ae5f:d516:4603:4950:1427]) by smtp.gmail.com with ESMTPSA id p13sm34002465pfl.52.2017.05.31.10.38.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2017 10:38:53 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r319125 - head/usr.bin/mkimg From: Ngie Cooper X-Mailer: iPhone Mail (14F89) In-Reply-To: <20170531114829.28359de76187bdd184746b5a@bidouilliste.com> Date: Wed, 31 May 2017 10:38:52 -0700 Cc: Emmanuel Vadot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <950A1301-50D2-490B-9598-5248AF246985@gmail.com> References: <201705291251.v4TCp24h090283@repo.freebsd.org> <20170531114829.28359de76187bdd184746b5a@bidouilliste.com> To: Emmanuel Vadot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 17:38:54 -0000 > On May 31, 2017, at 02:48, Emmanuel Vadot wrote: >=20 > On Wed, 31 May 2017 00:20:45 -0700 > "Ngie Cooper (yaneurabeya)" wrote: >=20 >>=20 >>> On May 29, 2017, at 05:51, Emmanuel Vadot wrote: >>>=20 >>> Author: manu >>> Date: Mon May 29 12:51:02 2017 >>> New Revision: 319125 >>> URL: https://svnweb.freebsd.org/changeset/base/319125 >>>=20 >>> Log: >>> mkimg: Correct an off by one error in the PMBR size >>>=20 >>> The PMBR last sector should be number of sector - 1 (As stated in UEFI S= pec >>> 2.6 page 118 table 17). >>> This fixes warning printed by linux tools like parted or fdisk. >>=20 >> This commit broke all of the mkimg gpt tests. For example: https://ci.fre= ebsd.org/job/FreeBSD-head-amd64-test/3280/testReport/junit/usr.bin.mkimg/mki= mg_test/gpt_1x1_4096_qcow/ . >> -Ngie >=20 > Sorry about that and thanks for the fix. No worries -- it turns out I broke something by accident as well, and I f= ixed both items at the same time. Take it easy :), -Ngie= From owner-svn-src-all@freebsd.org Wed May 31 17:42:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61C64B7F650; Wed, 31 May 2017 17:42:06 +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 3072E129F; Wed, 31 May 2017 17:42:06 +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 v4VHg5YD056548; Wed, 31 May 2017 17:42:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VHg5hU056531; Wed, 31 May 2017 17:42:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311742.v4VHg5hU056531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 17:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319346 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 17:42:06 -0000 Author: gjb Date: Wed May 31 17:42:05 2017 New Revision: 319346 URL: https://svnweb.freebsd.org/changeset/base/319346 Log: Document r318675, fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 17:42:04 2017 (r319345) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 17:42:05 2017 (r319346) @@ -366,7 +366,13 @@ Networked Storage -   + The NFS client now + properly handles NFS4ERR_BAD_SESSION errors + received from an NFS server. Additionally, + the kernel RPC client has been updated to + prevent creating new TCP connections when + ERESTART is received from + &man.sosend.9;. From owner-svn-src-all@freebsd.org Wed May 31 17:42:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83657B7F661; Wed, 31 May 2017 17:42:07 +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 5E3DB12A4; Wed, 31 May 2017 17:42:07 +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 v4VHg6hg058306; Wed, 31 May 2017 17:42:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VHg6ld058245; Wed, 31 May 2017 17:42:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311742.v4VHg6ld058245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 17:42:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319347 - in stable/10/release/doc/en_US.ISO8859-1: errata hardware readme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 17:42:07 -0000 Author: gjb Date: Wed May 31 17:42:06 2017 New Revision: 319347 URL: https://svnweb.freebsd.org/changeset/base/319347 Log: Whitespace fixes to conform to FDP style. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Wed May 31 17:42:05 2017 (r319346) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Wed May 31 17:42:06 2017 (r319347) @@ -14,7 +14,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> - &os; &release.prev; Errata + &os; &release.prev; Errata The &os; Project Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed May 31 17:42:05 2017 (r319346) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed May 31 17:42:06 2017 (r319347) @@ -135,9 +135,9 @@ &intel; EM64T is an extended version of IA-32 (x86) and different from &intel; IA-64 (Itanium) architecture, which - &os;/ia64 supports. Some of &intel;'s old documentation refers - to &intel; EM64T as 64-bit extension technology - or IA-32e. + &os;/ia64 supports. Some of &intel;'s old documentation + refers to &intel; EM64T as 64-bit extension + technology or IA-32e. Both Uniprocessor (UP) and Symmetric Multi-processor (SMP) configurations are supported. @@ -245,7 +245,8 @@ Currently supported processors are the &itanium; and the &itanium; 2. + xlink:href="http://people.freebsd.org/~marcel/refs/ia64/itanium2/25111003.pdf">&itanium; + 2. Supported chipsets include: Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Wed May 31 17:42:05 2017 (r319346) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Wed May 31 17:42:06 2017 (r319347) @@ -236,7 +236,7 @@ All of the mailing lists can be freely joined by anyone wishing to do so. Visit the &os; Mailman Info + xlink:href="&url.base;/mailman/listinfo">&os; Mailman Info Page. This will give you more information on joining the various lists, accessing archives, etc. There are a number of mailing lists targeted at special interest groups From owner-svn-src-all@freebsd.org Wed May 31 17:42:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E095B7F648; Wed, 31 May 2017 17:42:05 +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 5BEB6129D; Wed, 31 May 2017 17:42:05 +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 v4VHg4pw056128; Wed, 31 May 2017 17:42:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VHg4q4056127; Wed, 31 May 2017 17:42:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311742.v4VHg4q4056127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 17:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319345 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 17:42:05 -0000 Author: gjb Date: Wed May 31 17:42:04 2017 New Revision: 319345 URL: https://svnweb.freebsd.org/changeset/base/319345 Log: Document r309258, max_align_t for C11 compliance. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 17:20:55 2017 (r319344) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 17:42:04 2017 (r319345) @@ -250,7 +250,8 @@ ABI Compatibility -   + The type max_align_t + is now defined for C11 compliance. From owner-svn-src-all@freebsd.org Wed May 31 17:42:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66272B7F675; Wed, 31 May 2017 17:42:08 +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 337F612B5; Wed, 31 May 2017 17:42:08 +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 v4VHg7df058364; Wed, 31 May 2017 17:42:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VHg7vW058363; Wed, 31 May 2017 17:42:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311742.v4VHg7vW058363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 17:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319348 - in stable/10/release/doc/en_US.ISO8859-1: errata readme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 17:42:08 -0000 Author: gjb Date: Wed May 31 17:42:07 2017 New Revision: 319348 URL: https://svnweb.freebsd.org/changeset/base/319348 Log: Bump copyright years after previous commit. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Wed May 31 17:42:06 2017 (r319347) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Wed May 31 17:42:07 2017 (r319348) @@ -21,7 +21,7 @@ $FreeBSD$ - 2016 + 2017 The &os; Documentation Project Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Wed May 31 17:42:06 2017 (r319347) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Wed May 31 17:42:07 2017 (r319348) @@ -37,6 +37,9 @@ 2012 2013 2014 + 2015 + 2016 + 2017 The &os; Documentation Project From owner-svn-src-all@freebsd.org Wed May 31 19:16:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D56E5B874AC; Wed, 31 May 2017 19:16:24 +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 79CBF64BDA; Wed, 31 May 2017 19:16:24 +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 v4VJGNtL096949; Wed, 31 May 2017 19:16:23 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VJGNeO096940; Wed, 31 May 2017 19:16:23 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705311916.v4VJGNeO096940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 31 May 2017 19:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319349 - in stable/11: contrib/byacc contrib/byacc/package contrib/byacc/package/debian contrib/byacc/package/pkgsrc contrib/byacc/test contrib/byacc/test/btyacc contrib/byacc/test/yac... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 19:16:24 -0000 Author: jkim Date: Wed May 31 19:16:22 2017 New Revision: 319349 URL: https://svnweb.freebsd.org/changeset/base/319349 Log: MFC: r313105, r313106 Update byacc to 20170201. Added: stable/11/contrib/byacc/test/btyacc/expr.oxout.error - copied unchanged from r313105, head/contrib/byacc/test/btyacc/expr.oxout.error stable/11/contrib/byacc/test/btyacc/expr.oxout.output - copied unchanged from r313105, head/contrib/byacc/test/btyacc/expr.oxout.output stable/11/contrib/byacc/test/btyacc/expr.oxout.tab.c - copied unchanged from r313105, head/contrib/byacc/test/btyacc/expr.oxout.tab.c stable/11/contrib/byacc/test/btyacc/expr.oxout.tab.h - copied unchanged from r313105, head/contrib/byacc/test/btyacc/expr.oxout.tab.h stable/11/contrib/byacc/test/expr.oxout.y - copied unchanged from r313105, head/contrib/byacc/test/expr.oxout.y stable/11/contrib/byacc/test/yacc/expr.oxout.error - copied unchanged from r313105, head/contrib/byacc/test/yacc/expr.oxout.error stable/11/contrib/byacc/test/yacc/expr.oxout.output - copied unchanged from r313105, head/contrib/byacc/test/yacc/expr.oxout.output stable/11/contrib/byacc/test/yacc/expr.oxout.tab.c - copied unchanged from r313105, head/contrib/byacc/test/yacc/expr.oxout.tab.c stable/11/contrib/byacc/test/yacc/expr.oxout.tab.h - copied unchanged from r313105, head/contrib/byacc/test/yacc/expr.oxout.tab.h Modified: stable/11/contrib/byacc/CHANGES stable/11/contrib/byacc/MANIFEST stable/11/contrib/byacc/VERSION stable/11/contrib/byacc/aclocal.m4 stable/11/contrib/byacc/config.guess stable/11/contrib/byacc/config.sub stable/11/contrib/byacc/configure stable/11/contrib/byacc/defs.h stable/11/contrib/byacc/main.c stable/11/contrib/byacc/package/byacc.spec stable/11/contrib/byacc/package/debian/changelog stable/11/contrib/byacc/package/debian/copyright stable/11/contrib/byacc/package/mingw-byacc.spec stable/11/contrib/byacc/package/pkgsrc/Makefile stable/11/contrib/byacc/reader.c stable/11/usr.bin/yacc/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/byacc/CHANGES ============================================================================== --- stable/11/contrib/byacc/CHANGES Wed May 31 17:42:07 2017 (r319348) +++ stable/11/contrib/byacc/CHANGES Wed May 31 19:16:22 2017 (r319349) @@ -1,3 +1,33 @@ +2017-02-01 Thomas E. Dickey + + * test/btyacc/expr.oxout.error, test/btyacc/expr.oxout.output, test/btyacc/expr.oxout.tab.c, test/btyacc/expr.oxout.tab.h, test/yacc/expr.oxout.error, test/yacc/expr.oxout.output, test/yacc/expr.oxout.tab.c, test/yacc/expr.oxout.tab.h: + RCS_BASE + + * package/debian/copyright: update copyright + + * reader.c, defs.h, main.c: + avoid using regex.h since some low-end platforms do not have this + + * test/expr.oxout.y: RCS_BASE + + * configure: regen + + * aclocal.m4: quiet a strict gcc warning in CF_MKSTEMP + +2017-02-01 Tom.Shields + + * main.c, reader.c, defs.h: + process #line directives, like bison and flex + +2017-02-01 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2016-12-31 Thomas E. Dickey + + * config.guess, config.sub: 2017-01-01 + 2016-12-02 Thomas E. Dickey * test/btyacc/quote_calc4-s.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/rename_debug.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc /btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, btyaccpar.c: Modified: stable/11/contrib/byacc/MANIFEST ============================================================================== --- stable/11/contrib/byacc/MANIFEST Wed May 31 17:42:07 2017 (r319348) +++ stable/11/contrib/byacc/MANIFEST Wed May 31 19:16:22 2017 (r319349) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20161202, version t20161202 +MANIFEST for byacc-20170201, version t20170201 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 @@ -77,6 +77,22 @@ test/btyacc/btyacc_demo.error reference output for t test/btyacc/btyacc_demo.output reference output for testing test/btyacc/btyacc_demo.tab.c reference output for testing test/btyacc/btyacc_demo.tab.h reference output for testing +test/btyacc/btyacc_demo2.error reference output for testing +test/btyacc/btyacc_demo2.output reference output for testing +test/btyacc/btyacc_demo2.tab.c reference output for testing +test/btyacc/btyacc_demo2.tab.h reference output for testing +test/btyacc/btyacc_destroy1.error reference output for testing +test/btyacc/btyacc_destroy1.output reference output for testing +test/btyacc/btyacc_destroy1.tab.c reference output for testing +test/btyacc/btyacc_destroy1.tab.h reference output for testing +test/btyacc/btyacc_destroy2.error reference output for testing +test/btyacc/btyacc_destroy2.output reference output for testing +test/btyacc/btyacc_destroy2.tab.c reference output for testing +test/btyacc/btyacc_destroy2.tab.h reference output for testing +test/btyacc/btyacc_destroy3.error reference output for testing +test/btyacc/btyacc_destroy3.output reference output for testing +test/btyacc/btyacc_destroy3.tab.c reference output for testing +test/btyacc/btyacc_destroy3.tab.h reference output for testing test/btyacc/calc.error reference output for testing test/btyacc/calc.output reference output for testing test/btyacc/calc.tab.c reference output for testing @@ -256,6 +272,10 @@ test/btyacc/error.error reference output for t test/btyacc/error.output reference output for testing test/btyacc/error.tab.c reference output for testing test/btyacc/error.tab.h reference output for testing +test/btyacc/expr.oxout.error reference output for testing +test/btyacc/expr.oxout.output reference output for testing +test/btyacc/expr.oxout.tab.c reference output for testing +test/btyacc/expr.oxout.tab.h reference output for testing test/btyacc/grammar.dot reference output for testing test/btyacc/grammar.error reference output for testing test/btyacc/grammar.output reference output for testing @@ -359,6 +379,9 @@ test/btyacc/varsyntax_calc1.tab.h reference output fo test subdirectory test/btyacc_calc1.y testcase for btyacc test/btyacc_demo.y testcase for btyacc +test/btyacc_destroy1.y btyacc test-case for %parse-param +test/btyacc_destroy2.y btyacc test-case for %parse-param +test/btyacc_destroy3.y btyacc test-case for %parse-param test/calc.y example from VMS freeware version of byacc test/calc1.y advanced example from Steve Johnson's paper. test/calc2.y test-cases and reference files for %lex-param / %parse-param @@ -403,6 +426,7 @@ test/err_syntax8.y testcase for used_rese test/err_syntax8a.y testcase for used_reserved() test/err_syntax9.y testcase for tokenized_start() test/error.y original version of byacc - 1993 +test/expr.oxout.y test-case for "#line" feature test/grammar.y grammar from cproto test/inherit0.y testcase for btyacc test/inherit1.y testcase for btyacc @@ -577,6 +601,10 @@ test/yacc/error.error reference output for t test/yacc/error.output reference output for testing test/yacc/error.tab.c reference output for testing test/yacc/error.tab.h reference output for testing +test/yacc/expr.oxout.error reference output for testing +test/yacc/expr.oxout.output reference output for testing +test/yacc/expr.oxout.tab.c reference output for testing +test/yacc/expr.oxout.tab.h reference output for testing test/yacc/grammar.dot reference output for testing test/yacc/grammar.error reference output for testing test/yacc/grammar.output reference output for testing Modified: stable/11/contrib/byacc/VERSION ============================================================================== --- stable/11/contrib/byacc/VERSION Wed May 31 17:42:07 2017 (r319348) +++ stable/11/contrib/byacc/VERSION Wed May 31 19:16:22 2017 (r319349) @@ -1 +1 @@ -20161202 +20170201 Modified: stable/11/contrib/byacc/aclocal.m4 ============================================================================== --- stable/11/contrib/byacc/aclocal.m4 Wed May 31 17:42:07 2017 (r319348) +++ stable/11/contrib/byacc/aclocal.m4 Wed May 31 19:16:22 2017 (r319349) @@ -1,7 +1,7 @@ -dnl $Id: aclocal.m4,v 1.41 2016/12/02 13:03:06 tom Exp $ +dnl $Id: aclocal.m4,v 1.42 2017/02/01 10:12:21 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- -dnl Copyright 2004-2015,2016 Thomas E. Dickey +dnl Copyright 2004-2016,2017 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -803,20 +803,26 @@ fi test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MKSTEMP version: 9 updated: 2012/10/03 04:34:49 +dnl CF_MKSTEMP version: 10 updated: 2017/01/21 11:12:16 dnl ---------- dnl Check for a working mkstemp. This creates two files, checks that they are dnl successfully created and distinct (AmigaOS apparently fails on the last). AC_DEFUN([CF_MKSTEMP],[ +AC_CHECK_HEADERS( \ +unistd.h \ +) AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[ rm -rf conftest* AC_TRY_RUN([ #include +#ifdef HAVE_UNISTD_H +#include +#endif #include #include #include #include -int main() +int main(void) { char *tmpl = "conftestXXXXXX"; char name[2][80]; Modified: stable/11/contrib/byacc/config.guess ============================================================================== --- stable/11/contrib/byacc/config.guess Wed May 31 17:42:07 2017 (r319348) +++ stable/11/contrib/byacc/config.guess Wed May 31 19:16:22 2017 (r319349) @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-10-02' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." Modified: stable/11/contrib/byacc/config.sub ============================================================================== --- stable/11/contrib/byacc/config.sub Wed May 31 17:42:07 2017 (r319348) +++ stable/11/contrib/byacc/config.sub Wed May 31 19:16:22 2017 (r319349) @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-11-19' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -1409,7 +1409,7 @@ case $os in | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia*) + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1637,6 +1637,9 @@ case $basic_machine in ;; sparc-* | *-sun) os=-sunos4.1.1 + ;; + pru-*) + os=-elf ;; *-be) os=-beos Modified: stable/11/contrib/byacc/configure ============================================================================== --- stable/11/contrib/byacc/configure Wed May 31 17:42:07 2017 (r319348) +++ stable/11/contrib/byacc/configure Wed May 31 19:16:22 2017 (r319349) @@ -3911,7 +3911,57 @@ EOF fi done -echo "$as_me:3914: checking for working mkstemp" >&5 +for ac_header in \ +unistd.h \ + +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:3919: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3925 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3929: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3935: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:3954: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6 if test "${cf_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3922,15 +3972,18 @@ if test "$cross_compiling" = yes; then cf_cv_func_mkstemp=maybe else cat >conftest.$ac_ext <<_ACEOF -#line 3925 "configure" +#line 3975 "configure" #include "confdefs.h" #include +#ifdef HAVE_UNISTD_H +#include +#endif #include #include #include #include -int main() +int main(void) { char *tmpl = "conftestXXXXXX"; char name[2][80]; @@ -3960,15 +4013,15 @@ int main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3963: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4016: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3966: \$? = $ac_status" >&5 + echo "$as_me:4019: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3968: \"$ac_try\"") >&5 + { (eval echo "$as_me:4021: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3971: \$? = $ac_status" >&5 + echo "$as_me:4024: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_mkstemp=yes @@ -3983,16 +4036,16 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ fi fi -echo "$as_me:3986: result: $cf_cv_func_mkstemp" >&5 +echo "$as_me:4039: result: $cf_cv_func_mkstemp" >&5 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6 if test "x$cf_cv_func_mkstemp" = xmaybe ; then - echo "$as_me:3989: checking for mkstemp" >&5 + echo "$as_me:4042: checking for mkstemp" >&5 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 if test "${ac_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3995 "configure" +#line 4048 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mkstemp (); below. */ @@ -4023,16 +4076,16 @@ f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4026: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4079: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4029: \$? = $ac_status" >&5 + echo "$as_me:4082: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4032: \"$ac_try\"") >&5 + { (eval echo "$as_me:4085: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4035: \$? = $ac_status" >&5 + echo "$as_me:4088: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mkstemp=yes else @@ -4042,7 +4095,7 @@ ac_cv_func_mkstemp=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4045: result: $ac_cv_func_mkstemp" >&5 +echo "$as_me:4098: result: $ac_cv_func_mkstemp" >&5 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 fi @@ -4057,13 +4110,13 @@ fi for ac_func in vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:4060: checking for $ac_func" >&5 +echo "$as_me:4113: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4066 "configure" +#line 4119 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -4094,16 +4147,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4097: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4150: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4100: \$? = $ac_status" >&5 + echo "$as_me:4153: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4103: \"$ac_try\"") >&5 + { (eval echo "$as_me:4156: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4106: \$? = $ac_status" >&5 + echo "$as_me:4159: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -4113,7 +4166,7 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4116: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:4169: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <&5 +echo "$as_me:4179: checking for maximum table size" >&5 echo $ECHO_N "checking for maximum table size... $ECHO_C" >&6 # Check whether --with-max-table-size or --without-max-table-size was given. @@ -4133,12 +4186,12 @@ if test "${with_max_table_size+set}" = set; then fi; if test -n "$with_max_table_size" then - echo "$as_me:4136: result: $with_max_table_size" >&5 + echo "$as_me:4189: result: $with_max_table_size" >&5 echo "${ECHO_T}$with_max_table_size" >&6 check=`expr "$with_max_table_size" + 0` if test "x$check" != "x$with_max_table_size" then - { { echo "$as_me:4141: error: invalid value for --with-max-table-size: $with_max_table_size" >&5 + { { echo "$as_me:4194: error: invalid value for --with-max-table-size: $with_max_table_size" >&5 echo "$as_me: error: invalid value for --with-max-table-size: $with_max_table_size" >&2;} { (exit 1); exit 1; }; } fi @@ -4148,11 +4201,11 @@ cat >>confdefs.h <&5 + echo "$as_me:4204: result: default" >&5 echo "${ECHO_T}default" >&6 fi -echo "$as_me:4155: checking if backtracking extension is wanted" >&5 +echo "$as_me:4208: checking if backtracking extension is wanted" >&5 echo $ECHO_N "checking if backtracking extension is wanted... $ECHO_C" >&6 # Check whether --enable-btyacc or --disable-btyacc was given. @@ -4160,7 +4213,7 @@ if test "${enable_btyacc+set}" = set; then enableval="$enable_btyacc" fi; -echo "$as_me:4163: result: $enable_btyacc" >&5 +echo "$as_me:4216: result: $enable_btyacc" >&5 echo "${ECHO_T}$enable_btyacc" >&6 if test "$enable_btyacc" = "yes"; then @@ -4175,7 +4228,7 @@ fi if ( test "$GCC" = yes || test "$GXX" = yes ) then -echo "$as_me:4178: checking if you want to check for gcc warnings" >&5 +echo "$as_me:4231: checking if you want to check for gcc warnings" >&5 echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6 # Check whether --with-warnings or --without-warnings was given. @@ -4185,7 +4238,7 @@ if test "${with_warnings+set}" = set; then else cf_opt_with_warnings=no fi; -echo "$as_me:4188: result: $cf_opt_with_warnings" >&5 +echo "$as_me:4241: result: $cf_opt_with_warnings" >&5 echo "${ECHO_T}$cf_opt_with_warnings" >&6 if test "$cf_opt_with_warnings" != no ; then @@ -4207,10 +4260,10 @@ cat > conftest.i <&5 + { echo "$as_me:4263: checking for $CC __attribute__ directives..." >&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > conftest.$ac_ext <&5 + if { (eval echo "$as_me:4315: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4265: \$? = $ac_status" >&5 + echo "$as_me:4318: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:4267: result: ... $cf_attribute" >&5 + test -n "$verbose" && echo "$as_me:4320: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h case $cf_attribute in @@ -4328,12 +4381,12 @@ INTEL_COMPILER=no if test "$GCC" = yes ; then case $host_os in (linux*|gnu*) - echo "$as_me:4331: checking if this is really Intel C compiler" >&5 + echo "$as_me:4384: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >conftest.$ac_ext <<_ACEOF -#line 4336 "configure" +#line 4389 "configure" #include "confdefs.h" int @@ -4350,16 +4403,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4353: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4406: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4356: \$? = $ac_status" >&5 + echo "$as_me:4409: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4359: \"$ac_try\"") >&5 + { (eval echo "$as_me:4412: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4362: \$? = $ac_status" >&5 + echo "$as_me:4415: \$? = $ac_status" >&5 (exit $ac_status); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -4370,7 +4423,7 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" - echo "$as_me:4373: result: $INTEL_COMPILER" >&5 + echo "$as_me:4426: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac @@ -4379,12 +4432,12 @@ fi CLANG_COMPILER=no if test "$GCC" = yes ; then - echo "$as_me:4382: checking if this is really Clang C compiler" >&5 + echo "$as_me:4435: checking if this is really Clang C compiler" >&5 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Qunused-arguments" cat >conftest.$ac_ext <<_ACEOF -#line 4387 "configure" +#line 4440 "configure" #include "confdefs.h" int @@ -4401,16 +4454,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4404: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4457: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4407: \$? = $ac_status" >&5 + echo "$as_me:4460: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4410: \"$ac_try\"") >&5 + { (eval echo "$as_me:4463: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4413: \$? = $ac_status" >&5 + echo "$as_me:4466: \$? = $ac_status" >&5 (exit $ac_status); }; }; then CLANG_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" @@ -4421,12 +4474,12 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" - echo "$as_me:4424: result: $CLANG_COMPILER" >&5 + echo "$as_me:4477: result: $CLANG_COMPILER" >&5 echo "${ECHO_T}$CLANG_COMPILER" >&6 fi cat > conftest.$ac_ext <&5 + { echo "$as_me:4499: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-Wall" @@ -4459,12 +4512,12 @@ echo "$as_me: checking for $CC warning options..." >&6 wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:4462: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:4515: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4465: \$? = $ac_status" >&5 + echo "$as_me:4518: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:4467: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:4520: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi @@ -4473,7 +4526,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 elif test "$GCC" = yes then - { echo "$as_me:4476: checking for $CC warning options..." >&5 + { echo "$as_me:4529: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS= @@ -4497,12 +4550,12 @@ echo "$as_me: checking for $CC warning options..." >&6 Wundef $cf_gcc_warnings $cf_warn_CONST Wwrite-strings do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:4500: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:4553: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4503: \$? = $ac_status" >&5 + echo "$as_me:4556: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:4505: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:4558: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case $cf_opt in (Wcast-qual) @@ -4513,7 +4566,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 ([34].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:4516: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:4569: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -4523,7 +4576,7 @@ echo "${as_me:-configure}:4516: testing feature is bro ([12].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:4526: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:4579: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -4539,7 +4592,7 @@ rm -rf conftest* fi fi -echo "$as_me:4542: checking if you want to see long compiling messages" >&5 +echo "$as_me:4595: checking if you want to see long compiling messages" >&5 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6 # Check whether --enable-echo or --disable-echo was given. @@ -4573,10 +4626,10 @@ else ECHO_CC='' fi; -echo "$as_me:4576: result: $enableval" >&5 +echo "$as_me:4629: result: $enableval" >&5 echo "${ECHO_T}$enableval" >&6 -echo "$as_me:4579: checking if you want to use dmalloc for testing" >&5 +echo "$as_me:4632: checking if you want to use dmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6 # Check whether --with-dmalloc or --without-dmalloc was given. @@ -4593,7 +4646,7 @@ EOF else with_dmalloc= fi; -echo "$as_me:4596: result: ${with_dmalloc:-no}" >&5 +echo "$as_me:4649: result: ${with_dmalloc:-no}" >&5 echo "${ECHO_T}${with_dmalloc:-no}" >&6 case .$with_cflags in @@ -4687,23 +4740,23 @@ fi esac if test "$with_dmalloc" = yes ; then - echo "$as_me:4690: checking for dmalloc.h" >&5 + echo "$as_me:4743: checking for dmalloc.h" >&5 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4696 "configure" +#line 4749 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:4700: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:4753: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4706: \$? = $ac_status" >&5 + echo "$as_me:4759: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -4722,11 +4775,11 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:4725: result: $ac_cv_header_dmalloc_h" >&5 +echo "$as_me:4778: result: $ac_cv_header_dmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 if test $ac_cv_header_dmalloc_h = yes; then -echo "$as_me:4729: checking for dmalloc_debug in -ldmalloc" >&5 +echo "$as_me:4782: checking for dmalloc_debug in -ldmalloc" >&5 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4734,7 +4787,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4737 "configure" +#line 4790 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4753,16 +4806,16 @@ dmalloc_debug (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4756: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4809: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4759: \$? = $ac_status" >&5 + echo "$as_me:4812: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4762: \"$ac_try\"") >&5 + { (eval echo "$as_me:4815: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4765: \$? = $ac_status" >&5 + echo "$as_me:4818: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dmalloc_dmalloc_debug=yes else @@ -4773,7 +4826,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4776: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 +echo "$as_me:4829: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then cat >>confdefs.h <&5 +echo "$as_me:4844: checking if you want to use dbmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6 # Check whether --with-dbmalloc or --without-dbmalloc was given. @@ -4805,7 +4858,7 @@ EOF else with_dbmalloc= fi; -echo "$as_me:4808: result: ${with_dbmalloc:-no}" >&5 +echo "$as_me:4861: result: ${with_dbmalloc:-no}" >&5 echo "${ECHO_T}${with_dbmalloc:-no}" >&6 case .$with_cflags in @@ -4899,23 +4952,23 @@ fi esac if test "$with_dbmalloc" = yes ; then - echo "$as_me:4902: checking for dbmalloc.h" >&5 + echo "$as_me:4955: checking for dbmalloc.h" >&5 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dbmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4908 "configure" +#line 4961 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:4912: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:4965: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4918: \$? = $ac_status" >&5 + echo "$as_me:4971: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -4934,11 +4987,11 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:4937: result: $ac_cv_header_dbmalloc_h" >&5 +echo "$as_me:4990: result: $ac_cv_header_dbmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6 if test $ac_cv_header_dbmalloc_h = yes; then -echo "$as_me:4941: checking for debug_malloc in -ldbmalloc" >&5 +echo "$as_me:4994: checking for debug_malloc in -ldbmalloc" >&5 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4946,7 +4999,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldbmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4949 "configure" +#line 5002 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4965,16 +5018,16 @@ debug_malloc (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4968: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5021: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4971: \$? = $ac_status" >&5 + echo "$as_me:5024: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4974: \"$ac_try\"") >&5 + { (eval echo "$as_me:5027: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4977: \$? = $ac_status" >&5 + echo "$as_me:5030: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dbmalloc_debug_malloc=yes else @@ -4985,7 +5038,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4988: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 +echo "$as_me:5041: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then cat >>confdefs.h <&5 +echo "$as_me:5056: checking if you want to use valgrind for testing" >&5 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6 # Check whether --with-valgrind or --without-valgrind was given. @@ -5017,7 +5070,7 @@ EOF else with_valgrind= fi; -echo "$as_me:5020: result: ${with_valgrind:-no}" >&5 +echo "$as_me:5073: result: ${with_valgrind:-no}" >&5 echo "${ECHO_T}${with_valgrind:-no}" >&6 case .$with_cflags in @@ -5110,7 +5163,7 @@ fi ;; esac -echo "$as_me:5113: checking if you want to perform memory-leak testing" >&5 +echo "$as_me:5166: checking if you want to perform memory-leak testing" >&5 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6 # Check whether --enable-leaks or --disable-leaks was given. @@ -5120,7 +5173,7 @@ if test "${enable_leaks+set}" = set; then else : ${with_no_leaks:=no} fi; -echo "$as_me:5123: result: $with_no_leaks" >&5 +echo "$as_me:5176: result: $with_no_leaks" >&5 echo "${ECHO_T}$with_no_leaks" >&6 if test "$with_no_leaks" = yes ; then @@ -5137,7 +5190,7 @@ fi # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 -echo "$as_me:5140: checking for $ac_word" >&5 +echo "$as_me:5193: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GROFF_PATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5154,7 +5207,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_GROFF_PATH="$ac_dir/$ac_word" - echo "$as_me:5157: found $ac_dir/$ac_word" >&5 + echo "$as_me:5210: found $ac_dir/$ac_word" >&5 break fi done @@ -5166,16 +5219,16 @@ fi GROFF_PATH=$ac_cv_path_GROFF_PATH if test -n "$GROFF_PATH"; then - echo "$as_me:5169: result: $GROFF_PATH" >&5 + echo "$as_me:5222: result: $GROFF_PATH" >&5 echo "${ECHO_T}$GROFF_PATH" >&6 else - echo "$as_me:5172: result: no" >&5 + echo "$as_me:5225: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "nroff", so it can be a program name with args. set dummy nroff; ac_word=$2 -echo "$as_me:5178: checking for $ac_word" >&5 +echo "$as_me:5231: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_NROFF_PATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5192,7 +5245,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_NROFF_PATH="$ac_dir/$ac_word" - echo "$as_me:5195: found $ac_dir/$ac_word" >&5 + echo "$as_me:5248: found $ac_dir/$ac_word" >&5 break fi done @@ -5204,10 +5257,10 @@ fi NROFF_PATH=$ac_cv_path_NROFF_PATH if test -n "$NROFF_PATH"; then - echo "$as_me:5207: result: $NROFF_PATH" >&5 + echo "$as_me:5260: result: $NROFF_PATH" >&5 echo "${ECHO_T}$NROFF_PATH" >&6 else - echo "$as_me:5210: result: no" >&5 + echo "$as_me:5263: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5220,7 +5273,7 @@ else GROFF_NOTE= fi -echo "$as_me:5223: checking for program to convert manpage to html" >&5 +echo "$as_me:5276: checking for program to convert manpage to html" >&5 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6 # Check whether --with-man2html or --without-man2html was given. @@ -5235,11 +5288,11 @@ cf_with_groff=no case $cf_man2html in (yes) - echo "$as_me:5238: result: man2html" >&5 + echo "$as_me:5291: result: man2html" >&5 echo "${ECHO_T}man2html" >&6 # Extract the first word of "man2html", so it can be a program name with args. set dummy man2html; ac_word=$2 -echo "$as_me:5242: checking for $ac_word" >&5 +echo "$as_me:5295: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 31 19:20:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F2BEB87690; Wed, 31 May 2017 19:20:28 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F05464E2B; Wed, 31 May 2017 19:20:28 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4VJKRgT097196; Wed, 31 May 2017 19:20:27 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VJKR1A097195; Wed, 31 May 2017 19:20:27 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201705311920.v4VJKR1A097195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Wed, 31 May 2017 19:20:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319350 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 19:20:28 -0000 Author: ivadasz Date: Wed May 31 19:20:27 2017 New Revision: 319350 URL: https://svnweb.freebsd.org/changeset/base/319350 Log: Fix typo in Driver Type A/C/D capability checks in sdhci. Use the SDHCI_CAN_DRIVE_TYPE_A/_C/_D masks to check for Driver Type support, instead of using the SDHCI_CTRL2_DRIVER_TYPE_A/_C/_D values which are meant for setting the Driver Type in the HOST_CONTROL2 register. Approved by: adrian (mentor), jmcneill Differential Revision: https://reviews.freebsd.org/D10999 Modified: head/sys/dev/sdhci/sdhci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Wed May 31 19:16:22 2017 (r319349) +++ head/sys/dev/sdhci/sdhci.c Wed May 31 19:20:27 2017 (r319350) @@ -731,11 +731,11 @@ sdhci_init_slot(device_t dev, struct sdhci_slot *slot, MMC_CAP_MMC_DDR52_180 | MMC_CAP_MMC_HS200_180 | MMC_CAP_MMC_HS400_180)) host_caps |= MMC_CAP_SIGNALING_180; - if (caps & SDHCI_CTRL2_DRIVER_TYPE_A) + if (caps2 & SDHCI_CAN_DRIVE_TYPE_A) host_caps |= MMC_CAP_DRIVER_TYPE_A; - if (caps & SDHCI_CTRL2_DRIVER_TYPE_C) + if (caps2 & SDHCI_CAN_DRIVE_TYPE_C) host_caps |= MMC_CAP_DRIVER_TYPE_C; - if (caps & SDHCI_CTRL2_DRIVER_TYPE_D) + if (caps2 & SDHCI_CAN_DRIVE_TYPE_D) host_caps |= MMC_CAP_DRIVER_TYPE_D; slot->host.caps = host_caps; @@ -769,9 +769,9 @@ sdhci_init_slot(device_t dev, struct sdhci_slot *slot, (caps & SDHCI_CAN_VDD_180) ? " 1.8V" : "", (host_caps & MMC_CAP_SIGNALING_180) ? " 1.8V" : "", (host_caps & MMC_CAP_SIGNALING_120) ? " 1.2V" : "", - (caps & SDHCI_CTRL2_DRIVER_TYPE_A) ? "A" : "", - (caps & SDHCI_CTRL2_DRIVER_TYPE_C) ? "C" : "", - (caps & SDHCI_CTRL2_DRIVER_TYPE_D) ? "D" : "", + (caps2 & SDHCI_CAN_DRIVE_TYPE_A) ? "A" : "", + (caps2 & SDHCI_CAN_DRIVE_TYPE_C) ? "C" : "", + (caps2 & SDHCI_CAN_DRIVE_TYPE_D) ? "D" : "", (slot->opt & SDHCI_HAVE_DMA) ? "DMA" : "PIO"); if (host_caps & (MMC_CAP_MMC_DDR52 | MMC_CAP_MMC_HS200 | MMC_CAP_MMC_HS400 | MMC_CAP_MMC_ENH_STROBE)) From owner-svn-src-all@freebsd.org Wed May 31 19:26:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5EF4B878BA; Wed, 31 May 2017 19:26:21 +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 96731653AD; Wed, 31 May 2017 19:26:21 +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 v4VJQK0f001834; Wed, 31 May 2017 19:26:20 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VJQKqa001833; Wed, 31 May 2017 19:26:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705311926.v4VJQKqa001833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 31 May 2017 19:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319351 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 19:26:21 -0000 Author: gjb Date: Wed May 31 19:26:20 2017 New Revision: 319351 URL: https://svnweb.freebsd.org/changeset/base/319351 Log: Document r319349, byacc(1) version 20170201. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 19:20:27 2017 (r319350) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 31 19:26:20 2017 (r319351) @@ -328,6 +328,9 @@ notification points to catch all authentication failures rather than only those caused by invalid login usernames. + + &man.byacc.1; has been updated to + version 20170201. From owner-svn-src-all@freebsd.org Wed May 31 19:27:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1607CB87946; Wed, 31 May 2017 19:27:44 +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 A5F46654F6; Wed, 31 May 2017 19:27:43 +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 v4VJRgt7002005; Wed, 31 May 2017 19:27:42 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VJRbaw001951; Wed, 31 May 2017 19:27:37 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705311927.v4VJRbaw001951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 31 May 2017 19:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319352 - in vendor/byacc/dist: . package package/debian package/pkgsrc test/btyacc test/yacc X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 19:27:44 -0000 Author: jkim Date: Wed May 31 19:27:37 2017 New Revision: 319352 URL: https://svnweb.freebsd.org/changeset/base/319352 Log: Import byacc 20170430. Modified: vendor/byacc/dist/CHANGES vendor/byacc/dist/MANIFEST vendor/byacc/dist/VERSION vendor/byacc/dist/btyaccpar.c vendor/byacc/dist/btyaccpar.skel vendor/byacc/dist/config.guess vendor/byacc/dist/config.sub vendor/byacc/dist/defs.h vendor/byacc/dist/main.c vendor/byacc/dist/output.c vendor/byacc/dist/package/byacc.spec vendor/byacc/dist/package/debian/changelog vendor/byacc/dist/package/mingw-byacc.spec vendor/byacc/dist/package/pkgsrc/Makefile vendor/byacc/dist/test/btyacc/btyacc_calc1.tab.c vendor/byacc/dist/test/btyacc/btyacc_demo.tab.c vendor/byacc/dist/test/btyacc/btyacc_destroy1.tab.c vendor/byacc/dist/test/btyacc/btyacc_destroy2.tab.c vendor/byacc/dist/test/btyacc/btyacc_destroy3.tab.c vendor/byacc/dist/test/btyacc/calc.tab.c vendor/byacc/dist/test/btyacc/calc1.tab.c vendor/byacc/dist/test/btyacc/calc2.tab.c vendor/byacc/dist/test/btyacc/calc3.tab.c vendor/byacc/dist/test/btyacc/code_calc.code.c vendor/byacc/dist/test/btyacc/code_error.code.c vendor/byacc/dist/test/btyacc/empty.tab.c vendor/byacc/dist/test/btyacc/err_inherit3.tab.c vendor/byacc/dist/test/btyacc/err_inherit4.tab.c vendor/byacc/dist/test/btyacc/err_syntax10.tab.c vendor/byacc/dist/test/btyacc/err_syntax11.tab.c vendor/byacc/dist/test/btyacc/err_syntax12.tab.c vendor/byacc/dist/test/btyacc/err_syntax18.tab.c vendor/byacc/dist/test/btyacc/err_syntax20.tab.c vendor/byacc/dist/test/btyacc/error.tab.c vendor/byacc/dist/test/btyacc/expr.oxout.tab.c vendor/byacc/dist/test/btyacc/grammar.tab.c vendor/byacc/dist/test/btyacc/inherit0.tab.c vendor/byacc/dist/test/btyacc/inherit1.tab.c vendor/byacc/dist/test/btyacc/inherit2.tab.c vendor/byacc/dist/test/btyacc/ok_syntax1.tab.c vendor/byacc/dist/test/btyacc/pure_calc.tab.c vendor/byacc/dist/test/btyacc/pure_error.tab.c vendor/byacc/dist/test/btyacc/quote_calc-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc.tab.c vendor/byacc/dist/test/btyacc/quote_calc2-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc2.tab.c vendor/byacc/dist/test/btyacc/quote_calc3-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc3.tab.c vendor/byacc/dist/test/btyacc/quote_calc4-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc4.tab.c vendor/byacc/dist/test/btyacc/rename_debug.c vendor/byacc/dist/test/btyacc/varsyntax_calc1.tab.c vendor/byacc/dist/test/yacc/big_l.output vendor/byacc/dist/test/yacc/calc3.tab.c vendor/byacc/dist/test/yacc/ok_syntax1.tab.c vendor/byacc/dist/test/yacc/pure_calc.tab.c vendor/byacc/dist/test/yacc/pure_error.tab.c vendor/byacc/dist/yaccpar.c vendor/byacc/dist/yaccpar.skel Modified: vendor/byacc/dist/CHANGES ============================================================================== --- vendor/byacc/dist/CHANGES Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/CHANGES Wed May 31 19:27:37 2017 (r319352) @@ -1,3 +1,33 @@ +2017-04-30 Thomas E. Dickey + + * test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, t est/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/rename_debug.c, btyaccpar.c, btyaccpar.skel: + fix another uninitialized variable warning in "make check_make" for btyacc + + * test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/calc3.tab.c, btyaccpar.c, btyaccpar.skel, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/calc3.tab.c, yaccpar.c, defs.h, yaccpar.skel, output.c: + fix some compiler warnings for "make check_make" by adding section init_vars, + which initializes the body_vars for pure-parser configuration. + +2017-04-30 Tom.Shields + + * output.c: + use YY_NO_LEAKS set in configure --with-no-leaks, in the generated code + +2017-04-30 Julien.Ramseier + + * main.c, test/yacc/big_l.output: + fix typo in unsupported-flag warning message + +2017-04-30 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2017-03-18 Thomas E. Dickey + + * config.sub: 2017-02-07 + + * config.guess: 2017-03-05 + 2017-02-01 Thomas E. Dickey * test/btyacc/expr.oxout.error, test/btyacc/expr.oxout.output, test/btyacc/expr.oxout.tab.c, test/btyacc/expr.oxout.tab.h, test/yacc/expr.oxout.error, test/yacc/expr.oxout.output, test/yacc/expr.oxout.tab.c, test/yacc/expr.oxout.tab.h: Modified: vendor/byacc/dist/MANIFEST ============================================================================== --- vendor/byacc/dist/MANIFEST Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/MANIFEST Wed May 31 19:27:37 2017 (r319352) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20170201, version t20170201 +MANIFEST for byacc-20170430, version t20170430 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: vendor/byacc/dist/VERSION ============================================================================== --- vendor/byacc/dist/VERSION Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/VERSION Wed May 31 19:27:37 2017 (r319352) @@ -1 +1 @@ -20170201 +20170430 Modified: vendor/byacc/dist/btyaccpar.c ============================================================================== --- vendor/byacc/dist/btyaccpar.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/btyaccpar.c Wed May 31 19:27:37 2017 (r319352) @@ -2,7 +2,7 @@ * @Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp @ */ -/* @Id: btyaccpar.skel,v 1.5 2016/12/02 22:02:28 tom Exp @ */ +/* @Id: btyaccpar.skel,v 1.6 2017/04/30 23:40:34 tom Exp @ */ #include "defs.h" @@ -449,6 +449,23 @@ const char *const body_2[] = " }", " if (yydebug)", " fprintf(stderr, \"%sdebug[<# of symbols on state stack>]\\n\", YYPREFIX);", + "#endif", + "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", + " memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range));", + "#endif", + "", + 0 +}; + +const char *const init_vars[] = +{ + " yyerrflag = 0;", + " yychar = 0;", + " memset(&yyval, 0, sizeof(yyval));", + " memset(&yylval, 0, sizeof(yylval));", + "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", + " memset(&yyloc, 0, sizeof(yyloc));", + " memset(&yylloc, 0, sizeof(yylloc));", "#endif", "", 0 Modified: vendor/byacc/dist/btyaccpar.skel ============================================================================== --- vendor/byacc/dist/btyaccpar.skel Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/btyaccpar.skel Wed May 31 19:27:37 2017 (r319352) @@ -1,4 +1,4 @@ -/* $Id: btyaccpar.skel,v 1.5 2016/12/02 22:02:28 tom Exp $ */ +/* $Id: btyaccpar.skel,v 1.7 2017/05/01 00:13:19 tom Exp $ */ #include "defs.h" @@ -384,6 +384,19 @@ YYPARSE_DECL() } if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); +#endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + +%% init_vars + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); #endif %% body_3 Modified: vendor/byacc/dist/config.guess ============================================================================== --- vendor/byacc/dist/config.guess Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/config.guess Wed May 31 19:27:37 2017 (r319352) @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2017-03-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -837,10 +837,11 @@ EOF UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -1342,6 +1343,9 @@ EOF exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + NSX-?:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux Modified: vendor/byacc/dist/config.sub ============================================================================== --- vendor/byacc/dist/config.sub Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/config.sub Wed May 31 19:27:37 2017 (r319352) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2017-02-07' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -947,6 +947,9 @@ case $basic_machine in ;; nsr-tandem) basic_machine=nsr-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki Modified: vendor/byacc/dist/defs.h ============================================================================== --- vendor/byacc/dist/defs.h Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/defs.h Wed May 31 19:27:37 2017 (r319352) @@ -1,4 +1,4 @@ -/* $Id: defs.h,v 1.56 2017/02/02 00:44:38 tom Exp $ */ +/* $Id: defs.h,v 1.57 2017/04/30 23:29:11 tom Exp $ */ #ifdef HAVE_CONFIG_H #include @@ -307,6 +307,7 @@ extern const char *const hdr_defs[]; extern const char *const hdr_vars[]; extern const char *const body_1[]; extern const char *const body_vars[]; +extern const char *const init_vars[]; extern const char *const body_2[]; extern const char *const body_3[]; extern const char *const trailer[]; Modified: vendor/byacc/dist/main.c ============================================================================== --- vendor/byacc/dist/main.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/main.c Wed May 31 19:27:37 2017 (r319352) @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.59 2017/02/02 00:44:38 tom Exp $ */ +/* $Id: main.c,v 1.60 2017/04/30 20:57:56 Julien.Ramseier Exp $ */ #include #ifndef _WIN32 @@ -266,7 +266,7 @@ setflag(int ch) #if defined(YYBTYACC) locations = 1; #else - unsupported_flag_warning("-B", "reconfigure with --enable-btyacc"); + unsupported_flag_warning("-L", "reconfigure with --enable-btyacc"); #endif break; Modified: vendor/byacc/dist/output.c ============================================================================== --- vendor/byacc/dist/output.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/output.c Wed May 31 19:27:37 2017 (r319352) @@ -1,4 +1,4 @@ -/* $Id: output.c,v 1.79 2016/12/02 20:42:38 tom Exp $ */ +/* $Id: output.c,v 1.81 2017/04/30 23:23:32 tom Exp $ */ #include "defs.h" @@ -1584,7 +1584,20 @@ output_pure_parser(FILE * fp) putc_code(fp, '\n'); } +#if defined(YY_NO_LEAKS) static void +output_no_leaks(FILE * fp) +{ + putc_code(fp, '\n'); + + if (fp == code_file) + ++outline; + fputs("#define YY_NO_LEAKS 1\n", fp); + putc_code(fp, '\n'); +} +#endif + +static void output_trailing_text(void) { int c, last; @@ -1985,6 +1998,9 @@ output(void) output_prefix(fp); output_pure_parser(fp); +#if defined(YY_NO_LEAKS) + output_no_leaks(fp); +#endif output_stored_text(fp); output_stype(fp); #if defined(YYBTYACC) @@ -2068,6 +2084,10 @@ output(void) write_section(code_file, body_vars); } write_section(code_file, body_2); + if (pure_parser) + { + write_section(code_file, init_vars); + } #if defined(YYBTYACC) if (initial_action) output_initial_action(); Modified: vendor/byacc/dist/package/byacc.spec ============================================================================== --- vendor/byacc/dist/package/byacc.spec Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/package/byacc.spec Wed May 31 19:27:37 2017 (r319352) @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20170201 +%define AppVersion 20170430 %define UseProgram yacc -# $XTermId: byacc.spec,v 1.33 2017/02/01 09:55:04 tom Exp $ +# $XTermId: byacc.spec,v 1.34 2017/04/30 20:55:15 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 Modified: vendor/byacc/dist/package/debian/changelog ============================================================================== --- vendor/byacc/dist/package/debian/changelog Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/package/debian/changelog Wed May 31 19:27:37 2017 (r319352) @@ -1,3 +1,9 @@ +byacc (20170430) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey Sun, 30 Apr 2017 16:55:15 -0400 + byacc (20170201) unstable; urgency=low * maintenance updates Modified: vendor/byacc/dist/package/mingw-byacc.spec ============================================================================== --- vendor/byacc/dist/package/mingw-byacc.spec Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/package/mingw-byacc.spec Wed May 31 19:27:37 2017 (r319352) @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20170201 +%define AppVersion 20170430 %define UseProgram yacc -# $XTermId: mingw-byacc.spec,v 1.15 2017/02/01 09:55:04 tom Exp $ +# $XTermId: mingw-byacc.spec,v 1.16 2017/04/30 20:55:15 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 Modified: vendor/byacc/dist/package/pkgsrc/Makefile ============================================================================== --- vendor/byacc/dist/package/pkgsrc/Makefile Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/package/pkgsrc/Makefile Wed May 31 19:27:37 2017 (r319352) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $ # -DISTNAME= byacc-20170201 +DISTNAME= byacc-20170430 PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= ftp://invisible-island.net/byacc/ Modified: vendor/byacc/dist/test/btyacc/btyacc_calc1.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/btyacc_calc1.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/btyacc_calc1.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -818,7 +818,19 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif + #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; @@ -1525,7 +1537,7 @@ case 28: yyval.vval = yystack.l_mark[-1].vval; } break; -#line 1529 "btyacc_calc1.tab.c" +#line 1541 "btyacc_calc1.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/btyacc_demo.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/btyacc_demo.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/btyacc_demo.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -1330,6 +1330,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -2103,7 +2106,7 @@ case 59: #line 197 "btyacc_demo.y" { yyval.code = yystack.l_mark[-1].code; } break; -#line 2107 "btyacc_demo.tab.c" +#line 2110 "btyacc_demo.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/btyacc_destroy1.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/btyacc_destroy1.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/btyacc_destroy1.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -662,6 +662,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1225,7 +1228,7 @@ case 9: #line 86 "btyacc_destroy1.y" { yyval.nlist = yystack.l_mark[-5].nlist; } break; -#line 1229 "btyacc_destroy1.tab.c" +#line 1232 "btyacc_destroy1.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/btyacc_destroy2.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/btyacc_destroy2.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/btyacc_destroy2.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -662,6 +662,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1225,7 +1228,7 @@ case 9: #line 86 "btyacc_destroy2.y" { yyval.nlist = yystack.l_mark[-5].nlist; } break; -#line 1229 "btyacc_destroy2.tab.c" +#line 1232 "btyacc_destroy2.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/btyacc_destroy3.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/btyacc_destroy3.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/btyacc_destroy3.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -662,6 +662,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1225,7 +1228,7 @@ case 9: #line 89 "btyacc_destroy3.y" { yyval.nlist = yystack.l_mark[-5].nlist; } break; -#line 1229 "btyacc_destroy3.tab.c" +#line 1232 "btyacc_destroy3.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/calc.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/calc.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/calc.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -657,6 +657,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1231,7 +1234,7 @@ case 18: #line 63 "calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1235 "calc.tab.c" +#line 1238 "calc.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/calc1.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/calc1.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/calc1.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -801,6 +801,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1478,7 +1481,7 @@ case 28: yyval.vval = yystack.l_mark[-1].vval; } break; -#line 1482 "calc1.tab.c" +#line 1485 "calc1.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/calc2.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/calc2.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/calc2.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -670,6 +670,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1244,7 +1247,7 @@ case 18: #line 70 "calc2.y" { yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1248 "calc2.tab.c" +#line 1251 "calc2.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/calc3.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/calc3.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/calc3.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -675,7 +675,19 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif + #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; @@ -1249,7 +1261,7 @@ case 18: #line 73 "calc3.y" { yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1253 "calc3.tab.c" +#line 1265 "calc3.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/code_calc.code.c ============================================================================== --- vendor/byacc/dist/test/btyacc/code_calc.code.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/code_calc.code.c Wed May 31 19:27:37 2017 (r319352) @@ -530,6 +530,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1104,7 +1107,7 @@ case 18: #line 67 "code_calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1108 "code_calc.code.c" +#line 1111 "code_calc.code.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/code_error.code.c ============================================================================== --- vendor/byacc/dist/test/btyacc/code_error.code.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/code_error.code.c Wed May 31 19:27:37 2017 (r319352) @@ -500,6 +500,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: vendor/byacc/dist/test/btyacc/empty.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/empty.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/empty.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -519,6 +519,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: vendor/byacc/dist/test/btyacc/err_inherit3.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/err_inherit3.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/err_inherit3.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -619,6 +619,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1189,7 +1192,7 @@ case 13: #line 75 "err_inherit3.y" { yyval.nlist = yystack.l_mark[0].nlist; } break; -#line 1193 "err_inherit3.tab.c" +#line 1196 "err_inherit3.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/err_inherit4.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/err_inherit4.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/err_inherit4.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -617,6 +617,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1179,7 +1182,7 @@ case 11: #line 77 "err_inherit4.y" { yyval.nlist = yystack.l_mark[0].nlist; yyloc = yystack.p_mark[1]; } break; -#line 1183 "err_inherit4.tab.c" +#line 1186 "err_inherit4.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/err_syntax10.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/err_syntax10.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/err_syntax10.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -518,6 +518,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: vendor/byacc/dist/test/btyacc/err_syntax11.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/err_syntax11.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/err_syntax11.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -524,6 +524,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: vendor/byacc/dist/test/btyacc/err_syntax12.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/err_syntax12.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/err_syntax12.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -530,6 +530,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: vendor/byacc/dist/test/btyacc/err_syntax18.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/err_syntax18.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/err_syntax18.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -527,6 +527,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1045,7 +1048,7 @@ case 1: #line 9 "err_syntax18.y" { yyval = yystack.l_mark[1]; } break; -#line 1049 "err_syntax18.tab.c" +#line 1052 "err_syntax18.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/err_syntax20.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/err_syntax20.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/err_syntax20.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -522,6 +522,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1040,7 +1043,7 @@ case 1: #line 12 "err_syntax20.y" { yystack.l_mark[-1].rechk = 3; } break; -#line 1044 "err_syntax20.tab.c" +#line 1047 "err_syntax20.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/error.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/error.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/error.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -523,6 +523,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: vendor/byacc/dist/test/btyacc/expr.oxout.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/expr.oxout.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/expr.oxout.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -1943,6 +1943,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -2515,7 +2518,7 @@ case 10: yyyGenIntNode(8,1,0,&yyval.yyyOxAttrbs,&yystack.l_mark[0].yyyOxAttrbs); yyyAdjustINRC(8,1,0,0,&yyval.yyyOxAttrbs,&yystack.l_mark[0].yyyOxAttrbs);}} break; -#line 2519 "expr.oxout.tab.c" +#line 2522 "expr.oxout.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/grammar.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/grammar.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/grammar.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -1496,6 +1496,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -2684,7 +2687,7 @@ case 114: yyval.declarator->func_def = FUNC_ANSI; } break; -#line 2688 "grammar.tab.c" +#line 2691 "grammar.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/inherit0.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/inherit0.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/inherit0.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -542,6 +542,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1100,7 +1103,7 @@ case 11: #line 43 "inherit0.y" { yyval = yystack.l_mark[0]; } break; -#line 1104 "inherit0.tab.c" +#line 1107 "inherit0.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/inherit1.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/inherit1.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/inherit1.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -563,6 +563,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1125,7 +1128,7 @@ case 11: #line 71 "inherit1.y" { yyval.nlist = yystack.l_mark[0].nlist; } break; -#line 1129 "inherit1.tab.c" +#line 1132 "inherit1.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/inherit2.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/inherit2.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/inherit2.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -618,6 +618,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1184,7 +1187,7 @@ case 12: #line 75 "inherit2.y" { yyval.nlist = yystack.l_mark[0].nlist; } break; -#line 1188 "inherit2.tab.c" +#line 1191 "inherit2.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/ok_syntax1.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/ok_syntax1.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/ok_syntax1.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -698,7 +698,19 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif + #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; @@ -1272,7 +1284,7 @@ case 18: #line 101 "ok_syntax1.y" { yyval.ival = (*base) * yystack.l_mark[-1].ival + yystack.l_mark[0].ival; } break; -#line 1276 "ok_syntax1.tab.c" +#line 1288 "ok_syntax1.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/pure_calc.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/pure_calc.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/pure_calc.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -671,7 +671,19 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif + #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; @@ -1245,7 +1257,7 @@ case 18: #line 69 "pure_calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1249 "pure_calc.tab.c" +#line 1261 "pure_calc.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/pure_error.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/pure_error.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/pure_error.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -539,6 +539,18 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: vendor/byacc/dist/test/btyacc/quote_calc-s.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/quote_calc-s.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/quote_calc-s.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -675,6 +675,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1249,7 +1252,7 @@ case 18: #line 70 "quote_calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1253 "quote_calc-s.tab.c" +#line 1256 "quote_calc-s.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/quote_calc.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/quote_calc.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/quote_calc.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -681,6 +681,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1255,7 +1258,7 @@ case 18: #line 70 "quote_calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1259 "quote_calc.tab.c" +#line 1262 "quote_calc.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/quote_calc2-s.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/quote_calc2-s.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/quote_calc2-s.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -675,6 +675,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1249,7 +1252,7 @@ case 18: #line 70 "quote_calc2.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1253 "quote_calc2-s.tab.c" +#line 1256 "quote_calc2-s.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/quote_calc2.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/quote_calc2.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/quote_calc2.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -681,6 +681,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1255,7 +1258,7 @@ case 18: #line 70 "quote_calc2.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1259 "quote_calc2.tab.c" +#line 1262 "quote_calc2.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/quote_calc3-s.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/quote_calc3-s.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/quote_calc3-s.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -676,6 +676,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1250,7 +1253,7 @@ case 18: #line 70 "quote_calc3.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1254 "quote_calc3-s.tab.c" +#line 1257 "quote_calc3-s.tab.c" default: break; } Modified: vendor/byacc/dist/test/btyacc/quote_calc3.tab.c ============================================================================== --- vendor/byacc/dist/test/btyacc/quote_calc3.tab.c Wed May 31 19:26:20 2017 (r319351) +++ vendor/byacc/dist/test/btyacc/quote_calc3.tab.c Wed May 31 19:27:37 2017 (r319352) @@ -676,6 +676,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1250,7 +1253,7 @@ case 18: #line 70 "quote_calc3.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1254 "quote_calc3.tab.c" +#line 1257 "quote_calc3.tab.c" default: break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 31 19:28:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CDEAB8799F; Wed, 31 May 2017 19:28:23 +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 2363B65617; Wed, 31 May 2017 19:28:23 +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 v4VJSMl1002092; Wed, 31 May 2017 19:28:22 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VJSMaT002091; Wed, 31 May 2017 19:28:22 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705311928.v4VJSMaT002091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 31 May 2017 19:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319353 - vendor/byacc/20170430 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 19:28:23 -0000 Author: jkim Date: Wed May 31 19:28:22 2017 New Revision: 319353 URL: https://svnweb.freebsd.org/changeset/base/319353 Log: Tag byacc 20170430. Added: vendor/byacc/20170430/ - copied from r319352, vendor/byacc/dist/ From owner-svn-src-all@freebsd.org Wed May 31 19:37:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A28DB87D62; Wed, 31 May 2017 19:37:30 +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 B71F165C98; Wed, 31 May 2017 19:37:29 +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 v4VJbSTM006319; Wed, 31 May 2017 19:37:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VJbOSX006268; Wed, 31 May 2017 19:37:24 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705311937.v4VJbOSX006268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 31 May 2017 19:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319354 - in head/contrib/byacc: . package package/debian package/pkgsrc test/btyacc test/yacc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 19:37:30 -0000 Author: jkim Date: Wed May 31 19:37:23 2017 New Revision: 319354 URL: https://svnweb.freebsd.org/changeset/base/319354 Log: MFV: r319352 Merge byacc 20170430. Modified: head/contrib/byacc/CHANGES head/contrib/byacc/MANIFEST head/contrib/byacc/VERSION head/contrib/byacc/btyaccpar.c head/contrib/byacc/btyaccpar.skel head/contrib/byacc/config.guess head/contrib/byacc/config.sub head/contrib/byacc/defs.h head/contrib/byacc/main.c head/contrib/byacc/output.c head/contrib/byacc/package/byacc.spec head/contrib/byacc/package/debian/changelog head/contrib/byacc/package/mingw-byacc.spec head/contrib/byacc/package/pkgsrc/Makefile head/contrib/byacc/test/btyacc/btyacc_calc1.tab.c head/contrib/byacc/test/btyacc/btyacc_demo.tab.c head/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c head/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c head/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c head/contrib/byacc/test/btyacc/calc.tab.c head/contrib/byacc/test/btyacc/calc1.tab.c head/contrib/byacc/test/btyacc/calc2.tab.c head/contrib/byacc/test/btyacc/calc3.tab.c head/contrib/byacc/test/btyacc/code_calc.code.c head/contrib/byacc/test/btyacc/code_error.code.c head/contrib/byacc/test/btyacc/empty.tab.c head/contrib/byacc/test/btyacc/err_inherit3.tab.c head/contrib/byacc/test/btyacc/err_inherit4.tab.c head/contrib/byacc/test/btyacc/err_syntax10.tab.c head/contrib/byacc/test/btyacc/err_syntax11.tab.c head/contrib/byacc/test/btyacc/err_syntax12.tab.c head/contrib/byacc/test/btyacc/err_syntax18.tab.c head/contrib/byacc/test/btyacc/err_syntax20.tab.c head/contrib/byacc/test/btyacc/error.tab.c head/contrib/byacc/test/btyacc/expr.oxout.tab.c head/contrib/byacc/test/btyacc/grammar.tab.c head/contrib/byacc/test/btyacc/inherit0.tab.c head/contrib/byacc/test/btyacc/inherit1.tab.c head/contrib/byacc/test/btyacc/inherit2.tab.c head/contrib/byacc/test/btyacc/ok_syntax1.tab.c head/contrib/byacc/test/btyacc/pure_calc.tab.c head/contrib/byacc/test/btyacc/pure_error.tab.c head/contrib/byacc/test/btyacc/quote_calc-s.tab.c head/contrib/byacc/test/btyacc/quote_calc.tab.c head/contrib/byacc/test/btyacc/quote_calc2-s.tab.c head/contrib/byacc/test/btyacc/quote_calc2.tab.c head/contrib/byacc/test/btyacc/quote_calc3-s.tab.c head/contrib/byacc/test/btyacc/quote_calc3.tab.c head/contrib/byacc/test/btyacc/quote_calc4-s.tab.c head/contrib/byacc/test/btyacc/quote_calc4.tab.c head/contrib/byacc/test/btyacc/rename_debug.c head/contrib/byacc/test/btyacc/varsyntax_calc1.tab.c head/contrib/byacc/test/yacc/big_l.output head/contrib/byacc/test/yacc/calc3.tab.c head/contrib/byacc/test/yacc/ok_syntax1.tab.c head/contrib/byacc/test/yacc/pure_calc.tab.c head/contrib/byacc/test/yacc/pure_error.tab.c head/contrib/byacc/yaccpar.c head/contrib/byacc/yaccpar.skel Directory Properties: head/contrib/byacc/ (props changed) Modified: head/contrib/byacc/CHANGES ============================================================================== --- head/contrib/byacc/CHANGES Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/CHANGES Wed May 31 19:37:23 2017 (r319354) @@ -1,3 +1,33 @@ +2017-04-30 Thomas E. Dickey + + * test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, t est/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/rename_debug.c, btyaccpar.c, btyaccpar.skel: + fix another uninitialized variable warning in "make check_make" for btyacc + + * test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/calc3.tab.c, btyaccpar.c, btyaccpar.skel, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/calc3.tab.c, yaccpar.c, defs.h, yaccpar.skel, output.c: + fix some compiler warnings for "make check_make" by adding section init_vars, + which initializes the body_vars for pure-parser configuration. + +2017-04-30 Tom.Shields + + * output.c: + use YY_NO_LEAKS set in configure --with-no-leaks, in the generated code + +2017-04-30 Julien.Ramseier + + * main.c, test/yacc/big_l.output: + fix typo in unsupported-flag warning message + +2017-04-30 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2017-03-18 Thomas E. Dickey + + * config.sub: 2017-02-07 + + * config.guess: 2017-03-05 + 2017-02-01 Thomas E. Dickey * test/btyacc/expr.oxout.error, test/btyacc/expr.oxout.output, test/btyacc/expr.oxout.tab.c, test/btyacc/expr.oxout.tab.h, test/yacc/expr.oxout.error, test/yacc/expr.oxout.output, test/yacc/expr.oxout.tab.c, test/yacc/expr.oxout.tab.h: Modified: head/contrib/byacc/MANIFEST ============================================================================== --- head/contrib/byacc/MANIFEST Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/MANIFEST Wed May 31 19:37:23 2017 (r319354) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20170201, version t20170201 +MANIFEST for byacc-20170430, version t20170430 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: head/contrib/byacc/VERSION ============================================================================== --- head/contrib/byacc/VERSION Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/VERSION Wed May 31 19:37:23 2017 (r319354) @@ -1 +1 @@ -20170201 +20170430 Modified: head/contrib/byacc/btyaccpar.c ============================================================================== --- head/contrib/byacc/btyaccpar.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/btyaccpar.c Wed May 31 19:37:23 2017 (r319354) @@ -2,7 +2,7 @@ * @Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp @ */ -/* @Id: btyaccpar.skel,v 1.5 2016/12/02 22:02:28 tom Exp @ */ +/* @Id: btyaccpar.skel,v 1.6 2017/04/30 23:40:34 tom Exp @ */ #include "defs.h" @@ -449,6 +449,23 @@ const char *const body_2[] = " }", " if (yydebug)", " fprintf(stderr, \"%sdebug[<# of symbols on state stack>]\\n\", YYPREFIX);", + "#endif", + "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", + " memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range));", + "#endif", + "", + 0 +}; + +const char *const init_vars[] = +{ + " yyerrflag = 0;", + " yychar = 0;", + " memset(&yyval, 0, sizeof(yyval));", + " memset(&yylval, 0, sizeof(yylval));", + "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", + " memset(&yyloc, 0, sizeof(yyloc));", + " memset(&yylloc, 0, sizeof(yylloc));", "#endif", "", 0 Modified: head/contrib/byacc/btyaccpar.skel ============================================================================== --- head/contrib/byacc/btyaccpar.skel Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/btyaccpar.skel Wed May 31 19:37:23 2017 (r319354) @@ -1,4 +1,4 @@ -/* $Id: btyaccpar.skel,v 1.5 2016/12/02 22:02:28 tom Exp $ */ +/* $Id: btyaccpar.skel,v 1.7 2017/05/01 00:13:19 tom Exp $ */ #include "defs.h" @@ -384,6 +384,19 @@ YYPARSE_DECL() } if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); +#endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + +%% init_vars + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); #endif %% body_3 Modified: head/contrib/byacc/config.guess ============================================================================== --- head/contrib/byacc/config.guess Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/config.guess Wed May 31 19:37:23 2017 (r319354) @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2017-03-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -837,10 +837,11 @@ EOF UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -1342,6 +1343,9 @@ EOF exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + NSX-?:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux Modified: head/contrib/byacc/config.sub ============================================================================== --- head/contrib/byacc/config.sub Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/config.sub Wed May 31 19:37:23 2017 (r319354) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2017-02-07' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -947,6 +947,9 @@ case $basic_machine in ;; nsr-tandem) basic_machine=nsr-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki Modified: head/contrib/byacc/defs.h ============================================================================== --- head/contrib/byacc/defs.h Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/defs.h Wed May 31 19:37:23 2017 (r319354) @@ -1,4 +1,4 @@ -/* $Id: defs.h,v 1.56 2017/02/02 00:44:38 tom Exp $ */ +/* $Id: defs.h,v 1.57 2017/04/30 23:29:11 tom Exp $ */ #ifdef HAVE_CONFIG_H #include @@ -307,6 +307,7 @@ extern const char *const hdr_defs[]; extern const char *const hdr_vars[]; extern const char *const body_1[]; extern const char *const body_vars[]; +extern const char *const init_vars[]; extern const char *const body_2[]; extern const char *const body_3[]; extern const char *const trailer[]; Modified: head/contrib/byacc/main.c ============================================================================== --- head/contrib/byacc/main.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/main.c Wed May 31 19:37:23 2017 (r319354) @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.59 2017/02/02 00:44:38 tom Exp $ */ +/* $Id: main.c,v 1.60 2017/04/30 20:57:56 Julien.Ramseier Exp $ */ #include #ifndef _WIN32 @@ -266,7 +266,7 @@ setflag(int ch) #if defined(YYBTYACC) locations = 1; #else - unsupported_flag_warning("-B", "reconfigure with --enable-btyacc"); + unsupported_flag_warning("-L", "reconfigure with --enable-btyacc"); #endif break; Modified: head/contrib/byacc/output.c ============================================================================== --- head/contrib/byacc/output.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/output.c Wed May 31 19:37:23 2017 (r319354) @@ -1,4 +1,4 @@ -/* $Id: output.c,v 1.79 2016/12/02 20:42:38 tom Exp $ */ +/* $Id: output.c,v 1.81 2017/04/30 23:23:32 tom Exp $ */ #include "defs.h" @@ -1584,7 +1584,20 @@ output_pure_parser(FILE * fp) putc_code(fp, '\n'); } +#if defined(YY_NO_LEAKS) static void +output_no_leaks(FILE * fp) +{ + putc_code(fp, '\n'); + + if (fp == code_file) + ++outline; + fputs("#define YY_NO_LEAKS 1\n", fp); + putc_code(fp, '\n'); +} +#endif + +static void output_trailing_text(void) { int c, last; @@ -1985,6 +1998,9 @@ output(void) output_prefix(fp); output_pure_parser(fp); +#if defined(YY_NO_LEAKS) + output_no_leaks(fp); +#endif output_stored_text(fp); output_stype(fp); #if defined(YYBTYACC) @@ -2068,6 +2084,10 @@ output(void) write_section(code_file, body_vars); } write_section(code_file, body_2); + if (pure_parser) + { + write_section(code_file, init_vars); + } #if defined(YYBTYACC) if (initial_action) output_initial_action(); Modified: head/contrib/byacc/package/byacc.spec ============================================================================== --- head/contrib/byacc/package/byacc.spec Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/package/byacc.spec Wed May 31 19:37:23 2017 (r319354) @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20170201 +%define AppVersion 20170430 %define UseProgram yacc -# $XTermId: byacc.spec,v 1.33 2017/02/01 09:55:04 tom Exp $ +# $XTermId: byacc.spec,v 1.34 2017/04/30 20:55:15 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 Modified: head/contrib/byacc/package/debian/changelog ============================================================================== --- head/contrib/byacc/package/debian/changelog Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/package/debian/changelog Wed May 31 19:37:23 2017 (r319354) @@ -1,3 +1,9 @@ +byacc (20170430) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey Sun, 30 Apr 2017 16:55:15 -0400 + byacc (20170201) unstable; urgency=low * maintenance updates Modified: head/contrib/byacc/package/mingw-byacc.spec ============================================================================== --- head/contrib/byacc/package/mingw-byacc.spec Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/package/mingw-byacc.spec Wed May 31 19:37:23 2017 (r319354) @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20170201 +%define AppVersion 20170430 %define UseProgram yacc -# $XTermId: mingw-byacc.spec,v 1.15 2017/02/01 09:55:04 tom Exp $ +# $XTermId: mingw-byacc.spec,v 1.16 2017/04/30 20:55:15 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 Modified: head/contrib/byacc/package/pkgsrc/Makefile ============================================================================== --- head/contrib/byacc/package/pkgsrc/Makefile Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/package/pkgsrc/Makefile Wed May 31 19:37:23 2017 (r319354) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $ # -DISTNAME= byacc-20170201 +DISTNAME= byacc-20170430 PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= ftp://invisible-island.net/byacc/ Modified: head/contrib/byacc/test/btyacc/btyacc_calc1.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/btyacc_calc1.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/btyacc_calc1.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -818,7 +818,19 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif + #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; @@ -1525,7 +1537,7 @@ case 28: yyval.vval = yystack.l_mark[-1].vval; } break; -#line 1529 "btyacc_calc1.tab.c" +#line 1541 "btyacc_calc1.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/btyacc_demo.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/btyacc_demo.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/btyacc_demo.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -1330,6 +1330,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -2103,7 +2106,7 @@ case 59: #line 197 "btyacc_demo.y" { yyval.code = yystack.l_mark[-1].code; } break; -#line 2107 "btyacc_demo.tab.c" +#line 2110 "btyacc_demo.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -662,6 +662,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1225,7 +1228,7 @@ case 9: #line 86 "btyacc_destroy1.y" { yyval.nlist = yystack.l_mark[-5].nlist; } break; -#line 1229 "btyacc_destroy1.tab.c" +#line 1232 "btyacc_destroy1.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -662,6 +662,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1225,7 +1228,7 @@ case 9: #line 86 "btyacc_destroy2.y" { yyval.nlist = yystack.l_mark[-5].nlist; } break; -#line 1229 "btyacc_destroy2.tab.c" +#line 1232 "btyacc_destroy2.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -662,6 +662,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1225,7 +1228,7 @@ case 9: #line 89 "btyacc_destroy3.y" { yyval.nlist = yystack.l_mark[-5].nlist; } break; -#line 1229 "btyacc_destroy3.tab.c" +#line 1232 "btyacc_destroy3.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/calc.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/calc.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/calc.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -657,6 +657,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1231,7 +1234,7 @@ case 18: #line 63 "calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1235 "calc.tab.c" +#line 1238 "calc.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/calc1.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/calc1.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/calc1.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -801,6 +801,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1478,7 +1481,7 @@ case 28: yyval.vval = yystack.l_mark[-1].vval; } break; -#line 1482 "calc1.tab.c" +#line 1485 "calc1.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/calc2.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/calc2.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/calc2.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -670,6 +670,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1244,7 +1247,7 @@ case 18: #line 70 "calc2.y" { yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1248 "calc2.tab.c" +#line 1251 "calc2.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/calc3.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/calc3.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/calc3.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -675,7 +675,19 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif + #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; @@ -1249,7 +1261,7 @@ case 18: #line 73 "calc3.y" { yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1253 "calc3.tab.c" +#line 1265 "calc3.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/code_calc.code.c ============================================================================== --- head/contrib/byacc/test/btyacc/code_calc.code.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/code_calc.code.c Wed May 31 19:37:23 2017 (r319354) @@ -530,6 +530,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1104,7 +1107,7 @@ case 18: #line 67 "code_calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1108 "code_calc.code.c" +#line 1111 "code_calc.code.c" default: break; } Modified: head/contrib/byacc/test/btyacc/code_error.code.c ============================================================================== --- head/contrib/byacc/test/btyacc/code_error.code.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/code_error.code.c Wed May 31 19:37:23 2017 (r319354) @@ -500,6 +500,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: head/contrib/byacc/test/btyacc/empty.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/empty.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/empty.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -519,6 +519,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: head/contrib/byacc/test/btyacc/err_inherit3.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/err_inherit3.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/err_inherit3.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -619,6 +619,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1189,7 +1192,7 @@ case 13: #line 75 "err_inherit3.y" { yyval.nlist = yystack.l_mark[0].nlist; } break; -#line 1193 "err_inherit3.tab.c" +#line 1196 "err_inherit3.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/err_inherit4.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/err_inherit4.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/err_inherit4.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -617,6 +617,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1179,7 +1182,7 @@ case 11: #line 77 "err_inherit4.y" { yyval.nlist = yystack.l_mark[0].nlist; yyloc = yystack.p_mark[1]; } break; -#line 1183 "err_inherit4.tab.c" +#line 1186 "err_inherit4.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/err_syntax10.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/err_syntax10.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/err_syntax10.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -518,6 +518,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: head/contrib/byacc/test/btyacc/err_syntax11.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/err_syntax11.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/err_syntax11.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -524,6 +524,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: head/contrib/byacc/test/btyacc/err_syntax12.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/err_syntax12.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/err_syntax12.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -530,6 +530,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: head/contrib/byacc/test/btyacc/err_syntax18.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/err_syntax18.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/err_syntax18.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -527,6 +527,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1045,7 +1048,7 @@ case 1: #line 9 "err_syntax18.y" { yyval = yystack.l_mark[1]; } break; -#line 1049 "err_syntax18.tab.c" +#line 1052 "err_syntax18.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/err_syntax20.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/err_syntax20.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/err_syntax20.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -522,6 +522,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1040,7 +1043,7 @@ case 1: #line 12 "err_syntax20.y" { yystack.l_mark[-1].rechk = 3; } break; -#line 1044 "err_syntax20.tab.c" +#line 1047 "err_syntax20.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/error.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/error.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/error.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -523,6 +523,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: head/contrib/byacc/test/btyacc/expr.oxout.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/expr.oxout.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/expr.oxout.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -1943,6 +1943,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -2515,7 +2518,7 @@ case 10: yyyGenIntNode(8,1,0,&yyval.yyyOxAttrbs,&yystack.l_mark[0].yyyOxAttrbs); yyyAdjustINRC(8,1,0,0,&yyval.yyyOxAttrbs,&yystack.l_mark[0].yyyOxAttrbs);}} break; -#line 2519 "expr.oxout.tab.c" +#line 2522 "expr.oxout.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/grammar.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/grammar.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/grammar.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -1496,6 +1496,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -2684,7 +2687,7 @@ case 114: yyval.declarator->func_def = FUNC_ANSI; } break; -#line 2688 "grammar.tab.c" +#line 2691 "grammar.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/inherit0.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/inherit0.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/inherit0.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -542,6 +542,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1100,7 +1103,7 @@ case 11: #line 43 "inherit0.y" { yyval = yystack.l_mark[0]; } break; -#line 1104 "inherit0.tab.c" +#line 1107 "inherit0.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/inherit1.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/inherit1.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/inherit1.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -563,6 +563,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1125,7 +1128,7 @@ case 11: #line 71 "inherit1.y" { yyval.nlist = yystack.l_mark[0].nlist; } break; -#line 1129 "inherit1.tab.c" +#line 1132 "inherit1.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/inherit2.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/inherit2.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/inherit2.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -618,6 +618,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1184,7 +1187,7 @@ case 12: #line 75 "inherit2.y" { yyval.nlist = yystack.l_mark[0].nlist; } break; -#line 1188 "inherit2.tab.c" +#line 1191 "inherit2.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/ok_syntax1.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/ok_syntax1.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/ok_syntax1.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -698,7 +698,19 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif + #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; @@ -1272,7 +1284,7 @@ case 18: #line 101 "ok_syntax1.y" { yyval.ival = (*base) * yystack.l_mark[-1].ival + yystack.l_mark[0].ival; } break; -#line 1276 "ok_syntax1.tab.c" +#line 1288 "ok_syntax1.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/pure_calc.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/pure_calc.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/pure_calc.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -671,7 +671,19 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif + #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; @@ -1245,7 +1257,7 @@ case 18: #line 69 "pure_calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1249 "pure_calc.tab.c" +#line 1261 "pure_calc.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/pure_error.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/pure_error.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/pure_error.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -539,6 +539,18 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif + + yyerrflag = 0; + yychar = 0; + memset(&yyval, 0, sizeof(yyval)); + memset(&yylval, 0, sizeof(yylval)); +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(&yyloc, 0, sizeof(yyloc)); + memset(&yylloc, 0, sizeof(yylloc)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; Modified: head/contrib/byacc/test/btyacc/quote_calc-s.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/quote_calc-s.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/quote_calc-s.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -675,6 +675,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1249,7 +1252,7 @@ case 18: #line 70 "quote_calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1253 "quote_calc-s.tab.c" +#line 1256 "quote_calc-s.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/quote_calc.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/quote_calc.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/quote_calc.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -681,6 +681,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1255,7 +1258,7 @@ case 18: #line 70 "quote_calc.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1259 "quote_calc.tab.c" +#line 1262 "quote_calc.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/quote_calc2-s.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/quote_calc2-s.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/quote_calc2-s.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -675,6 +675,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1249,7 +1252,7 @@ case 18: #line 70 "quote_calc2.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1253 "quote_calc2-s.tab.c" +#line 1256 "quote_calc2-s.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/quote_calc2.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/quote_calc2.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/quote_calc2.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -681,6 +681,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1255,7 +1258,7 @@ case 18: #line 70 "quote_calc2.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1259 "quote_calc2.tab.c" +#line 1262 "quote_calc2.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/quote_calc3-s.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/quote_calc3-s.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/quote_calc3-s.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -676,6 +676,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1250,7 +1253,7 @@ case 18: #line 70 "quote_calc3.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1254 "quote_calc3-s.tab.c" +#line 1257 "quote_calc3-s.tab.c" default: break; } Modified: head/contrib/byacc/test/btyacc/quote_calc3.tab.c ============================================================================== --- head/contrib/byacc/test/btyacc/quote_calc3.tab.c Wed May 31 19:28:22 2017 (r319353) +++ head/contrib/byacc/test/btyacc/quote_calc3.tab.c Wed May 31 19:37:23 2017 (r319354) @@ -676,6 +676,9 @@ YYPARSE_DECL() if (yydebug) fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX); #endif +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range)); +#endif #if YYBTYACC yyps = yyNewState(0); if (yyps == 0) goto yyenomem; @@ -1250,7 +1253,7 @@ case 18: #line 70 "quote_calc3.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 1254 "quote_calc3.tab.c" +#line 1257 "quote_calc3.tab.c" default: break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 31 21:05:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C6DBB94869; Wed, 31 May 2017 21:05:25 +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 5ED18684D7; Wed, 31 May 2017 21:05:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4VL5Ocu044118; Wed, 31 May 2017 21:05:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VL5OjI044117; Wed, 31 May 2017 21:05:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705312105.v4VL5OjI044117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 31 May 2017 21:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319355 - head/sys/fs/cuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 21:05:25 -0000 Author: hselasky Date: Wed May 31 21:05:24 2017 New Revision: 319355 URL: https://svnweb.freebsd.org/changeset/base/319355 Log: Minor code optimisation. Avoid locking the global CUSE lock when the polling flags are zero. MFC after: 1 week Modified: head/sys/fs/cuse/cuse.c Modified: head/sys/fs/cuse/cuse.c ============================================================================== --- head/sys/fs/cuse/cuse.c Wed May 31 19:37:23 2017 (r319354) +++ head/sys/fs/cuse/cuse.c Wed May 31 21:05:24 2017 (r319355) @@ -1507,8 +1507,8 @@ cuse_client_kqfilter_poll(struct cdev *dev, struct cus /* get the latest polling state from the server */ temp = cuse_client_poll(dev, POLLIN | POLLOUT, NULL); - cuse_lock(); if (temp & (POLLIN | POLLOUT)) { + cuse_lock(); if (temp & POLLIN) pcc->cflags |= CUSE_CLI_KNOTE_NEED_READ; if (temp & POLLOUT) @@ -1516,8 +1516,8 @@ cuse_client_kqfilter_poll(struct cdev *dev, struct cus /* make sure the "knote" gets woken up */ cuse_server_wakeup_locked(pcc->server); + cuse_unlock(); } - cuse_unlock(); } } From owner-svn-src-all@freebsd.org Wed May 31 21:15:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 005A7B94A01; Wed, 31 May 2017 21:15:06 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B067F68910; Wed, 31 May 2017 21:15:06 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4VLF5Yl048388; Wed, 31 May 2017 21:15:05 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VLF5iF048386; Wed, 31 May 2017 21:15:05 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705312115.v4VLF5iF048386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 31 May 2017 21:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319356 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 21:15:07 -0000 Author: vangyzen Date: Wed May 31 21:15:05 2017 New Revision: 319356 URL: https://svnweb.freebsd.org/changeset/base/319356 Log: MFC r319020 Fix INSTALL_AS_USER Move INSTALL_AS_USER into bsd.init.mk to maximize the chance that it has final authority over fooOWN and fooGRP. Reviewed by: sjg Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10810 Modified: stable/11/share/mk/bsd.init.mk stable/11/share/mk/bsd.own.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.init.mk ============================================================================== --- stable/11/share/mk/bsd.init.mk Wed May 31 21:05:24 2017 (r319355) +++ stable/11/share/mk/bsd.init.mk Wed May 31 21:15:05 2017 (r319356) @@ -16,6 +16,33 @@ ____: .include .MAIN: all +# Handle INSTALL_AS_USER here to maximize the chance that +# it has final authority over fooOWN and fooGRP. +.if ${MK_INSTALL_AS_USER} != "no" +.if !defined(_uid) +_uid!= id -u +.export _uid +.endif +.if ${_uid} != 0 +.if !defined(USER) +# Avoid exporting USER +.if !defined(_USER) +_USER!= id -un +.export _USER +.endif +USER= ${_USER} +.endif +.if !defined(_gid) +_gid!= id -g +.export _gid +.endif +.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE +$xOWN= ${USER} +$xGRP= ${_gid} +.endfor +.endif +.endif + # Some targets need to know when something may build. This is used to # optimize targets that are only needed when building something, such as # (not) reading in depend files. For DIRDEPS_BUILD, it will only calculate Modified: stable/11/share/mk/bsd.own.mk ============================================================================== --- stable/11/share/mk/bsd.own.mk Wed May 31 21:05:24 2017 (r319355) +++ stable/11/share/mk/bsd.own.mk Wed May 31 21:15:05 2017 (r319356) @@ -135,31 +135,6 @@ CTFCONVERT_CMD= CTFCONVERT_CMD= @: .endif -.if ${MK_INSTALL_AS_USER} != "no" -.if !defined(_uid) -_uid!= id -u -.export _uid -.endif -.if ${_uid} != 0 -.if !defined(USER) -# Avoid exporting USER -.if !defined(_USER) -_USER!= id -un -.export _USER -.endif -USER= ${_USER} -.endif -.if !defined(_gid) -_gid!= id -g -.export _gid -.endif -.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE -$xOWN= ${USER} -$xGRP= ${_gid} -.endfor -.endif -.endif - .endif # !_WITHOUT_SRCCONF # Binaries From owner-svn-src-all@freebsd.org Wed May 31 21:16:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A17F6B94A66; Wed, 31 May 2017 21:16:11 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E91C68A3D; Wed, 31 May 2017 21:16:11 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4VLGAYH048486; Wed, 31 May 2017 21:16:10 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VLGAiP048485; Wed, 31 May 2017 21:16:10 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705312116.v4VLGAiP048485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 31 May 2017 21:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319357 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 21:16:11 -0000 Author: vangyzen Date: Wed May 31 21:16:10 2017 New Revision: 319357 URL: https://svnweb.freebsd.org/changeset/base/319357 Log: MFC r319022 Fix INSTALL_AS_USER with external nsswitch databases The INSTALL_AS_USER option tells "install" to use the current user name as the owner of the installed file. The "install" command executed by the build is statically linked, so it does not load nsswitch modules, such as nss_ldap.so, so it fails when the user is only defined in such a database. Fix it to use the current UID instead of user name. This works for all users. I expect it is also slightly more efficient. Sponsored by: Dell EMC Modified: stable/11/share/mk/bsd.init.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.init.mk ============================================================================== --- stable/11/share/mk/bsd.init.mk Wed May 31 21:15:05 2017 (r319356) +++ stable/11/share/mk/bsd.init.mk Wed May 31 21:16:10 2017 (r319357) @@ -24,20 +24,12 @@ _uid!= id -u .export _uid .endif .if ${_uid} != 0 -.if !defined(USER) -# Avoid exporting USER -.if !defined(_USER) -_USER!= id -un -.export _USER -.endif -USER= ${_USER} -.endif .if !defined(_gid) _gid!= id -g .export _gid .endif .for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE -$xOWN= ${USER} +$xOWN= ${_uid} $xGRP= ${_gid} .endfor .endif From owner-svn-src-all@freebsd.org Wed May 31 21:18:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FA5CB94B3C; Wed, 31 May 2017 21:18:13 +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 1656768C28; Wed, 31 May 2017 21:18:13 +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 v4VLICK4048620; Wed, 31 May 2017 21:18:12 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VLIBQe048612; Wed, 31 May 2017 21:18:11 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201705312118.v4VLIBQe048612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Wed, 31 May 2017 21:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319358 - in head: sbin/mdconfig sbin/mount sys/dev/md sys/fs/cd9660 sys/geom/uzip sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 21:18:13 -0000 Author: stevek Date: Wed May 31 21:18:11 2017 New Revision: 319358 URL: https://svnweb.freebsd.org/changeset/base/319358 Log: Add MD_VERIFY option to enable O_VERIFY in open for vnode type. Add -o [no]verify option to mdconfig (and document in man page.) Implement GEOM attribute MNT::verified to ask md if the backing vnode is verified. Check for MNT::verified in cd9660 mount to flag the mount as MNT_VERIFIED if the underlying device has been verified. Reviewed by: rwatson Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D2902 Modified: head/sbin/mdconfig/mdconfig.8 head/sbin/mdconfig/mdconfig.c head/sbin/mount/mount.c head/sys/dev/md/md.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/geom/uzip/g_uzip.c head/sys/sys/mdioctl.h head/sys/sys/mount.h Modified: head/sbin/mdconfig/mdconfig.8 ============================================================================== --- head/sbin/mdconfig/mdconfig.8 Wed May 31 21:16:10 2017 (r319357) +++ head/sbin/mdconfig/mdconfig.8 Wed May 31 21:18:11 2017 (r319358) @@ -215,6 +215,14 @@ flag to forcibly destroy an disk that is still in use. .It Oo Cm no Oc Ns Cm readonly Enable/disable readonly mode. +.It Oo Cm no Oc Ns Cm verify +For +.Cm vnode +backed devices: enable/disable requesting verification of the +file used for backing store. +The type of verification depends on which security features are available. +One example of verification is testing file integrity with +checksums or cryptographic signatures. .El .It Fl u Ar unit Request a specific unit number or device name for the @@ -298,6 +306,7 @@ gnop create -o 512K md1 mount /dev/md1.nop /mnt .Ed .Sh SEE ALSO +.Xr open 2 , .Xr md 4 , .Xr ffs 7 , .Xr gpart 8 , Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Wed May 31 21:16:10 2017 (r319357) +++ head/sbin/mdconfig/mdconfig.c Wed May 31 21:18:11 2017 (r319358) @@ -193,6 +193,10 @@ main(int argc, char **argv) mdio.md_options |= MD_RESERVE; else if (!strcmp(optarg, "noreserve")) mdio.md_options &= ~MD_RESERVE; + else if (!strcmp(optarg, "verify")) + mdio.md_options |= MD_VERIFY; + else if (!strcmp(optarg, "noverify")) + mdio.md_options &= ~MD_VERIFY; else errx(1, "unknown option: %s", optarg); break; Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Wed May 31 21:16:10 2017 (r319357) +++ head/sbin/mount/mount.c Wed May 31 21:18:11 2017 (r319358) @@ -115,6 +115,7 @@ static struct opt { { MNT_NFS4ACLS, "nfsv4acls" }, { MNT_GJOURNAL, "gjournal" }, { MNT_AUTOMOUNTED, "automounted" }, + { MNT_VERIFIED, "verified" }, { 0, NULL } }; Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Wed May 31 21:16:10 2017 (r319357) +++ head/sys/dev/md/md.c Wed May 31 21:18:11 2017 (r319358) @@ -88,6 +88,7 @@ #include #include #include +#include #include #include @@ -949,6 +950,8 @@ unmapped_step: sc->cred); VOP_UNLOCK(vp, 0); vn_finished_write(mp); + if (error == 0) + sc->flags &= ~MD_VERIFY; } if (pb != NULL) { @@ -1143,6 +1146,8 @@ md_kthread(void *arg) } mtx_unlock(&sc->queue_mtx); if (bp->bio_cmd == BIO_GETATTR) { + int isv = ((sc->flags & MD_VERIFY) != 0); + if ((sc->fwsectors && sc->fwheads && (g_handleattr_int(bp, "GEOM::fwsectors", sc->fwsectors) || @@ -1150,6 +1155,8 @@ md_kthread(void *arg) sc->fwheads))) || g_handleattr_int(bp, "GEOM::candelete", 1)) error = -1; + else if (g_handleattr_int(bp, "MNT::verified", isv)) + error = -1; else error = EOPNOTSUPP; } else { @@ -1352,7 +1359,8 @@ mdcreate_vnode(struct md_s *sc, struct md_ioctl *mdio, * If the user specified that this is a read only device, don't * set the FWRITE mask before trying to open the backing store. */ - flags = FREAD | ((mdio->md_options & MD_READONLY) ? 0 : FWRITE); + flags = FREAD | ((mdio->md_options & MD_READONLY) ? 0 : FWRITE) \ + | ((mdio->md_options & MD_VERIFY) ? 0 : O_VERIFY); NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->file, td); error = vn_open(&nd, &flags, 0, NULL); if (error != 0) @@ -1380,7 +1388,7 @@ mdcreate_vnode(struct md_s *sc, struct md_ioctl *mdio, sc->fwsectors = mdio->md_fwsectors; if (mdio->md_fwheads != 0) sc->fwheads = mdio->md_fwheads; - sc->flags = mdio->md_options & (MD_FORCE | MD_ASYNC); + sc->flags = mdio->md_options & (MD_FORCE | MD_ASYNC | MD_VERIFY); if (!(flags & FWRITE)) sc->flags |= MD_READONLY; sc->vnode = nd.ni_vp; @@ -1523,6 +1531,8 @@ mdcreate_swap(struct md_s *sc, struct md_ioctl *mdio, * Note the truncation. */ + if ((mdio->md_options & MD_VERIFY) != 0) + return (EINVAL); npage = mdio->md_mediasize / PAGE_SIZE; if (mdio->md_fwsectors != 0) sc->fwsectors = mdio->md_fwsectors; Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Wed May 31 21:16:10 2017 (r319357) +++ head/sys/fs/cd9660/cd9660_vfsops.c Wed May 31 21:18:11 2017 (r319358) @@ -215,6 +215,7 @@ iso_mountfs(devvp, mp) int iso_bsize; int iso_blknum; int joliet_level; + int isverified = 0; struct iso_volume_descriptor *vdp = NULL; struct iso_primary_descriptor *pri = NULL; struct iso_sierra_primary_descriptor *pri_sierra = NULL; @@ -229,6 +230,8 @@ iso_mountfs(devvp, mp) dev_ref(dev); g_topology_lock(); error = g_vfs_open(devvp, &cp, "cd9660", 0); + if (error == 0) + g_getattr("MNT::verified", cp, &isverified); g_topology_unlock(); VOP_UNLOCK(devvp, 0); if (error) @@ -377,6 +380,8 @@ iso_mountfs(devvp, mp) mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; mp->mnt_maxsymlinklen = 0; MNT_ILOCK(mp); + if (isverified) + mp->mnt_flag |= MNT_VERIFIED; mp->mnt_flag |= MNT_LOCAL; mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED; MNT_IUNLOCK(mp); Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Wed May 31 21:16:10 2017 (r319357) +++ head/sys/geom/uzip/g_uzip.c Wed May 31 21:18:11 2017 (r319358) @@ -464,6 +464,27 @@ g_uzip_start(struct bio *bp) sc = gp->softc; sc->req_total++; + if (bp->bio_cmd == BIO_GETATTR) { + struct bio *bp2; + struct g_consumer *cp; + struct g_geom *gp; + struct g_provider *pp; + + /* pass on MNT:* requests and ignore others */ + if (strncmp(bp->bio_attribute, "MNT:", 4) == 0) { + bp2 = g_clone_bio(bp); + if (bp2 == NULL) { + g_io_deliver(bp, ENOMEM); + return; + } + bp2->bio_done = g_std_done; + pp = bp->bio_to; + gp = pp->geom; + cp = LIST_FIRST(&gp->consumer); + g_io_request(bp2, cp); + return; + } + } if (bp->bio_cmd != BIO_READ) { g_io_deliver(bp, EOPNOTSUPP); return; Modified: head/sys/sys/mdioctl.h ============================================================================== --- head/sys/sys/mdioctl.h Wed May 31 21:16:10 2017 (r319357) +++ head/sys/sys/mdioctl.h Wed May 31 21:18:11 2017 (r319358) @@ -88,5 +88,6 @@ struct md_ioctl { #define MD_COMPRESS 0x10 /* Compression mode */ #define MD_FORCE 0x20 /* Don't try to prevent foot-shooting */ #define MD_ASYNC 0x40 /* Asynchronous mode */ +#define MD_VERIFY 0x80 /* Open file with O_VERIFY (vnode only) */ #endif /* _SYS_MDIOCTL_H_*/ Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Wed May 31 21:16:10 2017 (r319357) +++ head/sys/sys/mount.h Wed May 31 21:18:11 2017 (r319358) @@ -314,6 +314,7 @@ void __mnt_vnode_markerfree_active(struct vno #define MNT_ROOTFS 0x0000000000004000ULL /* identifies the root fs */ #define MNT_USER 0x0000000000008000ULL /* mounted by a user */ #define MNT_IGNORE 0x0000000000800000ULL /* do not show entry in df */ +#define MNT_VERIFIED 0x0000000400000000ULL /* filesystem is verified */ /* * Mask of flags that are visible to statfs(). @@ -329,7 +330,7 @@ void __mnt_vnode_markerfree_active(struct vno MNT_NOCLUSTERW | MNT_SUIDDIR | MNT_SOFTDEP | \ MNT_IGNORE | MNT_EXPUBLIC | MNT_NOSYMFOLLOW | \ MNT_GJOURNAL | MNT_MULTILABEL | MNT_ACLS | \ - MNT_NFS4ACLS | MNT_AUTOMOUNTED) + MNT_NFS4ACLS | MNT_AUTOMOUNTED | MNT_VERIFIED) /* Mask of flags that can be updated. */ #define MNT_UPDATEMASK (MNT_NOSUID | MNT_NOEXEC | \ From owner-svn-src-all@freebsd.org Wed May 31 21:19:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66204B94BB0; Wed, 31 May 2017 21:19:22 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3597568DA1; Wed, 31 May 2017 21:19:22 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4VLJLsG048716; Wed, 31 May 2017 21:19:21 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VLJLQe048715; Wed, 31 May 2017 21:19:21 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705312119.v4VLJLQe048715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 31 May 2017 21:19:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319359 - stable/11/contrib/dma X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 21:19:22 -0000 Author: vangyzen Date: Wed May 31 21:19:21 2017 New Revision: 319359 URL: https://svnweb.freebsd.org/changeset/base/319359 Log: MFC r318585 dma.8: use the correct name for 'SECURETRANSFER' The code uses 'SECURETRANS', but the config file uses 'SECURETRANSFER'. Modified: stable/11/contrib/dma/dma.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/dma/dma.8 ============================================================================== --- stable/11/contrib/dma/dma.8 Wed May 31 21:18:11 2017 (r319358) +++ stable/11/contrib/dma/dma.8 Wed May 31 21:19:21 2017 (r319359) @@ -30,7 +30,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 13, 2014 +.Dd May 20, 2017 .Dt DMA 8 .Os .Sh NAME @@ -213,7 +213,7 @@ Just stick with the default. Path to the .Sq auth.conf file. -.It Ic SECURETRANS Xo +.It Ic SECURETRANSFER Xo (boolean, default=commented) .Xc Uncomment if you want TLS/SSL secured transfer. @@ -222,7 +222,7 @@ Uncomment if you want TLS/SSL secured transfer. .Xc Uncomment if you want to use STARTTLS. Only useful together with -.Sq SECURETRANS . +.Sq SECURETRANSFER . .It Ic OPPORTUNISTIC_TLS Xo (boolean, default=commented) .Xc @@ -234,7 +234,7 @@ the outside mail exchangers; in opportunistic TLS mode be encrypted if the remote server supports STARTTLS, but an unencrypted delivery will still be made if the negotiation fails. Only useful together with -.Sq SECURETRANS +.Sq SECURETRANSFER and .Sq STARTTLS . .It Ic CERTFILE Xo From owner-svn-src-all@freebsd.org Wed May 31 21:20:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 573A0B94D55; Wed, 31 May 2017 21:20:43 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26EE068F34; Wed, 31 May 2017 21:20:43 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4VLKgnh048844; Wed, 31 May 2017 21:20:42 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VLKgsO048843; Wed, 31 May 2017 21:20:42 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705312120.v4VLKgsO048843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 31 May 2017 21:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319360 - stable/11/contrib/dma X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 21:20:43 -0000 Author: vangyzen Date: Wed May 31 21:20:42 2017 New Revision: 319360 URL: https://svnweb.freebsd.org/changeset/base/319360 Log: MFC r318586 dma.8: fix problems reported by igor and 'mandoc -Tlint' dma.8:77:contraction:Queue the mail, but [don't] attempt to deliver it. dma.8:85:repeated:s [are are] ignored. dma.8:87:contraction:[Don't] run in the background. dma.8:201:contraction:Use the catch-all alias only if you [don't] want any local mail to be mandoc: dma.8:308:5: WARNING: macro neither callable nor escaped: Sm Modified: stable/11/contrib/dma/dma.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/dma/dma.8 ============================================================================== --- stable/11/contrib/dma/dma.8 Wed May 31 21:19:21 2017 (r319359) +++ stable/11/contrib/dma/dma.8 Wed May 31 21:20:42 2017 (r319360) @@ -74,7 +74,7 @@ acts as a compatibility option for sendmail. .It Fl bp List all mails currently stored in the mail queue. .It Fl bq -Queue the mail, but don't attempt to deliver it. +Queue the mail, but do not attempt to deliver it. See also the .Sq DEFER config file setting below. @@ -82,9 +82,9 @@ config file setting below. .Pp All other .Ar mode Ns -s are are ignored. +s are ignored. .It Fl D -Don't run in the background. +Do not run in the background. Useful for debugging. .It Fl f Ar sender Set sender address (envelope-from) to @@ -198,7 +198,7 @@ The special name .Ql * can be used to create a catch-all alias, which gets used if no other matching alias is found. -Use the catch-all alias only if you don't want any local mail to be +Use the catch-all alias only if you do not want any local mail to be delivered. .It Ic SPOOLDIR Xo (string, default=/var/spool/dma) @@ -305,7 +305,8 @@ will send all mails as setting it to .Ql percolator will send all mails as -.Ql Sm off Va username @percolator . +.Sm off +.Ql Va username @percolator . .Sm on .It Ic NULLCLIENT Xo .Xc From owner-svn-src-all@freebsd.org Wed May 31 21:31:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2C96B950C7; Wed, 31 May 2017 21:31:16 +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 91A6A6A8D9; Wed, 31 May 2017 21:31:16 +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 v4VLVFsv054266; Wed, 31 May 2017 21:31:15 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VLVFnb054265; Wed, 31 May 2017 21:31:15 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201705312131.v4VLVFnb054265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Wed, 31 May 2017 21:31:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319361 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 21:31:16 -0000 Author: stevek Date: Wed May 31 21:31:15 2017 New Revision: 319361 URL: https://svnweb.freebsd.org/changeset/base/319361 Log: parse.c parse_string When parse_semi fails, free s before returning parse.c parse_numeric_aggregate The memory assigned to bufp is complicated, it can either be from the input parameter buf or allocated locally. Introduce a new variable lbufp to track when it is assigned locally and to free it when appropriate. Submitted by: Thomas Rix Reviewed by: jhb Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9899 Modified: head/sbin/dhclient/parse.c Modified: head/sbin/dhclient/parse.c ============================================================================== --- head/sbin/dhclient/parse.c Wed May 31 21:20:42 2017 (r319360) +++ head/sbin/dhclient/parse.c Wed May 31 21:31:15 2017 (r319361) @@ -131,8 +131,10 @@ parse_string(FILE *cfile) error("no memory for string %s.", val); memcpy(s, val, valsize); - if (!parse_semi(cfile)) + if (!parse_semi(cfile)) { + free(s); return (NULL); + } return (s); } @@ -246,9 +248,10 @@ parse_numeric_aggregate(FILE *cfile, unsigned char *bu char *val, *t; size_t valsize; pair c = NULL; + unsigned char *lbufp = NULL; if (!bufp && *max) { - bufp = malloc(*max * size / 8); + lbufp = bufp = malloc(*max * size / 8); if (!bufp) error("can't allocate space for numeric aggregate"); } else @@ -265,6 +268,7 @@ parse_numeric_aggregate(FILE *cfile, unsigned char *bu parse_warn("too few numbers."); if (token != SEMI) skip_to_semi(cfile); + free(lbufp); return (NULL); } token = next_token(&val, cfile); @@ -281,6 +285,7 @@ parse_numeric_aggregate(FILE *cfile, unsigned char *bu (base != 16 || token != NUMBER_OR_NAME)) { parse_warn("expecting numeric value."); skip_to_semi(cfile); + free(lbufp); return (NULL); } /* @@ -302,6 +307,7 @@ parse_numeric_aggregate(FILE *cfile, unsigned char *bu /* If we had to cons up a list, convert it now. */ if (c) { + free(lbufp); bufp = malloc(count * size / 8); if (!bufp) error("can't allocate space for numeric aggregate."); From owner-svn-src-all@freebsd.org Wed May 31 21:54:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF16BB9562C; Wed, 31 May 2017 21:54:22 +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 930686E2A6; Wed, 31 May 2017 21:54:22 +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 v4VLsL05064825; Wed, 31 May 2017 21:54:21 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VLsLQo064823; Wed, 31 May 2017 21:54:21 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705312154.v4VLsLQo064823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 31 May 2017 21:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319362 - in stable/11/usr.bin/compress: . tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 21:54:23 -0000 Author: jilles Date: Wed May 31 21:54:21 2017 New Revision: 319362 URL: https://svnweb.freebsd.org/changeset/base/319362 Log: MFC r318592: compress: Allow uncompress -c with multiple pathnames, as required by POSIX. Per POSIX, allow passing multiple pathnames to uncompress -c, concatenating the uncompressed data. Passing multiple pathnames to compress -c remains disallowed, since the result cannot be decompressed. PR: 219387 Modified: stable/11/usr.bin/compress/compress.c stable/11/usr.bin/compress/tests/compress_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/compress/compress.c ============================================================================== --- stable/11/usr.bin/compress/compress.c Wed May 31 21:31:15 2017 (r319361) +++ stable/11/usr.bin/compress/compress.c Wed May 31 21:54:21 2017 (r319362) @@ -129,7 +129,7 @@ main(int argc, char *argv[]) exit (eval); } - if (cat == 1 && argc > 1) + if (cat == 1 && style == COMPRESS && argc > 1) errx(1, "the -c option permits only a single file argument"); for (; *argv; ++argv) Modified: stable/11/usr.bin/compress/tests/compress_test.sh ============================================================================== --- stable/11/usr.bin/compress/tests/compress_test.sh Wed May 31 21:31:15 2017 (r319361) +++ stable/11/usr.bin/compress/tests/compress_test.sh Wed May 31 21:54:21 2017 (r319362) @@ -161,6 +161,27 @@ compress_uncompress_file_2_body() atf_check cmp file2 expectfile2 } +atf_test_case compress_uncompress_file_minusc_1 +compress_uncompress_file_minusc_1_head() +{ + atf_set "descr" \ + "Test compressing and uncompressing some data, passing two filenames to uncompress -c" +} +compress_uncompress_file_minusc_1_body() +{ + printf '%01000d\n' 7 8 >expectfile1 + printf '%01000d\n' 8 7 >expectfile2 + cp expectfile1 file1 + cp expectfile2 file2 + atf_check compress file1 file2 + atf_check -s exit:1 cmp -s file1.Z expectfile1 + atf_check -s exit:1 cmp -s file2.Z expectfile2 + atf_check -s exit:1 cmp -s file1.Z file2.Z + atf_check -x 'uncompress -c file1.Z file2.Z >all' + atf_check -x 'cat expectfile1 expectfile2 >expectall' + atf_check cmp all expectall +} + atf_init_test_cases() { atf_add_test_case uncompress_file_1 @@ -171,4 +192,5 @@ atf_init_test_cases() atf_add_test_case compress_uncompress_minusc_1 atf_add_test_case compress_uncompress_file_1 atf_add_test_case compress_uncompress_file_2 + atf_add_test_case compress_uncompress_file_minusc_1 } From owner-svn-src-all@freebsd.org Wed May 31 22:01:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6BF8B95A60; Wed, 31 May 2017 22:01:35 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c: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 367716E75A; Wed, 31 May 2017 22:01:35 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id b84so135654790wmh.0; Wed, 31 May 2017 15:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=laV6EJtAv+mctmxM60ZrG9If9yPiv7Ps52D/8y6XvDE=; b=NQnL5MceklY9rV5pzG9pUeLCqhnIsW3R+4lcBpOwJWgYSx8zJSwZDb88B5crStNVE5 KytGJOIOs6sz0RFnh0xfmZtY/LzoyBJWxDsbX+cAEptPKP81n7bBpKkUsPyOILE2XmFi s9Uv8QPMrDxBmcLPicKMt4aeVL57Jo7lH8Uoy1xK1q/D5w0R1X5/kgB+M3qU59w3zw5w HFS4+zJtwNGIROOyIZ6hGm+Wr8QDles6mTYo/W75stBxY5cWV8CfGsqFoMS9IwbFcKEK zHLZ0MdOoBy+ioiw8IeTqXNPInPyF1f8mMxsALR+oVUXCX0JcDsOvDuHSMnhXWtVgIzm PgRw== 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=laV6EJtAv+mctmxM60ZrG9If9yPiv7Ps52D/8y6XvDE=; b=Elo44NW0fuhFksoq1f9hAhk5Kpup10z6lknpUkRP9rUCsBrjaBhGHD3TvmFxQYkjUV lzs//e5NF9cQHi7ljv4nsNxki0P0ffivhwbaOdnUvIo5n8sY/JwO8e6tvSZ3+a8fZyfr xzKPUR4xoH+akxt9f4O3IHPqnP8Js0DrKoxt4h25otlUt0ebBKKZUU2R0r+b0Zjhwg1I YCnHtXtCTTprU8A/x5D16l2nUg9JPMWD8aXvYUyD4BUAXE45OHIj8ezknC/nH1YKk3LT SFPqt6rBi/eofDag03GVoHRUfkDmEXGlm8jPkS+LlXUNR1j15I6PsgMFGEPk+7ZeaP0L pQMA== X-Gm-Message-State: AODbwcDnkHqyqzdySXhoq8QNifa+kP78NczibVR3b5G/0L+UT+kV2VLe yC2Q9oxWdnZU+ZVU X-Received: by 10.28.29.6 with SMTP id d6mr7276590wmd.71.1496268093625; Wed, 31 May 2017 15:01:33 -0700 (PDT) Received: from brick (cpc92310-cmbg19-2-0-cust934.5-4.cable.virginm.net. [82.9.227.167]) by smtp.gmail.com with ESMTPSA id x37sm31109185wrb.42.2017.05.31.15.01.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2017 15:01:33 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Wed, 31 May 2017 22:33:47 +0100 From: Edward Tomasz Napierala To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r319075 - head/usr.bin/rctl Message-ID: <20170531213347.GA3597@brick> Mail-Followup-To: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705281713.v4SHDdqx004022@repo.freebsd.org> <201705290301.v4T31xQk020240@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705290301.v4T31xQk020240@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 22:01:35 -0000 On 0528T2001, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: trasz > > Date: Sun May 28 17:13:38 2017 > > New Revision: 319075 > > URL: https://svnweb.freebsd.org/changeset/base/319075 > > > > Log: > > Random tweaks to rctl(8). > > Please try to be descriptive of what it is your tweaking, > think about having to come back in 10 years and read the > svn log trying to find some change and seeing this in > the log not knowing if that is the tweak your looking > for or not. Thanks. You're right; I'll try to be less sloppy next time. From owner-svn-src-all@freebsd.org Wed May 31 22:40:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C9A5BD3084; Wed, 31 May 2017 22:40:27 +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 EBC796F5B5; Wed, 31 May 2017 22:40:26 +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 v4VMeQgR081349; Wed, 31 May 2017 22:40:26 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VMeOpe081333; Wed, 31 May 2017 22:40:24 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705312240.v4VMeOpe081333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 31 May 2017 22:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319363 - in vendor-sys/acpica/dist: generate/unix generate/unix/acpiexec generate/unix/iasl source/common source/compiler source/compiler/parsers source/compiler/preprocessor source/co... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 22:40:27 -0000 Author: jkim Date: Wed May 31 22:40:24 2017 New Revision: 319363 URL: https://svnweb.freebsd.org/changeset/base/319363 Log: Import ACPICA 20170531. Added: vendor-sys/acpica/dist/source/common/dmswitch.c (contents, props changed) vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c (contents, props changed) vendor-sys/acpica/dist/source/components/utilities/utresdecode.c (contents, props changed) vendor-sys/acpica/dist/source/tools/acpiexec/aeexception.c (contents, props changed) vendor-sys/acpica/dist/tests/misc/converterSample.asl Deleted: vendor-sys/acpica/dist/source/compiler/parsers/ vendor-sys/acpica/dist/source/compiler/preprocessor/ Modified: vendor-sys/acpica/dist/generate/unix/Makefile.common vendor-sys/acpica/dist/generate/unix/Makefile.config vendor-sys/acpica/dist/generate/unix/Makefile.rules vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/acfileio.c vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahids.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/ahtable.c vendor-sys/acpica/dist/source/common/ahuuids.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/compiler/aslascii.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslexternal.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelp.c vendor-sys/acpica/dist/source/compiler/aslhelpers.y vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/asloffset.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslparser.y vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslresources.y vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/asltokens.y vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.y vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/cvcompiler.c vendor-sys/acpica/dist/source/compiler/cvdisasm.c vendor-sys/acpica/dist/source/compiler/cvparser.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dttable1.c vendor-sys/acpica/dist/source/compiler/dttable2.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbobject.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dsargs.c vendor-sys/acpica/dist/source/components/dispatcher/dsdebug.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exresolv.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsnames.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/resources/rscalc.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c vendor-sys/acpica/dist/source/components/resources/rsinfo.c vendor-sys/acpica/dist/source/components/resources/rsmisc.c vendor-sys/acpica/dist/source/components/resources/rsserial.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/utilities/utdecode.c vendor-sys/acpica/dist/source/components/utilities/utownerid.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utxfmutex.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acopcode.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/acresrc.h vendor-sys/acpica/dist/source/include/acrestyp.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/acuuid.h vendor-sys/acpica/dist/source/include/amlcode.h vendor-sys/acpica/dist/source/include/amlresrc.h vendor-sys/acpica/dist/source/include/platform/acgcc.h vendor-sys/acpica/dist/source/include/platform/acintel.h vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/generate/unix/Makefile.common ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.common Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/generate/unix/Makefile.common Wed May 31 22:40:24 2017 (r319363) @@ -7,22 +7,36 @@ $(PROGS): FORCE @cd $(BUILD_DIRECTORY_PATH)/$@; \ mkdir -p obj; \ $(MAKE) || exit "$$?"; \ - ls -al ../bin/$@; \ echo ""; # +# List just shows the status of each tool +# +status: FORCE + @for toolname in $(PROGS); do \ + (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \ + pwd; \ + if [ -d "obj" ] ; then \ + echo " `ls -1 obj | wc -l` files, `stat -c%s obj/$$toolname` bytes"; \ + else \ + echo " Clean"; \ + fi; \ + ); \ + done; + +# # Simple clean removes all .obj files, but leaves the executables # in the local bin directory # clean: FORCE @for toolname in $(PROGS); do \ (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \ + pwd; \ if [ -d "obj" ] ; then \ - echo "Removing $$toolname:"; \ - pwd; \ - $(MAKE) clean; \ - rmdir obj; \ - echo ""; \ + echo " Removing `ls -1 obj | wc -l` files"; \ + rm -r obj; \ + else \ + echo " Clean"; \ fi; \ ); \ done; @@ -53,7 +67,11 @@ install: FORCE @for toolname in $(PROGS); do \ (cd $(BUILD_DIRECTORY_PATH)/$$toolname; \ pwd; \ - $(MAKE) PROG=$$toolname install; \ + if [ -d "obj" ] ; then \ + $(MAKE) PROG=$$toolname install; \ + else \ + echo " Clean"; \ + fi; \ ); \ done; Modified: vendor-sys/acpica/dist/generate/unix/Makefile.config ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.config Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/generate/unix/Makefile.config Wed May 31 22:40:24 2017 (r319363) @@ -89,7 +89,7 @@ INSTALLPROG = \ RENAMEPROG = \ @if [ -e "$(PROG).exe" ] ; then \ mv $(PROG).exe $(PROG); \ - echo "Renamed $(PROG).exe to $(PROG)"; \ + echo "- Rename $(PROG).exe to $(PROG)"; \ fi; # @@ -98,7 +98,7 @@ RENAMEPROG = \ COPYPROG = \ @mkdir -p ../$(BINDIR); \ cp -f $(PROG) ../$(BINDIR); \ - echo "Copied $(PROG) to $(FINAL_PROG)"; + echo "- Copy $(PROG) to $(FINAL_PROG)"; # # Main ACPICA source directories Modified: vendor-sys/acpica/dist/generate/unix/Makefile.rules ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.rules Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/generate/unix/Makefile.rules Wed May 31 22:40:24 2017 (r319363) @@ -11,14 +11,16 @@ $(FINAL_PROG) : $(PROG) $(COPYPROG) $(PROG) : $(INTERMEDIATES) $(MISC) $(OBJECTS) - $(LINKPROG) + @echo "- Link" $(PROG) + @$(LINKPROG) $(RENAMEPROG) $(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS) - $(COMPILEOBJ) + @echo $(PROG) $< + @$(COMPILEOBJ) clean : - rm -f $(PROG) $(PROG).exe $(OBJECTS) $(OBJDIR)/*.o $(INTERMEDIATES) $(MISC) + @rm -f $(PROG) $(PROG).exe $(OBJECTS) $(OBJDIR)/*.o $(INTERMEDIATES) $(MISC) install : $(INSTALLPROG) Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Wed May 31 22:40:24 2017 (r319363) @@ -42,6 +42,7 @@ OBJECTS = \ $(OBJDIR)/acgetline.o\ $(OBJDIR)/acfileio.o\ $(OBJDIR)/aeexec.o\ + $(OBJDIR)/aeexception.o\ $(OBJDIR)/aehandlers.o\ $(OBJDIR)/aeinitfile.o\ $(OBJDIR)/aemain.o\ @@ -224,6 +225,7 @@ OBJECTS = \ $(OBJDIR)/utownerid.o\ $(OBJDIR)/utnonansi.o\ $(OBJDIR)/utpredef.o\ + $(OBJDIR)/utresdecode.o\ $(OBJDIR)/utresrc.o\ $(OBJDIR)/utstate.o\ $(OBJDIR)/utstring.o\ Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Wed May 31 22:40:24 2017 (r319363) @@ -121,6 +121,7 @@ OBJECTS = \ $(OBJDIR)/dmresrcl2.o\ $(OBJDIR)/dmresrcs.o\ $(OBJDIR)/dmrestag.o\ + $(OBJDIR)/dmswitch.o\ $(OBJDIR)/dmtable.o\ $(OBJDIR)/dmtables.o\ $(OBJDIR)/dmtbdump.o\ @@ -224,6 +225,7 @@ OBJECTS = \ $(OBJDIR)/utobject.o\ $(OBJDIR)/utownerid.o\ $(OBJDIR)/utpredef.o\ + $(OBJDIR)/utresdecode.o\ $(OBJDIR)/utresrc.o\ $(OBJDIR)/utstate.o\ $(OBJDIR)/utstrtoul64.o\ @@ -277,13 +279,15 @@ CFLAGS += \ include ../Makefile.rules # -# Function to safely execute yacc +# Function to safely execute yacc: +# Generate the output files to a temporary directory, +# move the file to $(OBJDIR), and discard the directory. # safe_yacc = \ _d=`mktemp -d $(OBJDIR)/$(1).XXXXXX` &&\ cd $$_d &&\ $(YACC) $(YFLAGS) -v -d -p$(1) $(abspath $(2)) &&\ - cd - &&\ + cd - > /dev/null;\ mv $$_d/y.tab$(suffix $(3)) $(3);\ _r=$$?;\ rm -fr $$_d;\ @@ -293,28 +297,35 @@ safe_yacc = \ # Macro processing for iASL .y files # $(OBJDIR)/aslcompiler.y : $(ASL_PARSER) - $(MACROPROC) $(MFLAGS) $(ASL_COMPILER)/aslparser.y > $@ + @echo "- " $(MACROPROC) " Preprocess main iASL parser" + @$(MACROPROC) $(MFLAGS) $(ASL_COMPILER)/aslparser.y > $@ # # Parser and Lexer - intermediate C files # $(OBJDIR)/aslcompilerlex.c : $(ASL_LEXER) - $(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l + @echo "- " $(LEX) " "$< + @$(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l $(OBJDIR)/aslcompilerparse.c $(OBJDIR)/aslcompiler.y.h : $(OBJDIR)/aslcompiler.y - $(call safe_yacc,AslCompiler,$<,$@) + @echo "- " $(YACC) " "$< + @$(call safe_yacc,AslCompiler,$<,$@) $(OBJDIR)/dtparserlex.c : $(ASL_COMPILER)/dtparser.l $(OBJDIR)/dtparser.y.h - $(LEX) $(LFLAGS) -PDtParser -o$@ $< + @echo "- " $(LEX) " "$< + @$(LEX) $(LFLAGS) -PDtParser -o$@ $< $(OBJDIR)/dtparserparse.c $(OBJDIR)/dtparser.y.h : $(ASL_COMPILER)/dtparser.y - $(call safe_yacc,DtParser,$<,$@) + @echo "- " $(YACC) " "$< + @$(call safe_yacc,DtParser,$<,$@) $(OBJDIR)/prparserlex.c : $(ASL_COMPILER)/prparser.l $(OBJDIR)/prparser.y.h - $(LEX) $(LFLAGS) -PPrParser -o$@ $< + @echo "- " $(LEX) " "$< + @$(LEX) $(LFLAGS) -PPrParser -o$@ $< $(OBJDIR)/prparserparse.c $(OBJDIR)/prparser.y.h : $(ASL_COMPILER)/prparser.y - $(call safe_yacc,PrParser,$<,$@) + @echo "- " $(YACC) " "$< + @$(call safe_yacc,PrParser,$<,$@) # # Parsers and Lexers - final object files @@ -323,19 +334,25 @@ $(OBJDIR)/prparserparse.c $(OBJDIR)/prparser.y.h : # by the utilities above and they are not necessarily ANSI C, etc. # $(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< + @echo "- " "Intermediate" $< + @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< + @echo "- " "Intermediate" $< + @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< + @echo "- " "Intermediate" $< + @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< + @echo "- " "Intermediate" $< + @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< + @echo "- " "Intermediate" $< + @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/prparserparse.o : $(OBJDIR)/prparserparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< + @echo "- " "Intermediate" $< + @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< Modified: vendor-sys/acpica/dist/source/common/acfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acfileio.c Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/source/common/acfileio.c Wed May 31 22:40:24 2017 (r319363) @@ -531,8 +531,6 @@ AcValidateTableHeader ( if (!AcpiUtValidNameseg (TableHeader.Signature)) { - fprintf (stderr, "Invalid table signature: 0x%8.8X\n", - *ACPI_CAST_PTR (UINT32, TableHeader.Signature)); return (AE_BAD_SIGNATURE); } Modified: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/source/common/adfile.c Wed May 31 22:40:24 2017 (r319363) @@ -316,11 +316,6 @@ FlGenerateFilename ( */ NewFilename = UtStringCacheCalloc ((ACPI_SIZE) strlen (InputFilename) + strlen (Suffix) + 2); - if (!NewFilename) - { - return (NULL); - } - strcpy (NewFilename, InputFilename); /* Try to find the last dot in the filename */ @@ -364,11 +359,6 @@ FlStrdup ( NewString = UtStringCacheCalloc ((ACPI_SIZE) strlen (String) + 1); - if (!NewString) - { - return (NULL); - } - strcpy (NewString, String); return (NewString); } Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/source/common/adisasm.c Wed May 31 22:40:24 2017 (r319363) @@ -537,7 +537,7 @@ AdDisassembleOneTable ( * the entire tree with the new information (namely, the * number of arguments per method) */ - if (AcpiDmGetExternalMethodCount ()) + if (AcpiDmGetUnresolvedExternalMethodCount ()) { Status = AdReparseOneTable (Table, File, OwnerId); if (ACPI_FAILURE (Status)) @@ -553,7 +553,7 @@ AdDisassembleOneTable ( * 1) Convert fixed-offset references to resource descriptors * to symbolic references (Note: modifies namespace) */ - AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode); + AcpiDmConvertParseObjects (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode); /* Optional displays */ @@ -616,7 +616,7 @@ AdReparseOneTable ( fprintf (stderr, "\nFound %u external control methods, " "reparsing with new information\n", - AcpiDmGetExternalMethodCount ()); + AcpiDmGetUnresolvedExternalMethodCount ()); /* Reparse, rebuild namespace */ @@ -642,7 +642,7 @@ AdReparseOneTable ( /* New namespace, add the external definitions first */ - AcpiDmAddExternalsToNamespace (); + AcpiDmAddExternalListToNamespace (); /* For -ca option: clear the list of comment addresses. */ Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/source/common/adwalk.c Wed May 31 22:40:24 2017 (r319363) @@ -208,11 +208,16 @@ AcpiDmInspectPossibleArgs ( ACPI_PARSE_OBJECT *Op); static ACPI_STATUS -AcpiDmResourceDescendingOp ( +AcpiDmCommonDescendingOp ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context); +static ACPI_STATUS +AcpiDmProcessResourceDescriptors ( + ACPI_PARSE_OBJECT *Op, + UINT32 Level, + void *Context); /******************************************************************************* * @@ -395,21 +400,21 @@ AcpiDmCrossReferenceNamespace ( /******************************************************************************* * - * FUNCTION: AcpiDmConvertResourceIndexes + * FUNCTION: AcpiDmConvertParseObjects * * PARAMETERS: ParseTreeRoot - Root of the parse tree * NamespaceRoot - Root of the internal namespace * * RETURN: None * - * DESCRIPTION: Convert fixed-offset references to resource descriptors to - * symbolic references. Should only be called after namespace has - * been cross referenced. + * DESCRIPTION: Begin parse tree walk to perform conversions needed for + * disassembly. These include resource descriptors and switch/case + * operations. * ******************************************************************************/ void -AcpiDmConvertResourceIndexes ( +AcpiDmConvertParseObjects ( ACPI_PARSE_OBJECT *ParseTreeRoot, ACPI_NAMESPACE_NODE *NamespaceRoot) { @@ -443,9 +448,14 @@ AcpiDmConvertResourceIndexes ( Info.Level = 0; Info.WalkState = WalkState; - AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmResourceDescendingOp, + AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmCommonDescendingOp, AcpiDmCommonAscendingOp, &Info); ACPI_FREE (WalkState); + + if (AcpiGbl_TempListHead) { + AcpiDmClearTempList(); + } + return; } @@ -737,7 +747,6 @@ AcpiDmLoadDescendingOp ( WalkState = Info->WalkState; OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); /* Only interested in operators that create new names */ @@ -754,7 +763,7 @@ AcpiDmLoadDescendingOp ( { /* For all named operators, get the new name */ - Path = (char *) Op->Named.Path; + Path = Op->Named.Path; if (!Path && Op->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP) { @@ -875,7 +884,6 @@ AcpiDmXrefDescendingOp ( WalkState = Info->WalkState; OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); if ((!(OpInfo->Flags & AML_NAMED)) && @@ -885,26 +893,7 @@ AcpiDmXrefDescendingOp ( { goto Exit; } - else if (Op->Common.Parent && - Op->Common.Parent->Common.AmlOpcode == AML_EXTERNAL_OP) - { - /* External() NamePath */ - Path = Op->Common.Value.String; - ObjectType = (ACPI_OBJECT_TYPE) Op->Common.Next->Common.Value.Integer; - if (ObjectType == ACPI_TYPE_METHOD) - { - ParamCount = (UINT32) - Op->Common.Next->Common.Next->Common.Value.Integer; - } - - Flags |= ACPI_EXT_RESOLVED_REFERENCE | ACPI_EXT_ORIGIN_FROM_OPCODE; - AcpiDmAddOpToExternalList (Op, Path, - (UINT8) ObjectType, ParamCount, Flags); - - goto Exit; - } - /* Get the NamePath from the appropriate place */ if (OpInfo->Flags & AML_NAMED) @@ -924,9 +913,10 @@ AcpiDmXrefDescendingOp ( Path = NextOp->Common.Value.String; } } - else if (Op->Common.AmlOpcode == AML_SCOPE_OP) + else if (Op->Common.AmlOpcode == AML_SCOPE_OP || + Op->Common.AmlOpcode == AML_EXTERNAL_OP) { - Path = (char *) Op->Named.Path; + Path = Op->Named.Path; } } else if (OpInfo->Flags & AML_CREATE) @@ -1060,21 +1050,59 @@ Exit: return (AE_OK); } +/******************************************************************************* + * + * FUNCTION: AcpiDmCommonDescendingOp + * + * PARAMETERS: ASL_WALK_CALLBACK + * + * RETURN: ACPI_STATUS + * + * DESCRIPTION: Perform parse tree preprocessing before main disassembly walk. + * + ******************************************************************************/ +static ACPI_STATUS +AcpiDmCommonDescendingOp ( + ACPI_PARSE_OBJECT *Op, + UINT32 Level, + void *Context) +{ + ACPI_STATUS Status; + + /* Resource descriptor conversion */ + + Status = AcpiDmProcessResourceDescriptors (Op, Level, Context); + + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* Switch/Case conversion */ + + Status = AcpiDmProcessSwitch (Op); + + return (AE_OK); +} + + /******************************************************************************* * - * FUNCTION: AcpiDmResourceDescendingOp + * FUNCTION: AcpiDmProcessResourceDescriptors * * PARAMETERS: ASL_WALK_CALLBACK * - * RETURN: None + * RETURN: ACPI_STATUS * - * DESCRIPTION: Process one parse op during symbolic resource index conversion. + * DESCRIPTION: Convert fixed-offset references to resource descriptors to + * symbolic references. Should only be called after namespace has + * been cross referenced. * ******************************************************************************/ static ACPI_STATUS -AcpiDmResourceDescendingOp ( +AcpiDmProcessResourceDescriptors ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context) @@ -1085,7 +1113,6 @@ AcpiDmResourceDescendingOp ( ACPI_OBJECT_TYPE ObjectType; ACPI_STATUS Status; - WalkState = Info->WalkState; OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); @@ -1111,10 +1138,10 @@ AcpiDmResourceDescendingOp ( * If so, convert the reference into a symbolic reference. */ AcpiDmCheckResourceReference (Op, WalkState); + return (AE_OK); } - /******************************************************************************* * * FUNCTION: AcpiDmCommonAscendingOp @@ -1135,14 +1162,11 @@ AcpiDmCommonAscendingOp ( void *Context) { ACPI_OP_WALK_INFO *Info = Context; - const ACPI_OPCODE_INFO *OpInfo; ACPI_OBJECT_TYPE ObjectType; /* Close scope if necessary */ - OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); if (AcpiNsOpensScope (ObjectType)) @@ -1152,7 +1176,6 @@ AcpiDmCommonAscendingOp ( return (AE_OK); } - /******************************************************************************* * Modified: vendor-sys/acpica/dist/source/common/ahids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahids.c Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/source/common/ahids.c Wed May 31 22:40:24 2017 (r319363) @@ -187,6 +187,7 @@ const AH_DEVICE_ID AslDeviceIds[] = {"ACPI0011", "Generic Buttons Device"}, {"ACPI0012", "NVDIMM Root Device"}, {"ACPI0013", "Generic Event Device"}, + {"ACPI0014", "Wireless Power Calibration Device"}, {"ADMA0F28", "Intel Audio DMA"}, {"AMCR0F28", "Intel Audio Machine Driver"}, {"ATK4001", "Asus Radio Control Button"}, Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Wed May 31 22:40:24 2017 (r319363) @@ -254,6 +254,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_FPS", "Fan Performance States", "Returns a list of supported fan performance states"), AH_PREDEF ("_FSL", "Fan Set Level", "Control method that sets the fan device's speed level (performance state)"), AH_PREDEF ("_FST", "Fan Status", "Returns current status information for a fan device"), + AH_PREDEF ("_FUN", "Function Number", "Resource descriptor field"), AH_PREDEF ("_GAI", "Get Averaging Interval", "Returns the power meter averaging interval"), AH_PREDEF ("_GCP", "Get Capabilities", "Get device time capabilities"), AH_PREDEF ("_GHL", "Get Hardware Limit", "Returns the hardware limit enforced by the power meter"), @@ -270,6 +271,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_GWS", "Get Wake Status", "Return status of wake alarms"), AH_PREDEF ("_HE_", "High-Edge", "Interrupt triggering, Resource Descriptor field"), AH_PREDEF ("_HID", "Hardware ID", "Returns a device's Plug and Play Hardware ID"), + AH_PREDEF ("_HMA", "Heterogeneous Memory Attributes", "Returns a list of HMAT structures."), AH_PREDEF ("_HOT", "Hot Temperature", "Returns the critical temperature for sleep (entry to S4)"), AH_PREDEF ("_HPP", "Hot Plug Parameters", "Returns a list of hot-plug information for a PCI device"), AH_PREDEF ("_HPX", "Hot Plug Parameter Extensions", "Returns a list of hot-plug information for a PCI device. Supersedes _HPP"), @@ -287,6 +289,9 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_LL_", "Low Level", "Interrupt polarity, Resource Descriptor field"), AH_PREDEF ("_LPD", "Low Power Dependencies", "Returns a list of dependencies for low power idle entry"), AH_PREDEF ("_LPI", "Low Power Idle States", "Returns a list of supported low power idle states"), + AH_PREDEF ("_LSI", "Label Storage Information", "Returns information about the Label Storage Area associated with the NVDIMM object."), + AH_PREDEF ("_LSR", "Label Storage Read", "Returns label data from the Label Storage Area of the NVDIMM object."), + AH_PREDEF ("_LSW", "Label Storage Write", "Writes label data in to the Label Storage Area of the NVDIMM object."), AH_PREDEF ("_MAF", "Maximum Address Fixed", "Resource Descriptor field"), AH_PREDEF ("_MAT", "Multiple APIC Table Entry", "Returns a list of MADT APIC structure entries"), AH_PREDEF ("_MAX", "Maximum Base Address", "Resource Descriptor field"), @@ -439,6 +444,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_UPC", "USB Port Capabilities", "Returns a list of USB port capabilities"), AH_PREDEF ("_UPD", "User Presence Detect", "Returns user detection information"), AH_PREDEF ("_UPP", "User Presence Polling", "Returns the recommended user presence polling interval"), + AH_PREDEF ("_VAL", "Pin Configuration Value", "Resource Descriptor field"), AH_PREDEF ("_VEN", "Vendor Data", "Resource Descriptor field"), AH_PREDEF ("_VPO", "Video Post Options", "Returns the implemented video post options"), AH_PREDEF ("_Wxx", "Wake Event", "Method executed as a result of a wake event"), Modified: vendor-sys/acpica/dist/source/common/ahtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahtable.c Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/source/common/ahtable.c Wed May 31 22:40:24 2017 (r319363) @@ -218,6 +218,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] = {ACPI_SIG_FPDT, "Firmware Performance Data Table"}, {ACPI_SIG_GTDT, "Generic Timer Description Table"}, {ACPI_SIG_HEST, "Hardware Error Source Table"}, + {ACPI_SIG_HMAT, "Heterogeneous Memory Attributes Table"}, {ACPI_SIG_HPET, "High Precision Event Timer table"}, {ACPI_SIG_IORT, "IO Remapping Table"}, {ACPI_SIG_IVRS, "I/O Virtualization Reporting Structure"}, @@ -232,6 +233,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] = {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"}, {ACPI_SIG_PCCT, "Platform Communications Channel Table"}, {ACPI_SIG_PMTT, "Platform Memory Topology Table"}, + {ACPI_SIG_PPTT, "Processor Properties Topology Table"}, {ACPI_SIG_RASF, "RAS Features Table"}, {ACPI_RSDP_NAME,"Root System Description Pointer"}, {ACPI_SIG_RSDT, "Root System Description Table"}, @@ -253,6 +255,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] = {ACPI_SIG_WDDT, "Watchdog Description Table"}, {ACPI_SIG_WDRT, "Watchdog Resource Table"}, {ACPI_SIG_WPBT, "Windows Platform Binary Table"}, + {ACPI_SIG_WSMT, "Windows SMM Security Migrations Table"}, {ACPI_SIG_XENV, "Xen Environment table"}, {ACPI_SIG_XSDT, "Extended System Description Table"}, {NULL, NULL} Modified: vendor-sys/acpica/dist/source/common/ahuuids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahuuids.c Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/source/common/ahuuids.c Wed May 31 22:40:24 2017 (r319363) @@ -186,6 +186,10 @@ const AH_UUID Gbl_AcpiUuids[] = {"Persistent Virtual Disk", UUID_PERSISTENT_VIRTUAL_DISK}, {"Persistent Virtual CD", UUID_PERSISTENT_VIRTUAL_CD}, + {"[Processor Properties]", NULL}, + {"Cache Properties", UUID_CACHE_PROPERTIES}, + {"Physical Package Property", UUID_PHYSICAL_PROPERTY}, + {"[Miscellaneous]", NULL}, {"Platform-wide Capabilities", UUID_PLATFORM_CAPABILITIES}, {"Dynamic Enumeration", UUID_DYNAMIC_ENUMERATION}, Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Wed May 31 21:54:21 2017 (r319362) +++ vendor-sys/acpica/dist/source/common/dmextern.c Wed May 31 22:40:24 2017 (r319363) @@ -199,7 +199,10 @@ static const char *AcpiGbl_DmTypeNames[] = #define METHOD_SEPARATORS " \t,()\n" +static const char *ExternalConflictMessage = + " // Conflicts with a later declaration"; + /* Local prototypes */ static const char * @@ -211,6 +214,16 @@ AcpiDmNormalizeParentPrefix ( ACPI_PARSE_OBJECT *Op, char *Path); +static ACPI_STATUS +AcpiDmGetExternalAndInternalPath ( + ACPI_NAMESPACE_NODE *Node, + char **ExternalPath, + char **InternalPath); + +static ACPI_STATUS +AcpiDmRemoveRootPrefix ( + char **Path); + static void AcpiDmAddPathToExternalList ( char *Path, @@ -226,7 +239,22 @@ AcpiDmCreateNewExternal ( UINT32 Value, UINT16 Flags); +static void +AcpiDmCheckForExternalConflict ( + char *Path); +static ACPI_STATUS +AcpiDmResolveExternal ( + char *Path, + UINT8 Type, + ACPI_NAMESPACE_NODE **Node); + + +static void +AcpiDmConflictingDeclaration ( + char *Path); + + /******************************************************************************* * * FUNCTION: AcpiDmGetObjectTypeName @@ -582,7 +610,7 @@ AcpiDmGetExternalsFromFile ( { /* Add the external(s) to the namespace */ - AcpiDmAddExternalsToNamespace (); + AcpiDmAddExternalListToNamespace (); AcpiOsPrintf ("%s: Imported %u external method definitions\n", Gbl_ExternalRefFilename, ImportCount); @@ -698,6 +726,86 @@ AcpiDmAddOpToExternalList ( /******************************************************************************* * + * FUNCTION: AcpiDmGetExternalAndInternalPath + * + * PARAMETERS: Node - Namespace node for object to be added + * ExternalPath - Will contain the external path of the node + * InternalPath - Will contain the internal path of the node + * + * RETURN: None + * + * DESCRIPTION: Get the External and Internal path from the given node. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDmGetExternalAndInternalPath ( + ACPI_NAMESPACE_NODE *Node, + char **ExternalPath, + char **InternalPath) +{ + ACPI_STATUS Status; + + + if (!Node) + { + return (AE_BAD_PARAMETER); + } + + /* Get the full external and internal pathnames to the node */ + + *ExternalPath = AcpiNsGetExternalPathname (Node); + if (!*ExternalPath) + { + return (AE_BAD_PATHNAME); + } + + Status = AcpiNsInternalizeName (*ExternalPath, InternalPath); + if (ACPI_FAILURE (Status)) + { + ACPI_FREE (*ExternalPath); + return (Status); + } + + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmRemoveRootPrefix + * + * PARAMETERS: Path - Remove Root prefix from this Path + * + * RETURN: None + * + * DESCRIPTION: Remove the root prefix character '\' from Path. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDmRemoveRootPrefix ( + char **Path) +{ + char *InputPath = *Path; + + + if ((*InputPath == AML_ROOT_PREFIX) && (InputPath[1])) + { + if (!memmove(InputPath, InputPath+1, strlen(InputPath))) + { + return (AE_ERROR); + } + + *Path = InputPath; + } + + return (AE_OK); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmAddNodeToExternalList * * PARAMETERS: Node - Namespace node for object to be added @@ -727,46 +835,27 @@ AcpiDmAddNodeToExternalList ( { char *ExternalPath; char *InternalPath; - char *Temp; ACPI_STATUS Status; ACPI_FUNCTION_TRACE (DmAddNodeToExternalList); - - if (!Node) - { - return_VOID; - } - /* Get the full external and internal pathnames to the node */ - ExternalPath = AcpiNsGetExternalPathname (Node); - if (!ExternalPath) - { - return_VOID; - } - - Status = AcpiNsInternalizeName (ExternalPath, &InternalPath); + Status = AcpiDmGetExternalAndInternalPath (Node, &ExternalPath, &InternalPath); if (ACPI_FAILURE (Status)) { - ACPI_FREE (ExternalPath); return_VOID; } /* Remove the root backslash */ - if ((*ExternalPath == AML_ROOT_PREFIX) && (ExternalPath[1])) + Status = AcpiDmRemoveRootPrefix (&ExternalPath); + if (ACPI_FAILURE (Status)) { - Temp = ACPI_ALLOCATE_ZEROED (strlen (ExternalPath) + 1); - if (!Temp) - { - return_VOID; - } - - strcpy (Temp, &ExternalPath[1]); ACPI_FREE (ExternalPath); - ExternalPath = Temp; + ACPI_FREE (InternalPath); + return_VOID; } /* Create the new External() declaration node */ @@ -1013,68 +1102,171 @@ AcpiDmCreateNewExternal ( /******************************************************************************* * - * FUNCTION: AcpiDmAddExternalsToNamespace + * FUNCTION: AcpiDmResolveExternal * - * PARAMETERS: None + * PARAMETERS: Path - Path of the external + * Type - Type of the external + * Node - Input node for AcpiNsLookup * + * RETURN: Status + * + * DESCRIPTION: Resolve the external within the namespace by AcpiNsLookup. + * If the returned node is an external and has the same type + * we assume that it was either an existing external or a + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDmResolveExternal ( + char *Path, + UINT8 Type, + ACPI_NAMESPACE_NODE **Node) +{ + ACPI_STATUS Status; + + + Status = AcpiNsLookup (NULL, Path, Type, + ACPI_IMODE_LOAD_PASS1, + ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE, + NULL, Node); + + if (!Node) + { + ACPI_EXCEPTION ((AE_INFO, Status, + "while adding external to namespace [%s]", Path)); + } + + /* Note the asl code "external(a) external(a)" is acceptable ASL */ + + else if ((*Node)->Type == Type && + (*Node)->Flags & ANOBJ_IS_EXTERNAL) + { + return (AE_OK); + } + else + { + ACPI_EXCEPTION ((AE_INFO, AE_ERROR, + "[%s] has conflicting declarations", Path)); + } + + return (AE_ERROR); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmCreateSubobjectForExternal + * + * PARAMETERS: Type - Type of the external + * Node - Namespace node from AcpiNsLookup + * ParamCount - Value to be used for Method + * * RETURN: None * - * DESCRIPTION: Add all externals to the namespace. Allows externals to be + * DESCRIPTION: Add one external to the namespace. Allows external to be * "resolved". * ******************************************************************************/ void -AcpiDmAddExternalsToNamespace ( - void) +AcpiDmCreateSubobjectForExternal ( + UINT8 Type, + ACPI_NAMESPACE_NODE **Node, + UINT32 ParamCount) { - ACPI_STATUS Status; - ACPI_NAMESPACE_NODE *Node; ACPI_OPERAND_OBJECT *ObjDesc; - ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList; - while (External) + switch (Type) { - /* Add the external name (object) into the namespace */ + case ACPI_TYPE_METHOD: - Status = AcpiNsLookup (NULL, External->InternalPath, External->Type, - ACPI_IMODE_LOAD_PASS1, - ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE, - NULL, &Node); + /* For methods, we need to save the argument count */ - if (ACPI_FAILURE (Status)) - { - ACPI_EXCEPTION ((AE_INFO, Status, - "while adding external to namespace [%s]", - External->Path)); - } + ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); + ObjDesc->Method.ParamCount = (UINT8) ParamCount; + (*Node)->Object = ObjDesc; + break; - else switch (External->Type) - { - case ACPI_TYPE_METHOD: + case ACPI_TYPE_REGION: - /* For methods, we need to save the argument count */ + /* Regions require a region sub-object */ - ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); - ObjDesc->Method.ParamCount = (UINT8) External->Value; - Node->Object = ObjDesc; - break; + ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION); + ObjDesc->Region.Node = *Node; + (*Node)->Object = ObjDesc; + break; - case ACPI_TYPE_REGION: + default: - /* Regions require a region sub-object */ + break; + } +} - ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION); - ObjDesc->Region.Node = Node; - Node->Object = ObjDesc; - break; - default: +/******************************************************************************* + * + * FUNCTION: AcpiDmAddOneExternalToNamespace + * + * PARAMETERS: Path - External parse object + * Type - Type of parse object + * ParamCount - External method parameter count + * + * RETURN: None + * + * DESCRIPTION: Add one external to the namespace by resolvign the external + * (by performing a namespace lookup) and annotating the resulting + * namespace node with the approperiate information if the type + * is ACPI_TYPE_REGION or ACPI_TYPE_METHOD. + * + ******************************************************************************/ - break; - } +void +AcpiDmAddOneExternalToNamespace ( + char *Path, + UINT8 Type, + UINT32 ParamCount) +{ + ACPI_STATUS Status; + ACPI_NAMESPACE_NODE *Node; + + Status = AcpiDmResolveExternal (Path, Type, &Node); + + if (ACPI_FAILURE (Status)) + { + return; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 31 22:41:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30076BD30F7; Wed, 31 May 2017 22:41:09 +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 D98CD6F73B; Wed, 31 May 2017 22:41:08 +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 v4VMf7ZZ081417; Wed, 31 May 2017 22:41:07 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4VMf7Rf081416; Wed, 31 May 2017 22:41:07 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705312241.v4VMf7Rf081416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 31 May 2017 22:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319364 - vendor-sys/acpica/20170531 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 22:41:09 -0000 Author: jkim Date: Wed May 31 22:41:07 2017 New Revision: 319364 URL: https://svnweb.freebsd.org/changeset/base/319364 Log: Tag ACPICA 20170531. Added: vendor-sys/acpica/20170531/ - copied from r319363, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Thu Jun 1 00:01:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09C76BED63A; Thu, 1 Jun 2017 00:01:22 +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 A87F271B76; Thu, 1 Jun 2017 00:01:21 +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 v5101KJ0014303; Thu, 1 Jun 2017 00:01:20 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5101JtX014290; Thu, 1 Jun 2017 00:01:19 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201706010001.v5101JtX014290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 1 Jun 2017 00:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319365 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/compon... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 00:01:22 -0000 Author: jkim Date: Thu Jun 1 00:01:19 2017 New Revision: 319365 URL: https://svnweb.freebsd.org/changeset/base/319365 Log: Merge ACPICA 20170531. Added: head/sys/contrib/dev/acpica/common/dmswitch.c - copied, changed from r319363, vendor-sys/acpica/dist/source/common/dmswitch.c head/sys/contrib/dev/acpica/components/utilities/utresdecode.c - copied, changed from r319363, vendor-sys/acpica/dist/source/components/utilities/utresdecode.c Modified: head/sys/conf/files head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/acfileio.c head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/ahids.c head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/ahtable.c head/sys/contrib/dev/acpica/common/ahuuids.c head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/compiler/aslascii.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslexternal.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslhelp.c head/sys/contrib/dev/acpica/compiler/aslhelpers.y head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/asloffset.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/aslparser.y head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/aslresources.y head/sys/contrib/dev/acpica/compiler/aslrestype2s.c head/sys/contrib/dev/acpica/compiler/aslrules.y head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslsupport.l head/sys/contrib/dev/acpica/compiler/asltokens.y head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.y head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/compiler/cvcompiler.c head/sys/contrib/dev/acpica/compiler/cvdisasm.c head/sys/contrib/dev/acpica/compiler/cvparser.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtfield.c head/sys/contrib/dev/acpica/compiler/dttable1.c head/sys/contrib/dev/acpica/compiler/dttable2.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbobject.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/dispatcher/dsargs.c head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c head/sys/contrib/dev/acpica/components/dispatcher/dswload.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/events/evxfevnt.c head/sys/contrib/dev/acpica/components/executer/exdebug.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/executer/exoparg1.c head/sys/contrib/dev/acpica/components/executer/exresolv.c head/sys/contrib/dev/acpica/components/namespace/nsaccess.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/namespace/nsutils.c head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/parser/psobject.c head/sys/contrib/dev/acpica/components/parser/psopcode.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/resources/rscalc.c head/sys/contrib/dev/acpica/components/resources/rsdump.c head/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c head/sys/contrib/dev/acpica/components/resources/rsinfo.c head/sys/contrib/dev/acpica/components/resources/rsmisc.c head/sys/contrib/dev/acpica/components/resources/rsserial.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utownerid.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/components/utilities/utxfmutex.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actbl3.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/acuuid.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/amlresrc.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed May 31 22:41:07 2017 (r319364) +++ head/sys/conf/files Thu Jun 1 00:01:19 2017 (r319365) @@ -488,6 +488,7 @@ contrib/dev/acpica/components/utilities/utobject.c opt contrib/dev/acpica/components/utilities/utosi.c optional acpi contrib/dev/acpica/components/utilities/utownerid.c optional acpi contrib/dev/acpica/components/utilities/utpredef.c optional acpi +contrib/dev/acpica/components/utilities/utresdecode.c optional acpi acpi_debug contrib/dev/acpica/components/utilities/utresrc.c optional acpi contrib/dev/acpica/components/utilities/utstate.c optional acpi contrib/dev/acpica/components/utilities/utstring.c optional acpi Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Thu Jun 1 00:01:19 2017 (r319365) @@ -21,9 +21,10 @@ stripdirs="generate libraries parsers preprocessor tes stripfiles="Makefile README accygwin.h acdragonfly.h acdragonflyex.h \ acefi.h acefiex.h achaiku.h acintel.h aclinux.h aclinuxex.h \ acmacosx.h acmsvc.h acmsvcex.h acnetbsd.h acos2.h acqnx.h \ - acwin.h acwin64.h acwinex.h new_table.txt osbsdtbl.c osefitbl.c \ - osefixf.c osfreebsdtbl.c oslinuxtbl.c osunixdir.c osunixmap.c \ - oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c utprint.c" + acwin.h acwin64.h acwinex.h dspkginit.c new_table.txt \ + osbsdtbl.c osefitbl.c osefixf.c osfreebsdtbl.c oslinuxtbl.c \ + osunixdir.c osunixmap.c oswindir.c oswintbl.c oswinxf.c \ + readme.txt utclib.c utprint.c" # include files to canonify src_headers="acapps.h acbuffer.h acclib.h accommon.h acconfig.h \ Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/changes.txt Thu Jun 1 00:01:19 2017 (r319365) @@ -1,4 +1,134 @@ ---------------------------------------- +31 May 2017. Summary of changes for version 20170531: + + +0) ACPI 6.2 support: + +The ACPI specification version 6.2 has been released and is available at +http://uefi.org/specifications + +This version of ACPICA fully supports the ACPI 6.2 specification. Changes +are summarized below. + +New ACPI tables (Table Compiler/Disassembler/Templates): + HMAT (Heterogeneous Memory Attributes Table) + WSMT (Windows SMM Security Mitigation Table) + PPTT (Processor Properties Topology Table) + +New subtables for existing ACPI tables: + HEST (New subtable, Arch-deferred machine check) + SRAT (New subtable, Arch-specific affinity structure) + PCCT (New subtables, Extended PCC subspaces (types 3 and 4)) + +Simple updates for existing ACPI tables: + BGRT (two new flag bits) + HEST (New bit defined for several subtables, GHES_ASSIST) + +New Resource Descriptors and Resource macros (Compiler/Disassembler): + PinConfig() + PinFunction() + PinGroup() + PinGroupConfig() + PinGroupFunction() + New type for hardware error notification (section 18.3.2.9) + +New predefined names/methods (Compiler/Interpreter): + _HMA (Heterogeneous Memory Attributes) + _LSI (Label Storage Information) + _LSR (Label Storage Read) + _LSW (Label Storage Write) + +ASL grammar/macro changes (Compiler): + For() ASL macro, implemented with the AML while operator + Extensions to Concatenate operator + Support for multiple definition blocks in same ASL file + Clarification for Buffer operator + Allow executable AML code underneath all scopes (Devices, etc.) + Clarification/change for the _OSI return value + ASL grammar update for reference operators + Allow a zero-length string for AML filename in DefinitionBlock + +Miscellaneous: + New device object notification value + Remove a notify value (0x0C) for graceful shutdown + New UUIDs for processor/cache properties and + physical package property + New _HID, ACPI0014 (Wireless Power Calibration Device) + + +1) ACPICA kernel-resident subsystem: + +Added support to disable ACPI events on hardware-reduced platforms. +Eliminates error messages of the form "Could not enable fixed event". Lv +Zheng + +Fixed a problem using Device/Thermal objects with the ObjectType and +DerefOf ASL operators. This support had not been fully/properly +implemented. + +Fixed a problem where if a Buffer object containing a resource template +was longer than the actual resource template, an error was generated -- +even though the AML is legal. This case has been seen in the field. + +Fixed a problem with the header definition of the MADT PCAT_COMPAT flag. +The values for DUAL_PIC and MULTIPLE_APIC were reversed. + +Added header file changes for the TPM2 ACPI table. Update to new version +of the TCG specification. Adds a new TPM2 subtable for ARM SMC. + +Exported the external interfaces AcpiAcquireMutex and AcpiReleaseMutex. +These interfaces are intended to be used only in conjunction with the +predefined _DLM method (Device Lock Method). "This object appears in a +device scope when AML access to the device must be synchronized with the +OS environment". + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 143.1K Code, 60.0K Data, 203.1K Total + Debug Version: 204.0K Code, 84.3K Data, 288.3K Total + Previous Release: + Non-Debug Version: 141.7K Code, 58.5K Data, 200.2K Total + Debug Version: 207.5K Code, 82.7K Data, 290.2K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a problem where an External() declaration could not refer to +a Field Unit. Erik Schmauss. + +Disassembler: Improved support for the Switch/Case operators. This +feature will disassemble AML code back to the original Switch operators +when possible, instead of an If..Else sequence. David Box + +iASL and disassembler: Improved the handling of multiple extraneous +parentheses for both ASL input and disassembled ASL output. + +Improved the behavior of the iASL compiler and disassembler to detect +improper use of external declarations + +Disassembler: Now aborts immediately upon detection of an unknown AML +opcode. The AML parser has no real way to recover from this, and can +result in the creation of an ill-formed parse tree that causes errors +later during the disassembly. + +All tools: Fixed a problem where the Unix application OSL did not handle +control-c correctly. For example, a control-c could incorrectly wake the +debugger. + +AcpiExec: Improved the Control-C handling and added a handler for +segmentation faults (SIGSEGV). Supports both Windows and Unix-like +environments. + +Reduced the verbosity of the generic unix makefiles. Previously, each +compilation displayed the full set of compiler options. This has been +eliminated as the options are easily inspected within the makefiles. Each +compilation now results in a single line of output. + +---------------------------------------- 03 March 2017. Summary of changes for version 20170303: Modified: head/sys/contrib/dev/acpica/common/acfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acfileio.c Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/common/acfileio.c Thu Jun 1 00:01:19 2017 (r319365) @@ -531,8 +531,6 @@ AcValidateTableHeader ( if (!AcpiUtValidNameseg (TableHeader.Signature)) { - fprintf (stderr, "Invalid table signature: 0x%8.8X\n", - *ACPI_CAST_PTR (UINT32, TableHeader.Signature)); return (AE_BAD_SIGNATURE); } Modified: head/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adfile.c Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/common/adfile.c Thu Jun 1 00:01:19 2017 (r319365) @@ -316,11 +316,6 @@ FlGenerateFilename ( */ NewFilename = UtStringCacheCalloc ((ACPI_SIZE) strlen (InputFilename) + strlen (Suffix) + 2); - if (!NewFilename) - { - return (NULL); - } - strcpy (NewFilename, InputFilename); /* Try to find the last dot in the filename */ @@ -364,11 +359,6 @@ FlStrdup ( NewString = UtStringCacheCalloc ((ACPI_SIZE) strlen (String) + 1); - if (!NewString) - { - return (NULL); - } - strcpy (NewString, String); return (NewString); } Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/common/adisasm.c Thu Jun 1 00:01:19 2017 (r319365) @@ -537,7 +537,7 @@ AdDisassembleOneTable ( * the entire tree with the new information (namely, the * number of arguments per method) */ - if (AcpiDmGetExternalMethodCount ()) + if (AcpiDmGetUnresolvedExternalMethodCount ()) { Status = AdReparseOneTable (Table, File, OwnerId); if (ACPI_FAILURE (Status)) @@ -553,7 +553,7 @@ AdDisassembleOneTable ( * 1) Convert fixed-offset references to resource descriptors * to symbolic references (Note: modifies namespace) */ - AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode); + AcpiDmConvertParseObjects (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode); /* Optional displays */ @@ -616,7 +616,7 @@ AdReparseOneTable ( fprintf (stderr, "\nFound %u external control methods, " "reparsing with new information\n", - AcpiDmGetExternalMethodCount ()); + AcpiDmGetUnresolvedExternalMethodCount ()); /* Reparse, rebuild namespace */ @@ -642,7 +642,7 @@ AdReparseOneTable ( /* New namespace, add the external definitions first */ - AcpiDmAddExternalsToNamespace (); + AcpiDmAddExternalListToNamespace (); /* For -ca option: clear the list of comment addresses. */ Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/common/adwalk.c Thu Jun 1 00:01:19 2017 (r319365) @@ -208,11 +208,16 @@ AcpiDmInspectPossibleArgs ( ACPI_PARSE_OBJECT *Op); static ACPI_STATUS -AcpiDmResourceDescendingOp ( +AcpiDmCommonDescendingOp ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context); +static ACPI_STATUS +AcpiDmProcessResourceDescriptors ( + ACPI_PARSE_OBJECT *Op, + UINT32 Level, + void *Context); /******************************************************************************* * @@ -395,21 +400,21 @@ AcpiDmCrossReferenceNamespace ( /******************************************************************************* * - * FUNCTION: AcpiDmConvertResourceIndexes + * FUNCTION: AcpiDmConvertParseObjects * * PARAMETERS: ParseTreeRoot - Root of the parse tree * NamespaceRoot - Root of the internal namespace * * RETURN: None * - * DESCRIPTION: Convert fixed-offset references to resource descriptors to - * symbolic references. Should only be called after namespace has - * been cross referenced. + * DESCRIPTION: Begin parse tree walk to perform conversions needed for + * disassembly. These include resource descriptors and switch/case + * operations. * ******************************************************************************/ void -AcpiDmConvertResourceIndexes ( +AcpiDmConvertParseObjects ( ACPI_PARSE_OBJECT *ParseTreeRoot, ACPI_NAMESPACE_NODE *NamespaceRoot) { @@ -443,9 +448,14 @@ AcpiDmConvertResourceIndexes ( Info.Level = 0; Info.WalkState = WalkState; - AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmResourceDescendingOp, + AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmCommonDescendingOp, AcpiDmCommonAscendingOp, &Info); ACPI_FREE (WalkState); + + if (AcpiGbl_TempListHead) { + AcpiDmClearTempList(); + } + return; } @@ -737,7 +747,6 @@ AcpiDmLoadDescendingOp ( WalkState = Info->WalkState; OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); /* Only interested in operators that create new names */ @@ -754,7 +763,7 @@ AcpiDmLoadDescendingOp ( { /* For all named operators, get the new name */ - Path = (char *) Op->Named.Path; + Path = Op->Named.Path; if (!Path && Op->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP) { @@ -875,7 +884,6 @@ AcpiDmXrefDescendingOp ( WalkState = Info->WalkState; OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); if ((!(OpInfo->Flags & AML_NAMED)) && @@ -885,26 +893,7 @@ AcpiDmXrefDescendingOp ( { goto Exit; } - else if (Op->Common.Parent && - Op->Common.Parent->Common.AmlOpcode == AML_EXTERNAL_OP) - { - /* External() NamePath */ - Path = Op->Common.Value.String; - ObjectType = (ACPI_OBJECT_TYPE) Op->Common.Next->Common.Value.Integer; - if (ObjectType == ACPI_TYPE_METHOD) - { - ParamCount = (UINT32) - Op->Common.Next->Common.Next->Common.Value.Integer; - } - - Flags |= ACPI_EXT_RESOLVED_REFERENCE | ACPI_EXT_ORIGIN_FROM_OPCODE; - AcpiDmAddOpToExternalList (Op, Path, - (UINT8) ObjectType, ParamCount, Flags); - - goto Exit; - } - /* Get the NamePath from the appropriate place */ if (OpInfo->Flags & AML_NAMED) @@ -924,9 +913,10 @@ AcpiDmXrefDescendingOp ( Path = NextOp->Common.Value.String; } } - else if (Op->Common.AmlOpcode == AML_SCOPE_OP) + else if (Op->Common.AmlOpcode == AML_SCOPE_OP || + Op->Common.AmlOpcode == AML_EXTERNAL_OP) { - Path = (char *) Op->Named.Path; + Path = Op->Named.Path; } } else if (OpInfo->Flags & AML_CREATE) @@ -1060,21 +1050,59 @@ Exit: return (AE_OK); } +/******************************************************************************* + * + * FUNCTION: AcpiDmCommonDescendingOp + * + * PARAMETERS: ASL_WALK_CALLBACK + * + * RETURN: ACPI_STATUS + * + * DESCRIPTION: Perform parse tree preprocessing before main disassembly walk. + * + ******************************************************************************/ +static ACPI_STATUS +AcpiDmCommonDescendingOp ( + ACPI_PARSE_OBJECT *Op, + UINT32 Level, + void *Context) +{ + ACPI_STATUS Status; + + /* Resource descriptor conversion */ + + Status = AcpiDmProcessResourceDescriptors (Op, Level, Context); + + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* Switch/Case conversion */ + + Status = AcpiDmProcessSwitch (Op); + + return (AE_OK); +} + + /******************************************************************************* * - * FUNCTION: AcpiDmResourceDescendingOp + * FUNCTION: AcpiDmProcessResourceDescriptors * * PARAMETERS: ASL_WALK_CALLBACK * - * RETURN: None + * RETURN: ACPI_STATUS * - * DESCRIPTION: Process one parse op during symbolic resource index conversion. + * DESCRIPTION: Convert fixed-offset references to resource descriptors to + * symbolic references. Should only be called after namespace has + * been cross referenced. * ******************************************************************************/ static ACPI_STATUS -AcpiDmResourceDescendingOp ( +AcpiDmProcessResourceDescriptors ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context) @@ -1085,7 +1113,6 @@ AcpiDmResourceDescendingOp ( ACPI_OBJECT_TYPE ObjectType; ACPI_STATUS Status; - WalkState = Info->WalkState; OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); @@ -1111,10 +1138,10 @@ AcpiDmResourceDescendingOp ( * If so, convert the reference into a symbolic reference. */ AcpiDmCheckResourceReference (Op, WalkState); + return (AE_OK); } - /******************************************************************************* * * FUNCTION: AcpiDmCommonAscendingOp @@ -1135,14 +1162,11 @@ AcpiDmCommonAscendingOp ( void *Context) { ACPI_OP_WALK_INFO *Info = Context; - const ACPI_OPCODE_INFO *OpInfo; ACPI_OBJECT_TYPE ObjectType; /* Close scope if necessary */ - OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); if (AcpiNsOpensScope (ObjectType)) @@ -1152,7 +1176,6 @@ AcpiDmCommonAscendingOp ( return (AE_OK); } - /******************************************************************************* * Modified: head/sys/contrib/dev/acpica/common/ahids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahids.c Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/common/ahids.c Thu Jun 1 00:01:19 2017 (r319365) @@ -187,6 +187,7 @@ const AH_DEVICE_ID AslDeviceIds[] = {"ACPI0011", "Generic Buttons Device"}, {"ACPI0012", "NVDIMM Root Device"}, {"ACPI0013", "Generic Event Device"}, + {"ACPI0014", "Wireless Power Calibration Device"}, {"ADMA0F28", "Intel Audio DMA"}, {"AMCR0F28", "Intel Audio Machine Driver"}, {"ATK4001", "Asus Radio Control Button"}, Modified: head/sys/contrib/dev/acpica/common/ahpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahpredef.c Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/common/ahpredef.c Thu Jun 1 00:01:19 2017 (r319365) @@ -254,6 +254,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_FPS", "Fan Performance States", "Returns a list of supported fan performance states"), AH_PREDEF ("_FSL", "Fan Set Level", "Control method that sets the fan device's speed level (performance state)"), AH_PREDEF ("_FST", "Fan Status", "Returns current status information for a fan device"), + AH_PREDEF ("_FUN", "Function Number", "Resource descriptor field"), AH_PREDEF ("_GAI", "Get Averaging Interval", "Returns the power meter averaging interval"), AH_PREDEF ("_GCP", "Get Capabilities", "Get device time capabilities"), AH_PREDEF ("_GHL", "Get Hardware Limit", "Returns the hardware limit enforced by the power meter"), @@ -270,6 +271,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_GWS", "Get Wake Status", "Return status of wake alarms"), AH_PREDEF ("_HE_", "High-Edge", "Interrupt triggering, Resource Descriptor field"), AH_PREDEF ("_HID", "Hardware ID", "Returns a device's Plug and Play Hardware ID"), + AH_PREDEF ("_HMA", "Heterogeneous Memory Attributes", "Returns a list of HMAT structures."), AH_PREDEF ("_HOT", "Hot Temperature", "Returns the critical temperature for sleep (entry to S4)"), AH_PREDEF ("_HPP", "Hot Plug Parameters", "Returns a list of hot-plug information for a PCI device"), AH_PREDEF ("_HPX", "Hot Plug Parameter Extensions", "Returns a list of hot-plug information for a PCI device. Supersedes _HPP"), @@ -287,6 +289,9 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_LL_", "Low Level", "Interrupt polarity, Resource Descriptor field"), AH_PREDEF ("_LPD", "Low Power Dependencies", "Returns a list of dependencies for low power idle entry"), AH_PREDEF ("_LPI", "Low Power Idle States", "Returns a list of supported low power idle states"), + AH_PREDEF ("_LSI", "Label Storage Information", "Returns information about the Label Storage Area associated with the NVDIMM object."), + AH_PREDEF ("_LSR", "Label Storage Read", "Returns label data from the Label Storage Area of the NVDIMM object."), + AH_PREDEF ("_LSW", "Label Storage Write", "Writes label data in to the Label Storage Area of the NVDIMM object."), AH_PREDEF ("_MAF", "Maximum Address Fixed", "Resource Descriptor field"), AH_PREDEF ("_MAT", "Multiple APIC Table Entry", "Returns a list of MADT APIC structure entries"), AH_PREDEF ("_MAX", "Maximum Base Address", "Resource Descriptor field"), @@ -439,6 +444,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = AH_PREDEF ("_UPC", "USB Port Capabilities", "Returns a list of USB port capabilities"), AH_PREDEF ("_UPD", "User Presence Detect", "Returns user detection information"), AH_PREDEF ("_UPP", "User Presence Polling", "Returns the recommended user presence polling interval"), + AH_PREDEF ("_VAL", "Pin Configuration Value", "Resource Descriptor field"), AH_PREDEF ("_VEN", "Vendor Data", "Resource Descriptor field"), AH_PREDEF ("_VPO", "Video Post Options", "Returns the implemented video post options"), AH_PREDEF ("_Wxx", "Wake Event", "Method executed as a result of a wake event"), Modified: head/sys/contrib/dev/acpica/common/ahtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahtable.c Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/common/ahtable.c Thu Jun 1 00:01:19 2017 (r319365) @@ -218,6 +218,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] = {ACPI_SIG_FPDT, "Firmware Performance Data Table"}, {ACPI_SIG_GTDT, "Generic Timer Description Table"}, {ACPI_SIG_HEST, "Hardware Error Source Table"}, + {ACPI_SIG_HMAT, "Heterogeneous Memory Attributes Table"}, {ACPI_SIG_HPET, "High Precision Event Timer table"}, {ACPI_SIG_IORT, "IO Remapping Table"}, {ACPI_SIG_IVRS, "I/O Virtualization Reporting Structure"}, @@ -232,6 +233,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] = {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"}, {ACPI_SIG_PCCT, "Platform Communications Channel Table"}, {ACPI_SIG_PMTT, "Platform Memory Topology Table"}, + {ACPI_SIG_PPTT, "Processor Properties Topology Table"}, {ACPI_SIG_RASF, "RAS Features Table"}, {ACPI_RSDP_NAME,"Root System Description Pointer"}, {ACPI_SIG_RSDT, "Root System Description Table"}, @@ -253,6 +255,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] = {ACPI_SIG_WDDT, "Watchdog Description Table"}, {ACPI_SIG_WDRT, "Watchdog Resource Table"}, {ACPI_SIG_WPBT, "Windows Platform Binary Table"}, + {ACPI_SIG_WSMT, "Windows SMM Security Migrations Table"}, {ACPI_SIG_XENV, "Xen Environment table"}, {ACPI_SIG_XSDT, "Extended System Description Table"}, {NULL, NULL} Modified: head/sys/contrib/dev/acpica/common/ahuuids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahuuids.c Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/common/ahuuids.c Thu Jun 1 00:01:19 2017 (r319365) @@ -186,6 +186,10 @@ const AH_UUID Gbl_AcpiUuids[] = {"Persistent Virtual Disk", UUID_PERSISTENT_VIRTUAL_DISK}, {"Persistent Virtual CD", UUID_PERSISTENT_VIRTUAL_CD}, + {"[Processor Properties]", NULL}, + {"Cache Properties", UUID_CACHE_PROPERTIES}, + {"Physical Package Property", UUID_PHYSICAL_PROPERTY}, + {"[Miscellaneous]", NULL}, {"Platform-wide Capabilities", UUID_PLATFORM_CAPABILITIES}, {"Dynamic Enumeration", UUID_DYNAMIC_ENUMERATION}, Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Wed May 31 22:41:07 2017 (r319364) +++ head/sys/contrib/dev/acpica/common/dmextern.c Thu Jun 1 00:01:19 2017 (r319365) @@ -199,7 +199,10 @@ static const char *AcpiGbl_DmTypeNames[] = #define METHOD_SEPARATORS " \t,()\n" +static const char *ExternalConflictMessage = + " // Conflicts with a later declaration"; + /* Local prototypes */ static const char * @@ -211,6 +214,16 @@ AcpiDmNormalizeParentPrefix ( ACPI_PARSE_OBJECT *Op, char *Path); +static ACPI_STATUS +AcpiDmGetExternalAndInternalPath ( + ACPI_NAMESPACE_NODE *Node, + char **ExternalPath, + char **InternalPath); + +static ACPI_STATUS +AcpiDmRemoveRootPrefix ( + char **Path); + static void AcpiDmAddPathToExternalList ( char *Path, @@ -226,7 +239,22 @@ AcpiDmCreateNewExternal ( UINT32 Value, UINT16 Flags); +static void +AcpiDmCheckForExternalConflict ( + char *Path); +static ACPI_STATUS +AcpiDmResolveExternal ( + char *Path, + UINT8 Type, + ACPI_NAMESPACE_NODE **Node); + + +static void +AcpiDmConflictingDeclaration ( + char *Path); + + /******************************************************************************* * * FUNCTION: AcpiDmGetObjectTypeName @@ -582,7 +610,7 @@ AcpiDmGetExternalsFromFile ( { /* Add the external(s) to the namespace */ - AcpiDmAddExternalsToNamespace (); + AcpiDmAddExternalListToNamespace (); AcpiOsPrintf ("%s: Imported %u external method definitions\n", Gbl_ExternalRefFilename, ImportCount); @@ -698,6 +726,86 @@ AcpiDmAddOpToExternalList ( /******************************************************************************* * + * FUNCTION: AcpiDmGetExternalAndInternalPath + * + * PARAMETERS: Node - Namespace node for object to be added + * ExternalPath - Will contain the external path of the node + * InternalPath - Will contain the internal path of the node + * + * RETURN: None + * + * DESCRIPTION: Get the External and Internal path from the given node. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDmGetExternalAndInternalPath ( + ACPI_NAMESPACE_NODE *Node, + char **ExternalPath, + char **InternalPath) +{ + ACPI_STATUS Status; + + + if (!Node) + { + return (AE_BAD_PARAMETER); + } + + /* Get the full external and internal pathnames to the node */ + + *ExternalPath = AcpiNsGetExternalPathname (Node); + if (!*ExternalPath) + { + return (AE_BAD_PATHNAME); + } + + Status = AcpiNsInternalizeName (*ExternalPath, InternalPath); + if (ACPI_FAILURE (Status)) + { + ACPI_FREE (*ExternalPath); + return (Status); + } + + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmRemoveRootPrefix + * + * PARAMETERS: Path - Remove Root prefix from this Path + * + * RETURN: None + * + * DESCRIPTION: Remove the root prefix character '\' from Path. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDmRemoveRootPrefix ( + char **Path) +{ + char *InputPath = *Path; + + + if ((*InputPath == AML_ROOT_PREFIX) && (InputPath[1])) + { + if (!memmove(InputPath, InputPath+1, strlen(InputPath))) + { + return (AE_ERROR); + } + + *Path = InputPath; + } + + return (AE_OK); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmAddNodeToExternalList * * PARAMETERS: Node - Namespace node for object to be added @@ -727,46 +835,27 @@ AcpiDmAddNodeToExternalList ( { char *ExternalPath; char *InternalPath; - char *Temp; ACPI_STATUS Status; ACPI_FUNCTION_TRACE (DmAddNodeToExternalList); - - if (!Node) - { - return_VOID; - } - /* Get the full external and internal pathnames to the node */ - ExternalPath = AcpiNsGetExternalPathname (Node); - if (!ExternalPath) - { - return_VOID; - } - - Status = AcpiNsInternalizeName (ExternalPath, &InternalPath); + Status = AcpiDmGetExternalAndInternalPath (Node, &ExternalPath, &InternalPath); if (ACPI_FAILURE (Status)) { - ACPI_FREE (ExternalPath); return_VOID; } /* Remove the root backslash */ - if ((*ExternalPath == AML_ROOT_PREFIX) && (ExternalPath[1])) + Status = AcpiDmRemoveRootPrefix (&ExternalPath); + if (ACPI_FAILURE (Status)) { - Temp = ACPI_ALLOCATE_ZEROED (strlen (ExternalPath) + 1); - if (!Temp) - { - return_VOID; - } - - strcpy (Temp, &ExternalPath[1]); ACPI_FREE (ExternalPath); - ExternalPath = Temp; + ACPI_FREE (InternalPath); + return_VOID; } /* Create the new External() declaration node */ @@ -1013,68 +1102,171 @@ AcpiDmCreateNewExternal ( /******************************************************************************* * - * FUNCTION: AcpiDmAddExternalsToNamespace + * FUNCTION: AcpiDmResolveExternal * - * PARAMETERS: None + * PARAMETERS: Path - Path of the external + * Type - Type of the external + * Node - Input node for AcpiNsLookup * + * RETURN: Status + * + * DESCRIPTION: Resolve the external within the namespace by AcpiNsLookup. + * If the returned node is an external and has the same type + * we assume that it was either an existing external or a + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDmResolveExternal ( + char *Path, + UINT8 Type, + ACPI_NAMESPACE_NODE **Node) +{ + ACPI_STATUS Status; + + + Status = AcpiNsLookup (NULL, Path, Type, + ACPI_IMODE_LOAD_PASS1, + ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE, + NULL, Node); + + if (!Node) + { + ACPI_EXCEPTION ((AE_INFO, Status, + "while adding external to namespace [%s]", Path)); + } + + /* Note the asl code "external(a) external(a)" is acceptable ASL */ + + else if ((*Node)->Type == Type && + (*Node)->Flags & ANOBJ_IS_EXTERNAL) + { + return (AE_OK); + } + else + { + ACPI_EXCEPTION ((AE_INFO, AE_ERROR, + "[%s] has conflicting declarations", Path)); + } + + return (AE_ERROR); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmCreateSubobjectForExternal + * + * PARAMETERS: Type - Type of the external + * Node - Namespace node from AcpiNsLookup + * ParamCount - Value to be used for Method + * * RETURN: None * - * DESCRIPTION: Add all externals to the namespace. Allows externals to be + * DESCRIPTION: Add one external to the namespace. Allows external to be * "resolved". * ******************************************************************************/ void -AcpiDmAddExternalsToNamespace ( - void) +AcpiDmCreateSubobjectForExternal ( + UINT8 Type, + ACPI_NAMESPACE_NODE **Node, + UINT32 ParamCount) { - ACPI_STATUS Status; - ACPI_NAMESPACE_NODE *Node; ACPI_OPERAND_OBJECT *ObjDesc; - ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList; - while (External) + switch (Type) { - /* Add the external name (object) into the namespace */ + case ACPI_TYPE_METHOD: - Status = AcpiNsLookup (NULL, External->InternalPath, External->Type, - ACPI_IMODE_LOAD_PASS1, - ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE, - NULL, &Node); + /* For methods, we need to save the argument count */ - if (ACPI_FAILURE (Status)) - { - ACPI_EXCEPTION ((AE_INFO, Status, - "while adding external to namespace [%s]", - External->Path)); - } + ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); + ObjDesc->Method.ParamCount = (UINT8) ParamCount; + (*Node)->Object = ObjDesc; + break; - else switch (External->Type) - { - case ACPI_TYPE_METHOD: + case ACPI_TYPE_REGION: - /* For methods, we need to save the argument count */ + /* Regions require a region sub-object */ - ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); - ObjDesc->Method.ParamCount = (UINT8) External->Value; - Node->Object = ObjDesc; - break; + ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION); + ObjDesc->Region.Node = *Node; + (*Node)->Object = ObjDesc; + break; - case ACPI_TYPE_REGION: + default: - /* Regions require a region sub-object */ + break; + } +} - ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION); - ObjDesc->Region.Node = Node; - Node->Object = ObjDesc; - break; - default: +/******************************************************************************* + * + * FUNCTION: AcpiDmAddOneExternalToNamespace + * + * PARAMETERS: Path - External parse object + * Type - Type of parse object + * ParamCount - External method parameter count + * + * RETURN: None + * + * DESCRIPTION: Add one external to the namespace by resolvign the external + * (by performing a namespace lookup) and annotating the resulting + * namespace node with the approperiate information if the type + * is ACPI_TYPE_REGION or ACPI_TYPE_METHOD. + * + ******************************************************************************/ - break; - } +void +AcpiDmAddOneExternalToNamespace ( + char *Path, + UINT8 Type, + UINT32 ParamCount) +{ + ACPI_STATUS Status; + ACPI_NAMESPACE_NODE *Node; + + Status = AcpiDmResolveExternal (Path, Type, &Node); + + if (ACPI_FAILURE (Status)) + { + return; + } + + AcpiDmCreateSubobjectForExternal (Type, &Node, ParamCount); + +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmAddExternalListToNamespace + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Add all externals within AcpiGbl_ExternalList to the namespace. + * Allows externals to be "resolved". + * + ******************************************************************************/ + +void +AcpiDmAddExternalListToNamespace ( + void) +{ + ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList; + + + while (External) + { + AcpiDmAddOneExternalToNamespace (External->InternalPath, + External->Type, External->Value); External = External->Next; } } @@ -1082,23 +1274,28 @@ AcpiDmAddExternalsToNamespace ( /******************************************************************************* * - * FUNCTION: AcpiDmGetExternalMethodCount + * FUNCTION: AcpiDmGetUnresolvedExternalMethodCount * * PARAMETERS: None * - * RETURN: The number of control method externals in the external list + * RETURN: The number of unresolved control method externals in the + * external list * - * DESCRIPTION: Return the number of method externals that have been generated. - * If any control method externals have been found, we must - * re-parse the entire definition block with the new information - * (number of arguments for the methods.) This is limitation of - * AML, we don't know the number of arguments from the control - * method invocation itself. + * DESCRIPTION: Return the number of unresolved external methods that have been + * generated. If any unresolved control method externals have been + * found, we must re-parse the entire definition block with the new + * information (number of arguments for the methods.) + * This is limitation of AML, we don't know the number of arguments + * from the control method invocation itself. * + * Note: resolved external control methods are external control + * methods encoded with the AML_EXTERNAL_OP bytecode within the + * AML being disassembled. + * ******************************************************************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 00:49:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B724BEE319; Thu, 1 Jun 2017 00:49:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E77172D37; Thu, 1 Jun 2017 00:48:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v510mxXu033937; Thu, 1 Jun 2017 00:48:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v510mxak033936; Thu, 1 Jun 2017 00:48:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706010048.v510mxak033936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 1 Jun 2017 00:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319366 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 00:49:00 -0000 Author: kib Date: Thu Jun 1 00:48:59 2017 New Revision: 319366 URL: https://svnweb.freebsd.org/changeset/base/319366 Log: MFC r319138: Document direct execution mode for rtld. Modified: stable/11/libexec/rtld-elf/rtld.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.1 ============================================================================== --- stable/11/libexec/rtld-elf/rtld.1 Thu Jun 1 00:01:19 2017 (r319365) +++ stable/11/libexec/rtld-elf/rtld.1 Thu Jun 1 00:48:59 2017 (r319366) @@ -282,6 +282,77 @@ instead of postponing it until required. Normally, the filtees are opened at the time of the first symbol resolution from the filter object. .El +.Sh DIRECT EXECUTION MODE +.Nm +is typically used implicitly, loaded by the kernel as requested by the +.Dv PT_INTERP +program header of the executed binary. +.Fx +also supports a direct execution mode for the dynamic linker. +In this mode, the user explicitly executes +.Nm +and provides the path of the program to be linked and executed as +an argument. +This mode allows use of a non-standard dynamic linker for a program +activation without changing the binary or without changing +the installed dynamic linker. +Execution options may be specified. +.Pp +The syntax of the direct invocation is +.Bd -ragged -offset indent +.Pa /libexec/ld-elf.so.1 +.Op Fl f Ar fd +.Op Fl p +.Op Fl - +.Pa image_path +.Op Ar image arguments +.Ed +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl f Ar fd +File descriptor +.Ar fd +references the binary to be activated by +.Nm . +It must already be opened in the process when executing +.Nm . +If this option is specified, +.Ar image_path +is only used to provide the +.Va argv[0] +value to the program. +.It Fl p +If the +.Pa image_path +argument specifies a name which does not contain a slash +.Dq Li / +character, +.Nm +uses the search path provided by the environment variable +.Dv PATH +to find the binary to execute. +.It Fl - +Ends the +.Nm +options. +The argument following +.Fl - +is interpreted as the path of binary to execute. +.El +.Pp +To conform to user expectation to not break some naively restricted +execution environments, in the direct execution mode +.Nm +emulates verification of the binary execute permission +for current user. +The verification only uses Unix +.Dv DACs , +ignores +.Dv ACLs +and is racy by its nature. +The environments which rely on such restrictions are weak +and breakable on its own. .Sh FILES .Bl -tag -width ".Pa /var/run/ld-elf32.so.hints" -compact .It Pa /var/run/ld-elf.so.hints From owner-svn-src-all@freebsd.org Thu Jun 1 00:50:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2620BEE3AA; Thu, 1 Jun 2017 00:50:59 +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 928CD72EC6; Thu, 1 Jun 2017 00:50:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v510owvk034920; Thu, 1 Jun 2017 00:50:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v510owx4034919; Thu, 1 Jun 2017 00:50:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706010050.v510owx4034919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 1 Jun 2017 00:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319367 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 00:50:59 -0000 Author: kib Date: Thu Jun 1 00:50:58 2017 New Revision: 319367 URL: https://svnweb.freebsd.org/changeset/base/319367 Log: MFC r319137: Correct explanation of the dynamic tokens handling. Modified: stable/11/libexec/rtld-elf/rtld.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.1 ============================================================================== --- stable/11/libexec/rtld-elf/rtld.1 Thu Jun 1 00:48:59 2017 (r319366) +++ stable/11/libexec/rtld-elf/rtld.1 Thu Jun 1 00:50:58 2017 (r319367) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2017 +.Dd May 20, 2017 .Dt RTLD 1 .Os .Sh NAME @@ -60,10 +60,11 @@ This is useful for C++ libraries that contain static c .Pp When resolving dependencies for the loaded objects, .Nm -may be allowed to translate dynamic token strings in rpath and soname -by setting +translates dynamic token strings in rpath and soname. +If the .Fl "z origin" -option of the static linker +option of the static linker was set when linking the binary, +the token expansion is performed at the object load time, see .Xr ld 1 . The following strings are recognized now: .Bl -tag -width ".Pa $PLATFORM" From owner-svn-src-all@freebsd.org Thu Jun 1 02:31:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B336DBF1335; Thu, 1 Jun 2017 02:31:15 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8137976391; Thu, 1 Jun 2017 02:31:15 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v512VEDw074396; Thu, 1 Jun 2017 02:31:14 GMT (envelope-from rene@FreeBSD.org) Received: (from rene@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v512VE6F074395; Thu, 1 Jun 2017 02:31:14 GMT (envelope-from rene@FreeBSD.org) Message-Id: <201706010231.v512VE6F074395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rene set sender to rene@FreeBSD.org using -f From: Rene Ladan Date: Thu, 1 Jun 2017 02:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319368 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 02:31:15 -0000 Author: rene (doc,ports committer) Date: Thu Jun 1 02:31:14 2017 New Revision: 319368 URL: https://svnweb.freebsd.org/changeset/base/319368 Log: Welcome back bapt@ to portmgr Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Thu Jun 1 00:50:58 2017 (r319367) +++ head/share/misc/organization.dot Thu Jun 1 02:31:14 2017 (r319368) @@ -30,7 +30,7 @@ coresecretary [label="Core Team Secretary\ncore-secret doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nadamw, antoine, bdrewery, feld\nmat, rene, swills"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nadamw, antoine, bapt, bdrewery\nfeld, mat, rene, swills"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nrene"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\ndelphij,\ndes, gavin, gjb,\nglebius, remko"] From owner-svn-src-all@freebsd.org Thu Jun 1 05:09:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA214AF7297; Thu, 1 Jun 2017 05:09:06 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4CE383310; Thu, 1 Jun 2017 05:09:06 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 6395B5A9F12; Thu, 1 Jun 2017 05:03:39 +0000 (UTC) Date: Thu, 1 Jun 2017 05:03:39 +0000 From: Brooks Davis To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests Message-ID: <20170601050339.GA48398@spindle.one-eyed-alien.net> References: <201705310801.v4V81CjO004032@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline In-Reply-To: <201705310801.v4V81CjO004032@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 05:09:07 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 31, 2017 at 08:01:12AM +0000, Ngie Cooper wrote: > Author: ngie > Date: Wed May 31 08:01:12 2017 > New Revision: 319295 > URL: https://svnweb.freebsd.org/changeset/base/319295 >=20 > Log: > Update the usr.bin/mkimg golden test output files after ^/head@r319125 > =20 > ^/head@r319125 changed the location of the backup pmbr, requiring the > output files to be regenerated, since they're binary disk dumps. > =20 > The output files were regenerated with "make rebase"--fixed in > ^/head@r319294. These should not be stored uuencoded. It serves no purpose other than bloating the repo and causing spammy commit mails like this one where we got a huge tail of garbage output. -- Brooks --Dxnq1zWXvFF0Q93v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJZL6AqAAoJEKzQXbSebgfAEg4H/0f045fAAf4RyrTbOVb+jyDP yEDK4uFNHjB1OTaoexbGSfwv5U0Ub8zOyMZUD+jkYS1dLvQepaPE5dZDWJLGxy6+ D6FkRjeTkFRasavCKqnAH0QtO0rduLzP/5UvRpxR6dNIfGvTvNgQ+sPfBfYWtYvf MyHcgWp9YUJnxg3V39BcZA4Qlsb4LNV7Iyg48oTSW4VA6G8yvQH4sinsreWW9mi1 m9rqtxGdLknQUcQkKR1TGB7uwKGaboVpQurJ81dHpRdWcF2ZMmIujVLMTaytFldx eKf5FMEt2++93nF0h04m5WJzPikokRLbCxpc4DCtdcg4qpt+2HbFn3f5exInvYc= =VOr/ -----END PGP SIGNATURE----- --Dxnq1zWXvFF0Q93v-- From owner-svn-src-all@freebsd.org Thu Jun 1 06:06:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A77E1B79D38; Thu, 1 Jun 2017 06:06:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::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 753A8649E5; Thu, 1 Jun 2017 06:06:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id f27so6714681pfe.0; Wed, 31 May 2017 23:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=iLeso6bHhTujEVy9zuJ6kt5CO1rYEnX2xmduDQM/x80=; b=bEFbLlYkxBk9542J+ctlL3tOqrfGVW2uBKHKh7vJ9ycibySZdWop5iKLYOl9fUjgZ+ XJ1lbUc+kJKQGCbnG5queV0GyuSqN04xGiiLKoL3SWBmeqfbNbfIkb0XxlZ7coCPFs2T F2fqlhAs78OhFAFcSolmBGdtW7sO0+4rF8H7oAsVGkm45YAcI5LtvoPvkqjlNH+e3Ypu h74eJOP+y8MTh7u0Eb0wTEZa9OjuDNdTANvUN00YqzXNFb9NI5h0E+8Q9Dr7PLdbUFIt UgX9AlLhe0B/j9rGcrKLO+81gj4Oo0w6psCWA2bk8uTVUGuENggrGhLamxwJ7NvmP23E 7x0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=iLeso6bHhTujEVy9zuJ6kt5CO1rYEnX2xmduDQM/x80=; b=VE1b5BmA0mEhwrmGSu/W4tblKr+ifFNomKTWt1zAuz64B0XUOQMCET2t9pZysbNdzX sf0nc6NmXTDa4sNeiyd3TYKTOXLEQFopC5pIFWwowmZSvKgywG6I3cMFEnJPaisQDppX Z99CU2PeStzkdKp7nhH3MsEol1HOByig9z41eOvGCF2xQ8juAGnrjY3SvXRPAD9XBRs5 eKJhHXQ+AlRrY5SdGKJJnyEcxn9Y/JLr3TneZalJ0fJ9kPowNVTgZtAmYU/0GWRQl27P RSBBogRiEWfkVZoNy2YxneIwOYalRrW8SCqoFJIjqH5PH5y7eMyfZfIxVFCQF7JByA2+ 9G6Q== X-Gm-Message-State: AODbwcDi54SgY/spnWqedUxlWnZpEIJAGi8NYiBEIruIbjs4V5rkdCTC frvOpYoawkidTcUtLs4= X-Received: by 10.98.19.206 with SMTP id 75mr34496057pft.208.1496297197773; Wed, 31 May 2017 23:06:37 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id f86sm32096191pfj.128.2017.05.31.23.06.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2017 23:06:37 -0700 (PDT) From: "Ngie Cooper (yaneurabeya)" Message-Id: <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> Content-Type: multipart/signed; boundary="Apple-Mail=_DA06CB10-94EA-4DD7-B34D-674163D3BACC"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests Date: Wed, 31 May 2017 23:06:50 -0700 In-Reply-To: <20170601050339.GA48398@spindle.one-eyed-alien.net> Cc: Ngie Cooper , Marcel Moolenaar , "Simon J. Gerraty" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Brooks Davis References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:06:38 -0000 --Apple-Mail=_DA06CB10-94EA-4DD7-B34D-674163D3BACC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 31, 2017, at 10:03 PM, Brooks Davis wrote: >=20 > On Wed, May 31, 2017 at 08:01:12AM +0000, Ngie Cooper wrote: >> Author: ngie >> Date: Wed May 31 08:01:12 2017 >> New Revision: 319295 >> URL: https://svnweb.freebsd.org/changeset/base/319295 >>=20 >> Log: >> Update the usr.bin/mkimg golden test output files after = ^/head@r319125 >>=20 >> ^/head@r319125 changed the location of the backup pmbr, requiring = the >> output files to be regenerated, since they're binary disk dumps. >>=20 >> The output files were regenerated with "make rebase"--fixed in >> ^/head@r319294. >=20 > These should not be stored uuencoded. It serves no purpose other > than bloating the repo and causing spammy commit mails like this one > where we got a huge tail of garbage output. Hi Brooks, I=E2=80=99m not entirely sure why the files were uuencoded to be = honest. I think that=E2=80=99s a good question for Marcel and some of = the folks at Juniper, since they wrote the tool/tests. Thanks! -Ngie PS I agree based on what little I know, but I don=E2=80=99t necessarily = know what trade offs were made with writing these tests. --Apple-Mail=_DA06CB10-94EA-4DD7-B34D-674163D3BACC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJZL676AAoJEPWDqSZpMIYVaFEP/0TYeegYaOrr06PMIZWAILpK GSU+tTobSMU4CBEkyQaUuQACCcvytTaeRwDItpspCTUP97A5vHADDKgV9onBBp2f RSLiWaE23EQ1X+auLQOkm8ihKic8fvLQhlpXxCDyVanguByhn8LaIv2rMnWiADbF pdWPvi8mkmg+wO1c/uhJGjs7Wy/QTw5XVljBmd+d10ElKpWUGam5SL2FVuyA42Yh NPp6Jz+4CdpYpt89+O2FGdX3ZiUSIprOODNesPWzEHCIBfDBU2FnYipZZzDa1acD /j/T4msKUfNT4zQwGXS72yf57gEsgUY8LNzZ2Xx2JGZ+TrKKBgA79P3zZsgMOF7E nL2Fg/7bNxElfAP1jdb4rOBEY7F23tEZsLHGXIDIW1d6dBf5Cowao2vv+EpKVC8l QRSWflLEAw3zqGLj2s58aJjJUj16VmmYb3hBkdp9rNw/o7vJn5VsIcz336OpJ8LA s/NbJoSmPsnj8zPkHqu1gOTNj38jQu87Pm+asWG3u2Dfr5eYJ+FZi/A1BmI4ikPD +mCjwKfUt1luYeue9sWw/ouzV9GMomuEDllXOhAl9fB2nOtR6hciOfKyx7BNfnAW kFff7F9wuuddRU/pFpawuIsHZ/4nh3lf9G9JLbiAauDtUm+y45sHZrwbvnjDGWxd Ko9D8ZKiZKRFU9RcRDfp =5SHd -----END PGP SIGNATURE----- --Apple-Mail=_DA06CB10-94EA-4DD7-B34D-674163D3BACC-- From owner-svn-src-all@freebsd.org Thu Jun 1 06:16:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44D55B7AA69; Thu, 1 Jun 2017 06:16:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11DFB64F13; Thu, 1 Jun 2017 06:16:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516GwmZ068150; Thu, 1 Jun 2017 06:16:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516GwpH068148; Thu, 1 Jun 2017 06:16:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010616.v516GwpH068148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319370 - stable/10/lib/libnv/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:16:59 -0000 Author: ngie Date: Thu Jun 1 06:16:57 2017 New Revision: 319370 URL: https://svnweb.freebsd.org/changeset/base/319370 Log: MFC r319156,r319159: r319156: :nvlist_unpack__duplicate_key : check the result of nvlist_pack(3) This fixes a potential NULL pointer dereference. CID: 1362051 r319159: :dnvlist_get_string__default_value: fix a bogus string comparison test Check actual_value vs "5", not "5" vs itself. CID: 1362021 Modified: stable/10/lib/libnv/tests/dnv_tests.cc stable/10/lib/libnv/tests/nv_tests.cc Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libnv/tests/dnv_tests.cc ============================================================================== --- stable/10/lib/libnv/tests/dnv_tests.cc Thu Jun 1 06:12:25 2017 (r319369) +++ stable/10/lib/libnv/tests/dnv_tests.cc Thu Jun 1 06:16:57 2017 (r319370) @@ -148,7 +148,7 @@ ATF_TEST_CASE_BODY(dnvlist_get_string__default_value) ATF_REQUIRE_EQ(strcmp(dnvlist_get_string(nvl, "hthth", "fd"), "fd"), 0); actual_value = dnvlist_get_string(nvl, "5", "5"); - ATF_REQUIRE_EQ(strcmp("5", "5"), 0); + ATF_REQUIRE_EQ(strcmp(actual_value, "5"), 0); nvlist_destroy(nvl); } Modified: stable/10/lib/libnv/tests/nv_tests.cc ============================================================================== --- stable/10/lib/libnv/tests/nv_tests.cc Thu Jun 1 06:12:25 2017 (r319369) +++ stable/10/lib/libnv/tests/nv_tests.cc Thu Jun 1 06:16:57 2017 (r319370) @@ -605,6 +605,7 @@ ATF_TEST_CASE_BODY(nvlist_unpack__duplicate_key) nvlist_add_number(nvl, key2, 10); packed = nvlist_pack(nvl, &size); + ATF_REQUIRE(packed != NULL); /* * Mangle the packed nvlist by replacing key1 with key2, creating a From owner-svn-src-all@freebsd.org Thu Jun 1 06:17:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86D24B7AA7B; Thu, 1 Jun 2017 06:17:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5509564F15; Thu, 1 Jun 2017 06:17:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516H1ED068202; Thu, 1 Jun 2017 06:17:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516H1Pj068200; Thu, 1 Jun 2017 06:17:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010617.v516H1Pj068200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319371 - stable/11/lib/libnv/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:17:02 -0000 Author: ngie Date: Thu Jun 1 06:17:01 2017 New Revision: 319371 URL: https://svnweb.freebsd.org/changeset/base/319371 Log: MFC r319156,r319159: r319156: :nvlist_unpack__duplicate_key : check the result of nvlist_pack(3) This fixes a potential NULL pointer dereference. CID: 1362051 r319159: :dnvlist_get_string__default_value: fix a bogus string comparison test Check actual_value vs "5", not "5" vs itself. CID: 1362021 Modified: stable/11/lib/libnv/tests/dnv_tests.cc stable/11/lib/libnv/tests/nv_tests.cc Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libnv/tests/dnv_tests.cc ============================================================================== --- stable/11/lib/libnv/tests/dnv_tests.cc Thu Jun 1 06:16:57 2017 (r319370) +++ stable/11/lib/libnv/tests/dnv_tests.cc Thu Jun 1 06:17:01 2017 (r319371) @@ -150,7 +150,7 @@ ATF_TEST_CASE_BODY(dnvlist_get_string__default_value) ATF_REQUIRE_EQ(strcmp(dnvlist_get_string(nvl, "hthth", "fd"), "fd"), 0); actual_value = dnvlist_get_string(nvl, "5", "5"); - ATF_REQUIRE_EQ(strcmp("5", "5"), 0); + ATF_REQUIRE_EQ(strcmp(actual_value, "5"), 0); nvlist_destroy(nvl); } Modified: stable/11/lib/libnv/tests/nv_tests.cc ============================================================================== --- stable/11/lib/libnv/tests/nv_tests.cc Thu Jun 1 06:16:57 2017 (r319370) +++ stable/11/lib/libnv/tests/nv_tests.cc Thu Jun 1 06:17:01 2017 (r319371) @@ -640,6 +640,7 @@ ATF_TEST_CASE_BODY(nvlist_unpack__duplicate_key) nvlist_add_number(nvl, key2, 10); packed = nvlist_pack(nvl, &size); + ATF_REQUIRE(packed != NULL); /* * Mangle the packed nvlist by replacing key1 with key2, creating a From owner-svn-src-all@freebsd.org Thu Jun 1 06:26:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 734BEB7B9F4; Thu, 1 Jun 2017 06:26:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8DD65552; Thu, 1 Jun 2017 06:26:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516QZk1072698; Thu, 1 Jun 2017 06:26:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516QZJm072697; Thu, 1 Jun 2017 06:26:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010626.v516QZJm072697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319372 - stable/11/usr.bin/procstat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:26:36 -0000 Author: ngie Date: Thu Jun 1 06:26:35 2017 New Revision: 319372 URL: https://svnweb.freebsd.org/changeset/base/319372 Log: MFC r318175,r318178,r318179: r318175: procstat(1): clarify the Signal Disposition section - Fix a typo (SIGIGN -> SIG_IGN). Use .Dv when referencing SIG_IGN. - Use semi-colons as soft breaks when separating sentences for the FLAGS section. - Tweak wording for C slightly to flow better and to be a bit more technically correct (signals with handlers installed will be caught by the target program). - Reference signal(3) in the SEE ALSO section. r318178: procstat(1): document all possible `PRO` (network protocol) values Reference the appropriate section 4 manpages for networking protocols. r318179: procstat(1): also reference icmp(4) and sctp(4) This was missed in the previous commit by accident. MFC with: r318178 Modified: stable/11/usr.bin/procstat/procstat.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/procstat/procstat.1 ============================================================================== --- stable/11/usr.bin/procstat/procstat.1 Thu Jun 1 06:17:01 2017 (r319371) +++ stable/11/usr.bin/procstat/procstat.1 Thu Jun 1 06:26:35 2017 (r319372) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 5, 2015 +.Dd May 11, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -269,6 +269,60 @@ omitted, and a new capabilities field will be included as described in .Xr cap_rights_limit 2 , present for each capability descriptor. +.Pp +The following network protocols may be displayed (grouped by address family): +.Pp +.Dv AF_INET , +.Dv AF_INET6 +.Pp +.Bl -tag -width indent -compact +.It ICM +.Dv IPPROTO_ICMP ; +see +.Xr icmp 4 . +.It IPD +.Dv IPPROTO_DIVERT ; +see +.Xr divert 4 . +.It IP\? +unknown protocol. +.It RAW +.Dv IPPROTO_RAW ; +see +.Xr ip 4 . +.It SCT +.Dv IPPROTO_SCTP ; +see +.Xr sctp 4 . +.It TCP +.Dv IPPROTO_TCP ; +see +.Xr tcp 4 . +.It UDP +.Dv IPPROTO_UDP ; +see +.Xr udp 4 . +.El +.Pp +.Dv AF_LOCAL +.Pp +.Bl -tag -width indent -compact +.It UDD +.Dv IPPROTO_UDP ; +see +.Xr udp 4 . +.It UDS +.Dv IPPROTO_TCP ; +see +.Xr tcp 4 . +.It UD\? +unknown protocol. +.El +.Pp +.Bl -tag -width indent -compact +.It \? +unknown address family. +.El .Ss Signal Disposition Information Display signal pending and disposition for a process: .Pp @@ -283,11 +337,13 @@ signal name process signal disposition details, three symbols .Bl -tag -width X -compact .It P -if signal is pending in the global process queue, - otherwise +if signal is pending in the global process queue; - otherwise. .It I -if signal delivery disposition is SIGIGN, - otherwise +if signal delivery disposition is +.Dv SIG_IGN; +- otherwise. .It C -if signal delivery is to catch it, - otherwise +if the signal will be caught; - otherwise. .El .El .Pp @@ -540,8 +596,15 @@ auxiliary vector value .Xr cap_rights_limit 2 , .Xr libprocstat 3 , .Xr libxo 3 , +.Xr signal 3 , .Xr xo_parse_args 3 , .Xr ddb 4 , +.Xr divert 4 , +.Xr icmp 4 , +.Xr ip 4 , +.Xr sctp 4 , +.Xr tcp 4 , +.Xr udp 4 , .Xr stack 9 .Sh AUTHORS .An Robert N M Watson Aq Mt rwatson@FreeBSD.org . From owner-svn-src-all@freebsd.org Thu Jun 1 06:30:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0F8CB7BD99; Thu, 1 Jun 2017 06:30:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE14165759; Thu, 1 Jun 2017 06:30:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516UM6Q072959; Thu, 1 Jun 2017 06:30:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516UMNe072958; Thu, 1 Jun 2017 06:30:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010630.v516UMNe072958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:30:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319374 - stable/10/usr.bin/procstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:30:24 -0000 Author: ngie Date: Thu Jun 1 06:30:22 2017 New Revision: 319374 URL: https://svnweb.freebsd.org/changeset/base/319374 Log: MFC r318175: procstat(1): clarify the Signal Disposition section - Fix a typo (SIGIGN -> SIG_IGN). Use .Dv when referencing SIG_IGN. - Use semi-colons as soft breaks when separating sentences for the FLAGS section. - Tweak wording for C slightly to flow better and to be a bit more technically correct (signals with handlers installed will be caught by the target program). - Reference signal(3) in the SEE ALSO section. Modified: stable/10/usr.bin/procstat/procstat.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/procstat/procstat.1 ============================================================================== --- stable/10/usr.bin/procstat/procstat.1 Thu Jun 1 06:27:15 2017 (r319373) +++ stable/10/usr.bin/procstat/procstat.1 Thu Jun 1 06:30:22 2017 (r319374) @@ -329,11 +329,13 @@ signal name process signal disposition details, three symbols .Bl -tag -width X -compact .It P -if signal is pending in the global process queue, - otherwise +if signal is pending in the global process queue; - otherwise. .It I -if signal delivery disposition is SIGIGN, - otherwise +if signal delivery disposition is +.Dv SIG_IGN; +- otherwise. .It C -if signal delivery is to catch it, - otherwise +if the signal will be caught; - otherwise. .El .El .Pp @@ -584,6 +586,7 @@ auxiliary vector value .Xr sockstat 1 , .Xr cap_enter 2 , .Xr cap_rights_limit 2 , +.Xr signal 3 , .Xr ddb 4 , .Xr divert 4 , .Xr ip 4 , From owner-svn-src-all@freebsd.org Thu Jun 1 06:39:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C592CB7CF83; Thu, 1 Jun 2017 06:39:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95EF76635F; Thu, 1 Jun 2017 06:39:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516dvYL077385; Thu, 1 Jun 2017 06:39:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516dvk0077384; Thu, 1 Jun 2017 06:39:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010639.v516dvk0077384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319383 - stable/11/usr.bin/getconf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:39:58 -0000 Author: ngie Date: Thu Jun 1 06:39:57 2017 New Revision: 319383 URL: https://svnweb.freebsd.org/changeset/base/319383 Log: MFC r318434: Make the `.gperf.c` suffix rule depend on fake-gperf.awk Parameterize out fake-gperf.awk to avoid duplicating the path Modified: stable/11/usr.bin/getconf/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/getconf/Makefile ============================================================================== --- stable/11/usr.bin/getconf/Makefile Thu Jun 1 06:39:55 2017 (r319382) +++ stable/11/usr.bin/getconf/Makefile Thu Jun 1 06:39:57 2017 (r319383) @@ -13,8 +13,9 @@ CLEANFILES+= confstr.c limits.c pathconf.c progenv.c s all: conflicts -.gperf.c: - LC_ALL=C awk -f ${.CURDIR}/fake-gperf.awk ${.IMPSRC} >${.TARGET} +FAKE_GPERF= ${.CURDIR}/fake-gperf.awk +.gperf.c: ${FAKE_GPERF} + LC_ALL=C awk -f ${FAKE_GPERF} ${.IMPSRC} >${.TARGET} .gperf.names: LC_ALL=C awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | \ From owner-svn-src-all@freebsd.org Thu Jun 1 06:41:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D7B8B7D254; Thu, 1 Jun 2017 06:41:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18686666F0; Thu, 1 Jun 2017 06:41:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516fSTL081087; Thu, 1 Jun 2017 06:41:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516fRZ4081084; Thu, 1 Jun 2017 06:41:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010641.v516fRZ4081084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319385 - in stable/10: etc/mtree usr.bin/getconf usr.bin/getconf/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:41:29 -0000 Author: ngie Date: Thu Jun 1 06:41:27 2017 New Revision: 319385 URL: https://svnweb.freebsd.org/changeset/base/319385 Log: MFC r318436: usr.bin/getconf: add some initial tests Items tested via this commit are: - Some basic POSIX constants. - Some valid programming environments with -v. - Some invalid programming environments via -v. NOTE: this test makes assumptions about ILP32/LP32 vs LP64 that are currently not true on all architectures to avoid hardcoding some architectures in the tests. I'm working on improving getconf(1) to be more sane about handling ILP32/LP32 vs LP64. Future commits are coming soon to address this. Tested with: amd64, i386 Added: stable/10/usr.bin/getconf/tests/ - copied from r318436, head/usr.bin/getconf/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/usr.bin/getconf/Makefile stable/10/usr.bin/getconf/getconf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Jun 1 06:41:24 2017 (r319384) +++ stable/10/etc/mtree/BSD.tests.dist Thu Jun 1 06:41:27 2017 (r319385) @@ -588,6 +588,8 @@ .. file2c .. + getconf + .. grep .. gzip Modified: stable/10/usr.bin/getconf/Makefile ============================================================================== --- stable/10/usr.bin/getconf/Makefile Thu Jun 1 06:41:24 2017 (r319384) +++ stable/10/usr.bin/getconf/Makefile Thu Jun 1 06:41:27 2017 (r319385) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= getconf SRCS= confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c @@ -34,5 +36,9 @@ conflicting.names: confstr.names limits.names sysconf. unique.names: conflicting.names LC_ALL=C sort -u ${.ALLSRC} >${.TARGET} + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/usr.bin/getconf/getconf.h ============================================================================== --- stable/10/usr.bin/getconf/getconf.h Thu Jun 1 06:41:24 2017 (r319384) +++ stable/10/usr.bin/getconf/getconf.h Thu Jun 1 06:41:27 2017 (r319385) @@ -36,8 +36,15 @@ typedef long long intmax_t; #include #endif +typedef enum { + PROG_ENV_VALID_NO_ALT_PATH = -1, + PROG_ENV_INVALID = 0, + PROG_ENV_VALID_HAS_ALT_PATH = 1, + PROG_ENV_UNKNOWN = 2, +} prog_env_validity; + int find_confstr(const char *name, int *key); int find_limit(const char *name, intmax_t *value); int find_pathconf(const char *name, int *key); -int find_progenv(const char *name, const char **alt_path); +prog_env_validity find_progenv(const char *name, const char **alt_path); int find_sysconf(const char *name, int *key); From owner-svn-src-all@freebsd.org Thu Jun 1 06:36:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B335B7C6E3; Thu, 1 Jun 2017 06:36:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DC3A66049; Thu, 1 Jun 2017 06:36:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516afZV077082; Thu, 1 Jun 2017 06:36:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516aftM077080; Thu, 1 Jun 2017 06:36:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010636.v516aftM077080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319380 - in stable/11: share/man/man4 tools/build/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:36:42 -0000 Author: ngie Date: Thu Jun 1 06:36:40 2017 New Revision: 319380 URL: https://svnweb.freebsd.org/changeset/base/319380 Log: MFC r318177: Unconditionally install udp(4) and udplite(4) again I added this to the MK_USB != no block in error in r278202. Modified: stable/11/share/man/man4/Makefile stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Thu Jun 1 06:35:40 2017 (r319379) +++ stable/11/share/man/man4/Makefile Thu Jun 1 06:36:40 2017 (r319380) @@ -540,6 +540,8 @@ MAN= aac.4 \ tws.4 \ tx.4 \ txp.4 \ + udp.4 \ + udplite.4 \ ure.4 \ vale.4 \ vga.4 \ @@ -935,8 +937,6 @@ MAN+= \ ucycom.4 \ udav.4 \ udbp.4 \ - udp.4 \ - udplite.4 \ udl.4 \ uep.4 \ ufm.4 \ Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 1 06:35:40 2017 (r319379) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 1 06:36:40 2017 (r319380) @@ -9052,8 +9052,6 @@ OLD_FILES+=usr/share/man/man4/ucom.4.gz OLD_FILES+=usr/share/man/man4/ucycom.4.gz OLD_FILES+=usr/share/man/man4/udav.4.gz OLD_FILES+=usr/share/man/man4/udbp.4.gz -OLD_FILES+=usr/share/man/man4/udp.4.gz -OLD_FILES+=usr/share/man/man4/udplite.4.gz OLD_FILES+=usr/share/man/man4/uep.4.gz OLD_FILES+=usr/share/man/man4/ufm.4.gz OLD_FILES+=usr/share/man/man4/ufoma.4.gz From owner-svn-src-all@freebsd.org Thu Jun 1 06:42:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09A2EB7D344; Thu, 1 Jun 2017 06:42:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C34D066924; Thu, 1 Jun 2017 06:42:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516gLnf081248; Thu, 1 Jun 2017 06:42:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516gLfQ081247; Thu, 1 Jun 2017 06:42:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010642.v516gLfQ081247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319387 - stable/11/usr.bin/getconf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:42:23 -0000 Author: ngie Date: Thu Jun 1 06:42:21 2017 New Revision: 319387 URL: https://svnweb.freebsd.org/changeset/base/319387 Log: MFC r318437: Revert local changes to find_progenv accidentally committed in r318436 MFC with: r318436 Modified: stable/11/usr.bin/getconf/getconf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/getconf/getconf.h ============================================================================== --- stable/11/usr.bin/getconf/getconf.h Thu Jun 1 06:42:20 2017 (r319386) +++ stable/11/usr.bin/getconf/getconf.h Thu Jun 1 06:42:21 2017 (r319387) @@ -36,15 +36,8 @@ typedef long long intmax_t; #include #endif -typedef enum { - PROG_ENV_VALID_NO_ALT_PATH = -1, - PROG_ENV_INVALID = 0, - PROG_ENV_VALID_HAS_ALT_PATH = 1, - PROG_ENV_UNKNOWN = 2, -} prog_env_validity; - int find_confstr(const char *name, int *key); int find_limit(const char *name, intmax_t *value); int find_pathconf(const char *name, int *key); -prog_env_validity find_progenv(const char *name, const char **alt_path); +int find_progenv(const char *name, const char **alt_path); int find_sysconf(const char *name, int *key); From owner-svn-src-all@freebsd.org Thu Jun 1 06:12:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6006FB7A645; Thu, 1 Jun 2017 06:12:27 +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 1E95A64DC2; Thu, 1 Jun 2017 06:12:27 +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 v516CQ5b067876; Thu, 1 Jun 2017 06:12:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516CPGj067866; Thu, 1 Jun 2017 06:12:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706010612.v516CPGj067866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 1 Jun 2017 06:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319369 - in head: lib/libc/rpc lib/libc/xdr sys/rpc sys/xdr usr.sbin/rpcbind X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:12:27 -0000 Author: delphij Date: Thu Jun 1 06:12:25 2017 New Revision: 319369 URL: https://svnweb.freebsd.org/changeset/base/319369 Log: * limit size of buffers to RPC_MAXDATASIZE * don't leak memory * be more picky about bad parameters From: https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt via NetBSD. Reviewed by: emaste, cem (earlier version) Differential Revision: https://reviews.freebsd.org/D10922 MFC after: 3 days Modified: head/lib/libc/rpc/rpc_generic.c head/lib/libc/rpc/rpcb_prot.c head/lib/libc/rpc/rpcb_st_xdr.c head/lib/libc/xdr/xdr.c head/sys/rpc/rpc_generic.c head/sys/rpc/rpcb_clnt.c head/sys/rpc/rpcb_prot.c head/sys/xdr/xdr.c head/usr.sbin/rpcbind/rpcb_svc_com.c Modified: head/lib/libc/rpc/rpc_generic.c ============================================================================== --- head/lib/libc/rpc/rpc_generic.c Thu Jun 1 02:31:14 2017 (r319368) +++ head/lib/libc/rpc/rpc_generic.c Thu Jun 1 06:12:25 2017 (r319369) @@ -609,6 +609,8 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf switch (af) { case AF_INET: + if (nbuf->len < sizeof(*sin)) + return NULL; sin = nbuf->buf; if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf) == NULL) @@ -620,6 +622,8 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf break; #ifdef INET6 case AF_INET6: + if (nbuf->len < sizeof(*sin6)) + return NULL; sin6 = nbuf->buf; if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6) == NULL) @@ -658,6 +662,10 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr) port = 0; sin = NULL; + + if (uaddr == NULL) + return NULL; + addrstr = strdup(uaddr); if (addrstr == NULL) return NULL; Modified: head/lib/libc/rpc/rpcb_prot.c ============================================================================== --- head/lib/libc/rpc/rpcb_prot.c Thu Jun 1 02:31:14 2017 (r319368) +++ head/lib/libc/rpc/rpcb_prot.c Thu Jun 1 06:12:25 2017 (r319369) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "un-namespace.h" bool_t @@ -62,13 +63,13 @@ xdr_rpcb(XDR *xdrs, RPCB *objp) if (!xdr_rpcvers(xdrs, &objp->r_vers)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_netid, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_addr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_addr, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_owner, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_owner, RPC_MAXDATASIZE)) { return (FALSE); } return (TRUE); @@ -162,19 +163,19 @@ xdr_rpcblist(XDR *xdrs, RPCBLIST **rp) bool_t xdr_rpcb_entry(XDR *xdrs, rpcb_entry *objp) { - if (!xdr_string(xdrs, &objp->r_maddr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_maddr, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_netid, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_u_int32_t(xdrs, &objp->r_nc_semantics)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_protofmly, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_protofmly, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_proto, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_proto, RPC_MAXDATASIZE)) { return (FALSE); } return (TRUE); @@ -289,7 +290,7 @@ xdr_rpcb_rmtcallres(XDR *xdrs, struct rpcb_rmtcallres bool_t dummy; struct r_rpcb_rmtcallres *objp = (struct r_rpcb_rmtcallres *)(void *)p; - if (!xdr_string(xdrs, &objp->addr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->addr, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_u_int(xdrs, &objp->results.results_len)) { Modified: head/lib/libc/rpc/rpcb_st_xdr.c ============================================================================== --- head/lib/libc/rpc/rpcb_st_xdr.c Thu Jun 1 02:31:14 2017 (r319368) +++ head/lib/libc/rpc/rpcb_st_xdr.c Thu Jun 1 06:12:25 2017 (r319369) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#include #include "un-namespace.h" /* Link list of all the stats about getport and getaddr */ @@ -63,7 +64,7 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp) if (!xdr_int(xdrs, &objp->failure)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } @@ -115,7 +116,7 @@ xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *ob IXDR_PUT_INT32(buf, objp->failure); IXDR_PUT_INT32(buf, objp->indirect); } - if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } pnext = &objp->next; @@ -154,7 +155,7 @@ xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *ob objp->failure = (int)IXDR_GET_INT32(buf); objp->indirect = (int)IXDR_GET_INT32(buf); } - if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_pointer(xdrs, (char **) pnext, @@ -182,7 +183,7 @@ xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *ob if (!xdr_int(xdrs, &objp->indirect)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_pointer(xdrs, (char **) pnext, Modified: head/lib/libc/xdr/xdr.c ============================================================================== --- head/lib/libc/xdr/xdr.c Thu Jun 1 02:31:14 2017 (r319368) +++ head/lib/libc/xdr/xdr.c Thu Jun 1 06:12:25 2017 (r319369) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include "un-namespace.h" @@ -64,7 +66,6 @@ typedef u_quad_t u_longlong_t; /* ANSI unsign */ #define XDR_FALSE ((long) 0) #define XDR_TRUE ((long) 1) -#define LASTUNSIGNED ((u_int) 0-1) /* * for unit alignment @@ -561,6 +562,7 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m { char *sp = *cpp; /* sp is the actual string pointer */ u_int nodesize; + bool_t ret, allocated = FALSE; /* * first deal with the length since xdr bytes are counted @@ -584,6 +586,7 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m } if (sp == NULL) { *cpp = sp = mem_alloc(nodesize); + allocated = TRUE; } if (sp == NULL) { warnx("xdr_bytes: out of memory"); @@ -592,7 +595,14 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m /* FALLTHROUGH */ case XDR_ENCODE: - return (xdr_opaque(xdrs, sp, nodesize)); + ret = xdr_opaque(xdrs, sp, nodesize); + if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) { + if (allocated == TRUE) { + free(sp); + *cpp = NULL; + } + } + return (ret); case XDR_FREE: if (sp != NULL) { @@ -683,6 +693,7 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) char *sp = *cpp; /* sp is the actual string pointer */ u_int size; u_int nodesize; + bool_t ret, allocated = FALSE; /* * first deal with the length since xdr strings are counted-strings @@ -716,8 +727,10 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) if (nodesize == 0) { return (TRUE); } - if (sp == NULL) + if (sp == NULL) { *cpp = sp = mem_alloc(nodesize); + allocated = TRUE; + } if (sp == NULL) { warnx("xdr_string: out of memory"); return (FALSE); @@ -726,7 +739,14 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) /* FALLTHROUGH */ case XDR_ENCODE: - return (xdr_opaque(xdrs, sp, size)); + ret = xdr_opaque(xdrs, sp, size); + if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) { + if (allocated == TRUE) { + free(sp); + *cpp = NULL; + } + } + return (ret); case XDR_FREE: mem_free(sp, nodesize); @@ -744,7 +764,7 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) bool_t xdr_wrapstring(XDR *xdrs, char **cpp) { - return xdr_string(xdrs, cpp, LASTUNSIGNED); + return xdr_string(xdrs, cpp, RPC_MAXDATASIZE); } /* Modified: head/sys/rpc/rpc_generic.c ============================================================================== --- head/sys/rpc/rpc_generic.c Thu Jun 1 02:31:14 2017 (r319368) +++ head/sys/rpc/rpc_generic.c Thu Jun 1 06:12:25 2017 (r319369) @@ -311,6 +311,8 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf switch (af) { case AF_INET: + if (nbuf->len < sizeof(*sin)) + return NULL; sin = nbuf->buf; if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf) == NULL) @@ -323,6 +325,8 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf break; #ifdef INET6 case AF_INET6: + if (nbuf->len < sizeof(*sin6)) + return NULL; sin6 = nbuf->buf; if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6) == NULL) @@ -366,6 +370,10 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr) port = 0; sin = NULL; + + if (uaddr == NULL) + return NULL; + addrstr = strdup(uaddr, M_RPC); if (addrstr == NULL) return NULL; Modified: head/sys/rpc/rpcb_clnt.c ============================================================================== --- head/sys/rpc/rpcb_clnt.c Thu Jun 1 02:31:14 2017 (r319368) +++ head/sys/rpc/rpcb_clnt.c Thu Jun 1 06:12:25 2017 (r319369) @@ -1287,6 +1287,11 @@ xdr_netbuf(XDR *xdrs, struct netbuf *objp) return (FALSE); } pp = &objp->buf; + + if (objp->maxlen > RPC_MAXDATASIZE) { + return (FALSE); + } + dummy = xdr_bytes(xdrs, (char **) pp, (u_int *)&(objp->len), objp->maxlen); return (dummy); Modified: head/sys/rpc/rpcb_prot.c ============================================================================== --- head/sys/rpc/rpcb_prot.c Thu Jun 1 02:31:14 2017 (r319368) +++ head/sys/rpc/rpcb_prot.c Thu Jun 1 06:12:25 2017 (r319369) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include bool_t @@ -74,13 +75,13 @@ xdr_rpcb(XDR *xdrs, RPCB *objp) if (!xdr_uint32_t(xdrs, &objp->r_vers)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_netid, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_addr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_addr, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_owner, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_owner, RPC_MAXDATASIZE)) { return (FALSE); } return (TRUE); @@ -175,19 +176,19 @@ xdr_rpcblist(XDR *xdrs, RPCBLIST **rp) bool_t xdr_rpcb_entry(XDR *xdrs, rpcb_entry *objp) { - if (!xdr_string(xdrs, &objp->r_maddr, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_maddr, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_netid, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_netid, RPC_MAXDATASIZE)) { return (FALSE); } if (!xdr_uint32_t(xdrs, &objp->r_nc_semantics)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_protofmly, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_protofmly, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_string(xdrs, &objp->r_nc_proto, (u_int)~0)) { + if (!xdr_string(xdrs, &objp->r_nc_proto, RPC_MAXDATASIZE)) { return (FALSE); } return (TRUE); Modified: head/sys/xdr/xdr.c ============================================================================== --- head/sys/xdr/xdr.c Thu Jun 1 02:31:14 2017 (r319368) +++ head/sys/xdr/xdr.c Thu Jun 1 06:12:25 2017 (r319369) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -62,7 +64,6 @@ typedef u_quad_t u_longlong_t; /* ANSI unsign */ #define XDR_FALSE ((long) 0) #define XDR_TRUE ((long) 1) -#define LASTUNSIGNED ((u_int) 0-1) /* * for unit alignment @@ -503,6 +504,7 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m { char *sp = *cpp; /* sp is the actual string pointer */ u_int nodesize; + bool_t ret, allocated = FALSE; /* * first deal with the length since xdr bytes are counted @@ -526,6 +528,7 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m } if (sp == NULL) { *cpp = sp = mem_alloc(nodesize); + allocated = TRUE; } if (sp == NULL) { printf("xdr_bytes: out of memory"); @@ -534,7 +537,14 @@ xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int m /* FALLTHROUGH */ case XDR_ENCODE: - return (xdr_opaque(xdrs, sp, nodesize)); + ret = xdr_opaque(xdrs, sp, nodesize); + if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) { + if (allocated == TRUE) { + mem_free(sp, nodesize); + *cpp = NULL; + } + } + return (ret); case XDR_FREE: if (sp != NULL) { @@ -622,6 +632,7 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) char *sp = *cpp; /* sp is the actual string pointer */ u_int size; u_int nodesize; + bool_t ret, allocated = FALSE; /* * first deal with the length since xdr strings are counted-strings @@ -655,8 +666,10 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) if (nodesize == 0) { return (TRUE); } - if (sp == NULL) + if (sp == NULL) { *cpp = sp = mem_alloc(nodesize); + allocated = TRUE; + } if (sp == NULL) { printf("xdr_string: out of memory"); return (FALSE); @@ -665,7 +678,14 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) /* FALLTHROUGH */ case XDR_ENCODE: - return (xdr_opaque(xdrs, sp, size)); + ret = xdr_opaque(xdrs, sp, size); + if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) { + if (allocated == TRUE) { + mem_free(sp, nodesize); + *cpp = NULL; + } + } + return (ret); case XDR_FREE: mem_free(sp, nodesize); @@ -683,7 +703,7 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize) bool_t xdr_wrapstring(XDR *xdrs, char **cpp) { - return xdr_string(xdrs, cpp, LASTUNSIGNED); + return xdr_string(xdrs, cpp, RPC_MAXDATASIZE); } /* Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_com.c Thu Jun 1 02:31:14 2017 (r319368) +++ head/usr.sbin/rpcbind/rpcb_svc_com.c Thu Jun 1 06:12:25 2017 (r319369) @@ -55,6 +55,7 @@ #include #ifdef PORTMAP #include +#include #include #endif /* PORTMAP */ #include @@ -418,7 +419,8 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rq static bool_t xdr_encap_parms(XDR *xdrs, struct encap_parms *epp) { - return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0)); + return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), + RPC_MAXDATASIZE)); } /* From owner-svn-src-all@freebsd.org Thu Jun 1 06:34:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB219B7C3F5; Thu, 1 Jun 2017 06:34:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7902F65B95; Thu, 1 Jun 2017 06:34:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516YErY076742; Thu, 1 Jun 2017 06:34:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516YEvH076741; Thu, 1 Jun 2017 06:34:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010634.v516YEvH076741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319376 - stable/10/lib/msun/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:34:15 -0000 Author: ngie Date: Thu Jun 1 06:34:14 2017 New Revision: 319376 URL: https://svnweb.freebsd.org/changeset/base/319376 Log: MFC r319158: logarithm_test: assert that feclearexcept succeeds This helps ensure that test preconditons are fulfilled. CID: 1346572 Modified: stable/10/lib/msun/tests/logarithm_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/msun/tests/logarithm_test.c ============================================================================== --- stable/10/lib/msun/tests/logarithm_test.c Thu Jun 1 06:31:25 2017 (r319375) +++ stable/10/lib/msun/tests/logarithm_test.c Thu Jun 1 06:34:14 2017 (r319376) @@ -136,7 +136,7 @@ run_log2_tests(void) * We should insist that log2() return exactly the correct * result and not raise an inexact exception for powers of 2. */ - feclearexcept(FE_ALL_EXCEPT); + assert(feclearexcept(FE_ALL_EXCEPT) == 0); for (i = FLT_MIN_EXP - FLT_MANT_DIG; i < FLT_MAX_EXP; i++) { assert(log2f(ldexpf(1.0, i)) == i); assert(fetestexcept(ALL_STD_EXCEPT) == 0); From owner-svn-src-all@freebsd.org Thu Jun 1 06:34:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 416C3B7C51D; Thu, 1 Jun 2017 06:34:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C88765CC7; Thu, 1 Jun 2017 06:34:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516YaRo076797; Thu, 1 Jun 2017 06:34:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516Yajr076796; Thu, 1 Jun 2017 06:34:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010634.v516Yajr076796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319377 - stable/11/lib/msun/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:34:37 -0000 Author: ngie Date: Thu Jun 1 06:34:35 2017 New Revision: 319377 URL: https://svnweb.freebsd.org/changeset/base/319377 Log: MFC r319158: logarithm_test: assert that feclearexcept succeeds This helps ensure that test preconditons are fulfilled. CID: 1346572 Modified: stable/11/lib/msun/tests/logarithm_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/tests/logarithm_test.c ============================================================================== --- stable/11/lib/msun/tests/logarithm_test.c Thu Jun 1 06:34:14 2017 (r319376) +++ stable/11/lib/msun/tests/logarithm_test.c Thu Jun 1 06:34:35 2017 (r319377) @@ -137,7 +137,7 @@ run_log2_tests(void) * We should insist that log2() return exactly the correct * result and not raise an inexact exception for powers of 2. */ - feclearexcept(FE_ALL_EXCEPT); + assert(feclearexcept(FE_ALL_EXCEPT) == 0); for (i = FLT_MIN_EXP - FLT_MANT_DIG; i < FLT_MAX_EXP; i++) { assert(log2f(ldexpf(1.0, i)) == i); assert(fetestexcept(ALL_STD_EXCEPT) == 0); From owner-svn-src-all@freebsd.org Thu Jun 1 06:35:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D130B7C5E2; Thu, 1 Jun 2017 06:35:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF8A065E75; Thu, 1 Jun 2017 06:35:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516Zchj076924; Thu, 1 Jun 2017 06:35:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516ZcLh076923; Thu, 1 Jun 2017 06:35:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010635.v516ZcLh076923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319378 - stable/11/lib/msun/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:35:39 -0000 Author: ngie Date: Thu Jun 1 06:35:37 2017 New Revision: 319378 URL: https://svnweb.freebsd.org/changeset/base/319378 Log: MFC r319157: fma_test: mute a warning about unreachable code on amd64 by restructuring the #ifdef block to only handle the rest of the logic in the loop in the #else case. CID: 1346844 Modified: stable/11/lib/msun/tests/fma_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/tests/fma_test.c ============================================================================== --- stable/11/lib/msun/tests/fma_test.c Thu Jun 1 06:34:35 2017 (r319377) +++ stable/11/lib/msun/tests/fma_test.c Thu Jun 1 06:35:37 2017 (r319378) @@ -498,11 +498,12 @@ main(void) printf("ok %d # SKIP testcase fails assertion on " "amd64\n", j); continue; -#endif +#else printf("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_infinities(); printf("ok %d - fma infinities\n", j); +#endif } fesetround(FE_TONEAREST); From owner-svn-src-all@freebsd.org Thu Jun 1 06:35:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D68D4B7C5ED; Thu, 1 Jun 2017 06:35:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A561065E76; Thu, 1 Jun 2017 06:35:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516Ze2r076971; Thu, 1 Jun 2017 06:35:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516ZeUN076970; Thu, 1 Jun 2017 06:35:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010635.v516ZeUN076970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319379 - stable/10/lib/msun/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:35:41 -0000 Author: ngie Date: Thu Jun 1 06:35:40 2017 New Revision: 319379 URL: https://svnweb.freebsd.org/changeset/base/319379 Log: MFC r319157: fma_test: mute a warning about unreachable code on amd64 by restructuring the #ifdef block to only handle the rest of the logic in the loop in the #else case. CID: 1346844 Modified: stable/10/lib/msun/tests/fma_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/msun/tests/fma_test.c ============================================================================== --- stable/10/lib/msun/tests/fma_test.c Thu Jun 1 06:35:37 2017 (r319378) +++ stable/10/lib/msun/tests/fma_test.c Thu Jun 1 06:35:40 2017 (r319379) @@ -498,11 +498,12 @@ main(int argc, char *argv[]) printf("ok %d # SKIP testcase fails assertion on " "amd64\n", j); continue; -#endif +#else printf("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_infinities(); printf("ok %d - fma infinities\n", j); +#endif } fesetround(FE_TONEAREST); From owner-svn-src-all@freebsd.org Thu Jun 1 06:37:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91A14B7C82E; Thu, 1 Jun 2017 06:37:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FE8866148; Thu, 1 Jun 2017 06:37:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516br6i077173; Thu, 1 Jun 2017 06:37:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516br9Q077171; Thu, 1 Jun 2017 06:37:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010637.v516br9Q077171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319381 - in stable/10: share/man/man4 tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:37:54 -0000 Author: ngie Date: Thu Jun 1 06:37:53 2017 New Revision: 319381 URL: https://svnweb.freebsd.org/changeset/base/319381 Log: MFC r318177: Unconditionally install udp(4) and udplite(4) again I added this to the MK_USB != no block in error in r278202. Modified: stable/10/share/man/man4/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Thu Jun 1 06:36:40 2017 (r319380) +++ stable/10/share/man/man4/Makefile Thu Jun 1 06:37:53 2017 (r319381) @@ -517,6 +517,8 @@ MAN= aac.4 \ tws.4 \ tx.4 \ txp.4 \ + udp.4 \ + udplite.4 \ vale.4 \ vga.4 \ vge.4 \ @@ -894,8 +896,6 @@ MAN+= u3g.4 \ ucycom.4 \ udav.4 \ udbp.4 \ - udp.4 \ - udplite.4 \ uep.4 \ ufm.4 \ ufoma.4 \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 1 06:36:40 2017 (r319380) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 1 06:37:53 2017 (r319381) @@ -5596,8 +5596,6 @@ OLD_FILES+=usr/share/man/man4/ucom.4.gz OLD_FILES+=usr/share/man/man4/ucycom.4.gz OLD_FILES+=usr/share/man/man4/udav.4.gz OLD_FILES+=usr/share/man/man4/udbp.4.gz -OLD_FILES+=usr/share/man/man4/udp.4.gz -OLD_FILES+=usr/share/man/man4/udplite.4.gz OLD_FILES+=usr/share/man/man4/uep.4.gz OLD_FILES+=usr/share/man/man4/ufm.4.gz OLD_FILES+=usr/share/man/man4/ufoma.4.gz From owner-svn-src-all@freebsd.org Thu Jun 1 06:51:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16F29B7E547; Thu, 1 Jun 2017 06:51:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::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 6F79667009; Thu, 1 Jun 2017 06:51:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id f27so6958922pfe.0; Wed, 31 May 2017 23:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=WEPNI3+yX3/Pg85Y2q1TI8uM68J8fOsITwz9IPIU+jQ=; b=ackxw2BaFIwB/3Dv2cTJX/awbeuqA19xV3ZUQzayuKst2IzhUneEoBRBLCICcnUGc2 vZZOOv7O06ORiWuhq92LfymQB1jJjCCu0f0OBor3Hz2B4l10ceGa0g43xNiqnTB6iBfV mW9FvFT3nnMNNKG4/huZWyMusUkidUVuHp1nUH1aJQZp5ua0Y0hn8WPuyDLsIhDnk9vc G2t4i0ph8dqcAjiht17+aswL4L3INQyW170zlOZHCkZ9OxhX7lkmbYqBBGMiFD85j/Tv NKsoWNEWOYaOGKqO+eUHSQp0qNAq7LCDGxs1oMpemtP49IuE3uGIQozFUzukXWsjp+Vv SETA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=WEPNI3+yX3/Pg85Y2q1TI8uM68J8fOsITwz9IPIU+jQ=; b=nDSgyRsPwlZk6cz+qHFLn5WMaRZ0eZNi1XjKh2mWPt4NNRGaQy47S5PG0T34u+NiPN Ss/3fytu4aQIFZSFUky8qE9FQr9Rc3c/fc7MvTADkX7az9W3tBJmIt8gc//AaOPbvvbj JVcpjtKGoFYB0dHwZdekkAFFx461rRLdTQu+vAnyqSXm7Vg+b4gL7umLx3dXm15I1EOr z0vNf08vMfmkz7ytw8hrGeVo+ibJMcz7iBfd5my27UmbjxCn2+lo9/9qMShshqv7oZVy 6pcdh8RKK8Tf1BOEm//RNoeiK9mF9jPdxesTJs46FGIDe2fDm10uLfXRc00p7D/5wVNd 4/Sw== X-Gm-Message-State: AODbwcDp6fMJdHi6WI56R9FkDOi3fmhMfEdG6XVnqLMAhM+z8QIYvVsj Wa/XgrY7+Hc/Dxuryhc= X-Received: by 10.98.222.133 with SMTP id h127mr33631614pfg.63.1496299907589; Wed, 31 May 2017 23:51:47 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id h28sm35819805pfd.55.2017.05.31.23.51.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 May 2017 23:51:46 -0700 (PDT) Subject: Re: svn commit: r316286 - in head: lib/libprocstat sys/kern sys/sys usr.bin/gcore usr.bin/procstat Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_C7CF6341-8A87-4E5A-909F-E8B30384B141"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703301821.v2UILbYW005136@repo.freebsd.org> Date: Wed, 31 May 2017 23:51:44 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <2F4F9FEA-F8F4-4F71-A88F-8ABF795C0B2C@gmail.com> References: <201703301821.v2UILbYW005136@repo.freebsd.org> To: Tycho Nightingale X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:51:49 -0000 --Apple-Mail=_C7CF6341-8A87-4E5A-909F-E8B30384B141 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Mar 30, 2017, at 11:21, Tycho Nightingale wrote: > > Author: tychon > Date: Thu Mar 30 18:21:36 2017 > New Revision: 316286 > URL: https://svnweb.freebsd.org/changeset/base/316286 > > Log: > Add support for capturing 'struct ptrace_lwpinfo' for signals > resulting in a process dumping core in the corefile. > > Also extend procstat to view select members of 'struct ptrace_lwpinfo' > from the contents of the note. > > Sponsored by: Dell EMC Isilon Hi Tycho, Should this be MFCed? Thanks, -Ngie --Apple-Mail=_C7CF6341-8A87-4E5A-909F-E8B30384B141 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZL7mBAAoJEPWDqSZpMIYV3jMP/17m0n3qWFyWcRXvJlAhGego roNMs7XXgXTKVgB29PWmEPC8O0dl8gig/6yodx1e6T9bI2oqNajrZuhdNtPVswEB +t3Mfps0NB+dpvFquhw1wpeVNtT8rAbkdrar/IRME5XA+WF7c5VM/erQ056ycIVj J/dYV9SRBucDILF2M0EJO+ALD/SbmfopEE1HYeB1viR9Yfu4NveIhGFBFdLVZ6zN xQOZ7d0a0OU89cG/g2c5olA9axHDcBeAoT313HxFqUtlz6s6nF3V4nbdVrSc9x0s TT0kfJNKAoZEZ1SWhaDgjOZAi1moLy9jCHqEDOnxW9YPVlqqb2dfqF0nwfYVQyBx lwCe0bjgSN41J/p/ZoVYqpbx5fx5POaOnGR0hlUCboNQHvqunbFjuslpuntO+ITi 745vnAysNqcOf0ecZYeTUE/psn1gWdAEsiptWv7h2zzcXst9D15sDCxQ1s4AlxLH wz9BiBc/OtP5jO59dW6yZV8ESMshGYzduyOeIXEPeUvU1StLYQ+gTL5pAf4esB/I MBPGNvti1I3uqETTSp16OnM1Vm1AV0/D3CXrfoivvnWqLdPzNA4CGAyZH6Dgy/YV YEnMvLMFf0joD8j2rPFS0UtGolig0MNzovSLeOdyjoewgps7ll57AU2HIGJbEvvx +G4Jblg9X9yy6g2ZgcU6 =MDGY -----END PGP SIGNATURE----- --Apple-Mail=_C7CF6341-8A87-4E5A-909F-E8B30384B141-- From owner-svn-src-all@freebsd.org Thu Jun 1 06:39:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5304B7CF71; Thu, 1 Jun 2017 06:39:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F1B56635D; Thu, 1 Jun 2017 06:39:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516dt9w077340; Thu, 1 Jun 2017 06:39:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516dtD6077339; Thu, 1 Jun 2017 06:39:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010639.v516dtD6077339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319382 - stable/10/usr.bin/getconf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:39:56 -0000 Author: ngie Date: Thu Jun 1 06:39:55 2017 New Revision: 319382 URL: https://svnweb.freebsd.org/changeset/base/319382 Log: MFC r318434: Make the `.gperf.c` suffix rule depend on fake-gperf.awk Parameterize out fake-gperf.awk to avoid duplicating the path Modified: stable/10/usr.bin/getconf/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/getconf/Makefile ============================================================================== --- stable/10/usr.bin/getconf/Makefile Thu Jun 1 06:37:53 2017 (r319381) +++ stable/10/usr.bin/getconf/Makefile Thu Jun 1 06:39:55 2017 (r319382) @@ -13,8 +13,9 @@ CLEANFILES+= confstr.c limits.c pathconf.c progenv.c s all: conflicts -.gperf.c: - LC_ALL=C awk -f ${.CURDIR}/fake-gperf.awk ${.IMPSRC} >${.TARGET} +FAKE_GPERF= ${.CURDIR}/fake-gperf.awk +.gperf.c: ${FAKE_GPERF} + LC_ALL=C awk -f ${FAKE_GPERF} ${.IMPSRC} >${.TARGET} .gperf.names: LC_ALL=C awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | \ From owner-svn-src-all@freebsd.org Thu Jun 1 06:41:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B562BB7D240; Thu, 1 Jun 2017 06:41:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C5C7666E5; Thu, 1 Jun 2017 06:41:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516fPjW081036; Thu, 1 Jun 2017 06:41:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516fPkk081032; Thu, 1 Jun 2017 06:41:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010641.v516fPkk081032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319384 - in stable/11: etc/mtree usr.bin/getconf usr.bin/getconf/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:41:26 -0000 Author: ngie Date: Thu Jun 1 06:41:24 2017 New Revision: 319384 URL: https://svnweb.freebsd.org/changeset/base/319384 Log: MFC r318436: usr.bin/getconf: add some initial tests Items tested via this commit are: - Some basic POSIX constants. - Some valid programming environments with -v. - Some invalid programming environments via -v. NOTE: this test makes assumptions about ILP32/LP32 vs LP64 that are currently not true on all architectures to avoid hardcoding some architectures in the tests. I'm working on improving getconf(1) to be more sane about handling ILP32/LP32 vs LP64. Future commits are coming soon to address this. Tested with: amd64, i386 Added: stable/11/usr.bin/getconf/tests/ - copied from r318436, head/usr.bin/getconf/tests/ Modified: stable/11/etc/mtree/BSD.tests.dist stable/11/usr.bin/getconf/Makefile stable/11/usr.bin/getconf/getconf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Thu Jun 1 06:39:57 2017 (r319383) +++ stable/11/etc/mtree/BSD.tests.dist Thu Jun 1 06:41:24 2017 (r319384) @@ -608,6 +608,8 @@ .. file2c .. + getconf + .. grep .. gzip Modified: stable/11/usr.bin/getconf/Makefile ============================================================================== --- stable/11/usr.bin/getconf/Makefile Thu Jun 1 06:39:57 2017 (r319383) +++ stable/11/usr.bin/getconf/Makefile Thu Jun 1 06:41:24 2017 (r319384) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= getconf SRCS= confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c @@ -34,5 +36,9 @@ conflicting.names: confstr.names limits.names sysconf. unique.names: conflicting.names LC_ALL=C sort -u ${.ALLSRC} >${.TARGET} + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/11/usr.bin/getconf/getconf.h ============================================================================== --- stable/11/usr.bin/getconf/getconf.h Thu Jun 1 06:39:57 2017 (r319383) +++ stable/11/usr.bin/getconf/getconf.h Thu Jun 1 06:41:24 2017 (r319384) @@ -36,8 +36,15 @@ typedef long long intmax_t; #include #endif +typedef enum { + PROG_ENV_VALID_NO_ALT_PATH = -1, + PROG_ENV_INVALID = 0, + PROG_ENV_VALID_HAS_ALT_PATH = 1, + PROG_ENV_UNKNOWN = 2, +} prog_env_validity; + int find_confstr(const char *name, int *key); int find_limit(const char *name, intmax_t *value); int find_pathconf(const char *name, int *key); -int find_progenv(const char *name, const char **alt_path); +prog_env_validity find_progenv(const char *name, const char **alt_path); int find_sysconf(const char *name, int *key); From owner-svn-src-all@freebsd.org Thu Jun 1 06:27:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5F30B7BA9D; Thu, 1 Jun 2017 06:27:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95DA765629; Thu, 1 Jun 2017 06:27:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516RFH3072771; Thu, 1 Jun 2017 06:27:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516RFaO072770; Thu, 1 Jun 2017 06:27:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010627.v516RFaO072770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319373 - stable/10/usr.bin/procstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:27:16 -0000 Author: ngie Date: Thu Jun 1 06:27:15 2017 New Revision: 319373 URL: https://svnweb.freebsd.org/changeset/base/319373 Log: MFC r318178: procstat(1): document all possible `PRO` (network protocol) values Reference the appropriate section 4 manpages for networking protocols. Modified: stable/10/usr.bin/procstat/procstat.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/procstat/procstat.1 ============================================================================== --- stable/10/usr.bin/procstat/procstat.1 Thu Jun 1 06:26:35 2017 (r319372) +++ stable/10/usr.bin/procstat/procstat.1 Thu Jun 1 06:27:15 2017 (r319373) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2015 +.Dd May 11, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -261,6 +261,60 @@ omitted, and a new capabilities field will be included as described in .Xr cap_rights_limit 2 , present for each capability descriptor. +.Pp +The following network protocols may be displayed (grouped by address family): +.Pp +.Dv AF_INET , +.Dv AF_INET6 +.Pp +.Bl -tag -width indent -compact +.It ICM +.Dv IPPROTO_ICMP ; +see +.Xr icmp 4 . +.It IPD +.Dv IPPROTO_DIVERT ; +see +.Xr divert 4 . +.It IP\? +unknown protocol. +.It RAW +.Dv IPPROTO_RAW ; +see +.Xr ip 4 . +.It SCT +.Dv IPPROTO_SCTP ; +see +.Xr sctp 4 . +.It TCP +.Dv IPPROTO_TCP ; +see +.Xr tcp 4 . +.It UDP +.Dv IPPROTO_UDP ; +see +.Xr udp 4 . +.El +.Pp +.Dv AF_LOCAL +.Pp +.Bl -tag -width indent -compact +.It UDD +.Dv IPPROTO_UDP ; +see +.Xr udp 4 . +.It UDS +.Dv IPPROTO_TCP ; +see +.Xr tcp 4 . +.It UD\? +unknown protocol. +.El +.Pp +.Bl -tag -width indent -compact +.It \? +unknown address family. +.El .Ss Signal Disposition Information Display signal pending and disposition for a process: .Pp @@ -531,6 +585,10 @@ auxiliary vector value .Xr cap_enter 2 , .Xr cap_rights_limit 2 , .Xr ddb 4 , +.Xr divert 4 , +.Xr ip 4 , +.Xr tcp 4 , +.Xr udp 4 , .Xr stack 9 .Sh AUTHORS .An Robert N M Watson From owner-svn-src-all@freebsd.org Thu Jun 1 06:31:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D95E3B7BF99; Thu, 1 Jun 2017 06:31:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4CD3659A3; Thu, 1 Jun 2017 06:31:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516VPeY075156; Thu, 1 Jun 2017 06:31:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516VPil075155; Thu, 1 Jun 2017 06:31:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010631.v516VPil075155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319375 - stable/10/usr.bin/procstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:31:27 -0000 Author: ngie Date: Thu Jun 1 06:31:25 2017 New Revision: 319375 URL: https://svnweb.freebsd.org/changeset/base/319375 Log: MFC r318179: procstat(1): also reference icmp(4) and sctp(4) This was missed in the previous commit by accident. MFC with: r318178 Modified: stable/10/usr.bin/procstat/procstat.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/procstat/procstat.1 ============================================================================== --- stable/10/usr.bin/procstat/procstat.1 Thu Jun 1 06:30:22 2017 (r319374) +++ stable/10/usr.bin/procstat/procstat.1 Thu Jun 1 06:31:25 2017 (r319375) @@ -589,7 +589,9 @@ auxiliary vector value .Xr signal 3 , .Xr ddb 4 , .Xr divert 4 , +.Xr icmp 4 , .Xr ip 4 , +.Xr sctp 4 , .Xr tcp 4 , .Xr udp 4 , .Xr stack 9 From owner-svn-src-all@freebsd.org Thu Jun 1 07:08:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DFC8B82892; Thu, 1 Jun 2017 07:08:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5717D67B0D; Thu, 1 Jun 2017 07:08:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5178RDF089923; Thu, 1 Jun 2017 07:08:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5178QAL089919; Thu, 1 Jun 2017 07:08:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010708.v5178QAL089919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 07:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319390 - in stable/10: share/mk tools/build/options tools/tools/cxgbetool usr.sbin usr.sbin/cxgbetool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 07:08:28 -0000 Author: ngie Date: Thu Jun 1 07:08:26 2017 New Revision: 319390 URL: https://svnweb.freebsd.org/changeset/base/319390 Log: MFC r314579,r314785: r314579 (by np): Add cxgbetool(8) to the base system. Move cxgbetool from tools/tools to usr.sbin. Compile and install it on platforms where cxgbe(4) is built by default. Knobs (WITH_CXGBETOOL and WITHOUT_CXGBETOOL) have been added so that the user can override the default setting. r314785: Fix some trivial manlint warnings Sentences should begin on new lines, per manlint. Bump .Dd for the change Added: stable/10/tools/build/options/WITHOUT_CXGBETOOL - copied unchanged from r314579, head/tools/build/options/WITHOUT_CXGBETOOL stable/10/tools/build/options/WITH_CXGBETOOL - copied unchanged from r314579, head/tools/build/options/WITH_CXGBETOOL stable/10/usr.sbin/cxgbetool/ - copied from r314579, head/usr.sbin/cxgbetool/ Deleted: stable/10/tools/tools/cxgbetool/ Modified: stable/10/share/mk/bsd.own.mk stable/10/usr.sbin/Makefile stable/10/usr.sbin/cxgbetool/cxgbetool.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Thu Jun 1 06:58:43 2017 (r319389) +++ stable/10/share/mk/bsd.own.mk Thu Jun 1 07:08:26 2017 (r319390) @@ -463,6 +463,12 @@ __DEFAULT_NO_OPTIONS+=GNUCXX __DEFAULT_YES_OPTIONS+=GNUCXX .endif .endif +.if ${__T} == "amd64" || ${__T} == "i386" || \ + ${__T} == "powerpc64" || ${__T} == "sparc64" +__DEFAULT_YES_OPTIONS+=CXGBETOOL +.else +__DEFAULT_NO_OPTIONS+=CXGBETOOL +.endif # FDT is needed only for arm, mips and powerpc .if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} __DEFAULT_YES_OPTIONS+=FDT Copied: stable/10/tools/build/options/WITHOUT_CXGBETOOL (from r314579, head/tools/build/options/WITHOUT_CXGBETOOL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_CXGBETOOL Thu Jun 1 07:08:26 2017 (r319390, copy of r314579, head/tools/build/options/WITHOUT_CXGBETOOL) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build +.Xr cxgbetool 8 Copied: stable/10/tools/build/options/WITH_CXGBETOOL (from r314579, head/tools/build/options/WITH_CXGBETOOL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITH_CXGBETOOL Thu Jun 1 07:08:26 2017 (r319390, copy of r314579, head/tools/build/options/WITH_CXGBETOOL) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to build +.Xr cxgbetool 8 Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Thu Jun 1 06:58:43 2017 (r319389) +++ stable/10/usr.sbin/Makefile Thu Jun 1 07:08:26 2017 (r319390) @@ -148,6 +148,10 @@ SUBDIR+= bsnmpd SUBDIR+= ctm .endif +.if ${MK_CXGBETOOL} != "no" +SUBDIR+= cxgbetool +.endif + .if ${MK_FLOPPY} != "no" SUBDIR+= fdcontrol SUBDIR+= fdformat Modified: stable/10/usr.sbin/cxgbetool/cxgbetool.8 ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.8 Fri Mar 3 03:11:58 2017 (r314579) +++ stable/10/usr.sbin/cxgbetool/cxgbetool.8 Thu Jun 1 07:08:26 2017 (r319390) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 1, 2013 +.Dd March 6, 2017 .Dt CXGBETOOL 8 .Os .Sh NAME @@ -133,7 +133,8 @@ or .Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns . Note that freelists are egress queues too. .It Ar flm_cntxt_id -context id of a freelist manager. The FLM context id is displayed in the +context id of a freelist manager. +The FLM context id is displayed in the egress context dump of a freelist as FLMcontextID. .El .It Cm filter mode Op Ar match-criteria ... @@ -379,7 +380,8 @@ The card's memory map is available in .Va dev.t4nex.%d.misc.meminfo Ns . .It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val .It Cm regdump Op Ar register-block ... -Display contents of device registers. One or more +Display contents of device registers. +One or more .Ar register-block can be specified to limit the registers displayed. The default is to display registers for all blocks. @@ -400,7 +402,8 @@ A non-zero value will enable "minmax" mode; a zero val .Pp NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available -whether various modes are implemented, etc. Consult the adapter documentation for specific information on any limitations. +whether various modes are implemented, etc. +Consult the adapter documentation for specific information on any limitations. .El .It Cm sched-class params Op Ar param Ar value Configure parameters for a scheduling class. @@ -471,7 +474,8 @@ The weight to be used for a weighted-round-robin sched The average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy. .Pp NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available, -whether various modes are implemented, etc. Consult the adapter documentation for specific information on any limitations. +whether various modes are implemented, etc. +Consult the adapter documentation for specific information on any limitations. .El .It Cm sched-queue Ar port queue class Bind the indicated port's NIC TX From owner-svn-src-all@freebsd.org Thu Jun 1 06:56:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2776CB7EFA5; Thu, 1 Jun 2017 06:56:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0190B672E6; Thu, 1 Jun 2017 06:56:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516uXmO085659; Thu, 1 Jun 2017 06:56:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516uWCq085653; Thu, 1 Jun 2017 06:56:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010656.v516uWCq085653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319388 - in stable/11: share/mk targets/pseudo/userland tools/build/options tools/tools/cxgbetool usr.sbin usr.sbin/cxgbetool X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:56:34 -0000 Author: ngie Date: Thu Jun 1 06:56:32 2017 New Revision: 319388 URL: https://svnweb.freebsd.org/changeset/base/319388 Log: MFC r314579,r314785: r314579 (by np): Add cxgbetool(8) to the base system. Move cxgbetool from tools/tools to usr.sbin. Compile and install it on platforms where cxgbe(4) is built by default. Knobs (WITH_CXGBETOOL and WITHOUT_CXGBETOOL) have been added so that the user can override the default setting. r314785: Fix some trivial manlint warnings Sentences should begin on new lines, per manlint. Bump .Dd for the change Added: stable/11/tools/build/options/WITHOUT_CXGBETOOL - copied unchanged from r314579, head/tools/build/options/WITHOUT_CXGBETOOL stable/11/tools/build/options/WITH_CXGBETOOL - copied unchanged from r314579, head/tools/build/options/WITH_CXGBETOOL stable/11/usr.sbin/cxgbetool/ - copied from r314579, head/usr.sbin/cxgbetool/ Deleted: stable/11/tools/tools/cxgbetool/ Modified: stable/11/share/mk/src.opts.mk stable/11/targets/pseudo/userland/Makefile.depend stable/11/usr.sbin/Makefile stable/11/usr.sbin/cxgbetool/cxgbetool.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Thu Jun 1 06:42:21 2017 (r319387) +++ stable/11/share/mk/src.opts.mk Thu Jun 1 06:56:32 2017 (r319388) @@ -271,6 +271,13 @@ BROKEN_OPTIONS+=LIBSOFT BROKEN_OPTIONS+=EFI .endif +.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ + ${__T} == "powerpc64" || ${__T} == "sparc64" +__DEFAULT_YES_OPTIONS+=CXGBETOOL +.else +__DEFAULT_NO_OPTIONS+=CXGBETOOL +.endif + .include # Modified: stable/11/targets/pseudo/userland/Makefile.depend ============================================================================== --- stable/11/targets/pseudo/userland/Makefile.depend Thu Jun 1 06:42:21 2017 (r319387) +++ stable/11/targets/pseudo/userland/Makefile.depend Thu Jun 1 06:56:32 2017 (r319388) @@ -908,6 +908,10 @@ DIRDEPS+= \ usr.sbin/blacklistd .endif +.if ${MK_CXGBETOOL} != "no" +DIRDEPS+= usr.sbin/cxgbetool +.endif + .if ${MK_GPL_DTC} != "yes" DIRDEPS+= usr.bin/dtc .endif Copied: stable/11/tools/build/options/WITHOUT_CXGBETOOL (from r314579, head/tools/build/options/WITHOUT_CXGBETOOL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITHOUT_CXGBETOOL Thu Jun 1 06:56:32 2017 (r319388, copy of r314579, head/tools/build/options/WITHOUT_CXGBETOOL) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build +.Xr cxgbetool 8 Copied: stable/11/tools/build/options/WITH_CXGBETOOL (from r314579, head/tools/build/options/WITH_CXGBETOOL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITH_CXGBETOOL Thu Jun 1 06:56:32 2017 (r319388, copy of r314579, head/tools/build/options/WITH_CXGBETOOL) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to build +.Xr cxgbetool 8 Modified: stable/11/usr.sbin/Makefile ============================================================================== --- stable/11/usr.sbin/Makefile Thu Jun 1 06:42:21 2017 (r319387) +++ stable/11/usr.sbin/Makefile Thu Jun 1 06:56:32 2017 (r319388) @@ -122,6 +122,7 @@ SUBDIR.${MK_BOOTPARAMD}+= bootparamd SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd SUBDIR.${MK_CTM}+= ctm +SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_EFI}+= efivar efidp SUBDIR.${MK_FLOPPY}+= fdcontrol Modified: stable/11/usr.sbin/cxgbetool/cxgbetool.8 ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.8 Fri Mar 3 03:11:58 2017 (r314579) +++ stable/11/usr.sbin/cxgbetool/cxgbetool.8 Thu Jun 1 06:56:32 2017 (r319388) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 1, 2013 +.Dd March 6, 2017 .Dt CXGBETOOL 8 .Os .Sh NAME @@ -133,7 +133,8 @@ or .Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns . Note that freelists are egress queues too. .It Ar flm_cntxt_id -context id of a freelist manager. The FLM context id is displayed in the +context id of a freelist manager. +The FLM context id is displayed in the egress context dump of a freelist as FLMcontextID. .El .It Cm filter mode Op Ar match-criteria ... @@ -379,7 +380,8 @@ The card's memory map is available in .Va dev.t4nex.%d.misc.meminfo Ns . .It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val .It Cm regdump Op Ar register-block ... -Display contents of device registers. One or more +Display contents of device registers. +One or more .Ar register-block can be specified to limit the registers displayed. The default is to display registers for all blocks. @@ -400,7 +402,8 @@ A non-zero value will enable "minmax" mode; a zero val .Pp NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available -whether various modes are implemented, etc. Consult the adapter documentation for specific information on any limitations. +whether various modes are implemented, etc. +Consult the adapter documentation for specific information on any limitations. .El .It Cm sched-class params Op Ar param Ar value Configure parameters for a scheduling class. @@ -471,7 +474,8 @@ The weight to be used for a weighted-round-robin sched The average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy. .Pp NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available, -whether various modes are implemented, etc. Consult the adapter documentation for specific information on any limitations. +whether various modes are implemented, etc. +Consult the adapter documentation for specific information on any limitations. .El .It Cm sched-queue Ar port queue class Bind the indicated port's NIC TX From owner-svn-src-all@freebsd.org Thu Jun 1 06:58:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1318B7F769; Thu, 1 Jun 2017 06:58:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0B406751D; Thu, 1 Jun 2017 06:58:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516wh8Y085771; Thu, 1 Jun 2017 06:58:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516whkH085770; Thu, 1 Jun 2017 06:58:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010658.v516whkH085770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319389 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:58:45 -0000 Author: ngie Date: Thu Jun 1 06:58:43 2017 New Revision: 319389 URL: https://svnweb.freebsd.org/changeset/base/319389 Log: Regenerate src.conf(5) Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Thu Jun 1 06:56:32 2017 (r319388) +++ stable/11/share/man/man5/src.conf.5 Thu Jun 1 06:58:43 2017 (r319389) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 30, 2017 +.Dd May 31, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -421,6 +421,18 @@ Set to not build and related utilities. .It Va WITHOUT_CUSE Set to not build CUSE-related programs and libraries. +.It Va WITHOUT_CXGBETOOL +Set to not build +.Xr cxgbetool 8 +.Pp +This is a default setting on +arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and powerpc/powerpc. +.It Va WITH_CXGBETOOL +Set to build +.Xr cxgbetool 8 +.Pp +This is a default setting on +amd64/amd64, arm64/aarch64, i386/i386, pc98/i386, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_CXX Set to not build .Xr c++ 1 From owner-svn-src-all@freebsd.org Thu Jun 1 06:42:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32E1FB7D33E; Thu, 1 Jun 2017 06:42:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B1646691D; Thu, 1 Jun 2017 06:42:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v516gKIa081204; Thu, 1 Jun 2017 06:42:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v516gK6L081203; Thu, 1 Jun 2017 06:42:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010642.v516gK6L081203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 06:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319386 - stable/10/usr.bin/getconf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 06:42:22 -0000 Author: ngie Date: Thu Jun 1 06:42:20 2017 New Revision: 319386 URL: https://svnweb.freebsd.org/changeset/base/319386 Log: MFC r318437: Revert local changes to find_progenv accidentally committed in r318436 MFC with: r318436 Modified: stable/10/usr.bin/getconf/getconf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/getconf/getconf.h ============================================================================== --- stable/10/usr.bin/getconf/getconf.h Thu Jun 1 06:41:27 2017 (r319385) +++ stable/10/usr.bin/getconf/getconf.h Thu Jun 1 06:42:20 2017 (r319386) @@ -36,15 +36,8 @@ typedef long long intmax_t; #include #endif -typedef enum { - PROG_ENV_VALID_NO_ALT_PATH = -1, - PROG_ENV_INVALID = 0, - PROG_ENV_VALID_HAS_ALT_PATH = 1, - PROG_ENV_UNKNOWN = 2, -} prog_env_validity; - int find_confstr(const char *name, int *key); int find_limit(const char *name, intmax_t *value); int find_pathconf(const char *name, int *key); -prog_env_validity find_progenv(const char *name, const char **alt_path); +int find_progenv(const char *name, const char **alt_path); int find_sysconf(const char *name, int *key); From owner-svn-src-all@freebsd.org Thu Jun 1 07:10:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03B32B82AF2; Thu, 1 Jun 2017 07:10:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C78E967C4A; Thu, 1 Jun 2017 07:10:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v517Aftw090060; Thu, 1 Jun 2017 07:10:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v517Afue090059; Thu, 1 Jun 2017 07:10:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706010710.v517Afue090059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 07:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319391 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 07:10:42 -0000 Author: ngie Date: Thu Jun 1 07:10:40 2017 New Revision: 319391 URL: https://svnweb.freebsd.org/changeset/base/319391 Log: Regenerate src.conf(5) Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Thu Jun 1 07:08:26 2017 (r319390) +++ stable/10/share/man/man5/src.conf.5 Thu Jun 1 07:10:40 2017 (r319391) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 06:08:20Z ngie .\" $FreeBSD$ -.Dd May 30, 2017 +.Dd June 1, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -328,6 +328,20 @@ similar to DWARF and the venerable stabs and is requir Set to not build .Xr ctm 1 and related utilities. +.It Va WITHOUT_CXGBETOOL +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CXGBETOOL 319390 2017-06-01 07:08:26Z ngie +Set to not build +.Xr cxgbetool 8 +.Pp +It is a default setting on +arm/arm, arm/armeb, arm/armv6, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and powerpc/powerpc. +.It Va WITH_CXGBETOOL +.\" from FreeBSD: stable/10/tools/build/options/WITH_CXGBETOOL 319390 2017-06-01 07:08:26Z ngie +Set to build +.Xr cxgbetool 8 +.Pp +It is a default setting on +amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_CXX .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CXX 281891 2015-04-23 15:15:45Z bdrewery Set to not build From owner-svn-src-all@freebsd.org Thu Jun 1 08:25:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A952BF16BF; Thu, 1 Jun 2017 08:25:47 +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 CC9586E8E3; Thu, 1 Jun 2017 08:25:46 +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 v518PkCB022801; Thu, 1 Jun 2017 08:25:46 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v518PjHl022799; Thu, 1 Jun 2017 08:25:45 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010825.v518PjHl022799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319398 - in stable/11/sys/modules: . tcp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:25:47 -0000 Author: tuexen Date: Thu Jun 1 08:25:45 2017 New Revision: 319398 URL: https://svnweb.freebsd.org/changeset/base/319398 Log: MFC r316038: Tweak the Makefiles a bit to allow using "tcp" in MODULES_OVERRIDE to build the tcp modules. Added: stable/11/sys/modules/tcp/Makefile - copied unchanged from r316038, head/sys/modules/tcp/Makefile Modified: stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Thu Jun 1 08:19:45 2017 (r319397) +++ stable/11/sys/modules/Makefile Thu Jun 1 08:25:45 2017 (r319398) @@ -365,9 +365,8 @@ SUBDIR= \ ${_sym} \ ${_syscons} \ sysvipc \ + tcp \ ${_ti} \ - ${_tcp_fastpath} \ - ${_tcpmd5} \ tl \ tmpfs \ ${_toecore} \ @@ -449,10 +448,6 @@ _random_other= random_other SUBDIR+= cuse .endif -.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) -_tcp_fastpath= tcp/fastpath -.endif - .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) _carp= carp @@ -463,7 +458,6 @@ _if_gre= if_gre _ipfw_pmod= ipfw_pmod .if ${MK_IPSEC_SUPPORT} != "no" _ipsec= ipsec -_tcpmd5= tcp/tcpmd5 .endif .endif Copied: stable/11/sys/modules/tcp/Makefile (from r316038, head/sys/modules/tcp/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/modules/tcp/Makefile Thu Jun 1 08:25:45 2017 (r319398, copy of r316038, head/sys/modules/tcp/Makefile) @@ -0,0 +1,23 @@ +# +# $FreeBSD$ +# + +SYSDIR?=${SRCTOP}/sys +.include "${SYSDIR}/conf/kern.opts.mk" + +SUBDIR= \ + ${_tcp_fastpath} \ + ${_tcpmd5} \ + +.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) +_tcp_fastpath= fastpath +.endif + +.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ + defined(ALL_MODULES) +.if ${MK_IPSEC_SUPPORT} != "no" +_tcpmd5= tcpmd5 +.endif +.endif + +.include From owner-svn-src-all@freebsd.org Thu Jun 1 08:15:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 108BDBF084B; Thu, 1 Jun 2017 08:15:35 +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 D47516E16D; Thu, 1 Jun 2017 08:15:34 +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 v518FYD6018522; Thu, 1 Jun 2017 08:15:34 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v518FYqo018521; Thu, 1 Jun 2017 08:15:34 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010815.v518FYqo018521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319396 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:15:35 -0000 Author: tuexen Date: Thu Jun 1 08:15:33 2017 New Revision: 319396 URL: https://svnweb.freebsd.org/changeset/base/319396 Log: MFC r313032: Ensure that the variable bail is always initialized before used. Modified: stable/11/sys/netinet/sctp_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_output.c ============================================================================== --- stable/11/sys/netinet/sctp_output.c Thu Jun 1 08:12:44 2017 (r319395) +++ stable/11/sys/netinet/sctp_output.c Thu Jun 1 08:15:33 2017 (r319396) @@ -7730,9 +7730,9 @@ sctp_fill_outqueue(struct sctp_tcb *stcb, /* must make even word boundary */ space_left &= 0xfffffffc; strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc); + giveup = 0; + bail = 0; while ((space_left > 0) && (strq != NULL)) { - giveup = 0; - bail = 0; moved = sctp_move_to_outqueue(stcb, strq, space_left, frag_point, &giveup, eeor_mode, &bail, so_locked); stcb->asoc.ss_functions.sctp_ss_scheduled(stcb, net, asoc, strq, moved); From owner-svn-src-all@freebsd.org Thu Jun 1 08:12:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C7C8BF04C6; Thu, 1 Jun 2017 08:12:45 +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 6A59B6AFC5; Thu, 1 Jun 2017 08:12:45 +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 v518CiMp018372; Thu, 1 Jun 2017 08:12:44 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v518Cina018371; Thu, 1 Jun 2017 08:12:44 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010812.v518Cina018371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:12:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319395 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:12:45 -0000 Author: tuexen Date: Thu Jun 1 08:12:44 2017 New Revision: 319395 URL: https://svnweb.freebsd.org/changeset/base/319395 Log: MFC r313031: Take the SCTP common header into account when computing the space available for chunks. This unbreaks the handling of ICMPV6 packets indicating "packet too big". It just worked for IPv4 since we are overbooking for IPv4. Modified: stable/11/sys/netinet/sctp_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/11/sys/netinet/sctp_usrreq.c Thu Jun 1 08:09:54 2017 (r319394) +++ stable/11/sys/netinet/sctp_usrreq.c Thu Jun 1 08:12:44 2017 (r319395) @@ -108,7 +108,7 @@ sctp_pathmtu_adjustment(struct sctp_tcb *stcb, uint16_ /* Adjust that too */ stcb->asoc.smallest_mtu = nxtsz; /* now off to subtract IP_DF flag if needed */ - overhead = IP_HDR_SIZE; + overhead = IP_HDR_SIZE + sizeof(struct sctphdr); if (sctp_auth_is_required_chunk(SCTP_DATA, stcb->asoc.peer_auth_chunks)) { overhead += sctp_get_auth_chunk_len(stcb->asoc.peer_hmac_id); } From owner-svn-src-all@freebsd.org Thu Jun 1 08:19:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F3A2BF0D45; Thu, 1 Jun 2017 08:19:46 +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 3C93E6E38C; Thu, 1 Jun 2017 08:19:46 +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 v518Jj2D018699; Thu, 1 Jun 2017 08:19:45 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v518JjLE018698; Thu, 1 Jun 2017 08:19:45 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010819.v518JjLE018698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319397 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:19:46 -0000 Author: tuexen Date: Thu Jun 1 08:19:45 2017 New Revision: 319397 URL: https://svnweb.freebsd.org/changeset/base/319397 Log: MFC r314155: TCP window updates are only sent if the window can be increased by at least 2 * MSS. However, if the receive buffer size is small, this might be impossible. Add back a criterion to send a TCP window update if the window can be increased by at least half of the receive buffer size. This condition was removed in r242252. This patch simply brings it back. PR: 211003 Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D9475 Modified: stable/11/sys/netinet/tcp_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_output.c ============================================================================== --- stable/11/sys/netinet/tcp_output.c Thu Jun 1 08:15:33 2017 (r319396) +++ stable/11/sys/netinet/tcp_output.c Thu Jun 1 08:19:45 2017 (r319397) @@ -688,6 +688,8 @@ after_sack_rexmit: recwin <= (long)(so->so_rcv.sb_hiwat / 8) || so->so_rcv.sb_hiwat <= 8 * tp->t_maxseg)) goto send; + if (2 * adv >= (int32_t)so->so_rcv.sb_hiwat) + goto send; } dontupdate: From owner-svn-src-all@freebsd.org Thu Jun 1 08:48:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B7DCBF337C; Thu, 1 Jun 2017 08:48:18 +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 12BB96F6FC; Thu, 1 Jun 2017 08:48:17 +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 v518mH5f031073; Thu, 1 Jun 2017 08:48:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v518mGFC031068; Thu, 1 Jun 2017 08:48:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010848.v518mGFC031068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319402 - in stable/11/sys: netinet netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:48:18 -0000 Author: tuexen Date: Thu Jun 1 08:48:16 2017 New Revision: 319402 URL: https://svnweb.freebsd.org/changeset/base/319402 Log: MFC r317457: Use consistently uint32_t for mtu values. This does not change functionality, but this cleanup is need for further improvements of ICMP handling. Modified: stable/11/sys/netinet/sctp_usrreq.c stable/11/sys/netinet/sctp_var.h stable/11/sys/netinet/sctputil.c stable/11/sys/netinet6/sctp6_usrreq.c stable/11/sys/netinet6/sctp6_var.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/11/sys/netinet/sctp_usrreq.c Thu Jun 1 08:42:53 2017 (r319401) +++ stable/11/sys/netinet/sctp_usrreq.c Thu Jun 1 08:48:16 2017 (r319402) @@ -152,7 +152,7 @@ sctp_notify(struct sctp_inpcb *inp, uint8_t icmp_type, uint8_t icmp_code, uint16_t ip_len, - uint16_t next_mtu) + uint32_t next_mtu) { #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -328,7 +328,7 @@ sctp_ctlinput(int cmd, struct sockaddr *sa, void *vip) icmp->icmp_type, icmp->icmp_code, ntohs(inner_ip->ip_len), - ntohs(icmp->icmp_nextmtu)); + (uint32_t)ntohs(icmp->icmp_nextmtu)); } else { if ((stcb == NULL) && (inp != NULL)) { /* reduce ref-count */ Modified: stable/11/sys/netinet/sctp_var.h ============================================================================== --- stable/11/sys/netinet/sctp_var.h Thu Jun 1 08:42:53 2017 (r319401) +++ stable/11/sys/netinet/sctp_var.h Thu Jun 1 08:48:16 2017 (r319402) @@ -341,7 +341,7 @@ void sctp_drain(void); void sctp_init(void); void sctp_notify(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, - uint8_t, uint8_t, uint16_t, uint16_t); + uint8_t, uint8_t, uint16_t, uint32_t); int sctp_flush(struct socket *, int); int sctp_shutdown(struct socket *); int Modified: stable/11/sys/netinet/sctputil.c ============================================================================== --- stable/11/sys/netinet/sctputil.c Thu Jun 1 08:42:53 2017 (r319401) +++ stable/11/sys/netinet/sctputil.c Thu Jun 1 08:48:16 2017 (r319402) @@ -6971,7 +6971,7 @@ sctp_recv_icmp_tunneled_packet(int cmd, struct sockadd } sctp_notify(inp, stcb, net, type, code, ntohs(inner_ip->ip_len), - ntohs(icmp->icmp_nextmtu)); + (uint32_t)ntohs(icmp->icmp_nextmtu)); } else { if ((stcb == NULL) && (inp != NULL)) { /* reduce ref-count */ @@ -7113,7 +7113,7 @@ sctp_recv_icmp6_tunneled_packet(int cmd, struct sockad code = ICMP6_PARAMPROB_NEXTHEADER; } sctp6_notify(inp, stcb, net, type, code, - (uint16_t)ntohl(ip6cp->ip6c_icmp6->icmp6_mtu)); + ntohl(ip6cp->ip6c_icmp6->icmp6_mtu)); } else { if ((stcb == NULL) && (inp != NULL)) { /* reduce inp's ref-count */ Modified: stable/11/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/11/sys/netinet6/sctp6_usrreq.c Thu Jun 1 08:42:53 2017 (r319401) +++ stable/11/sys/netinet6/sctp6_usrreq.c Thu Jun 1 08:48:16 2017 (r319402) @@ -183,7 +183,7 @@ sctp6_notify(struct sctp_inpcb *inp, struct sctp_nets *net, uint8_t icmp6_type, uint8_t icmp6_code, - uint16_t next_mtu) + uint32_t next_mtu) { #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -383,7 +383,7 @@ sctp6_ctlinput(int cmd, struct sockaddr *pktdst, void sctp6_notify(inp, stcb, net, ip6cp->ip6c_icmp6->icmp6_type, ip6cp->ip6c_icmp6->icmp6_code, - (uint16_t)ntohl(ip6cp->ip6c_icmp6->icmp6_mtu)); + ntohl(ip6cp->ip6c_icmp6->icmp6_mtu)); } else { if ((stcb == NULL) && (inp != NULL)) { /* reduce inp's ref-count */ Modified: stable/11/sys/netinet6/sctp6_var.h ============================================================================== --- stable/11/sys/netinet6/sctp6_var.h Thu Jun 1 08:42:53 2017 (r319401) +++ stable/11/sys/netinet6/sctp6_var.h Thu Jun 1 08:48:16 2017 (r319402) @@ -49,6 +49,6 @@ sctp6_output(struct sctp_inpcb *, struct mbuf *, struc void sctp6_ctlinput(int, struct sockaddr *, void *); void sctp6_notify(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, - uint8_t, uint8_t, uint16_t); + uint8_t, uint8_t, uint32_t); #endif #endif From owner-svn-src-all@freebsd.org Thu Jun 1 08:42:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC37CBF2B54; Thu, 1 Jun 2017 08:42:54 +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 7C2396F32A; Thu, 1 Jun 2017 08:42:54 +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 v518grXH030827; Thu, 1 Jun 2017 08:42:53 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v518grqB030826; Thu, 1 Jun 2017 08:42:53 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010842.v518grqB030826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319401 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:42:54 -0000 Author: tuexen Date: Thu Jun 1 08:42:53 2017 New Revision: 319401 URL: https://svnweb.freebsd.org/changeset/base/319401 Log: MFC r317244: Represent "a syncache overflow hasn't happend yet" by using -(SYNCOOKIE_LIFETIME + 1) instead of INT64_MIN, since it is good enough and works when time_t is int32 or int64. This fixes the issue reported by cy@ on i386. Reported by: cy Modified: stable/11/sys/netinet/tcp_syncache.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_syncache.c ============================================================================== --- stable/11/sys/netinet/tcp_syncache.c Thu Jun 1 08:32:35 2017 (r319400) +++ stable/11/sys/netinet/tcp_syncache.c Thu Jun 1 08:42:53 2017 (r319401) @@ -252,7 +252,8 @@ syncache_init(void) &V_tcp_syncache.hashbase[i].sch_mtx, 0); V_tcp_syncache.hashbase[i].sch_length = 0; V_tcp_syncache.hashbase[i].sch_sc = &V_tcp_syncache; - V_tcp_syncache.hashbase[i].sch_last_overflow = INT64_MIN; + V_tcp_syncache.hashbase[i].sch_last_overflow = + -(SYNCOOKIE_LIFETIME + 1); } /* Create the syncache entry zone. */ From owner-svn-src-all@freebsd.org Thu Jun 1 08:04:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3838FBEFB72; Thu, 1 Jun 2017 08:04:11 +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 05A1B6A92A; Thu, 1 Jun 2017 08:04: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 v5184A2t014163; Thu, 1 Jun 2017 08:04:10 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5184Awk014162; Thu, 1 Jun 2017 08:04:10 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010804.v5184Awk014162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319392 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:04:11 -0000 Author: tuexen Date: Thu Jun 1 08:04:09 2017 New Revision: 319392 URL: https://svnweb.freebsd.org/changeset/base/319392 Log: MFC r312063: Ensure that the buffer length and the length provided in the IPv4 header match when using a raw socket to send IPv4 packets and providing the header. If they don't match, let send return -1 and set errno to EINVAL. Before this patch is was only enforced that the length in the header is not larger then the buffer length. PR: 212283 Reviewed by: ae, gnn Differential Revision: https://reviews.freebsd.org/D9161 Modified: stable/11/sys/netinet/raw_ip.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/raw_ip.c ============================================================================== --- stable/11/sys/netinet/raw_ip.c Thu Jun 1 07:10:40 2017 (r319391) +++ stable/11/sys/netinet/raw_ip.c Thu Jun 1 08:04:09 2017 (r319392) @@ -507,7 +507,7 @@ rip_output(struct mbuf *m, struct socket *so, ...) * and don't allow packet length sizes that will crash. */ if (((ip->ip_hl != (sizeof (*ip) >> 2)) && inp->inp_options) - || (ntohs(ip->ip_len) > m->m_pkthdr.len) + || (ntohs(ip->ip_len) != m->m_pkthdr.len) || (ntohs(ip->ip_len) < (ip->ip_hl << 2))) { INP_RUNLOCK(inp); m_freem(m); From owner-svn-src-all@freebsd.org Thu Jun 1 08:07:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E66EBEFD85; Thu, 1 Jun 2017 08:07: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 1A0D46AA8F; Thu, 1 Jun 2017 08:07: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 v5187998014332; Thu, 1 Jun 2017 08:07:09 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51879wd014331; Thu, 1 Jun 2017 08:07:09 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010807.v51879wd014331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319393 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:07:10 -0000 Author: tuexen Date: Thu Jun 1 08:07:09 2017 New Revision: 319393 URL: https://svnweb.freebsd.org/changeset/base/319393 Log: MFC r312722: Fix a bug where the overhead of the I-DATA chunk was not considered. Modified: stable/11/sys/netinet/sctp_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_output.c ============================================================================== --- stable/11/sys/netinet/sctp_output.c Thu Jun 1 08:04:09 2017 (r319392) +++ stable/11/sys/netinet/sctp_output.c Thu Jun 1 08:07:09 2017 (r319393) @@ -7080,11 +7080,9 @@ sctp_clean_up_ctl(struct sctp_tcb *stcb, struct sctp_a } } - -static int -sctp_can_we_split_this(struct sctp_tcb *stcb, - uint32_t length, - uint32_t goal_mtu, uint32_t frag_point, int eeor_on) +static uint32_t +sctp_can_we_split_this(struct sctp_tcb *stcb, uint32_t length, + uint32_t space_left, uint32_t frag_point, int eeor_on) { /* * Make a decision on if I should split a msg into multiple parts. @@ -7096,7 +7094,7 @@ sctp_can_we_split_this(struct sctp_tcb *stcb, * entire thing, since it might be all the guy is putting in * the hopper. */ - if (goal_mtu >= length) { + if (space_left >= length) { /*- * If we have data outstanding, * we get another chance when the sack @@ -7113,7 +7111,7 @@ sctp_can_we_split_this(struct sctp_tcb *stcb, } else { /* You can fill the rest */ - return (goal_mtu); + return (space_left); } } /*- @@ -7124,28 +7122,27 @@ sctp_can_we_split_this(struct sctp_tcb *stcb, if (SCTP_SB_LIMIT_SND(stcb->sctp_socket) < frag_point) { return (length); } - if ((length <= goal_mtu) || - ((length - goal_mtu) < SCTP_BASE_SYSCTL(sctp_min_residual))) { + if ((length <= space_left) || + ((length - space_left) < SCTP_BASE_SYSCTL(sctp_min_residual))) { /* Sub-optimial residual don't split in non-eeor mode. */ return (0); } /* - * If we reach here length is larger than the goal_mtu. Do we wish + * If we reach here length is larger than the space_left. Do we wish * to split it for the sake of packet putting together? */ - if (goal_mtu >= min(SCTP_BASE_SYSCTL(sctp_min_split_point), frag_point)) { + if (space_left >= min(SCTP_BASE_SYSCTL(sctp_min_split_point), frag_point)) { /* Its ok to split it */ - return (min(goal_mtu, frag_point)); + return (min(space_left, frag_point)); } /* Nope, can't split */ return (0); - } static uint32_t sctp_move_to_outqueue(struct sctp_tcb *stcb, struct sctp_stream_out *strq, - uint32_t goal_mtu, + uint32_t space_left, uint32_t frag_point, int *giveup, int eeor_mode, @@ -7306,7 +7303,7 @@ re_look: sp->some_taken = 1; } } else { - to_move = sctp_can_we_split_this(stcb, length, goal_mtu, frag_point, eeor_mode); + to_move = sctp_can_we_split_this(stcb, length, space_left, frag_point, eeor_mode); if (to_move) { /*- * We use a snapshot of length in case it @@ -7701,56 +7698,66 @@ sctp_fill_outqueue(struct sctp_tcb *stcb, { struct sctp_association *asoc; struct sctp_stream_out *strq; - int goal_mtu, moved_how_much, total_moved = 0, bail = 0; - int giveup; + uint32_t space_left, moved, total_moved; + int bail, giveup; SCTP_TCB_LOCK_ASSERT(stcb); asoc = &stcb->asoc; + total_moved = 0; switch (net->ro._l_addr.sa.sa_family) { #ifdef INET case AF_INET: - goal_mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; + space_left = net->mtu - SCTP_MIN_V4_OVERHEAD; break; #endif #ifdef INET6 case AF_INET6: - goal_mtu = net->mtu - SCTP_MIN_OVERHEAD; + space_left = net->mtu - SCTP_MIN_OVERHEAD; break; #endif default: /* TSNH */ - goal_mtu = net->mtu; + space_left = net->mtu; break; } /* Need an allowance for the data chunk header too */ if (stcb->asoc.idata_supported == 0) { - goal_mtu -= sizeof(struct sctp_data_chunk); + space_left -= sizeof(struct sctp_data_chunk); } else { - goal_mtu -= sizeof(struct sctp_idata_chunk); + space_left -= sizeof(struct sctp_idata_chunk); } /* must make even word boundary */ - goal_mtu &= 0xfffffffc; + space_left &= 0xfffffffc; strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc); - while ((goal_mtu > 0) && strq) { + while ((space_left > 0) && (strq != NULL)) { giveup = 0; bail = 0; - moved_how_much = sctp_move_to_outqueue(stcb, strq, goal_mtu, frag_point, + moved = sctp_move_to_outqueue(stcb, strq, space_left, frag_point, &giveup, eeor_mode, &bail, so_locked); - stcb->asoc.ss_functions.sctp_ss_scheduled(stcb, net, asoc, strq, moved_how_much); - - if ((giveup) || bail) { + stcb->asoc.ss_functions.sctp_ss_scheduled(stcb, net, asoc, strq, moved); + if ((giveup != 0) || (bail != 0)) { break; } strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc); - if (strq == NULL) { - break; + total_moved += moved; + space_left -= moved; + if (stcb->asoc.idata_supported == 0) { + if (space_left >= sizeof(struct sctp_data_chunk)) { + space_left -= sizeof(struct sctp_data_chunk); + } else { + space_left = 0; + } + } else { + if (space_left >= sizeof(struct sctp_idata_chunk)) { + space_left -= sizeof(struct sctp_idata_chunk); + } else { + space_left = 0; + } } - total_moved += moved_how_much; - goal_mtu -= (moved_how_much + sizeof(struct sctp_data_chunk)); - goal_mtu &= 0xfffffffc; + space_left &= 0xfffffffc; } - if (bail) + if (bail != 0) *quit_now = 1; stcb->asoc.ss_functions.sctp_ss_packet_done(stcb, net, asoc); From owner-svn-src-all@freebsd.org Thu Jun 1 08:09:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68589BF004D; Thu, 1 Jun 2017 08:09:55 +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 3843A6AC0F; Thu, 1 Jun 2017 08:09:55 +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 v5189sTL014470; Thu, 1 Jun 2017 08:09:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5189sTF014469; Thu, 1 Jun 2017 08:09:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010809.v5189sTF014469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319394 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:09:55 -0000 Author: tuexen Date: Thu Jun 1 08:09:54 2017 New Revision: 319394 URL: https://svnweb.freebsd.org/changeset/base/319394 Log: MFC r313030: Remove a duplicate debug statement. Modified: stable/11/sys/netinet/sctp_timer.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_timer.c ============================================================================== --- stable/11/sys/netinet/sctp_timer.c Thu Jun 1 08:07:09 2017 (r319393) +++ stable/11/sys/netinet/sctp_timer.c Thu Jun 1 08:09:54 2017 (r319394) @@ -719,13 +719,9 @@ start_again: if (num_mk) { SCTPDBG(SCTP_DEBUG_TIMER1, "LAST TSN marked was %x\n", tsnlast); - SCTPDBG(SCTP_DEBUG_TIMER1, "Num marked for retransmission was %d peer-rwd:%ld\n", - num_mk, (u_long)stcb->asoc.peers_rwnd); - SCTPDBG(SCTP_DEBUG_TIMER1, "LAST TSN marked was %x\n", - tsnlast); - SCTPDBG(SCTP_DEBUG_TIMER1, "Num marked for retransmission was %d peer-rwd:%d\n", + SCTPDBG(SCTP_DEBUG_TIMER1, "Num marked for retransmission was %d peer-rwd:%u\n", num_mk, - (int)stcb->asoc.peers_rwnd); + stcb->asoc.peers_rwnd); } #endif *num_marked = num_mk; From owner-svn-src-all@freebsd.org Thu Jun 1 09:14:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C64EBBF56FC; Thu, 1 Jun 2017 09:14:44 +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 91AA770997; Thu, 1 Jun 2017 09:14:44 +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 v519EhTT043181; Thu, 1 Jun 2017 09:14:43 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v519EhYU043180; Thu, 1 Jun 2017 09:14:43 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010914.v519EhYU043180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 09:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319405 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 09:14:44 -0000 Author: tuexen Date: Thu Jun 1 09:14:43 2017 New Revision: 319405 URL: https://svnweb.freebsd.org/changeset/base/319405 Log: MFC r317558: Set the DF bit for responses to out-of-the-blue packets. Modified: stable/11/sys/netinet/sctp_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_output.c ============================================================================== --- stable/11/sys/netinet/sctp_output.c Thu Jun 1 09:00:38 2017 (r319404) +++ stable/11/sys/netinet/sctp_output.c Thu Jun 1 09:14:43 2017 (r319405) @@ -11147,7 +11147,7 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad ip->ip_v = IPVERSION; ip->ip_hl = (sizeof(struct ip) >> 2); ip->ip_tos = 0; - ip->ip_off = 0; + ip->ip_off = htons(IP_DF); ip_fillid(ip); ip->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { From owner-svn-src-all@freebsd.org Thu Jun 1 08:32:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB30BBF1F34; Thu, 1 Jun 2017 08:32:36 +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 85A976EE34; Thu, 1 Jun 2017 08:32:36 +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 v518WZvi026638; Thu, 1 Jun 2017 08:32:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v518WZjC026636; Thu, 1 Jun 2017 08:32:35 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010832.v518WZjC026636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319400 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:32:36 -0000 Author: tuexen Date: Thu Jun 1 08:32:35 2017 New Revision: 319400 URL: https://svnweb.freebsd.org/changeset/base/319400 Log: MFC r317208: Syncoockies can be used in combination with the syncache. If the cache overflows, syncookies are used. This patch restricts the usage of syncookies in this case: accept syncookies only if there was an overflow of the syncache recently. This mitigates a problem reported in PR217637, where is syncookie was accepted without any recent drops. Thanks to glebius@ for suggesting an improvement. PR: 217637 Reviewed by: gnn, glebius Differential Revision: https://reviews.freebsd.org/D10272 Modified: stable/11/sys/netinet/tcp_syncache.c stable/11/sys/netinet/tcp_syncache.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_syncache.c ============================================================================== --- stable/11/sys/netinet/tcp_syncache.c Thu Jun 1 08:29:08 2017 (r319399) +++ stable/11/sys/netinet/tcp_syncache.c Thu Jun 1 08:32:35 2017 (r319400) @@ -252,6 +252,7 @@ syncache_init(void) &V_tcp_syncache.hashbase[i].sch_mtx, 0); V_tcp_syncache.hashbase[i].sch_length = 0; V_tcp_syncache.hashbase[i].sch_sc = &V_tcp_syncache; + V_tcp_syncache.hashbase[i].sch_last_overflow = INT64_MIN; } /* Create the syncache entry zone. */ @@ -327,6 +328,7 @@ syncache_insert(struct syncache *sc, struct syncache_h KASSERT(!TAILQ_EMPTY(&sch->sch_bucket), ("sch->sch_length incorrect")); sc2 = TAILQ_LAST(&sch->sch_bucket, sch_head); + sch->sch_last_overflow = time_uptime; syncache_drop(sc2, sch); TCPSTAT_INC(tcps_sc_bucketoverflow); } @@ -966,10 +968,13 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt /* * There is no syncache entry, so see if this ACK is * a returning syncookie. To do this, first: - * A. See if this socket has had a syncache entry dropped in - * the past. We don't want to accept a bogus syncookie - * if we've never received a SYN. - * B. check that the syncookie is valid. If it is, then + * A. Check if syncookies are used in case of syncache + * overflows + * B. See if this socket has had a syncache entry dropped in + * the recent past. We don't want to accept a bogus + * syncookie if we've never received a SYN or accept it + * twice. + * C. check that the syncookie is valid. If it is, then * cobble up a fake syncache entry, and return. */ if (!V_tcp_syncookies) { @@ -980,6 +985,15 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt s, __func__); goto failed; } + if (!V_tcp_syncookiesonly && + sch->sch_last_overflow < time_uptime - SYNCOOKIE_LIFETIME) { + SCH_UNLOCK(sch); + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) + log(LOG_DEBUG, "%s; %s: Spurious ACK, " + "segment rejected (no syncache entry)\n", + s, __func__); + goto failed; + } bzero(&scs, sizeof(scs)); sc = syncookie_lookup(inc, sch, &scs, th, to, *lsop); SCH_UNLOCK(sch); @@ -1399,8 +1413,10 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *t * entry and insert the new one. */ TCPSTAT_INC(tcps_sc_zonefail); - if ((sc = TAILQ_LAST(&sch->sch_bucket, sch_head)) != NULL) + if ((sc = TAILQ_LAST(&sch->sch_bucket, sch_head)) != NULL) { + sch->sch_last_overflow = time_uptime; syncache_drop(sc, sch); + } sc = uma_zalloc(V_tcp_syncache.zone, M_NOWAIT | M_ZERO); if (sc == NULL) { if (V_tcp_syncookies) { Modified: stable/11/sys/netinet/tcp_syncache.h ============================================================================== --- stable/11/sys/netinet/tcp_syncache.h Thu Jun 1 08:29:08 2017 (r319399) +++ stable/11/sys/netinet/tcp_syncache.h Thu Jun 1 08:32:35 2017 (r319400) @@ -99,6 +99,7 @@ struct syncache_head { int sch_nextc; u_int sch_length; struct tcp_syncache *sch_sc; + time_t sch_last_overflow; }; #define SYNCOOKIE_SECRET_SIZE 16 From owner-svn-src-all@freebsd.org Thu Jun 1 08:29:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFCC5BF1A3F; Thu, 1 Jun 2017 08:29:09 +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 8B7E46EA33; Thu, 1 Jun 2017 08:29:09 +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 v518T84S022966; Thu, 1 Jun 2017 08:29:08 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v518T8Ze022964; Thu, 1 Jun 2017 08:29:08 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010829.v518T8Ze022964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319399 - in stable/11/sys/netinet: . tcp_stacks X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:29:09 -0000 Author: tuexen Date: Thu Jun 1 08:29:08 2017 New Revision: 319399 URL: https://svnweb.freebsd.org/changeset/base/319399 Log: MFC r316743: The sysctl variable net.inet.tcp.drop_synfin is not honored in all states, for example not in SYN-SENT. This patch adds code to check the sysctl variable in other states than LISTEN. Thanks to ae and gnn for providing comments. Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D9894 Modified: stable/11/sys/netinet/tcp_input.c stable/11/sys/netinet/tcp_stacks/fastpath.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_input.c ============================================================================== --- stable/11/sys/netinet/tcp_input.c Thu Jun 1 08:25:45 2017 (r319398) +++ stable/11/sys/netinet/tcp_input.c Thu Jun 1 08:29:08 2017 (r319399) @@ -1596,6 +1596,16 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru tcp_pcap_add(th, m, &(tp->t_inpkts)); #endif + if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: " + "SYN|FIN segment ignored (based on " + "sysctl setting)\n", s, __func__); + free(s, M_TCPLOG); + } + goto drop; + } + /* * Segment received on connection. * Reset idle time and keep-alive timer. Modified: stable/11/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- stable/11/sys/netinet/tcp_stacks/fastpath.c Thu Jun 1 08:25:45 2017 (r319398) +++ stable/11/sys/netinet/tcp_stacks/fastpath.c Thu Jun 1 08:29:08 2017 (r319399) @@ -128,6 +128,8 @@ VNET_DECLARE(int, tcp_insecure_rst); #define V_tcp_insecure_rst VNET(tcp_insecure_rst) VNET_DECLARE(int, tcp_insecure_syn); #define V_tcp_insecure_syn VNET(tcp_insecure_syn) +VNET_DECLARE(int, drop_synfin); +#define V_drop_synfin VNET(drop_synfin) static void tcp_do_segment_fastslow(struct mbuf *, struct tcphdr *, struct socket *, struct tcpcb *, int, int, uint8_t, @@ -1699,7 +1701,6 @@ tcp_do_segment_fastslow(struct mbuf *m, struct tcphdr struct tcpopt to; thflags = th->th_flags; - tp->sackhint.last_sack_ack = 0; inc = &tp->t_inpcb->inp_inc; /* * If this is either a state-changing packet or current state isn't @@ -1729,6 +1730,23 @@ tcp_do_segment_fastslow(struct mbuf *m, struct tcphdr KASSERT(tp->t_state != TCPS_TIME_WAIT, ("%s: TCPS_TIME_WAIT", __func__)); + if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: " + "SYN|FIN segment ignored (based on " + "sysctl setting)\n", s, __func__); + free(s, M_TCPLOG); + } + if (ti_locked == TI_RLOCKED) { + INP_INFO_RUNLOCK(&V_tcbinfo); + } + INP_WUNLOCK(tp->t_inpcb); + m_freem(m); + return; + } + + tp->sackhint.last_sack_ack = 0; + /* * Segment received on connection. * Reset idle time and keep-alive timer. @@ -2141,7 +2159,6 @@ tcp_do_segment_fastack(struct mbuf *m, struct tcphdr * struct tcpopt to; thflags = th->th_flags; - tp->sackhint.last_sack_ack = 0; inc = &tp->t_inpcb->inp_inc; /* * If this is either a state-changing packet or current state isn't @@ -2170,6 +2187,23 @@ tcp_do_segment_fastack(struct mbuf *m, struct tcphdr * __func__)); KASSERT(tp->t_state != TCPS_TIME_WAIT, ("%s: TCPS_TIME_WAIT", __func__)); + + if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: " + "SYN|FIN segment ignored (based on " + "sysctl setting)\n", s, __func__); + free(s, M_TCPLOG); + } + if (ti_locked == TI_RLOCKED) { + INP_INFO_RUNLOCK(&V_tcbinfo); + } + INP_WUNLOCK(tp->t_inpcb); + m_freem(m); + return; + } + + tp->sackhint.last_sack_ack = 0; /* * Segment received on connection. From owner-svn-src-all@freebsd.org Thu Jun 1 08:58:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59DBBBF4459; Thu, 1 Jun 2017 08:58:40 +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 287136FF56; Thu, 1 Jun 2017 08:58:40 +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 v518wdRh034974; Thu, 1 Jun 2017 08:58:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v518wdDj034971; Thu, 1 Jun 2017 08:58:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010858.v518wdDj034971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 08:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319403 - in stable/11/sys: netinet netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 08:58:40 -0000 Author: tuexen Date: Thu Jun 1 08:58:39 2017 New Revision: 319403 URL: https://svnweb.freebsd.org/changeset/base/319403 Log: MFC 317464: Fix an issue with MTU calculation if an ICMP message is received for an SCTP/UDP packet. Modified: stable/11/sys/netinet/sctp_usrreq.c stable/11/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/11/sys/netinet/sctp_usrreq.c Thu Jun 1 08:48:16 2017 (r319402) +++ stable/11/sys/netinet/sctp_usrreq.c Thu Jun 1 08:58:39 2017 (r319403) @@ -220,11 +220,11 @@ sctp_notify(struct sctp_inpcb *inp, timer_stopped = 0; } /* Update the path MTU. */ + if (net->port) { + next_mtu -= sizeof(struct udphdr); + } if (net->mtu > next_mtu) { net->mtu = next_mtu; - if (net->port) { - net->mtu -= sizeof(struct udphdr); - } } /* Update the association MTU */ if (stcb->asoc.smallest_mtu > next_mtu) { Modified: stable/11/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/11/sys/netinet6/sctp6_usrreq.c Thu Jun 1 08:48:16 2017 (r319402) +++ stable/11/sys/netinet6/sctp6_usrreq.c Thu Jun 1 08:58:39 2017 (r319403) @@ -237,11 +237,11 @@ sctp6_notify(struct sctp_inpcb *inp, timer_stopped = 0; } /* Update the path MTU. */ + if (net->port) { + next_mtu -= sizeof(struct udphdr); + } if (net->mtu > next_mtu) { net->mtu = next_mtu; - if (net->port) { - net->mtu -= sizeof(struct udphdr); - } } /* Update the association MTU */ if (stcb->asoc.smallest_mtu > next_mtu) { From owner-svn-src-all@freebsd.org Thu Jun 1 09:14:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96CDABF571D; Thu, 1 Jun 2017 09:14:50 +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 62115709A0; Thu, 1 Jun 2017 09:14:50 +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 v519EnBA043229; Thu, 1 Jun 2017 09:14:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v519EnCo043228; Thu, 1 Jun 2017 09:14:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706010914.v519EnCo043228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 1 Jun 2017 09:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319406 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 09:14:50 -0000 Author: manu Date: Thu Jun 1 09:14:49 2017 New Revision: 319406 URL: https://svnweb.freebsd.org/changeset/base/319406 Log: ipfw.8: Note that the ipfw_nat kernel module must be loaded or that the IPFIREWALL_NAT options must be in the kernel config in order to use in-kernel nat. MFC after: 3 days Modified: head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Thu Jun 1 09:14:43 2017 (r319405) +++ head/sbin/ipfw/ipfw.8 Thu Jun 1 09:14:49 2017 (r319406) @@ -2896,6 +2896,11 @@ the packets are dropped. .Nm support in-kernel NAT using the kernel version of .Xr libalias 3 . +The kernel module +.Cm ipfw_nat +should be loaded or kernel should have +.Cm options IPFIREWALL_NAT +to be able use NAT. .Pp The nat configuration command is the following: .Bd -ragged -offset indent From owner-svn-src-all@freebsd.org Thu Jun 1 09:00:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E7DFBF46C4; Thu, 1 Jun 2017 09:00:40 +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 785F37008D; Thu, 1 Jun 2017 09:00:40 +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 v5190dH1035136; Thu, 1 Jun 2017 09:00:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5190dpJ035131; Thu, 1 Jun 2017 09:00:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010900.v5190dpJ035131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 09:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319404 - in stable/11: sys/conf sys/libkern sys/libkern/arm64 sys/sys tests/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 09:00:40 -0000 Author: tuexen Date: Thu Jun 1 09:00:38 2017 New Revision: 319404 URL: https://svnweb.freebsd.org/changeset/base/319404 Log: MFC r317512: armv8 has support for optional CRC32C instructions. This patch checks if they are available and if that is true make use of them. Thank you very much to Andrew Turner for providing help and review the patch! Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D10499 Added: stable/11/sys/libkern/arm64/ - copied from r317512, head/sys/libkern/arm64/ Modified: stable/11/sys/conf/files.arm64 stable/11/sys/libkern/crc32.c stable/11/sys/sys/libkern.h stable/11/tests/sys/kern/Makefile stable/11/tests/sys/kern/libkern_crc32.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files.arm64 ============================================================================== --- stable/11/sys/conf/files.arm64 Thu Jun 1 08:58:39 2017 (r319403) +++ stable/11/sys/conf/files.arm64 Thu Jun 1 09:00:38 2017 (r319404) @@ -107,6 +107,7 @@ libkern/flsl.c standard libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard +libkern/arm64/crc32c_armv8.S standard cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S optional zfs | dtrace compile-with "${CDDL_C}" cddl/dev/dtrace/aarch64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/aarch64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" Modified: stable/11/sys/libkern/crc32.c ============================================================================== --- stable/11/sys/libkern/crc32.c Thu Jun 1 08:58:39 2017 (r319403) +++ stable/11/sys/libkern/crc32.c Thu Jun 1 09:00:38 2017 (r319404) @@ -54,6 +54,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#if defined(__aarch64__) +#include +#endif + const uint32_t crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, @@ -758,6 +762,18 @@ calculate_crc32c(uint32_t crc32c, #if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) if ((cpu_feature2 & CPUID2_SSE42) != 0) { return (sse42_crc32c(crc32c, buffer, length)); + } else +#endif +#if defined(__aarch64__) + uint64_t reg; + + /* + * We only test for CRC32 support on the CPU with index 0 assuming that + * this applies to all CPUs. + */ + reg = READ_SPECIALREG(id_aa64isar0_el1); + if (ID_AA64ISAR0_CRC32(reg) != ID_AA64ISAR0_CRC32_NONE) { + return (armv8_crc32c(crc32c, buffer, length)); } else #endif if (length < 4) { Modified: stable/11/sys/sys/libkern.h ============================================================================== --- stable/11/sys/sys/libkern.h Thu Jun 1 08:58:39 2017 (r319403) +++ stable/11/sys/sys/libkern.h Thu Jun 1 09:00:38 2017 (r319404) @@ -182,6 +182,9 @@ calculate_crc32c(uint32_t crc32c, const unsigned char #if defined(__amd64__) || defined(__i386__) uint32_t sse42_crc32c(uint32_t, const unsigned char *, unsigned); #endif +#if defined(__aarch64__) +uint32_t armv8_crc32c(uint32_t, const unsigned char *, unsigned int); +#endif #endif Modified: stable/11/tests/sys/kern/Makefile ============================================================================== --- stable/11/tests/sys/kern/Makefile Thu Jun 1 08:58:39 2017 (r319403) +++ stable/11/tests/sys/kern/Makefile Thu Jun 1 09:00:38 2017 (r319404) @@ -25,10 +25,16 @@ NETBSD_ATF_TESTS_C+= mqueue_test CFLAGS.mqueue_test+= -I${SRCTOP}/tests LIBADD.mqueue_test+= rt -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "amd64" || \ + ${MACHINE_ARCH} == "i386" || \ + ${MACHINE_ARCH} == "aarch64" ATF_TESTS_C+= libkern_crc32 CFLAGS.libkern_crc32+= -msse4 -DUSERSPACE_TESTING +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/x86/crc32_sse42.c +.else +LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/arm64/crc32c_armv8.S +.endif .endif # subr_unit.c contains functions whose prototypes lie in headers that cannot be Modified: stable/11/tests/sys/kern/libkern_crc32.c ============================================================================== --- stable/11/tests/sys/kern/libkern_crc32.c Thu Jun 1 08:58:39 2017 (r319403) +++ stable/11/tests/sys/kern/libkern_crc32.c Thu Jun 1 09:00:38 2017 (r319404) @@ -32,7 +32,13 @@ #include +#if defined(__amd64__) || defined(__i386__) extern uint32_t sse42_crc32c(uint32_t, const unsigned char *, unsigned); +#elif defined(__aarch64__) +extern uint32_t armv8_crc32c(uint32_t, const unsigned char *, unsigned); +#else +#error These tests are not supported on this platform +#endif ATF_TC_WITHOUT_HEAD(crc32c_basic_correctness); ATF_TC_BODY(crc32c_basic_correctness, tc) @@ -79,8 +85,13 @@ ATF_TC_BODY(crc32c_basic_correctness, tc) ATF_REQUIRE(nitems(inputs) == nitems(results)); for (i = 0; i < nitems(inputs); i++) { +#if defined(__amd64__) || defined(__i386__) act = sse42_crc32c(~0, (const void *)&inputs[i], sizeof(inputs[0])); +#else + act = armv8_crc32c(~0, (const void *)&inputs[i], + sizeof(inputs[0])); +#endif ATF_REQUIRE_MSG(act == results[i], "crc32c(0x%jx) = 0x%08x, got 0x%08x", (uintmax_t)inputs[i], results[i], act); @@ -100,7 +111,11 @@ ATF_TC_BODY(crc32c_alignment, tc) for (i = 1; i < 8; i++) { memcpy(&buf[i], &input, sizeof(input)); +#if defined(__amd64__) || defined(__i386__) act = sse42_crc32c(~0, (const void *)&buf[i], sizeof(input)); +#else + act = armv8_crc32c(~0, (const void *)&buf[i], sizeof(input)); +#endif ATF_REQUIRE_MSG(act == result, "crc32c(0x%jx) = 0x%08x, got 0x%08x", (uintmax_t)input, result, act); @@ -117,7 +132,11 @@ ATF_TC_BODY(crc32c_trailing_bytes, tc) const uint32_t result = 0xec638d62; uint32_t act; +#if defined(__amd64__) || defined(__i386__) act = sse42_crc32c(~0, input, sizeof(input)); +#else + act = armv8_crc32c(~0, input, sizeof(input)); +#endif ATF_REQUIRE_MSG(act == result, "expected 0x%08x, got 0x%08x", result, act); } From owner-svn-src-all@freebsd.org Thu Jun 1 09:34:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0511DBF6B61; Thu, 1 Jun 2017 09:34:53 +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 BC06F715E0; Thu, 1 Jun 2017 09:34:52 +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 v519YpF7051446; Thu, 1 Jun 2017 09:34:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v519Yp6o051442; Thu, 1 Jun 2017 09:34:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706010934.v519Yp6o051442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 1 Jun 2017 09:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319409 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 09:34:53 -0000 Author: hselasky Date: Thu Jun 1 09:34:51 2017 New Revision: 319409 URL: https://svnweb.freebsd.org/changeset/base/319409 Log: Add generic kqueue() and kevent() support to the LinuxKPI character devices. The implementation allows read and write filters to be created and piggybacks on the poll() file operation to determine when a filter should trigger. The piggyback mechanism is simply to check for the EWOULDBLOCK or EAGAIN return code from read(), write() or ioctl() system calls and then update the kqueue() polling state bits. The implementation is similar to the one found in the cuse(3) module. Refer to sys/fs/cuse/*.[ch] for more details. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/file.h head/sys/compat/linuxkpi/common/include/linux/fs.h head/sys/compat/linuxkpi/common/include/linux/poll.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/file.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/file.h Thu Jun 1 09:21:25 2017 (r319408) +++ head/sys/compat/linuxkpi/common/include/linux/file.h Thu Jun 1 09:34:51 2017 (r319409) @@ -151,20 +151,18 @@ get_unused_fd_flags(int flags) return fd; } +extern struct linux_file *linux_file_alloc(void); + static inline struct linux_file * alloc_file(int mode, const struct file_operations *fops) { struct linux_file *filp; - filp = kzalloc(sizeof(*filp), GFP_KERNEL); - if (filp == NULL) - return (NULL); - - filp->f_count = 1; + filp = linux_file_alloc(); filp->f_op = fops; filp->f_mode = mode; - return filp; + return (filp); } struct fd { Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/fs.h Thu Jun 1 09:21:25 2017 (r319408) +++ head/sys/compat/linuxkpi/common/include/linux/fs.h Thu Jun 1 09:34:51 2017 (r319409) @@ -41,6 +41,7 @@ #include #include #include +#include struct module; struct kiocb; @@ -80,6 +81,15 @@ struct linux_file { struct sigio *f_sigio; struct vnode *f_vnode; volatile u_int f_count; + + /* kqfilter support */ + int f_kqflags; +#define LINUX_KQ_FLAG_HAS_READ (1 << 0) +#define LINUX_KQ_FLAG_HAS_WRITE (1 << 1) +#define LINUX_KQ_FLAG_NEED_READ (1 << 2) +#define LINUX_KQ_FLAG_NEED_WRITE (1 << 3) + /* protects f_selinfo.si_note */ + spinlock_t f_kqlock; }; #define file linux_file Modified: head/sys/compat/linuxkpi/common/include/linux/poll.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/poll.h Thu Jun 1 09:21:25 2017 (r319408) +++ head/sys/compat/linuxkpi/common/include/linux/poll.h Thu Jun 1 09:34:51 2017 (r319409) @@ -46,4 +46,6 @@ poll_wait(struct linux_file *filp, wait_queue_head_t * selrecord(curthread, &filp->f_selinfo); } +extern void linux_poll_wakeup(struct linux_file *); + #endif /* _LINUX_POLL_H_ */ Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Jun 1 09:21:25 2017 (r319408) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Jun 1 09:34:51 2017 (r319409) @@ -402,6 +402,63 @@ linux_file_dtor(void *cdp) kfree(filp); } +static void +linux_kq_lock(void *arg) +{ + spinlock_t *s = arg; + + spin_lock(s); +} +static void +linux_kq_unlock(void *arg) +{ + spinlock_t *s = arg; + + spin_unlock(s); +} + +static void +linux_kq_lock_owned(void *arg) +{ +#ifdef INVARIANTS + spinlock_t *s = arg; + + mtx_assert(&s->m, MA_OWNED); +#endif +} + +static void +linux_kq_lock_unowned(void *arg) +{ +#ifdef INVARIANTS + spinlock_t *s = arg; + + mtx_assert(&s->m, MA_NOTOWNED); +#endif +} + +static void +linux_dev_kqfilter_poll(struct linux_file *); + +struct linux_file * +linux_file_alloc(void) +{ + struct linux_file *filp; + + filp = kzalloc(sizeof(*filp), GFP_KERNEL); + + /* set initial refcount */ + filp->f_count = 1; + + /* setup fields needed by kqueue support */ + spin_lock_init(&filp->f_kqlock); + knlist_init(&filp->f_selinfo.si_note, &filp->f_kqlock, + linux_kq_lock, linux_kq_unlock, + linux_kq_lock_owned, linux_kq_lock_unowned); + + return (filp); +} + void linux_file_free(struct linux_file *filp) { @@ -592,15 +649,17 @@ linux_dev_open(struct cdev *dev, int oflags, int devty ldev = dev->si_drv1; if (ldev == NULL) return (ENODEV); - filp = kzalloc(sizeof(*filp), GFP_KERNEL); + + filp = linux_file_alloc(); filp->f_dentry = &filp->f_dentry_store; filp->f_op = ldev->ops; filp->f_flags = file->f_flag; vhold(file->f_vnode); filp->f_vnode = file->f_vnode; - linux_set_current(td); filp->_file = file; + linux_set_current(td); + if (filp->f_op->open) { error = -filp->f_op->open(file->f_vnode, filp); if (error) { @@ -793,6 +852,8 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t current->bsd_ioctl_len = 0; } + if (error == EWOULDBLOCK) + linux_dev_kqfilter_poll(filp); return (error); } @@ -824,8 +885,11 @@ linux_dev_read(struct cdev *dev, struct uio *uio, int ((uint8_t *)uio->uio_iov->iov_base) + bytes; uio->uio_iov->iov_len -= bytes; uio->uio_resid -= bytes; - } else + } else { error = -bytes; + if (error == EWOULDBLOCK) + linux_dev_kqfilter_poll(filp); + } } else error = ENXIO; @@ -860,8 +924,11 @@ linux_dev_write(struct cdev *dev, struct uio *uio, int ((uint8_t *)uio->uio_iov->iov_base) + bytes; uio->uio_iov->iov_len -= bytes; uio->uio_resid -= bytes; - } else + } else { error = -bytes; + if (error == EWOULDBLOCK) + linux_dev_kqfilter_poll(filp); + } } else error = ENXIO; @@ -893,7 +960,140 @@ error: return (events & (POLLHUP|POLLIN|POLLRDNORM|POLLOUT|POLLWRNORM)); } +void +linux_poll_wakeup(struct linux_file *filp) +{ + /* this function should be NULL-safe */ + if (filp == NULL) + return; + + selwakeup(&filp->f_selinfo); + + spin_lock(&filp->f_kqlock); + filp->f_kqflags |= LINUX_KQ_FLAG_NEED_READ | + LINUX_KQ_FLAG_NEED_WRITE; + + /* make sure the "knote" gets woken up */ + KNOTE_LOCKED(&filp->f_selinfo.si_note, 1); + spin_unlock(&filp->f_kqlock); +} + +static void +linux_dev_kqfilter_detach(struct knote *kn) +{ + struct linux_file *filp = kn->kn_hook; + + spin_lock(&filp->f_kqlock); + knlist_remove(&filp->f_selinfo.si_note, kn, 1); + spin_unlock(&filp->f_kqlock); +} + static int +linux_dev_kqfilter_read_event(struct knote *kn, long hint) +{ + struct linux_file *filp = kn->kn_hook; + + mtx_assert(&filp->f_kqlock.m, MA_OWNED); + + return ((filp->f_kqflags & LINUX_KQ_FLAG_NEED_READ) ? 1 : 0); +} + +static int +linux_dev_kqfilter_write_event(struct knote *kn, long hint) +{ + struct linux_file *filp = kn->kn_hook; + + mtx_assert(&filp->f_kqlock.m, MA_OWNED); + + return ((filp->f_kqflags & LINUX_KQ_FLAG_NEED_WRITE) ? 1 : 0); +} + +static struct filterops linux_dev_kqfiltops_read = { + .f_isfd = 1, + .f_detach = linux_dev_kqfilter_detach, + .f_event = linux_dev_kqfilter_read_event, +}; + +static struct filterops linux_dev_kqfiltops_write = { + .f_isfd = 1, + .f_detach = linux_dev_kqfilter_detach, + .f_event = linux_dev_kqfilter_write_event, +}; + +static void +linux_dev_kqfilter_poll(struct linux_file *filp) +{ + int temp; + + spin_lock(&filp->f_kqlock); + temp = (filp->f_kqflags & (LINUX_KQ_FLAG_HAS_READ | LINUX_KQ_FLAG_HAS_WRITE)); + filp->f_kqflags &= ~(LINUX_KQ_FLAG_NEED_READ | LINUX_KQ_FLAG_NEED_WRITE); + spin_unlock(&filp->f_kqlock); + + if (temp != 0) { + /* get the latest polling state */ + temp = filp->f_op->poll(filp, NULL); + + if (temp & (POLLIN | POLLOUT)) { + spin_lock(&filp->f_kqlock); + if (temp & POLLIN) + filp->f_kqflags |= LINUX_KQ_FLAG_NEED_READ; + if (temp & POLLOUT) + filp->f_kqflags |= LINUX_KQ_FLAG_NEED_WRITE; + + /* make sure the "knote" gets woken up */ + KNOTE_LOCKED(&filp->f_selinfo.si_note, 0); + spin_unlock(&filp->f_kqlock); + } + } +} + +static int +linux_dev_kqfilter(struct cdev *dev, struct knote *kn) +{ + struct linux_file *filp; + struct file *file; + struct thread *td; + int error; + + td = curthread; + file = td->td_fpop; + if (dev->si_drv1 == NULL) + return (ENXIO); + if ((error = devfs_get_cdevpriv((void **)&filp)) != 0) + return (error); + filp->f_flags = file->f_flag; + if (filp->f_op->poll == NULL) + return (EINVAL); + + spin_lock(&filp->f_kqlock); + switch (kn->kn_filter) { + case EVFILT_READ: + filp->f_kqflags |= LINUX_KQ_FLAG_HAS_READ; + kn->kn_fop = &linux_dev_kqfiltops_read; + kn->kn_hook = filp; + knlist_add(&filp->f_selinfo.si_note, kn, 1); + break; + case EVFILT_WRITE: + filp->f_kqflags |= LINUX_KQ_FLAG_HAS_WRITE; + kn->kn_fop = &linux_dev_kqfiltops_write; + kn->kn_hook = filp; + knlist_add(&filp->f_selinfo.si_note, kn, 1); + break; + default: + error = EINVAL; + break; + } + spin_unlock(&filp->f_kqlock); + + if (error == 0) { + linux_set_current(td); + linux_dev_kqfilter_poll(filp); + } + return (error); +} + +static int linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t *offset, vm_size_t size, struct vm_object **object, int nprot) { @@ -1012,6 +1212,7 @@ struct cdevsw linuxcdevsw = { .d_ioctl = linux_dev_ioctl, .d_mmap_single = linux_dev_mmap_single, .d_poll = linux_dev_poll, + .d_kqfilter = linux_dev_kqfilter, .d_name = "lkpidev", }; From owner-svn-src-all@freebsd.org Thu Jun 1 09:53:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BD69BF84D1; Thu, 1 Jun 2017 09:53:57 +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 0C209723CF; Thu, 1 Jun 2017 09:53:56 +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 v519ruA8059270; Thu, 1 Jun 2017 09:53:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v519rud7059269; Thu, 1 Jun 2017 09:53:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706010953.v519rud7059269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 1 Jun 2017 09:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319410 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 09:53:57 -0000 Author: hselasky Date: Thu Jun 1 09:53:55 2017 New Revision: 319410 URL: https://svnweb.freebsd.org/changeset/base/319410 Log: Translate the ERESTARTSYS error code into ERESTART in the LinuxKPI ioctl(), read() and write() system call handlers. This error code is internal to the kernel and should not be seen by user-space programs according to Linux. Submitted by: Yanko Yankulov MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Jun 1 09:34:51 2017 (r319409) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Jun 1 09:53:55 2017 (r319410) @@ -854,6 +854,8 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t if (error == EWOULDBLOCK) linux_dev_kqfilter_poll(filp); + else if (error == ERESTARTSYS) + error = ERESTART; return (error); } @@ -889,6 +891,8 @@ linux_dev_read(struct cdev *dev, struct uio *uio, int error = -bytes; if (error == EWOULDBLOCK) linux_dev_kqfilter_poll(filp); + else if (error == ERESTARTSYS) + error = ERESTART; } } else error = ENXIO; @@ -928,6 +932,8 @@ linux_dev_write(struct cdev *dev, struct uio *uio, int error = -bytes; if (error == EWOULDBLOCK) linux_dev_kqfilter_poll(filp); + else if (error == ERESTARTSYS) + error = ERESTART; } } else error = ENXIO; From owner-svn-src-all@freebsd.org Thu Jun 1 09:21:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2B33BF5DA7; Thu, 1 Jun 2017 09:21:26 +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 AA03070DFB; Thu, 1 Jun 2017 09:21:26 +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 v519LPDQ043568; Thu, 1 Jun 2017 09:21:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v519LPKj043564; Thu, 1 Jun 2017 09:21:25 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010921.v519LPKj043564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 09:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319408 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 09:21:26 -0000 Author: tuexen Date: Thu Jun 1 09:21:25 2017 New Revision: 319408 URL: https://svnweb.freebsd.org/changeset/base/319408 Log: MFC r317597: Allow SCTP to use the hostcache. This patch allows the MTU stored in the hostcache to be used as an initial value for SCTP paths. When an ICMP PTB message is received, store the MTU in the hostcache. Modified: stable/11/sys/netinet/sctp_pcb.c stable/11/sys/netinet/sctp_usrreq.c stable/11/sys/netinet/sctputil.c stable/11/sys/netinet/sctputil.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_pcb.c ============================================================================== --- stable/11/sys/netinet/sctp_pcb.c Thu Jun 1 09:18:03 2017 (r319407) +++ stable/11/sys/netinet/sctp_pcb.c Thu Jun 1 09:21:25 2017 (r319408) @@ -3933,6 +3933,7 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct soc stcb->asoc.vrf_id, stcb->sctp_ep->fibnum); + net->src_addr_selected = 0; if (SCTP_ROUTE_HAS_VALID_IFN(&net->ro)) { /* Get source address */ net->ro._s_addr = sctp_source_address_selection(stcb->sctp_ep, @@ -3942,18 +3943,18 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct soc 0, stcb->asoc.vrf_id); if (net->ro._s_addr != NULL) { + uint32_t imtu, rmtu, hcmtu; + net->src_addr_selected = 1; /* Now get the interface MTU */ if (net->ro._s_addr->ifn_p != NULL) { - net->mtu = SCTP_GATHER_MTU_FROM_INTFC(net->ro._s_addr->ifn_p); + imtu = SCTP_GATHER_MTU_FROM_INTFC(net->ro._s_addr->ifn_p); + } else { + imtu = 0; } - } else { - net->src_addr_selected = 0; - } - if (net->mtu > 0) { - uint32_t rmtu; - rmtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, net->ro.ro_rt); + hcmtu = sctp_hc_get_mtu(&net->ro._l_addr, stcb->sctp_ep->fibnum); + net->mtu = sctp_min_mtu(hcmtu, rmtu, imtu); if (rmtu == 0) { /* * Start things off to match mtu of @@ -3961,17 +3962,8 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct soc */ SCTP_SET_MTU_OF_ROUTE(&net->ro._l_addr.sa, net->ro.ro_rt, net->mtu); - } else { - /* - * we take the route mtu over the interface, - * since the route may be leading out the - * loopback, or a different interface. - */ - net->mtu = rmtu; } } - } else { - net->src_addr_selected = 0; } if (net->mtu == 0) { switch (newaddr->sa_family) { Modified: stable/11/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/11/sys/netinet/sctp_usrreq.c Thu Jun 1 09:18:03 2017 (r319407) +++ stable/11/sys/netinet/sctp_usrreq.c Thu Jun 1 09:21:25 2017 (r319408) @@ -225,6 +225,11 @@ sctp_notify(struct sctp_inpcb *inp, } if (net->mtu > next_mtu) { net->mtu = next_mtu; + if (net->port) { + sctp_hc_set_mtu(&net->ro._l_addr, inp->fibnum, next_mtu + sizeof(struct udphdr)); + } else { + sctp_hc_set_mtu(&net->ro._l_addr, inp->fibnum, next_mtu); + } } /* Update the association MTU */ if (stcb->asoc.smallest_mtu > next_mtu) { Modified: stable/11/sys/netinet/sctputil.c ============================================================================== --- stable/11/sys/netinet/sctputil.c Thu Jun 1 09:18:03 2017 (r319407) +++ stable/11/sys/netinet/sctputil.c Thu Jun 1 09:21:25 2017 (r319408) @@ -49,6 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET6) || defined(INET) +#include +#endif #include #include #include @@ -7235,3 +7238,90 @@ sctp_over_udp_start(void) #endif return (0); } + +#if defined(INET6) || defined(INET) + +/* + * sctp_min_mtu ()returns the minimum of all non-zero arguments. + * If all arguments are zero, zero is returned. + */ +uint32_t +sctp_min_mtu(uint32_t mtu1, uint32_t mtu2, uint32_t mtu3) +{ + if (mtu1 > 0) { + if (mtu2 > 0) { + if (mtu3 > 0) { + return (min(mtu1, min(mtu2, mtu3))); + } else { + return (min(mtu1, mtu2)); + } + } else { + if (mtu3 > 0) { + return (min(mtu1, mtu3)); + } else { + return (mtu1); + } + } + } else { + if (mtu2 > 0) { + if (mtu3 > 0) { + return (min(mtu2, mtu3)); + } else { + return (mtu2); + } + } else { + return (mtu3); + } + } +} + +void +sctp_hc_set_mtu(union sctp_sockstore *addr, uint16_t fibnum, uint32_t mtu) +{ + struct in_conninfo inc; + + memset(&inc, 0, sizeof(struct in_conninfo)); + inc.inc_fibnum = fibnum; + switch (addr->sa.sa_family) { +#ifdef INET + case AF_INET: + inc.inc_faddr = addr->sin.sin_addr; + break; +#endif +#ifdef INET6 + case AF_INET6: + inc.inc_flags |= INC_ISIPV6; + inc.inc6_faddr = addr->sin6.sin6_addr; + break; +#endif + default: + return; + } + tcp_hc_updatemtu(&inc, (u_long)mtu); +} + +uint32_t +sctp_hc_get_mtu(union sctp_sockstore *addr, uint16_t fibnum) +{ + struct in_conninfo inc; + + memset(&inc, 0, sizeof(struct in_conninfo)); + inc.inc_fibnum = fibnum; + switch (addr->sa.sa_family) { +#ifdef INET + case AF_INET: + inc.inc_faddr = addr->sin.sin_addr; + break; +#endif +#ifdef INET6 + case AF_INET6: + inc.inc_flags |= INC_ISIPV6; + inc.inc6_faddr = addr->sin6.sin6_addr; + break; +#endif + default: + return (0); + } + return ((uint32_t)tcp_hc_getmtu(&inc)); +} +#endif Modified: stable/11/sys/netinet/sctputil.h ============================================================================== --- stable/11/sys/netinet/sctputil.h Thu Jun 1 09:18:03 2017 (r319407) +++ stable/11/sys/netinet/sctputil.h Thu Jun 1 09:21:25 2017 (r319408) @@ -388,5 +388,10 @@ sctp_auditing(int, struct sctp_inpcb *, struct sctp_tc void sctp_audit_log(uint8_t, uint8_t); #endif +#if defined(INET6) || defined(INET) +uint32_t sctp_min_mtu(uint32_t, uint32_t, uint32_t); +void sctp_hc_set_mtu(union sctp_sockstore *, uint16_t, uint32_t); +uint32_t sctp_hc_get_mtu(union sctp_sockstore *, uint16_t); +#endif #endif /* _KERNEL */ #endif From owner-svn-src-all@freebsd.org Thu Jun 1 09:18:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FA95BF5A3E; Thu, 1 Jun 2017 09:18:05 +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 D50CE70BED; Thu, 1 Jun 2017 09:18:04 +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 v519I4NM043387; Thu, 1 Jun 2017 09:18:04 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v519I4Cl043386; Thu, 1 Jun 2017 09:18:04 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706010918.v519I4Cl043386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 09:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319407 - stable/11/sys/netinet X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 09:18:05 -0000 Author: tuexen Date: Thu Jun 1 09:18:03 2017 New Revision: 319407 URL: https://svnweb.freebsd.org/changeset/base/319407 Log: MFC r317592: Don't set the DF-bit on timer based retransmissions. Modified: stable/11/sys/netinet/sctp_timer.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_timer.c ============================================================================== --- stable/11/sys/netinet/sctp_timer.c Thu Jun 1 09:14:49 2017 (r319406) +++ stable/11/sys/netinet/sctp_timer.c Thu Jun 1 09:18:03 2017 (r319407) @@ -667,6 +667,7 @@ start_again: stcb->asoc.peers_rwnd += SCTP_BASE_SYSCTL(sctp_peer_chunk_oh); } chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; SCTP_STAT_INCR(sctps_markedretrans); /* reset the TSN for striking and other FR stuff */ @@ -740,6 +741,7 @@ start_again: chk->whoTo = alt; if (chk->sent != SCTP_DATAGRAM_RESEND) { chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); cnt_mk++; } @@ -1084,6 +1086,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp, sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); } cookie->sent = SCTP_DATAGRAM_RESEND; + cookie->flags |= CHUNK_FLAGS_FRAGMENT_OK; /* * Now call the output routine to kick out the cookie again, Note we * don't mark any chunks for retran so that FR will need to kick in @@ -1130,6 +1133,7 @@ sctp_strreset_timer(struct sctp_inpcb *inp, struct sct sctp_free_remote_addr(chk->whoTo); if (chk->sent != SCTP_DATAGRAM_RESEND) { chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); } chk->whoTo = alt; @@ -1147,6 +1151,7 @@ sctp_strreset_timer(struct sctp_inpcb *inp, struct sct if (strrst->sent != SCTP_DATAGRAM_RESEND) sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); strrst->sent = SCTP_DATAGRAM_RESEND; + strrst->flags |= CHUNK_FLAGS_FRAGMENT_OK; /* restart the timer */ sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, inp, stcb, strrst->whoTo); @@ -1211,6 +1216,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_ chk->whoTo = alt; if (chk->sent != SCTP_DATAGRAM_RESEND) { chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); } atomic_add_int(&alt->ref_count, 1); @@ -1225,6 +1231,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_ if (asconf->sent != SCTP_DATAGRAM_RESEND && chk->sent != SCTP_DATAGRAM_UNSENT) sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); chk->sent = SCTP_DATAGRAM_RESEND; + chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; } if (!(net->dest_state & SCTP_ADDR_REACHABLE)) { /* @@ -1237,6 +1244,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_ if (asconf->sent != SCTP_DATAGRAM_RESEND) sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); asconf->sent = SCTP_DATAGRAM_RESEND; + asconf->flags |= CHUNK_FLAGS_FRAGMENT_OK; /* send another ASCONF if any and we can do */ sctp_send_asconf(stcb, alt, SCTP_ADDR_NOT_LOCKED); From owner-svn-src-all@freebsd.org Thu Jun 1 10:03:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7885BAF7DC6; Thu, 1 Jun 2017 10:03:43 +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 6F324732F7; Thu, 1 Jun 2017 10:03:42 +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 v51A3fRk063577; Thu, 1 Jun 2017 10:03:41 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51A3fcY063575; Thu, 1 Jun 2017 10:03:41 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706011003.v51A3fcY063575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 10:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319411 - in stable/11/sys: netinet netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 10:03:43 -0000 Author: tuexen Date: Thu Jun 1 10:03:41 2017 New Revision: 319411 URL: https://svnweb.freebsd.org/changeset/base/319411 Log: MFC r318649: The connect() system call should return -1 and set errno to EAFNOSUPPORT if it is called on a TCP socket * with an IPv6 address and the socket is bound to an IPv4-mapped IPv6 address. * with an IPv4-mapped IPv6 address and the socket is bound to an IPv6 address. Thanks to Jonathan T. Leighton for reporting this issue. Reviewed by: bz, gnn Differential Revision: https://reviews.freebsd.org/D9163 Modified: stable/11/sys/netinet/tcp_usrreq.c stable/11/sys/netinet6/udp6_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/11/sys/netinet/tcp_usrreq.c Thu Jun 1 09:53:55 2017 (r319410) +++ stable/11/sys/netinet/tcp_usrreq.c Thu Jun 1 10:03:41 2017 (r319411) @@ -597,6 +597,10 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *n error = EINVAL; goto out; } + if ((inp->inp_vflag & INP_IPV4) == 0) { + error = EAFNOSUPPORT; + goto out; + } in6_sin6_2_sin(&sin, sin6p); inp->inp_vflag |= INP_IPV4; @@ -614,6 +618,11 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *n #endif error = tp->t_fb->tfb_tcp_output(tp); goto out; + } else { + if ((inp->inp_vflag & INP_IPV6) == 0) { + error = EAFNOSUPPORT; + goto out; + } } #endif inp->inp_vflag &= ~INP_IPV4; Modified: stable/11/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/11/sys/netinet6/udp6_usrreq.c Thu Jun 1 09:53:55 2017 (r319410) +++ stable/11/sys/netinet6/udp6_usrreq.c Thu Jun 1 10:03:41 2017 (r319411) @@ -1104,6 +1104,10 @@ udp6_connect(struct socket *so, struct sockaddr *nam, error = EINVAL; goto out; } + if ((inp->inp_vflag & INP_IPV4) == 0) { + error = EAFNOSUPPORT; + goto out; + } if (inp->inp_faddr.s_addr != INADDR_ANY) { error = EISCONN; goto out; @@ -1121,6 +1125,11 @@ udp6_connect(struct socket *so, struct sockaddr *nam, if (error == 0) soisconnected(so); goto out; + } else { + if ((inp->inp_vflag & INP_IPV6) == 0) { + error = EAFNOSUPPORT; + goto out; + } } #endif if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { From owner-svn-src-all@freebsd.org Thu Jun 1 10:04:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7462DAF7EF6; Thu, 1 Jun 2017 10:04:13 +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 456BD73481; Thu, 1 Jun 2017 10:04:13 +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 v51A4CWx063644; Thu, 1 Jun 2017 10:04:12 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51A4C1L063643; Thu, 1 Jun 2017 10:04:12 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201706011004.v51A4C1L063643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 1 Jun 2017 10:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319412 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 10:04:13 -0000 Author: ae Date: Thu Jun 1 10:04:12 2017 New Revision: 319412 URL: https://svnweb.freebsd.org/changeset/base/319412 Log: Build kdebug_secreplay() function only when IPSEC_DEBUG is defined. This should fix the build on sparc. Reported by: emaste X-MFC with: r319118 Modified: head/sys/netipsec/key_debug.c Modified: head/sys/netipsec/key_debug.c ============================================================================== --- head/sys/netipsec/key_debug.c Thu Jun 1 10:03:41 2017 (r319411) +++ head/sys/netipsec/key_debug.c Thu Jun 1 10:04:12 2017 (r319412) @@ -77,10 +77,6 @@ static void kdebug_sadb_x_sa2(struct sadb_ext *); static void kdebug_sadb_x_sa_replay(struct sadb_ext *); static void kdebug_sadb_x_natt(struct sadb_ext *); -#ifdef _KERNEL -static void kdebug_secreplay(struct secreplay *); -#endif - #ifndef _KERNEL #define panic(fmt, ...) { printf(fmt, ## __VA_ARGS__); exit(-1); } #endif @@ -724,6 +720,7 @@ kdebug_secash(struct secashead *sah, const char *inden printf("}\n"); } +#ifdef IPSEC_DEBUG static void kdebug_secreplay(struct secreplay *rpl) { @@ -745,6 +742,7 @@ kdebug_secreplay(struct secreplay *rpl) } printf(" }\n"); } +#endif /* IPSEC_DEBUG */ static void kdebug_secnatt(struct secnatt *natt) From owner-svn-src-all@freebsd.org Thu Jun 1 10:39:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6273DAF98A9; Thu, 1 Jun 2017 10:39:01 +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 3291374973; Thu, 1 Jun 2017 10:39:01 +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 v51Ad0Jq075490; Thu, 1 Jun 2017 10:39:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Ad0jR075489; Thu, 1 Jun 2017 10:39:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706011039.v51Ad0jR075489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 1 Jun 2017 10:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319413 - head/sys/dev/mlx4/mlx4_en X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 10:39:01 -0000 Author: hselasky Date: Thu Jun 1 10:39:00 2017 New Revision: 319413 URL: https://svnweb.freebsd.org/changeset/base/319413 Log: Free hardware queue resource after port is stopped in the mlx4en(4) driver. Else if the port is up the resource might still be busy and the MTT free will fail. PR: 216493 MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Thu Jun 1 10:04:12 2017 (r319412) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Thu Jun 1 10:39:00 2017 (r319413) @@ -1731,13 +1731,12 @@ void mlx4_en_destroy_netdev(struct net_device *dev) mutex_unlock(&mdev->state_lock); } - if (priv->allocated) - mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); - mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); mutex_unlock(&mdev->state_lock); + if (priv->allocated) + mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); cancel_delayed_work(&priv->stats_task); cancel_delayed_work(&priv->service_task); From owner-svn-src-all@freebsd.org Thu Jun 1 10:44:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE365AF9B5C; Thu, 1 Jun 2017 10:44:49 +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 B033974E07; Thu, 1 Jun 2017 10:44:49 +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 v51Aimfl079655; Thu, 1 Jun 2017 10:44:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51AimGF079654; Thu, 1 Jun 2017 10:44:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706011044.v51AimGF079654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 1 Jun 2017 10:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319414 - head/sys/dev/mlx4/mlx4_en X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 10:44:50 -0000 Author: hselasky Date: Thu Jun 1 10:44:48 2017 New Revision: 319414 URL: https://svnweb.freebsd.org/changeset/base/319414 Log: Allow communication between functions on the same host when using the mlx4en(4) driver in SRIOV mode. Place a copy of the destination MAC address in the send WQE only under SRIOV/eSwitch configuration or when the device is in selftest. This allows communication between functions on the same host. PR: 216493 MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c ============================================================================== --- head/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Thu Jun 1 10:39:00 2017 (r319413) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c Thu Jun 1 10:44:48 2017 (r319414) @@ -661,18 +661,6 @@ static void mlx4_bf_copy(void __iomem *dst, volatile u __iowrite64_copy(dst, __DEVOLATILE(void *, src), bytecnt / 8); } -static u64 mlx4_en_mac_to_u64(u8 *addr) -{ - u64 mac = 0; - int i; - - for (i = 0; i < ETHER_ADDR_LEN; i++) { - mac <<= 8; - mac |= addr[i]; - } - return mac; -} - static int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **mbp) { enum { @@ -770,8 +758,18 @@ static int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_desc->ctrl.ins_vlan = 0; } - /* clear immediate field */ - tx_desc->ctrl.imm = 0; + if (unlikely(mlx4_is_mfunc(priv->mdev->dev) || priv->validate_loopback)) { + /* + * Copy destination MAC address to WQE. This allows + * loopback in eSwitch, so that VFs and PF can + * communicate with each other: + */ + m_copydata(mb, 0, 2, __DEVOLATILE(void *, &tx_desc->ctrl.srcrb_flags16[0])); + m_copydata(mb, 2, 4, __DEVOLATILE(void *, &tx_desc->ctrl.imm)); + } else { + /* clear immediate field */ + tx_desc->ctrl.imm = 0; + } /* Handle LSO (TSO) packets */ if (mb->m_pkthdr.csum_flags & CSUM_TSO) { @@ -929,22 +927,6 @@ skip_dma: mlx4_en_store_inline_lso_header(dseg_inline, ihs, owner_bit); else mlx4_en_store_inline_header(dseg_inline, ihs, owner_bit); - - if (unlikely(priv->validate_loopback)) { - /* Copy dst mac address to wqe */ - struct ether_header *ethh; - u64 mac; - u32 mac_l, mac_h; - - ethh = mtod(mb, struct ether_header *); - mac = mlx4_en_mac_to_u64(ethh->ether_dhost); - if (mac) { - mac_h = (u32) ((mac & 0xffff00000000ULL) >> 16); - mac_l = (u32) (mac & 0xffffffff); - tx_desc->ctrl.srcrb_flags |= cpu_to_be32(mac_h); - tx_desc->ctrl.imm = cpu_to_be32(mac_l); - } - } /* update producer counter */ ring->prod += tx_info->nr_txbb; From owner-svn-src-all@freebsd.org Thu Jun 1 11:47:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D433AFACB9; Thu, 1 Jun 2017 11:47:57 +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 2D08476A51; Thu, 1 Jun 2017 11:47:57 +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 v51BluAU004374; Thu, 1 Jun 2017 11:47:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Blud1004373; Thu, 1 Jun 2017 11:47:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706011147.v51Blud1004373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 1 Jun 2017 11:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319415 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 11:47:57 -0000 Author: avg Date: Thu Jun 1 11:47:56 2017 New Revision: 319415 URL: https://svnweb.freebsd.org/changeset/base/319415 Log: MFC r319096: zfs_lookup: fix bogus arguments to lookup of "snapshot" directory Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jun 1 10:44:48 2017 (r319414) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jun 1 11:47:56 2017 (r319415) @@ -1625,7 +1625,7 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, stru cn.cn_nameptr = "snapshot"; cn.cn_namelen = strlen(cn.cn_nameptr); cn.cn_nameiop = cnp->cn_nameiop; - cn.cn_flags = cnp->cn_flags; + cn.cn_flags = cnp->cn_flags & ~ISDOTDOT; cn.cn_lkflags = cnp->cn_lkflags; error = VOP_LOOKUP(zfsctl_vp, vpp, &cn); vput(zfsctl_vp); From owner-svn-src-all@freebsd.org Thu Jun 1 11:48:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDEA9AFACFC; Thu, 1 Jun 2017 11:48:02 +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 9B72876A81; Thu, 1 Jun 2017 11:48:02 +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 v51Bm1c5004427; Thu, 1 Jun 2017 11:48:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Bm1rk004426; Thu, 1 Jun 2017 11:48:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706011148.v51Bm1rk004426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 1 Jun 2017 11:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319416 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 11:48:02 -0000 Author: avg Date: Thu Jun 1 11:48:01 2017 New Revision: 319416 URL: https://svnweb.freebsd.org/changeset/base/319416 Log: MFC r319096: zfs_lookup: fix bogus arguments to lookup of "snapshot" directory Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jun 1 11:47:56 2017 (r319415) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jun 1 11:48:01 2017 (r319416) @@ -1629,7 +1629,7 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, stru cn.cn_nameptr = "snapshot"; cn.cn_namelen = strlen(cn.cn_nameptr); cn.cn_nameiop = cnp->cn_nameiop; - cn.cn_flags = cnp->cn_flags; + cn.cn_flags = cnp->cn_flags & ~ISDOTDOT; cn.cn_lkflags = cnp->cn_lkflags; error = VOP_LOOKUP(zfsctl_vp, vpp, &cn); vput(zfsctl_vp); From owner-svn-src-all@freebsd.org Thu Jun 1 12:09:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3E6DAFB839 for ; Thu, 1 Jun 2017 12:09:01 +0000 (UTC) (envelope-from webmaster@whfarm2.com) Received: from n7-vm2.bullet.mail.bf1.yahoo.com (n7-vm2.bullet.mail.bf1.yahoo.com [72.30.234.86]) (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 992367779E for ; Thu, 1 Jun 2017 12:09:01 +0000 (UTC) (envelope-from webmaster@whfarm2.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1496318829; bh=WJqAcdSw29eDs09iyXuQRVNDEGfDGkbh/JVINUe3pPs=; h=From:To:Subject:Date:From:Subject; b=JSRvewCQqAlTBD82AB1P/uiazdo5nrlAOVhqUA9bkEnbPqbGX0V9CAj5vp8GyZH9a90D29Gr22i1jzoPoPpTv4MfQfvfbcB8Ny8EWI2xBpgY/G03bhf8Fo3aV2B0ciTmvXOa7HmykXi6s5nJ6OaVbHVyFTKKHFUuaYnebXdjuXBVU1we9j4TkGIDL4PIPf5tXUDlsAmXXXnbI4Mjexm/Ry0nPIQTgsapEg9zq+LO1YrMOXRNGcVSjUWOZGUq3L4iGFDiTN7DkAOSXK2S72MR23IXLUonTh3matxZ+djIrZiis+aqRVzXbdIDwjHV4hqPYrKLG01+BfcVVIzO0QyXqQ== Received: from [72.30.235.64] by n7.bullet.mail.bf1.yahoo.com with NNFMP; 01 Jun 2017 12:07:09 -0000 Received: from [66.196.82.106] by t1.bullet.mail.bf1.yahoo.com with NNFMP; 01 Jun 2017 12:07:09 -0000 Received: from [127.0.0.1] by p11db8.geo.bf1.yahoo.com with NNFMP; 01 Jun 2017 12:07:09 -0000 From: webmaster@whfarm2.com To: svn-src-all@freebsd.org Subject: New status of your UPS delivery (code: 02319364) Date: Thu, 1 Jun 2017 05:07:09 -0700 X-Yahoo-Newman-Property: ysbs X-Yahoo-Newman-Id: ysbs_wh1496318829 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 12:09:02 -0000 Dear Customer, UPS courier was unable to contact you for your parcel delivery. Review the document that is attached to this e-mail! Sincerely, , UPS Parcels Delivery Manager. From owner-svn-src-all@freebsd.org Thu Jun 1 12:33:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EB08AFC202; Thu, 1 Jun 2017 12:33:35 +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 3C2D5783D1; Thu, 1 Jun 2017 12:33:35 +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 v51CXYHJ024726; Thu, 1 Jun 2017 12:33:34 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51CXXj1024719; Thu, 1 Jun 2017 12:33:33 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706011233.v51CXXj1024719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 12:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319417 - in stable/11: lib/libsysdecode usr.bin/truss X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 12:33:35 -0000 Author: tuexen Date: Thu Jun 1 12:33:33 2017 New Revision: 319417 URL: https://svnweb.freebsd.org/changeset/base/319417 Log: MFC r317730: Add support for listen() call. MFC r317731: Add Socklent for handling args of type socklen_t. MFC r317732: Decode the third argument of socket(). MFC r317736: Add support for [gs]etsockopt(). MFC r317737: Decode the fourth argument of sendto and recvfrom call. MFC r317739: Add support for sendmsg() and recvmsg(). MFC r317747: Add support for socket option names related to the IPPROTO_SCTP level. MFC r317748: Add support for socket option names related to the IPPROTO_IPV6 level. MFC r317750: Add support for sctp_generic_sendmsg() and sctp_generic_recvmsg(). MFC r317789: Add support for socket option names related to the level IPPROTO_UDPLITE. MFC r318879: Improve the decoding of the third argument of the socket() call. Decoding of the third argument depends on the first one. For doing this, add a corresponding function to libsysdecode. Thanks to jhb@ for suggesting this. Added: stable/11/lib/libsysdecode/sysdecode_socket_protocol.3 - copied unchanged from r318879, head/lib/libsysdecode/sysdecode_socket_protocol.3 Modified: stable/11/lib/libsysdecode/Makefile stable/11/lib/libsysdecode/flags.c stable/11/lib/libsysdecode/mktables stable/11/lib/libsysdecode/sysdecode.h stable/11/usr.bin/truss/syscall.h stable/11/usr.bin/truss/syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/Makefile ============================================================================== --- stable/11/lib/libsysdecode/Makefile Thu Jun 1 11:48:01 2017 (r319416) +++ stable/11/lib/libsysdecode/Makefile Thu Jun 1 12:33:33 2017 (r319417) @@ -22,6 +22,7 @@ MAN= sysdecode.3 \ sysdecode_quotactl_cmd.3 \ sysdecode_sigcode.3 \ sysdecode_sockopt_name.3 \ + sysdecode_socket_protocol.3 \ sysdecode_syscallnames.3 \ sysdecode_utrace.3 MLINKS= sysdecode_abi_to_freebsd_errno.3 sysdecode_freebsd_to_abi_errno.3 Modified: stable/11/lib/libsysdecode/flags.c ============================================================================== --- stable/11/lib/libsysdecode/flags.c Thu Jun 1 11:48:01 2017 (r319416) +++ stable/11/lib/libsysdecode/flags.c Thu Jun 1 12:33:33 2017 (r319417) @@ -47,8 +47,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -728,6 +730,19 @@ sysdecode_socketdomain(int domain) } const char * +sysdecode_socket_protocol(int domain, int protocol) +{ + + switch (domain) { + case PF_INET: + case PF_INET6: + return (lookup_value(sockipproto, protocol)); + default: + return (NULL); + } +} + +const char * sysdecode_sockaddr_family(int sa_family) { @@ -750,10 +765,16 @@ sysdecode_sockopt_name(int level, int optname) if (level == IPPROTO_IP) /* XXX: UNIX domain socket options use a level of 0 also. */ return (lookup_value(sockoptip, optname)); + if (level == IPPROTO_IPV6) + return (lookup_value(sockoptipv6, optname)); + if (level == IPPROTO_SCTP) + return (lookup_value(sockoptsctp, optname)); if (level == IPPROTO_TCP) return (lookup_value(sockopttcp, optname)); if (level == IPPROTO_UDP) return (lookup_value(sockoptudp, optname)); + if (level == IPPROTO_UDPLITE) + return (lookup_value(sockoptudplite, optname)); return (NULL); } Modified: stable/11/lib/libsysdecode/mktables ============================================================================== --- stable/11/lib/libsysdecode/mktables Thu Jun 1 11:48:01 2017 (r319416) +++ stable/11/lib/libsysdecode/mktables Thu Jun 1 12:33:33 2017 (r319417) @@ -130,8 +130,11 @@ gen_table "sockfamily" "AF_[[:alnum:]]+[[:space:] gen_table "sockipproto" "IPPROTO_[[:alnum:]]+[[:space:]]+" "netinet/in.h" gen_table "sockopt" "SO_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" gen_table "sockoptip" "(IP_[[:alnum:]_]+|MCAST_[[:alnum:]_]+_GROUP)[[:space:]]+" "netinet/in.h" "IP_DEFAULT|IP_MIN|IP_MAX|IP_PORTRANGE" +gen_table "sockoptipv6" "IPV6_[[:alnum:]_]+[[:space:]]+[0-9]+" "netinet6/in6.h" "IPV6_ADDR_|IPV6_TAG_DIRECT|IPV6_OPTIONS|IPV6_RECVOPTS|IPV6_RECVRETOPTS|IPV6_RECVDSTADDR|IPV6_RETOPTS|IPV6_2292|IPV6_RECVRTHDRDSTOPTS|IPV6_REACHCONF|IPV6_PKTOPTIONS" +gen_table "sockoptsctp" "SCTP_[[:alnum:]_]+[[:space:]]+[0-9]+" "netinet/sctp.h" gen_table "sockopttcp" "TCP_[[:alnum:]_]+[[:space:]]+[0-9]+" "netinet/tcp.h" "TCP_MIN|TCP_MAX[^S]|TCP_MSS|TCP_[[:alnum:]_]+_MAX" gen_table "sockoptudp" "UDP_[[:alnum:]]+[[:space:]]+[0-9]+" "netinet/udp.h" "UDP_ENCAP_" +gen_table "sockoptudplite" "UDPLITE_[[:alnum:]_]+[[:space:]]+[0-9]+" "netinet/udplite.h" gen_table "socktype" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" gen_table "thrcreateflags" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" gen_table "umtxop" "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" Modified: stable/11/lib/libsysdecode/sysdecode.h ============================================================================== --- stable/11/lib/libsysdecode/sysdecode.h Thu Jun 1 11:48:01 2017 (r319416) +++ stable/11/lib/libsysdecode/sysdecode.h Thu Jun 1 12:33:33 2017 (r319417) @@ -99,6 +99,7 @@ const char *sysdecode_sigsegv_code(int _si_code); const char *sysdecode_sigtrap_code(int _si_code); const char *sysdecode_sockaddr_family(int _sa_family); const char *sysdecode_socketdomain(int _domain); +const char *sysdecode_socket_protocol(int _domain, int _protocol); bool sysdecode_socket_type(FILE *_fp, int _type, int *_rem); const char *sysdecode_sockopt_level(int _level); const char *sysdecode_sockopt_name(int _level, int _optname); Copied: stable/11/lib/libsysdecode/sysdecode_socket_protocol.3 (from r318879, head/lib/libsysdecode/sysdecode_socket_protocol.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libsysdecode/sysdecode_socket_protocol.3 Thu Jun 1 12:33:33 2017 (r319417, copy of r318879, head/lib/libsysdecode/sysdecode_socket_protocol.3) @@ -0,0 +1,54 @@ +.\" +.\" Copyright (c) 2016 John Baldwin +.\" 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 May 25, 2017 +.Dt sysdecode_socket_protocol 3 +.Os +.Sh NAME +.Nm sysdecode_socket_protocol +.Nd lookup name of socket protocol +.Sh LIBRARY +.Lb libsysdecode +.Sh SYNOPSIS +.In sys/types.h +.In stdbool.h +.In sysdecode.h +.Ft const char * +.Fn sysdecode_socket_protocol "int domain" "int protocol" +.Sh DESCRIPTION +The +.Fn sysdecode_socket_protocol +function returns a text description of the protocol passed in the +.Fa protocol +argument to +.Xr socket 2 . +.Fn sysdecode_socket_protocol +takes the +.Fa protocol +as well as the +.Fa domain +to uniquely identify the protocol. Modified: stable/11/usr.bin/truss/syscall.h ============================================================================== --- stable/11/usr.bin/truss/syscall.h Thu Jun 1 11:48:01 2017 (r319416) +++ stable/11/usr.bin/truss/syscall.h Thu Jun 1 12:33:33 2017 (r319417) @@ -46,7 +46,8 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHe LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, - Kldunloadflags, Sizet, Madvice, + Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel, + Sockoptname, Msgflags, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: stable/11/usr.bin/truss/syscalls.c ============================================================================== --- stable/11/usr.bin/truss/syscalls.c Thu Jun 1 11:48:01 2017 (r319416) +++ stable/11/usr.bin/truss/syscalls.c Thu Jun 1 12:33:33 2017 (r319417) @@ -86,7 +86,7 @@ static struct syscall decoded_syscalls[] = { { .name = "access", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Accessmode, 1 } } }, { .name = "bind", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Int, 2 } } }, + .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Socklent, 2 } } }, { .name = "bindat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 }, { Int, 3 } } }, @@ -114,7 +114,7 @@ static struct syscall decoded_syscalls[] = { { .name = "close", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, { .name = "connect", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Int, 2 } } }, + .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Socklent, 2 } } }, { .name = "connectat", .ret_type = 1, .nargs = 4, .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 }, { Int, 3 } } }, @@ -174,6 +174,9 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 } } }, { .name = "getsockname", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } }, + { .name = "getsockopt", .ret_type = 1, .nargs = 5, + .args = { { Int, 0 }, { Sockoptlevel, 1 }, { Sockoptname, 2 }, + { Ptr | OUT, 3 }, { Ptr | OUT, 4 } } }, { .name = "gettimeofday", .ret_type = 1, .nargs = 2, .args = { { Timeval | OUT, 0 }, { Ptr, 1 } } }, { .name = "ioctl", .ret_type = 1, .nargs = 3, @@ -212,7 +215,9 @@ static struct syscall decoded_syscalls[] = { { .name = "linkat", .ret_type = 1, .nargs = 5, .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 }, { Atflags, 4 } } }, - { .name = "lseek", .ret_type = 2, .nargs = 3, + { .name = "listen", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Int, 1 } } }, + { .name = "lseek", .ret_type = 2, .nargs = 3, .args = { { Int, 0 }, { QuadHex, 1 }, { Whence, 2 } } }, { .name = "lstat", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, @@ -273,8 +278,11 @@ static struct syscall decoded_syscalls[] = { .args = { { Atfd, 0 }, { Name, 1 }, { Readlinkres | OUT, 2 }, { Sizet, 3 } } }, { .name = "recvfrom", .ret_type = 1, .nargs = 6, - .args = { { Int, 0 }, { BinString | OUT, 1 }, { Sizet, 2 }, { Hex, 3 }, - { Sockaddr | OUT, 4 }, { Ptr | OUT, 5 } } }, + .args = { { Int, 0 }, { BinString | OUT, 1 }, { Sizet, 2 }, + { Msgflags, 3 }, { Sockaddr | OUT, 4 }, + { Ptr | OUT, 5 } } }, + { .name = "recvmsg", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Ptr, 1 }, { Msgflags, 2 } } }, { .name = "rename", .ret_type = 1, .nargs = 2, .args = { { Name, 0 }, { Name, 1 } } }, { .name = "renameat", .ret_type = 1, .nargs = 4, @@ -283,16 +291,30 @@ static struct syscall decoded_syscalls[] = { .args = { { Rforkflags, 0 } } }, { .name = "rmdir", .ret_type = 1, .nargs = 1, .args = { { Name, 0 } } }, + { .name = "sctp_generic_recvmsg", .ret_type = 1, .nargs = 7, + .args = { { Int, 0 }, { Ptr | IN, 1 }, { Int, 2 }, + { Sockaddr | OUT, 3 }, { Ptr | OUT, 4 }, { Ptr | OUT, 5 }, + { Ptr | OUT, 6 } } }, + { .name = "sctp_generic_sendmsg", .ret_type = 1, .nargs = 7, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 }, + { Sockaddr | IN, 3 }, { Socklent, 4 }, { Ptr | IN, 5 }, + { Msgflags, 6 } } }, { .name = "select", .ret_type = 1, .nargs = 5, .args = { { Int, 0 }, { Fd_set, 1 }, { Fd_set, 2 }, { Fd_set, 3 }, { Timeval, 4 } } }, + { .name = "sendmsg", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Ptr, 1 }, { Msgflags, 2 } } }, { .name = "sendto", .ret_type = 1, .nargs = 6, - .args = { { Int, 0 }, { BinString | IN, 1 }, { Sizet, 2 }, { Hex, 3 }, - { Sockaddr | IN, 4 }, { Int | IN, 5 } } }, + .args = { { Int, 0 }, { BinString | IN, 1 }, { Sizet, 2 }, + { Msgflags, 3 }, { Sockaddr | IN, 4 }, + { Socklent | IN, 5 } } }, { .name = "setitimer", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Itimerval, 1 }, { Itimerval | OUT, 2 } } }, { .name = "setrlimit", .ret_type = 1, .nargs = 2, .args = { { Resource, 0 }, { Rlimit | IN, 1 } } }, + { .name = "setsockopt", .ret_type = 1, .nargs = 5, + .args = { { Int, 0 }, { Sockoptlevel, 1 }, { Sockoptname, 2 }, + { Ptr | IN, 3 }, { Socklent, 4 } } }, { .name = "shutdown", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Shutdown, 1 } } }, { .name = "sigaction", .ret_type = 1, .nargs = 3, @@ -315,7 +337,7 @@ static struct syscall decoded_syscalls[] = { { .name = "sigwaitinfo", .ret_type = 1, .nargs = 2, .args = { { Sigset | IN, 0 }, { Ptr, 1 } } }, { .name = "socket", .ret_type = 1, .nargs = 3, - .args = { { Sockdomain, 0 }, { Socktype, 1 }, { Int, 2 } } }, + .args = { { Sockdomain, 0 }, { Socktype, 1 }, { Sockprotocol, 2 } } }, { .name = "stat", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Stat | OUT, 1 } } }, { .name = "statfs", .ret_type = 1, .nargs = 2, @@ -1911,6 +1933,48 @@ print_arg(struct syscall_args *sc, unsigned long *args break; case Madvice: print_integer_arg(sysdecode_madvice, fp, args[sc->offset]); + break; + case Socklent: + fprintf(fp, "%u", (socklen_t)args[sc->offset]); + break; + case Sockprotocol: { + const char *temp; + int domain, protocol; + + domain = args[sc->offset - 2]; + protocol = args[sc->offset]; + if (protocol == 0) { + fputs("0", fp); + } else { + temp = sysdecode_socket_protocol(domain, protocol); + if (temp) { + fputs(temp, fp); + } else { + fprintf(fp, "%d", protocol); + } + } + break; + } + case Sockoptlevel: + print_integer_arg(sysdecode_sockopt_level, fp, + args[sc->offset]); + break; + case Sockoptname: { + const char *temp; + int level, name; + + level = args[sc->offset - 1]; + name = args[sc->offset]; + temp = sysdecode_sockopt_name(level, name); + if (temp) { + fputs(temp, fp); + } else { + fprintf(fp, "%d", name); + } + break; + } + case Msgflags: + print_mask_arg(sysdecode_msg_flags, fp, args[sc->offset]); break; case CloudABIAdvice: From owner-svn-src-all@freebsd.org Thu Jun 1 13:20:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B2C5AFCA03; Thu, 1 Jun 2017 13:20:48 +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 744E579313; Thu, 1 Jun 2017 13:20:48 +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 v51DKlOZ041077; Thu, 1 Jun 2017 13:20:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51DKl92041075; Thu, 1 Jun 2017 13:20:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706011320.v51DKl92041075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 1 Jun 2017 13:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319418 - stable/11/lib/libc/tests/gen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 13:20:48 -0000 Author: kib Date: Thu Jun 1 13:20:47 2017 New Revision: 319418 URL: https://svnweb.freebsd.org/changeset/base/319418 Log: MFC r318450: Add tests for some cases in r318298. PR: 219154 Added: stable/11/lib/libc/tests/gen/realpath2_test.c - copied unchanged from r318450, head/lib/libc/tests/gen/realpath2_test.c Modified: stable/11/lib/libc/tests/gen/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/tests/gen/Makefile ============================================================================== --- stable/11/lib/libc/tests/gen/Makefile Thu Jun 1 12:33:33 2017 (r319417) +++ stable/11/lib/libc/tests/gen/Makefile Thu Jun 1 13:20:47 2017 (r319418) @@ -12,6 +12,7 @@ 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 # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, # TODO: t_siginfo (fixes require further inspection) Copied: stable/11/lib/libc/tests/gen/realpath2_test.c (from r318450, head/lib/libc/tests/gen/realpath2_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libc/tests/gen/realpath2_test.c Thu Jun 1 13:20:47 2017 (r319418, copy of r318450, head/lib/libc/tests/gen/realpath2_test.c) @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2017 Jan Kokemüller + * 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 +#include +#include +#include +#include + +#include + +ATF_TC(realpath_buffer_overflow); +ATF_TC_HEAD(realpath_buffer_overflow, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test for out of bounds read from 'left' array " + "(compile realpath.c with '-fsanitize=address')"); +} + +ATF_TC_BODY(realpath_buffer_overflow, tc) +{ + char path[MAXPATHLEN] = { 0 }; + char resb[MAXPATHLEN] = { 0 }; + size_t i; + + path[0] = 'a'; + path[1] = '/'; + for (i = 2; i < sizeof(path) - 1; ++i) { + path[i] = 'a'; + } + + ATF_REQUIRE(realpath(path, resb) == NULL); +} + +ATF_TC(realpath_empty_symlink); +ATF_TC_HEAD(realpath_empty_symlink, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test for correct behavior when encountering empty symlinks"); +} + +ATF_TC_BODY(realpath_empty_symlink, tc) +{ + char path[MAXPATHLEN] = { 0 }; + char slnk[MAXPATHLEN] = { 0 }; + char resb[MAXPATHLEN] = { 0 }; + int fd; + + (void)strlcat(slnk, "empty_symlink", sizeof(slnk)); + + ATF_REQUIRE(symlink("", slnk) == 0); + + fd = open("aaa", O_RDONLY | O_CREAT, 0600); + + ATF_REQUIRE(fd >= 0); + ATF_REQUIRE(close(fd) == 0); + + (void)strlcat(path, "empty_symlink", sizeof(path)); + (void)strlcat(path, "/aaa", sizeof(path)); + + ATF_REQUIRE_ERRNO(ENOENT, realpath(path, resb) == NULL); + + ATF_REQUIRE(unlink("aaa") == 0); + ATF_REQUIRE(unlink(slnk) == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, realpath_buffer_overflow); + ATF_TP_ADD_TC(tp, realpath_empty_symlink); + + return atf_no_error(); +} From owner-svn-src-all@freebsd.org Thu Jun 1 13:22:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D00DDAFCBC5; Thu, 1 Jun 2017 13:22:05 +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 AA6A379638; Thu, 1 Jun 2017 13:22:05 +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 v51DM4I1044047; Thu, 1 Jun 2017 13:22:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51DM41j044045; Thu, 1 Jun 2017 13:22:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706011322.v51DM41j044045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 1 Jun 2017 13:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319419 - stable/10/lib/libc/tests/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 13:22:05 -0000 Author: kib Date: Thu Jun 1 13:22:04 2017 New Revision: 319419 URL: https://svnweb.freebsd.org/changeset/base/319419 Log: MFC r318450: Add tests for some cases in r318298. PR: 219154 Added: stable/10/lib/libc/tests/gen/realpath2_test.c - copied unchanged from r318450, head/lib/libc/tests/gen/realpath2_test.c Modified: stable/10/lib/libc/tests/gen/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/gen/Makefile ============================================================================== --- stable/10/lib/libc/tests/gen/Makefile Thu Jun 1 13:20:47 2017 (r319418) +++ stable/10/lib/libc/tests/gen/Makefile Thu Jun 1 13:22:04 2017 (r319419) @@ -11,6 +11,7 @@ ATF_TESTS_C+= ftw_test ATF_TESTS_C+= popen_test ATF_TESTS_C+= posix_spawn_test ATF_TESTS_C+= wordexp_test +ATF_TESTS_C+= realpath2_test # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, # TODO: t_siginfo (fixes require further inspection) Copied: stable/10/lib/libc/tests/gen/realpath2_test.c (from r318450, head/lib/libc/tests/gen/realpath2_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/gen/realpath2_test.c Thu Jun 1 13:22:04 2017 (r319419, copy of r318450, head/lib/libc/tests/gen/realpath2_test.c) @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2017 Jan Kokemüller + * 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 +#include +#include +#include +#include + +#include + +ATF_TC(realpath_buffer_overflow); +ATF_TC_HEAD(realpath_buffer_overflow, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test for out of bounds read from 'left' array " + "(compile realpath.c with '-fsanitize=address')"); +} + +ATF_TC_BODY(realpath_buffer_overflow, tc) +{ + char path[MAXPATHLEN] = { 0 }; + char resb[MAXPATHLEN] = { 0 }; + size_t i; + + path[0] = 'a'; + path[1] = '/'; + for (i = 2; i < sizeof(path) - 1; ++i) { + path[i] = 'a'; + } + + ATF_REQUIRE(realpath(path, resb) == NULL); +} + +ATF_TC(realpath_empty_symlink); +ATF_TC_HEAD(realpath_empty_symlink, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test for correct behavior when encountering empty symlinks"); +} + +ATF_TC_BODY(realpath_empty_symlink, tc) +{ + char path[MAXPATHLEN] = { 0 }; + char slnk[MAXPATHLEN] = { 0 }; + char resb[MAXPATHLEN] = { 0 }; + int fd; + + (void)strlcat(slnk, "empty_symlink", sizeof(slnk)); + + ATF_REQUIRE(symlink("", slnk) == 0); + + fd = open("aaa", O_RDONLY | O_CREAT, 0600); + + ATF_REQUIRE(fd >= 0); + ATF_REQUIRE(close(fd) == 0); + + (void)strlcat(path, "empty_symlink", sizeof(path)); + (void)strlcat(path, "/aaa", sizeof(path)); + + ATF_REQUIRE_ERRNO(ENOENT, realpath(path, resb) == NULL); + + ATF_REQUIRE(unlink("aaa") == 0); + ATF_REQUIRE(unlink(slnk) == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, realpath_buffer_overflow); + ATF_TP_ADD_TC(tp, realpath_empty_symlink); + + return atf_no_error(); +} From owner-svn-src-all@freebsd.org Thu Jun 1 14:05:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3F01AFDB46; Thu, 1 Jun 2017 14:05:29 +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 7DD887AF9D; Thu, 1 Jun 2017 14:05:29 +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 v51E5Sx5061880; Thu, 1 Jun 2017 14:05:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51E5SZn061879; Thu, 1 Jun 2017 14:05:28 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706011405.v51E5SZn061879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 1 Jun 2017 14:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319420 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:05:29 -0000 Author: avg Date: Thu Jun 1 14:05:28 2017 New Revision: 319420 URL: https://svnweb.freebsd.org/changeset/base/319420 Log: MFC r318830: MFV r316921: 8027 tighten up dsl_pool_dirty_delta Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Jun 1 13:22:04 2017 (r319419) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Jun 1 14:05:28 2017 (r319420) @@ -548,7 +548,7 @@ dsl_pool_dirty_delta(dsl_pool_t *dp, int64_t delta) * Note: we signal even when increasing dp_dirty_total. * This ensures forward progress -- each thread wakes the next waiter. */ - if (dp->dp_dirty_total <= zfs_dirty_data_max) + if (dp->dp_dirty_total < zfs_dirty_data_max) cv_signal(&dp->dp_spaceavail_cv); } From owner-svn-src-all@freebsd.org Thu Jun 1 14:05:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45967AFDB9E; Thu, 1 Jun 2017 14:05: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 15D2E7B0C8; Thu, 1 Jun 2017 14:05:55 +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 v51E5sRh061950; Thu, 1 Jun 2017 14:05:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51E5siW061949; Thu, 1 Jun 2017 14:05:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706011405.v51E5siW061949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 1 Jun 2017 14:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319421 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:05:55 -0000 Author: avg Date: Thu Jun 1 14:05:54 2017 New Revision: 319421 URL: https://svnweb.freebsd.org/changeset/base/319421 Log: MFC r318830: MFV r316921: 8027 tighten up dsl_pool_dirty_delta Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Jun 1 14:05:28 2017 (r319420) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Jun 1 14:05:54 2017 (r319421) @@ -552,7 +552,7 @@ dsl_pool_dirty_delta(dsl_pool_t *dp, int64_t delta) * Note: we signal even when increasing dp_dirty_total. * This ensures forward progress -- each thread wakes the next waiter. */ - if (dp->dp_dirty_total <= zfs_dirty_data_max) + if (dp->dp_dirty_total < zfs_dirty_data_max) cv_signal(&dp->dp_spaceavail_cv); } From owner-svn-src-all@freebsd.org Thu Jun 1 14:07:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C215AFDC18; Thu, 1 Jun 2017 14:07:19 +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 CE4D37B215; Thu, 1 Jun 2017 14:07:18 +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 v51E7IZH062145; Thu, 1 Jun 2017 14:07:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51E7IQF062144; Thu, 1 Jun 2017 14:07:18 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706011407.v51E7IQF062144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 1 Jun 2017 14:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319422 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:07:19 -0000 Author: avg Date: Thu Jun 1 14:07:17 2017 New Revision: 319422 URL: https://svnweb.freebsd.org/changeset/base/319422 Log: MFC r318832: MFV r316923: 8026 retire zfs_throttle_delay and zfs_throttle_resolution Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Jun 1 14:05:54 2017 (r319421) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Jun 1 14:07:17 2017 (r319422) @@ -227,9 +227,6 @@ sysctl_zfs_delay_scale(SYSCTL_HANDLER_ARGS) } #endif -hrtime_t zfs_throttle_delay = MSEC2NSEC(10); -hrtime_t zfs_throttle_resolution = MSEC2NSEC(10); - int dsl_pool_open_special_dir(dsl_pool_t *dp, const char *name, dsl_dir_t **ddp) { From owner-svn-src-all@freebsd.org Thu Jun 1 14:07:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DF4FAFDC73; Thu, 1 Jun 2017 14:07:41 +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 2D7CD7B338; Thu, 1 Jun 2017 14:07:41 +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 v51E7eFN062210; Thu, 1 Jun 2017 14:07:40 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51E7eUH062209; Thu, 1 Jun 2017 14:07:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706011407.v51E7eUH062209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 1 Jun 2017 14:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319423 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:07:41 -0000 Author: avg Date: Thu Jun 1 14:07:40 2017 New Revision: 319423 URL: https://svnweb.freebsd.org/changeset/base/319423 Log: MFC r318832: MFV r316923: 8026 retire zfs_throttle_delay and zfs_throttle_resolution Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Jun 1 14:07:17 2017 (r319422) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Jun 1 14:07:40 2017 (r319423) @@ -231,9 +231,6 @@ sysctl_zfs_delay_scale(SYSCTL_HANDLER_ARGS) } #endif -hrtime_t zfs_throttle_delay = MSEC2NSEC(10); -hrtime_t zfs_throttle_resolution = MSEC2NSEC(10); - int dsl_pool_open_special_dir(dsl_pool_t *dp, const char *name, dsl_dir_t **ddp) { From owner-svn-src-all@freebsd.org Thu Jun 1 14:18:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA6FAFDF4E for ; Thu, 1 Jun 2017 14:18:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm27.bullet.mail.ne1.yahoo.com (nm27.bullet.mail.ne1.yahoo.com [98.138.90.90]) (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 B21327B87E for ; Thu, 1 Jun 2017 14:18:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1496326679; bh=/sqy9LDySgwv9FxxYPzWRVGeg97UIAl1s6zkLPFHT9U=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=Reu86pmyqK1bbnzRsyerDo5ENOCJm0EI4j543SrgcbX2jq17Fq7B0N4dvCten+YFepJDViv9WDG2wTWR43XCX3u8XHZlUhFfgaDdneoU36/LjQrW2gFN5O+ZINGfLpFYPEPI8o5t6DXOlGg6eS39EE/gqNSTlC7aVS6NYyZj2wekqEbOyQ8K5RYr898GMi9tdtp3PsTifb1dRBU6mIW0G2IFagd1ZMbR4w6b7I/cD/llqCZl2k9mN+i4wAK3U22P0rKK7YVAVQ0Nue33IKpo6Cxnp5cqnK1XCp31J5zYyYeC2+5cX/zb/V1N9qh3AZSy2MVLpcNZ3itoiCJLDTah6w== Received: from [98.138.100.114] by nm27.bullet.mail.ne1.yahoo.com with NNFMP; 01 Jun 2017 14:17:59 -0000 Received: from [98.138.226.31] by tm105.bullet.mail.ne1.yahoo.com with NNFMP; 01 Jun 2017 14:17:59 -0000 Received: from [127.0.0.1] by smtp202.mail.ne1.yahoo.com with NNFMP; 01 Jun 2017 14:17:59 -0000 X-Yahoo-Newman-Id: 695425.44477.bm@smtp202.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: h8r0nbkVM1kSgqtlhIFa8wt6OukTaqquH3pIoVPQbv1T4fb BAN6k.jvmDlpkXh4z5G83562HU6lw2XrGwHxXa_QYk5PqBNPTuuQJuPdmkRo h68KIBzdlB1vFaYGNpRD0FyCvOFJdpdDk5DMvtXqgF.EJ.StzXAIDm5NdDb7 3cCS3XRyVkrkRV1IrKtJmizA2WXh.H9AVTWeSgLE9BqgmHjgKD.pgy8GgzBM U6x_KegG9zzL84yAoPpOuPK5TEFfL7mnFiSXHm9Q220_Y9LvoEkbQbHQ9LeZ BN6cvI_lgWcKF_Y2vZseulEGYcI92khkZd27uULvWNCRxgeB_FBkrRxIeQmd v2_huLs.a7Qxpnwq.GglJthDPdRImIRt9LeFH_161rQX0rMCPk_eboTU6NjR xmS08EZCOANo9tzLKCRIQOwCdzu3tgVy7as_H8uPlI2NowiLU4bGwNPsZdVc mLeuoh.pP2dO3cxupAvQKri7gZ3Pz0OgxS6ztBiezYEQe8ArvnAq3N6mHq2V yhn7jcTW73KPiERwP1xpaQJZgFmpMCZQSbvrCXAnU8E38Sqg- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests To: "Ngie Cooper (yaneurabeya)" , Brooks Davis Cc: Ngie Cooper , Marcel Moolenaar , "Simon J. Gerraty" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> From: Pedro Giffuni Organization: FreeBSD Message-ID: <7d59fb7c-7ac6-c545-103d-6185a2ee5c93@FreeBSD.org> Date: Thu, 1 Jun 2017 09:17:57 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:18:07 -0000 On 06/01/17 01:06, Ngie Cooper (yaneurabeya) wrote: >> On May 31, 2017, at 10:03 PM, Brooks Davis wrote: >> >> On Wed, May 31, 2017 at 08:01:12AM +0000, Ngie Cooper wrote: >>> Author: ngie >>> Date: Wed May 31 08:01:12 2017 >>> New Revision: 319295 >>> URL: https://svnweb.freebsd.org/changeset/base/319295 >>> >>> Log: >>> Update the usr.bin/mkimg golden test output files after ^/head@r319125 >>> >>> ^/head@r319125 changed the location of the backup pmbr, requiring the >>> output files to be regenerated, since they're binary disk dumps. >>> >>> The output files were regenerated with "make rebase"--fixed in >>> ^/head@r319294. >> These should not be stored uuencoded. It serves no purpose other >> than bloating the repo and causing spammy commit mails like this one >> where we got a huge tail of garbage output. > Hi Brooks, > I’m not entirely sure why the files were uuencoded to be honest. I think that’s a good question for Marcel and some of the folks at Juniper, since they wrote the tool/tests. for the record, it used to be a common practice. I think it's legacy from the CVS days. Pedro. From owner-svn-src-all@freebsd.org Thu Jun 1 14:39:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11702AFE487; Thu, 1 Jun 2017 14:39:12 +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 D2CC27C24E; Thu, 1 Jun 2017 14:39:11 +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 v51EdA2B074440; Thu, 1 Jun 2017 14:39:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51EdAme074439; Thu, 1 Jun 2017 14:39:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011439.v51EdAme074439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 14:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319424 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:39:12 -0000 Author: gjb Date: Thu Jun 1 14:39:10 2017 New Revision: 319424 URL: https://svnweb.freebsd.org/changeset/base/319424 Log: Document r305514, getdtablesize(2) in capability mode. Document r305516, kern.proc.nfds in capability mode. Document r306213, bspatch(1) capsicum support. Submitted by: emaste Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:07:40 2017 (r319423) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:10 2017 (r319424) @@ -194,6 +194,9 @@ sponsor="&ff;">Support for &man.blacklistd.8; has been added to OpenSSH. + The &man.bspatch.1; utility has been + updated with &man.capsicum.4; support. + The &man.cron.8; utility has been updated to add support for including files within This section covers changes to kernel configurations, system tuning, and system control parameters that are not otherwise categorized. + + + General Kernel Changes + + The &man.getdtablesize.2; system call is + now permitted in capability mode. + + The kern.proc.nfds + &man.sysctl.8; is now permitted in capability mode. + Kernel Bug Fixes From owner-svn-src-all@freebsd.org Thu Jun 1 14:39:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87CFCAFE49B; Thu, 1 Jun 2017 14:39:14 +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 560337C252; Thu, 1 Jun 2017 14:39:14 +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 v51EdD9X074569; Thu, 1 Jun 2017 14:39:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51EdDTV074568; Thu, 1 Jun 2017 14:39:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011439.v51EdDTV074568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 14:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319427 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:39:14 -0000 Author: gjb Date: Thu Jun 1 14:39:13 2017 New Revision: 319427 URL: https://svnweb.freebsd.org/changeset/base/319427 Log: Document r310372, libmd fd(4) function additions. Submitted by: emaste Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:12 2017 (r319426) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:13 2017 (r319427) @@ -392,6 +392,10 @@ Runtime Libraries and API + The libmd library has + been updated to introduce functions thta operate on &man.fd.4; + instead of filename. + The &man.kvm.close.3; function has been updated to return the accumulated error from previous &man.close.2; calls. From owner-svn-src-all@freebsd.org Thu Jun 1 14:39:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1BD2AFE48D; Thu, 1 Jun 2017 14:39:12 +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 AFCDE7C250; Thu, 1 Jun 2017 14:39:12 +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 v51EdB6X074483; Thu, 1 Jun 2017 14:39:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51EdBbL074482; Thu, 1 Jun 2017 14:39:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011439.v51EdBbL074482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 14:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319425 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:39:13 -0000 Author: gjb Date: Thu Jun 1 14:39:11 2017 New Revision: 319425 URL: https://svnweb.freebsd.org/changeset/base/319425 Log: Document r305837, readelf(1) ARM program and section header reporting. Document r305844, ELF Tool Chain updated to r3490. Document r309125, strings(1) exit status fix. Submitted by: emaste Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:10 2017 (r319424) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:11 2017 (r319425) @@ -248,8 +248,19 @@ Contributed Software + &man.readelf.1; utility has been updated + to report &arch.arm; program and section header types. + + The + ELF Tool Chain has been updated to upstream + revision r3490. + &man.unbound.8; has been updated to version 1.5.10. + + &man.strings.1; has been updated to fix + the exit status when multiple files are provided as arguments, + and an error is encountered before the last file. Subversion has been updated to version 1.9.5. From owner-svn-src-all@freebsd.org Thu Jun 1 14:39:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCB41AFE492; Thu, 1 Jun 2017 14:39:13 +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 9454B7C251; Thu, 1 Jun 2017 14:39:13 +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 v51EdCxf074526; Thu, 1 Jun 2017 14:39:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51EdC0R074525; Thu, 1 Jun 2017 14:39:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011439.v51EdC0R074525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 14:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319426 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:39:13 -0000 Author: gjb Date: Thu Jun 1 14:39:12 2017 New Revision: 319426 URL: https://svnweb.freebsd.org/changeset/base/319426 Log: Document r305845, UEFI boot loader build reproducibility. Document r307631, groff(1) reproducibility fixes. Document r309183, makewhatis(1) reproducibility fixes. Document r312249, newvers.sh reproducibility fixes. Document r312730, WITH_REPRODUCIBLE_BUILD src.conf(5) knob. Submitted by: emaste Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:11 2017 (r319425) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:12 2017 (r319426) @@ -255,6 +255,10 @@ ELF Tool Chain has been updated to upstream revision r3490. + &man.groff.1; has been updated to use + the changelog date rather than file modification date in + manual pages for build reproducibility. + &man.unbound.8; has been updated to version 1.5.10. @@ -262,6 +266,10 @@ the exit status when multiple files are provided as arguments, and an error is encountered before the last file. + &man.makewhatis.1; has been updated to produce + build-reproducible output. + Subversion has been updated to version 1.9.5. @@ -453,6 +461,11 @@ The kern.proc.nfds &man.sysctl.8; is now permitted in capability mode. + + The + sys/conf/newvers.sh script has been + updated with an option to exclude build-specific metadata from + the kernel for build reproducibility. @@ -467,6 +480,11 @@ Kernel Configuration + The + WITH_REPRODUCIBLE_BUILD &man.src.conf.5; + knob has been added, which when set, excludes build-specific + metadata from the kernel, for build reproducibility. + The IPSEC_NAT_T kernel configuration option has been removed. Support for NAT-T is now @@ -790,6 +808,10 @@ Boot Loader Changes + + The + UEFI boot loader has been updated for build + reproducibility. The EFI loader has been updated to support From owner-svn-src-all@freebsd.org Thu Jun 1 14:47:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C81F0AFE861; Thu, 1 Jun 2017 14:47:07 +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 989FB7CA19; Thu, 1 Jun 2017 14:47:07 +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 v51El6sB078587; Thu, 1 Jun 2017 14:47:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51El6GH078586; Thu, 1 Jun 2017 14:47:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011447.v51El6GH078586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 14:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319428 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:47:07 -0000 Author: gjb Date: Thu Jun 1 14:47:06 2017 New Revision: 319428 URL: https://svnweb.freebsd.org/changeset/base/319428 Log: Fix a typo. Submitted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:13 2017 (r319427) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:47:06 2017 (r319428) @@ -393,7 +393,7 @@ Runtime Libraries and API The libmd library has - been updated to introduce functions thta operate on &man.fd.4; + been updated to introduce functions that operate on &man.fd.4; instead of filename. The &man.kvm.close.3; function has been From owner-svn-src-all@freebsd.org Thu Jun 1 14:48:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A8C7AFE8C9; Thu, 1 Jun 2017 14:48:01 +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 25E8F7CB46; Thu, 1 Jun 2017 14:48:01 +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 v51Em0Y8078660; Thu, 1 Jun 2017 14:48:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Em0pb078659; Thu, 1 Jun 2017 14:48:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011448.v51Em0pb078659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 14:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319429 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:48:01 -0000 Author: gjb Date: Thu Jun 1 14:47:59 2017 New Revision: 319429 URL: https://svnweb.freebsd.org/changeset/base/319429 Log: Fix grammar. Submitted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:47:06 2017 (r319428) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:47:59 2017 (r319429) @@ -248,8 +248,8 @@ Contributed Software - &man.readelf.1; utility has been updated - to report &arch.arm; program and section header types. + &man.readelf.1; has been updated to + report &arch.arm; program and section header types. The ELF Tool Chain has been updated to upstream From owner-svn-src-all@freebsd.org Thu Jun 1 14:49:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBD13AFE973; Thu, 1 Jun 2017 14:49:56 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11F087CD6E; Thu, 1 Jun 2017 14:49:55 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51Ent2a078916; Thu, 1 Jun 2017 14:49:55 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51EnrRI078897; Thu, 1 Jun 2017 14:49:53 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201706011449.v51EnrRI078897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 1 Jun 2017 14:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319430 - in stable/11: include lib/libc/include lib/libthr lib/libthr/arch/aarch64/include lib/libthr/arch/arm/include lib/libthr/arch/mips/include lib/libthr/arch/powerpc/include lib/... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:49:57 -0000 Author: vangyzen Date: Thu Jun 1 14:49:53 2017 New Revision: 319430 URL: https://svnweb.freebsd.org/changeset/base/319430 Log: MFC r318539 r318580 r318581 r318584 r318749 r318952 r318953 r318955 libthr: fix warnings at WARNS=6 Fix warnings about the following when WARNS=6 (which I will commit soon): - casting away const - no previous 'extern' declaration for non-static variable - others as explained by #pragmas and comments - unused parameters libthr: disable thread-safety warnings These warnings don't make sense for code that implements the locking primitives. libthr: change CHECK_AND_INIT_RWLOCK to an inline function This was prompted by a compiler warning about 'ret' shadowing a local variable in the callers of the macro. libthr: Use CLI flags instead of pragmas to disable warnings People tweaking the build system or compilers tend to look into the Makefile and not into the source. Having some warning controls in the Makefile and some in the source code is surprising. Pragmas have the advantage that they leave the warnings enabled for more code, but that advantage isn't very relevant in these cases. libthr: fix warnings from GCC when WARNS=6 Fix warnings about: - redundant declarations - a local variable shadowing a global function (dlinfo) - an old-style function definition (with an empty parameter list) - a variable that is possibly used uninitialized libthr: prevent setcontext() from masking SIGTHR __thr_setcontext() mistakenly tested for the presence of SIGCANCEL in its local ucontext_t instead of the parameter. Therefore, if a thread calls setcontext() with a context whose signal mask contains SIGTHR (a.k.a. SIGCANCEL), that signal will be blocked, preventing the thread from being cancelled or suspended. Sponsored by: Dell EMC Modified: stable/11/include/stdio.h stable/11/lib/libc/include/libc_private.h stable/11/lib/libthr/Makefile stable/11/lib/libthr/arch/aarch64/include/pthread_md.h stable/11/lib/libthr/arch/arm/include/pthread_md.h stable/11/lib/libthr/arch/mips/include/pthread_md.h stable/11/lib/libthr/arch/powerpc/include/pthread_md.h stable/11/lib/libthr/arch/riscv/include/pthread_md.h stable/11/lib/libthr/thread/thr_attr.c stable/11/lib/libthr/thread/thr_exit.c stable/11/lib/libthr/thread/thr_kern.c stable/11/lib/libthr/thread/thr_list.c stable/11/lib/libthr/thread/thr_mutex.c stable/11/lib/libthr/thread/thr_private.h stable/11/lib/libthr/thread/thr_rwlock.c stable/11/lib/libthr/thread/thr_sig.c stable/11/lib/libthr/thread/thr_spec.c stable/11/lib/libthr/thread/thr_umtx.c stable/11/lib/libthr/thread/thr_umtx.h Directory Properties: stable/11/ (props changed) Modified: stable/11/include/stdio.h ============================================================================== --- stable/11/include/stdio.h Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/include/stdio.h Thu Jun 1 14:49:53 2017 (r319430) @@ -499,7 +499,10 @@ static __inline int __sputc(int _c, FILE *_p) { (*(p)->_p = (c), (int)*(p)->_p++)) #endif +#ifndef __LIBC_ISTHREADED_DECLARED +#define __LIBC_ISTHREADED_DECLARED extern int __isthreaded; +#endif #ifndef __cplusplus Modified: stable/11/lib/libc/include/libc_private.h ============================================================================== --- stable/11/lib/libc/include/libc_private.h Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libc/include/libc_private.h Thu Jun 1 14:49:53 2017 (r319430) @@ -42,7 +42,10 @@ * or more threads. It is used to avoid calling locking functions * when they are not required. */ +#ifndef __LIBC_ISTHREADED_DECLARED +#define __LIBC_ISTHREADED_DECLARED extern int __isthreaded; +#endif /* * Elf_Auxinfo *__elf_aux_vector, the pointer to the ELF aux vector Modified: stable/11/lib/libthr/Makefile ============================================================================== --- stable/11/lib/libthr/Makefile Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/Makefile Thu Jun 1 14:49:53 2017 (r319430) @@ -17,6 +17,7 @@ MK_SSP= no LIB=thr SHLIB_MAJOR= 3 WARNS?= 3 +NO_WTHREAD_SAFETY=1 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ -I${SRCTOP}/include @@ -26,6 +27,12 @@ CFLAGS+=-I${SRCTOP}/libexec/rtld-elf CFLAGS+=-I${SRCTOP}/libexec/rtld-elf/${MACHINE_CPUARCH} CFLAGS+=-I${SRCTOP}/lib/libthread_db CFLAGS+=-Winline + +CFLAGS.thr_stack.c+= -Wno-cast-align +.include +.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 40300) +CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations +.endif .ifndef NO_THREAD_UNWIND_STACK CFLAGS+=-fexceptions Modified: stable/11/lib/libthr/arch/aarch64/include/pthread_md.h ============================================================================== --- stable/11/lib/libthr/arch/aarch64/include/pthread_md.h Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/arch/aarch64/include/pthread_md.h Thu Jun 1 14:49:53 2017 (r319430) @@ -72,8 +72,6 @@ _tcb_get(void) return (tcb); } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: stable/11/lib/libthr/arch/arm/include/pthread_md.h ============================================================================== --- stable/11/lib/libthr/arch/arm/include/pthread_md.h Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/arch/arm/include/pthread_md.h Thu Jun 1 14:49:53 2017 (r319430) @@ -75,8 +75,6 @@ _tcb_get(void) #endif } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: stable/11/lib/libthr/arch/mips/include/pthread_md.h ============================================================================== --- stable/11/lib/libthr/arch/mips/include/pthread_md.h Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/arch/mips/include/pthread_md.h Thu Jun 1 14:49:53 2017 (r319430) @@ -70,8 +70,6 @@ _tcb_get(void) return tcb; } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: stable/11/lib/libthr/arch/powerpc/include/pthread_md.h ============================================================================== --- stable/11/lib/libthr/arch/powerpc/include/pthread_md.h Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/arch/powerpc/include/pthread_md.h Thu Jun 1 14:49:53 2017 (r319430) @@ -80,8 +80,6 @@ _tcb_get(void) return ((struct tcb *)(_tp - TP_OFFSET)); } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: stable/11/lib/libthr/arch/riscv/include/pthread_md.h ============================================================================== --- stable/11/lib/libthr/arch/riscv/include/pthread_md.h Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/arch/riscv/include/pthread_md.h Thu Jun 1 14:49:53 2017 (r319430) @@ -78,8 +78,6 @@ _tcb_get(void) return ((struct tcb *)(_tp - TP_OFFSET)); } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { Modified: stable/11/lib/libthr/thread/thr_attr.c ============================================================================== --- stable/11/lib/libthr/thread/thr_attr.c Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_attr.c Thu Jun 1 14:49:53 2017 (r319430) @@ -607,7 +607,7 @@ _pthread_attr_setaffinity_np(pthread_attr_t *pattr, si /* Kernel checks invalid bits, we check it here too. */ size_t i; for (i = kern_size; i < cpusetsize; ++i) { - if (((char *)cpusetp)[i]) + if (((const char *)cpusetp)[i]) return (EINVAL); } } Modified: stable/11/lib/libthr/thread/thr_exit.c ============================================================================== --- stable/11/lib/libthr/thread/thr_exit.c Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_exit.c Thu Jun 1 14:49:53 2017 (r319430) @@ -46,8 +46,6 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "thr_private.h" -void _pthread_exit(void *status); - static void exit_thread(void) __dead2; __weak_reference(_pthread_exit, pthread_exit); @@ -72,7 +70,7 @@ static void thread_uw_init(void) { static int inited = 0; - Dl_info dlinfo; + Dl_info dli; void *handle; void *forcedunwind, *getcfa; @@ -80,12 +78,12 @@ thread_uw_init(void) return; handle = RTLD_DEFAULT; if ((forcedunwind = dlsym(handle, "_Unwind_ForcedUnwind")) != NULL) { - if (dladdr(forcedunwind, &dlinfo)) { + if (dladdr(forcedunwind, &dli)) { /* * Make sure the address is always valid by holding the library, * also assume functions are in same library. */ - if ((handle = dlopen(dlinfo.dli_fname, RTLD_LAZY)) != NULL) { + if ((handle = dlopen(dli.dli_fname, RTLD_LAZY)) != NULL) { forcedunwind = dlsym(handle, "_Unwind_ForcedUnwind"); getcfa = dlsym(handle, "_Unwind_GetCFA"); if (forcedunwind != NULL && getcfa != NULL) { @@ -119,7 +117,8 @@ _Unwind_GetCFA(struct _Unwind_Context *context) #endif /* PIC */ static void -thread_unwind_cleanup(_Unwind_Reason_Code code, struct _Unwind_Exception *e) +thread_unwind_cleanup(_Unwind_Reason_Code code __unused, + struct _Unwind_Exception *e __unused) { /* * Specification said that _Unwind_Resume should not be used here, @@ -130,10 +129,10 @@ thread_unwind_cleanup(_Unwind_Reason_Code code, struct } static _Unwind_Reason_Code -thread_unwind_stop(int version, _Unwind_Action actions, - int64_t exc_class, - struct _Unwind_Exception *exc_obj, - struct _Unwind_Context *context, void *stop_parameter) +thread_unwind_stop(int version __unused, _Unwind_Action actions, + int64_t exc_class __unused, + struct _Unwind_Exception *exc_obj __unused, + struct _Unwind_Context *context, void *stop_parameter __unused) { struct pthread *curthread = _get_curthread(); struct pthread_cleanup *cur; Modified: stable/11/lib/libthr/thread/thr_kern.c ============================================================================== --- stable/11/lib/libthr/thread/thr_kern.c Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_kern.c Thu Jun 1 14:49:53 2017 (r319430) @@ -62,7 +62,7 @@ _thr_setthreaded(int threaded) } void -_thr_assert_lock_level() +_thr_assert_lock_level(void) { PANIC("locklevel <= 0"); } Modified: stable/11/lib/libthr/thread/thr_list.c ============================================================================== --- stable/11/lib/libthr/thread/thr_list.c Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_list.c Thu Jun 1 14:49:53 2017 (r319430) @@ -35,8 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include "thr_private.h" #include "libc_private.h" +#include "thr_private.h" /*#define DEBUG_THREAD_LIST */ #ifdef DEBUG_THREAD_LIST Modified: stable/11/lib/libthr/thread/thr_mutex.c ============================================================================== --- stable/11/lib/libthr/thread/thr_mutex.c Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_mutex.c Thu Jun 1 14:49:53 2017 (r319430) @@ -70,8 +70,6 @@ int __pthread_mutex_trylock(pthread_mutex_t *mutex); int __pthread_mutex_lock(pthread_mutex_t *mutex); int __pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime); -int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, - void *(calloc_cb)(size_t, size_t)); int _pthread_mutex_getspinloops_np(pthread_mutex_t *mutex, int *count); int _pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); int __pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); @@ -712,6 +710,7 @@ mutex_lock_common(struct pthread_mutex *m, const struc struct pthread *curthread; int ret, robust; + robust = 0; /* pacify gcc */ curthread = _get_curthread(); if (!cvattach && m->m_flags & PMUTEX_FLAG_PRIVATE) THR_CRITICAL_ENTER(curthread); Modified: stable/11/lib/libthr/thread/thr_private.h ============================================================================== --- stable/11/lib/libthr/thread/thr_private.h Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_private.h Thu Jun 1 14:49:53 2017 (r319430) @@ -69,6 +69,9 @@ __NULLABILITY_PRAGMA_PUSH WEAK_REF(func, SYM_FBP10(sym)); \ SYM_DEFAULT(sym, SYM_FBP10(sym), FBSDprivate_1.0) +struct pthread; +extern struct pthread *_thr_initial __hidden; + #include "pthread_md.h" #include "thr_umtx.h" #include "thread_db.h" @@ -701,14 +704,16 @@ do { \ (curthr->report_events && \ (((curthr)->event_mask | _thread_event_mask ) & e) != 0) +#ifndef __LIBC_ISTHREADED_DECLARED +#define __LIBC_ISTHREADED_DECLARED extern int __isthreaded; +#endif /* * Global variables for the pthread kernel. */ extern char *_usrstack __hidden; -extern struct pthread *_thr_initial __hidden; /* For debugger */ extern int _libthr_debug; @@ -835,8 +840,10 @@ int _sched_yield(void); void _pthread_cleanup_push(void (*)(void *), void *); void _pthread_cleanup_pop(int); void _pthread_exit_mask(void *status, sigset_t *mask) __dead2 __hidden; +#ifndef _LIBC_PRIVATE_H_ void _pthread_cancel_enter(int maycancel); void _pthread_cancel_leave(int maycancel); +#endif int _pthread_mutex_consistent(pthread_mutex_t * _Nonnull); int _pthread_mutexattr_getrobust(pthread_mutexattr_t * _Nonnull __restrict, int * _Nonnull __restrict); @@ -844,46 +851,56 @@ int _pthread_mutexattr_setrobust(pthread_mutexattr_t * /* #include */ #ifdef _SYS_FCNTL_H_ +#ifndef _LIBC_PRIVATE_H_ int __sys_fcntl(int, int, ...); int __sys_openat(int, const char *, int, ...); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ /* #include */ #ifdef _SIGNAL_H_ int __sys_kill(pid_t, int); -int __sys_sigaction(int, const struct sigaction *, struct sigaction *); +int __sys_sigaltstack(const struct sigaltstack *, struct sigaltstack *); int __sys_sigpending(sigset_t *); +int __sys_sigreturn(const ucontext_t *); +#ifndef _LIBC_PRIVATE_H_ +int __sys_sigaction(int, const struct sigaction *, struct sigaction *); int __sys_sigprocmask(int, const sigset_t *, sigset_t *); int __sys_sigsuspend(const sigset_t *); -int __sys_sigreturn(const ucontext_t *); -int __sys_sigaltstack(const struct sigaltstack *, struct sigaltstack *); -int __sys_sigwait(const sigset_t *, int *); int __sys_sigtimedwait(const sigset_t *, siginfo_t *, const struct timespec *); +int __sys_sigwait(const sigset_t *, int *); int __sys_sigwaitinfo(const sigset_t *set, siginfo_t *info); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ /* #include */ #ifdef _TIME_H_ +#ifndef _LIBC_PRIVATE_H_ int __sys_clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *); int __sys_nanosleep(const struct timespec *, struct timespec *); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ /* #include */ #ifdef _SYS_UCONTEXT_H_ +#ifndef _LIBC_PRIVATE_H_ int __sys_setcontext(const ucontext_t *ucp); int __sys_swapcontext(ucontext_t *oucp, const ucontext_t *ucp); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ /* #include */ #ifdef _UNISTD_H_ +void __sys_exit(int); +pid_t __sys_getpid(void); +#ifndef _LIBC_PRIVATE_H_ int __sys_close(int); int __sys_fork(void); -pid_t __sys_getpid(void); ssize_t __sys_read(int, void *, size_t); -void __sys_exit(int); -#endif +#endif /* _LIBC_PRIVATE_H_ */ +#endif /* _SYS_FCNTL_H_ */ static inline int _thr_isthreaded(void) Modified: stable/11/lib/libthr/thread/thr_rwlock.c ============================================================================== --- stable/11/lib/libthr/thread/thr_rwlock.c Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_rwlock.c Thu Jun 1 14:49:53 2017 (r319430) @@ -49,28 +49,43 @@ __weak_reference(_pthread_rwlock_unlock, pthread_rwloc __weak_reference(_pthread_rwlock_wrlock, pthread_rwlock_wrlock); __weak_reference(_pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock); -#define CHECK_AND_INIT_RWLOCK \ - if (*rwlock == THR_PSHARED_PTR) { \ - prwlock = __thr_pshared_offpage(rwlock, 0); \ - if (prwlock == NULL) \ - return (EINVAL); \ - } else if (__predict_false((prwlock = (*rwlock)) <= \ - THR_RWLOCK_DESTROYED)) { \ - if (prwlock == THR_RWLOCK_INITIALIZER) { \ - int ret; \ - ret = init_static(_get_curthread(), rwlock); \ - if (ret) \ - return (ret); \ - } else if (prwlock == THR_RWLOCK_DESTROYED) { \ - return (EINVAL); \ - } \ - prwlock = *rwlock; \ - } +static int init_static(struct pthread *thread, pthread_rwlock_t *rwlock); +static int init_rwlock(pthread_rwlock_t *rwlock, pthread_rwlock_t *rwlock_out); -/* - * Prototypes - */ +static int __always_inline +check_and_init_rwlock(pthread_rwlock_t *rwlock, pthread_rwlock_t *rwlock_out) +{ + if (__predict_false(*rwlock == THR_PSHARED_PTR || + *rwlock <= THR_RWLOCK_DESTROYED)) + return (init_rwlock(rwlock, rwlock_out)); + *rwlock_out = *rwlock; + return (0); +} +static int __noinline +init_rwlock(pthread_rwlock_t *rwlock, pthread_rwlock_t *rwlock_out) +{ + pthread_rwlock_t prwlock; + int ret; + + if (*rwlock == THR_PSHARED_PTR) { + prwlock = __thr_pshared_offpage(rwlock, 0); + if (prwlock == NULL) + return (EINVAL); + } else if ((prwlock = *rwlock) <= THR_RWLOCK_DESTROYED) { + if (prwlock == THR_RWLOCK_INITIALIZER) { + ret = init_static(_get_curthread(), rwlock); + if (ret != 0) + return (ret); + } else if (prwlock == THR_RWLOCK_DESTROYED) { + return (EINVAL); + } + prwlock = *rwlock; + } + *rwlock_out = prwlock; + return (0); +} + static int rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr) { @@ -148,7 +163,9 @@ rwlock_rdlock_common(pthread_rwlock_t *rwlock, const s int flags; int ret; - CHECK_AND_INIT_RWLOCK + ret = check_and_init_rwlock(rwlock, &prwlock); + if (ret != 0) + return (ret); if (curthread->rdlock_count) { /* @@ -220,7 +237,9 @@ _pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock) int flags; int ret; - CHECK_AND_INIT_RWLOCK + ret = check_and_init_rwlock(rwlock, &prwlock); + if (ret != 0) + return (ret); if (curthread->rdlock_count) { /* @@ -253,7 +272,9 @@ _pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock) pthread_rwlock_t prwlock; int ret; - CHECK_AND_INIT_RWLOCK + ret = check_and_init_rwlock(rwlock, &prwlock); + if (ret != 0) + return (ret); ret = _thr_rwlock_trywrlock(&prwlock->lock); if (ret == 0) @@ -268,7 +289,9 @@ rwlock_wrlock_common (pthread_rwlock_t *rwlock, const pthread_rwlock_t prwlock; int ret; - CHECK_AND_INIT_RWLOCK + ret = check_and_init_rwlock(rwlock, &prwlock); + if (ret != 0) + return (ret); /* * POSIX said the validity of the abstimeout parameter need Modified: stable/11/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/11/lib/libthr/thread/thr_sig.c Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_sig.c Thu Jun 1 14:49:53 2017 (r319430) @@ -441,7 +441,7 @@ _thr_signal_init(int dlopened) } void -_thr_sigact_unload(struct dl_phdr_info *phdr_info) +_thr_sigact_unload(struct dl_phdr_info *phdr_info __unused) { #if 0 struct pthread *curthread = _get_curthread(); @@ -736,8 +736,8 @@ __thr_setcontext(const ucontext_t *ucp) errno = EINVAL; return (-1); } - if (!SIGISMEMBER(uc.uc_sigmask, SIGCANCEL)) - return __sys_setcontext(ucp); + if (!SIGISMEMBER(ucp->uc_sigmask, SIGCANCEL)) + return (__sys_setcontext(ucp)); (void) memcpy(&uc, ucp, sizeof(uc)); SIGDELSET(uc.uc_sigmask, SIGCANCEL); return (__sys_setcontext(&uc)); Modified: stable/11/lib/libthr/thread/thr_spec.c ============================================================================== --- stable/11/lib/libthr/thread/thr_spec.c Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_spec.c Thu Jun 1 14:49:53 2017 (r319430) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include "thr_private.h" -struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX]; +static struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX]; __weak_reference(_pthread_key_create, pthread_key_create); __weak_reference(_pthread_key_delete, pthread_key_delete); Modified: stable/11/lib/libthr/thread/thr_umtx.c ============================================================================== --- stable/11/lib/libthr/thread/thr_umtx.c Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_umtx.c Thu Jun 1 14:49:53 2017 (r319430) @@ -168,7 +168,7 @@ __thr_umutex_timedlock(struct umutex *mtx, uint32_t id } int -__thr_umutex_unlock(struct umutex *mtx, uint32_t id) +__thr_umutex_unlock(struct umutex *mtx) { return (_umtx_op_err(mtx, UMTX_OP_MUTEX_UNLOCK, 0, 0, 0)); Modified: stable/11/lib/libthr/thread/thr_umtx.h ============================================================================== --- stable/11/lib/libthr/thread/thr_umtx.h Thu Jun 1 14:47:59 2017 (r319429) +++ stable/11/lib/libthr/thread/thr_umtx.h Thu Jun 1 14:49:53 2017 (r319430) @@ -44,7 +44,7 @@ int __thr_umutex_lock(struct umutex *mtx, uint32_t id) int __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) __hidden; int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, const struct timespec *timeout) __hidden; -int __thr_umutex_unlock(struct umutex *mtx, uint32_t id) __hidden; +int __thr_umutex_unlock(struct umutex *mtx) __hidden; int __thr_umutex_trylock(struct umutex *mtx) __hidden; int __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling, uint32_t *oldceiling) __hidden; @@ -155,7 +155,7 @@ _thr_umutex_unlock2(struct umutex *mtx, uint32_t id, i if (atomic_cmpset_rel_32(&mtx->m_owner, id, noncst ? UMUTEX_RB_NOTRECOV : UMUTEX_UNOWNED)) return (0); - return (__thr_umutex_unlock(mtx, id)); + return (__thr_umutex_unlock(mtx)); } do { From owner-svn-src-all@freebsd.org Thu Jun 1 14:58:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2AA7AFEC05; Thu, 1 Jun 2017 14:58:27 +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 BE3517D29E; Thu, 1 Jun 2017 14:58:27 +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 v51EwQpq082896; Thu, 1 Jun 2017 14:58:26 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51EwQ3v082894; Thu, 1 Jun 2017 14:58:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706011458.v51EwQ3v082894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 14:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319431 - in stable/11/sys/netinet: . tcp_stacks X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 14:58:28 -0000 Author: tuexen Date: Thu Jun 1 14:58:26 2017 New Revision: 319431 URL: https://svnweb.freebsd.org/changeset/base/319431 Log: When a SYN-ACK is received in SYN-SENT state, RFC 793 requires the validation of SEG.ACK as the first step. If the ACK is not acceptable, a RST segment should be sent and the segment should be dropped. Up to now, the segment was partially processed. This patch moves the check for the SEG.ACK validation up to the front as required. Reviewed by: hiren, gnn Differential Revision: https://reviews.freebsd.org/D10424 Modified: stable/11/sys/netinet/tcp_input.c stable/11/sys/netinet/tcp_stacks/fastpath.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_input.c ============================================================================== --- stable/11/sys/netinet/tcp_input.c Thu Jun 1 14:49:53 2017 (r319430) +++ stable/11/sys/netinet/tcp_input.c Thu Jun 1 14:58:26 2017 (r319431) @@ -1607,6 +1607,16 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru } /* + * If a segment with the ACK-bit set arrives in the SYN-SENT state + * check SEQ.ACK first. + */ + if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && + (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { + rstreason = BANDLIM_UNLIMITED; + goto dropwithreset; + } + + /* * Segment received on connection. * Reset idle time and keep-alive timer. * XXX: This should be done after segment @@ -1984,7 +1994,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru /* * If the state is SYN_SENT: - * if seg contains an ACK, but not for our SYN, drop the input. * if seg contains a RST, then drop the connection. * if seg does not contain SYN, then drop it. * Otherwise this is an acceptable SYN segment @@ -1997,12 +2006,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru * continue processing rest of data/controls, beginning with URG */ case TCPS_SYN_SENT: - if ((thflags & TH_ACK) && - (SEQ_LEQ(th->th_ack, tp->iss) || - SEQ_GT(th->th_ack, tp->snd_max))) { - rstreason = BANDLIM_UNLIMITED; - goto dropwithreset; - } if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) { TCP_PROBE5(connect__refused, NULL, tp, m, tp, th); Modified: stable/11/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- stable/11/sys/netinet/tcp_stacks/fastpath.c Thu Jun 1 14:49:53 2017 (r319430) +++ stable/11/sys/netinet/tcp_stacks/fastpath.c Thu Jun 1 14:58:26 2017 (r319431) @@ -485,7 +485,6 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, str /* * If the state is SYN_SENT: - * if seg contains an ACK, but not for our SYN, drop the input. * if seg contains a RST, then drop the connection. * if seg does not contain SYN, then drop it. * Otherwise this is an acceptable SYN segment @@ -498,12 +497,6 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, str * continue processing rest of data/controls, beginning with URG */ case TCPS_SYN_SENT: - if ((thflags & TH_ACK) && - (SEQ_LEQ(th->th_ack, tp->iss) || - SEQ_GT(th->th_ack, tp->snd_max))) { - rstreason = BANDLIM_UNLIMITED; - goto dropwithreset; - } if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) { TCP_PROBE5(connect__refused, NULL, tp, m, tp, th); tp = tcp_drop(tp, ECONNREFUSED); @@ -1744,6 +1737,20 @@ tcp_do_segment_fastslow(struct mbuf *m, struct tcphdr m_freem(m); return; } + + /* + * If a segment with the ACK-bit set arrives in the SYN-SENT state + * check SEQ.ACK first. + */ + if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && + (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { + tcp_dropwithreset(m, th, tp, tlen, BANDLIM_UNLIMITED); + if (ti_locked == TI_RLOCKED) { + INP_INFO_RUNLOCK(&V_tcbinfo); + } + INP_WUNLOCK(tp->t_inpcb); + return; + } tp->sackhint.last_sack_ack = 0; @@ -2203,6 +2210,20 @@ tcp_do_segment_fastack(struct mbuf *m, struct tcphdr * return; } + /* + * If a segment with the ACK-bit set arrives in the SYN-SENT state + * check SEQ.ACK first. + */ + if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && + (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { + tcp_dropwithreset(m, th, tp, tlen, BANDLIM_UNLIMITED); + if (ti_locked == TI_RLOCKED) { + INP_INFO_RUNLOCK(&V_tcbinfo); + } + INP_WUNLOCK(tp->t_inpcb); + return; + } + tp->sackhint.last_sack_ack = 0; /* From owner-svn-src-all@freebsd.org Thu Jun 1 15:03:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA855AFEE09; Thu, 1 Jun 2017 15:03:44 +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 99B537D68D; Thu, 1 Jun 2017 15:03:44 +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 v51F3h99086762; Thu, 1 Jun 2017 15:03:43 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51F3hqg086761; Thu, 1 Jun 2017 15:03:43 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706011503.v51F3hqg086761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 1 Jun 2017 15:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319432 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:03:44 -0000 Author: trasz Date: Thu Jun 1 15:03:43 2017 New Revision: 319432 URL: https://svnweb.freebsd.org/changeset/base/319432 Log: Use proper capitalization with .Dd. Submitted by: oshogbo MFC after: 2 weeks Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Thu Jun 1 14:58:26 2017 (r319431) +++ head/usr.bin/rctl/rctl.8 Thu Jun 1 15:03:43 2017 (r319432) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd may 28, 2017 +.Dd May 28, 2017 .Dt RCTL 8 .Os .Sh NAME From owner-svn-src-all@freebsd.org Thu Jun 1 15:11:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA215AFF07C; Thu, 1 Jun 2017 15:11:19 +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 8A4277DCCA; Thu, 1 Jun 2017 15:11:19 +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 v51FBIG7087485; Thu, 1 Jun 2017 15:11:18 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51FBIYf087483; Thu, 1 Jun 2017 15:11:18 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706011511.v51FBIYf087483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 1 Jun 2017 15:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319433 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:11:19 -0000 Author: tuexen Date: Thu Jun 1 15:11:18 2017 New Revision: 319433 URL: https://svnweb.freebsd.org/changeset/base/319433 Log: Improve comments to describe what the code does. Reported by: jtl Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/fastpath.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Thu Jun 1 15:03:43 2017 (r319432) +++ head/sys/netinet/tcp_input.c Thu Jun 1 15:11:18 2017 (r319433) @@ -2011,8 +2011,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru /* * If the state is SYN_SENT: - * if seg contains a RST, then drop the connection. - * if seg does not contain SYN, then drop it. + * if seg contains a RST with valid ACK (SEQ.ACK has already + * been verified), then drop the connection. + * if seg contains a RST without an ACK, drop the seg. + * if seg does not contain SYN, then drop the seg. * Otherwise this is an acceptable SYN segment * initialize tp->rcv_nxt and tp->irs * if seg contains ack then advance tp->snd_una Modified: head/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- head/sys/netinet/tcp_stacks/fastpath.c Thu Jun 1 15:03:43 2017 (r319432) +++ head/sys/netinet/tcp_stacks/fastpath.c Thu Jun 1 15:11:18 2017 (r319433) @@ -497,8 +497,10 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, str /* * If the state is SYN_SENT: - * if seg contains a RST, then drop the connection. - * if seg does not contain SYN, then drop it. + * if seg contains a RST with valid ACK (SEQ.ACK has already + * been verified), then drop the connection. + * if seg contains a RST without an ACK, drop the seg. + * if seg does not contain SYN, then drop the seg. * Otherwise this is an acceptable SYN segment * initialize tp->rcv_nxt and tp->irs * if seg contains ack then advance tp->snd_una From owner-svn-src-all@freebsd.org Thu Jun 1 15:12:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5D24AFF115; Thu, 1 Jun 2017 15:12:52 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EFE67DEDE; Thu, 1 Jun 2017 15:12:52 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51FCpuV091476; Thu, 1 Jun 2017 15:12:51 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51FCpIu091471; Thu, 1 Jun 2017 15:12:51 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201706011512.v51FCpIu091471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 1 Jun 2017 15:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319434 - in stable/11/libexec/rtld-elf: arm mips powerpc powerpc64 riscv X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:12:52 -0000 Author: vangyzen Date: Thu Jun 1 15:12:51 2017 New Revision: 319434 URL: https://svnweb.freebsd.org/changeset/base/319434 Log: MFC r318954 rtld: fix warnings about redundant declarations Fix warnings about redundant declarations in rtld when libthr in increased to WARNS=6. Sponsored by: Dell EMC Modified: stable/11/libexec/rtld-elf/arm/rtld_machdep.h stable/11/libexec/rtld-elf/mips/rtld_machdep.h stable/11/libexec/rtld-elf/powerpc/rtld_machdep.h stable/11/libexec/rtld-elf/powerpc64/rtld_machdep.h stable/11/libexec/rtld-elf/riscv/rtld_machdep.h Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/arm/rtld_machdep.h ============================================================================== --- stable/11/libexec/rtld-elf/arm/rtld_machdep.h Thu Jun 1 15:11:18 2017 (r319433) +++ stable/11/libexec/rtld-elf/arm/rtld_machdep.h Thu Jun 1 15:12:51 2017 (r319434) @@ -67,11 +67,6 @@ typedef struct { round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) -/* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - extern void *__tls_get_addr(tls_index *ti); #define RTLD_DEFAULT_STACK_PF_EXEC PF_X Modified: stable/11/libexec/rtld-elf/mips/rtld_machdep.h ============================================================================== --- stable/11/libexec/rtld-elf/mips/rtld_machdep.h Thu Jun 1 15:11:18 2017 (r319433) +++ stable/11/libexec/rtld-elf/mips/rtld_machdep.h Thu Jun 1 15:12:51 2017 (r319434) @@ -67,11 +67,6 @@ typedef struct { round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) -/* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - extern void *__tls_get_addr(tls_index *ti); #define RTLD_DEFAULT_STACK_PF_EXEC PF_X Modified: stable/11/libexec/rtld-elf/powerpc/rtld_machdep.h ============================================================================== --- stable/11/libexec/rtld-elf/powerpc/rtld_machdep.h Thu Jun 1 15:11:18 2017 (r319433) +++ stable/11/libexec/rtld-elf/powerpc/rtld_machdep.h Thu Jun 1 15:12:51 2017 (r319434) @@ -54,11 +54,6 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr targe (((Elf_Addr (*)(void))ptr)()) /* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - -/* * PLT functions. Not really correct prototypes, but the * symbol values are needed. */ Modified: stable/11/libexec/rtld-elf/powerpc64/rtld_machdep.h ============================================================================== --- stable/11/libexec/rtld-elf/powerpc64/rtld_machdep.h Thu Jun 1 15:11:18 2017 (r319433) +++ stable/11/libexec/rtld-elf/powerpc64/rtld_machdep.h Thu Jun 1 15:12:51 2017 (r319434) @@ -54,11 +54,6 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr targe (((Elf_Addr (*)(void))ptr)()) /* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - -/* * TLS */ Modified: stable/11/libexec/rtld-elf/riscv/rtld_machdep.h ============================================================================== --- stable/11/libexec/rtld-elf/riscv/rtld_machdep.h Thu Jun 1 15:11:18 2017 (r319433) +++ stable/11/libexec/rtld-elf/riscv/rtld_machdep.h Thu Jun 1 15:12:51 2017 (r319434) @@ -80,11 +80,6 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr targe (((Elf_Addr (*)(void))ptr)()) /* - * Lazy binding entry point, called via PLT. - */ -void _rtld_bind_start(void); - -/* * TLS */ #define TLS_TP_OFFSET 0x0 From owner-svn-src-all@freebsd.org Thu Jun 1 15:28:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C3FCAFF6EA; Thu, 1 Jun 2017 15:28:53 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 555267E976; Thu, 1 Jun 2017 15:28:52 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from marcels-mbp.int.brkt.com (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id v51FBoLf069685 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 1 Jun 2017 08:11:51 -0700 (PDT) (envelope-from marcel@xcllnt.net) From: Marcel Moolenaar Message-Id: <78A8D734-A627-437D-AE63-BA94C543C36B@xcllnt.net> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests Date: Thu, 1 Jun 2017 08:11:45 -0700 In-Reply-To: <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> Cc: Brooks Davis , Ngie Cooper , Marcel Moolenaar , "Simon J. Gerraty" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: "Ngie Cooper (yaneurabeya)" References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> X-Mailer: Apple Mail (2.3273) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.xcllnt.net [50.0.150.214]); Thu, 01 Jun 2017 08:11:51 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:28:53 -0000 > On May 31, 2017, at 11:06 PM, Ngie Cooper (yaneurabeya) = wrote: >=20 >=20 >> On May 31, 2017, at 10:03 PM, Brooks Davis = wrote: >>=20 >> On Wed, May 31, 2017 at 08:01:12AM +0000, Ngie Cooper wrote: >>> Author: ngie >>> Date: Wed May 31 08:01:12 2017 >>> New Revision: 319295 >>> URL: https://svnweb.freebsd.org/changeset/base/319295 >>>=20 >>> Log: >>> Update the usr.bin/mkimg golden test output files after = ^/head@r319125 >>>=20 >>> ^/head@r319125 changed the location of the backup pmbr, requiring = the >>> output files to be regenerated, since they're binary disk dumps. >>>=20 >>> The output files were regenerated with "make rebase"--fixed in >>> ^/head@r319294. >>=20 >> These should not be stored uuencoded. It serves no purpose other >> than bloating the repo and causing spammy commit mails like this one >> where we got a huge tail of garbage output. >=20 > Hi Brooks, > I=E2=80=99m not entirely sure why the files were uuencoded to be = honest. I think that=E2=80=99s a good question for Marcel and some of = the folks at Juniper, since they wrote the tool/tests. Result files used to start off as binary files. uuencoding is a given = in that case. I eventually switched to using hexdump -C, because that = makes it easier to analyze and understand differences. The uuencoding = was kept to remain independent of version control system, file = attributes and end-of-line characteristics of the host machine: nothing = more annoying that checking out textual result files and have test = failures because =E2=80=98\n=E2=80=99 was replaced by =E2=80=98\r\n=E2=80=99= . Even if the files aren=E2=80=99t unencoded, there=E2=80=99s always = someone who treats it as spammy and a tail of garbage. It=E2=80=99s just = a knee-jerk reaction to seeing something that isn=E2=80=99t understood, = I think. As such, there=E2=80=99s no reason to change =E2=80=94 in fact, = changing would be bloating the repo. --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@freebsd.org Thu Jun 1 15:32:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DC10AFF94E; Thu, 1 Jun 2017 15:32:40 +0000 (UTC) (envelope-from asomers@gmail.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 2702C7EF12; Thu, 1 Jun 2017 15:32:40 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yw0-x22b.google.com with SMTP id b68so21630774ywe.3; Thu, 01 Jun 2017 08:32:40 -0700 (PDT) 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:content-transfer-encoding; bh=G1Dp3QLzQWCa4w/uvjLo8LkdmzAKan+et9zn+iUbRLc=; b=QpZLDcKgyWUgQDfuDTd2d3FLrPRrXgHw1F51Po8nnkQOSn61pNhsN4iBlK01ExKfyU glRvyvR3Fe0AOKZuRDrFOZHQDsT7iaPvI8rORdieSgvnV0fIN7HFArcrz8NITZbmPe3H v8Ew50y9TrJ/zr+Doyv2T5gUa/j25ZsNo5PJ+yINPB+QPOsau8EVuoYL6JSsgxCefFzw oS0o0egsrGrEaDQ6nU0jweRWk+oWiTdR+1RTBRFuaZxoR+9LyKQCYROhX1bwzN62Ux77 VB9l6nFlb8uL//eID4ixIIYyEhAd0guCb1K2oRu5GxKaSYf05VDQNKqD2rNET3oehsiQ idVw== 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:content-transfer-encoding; bh=G1Dp3QLzQWCa4w/uvjLo8LkdmzAKan+et9zn+iUbRLc=; b=nZaAXMIni6AU2cFW0JqDYmqtdKDCJeksjh75t9Tj+dPg+9Hgf+1FLxtidKS+SZTdcO QYMWVtaO1HSmUlDO6sfFcA4sSeagEWZHtaknRFBiGtO3+mC6EyVQbnK9UufzBMXiOqMx JZ8xPEknp0yGP1mT1hnO8b4z8L/mYfdb3tIH5rbLdO92vUiQdZq9uXg790GeH21tXU8i CplshH7YQcvMhgGkKyRlB5W0N5u32ZpT9XlQazXu5qTDdPgtn4t4jcAnKuwWlG2e/x9f g6uQgS680HOmtkLgR1MtS4XMoyxn6O2hOdxSgO1KAtgbgJF2h4XXzBbpfPOQmbtRS8bQ lPqA== X-Gm-Message-State: AODbwcAx5zhcdGxRHh36sECO3Nyvjt3yWF3O0x1/1He/Xn2OWZ8rVDb/ lwQw6ULtryQul8nw060OzbZSqFrZnA== X-Received: by 10.129.156.5 with SMTP id t5mr1876512ywg.257.1496331159235; Thu, 01 Jun 2017 08:32:39 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.13.206.199 with HTTP; Thu, 1 Jun 2017 08:32:38 -0700 (PDT) In-Reply-To: <78A8D734-A627-437D-AE63-BA94C543C36B@xcllnt.net> References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> <78A8D734-A627-437D-AE63-BA94C543C36B@xcllnt.net> From: Alan Somers Date: Thu, 1 Jun 2017 09:32:38 -0600 X-Google-Sender-Auth: FpqHpPjDSXq7Jz6EUXQSwn20Ax8 Message-ID: Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests To: Marcel Moolenaar Cc: "Ngie Cooper (yaneurabeya)" , Brooks Davis , Ngie Cooper , Marcel Moolenaar , "Simon J. Gerraty" , 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:32:40 -0000 On Thu, Jun 1, 2017 at 9:11 AM, Marcel Moolenaar wrote: > > On May 31, 2017, at 11:06 PM, Ngie Cooper (yaneurabeya) > wrote: > > > On May 31, 2017, at 10:03 PM, Brooks Davis wrote: > > On Wed, May 31, 2017 at 08:01:12AM +0000, Ngie Cooper wrote: > > Author: ngie > Date: Wed May 31 08:01:12 2017 > New Revision: 319295 > URL: https://svnweb.freebsd.org/changeset/base/319295 > > Log: > Update the usr.bin/mkimg golden test output files after ^/head@r319125 > > ^/head@r319125 changed the location of the backup pmbr, requiring the > output files to be regenerated, since they're binary disk dumps. > > The output files were regenerated with "make rebase"--fixed in > ^/head@r319294. > > > These should not be stored uuencoded. It serves no purpose other > than bloating the repo and causing spammy commit mails like this one > where we got a huge tail of garbage output. > > > Hi Brooks, > I=E2=80=99m not entirely sure why the files were uuencoded to be honest. = I think > that=E2=80=99s a good question for Marcel and some of the folks at Junipe= r, since > they wrote the tool/tests. > > > Result files used to start off as binary files. uuencoding is a given in > that case. I eventually switched to using hexdump -C, because that makes= it > easier to analyze and understand differences. The uuencoding was kept to > remain independent of version control system, file attributes and > end-of-line characteristics of the host machine: nothing more annoying th= at > checking out textual result files and have test failures because =E2=80= =98\n=E2=80=99 was > replaced by =E2=80=98\r\n=E2=80=99. > > Even if the files aren=E2=80=99t unencoded, there=E2=80=99s always someon= e who treats it as > spammy and a tail of garbage. It=E2=80=99s just a knee-jerk reaction to s= eeing > something that isn=E2=80=99t understood, I think. As such, there=E2=80=99= s no reason to > change =E2=80=94 in fact, changing would be bloating the repo. > > -- > Marcel Moolenaar > marcel@xcllnt.net If the files are binary, then why not store them as binary files? Subversion can handle that. That way the tests won't need to decode them, svn clients won't change their line endings, and commit mail won't include their diffs. -Alan From owner-svn-src-all@freebsd.org Thu Jun 1 15:35:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73226AFFA70; Thu, 1 Jun 2017 15:35:38 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44A5D7F0F6; Thu, 1 Jun 2017 15:35:37 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from marcels-mbp.int.brkt.com (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id v51FZZVG069823 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 1 Jun 2017 08:35:36 -0700 (PDT) (envelope-from marcel@xcllnt.net) From: Marcel Moolenaar Message-Id: <7BA69054-D85F-49B5-8EB0-948DFC1A998E@xcllnt.net> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests Date: Thu, 1 Jun 2017 08:35:30 -0700 In-Reply-To: Cc: "Ngie Cooper (yaneurabeya)" , Brooks Davis , Ngie Cooper , Marcel Moolenaar , "Simon J. Gerraty" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" To: Alan Somers References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> <78A8D734-A627-437D-AE63-BA94C543C36B@xcllnt.net> X-Mailer: Apple Mail (2.3273) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.xcllnt.net [50.0.150.214]); Thu, 01 Jun 2017 08:35:36 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:35:38 -0000 > On Jun 1, 2017, at 8:32 AM, Alan Somers wrote: >=20 > On Thu, Jun 1, 2017 at 9:11 AM, Marcel Moolenaar = wrote: >>=20 >> On May 31, 2017, at 11:06 PM, Ngie Cooper (yaneurabeya) >> wrote: >>=20 >>=20 >> On May 31, 2017, at 10:03 PM, Brooks Davis = wrote: >>=20 >> On Wed, May 31, 2017 at 08:01:12AM +0000, Ngie Cooper wrote: >>=20 >> Author: ngie >> Date: Wed May 31 08:01:12 2017 >> New Revision: 319295 >> URL: https://svnweb.freebsd.org/changeset/base/319295 >>=20 >> Log: >> Update the usr.bin/mkimg golden test output files after = ^/head@r319125 >>=20 >> ^/head@r319125 changed the location of the backup pmbr, requiring the >> output files to be regenerated, since they're binary disk dumps. >>=20 >> The output files were regenerated with "make rebase"--fixed in >> ^/head@r319294. >>=20 >>=20 >> These should not be stored uuencoded. It serves no purpose other >> than bloating the repo and causing spammy commit mails like this one >> where we got a huge tail of garbage output. >>=20 >>=20 >> Hi Brooks, >> I=E2=80=99m not entirely sure why the files were uuencoded to be = honest. I think >> that=E2=80=99s a good question for Marcel and some of the folks at = Juniper, since >> they wrote the tool/tests. >>=20 >>=20 >> Result files used to start off as binary files. uuencoding is a = given in >> that case. I eventually switched to using hexdump -C, because that = makes it >> easier to analyze and understand differences. The uuencoding was = kept to >> remain independent of version control system, file attributes and >> end-of-line characteristics of the host machine: nothing more = annoying that >> checking out textual result files and have test failures because = =E2=80=98\n=E2=80=99 was >> replaced by =E2=80=98\r\n=E2=80=99. >>=20 >> Even if the files aren=E2=80=99t unencoded, there=E2=80=99s always = someone who treats it as >> spammy and a tail of garbage. It=E2=80=99s just a knee-jerk reaction = to seeing >> something that isn=E2=80=99t understood, I think. As such, there=E2=80=99= s no reason to >> change =E2=80=94 in fact, changing would be bloating the repo. >>=20 >> -- >> Marcel Moolenaar >> marcel@xcllnt.net >=20 > If the files are binary, then why not store them as binary files? A 100MB image, committed as binary file is 100MB of data. The hexdump -C equivalent is often only a few hundred bytes (due to the many zeroes). The repo bloat argument has grounds for binary files. --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@freebsd.org Thu Jun 1 15:39:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30F80AFFB48; Thu, 1 Jun 2017 15:39:11 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B85D07F2C6; Thu, 1 Jun 2017 15:39:10 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51Fd9dY000236; Thu, 1 Jun 2017 15:39:09 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Fd9YH000232; Thu, 1 Jun 2017 15:39:09 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201706011539.v51Fd9YH000232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Thu, 1 Jun 2017 15:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319435 - in stable/11: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi sys/dev/mps X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:39:11 -0000 Author: slm Date: Thu Jun 1 15:39:09 2017 New Revision: 319435 URL: https://svnweb.freebsd.org/changeset/base/319435 Log: MFC r308217, r308301, r311958, r312437, r318188, r318427, r318679 r308217: Add a fallback to the device mapper logic. We've seen systems in the field that are apparently misconfigured by the manufacturer and cause the mapping logic to fail. The fallback allows drive numbers to be assigned based on the PHY number that they're attached to. Add sysctls and tunables to overrid this new behavior, but they should be considered only necessary for debugging. Reviewed by: imp, smh Obtained from: Netflix MFC after: 3 days Sponsored by: D8403 r308301: Record the LogInfo field when reporting the IOCStatus. Helps in debugging errors. Submitted by: slm Obtained from: Netflix MFC after: 3 days r311958: Print out the number of queues/MSIx vectors. Sponsored by: Netflix r312437: Rework the debug print API. Event printing no longer gets special handling. All of the printing from the tables file now has wrappers so that the handling is cleaner and it's possible to print something out (say, during development) without having to fight the global debug flags. This re-org will also make it easier to have the tables be compiled out at build time if desired. Other than fixing some minor bugs, there are no user-visible changes from this change Sponsored by: Netflix, Inc. Differential Revision: D9238 r318188: Improve error messages during command timeout for the mpr and mps drivers. Sponsored by: Netflix r318427: Add tri-mode support (SAS/SATA/PCIe). This includes NVMe device support and adds support for the following adapters: SAS 3408 SAS 3416 SAS 3508 SAS 3516 SAS 3616 SAS 3708 SAS 3716 Reviewed by: ken, scottl, asomers, mav Approved by: ken, scottl, mav MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D10095 r318679: Fix powerpc compiler error. Approved by: ken Added: stable/11/sys/dev/mpr/mpi/mpi2_pci.h - copied unchanged from r318427, head/sys/dev/mpr/mpi/mpi2_pci.h Modified: stable/11/share/man/man4/mpr.4 stable/11/sys/dev/mpr/mpi/mpi2.h stable/11/sys/dev/mpr/mpi/mpi2_cnfg.h stable/11/sys/dev/mpr/mpi/mpi2_hbd.h stable/11/sys/dev/mpr/mpi/mpi2_history.txt stable/11/sys/dev/mpr/mpi/mpi2_init.h stable/11/sys/dev/mpr/mpi/mpi2_ioc.h stable/11/sys/dev/mpr/mpi/mpi2_tool.h stable/11/sys/dev/mpr/mpr.c stable/11/sys/dev/mpr/mpr_config.c stable/11/sys/dev/mpr/mpr_mapping.c stable/11/sys/dev/mpr/mpr_mapping.h stable/11/sys/dev/mpr/mpr_pci.c stable/11/sys/dev/mpr/mpr_sas.c stable/11/sys/dev/mpr/mpr_sas.h stable/11/sys/dev/mpr/mpr_sas_lsi.c stable/11/sys/dev/mpr/mpr_table.c stable/11/sys/dev/mpr/mpr_table.h stable/11/sys/dev/mpr/mpr_user.c stable/11/sys/dev/mpr/mprvar.h stable/11/sys/dev/mps/mps.c stable/11/sys/dev/mps/mps_sas.c stable/11/sys/dev/mps/mps_sas_lsi.c stable/11/sys/dev/mps/mps_table.c stable/11/sys/dev/mps/mps_table.h stable/11/sys/dev/mps/mpsvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/mpr.4 ============================================================================== --- stable/11/share/man/man4/mpr.4 Thu Jun 1 15:12:51 2017 (r319434) +++ stable/11/share/man/man4/mpr.4 Thu Jun 1 15:39:09 2017 (r319435) @@ -1,8 +1,8 @@ .\" .\" Copyright (c) 2010 Spectra Logic Corporation .\" Copyright (c) 2014 LSI Corp -.\" Copyright (c) 2016 Avago Technologies -.\" Copyright (c) 2016 Broadcom Ltd. +.\" Copyright (c) 2017 Avago Technologies +.\" Copyright (c) 2017 Broadcom Ltd. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -38,12 +38,12 @@ .\" $Id$ .\" $FreeBSD$ .\" -.Dd July 6, 2016 +.Dd May 17, 2017 .Dt MPR 4 .Os .Sh NAME .Nm mpr -.Nd "LSI Fusion-MPT 3 IT/IR 12Gb/s Serial Attached SCSI/SATA driver" +.Nd "LSI Fusion-MPT 3/3.5 IT/IR 12Gb/s Serial Attached SCSI/SATA/PCIe driver" .Sh SYNOPSIS To compile this driver into the kernel, place these lines in the kernel configuration file: @@ -62,8 +62,8 @@ mpr_load="YES" The .Nm driver provides support for Broadcom Ltd./Avago Tech (LSI) -Fusion-MPT 3 IT/IR -.Tn SAS +Fusion-MPT 3/3.5 IT/IR +.Tn SAS/PCIe controllers. .Sh HARDWARE These controllers are supported by the @@ -81,6 +81,24 @@ Broadcom Ltd./Avago Tech (LSI) SAS 3108 (8 Port SAS) Broadcom Ltd./Avago Tech (LSI) SAS 3216 (16 Port SAS) .It Broadcom Ltd./Avago Tech (LSI) SAS 3224 (24 Port SAS) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3316 (16 Port SAS) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3324 (24 Port SAS) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3408 (8 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3416 (16 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3508 (8 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3516 (16 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3616 (16 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3708 (8 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3716 (16 Port SAS/PCIe) .El .Sh CONFIGURATION .Pp @@ -158,6 +176,24 @@ dev.mpr.X.io_cmds_active variable. .Ed .Pp +The current number of free PRP pages is stored in the +dev.mpr.X.prp_pages_free +.Xr sysctl 8 +variable. +PRP pages are used by NVMe devices for I/O transfers, much like Scatter/Gather +lists. +.Pp +The lowest number of free PRP pages seen since boot is stored in the +dev.mpr.X.prp_pages_free_lowwater +.Xr sysctl 8 +variable. +.Pp +The number of times that PRP page allocations have failed since boot is +stored in the +dev.mpr.X.prp_page_alloc_fail +.Xr sysctl 8 +variable. +.Pp To set the maximum number of pages that will be used per I/O for all adapters, set this tunable in .Xr loader.conf 5 : @@ -231,13 +267,13 @@ Send SSU to HDDs, but not to SSDs. Send SSU to both HDDs and SSDs. .El .Pp -To control the feature for a specific adapter, set this tunable value in +To control this feature for a specific adapter, set this tunable value in .Xr loader.conf 5 : .Bd -literal -offset indent dev.mpr.X.enable_ssu .Ed .Pp -The same set of values are valid when setting this tunable for all adapters. +The same set of values are valid as when setting this tunable for all adapters. .Pp SATA disks that take several seconds to spin up and fail the SATA Identify command might not be discovered by the driver. @@ -263,6 +299,45 @@ dev.mpr.X.spinup_wait_time=NNNN tunable. NNNN is the number of seconds to wait for SATA devices to spin up when they fail the initial SATA Identify command. +.Pp +The driver can map devices discovered by the adapter so that target IDs +corresponding to a specific device persist across resets and reboots. +In some cases it is possible for devices to lose their mapped IDs due to +unexpected behavior from certain hardware, such as some types of enclosures. +To overcome this problem, a tunable is provided that will force the driver to +map devices using the Phy number associated with the device. +This feature is not recommended if the topology includes multiple +enclosures/expanders. +If multiple enclosures/expanders are present in the topology, Phy numbers are +repeated, causing all devices at these Phy numbers except the first device to +fail enumeration. +To control this feature for all adapters, set the +.Bd -literal -offset indent +hw.mpr.use_phy_num +.Ed +.Pp +tunable in +.Xr loader.conf 5 +to one of these values: +.Bl -tag -width 6n -offset indent +.It -1 +Only use Phy numbers to map devices and bypass the driver's mapping logic. +.It 0 +Never use Phy numbers to map devices. +.It 1 +Use Phy numbers to map devices, but only if the driver's mapping logic fails +to map the device that is being enumerated. +This is the default value. +.El +.Pp +To control this feature for a specific adapter, set this tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mpr.X.use_phy_num +.Ed +.Pp +The same set of values are valid as when setting this tunable for all adapters. +.Pp .Sh DEBUGGING To enable debugging prints from the .Nm Modified: stable/11/sys/dev/mpr/mpi/mpi2.h ============================================================================== --- stable/11/sys/dev/mpr/mpi/mpi2.h Thu Jun 1 15:12:51 2017 (r319434) +++ stable/11/sys/dev/mpr/mpi/mpi2.h Thu Jun 1 15:39:09 2017 (r319435) @@ -44,7 +44,7 @@ * scatter/gather formats. * Creation Date: June 21, 2006 * - * mpi2.h Version: 02.00.42 + * mpi2.h Version: 02.00.46 * * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25 * prefix are for use only on MPI v2.5 products, and must not be used @@ -132,7 +132,8 @@ * Bumped MPI2_HEADER_VERSION_UNIT. * 03-16-15 02.00.37 Updated for MPI v2.6. * Bumped MPI2_HEADER_VERSION_UNIT. - * Added Scratchpad registers to + * Added Scratchpad registers and + * AtomicRequestDescriptorPost register to * MPI2_SYSTEM_INTERFACE_REGS. * Added MPI2_DIAG_SBR_RELOAD. * Added MPI2_IOCSTATUS_INSUFFICIENT_POWER. @@ -142,6 +143,14 @@ * Added V7 HostDiagnostic register defines * 12-15-15 02.00.41 Bumped MPI_HEADER_VERSION_UNIT * 01-01-16 02.00.42 Bumped MPI_HEADER_VERSION_UNIT + * 04-05-16 02.00.43 Modified MPI26_DIAG_BOOT_DEVICE_SELECT defines + * to be unique within first 32 characters. + * Removed AHCI support. + * Removed SOP support. + * Bumped MPI2_HEADER_VERSION_UNIT. + * 04-10-16 02.00.44 Bumped MPI2_HEADER_VERSION_UNIT. + * 07-06-16 02.00.45 Bumped MPI2_HEADER_VERSION_UNIT. + * 09-02-16 02.00.46 Bumped MPI2_HEADER_VERSION_UNIT. * -------------------------------------------------------------------------- */ @@ -185,7 +194,7 @@ /* Unit and Dev versioning for this MPI header set */ -#define MPI2_HEADER_VERSION_UNIT (0x2A) +#define MPI2_HEADER_VERSION_UNIT (0x2E) #define MPI2_HEADER_VERSION_DEV (0x00) #define MPI2_HEADER_VERSION_UNIT_MASK (0xFF00) #define MPI2_HEADER_VERSION_UNIT_SHIFT (8) @@ -245,7 +254,8 @@ typedef volatile struct _MPI2_SYSTEM_INTERFACE_REGS U32 Scratchpad[4]; /* 0xB0 */ U32 RequestDescriptorPostLow; /* 0xC0 */ U32 RequestDescriptorPostHigh; /* 0xC4 */ - U32 Reserved7[14]; /* 0xC8 */ + U32 AtomicRequestDescriptorPost;/* 0xC8 */ /* MPI v2.6 and later; reserved in earlier versions */ + U32 Reserved7[13]; /* 0xCC */ } MPI2_SYSTEM_INTERFACE_REGS, MPI2_POINTER PTR_MPI2_SYSTEM_INTERFACE_REGS, Mpi2SystemInterfaceRegs_t, MPI2_POINTER pMpi2SystemInterfaceRegs_t; @@ -293,10 +303,11 @@ typedef volatile struct _MPI2_SYSTEM_INTERFACE_REGS #define MPI2_DIAG_BOOT_DEVICE_SELECT_HCDW (0x00000800) /* Defines for V7A/V7R HostDiagnostic Register */ -#define MPI26_DIAG_BOOT_DEVICE_SELECT_FLASH64 (0x00000000) -#define MPI26_DIAG_BOOT_DEVICE_SELECT_HCDW64 (0x00000800) -#define MPI26_DIAG_BOOT_DEVICE_SELECT_FLASH32 (0x00001000) -#define MPI26_DIAG_BOOT_DEVICE_SELECT_HCDW32 (0x00001800) +#define MPI26_DIAG_BOOT_DEVICE_SEL_64FLASH (0x00000000) +#define MPI26_DIAG_BOOT_DEVICE_SEL_64HCDW (0x00000800) +#define MPI26_DIAG_BOOT_DEVICE_SEL_32FLASH (0x00001000) +#define MPI26_DIAG_BOOT_DEVICE_SEL_32HCDW (0x00001800) + #define MPI2_DIAG_CLEAR_FLASH_BAD_SIG (0x00000400) #define MPI2_DIAG_FORCE_HCB_ON_RESET (0x00000200) #define MPI2_DIAG_HCB_MODE (0x00000100) @@ -379,6 +390,7 @@ typedef volatile struct _MPI2_SYSTEM_INTERFACE_REGS */ #define MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET (0x000000C0) #define MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET (0x000000C4) +#define MPI26_ATOMIC_REQUEST_DESCRIPTOR_POST_OFFSET (0x000000C8) /* Hard Reset delay timings */ @@ -415,6 +427,7 @@ typedef struct _MPI2_DEFAULT_REQUEST_DESCRIPTOR #define MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE (0x08) #define MPI2_REQ_DESCRIPT_FLAGS_RAID_ACCELERATOR (0x0A) #define MPI25_REQ_DESCRIPT_FLAGS_FAST_PATH_SCSI_IO (0x0C) +#define MPI26_REQ_DESCRIPT_FLAGS_PCIE_ENCAPSULATED (0x10) #define MPI2_REQ_DESCRIPT_FLAGS_IOC_FIFO_MARKER (0x01) @@ -482,6 +495,14 @@ typedef MPI2_SCSI_IO_REQUEST_DESCRIPTOR MPI2_POINTER pMpi25FastPathSCSIIORequestDescriptor_t; +/* PCIe Encapsulated Request Descriptor */ +typedef MPI2_SCSI_IO_REQUEST_DESCRIPTOR + MPI26_PCIE_ENCAPSULATED_REQUEST_DESCRIPTOR, + MPI2_POINTER PTR_MPI26_PCIE_ENCAPSULATED_REQUEST_DESCRIPTOR, + Mpi26PCIeEncapsulatedRequestDescriptor_t, + MPI2_POINTER pMpi26PCIeEncapsulatedRequestDescriptor_t; + + /* union of Request Descriptors */ typedef union _MPI2_REQUEST_DESCRIPTOR_UNION { @@ -491,12 +512,36 @@ typedef union _MPI2_REQUEST_DESCRIPTOR_UNION MPI2_SCSI_TARGET_REQUEST_DESCRIPTOR SCSITarget; MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR RAIDAccelerator; MPI25_FP_SCSI_IO_REQUEST_DESCRIPTOR FastPathSCSIIO; + MPI26_PCIE_ENCAPSULATED_REQUEST_DESCRIPTOR PCIeEncapsulated; U64 Words; } MPI2_REQUEST_DESCRIPTOR_UNION, MPI2_POINTER PTR_MPI2_REQUEST_DESCRIPTOR_UNION, Mpi2RequestDescriptorUnion_t, MPI2_POINTER pMpi2RequestDescriptorUnion_t; +/* Atomic Request Descriptors */ +/* + * All Atomic Request Descriptors have the same format, so the following + * structure is used for all Atomic Request Descriptors: + * Atomic Default Request Descriptor + * Atomic High Priority Request Descriptor + * Atomic SCSI IO Request Descriptor + * Atomic SCSI Target Request Descriptor + * Atomic RAID Accelerator Request Descriptor + * Atomic Fast Path SCSI IO Request Descriptor + * Atomic PCIe Encapsulated Request Descriptor + */ + +/* Atomic Request Descriptor */ +typedef struct _MPI26_ATOMIC_REQUEST_DESCRIPTOR +{ + U8 RequestFlags; /* 0x00 */ + U8 MSIxIndex; /* 0x01 */ + U16 SMID; /* 0x02 */ +} MPI26_ATOMIC_REQUEST_DESCRIPTOR, + MPI2_POINTER PTR_MPI26_ATOMIC_REQUEST_DESCRIPTOR, + Mpi26AtomicRequestDescriptor_t, MPI2_POINTER pMpi26AtomicRequestDescriptor_t; + /* for the RequestFlags field, use the same defines as MPI2_DEFAULT_REQUEST_DESCRIPTOR */ @@ -520,6 +565,7 @@ typedef struct _MPI2_DEFAULT_REPLY_DESCRIPTOR #define MPI2_RPY_DESCRIPT_FLAGS_TARGET_COMMAND_BUFFER (0x03) #define MPI2_RPY_DESCRIPT_FLAGS_RAID_ACCELERATOR_SUCCESS (0x05) #define MPI25_RPY_DESCRIPT_FLAGS_FAST_PATH_SCSI_IO_SUCCESS (0x06) +#define MPI26_RPY_DESCRIPT_FLAGS_PCIE_ENCAPSULATED_SUCCESS (0x08) #define MPI2_RPY_DESCRIPT_FLAGS_UNUSED (0x0F) /* values for marking a reply descriptor as unused */ @@ -607,6 +653,14 @@ typedef MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR MPI2_POINTER pMpi25FastPathSCSIIOSuccessReplyDescriptor_t; +/* PCIe Encapsulated Success Reply Descriptor */ +typedef MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR + MPI26_PCIE_ENCAPSULATED_SUCCESS_REPLY_DESCRIPTOR, + MPI2_POINTER PTR_MPI26_PCIE_ENCAPSULATED_SUCCESS_REPLY_DESCRIPTOR, + Mpi26PCIeEncapsulatedSuccessReplyDescriptor_t, + MPI2_POINTER pMpi26PCIeEncapsulatedSuccessReplyDescriptor_t; + + /* union of Reply Descriptors */ typedef union _MPI2_REPLY_DESCRIPTORS_UNION { @@ -617,6 +671,7 @@ typedef union _MPI2_REPLY_DESCRIPTORS_UNION MPI2_TARGET_COMMAND_BUFFER_REPLY_DESCRIPTOR TargetCommandBuffer; MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR RAIDAcceleratorSuccess; MPI25_FP_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR FastPathSCSIIOSuccess; + MPI26_PCIE_ENCAPSULATED_SUCCESS_REPLY_DESCRIPTOR PCIeEncapsulatedSuccess; U64 Words; } MPI2_REPLY_DESCRIPTORS_UNION, MPI2_POINTER PTR_MPI2_REPLY_DESCRIPTORS_UNION, Mpi2ReplyDescriptorsUnion_t, MPI2_POINTER pMpi2ReplyDescriptorsUnion_t; @@ -659,6 +714,7 @@ typedef union _MPI2_REPLY_DESCRIPTORS_UNION #define MPI2_FUNCTION_HOST_BASED_DISCOVERY_ACTION (0x2F) /* Host Based Discovery Action */ #define MPI2_FUNCTION_PWR_MGMT_CONTROL (0x30) /* Power Management Control */ #define MPI2_FUNCTION_SEND_HOST_MESSAGE (0x31) /* Send Host Message */ +#define MPI2_FUNCTION_NVME_ENCAPSULATED (0x33) /* NVMe Encapsulated (MPI v2.6) */ #define MPI2_FUNCTION_MIN_PRODUCT_SPECIFIC (0xF0) /* beginning of product-specific range */ #define MPI2_FUNCTION_MAX_PRODUCT_SPECIFIC (0xFF) /* end of product-specific range */ @@ -1232,6 +1288,8 @@ typedef union _MPI25_SGE_IO_UNION #define MPI26_IEEE_SGE_FLAGS_NSF_MASK (0x1C) #define MPI26_IEEE_SGE_FLAGS_NSF_MPI_IEEE (0x00) +#define MPI26_IEEE_SGE_FLAGS_NSF_NVME_PRP (0x08) +#define MPI26_IEEE_SGE_FLAGS_NSF_NVME_SGL (0x10) /* Data Location Address Space */ Modified: stable/11/sys/dev/mpr/mpi/mpi2_cnfg.h ============================================================================== --- stable/11/sys/dev/mpr/mpi/mpi2_cnfg.h Thu Jun 1 15:12:51 2017 (r319434) +++ stable/11/sys/dev/mpr/mpi/mpi2_cnfg.h Thu Jun 1 15:39:09 2017 (r319435) @@ -42,7 +42,7 @@ * Title: MPI Configuration messages and pages * Creation Date: November 10, 2006 * - * mpi2_cnfg.h Version: 02.00.35 + * mpi2_cnfg.h Version: 02.00.39 * * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25 * prefix are for use only on MPI v2.5 products, and must not be used @@ -223,9 +223,38 @@ * Flags field to IO Unit Page 7. * Added IO Unit Page 11. * Added new SAS Phy Event codes + * Added PCIe configuration pages. + * 03-19-15 02.00.32 Fixed PCIe Link Config page structure names to be + * unique in first 32 characters. * 05-25-15 02.00.33 Added more defines for the BiosOptions field of * MPI2_CONFIG_PAGE_BIOS_1. + * 08-25-15 02.00.34 Added PCIe Device Page 2 SGL format capability. * 12-18-15 02.00.35 Added SATADeviceWaitTime to SAS IO Unit Page 4. + * 01-21-16 02.00.36 Added/modified MPI2_MFGPAGE_DEVID_SAS defines. + * Added Link field to PCIe Link Pages + * Added EnclosureLevel and ConnectorName to PCIe + * Device Page 0. + * Added define for PCIE IoUnit page 1 max rate shift. + * Added comment for reserved ExtPageTypes. + * Added SAS 4 22.5 gbs speed support. + * Added PCIe 4 16.0 GT/sec speec support. + * Removed AHCI support. + * Removed SOP support. + * Added NegotiatedLinkRate and NegotiatedPortWidth to + * PCIe device page 0. + * 04-10-16 02.00.37 Fixed MPI2_MFGPAGE_DEVID_SAS3616/3708 defines + * 07-01-16 02.00.38 Added Manufacturing page 7 Connector types. + * Changed declaration of ConnectorName in PCIe DevicePage0 + * to match SAS DevicePage 0. + * Added SATADeviceWaitTime to IO Unit Page 11. + * Added MPI26_MFGPAGE_DEVID_SAS4008 + * Added x16 PCIe width to IO Unit Page 7 + * Added LINKFLAGS to control SRIS in PCIe IO Unit page 1 + * phy data. + * Added InitStatus to PCIe IO Unit Page 1 header. + * 09-01-16 02.00.39 Added MPI26_CONFIG_PAGE_ENCLOSURE_0 and related defines. + * Added MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE and + * MPI26_ENCLOS_PGAD_FORM_HANDLE page address formats. * -------------------------------------------------------------------------- */ @@ -310,6 +339,12 @@ typedef union _MPI2_CONFIG_EXT_PAGE_HEADER_UNION #define MPI2_CONFIG_EXTPAGETYPE_SAS_PORT (0x18) #define MPI2_CONFIG_EXTPAGETYPE_ETHERNET (0x19) #define MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING (0x1A) +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_IO_UNIT (0x1B) /* MPI v2.6 and later */ +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_SWITCH (0x1C) /* MPI v2.6 and later */ +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_DEVICE (0x1D) /* MPI v2.6 and later */ +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_LINK (0x1E) /* MPI v2.6 and later */ +/* Product specific reserved values 0xE0 - 0xEF */ +/* Vendor specific reserved values 0xF0 - 0xFF */ /***************************************************************************** @@ -377,7 +412,13 @@ typedef union _MPI2_CONFIG_EXT_PAGE_HEADER_UNION #define MPI2_SAS_ENCLOS_PGAD_HANDLE_MASK (0x0000FFFF) +/* Enclosure PageAddress format */ +#define MPI26_ENCLOS_PGAD_FORM_MASK (0xF0000000) +#define MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE (0x00000000) +#define MPI26_ENCLOS_PGAD_FORM_HANDLE (0x10000000) +#define MPI26_ENCLOS_PGAD_HANDLE_MASK (0x0000FFFF) + /* RAID Configuration PageAddress format */ #define MPI2_RAID_PGAD_FORM_MASK (0xF0000000) #define MPI2_RAID_PGAD_FORM_GET_NEXT_CONFIGNUM (0x00000000) @@ -403,6 +444,33 @@ typedef union _MPI2_CONFIG_EXT_PAGE_HEADER_UNION #define MPI2_ETHERNET_PGAD_IF_NUMBER_MASK (0x000000FF) +/* PCIe Switch PageAddress format */ +#define MPI26_PCIE_SWITCH_PGAD_FORM_MASK (0xF0000000) +#define MPI26_PCIE_SWITCH_PGAD_FORM_GET_NEXT_HNDL (0x00000000) +#define MPI26_PCIE_SWITCH_PGAD_FORM_HNDL_PORTNUM (0x10000000) +#define MPI26_PCIE_SWITCH_EXPAND_PGAD_FORM_HNDL (0x20000000) + +#define MPI26_PCIE_SWITCH_PGAD_HANDLE_MASK (0x0000FFFF) +#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_MASK (0x00FF0000) +#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_SHIFT (16) + + +/* PCIe Device PageAddress format */ +#define MPI26_PCIE_DEVICE_PGAD_FORM_MASK (0xF0000000) +#define MPI26_PCIE_DEVICE_PGAD_FORM_GET_NEXT_HANDLE (0x00000000) +#define MPI26_PCIE_DEVICE_PGAD_FORM_HANDLE (0x20000000) + +#define MPI26_PCIE_DEVICE_PGAD_HANDLE_MASK (0x0000FFFF) + +/* PCIe Link PageAddress format */ +#define MPI26_PCIE_LINK_PGAD_FORM_MASK (0xF0000000) +#define MPI26_PCIE_LINK_PGAD_FORM_GET_NEXT_LINK (0x00000000) +#define MPI26_PCIE_LINK_PGAD_FORM_LINK_NUM (0x10000000) + +#define MPI26_PCIE_DEVICE_PGAD_LINKNUM_MASK (0x000000FF) + + + /**************************************************************************** * Configuration messages ****************************************************************************/ @@ -518,6 +586,20 @@ typedef struct _MPI2_CONFIG_REPLY #define MPI26_MFGPAGE_DEVID_SAS3324_3 (0x00C2) #define MPI26_MFGPAGE_DEVID_SAS3324_4 (0x00C3) +#define MPI26_MFGPAGE_DEVID_SAS3516 (0x00AA) +#define MPI26_MFGPAGE_DEVID_SAS3516_1 (0x00AB) +#define MPI26_MFGPAGE_DEVID_SAS3416 (0x00AC) +#define MPI26_MFGPAGE_DEVID_SAS3508 (0x00AD) +#define MPI26_MFGPAGE_DEVID_SAS3508_1 (0x00AE) +#define MPI26_MFGPAGE_DEVID_SAS3408 (0x00AF) + +#define MPI26_MFGPAGE_DEVID_SAS3716 (0x00D0) +#define MPI26_MFGPAGE_DEVID_SAS3616 (0x00D1) +#define MPI26_MFGPAGE_DEVID_SAS3708 (0x00D2) + +#define MPI26_MFGPAGE_DEVID_SAS4008 (0x00A1) + + /* Manufacturing Page 0 */ typedef struct _MPI2_CONFIG_PAGE_MAN_0 @@ -755,6 +837,12 @@ typedef struct _MPI2_MANPAGE7_CONNECTOR_INFO #define MPI2_MANPAGE7_PINOUT_SFF_8644_8X (0x0B) #define MPI2_MANPAGE7_PINOUT_SFF_8644_16X (0x0C) #define MPI2_MANPAGE7_PINOUT_SFF_8436 (0x0D) +#define MPI2_MANPAGE7_PINOUT_SFF_8088_A (0x0E) +#define MPI2_MANPAGE7_PINOUT_SFF_8643_16i (0x0F) +#define MPI2_MANPAGE7_PINOUT_SFF_8654_4i (0x10) +#define MPI2_MANPAGE7_PINOUT_SFF_8654_8i (0x11) +#define MPI2_MANPAGE7_PINOUT_SFF_8611_4i (0x12) +#define MPI2_MANPAGE7_PINOUT_SFF_8611_8i (0x13) /* defines for the Location field */ #define MPI2_MANPAGE7_LOCATION_UNKNOWN (0x01) @@ -1017,11 +1105,13 @@ typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_7 #define MPI2_IOUNITPAGE7_PCIE_WIDTH_X2 (0x02) #define MPI2_IOUNITPAGE7_PCIE_WIDTH_X4 (0x04) #define MPI2_IOUNITPAGE7_PCIE_WIDTH_X8 (0x08) +#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X16 (0x10) /* defines for IO Unit Page 7 PCIeSpeed field */ #define MPI2_IOUNITPAGE7_PCIE_SPEED_2_5_GBPS (0x00) #define MPI2_IOUNITPAGE7_PCIE_SPEED_5_0_GBPS (0x01) #define MPI2_IOUNITPAGE7_PCIE_SPEED_8_0_GBPS (0x02) +#define MPI2_IOUNITPAGE7_PCIE_SPEED_16_0_GBPS (0x03) /* defines for IO Unit Page 7 ProcessorState field */ #define MPI2_IOUNITPAGE7_PSTATE_MASK_SECOND (0x0000000F) @@ -1079,6 +1169,7 @@ typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_7 /* defines for IO Unit Page 7 Flags field */ #define MPI2_IOUNITPAGE7_FLAG_CABLE_POWER_EXC (0x01) + /* IO Unit Page 8 */ #define MPI2_IOUNIT8_NUM_THRESHOLDS (4) @@ -1228,7 +1319,7 @@ typedef struct _MPI26_CONFIG_PAGE_IO_UNIT_11 U32 Reserved3; /* 0x1C */ U32 Reserved4; /* 0x20 */ U8 BootDeviceWaitTime; /* 0x24 */ - U8 Reserved5; /* 0x25 */ + U8 SATADeviceWaitTime; /* 0x25 */ U16 Reserved6; /* 0x26 */ U8 NumPhys; /* 0x28 */ U8 PEInitialSpinupDelay; /* 0x29 */ @@ -1249,9 +1340,6 @@ typedef struct _MPI26_CONFIG_PAGE_IO_UNIT_11 - - - /**************************************************************************** * IOC Config Pages ****************************************************************************/ @@ -1968,6 +2056,7 @@ typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_1 #define MPI2_SAS_NEG_LINK_RATE_3_0 (0x09) #define MPI2_SAS_NEG_LINK_RATE_6_0 (0x0A) #define MPI25_SAS_NEG_LINK_RATE_12_0 (0x0B) +#define MPI26_SAS_NEG_LINK_RATE_22_5 (0x0C) /* values for AttachedPhyInfo fields */ @@ -2035,12 +2124,14 @@ typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_1 #define MPI2_SAS_PRATE_MAX_RATE_3_0 (0x90) #define MPI2_SAS_PRATE_MAX_RATE_6_0 (0xA0) #define MPI25_SAS_PRATE_MAX_RATE_12_0 (0xB0) +#define MPI26_SAS_PRATE_MAX_RATE_22_5 (0xC0) #define MPI2_SAS_PRATE_MIN_RATE_MASK (0x0F) #define MPI2_SAS_PRATE_MIN_RATE_NOT_PROGRAMMABLE (0x00) #define MPI2_SAS_PRATE_MIN_RATE_1_5 (0x08) #define MPI2_SAS_PRATE_MIN_RATE_3_0 (0x09) #define MPI2_SAS_PRATE_MIN_RATE_6_0 (0x0A) #define MPI25_SAS_PRATE_MIN_RATE_12_0 (0x0B) +#define MPI26_SAS_PRATE_MIN_RATE_22_5 (0x0C) /* values for SAS HwLinkRate fields */ @@ -2049,11 +2140,13 @@ typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_1 #define MPI2_SAS_HWRATE_MAX_RATE_3_0 (0x90) #define MPI2_SAS_HWRATE_MAX_RATE_6_0 (0xA0) #define MPI25_SAS_HWRATE_MAX_RATE_12_0 (0xB0) +#define MPI26_SAS_HWRATE_MAX_RATE_22_5 (0xC0) #define MPI2_SAS_HWRATE_MIN_RATE_MASK (0x0F) #define MPI2_SAS_HWRATE_MIN_RATE_1_5 (0x08) #define MPI2_SAS_HWRATE_MIN_RATE_3_0 (0x09) #define MPI2_SAS_HWRATE_MIN_RATE_6_0 (0x0A) #define MPI25_SAS_HWRATE_MIN_RATE_12_0 (0x0B) +#define MPI26_SAS_HWRATE_MIN_RATE_22_5 (0x0C) @@ -2227,11 +2320,13 @@ typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_1 #define MPI2_SASIOUNIT1_MAX_RATE_3_0 (0x90) #define MPI2_SASIOUNIT1_MAX_RATE_6_0 (0xA0) #define MPI25_SASIOUNIT1_MAX_RATE_12_0 (0xB0) +#define MPI26_SASIOUNIT1_MAX_RATE_22_5 (0xC0) #define MPI2_SASIOUNIT1_MIN_RATE_MASK (0x0F) #define MPI2_SASIOUNIT1_MIN_RATE_1_5 (0x08) #define MPI2_SASIOUNIT1_MIN_RATE_3_0 (0x09) #define MPI2_SASIOUNIT1_MIN_RATE_6_0 (0x0A) #define MPI25_SASIOUNIT1_MIN_RATE_12_0 (0x0B) +#define MPI26_SASIOUNIT1_MIN_RATE_22_5 (0x0C) /* see mpi2_sas.h for values for SAS IO Unit Page 1 ControllerPhyDeviceInfo values */ @@ -2718,7 +2813,6 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 #define MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID (0x0002) #define MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT (0x0001) - /* SAS Device Page 1 */ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_1 @@ -2885,7 +2979,6 @@ typedef struct _MPI2_SASPHY3_PHY_EVENT_CONFIG #define MPI2_SASPHY3_EVENT_CODE_HOTPLUG_TIMEOUT (0xD0) #define MPI2_SASPHY3_EVENT_CODE_MISALIGNED_MUX_PRIMITIVE (0xD1) #define MPI2_SASPHY3_EVENT_CODE_RX_AIP (0xD2) - /* Following codes are product specific and in MPI v2.6 and later */ #define MPI2_SASPHY3_EVENT_CODE_LCARB_WAIT_TIME (0xD3) #define MPI2_SASPHY3_EVENT_CODE_RCVD_CONN_RESP_WAIT_TIME (0xD4) @@ -2898,7 +2991,6 @@ typedef struct _MPI2_SASPHY3_PHY_EVENT_CONFIG #define MPI2_SASPHY3_EVENT_CODE_SATA_RX_START_RECEIVE (0xDB) #define MPI2_SASPHY3_EVENT_CODE_SMP_RX_START_RECEIVE (0xDC) - /* values for the CounterType field */ #define MPI2_SASPHY3_COUNTER_TYPE_WRAPPING (0x00) #define MPI2_SASPHY3_COUNTER_TYPE_SATURATING (0x01) @@ -2989,7 +3081,7 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_PORT_0 * SAS Enclosure Config Pages ****************************************************************************/ -/* SAS Enclosure Page 0 */ +/* SAS Enclosure Page 0, Enclosure Page 0 */ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 { @@ -3007,7 +3099,10 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 U32 Reserved4; /* 0x24 */ } MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0, MPI2_POINTER PTR_MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0, - Mpi2SasEnclosurePage0_t, MPI2_POINTER pMpi2SasEnclosurePage0_t; + Mpi2SasEnclosurePage0_t, MPI2_POINTER pMpi2SasEnclosurePage0_t, + MPI26_CONFIG_PAGE_ENCLOSURE_0, + MPI2_POINTER PTR_MPI26_CONFIG_PAGE_ENCLOSURE_0, + Mpi26EnclosurePage0_t, MPI2_POINTER pMpi26EnclosurePage0_t; #define MPI2_SASENCLOSURE0_PAGEVERSION (0x04) @@ -3021,7 +3116,18 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 #define MPI2_SAS_ENCLS0_FLAGS_MNG_SES_ENCLOSURE (0x0004) #define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_GPIO (0x0005) +#define MPI26_ENCLOSURE0_PAGEVERSION (0x04) +/* Values for Enclosure Page 0 Flags field */ +#define MPI26_ENCLS0_FLAGS_ENCL_LEVEL_VALID (0x0010) +#define MPI26_ENCLS0_FLAGS_MNG_MASK (0x000F) +#define MPI26_ENCLS0_FLAGS_MNG_UNKNOWN (0x0000) +#define MPI26_ENCLS0_FLAGS_MNG_IOC_SES (0x0001) +#define MPI26_ENCLS0_FLAGS_MNG_IOC_SGPIO (0x0002) +#define MPI26_ENCLS0_FLAGS_MNG_EXP_SGPIO (0x0003) +#define MPI26_ENCLS0_FLAGS_MNG_SES_ENCLOSURE (0x0004) +#define MPI26_ENCLS0_FLAGS_MNG_IOC_GPIO (0x0005) + /**************************************************************************** * Log Config Page ****************************************************************************/ @@ -3299,6 +3405,425 @@ typedef struct _MPI2_CONFIG_PAGE_EXT_MAN_PS Mpi2ExtManufacturingPagePS_t, MPI2_POINTER pMpi2ExtManufacturingPagePS_t; /* PageVersion should be provided by product-specific code */ + + +/**************************************************************************** +* values for fields used by several types of PCIe Config Pages +****************************************************************************/ + +/* values for NegotiatedLinkRates fields */ +#define MPI26_PCIE_NEG_LINK_RATE_MASK_PHYSICAL (0x0F) +/* link rates used for Negotiated Physical Link Rate */ +#define MPI26_PCIE_NEG_LINK_RATE_UNKNOWN (0x00) +#define MPI26_PCIE_NEG_LINK_RATE_PHY_DISABLED (0x01) +#define MPI26_PCIE_NEG_LINK_RATE_2_5 (0x02) +#define MPI26_PCIE_NEG_LINK_RATE_5_0 (0x03) +#define MPI26_PCIE_NEG_LINK_RATE_8_0 (0x04) +#define MPI26_PCIE_NEG_LINK_RATE_16_0 (0x05) + + +/**************************************************************************** +* PCIe IO Unit Config Pages (MPI v2.6 and later) +****************************************************************************/ + +/* PCIe IO Unit Page 0 */ + +typedef struct _MPI26_PCIE_IO_UNIT0_PHY_DATA +{ + U8 Link; /* 0x00 */ + U8 LinkFlags; /* 0x01 */ + U8 PhyFlags; /* 0x02 */ + U8 NegotiatedLinkRate; /* 0x03 */ + U32 ControllerPhyDeviceInfo;/* 0x04 */ + U16 AttachedDevHandle; /* 0x08 */ + U16 ControllerDevHandle; /* 0x0A */ + U32 EnumerationStatus; /* 0x0C */ + U32 Reserved1; /* 0x10 */ +} MPI26_PCIE_IO_UNIT0_PHY_DATA, MPI2_POINTER PTR_MPI26_PCIE_IO_UNIT0_PHY_DATA, + Mpi26PCIeIOUnit0PhyData_t, MPI2_POINTER pMpi26PCIeIOUnit0PhyData_t; + +/* + * Host code (drivers, BIOS, utilities, etc.) should leave this define set to + * one and check the value returned for NumPhys at runtime. + */ +#ifndef MPI26_PCIE_IOUNIT0_PHY_MAX +#define MPI26_PCIE_IOUNIT0_PHY_MAX (1) +#endif + +typedef struct _MPI26_CONFIG_PAGE_PIOUNIT_0 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U32 Reserved1; /* 0x08 */ + U8 NumPhys; /* 0x0C */ + U8 InitStatus; /* 0x0D */ + U16 Reserved3; /* 0x0E */ + MPI26_PCIE_IO_UNIT0_PHY_DATA PhyData[MPI26_PCIE_IOUNIT0_PHY_MAX]; /* 0x10 */ +} MPI26_CONFIG_PAGE_PIOUNIT_0, + MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PIOUNIT_0, + Mpi26PCIeIOUnitPage0_t, MPI2_POINTER pMpi26PCIeIOUnitPage0_t; + +#define MPI26_PCIEIOUNITPAGE0_PAGEVERSION (0x00) + +/* values for PCIe IO Unit Page 0 LinkFlags */ +#define MPI26_PCIEIOUNIT0_LINKFLAGS_ENUMERATION_IN_PROGRESS (0x08) + +/* values for PCIe IO Unit Page 0 PhyFlags */ +#define MPI26_PCIEIOUNIT0_PHYFLAGS_PHY_DISABLED (0x08) + +/* use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */ + +/* see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo values */ + +/* values for PCIe IO Unit Page 0 EnumerationStatus */ +#define MPI26_PCIEIOUNIT0_ES_MAX_SWITCHES_EXCEEDED (0x40000000) +#define MPI26_PCIEIOUNIT0_ES_MAX_DEVICES_EXCEEDED (0x20000000) + + +/* PCIe IO Unit Page 1 */ + +typedef struct _MPI26_PCIE_IO_UNIT1_PHY_DATA +{ + U8 Link; /* 0x00 */ + U8 LinkFlags; /* 0x01 */ + U8 PhyFlags; /* 0x02 */ + U8 MaxMinLinkRate; /* 0x03 */ + U32 ControllerPhyDeviceInfo; /* 0x04 */ + U32 Reserved1; /* 0x08 */ +} MPI26_PCIE_IO_UNIT1_PHY_DATA, MPI2_POINTER PTR_MPI26_PCIE_IO_UNIT1_PHY_DATA, + Mpi26PCIeIOUnit1PhyData_t, MPI2_POINTER pMpi26PCIeIOUnit1PhyData_t; + +/* values for LinkFlags */ +#define MPI26_PCIEIOUNIT1_LINKFLAGS_DIS_SRIS (0x00) +#define MPI26_PCIEIOUNIT1_LINKFLAGS_EN_SRIS (0x01) + +/* + * Host code (drivers, BIOS, utilities, etc.) should leave this define set to + * one and check the value returned for NumPhys at runtime. + */ +#ifndef MPI26_PCIE_IOUNIT1_PHY_MAX +#define MPI26_PCIE_IOUNIT1_PHY_MAX (1) +#endif + +typedef struct _MPI26_CONFIG_PAGE_PIOUNIT_1 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U16 ControlFlags; /* 0x08 */ + U16 Reserved; /* 0x0A */ + U16 AdditionalControlFlags; /* 0x0C */ + U16 NVMeMaxQueueDepth; /* 0x0E */ + U8 NumPhys; /* 0x10 */ + U8 Reserved1; /* 0x11 */ + U16 Reserved2; /* 0x12 */ + MPI26_PCIE_IO_UNIT1_PHY_DATA PhyData[MPI26_PCIE_IOUNIT1_PHY_MAX];/* 0x14 */ +} MPI26_CONFIG_PAGE_PIOUNIT_1, + MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PIOUNIT_1, + Mpi26PCIeIOUnitPage1_t, MPI2_POINTER pMpi26PCIeIOUnitPage1_t; + +#define MPI26_PCIEIOUNITPAGE1_PAGEVERSION (0x00) + +/* values for PCIe IO Unit Page 1 PhyFlags */ +#define MPI26_PCIEIOUNIT1_PHYFLAGS_PHY_DISABLE (0x08) +#define MPI26_PCIEIOUNIT1_PHYFLAGS_ENDPOINT_ONLY (0x01) + +/* values for PCIe IO Unit Page 1 MaxMinLinkRate */ +#define MPI26_PCIEIOUNIT1_MAX_RATE_MASK (0xF0) +#define MPI26_PCIEIOUNIT1_MAX_RATE_SHIFT (4) +#define MPI26_PCIEIOUNIT1_MAX_RATE_2_5 (0x20) +#define MPI26_PCIEIOUNIT1_MAX_RATE_5_0 (0x30) +#define MPI26_PCIEIOUNIT1_MAX_RATE_8_0 (0x40) +#define MPI26_PCIEIOUNIT1_MAX_RATE_16_0 (0x50) + +/* see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo values */ + + +/**************************************************************************** +* PCIe Switch Config Pages (MPI v2.6 and later) +****************************************************************************/ + +/* PCIe Switch Page 0 */ + +typedef struct _MPI26_CONFIG_PAGE_PSWITCH_0 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U8 PhysicalPort; /* 0x08 */ + U8 Reserved1; /* 0x09 */ + U16 Reserved2; /* 0x0A */ + U16 DevHandle; /* 0x0C */ + U16 ParentDevHandle; /* 0x0E */ + U8 NumPorts; /* 0x10 */ + U8 PCIeLevel; /* 0x11 */ + U16 Reserved3; /* 0x12 */ + U32 Reserved4; /* 0x14 */ + U32 Reserved5; /* 0x18 */ + U32 Reserved6; /* 0x1C */ +} MPI26_CONFIG_PAGE_PSWITCH_0, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PSWITCH_0, + Mpi26PCIeSwitchPage0_t, MPI2_POINTER pMpi26PCIeSwitchPage0_t; + +#define MPI26_PCIESWITCH0_PAGEVERSION (0x00) + + +/* PCIe Switch Page 1 */ + +typedef struct _MPI26_CONFIG_PAGE_PSWITCH_1 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U8 PhysicalPort; /* 0x08 */ + U8 Reserved1; /* 0x09 */ + U16 Reserved2; /* 0x0A */ + U8 NumPorts; /* 0x0C */ + U8 PortNum; /* 0x0D */ + U16 AttachedDevHandle; /* 0x0E */ + U16 SwitchDevHandle; /* 0x10 */ + U8 NegotiatedPortWidth; /* 0x12 */ + U8 NegotiatedLinkRate; /* 0x13 */ + U32 Reserved4; /* 0x14 */ + U32 Reserved5; /* 0x18 */ +} MPI26_CONFIG_PAGE_PSWITCH_1, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PSWITCH_1, + Mpi26PCIeSwitchPage1_t, MPI2_POINTER pMpi26PCIeSwitchPage1_t; + +#define MPI26_PCIESWITCH1_PAGEVERSION (0x00) + +/* use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */ + + +/**************************************************************************** +* PCIe Device Config Pages (MPI v2.6 and later) +****************************************************************************/ + +/* PCIe Device Page 0 */ + +typedef struct _MPI26_CONFIG_PAGE_PCIEDEV_0 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U16 Slot; /* 0x08 */ + U16 EnclosureHandle; /* 0x0A */ + U64 WWID; /* 0x0C */ + U16 ParentDevHandle; /* 0x14 */ + U8 PortNum; /* 0x16 */ + U8 AccessStatus; /* 0x17 */ + U16 DevHandle; /* 0x18 */ + U8 PhysicalPort; /* 0x1A */ + U8 Reserved1; /* 0x1B */ + U32 DeviceInfo; /* 0x1C */ + U32 Flags; /* 0x20 */ + U8 SupportedLinkRates; /* 0x24 */ + U8 MaxPortWidth; /* 0x25 */ + U8 NegotiatedPortWidth; /* 0x26 */ + U8 NegotiatedLinkRate; /* 0x27 */ + U8 EnclosureLevel; /* 0x28 */ + U8 Reserved2; /* 0x29 */ + U16 Reserved3; /* 0x2A */ + U8 ConnectorName[4]; /* 0x2C */ + U32 Reserved4; /* 0x30 */ + U32 Reserved5; /* 0x34 */ +} MPI26_CONFIG_PAGE_PCIEDEV_0, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIEDEV_0, + Mpi26PCIeDevicePage0_t, MPI2_POINTER pMpi26PCIeDevicePage0_t; + +#define MPI26_PCIEDEVICE0_PAGEVERSION (0x01) + +/* values for PCIe Device Page 0 AccessStatus field */ +#define MPI26_PCIEDEV0_ASTATUS_NO_ERRORS (0x00) +#define MPI26_PCIEDEV0_ASTATUS_NEEDS_INITIALIZATION (0x04) +#define MPI26_PCIEDEV0_ASTATUS_CAPABILITY_FAILED (0x02) +#define MPI26_PCIEDEV0_ASTATUS_DEVICE_BLOCKED (0x07) +#define MPI26_PCIEDEV0_ASTATUS_MEMORY_SPACE_ACCESS_FAILED (0x08) +#define MPI26_PCIEDEV0_ASTATUS_UNSUPPORTED_DEVICE (0x09) +#define MPI26_PCIEDEV0_ASTATUS_MSIX_REQUIRED (0x0A) +#define MPI26_PCIEDEV0_ASTATUS_UNKNOWN (0x10) + +#define MPI26_PCIEDEV0_ASTATUS_NVME_READY_TIMEOUT (0x30) +#define MPI26_PCIEDEV0_ASTATUS_NVME_DEVCFG_UNSUPPORTED (0x31) +#define MPI26_PCIEDEV0_ASTATUS_NVME_IDENTIFY_FAILED (0x32) +#define MPI26_PCIEDEV0_ASTATUS_NVME_QCONFIG_FAILED (0x33) +#define MPI26_PCIEDEV0_ASTATUS_NVME_QCREATION_FAILED (0x34) +#define MPI26_PCIEDEV0_ASTATUS_NVME_EVENTCFG_FAILED (0x35) +#define MPI26_PCIEDEV0_ASTATUS_NVME_GET_FEATURE_STAT_FAILED (0x36) +#define MPI26_PCIEDEV0_ASTATUS_NVME_IDLE_TIMEOUT (0x37) +#define MPI26_PCIEDEV0_ASTATUS_NVME_FAILURE_STATUS (0x38) + +#define MPI26_PCIEDEV0_ASTATUS_INIT_FAIL_MAX (0x3F) + +/* see mpi2_pci.h for the MPI26_PCIE_DEVINFO_ defines used for the DeviceInfo field */ + +/* values for PCIe Device Page 0 Flags field */ +#define MPI26_PCIEDEV0_FLAGS_UNAUTHORIZED_DEVICE (0x8000) +#define MPI26_PCIEDEV0_FLAGS_ENABLED_FAST_PATH (0x4000) +#define MPI26_PCIEDEV0_FLAGS_FAST_PATH_CAPABLE (0x2000) +#define MPI26_PCIEDEV0_FLAGS_ASYNCHRONOUS_NOTIFICATION (0x0400) +#define MPI26_PCIEDEV0_FLAGS_ATA_SW_PRESERVATION (0x0200) +#define MPI26_PCIEDEV0_FLAGS_UNSUPPORTED_DEVICE (0x0100) +#define MPI26_PCIEDEV0_FLAGS_ATA_48BIT_LBA_SUPPORTED (0x0080) +#define MPI26_PCIEDEV0_FLAGS_ATA_SMART_SUPPORTED (0x0040) +#define MPI26_PCIEDEV0_FLAGS_ATA_NCQ_SUPPORTED (0x0020) +#define MPI26_PCIEDEV0_FLAGS_ATA_FUA_SUPPORTED (0x0010) +#define MPI26_PCIEDEV0_FLAGS_ENCL_LEVEL_VALID (0x0002) +#define MPI26_PCIEDEV0_FLAGS_DEVICE_PRESENT (0x0001) + +/* values for PCIe Device Page 0 SupportedLinkRates field */ +#define MPI26_PCIEDEV0_LINK_RATE_16_0_SUPPORTED (0x08) +#define MPI26_PCIEDEV0_LINK_RATE_8_0_SUPPORTED (0x04) +#define MPI26_PCIEDEV0_LINK_RATE_5_0_SUPPORTED (0x02) +#define MPI26_PCIEDEV0_LINK_RATE_2_5_SUPPORTED (0x01) + +/* use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */ + + +/* PCIe Device Page 2 */ + +typedef struct _MPI26_CONFIG_PAGE_PCIEDEV_2 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U16 DevHandle; /* 0x08 */ + U16 Reserved1; /* 0x0A */ + U32 MaximumDataTransferSize;/* 0x0C */ + U32 Capabilities; /* 0x10 */ + U32 Reserved2; /* 0x14 */ +} MPI26_CONFIG_PAGE_PCIEDEV_2, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIEDEV_2, + Mpi26PCIeDevicePage2_t, MPI2_POINTER pMpi26PCIeDevicePage2_t; + +#define MPI26_PCIEDEVICE2_PAGEVERSION (0x00) + +/* defines for PCIe Device Page 2 Capabilities field */ +#define MPI26_PCIEDEV2_CAP_SGL_FORMAT (0x00000004) +#define MPI26_PCIEDEV2_CAP_BIT_BUCKET_SUPPORT (0x00000002) +#define MPI26_PCIEDEV2_CAP_SGL_SUPPORT (0x00000001) + + +/**************************************************************************** +* PCIe Link Config Pages (MPI v2.6 and later) +****************************************************************************/ + +/* PCIe Link Page 1 */ + +typedef struct _MPI26_CONFIG_PAGE_PCIELINK_1 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U8 Link; /* 0x08 */ + U8 Reserved1; /* 0x09 */ + U16 Reserved2; /* 0x0A */ + U32 CorrectableErrorCount; /* 0x0C */ + U16 NonFatalErrorCount; /* 0x10 */ + U16 Reserved3; /* 0x12 */ + U16 FatalErrorCount; /* 0x14 */ + U16 Reserved4; /* 0x16 */ +} MPI26_CONFIG_PAGE_PCIELINK_1, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIELINK_1, + Mpi26PcieLinkPage1_t, MPI2_POINTER pMpi26PcieLinkPage1_t; + +#define MPI26_PCIELINK1_PAGEVERSION (0x00) + +/* PCIe Link Page 2 */ + +typedef struct _MPI26_PCIELINK2_LINK_EVENT +{ + U8 LinkEventCode; /* 0x00 */ + U8 Reserved1; /* 0x01 */ + U16 Reserved2; /* 0x02 */ + U32 LinkEventInfo; /* 0x04 */ +} MPI26_PCIELINK2_LINK_EVENT, MPI2_POINTER PTR_MPI26_PCIELINK2_LINK_EVENT, + Mpi26PcieLink2LinkEvent_t, MPI2_POINTER pMpi26PcieLink2LinkEvent_t; + +/* use MPI26_PCIELINK3_EVTCODE_ for the LinkEventCode field */ + + +/* + * Host code (drivers, BIOS, utilities, etc.) should leave this define set to + * one and check the value returned for NumLinkEvents at runtime. + */ +#ifndef MPI26_PCIELINK2_LINK_EVENT_MAX +#define MPI26_PCIELINK2_LINK_EVENT_MAX (1) +#endif + +typedef struct _MPI26_CONFIG_PAGE_PCIELINK_2 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U8 Link; /* 0x08 */ + U8 Reserved1; /* 0x09 */ + U16 Reserved2; /* 0x0A */ + U8 NumLinkEvents; /* 0x0C */ + U8 Reserved3; /* 0x0D */ + U16 Reserved4; /* 0x0E */ + MPI26_PCIELINK2_LINK_EVENT LinkEvent[MPI26_PCIELINK2_LINK_EVENT_MAX]; /* 0x10 */ +} MPI26_CONFIG_PAGE_PCIELINK_2, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIELINK_2, + Mpi26PcieLinkPage2_t, MPI2_POINTER pMpi26PcieLinkPage2_t; + +#define MPI26_PCIELINK2_PAGEVERSION (0x00) + + +/* PCIe Link Page 3 */ + +typedef struct _MPI26_PCIELINK3_LINK_EVENT_CONFIG +{ + U8 LinkEventCode; /* 0x00 */ + U8 Reserved1; /* 0x01 */ + U16 Reserved2; /* 0x02 */ + U8 CounterType; /* 0x04 */ + U8 ThresholdWindow; /* 0x05 */ + U8 TimeUnits; /* 0x06 */ + U8 Reserved3; /* 0x07 */ + U32 EventThreshold; /* 0x08 */ + U16 ThresholdFlags; /* 0x0C */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 15:43:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1778BAFFD13; Thu, 1 Jun 2017 15:43:26 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B51B87F696; Thu, 1 Jun 2017 15:43:25 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51FhOMj004273; Thu, 1 Jun 2017 15:43:24 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51FhODT004269; Thu, 1 Jun 2017 15:43:24 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201706011543.v51FhODT004269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Thu, 1 Jun 2017 15:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319436 - in stable/10: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi sys/dev/mps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:43:26 -0000 Author: slm Date: Thu Jun 1 15:43:24 2017 New Revision: 319436 URL: https://svnweb.freebsd.org/changeset/base/319436 Log: MFC r286567, r286568, r289426, r289429, r295113, r295286, r299367, r299369, r308217, r308301, r311958, r312437, r318188, r318427, r318679 r286567: Remove some unused code. Obtained from: Netflix, Inx. r286568: Remove mps_request_polled(), it's redundant to mps_wait_command() Obtained from: Netflix, Inc. r289426: Remove _FreeBSD_version check for something that was only an issue with 9-CURRENT. Obtained from: Netlfix, Inc MFC after: 3 days r289429: Revert an extra hunk that crept into the last commit. Submitted by: emax Obtained from: Netflix, Inc. MFC after: 3 days r295113: Clean up unused-but-set-variable spotted by gcc-4.9. Reviewed by: mav, slm Approved by: rodrigc (mentor) MFC after: 2 weeks Sponsored by: gandi.net r295286: Add sysctls for dumping out the device mapping tables. I'm finding this useful for debugging device-target translation bugs. MFC after: 3 days Sponsored by: Netflix r299367: Remove NULL checks after M_WAITOK allocations from mps(4). Reviewed by: asomers@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6296 r299369: Remove NULL checks after M_WAITOK allocations from mpr(4). Reviewed by: asomers@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6297 r308217: Add a fallback to the device mapper logic. We've seen systems in the field that are apparently misconfigured by the manufacturer and cause the mapping logic to fail. The fallback allows drive numbers to be assigned based on the PHY number that they're attached to. Add sysctls and tunables to overrid this new behavior, but they should be considered only necessary for debugging. Reviewed by: imp, smh Obtained from: Netflix MFC after: 3 days Sponsored by: D8403 r308301: Record the LogInfo field when reporting the IOCStatus. Helps in debugging errors. Submitted by: slm Obtained from: Netflix MFC after: 3 days r311958: Print out the number of queues/MSIx vectors. Sponsored by: Netflix r312437: Rework the debug print API. Event printing no longer gets special handling. All of the printing from the tables file now has wrappers so that the handling is cleaner and it's possible to print something out (say, during development) without having to fight the global debug flags. This re-org will also make it easier to have the tables be compiled out at build time if desired. Other than fixing some minor bugs, there are no user-visible changes from this change Sponsored by: Netflix, Inc. Differential Revision: D9238 r318188: Improve error messages during command timeout for the mpr and mps drivers. Sponsored by: Netflix r318427: Add tri-mode support (SAS/SATA/PCIe). This includes NVMe device support and adds support for the following adapters: SAS 3408 SAS 3416 SAS 3508 SAS 3516 SAS 3616 SAS 3708 SAS 3716 Reviewed by: ken, scottl, asomers, mav Approved by: ken, scottl, mav MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D10095 r318679: Fix powerpc compiler error. Approved by: ken Added: stable/10/sys/dev/mpr/mpi/mpi2_pci.h - copied unchanged from r318427, head/sys/dev/mpr/mpi/mpi2_pci.h Modified: stable/10/share/man/man4/mpr.4 stable/10/sys/dev/mpr/mpi/mpi2.h stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h stable/10/sys/dev/mpr/mpi/mpi2_hbd.h stable/10/sys/dev/mpr/mpi/mpi2_history.txt stable/10/sys/dev/mpr/mpi/mpi2_init.h stable/10/sys/dev/mpr/mpi/mpi2_ioc.h stable/10/sys/dev/mpr/mpi/mpi2_tool.h stable/10/sys/dev/mpr/mpr.c stable/10/sys/dev/mpr/mpr_config.c stable/10/sys/dev/mpr/mpr_mapping.c stable/10/sys/dev/mpr/mpr_mapping.h stable/10/sys/dev/mpr/mpr_pci.c stable/10/sys/dev/mpr/mpr_sas.c stable/10/sys/dev/mpr/mpr_sas.h stable/10/sys/dev/mpr/mpr_sas_lsi.c stable/10/sys/dev/mpr/mpr_table.c stable/10/sys/dev/mpr/mpr_table.h stable/10/sys/dev/mpr/mpr_user.c stable/10/sys/dev/mpr/mprvar.h stable/10/sys/dev/mps/mps.c stable/10/sys/dev/mps/mps_config.c stable/10/sys/dev/mps/mps_mapping.c stable/10/sys/dev/mps/mps_sas.c stable/10/sys/dev/mps/mps_sas_lsi.c stable/10/sys/dev/mps/mps_table.c stable/10/sys/dev/mps/mps_table.h stable/10/sys/dev/mps/mps_user.c stable/10/sys/dev/mps/mpsvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/mpr.4 ============================================================================== --- stable/10/share/man/man4/mpr.4 Thu Jun 1 15:39:09 2017 (r319435) +++ stable/10/share/man/man4/mpr.4 Thu Jun 1 15:43:24 2017 (r319436) @@ -1,8 +1,8 @@ .\" .\" Copyright (c) 2010 Spectra Logic Corporation .\" Copyright (c) 2014 LSI Corp -.\" Copyright (c) 2016 Avago Technologies -.\" Copyright (c) 2016 Broadcom Ltd. +.\" Copyright (c) 2017 Avago Technologies +.\" Copyright (c) 2017 Broadcom Ltd. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -38,12 +38,12 @@ .\" $Id$ .\" $FreeBSD$ .\" -.Dd July 6, 2016 +.Dd May 17, 2017 .Dt MPR 4 .Os .Sh NAME .Nm mpr -.Nd "LSI Fusion-MPT 3 IT/IR 12Gb/s Serial Attached SCSI/SATA driver" +.Nd "LSI Fusion-MPT 3/3.5 IT/IR 12Gb/s Serial Attached SCSI/SATA/PCIe driver" .Sh SYNOPSIS To compile this driver into the kernel, place these lines in the kernel configuration file: @@ -62,8 +62,8 @@ mpr_load="YES" The .Nm driver provides support for Broadcom Ltd./Avago Tech (LSI) -Fusion-MPT 3 IT/IR -.Tn SAS +Fusion-MPT 3/3.5 IT/IR +.Tn SAS/PCIe controllers. .Sh HARDWARE These controllers are supported by the @@ -81,6 +81,24 @@ Broadcom Ltd./Avago Tech (LSI) SAS 3108 (8 Port SAS) Broadcom Ltd./Avago Tech (LSI) SAS 3216 (16 Port SAS) .It Broadcom Ltd./Avago Tech (LSI) SAS 3224 (24 Port SAS) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3316 (16 Port SAS) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3324 (24 Port SAS) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3408 (8 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3416 (16 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3508 (8 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3516 (16 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3616 (16 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3708 (8 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3716 (16 Port SAS/PCIe) .El .Sh CONFIGURATION .Pp @@ -158,6 +176,24 @@ dev.mpr.X.io_cmds_active variable. .Ed .Pp +The current number of free PRP pages is stored in the +dev.mpr.X.prp_pages_free +.Xr sysctl 8 +variable. +PRP pages are used by NVMe devices for I/O transfers, much like Scatter/Gather +lists. +.Pp +The lowest number of free PRP pages seen since boot is stored in the +dev.mpr.X.prp_pages_free_lowwater +.Xr sysctl 8 +variable. +.Pp +The number of times that PRP page allocations have failed since boot is +stored in the +dev.mpr.X.prp_page_alloc_fail +.Xr sysctl 8 +variable. +.Pp To set the maximum number of pages that will be used per I/O for all adapters, set this tunable in .Xr loader.conf 5 : @@ -231,13 +267,13 @@ Send SSU to HDDs, but not to SSDs. Send SSU to both HDDs and SSDs. .El .Pp -To control the feature for a specific adapter, set this tunable value in +To control this feature for a specific adapter, set this tunable value in .Xr loader.conf 5 : .Bd -literal -offset indent dev.mpr.X.enable_ssu .Ed .Pp -The same set of values are valid when setting this tunable for all adapters. +The same set of values are valid as when setting this tunable for all adapters. .Pp SATA disks that take several seconds to spin up and fail the SATA Identify command might not be discovered by the driver. @@ -263,6 +299,45 @@ dev.mpr.X.spinup_wait_time=NNNN tunable. NNNN is the number of seconds to wait for SATA devices to spin up when they fail the initial SATA Identify command. +.Pp +The driver can map devices discovered by the adapter so that target IDs +corresponding to a specific device persist across resets and reboots. +In some cases it is possible for devices to lose their mapped IDs due to +unexpected behavior from certain hardware, such as some types of enclosures. +To overcome this problem, a tunable is provided that will force the driver to +map devices using the Phy number associated with the device. +This feature is not recommended if the topology includes multiple +enclosures/expanders. +If multiple enclosures/expanders are present in the topology, Phy numbers are +repeated, causing all devices at these Phy numbers except the first device to +fail enumeration. +To control this feature for all adapters, set the +.Bd -literal -offset indent +hw.mpr.use_phy_num +.Ed +.Pp +tunable in +.Xr loader.conf 5 +to one of these values: +.Bl -tag -width 6n -offset indent +.It -1 +Only use Phy numbers to map devices and bypass the driver's mapping logic. +.It 0 +Never use Phy numbers to map devices. +.It 1 +Use Phy numbers to map devices, but only if the driver's mapping logic fails +to map the device that is being enumerated. +This is the default value. +.El +.Pp +To control this feature for a specific adapter, set this tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mpr.X.use_phy_num +.Ed +.Pp +The same set of values are valid as when setting this tunable for all adapters. +.Pp .Sh DEBUGGING To enable debugging prints from the .Nm Modified: stable/10/sys/dev/mpr/mpi/mpi2.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2.h Thu Jun 1 15:39:09 2017 (r319435) +++ stable/10/sys/dev/mpr/mpi/mpi2.h Thu Jun 1 15:43:24 2017 (r319436) @@ -44,7 +44,7 @@ * scatter/gather formats. * Creation Date: June 21, 2006 * - * mpi2.h Version: 02.00.42 + * mpi2.h Version: 02.00.46 * * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25 * prefix are for use only on MPI v2.5 products, and must not be used @@ -132,7 +132,8 @@ * Bumped MPI2_HEADER_VERSION_UNIT. * 03-16-15 02.00.37 Updated for MPI v2.6. * Bumped MPI2_HEADER_VERSION_UNIT. - * Added Scratchpad registers to + * Added Scratchpad registers and + * AtomicRequestDescriptorPost register to * MPI2_SYSTEM_INTERFACE_REGS. * Added MPI2_DIAG_SBR_RELOAD. * Added MPI2_IOCSTATUS_INSUFFICIENT_POWER. @@ -142,6 +143,14 @@ * Added V7 HostDiagnostic register defines * 12-15-15 02.00.41 Bumped MPI_HEADER_VERSION_UNIT * 01-01-16 02.00.42 Bumped MPI_HEADER_VERSION_UNIT + * 04-05-16 02.00.43 Modified MPI26_DIAG_BOOT_DEVICE_SELECT defines + * to be unique within first 32 characters. + * Removed AHCI support. + * Removed SOP support. + * Bumped MPI2_HEADER_VERSION_UNIT. + * 04-10-16 02.00.44 Bumped MPI2_HEADER_VERSION_UNIT. + * 07-06-16 02.00.45 Bumped MPI2_HEADER_VERSION_UNIT. + * 09-02-16 02.00.46 Bumped MPI2_HEADER_VERSION_UNIT. * -------------------------------------------------------------------------- */ @@ -185,7 +194,7 @@ /* Unit and Dev versioning for this MPI header set */ -#define MPI2_HEADER_VERSION_UNIT (0x2A) +#define MPI2_HEADER_VERSION_UNIT (0x2E) #define MPI2_HEADER_VERSION_DEV (0x00) #define MPI2_HEADER_VERSION_UNIT_MASK (0xFF00) #define MPI2_HEADER_VERSION_UNIT_SHIFT (8) @@ -245,7 +254,8 @@ typedef volatile struct _MPI2_SYSTEM_INTERFACE_REGS U32 Scratchpad[4]; /* 0xB0 */ U32 RequestDescriptorPostLow; /* 0xC0 */ U32 RequestDescriptorPostHigh; /* 0xC4 */ - U32 Reserved7[14]; /* 0xC8 */ + U32 AtomicRequestDescriptorPost;/* 0xC8 */ /* MPI v2.6 and later; reserved in earlier versions */ + U32 Reserved7[13]; /* 0xCC */ } MPI2_SYSTEM_INTERFACE_REGS, MPI2_POINTER PTR_MPI2_SYSTEM_INTERFACE_REGS, Mpi2SystemInterfaceRegs_t, MPI2_POINTER pMpi2SystemInterfaceRegs_t; @@ -293,10 +303,11 @@ typedef volatile struct _MPI2_SYSTEM_INTERFACE_REGS #define MPI2_DIAG_BOOT_DEVICE_SELECT_HCDW (0x00000800) /* Defines for V7A/V7R HostDiagnostic Register */ -#define MPI26_DIAG_BOOT_DEVICE_SELECT_FLASH64 (0x00000000) -#define MPI26_DIAG_BOOT_DEVICE_SELECT_HCDW64 (0x00000800) -#define MPI26_DIAG_BOOT_DEVICE_SELECT_FLASH32 (0x00001000) -#define MPI26_DIAG_BOOT_DEVICE_SELECT_HCDW32 (0x00001800) +#define MPI26_DIAG_BOOT_DEVICE_SEL_64FLASH (0x00000000) +#define MPI26_DIAG_BOOT_DEVICE_SEL_64HCDW (0x00000800) +#define MPI26_DIAG_BOOT_DEVICE_SEL_32FLASH (0x00001000) +#define MPI26_DIAG_BOOT_DEVICE_SEL_32HCDW (0x00001800) + #define MPI2_DIAG_CLEAR_FLASH_BAD_SIG (0x00000400) #define MPI2_DIAG_FORCE_HCB_ON_RESET (0x00000200) #define MPI2_DIAG_HCB_MODE (0x00000100) @@ -379,6 +390,7 @@ typedef volatile struct _MPI2_SYSTEM_INTERFACE_REGS */ #define MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET (0x000000C0) #define MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET (0x000000C4) +#define MPI26_ATOMIC_REQUEST_DESCRIPTOR_POST_OFFSET (0x000000C8) /* Hard Reset delay timings */ @@ -415,6 +427,7 @@ typedef struct _MPI2_DEFAULT_REQUEST_DESCRIPTOR #define MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE (0x08) #define MPI2_REQ_DESCRIPT_FLAGS_RAID_ACCELERATOR (0x0A) #define MPI25_REQ_DESCRIPT_FLAGS_FAST_PATH_SCSI_IO (0x0C) +#define MPI26_REQ_DESCRIPT_FLAGS_PCIE_ENCAPSULATED (0x10) #define MPI2_REQ_DESCRIPT_FLAGS_IOC_FIFO_MARKER (0x01) @@ -482,6 +495,14 @@ typedef MPI2_SCSI_IO_REQUEST_DESCRIPTOR MPI2_POINTER pMpi25FastPathSCSIIORequestDescriptor_t; +/* PCIe Encapsulated Request Descriptor */ +typedef MPI2_SCSI_IO_REQUEST_DESCRIPTOR + MPI26_PCIE_ENCAPSULATED_REQUEST_DESCRIPTOR, + MPI2_POINTER PTR_MPI26_PCIE_ENCAPSULATED_REQUEST_DESCRIPTOR, + Mpi26PCIeEncapsulatedRequestDescriptor_t, + MPI2_POINTER pMpi26PCIeEncapsulatedRequestDescriptor_t; + + /* union of Request Descriptors */ typedef union _MPI2_REQUEST_DESCRIPTOR_UNION { @@ -491,12 +512,36 @@ typedef union _MPI2_REQUEST_DESCRIPTOR_UNION MPI2_SCSI_TARGET_REQUEST_DESCRIPTOR SCSITarget; MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR RAIDAccelerator; MPI25_FP_SCSI_IO_REQUEST_DESCRIPTOR FastPathSCSIIO; + MPI26_PCIE_ENCAPSULATED_REQUEST_DESCRIPTOR PCIeEncapsulated; U64 Words; } MPI2_REQUEST_DESCRIPTOR_UNION, MPI2_POINTER PTR_MPI2_REQUEST_DESCRIPTOR_UNION, Mpi2RequestDescriptorUnion_t, MPI2_POINTER pMpi2RequestDescriptorUnion_t; +/* Atomic Request Descriptors */ +/* + * All Atomic Request Descriptors have the same format, so the following + * structure is used for all Atomic Request Descriptors: + * Atomic Default Request Descriptor + * Atomic High Priority Request Descriptor + * Atomic SCSI IO Request Descriptor + * Atomic SCSI Target Request Descriptor + * Atomic RAID Accelerator Request Descriptor + * Atomic Fast Path SCSI IO Request Descriptor + * Atomic PCIe Encapsulated Request Descriptor + */ + +/* Atomic Request Descriptor */ +typedef struct _MPI26_ATOMIC_REQUEST_DESCRIPTOR +{ + U8 RequestFlags; /* 0x00 */ + U8 MSIxIndex; /* 0x01 */ + U16 SMID; /* 0x02 */ +} MPI26_ATOMIC_REQUEST_DESCRIPTOR, + MPI2_POINTER PTR_MPI26_ATOMIC_REQUEST_DESCRIPTOR, + Mpi26AtomicRequestDescriptor_t, MPI2_POINTER pMpi26AtomicRequestDescriptor_t; + /* for the RequestFlags field, use the same defines as MPI2_DEFAULT_REQUEST_DESCRIPTOR */ @@ -520,6 +565,7 @@ typedef struct _MPI2_DEFAULT_REPLY_DESCRIPTOR #define MPI2_RPY_DESCRIPT_FLAGS_TARGET_COMMAND_BUFFER (0x03) #define MPI2_RPY_DESCRIPT_FLAGS_RAID_ACCELERATOR_SUCCESS (0x05) #define MPI25_RPY_DESCRIPT_FLAGS_FAST_PATH_SCSI_IO_SUCCESS (0x06) +#define MPI26_RPY_DESCRIPT_FLAGS_PCIE_ENCAPSULATED_SUCCESS (0x08) #define MPI2_RPY_DESCRIPT_FLAGS_UNUSED (0x0F) /* values for marking a reply descriptor as unused */ @@ -607,6 +653,14 @@ typedef MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR MPI2_POINTER pMpi25FastPathSCSIIOSuccessReplyDescriptor_t; +/* PCIe Encapsulated Success Reply Descriptor */ +typedef MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR + MPI26_PCIE_ENCAPSULATED_SUCCESS_REPLY_DESCRIPTOR, + MPI2_POINTER PTR_MPI26_PCIE_ENCAPSULATED_SUCCESS_REPLY_DESCRIPTOR, + Mpi26PCIeEncapsulatedSuccessReplyDescriptor_t, + MPI2_POINTER pMpi26PCIeEncapsulatedSuccessReplyDescriptor_t; + + /* union of Reply Descriptors */ typedef union _MPI2_REPLY_DESCRIPTORS_UNION { @@ -617,6 +671,7 @@ typedef union _MPI2_REPLY_DESCRIPTORS_UNION MPI2_TARGET_COMMAND_BUFFER_REPLY_DESCRIPTOR TargetCommandBuffer; MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR RAIDAcceleratorSuccess; MPI25_FP_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR FastPathSCSIIOSuccess; + MPI26_PCIE_ENCAPSULATED_SUCCESS_REPLY_DESCRIPTOR PCIeEncapsulatedSuccess; U64 Words; } MPI2_REPLY_DESCRIPTORS_UNION, MPI2_POINTER PTR_MPI2_REPLY_DESCRIPTORS_UNION, Mpi2ReplyDescriptorsUnion_t, MPI2_POINTER pMpi2ReplyDescriptorsUnion_t; @@ -659,6 +714,7 @@ typedef union _MPI2_REPLY_DESCRIPTORS_UNION #define MPI2_FUNCTION_HOST_BASED_DISCOVERY_ACTION (0x2F) /* Host Based Discovery Action */ #define MPI2_FUNCTION_PWR_MGMT_CONTROL (0x30) /* Power Management Control */ #define MPI2_FUNCTION_SEND_HOST_MESSAGE (0x31) /* Send Host Message */ +#define MPI2_FUNCTION_NVME_ENCAPSULATED (0x33) /* NVMe Encapsulated (MPI v2.6) */ #define MPI2_FUNCTION_MIN_PRODUCT_SPECIFIC (0xF0) /* beginning of product-specific range */ #define MPI2_FUNCTION_MAX_PRODUCT_SPECIFIC (0xFF) /* end of product-specific range */ @@ -1232,6 +1288,8 @@ typedef union _MPI25_SGE_IO_UNION #define MPI26_IEEE_SGE_FLAGS_NSF_MASK (0x1C) #define MPI26_IEEE_SGE_FLAGS_NSF_MPI_IEEE (0x00) +#define MPI26_IEEE_SGE_FLAGS_NSF_NVME_PRP (0x08) +#define MPI26_IEEE_SGE_FLAGS_NSF_NVME_SGL (0x10) /* Data Location Address Space */ Modified: stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h Thu Jun 1 15:39:09 2017 (r319435) +++ stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h Thu Jun 1 15:43:24 2017 (r319436) @@ -42,7 +42,7 @@ * Title: MPI Configuration messages and pages * Creation Date: November 10, 2006 * - * mpi2_cnfg.h Version: 02.00.35 + * mpi2_cnfg.h Version: 02.00.39 * * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25 * prefix are for use only on MPI v2.5 products, and must not be used @@ -223,9 +223,38 @@ * Flags field to IO Unit Page 7. * Added IO Unit Page 11. * Added new SAS Phy Event codes + * Added PCIe configuration pages. + * 03-19-15 02.00.32 Fixed PCIe Link Config page structure names to be + * unique in first 32 characters. * 05-25-15 02.00.33 Added more defines for the BiosOptions field of * MPI2_CONFIG_PAGE_BIOS_1. + * 08-25-15 02.00.34 Added PCIe Device Page 2 SGL format capability. * 12-18-15 02.00.35 Added SATADeviceWaitTime to SAS IO Unit Page 4. + * 01-21-16 02.00.36 Added/modified MPI2_MFGPAGE_DEVID_SAS defines. + * Added Link field to PCIe Link Pages + * Added EnclosureLevel and ConnectorName to PCIe + * Device Page 0. + * Added define for PCIE IoUnit page 1 max rate shift. + * Added comment for reserved ExtPageTypes. + * Added SAS 4 22.5 gbs speed support. + * Added PCIe 4 16.0 GT/sec speec support. + * Removed AHCI support. + * Removed SOP support. + * Added NegotiatedLinkRate and NegotiatedPortWidth to + * PCIe device page 0. + * 04-10-16 02.00.37 Fixed MPI2_MFGPAGE_DEVID_SAS3616/3708 defines + * 07-01-16 02.00.38 Added Manufacturing page 7 Connector types. + * Changed declaration of ConnectorName in PCIe DevicePage0 + * to match SAS DevicePage 0. + * Added SATADeviceWaitTime to IO Unit Page 11. + * Added MPI26_MFGPAGE_DEVID_SAS4008 + * Added x16 PCIe width to IO Unit Page 7 + * Added LINKFLAGS to control SRIS in PCIe IO Unit page 1 + * phy data. + * Added InitStatus to PCIe IO Unit Page 1 header. + * 09-01-16 02.00.39 Added MPI26_CONFIG_PAGE_ENCLOSURE_0 and related defines. + * Added MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE and + * MPI26_ENCLOS_PGAD_FORM_HANDLE page address formats. * -------------------------------------------------------------------------- */ @@ -310,6 +339,12 @@ typedef union _MPI2_CONFIG_EXT_PAGE_HEADER_UNION #define MPI2_CONFIG_EXTPAGETYPE_SAS_PORT (0x18) #define MPI2_CONFIG_EXTPAGETYPE_ETHERNET (0x19) #define MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING (0x1A) +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_IO_UNIT (0x1B) /* MPI v2.6 and later */ +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_SWITCH (0x1C) /* MPI v2.6 and later */ +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_DEVICE (0x1D) /* MPI v2.6 and later */ +#define MPI2_CONFIG_EXTPAGETYPE_PCIE_LINK (0x1E) /* MPI v2.6 and later */ +/* Product specific reserved values 0xE0 - 0xEF */ +/* Vendor specific reserved values 0xF0 - 0xFF */ /***************************************************************************** @@ -377,7 +412,13 @@ typedef union _MPI2_CONFIG_EXT_PAGE_HEADER_UNION #define MPI2_SAS_ENCLOS_PGAD_HANDLE_MASK (0x0000FFFF) +/* Enclosure PageAddress format */ +#define MPI26_ENCLOS_PGAD_FORM_MASK (0xF0000000) +#define MPI26_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE (0x00000000) +#define MPI26_ENCLOS_PGAD_FORM_HANDLE (0x10000000) +#define MPI26_ENCLOS_PGAD_HANDLE_MASK (0x0000FFFF) + /* RAID Configuration PageAddress format */ #define MPI2_RAID_PGAD_FORM_MASK (0xF0000000) #define MPI2_RAID_PGAD_FORM_GET_NEXT_CONFIGNUM (0x00000000) @@ -403,6 +444,33 @@ typedef union _MPI2_CONFIG_EXT_PAGE_HEADER_UNION #define MPI2_ETHERNET_PGAD_IF_NUMBER_MASK (0x000000FF) +/* PCIe Switch PageAddress format */ +#define MPI26_PCIE_SWITCH_PGAD_FORM_MASK (0xF0000000) +#define MPI26_PCIE_SWITCH_PGAD_FORM_GET_NEXT_HNDL (0x00000000) +#define MPI26_PCIE_SWITCH_PGAD_FORM_HNDL_PORTNUM (0x10000000) +#define MPI26_PCIE_SWITCH_EXPAND_PGAD_FORM_HNDL (0x20000000) + +#define MPI26_PCIE_SWITCH_PGAD_HANDLE_MASK (0x0000FFFF) +#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_MASK (0x00FF0000) +#define MPI26_PCIE_SWITCH_PGAD_PORTNUM_SHIFT (16) + + +/* PCIe Device PageAddress format */ +#define MPI26_PCIE_DEVICE_PGAD_FORM_MASK (0xF0000000) +#define MPI26_PCIE_DEVICE_PGAD_FORM_GET_NEXT_HANDLE (0x00000000) +#define MPI26_PCIE_DEVICE_PGAD_FORM_HANDLE (0x20000000) + +#define MPI26_PCIE_DEVICE_PGAD_HANDLE_MASK (0x0000FFFF) + +/* PCIe Link PageAddress format */ +#define MPI26_PCIE_LINK_PGAD_FORM_MASK (0xF0000000) +#define MPI26_PCIE_LINK_PGAD_FORM_GET_NEXT_LINK (0x00000000) +#define MPI26_PCIE_LINK_PGAD_FORM_LINK_NUM (0x10000000) + +#define MPI26_PCIE_DEVICE_PGAD_LINKNUM_MASK (0x000000FF) + + + /**************************************************************************** * Configuration messages ****************************************************************************/ @@ -518,6 +586,20 @@ typedef struct _MPI2_CONFIG_REPLY #define MPI26_MFGPAGE_DEVID_SAS3324_3 (0x00C2) #define MPI26_MFGPAGE_DEVID_SAS3324_4 (0x00C3) +#define MPI26_MFGPAGE_DEVID_SAS3516 (0x00AA) +#define MPI26_MFGPAGE_DEVID_SAS3516_1 (0x00AB) +#define MPI26_MFGPAGE_DEVID_SAS3416 (0x00AC) +#define MPI26_MFGPAGE_DEVID_SAS3508 (0x00AD) +#define MPI26_MFGPAGE_DEVID_SAS3508_1 (0x00AE) +#define MPI26_MFGPAGE_DEVID_SAS3408 (0x00AF) + +#define MPI26_MFGPAGE_DEVID_SAS3716 (0x00D0) +#define MPI26_MFGPAGE_DEVID_SAS3616 (0x00D1) +#define MPI26_MFGPAGE_DEVID_SAS3708 (0x00D2) + +#define MPI26_MFGPAGE_DEVID_SAS4008 (0x00A1) + + /* Manufacturing Page 0 */ typedef struct _MPI2_CONFIG_PAGE_MAN_0 @@ -755,6 +837,12 @@ typedef struct _MPI2_MANPAGE7_CONNECTOR_INFO #define MPI2_MANPAGE7_PINOUT_SFF_8644_8X (0x0B) #define MPI2_MANPAGE7_PINOUT_SFF_8644_16X (0x0C) #define MPI2_MANPAGE7_PINOUT_SFF_8436 (0x0D) +#define MPI2_MANPAGE7_PINOUT_SFF_8088_A (0x0E) +#define MPI2_MANPAGE7_PINOUT_SFF_8643_16i (0x0F) +#define MPI2_MANPAGE7_PINOUT_SFF_8654_4i (0x10) +#define MPI2_MANPAGE7_PINOUT_SFF_8654_8i (0x11) +#define MPI2_MANPAGE7_PINOUT_SFF_8611_4i (0x12) +#define MPI2_MANPAGE7_PINOUT_SFF_8611_8i (0x13) /* defines for the Location field */ #define MPI2_MANPAGE7_LOCATION_UNKNOWN (0x01) @@ -1017,11 +1105,13 @@ typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_7 #define MPI2_IOUNITPAGE7_PCIE_WIDTH_X2 (0x02) #define MPI2_IOUNITPAGE7_PCIE_WIDTH_X4 (0x04) #define MPI2_IOUNITPAGE7_PCIE_WIDTH_X8 (0x08) +#define MPI2_IOUNITPAGE7_PCIE_WIDTH_X16 (0x10) /* defines for IO Unit Page 7 PCIeSpeed field */ #define MPI2_IOUNITPAGE7_PCIE_SPEED_2_5_GBPS (0x00) #define MPI2_IOUNITPAGE7_PCIE_SPEED_5_0_GBPS (0x01) #define MPI2_IOUNITPAGE7_PCIE_SPEED_8_0_GBPS (0x02) +#define MPI2_IOUNITPAGE7_PCIE_SPEED_16_0_GBPS (0x03) /* defines for IO Unit Page 7 ProcessorState field */ #define MPI2_IOUNITPAGE7_PSTATE_MASK_SECOND (0x0000000F) @@ -1079,6 +1169,7 @@ typedef struct _MPI2_CONFIG_PAGE_IO_UNIT_7 /* defines for IO Unit Page 7 Flags field */ #define MPI2_IOUNITPAGE7_FLAG_CABLE_POWER_EXC (0x01) + /* IO Unit Page 8 */ #define MPI2_IOUNIT8_NUM_THRESHOLDS (4) @@ -1228,7 +1319,7 @@ typedef struct _MPI26_CONFIG_PAGE_IO_UNIT_11 U32 Reserved3; /* 0x1C */ U32 Reserved4; /* 0x20 */ U8 BootDeviceWaitTime; /* 0x24 */ - U8 Reserved5; /* 0x25 */ + U8 SATADeviceWaitTime; /* 0x25 */ U16 Reserved6; /* 0x26 */ U8 NumPhys; /* 0x28 */ U8 PEInitialSpinupDelay; /* 0x29 */ @@ -1249,9 +1340,6 @@ typedef struct _MPI26_CONFIG_PAGE_IO_UNIT_11 - - - /**************************************************************************** * IOC Config Pages ****************************************************************************/ @@ -1968,6 +2056,7 @@ typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_1 #define MPI2_SAS_NEG_LINK_RATE_3_0 (0x09) #define MPI2_SAS_NEG_LINK_RATE_6_0 (0x0A) #define MPI25_SAS_NEG_LINK_RATE_12_0 (0x0B) +#define MPI26_SAS_NEG_LINK_RATE_22_5 (0x0C) /* values for AttachedPhyInfo fields */ @@ -2035,12 +2124,14 @@ typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_1 #define MPI2_SAS_PRATE_MAX_RATE_3_0 (0x90) #define MPI2_SAS_PRATE_MAX_RATE_6_0 (0xA0) #define MPI25_SAS_PRATE_MAX_RATE_12_0 (0xB0) +#define MPI26_SAS_PRATE_MAX_RATE_22_5 (0xC0) #define MPI2_SAS_PRATE_MIN_RATE_MASK (0x0F) #define MPI2_SAS_PRATE_MIN_RATE_NOT_PROGRAMMABLE (0x00) #define MPI2_SAS_PRATE_MIN_RATE_1_5 (0x08) #define MPI2_SAS_PRATE_MIN_RATE_3_0 (0x09) #define MPI2_SAS_PRATE_MIN_RATE_6_0 (0x0A) #define MPI25_SAS_PRATE_MIN_RATE_12_0 (0x0B) +#define MPI26_SAS_PRATE_MIN_RATE_22_5 (0x0C) /* values for SAS HwLinkRate fields */ @@ -2049,11 +2140,13 @@ typedef struct _MPI2_CONFIG_PAGE_RD_PDISK_1 #define MPI2_SAS_HWRATE_MAX_RATE_3_0 (0x90) #define MPI2_SAS_HWRATE_MAX_RATE_6_0 (0xA0) #define MPI25_SAS_HWRATE_MAX_RATE_12_0 (0xB0) +#define MPI26_SAS_HWRATE_MAX_RATE_22_5 (0xC0) #define MPI2_SAS_HWRATE_MIN_RATE_MASK (0x0F) #define MPI2_SAS_HWRATE_MIN_RATE_1_5 (0x08) #define MPI2_SAS_HWRATE_MIN_RATE_3_0 (0x09) #define MPI2_SAS_HWRATE_MIN_RATE_6_0 (0x0A) #define MPI25_SAS_HWRATE_MIN_RATE_12_0 (0x0B) +#define MPI26_SAS_HWRATE_MIN_RATE_22_5 (0x0C) @@ -2227,11 +2320,13 @@ typedef struct _MPI2_CONFIG_PAGE_SASIOUNIT_1 #define MPI2_SASIOUNIT1_MAX_RATE_3_0 (0x90) #define MPI2_SASIOUNIT1_MAX_RATE_6_0 (0xA0) #define MPI25_SASIOUNIT1_MAX_RATE_12_0 (0xB0) +#define MPI26_SASIOUNIT1_MAX_RATE_22_5 (0xC0) #define MPI2_SASIOUNIT1_MIN_RATE_MASK (0x0F) #define MPI2_SASIOUNIT1_MIN_RATE_1_5 (0x08) #define MPI2_SASIOUNIT1_MIN_RATE_3_0 (0x09) #define MPI2_SASIOUNIT1_MIN_RATE_6_0 (0x0A) #define MPI25_SASIOUNIT1_MIN_RATE_12_0 (0x0B) +#define MPI26_SASIOUNIT1_MIN_RATE_22_5 (0x0C) /* see mpi2_sas.h for values for SAS IO Unit Page 1 ControllerPhyDeviceInfo values */ @@ -2718,7 +2813,6 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 #define MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID (0x0002) #define MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT (0x0001) - /* SAS Device Page 1 */ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_1 @@ -2885,7 +2979,6 @@ typedef struct _MPI2_SASPHY3_PHY_EVENT_CONFIG #define MPI2_SASPHY3_EVENT_CODE_HOTPLUG_TIMEOUT (0xD0) #define MPI2_SASPHY3_EVENT_CODE_MISALIGNED_MUX_PRIMITIVE (0xD1) #define MPI2_SASPHY3_EVENT_CODE_RX_AIP (0xD2) - /* Following codes are product specific and in MPI v2.6 and later */ #define MPI2_SASPHY3_EVENT_CODE_LCARB_WAIT_TIME (0xD3) #define MPI2_SASPHY3_EVENT_CODE_RCVD_CONN_RESP_WAIT_TIME (0xD4) @@ -2898,7 +2991,6 @@ typedef struct _MPI2_SASPHY3_PHY_EVENT_CONFIG #define MPI2_SASPHY3_EVENT_CODE_SATA_RX_START_RECEIVE (0xDB) #define MPI2_SASPHY3_EVENT_CODE_SMP_RX_START_RECEIVE (0xDC) - /* values for the CounterType field */ #define MPI2_SASPHY3_COUNTER_TYPE_WRAPPING (0x00) #define MPI2_SASPHY3_COUNTER_TYPE_SATURATING (0x01) @@ -2989,7 +3081,7 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_PORT_0 * SAS Enclosure Config Pages ****************************************************************************/ -/* SAS Enclosure Page 0 */ +/* SAS Enclosure Page 0, Enclosure Page 0 */ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 { @@ -3007,7 +3099,10 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 U32 Reserved4; /* 0x24 */ } MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0, MPI2_POINTER PTR_MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0, - Mpi2SasEnclosurePage0_t, MPI2_POINTER pMpi2SasEnclosurePage0_t; + Mpi2SasEnclosurePage0_t, MPI2_POINTER pMpi2SasEnclosurePage0_t, + MPI26_CONFIG_PAGE_ENCLOSURE_0, + MPI2_POINTER PTR_MPI26_CONFIG_PAGE_ENCLOSURE_0, + Mpi26EnclosurePage0_t, MPI2_POINTER pMpi26EnclosurePage0_t; #define MPI2_SASENCLOSURE0_PAGEVERSION (0x04) @@ -3021,7 +3116,18 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 #define MPI2_SAS_ENCLS0_FLAGS_MNG_SES_ENCLOSURE (0x0004) #define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_GPIO (0x0005) +#define MPI26_ENCLOSURE0_PAGEVERSION (0x04) +/* Values for Enclosure Page 0 Flags field */ +#define MPI26_ENCLS0_FLAGS_ENCL_LEVEL_VALID (0x0010) +#define MPI26_ENCLS0_FLAGS_MNG_MASK (0x000F) +#define MPI26_ENCLS0_FLAGS_MNG_UNKNOWN (0x0000) +#define MPI26_ENCLS0_FLAGS_MNG_IOC_SES (0x0001) +#define MPI26_ENCLS0_FLAGS_MNG_IOC_SGPIO (0x0002) +#define MPI26_ENCLS0_FLAGS_MNG_EXP_SGPIO (0x0003) +#define MPI26_ENCLS0_FLAGS_MNG_SES_ENCLOSURE (0x0004) +#define MPI26_ENCLS0_FLAGS_MNG_IOC_GPIO (0x0005) + /**************************************************************************** * Log Config Page ****************************************************************************/ @@ -3299,6 +3405,425 @@ typedef struct _MPI2_CONFIG_PAGE_EXT_MAN_PS Mpi2ExtManufacturingPagePS_t, MPI2_POINTER pMpi2ExtManufacturingPagePS_t; /* PageVersion should be provided by product-specific code */ + + +/**************************************************************************** +* values for fields used by several types of PCIe Config Pages +****************************************************************************/ + +/* values for NegotiatedLinkRates fields */ +#define MPI26_PCIE_NEG_LINK_RATE_MASK_PHYSICAL (0x0F) +/* link rates used for Negotiated Physical Link Rate */ +#define MPI26_PCIE_NEG_LINK_RATE_UNKNOWN (0x00) +#define MPI26_PCIE_NEG_LINK_RATE_PHY_DISABLED (0x01) +#define MPI26_PCIE_NEG_LINK_RATE_2_5 (0x02) +#define MPI26_PCIE_NEG_LINK_RATE_5_0 (0x03) +#define MPI26_PCIE_NEG_LINK_RATE_8_0 (0x04) +#define MPI26_PCIE_NEG_LINK_RATE_16_0 (0x05) + + +/**************************************************************************** +* PCIe IO Unit Config Pages (MPI v2.6 and later) +****************************************************************************/ + +/* PCIe IO Unit Page 0 */ + +typedef struct _MPI26_PCIE_IO_UNIT0_PHY_DATA +{ + U8 Link; /* 0x00 */ + U8 LinkFlags; /* 0x01 */ + U8 PhyFlags; /* 0x02 */ + U8 NegotiatedLinkRate; /* 0x03 */ + U32 ControllerPhyDeviceInfo;/* 0x04 */ + U16 AttachedDevHandle; /* 0x08 */ + U16 ControllerDevHandle; /* 0x0A */ + U32 EnumerationStatus; /* 0x0C */ + U32 Reserved1; /* 0x10 */ +} MPI26_PCIE_IO_UNIT0_PHY_DATA, MPI2_POINTER PTR_MPI26_PCIE_IO_UNIT0_PHY_DATA, + Mpi26PCIeIOUnit0PhyData_t, MPI2_POINTER pMpi26PCIeIOUnit0PhyData_t; + +/* + * Host code (drivers, BIOS, utilities, etc.) should leave this define set to + * one and check the value returned for NumPhys at runtime. + */ +#ifndef MPI26_PCIE_IOUNIT0_PHY_MAX +#define MPI26_PCIE_IOUNIT0_PHY_MAX (1) +#endif + +typedef struct _MPI26_CONFIG_PAGE_PIOUNIT_0 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U32 Reserved1; /* 0x08 */ + U8 NumPhys; /* 0x0C */ + U8 InitStatus; /* 0x0D */ + U16 Reserved3; /* 0x0E */ + MPI26_PCIE_IO_UNIT0_PHY_DATA PhyData[MPI26_PCIE_IOUNIT0_PHY_MAX]; /* 0x10 */ +} MPI26_CONFIG_PAGE_PIOUNIT_0, + MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PIOUNIT_0, + Mpi26PCIeIOUnitPage0_t, MPI2_POINTER pMpi26PCIeIOUnitPage0_t; + +#define MPI26_PCIEIOUNITPAGE0_PAGEVERSION (0x00) + +/* values for PCIe IO Unit Page 0 LinkFlags */ +#define MPI26_PCIEIOUNIT0_LINKFLAGS_ENUMERATION_IN_PROGRESS (0x08) + +/* values for PCIe IO Unit Page 0 PhyFlags */ +#define MPI26_PCIEIOUNIT0_PHYFLAGS_PHY_DISABLED (0x08) + +/* use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */ + +/* see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo values */ + +/* values for PCIe IO Unit Page 0 EnumerationStatus */ +#define MPI26_PCIEIOUNIT0_ES_MAX_SWITCHES_EXCEEDED (0x40000000) +#define MPI26_PCIEIOUNIT0_ES_MAX_DEVICES_EXCEEDED (0x20000000) + + +/* PCIe IO Unit Page 1 */ + +typedef struct _MPI26_PCIE_IO_UNIT1_PHY_DATA +{ + U8 Link; /* 0x00 */ + U8 LinkFlags; /* 0x01 */ + U8 PhyFlags; /* 0x02 */ + U8 MaxMinLinkRate; /* 0x03 */ + U32 ControllerPhyDeviceInfo; /* 0x04 */ + U32 Reserved1; /* 0x08 */ +} MPI26_PCIE_IO_UNIT1_PHY_DATA, MPI2_POINTER PTR_MPI26_PCIE_IO_UNIT1_PHY_DATA, + Mpi26PCIeIOUnit1PhyData_t, MPI2_POINTER pMpi26PCIeIOUnit1PhyData_t; + +/* values for LinkFlags */ +#define MPI26_PCIEIOUNIT1_LINKFLAGS_DIS_SRIS (0x00) +#define MPI26_PCIEIOUNIT1_LINKFLAGS_EN_SRIS (0x01) + +/* + * Host code (drivers, BIOS, utilities, etc.) should leave this define set to + * one and check the value returned for NumPhys at runtime. + */ +#ifndef MPI26_PCIE_IOUNIT1_PHY_MAX +#define MPI26_PCIE_IOUNIT1_PHY_MAX (1) +#endif + +typedef struct _MPI26_CONFIG_PAGE_PIOUNIT_1 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U16 ControlFlags; /* 0x08 */ + U16 Reserved; /* 0x0A */ + U16 AdditionalControlFlags; /* 0x0C */ + U16 NVMeMaxQueueDepth; /* 0x0E */ + U8 NumPhys; /* 0x10 */ + U8 Reserved1; /* 0x11 */ + U16 Reserved2; /* 0x12 */ + MPI26_PCIE_IO_UNIT1_PHY_DATA PhyData[MPI26_PCIE_IOUNIT1_PHY_MAX];/* 0x14 */ +} MPI26_CONFIG_PAGE_PIOUNIT_1, + MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PIOUNIT_1, + Mpi26PCIeIOUnitPage1_t, MPI2_POINTER pMpi26PCIeIOUnitPage1_t; + +#define MPI26_PCIEIOUNITPAGE1_PAGEVERSION (0x00) + +/* values for PCIe IO Unit Page 1 PhyFlags */ +#define MPI26_PCIEIOUNIT1_PHYFLAGS_PHY_DISABLE (0x08) +#define MPI26_PCIEIOUNIT1_PHYFLAGS_ENDPOINT_ONLY (0x01) + +/* values for PCIe IO Unit Page 1 MaxMinLinkRate */ +#define MPI26_PCIEIOUNIT1_MAX_RATE_MASK (0xF0) +#define MPI26_PCIEIOUNIT1_MAX_RATE_SHIFT (4) +#define MPI26_PCIEIOUNIT1_MAX_RATE_2_5 (0x20) +#define MPI26_PCIEIOUNIT1_MAX_RATE_5_0 (0x30) +#define MPI26_PCIEIOUNIT1_MAX_RATE_8_0 (0x40) +#define MPI26_PCIEIOUNIT1_MAX_RATE_16_0 (0x50) + +/* see mpi2_pci.h for values for PCIe IO Unit Page 0 ControllerPhyDeviceInfo values */ + + +/**************************************************************************** +* PCIe Switch Config Pages (MPI v2.6 and later) +****************************************************************************/ + +/* PCIe Switch Page 0 */ + +typedef struct _MPI26_CONFIG_PAGE_PSWITCH_0 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U8 PhysicalPort; /* 0x08 */ + U8 Reserved1; /* 0x09 */ + U16 Reserved2; /* 0x0A */ + U16 DevHandle; /* 0x0C */ + U16 ParentDevHandle; /* 0x0E */ + U8 NumPorts; /* 0x10 */ + U8 PCIeLevel; /* 0x11 */ + U16 Reserved3; /* 0x12 */ + U32 Reserved4; /* 0x14 */ + U32 Reserved5; /* 0x18 */ + U32 Reserved6; /* 0x1C */ +} MPI26_CONFIG_PAGE_PSWITCH_0, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PSWITCH_0, + Mpi26PCIeSwitchPage0_t, MPI2_POINTER pMpi26PCIeSwitchPage0_t; + +#define MPI26_PCIESWITCH0_PAGEVERSION (0x00) + + +/* PCIe Switch Page 1 */ + +typedef struct _MPI26_CONFIG_PAGE_PSWITCH_1 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U8 PhysicalPort; /* 0x08 */ + U8 Reserved1; /* 0x09 */ + U16 Reserved2; /* 0x0A */ + U8 NumPorts; /* 0x0C */ + U8 PortNum; /* 0x0D */ + U16 AttachedDevHandle; /* 0x0E */ + U16 SwitchDevHandle; /* 0x10 */ + U8 NegotiatedPortWidth; /* 0x12 */ + U8 NegotiatedLinkRate; /* 0x13 */ + U32 Reserved4; /* 0x14 */ + U32 Reserved5; /* 0x18 */ +} MPI26_CONFIG_PAGE_PSWITCH_1, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PSWITCH_1, + Mpi26PCIeSwitchPage1_t, MPI2_POINTER pMpi26PCIeSwitchPage1_t; + +#define MPI26_PCIESWITCH1_PAGEVERSION (0x00) + +/* use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */ + + +/**************************************************************************** +* PCIe Device Config Pages (MPI v2.6 and later) +****************************************************************************/ + +/* PCIe Device Page 0 */ + +typedef struct _MPI26_CONFIG_PAGE_PCIEDEV_0 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U16 Slot; /* 0x08 */ + U16 EnclosureHandle; /* 0x0A */ + U64 WWID; /* 0x0C */ + U16 ParentDevHandle; /* 0x14 */ + U8 PortNum; /* 0x16 */ + U8 AccessStatus; /* 0x17 */ + U16 DevHandle; /* 0x18 */ + U8 PhysicalPort; /* 0x1A */ + U8 Reserved1; /* 0x1B */ + U32 DeviceInfo; /* 0x1C */ + U32 Flags; /* 0x20 */ + U8 SupportedLinkRates; /* 0x24 */ + U8 MaxPortWidth; /* 0x25 */ + U8 NegotiatedPortWidth; /* 0x26 */ + U8 NegotiatedLinkRate; /* 0x27 */ + U8 EnclosureLevel; /* 0x28 */ + U8 Reserved2; /* 0x29 */ + U16 Reserved3; /* 0x2A */ + U8 ConnectorName[4]; /* 0x2C */ + U32 Reserved4; /* 0x30 */ + U32 Reserved5; /* 0x34 */ +} MPI26_CONFIG_PAGE_PCIEDEV_0, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIEDEV_0, + Mpi26PCIeDevicePage0_t, MPI2_POINTER pMpi26PCIeDevicePage0_t; + +#define MPI26_PCIEDEVICE0_PAGEVERSION (0x01) + +/* values for PCIe Device Page 0 AccessStatus field */ +#define MPI26_PCIEDEV0_ASTATUS_NO_ERRORS (0x00) +#define MPI26_PCIEDEV0_ASTATUS_NEEDS_INITIALIZATION (0x04) +#define MPI26_PCIEDEV0_ASTATUS_CAPABILITY_FAILED (0x02) +#define MPI26_PCIEDEV0_ASTATUS_DEVICE_BLOCKED (0x07) +#define MPI26_PCIEDEV0_ASTATUS_MEMORY_SPACE_ACCESS_FAILED (0x08) +#define MPI26_PCIEDEV0_ASTATUS_UNSUPPORTED_DEVICE (0x09) +#define MPI26_PCIEDEV0_ASTATUS_MSIX_REQUIRED (0x0A) +#define MPI26_PCIEDEV0_ASTATUS_UNKNOWN (0x10) + +#define MPI26_PCIEDEV0_ASTATUS_NVME_READY_TIMEOUT (0x30) +#define MPI26_PCIEDEV0_ASTATUS_NVME_DEVCFG_UNSUPPORTED (0x31) +#define MPI26_PCIEDEV0_ASTATUS_NVME_IDENTIFY_FAILED (0x32) +#define MPI26_PCIEDEV0_ASTATUS_NVME_QCONFIG_FAILED (0x33) +#define MPI26_PCIEDEV0_ASTATUS_NVME_QCREATION_FAILED (0x34) +#define MPI26_PCIEDEV0_ASTATUS_NVME_EVENTCFG_FAILED (0x35) +#define MPI26_PCIEDEV0_ASTATUS_NVME_GET_FEATURE_STAT_FAILED (0x36) +#define MPI26_PCIEDEV0_ASTATUS_NVME_IDLE_TIMEOUT (0x37) +#define MPI26_PCIEDEV0_ASTATUS_NVME_FAILURE_STATUS (0x38) + +#define MPI26_PCIEDEV0_ASTATUS_INIT_FAIL_MAX (0x3F) + +/* see mpi2_pci.h for the MPI26_PCIE_DEVINFO_ defines used for the DeviceInfo field */ + +/* values for PCIe Device Page 0 Flags field */ +#define MPI26_PCIEDEV0_FLAGS_UNAUTHORIZED_DEVICE (0x8000) +#define MPI26_PCIEDEV0_FLAGS_ENABLED_FAST_PATH (0x4000) +#define MPI26_PCIEDEV0_FLAGS_FAST_PATH_CAPABLE (0x2000) +#define MPI26_PCIEDEV0_FLAGS_ASYNCHRONOUS_NOTIFICATION (0x0400) +#define MPI26_PCIEDEV0_FLAGS_ATA_SW_PRESERVATION (0x0200) +#define MPI26_PCIEDEV0_FLAGS_UNSUPPORTED_DEVICE (0x0100) +#define MPI26_PCIEDEV0_FLAGS_ATA_48BIT_LBA_SUPPORTED (0x0080) +#define MPI26_PCIEDEV0_FLAGS_ATA_SMART_SUPPORTED (0x0040) +#define MPI26_PCIEDEV0_FLAGS_ATA_NCQ_SUPPORTED (0x0020) +#define MPI26_PCIEDEV0_FLAGS_ATA_FUA_SUPPORTED (0x0010) +#define MPI26_PCIEDEV0_FLAGS_ENCL_LEVEL_VALID (0x0002) +#define MPI26_PCIEDEV0_FLAGS_DEVICE_PRESENT (0x0001) + +/* values for PCIe Device Page 0 SupportedLinkRates field */ +#define MPI26_PCIEDEV0_LINK_RATE_16_0_SUPPORTED (0x08) +#define MPI26_PCIEDEV0_LINK_RATE_8_0_SUPPORTED (0x04) +#define MPI26_PCIEDEV0_LINK_RATE_5_0_SUPPORTED (0x02) +#define MPI26_PCIEDEV0_LINK_RATE_2_5_SUPPORTED (0x01) + +/* use MPI26_PCIE_NEG_LINK_RATE_ defines for the NegotiatedLinkRate field */ + + +/* PCIe Device Page 2 */ + +typedef struct _MPI26_CONFIG_PAGE_PCIEDEV_2 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U16 DevHandle; /* 0x08 */ + U16 Reserved1; /* 0x0A */ + U32 MaximumDataTransferSize;/* 0x0C */ + U32 Capabilities; /* 0x10 */ + U32 Reserved2; /* 0x14 */ +} MPI26_CONFIG_PAGE_PCIEDEV_2, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIEDEV_2, + Mpi26PCIeDevicePage2_t, MPI2_POINTER pMpi26PCIeDevicePage2_t; + +#define MPI26_PCIEDEVICE2_PAGEVERSION (0x00) + +/* defines for PCIe Device Page 2 Capabilities field */ +#define MPI26_PCIEDEV2_CAP_SGL_FORMAT (0x00000004) +#define MPI26_PCIEDEV2_CAP_BIT_BUCKET_SUPPORT (0x00000002) +#define MPI26_PCIEDEV2_CAP_SGL_SUPPORT (0x00000001) + + +/**************************************************************************** +* PCIe Link Config Pages (MPI v2.6 and later) +****************************************************************************/ + +/* PCIe Link Page 1 */ + +typedef struct _MPI26_CONFIG_PAGE_PCIELINK_1 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U8 Link; /* 0x08 */ + U8 Reserved1; /* 0x09 */ + U16 Reserved2; /* 0x0A */ + U32 CorrectableErrorCount; /* 0x0C */ + U16 NonFatalErrorCount; /* 0x10 */ + U16 Reserved3; /* 0x12 */ + U16 FatalErrorCount; /* 0x14 */ + U16 Reserved4; /* 0x16 */ +} MPI26_CONFIG_PAGE_PCIELINK_1, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIELINK_1, + Mpi26PcieLinkPage1_t, MPI2_POINTER pMpi26PcieLinkPage1_t; + +#define MPI26_PCIELINK1_PAGEVERSION (0x00) + +/* PCIe Link Page 2 */ + +typedef struct _MPI26_PCIELINK2_LINK_EVENT +{ + U8 LinkEventCode; /* 0x00 */ + U8 Reserved1; /* 0x01 */ + U16 Reserved2; /* 0x02 */ + U32 LinkEventInfo; /* 0x04 */ +} MPI26_PCIELINK2_LINK_EVENT, MPI2_POINTER PTR_MPI26_PCIELINK2_LINK_EVENT, + Mpi26PcieLink2LinkEvent_t, MPI2_POINTER pMpi26PcieLink2LinkEvent_t; + +/* use MPI26_PCIELINK3_EVTCODE_ for the LinkEventCode field */ + + +/* + * Host code (drivers, BIOS, utilities, etc.) should leave this define set to + * one and check the value returned for NumLinkEvents at runtime. + */ +#ifndef MPI26_PCIELINK2_LINK_EVENT_MAX +#define MPI26_PCIELINK2_LINK_EVENT_MAX (1) +#endif + +typedef struct _MPI26_CONFIG_PAGE_PCIELINK_2 +{ + MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ + U8 Link; /* 0x08 */ + U8 Reserved1; /* 0x09 */ + U16 Reserved2; /* 0x0A */ + U8 NumLinkEvents; /* 0x0C */ + U8 Reserved3; /* 0x0D */ + U16 Reserved4; /* 0x0E */ + MPI26_PCIELINK2_LINK_EVENT LinkEvent[MPI26_PCIELINK2_LINK_EVENT_MAX]; /* 0x10 */ +} MPI26_CONFIG_PAGE_PCIELINK_2, MPI2_POINTER PTR_MPI26_CONFIG_PAGE_PCIELINK_2, + Mpi26PcieLinkPage2_t, MPI2_POINTER pMpi26PcieLinkPage2_t; + +#define MPI26_PCIELINK2_PAGEVERSION (0x00) + + +/* PCIe Link Page 3 */ + +typedef struct _MPI26_PCIELINK3_LINK_EVENT_CONFIG +{ + U8 LinkEventCode; /* 0x00 */ + U8 Reserved1; /* 0x01 */ + U16 Reserved2; /* 0x02 */ + U8 CounterType; /* 0x04 */ + U8 ThresholdWindow; /* 0x05 */ + U8 TimeUnits; /* 0x06 */ + U8 Reserved3; /* 0x07 */ + U32 EventThreshold; /* 0x08 */ + U16 ThresholdFlags; /* 0x0C */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 15:57:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 855D2B7913E; Thu, 1 Jun 2017 15:57:57 +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 54DDC7FD91; Thu, 1 Jun 2017 15:57:57 +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 v51FvuOu008650; Thu, 1 Jun 2017 15:57:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Fvuum008649; Thu, 1 Jun 2017 15:57:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011557.v51Fvuum008649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 15:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319437 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:57:57 -0000 Author: gjb Date: Thu Jun 1 15:57:56 2017 New Revision: 319437 URL: https://svnweb.freebsd.org/changeset/base/319437 Log: Fix a grammar nit. Submitted by: bjk Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:43:24 2017 (r319436) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:57:56 2017 (r319437) @@ -358,7 +358,7 @@ Installation and Configuration Tools - The &man.bsdinstall.8; installer has + The installer, &man.bsdinstall.8;, has been updated to include support for hidden wireless networks when configuring the &man.wlan.4; interface. From owner-svn-src-all@freebsd.org Thu Jun 1 15:57:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EEA7B79143; Thu, 1 Jun 2017 15:57:58 +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 1CD8C7FD92; Thu, 1 Jun 2017 15:57:58 +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 v51FvvLE008693; Thu, 1 Jun 2017 15:57:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Fvvvp008692; Thu, 1 Jun 2017 15:57:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011557.v51Fvvvp008692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 15:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319438 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:57:58 -0000 Author: gjb Date: Thu Jun 1 15:57:57 2017 New Revision: 319438 URL: https://svnweb.freebsd.org/changeset/base/319438 Log: Fix grammar: s/warning/warnings/ Submitted by: bjk Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:57:56 2017 (r319437) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:57:57 2017 (r319438) @@ -369,8 +369,9 @@ The jail_confwarn - &man.rc.conf.5; entry has been added, which suppresses warning - about obsolete per-&man.jail.8; configurations. + &man.rc.conf.5; entry has been added, which suppresses + warnings about obsolete per-&man.jail.8; + configurations. From owner-svn-src-all@freebsd.org Thu Jun 1 15:57:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13327B7914D; Thu, 1 Jun 2017 15:57:59 +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 D77D87FD93; Thu, 1 Jun 2017 15:57:58 +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 v51Fvwmw008736; Thu, 1 Jun 2017 15:57:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Fvwum008735; Thu, 1 Jun 2017 15:57:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011557.v51Fvwum008735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 15:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319439 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:57:59 -0000 Author: gjb Date: Thu Jun 1 15:57:57 2017 New Revision: 319439 URL: https://svnweb.freebsd.org/changeset/base/319439 Log: Reorder the NAT_T and IPSEC_NAT_T sentences. Submitted by: bjk Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:57:57 2017 (r319438) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:57:57 2017 (r319439) @@ -490,10 +490,10 @@ knob has been added, which when set, excludes build-specific metadata from the kernel, for build reproducibility. - The - IPSEC_NAT_T kernel configuration option has - been removed. Support for NAT-T is now - enabled by default. + Support for NAT-T is now + enabled by default. The IPSEC_NAT_T kernel + configuration option has been removed. The IPSEC_FILTERTUNNEL kernel option has been From owner-svn-src-all@freebsd.org Thu Jun 1 15:57:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFC1CB79157; Thu, 1 Jun 2017 15:57:59 +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 AE1017FD94; Thu, 1 Jun 2017 15:57:59 +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 v51FvwKL008779; Thu, 1 Jun 2017 15:57:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Fvw4c008778; Thu, 1 Jun 2017 15:57:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011557.v51Fvw4c008778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 15:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319440 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:58:00 -0000 Author: gjb Date: Thu Jun 1 15:57:58 2017 New Revision: 319440 URL: https://svnweb.freebsd.org/changeset/base/319440 Log: Document r319435, mpr(4) tri-mode support. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:57:57 2017 (r319439) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:57:58 2017 (r319440) @@ -611,7 +611,10 @@ Storage Drivers -   + The &man.mpr.4; driver has been updated + to support tri-mode + (SAS/SATA/PCIe) + Broadcom® storage adapters. From owner-svn-src-all@freebsd.org Thu Jun 1 15:58:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BFB0B7928A; Thu, 1 Jun 2017 15:58:23 +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 CA4E67FFF3; Thu, 1 Jun 2017 15:58:22 +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 v51FwLj8008840; Thu, 1 Jun 2017 15:58:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51FwLgg008839; Thu, 1 Jun 2017 15:58:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011558.v51FwLgg008839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 15:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319441 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 15:58:23 -0000 Author: gjb Date: Thu Jun 1 15:58:21 2017 New Revision: 319441 URL: https://svnweb.freebsd.org/changeset/base/319441 Log: Document r319436, mpr(4) tri-mode support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:57:58 2017 (r319440) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 15:58:21 2017 (r319441) @@ -299,7 +299,10 @@ Storage Drivers - + The &man.mpr.4; driver has been updated + to support tri-mode + (SAS/SATA/PCIe) + Broadcom® storage adapters. From owner-svn-src-all@freebsd.org Thu Jun 1 16:02:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCD10B794FF; Thu, 1 Jun 2017 16:02:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::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 9D36C805D1; Thu, 1 Jun 2017 16:02:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id w69so7357514pfk.1; Thu, 01 Jun 2017 09:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Fd6bi4m28giFDV99hoBLJUfU8tIWGeTxQAYWNeIygcs=; b=I579PQo17ZOOEumyvHhyA/um5vpN/TjqLLO43ysPTCTnK4u/hcq7TtJxVYegwLDnyi RfEKNFKppp8ShFHM2uX2Kj1KTfOHOe5hLdMhlNs2JY2FMvWkmHH1a1049Y4q4bPzuVkk kXSDIqDIQammfPGP3Q/rJbuYqJTPASUj+GF5wuLPutM411H3ElITKuHlhWKDKwCePi6k ThMyEM+Wd1qyeV/uIiPW7Ajk9ZBKSQepIrE0w5C/bVMYIkF/fvs1UWNpHJosEbT2zyRB na3sWzOuRLnMXS5pC2R3bN/vKLHXDhI2CYp3IRH/m0Olctq6cBolr4AzOXrgN/6pRq64 OgzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Fd6bi4m28giFDV99hoBLJUfU8tIWGeTxQAYWNeIygcs=; b=njAGPRYefAxKUSFXQirdy6NKledhz44wB8St1wu/yqeCIDVvH6+XpBjAdkDwKxPUPJ ADDm4Ty1AFyI3wggCO3TZKjnBlSH3TnB9qDLYwg3XPxDdJmGUyL4tJnHDBFGgMXqnY4R eMMFqaIPgGmGCQET8F+PxNL4Toj8dmSWawQ0qIEUBQKPjS0tgBZzOtc75mqK8CqhwD62 4WALjNgFGGH/VB0MD6LhCPo9QL2zswzk5vmgWeZJv+sU9RK7Xkh22bhKI4WyC4MT1QHB W1pIoj09x6CalKFheDnk39NPlghKi3uR0H9BzIwIHT8OCyZe+eLU8NLeiaFytxFRercX o0ZQ== X-Gm-Message-State: AODbwcB0iEG0Qyo1/vzPf2UHTWxvVQkDe1Hwy0C3iL3h/4Mz9+WhyFfZ 78xfAVBf5AnaqZ+e6kk= X-Received: by 10.99.114.66 with SMTP id c2mr1768656pgn.130.1496332923642; Thu, 01 Jun 2017 09:02:03 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e124sm34485391pfc.64.2017.06.01.09.02.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 09:02:02 -0700 (PDT) Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests From: Ngie Cooper X-Mailer: iPhone Mail (14F89) In-Reply-To: <7BA69054-D85F-49B5-8EB0-948DFC1A998E@xcllnt.net> Date: Thu, 1 Jun 2017 09:02:02 -0700 Cc: Alan Somers , Brooks Davis , Ngie Cooper , Marcel Moolenaar , "Simon J. Gerraty" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <4B2F447B-6BBF-4716-A329-7B748F963E6A@gmail.com> References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> <78A8D734-A627-437D-AE63-BA94C543C36B@xcllnt.net> <7BA69054-D85F-49B5-8EB0-948DFC1A998E@xcllnt.net> To: Marcel Moolenaar Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 16:02:04 -0000 > On Jun 1, 2017, at 08:35, Marcel Moolenaar wrote: >=20 >=20 >> On Jun 1, 2017, at 8:32 AM, Alan Somers wrote: ... >> If the files are binary, then why not store them as binary files? >=20 > A 100MB image, committed as binary file is 100MB of data. The hexdump -C > equivalent is often only a few hundred bytes (due to the many zeroes). > The repo bloat argument has grounds for binary files. hexdump still has a number of formatting bugs... I guess I should go back an= d write some tests/fix the issues, almost a decade after I tried to take the= m on originally... Thanks! -Ngie= From owner-svn-src-all@freebsd.org Thu Jun 1 16:03:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CC0EB79589; Thu, 1 Jun 2017 16:03:03 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75A2080780; Thu, 1 Jun 2017 16:03:03 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51G32sU012655; Thu, 1 Jun 2017 16:03:02 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51G32Tp012650; Thu, 1 Jun 2017 16:03:02 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201706011603.v51G32Tp012650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 1 Jun 2017 16:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319442 - in stable/11/lib: libc/gen libc/include libthr/thread X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 16:03:03 -0000 Author: vangyzen Date: Thu Jun 1 16:03:01 2017 New Revision: 319442 URL: https://svnweb.freebsd.org/changeset/base/319442 Log: MFC r318582 Remove old spinlock_debug code from libc This no longer seems useful. Remove it. This was prompted by a "cast discards volatile qualifier" warning in libthr when WARNS=6. Sponsored by: Dell EMC Modified: stable/11/lib/libc/gen/Symbol.map stable/11/lib/libc/gen/_spinlock_stub.c stable/11/lib/libc/include/spinlock.h stable/11/lib/libthr/thread/thr_init.c stable/11/lib/libthr/thread/thr_spinlock.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/Symbol.map ============================================================================== --- stable/11/lib/libc/gen/Symbol.map Thu Jun 1 15:58:21 2017 (r319441) +++ stable/11/lib/libc/gen/Symbol.map Thu Jun 1 16:03:01 2017 (r319442) @@ -489,7 +489,6 @@ FBSDprivate_1.0 { _pthread_sigmask; _pthread_testcancel; _spinlock; - _spinlock_debug; _spinunlock; _rtld_addr_phdr; _rtld_atfork_pre; Modified: stable/11/lib/libc/gen/_spinlock_stub.c ============================================================================== --- stable/11/lib/libc/gen/_spinlock_stub.c Thu Jun 1 15:58:21 2017 (r319441) +++ stable/11/lib/libc/gen/_spinlock_stub.c Thu Jun 1 16:03:01 2017 (r319442) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); long _atomic_lock_stub(volatile long *); void _spinlock_stub(spinlock_t *); void _spinunlock_stub(spinlock_t *); -void _spinlock_debug_stub(spinlock_t *, char *, int); __weak_reference(_atomic_lock_stub, _atomic_lock); @@ -48,7 +47,6 @@ _atomic_lock_stub(volatile long *lck __unused) return (0L); } -__weak_reference(_spinlock, _spinlock_debug); #pragma weak _spinlock void _spinlock(spinlock_t *lck) Modified: stable/11/lib/libc/include/spinlock.h ============================================================================== --- stable/11/lib/libc/include/spinlock.h Thu Jun 1 15:58:21 2017 (r319441) +++ stable/11/lib/libc/include/spinlock.h Thu Jun 1 16:03:01 2017 (r319442) @@ -41,21 +41,17 @@ * Lock structure with room for debugging information. */ struct _spinlock { - volatile long access_lock; - volatile long lock_owner; - volatile char *fname; - volatile int lineno; + long spare1; + long spare2; + void *thr_extra; + int spare3; }; typedef struct _spinlock spinlock_t; #define _SPINLOCK_INITIALIZER { 0, 0, 0, 0 } #define _SPINUNLOCK(_lck) _spinunlock(_lck); -#ifdef _LOCK_DEBUG -#define _SPINLOCK(_lck) _spinlock_debug(_lck, __FILE__, __LINE__) -#else #define _SPINLOCK(_lck) _spinlock(_lck) -#endif /* * Thread function prototype definitions: @@ -64,7 +60,6 @@ __BEGIN_DECLS long _atomic_lock(volatile long *); void _spinlock(spinlock_t *); void _spinunlock(spinlock_t *); -void _spinlock_debug(spinlock_t *, char *, int); __END_DECLS #endif /* _SPINLOCK_H_ */ Modified: stable/11/lib/libthr/thread/thr_init.c ============================================================================== --- stable/11/lib/libthr/thread/thr_init.c Thu Jun 1 15:58:21 2017 (r319441) +++ stable/11/lib/libthr/thread/thr_init.c Thu Jun 1 16:03:01 2017 (r319442) @@ -173,7 +173,6 @@ STATIC_LIB_REQUIRE(_sigtimedwait); STATIC_LIB_REQUIRE(_sigwait); STATIC_LIB_REQUIRE(_sigwaitinfo); STATIC_LIB_REQUIRE(_spinlock); -STATIC_LIB_REQUIRE(_spinlock_debug); STATIC_LIB_REQUIRE(_spinunlock); STATIC_LIB_REQUIRE(_thread_init_hack); Modified: stable/11/lib/libthr/thread/thr_spinlock.c ============================================================================== --- stable/11/lib/libthr/thread/thr_spinlock.c Thu Jun 1 15:58:21 2017 (r319441) +++ stable/11/lib/libthr/thread/thr_spinlock.c Thu Jun 1 16:03:01 2017 (r319442) @@ -65,7 +65,7 @@ __thr_spinunlock(spinlock_t *lck) { struct spinlock_extra *_extra; - _extra = (struct spinlock_extra *)lck->fname; + _extra = lck->thr_extra; THR_UMUTEX_UNLOCK(_get_curthread(), &_extra->lock); } @@ -78,9 +78,9 @@ __thr_spinlock(spinlock_t *lck) PANIC("Spinlock called when not threaded."); if (!initialized) PANIC("Spinlocks not initialized."); - if (lck->fname == NULL) + if (lck->thr_extra == NULL) init_spinlock(lck); - _extra = (struct spinlock_extra *)lck->fname; + _extra = lck->thr_extra; THR_UMUTEX_LOCK(_get_curthread(), &_extra->lock); } @@ -90,14 +90,14 @@ init_spinlock(spinlock_t *lck) struct pthread *curthread = _get_curthread(); THR_UMUTEX_LOCK(curthread, &spinlock_static_lock); - if ((lck->fname == NULL) && (spinlock_count < MAX_SPINLOCKS)) { - lck->fname = (char *)&extra[spinlock_count]; + if ((lck->thr_extra == NULL) && (spinlock_count < MAX_SPINLOCKS)) { + lck->thr_extra = &extra[spinlock_count]; _thr_umutex_init(&extra[spinlock_count].lock); extra[spinlock_count].owner = lck; spinlock_count++; } THR_UMUTEX_UNLOCK(curthread, &spinlock_static_lock); - if (lck->fname == NULL) + if (lck->thr_extra == NULL) PANIC("Warning: exceeded max spinlocks"); } From owner-svn-src-all@freebsd.org Thu Jun 1 16:17:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C606BB79B0A; Thu, 1 Jun 2017 16:17:47 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8268C811BB; Thu, 1 Jun 2017 16:17:47 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 49F255A9F12; Thu, 1 Jun 2017 16:17:46 +0000 (UTC) Date: Thu, 1 Jun 2017 16:17:46 +0000 From: Brooks Davis To: Marcel Moolenaar Cc: "Ngie Cooper (yaneurabeya)" , Ngie Cooper , Marcel Moolenaar , "Simon J. Gerraty" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests Message-ID: <20170601161746.GB60464@spindle.one-eyed-alien.net> References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> <78A8D734-A627-437D-AE63-BA94C543C36B@xcllnt.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: <78A8D734-A627-437D-AE63-BA94C543C36B@xcllnt.net> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 16:17:47 -0000 --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 01, 2017 at 08:11:45AM -0700, Marcel Moolenaar wrote: >=20 > > On May 31, 2017, at 11:06 PM, Ngie Cooper (yaneurabeya) wrote: > >=20 > >=20 > >> On May 31, 2017, at 10:03 PM, Brooks Davis wrote: > >>=20 > >> On Wed, May 31, 2017 at 08:01:12AM +0000, Ngie Cooper wrote: > >>> Author: ngie > >>> Date: Wed May 31 08:01:12 2017 > >>> New Revision: 319295 > >>> URL: https://svnweb.freebsd.org/changeset/base/319295 > >>>=20 > >>> Log: > >>> Update the usr.bin/mkimg golden test output files after ^/head@r319125 > >>>=20 > >>> ^/head@r319125 changed the location of the backup pmbr, requiring the > >>> output files to be regenerated, since they're binary disk dumps. > >>>=20 > >>> The output files were regenerated with "make rebase"--fixed in > >>> ^/head@r319294. > >>=20 > >> These should not be stored uuencoded. It serves no purpose other > >> than bloating the repo and causing spammy commit mails like this one > >> where we got a huge tail of garbage output. > >=20 > > Hi Brooks, > > I???m not entirely sure why the files were uuencoded to be honest. I t= hink that???s a good question for Marcel and some of the folks at Juniper, = since they wrote the tool/tests. >=20 > Result files used to start off as binary files. uuencoding is a given in= that case. I eventually switched to using hexdump -C, because that makes = it easier to analyze and understand differences. The uuencoding was kept t= o remain independent of version control system, file attributes and end-of-= line characteristics of the host machine: nothing more annoying that checki= ng out textual result files and have test failures because ???\n??? was rep= laced by ???\r\n???. >=20 > Even if the files aren???t unencoded, there???s always someone who treats= it as spammy and a tail of garbage. It???s just a knee-jerk reaction to se= eing something that isn???t understood, I think. As such, there???s no reas= on to change ??? in fact, changing would be bloating the repo. hexdump -C would make sense. Direct commits of the compressed files would also make sense. Uuencoding gzip'd data is absurd given that we don't (and never again will) support repositories that don't support binary data. The diffs produced are meaningless. I don't advocate replacing these files agressively, but when updating files we should be thinking about switching away from uuencoding. -- Brooks --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJZMD4pAAoJEKzQXbSebgfAjW4H+QGMqrRUeCAi0jQlsSwDFR3W qF1MLBfpnHrUKBqbbqfd+8Pd6SHlZN/9zdE6JX+8P1b/ymZnKHuZhDAyBSxDqUje 5gWFJBFCFECSeWSztGi40CWb+bW2XnbKwH/1HkdeVHzZS+o7OYSSL8cxgtJ2Kw7i i+1juzJjRaGtfW9rVjMOmPg2Kk38WXCYFqlFGXE3tcOIXVVoGG7+hAavqlUpp78h XZzQaW7OKJwc0LDDfldbiwsR6G2HKsakHaxGNKqRCDhzSkZOxuzj5NKnI8GMKlBN moAykgnQJtwB1LDlcuf1/WQpyBZtdY8NBtVdoGXUMspMWY64rrZJbx1CVHtVyCs= =kDef -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx-- From owner-svn-src-all@freebsd.org Thu Jun 1 16:33:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE72FB7A165; Thu, 1 Jun 2017 16:33:38 +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 BDCA581BE4; Thu, 1 Jun 2017 16:33:38 +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 v51GXapQ037136; Thu, 1 Jun 2017 09:33:36 -0700 (PDT) (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 v51GXaAf037135; Thu, 1 Jun 2017 09:33:36 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201706011633.v51GXaAf037135@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r319426 - stable/11/release/doc/en_US.ISO8859-1/relnotes In-Reply-To: <201706011439.v51EdC0R074525@repo.freebsd.org> To: Glen Barber Date: Thu, 1 Jun 2017 09:33:36 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 16:33:39 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: gjb > Date: Thu Jun 1 14:39:12 2017 > New Revision: 319426 > URL: https://svnweb.freebsd.org/changeset/base/319426 > > Log: > Document r305845, UEFI boot loader build reproducibility. > Document r307631, groff(1) reproducibility fixes. You should also document that Groff is being depricated in 12.0 > Document r309183, makewhatis(1) reproducibility fixes. > Document r312249, newvers.sh reproducibility fixes. > Document r312730, WITH_REPRODUCIBLE_BUILD src.conf(5) knob. > > Submitted by: emaste > > Sponsored by: The FreeBSD Foundation > > Modified: > stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml > > Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml > ============================================================================== > --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:11 2017 (r319425) > +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 14:39:12 2017 (r319426) > @@ -255,6 +255,10 @@ > ELF Tool Chain has been updated to upstream > revision r3490. > > + &man.groff.1; has been updated to use > + the changelog date rather than file modification date in > + manual pages for build reproducibility. > + > &man.unbound.8; has been updated to > version 1.5.10. > > @@ -262,6 +266,10 @@ > the exit status when multiple files are provided as arguments, > and an error is encountered before the last file. > > + + sponsor="&ff;">&man.makewhatis.1; has been updated to produce > + build-reproducible output. > + > Subversion > has been updated to version 1.9.5. > > @@ -453,6 +461,11 @@ > > The kern.proc.nfds > &man.sysctl.8; is now permitted in capability mode. > + > + The > + sys/conf/newvers.sh script has been > + updated with an option to exclude build-specific metadata from > + the kernel for build reproducibility. > > > > @@ -467,6 +480,11 @@ > > Kernel Configuration > > + The > + WITH_REPRODUCIBLE_BUILD &man.src.conf.5; > + knob has been added, which when set, excludes build-specific > + metadata from the kernel, for build reproducibility. > + > The > IPSEC_NAT_T kernel configuration option has > been removed. Support for NAT-T is now > @@ -790,6 +808,10 @@ > > > Boot Loader Changes > + > + The > + UEFI boot loader has been updated for build > + reproducibility. > > The > EFI loader has been updated to support > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Jun 1 16:44:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5A29B7A39E; Thu, 1 Jun 2017 16:44:40 +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 954E5820CB; Thu, 1 Jun 2017 16:44:40 +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 v51GidRW029412; Thu, 1 Jun 2017 16:44:39 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51GidaT029411; Thu, 1 Jun 2017 16:44:39 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201706011644.v51GidaT029411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Thu, 1 Jun 2017 16:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319443 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 16:44:40 -0000 Author: stevek Date: Thu Jun 1 16:44:39 2017 New Revision: 319443 URL: https://svnweb.freebsd.org/changeset/base/319443 Log: When sysctlbyname fails, free buf before returning. Submitted by: Thomas Rix Reviewed by: jhb Approved by: sjg (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9867 Modified: head/lib/libutil/kinfo_getvmobject.c Modified: head/lib/libutil/kinfo_getvmobject.c ============================================================================== --- head/lib/libutil/kinfo_getvmobject.c Thu Jun 1 16:03:01 2017 (r319442) +++ head/lib/libutil/kinfo_getvmobject.c Thu Jun 1 16:44:39 2017 (r319443) @@ -46,8 +46,10 @@ kinfo_getvmobject(int *cntp) buf = NULL; for (i = 0; i < 3; i++) { - if (sysctlbyname("vm.objects", NULL, &len, NULL, 0) < 0) + if (sysctlbyname("vm.objects", NULL, &len, NULL, 0) < 0) { + free(buf); return (NULL); + } buf = reallocf(buf, len); if (buf == NULL) return (NULL); From owner-svn-src-all@freebsd.org Thu Jun 1 16:49:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B409AB7A426; Thu, 1 Jun 2017 16:49:49 +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 842A3822AC; Thu, 1 Jun 2017 16:49:49 +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 v51GnmkW029672; Thu, 1 Jun 2017 16:49:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51GnmT5029670; Thu, 1 Jun 2017 16:49:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706011649.v51GnmT5029670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 1 Jun 2017 16:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319444 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 16:49:49 -0000 Author: hselasky Date: Thu Jun 1 16:49:48 2017 New Revision: 319444 URL: https://svnweb.freebsd.org/changeset/base/319444 Log: Make sure the selrecord() function is only called from within system polling contexts in the LinuxKPI. After the kqueue() support was added to the LinuxKPI in r319409 the Linux poll file operation will be used outside the system file polling callback function, which can cause a NULL-pointer panic inside selrecord() because curthread->td_sel is set to NULL. This patch moves the selrecord() call away from poll_wait() and to the system file poll callback function in the LinuxKPI, which essentially wraps the Linux one. This is similar to what the cuse(3) module is currently doing. Refer to sys/fs/cuse/*.[ch] for more details. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/poll.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/poll.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/poll.h Thu Jun 1 16:44:39 2017 (r319443) +++ head/sys/compat/linuxkpi/common/include/linux/poll.h Thu Jun 1 16:49:48 2017 (r319444) @@ -43,7 +43,7 @@ typedef struct poll_table_struct { static inline void poll_wait(struct linux_file *filp, wait_queue_head_t *wait_address, poll_table *p) { - selrecord(curthread, &filp->f_selinfo); + /* NOP */ } extern void linux_poll_wakeup(struct linux_file *); Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Jun 1 16:44:39 2017 (r319443) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Jun 1 16:49:48 2017 (r319444) @@ -956,9 +956,10 @@ linux_dev_poll(struct cdev *dev, int events, struct th file = td->td_fpop; filp->f_flags = file->f_flag; linux_set_current(td); - if (filp->f_op->poll) + if (filp->f_op->poll != NULL) { + selrecord(td, &filp->f_selinfo); revents = filp->f_op->poll(filp, NULL) & events; - else + } else revents = 0; return (revents); @@ -1263,9 +1264,10 @@ linux_file_poll(struct file *file, int events, struct filp = (struct linux_file *)file->f_data; filp->f_flags = file->f_flag; linux_set_current(td); - if (filp->f_op->poll) + if (filp->f_op->poll != NULL) { + selrecord(td, &filp->f_selinfo); revents = filp->f_op->poll(filp, NULL) & events; - else + } else revents = 0; return (revents); From owner-svn-src-all@freebsd.org Thu Jun 1 16:54:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93B05B7A5E3; Thu, 1 Jun 2017 16:54:12 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 364AC82685; Thu, 1 Jun 2017 16:54:12 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51GsBQa033551; Thu, 1 Jun 2017 16:54:11 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51GsBjP033546; Thu, 1 Jun 2017 16:54:11 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201706011654.v51GsBjP033546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Thu, 1 Jun 2017 16:54:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319445 - in stable/10: share/man/man4 sys/dev/mpr sys/dev/mps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 16:54:12 -0000 Author: slm Date: Thu Jun 1 16:54:10 2017 New Revision: 319445 URL: https://svnweb.freebsd.org/changeset/base/319445 Log: MFC r318895: Fix several problems with mapping code in mps(4). MFC r318896: Fix several problems with mapping code in mpr(4). -Add several comments describing what the mapping code is doing. -Added a callout timer to improve check for missing devices when discovery has completed so that missing counts are incremented correctly. -Fix problems with missing counts not being saved to the HBA. -Update man pages mps(4) and mpr(4) to include a description of the use use_phy_num sysctl variable. -Remove channel field in the mapping structure because it's not used. -Improve logging by using mps_dprint or mpr_dprint instead of printf and adding more logging where appropriate. -Add check for a bad index before writing mapping entries to controller. -The high missing count check in the mapping table was using the incorrect initial value, which could lead to a bad result. -The usage of the IN_USE flag for volume mapping was changed to be more intuitive, and was not being used correctly. -The check for a free DPM entry was changed, as this was completely wrong. -Updates to the missing count for volumes were not being done correctly, so this function was completely rewritten. -_mapping_add_to_removal_table() was overly complicated and incorrectly used, so this function was rewritten. -Missing counts for all devices were not being incremented properly, so this functionality was added. -The search for space in the mapping table for missing enclosures was not calculating the found space correctly due to not breaking out of a loop when required, and the num_found variable was not being reset when needed. -Retries when a device fails to get added due to a full mapping table were removed because this is unneccessary. -mps_mapping_is_reinit_required() and mpr_mapping_is_reinit_required() were removed because they were not being used. -Some functions were renamed to avoid confusion between Target IDs and SAS IDs. -_mapping_check_update_ir_mt_idx() was removed because it was overly complicating volume mapping. -The setting of the maxtargets variable was changed to include max volumes. -The setting of the initiator_id variable was changed to be the invalid target ID after all targets, including volumes. Previously, this was set to the last valid target ID. -Don't exclude target IDs of RAID components or check for a reuse of a target ID for RAID components. -Some endienness was added. Approved by: ken, mav Modified: stable/10/share/man/man4/mpr.4 stable/10/share/man/man4/mps.4 stable/10/sys/dev/mpr/mpr.c stable/10/sys/dev/mpr/mpr_mapping.c stable/10/sys/dev/mpr/mpr_sas.c stable/10/sys/dev/mpr/mpr_sas_lsi.c stable/10/sys/dev/mpr/mpr_user.c stable/10/sys/dev/mpr/mprvar.h stable/10/sys/dev/mps/mps.c stable/10/sys/dev/mps/mps_mapping.c stable/10/sys/dev/mps/mps_sas.c stable/10/sys/dev/mps/mps_sas_lsi.c stable/10/sys/dev/mps/mps_user.c stable/10/sys/dev/mps/mpsvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/mpr.4 ============================================================================== --- stable/10/share/man/man4/mpr.4 Thu Jun 1 16:49:48 2017 (r319444) +++ stable/10/share/man/man4/mpr.4 Thu Jun 1 16:54:10 2017 (r319445) @@ -1,8 +1,8 @@ .\" .\" Copyright (c) 2010 Spectra Logic Corporation .\" Copyright (c) 2014 LSI Corp -.\" Copyright (c) 2017 Avago Technologies -.\" Copyright (c) 2017 Broadcom Ltd. +.\" Copyright (c) 2015-2017 Avago Technologies +.\" Copyright (c) 2015-2017 Broadcom Ltd. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ .\" $Id$ .\" $FreeBSD$ .\" -.Dd May 17, 2017 +.Dd May 25, 2017 .Dt MPR 4 .Os .Sh NAME Modified: stable/10/share/man/man4/mps.4 ============================================================================== --- stable/10/share/man/man4/mps.4 Thu Jun 1 16:49:48 2017 (r319444) +++ stable/10/share/man/man4/mps.4 Thu Jun 1 16:54:10 2017 (r319445) @@ -1,8 +1,8 @@ .\" .\" Copyright (c) 2010 Spectra Logic Corporation .\" Copyright (c) 2014 LSI Corp -.\" Copyright (c) 2016 Avago Technologies -.\" Copyright (c) 2016 Broadcom Ltd. +.\" Copyright (c) 2015-2017 Avago Technologies +.\" Copyright (c) 2015-2017 Broadcom Ltd. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ .\" $FreeBSD$ .\" -.Dd July 5, 2016 +.Dd May 25, 2017 .Dt MPS 4 .Os .Sh NAME @@ -243,13 +243,13 @@ Send SSU to HDDs, but not to SSDs. Send SSU to both HDDs and SSDs. .El .Pp -To control the feature for a specific adapter, set this tunable value in +To control this feature for a specific adapter, set this tunable value in .Xr loader.conf 5 : .Bd -literal -offset indent dev.mps.X.enable_ssu .Ed .Pp -The same set of values are valid when setting this tunable for all adapters. +The same set of values are valid as when setting this tunable for all adapters. .Pp SATA disks that take several seconds to spin up and fail the SATA Identify command might not be discovered by the driver. @@ -275,6 +275,45 @@ dev.mps.X.spinup_wait_time=NNNN tunable. NNNN is the number of seconds to wait for SATA devices to spin up when they fail the initial SATA Identify command. +.Pp +The driver can map devices discovered by the adapter so that target IDs +corresponding to a specific device persist across resets and reboots. +In some cases it is possible for devices to lose their mapped IDs due to +unexpected behavior from certain hardware, such as some types of enclosures. +To overcome this problem, a tunable is provided that will force the driver to +map devices using the Phy number associated with the device. +This feature is not recommended if the topology includes multiple +enclosures/expanders. +If multiple enclosures/expanders are present in the topology, Phy numbers are +repeated, causing all devices at these Phy numbers except the first device to +fail enumeration. +To control this feature for all adapters, set the +.Bd -literal -offset indent +hw.mps.use_phy_num +.Ed +.Pp +tunable in +.Xr loader.conf 5 +to one of these values: +.Bl -tag -width 6n -offset indent +.It -1 +Only use Phy numbers to map devices and bypass the driver's mapping logic. +.It 0 +Never use Phy numbers to map devices. +.It 1 +Use Phy numbers to map devices, but only if the driver's mapping logic fails +to map the device that is being enumerated. +This is the default value. +.El +.Pp +To control this feature for a specific adapter, set this tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mps.X.use_phy_num +.Ed +.Pp +The same set of values are valid as when setting this tunable for all adapters. +.Pp .Sh DEBUGGING To enable debugging prints from the .Nm Modified: stable/10/sys/dev/mpr/mpr.c ============================================================================== --- stable/10/sys/dev/mpr/mpr.c Thu Jun 1 16:49:48 2017 (r319444) +++ stable/10/sys/dev/mpr/mpr.c Thu Jun 1 16:54:10 2017 (r319445) @@ -520,7 +520,8 @@ mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t at */ if (reallocating) { mpr_iocfacts_free(sc); - mprsas_realloc_targets(sc, saved_facts.MaxTargets); + mprsas_realloc_targets(sc, saved_facts.MaxTargets + + saved_facts.MaxVolumes); } /* @@ -1663,6 +1664,7 @@ mpr_attach(struct mpr_softc *sc) mtx_init(&sc->mpr_mtx, "MPR lock", NULL, MTX_DEF); callout_init_mtx(&sc->periodic, &sc->mpr_mtx, 0); + callout_init_mtx(&sc->device_check_callout, &sc->mpr_mtx, 0); TAILQ_INIT(&sc->event_list); timevalclear(&sc->lastfail); @@ -1832,6 +1834,7 @@ mpr_free(struct mpr_softc *sc) mpr_unlock(sc); /* Lock must not be held for this */ callout_drain(&sc->periodic); + callout_drain(&sc->device_check_callout); if (((error = mpr_detach_log(sc)) != 0) || ((error = mpr_detach_sas(sc)) != 0)) Modified: stable/10/sys/dev/mpr/mpr_mapping.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_mapping.c Thu Jun 1 16:49:48 2017 (r319444) +++ stable/10/sys/dev/mpr/mpr_mapping.c Thu Jun 1 16:54:10 2017 (r319445) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include /** - * _mapping_clear_entry - Clear a particular mapping entry. + * _mapping_clear_map_entry - Clear a particular mapping entry. * @map_entry: map table entry * * Returns nothing. @@ -73,7 +73,6 @@ _mapping_clear_map_entry(struct dev_mapping_table *map map_entry->phy_bits = 0; map_entry->dpm_entry_num = MPR_DPM_BAD_IDX; map_entry->dev_handle = 0; - map_entry->channel = -1; map_entry->id = -1; map_entry->missing_count = 0; map_entry->init_complete = 0; @@ -140,12 +139,15 @@ _mapping_commit_enc_entry(struct mpr_softc *sc, dpm_entry->PhysicalBitsMapping = htole32(et_entry->phy_bits); dpm_entry->Reserved1 = 0; + mpr_dprint(sc, MPR_MAPPING, "%s: Writing DPM entry %d for enclosure.\n", + __func__, et_entry->dpm_entry_num); memcpy(&config_page.Entry, (u8 *)dpm_entry, sizeof(Mpi2DriverMap0Entry_t)); if (mpr_config_set_dpm_pg0(sc, &mpi_reply, &config_page, et_entry->dpm_entry_num)) { - printf("%s: write of dpm entry %d for enclosure failed\n", - __func__, et_entry->dpm_entry_num); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Write of DPM " + "entry %d for enclosure failed.\n", __func__, + et_entry->dpm_entry_num); dpm_entry->MappingInformation = le16toh(dpm_entry-> MappingInformation); dpm_entry->DeviceIndex = le16toh(dpm_entry->DeviceIndex); @@ -164,7 +166,7 @@ _mapping_commit_enc_entry(struct mpr_softc *sc, /** * _mapping_commit_map_entry - write a particular map table entry in DPM page0. * @sc: per adapter object - * @enc_entry: enclosure table entry + * @mt_entry: mapping table entry * * Returns 0 for success, non-zero for failure. */ @@ -180,6 +182,19 @@ _mapping_commit_map_entry(struct mpr_softc *sc, if (!sc->is_dpm_enable) return 0; + /* + * It's possible that this Map Entry points to a BAD DPM index. This + * can happen if the Map Entry is a for a missing device and the DPM + * entry that was being used by this device is now being used by some + * new device. So, check for a BAD DPM index and just return if so. + */ + if (mt_entry->dpm_entry_num == MPR_DPM_BAD_IDX) { + mpr_dprint(sc, MPR_MAPPING, "%s: DPM entry location for target " + "%d is invalid. DPM will not be written.\n", __func__, + mt_entry->id); + return 0; + } + memset(&config_page, 0, sizeof(Mpi2DriverMappingPage0_t)); memcpy(&config_page.Header, (u8 *)sc->dpm_pg0, sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -193,13 +208,16 @@ _mapping_commit_map_entry(struct mpr_softc *sc, dpm_entry->MappingInformation = htole16(mt_entry->missing_count); dpm_entry->PhysicalBitsMapping = 0; dpm_entry->Reserved1 = 0; - dpm_entry->MappingInformation = htole16(dpm_entry->MappingInformation); memcpy(&config_page.Entry, (u8 *)dpm_entry, sizeof(Mpi2DriverMap0Entry_t)); + + mpr_dprint(sc, MPR_MAPPING, "%s: Writing DPM entry %d for target %d.\n", + __func__, mt_entry->dpm_entry_num, mt_entry->id); if (mpr_config_set_dpm_pg0(sc, &mpi_reply, &config_page, mt_entry->dpm_entry_num)) { - printf("%s: write of dpm entry %d for device failed\n", - __func__, mt_entry->dpm_entry_num); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Write of DPM " + "entry %d for target %d failed.\n", __func__, + mt_entry->dpm_entry_num, mt_entry->id); dpm_entry->MappingInformation = le16toh(dpm_entry-> MappingInformation); dpm_entry->DeviceIndex = le16toh(dpm_entry->DeviceIndex); @@ -307,7 +325,7 @@ _mapping_get_high_missing_et_idx(struct mpr_softc *sc) et_entry = &sc->enclosure_table[enc_idx]; if ((et_entry->missing_count > high_missing_count) && !et_entry->skip_search) { - high_missing_count = et_entry->missing_count; + high_missing_count = et_entry->missing_count; high_idx = enc_idx; } } @@ -326,7 +344,7 @@ _mapping_get_high_missing_et_idx(struct mpr_softc *sc) static u32 _mapping_get_high_missing_mt_idx(struct mpr_softc *sc) { - u32 map_idx, high_idx = MPR_ENCTABLE_BAD_IDX; + u32 map_idx, high_idx = MPR_MAPTABLE_BAD_IDX; u8 high_missing_count = 0; u32 start_idx, end_idx, start_idx_ir, end_idx_ir; struct dev_mapping_table *mt_entry; @@ -370,7 +388,7 @@ _mapping_get_ir_mt_idx_from_wwid(struct mpr_softc *sc, _mapping_get_ir_maprange(sc, &start_idx, &end_idx); mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) + for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) if (mt_entry->physical_id == wwid) return map_idx; @@ -458,20 +476,31 @@ _mapping_get_free_ir_mt_idx(struct mpr_softc *sc) u32 high_idx = MPR_MAPTABLE_BAD_IDX; struct dev_mapping_table *mt_entry; + /* + * The IN_USE flag should be clear if the entry is available to use. + * This flag is cleared on initialization and and when a volume is + * deleted. All other times this flag should be set. If, for some + * reason, a free entry cannot be found, look for the entry with the + * highest missing count just in case there is one. + */ _mapping_get_ir_maprange(sc, &start_idx, &end_idx); - mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) + for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) { if (!(mt_entry->device_info & MPR_MAP_IN_USE)) return map_idx; - mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) { if (mt_entry->missing_count > high_missing_count) { high_missing_count = mt_entry->missing_count; high_idx = map_idx; } } + + if (high_idx == MPR_MAPTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Could not find a " + "free entry in the mapping table for a Volume. The mapping " + "table is probably corrupt.\n", __func__); + } + return high_idx; } @@ -494,6 +523,7 @@ _mapping_get_free_mt_idx(struct mpr_softc *sc, u32 sta if (sc->ir_firmware && (volume_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_HIGH_VOLUME_MAPPING)) max_idx -= sc->max_volumes; + for (map_idx = start_idx; map_idx < max_idx; map_idx++, mt_entry++) if (!(mt_entry->device_info & (MPR_MAP_IN_USE | MPR_DEV_RESERVED))) @@ -542,12 +572,66 @@ static u32 _mapping_get_free_dpm_idx(struct mpr_softc *sc) { u16 entry_num; + Mpi2DriverMap0Entry_t *dpm_entry; + u16 current_entry = MPR_DPM_BAD_IDX, missing_cnt, high_missing_cnt = 0; + u64 physical_id; + struct dev_mapping_table *mt_entry; + u32 map_idx; for (entry_num = 0; entry_num < sc->max_dpm_entries; entry_num++) { - if (!sc->dpm_entry_used[entry_num]) - return entry_num; + dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); + dpm_entry += entry_num; + missing_cnt = dpm_entry->MappingInformation & + MPI2_DRVMAP0_MAPINFO_MISSING_MASK; + + /* + * If entry is used and not missing, then this entry can't be + * used. Look at next one. + */ + if (sc->dpm_entry_used[entry_num] && !missing_cnt) + continue; + + /* + * If this entry is not used at all, then the missing count + * doesn't matter. Just use this one. Otherwise, keep looking + * and make sure the entry with the highest missing count is + * used. + */ + if (!sc->dpm_entry_used[entry_num]) { + current_entry = entry_num; + break; + } + if ((current_entry == MPR_DPM_BAD_IDX) || + (missing_cnt > high_missing_cnt)) { + current_entry = entry_num; + high_missing_cnt = missing_cnt; + } } - return MPR_DPM_BAD_IDX; + + /* + * If an entry has been found to use and it's already marked as used + * it means that some device was already using this entry but it's + * missing, and that means that the connection between the missing + * device's DPM entry and the mapping table needs to be cleared. To do + * this, use the Physical ID of the old device still in the DPM entry + * to find its mapping table entry, then mark its DPM entry as BAD. + */ + if ((current_entry != MPR_DPM_BAD_IDX) && + sc->dpm_entry_used[current_entry]) { + dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); + dpm_entry += current_entry; + physical_id = dpm_entry->PhysicalIdentifier.High; + physical_id = (physical_id << 32) | + dpm_entry->PhysicalIdentifier.Low; + map_idx = _mapping_get_mt_idx_from_id(sc, physical_id); + if (map_idx != MPR_MAPTABLE_BAD_IDX) { + mt_entry = &sc->mapping_table[map_idx]; + mt_entry->dpm_entry_num = MPR_DPM_BAD_IDX; + } + } + return current_entry; } /** @@ -566,40 +650,57 @@ _mapping_update_ir_missing_cnt(struct mpr_softc *sc, u Mpi2EventIrConfigElement_t *element, u64 wwid) { struct dev_mapping_table *mt_entry; - u8 missing_cnt, reason = element->ReasonCode; + u8 missing_cnt, reason = element->ReasonCode, update_dpm = 1; u16 dpm_idx; Mpi2DriverMap0Entry_t *dpm_entry; - if (!sc->is_dpm_enable) - return; + /* + * Depending on the reason code, update the missing count. Always set + * the init_complete flag when here, so just do it first. That flag is + * used for volumes to make sure that the DPM entry has been updated. + * When a volume is deleted, clear the map entry's IN_USE flag so that + * the entry can be used again if another volume is created. Also clear + * its dev_handle entry so that other functions can't find this volume + * by the handle, since it's not defined any longer. + */ mt_entry = &sc->mapping_table[map_idx]; - if (reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) { + mt_entry->init_complete = 1; + if ((reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) || + (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED)) { mt_entry->missing_count = 0; - } else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED) { - mt_entry->missing_count = 0; - mt_entry->init_complete = 0; - } else if ((reason == MPI2_EVENT_IR_CHANGE_RC_REMOVED) || - (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED)) { - if (!mt_entry->init_complete) { - if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) - mt_entry->missing_count++; - else - mt_entry->init_complete = 1; - } - if (!mt_entry->missing_count) + } else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) { + if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) mt_entry->missing_count++; + + mt_entry->device_info &= ~MPR_MAP_IN_USE; mt_entry->dev_handle = 0; } + /* + * If persistent mapping is enabled, update the DPM with the new missing + * count for the volume. If the DPM index is bad, get a free one. If + * it's bad for a volume that's being deleted do nothing because that + * volume doesn't have a DPM entry. + */ + if (!sc->is_dpm_enable) + return; dpm_idx = mt_entry->dpm_entry_num; if (dpm_idx == MPR_DPM_BAD_IDX) { - if ((reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) || - (reason == MPI2_EVENT_IR_CHANGE_RC_REMOVED)) - dpm_idx = _mapping_get_dpm_idx_from_id(sc, - mt_entry->physical_id, 0); - else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) + if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) + { + mpr_dprint(sc, MPR_MAPPING, "%s: Volume being deleted " + "is not in DPM so DPM missing count will not be " + "updated.\n", __func__); return; + } } + if (dpm_idx == MPR_DPM_BAD_IDX) + dpm_idx = _mapping_get_free_dpm_idx(sc); + + /* + * Got the DPM entry for the volume or found a free DPM entry if this is + * a new volume. Check if the current information is outdated. + */ if (dpm_idx != MPR_DPM_BAD_IDX) { dpm_entry = (Mpi2DriverMap0Entry_t *)((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -607,17 +708,24 @@ _mapping_update_ir_missing_cnt(struct mpr_softc *sc, u missing_cnt = dpm_entry->MappingInformation & MPI2_DRVMAP0_MAPINFO_MISSING_MASK; if ((mt_entry->physical_id == - le64toh((u64)dpm_entry->PhysicalIdentifier.High | - dpm_entry->PhysicalIdentifier.Low)) && (missing_cnt == - mt_entry->missing_count)) - mt_entry->init_complete = 1; - } else { - dpm_idx = _mapping_get_free_dpm_idx(sc); - mt_entry->init_complete = 0; + le64toh(((u64)dpm_entry->PhysicalIdentifier.High << 32) | + (u64)dpm_entry->PhysicalIdentifier.Low)) && (missing_cnt == + mt_entry->missing_count)) { + mpr_dprint(sc, MPR_MAPPING, "%s: DPM entry for volume " + "with target ID %d does not require an update.\n", + __func__, mt_entry->id); + update_dpm = 0; + } } - if ((dpm_idx != MPR_DPM_BAD_IDX) && !mt_entry->init_complete) { - mt_entry->init_complete = 1; + /* + * Update the volume's persistent info if it's new or the ID or missing + * count has changed. If a good DPM index has not been found by now, + * there is no space left in the DPM table. + */ + if ((dpm_idx != MPR_DPM_BAD_IDX) && update_dpm) { + mpr_dprint(sc, MPR_MAPPING, "%s: Update DPM entry for volume " + "with target ID %d.\n", __func__, mt_entry->id); mt_entry->dpm_entry_num = dpm_idx; dpm_entry = (Mpi2DriverMap0Entry_t *)((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -633,44 +741,46 @@ _mapping_update_ir_missing_cnt(struct mpr_softc *sc, u sc->dpm_flush_entry[dpm_idx] = 1; sc->dpm_entry_used[dpm_idx] = 1; } else if (dpm_idx == MPR_DPM_BAD_IDX) { - printf("%s: no space to add entry in DPM table\n", __func__); - mt_entry->init_complete = 1; + mpr_dprint(sc, MPR_INFO | MPR_MAPPING, "%s: No space to add an " + "entry in the DPM table for volume with target ID %d.\n", + __func__, mt_entry->id); } } /** - * _mapping_add_to_removal_table - mark an entry for removal + * _mapping_add_to_removal_table - add DPM index to the removal table * @sc: per adapter object - * @handle: Handle of enclosures/device/volume + * @dpm_idx: Index of DPM entry to remove * - * Adds the handle or DPM entry number in removal table. + * Adds a DPM entry number to the removal table. * * Returns nothing. */ static void -_mapping_add_to_removal_table(struct mpr_softc *sc, u16 handle, - u16 dpm_idx) +_mapping_add_to_removal_table(struct mpr_softc *sc, u16 dpm_idx) { struct map_removal_table *remove_entry; u32 i; - u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); - remove_entry = sc->removal_table; + /* + * This is only used to remove entries from the DPM in the controller. + * If DPM is not enabled, just return. + */ + if (!sc->is_dpm_enable) + return; + /* + * Find the first available removal_table entry and add the new entry + * there. + */ + remove_entry = sc->removal_table; for (i = 0; i < sc->max_devices; i++, remove_entry++) { - if (remove_entry->dev_handle || remove_entry->dpm_entry_num != - MPR_DPM_BAD_IDX) + if (remove_entry->dpm_entry_num != MPR_DPM_BAD_IDX) continue; - if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { - if (dpm_idx) - remove_entry->dpm_entry_num = dpm_idx; - if (remove_entry->dpm_entry_num == MPR_DPM_BAD_IDX) - remove_entry->dev_handle = handle; - } else if ((ioc_pg8_flags & - MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) - remove_entry->dev_handle = handle; + + mpr_dprint(sc, MPR_MAPPING, "%s: Adding DPM entry %d to table " + "for removal.\n", __func__, dpm_idx); + remove_entry->dpm_entry_num = dpm_idx; break; } @@ -683,8 +793,11 @@ _mapping_add_to_removal_table(struct mpr_softc *sc, u1 * * Increment the missing count in the mapping table for a SAS, SATA, or PCIe * device that is not responding. If Persitent Mapping is used, increment the - * DPM entry as well. Also, add this device to the removal table for possible - * removal if a new device is added. + * DPM entry as well. Currently, this function is only called if the target + * goes missing, so after initialization has completed. This means that the + * missing count can only go from 0 to 1 here. The missing count is incremented + * during initialization as well, so that's where a target's missing count can + * go past 1. * * Returns nothing. */ @@ -696,33 +809,40 @@ _mapping_inc_missing_count(struct mpr_softc *sc, u32 m Mpi2DriverMap0Entry_t *dpm_entry; if (map_idx == MPR_MAPTABLE_BAD_IDX) { - mpr_dprint(sc, MPR_INFO, "%s: device is already removed from " - "mapping table\n", __func__); + mpr_dprint(sc, MPR_INFO | MPR_MAPPING, "%s: device is already " + "removed from mapping table\n", __func__); return; } mt_entry = &sc->mapping_table[map_idx]; - if (!mt_entry->init_complete) { - if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) - mt_entry->missing_count++; - else - mt_entry->init_complete = 1; - } - if (!mt_entry->missing_count) + if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) mt_entry->missing_count++; - _mapping_add_to_removal_table(sc, mt_entry->dev_handle, 0); - mt_entry->dev_handle = 0; + /* + * When using Enc/Slot mapping, when a device is removed, it's mapping + * table information should be cleared. Otherwise, the target ID will + * be incorrect if this same device is re-added to a different slot. + */ + if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == + MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + _mapping_clear_map_entry(mt_entry); + } + + /* + * When using device mapping, update the missing count in the DPM entry, + * but only if the missing count has changed. + */ if (((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) && - sc->is_dpm_enable && !mt_entry->init_complete && + sc->is_dpm_enable && mt_entry->dpm_entry_num != MPR_DPM_BAD_IDX) { dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); dpm_entry += mt_entry->dpm_entry_num; - dpm_entry->MappingInformation = mt_entry->missing_count; - sc->dpm_flush_entry[mt_entry->dpm_entry_num] = 1; + if (dpm_entry->MappingInformation != mt_entry->missing_count) { + dpm_entry->MappingInformation = mt_entry->missing_count; + sc->dpm_flush_entry[mt_entry->dpm_entry_num] = 1; + } } - mt_entry->init_complete = 1; } /** @@ -814,6 +934,10 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, vol_mapping_flags = le16toh(sc->ioc_pg8.IRVolumeMappingFlags) & MPI2_IOCPAGE8_IRFLAGS_MASK_VOLUME_MAPPING_MODE; + /* + * The end of the mapping table depends on where volumes are kept, if + * IR is enabled. + */ if (!sc->ir_firmware) end_of_table = sc->max_devices; else if (vol_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_LOW_VOLUME_MAPPING) @@ -821,6 +945,17 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, else end_of_table = sc->max_devices - sc->max_volumes; + /* + * The skip_count is the number of entries that are reserved at the + * beginning of the mapping table. But, it does not include the number + * of Physical IDs that are reserved for direct attached devices. Look + * through the mapping table after these reserved entries to see if + * the devices for this enclosure are already mapped. The PHY bit check + * is used to make sure that at least one PHY bit is common between the + * enclosure and the device that is already mapped. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Looking for space in the mapping " + "table for added enclosure.\n", __func__); for (map_idx = (max_num_phy_ids + skip_count); map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; @@ -830,11 +965,21 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; + mpr_dprint(sc, MPR_MAPPING, "%s: Found space " + "in the mapping for enclosure at map index " + "%d.\n", __func__, start_idx); return start_idx; } } else num_found = 0; } + + /* + * If the enclosure's devices are not mapped already, look for + * contiguous entries in the mapping table that are not reserved. If + * enough entries are found, return the starting index for that space. + */ + num_found = 0; for (map_idx = (max_num_phy_ids + skip_count); map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; @@ -842,40 +987,91 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; + mpr_dprint(sc, MPR_MAPPING, "%s: Found space " + "in the mapping for enclosure at map index " + "%d.\n", __func__, start_idx); return start_idx; } } else num_found = 0; } + /* + * If here, it means that not enough space in the mapping table was + * found to support this enclosure, so go through the enclosure table to + * see if any enclosure entries have a missing count. If so, get the + * enclosure with the highest missing count and check it to see if there + * is enough space for the new enclosure. + */ while (!done_flag) { enc_idx = _mapping_get_high_missing_et_idx(sc); - if (enc_idx == MPR_ENCTABLE_BAD_IDX) + if (enc_idx == MPR_ENCTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_MAPPING, "%s: Not enough space was " + "found in the mapping for the added enclosure.\n", + __func__); return MPR_MAPTABLE_BAD_IDX; + } + + /* + * Found a missing enclosure. Set the skip_search flag so this + * enclosure is not checked again for a high missing count if + * the loop continues. This way, all missing enclosures can + * have their space added together to find enough space in the + * mapping table for the added enclosure. The space must be + * contiguous. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Space from a missing " + "enclosure was found.\n", __func__); enc_entry = &sc->enclosure_table[enc_idx]; - /*VSP FIXME*/ enc_entry->skip_search = 1; + + /* + * Unmark all of the missing enclosure's device's reserved + * space. These will be remarked as reserved if this missing + * enclosure's space is not used. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Clear the reserved flag for " + "all of the map entries for the enclosure.\n", __func__); mt_entry = &sc->mapping_table[enc_entry->start_index]; for (map_idx = enc_entry->start_index; map_idx < (enc_entry->start_index + enc_entry->num_slots); map_idx++, mt_entry++) - mt_entry->device_info &= ~MPR_DEV_RESERVED; + mt_entry->device_info &= ~MPR_DEV_RESERVED; + + /* + * Now that space has been unreserved, check again to see if + * enough space is available for the new enclosure. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Check if new mapping space is " + "enough for the new enclosure.\n", __func__); found_space = 0; - for (map_idx = (max_num_phy_ids + - skip_count); map_idx < end_of_table; map_idx++) { + num_found = 0; + for (map_idx = (max_num_phy_ids + skip_count); + map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; if (!(mt_entry->device_info & MPR_DEV_RESERVED)) { num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; found_space = 1; + break; } } else num_found = 0; } - if (!found_space) continue; + + /* + * If enough space was found, all of the missing enclosures that + * will be used for the new enclosure must be added to the + * removal table. Then all mappings for the enclosure's devices + * and for the enclosure itself need to be cleared. There may be + * more than one enclosure to add to the removal table and + * clear. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Found space in the mapping " + "for enclosure at map index %d.\n", __func__, start_idx); for (map_idx = start_idx; map_idx < (start_idx + num_found); map_idx++) { enc_entry = sc->enclosure_table; @@ -886,26 +1082,38 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, enc_entry->num_slots)) continue; if (!enc_entry->removal_flag) { + mpr_dprint(sc, MPR_MAPPING, "%s: " + "Enclosure %d will be removed from " + "the mapping table.\n", __func__, + enc_idx); enc_entry->removal_flag = 1; - _mapping_add_to_removal_table(sc, 0, + _mapping_add_to_removal_table(sc, enc_entry->dpm_entry_num); } mt_entry = &sc->mapping_table[map_idx]; - if (mt_entry->device_info & - MPR_MAP_IN_USE) { - _mapping_add_to_removal_table(sc, - mt_entry->dev_handle, 0); - _mapping_clear_map_entry(mt_entry); - } + _mapping_clear_map_entry(mt_entry); if (map_idx == (enc_entry->start_index + enc_entry->num_slots - 1)) _mapping_clear_enc_entry(et_entry); } } + + /* + * During the search for space for this enclosure, some entries + * in the mapping table may have been unreserved. Go back and + * change all of these to reserved again. Only the enclosures + * with the removal_flag set should be left as unreserved. The + * skip_search flag needs to be cleared as well so that the + * enclosure's space will be looked at the next time space is + * needed. + */ enc_entry = sc->enclosure_table; for (enc_idx = 0; enc_idx < sc->num_enc_table_entries; enc_idx++, enc_entry++) { if (!enc_entry->removal_flag) { + mpr_dprint(sc, MPR_MAPPING, "%s: Reset the " + "reserved flag for all of the map entries " + "for enclosure %d.\n", __func__, enc_idx); mt_entry = &sc->mapping_table[enc_entry-> start_index]; for (map_idx = enc_entry->start_index; map_idx < @@ -939,7 +1147,7 @@ _mapping_get_dev_info(struct mpr_softc *sc, u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); Mpi2ConfigReply_t mpi_reply; Mpi2SasDevicePage0_t sas_device_pg0; - u8 entry, enc_idx, phy_idx, sata_end_device; + u8 entry, enc_idx, phy_idx; u32 map_idx, index, device_info; struct _map_phy_change *phy_change, *tmp_phy_change; uint64_t sas_address; @@ -953,6 +1161,7 @@ _mapping_get_dev_info(struct mpr_softc *sc, if (phy_change->is_processed || !phy_change->dev_handle || phy_change->reason != MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED) continue; + if (mpr_config_get_sas_device_pg0(sc, &mpi_reply, &sas_device_pg0, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, phy_change->dev_handle)) { @@ -966,13 +1175,11 @@ _mapping_get_dev_info(struct mpr_softc *sc, * when the system is shutdown. */ device_info = le32toh(sas_device_pg0.DeviceInfo); - sas_address = sas_device_pg0.SASAddress.High; + sas_address = le32toh(sas_device_pg0.SASAddress.High); sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; - sata_end_device = 0; + le32toh(sas_device_pg0.SASAddress.Low); if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { - sata_end_device = 1; rc = mprsas_get_sas_address_for_sata_disk(sc, &sas_address, phy_change->dev_handle, device_info, &phy_change->is_SATA_SSD); @@ -991,16 +1198,27 @@ _mapping_get_dev_info(struct mpr_softc *sc, phy_change->slot = le16toh(sas_device_pg0.Slot); phy_change->device_info = device_info; + /* + * When using Enc/Slot mapping, if this device is an enclosure + * make sure that all of its slots can fit into the mapping + * table. + */ if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + /* + * The enclosure should already be in the enclosure + * table due to the Enclosure Add event. If not, just + * continue, nothing can be done. + */ enc_idx = _mapping_get_enc_idx_from_handle(sc, topo_change->enc_handle); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { phy_change->is_processed = 1; - mpr_dprint(sc, MPR_MAPPING, "%s: failed to add " - "the device with handle 0x%04x because the " - "enclosure is not in the mapping table\n", - __func__, phy_change->dev_handle); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because the enclosure is not in " + "the mapping table\n", __func__, + phy_change->dev_handle); continue; } if (!((phy_change->device_info & @@ -1013,8 +1231,20 @@ _mapping_get_dev_info(struct mpr_softc *sc, continue; } et_entry = &sc->enclosure_table[enc_idx]; + + /* + * If the enclosure already has a start_index, it's been + * mapped, so go to the next Topo change. + */ if (et_entry->start_index != MPR_MAPTABLE_BAD_IDX) continue; + + /* + * If the Expander Handle is 0, the devices are direct + * attached. In that case, the start_index must be just + * after the reserved entries. Otherwise, find space in + * the mapping table for the enclosure's devices. + */ if (!topo_change->exp_handle) { map_idx = sc->num_rsvd_entries; et_entry->start_index = map_idx; @@ -1022,8 +1252,26 @@ _mapping_get_dev_info(struct mpr_softc *sc, map_idx = _mapping_find_enc_map_space(sc, et_entry); et_entry->start_index = map_idx; + + /* + * If space cannot be found to hold all of the + * enclosure's devices in the mapping table, + * there's no need to continue checking the + * other devices in this event. Set all of the + * phy_details for this event (if the change is + * for an add) as already processed because none + * of these devices can be added to the mapping + * table. + */ if (et_entry->start_index == MPR_MAPTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, + "%s: failed to add the enclosure " + "with ID 0x%016jx because there is " + "no free space available in the " + "mapping table for all of the " + "enclosure's devices.\n", __func__, + (uintmax_t)et_entry->enclosure_id); phy_change->is_processed = 1; for (phy_idx = 0; phy_idx < topo_change->num_entries; @@ -1040,7 +1288,14 @@ _mapping_get_dev_info(struct mpr_softc *sc, } } - /* Found space in enclosure for mapping entry */ + /* + * Found space in the mapping table for this enclosure. + * Initialize each mapping table entry for the + * enclosure. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Initialize %d map " + "entries for the enclosure, starting at map index " + " %d.\n", __func__, et_entry->num_slots, map_idx); mt_entry = &sc->mapping_table[map_idx]; for (index = map_idx; index < (et_entry->num_slots + map_idx); index++, mt_entry++) { @@ -1098,16 +1353,27 @@ _mapping_get_pcie_dev_info(struct mpr_softc *sc, port_change->slot = le16toh(pcie_device_pg0.Slot); port_change->device_info = le32toh(pcie_device_pg0.DeviceInfo); + /* + * When using Enc/Slot mapping, if this device is an enclosure + * make sure that all of its slots can fit into the mapping + * table. + */ if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + /* + * The enclosure should already be in the enclosure + * table due to the Enclosure Add event. If not, just + * continue, nothing can be done. + */ enc_idx = _mapping_get_enc_idx_from_handle(sc, topo_change->enc_handle); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { port_change->is_processed = 1; - mpr_dprint(sc, MPR_MAPPING, "%s: failed to add " - "the device with handle 0x%04x because the " - "enclosure is not in the mapping table\n", - __func__, port_change->dev_handle); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because the enclosure is not in " + "the mapping table\n", __func__, + port_change->dev_handle); continue; } if (!(port_change->device_info & @@ -1116,8 +1382,20 @@ _mapping_get_pcie_dev_info(struct mpr_softc *sc, continue; } et_entry = &sc->enclosure_table[enc_idx]; + + /* + * If the enclosure already has a start_index, it's been + * mapped, so go to the next Topo change. + */ if (et_entry->start_index != MPR_MAPTABLE_BAD_IDX) continue; + + /* + * If the Switch Handle is 0, the devices are direct + * attached. In that case, the start_index must be just + * after the reserved entries. Otherwise, find space in + * the mapping table for the enclosure's devices. + */ if (!topo_change->switch_dev_handle) { map_idx = sc->num_rsvd_entries; et_entry->start_index = map_idx; @@ -1125,8 +1403,26 @@ _mapping_get_pcie_dev_info(struct mpr_softc *sc, map_idx = _mapping_find_enc_map_space(sc, et_entry); et_entry->start_index = map_idx; + + /* + * If space cannot be found to hold all of the + * enclosure's devices in the mapping table, + * there's no need to continue checking the + * other devices in this event. Set all of the + * port_details for this event (if the change is *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 16:55:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04622B7A675; Thu, 1 Jun 2017 16:55:05 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2327827C4; Thu, 1 Jun 2017 16:55:04 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51Gt32d033651; Thu, 1 Jun 2017 16:55:03 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Gt35g033647; Thu, 1 Jun 2017 16:55:03 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201706011655.v51Gt35g033647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Thu, 1 Jun 2017 16:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319446 - in stable/11: share/man/man4 sys/dev/mpr sys/dev/mps X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 16:55:05 -0000 Author: slm Date: Thu Jun 1 16:55:03 2017 New Revision: 319446 URL: https://svnweb.freebsd.org/changeset/base/319446 Log: MFC r318895: Fix several problems with mapping code in mps(4). MFC r318896: Fix several problems with mapping code in mpr(4). -Add several comments describing what the mapping code is doing. -Added a callout timer to improve check for missing devices when discovery has completed so that missing counts are incremented correctly. -Fix problems with missing counts not being saved to the HBA. -Update man pages mps(4) and mpr(4) to include a description of the use use_phy_num sysctl variable. -Remove channel field in the mapping structure because it's not used. -Improve logging by using mps_dprint or mpr_dprint instead of printf and adding more logging where appropriate. -Add check for a bad index before writing mapping entries to controller. -The high missing count check in the mapping table was using the incorrect initial value, which could lead to a bad result. -The usage of the IN_USE flag for volume mapping was changed to be more intuitive, and was not being used correctly. -The check for a free DPM entry was changed, as this was completely wrong. -Updates to the missing count for volumes were not being done correctly, so this function was completely rewritten. -_mapping_add_to_removal_table() was overly complicated and incorrectly used, so this function was rewritten. -Missing counts for all devices were not being incremented properly, so this functionality was added. -The search for space in the mapping table for missing enclosures was not calculating the found space correctly due to not breaking out of a loop when required, and the num_found variable was not being reset when needed. -Retries when a device fails to get added due to a full mapping table were removed because this is unneccessary. -mps_mapping_is_reinit_required() and mpr_mapping_is_reinit_required() were removed because they were not being used. -Some functions were renamed to avoid confusion between Target IDs and SAS IDs. -_mapping_check_update_ir_mt_idx() was removed because it was overly complicating volume mapping. -The setting of the maxtargets variable was changed to include max volumes. -The setting of the initiator_id variable was changed to be the invalid target ID after all targets, including volumes. Previously, this was set to the last valid target ID. -Don't exclude target IDs of RAID components or check for a reuse of a target ID for RAID components. -Some endienness was added. Approved by: ken, mav Modified: stable/11/share/man/man4/mpr.4 stable/11/share/man/man4/mps.4 stable/11/sys/dev/mpr/mpr.c stable/11/sys/dev/mpr/mpr_mapping.c stable/11/sys/dev/mpr/mpr_sas.c stable/11/sys/dev/mpr/mpr_sas_lsi.c stable/11/sys/dev/mpr/mpr_user.c stable/11/sys/dev/mpr/mprvar.h stable/11/sys/dev/mps/mps.c stable/11/sys/dev/mps/mps_mapping.c stable/11/sys/dev/mps/mps_sas.c stable/11/sys/dev/mps/mps_sas_lsi.c stable/11/sys/dev/mps/mps_user.c stable/11/sys/dev/mps/mpsvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/mpr.4 ============================================================================== --- stable/11/share/man/man4/mpr.4 Thu Jun 1 16:54:10 2017 (r319445) +++ stable/11/share/man/man4/mpr.4 Thu Jun 1 16:55:03 2017 (r319446) @@ -1,8 +1,8 @@ .\" .\" Copyright (c) 2010 Spectra Logic Corporation .\" Copyright (c) 2014 LSI Corp -.\" Copyright (c) 2017 Avago Technologies -.\" Copyright (c) 2017 Broadcom Ltd. +.\" Copyright (c) 2015-2017 Avago Technologies +.\" Copyright (c) 2015-2017 Broadcom Ltd. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ .\" $Id$ .\" $FreeBSD$ .\" -.Dd May 17, 2017 +.Dd May 25, 2017 .Dt MPR 4 .Os .Sh NAME Modified: stable/11/share/man/man4/mps.4 ============================================================================== --- stable/11/share/man/man4/mps.4 Thu Jun 1 16:54:10 2017 (r319445) +++ stable/11/share/man/man4/mps.4 Thu Jun 1 16:55:03 2017 (r319446) @@ -1,8 +1,8 @@ .\" .\" Copyright (c) 2010 Spectra Logic Corporation .\" Copyright (c) 2014 LSI Corp -.\" Copyright (c) 2016 Avago Technologies -.\" Copyright (c) 2016 Broadcom Ltd. +.\" Copyright (c) 2015-2017 Avago Technologies +.\" Copyright (c) 2015-2017 Broadcom Ltd. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ .\" $FreeBSD$ .\" -.Dd July 5, 2016 +.Dd May 25, 2017 .Dt MPS 4 .Os .Sh NAME @@ -243,13 +243,13 @@ Send SSU to HDDs, but not to SSDs. Send SSU to both HDDs and SSDs. .El .Pp -To control the feature for a specific adapter, set this tunable value in +To control this feature for a specific adapter, set this tunable value in .Xr loader.conf 5 : .Bd -literal -offset indent dev.mps.X.enable_ssu .Ed .Pp -The same set of values are valid when setting this tunable for all adapters. +The same set of values are valid as when setting this tunable for all adapters. .Pp SATA disks that take several seconds to spin up and fail the SATA Identify command might not be discovered by the driver. @@ -275,6 +275,45 @@ dev.mps.X.spinup_wait_time=NNNN tunable. NNNN is the number of seconds to wait for SATA devices to spin up when they fail the initial SATA Identify command. +.Pp +The driver can map devices discovered by the adapter so that target IDs +corresponding to a specific device persist across resets and reboots. +In some cases it is possible for devices to lose their mapped IDs due to +unexpected behavior from certain hardware, such as some types of enclosures. +To overcome this problem, a tunable is provided that will force the driver to +map devices using the Phy number associated with the device. +This feature is not recommended if the topology includes multiple +enclosures/expanders. +If multiple enclosures/expanders are present in the topology, Phy numbers are +repeated, causing all devices at these Phy numbers except the first device to +fail enumeration. +To control this feature for all adapters, set the +.Bd -literal -offset indent +hw.mps.use_phy_num +.Ed +.Pp +tunable in +.Xr loader.conf 5 +to one of these values: +.Bl -tag -width 6n -offset indent +.It -1 +Only use Phy numbers to map devices and bypass the driver's mapping logic. +.It 0 +Never use Phy numbers to map devices. +.It 1 +Use Phy numbers to map devices, but only if the driver's mapping logic fails +to map the device that is being enumerated. +This is the default value. +.El +.Pp +To control this feature for a specific adapter, set this tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +dev.mps.X.use_phy_num +.Ed +.Pp +The same set of values are valid as when setting this tunable for all adapters. +.Pp .Sh DEBUGGING To enable debugging prints from the .Nm Modified: stable/11/sys/dev/mpr/mpr.c ============================================================================== --- stable/11/sys/dev/mpr/mpr.c Thu Jun 1 16:54:10 2017 (r319445) +++ stable/11/sys/dev/mpr/mpr.c Thu Jun 1 16:55:03 2017 (r319446) @@ -520,7 +520,8 @@ mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t at */ if (reallocating) { mpr_iocfacts_free(sc); - mprsas_realloc_targets(sc, saved_facts.MaxTargets); + mprsas_realloc_targets(sc, saved_facts.MaxTargets + + saved_facts.MaxVolumes); } /* @@ -1663,6 +1664,7 @@ mpr_attach(struct mpr_softc *sc) mtx_init(&sc->mpr_mtx, "MPR lock", NULL, MTX_DEF); callout_init_mtx(&sc->periodic, &sc->mpr_mtx, 0); + callout_init_mtx(&sc->device_check_callout, &sc->mpr_mtx, 0); TAILQ_INIT(&sc->event_list); timevalclear(&sc->lastfail); @@ -1832,6 +1834,7 @@ mpr_free(struct mpr_softc *sc) mpr_unlock(sc); /* Lock must not be held for this */ callout_drain(&sc->periodic); + callout_drain(&sc->device_check_callout); if (((error = mpr_detach_log(sc)) != 0) || ((error = mpr_detach_sas(sc)) != 0)) Modified: stable/11/sys/dev/mpr/mpr_mapping.c ============================================================================== --- stable/11/sys/dev/mpr/mpr_mapping.c Thu Jun 1 16:54:10 2017 (r319445) +++ stable/11/sys/dev/mpr/mpr_mapping.c Thu Jun 1 16:55:03 2017 (r319446) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include /** - * _mapping_clear_entry - Clear a particular mapping entry. + * _mapping_clear_map_entry - Clear a particular mapping entry. * @map_entry: map table entry * * Returns nothing. @@ -73,7 +73,6 @@ _mapping_clear_map_entry(struct dev_mapping_table *map map_entry->phy_bits = 0; map_entry->dpm_entry_num = MPR_DPM_BAD_IDX; map_entry->dev_handle = 0; - map_entry->channel = -1; map_entry->id = -1; map_entry->missing_count = 0; map_entry->init_complete = 0; @@ -140,12 +139,15 @@ _mapping_commit_enc_entry(struct mpr_softc *sc, dpm_entry->PhysicalBitsMapping = htole32(et_entry->phy_bits); dpm_entry->Reserved1 = 0; + mpr_dprint(sc, MPR_MAPPING, "%s: Writing DPM entry %d for enclosure.\n", + __func__, et_entry->dpm_entry_num); memcpy(&config_page.Entry, (u8 *)dpm_entry, sizeof(Mpi2DriverMap0Entry_t)); if (mpr_config_set_dpm_pg0(sc, &mpi_reply, &config_page, et_entry->dpm_entry_num)) { - printf("%s: write of dpm entry %d for enclosure failed\n", - __func__, et_entry->dpm_entry_num); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Write of DPM " + "entry %d for enclosure failed.\n", __func__, + et_entry->dpm_entry_num); dpm_entry->MappingInformation = le16toh(dpm_entry-> MappingInformation); dpm_entry->DeviceIndex = le16toh(dpm_entry->DeviceIndex); @@ -164,7 +166,7 @@ _mapping_commit_enc_entry(struct mpr_softc *sc, /** * _mapping_commit_map_entry - write a particular map table entry in DPM page0. * @sc: per adapter object - * @enc_entry: enclosure table entry + * @mt_entry: mapping table entry * * Returns 0 for success, non-zero for failure. */ @@ -180,6 +182,19 @@ _mapping_commit_map_entry(struct mpr_softc *sc, if (!sc->is_dpm_enable) return 0; + /* + * It's possible that this Map Entry points to a BAD DPM index. This + * can happen if the Map Entry is a for a missing device and the DPM + * entry that was being used by this device is now being used by some + * new device. So, check for a BAD DPM index and just return if so. + */ + if (mt_entry->dpm_entry_num == MPR_DPM_BAD_IDX) { + mpr_dprint(sc, MPR_MAPPING, "%s: DPM entry location for target " + "%d is invalid. DPM will not be written.\n", __func__, + mt_entry->id); + return 0; + } + memset(&config_page, 0, sizeof(Mpi2DriverMappingPage0_t)); memcpy(&config_page.Header, (u8 *)sc->dpm_pg0, sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -193,13 +208,16 @@ _mapping_commit_map_entry(struct mpr_softc *sc, dpm_entry->MappingInformation = htole16(mt_entry->missing_count); dpm_entry->PhysicalBitsMapping = 0; dpm_entry->Reserved1 = 0; - dpm_entry->MappingInformation = htole16(dpm_entry->MappingInformation); memcpy(&config_page.Entry, (u8 *)dpm_entry, sizeof(Mpi2DriverMap0Entry_t)); + + mpr_dprint(sc, MPR_MAPPING, "%s: Writing DPM entry %d for target %d.\n", + __func__, mt_entry->dpm_entry_num, mt_entry->id); if (mpr_config_set_dpm_pg0(sc, &mpi_reply, &config_page, mt_entry->dpm_entry_num)) { - printf("%s: write of dpm entry %d for device failed\n", - __func__, mt_entry->dpm_entry_num); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Write of DPM " + "entry %d for target %d failed.\n", __func__, + mt_entry->dpm_entry_num, mt_entry->id); dpm_entry->MappingInformation = le16toh(dpm_entry-> MappingInformation); dpm_entry->DeviceIndex = le16toh(dpm_entry->DeviceIndex); @@ -307,7 +325,7 @@ _mapping_get_high_missing_et_idx(struct mpr_softc *sc) et_entry = &sc->enclosure_table[enc_idx]; if ((et_entry->missing_count > high_missing_count) && !et_entry->skip_search) { - high_missing_count = et_entry->missing_count; + high_missing_count = et_entry->missing_count; high_idx = enc_idx; } } @@ -326,7 +344,7 @@ _mapping_get_high_missing_et_idx(struct mpr_softc *sc) static u32 _mapping_get_high_missing_mt_idx(struct mpr_softc *sc) { - u32 map_idx, high_idx = MPR_ENCTABLE_BAD_IDX; + u32 map_idx, high_idx = MPR_MAPTABLE_BAD_IDX; u8 high_missing_count = 0; u32 start_idx, end_idx, start_idx_ir, end_idx_ir; struct dev_mapping_table *mt_entry; @@ -370,7 +388,7 @@ _mapping_get_ir_mt_idx_from_wwid(struct mpr_softc *sc, _mapping_get_ir_maprange(sc, &start_idx, &end_idx); mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) + for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) if (mt_entry->physical_id == wwid) return map_idx; @@ -458,20 +476,31 @@ _mapping_get_free_ir_mt_idx(struct mpr_softc *sc) u32 high_idx = MPR_MAPTABLE_BAD_IDX; struct dev_mapping_table *mt_entry; + /* + * The IN_USE flag should be clear if the entry is available to use. + * This flag is cleared on initialization and and when a volume is + * deleted. All other times this flag should be set. If, for some + * reason, a free entry cannot be found, look for the entry with the + * highest missing count just in case there is one. + */ _mapping_get_ir_maprange(sc, &start_idx, &end_idx); - mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) + for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) { if (!(mt_entry->device_info & MPR_MAP_IN_USE)) return map_idx; - mt_entry = &sc->mapping_table[start_idx]; - for (map_idx = start_idx; map_idx <= end_idx; map_idx++, mt_entry++) { if (mt_entry->missing_count > high_missing_count) { high_missing_count = mt_entry->missing_count; high_idx = map_idx; } } + + if (high_idx == MPR_MAPTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: Could not find a " + "free entry in the mapping table for a Volume. The mapping " + "table is probably corrupt.\n", __func__); + } + return high_idx; } @@ -494,6 +523,7 @@ _mapping_get_free_mt_idx(struct mpr_softc *sc, u32 sta if (sc->ir_firmware && (volume_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_HIGH_VOLUME_MAPPING)) max_idx -= sc->max_volumes; + for (map_idx = start_idx; map_idx < max_idx; map_idx++, mt_entry++) if (!(mt_entry->device_info & (MPR_MAP_IN_USE | MPR_DEV_RESERVED))) @@ -542,12 +572,66 @@ static u32 _mapping_get_free_dpm_idx(struct mpr_softc *sc) { u16 entry_num; + Mpi2DriverMap0Entry_t *dpm_entry; + u16 current_entry = MPR_DPM_BAD_IDX, missing_cnt, high_missing_cnt = 0; + u64 physical_id; + struct dev_mapping_table *mt_entry; + u32 map_idx; for (entry_num = 0; entry_num < sc->max_dpm_entries; entry_num++) { - if (!sc->dpm_entry_used[entry_num]) - return entry_num; + dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); + dpm_entry += entry_num; + missing_cnt = dpm_entry->MappingInformation & + MPI2_DRVMAP0_MAPINFO_MISSING_MASK; + + /* + * If entry is used and not missing, then this entry can't be + * used. Look at next one. + */ + if (sc->dpm_entry_used[entry_num] && !missing_cnt) + continue; + + /* + * If this entry is not used at all, then the missing count + * doesn't matter. Just use this one. Otherwise, keep looking + * and make sure the entry with the highest missing count is + * used. + */ + if (!sc->dpm_entry_used[entry_num]) { + current_entry = entry_num; + break; + } + if ((current_entry == MPR_DPM_BAD_IDX) || + (missing_cnt > high_missing_cnt)) { + current_entry = entry_num; + high_missing_cnt = missing_cnt; + } } - return MPR_DPM_BAD_IDX; + + /* + * If an entry has been found to use and it's already marked as used + * it means that some device was already using this entry but it's + * missing, and that means that the connection between the missing + * device's DPM entry and the mapping table needs to be cleared. To do + * this, use the Physical ID of the old device still in the DPM entry + * to find its mapping table entry, then mark its DPM entry as BAD. + */ + if ((current_entry != MPR_DPM_BAD_IDX) && + sc->dpm_entry_used[current_entry]) { + dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); + dpm_entry += current_entry; + physical_id = dpm_entry->PhysicalIdentifier.High; + physical_id = (physical_id << 32) | + dpm_entry->PhysicalIdentifier.Low; + map_idx = _mapping_get_mt_idx_from_id(sc, physical_id); + if (map_idx != MPR_MAPTABLE_BAD_IDX) { + mt_entry = &sc->mapping_table[map_idx]; + mt_entry->dpm_entry_num = MPR_DPM_BAD_IDX; + } + } + return current_entry; } /** @@ -566,40 +650,57 @@ _mapping_update_ir_missing_cnt(struct mpr_softc *sc, u Mpi2EventIrConfigElement_t *element, u64 wwid) { struct dev_mapping_table *mt_entry; - u8 missing_cnt, reason = element->ReasonCode; + u8 missing_cnt, reason = element->ReasonCode, update_dpm = 1; u16 dpm_idx; Mpi2DriverMap0Entry_t *dpm_entry; - if (!sc->is_dpm_enable) - return; + /* + * Depending on the reason code, update the missing count. Always set + * the init_complete flag when here, so just do it first. That flag is + * used for volumes to make sure that the DPM entry has been updated. + * When a volume is deleted, clear the map entry's IN_USE flag so that + * the entry can be used again if another volume is created. Also clear + * its dev_handle entry so that other functions can't find this volume + * by the handle, since it's not defined any longer. + */ mt_entry = &sc->mapping_table[map_idx]; - if (reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) { + mt_entry->init_complete = 1; + if ((reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) || + (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED)) { mt_entry->missing_count = 0; - } else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED) { - mt_entry->missing_count = 0; - mt_entry->init_complete = 0; - } else if ((reason == MPI2_EVENT_IR_CHANGE_RC_REMOVED) || - (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED)) { - if (!mt_entry->init_complete) { - if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) - mt_entry->missing_count++; - else - mt_entry->init_complete = 1; - } - if (!mt_entry->missing_count) + } else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) { + if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) mt_entry->missing_count++; + + mt_entry->device_info &= ~MPR_MAP_IN_USE; mt_entry->dev_handle = 0; } + /* + * If persistent mapping is enabled, update the DPM with the new missing + * count for the volume. If the DPM index is bad, get a free one. If + * it's bad for a volume that's being deleted do nothing because that + * volume doesn't have a DPM entry. + */ + if (!sc->is_dpm_enable) + return; dpm_idx = mt_entry->dpm_entry_num; if (dpm_idx == MPR_DPM_BAD_IDX) { - if ((reason == MPI2_EVENT_IR_CHANGE_RC_ADDED) || - (reason == MPI2_EVENT_IR_CHANGE_RC_REMOVED)) - dpm_idx = _mapping_get_dpm_idx_from_id(sc, - mt_entry->physical_id, 0); - else if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) + if (reason == MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED) + { + mpr_dprint(sc, MPR_MAPPING, "%s: Volume being deleted " + "is not in DPM so DPM missing count will not be " + "updated.\n", __func__); return; + } } + if (dpm_idx == MPR_DPM_BAD_IDX) + dpm_idx = _mapping_get_free_dpm_idx(sc); + + /* + * Got the DPM entry for the volume or found a free DPM entry if this is + * a new volume. Check if the current information is outdated. + */ if (dpm_idx != MPR_DPM_BAD_IDX) { dpm_entry = (Mpi2DriverMap0Entry_t *)((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -607,17 +708,24 @@ _mapping_update_ir_missing_cnt(struct mpr_softc *sc, u missing_cnt = dpm_entry->MappingInformation & MPI2_DRVMAP0_MAPINFO_MISSING_MASK; if ((mt_entry->physical_id == - le64toh((u64)dpm_entry->PhysicalIdentifier.High | - dpm_entry->PhysicalIdentifier.Low)) && (missing_cnt == - mt_entry->missing_count)) - mt_entry->init_complete = 1; - } else { - dpm_idx = _mapping_get_free_dpm_idx(sc); - mt_entry->init_complete = 0; + le64toh(((u64)dpm_entry->PhysicalIdentifier.High << 32) | + (u64)dpm_entry->PhysicalIdentifier.Low)) && (missing_cnt == + mt_entry->missing_count)) { + mpr_dprint(sc, MPR_MAPPING, "%s: DPM entry for volume " + "with target ID %d does not require an update.\n", + __func__, mt_entry->id); + update_dpm = 0; + } } - if ((dpm_idx != MPR_DPM_BAD_IDX) && !mt_entry->init_complete) { - mt_entry->init_complete = 1; + /* + * Update the volume's persistent info if it's new or the ID or missing + * count has changed. If a good DPM index has not been found by now, + * there is no space left in the DPM table. + */ + if ((dpm_idx != MPR_DPM_BAD_IDX) && update_dpm) { + mpr_dprint(sc, MPR_MAPPING, "%s: Update DPM entry for volume " + "with target ID %d.\n", __func__, mt_entry->id); mt_entry->dpm_entry_num = dpm_idx; dpm_entry = (Mpi2DriverMap0Entry_t *)((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); @@ -633,44 +741,46 @@ _mapping_update_ir_missing_cnt(struct mpr_softc *sc, u sc->dpm_flush_entry[dpm_idx] = 1; sc->dpm_entry_used[dpm_idx] = 1; } else if (dpm_idx == MPR_DPM_BAD_IDX) { - printf("%s: no space to add entry in DPM table\n", __func__); - mt_entry->init_complete = 1; + mpr_dprint(sc, MPR_INFO | MPR_MAPPING, "%s: No space to add an " + "entry in the DPM table for volume with target ID %d.\n", + __func__, mt_entry->id); } } /** - * _mapping_add_to_removal_table - mark an entry for removal + * _mapping_add_to_removal_table - add DPM index to the removal table * @sc: per adapter object - * @handle: Handle of enclosures/device/volume + * @dpm_idx: Index of DPM entry to remove * - * Adds the handle or DPM entry number in removal table. + * Adds a DPM entry number to the removal table. * * Returns nothing. */ static void -_mapping_add_to_removal_table(struct mpr_softc *sc, u16 handle, - u16 dpm_idx) +_mapping_add_to_removal_table(struct mpr_softc *sc, u16 dpm_idx) { struct map_removal_table *remove_entry; u32 i; - u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); - remove_entry = sc->removal_table; + /* + * This is only used to remove entries from the DPM in the controller. + * If DPM is not enabled, just return. + */ + if (!sc->is_dpm_enable) + return; + /* + * Find the first available removal_table entry and add the new entry + * there. + */ + remove_entry = sc->removal_table; for (i = 0; i < sc->max_devices; i++, remove_entry++) { - if (remove_entry->dev_handle || remove_entry->dpm_entry_num != - MPR_DPM_BAD_IDX) + if (remove_entry->dpm_entry_num != MPR_DPM_BAD_IDX) continue; - if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { - if (dpm_idx) - remove_entry->dpm_entry_num = dpm_idx; - if (remove_entry->dpm_entry_num == MPR_DPM_BAD_IDX) - remove_entry->dev_handle = handle; - } else if ((ioc_pg8_flags & - MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) - remove_entry->dev_handle = handle; + + mpr_dprint(sc, MPR_MAPPING, "%s: Adding DPM entry %d to table " + "for removal.\n", __func__, dpm_idx); + remove_entry->dpm_entry_num = dpm_idx; break; } @@ -683,8 +793,11 @@ _mapping_add_to_removal_table(struct mpr_softc *sc, u1 * * Increment the missing count in the mapping table for a SAS, SATA, or PCIe * device that is not responding. If Persitent Mapping is used, increment the - * DPM entry as well. Also, add this device to the removal table for possible - * removal if a new device is added. + * DPM entry as well. Currently, this function is only called if the target + * goes missing, so after initialization has completed. This means that the + * missing count can only go from 0 to 1 here. The missing count is incremented + * during initialization as well, so that's where a target's missing count can + * go past 1. * * Returns nothing. */ @@ -696,33 +809,40 @@ _mapping_inc_missing_count(struct mpr_softc *sc, u32 m Mpi2DriverMap0Entry_t *dpm_entry; if (map_idx == MPR_MAPTABLE_BAD_IDX) { - mpr_dprint(sc, MPR_INFO, "%s: device is already removed from " - "mapping table\n", __func__); + mpr_dprint(sc, MPR_INFO | MPR_MAPPING, "%s: device is already " + "removed from mapping table\n", __func__); return; } mt_entry = &sc->mapping_table[map_idx]; - if (!mt_entry->init_complete) { - if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) - mt_entry->missing_count++; - else - mt_entry->init_complete = 1; - } - if (!mt_entry->missing_count) + if (mt_entry->missing_count < MPR_MAX_MISSING_COUNT) mt_entry->missing_count++; - _mapping_add_to_removal_table(sc, mt_entry->dev_handle, 0); - mt_entry->dev_handle = 0; + /* + * When using Enc/Slot mapping, when a device is removed, it's mapping + * table information should be cleared. Otherwise, the target ID will + * be incorrect if this same device is re-added to a different slot. + */ + if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == + MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + _mapping_clear_map_entry(mt_entry); + } + + /* + * When using device mapping, update the missing count in the DPM entry, + * but only if the missing count has changed. + */ if (((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) && - sc->is_dpm_enable && !mt_entry->init_complete && + sc->is_dpm_enable && mt_entry->dpm_entry_num != MPR_DPM_BAD_IDX) { dpm_entry = (Mpi2DriverMap0Entry_t *) ((u8 *)sc->dpm_pg0 + sizeof(MPI2_CONFIG_EXTENDED_PAGE_HEADER)); dpm_entry += mt_entry->dpm_entry_num; - dpm_entry->MappingInformation = mt_entry->missing_count; - sc->dpm_flush_entry[mt_entry->dpm_entry_num] = 1; + if (dpm_entry->MappingInformation != mt_entry->missing_count) { + dpm_entry->MappingInformation = mt_entry->missing_count; + sc->dpm_flush_entry[mt_entry->dpm_entry_num] = 1; + } } - mt_entry->init_complete = 1; } /** @@ -814,6 +934,10 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, vol_mapping_flags = le16toh(sc->ioc_pg8.IRVolumeMappingFlags) & MPI2_IOCPAGE8_IRFLAGS_MASK_VOLUME_MAPPING_MODE; + /* + * The end of the mapping table depends on where volumes are kept, if + * IR is enabled. + */ if (!sc->ir_firmware) end_of_table = sc->max_devices; else if (vol_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_LOW_VOLUME_MAPPING) @@ -821,6 +945,17 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, else end_of_table = sc->max_devices - sc->max_volumes; + /* + * The skip_count is the number of entries that are reserved at the + * beginning of the mapping table. But, it does not include the number + * of Physical IDs that are reserved for direct attached devices. Look + * through the mapping table after these reserved entries to see if + * the devices for this enclosure are already mapped. The PHY bit check + * is used to make sure that at least one PHY bit is common between the + * enclosure and the device that is already mapped. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Looking for space in the mapping " + "table for added enclosure.\n", __func__); for (map_idx = (max_num_phy_ids + skip_count); map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; @@ -830,11 +965,21 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; + mpr_dprint(sc, MPR_MAPPING, "%s: Found space " + "in the mapping for enclosure at map index " + "%d.\n", __func__, start_idx); return start_idx; } } else num_found = 0; } + + /* + * If the enclosure's devices are not mapped already, look for + * contiguous entries in the mapping table that are not reserved. If + * enough entries are found, return the starting index for that space. + */ + num_found = 0; for (map_idx = (max_num_phy_ids + skip_count); map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; @@ -842,40 +987,91 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; + mpr_dprint(sc, MPR_MAPPING, "%s: Found space " + "in the mapping for enclosure at map index " + "%d.\n", __func__, start_idx); return start_idx; } } else num_found = 0; } + /* + * If here, it means that not enough space in the mapping table was + * found to support this enclosure, so go through the enclosure table to + * see if any enclosure entries have a missing count. If so, get the + * enclosure with the highest missing count and check it to see if there + * is enough space for the new enclosure. + */ while (!done_flag) { enc_idx = _mapping_get_high_missing_et_idx(sc); - if (enc_idx == MPR_ENCTABLE_BAD_IDX) + if (enc_idx == MPR_ENCTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_MAPPING, "%s: Not enough space was " + "found in the mapping for the added enclosure.\n", + __func__); return MPR_MAPTABLE_BAD_IDX; + } + + /* + * Found a missing enclosure. Set the skip_search flag so this + * enclosure is not checked again for a high missing count if + * the loop continues. This way, all missing enclosures can + * have their space added together to find enough space in the + * mapping table for the added enclosure. The space must be + * contiguous. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Space from a missing " + "enclosure was found.\n", __func__); enc_entry = &sc->enclosure_table[enc_idx]; - /*VSP FIXME*/ enc_entry->skip_search = 1; + + /* + * Unmark all of the missing enclosure's device's reserved + * space. These will be remarked as reserved if this missing + * enclosure's space is not used. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Clear the reserved flag for " + "all of the map entries for the enclosure.\n", __func__); mt_entry = &sc->mapping_table[enc_entry->start_index]; for (map_idx = enc_entry->start_index; map_idx < (enc_entry->start_index + enc_entry->num_slots); map_idx++, mt_entry++) - mt_entry->device_info &= ~MPR_DEV_RESERVED; + mt_entry->device_info &= ~MPR_DEV_RESERVED; + + /* + * Now that space has been unreserved, check again to see if + * enough space is available for the new enclosure. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Check if new mapping space is " + "enough for the new enclosure.\n", __func__); found_space = 0; - for (map_idx = (max_num_phy_ids + - skip_count); map_idx < end_of_table; map_idx++) { + num_found = 0; + for (map_idx = (max_num_phy_ids + skip_count); + map_idx < end_of_table; map_idx++) { mt_entry = &sc->mapping_table[map_idx]; if (!(mt_entry->device_info & MPR_DEV_RESERVED)) { num_found += 1; if (num_found == et_entry->num_slots) { start_idx = (map_idx - num_found) + 1; found_space = 1; + break; } } else num_found = 0; } - if (!found_space) continue; + + /* + * If enough space was found, all of the missing enclosures that + * will be used for the new enclosure must be added to the + * removal table. Then all mappings for the enclosure's devices + * and for the enclosure itself need to be cleared. There may be + * more than one enclosure to add to the removal table and + * clear. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Found space in the mapping " + "for enclosure at map index %d.\n", __func__, start_idx); for (map_idx = start_idx; map_idx < (start_idx + num_found); map_idx++) { enc_entry = sc->enclosure_table; @@ -886,26 +1082,38 @@ _mapping_find_enc_map_space(struct mpr_softc *sc, enc_entry->num_slots)) continue; if (!enc_entry->removal_flag) { + mpr_dprint(sc, MPR_MAPPING, "%s: " + "Enclosure %d will be removed from " + "the mapping table.\n", __func__, + enc_idx); enc_entry->removal_flag = 1; - _mapping_add_to_removal_table(sc, 0, + _mapping_add_to_removal_table(sc, enc_entry->dpm_entry_num); } mt_entry = &sc->mapping_table[map_idx]; - if (mt_entry->device_info & - MPR_MAP_IN_USE) { - _mapping_add_to_removal_table(sc, - mt_entry->dev_handle, 0); - _mapping_clear_map_entry(mt_entry); - } + _mapping_clear_map_entry(mt_entry); if (map_idx == (enc_entry->start_index + enc_entry->num_slots - 1)) _mapping_clear_enc_entry(et_entry); } } + + /* + * During the search for space for this enclosure, some entries + * in the mapping table may have been unreserved. Go back and + * change all of these to reserved again. Only the enclosures + * with the removal_flag set should be left as unreserved. The + * skip_search flag needs to be cleared as well so that the + * enclosure's space will be looked at the next time space is + * needed. + */ enc_entry = sc->enclosure_table; for (enc_idx = 0; enc_idx < sc->num_enc_table_entries; enc_idx++, enc_entry++) { if (!enc_entry->removal_flag) { + mpr_dprint(sc, MPR_MAPPING, "%s: Reset the " + "reserved flag for all of the map entries " + "for enclosure %d.\n", __func__, enc_idx); mt_entry = &sc->mapping_table[enc_entry-> start_index]; for (map_idx = enc_entry->start_index; map_idx < @@ -939,7 +1147,7 @@ _mapping_get_dev_info(struct mpr_softc *sc, u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); Mpi2ConfigReply_t mpi_reply; Mpi2SasDevicePage0_t sas_device_pg0; - u8 entry, enc_idx, phy_idx, sata_end_device; + u8 entry, enc_idx, phy_idx; u32 map_idx, index, device_info; struct _map_phy_change *phy_change, *tmp_phy_change; uint64_t sas_address; @@ -953,6 +1161,7 @@ _mapping_get_dev_info(struct mpr_softc *sc, if (phy_change->is_processed || !phy_change->dev_handle || phy_change->reason != MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED) continue; + if (mpr_config_get_sas_device_pg0(sc, &mpi_reply, &sas_device_pg0, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, phy_change->dev_handle)) { @@ -966,13 +1175,11 @@ _mapping_get_dev_info(struct mpr_softc *sc, * when the system is shutdown. */ device_info = le32toh(sas_device_pg0.DeviceInfo); - sas_address = sas_device_pg0.SASAddress.High; + sas_address = le32toh(sas_device_pg0.SASAddress.High); sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; - sata_end_device = 0; + le32toh(sas_device_pg0.SASAddress.Low); if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { - sata_end_device = 1; rc = mprsas_get_sas_address_for_sata_disk(sc, &sas_address, phy_change->dev_handle, device_info, &phy_change->is_SATA_SSD); @@ -991,16 +1198,27 @@ _mapping_get_dev_info(struct mpr_softc *sc, phy_change->slot = le16toh(sas_device_pg0.Slot); phy_change->device_info = device_info; + /* + * When using Enc/Slot mapping, if this device is an enclosure + * make sure that all of its slots can fit into the mapping + * table. + */ if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + /* + * The enclosure should already be in the enclosure + * table due to the Enclosure Add event. If not, just + * continue, nothing can be done. + */ enc_idx = _mapping_get_enc_idx_from_handle(sc, topo_change->enc_handle); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { phy_change->is_processed = 1; - mpr_dprint(sc, MPR_MAPPING, "%s: failed to add " - "the device with handle 0x%04x because the " - "enclosure is not in the mapping table\n", - __func__, phy_change->dev_handle); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because the enclosure is not in " + "the mapping table\n", __func__, + phy_change->dev_handle); continue; } if (!((phy_change->device_info & @@ -1013,8 +1231,20 @@ _mapping_get_dev_info(struct mpr_softc *sc, continue; } et_entry = &sc->enclosure_table[enc_idx]; + + /* + * If the enclosure already has a start_index, it's been + * mapped, so go to the next Topo change. + */ if (et_entry->start_index != MPR_MAPTABLE_BAD_IDX) continue; + + /* + * If the Expander Handle is 0, the devices are direct + * attached. In that case, the start_index must be just + * after the reserved entries. Otherwise, find space in + * the mapping table for the enclosure's devices. + */ if (!topo_change->exp_handle) { map_idx = sc->num_rsvd_entries; et_entry->start_index = map_idx; @@ -1022,8 +1252,26 @@ _mapping_get_dev_info(struct mpr_softc *sc, map_idx = _mapping_find_enc_map_space(sc, et_entry); et_entry->start_index = map_idx; + + /* + * If space cannot be found to hold all of the + * enclosure's devices in the mapping table, + * there's no need to continue checking the + * other devices in this event. Set all of the + * phy_details for this event (if the change is + * for an add) as already processed because none + * of these devices can be added to the mapping + * table. + */ if (et_entry->start_index == MPR_MAPTABLE_BAD_IDX) { + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, + "%s: failed to add the enclosure " + "with ID 0x%016jx because there is " + "no free space available in the " + "mapping table for all of the " + "enclosure's devices.\n", __func__, + (uintmax_t)et_entry->enclosure_id); phy_change->is_processed = 1; for (phy_idx = 0; phy_idx < topo_change->num_entries; @@ -1040,7 +1288,14 @@ _mapping_get_dev_info(struct mpr_softc *sc, } } - /* Found space in enclosure for mapping entry */ + /* + * Found space in the mapping table for this enclosure. + * Initialize each mapping table entry for the + * enclosure. + */ + mpr_dprint(sc, MPR_MAPPING, "%s: Initialize %d map " + "entries for the enclosure, starting at map index " + " %d.\n", __func__, et_entry->num_slots, map_idx); mt_entry = &sc->mapping_table[map_idx]; for (index = map_idx; index < (et_entry->num_slots + map_idx); index++, mt_entry++) { @@ -1098,16 +1353,27 @@ _mapping_get_pcie_dev_info(struct mpr_softc *sc, port_change->slot = le16toh(pcie_device_pg0.Slot); port_change->device_info = le32toh(pcie_device_pg0.DeviceInfo); + /* + * When using Enc/Slot mapping, if this device is an enclosure + * make sure that all of its slots can fit into the mapping + * table. + */ if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { + /* + * The enclosure should already be in the enclosure + * table due to the Enclosure Add event. If not, just + * continue, nothing can be done. + */ enc_idx = _mapping_get_enc_idx_from_handle(sc, topo_change->enc_handle); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { port_change->is_processed = 1; - mpr_dprint(sc, MPR_MAPPING, "%s: failed to add " - "the device with handle 0x%04x because the " - "enclosure is not in the mapping table\n", - __func__, port_change->dev_handle); + mpr_dprint(sc, MPR_ERROR | MPR_MAPPING, "%s: " + "failed to add the device with handle " + "0x%04x because the enclosure is not in " + "the mapping table\n", __func__, + port_change->dev_handle); continue; } if (!(port_change->device_info & @@ -1116,8 +1382,20 @@ _mapping_get_pcie_dev_info(struct mpr_softc *sc, continue; } et_entry = &sc->enclosure_table[enc_idx]; + + /* + * If the enclosure already has a start_index, it's been + * mapped, so go to the next Topo change. + */ if (et_entry->start_index != MPR_MAPTABLE_BAD_IDX) continue; + + /* + * If the Switch Handle is 0, the devices are direct + * attached. In that case, the start_index must be just + * after the reserved entries. Otherwise, find space in + * the mapping table for the enclosure's devices. + */ if (!topo_change->switch_dev_handle) { map_idx = sc->num_rsvd_entries; et_entry->start_index = map_idx; @@ -1125,8 +1403,26 @@ _mapping_get_pcie_dev_info(struct mpr_softc *sc, map_idx = _mapping_find_enc_map_space(sc, et_entry); et_entry->start_index = map_idx; + + /* + * If space cannot be found to hold all of the + * enclosure's devices in the mapping table, + * there's no need to continue checking the + * other devices in this event. Set all of the + * port_details for this event (if the change is *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 16:59:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 693D4B7A716; Thu, 1 Jun 2017 16:59:16 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0094.outbound.protection.outlook.com [104.47.36.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E35C08298E; Thu, 1 Jun 2017 16:59:15 +0000 (UTC) (envelope-from sjg@juniper.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jY98coKYjCaW4DH6DIpbvilf3WUQy+BXg1E+aDVRmPA=; b=E3TuQqqu+qhHScVQ20IQblJ2K3V1c9ML2dgFPRC1AQIaVZx3wYn4sGEnS9/SR7RHQ5UmeVCt4fR3Je2AwltEaGxm0PhCavTrVWWvTcLT7fBHohnmKwr7QJ5aP4RK95HBKnMCmyhWEqnXzZFTjZLcdsFQTaZqgzymJG961x+ENLY= Received: from BL2PR05CA0050.namprd05.prod.outlook.com (10.255.226.50) by CY1PR05MB1979.namprd05.prod.outlook.com (10.162.216.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.6; Thu, 1 Jun 2017 16:59:13 +0000 Received: from DM3NAM05FT046.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::200) by BL2PR05CA0050.outlook.office365.com (2a01:111:e400:c04::50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.6 via Frontend Transport; Thu, 1 Jun 2017 16:59:13 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.12) smtp.mailfrom=juniper.net; FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=fail action=none header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from p-emfe01a-sac.jnpr.net (66.129.239.12) by DM3NAM05FT046.mail.protection.outlook.com (10.152.98.160) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256) id 15.1.1075.12 via Frontend Transport; Thu, 1 Jun 2017 16:59:12 +0000 Received: from p-mailhub01.juniper.net (10.160.2.17) by p-emfe01a-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 1 Jun 2017 09:58:38 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.21.30.60]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id v51GwcQC000850; Thu, 1 Jun 2017 09:58:38 -0700 (envelope-from sjg@juniper.net) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 5A6DA38551F; Thu, 1 Jun 2017 09:58:38 -0700 (PDT) To: "Ngie Cooper (yaneurabeya)" CC: Brooks Davis , Ngie Cooper , "Marcel Moolenaar" , src-committers , , , Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests In-Reply-To: <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> Comments: In-reply-to: "Ngie Cooper (yaneurabeya)" message dated "Wed, 31 May 2017 23:06:50 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <84743.1496336318.1@kaos.jnpr.net> Date: Thu, 1 Jun 2017 09:58:38 -0700 Message-ID: <84744.1496336318@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.12; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39850400002)(39450400003)(39840400002)(39410400002)(39400400002)(39860400002)(2980300002)(24454002)(189002)(199003)(9170700003)(53936002)(9686003)(76506005)(229853002)(53416004)(97756001)(1411001)(50226002)(356003)(110136004)(478600001)(107886003)(6266002)(76176999)(50986999)(6246003)(2906002)(38730400002)(23726003)(47776003)(7696004)(305945005)(117636001)(7126002)(46406003)(4326008)(77096006)(189998001)(50466002)(55016002)(5660300001)(86362001)(8676002)(81166006)(106466001)(2950100002)(8936002)(2810700001)(39060400002)(6916009)(105596002)(54906002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR05MB1979; H:p-emfe01a-sac.jnpr.net; FPR:; SPF:SoftFail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM05FT046; 1:ekwy1P0Qm9SpWxgD/Cdjz5K03W/0g81Y0mfIhZ5Lp/nvpeKP8Dgufao3gZdpdenaa7e1bFlWVj0wFoNBv/MFCvWx77h+s0NUUCZB3wZzYVqHP0C6KpFIVoOS//xgdP3ngo1/dr0wi17uMEk0Jzvixm1fvTg8as4U8OVcEWgA6X9dawSim38D7G+gt4s8tlZRB3Y9n45y5gg8aleAVpUMMztq7W9IB/IgSHjA8Nfhwfm8bWMZjmXwLqYpLzFtPrPyTJWtq7q7klH/f4Rg9a0R8GEoAxiY1OhNaYPMraaJa9etSKuWPXlY7Jd2rd0stRBVdeY05UAs75pCQaHCGosb7u/AI1eVhWcoj3nppg8OCctK4FiTK1/+6kGd1oTldp9OXn3UArAp/gS9lgMWLT2idChWmOKxKPmxxNJj2lr/rTFymgL4r0Tv+pcxtVFSkW4VBJV166AVudx1eWEF/H9/C31wIY6alGp9RMFWMhMQ7z9EdWicH7jf5BTqZ3U/H8yKy3IPgnc2sE38xLDxiGiGcHNDjHoVxxGrDUMKM2A12PQ= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR05MB1979: X-MS-Office365-Filtering-Correlation-Id: 0537de90-2783-4e22-908d-08d4a90f87aa X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:CY1PR05MB1979; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1979; 3:M3FfFJI2tTwUQyRTo4xottbNd2/p2DGGaCtt6Mu9kke/dpG20Xz2mKUUBJtE0e09A5UkpDtX2H5Cr/TBGgCPGjOQLHu2Js0GLxxp0oFzcyAXSp7jvv+A8DLuMgmxE2Twgs7Eachj6i+4h7ZmdlbX9KwFeJUFMJT35qmh7AAcUW8/ChIYPooiHlSAGrUWDlJQrddBEUBRvogKnHJrH/y8E0reKzYP2sAKe2eNXqyvE99HjWwZoFaM5DnwkMzAKBys54/gCOiE1p4kVVmVIM1nJJfds1Mds2AVH6281rWNl7uRUyBzgPOw9qg8UIGlMsYPkLNVUxo9dX/mvuIk1/zeCAKjAKEkNcKbwJ18pMAp7Vq/AljjKCc+6a4lx7l/L2HOpMKRJtuhNwmzPuJj6FW+76VhkHlclgLxrYY9ZPmspz3jgmSXNt5roHyp7L3OKrimAOQMLanL8OKFkBo5iV70aQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1979; 25:IIRWbXRtuNR3gEPvrTQw26f64fLsk7ypgYGPCba08UDUHFNN5pKmnDFuM6HGj4aQRIIUkXDbjh+DpvsA/yIxi9qp6DlmveTNNArS6gprt+AWtIiJW4+t51kiyLLHbhMdLorYlo5sdMCM2ObUU43nQpK7iK3V/Xo2R20ZA0Jdaq8KPT+D5PvLHYYV1aAZlru3PEwHMDwW1uwKstodl08DUcRYFHhMIsFuVvOBKGfRQK4MU9pzyZcLlOTGqBY7zVjnpquLhsfcyVmUkwtfmjsKEw02378bgigDQtwXkuYY4Z5eiOTAPS26rPpWMhGKc7XWGYR9Gh3lf/hGHNR23HYf20SgctvXSbrGxUmp4SSTvcRPF1qsHn6vKWUKYabW1fXhDXbaHuFx1/XB0P6SRyqJ6oQUORnTjStRi8kJ8QSd/t0xDnGoCrw/KTLBX26ZIUJCR7a9EIMJgMF7p0zHIrpsJxo/QKeMkEYi/T+a6gNWHpI=; 31:iL2oYzuVi39OMcnQCI8Q9L3kgqpnPF9mj1dUyhUcSGX8go0JyUjpIm+kYQRcvYcCRb7IOl4R54h+Lh4uKr+gYFs4JI0X0IJm+AbSK6j4rUa/1Habbs9FN/POsFGcWNP3rUrme4GExjzCLHyRu5ItjaMZrhWbJYmpUZ5ChQUhGokvzVIjfe+jmNeRnWD6zsS04Q3NX6PMECls0+3SSQanIfjb8HhScC7XClfOzQocSFFmQBjp77U0KA/Y7oQ+kkdW X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1979; 20:gA2707i+Rkj/rxOxQxdLHJvhJmH5LKIOxslGjcF2V47js6/mFzlrr6JBos1aTxruXvwnKW3O3jFaRSb9vj44pxL4+UVFnVBg/JDxxUBxBRWKL/yt7xH1Pp2zbK8VgGEw+IXC/DfNQSzxIfbmZ/27jSiprq3IA2F83VKekN4yQ9AW92PrzxEGc/9VYwXLQ8AAKErVJSyd21ASJbsvagWkhY/3e90rf6yOTaPcEUXqK4rrIU9fZmkIiExVucxTPMDi/ntihlBeBJ7XwwdQPMzM8IkqfYSa5X8/8UH3q1nUnymVs7zAcjSv8W+HNy1A2bHZo0DBXE6IlSe7k4VEPTq0Fkld2Zx8hJ5ifopuWoq2sNvNrE2Pn3IoTu4vhcPUsWu8tVZQ+i7PsBU++kMEYk1bxi+QxErhA9isNr0NQJEXKDBkwOzpUrtha4vs6DhXEHExOSNVCKTkoxVIhSEh7VDJ9W9Vt4zhWWo69bTlPL5YAkrjx69oe1cTEx/JVWrXnG6p X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(3002001)(93006095)(93003095)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123564025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR05MB1979; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR05MB1979; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB1979; 4:aVYTI12LiVDvXNytDp44RzLZ5JecIkYO1BH6gsB5s/?= =?us-ascii?Q?lZgbp9YiOJ++7coFXiQKaL5VesJ5/8RdmSQeae4EqRguV3ISCCsYZ+Fn6LGI?= =?us-ascii?Q?L8JIA8zaBtGiAinfnfw8diLuNM31fwKRhqcQtfy/spUcYc7PQS/kv/xYG4pw?= =?us-ascii?Q?3RYfVhTxrzWl6l9M8VRb3RHQDVZOa3lhxNrQ1M30jf6+IW4X5jCGdUMPPs71?= =?us-ascii?Q?XPsCdEYQJlqaAXUiObNL43UTxISwK3Xk04UMdhfLIEwf+7oDTWi6xYFKvb2o?= =?us-ascii?Q?3IXamBgk3cJuDmly/gfekKitIbL+Ofg7WOxttZVQYsd2fxhihY7M1n5GMTGI?= =?us-ascii?Q?BbYhvtpK/gaIyGZNtFsXU1Q1b4TtbeH7lIudMMgX1y39oh8Wdds4RNPyqb7J?= =?us-ascii?Q?6nnblqNadktuSKwNGLGJZrttpiYHIaGTyU/zRjqXNbifn+TNBhnTFiSxgbwx?= =?us-ascii?Q?40t8ovxi/JGq8CtBKLK603PU6Eqyn3cngyVMdRzV60C8gVDSf3YlYZGJkxWc?= =?us-ascii?Q?cBiWRYZ8r9QRGEpCg+15Dztm9YBTuAYsFWT20M0FmYovAxHkua1tIsIBNqvG?= =?us-ascii?Q?ObhVoqjSyKY/5dVyIqqkhKh7YWRAWr3H2v02flM8Sc8MHLgkZQSSSFrbflEC?= =?us-ascii?Q?wXgCVFwXQ+hCC7W8ekJkxG4xyNBdSB4aacPrzsY51PeuxKxfm7p8SSzAthcY?= =?us-ascii?Q?nTeDBnoCoC41DRdC840b351ObrI8DsYzuXUnBYvrh0nDlIATGYr9jlIQatrF?= =?us-ascii?Q?dT/hiaggjff9IbiAgxgZ1na8G7nbrKe+O8P6wlK4ft2UOfapsM8e1s47vON2?= =?us-ascii?Q?rz2nb3Whlj0bWx9AVNYix2WliHmEs4lLt5cE45UGQigIZdkB0GhHyQ7FL3a1?= =?us-ascii?Q?BSBcRMIa0IW9SUgoK55hRiFNVnMIPamZbAHdies8SbelI2N/doY5DChZzHIY?= =?us-ascii?Q?rf5G56u03UlUa/N7wYx/pxcFLjs6n6TGZfKilMQkqW1mQk3wcdGc/q3XEm08?= =?us-ascii?Q?oAKMxVKDqovbuiCCbnWOPsNeLqeorbrMSVRp/gqNfzJ6HA0/VjqeRcTlYhIp?= =?us-ascii?Q?EEKUsatgoX87g5CJ8qjBJIu3siVqPW8uoQuUD9qsfVlKV1Aoqgyrcv8xgUMc?= =?us-ascii?Q?spofOr5kz62FdVS+EwmaAAaA+eCnpUVqIwXExNLgqfFo7mkAf+8ijkWcbx9g?= =?us-ascii?Q?koYleIeUiKp3L13wNfZ+wjEntByI/CEMr/?= X-Forefront-PRVS: 0325F6C77B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB1979; 23:MYV2ryP4G+/L2SpviKIi7uoYQLMMVhxfnKvtI+2kd?= =?us-ascii?Q?5SenNURQ1VL97aQ47Tsrn34h9yn7Xk4vo2lmQOm9pJ/swIovo8z2YR6U0zZ/?= =?us-ascii?Q?As8tBtHqnCeAdI4XG+lVUA98afFMA71lZLwqC6p6GxYZzeyBuWTQR9QKbLJ7?= =?us-ascii?Q?B2+beTyF7VaQaYhlteZq+/CsSp3iKK0ma0VUDHCNa1gjtJ8mV44Q26StRKRc?= =?us-ascii?Q?YZgRjPX+r74I46SBsnrsWppUOt5UBEnmc4fojdMycKwLqFmgpl0haaYBSSnO?= =?us-ascii?Q?+zZNIZhWRk8RXeDOuMZa8dqwtHppc5pxRz8YdwPR2SGHNoSTvxnoBS+jxfSg?= =?us-ascii?Q?8fCJXr355n9Emhrj2dOPAoSS5d42A8N6bLJTdcTXU+WHWTPTXuxE97sdFPVD?= =?us-ascii?Q?C0S3j/sZPaMpWC5tm1kPzAZQTiUz8+f8K9JT340AGgUX0enk8I9TFARqybbY?= =?us-ascii?Q?alotc0pUtf73ijExtmaKTKLeJ1us7Hh0RXxzlZN6Qgs6aKhGUrk+0g1fOnrl?= =?us-ascii?Q?hNAPuKlAuZl+hpqUZruE56CaV9tV8upfJKzR2Yk3ndN5ZQa0id2TAwOAZTOu?= =?us-ascii?Q?Lbzu+tb4o3FKGcCXXiOsSexF/ICKL2Re7OA5C+y1/xcUA+Jm1FgV6vUklnZw?= =?us-ascii?Q?3KoVNI0SAMTXi620L6N5mplzeAdWiMOU9PTaQDZJh1nxWD3xdRQSAYTmWbYT?= =?us-ascii?Q?I9HWPriSW6qhRyp54kJ3ziMqZna5fBhpirX0d1fL0F7RABl6p2kc/nDaFHrf?= =?us-ascii?Q?tpMARX0XxdEpVvAO6NinDyCwqmk6bdz6WkDOnOCgVJZVk15jSS30L7IqgZ/2?= =?us-ascii?Q?lSaqosyOA/U8CxVSAJxBD/GRWgNu6JCV/H4+t8bBP1rEidrOEBhwk4XXe9ww?= =?us-ascii?Q?b0nwshH+GcDrhFauQYDZLIehQsjGxncEDGzrgc+DNsXhJJkwMwaX3GSflz3x?= =?us-ascii?Q?5BxWuvfPlRVXyfQ2UJ85lmJcC4t4/MNd9GNxKZqlU6aKhfZDG91F1OGvuV/r?= =?us-ascii?Q?mTl3gmAHwkC4f0bwKBzhCTKy1ErWrhZnins9/pXYWsMzO+I6n84Li9+TKAhT?= =?us-ascii?Q?7X7xeAp+Yx/qa6dLYndVw9q56C94n/KQZKyvdsIfZqbxXHQqZG1g/SKDG+Cx?= =?us-ascii?Q?ftQrtVsj5Timh8zlglWUKOoGDBLOCWS+MTtIBCMjJZQOHiSQM5l8GnjG1TI6?= =?us-ascii?Q?DwktfNTmZ2gJmXmkTPWyo7UpEdEkrZVcEcfs1EkidGMjmn9QxYqH61jAc67L?= =?us-ascii?Q?J76GPHYpVKsu7WxIbvx8780IqoBs8RMcHKTqTftCtFRdcYzSUhvTfbG8flNk?= =?us-ascii?Q?9yw+3Ysw4EoipWGhu9KnP01+SGqQZYxVuLakyZyH3Bf?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1979; 6:eFf+ScxH9Y719xxoliLPtcH4UVv6eITWeQdLeZ8qID/hZ/QvaVeVXHP2Tk/2Ju6TTefY2JSr10FJqbO83Kn4ilPK9Cd3qgugKk6G8Xv/w2Dn4Gnqlli5DyWeRn6nBNJQl5fdOBYXYYFctpp78u2jsvoSc4+hG7TdB5MrZXAA0oa8IL8WCkmZ8rqOXgXbwe8puaqYfS8QCRUojsBStURP0wFXz5zRllb6s8jszeTMYmwcCeg876L1YR8WZrqfKoULfFuU8jy1C+0iikzYfBLJCyCqKEJZriqs3PquBxD1fMZShxBzJEPXJVXHcPeW6e2J3lz1wze1jmlP2BHibgDa6A0T7EqbZaj7LMXOHvkkAI+RQG6Ziwp1DDswENxky1AiqQunAig9dtu9M7Yt2H9D6J9paHk/yt3XThfyHTKZ0ID4kUW02qTLMzLOt0WftL4drJ+DP+ZOTAy8UTXMDLc71JBSTfO0zI4P7HHAMqNz+ANdV3Hj6wpo3YQC6/fwniV/XgLKWVOt6tzrqvAP6JzyN56XLSzCQ1xkk2wOnSamqgU= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1979; 5:ukGpuqYlptRgASw5jCiPaHm+EWgOG8toasB3pwumE//OsrQB6VKPFV0hCsNvN79kbinjLQVb5qpl9YTOlKQ+rz42BWzmmKSwbuKcaOXM2fn1JtEhFM3LArF0E3aCeXUYhMOPRAgYxfmey5b+q8WwUoBBOSMB6fVt9tyENc/nkfiaHkl4C70RGzDFUBHl6+ZOno1b8ZuZHHjnT+mjIthZSM6oDwP3M1V4HkJBYESbtiZRF9QFsi/xH9MaHAWOBYUwv4bFmE+BYS3xq5rKVPXWsQw2QNzHDx3hSyNc2muMUqMm53laUm3M1rruCbQXomXiL0DoE0cVePg0MlrfjYosl4em/TQdAjiN221E8qpWCgWveUzDsDbFsHQRUQgHLu/7k1TZiERTBC9OK4Vr/VlMJh/RphLdLm0GnrAk2sGwdSwJDp6KBtIoykvE5QQUxVFVZlKPCH4a1wtk58Z/Y1ADmfSP8oe+w8QifYJ81+vlrV1IOmYSuH8XH3N9+j0duNj/; 24:qznwAkdqkyEl6qn/w6glqwro0ajW7RX1l/1O/glPTfuTT2ontTTk2392WpxpGejmxm6hByVe4MPnLr7DyKfw0SbdpDbCAFcfYVyePzKhLsg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1979; 7:ZVMUlN2gPJzdL6Cq/aGiXg2vuqCLQpD9JnSVcKr7WiU5/GDR541ZKX3Pig5iC7XOQ5rcAUaFy9y8LuEeByBKDIv22O8HwFclz76SLFIkyylnD2JHiO3dBIDeI4C9Jb9ngSUol1l7aOmsmCJb+bWH0PfdKeB+hN+0KYZpeCFhKkBjkYMNdV4JGG2rdpWzb4Zp2V9OT5OqJaHWnE/QONKi4biTJvI5biHOaSv64gCFxdVBniFHfzN59mWrXLhgC+MGUn5lrjiDB012z5jc6+JvXjo7I7CLxCguQl5/oda0keA0460QjmA1DM/2NuRQ5dC/SkCcn74VdcPSbKaFhJzJUA== X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2017 16:59:12.3281 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[p-emfe01a-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB1979 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 16:59:16 -0000 Ngie Cooper (yaneurabeya) wrote: > > These should not be stored uuencoded. It serves no purpose other > > than bloating the repo and causing spammy commit mails like this one > > where we got a huge tail of garbage output. The tests appear to contain generated filesystem images. eg. img-1x1-512-mbr.vmdk.gz.uu Is storing img-1x1-512-mbr.vmdk.gz any more palatable? One option would be to store a sha256 hash of the result. If the image generated by the test hashes to the correct value - you pass. Of course if the test fails, you are completely in the dark as to how/why. With the current arrangment, marcel at least has something he can examine to see where the output generation went wrong. From owner-svn-src-all@freebsd.org Thu Jun 1 17:07:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D719B7AAA7; Thu, 1 Jun 2017 17:07:14 +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 5D72B82E8B; Thu, 1 Jun 2017 17:07:14 +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 v51H7D90038094; Thu, 1 Jun 2017 17:07:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51H7DRx038093; Thu, 1 Jun 2017 17:07:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706011707.v51H7DRx038093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 1 Jun 2017 17:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319447 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 17:07:14 -0000 Author: gjb Date: Thu Jun 1 17:07:13 2017 New Revision: 319447 URL: https://svnweb.freebsd.org/changeset/base/319447 Log: Note groff(1) is planned for deprecation as of 12.0. Submitted by: rgrimes Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 16:55:03 2017 (r319446) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 1 17:07:13 2017 (r319447) @@ -259,6 +259,11 @@ the changelog date rather than file modification date in manual pages for build reproducibility. + + &man.groff.1; is planned to be deprecated effective &os; + 12.0-RELEASE. + + &man.unbound.8; has been updated to version 1.5.10. From owner-svn-src-all@freebsd.org Thu Jun 1 17:16:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 192B1B7ACD1; Thu, 1 Jun 2017 17:16:43 +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 E10EC8337B; Thu, 1 Jun 2017 17:16:42 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 3B1B921BD; Thu, 1 Jun 2017 17:16:42 +0000 (UTC) Date: Thu, 1 Jun 2017 17:16:42 +0000 From: Alexey Dokuchaev To: "Simon J. Gerraty" Cc: "Ngie Cooper (yaneurabeya)" , Marcel Moolenaar , src-committers , svn-src-all@FreeBSD.org, Brooks Davis , svn-src-head@FreeBSD.org, Ngie Cooper Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests Message-ID: <20170601171642.GA601@FreeBSD.org> References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> <84744.1496336318@kaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84744.1496336318@kaos.jnpr.net> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 17:16:43 -0000 On Thu, Jun 01, 2017 at 09:58:38AM -0700, Simon J. Gerraty wrote: > One option would be to store a sha256 hash of the result. > If the image generated by the test hashes to the correct value - you > pass. That should be preferred. Storing binary blobs in VCS is bad practice. > Of course if the test fails, you are completely in the dark as to > how/why. Not really: you checkout previous version (which produces correct hash) and store generated image for later inspection and diffing. > Is storing img-1x1-512-mbr.vmdk.gz any more palatable? This is barely acceptable, but only if image was zerofied/sparsed prior to compression. Also, the image should be of the minimal (sufficient) working size. ./danfe From owner-svn-src-all@freebsd.org Thu Jun 1 18:26:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E2B6B7BCA2; Thu, 1 Jun 2017 18:26:58 +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 69D7E96; Thu, 1 Jun 2017 18:26:58 +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 v51IQvHK070488; Thu, 1 Jun 2017 18:26:57 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51IQvFx070487; Thu, 1 Jun 2017 18:26:57 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706011826.v51IQvFx070487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 1 Jun 2017 18:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319448 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 18:26:58 -0000 Author: glebius Date: Thu Jun 1 18:26:57 2017 New Revision: 319448 URL: https://svnweb.freebsd.org/changeset/base/319448 Log: Simplify boot pages management in UMA. It is simply a contigous virtual memory pointer and number of pages. There is no need to build a linked list here. Just increment pointer and decrement counter. The only functional difference to old allocator is that before we gave pages from topmost and down to lowest, and now we give them in normal ascending order. While here remove padalign from a mutex that is unused at runtime. Reviewed by: alc Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Jun 1 17:07:13 2017 (r319447) +++ head/sys/vm/uma_core.c Thu Jun 1 18:26:57 2017 (r319448) @@ -140,13 +140,16 @@ static LIST_HEAD(,uma_zone) uma_cachezones = /* This RW lock protects the keg list */ static struct rwlock_padalign uma_rwlock; -/* Linked list of boot time pages */ -static LIST_HEAD(,uma_slab) uma_boot_pages = - LIST_HEAD_INITIALIZER(uma_boot_pages); +/* + * Pointer and counter to pool of pages, that is preallocated at + * startup to bootstrap UMA. Early zones continue to use the pool + * until it is depleted, so allocations may happen after boot, thus + * we need a mutex to protect it. + */ +static char *bootmem; +static int boot_pages; +static struct mtx uma_boot_pages_mtx; -/* This mutex protects the boot time pages list */ -static struct mtx_padalign uma_boot_pages_mtx; - static struct sx uma_drain_lock; /* Is the VM done starting up? */ @@ -1034,36 +1037,24 @@ static void * startup_alloc(uma_zone_t zone, vm_size_t bytes, uint8_t *pflag, int wait) { uma_keg_t keg; - uma_slab_t tmps; - int pages, check_pages; + void *mem; + int pages; keg = zone_first_keg(zone); pages = howmany(bytes, PAGE_SIZE); - check_pages = pages - 1; KASSERT(pages > 0, ("startup_alloc can't reserve 0 pages\n")); /* * Check our small startup cache to see if it has pages remaining. */ mtx_lock(&uma_boot_pages_mtx); - - /* First check if we have enough room. */ - tmps = LIST_FIRST(&uma_boot_pages); - while (tmps != NULL && check_pages-- > 0) - tmps = LIST_NEXT(tmps, us_link); - if (tmps != NULL) { - /* - * It's ok to lose tmps references. The last one will - * have tmps->us_data pointing to the start address of - * "pages" contiguous pages of memory. - */ - while (pages-- > 0) { - tmps = LIST_FIRST(&uma_boot_pages); - LIST_REMOVE(tmps, us_link); - } + if (pages <= boot_pages) { + mem = bootmem; + boot_pages -= pages; + bootmem += pages * PAGE_SIZE; mtx_unlock(&uma_boot_pages_mtx); - *pflag = tmps->us_flags; - return (tmps->us_data); + *pflag = UMA_SLAB_BOOT; + return (mem); } mtx_unlock(&uma_boot_pages_mtx); if (booted < UMA_STARTUP2) @@ -1748,11 +1739,9 @@ zone_foreach(void (*zfunc)(uma_zone_t)) /* Public functions */ /* See uma.h */ void -uma_startup(void *bootmem, int boot_pages) +uma_startup(void *mem, int npages) { struct uma_zctor_args args; - uma_slab_t slab; - int i; #ifdef UMA_DEBUG printf("Creating uma keg headers zone and keg.\n"); @@ -1773,16 +1762,9 @@ uma_startup(void *bootmem, int boot_pages) /* The initial zone has no Per cpu queues so it's smaller */ zone_ctor(kegs, sizeof(struct uma_zone), &args, M_WAITOK); -#ifdef UMA_DEBUG - printf("Filling boot free list.\n"); -#endif - for (i = 0; i < boot_pages; i++) { - slab = (uma_slab_t)((uint8_t *)bootmem + (i * UMA_SLAB_SIZE)); - slab->us_data = (uint8_t *)slab; - slab->us_flags = UMA_SLAB_BOOT; - LIST_INSERT_HEAD(&uma_boot_pages, slab, us_link); - } mtx_init(&uma_boot_pages_mtx, "UMA boot pages", NULL, MTX_DEF); + bootmem = mem; + boot_pages = npages; #ifdef UMA_DEBUG printf("Creating uma zone headers zone and keg.\n"); From owner-svn-src-all@freebsd.org Thu Jun 1 18:27:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7583CB7BCEC; Thu, 1 Jun 2017 18:27:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::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 3D9441E0; Thu, 1 Jun 2017 18:27:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id u26so8126932pfd.2; Thu, 01 Jun 2017 11:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=d5T5DiW1azUMCdgU6fO5gaNT0Ga90Fqig2abiRnRkuA=; b=BhtvR6hN/hR0sOqJcwsPX8xRN9VEGAD2NWwj1Xq0WsqEPvmXimw1FKhVPmDaitIDoW uP98NgYsW0Dxf/DtvbXe3cA98QsYSJmEMZo1RdOCI0qeWP1su5PuD3gBkX3iNdmTdE7c cVov377WW5kHCif4HtXxz9T1SYItKkbZW15YwJt173RpBNnQH8oGVRAj79sMtkUHMdv8 Uu+xPZb+gpag1kKTgJG7nCBbi0Cd14Q5NaeyoflVJKaVulJ4VvX1hA6o1uDqsuJTnMIZ LrlmVd8Ekx1YFy2s2okPP0yTC3rgLxkvBfJriuqWtWGqNTXVI8tAuPuqyhl23E9JNE6q lI9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=d5T5DiW1azUMCdgU6fO5gaNT0Ga90Fqig2abiRnRkuA=; b=JKAtwxm9oOJ3fUxkAJwwMJfIiKR1OfZNOCZFQ7JULr8z+ugqjXGKLyRbiwMnodeGuK 15AIgFJpaU/lts4cOd7m6xlMavAiGo1i+wMeBJou1xKwyqWvR7dPaTx6TbRinqNuguX1 KqEeMicAiw2bn96yZENHtjGX83ADLUV2ZJWzOHNH5UCs1m2725I1EuvHFtgYNJZDsTSh A4CCygHmyP49fi62jD6Hiqqs/p2iCgpf9rKskdkzg/UDqoacBA2lTaC3sbcqKg46gqI8 Odow85UpHzMew/JEnK01HnTiOjlsIpbqyAsv0kBIagkGyObS6K87i2CBwSj8AZpPLSpN VYCw== X-Gm-Message-State: AODbwcA2yi6xqjncVL2GRz2F+SFxoGrDeUWSz2fYuEm97918vo/5orAF UWhKYQbtC0peR6hn6r8= X-Received: by 10.84.234.1 with SMTP id m1mr68427869plk.41.1496341641538; Thu, 01 Jun 2017 11:27:21 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id x5sm37326323pfi.94.2017.06.01.11.27.20 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Jun 2017 11:27:20 -0700 (PDT) Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_70298DD0-5C10-4996-8206-E9E727E1224C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170601171642.GA601@FreeBSD.org> Date: Thu, 1 Jun 2017 11:27:18 -0700 Cc: "Simon J. Gerraty" , Marcel Moolenaar , src-committers , svn-src-all@FreeBSD.org, Brooks Davis , svn-src-head@FreeBSD.org, Ngie Cooper Message-Id: References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> <84744.1496336318@kaos.jnpr.net> <20170601171642.GA601@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 18:27:22 -0000 --Apple-Mail=_70298DD0-5C10-4996-8206-E9E727E1224C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 1, 2017, at 10:16, Alexey Dokuchaev wrote: >=20 > On Thu, Jun 01, 2017 at 09:58:38AM -0700, Simon J. Gerraty wrote: >> One option would be to store a sha256 hash of the result. >> If the image generated by the test hashes to the correct value - you >> pass. >=20 > That should be preferred. Storing binary blobs in VCS is bad = practice. >=20 >> Of course if the test fails, you are completely in the dark as to >> how/why. >=20 > Not really: you checkout previous version (which produces correct = hash) > and store generated image for later inspection and diffing. >=20 >> Is storing img-1x1-512-mbr.vmdk.gz any more palatable? >=20 > This is barely acceptable, but only if image was zerofied/sparsed = prior > to compression. Also, the image should be of the minimal (sufficient) > working size. I vote for not checking in the SHAs. If something fails (as = someone else mentioned on the lists), it=E2=80=99s really hard to debug = why it failed. I think marcel@=E2=80=99s proposal for hexdump -C text dumps are = the best way to handle this. Thanks, -Ngie --Apple-Mail=_70298DD0-5C10-4996-8206-E9E727E1224C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZMFyHAAoJEPWDqSZpMIYVOWkP/RiWtIzJXiUBzKzgBvUwbTT+ JFLyYY1F+YqKUJsJLInOzF4rKiO7nVVb0edvr10EYFjkfkttItxwnYZAzrjdbHrc nipBzXmuOgDf0zUy8MHOucvIa+IdQ7fgdcX42dB9r3pb1E7ZTwxd3ju++eW8CWZc u0VlxX5L9/hgA5Q8rh2yS+V1PQt/mNS0iO2cM39JJtr8nhJ5cz6KAPIn0+7bErLq CA4xydgjEsBSZb77oAymE+MpYKsoa2j1HW+qaJUSIfV+dNuaUmM91w4i2E0WjEeV iQ/AierBY0QBtUgjBQZUcMgLp3wOdFQG94HlUnQqs86ejrmFCRj44YGBDH2lubpQ axxu6U0y6ja4R7XQxu1gKZaIrOMkbB2pCHFL0XUV3Iv3uSAt8fam75ZhA8X+xvvZ PGag0NDoDO+v0LS2FazyZpgPuvdSnbiFDN7w3eCH6SOf/o0+/gN4LmD2MB2m9bRc b97ra7RHmEbg1syJTxZVolQFqCNx3j3AX7FIdNKOTXNy8Vgr0Z4AxwjaGATlXKM8 4htHWFfEKzJsa31AID3+PnRacqrlDkruxVhofNMDseoJduwrC3P+G2PP4xXNx8Hy E5XZjfRJZEJu9mJJODffx5Jb7RHyBhSh4g3yh2KTbjEmD/4lHgM3t6tHczP3x68d jLLwfqSS/hufMCaecIWt =YJ/f -----END PGP SIGNATURE----- --Apple-Mail=_70298DD0-5C10-4996-8206-E9E727E1224C-- From owner-svn-src-all@freebsd.org Thu Jun 1 18:35:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C49DB7BFAC; Thu, 1 Jun 2017 18:35:06 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A51FA99; Thu, 1 Jun 2017 18:35:05 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51IZ5qA074461; Thu, 1 Jun 2017 18:35:05 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51IZ5cs074460; Thu, 1 Jun 2017 18:35:05 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706011835.v51IZ5cs074460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 1 Jun 2017 18:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319449 - stable/11/sys/dev/qlnx/qlnxe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 18:35:06 -0000 Author: davidcs Date: Thu Jun 1 18:35:04 2017 New Revision: 319449 URL: https://svnweb.freebsd.org/changeset/base/319449 Log: MFC r318676 Check for IPV6 TCP/UDP CSUM offload in pkt header during transmits. Submitted by:Shminderjit.Singh@cavium.com Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Thu Jun 1 18:26:57 2017 (r319448) +++ stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c Thu Jun 1 18:35:04 2017 (r319449) @@ -2946,7 +2946,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, s (1 << ETH_TX_1ST_BD_FLAGS_IP_CSUM_SHIFT); } - if (m_head->m_pkthdr.csum_flags & (CSUM_UDP | CSUM_TCP)) { + if (m_head->m_pkthdr.csum_flags & + (CSUM_UDP | CSUM_TCP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6)) { first_bd->data.bd_flags.bitfields |= (1 << ETH_TX_1ST_BD_FLAGS_L4_CSUM_SHIFT); } From owner-svn-src-all@freebsd.org Thu Jun 1 18:36:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC5A6B7C179; Thu, 1 Jun 2017 18:36:53 +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 A6DE6E64; Thu, 1 Jun 2017 18:36:53 +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 v51Iaqhd074593; Thu, 1 Jun 2017 18:36:52 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Iaq8x074592; Thu, 1 Jun 2017 18:36:52 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706011836.v51Iaq8x074592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 1 Jun 2017 18:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319450 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 18:36:53 -0000 Author: glebius Date: Thu Jun 1 18:36:52 2017 New Revision: 319450 URL: https://svnweb.freebsd.org/changeset/base/319450 Log: As old prophecy says, some day UMA_DEBUG printfs shall be made CTRs. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Jun 1 18:35:04 2017 (r319449) +++ head/sys/vm/uma_core.c Thu Jun 1 18:36:52 2017 (r319450) @@ -50,13 +50,6 @@ #include __FBSDID("$FreeBSD$"); -/* I should really use ktr.. */ -/* -#define UMA_DEBUG 1 -#define UMA_DEBUG_ALLOC 1 -#define UMA_DEBUG_ALLOC_1 1 -*/ - #include "opt_ddb.h" #include "opt_param.h" #include "opt_vm.h" @@ -822,6 +815,9 @@ keg_free_slab(uma_keg_t keg, uma_slab_t slab, int star int i; uint8_t flags; + CTR4(KTR_UMA, "keg_free_slab keg %s(%p) slab %p, returning %d bytes", + keg->uk_name, keg, slab, PAGE_SIZE * keg->uk_ppera); + mem = slab->us_data; flags = slab->us_flags; i = start; @@ -832,10 +828,6 @@ keg_free_slab(uma_keg_t keg, uma_slab_t slab, int star } if (keg->uk_flags & UMA_ZONE_OFFPAGE) zone_free_item(keg->uk_slabzone, slab, NULL, SKIP_NONE); -#ifdef UMA_DEBUG - printf("%s: Returning %d bytes.\n", keg->uk_name, - PAGE_SIZE * keg->uk_ppera); -#endif keg->uk_freef(mem, PAGE_SIZE * keg->uk_ppera, flags); } @@ -858,9 +850,8 @@ keg_drain(uma_keg_t keg) if (keg->uk_flags & UMA_ZONE_NOFREE || keg->uk_freef == NULL) return; -#ifdef UMA_DEBUG - printf("%s free items: %u\n", keg->uk_name, keg->uk_free); -#endif + CTR3(KTR_UMA, "keg_drain %s(%p) free items: %u", + keg->uk_name, keg, keg->uk_free); KEG_LOCK(keg); if (keg->uk_free == 0) goto finished; @@ -950,9 +941,6 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int wai slab = NULL; mem = NULL; -#ifdef UMA_DEBUG - printf("alloc_slab: Allocating a new slab for %s\n", keg->uk_name); -#endif allocf = keg->uk_allocf; KEG_UNLOCK(keg); @@ -1017,6 +1005,9 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int wai out: KEG_LOCK(keg); + CTR3(KTR_UMA, "keg_alloc_slab: allocated slab %p for %s(%p)", + slab, keg->uk_name, keg); + if (slab != NULL) { if (keg->uk_flags & UMA_ZONE_HASH) UMA_HASH_INSERT(&keg->uk_hash, slab, mem); @@ -1274,15 +1265,13 @@ keg_small_init(uma_keg_t keg) keg->uk_ipers = slabsize / keg->uk_rsize; KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= SLAB_SETSIZE, ("%s: keg->uk_ipers %u", __func__, keg->uk_ipers)); -#ifdef UMA_DEBUG - printf("UMA decided we need offpage slab headers for " - "keg: %s, calculated wastedspace = %d, " + CTR6(KTR_UMA, "UMA decided we need offpage slab headers for " + "keg: %s(%p), calculated wastedspace = %d, " "maximum wasted space allowed = %d, " "calculated ipers = %d, " - "new wasted space = %d\n", keg->uk_name, wastedspace, + "new wasted space = %d\n", keg->uk_name, keg, wastedspace, slabsize / UMA_MAX_WASTE, keg->uk_ipers, slabsize - keg->uk_ipers * keg->uk_rsize); -#endif keg->uk_flags |= UMA_ZONE_OFFPAGE; } @@ -1492,13 +1481,10 @@ keg_ctor(void *mem, int size, void *udata, int flags) if (keg->uk_flags & UMA_ZONE_HASH) hash_alloc(&keg->uk_hash); -#ifdef UMA_DEBUG - printf("UMA: %s(%p) size %d(%d) flags %#x ipers %d ppera %d out %d free %d\n", - zone->uz_name, zone, keg->uk_size, keg->uk_rsize, keg->uk_flags, - keg->uk_ipers, keg->uk_ppera, + CTR5(KTR_UMA, "keg_ctor %p zone %s(%p) out %d free %d\n", + keg, zone->uz_name, zone, (keg->uk_pages / keg->uk_ppera) * keg->uk_ipers - keg->uk_free, keg->uk_free); -#endif LIST_INSERT_HEAD(&keg->uk_zones, zone, uz_link); @@ -1743,9 +1729,6 @@ uma_startup(void *mem, int npages) { struct uma_zctor_args args; -#ifdef UMA_DEBUG - printf("Creating uma keg headers zone and keg.\n"); -#endif rw_init(&uma_rwlock, "UMA lock"); /* "manually" create the initial zone */ @@ -1766,9 +1749,6 @@ uma_startup(void *mem, int npages) bootmem = mem; boot_pages = npages; -#ifdef UMA_DEBUG - printf("Creating uma zone headers zone and keg.\n"); -#endif args.name = "UMA Zones"; args.size = sizeof(struct uma_zone) + (sizeof(struct uma_cache) * (mp_maxid + 1)); @@ -1782,10 +1762,6 @@ uma_startup(void *mem, int npages) /* The initial zone has no Per cpu queues so it's smaller */ zone_ctor(zones, sizeof(struct uma_zone), &args, M_WAITOK); -#ifdef UMA_DEBUG - printf("Creating slab and hash zones.\n"); -#endif - /* Now make a zone for slab headers */ slabzone = uma_zcreate("UMA Slabs", sizeof(struct uma_slab), @@ -1800,10 +1776,6 @@ uma_startup(void *mem, int npages) bucket_init(); booted = UMA_STARTUP; - -#ifdef UMA_DEBUG - printf("UMA startup complete.\n"); -#endif } /* see uma.h */ @@ -1813,9 +1785,6 @@ uma_startup2(void) booted = UMA_STARTUP2; bucket_enable(); sx_init(&uma_drain_lock, "umadrain"); -#ifdef UMA_DEBUG - printf("UMA startup2 complete.\n"); -#endif } /* @@ -1826,14 +1795,9 @@ uma_startup2(void) static void uma_startup3(void) { -#ifdef UMA_DEBUG - printf("Starting callout.\n"); -#endif + callout_init(&uma_callout, 1); callout_reset(&uma_callout, UMA_TIMEOUT * hz, uma_timeout, NULL); -#ifdef UMA_DEBUG - printf("UMA startup3 complete.\n"); -#endif } static uma_keg_t @@ -2073,11 +2037,8 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags random_harvest_fast_uma(&zone, sizeof(zone), 1, RANDOM_UMA); /* This is the fast path allocation */ -#ifdef UMA_DEBUG_ALLOC_1 - printf("Allocating one item from %s(%p)\n", zone->uz_name, zone); -#endif - CTR3(KTR_UMA, "uma_zalloc_arg thread %x zone %s flags %d", curthread, - zone->uz_name, flags); + CTR4(KTR_UMA, "uma_zalloc_arg thread %x zone %s(%p) flags %d", + curthread, zone->uz_name, zone, flags); if (flags & M_WAITOK) { WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, @@ -2150,9 +2111,9 @@ zalloc_start: */ bucket = cache->uc_freebucket; if (bucket != NULL && bucket->ub_cnt > 0) { -#ifdef UMA_DEBUG_ALLOC - printf("uma_zalloc: Swapping empty with alloc.\n"); -#endif + CTR2(KTR_UMA, + "uma_zalloc: zone %s(%p) swapping empty with alloc", + zone->uz_name, zone); cache->uc_freebucket = cache->uc_allocbucket; cache->uc_allocbucket = bucket; goto zalloc_start; @@ -2233,6 +2194,8 @@ zalloc_start: * will use the just filled bucket. */ bucket = zone_alloc_bucket(zone, udata, flags); + CTR3(KTR_UMA, "uma_zalloc: zone %s(%p) bucket zone returned %p", + zone->uz_name, zone, bucket); if (bucket != NULL) { ZONE_LOCK(zone); critical_enter(); @@ -2254,10 +2217,6 @@ zalloc_start: /* * We may not be able to get a bucket so return an actual item. */ -#ifdef UMA_DEBUG - printf("uma_zalloc_arg: Bucketzone returned NULL\n"); -#endif - zalloc_item: item = zone_alloc_item(zone, udata, flags); @@ -2563,9 +2522,6 @@ zone_alloc_item(uma_zone_t zone, void *udata, int flag item = NULL; -#ifdef UMA_DEBUG_ALLOC - printf("INTERNAL: Allocating one item from %s(%p)\n", zone->uz_name, zone); -#endif if (zone->uz_import(zone->uz_arg, &item, 1, flags) != 1) goto fail; atomic_add_long(&zone->uz_allocs, 1); @@ -2594,9 +2550,14 @@ zone_alloc_item(uma_zone_t zone, void *udata, int flag if (flags & M_ZERO) uma_zero_item(item, zone); + CTR3(KTR_UMA, "zone_alloc_item item %p from %s(%p)", item, + zone->uz_name, zone); + return (item); fail: + CTR2(KTR_UMA, "zone_alloc_item failed from %s(%p)", + zone->uz_name, zone); atomic_add_long(&zone->uz_fails, 1); return (NULL); } @@ -2613,9 +2574,6 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */ random_harvest_fast_uma(&zone, sizeof(zone), 1, RANDOM_UMA); -#ifdef UMA_DEBUG_ALLOC_1 - printf("Freeing item %p to %s(%p)\n", item, zone->uz_name, zone); -#endif CTR2(KTR_UMA, "uma_zfree_arg thread %x zone %s", curthread, zone->uz_name); @@ -2727,9 +2685,9 @@ zfree_start: /* Can we throw this on the zone full list? */ if (bucket != NULL) { -#ifdef UMA_DEBUG_ALLOC - printf("uma_zfree: Putting old bucket on the free list.\n"); -#endif + CTR3(KTR_UMA, + "uma_zfree: zone %s(%p) putting bucket %p on free list", + zone->uz_name, zone, bucket); /* ub_cnt is pointing to the last free item */ KASSERT(bucket->ub_cnt != 0, ("uma_zfree: Attempting to insert an empty bucket onto the full list.\n")); @@ -2744,10 +2702,9 @@ zfree_start: zone->uz_count++; ZONE_UNLOCK(zone); -#ifdef UMA_DEBUG_ALLOC - printf("uma_zfree: Allocating new free bucket.\n"); -#endif bucket = bucket_alloc(zone, udata, M_NOWAIT); + CTR3(KTR_UMA, "uma_zfree: zone %s(%p) allocated bucket %p", + zone->uz_name, zone, bucket); if (bucket) { critical_enter(); cpu = curcpu; @@ -3138,9 +3095,7 @@ static void uma_reclaim_locked(bool kmem_danger) { -#ifdef UMA_DEBUG - printf("UMA: vm asked us to release pages!\n"); -#endif + CTR0(KTR_UMA, "UMA: vm asked us to release pages!"); sx_assert(&uma_drain_lock, SA_XLOCKED); bucket_enable(); zone_foreach(zone_drain); From owner-svn-src-all@freebsd.org Thu Jun 1 18:37:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BFC5B7C1DB; Thu, 1 Jun 2017 18:37:10 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE07AF88; Thu, 1 Jun 2017 18:37:09 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51Ib8PI074651; Thu, 1 Jun 2017 18:37:08 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Ib8dg074650; Thu, 1 Jun 2017 18:37:08 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706011837.v51Ib8dg074650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 1 Jun 2017 18:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319451 - stable/10/sys/dev/qlnx/qlnxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 18:37:10 -0000 Author: davidcs Date: Thu Jun 1 18:37:08 2017 New Revision: 319451 URL: https://svnweb.freebsd.org/changeset/base/319451 Log: MFC r318676 Check for IPV6 TCP/UDP CSUM offload in pkt header during transmits. Submitted by:Shminderjit.Singh@cavium.com Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Thu Jun 1 18:36:52 2017 (r319450) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Thu Jun 1 18:37:08 2017 (r319451) @@ -2946,7 +2946,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, s (1 << ETH_TX_1ST_BD_FLAGS_IP_CSUM_SHIFT); } - if (m_head->m_pkthdr.csum_flags & (CSUM_UDP | CSUM_TCP)) { + if (m_head->m_pkthdr.csum_flags & + (CSUM_UDP | CSUM_TCP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6)) { first_bd->data.bd_flags.bitfields |= (1 << ETH_TX_1ST_BD_FLAGS_L4_CSUM_SHIFT); } From owner-svn-src-all@freebsd.org Thu Jun 1 18:39:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 331A6B7C291; Thu, 1 Jun 2017 18:39:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F24871160; Thu, 1 Jun 2017 18:39:55 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51IdtLC074785; Thu, 1 Jun 2017 18:39:55 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51IdtCC074784; Thu, 1 Jun 2017 18:39:55 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201706011839.v51IdtCC074784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 1 Jun 2017 18:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319452 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 18:39:56 -0000 Author: mjg Date: Thu Jun 1 18:39:54 2017 New Revision: 319452 URL: https://svnweb.freebsd.org/changeset/base/319452 Log: MFC r319167: mtx: fix whitespace damage in _mtx_trylock_flags_ Modified: stable/11/sys/kern/kern_mutex.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_mutex.c ============================================================================== --- stable/11/sys/kern/kern_mutex.c Thu Jun 1 18:37:08 2017 (r319451) +++ stable/11/sys/kern/kern_mutex.c Thu Jun 1 18:39:54 2017 (r319452) @@ -410,10 +410,10 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, c if (v == tid && ((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || (opts & MTX_RECURSE) != 0)) { - m->mtx_recurse++; - atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); - recursed = true; - break; + m->mtx_recurse++; + atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); + recursed = true; + break; } rval = 0; break; From owner-svn-src-all@freebsd.org Thu Jun 1 19:21:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2620DB7CEDA; Thu, 1 Jun 2017 19:21:32 +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 E9A812F46; Thu, 1 Jun 2017 19:21:31 +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 v51JLUdi094343; Thu, 1 Jun 2017 19:21:30 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51JLUqE094342; Thu, 1 Jun 2017 19:21:30 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201706011921.v51JLUqE094342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Thu, 1 Jun 2017 19:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319453 - head/contrib/telnet/telnetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 19:21:32 -0000 Author: stevek Date: Thu Jun 1 19:21:30 2017 New Revision: 319453 URL: https://svnweb.freebsd.org/changeset/base/319453 Log: Fix memory leak in edithost The problem is that when the parameter 'pat' is null, the function locally allocates a NULL string but never frees it. Instead of tracking the local alloc, it is noted that the while(*pat) never enters when there is a local alloc. So instead of doing the local alloc, check that 'pat' is null before the while(*pat) loop. Found using clang's static analyzer - scan-build Submitted by: Thomas Rix Reviewed by: markm Approved by: sjg (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9689 Modified: head/contrib/telnet/telnetd/utility.c Modified: head/contrib/telnet/telnetd/utility.c ============================================================================== --- head/contrib/telnet/telnetd/utility.c Thu Jun 1 18:39:54 2017 (r319452) +++ head/contrib/telnet/telnetd/utility.c Thu Jun 1 19:21:30 2017 (r319453) @@ -360,30 +360,30 @@ edithost(char *pat, char *host) { char *res = editedhost; - if (!pat) - pat = strdup(""); - while (*pat) { - switch (*pat) { + if (pat) { + while (*pat) { + switch (*pat) { - case '#': - if (*host) - host++; - break; + case '#': + if (*host) + host++; + break; - case '@': - if (*host) - *res++ = *host++; - break; + case '@': + if (*host) + *res++ = *host++; + break; - default: - *res++ = *pat; - break; + default: + *res++ = *pat; + break; + } + if (res == &editedhost[sizeof editedhost - 1]) { + *res = '\0'; + return; + } + pat++; } - if (res == &editedhost[sizeof editedhost - 1]) { - *res = '\0'; - return; - } - pat++; } if (*host) (void) strncpy(res, host, From owner-svn-src-all@freebsd.org Thu Jun 1 19:27:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95576B7D079; Thu, 1 Jun 2017 19:27:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6407839D1; Thu, 1 Jun 2017 19:27:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51JRcsq095447; Thu, 1 Jun 2017 19:27:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51JRcMd095446; Thu, 1 Jun 2017 19:27:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706011927.v51JRcMd095446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 1 Jun 2017 19:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319454 - head/tests/sys/opencrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 19:27:39 -0000 Author: jhb Date: Thu Jun 1 19:27:38 2017 New Revision: 319454 URL: https://svnweb.freebsd.org/changeset/base/319454 Log: Honor the requested crid when running a test. Otherwise, the kernel is free to choose an aribtrary crypto device rather than the requested device subverting tests that force the use of a specific device. MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D10762 Modified: head/tests/sys/opencrypto/cryptodev.py Modified: head/tests/sys/opencrypto/cryptodev.py ============================================================================== --- head/tests/sys/opencrypto/cryptodev.py Thu Jun 1 19:21:30 2017 (r319453) +++ head/tests/sys/opencrypto/cryptodev.py Thu Jun 1 19:27:38 2017 (r319454) @@ -173,10 +173,7 @@ class Crypto: if not cipher and not mac: raise ValueError('one of cipher or mac MUST be specified.') - ses.crid = CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_HARDWARE - #ses.crid = CRYPTOCAP_F_HARDWARE - #ses.crid = CRYPTOCAP_F_SOFTWARE - #ses.crid = 0 + ses.crid = crid #print `ses` s = array.array('B', ses.pack_hdr()) #print `s` From owner-svn-src-all@freebsd.org Thu Jun 1 19:46:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A37AB7D4BB; Thu, 1 Jun 2017 19:46:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE8136448D; Thu, 1 Jun 2017 19:46:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51JknUH003420; Thu, 1 Jun 2017 19:46:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Jknsv003419; Thu, 1 Jun 2017 19:46:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706011946.v51Jknsv003419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 19:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319455 - head/tests/sys/opencrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 19:46:50 -0000 Author: ngie Date: Thu Jun 1 19:46:48 2017 New Revision: 319455 URL: https://svnweb.freebsd.org/changeset/base/319455 Log: Fix up `TEST_METADATA` - `TEST_METADATA.foo` should be `TEST_METADATA.run_tests`: this will unbreak trying to run the tests on a system without python installed in $PATH. - The tests require root because they load aesni(4) and/or cryptodev(4) if not already loaded. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/opencrypto/Makefile Modified: head/tests/sys/opencrypto/Makefile ============================================================================== --- head/tests/sys/opencrypto/Makefile Thu Jun 1 19:27:38 2017 (r319454) +++ head/tests/sys/opencrypto/Makefile Thu Jun 1 19:46:48 2017 (r319455) @@ -7,7 +7,9 @@ BINDIR= ${TESTSDIR} PLAIN_TESTS_SH= runtests -TEST_METADATA.foo+=required_programs="python" +TEST_METADATA.runtests+= required_programs="python" +TEST_METADATA.runtests+= required_user="root" + PYMODULES= cryptodev.py cryptodevh.py cryptotest.py dpkt.py ${PACKAGE}FILES+= ${PYMODULES} From owner-svn-src-all@freebsd.org Thu Jun 1 19:58:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFA36B7D94D; Thu, 1 Jun 2017 19:58:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEE1864F0A; Thu, 1 Jun 2017 19:58:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51Jwedu009396; Thu, 1 Jun 2017 19:58:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51JwemR009395; Thu, 1 Jun 2017 19:58:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706011958.v51JwemR009395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 1 Jun 2017 19:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319456 - head/tests/sys/opencrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 19:58:42 -0000 Author: ngie Date: Thu Jun 1 19:58:40 2017 New Revision: 319456 URL: https://svnweb.freebsd.org/changeset/base/319456 Log: tests/sys/opencrypto/runtests: apply minor polish to test script - Refactor kld loading/unloading logic: -- Use a loop instead of an unrolled one. -- Check for the module being loaded before trying to load it, to reduce noise when loading modules that are already loaded. -- Don't mute stderr from kldload -- it could be potentially useful to the tester. -- In the event that the test script was terminated early, it would leave the modules still attached to the system (which is undesirable). Always unload the modules at test end with EXIT/SIGINT/SIGTERM so the system is returned to its former operating state as best possible. Unload the modules in reverse order, in part for consistency and/or dependency reasons. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/opencrypto/runtests.sh Modified: head/tests/sys/opencrypto/runtests.sh ============================================================================== --- head/tests/sys/opencrypto/runtests.sh Thu Jun 1 19:46:48 2017 (r319455) +++ head/tests/sys/opencrypto/runtests.sh Thu Jun 1 19:58:40 2017 (r319456) @@ -29,21 +29,34 @@ # $FreeBSD$ # -set -e +set -ex if [ ! -d /usr/local/share/nist-kat ]; then echo 'Skipping, nist-kat package not installed for test vectors.' exit 0 fi -if kldload aesni 2>/dev/null; then - unloadaesni=1 -fi +loaded_modules= +cleanup_tests() +{ + trap - EXIT INT TERM -if kldload cryptodev 2>/dev/null; then - unloadcdev=1 -fi + set +e + # Unload modules in reverse order + for loaded_module in $(echo $loaded_modules | tr ' ' '\n' | sort -r); do + kldunload $loaded_module + done +} +trap cleanup_tests EXIT INT TERM + +for required_module in aesni cryptodev; do + if ! kldstat -q -m $required_module; then + kldload $required_module + loaded_modules="$loaded_modules $required_module" + fi +done + # Run software crypto test oldcdas=$(sysctl -e kern.cryptodevallowsoft) sysctl kern.cryptodevallowsoft=1 @@ -51,10 +64,3 @@ sysctl kern.cryptodevallowsoft=1 python $(dirname $0)/cryptotest.py sysctl "$oldcdas" - -if [ x"$unloadcdev" = x"1" ]; then - kldunload cryptodev -fi -if [ x"$unloadaesni" = x"1" ]; then - kldunload aesni -fi From owner-svn-src-all@freebsd.org Thu Jun 1 20:03:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51D66B7DC96; Thu, 1 Jun 2017 20:03:21 +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 1B4E266039; Thu, 1 Jun 2017 20:03:21 +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 v51K3KC8014204; Thu, 1 Jun 2017 20:03:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51K3KUf014203; Thu, 1 Jun 2017 20:03:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706012003.v51K3KUf014203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 1 Jun 2017 20:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319457 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:03:21 -0000 Author: bdrewery Date: Thu Jun 1 20:03:20 2017 New Revision: 319457 URL: https://svnweb.freebsd.org/changeset/base/319457 Log: META_MODE users should build with -DNO_META_IGNORE_HOST once after ino64 upgrade. See r301467 for more details. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jun 1 19:58:40 2017 (r319456) +++ head/UPDATING Thu Jun 1 20:03:20 2017 (r319457) @@ -92,6 +92,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: a reboot is required after installing the new kernel before installing world. + Users using META_MODE to build should also use -DNO_META_IGNORE_HOST + to 'make' for the first build after upgrading. + 20170424: The NATM framework including the en(4), fatm(4), hatm(4), and patm(4) devices has been removed. Consumers should plan a From owner-svn-src-all@freebsd.org Thu Jun 1 20:06:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 593CDB7DD3C; Thu, 1 Jun 2017 20:06:06 +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 34BDB661AC; Thu, 1 Jun 2017 20:06:06 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 4DC3361B1; Thu, 1 Jun 2017 20:06:05 +0000 (UTC) Date: Thu, 1 Jun 2017 20:06:05 +0000 From: Alexey Dokuchaev To: "Ngie Cooper (yaneurabeya)" Cc: Marcel Moolenaar , Brooks Davis , svn-src-all@FreeBSD.org, "Simon J. Gerraty" , src-committers , svn-src-head@FreeBSD.org, Ngie Cooper Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests Message-ID: <20170601200605.GA66626@FreeBSD.org> References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> <84744.1496336318@kaos.jnpr.net> <20170601171642.GA601@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:06:06 -0000 On Thu, Jun 01, 2017 at 11:27:18AM -0700, Ngie Cooper (yaneurabeya) wrote: > ... > I vote for not checking in the SHAs. If something fails (as someone else > mentioned on the lists), it's really hard to debug why it failed. Like I've said, it's not "really" hard. Check out previous version and generate image with correct hash, there is no strong reason to commit the image other than minor usability improvement of not having to check out previous version. Then again, just my $.02 -- I'm not the one doing actual work here. ./danfe From owner-svn-src-all@freebsd.org Thu Jun 1 20:11:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5A37B7DDE8; Thu, 1 Jun 2017 20:11:27 +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 8506566404; Thu, 1 Jun 2017 20:11:27 +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 v51KBQPG015321; Thu, 1 Jun 2017 20:11:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KBQ95015320; Thu, 1 Jun 2017 20:11:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012011.v51KBQ95015320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319458 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:11:27 -0000 Author: dim Date: Thu Jun 1 20:11:26 2017 New Revision: 319458 URL: https://svnweb.freebsd.org/changeset/base/319458 Log: Add a few missed files to ObsoleteFiles.inc. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Jun 1 20:03:20 2017 (r319457) +++ head/ObsoleteFiles.inc Thu Jun 1 20:11:26 2017 (r319458) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20170601: old libifconfig and libifc +OLD_FILES+=usr/lib/libifc.a +OLD_FILES+=usr/lib/libifc_p.a +OLD_FILES+=usr/lib/libifconfig.a +OLD_FILES+=usr/lib/libifconfig_p.a # 20170529: mount.conf(8) -> mount.conf(5) OLD_FILES+=usr/share/man/man8/mount.conf.8.gz # 20170525: remove misleading template @@ -116,6 +121,9 @@ OLD_FILES+=usr/share/doc/usd/contents.ascii.gz OLD_LIBS+=lib/libzfs.so.2 OLD_LIBS+=usr/lib/libarchive.so.6 OLD_LIBS+=usr/lib/libmilter.so.5 +OLD_LIBS+=usr/lib32/libzfs.so.2 +OLD_LIBS+=usr/lib32/libarchive.so.6 +OLD_LIBS+=usr/lib32/libmilter.so.5 # 20170427: NATM configuration support removed OLD_FILES+=etc/rc.d/atm1 OLD_FILES+=etc/rc.d/atm2 From owner-svn-src-all@freebsd.org Thu Jun 1 20:14:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8A89B7DF6D; Thu, 1 Jun 2017 20:14:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 7A7D26670E; Thu, 1 Jun 2017 20:14:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id w69so8703462pfk.1; Thu, 01 Jun 2017 13:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=EjWS/XWt9Plf+y1ICKgTp5LSleIIWjYHQby5IEomw1M=; b=gcXvRf9Tqz4ycHlwPw1WCDkV+ju7RW7BPOJSGmbZVY5HmqEcwTYiE4jwb3RtcUn/iB PLnY8kP7yK7pPtqCbtZRsrLQ0VVhl/oEG5p2ZfdTADx306w8hdm4B/s1rPV/EGyeoBUa 4emLHXl6ORhA0gPvzEGxPVUWuUWGlH9EEE4UZI1dJipD57yY8qzPN/avZ0HFAuCm8mk9 sIUIFButWweExzVFeEjd7y9phiw1WCRdZ2AvPGyY3LTB2YCiaZrRhORduubpgAjlf6Qr OwdGmdA0RAIDxwaXsh3ke+ceozYUf/3ZdrcxVBnj94gahM+o9fUBNibWwQ/dyPUBioDv p+Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=EjWS/XWt9Plf+y1ICKgTp5LSleIIWjYHQby5IEomw1M=; b=cD0qF82dV2sEafU9aPScL2W19tuAdqkvjYKEPdq7wO+BUvManFO2mJ+3IL5iNQnGiq Midt+LoXiuT83FMxEq7faWCVbIvU5iD/LCmdW9BNoHx92ci/cK0UUdWIFxv0d00sUpVm lIwu2Q+zo4u8YKS0dLXMqWbrQRpTjlfFat6pm0RDvXcAir0Yx/KnvriXBnONyQPGPxC8 OvzsdQrIrRqfVuM7+mj9bqwamqz41dzm/fwdcKsIbciYmILnfhwO3dMJOF1JOSrB4b2e FPgowjkRikHGfOX+GfmEVPXW9jrzGD6v1zPXR0GbPhMjdF2Yh/DC382fL0og+bgFyPZm Pibg== X-Gm-Message-State: AODbwcAcS2kmsqZR0OXk4fZ2LBjV99EJx1Is4nbt2Zm0a74NCnjP/KBU 8ceb1OJKAiOQP8U/w0g= X-Received: by 10.98.60.8 with SMTP id j8mr1940363pfa.216.1496348083856; Thu, 01 Jun 2017 13:14:43 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id k9sm35150204pga.40.2017.06.01.13.14.42 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Jun 2017 13:14:42 -0700 (PDT) Subject: Re: svn commit: r319295 - head/usr.bin/mkimg/tests Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BE29C8A1-C058-4F55-BECE-85459E728C42"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170601200605.GA66626@FreeBSD.org> Date: Thu, 1 Jun 2017 13:14:41 -0700 Cc: Marcel Moolenaar , Brooks Davis , svn-src-all@FreeBSD.org, "Simon J. Gerraty" , src-committers , svn-src-head@FreeBSD.org, Ngie Cooper Message-Id: <8EE5D277-E03A-4B90-BDF0-9C0A521567FC@gmail.com> References: <201705310801.v4V81CjO004032@repo.freebsd.org> <20170601050339.GA48398@spindle.one-eyed-alien.net> <7FC9CB7D-CF96-4ACA-A38C-E82836127BA4@gmail.com> <84744.1496336318@kaos.jnpr.net> <20170601171642.GA601@FreeBSD.org> <20170601200605.GA66626@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:14:44 -0000 --Apple-Mail=_BE29C8A1-C058-4F55-BECE-85459E728C42 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 1, 2017, at 13:06, Alexey Dokuchaev wrote: >=20 > On Thu, Jun 01, 2017 at 11:27:18AM -0700, Ngie Cooper (yaneurabeya) = wrote: >> ... >> I vote for not checking in the SHAs. If something fails (as someone = else >> mentioned on the lists), it's really hard to debug why it failed. >=20 > Like I've said, it's not "really" hard. Check out previous version = and > generate image with correct hash, there is no strong reason to commit = the > image other than minor usability improvement of not having to check = out > previous version. >=20 > Then again, just my $.02 -- I'm not the one doing actual work here. That=E2=80=99s assuming there aren=E2=80=99t endianness issues, = and less intuitive issues (take the usr.sbin/sa tests for example =E2=80=94= BLEH). With binary files like this, it=E2=80=99s best to do an = abbreviated dump of sorts. Thanks, -Ngie --Apple-Mail=_BE29C8A1-C058-4F55-BECE-85459E728C42 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZMHWxAAoJEPWDqSZpMIYVoQsQAKmil2mH2qrbtQB2/pF4WfIV 6Ep3021wEZYEI6i9ojmkmwhWeLUbBBxRmqgH01QnZBLSjqQl1Drhf8dGJ4IN8zBQ 1qXTmMk14M91r9qj3Ux339W/HsLCk1/LfbryGzTNWk8J8bfesFFwYBwtNKA7MZnd UTNwEIsbrkOEKbStERPVG9cXWDFS5Z0sz4Oq5mN4DooZ2XQtJ2TqvZ8p08R+gf/D 3NfAs8IgMD7ZWr41/jmd2Dmbw0kHJMSt+HybUOrQe2N1IrwEOugaEnmrJXaKtMBW 5HR9m638sn8J13prCPf/O+WAcOmdRmz+VwGpZnLXU1Bx9EUUdBQtP0Ipg8GJe/Px O+pR3kQE0VwVWlNPRWoUQXP6l7rUX2uAIGsL0dIGN4ZzcMdPo+cZclxBhA4H3LUc Hqo0m8CKQHN2RXHlH+68VbmDIYxo0weyZV5/S36Pqhlbb+AG0lRmKllOd/ndOcEP g2ZDAuH2oyDXaJSDB1R0HoFlnZtCP1Wy1SaaZgDyZjmk9pHwjGd2QzIjMfWkp0Da P5SleimxKpjV7TeKLc5Py3DnujraHqSZxJnzQCzBK4xgoCeDDLNyvQkRW/zmod9L PAhjCGU642VKFl3p0dr3NgnFX/QPUpd4aJP8Ft8d9Ndb3XDHBl41aah2QGDfyK/X wSuwHvtHVSQULtzzulO0 =B45j -----END PGP SIGNATURE----- --Apple-Mail=_BE29C8A1-C058-4F55-BECE-85459E728C42-- From owner-svn-src-all@freebsd.org Thu Jun 1 20:29:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78573B7E1C8; Thu, 1 Jun 2017 20:29:49 +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 3A93A66CD6; Thu, 1 Jun 2017 20:29:49 +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 v51KTmcc022419; Thu, 1 Jun 2017 20:29:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KTmmX022418; Thu, 1 Jun 2017 20:29:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706012029.v51KTmmX022418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 1 Jun 2017 20:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319459 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:29:49 -0000 Author: bdrewery Date: Thu Jun 1 20:29:48 2017 New Revision: 319459 URL: https://svnweb.freebsd.org/changeset/base/319459 Log: Revert r319457. META_MODE users actually do not need to do anything special assuming they have COMPAT_FREEBSD11 enabled. The host tools in WORLDTMP will continue to work just fine. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jun 1 20:11:26 2017 (r319458) +++ head/UPDATING Thu Jun 1 20:29:48 2017 (r319459) @@ -92,9 +92,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: a reboot is required after installing the new kernel before installing world. - Users using META_MODE to build should also use -DNO_META_IGNORE_HOST - to 'make' for the first build after upgrading. - 20170424: The NATM framework including the en(4), fatm(4), hatm(4), and patm(4) devices has been removed. Consumers should plan a From owner-svn-src-all@freebsd.org Thu Jun 1 20:46:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A518B7E7B8; Thu, 1 Jun 2017 20:46:45 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D73D8676ED; Thu, 1 Jun 2017 20:46:44 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51KkhYd030738; Thu, 1 Jun 2017 20:46:43 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Kkh1I030737; Thu, 1 Jun 2017 20:46:43 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201706012046.v51Kkh1I030737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 1 Jun 2017 20:46:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319460 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:46:45 -0000 Author: avos Date: Thu Jun 1 20:46:43 2017 New Revision: 319460 URL: https://svnweb.freebsd.org/changeset/base/319460 Log: net80211: initialize i_seq for A-MPDU frames. Fragment number field (part of i_seq) is used for AAD calculation; as a result, without this patch every driver without h/w crypto support need to clear it before ieee80211_crypto_encap(). Also fixes rtwn(4) A-MPDU Tx with dev.rtwn.%d.hwcrypto tunable set to 0 (h/w crypto is disabled). Tested with: * Intel 6205, STA mode. * RTL8188EU, STA mode. Differential Revision: https://reviews.freebsd.org/D10753 Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Thu Jun 1 20:29:48 2017 (r319459) +++ head/sys/net80211/ieee80211_output.c Thu Jun 1 20:46:43 2017 (r319460) @@ -779,6 +779,9 @@ ieee80211_send_setup( tap = &ni->ni_tx_ampdu[tid]; if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) { m->m_flags |= M_AMPDU_MPDU; + + /* NB: zero out i_seq field (for s/w encryption etc) */ + *(uint16_t *)&wh->i_seq[0] = 0; } else { if (IEEE80211_HAS_SEQ(type & IEEE80211_FC0_TYPE_MASK, type & IEEE80211_FC0_SUBTYPE_MASK)) @@ -1610,6 +1613,9 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee8 *(uint16_t *)wh->i_seq = htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT); M_SEQNO_SET(m, seqno); + } else { + /* NB: zero out i_seq field (for s/w encryption etc) */ + *(uint16_t *)wh->i_seq = 0; } } else { /* From owner-svn-src-all@freebsd.org Thu Jun 1 20:58:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1751EB7EA58; Thu, 1 Jun 2017 20:58:40 +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 7CB5F67C3D; Thu, 1 Jun 2017 20:58:39 +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 v51KwcPt034971; Thu, 1 Jun 2017 20:58:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KwblD034957; Thu, 1 Jun 2017 20:58:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012058.v51KwblD034957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319461 - in vendor/llvm/dist: docs include/llvm include/llvm/Analysis include/llvm/CodeGen include/llvm/CodeGen/GlobalISel include/llvm/DebugInfo include/llvm/DebugInfo/CodeView includ... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:58:40 -0000 Author: dim Date: Thu Jun 1 20:58:36 2017 New Revision: 319461 URL: https://svnweb.freebsd.org/changeset/base/319461 Log: Vendor import of llvm trunk r304460: https://llvm.org/svn/llvm-project/llvm/trunk@304460 Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeViewSymbols.def vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeViewTypes.def vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h (contents, props changed) vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h (contents, props changed) vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLTypes.h (contents, props changed) vendor/llvm/dist/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/LiveRangeShrink.cpp (contents, props changed) vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp (contents, props changed) vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLSymbols.cpp (contents, props changed) vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLTypes.cpp (contents, props changed) vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/Andersen/struct.ll vendor/llvm/dist/test/CodeGen/AArch64/addcarry-crash.ll vendor/llvm/dist/test/CodeGen/AArch64/pr33172.ll vendor/llvm/dist/test/CodeGen/AMDGPU/waitcnt-permute.mir vendor/llvm/dist/test/CodeGen/Hexagon/invalid-dotnew-attempt.mir vendor/llvm/dist/test/CodeGen/Hexagon/loop-idiom/pmpy-long-loop.ll vendor/llvm/dist/test/CodeGen/Hexagon/mul64-sext.ll vendor/llvm/dist/test/CodeGen/PowerPC/logic-ops-on-compares.ll vendor/llvm/dist/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll vendor/llvm/dist/test/CodeGen/PowerPC/memcmp.ll vendor/llvm/dist/test/CodeGen/PowerPC/memcmpIR.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-get-cache-line-size.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesieqsll.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesiequll.ll vendor/llvm/dist/test/CodeGen/PowerPC/testCompareslleqsll.ll vendor/llvm/dist/test/CodeGen/PowerPC/testComparesllequll.ll vendor/llvm/dist/test/CodeGen/PowerPC/vec_xxpermdi.ll vendor/llvm/dist/test/CodeGen/X86/eh-unknown.ll vendor/llvm/dist/test/CodeGen/X86/gnu-seh-nolpads.ll vendor/llvm/dist/test/CodeGen/X86/lrshrink.ll vendor/llvm/dist/test/CodeGen/X86/pr32610.ll vendor/llvm/dist/test/MC/ARM/mixed-arm-thumb-bl-fixup.ll vendor/llvm/dist/test/Other/new-pm-thinlto-defaults.ll vendor/llvm/dist/test/ThinLTO/X86/newpm-basic.ll vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineAlloca.ll vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineAlloca2.ll vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineAlloca4.ll vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineAlloca5.ll vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineLiveAcross.ll vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineNoLiveOut.ll vendor/llvm/dist/test/Transforms/LoopVectorize/AArch64/no_vector_instructions.ll vendor/llvm/dist/test/Transforms/LowerExpectIntrinsic/expect_nonboolean.ll vendor/llvm/dist/test/Transforms/NewGVN/pr33185.ll vendor/llvm/dist/test/Transforms/ThinLTOBitcodeWriter/new-pm.ll Deleted: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeRecords.def vendor/llvm/dist/test/CodeGen/PowerPC/pristine-and-livein.mir vendor/llvm/dist/test/ThinLTO/X86/error-newpm.ll vendor/llvm/dist/test/Transforms/GVN/PRE/phi-translate-2.ll vendor/llvm/dist/tools/llvm-pdbdump/YamlSerializationContext.h vendor/llvm/dist/tools/llvm-pdbdump/YamlSymbolDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/YamlSymbolDumper.h vendor/llvm/dist/tools/llvm-pdbdump/YamlTypeDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/YamlTypeDumper.h Modified: vendor/llvm/dist/docs/Vectorizers.rst vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h vendor/llvm/dist/include/llvm/CodeGen/MIRYamlMapping.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineConstantPool.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionInitializer.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBundleIterator.h vendor/llvm/dist/include/llvm/CodeGen/MachineLoopInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/TargetPassConfig.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeView.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolRecordMapping.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorCallbackPipeline.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolVisitorCallbacks.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabaseVisitor.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDeserializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDumpVisitor.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeRecordMapping.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h vendor/llvm/dist/include/llvm/DebugInfo/DIContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/RawConstants.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiHashing.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/PDBContext.h vendor/llvm/dist/include/llvm/IR/Attributes.h vendor/llvm/dist/include/llvm/IR/Function.h vendor/llvm/dist/include/llvm/IR/Instructions.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/Object/WindowsResource.h vendor/llvm/dist/include/llvm/Passes/PassBuilder.h vendor/llvm/dist/include/llvm/Support/ARMTargetParser.def vendor/llvm/dist/include/llvm/Support/BinaryStreamReader.h vendor/llvm/dist/include/llvm/Support/YAMLTraits.h vendor/llvm/dist/include/llvm/TableGen/Record.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Transforms/Scalar/GVN.h vendor/llvm/dist/include/llvm/Transforms/Utils/CodeExtractor.h vendor/llvm/dist/include/llvm/module.modulemap vendor/llvm/dist/lib/Analysis/CFLGraph.h vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/EHPersonalities.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CodeGen.cpp vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/Localizer.cpp vendor/llvm/dist/lib/CodeGen/ImplicitNullChecks.cpp vendor/llvm/dist/lib/CodeGen/MIRParser/MIRParser.cpp vendor/llvm/dist/lib/CodeGen/MIRPrinter.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringBase.cpp vendor/llvm/dist/lib/CodeGen/TargetPassConfig.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CVSymbolVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeVisitor.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/EnumTables.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolDumper.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/InfoStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/PDBContext.cpp vendor/llvm/dist/lib/Fuzzer/test/dump_coverage.test vendor/llvm/dist/lib/IR/Attributes.cpp vendor/llvm/dist/lib/IR/Function.cpp vendor/llvm/dist/lib/IR/Instructions.cpp vendor/llvm/dist/lib/LTO/LTOBackend.cpp vendor/llvm/dist/lib/MC/MCCodeView.cpp vendor/llvm/dist/lib/Object/MachOObjectFile.cpp vendor/llvm/dist/lib/Object/WindowsResource.cpp vendor/llvm/dist/lib/ObjectYAML/CMakeLists.txt vendor/llvm/dist/lib/ObjectYAML/LLVMBuild.txt vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/Support/BinaryStreamReader.cpp vendor/llvm/dist/lib/Support/Unix/Path.inc vendor/llvm/dist/lib/TableGen/Record.cpp vendor/llvm/dist/lib/TableGen/TGParser.cpp vendor/llvm/dist/lib/TableGen/TGParser.h vendor/llvm/dist/lib/Target/AArch64/AArch64.td vendor/llvm/dist/lib/Target/AArch64/AArch64SchedM1.td vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.h vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist/lib/Target/AMDGPU/DSInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp vendor/llvm/dist/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h vendor/llvm/dist/lib/Target/AMDGPU/SIDefines.h vendor/llvm/dist/lib/Target/AMDGPU/SIInsertWaitcnts.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.h vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp vendor/llvm/dist/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.h vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1FrameLowering.cpp vendor/llvm/dist/lib/Target/AVR/AVRISelLowering.cpp vendor/llvm/dist/lib/Target/AVR/AVRInstrInfo.td vendor/llvm/dist/lib/Target/AVR/AVRTargetMachine.cpp vendor/llvm/dist/lib/Target/AVR/AVRTargetMachine.h vendor/llvm/dist/lib/Target/BPF/BPFTargetMachine.cpp vendor/llvm/dist/lib/Target/BPF/CMakeLists.txt vendor/llvm/dist/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonPatterns.td vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp vendor/llvm/dist/lib/Target/Lanai/LanaiTargetMachine.cpp vendor/llvm/dist/lib/Target/Lanai/LanaiTargetMachine.h vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/Mips16FrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetMachine.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetMachine.h vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrVSX.td vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.h vendor/llvm/dist/lib/Target/RISCV/RISCVTargetMachine.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.h vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetMachine.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetMachine.h vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86InstComments.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroCleanup.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroEarly.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroElide.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroSplit.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/PGOInstrumentation.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/SanitizerCoverage.cpp vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Utils/CodeExtractor.cpp vendor/llvm/dist/lib/Transforms/Utils/PredicateInfo.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/test/Bitcode/thinlto-function-summary-callgraph.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/localizer.mir vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-pr32733.mir vendor/llvm/dist/test/CodeGen/AArch64/misched-fusion-aes.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.ds.swizzle.ll vendor/llvm/dist/test/CodeGen/AMDGPU/merge-m0.mir vendor/llvm/dist/test/CodeGen/AMDGPU/sdwa-scalar-ops.mir vendor/llvm/dist/test/CodeGen/ARM/cmpxchg-O0.ll vendor/llvm/dist/test/CodeGen/ARM/v6-jumptable-clobber.mir vendor/llvm/dist/test/CodeGen/AVR/rot.ll vendor/llvm/dist/test/CodeGen/MIR/Generic/multiRunPass.mir vendor/llvm/dist/test/CodeGen/Mips/compactbranches/empty-block.mir vendor/llvm/dist/test/CodeGen/PowerPC/expand-isel.ll vendor/llvm/dist/test/CodeGen/Thumb2/tbb-removeadd.mir vendor/llvm/dist/test/CodeGen/X86/2007-01-08-InstrSched.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/irtranslator-call.ll vendor/llvm/dist/test/CodeGen/X86/add-of-carry.ll vendor/llvm/dist/test/CodeGen/X86/addcarry.ll vendor/llvm/dist/test/CodeGen/X86/avg.ll vendor/llvm/dist/test/CodeGen/X86/avx.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cmp-kor-sequence.ll vendor/llvm/dist/test/CodeGen/X86/avx512-gather-scatter-intrin.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512-mask-spills.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512cdvl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512cdvl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512dq-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512dq-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512dqvl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512dqvl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512ifma-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512ifmavl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-and-setcc-128.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-and-setcc-256.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-setcc-128.ll vendor/llvm/dist/test/CodeGen/X86/bitcast-setcc-256.ll vendor/llvm/dist/test/CodeGen/X86/bswap_tree2.ll vendor/llvm/dist/test/CodeGen/X86/fmsubadd-combine.ll vendor/llvm/dist/test/CodeGen/X86/fold-tied-op.ll vendor/llvm/dist/test/CodeGen/X86/fp128-i128.ll vendor/llvm/dist/test/CodeGen/X86/implicit-null-checks.mir vendor/llvm/dist/test/CodeGen/X86/madd.ll vendor/llvm/dist/test/CodeGen/X86/misched-matrix.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-i16.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-i32.ll vendor/llvm/dist/test/CodeGen/X86/mul-constant-i64.ll vendor/llvm/dist/test/CodeGen/X86/oddshuffles.ll vendor/llvm/dist/test/CodeGen/X86/pmul.ll vendor/llvm/dist/test/CodeGen/X86/pr32284.ll vendor/llvm/dist/test/CodeGen/X86/rotate.ll vendor/llvm/dist/test/CodeGen/X86/sad.ll vendor/llvm/dist/test/CodeGen/X86/select.ll vendor/llvm/dist/test/CodeGen/X86/setcc-lowering.ll vendor/llvm/dist/test/CodeGen/X86/setcc-wide-types.ll vendor/llvm/dist/test/CodeGen/X86/shrink_vmul_sse.ll vendor/llvm/dist/test/CodeGen/X86/sse41.ll vendor/llvm/dist/test/CodeGen/X86/vector-bitreverse.ll vendor/llvm/dist/test/CodeGen/X86/vector-blend.ll vendor/llvm/dist/test/CodeGen/X86/x86-interleaved-access.ll vendor/llvm/dist/test/CodeGen/X86/xchg-nofold.ll vendor/llvm/dist/test/DebugInfo/MIR/X86/empty-inline.mir vendor/llvm/dist/test/DebugInfo/omit-empty.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/coverage.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/seh.ll vendor/llvm/dist/test/MC/AMDGPU/ds-err.s vendor/llvm/dist/test/MC/AMDGPU/ds.s vendor/llvm/dist/test/MC/ARM/big-endian-thumb-fixup.s vendor/llvm/dist/test/MC/Disassembler/AMDGPU/gfx8_dasm_all.txt vendor/llvm/dist/test/Other/new-pm-defaults.ll vendor/llvm/dist/test/Transforms/GVN/PRE/pre-gep-load.ll vendor/llvm/dist/test/Transforms/GVN/PRE/pre-load.ll vendor/llvm/dist/test/Transforms/Inline/AArch64/gep-cost.ll vendor/llvm/dist/test/Transforms/InstCombine/ctpop.ll vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist/test/Transforms/NewGVN/completeness.ll vendor/llvm/dist/test/Transforms/PGOProfile/branch1.ll vendor/llvm/dist/test/Transforms/Util/PredicateInfo/condprop.ll vendor/llvm/dist/test/Transforms/Util/PredicateInfo/testandor.ll vendor/llvm/dist/test/tools/llvm-config/cflags.test vendor/llvm/dist/test/tools/llvm-cvtres/Inputs/test_resource.rc vendor/llvm/dist/test/tools/llvm-cvtres/Inputs/test_resource.res vendor/llvm/dist/test/tools/llvm-cvtres/resource.test vendor/llvm/dist/tools/bugpoint/OptimizerDriver.cpp vendor/llvm/dist/tools/llvm-config/BuildVariables.inc.in vendor/llvm/dist/tools/llvm-config/llvm-config.cpp vendor/llvm/dist/tools/llvm-cvtres/llvm-cvtres.cpp vendor/llvm/dist/tools/llvm-dwarfdump/llvm-dwarfdump.cpp vendor/llvm/dist/tools/llvm-objdump/MachODump.cpp vendor/llvm/dist/tools/llvm-objdump/llvm-objdump.cpp vendor/llvm/dist/tools/llvm-pdbdump/Analyze.cpp vendor/llvm/dist/tools/llvm-pdbdump/CMakeLists.txt vendor/llvm/dist/tools/llvm-pdbdump/CompactTypeDumpVisitor.cpp vendor/llvm/dist/tools/llvm-pdbdump/PdbYaml.cpp vendor/llvm/dist/tools/llvm-pdbdump/PdbYaml.h vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.h vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.cpp vendor/llvm/dist/tools/llvm-readobj/ELFDumper.cpp vendor/llvm/dist/tools/obj2yaml/macho2yaml.cpp vendor/llvm/dist/tools/opt/NewPMDriver.cpp vendor/llvm/dist/tools/opt/NewPMDriver.h vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/ArrayRefTest.cpp vendor/llvm/dist/unittests/IR/AttributesTest.cpp vendor/llvm/dist/unittests/Support/TargetParserTest.cpp vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp vendor/llvm/dist/utils/TableGen/Attributes.cpp vendor/llvm/dist/utils/TableGen/CodeEmitterGen.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/CodeGenRegisters.cpp vendor/llvm/dist/utils/TableGen/CodeGenRegisters.h vendor/llvm/dist/utils/TableGen/CodeGenSchedule.cpp vendor/llvm/dist/utils/TableGen/FixedLenDecoderEmitter.cpp vendor/llvm/dist/utils/TableGen/GlobalISelEmitter.cpp vendor/llvm/dist/utils/TableGen/OptParserEmitter.cpp vendor/llvm/dist/utils/TableGen/RegisterBankEmitter.cpp vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/SearchableTableEmitter.cpp vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp vendor/llvm/dist/utils/TableGen/X86FoldTablesEmitter.cpp Modified: vendor/llvm/dist/docs/Vectorizers.rst ============================================================================== --- vendor/llvm/dist/docs/Vectorizers.rst Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/docs/Vectorizers.rst Thu Jun 1 20:58:36 2017 (r319461) @@ -44,12 +44,12 @@ Users can control the vectorization SIMD width using t $ clang -mllvm -force-vector-width=8 ... $ opt -loop-vectorize -force-vector-width=8 ... -Users can control the unroll factor using the command line flag "-force-vector-unroll" +Users can control the unroll factor using the command line flag "-force-vector-interleave" .. code-block:: console - $ clang -mllvm -force-vector-unroll=2 ... - $ opt -loop-vectorize -force-vector-unroll=2 ... + $ clang -mllvm -force-vector-interleave=2 ... + $ opt -loop-vectorize -force-vector-interleave=2 ... Pragma loop hint directives ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Modified: vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h Thu Jun 1 20:58:36 2017 (r319461) @@ -454,6 +454,9 @@ class TargetTransformInfo { (public) /// \brief Don't restrict interleaved unrolling to small loops. bool enableAggressiveInterleaving(bool LoopHasReductions) const; + /// \brief Enable inline expansion of memcmp + bool expandMemCmp(Instruction *I, unsigned &MaxLoadSize) const; + /// \brief Enable matching of interleaved access groups. bool enableInterleavedAccessVectorization() const; @@ -828,6 +831,7 @@ class TargetTransformInfo::Concept { (public) unsigned VF) = 0; virtual bool supportsEfficientVectorElementLoadStore() = 0; virtual bool enableAggressiveInterleaving(bool LoopHasReductions) = 0; + virtual bool expandMemCmp(Instruction *I, unsigned &MaxLoadSize) = 0; virtual bool enableInterleavedAccessVectorization() = 0; virtual bool isFPVectorizationPotentiallyUnsafe() = 0; virtual bool allowsMisalignedMemoryAccesses(LLVMContext &Context, @@ -1046,6 +1050,9 @@ class TargetTransformInfo::Model final : public Target bool enableAggressiveInterleaving(bool LoopHasReductions) override { return Impl.enableAggressiveInterleaving(LoopHasReductions); + } + bool expandMemCmp(Instruction *I, unsigned &MaxLoadSize) override { + return Impl.expandMemCmp(I, MaxLoadSize); } bool enableInterleavedAccessVectorization() override { return Impl.enableInterleavedAccessVectorization(); Modified: vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h Thu Jun 1 20:58:36 2017 (r319461) @@ -274,6 +274,8 @@ class TargetTransformInfoImplBase { (public) bool enableAggressiveInterleaving(bool LoopHasReductions) { return false; } + bool expandMemCmp(Instruction *I, unsigned &MaxLoadSize) { return false; } + bool enableInterleavedAccessVectorization() { return false; } bool isFPVectorizationPotentiallyUnsafe() { return false; } Modified: vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h Thu Jun 1 20:58:36 2017 (r319461) @@ -85,6 +85,8 @@ template class ArrayRef; const Instruction *CxtI = nullptr, const DominatorTree *DT = nullptr); + bool isOnlyUsedInZeroEqualityComparison(const Instruction *CxtI); + /// Return true if the given value is known to be non-zero when defined. For /// vectors, return true if every element is known to be non-zero when /// defined. For pointers, if the context instruction and dominator tree are Modified: vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h Thu Jun 1 20:58:36 2017 (r319461) @@ -396,7 +396,7 @@ class RegisterBankInfo { (protected) mutable DenseMap> MapOfInstructionMappings; - /// Create a RegisterBankInfo that can accomodate up to \p NumRegBanks + /// Create a RegisterBankInfo that can accommodate up to \p NumRegBanks /// RegisterBank instances. RegisterBankInfo(RegisterBank **RegBanks, unsigned NumRegBanks); Modified: vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h Thu Jun 1 20:58:36 2017 (r319461) @@ -410,11 +410,21 @@ namespace ISD { /// then the result type must also be a vector type. SETCC, - /// Like SetCC, ops #0 and #1 are the LHS and RHS operands to compare, but + /// Like SetCC, ops #0 and #1 are the LHS and RHS operands to compare, and /// op #2 is a *carry value*. This operator checks the result of /// "LHS - RHS - Carry", and can be used to compare two wide integers: /// (setcce lhshi rhshi (subc lhslo rhslo) cc). Only valid for integers. + /// FIXME: This node is deprecated in favor of SETCCCARRY. + /// It is kept around for now to provide a smooth transition path + /// toward the use of SETCCCARRY and will eventually be removed. SETCCE, + + /// Like SetCC, ops #0 and #1 are the LHS and RHS operands to compare, but + /// op #2 is a boolean indicating if there is an incoming carry. This + /// operator checks the result of "LHS - RHS - Carry", and can be used to + /// compare two wide integers: (setcce lhshi rhshi (subc lhslo rhslo) cc). + /// Only valid for integers. + SETCCCARRY, /// SHL_PARTS/SRA_PARTS/SRL_PARTS - These operators are used for expanded /// integer shift operations. The operation ordering is: Modified: vendor/llvm/dist/include/llvm/CodeGen/MIRYamlMapping.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MIRYamlMapping.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/CodeGen/MIRYamlMapping.h Thu Jun 1 20:58:36 2017 (r319461) @@ -381,7 +381,6 @@ struct MachineFunction { StringRef Name; unsigned Alignment = 0; bool ExposesReturnsTwice = false; - bool NoVRegs; // GISel MachineFunctionProperties. bool Legalized = false; bool RegBankSelected = false; @@ -406,7 +405,6 @@ template <> struct MappingTraits { YamlIO.mapRequired("name", MF.Name); YamlIO.mapOptional("alignment", MF.Alignment); YamlIO.mapOptional("exposesReturnsTwice", MF.ExposesReturnsTwice); - YamlIO.mapOptional("noVRegs", MF.NoVRegs); YamlIO.mapOptional("legalized", MF.Legalized); YamlIO.mapOptional("regBankSelected", MF.RegBankSelected); YamlIO.mapOptional("selected", MF.Selected); Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h Thu Jun 1 20:58:36 2017 (r319461) @@ -335,6 +335,9 @@ class MachineBasicBlock (public) return make_range(livein_begin(), livein_end()); } + /// Remove entry from the livein set and return iterator to the next. + livein_iterator removeLiveIn(livein_iterator I); + /// Get the clobber mask for the start of this basic block. Funclets use this /// to prevent register allocation across funclet transitions. const uint32_t *getBeginClobberMask(const TargetRegisterInfo *TRI) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineConstantPool.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineConstantPool.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineConstantPool.h Thu Jun 1 20:58:36 2017 (r319461) @@ -1,4 +1,4 @@ -//===-- CodeGen/MachineConstantPool.h - Abstract Constant Pool --*- C++ -*-===// +//===- CodeGen/MachineConstantPool.h - Abstract Constant Pool ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -18,29 +18,28 @@ #include "llvm/ADT/DenseSet.h" #include "llvm/MC/SectionKind.h" -#include #include #include namespace llvm { class Constant; -class FoldingSetNodeID; class DataLayout; -class TargetMachine; -class Type; +class FoldingSetNodeID; class MachineConstantPool; class raw_ostream; +class Type; /// Abstract base class for all machine specific constantpool value subclasses. /// class MachineConstantPoolValue { virtual void anchor(); + Type *Ty; public: explicit MachineConstantPoolValue(Type *ty) : Ty(ty) {} - virtual ~MachineConstantPoolValue() {} + virtual ~MachineConstantPoolValue() = default; /// getType - get type of this MachineConstantPoolValue. /// @@ -81,6 +80,7 @@ class MachineConstantPoolEntry { (public) : Alignment(A) { Val.ConstVal = V; } + MachineConstantPoolEntry(MachineConstantPoolValue *V, unsigned A) : Alignment(A) { Val.MachineCPVal = V; @@ -153,13 +153,12 @@ class MachineConstantPool { (public) /// print - Used by the MachineFunction printer to print information about /// constant pool objects. Implemented in MachineFunction.cpp - /// void print(raw_ostream &OS) const; /// dump - Call print(cerr) to be called from the debugger. void dump() const; }; -} // End llvm namespace +} // end namespace llvm -#endif +#endif // LLVM_CODEGEN_MACHINECONSTANTPOOL_H Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Thu Jun 1 20:58:36 2017 (r319461) @@ -1,4 +1,4 @@ -//===-- llvm/CodeGen/MachineFunction.h --------------------------*- C++ -*-===// +//===- llvm/CodeGen/MachineFunction.h ---------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -18,38 +18,61 @@ #ifndef LLVM_CODEGEN_MACHINEFUNCTION_H #define LLVM_CODEGEN_MACHINEFUNCTION_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/ilist.h" +#include "llvm/ADT/iterator.h" #include "llvm/ADT/Optional.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" #include "llvm/Analysis/EHPersonalities.h" #include "llvm/CodeGen/MachineBasicBlock.h" +#include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineMemOperand.h" #include "llvm/IR/DebugLoc.h" +#include "llvm/IR/Instructions.h" #include "llvm/IR/Metadata.h" #include "llvm/MC/MCDwarf.h" #include "llvm/MC/MCSymbol.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/ArrayRecycler.h" +#include "llvm/Support/AtomicOrdering.h" #include "llvm/Support/Compiler.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Recycler.h" +#include +#include +#include +#include +#include namespace llvm { -class Value; +class BasicBlock; +class BlockAddress; +class DataLayout; +class DIExpression; +class DILocalVariable; +class DILocation; class Function; -class GCModuleInfo; -class MachineRegisterInfo; -class MachineFrameInfo; +class GlobalValue; class MachineConstantPool; +class MachineFrameInfo; +class MachineFunction; class MachineJumpTableInfo; class MachineModuleInfo; +class MachineRegisterInfo; class MCContext; +class MCInstrDesc; class Pass; class PseudoSourceValueManager; +class raw_ostream; +class SlotIndexes; class TargetMachine; -class TargetSubtargetInfo; class TargetRegisterClass; -struct MachinePointerInfo; +class TargetSubtargetInfo; struct WinEHFuncInfo; template <> struct ilist_alloc_traits { @@ -137,27 +160,33 @@ class MachineFunctionProperties { (public) bool hasProperty(Property P) const { return Properties[static_cast(P)]; } + MachineFunctionProperties &set(Property P) { Properties.set(static_cast(P)); return *this; } + MachineFunctionProperties &reset(Property P) { Properties.reset(static_cast(P)); return *this; } + /// Reset all the properties. MachineFunctionProperties &reset() { Properties.reset(); return *this; } + MachineFunctionProperties &set(const MachineFunctionProperties &MFP) { Properties |= MFP.Properties; return *this; } + MachineFunctionProperties &reset(const MachineFunctionProperties &MFP) { Properties.reset(MFP.Properties); return *this; } + // Returns true if all properties set in V (i.e. required by a pass) are set // in this. bool verifyRequiredProperties(const MachineFunctionProperties &V) const { @@ -180,18 +209,17 @@ struct SEHHandler { const BlockAddress *RecoverBA; }; - /// This structure is used to retain landing pad info for the current function. struct LandingPadInfo { MachineBasicBlock *LandingPadBlock; // Landing pad block. SmallVector BeginLabels; // Labels prior to invoke. SmallVector EndLabels; // Labels after invoke. SmallVector SEHHandlers; // SEH handlers active at this lpad. - MCSymbol *LandingPadLabel; // Label at beginning of landing pad. - std::vector TypeIds; // List of type ids (filters negative). + MCSymbol *LandingPadLabel = nullptr; // Label at beginning of landing pad. + std::vector TypeIds; // List of type ids (filters negative). explicit LandingPadInfo(MachineBasicBlock *MBB) - : LandingPadBlock(MBB), LandingPadLabel(nullptr) {} + : LandingPadBlock(MBB) {} }; class MachineFunction { @@ -239,7 +267,7 @@ class MachineFunction { Recycler BasicBlockRecycler; // List of machine basic blocks in function - typedef ilist BasicBlockListType; + using BasicBlockListType = ilist; BasicBlockListType BasicBlocks; /// FunctionNumber - This provides a unique ID for each function emitted in @@ -281,7 +309,7 @@ class MachineFunction { std::vector LandingPads; /// Map a landing pad's EH symbol to the call site indexes. - DenseMap > LPadToCallSiteMap; + DenseMap> LPadToCallSiteMap; /// Map of invoke call site index values to associated begin EH_LABEL. DenseMap CallSiteMap; @@ -303,9 +331,6 @@ class MachineFunction { /// \} - MachineFunction(const MachineFunction &) = delete; - void operator=(const MachineFunction&) = delete; - /// Clear all the members of this MachineFunction, but the ones used /// to initialize again the MachineFunction. /// More specifically, this deallocates all the dynamically allocated @@ -316,8 +341,8 @@ class MachineFunction { /// In particular, the XXXInfo data structure. /// \pre Fn, Target, MMI, and FunctionNumber are properly set. void init(); -public: +public: struct VariableDbgInfo { const DILocalVariable *Var; const DIExpression *Expr; @@ -328,11 +353,13 @@ class MachineFunction { unsigned Slot, const DILocation *Loc) : Var(Var), Expr(Expr), Slot(Slot), Loc(Loc) {} }; - typedef SmallVector VariableDbgInfoMapTy; + using VariableDbgInfoMapTy = SmallVector; VariableDbgInfoMapTy VariableDbgInfos; MachineFunction(const Function *Fn, const TargetMachine &TM, unsigned FunctionNum, MachineModuleInfo &MMI); + MachineFunction(const MachineFunction &) = delete; + MachineFunction &operator=(const MachineFunction &) = delete; ~MachineFunction(); /// Reset the instance as if it was just created. @@ -350,19 +377,15 @@ class MachineFunction { const DataLayout &getDataLayout() const; /// getFunction - Return the LLVM function that this machine code represents - /// const Function *getFunction() const { return Fn; } /// getName - Return the name of the corresponding LLVM function. - /// StringRef getName() const; /// getFunctionNumber - Return a unique ID for the current function. - /// unsigned getFunctionNumber() const { return FunctionNumber; } /// getTarget - Return the target machine this machine code is compiled with - /// const TargetMachine &getTarget() const { return Target; } /// getSubtarget - Return the subtarget for which this machine code is being @@ -378,14 +401,12 @@ class MachineFunction { } /// getRegInfo - Return information about the registers currently in use. - /// MachineRegisterInfo &getRegInfo() { return *RegInfo; } const MachineRegisterInfo &getRegInfo() const { return *RegInfo; } /// getFrameInfo - Return the frame info object for the current function. /// This object contains information about objects allocated on the stack /// frame of the current function in an abstract way. - /// MachineFrameInfo &getFrameInfo() { return *FrameInfo; } const MachineFrameInfo &getFrameInfo() const { return *FrameInfo; } @@ -402,7 +423,6 @@ class MachineFunction { /// getConstantPool - Return the constant pool object for the current /// function. - /// MachineConstantPool *getConstantPool() { return ConstantPool; } const MachineConstantPool *getConstantPool() const { return ConstantPool; } @@ -413,11 +433,9 @@ class MachineFunction { WinEHFuncInfo *getWinEHFuncInfo() { return WinEHInfo; } /// getAlignment - Return the alignment (log2, not bytes) of the function. - /// unsigned getAlignment() const { return Alignment; } /// setAlignment - Set the alignment (log2, not bytes) of the function. - /// void setAlignment(unsigned A) { Alignment = A; } /// ensureAlignment - Make sure the function is at least 1 << A bytes aligned. @@ -487,7 +505,6 @@ class MachineFunction { bool shouldSplitStack() const; /// getNumBlockIDs - Return the number of MBB ID's allocated. - /// unsigned getNumBlockIDs() const { return (unsigned)MBBNumbering.size(); } /// RenumberBlocks - This discards all of the MachineBasicBlock numbers and @@ -499,7 +516,6 @@ class MachineFunction { /// print - Print out the MachineFunction in a format suitable for debugging /// to the specified stream. - /// void print(raw_ostream &OS, const SlotIndexes* = nullptr) const; /// viewCFG - This function is meant for use from the debugger. You can just @@ -507,7 +523,6 @@ class MachineFunction { /// program, displaying the CFG of the current function with the code for each /// basic block inside. This depends on there being a 'dot' and 'gv' program /// in your path. - /// void viewCFG() const; /// viewCFGOnly - This function is meant for use from the debugger. It works @@ -518,7 +533,6 @@ class MachineFunction { void viewCFGOnly() const; /// dump - Print the current MachineFunction to cerr, useful for debugger use. - /// void dump() const; /// Run the current MachineFunction through the machine code verifier, useful @@ -528,10 +542,10 @@ class MachineFunction { bool AbortOnError = true) const; // Provide accessors for the MachineBasicBlock list... - typedef BasicBlockListType::iterator iterator; - typedef BasicBlockListType::const_iterator const_iterator; - typedef BasicBlockListType::const_reverse_iterator const_reverse_iterator; - typedef BasicBlockListType::reverse_iterator reverse_iterator; + using iterator = BasicBlockListType::iterator; + using const_iterator = BasicBlockListType::const_iterator; + using const_reverse_iterator = BasicBlockListType::const_reverse_iterator; + using reverse_iterator = BasicBlockListType::reverse_iterator; /// Support for MachineBasicBlock::getNextNode(). static BasicBlockListType MachineFunction::* @@ -590,11 +604,9 @@ class MachineFunction { //===--------------------------------------------------------------------===// // Internal functions used to automatically number MachineBasicBlocks - // /// \brief Adds the MBB to the internal numbering. Returns the unique number /// assigned to the MBB. - /// unsigned addToMBBNumbering(MachineBasicBlock *MBB) { MBBNumbering.push_back(MBB); return (unsigned)MBBNumbering.size()-1; @@ -610,7 +622,6 @@ class MachineFunction { /// CreateMachineInstr - Allocate a new MachineInstr. Use this instead /// of `new MachineInstr'. - /// MachineInstr *CreateMachineInstr(const MCInstrDesc &MCID, const DebugLoc &DL, bool NoImp = false); @@ -623,16 +634,13 @@ class MachineFunction { MachineInstr *CloneMachineInstr(const MachineInstr *Orig); /// DeleteMachineInstr - Delete the given MachineInstr. - /// void DeleteMachineInstr(MachineInstr *MI); /// CreateMachineBasicBlock - Allocate a new MachineBasicBlock. Use this /// instead of `new MachineBasicBlock'. - /// MachineBasicBlock *CreateMachineBasicBlock(const BasicBlock *bb = nullptr); /// DeleteMachineBasicBlock - Delete the given MachineBasicBlock. - /// void DeleteMachineBasicBlock(MachineBasicBlock *MBB); /// getMachineMemOperand - Allocate a new MachineMemOperand. @@ -653,7 +661,7 @@ class MachineFunction { MachineMemOperand *getMachineMemOperand(const MachineMemOperand *MMO, int64_t Offset, uint64_t Size); - typedef ArrayRecycler::Capacity OperandCapacity; + using OperandCapacity = ArrayRecycler::Capacity; /// Allocate an array of MachineOperands. This is only intended for use by /// internal MachineInstr functions. @@ -700,7 +708,6 @@ class MachineFunction { //===--------------------------------------------------------------------===// // Label Manipulation. - // /// getJTISymbol - Return the MCSymbol for the specified non-empty jump table. /// If isLinkerPrivate is specified, an 'l' label is returned, otherwise a @@ -858,13 +865,16 @@ template <> struct GraphTraits : static NodeRef getEntryNode(MachineFunction *F) { return &F->front(); } // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - typedef pointer_iterator nodes_iterator; + using nodes_iterator = pointer_iterator; + static nodes_iterator nodes_begin(MachineFunction *F) { return nodes_iterator(F->begin()); } + static nodes_iterator nodes_end(MachineFunction *F) { return nodes_iterator(F->end()); } + static unsigned size (MachineFunction *F) { return F->size(); } }; template <> struct GraphTraits : @@ -872,37 +882,39 @@ template <> struct GraphTraits static NodeRef getEntryNode(const MachineFunction *F) { return &F->front(); } // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - typedef pointer_iterator nodes_iterator; + using nodes_iterator = pointer_iterator; + static nodes_iterator nodes_begin(const MachineFunction *F) { return nodes_iterator(F->begin()); } + static nodes_iterator nodes_end (const MachineFunction *F) { return nodes_iterator(F->end()); } + static unsigned size (const MachineFunction *F) { return F->size(); } }; - // Provide specializations of GraphTraits to be able to treat a function as a // graph of basic blocks... and to walk it in inverse order. Inverse order for // a function is considered to be when traversing the predecessor edges of a BB // instead of the successor edges. // -template <> struct GraphTraits > : - public GraphTraits > { +template <> struct GraphTraits> : + public GraphTraits> { static NodeRef getEntryNode(Inverse G) { return &G.Graph->front(); } }; -template <> struct GraphTraits > : - public GraphTraits > { +template <> struct GraphTraits> : + public GraphTraits> { static NodeRef getEntryNode(Inverse G) { return &G.Graph->front(); } }; -} // End llvm namespace +} // end namespace llvm -#endif +#endif // LLVM_CODEGEN_MACHINEFUNCTION_H Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionInitializer.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionInitializer.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionInitializer.h Thu Jun 1 20:58:36 2017 (r319461) @@ -1,4 +1,4 @@ -//===- MachineFunctionInitializer.h - machine function initializer ---------===// +//=- MachineFunctionInitializer.h - machine function initializer --*- C++ -*-=// // // The LLVM Compiler Infrastructure // @@ -25,7 +25,7 @@ class MachineFunctionInitializer { virtual void anchor(); public: - virtual ~MachineFunctionInitializer() {} + virtual ~MachineFunctionInitializer() = default; /// Initialize the machine function. /// @@ -35,4 +35,4 @@ class MachineFunctionInitializer { } // end namespace llvm -#endif +#endif // LLVM_CODEGEN_MACHINEFUNCTIONINITIALIZER_H Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h Thu Jun 1 20:58:36 2017 (r319461) @@ -1,4 +1,4 @@ -//===-- llvm/CodeGen/MachineInstr.h - MachineInstr class --------*- C++ -*-===// +//===- llvm/CodeGen/MachineInstr.h - MachineInstr class ---------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,7 +17,6 @@ #define LLVM_CODEGEN_MACHINEINSTR_H #include "llvm/ADT/DenseMapInfo.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/ilist.h" #include "llvm/ADT/ilist_node.h" #include "llvm/ADT/iterator_range.h" @@ -28,19 +27,27 @@ #include "llvm/MC/MCInstrDesc.h" #include "llvm/Support/ArrayRecycler.h" #include "llvm/Target/TargetOpcodes.h" +#include +#include +#include +#include namespace llvm { -class StringRef; template class ArrayRef; -template class SmallVectorImpl; -class DILocalVariable; class DIExpression; +class DILocalVariable; +class MachineBasicBlock; +class MachineFunction; +class MachineMemOperand; +class MachineRegisterInfo; +class ModuleSlotTracker; +class raw_ostream; +template class SmallVectorImpl; +class StringRef; class TargetInstrInfo; class TargetRegisterClass; class TargetRegisterInfo; -class MachineFunction; -class MachineMemOperand; //===----------------------------------------------------------------------===// /// Representation of each machine instruction. @@ -53,7 +60,7 @@ class MachineInstr : public ilist_node_with_parent> { public: - typedef MachineMemOperand **mmo_iterator; + using mmo_iterator = MachineMemOperand **; /// Flags to specify different kinds of comments to output in /// assembly code. These flags carry semantic information not @@ -72,43 +79,39 @@ class MachineInstr BundledPred = 1 << 2, // Instruction has bundled predecessors. BundledSucc = 1 << 3 // Instruction has bundled successors. }; + private: const MCInstrDesc *MCID; // Instruction descriptor. - MachineBasicBlock *Parent; // Pointer to the owning basic block. + MachineBasicBlock *Parent = nullptr; // Pointer to the owning basic block. // Operands are allocated by an ArrayRecycler. - MachineOperand *Operands; // Pointer to the first operand. - unsigned NumOperands; // Number of operands on instruction. - typedef ArrayRecycler::Capacity OperandCapacity; + MachineOperand *Operands = nullptr; // Pointer to the first operand. + unsigned NumOperands = 0; // Number of operands on instruction. + using OperandCapacity = ArrayRecycler::Capacity; OperandCapacity CapOperands; // Capacity of the Operands array. - uint8_t Flags; // Various bits of additional + uint8_t Flags = 0; // Various bits of additional // information about machine // instruction. - uint8_t AsmPrinterFlags; // Various bits of information used by + uint8_t AsmPrinterFlags = 0; // Various bits of information used by // the AsmPrinter to emit helpful // comments. This is *not* semantic // information. Do not use this for // anything other than to convey comment // information to AsmPrinter. - uint8_t NumMemRefs; // Information on memory references. + uint8_t NumMemRefs = 0; // Information on memory references. // Note that MemRefs == nullptr, means 'don't know', not 'no memory access'. // Calling code must treat missing information conservatively. If the number // of memory operands required to be precise exceeds the maximum value of // NumMemRefs - currently 256 - we remove the operands entirely. Note also // that this is a non-owning reference to a shared copy on write buffer owned // by the MachineFunction and created via MF.allocateMemRefsArray. - mmo_iterator MemRefs; + mmo_iterator MemRefs = nullptr; DebugLoc debugLoc; // Source line information. - MachineInstr(const MachineInstr&) = delete; - void operator=(const MachineInstr&) = delete; - // Use MachineFunction::DeleteMachineInstr() instead. - ~MachineInstr() = delete; - // Intrusive list support friend struct ilist_traits; friend struct ilist_callback_traits; @@ -128,6 +131,11 @@ class MachineInstr friend class MachineFunction; public: + MachineInstr(const MachineInstr &) = delete; + MachineInstr &operator=(const MachineInstr &) = delete; + // Use MachineFunction::DeleteMachineInstr() instead. + ~MachineInstr() = delete; + const MachineBasicBlock* getParent() const { return Parent; } MachineBasicBlock* getParent() { return Parent; } @@ -178,7 +186,6 @@ class MachineInstr Flags &= ~((uint8_t)Flag); } - /// Return true if MI is in a bundle (but not the first MI in a bundle). /// /// A bundle looks like this before it's finalized: @@ -263,7 +270,6 @@ class MachineInstr /// earlier. /// /// If this method returns, the caller should try to recover from the error. - /// void emitError(StringRef Msg) const; /// Returns the target instruction descriptor of this MachineInstr. @@ -273,7 +279,6 @@ class MachineInstr unsigned getOpcode() const { return MCID->Opcode; } /// Access to explicit operands of the instruction. - /// unsigned getNumOperands() const { return NumOperands; } const MachineOperand& getOperand(unsigned i) const { @@ -289,8 +294,8 @@ class MachineInstr unsigned getNumExplicitOperands() const; /// iterator/begin/end - Iterate over all operands of a machine instruction. - typedef MachineOperand *mop_iterator; - typedef const MachineOperand *const_mop_iterator; + using mop_iterator = MachineOperand *; + using const_mop_iterator = const MachineOperand *; mop_iterator operands_begin() { return Operands; } mop_iterator operands_end() { return Operands + NumOperands; } @@ -713,7 +718,6 @@ class MachineInstr return hasProperty(MCID::ExtraDefRegAllocReq, Type); } - enum MICheckType { CheckDefs, // Check all operands for equality CheckKillDead, // Check all operands including kill / dead markers @@ -767,6 +771,7 @@ class MachineInstr /// Returns true if the MachineInstr represents a label. bool isLabel() const { return isEHLabel() || isGCLabel(); } + bool isCFIInstruction() const { return getOpcode() == TargetOpcode::CFI_INSTRUCTION; } @@ -775,6 +780,7 @@ class MachineInstr bool isPosition() const { return isLabel() || isCFIInstruction(); } bool isDebugValue() const { return getOpcode() == TargetOpcode::DBG_VALUE; } + /// A DBG_VALUE is indirect iff the first operand is a register and /// the second operand is an immediate. bool isIndirectDebugValue() const { @@ -787,29 +793,38 @@ class MachineInstr bool isKill() const { return getOpcode() == TargetOpcode::KILL; } bool isImplicitDef() const { return getOpcode()==TargetOpcode::IMPLICIT_DEF; } bool isInlineAsm() const { return getOpcode() == TargetOpcode::INLINEASM; } + bool isMSInlineAsm() const { return getOpcode() == TargetOpcode::INLINEASM && getInlineAsmDialect(); } + bool isStackAligningInlineAsm() const; InlineAsm::AsmDialect getInlineAsmDialect() const; + bool isInsertSubreg() const { return getOpcode() == TargetOpcode::INSERT_SUBREG; } + bool isSubregToReg() const { return getOpcode() == TargetOpcode::SUBREG_TO_REG; } + bool isRegSequence() const { return getOpcode() == TargetOpcode::REG_SEQUENCE; } + bool isBundle() const { return getOpcode() == TargetOpcode::BUNDLE; } + bool isCopy() const { return getOpcode() == TargetOpcode::COPY; } + bool isFullCopy() const { return isCopy() && !getOperand(0).getSubReg() && !getOperand(1).getSubReg(); } + bool isExtractSubreg() const { return getOpcode() == TargetOpcode::EXTRACT_SUBREG; } @@ -978,7 +993,6 @@ class MachineInstr /// /// The flag operand is an immediate that can be decoded with methods like /// InlineAsm::hasRegClassConstraint(). - /// int findInlineAsmFlagIdx(unsigned OpIdx, unsigned *GroupNo = nullptr) const; /// Compute the static register class constraint for operand OpIdx. @@ -987,7 +1001,6 @@ class MachineInstr /// /// Returns NULL if the static register class constraint cannot be /// determined. - /// const TargetRegisterClass* getRegClassConstraint(unsigned OpIdx, const TargetInstrInfo *TII, @@ -1328,6 +1341,6 @@ inline raw_ostream& operator<<(raw_ostream &OS, const return OS; } -} // End llvm namespace +} // end namespace llvm -#endif +#endif // LLVM_CODEGEN_MACHINEINSTR_H Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBundleIterator.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBundleIterator.h Thu Jun 1 20:46:43 2017 (r319460) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBundleIterator.h Thu Jun 1 20:58:36 2017 (r319461) @@ -15,34 +15,37 @@ #define LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H #include "llvm/ADT/ilist.h" +#include "llvm/ADT/simple_ilist.h" +#include #include +#include namespace llvm { template struct MachineInstrBundleIteratorTraits; template struct MachineInstrBundleIteratorTraits { - typedef simple_ilist> list_type; - typedef typename list_type::iterator instr_iterator; - typedef typename list_type::iterator nonconst_instr_iterator; - typedef typename list_type::const_iterator const_instr_iterator; + using list_type = simple_ilist>; + using instr_iterator = typename list_type::iterator; + using nonconst_instr_iterator = typename list_type::iterator; + using const_instr_iterator = typename list_type::const_iterator; }; template struct MachineInstrBundleIteratorTraits { - typedef simple_ilist> list_type; - typedef typename list_type::reverse_iterator instr_iterator; - typedef typename list_type::reverse_iterator nonconst_instr_iterator; - typedef typename list_type::const_reverse_iterator const_instr_iterator; + using list_type = simple_ilist>; + using instr_iterator = typename list_type::reverse_iterator; + using nonconst_instr_iterator = typename list_type::reverse_iterator; + using const_instr_iterator = typename list_type::const_reverse_iterator; }; template struct MachineInstrBundleIteratorTraits { - typedef simple_ilist> list_type; - typedef typename list_type::const_iterator instr_iterator; - typedef typename list_type::iterator nonconst_instr_iterator; - typedef typename list_type::const_iterator const_instr_iterator; + using list_type = simple_ilist>; + using instr_iterator = typename list_type::const_iterator; + using nonconst_instr_iterator = typename list_type::iterator; + using const_instr_iterator = typename list_type::const_iterator; }; template struct MachineInstrBundleIteratorTraits { - typedef simple_ilist> list_type; - typedef typename list_type::const_reverse_iterator instr_iterator; - typedef typename list_type::reverse_iterator nonconst_instr_iterator; - typedef typename list_type::const_reverse_iterator const_instr_iterator; + using list_type = simple_ilist>; + using instr_iterator = typename list_type::const_reverse_iterator; + using nonconst_instr_iterator = typename list_type::reverse_iterator; + using const_instr_iterator = typename list_type::const_reverse_iterator; }; template struct MachineInstrBundleIteratorHelper; @@ -104,27 +107,27 @@ template <> struct MachineInstrBundleIteratorHelper class MachineInstrBundleIterator : MachineInstrBundleIteratorHelper { - typedef MachineInstrBundleIteratorTraits Traits; - typedef typename Traits::instr_iterator instr_iterator; + using Traits = MachineInstrBundleIteratorTraits; + using instr_iterator = typename Traits::instr_iterator; + instr_iterator MII; public: - typedef typename instr_iterator::value_type value_type; - typedef typename instr_iterator::difference_type difference_type; - typedef typename instr_iterator::pointer pointer; - typedef typename instr_iterator::reference reference; - typedef std::bidirectional_iterator_tag iterator_category; + using value_type = typename instr_iterator::value_type; + using difference_type = typename instr_iterator::difference_type; + using pointer = typename instr_iterator::pointer; + using reference = typename instr_iterator::reference; + using const_pointer = typename instr_iterator::const_pointer; + using const_reference = typename instr_iterator::const_reference; + using iterator_category = std::bidirectional_iterator_tag; - typedef typename instr_iterator::const_pointer const_pointer; - typedef typename instr_iterator::const_reference const_reference; - private: - typedef typename Traits::nonconst_instr_iterator nonconst_instr_iterator; - typedef typename Traits::const_instr_iterator const_instr_iterator; - typedef MachineInstrBundleIterator< - typename nonconst_instr_iterator::value_type, IsReverse> - nonconst_iterator; - typedef MachineInstrBundleIterator reverse_iterator; + using nonconst_instr_iterator = typename Traits::nonconst_instr_iterator; + using const_instr_iterator = typename Traits::const_instr_iterator; + using nonconst_iterator = + MachineInstrBundleIterator; + using reverse_iterator = MachineInstrBundleIterator; public: MachineInstrBundleIterator(instr_iterator MI) : MII(MI) { @@ -138,12 +141,14 @@ class MachineInstrBundleIterator : MachineInstrBundleI "MachineInstrBundleIterator with a " "bundled MI"); } + MachineInstrBundleIterator(pointer MI) : MII(MI) { // FIXME: This conversion should be explicit. assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize " "MachineInstrBundleIterator " "with a bundled MI"); } + // Template allows conversion from const to nonconst. template MachineInstrBundleIterator( @@ -151,6 +156,7 @@ class MachineInstrBundleIterator : MachineInstrBundleI typename std::enable_if::value, void *>::type = nullptr) : MII(I.getInstrIterator()) {} + MachineInstrBundleIterator() : MII(nullptr) {} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 20:58:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7358CB7EA5D; Thu, 1 Jun 2017 20:58:44 +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 28CCD67C41; Thu, 1 Jun 2017 20:58:44 +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 v51KwhBp035020; Thu, 1 Jun 2017 20:58:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Kwh79035019; Thu, 1 Jun 2017 20:58:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012058.v51Kwh79035019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319462 - vendor/llvm/llvm-trunk-r304460 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:58:44 -0000 Author: dim Date: Thu Jun 1 20:58:42 2017 New Revision: 319462 URL: https://svnweb.freebsd.org/changeset/base/319462 Log: Tag llvm trunk r304460. Added: vendor/llvm/llvm-trunk-r304460/ - copied from r319461, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Thu Jun 1 20:58:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C4BBB7EAC2; Thu, 1 Jun 2017 20:58:54 +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 B1A6167CBF; Thu, 1 Jun 2017 20:58:53 +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 v51KwqLY035097; Thu, 1 Jun 2017 20:58:52 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KwnaF035068; Thu, 1 Jun 2017 20:58:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012058.v51KwnaF035068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319463 - in vendor/clang/dist: docs include/clang/AST include/clang/Basic include/clang/Driver include/clang/Lex lib/AST lib/Basic lib/CodeGen lib/Driver/ToolChains lib/Format lib/Fron... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:58:54 -0000 Author: dim Date: Thu Jun 1 20:58:49 2017 New Revision: 319463 URL: https://svnweb.freebsd.org/changeset/base/319463 Log: Vendor import of clang trunk r304460: https://llvm.org/svn/llvm-project/cfe/trunk@304460 Added: vendor/clang/dist/test/CodeGen/ubsan-pointer-overflow.m vendor/clang/dist/test/CodeGenCoroutines/coro-await-domination.cpp (contents, props changed) vendor/clang/dist/test/CodeGenOpenCL/kernels-have-spir-cc-by-default.cl vendor/clang/dist/test/Driver/cl-cc-flags.c (contents, props changed) vendor/clang/dist/test/Driver/cl-diagnostics.c (contents, props changed) vendor/clang/dist/test/Driver/cl-include.c (contents, props changed) vendor/clang/dist/test/SemaCXX/coroutine-uninitialized-warning-crash.cpp (contents, props changed) Modified: vendor/clang/dist/docs/Modules.rst vendor/clang/dist/docs/ThinLTO.rst vendor/clang/dist/docs/UndefinedBehaviorSanitizer.rst vendor/clang/dist/include/clang/AST/VTableBuilder.h vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/Module.h vendor/clang/dist/include/clang/Basic/Sanitizers.def vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/Basic/TypeTraits.h vendor/clang/dist/include/clang/Driver/CLCompatOptions.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/lib/AST/ODRHash.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/ABIInfo.h vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGCleanup.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp vendor/clang/dist/lib/CodeGen/CGVTables.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Lex/HeaderSearch.cpp vendor/clang/dist/lib/Sema/SemaCoroutine.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/test/CodeGen/arm_neon_intrinsics.c vendor/clang/dist/test/CodeGenCXX/stmtexpr.cpp vendor/clang/dist/test/CodeGenCXX/strict-vtable-pointers.cpp vendor/clang/dist/test/CodeGenCXX/vtable-available-externally.cpp vendor/clang/dist/test/CodeGenCXX/vtable-linkage.cpp vendor/clang/dist/test/CodeGenObjC/parameterized_classes.m vendor/clang/dist/test/CodeGenOpenCL/bool_cast.cl vendor/clang/dist/test/CodeGenOpenCL/kernel-attributes.cl vendor/clang/dist/test/CodeGenOpenCL/kernel-metadata.cl vendor/clang/dist/test/CodeGenOpenCL/pipe_types.cl vendor/clang/dist/test/CodeGenOpenCL/ptx-calls.cl vendor/clang/dist/test/CodeGenOpenCL/ptx-kernels.cl vendor/clang/dist/test/Driver/arm-cortex-cpus.c vendor/clang/dist/test/Driver/cl-zc.cpp vendor/clang/dist/test/Driver/fsanitize.c vendor/clang/dist/test/Driver/gold-lto.c vendor/clang/dist/test/Driver/nacl-direct.c vendor/clang/dist/test/Driver/openmp-offload.c vendor/clang/dist/test/Misc/diag-mapping2.c vendor/clang/dist/test/Modules/odr_hash.cpp vendor/clang/dist/test/Modules/preprocess-module.cpp vendor/clang/dist/test/Modules/preprocess-nested.cpp vendor/clang/dist/test/Modules/preprocess-unavailable.cpp vendor/clang/dist/test/SemaCXX/attr-require-constant-initialization.cpp vendor/clang/dist/test/SemaCXX/coreturn.cpp vendor/clang/dist/test/SemaCXX/coroutines.cpp vendor/clang/dist/test/SemaCXX/type-traits.cpp vendor/clang/dist/test/SemaObjC/attr-deprecated.m vendor/clang/dist/test/SemaObjC/class-unavail-warning.m vendor/clang/dist/test/SemaObjC/warn-deprecated-implementations.m vendor/clang/dist/unittests/Format/FormatTestJS.cpp vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp vendor/clang/dist/utils/TableGen/ClangDiagnosticsEmitter.cpp vendor/clang/dist/utils/TableGen/ClangOptionDocEmitter.cpp vendor/clang/dist/utils/TableGen/ClangSACheckersEmitter.cpp Modified: vendor/clang/dist/docs/Modules.rst ============================================================================== --- vendor/clang/dist/docs/Modules.rst Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/docs/Modules.rst Thu Jun 1 20:58:49 2017 (r319463) @@ -403,7 +403,7 @@ A *requires-declaration* specifies the requirements th *feature*: ``!``:sub:`opt` *identifier* -The requirements clause allows specific modules or submodules to specify that they are only accessible with certain language dialects or on certain platforms. The feature list is a set of identifiers, defined below. If any of the features is not available in a given translation unit, that translation unit shall not import the module. The optional ``!`` indicates that a feature is incompatible with the module. +The requirements clause allows specific modules or submodules to specify that they are only accessible with certain language dialects or on certain platforms. The feature list is a set of identifiers, defined below. If any of the features is not available in a given translation unit, that translation unit shall not import the module. When building a module for use by a compilation, submodules requiring unavailable features are ignored. The optional ``!`` indicates that a feature is incompatible with the module. The following features are defined: Modified: vendor/clang/dist/docs/ThinLTO.rst ============================================================================== --- vendor/clang/dist/docs/ThinLTO.rst Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/docs/ThinLTO.rst Thu Jun 1 20:58:49 2017 (r319463) @@ -123,6 +123,8 @@ which currently must be enabled through a linker optio ``-Wl,-plugin-opt,cache-dir=/path/to/cache`` - ld64 (support in clang 3.9 and Xcode 8): ``-Wl,-cache_path_lto,/path/to/cache`` +- lld (as of LLVM r296702): + ``-Wl,--thinlto-cache-dir=/path/to/cache`` Clang Bootstrap --------------- Modified: vendor/clang/dist/docs/UndefinedBehaviorSanitizer.rst ============================================================================== --- vendor/clang/dist/docs/UndefinedBehaviorSanitizer.rst Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/docs/UndefinedBehaviorSanitizer.rst Thu Jun 1 20:58:49 2017 (r319463) @@ -106,6 +106,8 @@ Available checks are: invalid pointers. These checks are made in terms of ``__builtin_object_size``, and consequently may be able to detect more problems at higher optimization levels. + - ``-fsanitize=pointer-overflow``: Performing pointer arithmetic which + overflows. - ``-fsanitize=return``: In C++, reaching the end of a value-returning function without returning a value. - ``-fsanitize=returns-nonnull-attribute``: Returning null pointer Modified: vendor/clang/dist/include/clang/AST/VTableBuilder.h ============================================================================== --- vendor/clang/dist/include/clang/AST/VTableBuilder.h Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/AST/VTableBuilder.h Thu Jun 1 20:58:49 2017 (r319463) @@ -154,6 +154,28 @@ class VTableComponent { (public) bool isRTTIKind() const { return isRTTIKind(getKind()); } + GlobalDecl getGlobalDecl() const { + assert(isUsedFunctionPointerKind() && + "GlobalDecl can be created only from virtual function"); + + auto *DtorDecl = dyn_cast(getFunctionDecl()); + switch (getKind()) { + case CK_FunctionPointer: + return GlobalDecl(getFunctionDecl()); + case CK_CompleteDtorPointer: + return GlobalDecl(DtorDecl, CXXDtorType::Dtor_Complete); + case CK_DeletingDtorPointer: + return GlobalDecl(DtorDecl, CXXDtorType::Dtor_Deleting); + case CK_VCallOffset: + case CK_VBaseOffset: + case CK_OffsetToTop: + case CK_RTTI: + case CK_UnusedFunctionPointer: + llvm_unreachable("Only function pointers kinds"); + } + llvm_unreachable("Should already return"); + } + private: static bool isFunctionPointerKind(Kind ComponentKind) { return isUsedFunctionPointerKind(ComponentKind) || Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Thu Jun 1 20:58:49 2017 (r319463) @@ -733,6 +733,7 @@ def Pedantic : DiagGroup<"pedantic">; // Aliases. def : DiagGroup<"", [Extra]>; // -W = -Wextra def : DiagGroup<"endif-labels", [ExtraTokens]>; // -Wendif-labels=-Wextra-tokens +def : DiagGroup<"cpp", [PoundWarning]>; // -Wcpp = -W#warnings def : DiagGroup<"comments", [Comment]>; // -Wcomments = -Wcomment def : DiagGroup<"conversion-null", [NullConversion]>; // -Wconversion-null = -Wnull-conversion Modified: vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h Thu Jun 1 20:58:49 2017 (r319463) @@ -32,7 +32,7 @@ namespace clang { DIAG_START_FRONTEND = DIAG_START_DRIVER + 200, DIAG_START_SERIALIZATION = DIAG_START_FRONTEND + 100, DIAG_START_LEX = DIAG_START_SERIALIZATION + 120, - DIAG_START_PARSE = DIAG_START_LEX + 300, + DIAG_START_PARSE = DIAG_START_LEX + 400, DIAG_START_AST = DIAG_START_PARSE + 500, DIAG_START_COMMENT = DIAG_START_AST + 110, DIAG_START_SEMA = DIAG_START_COMMENT + 100, Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Thu Jun 1 20:58:49 2017 (r319463) @@ -8979,10 +8979,10 @@ def err_coroutine_promise_new_requires_nothrow : Error def note_coroutine_promise_call_implicitly_required : Note< "call to %0 implicitly required by coroutine function here">; def err_await_suspend_invalid_return_type : Error< - "the return type of 'await_suspend' is required to be 'void' or 'bool' (have %0)" + "return type of 'await_suspend' is required to be 'void' or 'bool' (have %0)" >; def note_await_ready_no_bool_conversion : Note< - "the return type of 'await_ready' is required to be contextually convertible to 'bool'" + "return type of 'await_ready' is required to be contextually convertible to 'bool'" >; } Modified: vendor/clang/dist/include/clang/Basic/Module.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/Module.h Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Basic/Module.h Thu Jun 1 20:58:49 2017 (r319463) @@ -83,6 +83,10 @@ class Module { (public) /// are found. const DirectoryEntry *Directory; + /// \brief The presumed file name for the module map defining this module. + /// Only non-empty when building from preprocessed source. + std::string PresumedModuleMapFile; + /// \brief The umbrella header or directory. llvm::PointerUnion Umbrella; Modified: vendor/clang/dist/include/clang/Basic/Sanitizers.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/Sanitizers.def Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Basic/Sanitizers.def Thu Jun 1 20:58:49 2017 (r319463) @@ -73,6 +73,7 @@ SANITIZER("nullability-return", NullabilityReturn) SANITIZER_GROUP("nullability", Nullability, NullabilityArg | NullabilityAssign | NullabilityReturn) SANITIZER("object-size", ObjectSize) +SANITIZER("pointer-overflow", PointerOverflow) SANITIZER("return", Return) SANITIZER("returns-nonnull-attribute", ReturnsNonnullAttribute) SANITIZER("shift-base", ShiftBase) @@ -108,9 +109,9 @@ SANITIZER("safe-stack", SafeStack) SANITIZER_GROUP("undefined", Undefined, Alignment | Bool | ArrayBounds | Enum | FloatCastOverflow | FloatDivideByZero | IntegerDivideByZero | NonnullAttribute | - Null | ObjectSize | Return | ReturnsNonnullAttribute | - Shift | SignedIntegerOverflow | Unreachable | VLABound | - Function | Vptr) + Null | ObjectSize | PointerOverflow | Return | + ReturnsNonnullAttribute | Shift | SignedIntegerOverflow | + Unreachable | VLABound | Function | Vptr) // -fsanitize=undefined-trap is an alias for -fsanitize=undefined. SANITIZER_GROUP("undefined-trap", UndefinedTrap, Undefined) Modified: vendor/clang/dist/include/clang/Basic/TokenKinds.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/TokenKinds.def Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Basic/TokenKinds.def Thu Jun 1 20:58:49 2017 (r319463) @@ -411,6 +411,7 @@ TYPE_TRAIT_1(__is_sealed, IsSealed, KEYMS) // MSVC12.0 / VS2013 Type Traits TYPE_TRAIT_1(__is_destructible, IsDestructible, KEYMS) +TYPE_TRAIT_1(__is_trivially_destructible, IsTriviallyDestructible, KEYCXX) TYPE_TRAIT_1(__is_nothrow_destructible, IsNothrowDestructible, KEYMS) TYPE_TRAIT_2(__is_nothrow_assignable, IsNothrowAssignable, KEYCXX) TYPE_TRAIT_N(__is_constructible, IsConstructible, KEYCXX) @@ -439,7 +440,6 @@ TYPE_TRAIT_2(__is_convertible_to, IsConvertibleTo, KEY TYPE_TRAIT_1(__is_empty, IsEmpty, KEYCXX) TYPE_TRAIT_1(__is_enum, IsEnum, KEYCXX) TYPE_TRAIT_1(__is_final, IsFinal, KEYCXX) -// Tentative name - there's no implementation of std::is_literal_type yet. TYPE_TRAIT_1(__is_literal, IsLiteral, KEYCXX) // Name for GCC 4.6 compatibility - people have already written libraries using // this name unfortunately. Modified: vendor/clang/dist/include/clang/Basic/TypeTraits.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/TypeTraits.h Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Basic/TypeTraits.h Thu Jun 1 20:58:49 2017 (r319463) @@ -65,6 +65,7 @@ namespace clang { UTT_IsStandardLayout, UTT_IsTrivial, UTT_IsTriviallyCopyable, + UTT_IsTriviallyDestructible, UTT_IsUnion, UTT_IsUnsigned, UTT_IsVoid, Modified: vendor/clang/dist/include/clang/Driver/CLCompatOptions.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/CLCompatOptions.td Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Driver/CLCompatOptions.td Thu Jun 1 20:58:49 2017 (r319463) @@ -63,6 +63,12 @@ def _SLASH_C : CLFlag<"C">, def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias; def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">, HelpText<"Dump record layout information">, Alias; +def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">, + HelpText<"Enable caret and column diagnostics (on by default)">; +def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">, + HelpText<"Disable caret diagnostics but keep column info">; +def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">, + HelpText<"Disable column and caret diagnostics">; def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">, MetaVarName<"">, Alias; def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias; @@ -324,6 +330,7 @@ def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">; def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">; def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">; +def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">; def _SLASH_Zm : CLIgnoredJoined<"Zm">; def _SLASH_Zo : CLIgnoredFlag<"Zo">; def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">; Modified: vendor/clang/dist/include/clang/Driver/Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/Options.td Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Driver/Options.td Thu Jun 1 20:58:49 2017 (r319463) @@ -2084,7 +2084,7 @@ def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Gr def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[DriverOption]>; def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group; def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">; -def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option]>, +def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option, CoreOption]>, HelpText<"Disable builtin #include directories">; def nocudainc : Flag<["-"], "nocudainc">; def nocudalib : Flag<["-"], "nocudalib">; @@ -2096,7 +2096,7 @@ def nopie : Flag<["-"], "nopie">; def noprebind : Flag<["-"], "noprebind">; def noseglinkedit : Flag<["-"], "noseglinkedit">; def nostartfiles : Flag<["-"], "nostartfiles">; -def nostdinc : Flag<["-"], "nostdinc">; +def nostdinc : Flag<["-"], "nostdinc">, Flags<[CoreOption]>; def nostdlibinc : Flag<["-"], "nostdlibinc">; def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>, HelpText<"Disable standard #include directories for the C++ standard library">; Modified: vendor/clang/dist/include/clang/Lex/HeaderSearch.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/HeaderSearch.h Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/include/clang/Lex/HeaderSearch.h Thu Jun 1 20:58:49 2017 (r319463) @@ -543,10 +543,13 @@ class HeaderSearch { (public) /// \param Offset [inout] An offset within ID to start parsing. On exit, /// filled by the end of the parsed contents (either EOF or the /// location of an end-of-module-map pragma). - /// + /// \param OriginalModuleMapFile The original path to the module map file, + /// used to resolve paths within the module (this is required when + /// building the module from preprocessed source). /// \returns true if an error occurred, false otherwise. bool loadModuleMapFile(const FileEntry *File, bool IsSystem, - FileID ID = FileID(), unsigned *Offset = nullptr); + FileID ID = FileID(), unsigned *Offset = nullptr, + StringRef OriginalModuleMapFile = StringRef()); /// \brief Collect the set of all known, top-level modules. /// Modified: vendor/clang/dist/lib/AST/ODRHash.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ODRHash.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/AST/ODRHash.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -110,7 +110,24 @@ void ODRHash::AddNestedNameSpecifier(const NestedNameS } } -void ODRHash::AddTemplateName(TemplateName Name) {} +void ODRHash::AddTemplateName(TemplateName Name) { + auto Kind = Name.getKind(); + ID.AddInteger(Kind); + + switch (Kind) { + case TemplateName::Template: + AddDecl(Name.getAsTemplateDecl()); + break; + // TODO: Support these cases. + case TemplateName::OverloadedTemplate: + case TemplateName::QualifiedTemplate: + case TemplateName::DependentTemplate: + case TemplateName::SubstTemplateTemplateParm: + case TemplateName::SubstTemplateTemplateParmPack: + break; + } +} + void ODRHash::AddTemplateArgument(TemplateArgument TA) {} void ODRHash::AddTemplateParameterList(const TemplateParameterList *TPL) {} @@ -491,6 +508,15 @@ class ODRTypeVisitor : public TypeVisitorgetQualifier()); AddQualType(T->getNamedType()); VisitTypeWithKeyword(T); + } + + void VisitTemplateSpecializationType(const TemplateSpecializationType *T) { + ID.AddInteger(T->getNumArgs()); + for (const auto &TA : T->template_arguments()) { + Hash.AddTemplateArgument(TA); + } + Hash.AddTemplateName(T->getTemplateName()); + VisitType(T); } }; Modified: vendor/clang/dist/lib/Basic/Targets.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Targets.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/Basic/Targets.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -3123,6 +3123,7 @@ class X86TargetInfo : public TargetInfo { (public) case CC_Swift: case CC_X86Pascal: case CC_IntelOclBicc: + case CC_OpenCLKernel: return CCCR_OK; default: return CCCR_Warning; @@ -4834,6 +4835,7 @@ class X86_64TargetInfo : public X86TargetInfo { (publi case CC_PreserveMost: case CC_PreserveAll: case CC_X86RegCall: + case CC_OpenCLKernel: return CCCR_OK; default: return CCCR_Warning; @@ -4907,6 +4909,7 @@ class WindowsX86_64TargetInfo : public WindowsTargetIn case CC_X86_64SysV: case CC_Swift: case CC_X86RegCall: + case CC_OpenCLKernel: return CCCR_OK; default: return CCCR_Warning; @@ -5860,6 +5863,7 @@ class ARMTargetInfo : public TargetInfo { (public) case CC_AAPCS: case CC_AAPCS_VFP: case CC_Swift: + case CC_OpenCLKernel: return CCCR_OK; default: return CCCR_Warning; @@ -6019,6 +6023,7 @@ class WindowsARMTargetInfo : public WindowsTargetInfo< case CC_X86VectorCall: return CCCR_Ignore; case CC_C: + case CC_OpenCLKernel: return CCCR_OK; default: return CCCR_Warning; @@ -6329,6 +6334,7 @@ class AArch64TargetInfo : public TargetInfo { (public) case CC_Swift: case CC_PreserveMost: case CC_PreserveAll: + case CC_OpenCLKernel: return CCCR_OK; default: return CCCR_Warning; @@ -7380,6 +7386,7 @@ class SystemZTargetInfo : public TargetInfo { (public) switch (CC) { case CC_C: case CC_Swift: + case CC_OpenCLKernel: return CCCR_OK; default: return CCCR_Warning; @@ -7662,6 +7669,15 @@ class BPFTargetInfo : public TargetInfo { (public) } ArrayRef getGCCRegAliases() const override { return None; + } + CallingConvCheckResult checkCallingConvention(CallingConv CC) const override { + switch (CC) { + default: + return CCCR_Warning; + case CC_C: + case CC_OpenCLKernel: + return CCCR_OK; + } } }; Modified: vendor/clang/dist/lib/CodeGen/ABIInfo.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/ABIInfo.h Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/ABIInfo.h Thu Jun 1 20:58:49 2017 (r319463) @@ -149,7 +149,6 @@ namespace swiftcall { return info->supportsSwift(); } }; - } // end namespace CodeGen } // end namespace clang Modified: vendor/clang/dist/lib/CodeGen/CGCall.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGCall.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/CGCall.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -707,6 +707,12 @@ CodeGenTypes::arrangeCall(const CGFunctionInfo &signat signature.getRequiredArgs()); } +namespace clang { +namespace CodeGen { +void computeSPIRKernelABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI); +} +} + /// Arrange the argument and result information for an abstract value /// of a given function type. This is the method which all of the /// above functions ultimately defer to. @@ -741,12 +747,16 @@ CodeGenTypes::arrangeLLVMFunctionInfo(CanQualType resu bool inserted = FunctionsBeingProcessed.insert(FI).second; (void)inserted; assert(inserted && "Recursively being processed?"); - + // Compute ABI information. - if (info.getCC() != CC_Swift) { - getABIInfo().computeInfo(*FI); - } else { + if (CC == llvm::CallingConv::SPIR_KERNEL) { + // Force target independent argument handling for the host visible + // kernel functions. + computeSPIRKernelABIInfo(CGM, *FI); + } else if (info.getCC() == CC_Swift) { swiftcall::computeABIInfo(CGM, *FI); + } else { + getABIInfo().computeInfo(*FI); } // Loop over all of the computed argument and return value info. If any of Modified: vendor/clang/dist/lib/CodeGen/CGCleanup.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGCleanup.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/CGCleanup.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -448,6 +448,13 @@ void CodeGenFunction::PopCleanupBlocks( auto *Inst = dyn_cast_or_null(*ReloadedValue); if (!Inst) continue; + + // Don't spill static allocas, they dominate all cleanups. These are created + // by binding a reference to a local variable or temporary. + auto *AI = dyn_cast(Inst); + if (AI && AI->isStaticAlloca()) + continue; + Address Tmp = CreateDefaultAlignTempAlloca(Inst->getType(), "tmp.exprcleanup"); Modified: vendor/clang/dist/lib/CodeGen/CGExpr.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExpr.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/CGExpr.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -3002,9 +3002,10 @@ static llvm::Value *emitArraySubscriptGEP(CodeGenFunct llvm::Value *ptr, ArrayRef indices, bool inbounds, + SourceLocation loc, const llvm::Twine &name = "arrayidx") { if (inbounds) { - return CGF.Builder.CreateInBoundsGEP(ptr, indices, name); + return CGF.EmitCheckedInBoundsGEP(ptr, indices, loc, name); } else { return CGF.Builder.CreateGEP(ptr, indices, name); } @@ -3035,8 +3036,9 @@ static QualType getFixedSizeElementType(const ASTConte } static Address emitArraySubscriptGEP(CodeGenFunction &CGF, Address addr, - ArrayRef indices, + ArrayRef indices, QualType eltType, bool inbounds, + SourceLocation loc, const llvm::Twine &name = "arrayidx") { // All the indices except that last must be zero. #ifndef NDEBUG @@ -3057,7 +3059,7 @@ static Address emitArraySubscriptGEP(CodeGenFunction & getArrayElementAlign(addr.getAlignment(), indices.back(), eltSize); llvm::Value *eltPtr = - emitArraySubscriptGEP(CGF, addr.getPointer(), indices, inbounds, name); + emitArraySubscriptGEP(CGF, addr.getPointer(), indices, inbounds, loc, name); return Address(eltPtr, eltAlign); } @@ -3110,7 +3112,8 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const A Address Addr = EmitExtVectorElementLValue(LV); QualType EltType = LV.getType()->castAs()->getElementType(); - Addr = emitArraySubscriptGEP(*this, Addr, Idx, EltType, /*inbounds*/ true); + Addr = emitArraySubscriptGEP(*this, Addr, Idx, EltType, /*inbounds*/ true, + E->getExprLoc()); return MakeAddrLValue(Addr, EltType, LV.getBaseInfo()); } @@ -3138,7 +3141,8 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const A } Addr = emitArraySubscriptGEP(*this, Addr, Idx, vla->getElementType(), - !getLangOpts().isSignedOverflowDefined()); + !getLangOpts().isSignedOverflowDefined(), + E->getExprLoc()); } else if (const ObjCObjectType *OIT = E->getType()->getAs()){ // Indexing over an interface, as in "NSString *P; P[4];" @@ -3163,8 +3167,8 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const A // Do the GEP. CharUnits EltAlign = getArrayElementAlign(Addr.getAlignment(), Idx, InterfaceSize); - llvm::Value *EltPtr = - emitArraySubscriptGEP(*this, Addr.getPointer(), ScaledIdx, false); + llvm::Value *EltPtr = emitArraySubscriptGEP( + *this, Addr.getPointer(), ScaledIdx, false, E->getExprLoc()); Addr = Address(EltPtr, EltAlign); // Cast back. @@ -3189,14 +3193,16 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const A Addr = emitArraySubscriptGEP(*this, ArrayLV.getAddress(), {CGM.getSize(CharUnits::Zero()), Idx}, E->getType(), - !getLangOpts().isSignedOverflowDefined()); + !getLangOpts().isSignedOverflowDefined(), + E->getExprLoc()); BaseInfo = ArrayLV.getBaseInfo(); } else { // The base must be a pointer; emit it with an estimate of its alignment. Addr = EmitPointerWithAlignment(E->getBase(), &BaseInfo); auto *Idx = EmitIdxAfterBase(/*Promote*/true); Addr = emitArraySubscriptGEP(*this, Addr, Idx, E->getType(), - !getLangOpts().isSignedOverflowDefined()); + !getLangOpts().isSignedOverflowDefined(), + E->getExprLoc()); } LValue LV = MakeAddrLValue(Addr, E->getType(), BaseInfo); @@ -3368,7 +3374,8 @@ LValue CodeGenFunction::EmitOMPArraySectionExpr(const else Idx = Builder.CreateNSWMul(Idx, NumElements); EltPtr = emitArraySubscriptGEP(*this, Base, Idx, VLA->getElementType(), - !getLangOpts().isSignedOverflowDefined()); + !getLangOpts().isSignedOverflowDefined(), + E->getExprLoc()); } else if (const Expr *Array = isSimpleArrayDecayOperand(E->getBase())) { // If this is A[i] where A is an array, the frontend will have decayed the // base to be a ArrayToPointerDecay implicit cast. While correct, it is @@ -3387,13 +3394,15 @@ LValue CodeGenFunction::EmitOMPArraySectionExpr(const // Propagate the alignment from the array itself to the result. EltPtr = emitArraySubscriptGEP( *this, ArrayLV.getAddress(), {CGM.getSize(CharUnits::Zero()), Idx}, - ResultExprTy, !getLangOpts().isSignedOverflowDefined()); + ResultExprTy, !getLangOpts().isSignedOverflowDefined(), + E->getExprLoc()); BaseInfo = ArrayLV.getBaseInfo(); } else { Address Base = emitOMPArraySectionBase(*this, E->getBase(), BaseInfo, BaseTy, ResultExprTy, IsLowerBound); EltPtr = emitArraySubscriptGEP(*this, Base, Idx, ResultExprTy, - !getLangOpts().isSignedOverflowDefined()); + !getLangOpts().isSignedOverflowDefined(), + E->getExprLoc()); } return MakeAddrLValue(EltPtr, ResultExprTy, BaseInfo); @@ -3530,6 +3539,25 @@ static Address emitAddrOfFieldStorage(CodeGenFunction return CGF.Builder.CreateStructGEP(base, idx, offset, field->getName()); } +static bool hasAnyVptr(const QualType Type, const ASTContext &Context) { + const auto *RD = Type.getTypePtr()->getAsCXXRecordDecl(); + if (!RD) + return false; + + if (RD->isDynamicClass()) + return true; + + for (const auto &Base : RD->bases()) + if (hasAnyVptr(Base.getType(), Context)) + return true; + + for (const FieldDecl *Field : RD->fields()) + if (hasAnyVptr(Field->getType(), Context)) + return true; + + return false; +} + LValue CodeGenFunction::EmitLValueForField(LValue base, const FieldDecl *field) { LValueBaseInfo BaseInfo = base.getBaseInfo(); @@ -3572,6 +3600,14 @@ LValue CodeGenFunction::EmitLValueForField(LValue base assert(!type->isReferenceType() && "union has reference member"); // TODO: handle path-aware TBAA for union. TBAAPath = false; + + const auto FieldType = field->getType(); + if (CGM.getCodeGenOpts().StrictVTablePointers && + hasAnyVptr(FieldType, getContext())) + // Because unions can easily skip invariant.barriers, we need to add + // a barrier every time CXXRecord field with vptr is referenced. + addr = Address(Builder.CreateInvariantGroupBarrier(addr.getPointer()), + addr.getAlignment()); } else { // For structs, we GEP to the field that the record layout suggests. addr = emitAddrOfFieldStorage(*this, addr, field); Modified: vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -30,6 +30,7 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Function.h" +#include "llvm/IR/GetElementPtrTypeIterator.h" #include "llvm/IR/GlobalVariable.h" #include "llvm/IR/Intrinsics.h" #include "llvm/IR/Module.h" @@ -44,6 +45,43 @@ using llvm::Value; //===----------------------------------------------------------------------===// namespace { + +/// Determine whether the given binary operation may overflow. +/// Sets \p Result to the value of the operation for BO_Add, BO_Sub, BO_Mul, +/// and signed BO_{Div,Rem}. For these opcodes, and for unsigned BO_{Div,Rem}, +/// the returned overflow check is precise. The returned value is 'true' for +/// all other opcodes, to be conservative. +bool mayHaveIntegerOverflow(llvm::ConstantInt *LHS, llvm::ConstantInt *RHS, + BinaryOperator::Opcode Opcode, bool Signed, + llvm::APInt &Result) { + // Assume overflow is possible, unless we can prove otherwise. + bool Overflow = true; + const auto &LHSAP = LHS->getValue(); + const auto &RHSAP = RHS->getValue(); + if (Opcode == BO_Add) { + if (Signed) + Result = LHSAP.sadd_ov(RHSAP, Overflow); + else + Result = LHSAP.uadd_ov(RHSAP, Overflow); + } else if (Opcode == BO_Sub) { + if (Signed) + Result = LHSAP.ssub_ov(RHSAP, Overflow); + else + Result = LHSAP.usub_ov(RHSAP, Overflow); + } else if (Opcode == BO_Mul) { + if (Signed) + Result = LHSAP.smul_ov(RHSAP, Overflow); + else + Result = LHSAP.umul_ov(RHSAP, Overflow); + } else if (Opcode == BO_Div || Opcode == BO_Rem) { + if (Signed && !RHS->isZero()) + Result = LHSAP.sdiv_ov(RHSAP, Overflow); + else + return false; + } + return Overflow; +} + struct BinOpInfo { Value *LHS; Value *RHS; @@ -55,37 +93,14 @@ struct BinOpInfo { /// Check if the binop can result in integer overflow. bool mayHaveIntegerOverflow() const { // Without constant input, we can't rule out overflow. - const auto *LHSCI = dyn_cast(LHS); - const auto *RHSCI = dyn_cast(RHS); + auto *LHSCI = dyn_cast(LHS); + auto *RHSCI = dyn_cast(RHS); if (!LHSCI || !RHSCI) return true; - // Assume overflow is possible, unless we can prove otherwise. - bool Overflow = true; - const auto &LHSAP = LHSCI->getValue(); - const auto &RHSAP = RHSCI->getValue(); - if (Opcode == BO_Add) { - if (Ty->hasSignedIntegerRepresentation()) - (void)LHSAP.sadd_ov(RHSAP, Overflow); - else - (void)LHSAP.uadd_ov(RHSAP, Overflow); - } else if (Opcode == BO_Sub) { - if (Ty->hasSignedIntegerRepresentation()) - (void)LHSAP.ssub_ov(RHSAP, Overflow); - else - (void)LHSAP.usub_ov(RHSAP, Overflow); - } else if (Opcode == BO_Mul) { - if (Ty->hasSignedIntegerRepresentation()) - (void)LHSAP.smul_ov(RHSAP, Overflow); - else - (void)LHSAP.umul_ov(RHSAP, Overflow); - } else if (Opcode == BO_Div || Opcode == BO_Rem) { - if (Ty->hasSignedIntegerRepresentation() && !RHSCI->isZero()) - (void)LHSAP.sdiv_ov(RHSAP, Overflow); - else - return false; - } - return Overflow; + llvm::APInt Result; + return ::mayHaveIntegerOverflow( + LHSCI, RHSCI, Opcode, Ty->hasSignedIntegerRepresentation(), Result); } /// Check if the binop computes a division or a remainder. @@ -1925,7 +1940,8 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const Unary if (CGF.getLangOpts().isSignedOverflowDefined()) value = Builder.CreateGEP(value, numElts, "vla.inc"); else - value = Builder.CreateInBoundsGEP(value, numElts, "vla.inc"); + value = CGF.EmitCheckedInBoundsGEP(value, numElts, E->getExprLoc(), + "vla.inc"); // Arithmetic on function pointers (!) is just +-1. } else if (type->isFunctionType()) { @@ -1935,7 +1951,8 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const Unary if (CGF.getLangOpts().isSignedOverflowDefined()) value = Builder.CreateGEP(value, amt, "incdec.funcptr"); else - value = Builder.CreateInBoundsGEP(value, amt, "incdec.funcptr"); + value = CGF.EmitCheckedInBoundsGEP(value, amt, E->getExprLoc(), + "incdec.funcptr"); value = Builder.CreateBitCast(value, input->getType()); // For everything else, we can just do a simple increment. @@ -1944,7 +1961,8 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const Unary if (CGF.getLangOpts().isSignedOverflowDefined()) value = Builder.CreateGEP(value, amt, "incdec.ptr"); else - value = Builder.CreateInBoundsGEP(value, amt, "incdec.ptr"); + value = CGF.EmitCheckedInBoundsGEP(value, amt, E->getExprLoc(), + "incdec.ptr"); } // Vector increment/decrement. @@ -2025,7 +2043,8 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const Unary if (CGF.getLangOpts().isSignedOverflowDefined()) value = Builder.CreateGEP(value, sizeValue, "incdec.objptr"); else - value = Builder.CreateInBoundsGEP(value, sizeValue, "incdec.objptr"); + value = CGF.EmitCheckedInBoundsGEP(value, sizeValue, E->getExprLoc(), + "incdec.objptr"); value = Builder.CreateBitCast(value, input->getType()); } @@ -2692,7 +2711,8 @@ static Value *emitPointerArithmetic(CodeGenFunction &C pointer = CGF.Builder.CreateGEP(pointer, index, "add.ptr"); } else { index = CGF.Builder.CreateNSWMul(index, numElements, "vla.index"); - pointer = CGF.Builder.CreateInBoundsGEP(pointer, index, "add.ptr"); + pointer = CGF.EmitCheckedInBoundsGEP(pointer, index, op.E->getExprLoc(), + "add.ptr"); } return pointer; } @@ -2709,7 +2729,8 @@ static Value *emitPointerArithmetic(CodeGenFunction &C if (CGF.getLangOpts().isSignedOverflowDefined()) return CGF.Builder.CreateGEP(pointer, index, "add.ptr"); - return CGF.Builder.CreateInBoundsGEP(pointer, index, "add.ptr"); + return CGF.EmitCheckedInBoundsGEP(pointer, index, op.E->getExprLoc(), + "add.ptr"); } // Construct an fmuladd intrinsic to represent a fused mul-add of MulOp and @@ -3823,4 +3844,125 @@ LValue CodeGenFunction::EmitCompoundAssignmentLValue( } llvm_unreachable("Unhandled compound assignment operator"); +} + +Value *CodeGenFunction::EmitCheckedInBoundsGEP(Value *Ptr, + ArrayRef IdxList, + SourceLocation Loc, + const Twine &Name) { + Value *GEPVal = Builder.CreateInBoundsGEP(Ptr, IdxList, Name); + + // If the pointer overflow sanitizer isn't enabled, do nothing. + if (!SanOpts.has(SanitizerKind::PointerOverflow)) + return GEPVal; + + // If the GEP has already been reduced to a constant, leave it be. + if (isa(GEPVal)) + return GEPVal; + + // Only check for overflows in the default address space. + if (GEPVal->getType()->getPointerAddressSpace()) + return GEPVal; + + auto *GEP = cast(GEPVal); + assert(GEP->isInBounds() && "Expected inbounds GEP"); + + SanitizerScope SanScope(this); + auto &VMContext = getLLVMContext(); + const auto &DL = CGM.getDataLayout(); + auto *IntPtrTy = DL.getIntPtrType(GEP->getPointerOperandType()); + + // Grab references to the signed add/mul overflow intrinsics for intptr_t. + auto *Zero = llvm::ConstantInt::getNullValue(IntPtrTy); + auto *SAddIntrinsic = + CGM.getIntrinsic(llvm::Intrinsic::sadd_with_overflow, IntPtrTy); + auto *SMulIntrinsic = + CGM.getIntrinsic(llvm::Intrinsic::smul_with_overflow, IntPtrTy); + + // The total (signed) byte offset for the GEP. + llvm::Value *TotalOffset = nullptr; + // The offset overflow flag - true if the total offset overflows. + llvm::Value *OffsetOverflows = Builder.getFalse(); + + /// Return the result of the given binary operation. + auto eval = [&](BinaryOperator::Opcode Opcode, llvm::Value *LHS, + llvm::Value *RHS) -> llvm::Value * { + assert(Opcode == BO_Add || Opcode == BO_Mul && "Can't eval binop"); + + // If the operands are constants, return a constant result. + if (auto *LHSCI = dyn_cast(LHS)) { + if (auto *RHSCI = dyn_cast(RHS)) { + llvm::APInt N; + bool HasOverflow = mayHaveIntegerOverflow(LHSCI, RHSCI, Opcode, + /*Signed=*/true, N); + if (HasOverflow) + OffsetOverflows = Builder.getTrue(); + return llvm::ConstantInt::get(VMContext, N); + } + } + + // Otherwise, compute the result with checked arithmetic. + auto *ResultAndOverflow = Builder.CreateCall( + (Opcode == BO_Add) ? SAddIntrinsic : SMulIntrinsic, {LHS, RHS}); + OffsetOverflows = Builder.CreateOr( + OffsetOverflows, Builder.CreateExtractValue(ResultAndOverflow, 1)); + return Builder.CreateExtractValue(ResultAndOverflow, 0); + }; + + // Determine the total byte offset by looking at each GEP operand. + for (auto GTI = llvm::gep_type_begin(GEP), GTE = llvm::gep_type_end(GEP); + GTI != GTE; ++GTI) { + llvm::Value *LocalOffset; + auto *Index = GTI.getOperand(); + // Compute the local offset contributed by this indexing step: + if (auto *STy = GTI.getStructTypeOrNull()) { + // For struct indexing, the local offset is the byte position of the + // specified field. + unsigned FieldNo = cast(Index)->getZExtValue(); + LocalOffset = llvm::ConstantInt::get( + IntPtrTy, DL.getStructLayout(STy)->getElementOffset(FieldNo)); + } else { + // Otherwise this is array-like indexing. The local offset is the index + // multiplied by the element size. + auto *ElementSize = llvm::ConstantInt::get( + IntPtrTy, DL.getTypeAllocSize(GTI.getIndexedType())); + auto *IndexS = Builder.CreateIntCast(Index, IntPtrTy, /*isSigned=*/true); + LocalOffset = eval(BO_Mul, ElementSize, IndexS); + } + + // If this is the first offset, set it as the total offset. Otherwise, add + // the local offset into the running total. + if (!TotalOffset || TotalOffset == Zero) + TotalOffset = LocalOffset; + else + TotalOffset = eval(BO_Add, TotalOffset, LocalOffset); + } + + // Common case: if the total offset is zero, don't emit a check. + if (TotalOffset == Zero) + return GEPVal; + + // Now that we've computed the total offset, add it to the base pointer (with + // wrapping semantics). + auto *IntPtr = Builder.CreatePtrToInt(GEP->getPointerOperand(), IntPtrTy); + auto *ComputedGEP = Builder.CreateAdd(IntPtr, TotalOffset); + + // The GEP is valid if: + // 1) The total offset doesn't overflow, and + // 2) The sign of the difference between the computed address and the base + // pointer matches the sign of the total offset. + llvm::Value *PosOrZeroValid = Builder.CreateICmpUGE(ComputedGEP, IntPtr); + llvm::Value *NegValid = Builder.CreateICmpULT(ComputedGEP, IntPtr); + auto *PosOrZeroOffset = Builder.CreateICmpSGE(TotalOffset, Zero); + llvm::Value *ValidGEP = Builder.CreateAnd( + Builder.CreateNot(OffsetOverflows), + Builder.CreateSelect(PosOrZeroOffset, PosOrZeroValid, NegValid)); + + llvm::Constant *StaticArgs[] = {EmitCheckSourceLocation(Loc)}; + // Pass the computed GEP to the runtime to avoid emitting poisoned arguments. + llvm::Value *DynamicArgs[] = {IntPtr, ComputedGEP}; + EmitCheck(std::make_pair(ValidGEP, SanitizerKind::PointerOverflow), + SanitizerHandler::PointerOverflow, StaticArgs, DynamicArgs); + + return GEPVal; } Modified: vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -90,7 +90,11 @@ LValue CGObjCRuntime::EmitValueForIvarAtOffset(CodeGen unsigned CVRQualifiers, llvm::Value *Offset) { // Compute (type*) ( (char *) BaseValue + Offset) - QualType IvarTy = Ivar->getType().withCVRQualifiers(CVRQualifiers); + QualType InterfaceTy{OID->getTypeForDecl(), 0}; + QualType ObjectPtrTy = + CGF.CGM.getContext().getObjCObjectPointerType(InterfaceTy); + QualType IvarTy = + Ivar->getUsageType(ObjectPtrTy).withCVRQualifiers(CVRQualifiers); llvm::Type *LTy = CGF.CGM.getTypes().ConvertTypeForMem(IvarTy); llvm::Value *V = CGF.Builder.CreateBitCast(BaseValue, CGF.Int8PtrTy); V = CGF.Builder.CreateInBoundsGEP(V, Offset, "add.ptr"); Modified: vendor/clang/dist/lib/CodeGen/CGVTables.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGVTables.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/CGVTables.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -901,6 +901,8 @@ void CodeGenModule::EmitDeferredVTables() { for (const CXXRecordDecl *RD : DeferredVTables) if (shouldEmitVTableAtEndOfTranslationUnit(*this, RD)) VTables.GenerateClassData(RD); + else if (shouldOpportunisticallyEmitVTables()) + OpportunisticVTables.push_back(RD); assert(savedSize == DeferredVTables.size() && "deferred extra vtables during vtable emission?"); Modified: vendor/clang/dist/lib/CodeGen/CodeGenFunction.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenFunction.h Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/CodeGenFunction.h Thu Jun 1 20:58:49 2017 (r319463) @@ -120,6 +120,7 @@ enum TypeEvaluationKind { SANITIZER_CHECK(NonnullArg, nonnull_arg, 0) \ SANITIZER_CHECK(NonnullReturn, nonnull_return, 0) \ SANITIZER_CHECK(OutOfBounds, out_of_bounds, 0) \ + SANITIZER_CHECK(PointerOverflow, pointer_overflow, 0) \ SANITIZER_CHECK(ShiftOutOfBounds, shift_out_of_bounds, 0) \ SANITIZER_CHECK(SubOverflow, sub_overflow, 0) \ SANITIZER_CHECK(TypeMismatch, type_mismatch, 1) \ @@ -3550,6 +3551,13 @@ class CodeGenFunction : public CodeGenTypeCache { (pub /// Given an assignment `*LHS = RHS`, emit a test that checks if \p RHS is /// nonnull, if \p LHS is marked _Nonnull. void EmitNullabilityCheck(LValue LHS, llvm::Value *RHS, SourceLocation Loc); + + /// Same as IRBuilder::CreateInBoundsGEP, but additionally emits a check to + /// detect undefined behavior when the pointer overflow sanitizer is enabled. + llvm::Value *EmitCheckedInBoundsGEP(llvm::Value *Ptr, + ArrayRef IdxList, + SourceLocation Loc, + const Twine &Name = ""); /// \brief Emit a description of a type in a format suitable for passing to /// a runtime sanitizer handler. Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -382,6 +382,7 @@ void InstrProfStats::reportDiagnostics(DiagnosticsEngi void CodeGenModule::Release() { EmitDeferred(); + EmitVTablesOpportunistically(); applyGlobalValReplacements(); applyReplacements(); checkAliases(); @@ -472,10 +473,10 @@ void CodeGenModule::Release() { // Width of wchar_t in bytes uint64_t WCharWidth = Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); - assert(LangOpts.ShortWChar || - llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) == - Target.getWCharWidth() / 8 && - "LLVM wchar_t size out of sync"); + assert((LangOpts.ShortWChar || + llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) == + Target.getWCharWidth() / 8) && + "LLVM wchar_t size out of sync"); // We need to record the widths of enums and wchar_t, so that we can generate // the correct build attributes in the ARM backend. wchar_size is also used by @@ -1386,6 +1387,24 @@ void CodeGenModule::EmitDeferred() { } } +void CodeGenModule::EmitVTablesOpportunistically() { + // Try to emit external vtables as available_externally if they have emitted + // all inlined virtual functions. It runs after EmitDeferred() and therefore + // is not allowed to create new references to things that need to be emitted + // lazily. Note that it also uses fact that we eagerly emitting RTTI. + + assert((OpportunisticVTables.empty() || shouldOpportunisticallyEmitVTables()) + && "Only emit opportunistic vtables with optimizations"); + + for (const CXXRecordDecl *RD : OpportunisticVTables) { + assert(getVTables().isVTableExternal(RD) && + "This queue should only contain external vtables"); + if (getCXXABI().canSpeculativelyEmitVTable(RD)) + VTables.GenerateClassData(RD); + } + OpportunisticVTables.clear(); +} + void CodeGenModule::EmitGlobalAnnotations() { if (Annotations.empty()) return; @@ -1904,6 +1923,10 @@ bool CodeGenModule::shouldEmitFunction(GlobalDecl GD) // implementation. // This happens in glibc's btowc and in some configure checks. return !isTriviallyRecursive(F); +} + +bool CodeGenModule::shouldOpportunisticallyEmitVTables() { + return CodeGenOpts.OptimizationLevel > 0; } void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD, llvm::GlobalValue *GV) { Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.h Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.h Thu Jun 1 20:58:49 2017 (r319463) @@ -341,6 +341,9 @@ class CodeGenModule : public CodeGenTypeCache { (priva /// A queue of (optional) vtables to consider emitting. std::vector DeferredVTables; + /// A queue of (optional) vtables that may be emitted opportunistically. + std::vector OpportunisticVTables; + /// List of global values which are required to be present in the object file; /// bitcast to i8*. This is used for forcing visibility of symbols which may /// otherwise be optimized out. @@ -450,7 +453,7 @@ class CodeGenModule : public CodeGenTypeCache { (priva bool isTriviallyRecursive(const FunctionDecl *F); bool shouldEmitFunction(GlobalDecl GD); - + bool shouldOpportunisticallyEmitVTables(); /// Map used to be sure we don't emit the same CompoundLiteral twice. llvm::DenseMap EmittedCompoundLiterals; @@ -1277,6 +1280,12 @@ class CodeGenModule : public CodeGenTypeCache { (priva /// Emit any needed decls for which code generation was deferred. void EmitDeferred(); + + /// Try to emit external vtables as available_externally if they have emitted + /// all inlined virtual functions. It runs after EmitDeferred() and therefore + /// is not allowed to create new references to things that need to be emitted + /// lazily. + void EmitVTablesOpportunistically(); /// Call replaceAllUsesWith on all pairs in Replacements. void applyReplacements(); Modified: vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp Thu Jun 1 20:58:42 2017 (r319462) +++ vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp Thu Jun 1 20:58:49 2017 (r319463) @@ -366,20 +366,30 @@ class ItaniumCXXABI : public CodeGen::CGCXXABI { (publ void emitCXXStructor(const CXXMethodDecl *MD, StructorType Type) override; private: - bool hasAnyVirtualInlineFunction(const CXXRecordDecl *RD) const { - const auto &VtableLayout = - CGM.getItaniumVTableContext().getVTableLayout(RD); + bool hasAnyUnusedVirtualInlineFunction(const CXXRecordDecl *RD) const { + const auto &VtableLayout = + CGM.getItaniumVTableContext().getVTableLayout(RD); - for (const auto &VtableComponent : VtableLayout.vtable_components()) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 20:58:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AB8AB7EAD6; Thu, 1 Jun 2017 20:58:58 +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 267E867D10; Thu, 1 Jun 2017 20:58:58 +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 v51KwvuL035144; Thu, 1 Jun 2017 20:58:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Kwvl5035143; Thu, 1 Jun 2017 20:58:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012058.v51Kwvl5035143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319464 - vendor/clang/clang-trunk-r304460 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:58:58 -0000 Author: dim Date: Thu Jun 1 20:58:56 2017 New Revision: 319464 URL: https://svnweb.freebsd.org/changeset/base/319464 Log: Tag clang trunk r304460. Added: vendor/clang/clang-trunk-r304460/ - copied from r319463, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Thu Jun 1 20:59:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7027BB7EB09; Thu, 1 Jun 2017 20:59:04 +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 D86CB67D79; Thu, 1 Jun 2017 20:59:03 +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 v51Kx21W035227; Thu, 1 Jun 2017 20:59:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KwxYD035192; Thu, 1 Jun 2017 20:58:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012058.v51KwxYD035192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319465 - in vendor/compiler-rt/dist: include/sanitizer lib/asan lib/asan/tests lib/dfsan lib/lsan lib/msan lib/msan/tests lib/sanitizer_common lib/sanitizer_common/scripts lib/sanitize... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:59:04 -0000 Author: dim Date: Thu Jun 1 20:58:59 2017 New Revision: 319465 URL: https://svnweb.freebsd.org/changeset/base/319465 Log: Vendor import of compiler-rt trunk r304460: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304460 Added: vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test2.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/strndup.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/allocator_fork_no_hang.cc (contents, props changed) vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/PR33221.cpp (contents, props changed) Deleted: vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-sandboxing.cc vendor/compiler-rt/dist/test/asan/TestCases/coverage-order-pcs.cc Modified: vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/dist/lib/asan/asan_allocator.h vendor/compiler-rt/dist/lib/asan/asan_flags.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc vendor/compiler-rt/dist/lib/dfsan/done_abilist.txt vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/msan/msan_allocator.h vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_interface.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/scripts/sancov.py vendor/compiler-rt/dist/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash_itanium.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-missing.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-fork.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-module-unloaded.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage.cc vendor/compiler-rt/dist/test/asan/TestCases/coverage-and-lsan.cc vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cc vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc Modified: vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h Thu Jun 1 20:58:59 2017 (r319465) @@ -32,9 +32,6 @@ extern "C" { // descriptor. Returns -1 on failure, or if coverage dumping is disabled. // This is intended for use by sandboxing code. intptr_t __sanitizer_maybe_open_cov_file(const char *name); - // Get the number of unique covered blocks (or edges). - // This can be useful for coverage-directed in-process fuzzers. - uintptr_t __sanitizer_get_total_unique_coverage(); #ifdef __cplusplus } // extern "C" #endif Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -47,8 +47,6 @@ static u32 RZSize2Log(u32 rz_size) { return res; } -static AsanAllocator &get_allocator(); - // The memory chunk allocated from the underlying allocator looks like this: // L L L L L L H H U U U U U U R R // L -- left redzone words (0 or more bytes) @@ -719,7 +717,7 @@ struct Allocator { static Allocator instance(LINKER_INITIALIZED); -static AsanAllocator &get_allocator() { +AsanAllocator &get_allocator() { return instance.allocator; } Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.h ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_allocator.h Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.h Thu Jun 1 20:58:59 2017 (r319465) @@ -213,5 +213,7 @@ void asan_mz_force_unlock(); void PrintInternalAllocatorStats(); void AsanSoftRssLimitExceededCallback(bool exceeded); +AsanAllocator &get_allocator(); + } // namespace __asan #endif // ASAN_ALLOCATOR_H Modified: vendor/compiler-rt/dist/lib/asan/asan_flags.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_flags.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/asan/asan_flags.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -194,6 +194,10 @@ void InitializeFlags() { Report("WARNING: strchr* interceptors are enabled even though " "replace_str=0. Use intercept_strchr=0 to disable them."); } + if (!f->replace_str && common_flags()->intercept_strndup) { + Report("WARNING: strndup* interceptors are enabled even though " + "replace_str=0. Use intercept_strndup=0 to disable them."); + } } } // namespace __asan Modified: vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -22,6 +22,7 @@ #include "asan_stats.h" #include "asan_suppressions.h" #include "lsan/lsan_common.h" +#include "sanitizer_common/sanitizer_stackdepot.h" #include "sanitizer_common/sanitizer_libc.h" #if SANITIZER_POSIX @@ -705,11 +706,27 @@ INTERCEPTOR(int, __cxa_atexit, void (*func)(void *), v #endif // ASAN_INTERCEPT___CXA_ATEXIT #if ASAN_INTERCEPT_FORK +static void BeforeFork() { + if (SANITIZER_LINUX) { + get_allocator().ForceLock(); + StackDepotLockAll(); + } +} + +static void AfterFork() { + if (SANITIZER_LINUX) { + StackDepotUnlockAll(); + get_allocator().ForceUnlock(); + } +} + INTERCEPTOR(int, fork, void) { ENSURE_ASAN_INITED(); + BeforeFork(); if (common_flags()->coverage) CovBeforeFork(); int pid = REAL(fork)(); if (common_flags()->coverage) CovAfterFork(pid); + AfterFork(); return pid; } #endif // ASAN_INTERCEPT_FORK Modified: vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -154,6 +154,33 @@ TEST(AddressSanitizer, MAYBE_StrDupOOBTest) { free(str); } +#if SANITIZER_TEST_HAS_STRNDUP +TEST(AddressSanitizer, MAYBE_StrNDupOOBTest) { + size_t size = Ident(42); + char *str = MallocAndMemsetString(size); + char *new_str; + // Normal strndup calls. + str[size - 1] = '\0'; + new_str = strndup(str, size - 13); + free(new_str); + new_str = strndup(str + size - 1, 13); + free(new_str); + // Argument points to not allocated memory. + EXPECT_DEATH(Ident(strndup(str - 1, 13)), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(strndup(str + size, 13)), RightOOBReadMessage(0)); + // Overwrite the terminating '\0' and hit unallocated memory. + str[size - 1] = 'z'; + EXPECT_DEATH(Ident(strndup(str, size + 13)), RightOOBReadMessage(0)); + // Check handling of non 0 terminated strings. + Ident(new_str = strndup(str + size - 1, 0)); + free(new_str); + Ident(new_str = strndup(str + size - 1, 1)); + free(new_str); + EXPECT_DEATH(Ident(strndup(str + size - 1, 2)), RightOOBReadMessage(0)); + free(str); +} +#endif // SANITIZER_TEST_HAS_STRNDUP + TEST(AddressSanitizer, StrCpyOOBTest) { size_t to_size = Ident(30); size_t from_size = Ident(6); // less than to_size Modified: vendor/compiler-rt/dist/lib/dfsan/done_abilist.txt ============================================================================== --- vendor/compiler-rt/dist/lib/dfsan/done_abilist.txt Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/dfsan/done_abilist.txt Thu Jun 1 20:58:59 2017 (r319465) @@ -287,8 +287,6 @@ fun:__sanitizer_cov_with_check=uninstrumented fun:__sanitizer_cov_with_check=discard fun:__sanitizer_set_death_callback=uninstrumented fun:__sanitizer_set_death_callback=discard -fun:__sanitizer_get_total_unique_coverage=uninstrumented -fun:__sanitizer_get_total_unique_coverage=discard fun:__sanitizer_update_counter_bitset_and_clear_counters=uninstrumented fun:__sanitizer_update_counter_bitset_and_clear_counters=discard Modified: vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -22,6 +22,7 @@ #include "sanitizer_common/sanitizer_platform_interceptors.h" #include "sanitizer_common/sanitizer_platform_limits_posix.h" #include "sanitizer_common/sanitizer_posix.h" +#include "sanitizer_common/sanitizer_stackdepot.h" #include "sanitizer_common/sanitizer_tls_get_addr.h" #include "lsan.h" #include "lsan_allocator.h" @@ -97,6 +98,28 @@ INTERCEPTOR(void*, valloc, uptr size) { } #endif +static void BeforeFork() { + if (SANITIZER_LINUX) { + LockAllocator(); + StackDepotLockAll(); + } +} + +static void AfterFork() { + if (SANITIZER_LINUX) { + StackDepotUnlockAll(); + UnlockAllocator(); + } +} + +INTERCEPTOR(int, fork, void) { + ENSURE_LSAN_INITED; + BeforeFork(); + int pid = REAL(fork)(); + AfterFork(); + return pid; +} + #if SANITIZER_INTERCEPT_MEMALIGN INTERCEPTOR(void*, memalign, uptr alignment, uptr size) { ENSURE_LSAN_INITED; @@ -336,6 +359,7 @@ void InitializeInterceptors() { LSAN_MAYBE_INTERCEPT_MALLOPT; INTERCEPT_FUNCTION(pthread_create); INTERCEPT_FUNCTION(pthread_join); + INTERCEPT_FUNCTION(fork); if (pthread_key_create(&g_thread_finalize_key, &thread_finalize)) { Report("LeakSanitizer: failed to create thread key.\n"); Modified: vendor/compiler-rt/dist/lib/msan/msan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/msan/msan_allocator.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -12,8 +12,6 @@ // MemorySanitizer allocator. //===----------------------------------------------------------------------===// -#include "sanitizer_common/sanitizer_allocator.h" -#include "sanitizer_common/sanitizer_allocator_interface.h" #include "msan.h" #include "msan_allocator.h" #include "msan_origin.h" @@ -22,101 +20,11 @@ namespace __msan { -struct Metadata { - uptr requested_size; -}; - -struct MsanMapUnmapCallback { - void OnMap(uptr p, uptr size) const {} - void OnUnmap(uptr p, uptr size) const { - __msan_unpoison((void *)p, size); - - // We are about to unmap a chunk of user memory. - // Mark the corresponding shadow memory as not needed. - uptr shadow_p = MEM_TO_SHADOW(p); - ReleaseMemoryPagesToOS(shadow_p, shadow_p + size); - if (__msan_get_track_origins()) { - uptr origin_p = MEM_TO_ORIGIN(p); - ReleaseMemoryPagesToOS(origin_p, origin_p + size); - } - } -}; - -#if defined(__mips64) - static const uptr kMaxAllowedMallocSize = 2UL << 30; - static const uptr kRegionSizeLog = 20; - static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog; - typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap; - - struct AP32 { - static const uptr kSpaceBeg = 0; - static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE; - static const uptr kMetadataSize = sizeof(Metadata); - typedef __sanitizer::CompactSizeClassMap SizeClassMap; - static const uptr kRegionSizeLog = __msan::kRegionSizeLog; - typedef __msan::ByteMap ByteMap; - typedef MsanMapUnmapCallback MapUnmapCallback; - static const uptr kFlags = 0; - }; - typedef SizeClassAllocator32 PrimaryAllocator; -#elif defined(__x86_64__) -#if SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING) - static const uptr kAllocatorSpace = 0x700000000000ULL; -#else - static const uptr kAllocatorSpace = 0x600000000000ULL; -#endif - static const uptr kMaxAllowedMallocSize = 8UL << 30; - - struct AP64 { // Allocator64 parameters. Deliberately using a short name. - static const uptr kSpaceBeg = kAllocatorSpace; - static const uptr kSpaceSize = 0x40000000000; // 4T. - static const uptr kMetadataSize = sizeof(Metadata); - typedef DefaultSizeClassMap SizeClassMap; - typedef MsanMapUnmapCallback MapUnmapCallback; - static const uptr kFlags = 0; - }; - - typedef SizeClassAllocator64 PrimaryAllocator; - -#elif defined(__powerpc64__) - static const uptr kMaxAllowedMallocSize = 2UL << 30; // 2G - - struct AP64 { // Allocator64 parameters. Deliberately using a short name. - static const uptr kSpaceBeg = 0x300000000000; - static const uptr kSpaceSize = 0x020000000000; // 2T. - static const uptr kMetadataSize = sizeof(Metadata); - typedef DefaultSizeClassMap SizeClassMap; - typedef MsanMapUnmapCallback MapUnmapCallback; - static const uptr kFlags = 0; - }; - - typedef SizeClassAllocator64 PrimaryAllocator; -#elif defined(__aarch64__) - static const uptr kMaxAllowedMallocSize = 2UL << 30; // 2G - static const uptr kRegionSizeLog = 20; - static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog; - typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap; - - struct AP32 { - static const uptr kSpaceBeg = 0; - static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE; - static const uptr kMetadataSize = sizeof(Metadata); - typedef __sanitizer::CompactSizeClassMap SizeClassMap; - static const uptr kRegionSizeLog = __msan::kRegionSizeLog; - typedef __msan::ByteMap ByteMap; - typedef MsanMapUnmapCallback MapUnmapCallback; - static const uptr kFlags = 0; - }; - typedef SizeClassAllocator32 PrimaryAllocator; -#endif -typedef SizeClassAllocatorLocalCache AllocatorCache; -typedef LargeMmapAllocator SecondaryAllocator; -typedef CombinedAllocator Allocator; - static Allocator allocator; static AllocatorCache fallback_allocator_cache; static SpinMutex fallback_mutex; + +Allocator &get_allocator() { return allocator; } void MsanAllocatorInit() { allocator.Init( Modified: vendor/compiler-rt/dist/lib/msan/msan_allocator.h ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_allocator.h Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/msan/msan_allocator.h Thu Jun 1 20:58:59 2017 (r319465) @@ -15,8 +15,105 @@ #define MSAN_ALLOCATOR_H #include "sanitizer_common/sanitizer_common.h" +#include "sanitizer_common/sanitizer_allocator.h" +#include "sanitizer_common/sanitizer_allocator_interface.h" namespace __msan { + +struct Metadata { + uptr requested_size; +}; + +struct MsanMapUnmapCallback { + void OnMap(uptr p, uptr size) const {} + void OnUnmap(uptr p, uptr size) const { + __msan_unpoison((void *)p, size); + + // We are about to unmap a chunk of user memory. + // Mark the corresponding shadow memory as not needed. + uptr shadow_p = MEM_TO_SHADOW(p); + ReleaseMemoryPagesToOS(shadow_p, shadow_p + size); + if (__msan_get_track_origins()) { + uptr origin_p = MEM_TO_ORIGIN(p); + ReleaseMemoryPagesToOS(origin_p, origin_p + size); + } + } +}; + +#if defined(__mips64) + static const uptr kMaxAllowedMallocSize = 2UL << 30; + static const uptr kRegionSizeLog = 20; + static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog; + typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap; + + struct AP32 { + static const uptr kSpaceBeg = 0; + static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE; + static const uptr kMetadataSize = sizeof(Metadata); + typedef __sanitizer::CompactSizeClassMap SizeClassMap; + static const uptr kRegionSizeLog = __msan::kRegionSizeLog; + typedef __msan::ByteMap ByteMap; + typedef MsanMapUnmapCallback MapUnmapCallback; + static const uptr kFlags = 0; + }; + typedef SizeClassAllocator32 PrimaryAllocator; +#elif defined(__x86_64__) +#if SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING) + static const uptr kAllocatorSpace = 0x700000000000ULL; +#else + static const uptr kAllocatorSpace = 0x600000000000ULL; +#endif + static const uptr kMaxAllowedMallocSize = 8UL << 30; + + struct AP64 { // Allocator64 parameters. Deliberately using a short name. + static const uptr kSpaceBeg = kAllocatorSpace; + static const uptr kSpaceSize = 0x40000000000; // 4T. + static const uptr kMetadataSize = sizeof(Metadata); + typedef DefaultSizeClassMap SizeClassMap; + typedef MsanMapUnmapCallback MapUnmapCallback; + static const uptr kFlags = 0; + }; + + typedef SizeClassAllocator64 PrimaryAllocator; + +#elif defined(__powerpc64__) + static const uptr kMaxAllowedMallocSize = 2UL << 30; // 2G + + struct AP64 { // Allocator64 parameters. Deliberately using a short name. + static const uptr kSpaceBeg = 0x300000000000; + static const uptr kSpaceSize = 0x020000000000; // 2T. + static const uptr kMetadataSize = sizeof(Metadata); + typedef DefaultSizeClassMap SizeClassMap; + typedef MsanMapUnmapCallback MapUnmapCallback; + static const uptr kFlags = 0; + }; + + typedef SizeClassAllocator64 PrimaryAllocator; +#elif defined(__aarch64__) + static const uptr kMaxAllowedMallocSize = 2UL << 30; // 2G + static const uptr kRegionSizeLog = 20; + static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog; + typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap; + + struct AP32 { + static const uptr kSpaceBeg = 0; + static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE; + static const uptr kMetadataSize = sizeof(Metadata); + typedef __sanitizer::CompactSizeClassMap SizeClassMap; + static const uptr kRegionSizeLog = __msan::kRegionSizeLog; + typedef __msan::ByteMap ByteMap; + typedef MsanMapUnmapCallback MapUnmapCallback; + static const uptr kFlags = 0; + }; + typedef SizeClassAllocator32 PrimaryAllocator; +#endif +typedef SizeClassAllocatorLocalCache AllocatorCache; +typedef LargeMmapAllocator SecondaryAllocator; +typedef CombinedAllocator Allocator; + + +Allocator &get_allocator(); struct MsanThreadLocalMallocStorage { uptr quarantine_cache[16]; Modified: vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -341,33 +341,6 @@ INTERCEPTOR(char *, __strdup, char *src) { #define MSAN_MAYBE_INTERCEPT___STRDUP #endif -INTERCEPTOR(char *, strndup, char *src, SIZE_T n) { - ENSURE_MSAN_INITED(); - GET_STORE_STACK_TRACE; - // On FreeBSD strndup() leverages strnlen(). - InterceptorScope interceptor_scope; - SIZE_T copy_size = REAL(strnlen)(src, n); - char *res = REAL(strndup)(src, n); - CopyShadowAndOrigin(res, src, copy_size, &stack); - __msan_unpoison(res + copy_size, 1); // \0 - return res; -} - -#if !SANITIZER_FREEBSD -INTERCEPTOR(char *, __strndup, char *src, SIZE_T n) { - ENSURE_MSAN_INITED(); - GET_STORE_STACK_TRACE; - SIZE_T copy_size = REAL(strnlen)(src, n); - char *res = REAL(__strndup)(src, n); - CopyShadowAndOrigin(res, src, copy_size, &stack); - __msan_unpoison(res + copy_size, 1); // \0 - return res; -} -#define MSAN_MAYBE_INTERCEPT___STRNDUP INTERCEPT_FUNCTION(__strndup) -#else -#define MSAN_MAYBE_INTERCEPT___STRNDUP -#endif - INTERCEPTOR(char *, gcvt, double number, SIZE_T ndigit, char *buf) { ENSURE_MSAN_INITED(); char *res = REAL(gcvt)(number, ndigit, buf); @@ -1228,6 +1201,7 @@ INTERCEPTOR(void *, shmat, int shmid, const void *shma } static void BeforeFork() { + get_allocator().ForceLock(); StackDepotLockAll(); ChainedOriginDepotLockAll(); } @@ -1235,6 +1209,7 @@ static void BeforeFork() { static void AfterFork() { ChainedOriginDepotUnlockAll(); StackDepotUnlockAll(); + get_allocator().ForceUnlock(); } INTERCEPTOR(int, fork, void) { @@ -1371,6 +1346,13 @@ int OnExit() { return __msan_memcpy(to, from, size); \ } +#define COMMON_INTERCEPTOR_COPY_STRING(ctx, to, from, size) \ + do { \ + GET_STORE_STACK_TRACE; \ + CopyShadowAndOrigin(to, from, size, &stack); \ + __msan_unpoison(to + size, 1); \ + } while (false) + #include "sanitizer_common/sanitizer_platform_interceptors.h" #include "sanitizer_common/sanitizer_common_interceptors.inc" @@ -1538,8 +1520,6 @@ void InitializeInterceptors() { INTERCEPT_FUNCTION(stpcpy); // NOLINT INTERCEPT_FUNCTION(strdup); MSAN_MAYBE_INTERCEPT___STRDUP; - INTERCEPT_FUNCTION(strndup); - MSAN_MAYBE_INTERCEPT___STRNDUP; INTERCEPT_FUNCTION(strncpy); // NOLINT INTERCEPT_FUNCTION(gcvt); INTERCEPT_FUNCTION(strcat); // NOLINT Modified: vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -1581,19 +1581,28 @@ TEST(MemorySanitizer, strdup) { TEST(MemorySanitizer, strndup) { char buf[4] = "abc"; __msan_poison(buf + 2, sizeof(*buf)); - char *x = strndup(buf, 3); + char *x; + EXPECT_UMR(x = strndup(buf, 3)); EXPECT_NOT_POISONED(x[0]); EXPECT_NOT_POISONED(x[1]); EXPECT_POISONED(x[2]); EXPECT_NOT_POISONED(x[3]); free(x); + // Check handling of non 0 terminated strings. + buf[3] = 'z'; + __msan_poison(buf + 3, sizeof(*buf)); + EXPECT_UMR(x = strndup(buf + 3, 1)); + EXPECT_POISONED(x[0]); + EXPECT_NOT_POISONED(x[1]); + free(x); } TEST(MemorySanitizer, strndup_short) { char buf[4] = "abc"; __msan_poison(buf + 1, sizeof(*buf)); __msan_poison(buf + 2, sizeof(*buf)); - char *x = strndup(buf, 2); + char *x; + EXPECT_UMR(x = strndup(buf, 2)); EXPECT_NOT_POISONED(x[0]); EXPECT_POISONED(x[1]); EXPECT_NOT_POISONED(x[2]); Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc Thu Jun 1 20:58:59 2017 (r319465) @@ -34,6 +34,8 @@ // COMMON_INTERCEPTOR_MEMSET_IMPL // COMMON_INTERCEPTOR_MEMMOVE_IMPL // COMMON_INTERCEPTOR_MEMCPY_IMPL +// COMMON_INTERCEPTOR_COPY_STRING +// COMMON_INTERCEPTOR_STRNDUP_IMPL //===----------------------------------------------------------------------===// #include "interception/interception.h" @@ -217,6 +219,24 @@ bool PlatformHasDifferentMemcpyAndMemmove(); } #endif +#ifndef COMMON_INTERCEPTOR_COPY_STRING +#define COMMON_INTERCEPTOR_COPY_STRING(ctx, to, from, size) {} +#endif + +#ifndef COMMON_INTERCEPTOR_STRNDUP_IMPL +#define COMMON_INTERCEPTOR_STRNDUP_IMPL(ctx, s, size) \ + COMMON_INTERCEPTOR_ENTER(ctx, strndup, s, size); \ + uptr copy_length = internal_strnlen(s, size); \ + char *new_mem = (char *)WRAP(malloc)(copy_length + 1); \ + if (common_flags()->intercept_strndup) { \ + COMMON_INTERCEPTOR_READ_STRING(ctx, s, Min(size, copy_length + 1)); \ + } \ + COMMON_INTERCEPTOR_COPY_STRING(ctx, new_mem, s, copy_length); \ + internal_memcpy(new_mem, s, copy_length); \ + new_mem[copy_length] = '\0'; \ + return new_mem; +#endif + struct FileMetadata { // For open_memstream(). char **addr; @@ -300,6 +320,26 @@ INTERCEPTOR(SIZE_T, strnlen, const char *s, SIZE_T max #define INIT_STRNLEN #endif +#if SANITIZER_INTERCEPT_STRNDUP +INTERCEPTOR(char*, strndup, const char *s, uptr size) { + void *ctx; + COMMON_INTERCEPTOR_STRNDUP_IMPL(ctx, s, size); +} +#define INIT_STRNDUP COMMON_INTERCEPT_FUNCTION(strndup) +#else +#define INIT_STRNDUP +#endif // SANITIZER_INTERCEPT_STRNDUP + +#if SANITIZER_INTERCEPT___STRNDUP +INTERCEPTOR(char*, __strndup, const char *s, uptr size) { + void *ctx; + COMMON_INTERCEPTOR_STRNDUP_IMPL(ctx, s, size); +} +#define INIT___STRNDUP COMMON_INTERCEPT_FUNCTION(__strndup) +#else +#define INIT___STRNDUP +#endif // SANITIZER_INTERCEPT___STRNDUP + #if SANITIZER_INTERCEPT_TEXTDOMAIN INTERCEPTOR(char*, textdomain, const char *domainname) { void *ctx; @@ -6163,6 +6203,8 @@ static void InitializeCommonInterceptors() { INIT_TEXTDOMAIN; INIT_STRLEN; INIT_STRNLEN; + INIT_STRNDUP; + INIT___STRNDUP; INIT_STRCMP; INIT_STRNCMP; INIT_STRCASECMP; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_interface.inc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_interface.inc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_interface.inc Thu Jun 1 20:58:59 2017 (r319465) @@ -8,14 +8,9 @@ //===----------------------------------------------------------------------===// // Sanitizer Coverage interface list. //===----------------------------------------------------------------------===// -INTERFACE_FUNCTION(__sanitizer_cov) INTERFACE_FUNCTION(__sanitizer_cov_dump) -INTERFACE_FUNCTION(__sanitizer_cov_init) -INTERFACE_FUNCTION(__sanitizer_cov_module_init) -INTERFACE_FUNCTION(__sanitizer_cov_with_check) INTERFACE_FUNCTION(__sanitizer_dump_coverage) INTERFACE_FUNCTION(__sanitizer_dump_trace_pc_guard_coverage) -INTERFACE_FUNCTION(__sanitizer_get_total_unique_coverage) INTERFACE_FUNCTION(__sanitizer_maybe_open_cov_file) INTERFACE_WEAK_FUNCTION(__sancov_default_options) INTERFACE_WEAK_FUNCTION(__sanitizer_cov_trace_cmp) Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -155,13 +155,6 @@ void CoverageData::DirectOpen() { void CoverageData::Init() { pc_fd = kInvalidFd; - - if (!common_flags()->coverage) return; - Printf("**\n***\n***\n"); - Printf("**WARNING: this implementation of SanitizerCoverage is deprecated\n"); - Printf("**WARNING: and will be removed in future versions\n"); - Printf("**WARNING: See https://clang.llvm.org/docs/SanitizerCoverage.html\n"); - Printf("**\n***\n***\n"); } void CoverageData::Enable() { @@ -495,6 +488,12 @@ static void GenerateHtmlReport(const InternalMmapVecto void CoverageData::DumpOffsets() { auto sym = Symbolizer::GetOrInit(); if (!common_flags()->coverage_pcs) return; + Printf("**\n***\n***\n"); + Printf("**WARNING: this implementation of SanitizerCoverage is deprecated\n"); + Printf("**WARNING: and will be removed in future versions\n"); + Printf("**WARNING: See https://clang.llvm.org/docs/SanitizerCoverage.html\n"); + Printf("**\n***\n***\n"); + CHECK_NE(sym, nullptr); InternalMmapVector offsets(0); InternalScopedString path(kMaxPathLength); @@ -607,47 +606,13 @@ void CoverageUpdateMapping() { } // namespace __sanitizer extern "C" { -SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_cov(u32 *guard) { - coverage_data.Add(StackTrace::GetPreviousInstructionPc(GET_CALLER_PC()), - guard); -} -SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_cov_with_check(u32 *guard) { - atomic_uint32_t *atomic_guard = reinterpret_cast(guard); - if (static_cast( - __sanitizer::atomic_load(atomic_guard, memory_order_relaxed)) < 0) - coverage_data.Add(StackTrace::GetPreviousInstructionPc(GET_CALLER_PC()), - guard); -} -SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_cov_init() { - coverage_enabled = true; - coverage_dir = common_flags()->coverage_dir; - coverage_data.Init(); -} SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_cov_dump() { - coverage_data.DumpAll(); __sanitizer_dump_trace_pc_guard_coverage(); } -SANITIZER_INTERFACE_ATTRIBUTE void -__sanitizer_cov_module_init(s32 *guards, uptr npcs, u8 *counters, - const char *comp_unit_name) { - coverage_data.InitializeGuards(guards, npcs, comp_unit_name, GET_CALLER_PC()); - if (!common_flags()->coverage_direct) return; - if (SANITIZER_ANDROID && coverage_enabled) { - // dlopen/dlclose interceptors do not work on Android, so we rely on - // Extend() calls to update .sancov.map. - CovUpdateMapping(coverage_dir, GET_CALLER_PC()); - } - coverage_data.Extend(npcs); -} SANITIZER_INTERFACE_ATTRIBUTE sptr __sanitizer_maybe_open_cov_file(const char *name) { return (sptr)MaybeOpenCovFile(name); } -SANITIZER_INTERFACE_ATTRIBUTE -uptr __sanitizer_get_total_unique_coverage() { - return atomic_load(&coverage_counter, memory_order_relaxed); -} - // Default empty implementations (weak). Users should redefine them. SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp, void) {} SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp1, void) {} Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -49,7 +49,7 @@ static void WriteModuleCoverage(char* file_path, const WriteToFile(fd, &Magic, sizeof(Magic)); WriteToFile(fd, pcs, len * sizeof(*pcs)); CloseFile(fd); - Printf("SanitizerCoverage: %s %zd PCs written\n", file_path, len); + Printf("SanitizerCoverage: %s: %zd PCs written\n", file_path, len); } static void SanitizerDumpCoverage(const uptr* unsorted_pcs, uptr len) { @@ -71,7 +71,7 @@ static void SanitizerDumpCoverage(const uptr* unsorted if (!pc) continue; if (!__sanitizer_get_module_and_offset_for_pc(pc, nullptr, 0, &pcs[i])) { - Printf("ERROR: bad pc %x\n", pc); + Printf("ERROR: unknown pc 0x%x (may happen if dlclose is used)\n", pc); continue; } uptr module_base = pc - pcs[i]; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc Thu Jun 1 20:58:59 2017 (r319465) @@ -197,6 +197,9 @@ COMMON_FLAG(bool, intercept_strpbrk, true, COMMON_FLAG(bool, intercept_strlen, true, "If set, uses custom wrappers for strlen and strnlen functions " "to find more errors.") +COMMON_FLAG(bool, intercept_strndup, true, + "If set, uses custom wrappers for strndup functions " + "to find more errors.") COMMON_FLAG(bool, intercept_strchr, true, "If set, uses custom wrappers for strchr, strchrnul, and strrchr " "functions to find more errors.") Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h Thu Jun 1 20:58:59 2017 (r319465) @@ -25,6 +25,12 @@ # define SI_NOT_WINDOWS 0 #endif +#if SANITIZER_POSIX +# define SI_POSIX 1 +#else +# define SI_POSIX 0 +#endif + #if SANITIZER_LINUX && !SANITIZER_ANDROID # define SI_LINUX_NOT_ANDROID 1 #else @@ -69,6 +75,12 @@ # define SI_UNIX_NOT_MAC 0 #endif +#if SANITIZER_LINUX && !SANITIZER_FREEBSD +# define SI_LINUX_NOT_FREEBSD 1 +# else +# define SI_LINUX_NOT_FREEBSD 0 +#endif + #define SANITIZER_INTERCEPT_STRLEN 1 #define SANITIZER_INTERCEPT_STRNLEN SI_NOT_MAC #define SANITIZER_INTERCEPT_STRCMP 1 @@ -86,6 +98,8 @@ #define SANITIZER_INTERCEPT_MEMMOVE 1 #define SANITIZER_INTERCEPT_MEMCPY 1 #define SANITIZER_INTERCEPT_MEMCMP 1 +#define SANITIZER_INTERCEPT_STRNDUP SI_POSIX +#define SANITIZER_INTERCEPT___STRNDUP SI_LINUX_NOT_FREEBSD #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070 # define SI_MAC_DEPLOYMENT_BELOW_10_7 1 Modified: vendor/compiler-rt/dist/lib/sanitizer_common/scripts/sancov.py ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/scripts/sancov.py Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/sanitizer_common/scripts/sancov.py Thu Jun 1 20:58:59 2017 (r319465) @@ -194,7 +194,7 @@ def GetInstrumentedPCs(binary): # - with call or callq, # - directly or via PLT. cmd = "objdump -d %s | " \ - "grep '^\s\+[0-9a-f]\+:.*\scall\(q\|\)\s\+[0-9a-f]\+ <__sanitizer_cov\(_with_check\|\)\(@plt\|\)>' | " \ + "grep '^\s\+[0-9a-f]\+:.*\scall\(q\|\)\s\+[0-9a-f]\+ <__sanitizer_cov\(_with_check\|\|_trace_pc_guard\)\(@plt\|\)>' | " \ "grep '^\s\+[0-9a-f]\+' -o" % binary proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True) Modified: vendor/compiler-rt/dist/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt Thu Jun 1 20:58:59 2017 (r319465) @@ -59,6 +59,7 @@ getpagesize U getpid U gettimeofday U ioctl U +isalpha U isatty U isprint U isupper U Modified: vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h Thu Jun 1 20:58:59 2017 (r319465) @@ -124,4 +124,10 @@ static inline uint32_t my_rand() { # define SANITIZER_TEST_HAS_PRINTF_L 0 #endif +#if !defined(_MSC_VER) +# define SANITIZER_TEST_HAS_STRNDUP 1 +#else +# define SANITIZER_TEST_HAS_STRNDUP 0 +#endif + #endif // SANITIZER_TEST_UTILS_H Modified: vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash_itanium.cc ============================================================================== --- vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash_itanium.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash_itanium.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -197,7 +197,7 @@ struct VtablePrefix { }; VtablePrefix *getVtablePrefix(void *Vtable) { VtablePrefix *Vptr = reinterpret_cast(Vtable); - if (!Vptr) + if (!IsAccessibleMemoryRange((uptr)Vptr, sizeof(VtablePrefix))) return nullptr; VtablePrefix *Prefix = Vptr - 1; if (!Prefix->TypeInfo) Modified: vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-missing.cc ============================================================================== --- vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-missing.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-missing.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -1,7 +1,7 @@ // Test for "sancov.py missing ...". // First case: coverage from executable. main() is called on every code path. -// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t -DFOOBAR -DMAIN +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t -DFOOBAR -DMAIN // RUN: rm -rf %T/coverage-missing // RUN: mkdir -p %T/coverage-missing // RUN: cd %T/coverage-missing @@ -27,8 +27,8 @@ // Second case: coverage from DSO. // cd %T -// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %dynamiclib -DFOOBAR -shared -fPIC -// RUN: %clangxx_asan -fsanitize-coverage=func %s %dynamiclib -o %t -DMAIN +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %dynamiclib -DFOOBAR -shared -fPIC +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %dynamiclib -o %t -DMAIN // RUN: cd .. // RUN: rm -rf %T/coverage-missing // RUN: mkdir -p %T/coverage-missing Modified: vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-fork.cc ============================================================================== --- vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-fork.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-fork.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -1,9 +1,13 @@ -// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t // RUN: rm -rf %T/coverage-fork // RUN: mkdir -p %T/coverage-fork && cd %T/coverage-fork -// RUN: %env_asan_opts=coverage=1:coverage_direct=0:verbosity=1 %run %t 2>&1 | FileCheck %s +// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s // // UNSUPPORTED: android +// +// Ideally a forked-subprocess should only report it's own coverage, +// not parent's one. But trace-pc-guard currently does nothing special for fork, +// and thus this test is relaxed. #include #include @@ -32,6 +36,6 @@ int main(int argc, char **argv) { } // CHECK-DAG: Child PID: [[ChildPID:[0-9]+]] -// CHECK-DAG: [[ChildPID]].sancov: 1 PCs written +// CHECK-DAG: [[ChildPID]].sancov: {{.*}} PCs written // CHECK-DAG: Parent PID: [[ParentPID:[0-9]+]] // CHECK-DAG: [[ParentPID]].sancov: 3 PCs written Modified: vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-module-unloaded.cc ============================================================================== --- vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-module-unloaded.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-module-unloaded.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -1,12 +1,11 @@ // Check that unloading a module doesn't break coverage dumping for remaining // modules. -// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED %s -shared -o %dynamiclib1 -fPIC -// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED %s -shared -o %dynamiclib2 -fPIC -// RUN: %clangxx_asan -fsanitize-coverage=func %s %libdl -o %t -// RUN: mkdir -p %T/coverage-module-unloaded && cd %T/coverage-module-unloaded -// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t %dynamiclib1 %dynamiclib2 2>&1 | FileCheck %s -// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t %dynamiclib1 %dynamiclib2 foo 2>&1 | FileCheck %s -// RUN: rm -r %T/coverage-module-unloaded +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib1 -fPIC +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib2 -fPIC +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %libdl -o %t.exe +// RUN: mkdir -p %t.tmp/coverage-module-unloaded && cd %t.tmp/coverage-module-unloaded +// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t.exe %dynamiclib1 %dynamiclib2 2>&1 | FileCheck %s +// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t.exe %dynamiclib1 %dynamiclib2 foo 2>&1 | FileCheck %s // // https://code.google.com/p/address-sanitizer/issues/detail?id=263 // XFAIL: android @@ -48,8 +47,5 @@ int main(int argc, char **argv) { #endif // CHECK: PID: [[PID:[0-9]+]] -// CHECK: [[PID]].sancov: 1 PCs written -// CHECK: coverage-module-unloaded{{.*}}1.[[PID]] -// CHECK: coverage-module-unloaded{{.*}}2.[[PID]] -// Even though we've unloaded one of the libs we still dump the coverage file -// for that lib (although the data will be inaccurate, if at all useful) +// CHECK-DAG: exe{{.*}}[[PID]].sancov: {{.*}}PCs written +// CHECK-DAG: dynamic{{.*}}[[PID]].sancov: {{.*}}PCs written Modified: vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage.cc ============================================================================== --- vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so -// RUN: %clangxx_asan -fsanitize-coverage=func %s %ld_flags_rpath_exe -o %t +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t // RUN: rm -rf %T/coverage && mkdir -p %T/coverage && cd %T/coverage // RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-main // RUN: %sancov print coverage.*sancov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV1 @@ -20,7 +20,6 @@ // XFAIL: android // UNSUPPORTED: ios -#include #include #include #include @@ -38,12 +37,8 @@ int G[4]; int main(int argc, char **argv) { fprintf(stderr, "PID: %d\n", getpid()); for (int i = 1; i < argc; i++) { - if (!strcmp(argv[i], "foo")) { - uintptr_t old_coverage = __sanitizer_get_total_unique_coverage(); + if (!strcmp(argv[i], "foo")) foo(); - uintptr_t new_coverage = __sanitizer_get_total_unique_coverage(); - assert(new_coverage > old_coverage); - } if (!strcmp(argv[i], "bar")) bar(); } @@ -64,12 +59,12 @@ int main(int argc, char **argv) { // CHECK-foo-NOT: .so.[[PID]] // // CHECK-bar: PID: [[PID:[0-9]+]] -// CHECK-bar: .so.[[PID]].sancov: 1 PCs written -// CHECK-bar: [[PID]].sancov: 1 PCs written +// CHECK-bar-DAG: .so.[[PID]].sancov: 1 PCs written +// CHECK-bar-DAG: [[PID]].sancov: 1 PCs written // // CHECK-foo-bar: PID: [[PID:[0-9]+]] -// CHECK-foo-bar: so.[[PID]].sancov: 1 PCs written -// CHECK-foo-bar: [[PID]].sancov: 2 PCs written +// CHECK-foo-bar-DAG: so.[[PID]].sancov: 1 PCs written +// CHECK-foo-bar-DAG: [[PID]].sancov: 2 PCs written // // CHECK-report: AddressSanitizer: global-buffer-overflow // CHECK-report: PCs written Added: vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -0,0 +1,27 @@ +// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s + +// When built as C on Linux, strndup is transformed to __strndup. +// RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s + +// Unwind problem on arm: "main" is missing from the allocation stack trace. +// UNSUPPORTED: win32,s390,armv7l-unknown-linux-gnueabihf + +#include + +char kString[] = "foo"; + +int main(int argc, char **argv) { + char *copy = strndup(kString, 2); + int x = copy[2 + argc]; // BOOM + // CHECK: AddressSanitizer: heap-buffer-overflow + // CHECK: #0 {{.*}}main {{.*}}strndup_oob_test.cc:[[@LINE-2]] + // CHECK-LABEL: allocated by thread T{{.*}} here: + // CHECK: #{{[01]}} {{.*}}strndup + // CHECK: #{{.*}}main {{.*}}strndup_oob_test.cc:[[@LINE-6]] + // CHECK-LABEL: SUMMARY + // CHECK: strndup_oob_test.cc:[[@LINE-7]] + return x; +} Added: vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test2.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/test/asan/TestCases/Posix/strndup_oob_test2.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -0,0 +1,22 @@ +// RUN: %clang_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clang_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clang_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clang_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s + +// When built as C on Linux, strndup is transformed to __strndup. +// RUN: %clang_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s + +// Unwind problem on arm: "main" is missing from the allocation stack trace. +// UNSUPPORTED: win32,s390,armv7l-unknown-linux-gnueabihf + +#include + +char kChars[] = { 'f', 'o', 'o' }; + +int main(int argc, char **argv) { + char *copy = strndup(kChars, 3); + copy = strndup(kChars, 10); + // CHECK: AddressSanitizer: global-buffer-overflow + // CHECK: {{.*}}main {{.*}}.cc:[[@LINE-2]] + return *copy; +} \ No newline at end of file Modified: vendor/compiler-rt/dist/test/asan/TestCases/coverage-and-lsan.cc ============================================================================== --- vendor/compiler-rt/dist/test/asan/TestCases/coverage-and-lsan.cc Thu Jun 1 20:58:56 2017 (r319464) +++ vendor/compiler-rt/dist/test/asan/TestCases/coverage-and-lsan.cc Thu Jun 1 20:58:59 2017 (r319465) @@ -1,6 +1,6 @@ // Make sure coverage is dumped even if there are reported leaks. // -// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t +// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t // // RUN: rm -rf %T/coverage-and-lsan // @@ -17,4 +17,4 @@ int main(int argc, char **argv) { } // CHECK: LeakSanitizer: detected memory leaks -// CHECK: CovDump: +// CHECK: SanitizerCoverage: {{.*}}PCs written Added: vendor/compiler-rt/dist/test/msan/strndup.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 20:59:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC1CFB7EB34; Thu, 1 Jun 2017 20:59:07 +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 612BB67DBC; Thu, 1 Jun 2017 20:59:07 +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 v51Kx6eE035274; Thu, 1 Jun 2017 20:59:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51Kx6Kc035273; Thu, 1 Jun 2017 20:59:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012059.v51Kx6Kc035273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319466 - vendor/compiler-rt/compiler-rt-trunk-r304460 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:59:07 -0000 Author: dim Date: Thu Jun 1 20:59:06 2017 New Revision: 319466 URL: https://svnweb.freebsd.org/changeset/base/319466 Log: Tag compiler-rt trunk r304460. Added: vendor/compiler-rt/compiler-rt-trunk-r304460/ - copied from r319465, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Thu Jun 1 20:59:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DA7CB7EBA7; Thu, 1 Jun 2017 20:59:15 +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 08C5967EA4; Thu, 1 Jun 2017 20:59:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51KxEi7035355; Thu, 1 Jun 2017 20:59:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KxAjX035322; Thu, 1 Jun 2017 20:59:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012059.v51KxAjX035322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319467 - in vendor/libc++/dist: . include include/experimental include/support/win32 src src/support/win32 test/libcxx test/libcxx/utilities/tuple/tuple.tuple test/std/experimental/lan... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:59:15 -0000 Author: dim Date: Thu Jun 1 20:59:10 2017 New Revision: 319467 URL: https://svnweb.freebsd.org/changeset/base/319467 Log: Vendor import of libc++ trunk r304460: https://llvm.org/svn/llvm-project/libcxx/trunk@304460 Added: vendor/libc++/dist/include/__undef_macros vendor/libc++/dist/test/libcxx/min_max_macros.sh.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/expected.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/go.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/includes.pass.cpp (contents, props changed) Deleted: vendor/libc++/dist/include/__undef_min_max vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/void_handle.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.traits/promise_type.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/expected.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/generator.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/go.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/multishot_func.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.sh.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/includes.sh.cpp Modified: vendor/libc++/dist/appveyor-reqs-install.cmd vendor/libc++/dist/include/__bit_reference vendor/libc++/dist/include/__config vendor/libc++/dist/include/__hash_table vendor/libc++/dist/include/__locale vendor/libc++/dist/include/__mutex_base vendor/libc++/dist/include/__split_buffer vendor/libc++/dist/include/__std_stream vendor/libc++/dist/include/__string vendor/libc++/dist/include/__threading_support vendor/libc++/dist/include/__tree vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/array vendor/libc++/dist/include/bitset vendor/libc++/dist/include/chrono vendor/libc++/dist/include/deque vendor/libc++/dist/include/experimental/algorithm vendor/libc++/dist/include/experimental/dynarray vendor/libc++/dist/include/experimental/functional vendor/libc++/dist/include/experimental/memory_resource vendor/libc++/dist/include/experimental/numeric vendor/libc++/dist/include/experimental/optional vendor/libc++/dist/include/experimental/string_view vendor/libc++/dist/include/forward_list vendor/libc++/dist/include/fstream vendor/libc++/dist/include/istream vendor/libc++/dist/include/limits vendor/libc++/dist/include/list vendor/libc++/dist/include/locale vendor/libc++/dist/include/memory vendor/libc++/dist/include/module.modulemap vendor/libc++/dist/include/mutex vendor/libc++/dist/include/numeric vendor/libc++/dist/include/optional vendor/libc++/dist/include/random vendor/libc++/dist/include/ratio vendor/libc++/dist/include/regex vendor/libc++/dist/include/shared_mutex vendor/libc++/dist/include/sstream vendor/libc++/dist/include/stdexcept vendor/libc++/dist/include/stdio.h vendor/libc++/dist/include/streambuf vendor/libc++/dist/include/string vendor/libc++/dist/include/string_view vendor/libc++/dist/include/support/win32/locale_win32.h vendor/libc++/dist/include/thread vendor/libc++/dist/include/tuple vendor/libc++/dist/include/valarray vendor/libc++/dist/include/vector vendor/libc++/dist/include/wchar.h vendor/libc++/dist/src/chrono.cpp vendor/libc++/dist/src/condition_variable.cpp vendor/libc++/dist/src/ios.cpp vendor/libc++/dist/src/locale.cpp vendor/libc++/dist/src/mutex.cpp vendor/libc++/dist/src/new.cpp vendor/libc++/dist/src/strstream.cpp vendor/libc++/dist/src/support/win32/locale_win32.cpp vendor/libc++/dist/src/support/win32/support.cpp vendor/libc++/dist/src/system_error.cpp vendor/libc++/dist/src/thread.cpp vendor/libc++/dist/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp vendor/libc++/dist/test/support/nasty_macros.hpp vendor/libc++/dist/test/support/test_macros.h vendor/libc++/dist/utils/libcxx/test/config.py Modified: vendor/libc++/dist/appveyor-reqs-install.cmd ============================================================================== --- vendor/libc++/dist/appveyor-reqs-install.cmd Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/appveyor-reqs-install.cmd Thu Jun 1 20:59:10 2017 (r319467) @@ -9,7 +9,7 @@ cd C:\projects\deps :: Setup Compiler ::########################################################################### if NOT EXIST llvm-installer.exe ( - appveyor DownloadFile http://llvm.org/pre-releases/win-snapshots/LLVM-5.0.0-r301646-win32.exe -FileName llvm-installer.exe + appveyor DownloadFile http://llvm.org/pre-releases/win-snapshots/LLVM-5.0.0-r303050-win32.exe -FileName llvm-installer.exe ) if "%CLANG_VERSION%"=="ToT" ( START /WAIT llvm-installer.exe /S /D=C:\"Program Files\LLVM" Modified: vendor/libc++/dist/include/__bit_reference ============================================================================== --- vendor/libc++/dist/include/__bit_reference Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__bit_reference Thu Jun 1 20:59:10 2017 (r319467) @@ -14,12 +14,14 @@ #include <__config> #include -#include <__undef_min_max> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template class __bit_iterator; @@ -1272,5 +1274,7 @@ class __bit_iterator (private) }; _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP___BIT_REFERENCE Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__config Thu Jun 1 20:59:10 2017 (r319467) @@ -220,10 +220,12 @@ #endif // __NetBSD__ #if defined(_WIN32) -# define _LIBCPP_WIN32API 1 +# define _LIBCPP_WIN32API # define _LIBCPP_LITTLE_ENDIAN 1 # define _LIBCPP_BIG_ENDIAN 0 # define _LIBCPP_SHORT_WCHAR 1 +// Both MinGW and native MSVC provide a "MSVC"-like enviroment +# define _LIBCPP_MSVCRT_LIKE // If mingw not explicitly detected, assume using MS C runtime only. # ifndef __MINGW32__ # define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library @@ -1204,5 +1206,35 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_ __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ <= 70000)) #define _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE #endif + +#if defined(_LIBCPP_COMPILER_IBM) +#define _LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO +#endif + +#if defined(_LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO) +# define _LIBCPP_PUSH_MACROS +# define _LIBCPP_POP_MACROS +#else + // Don't warn about macro conflicts when we can restore them at the + // end of the header. +# ifndef _LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS +# define _LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS +# endif +# if defined(_LIBCPP_COMPILER_MSVC) +# define _LIBCPP_PUSH_MACROS \ + __pragma(push_macro("min")) \ + __pragma(push_macro("max")) +# define _LIBCPP_POP_MACROS \ + __pragma(pop_macro("min")) \ + __pragma(pop_macro("max")) +# else +# define _LIBCPP_PUSH_MACROS \ + _Pragma("push_macro(\"min\")") \ + _Pragma("push_macro(\"max\")") +# define _LIBCPP_POP_MACROS \ + _Pragma("pop_macro(\"min\")") \ + _Pragma("pop_macro(\"max\")") +# endif +#endif // defined(_LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO) #endif // _LIBCPP_CONFIG Modified: vendor/libc++/dist/include/__hash_table ============================================================================== --- vendor/libc++/dist/include/__hash_table Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__hash_table Thu Jun 1 20:59:10 2017 (r319467) @@ -20,17 +20,18 @@ #include #include -#include <__undef_min_max> - #include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif -_LIBCPP_BEGIN_NAMESPACE_STD +_LIBCPP_PUSH_MACROS +#include <__undef_macros> +_LIBCPP_BEGIN_NAMESPACE_STD + #ifndef _LIBCPP_CXX03_LANG template union __hash_value_type; @@ -2667,6 +2668,9 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__subscripta } #endif // _LIBCPP_DEBUG_LEVEL >= 2 + _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP__HASH_TABLE Modified: vendor/libc++/dist/include/__locale ============================================================================== --- vendor/libc++/dist/include/__locale Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__locale Thu Jun 1 20:59:10 2017 (r319467) @@ -19,7 +19,7 @@ #include #include #include -#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) +#if defined(_LIBCPP_MSVCRT_LIKE) # include #elif defined(_AIX) # include @@ -367,7 +367,7 @@ class _LIBCPP_TYPE_VIS ctype_base (public) static const mask punct = _ISpunct; static const mask xdigit = _ISxdigit; static const mask blank = _ISblank; -#elif defined(_LIBCPP_MSVCRT) +#elif defined(_LIBCPP_MSVCRT_LIKE) typedef unsigned short mask; static const mask space = _SPACE; static const mask print = _BLANK|_PUNCT|_ALPHA|_DIGIT; Modified: vendor/libc++/dist/include/__mutex_base ============================================================================== --- vendor/libc++/dist/include/__mutex_base Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__mutex_base Thu Jun 1 20:59:10 2017 (r319467) @@ -15,12 +15,16 @@ #include #include #include <__threading_support> -#include <__undef_min_max> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD #ifndef _LIBCPP_HAS_NO_THREADS @@ -427,5 +431,7 @@ condition_variable::wait_for(unique_lock& __lk, #endif // !_LIBCPP_HAS_NO_THREADS _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP___MUTEX_BASE Modified: vendor/libc++/dist/include/__split_buffer ============================================================================== --- vendor/libc++/dist/include/__split_buffer Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__split_buffer Thu Jun 1 20:59:10 2017 (r319467) @@ -6,12 +6,14 @@ #include #include -#include <__undef_min_max> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template @@ -628,7 +630,8 @@ swap(__split_buffer<_Tp, _Allocator>& __x, __split_buf __x.swap(__y); } - _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_SPLIT_BUFFER Modified: vendor/libc++/dist/include/__std_stream ============================================================================== --- vendor/libc++/dist/include/__std_stream Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__std_stream Thu Jun 1 20:59:10 2017 (r319467) @@ -17,12 +17,14 @@ #include <__locale> #include -#include <__undef_min_max> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD static const int __limit = 8; @@ -354,5 +356,7 @@ __stdoutbuf<_CharT>::imbue(const locale& __loc) } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP___STD_STREAM Modified: vendor/libc++/dist/include/__string ============================================================================== --- vendor/libc++/dist/include/__string Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__string Thu Jun 1 20:59:10 2017 (r319467) @@ -57,14 +57,16 @@ template <> struct char_traits; #include // For EOF. #include // for __murmur2_or_cityhash -#include <__undef_min_max> - #include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD // char_traits @@ -869,5 +871,7 @@ struct __quoted_output_proxy }; _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP___STRING Modified: vendor/libc++/dist/include/__threading_support ============================================================================== --- vendor/libc++/dist/include/__threading_support Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__threading_support Thu Jun 1 20:59:10 2017 (r319467) @@ -30,9 +30,12 @@ #include #include #include -#include <__undef_min_max> #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + #if defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \ defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL) #define _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_FUNC_VIS @@ -628,6 +631,8 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p #endif // !_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL || _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // !_LIBCPP_HAS_NO_THREADS Modified: vendor/libc++/dist/include/__tree ============================================================================== --- vendor/libc++/dist/include/__tree Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/__tree Thu Jun 1 20:59:10 2017 (r319467) @@ -17,12 +17,14 @@ #include #include -#include <__undef_min_max> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template class __tree; @@ -2684,5 +2686,7 @@ swap(__tree<_Tp, _Compare, _Allocator>& __x, } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP___TREE Added: vendor/libc++/dist/include/__undef_macros ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/include/__undef_macros Thu Jun 1 20:59:10 2017 (r319467) @@ -0,0 +1,34 @@ +// -*- C++ -*- +//===------------------------ __undef_macros ------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + + +#ifdef min +#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS) +#if defined(_LIBCPP_WARNING) +_LIBCPP_WARNING("macro min is incompatible with C++. Try #define NOMINMAX " + "before any Windows header. #undefing min") +#else +#warning: macro min is incompatible with C++. #undefing min +#endif +#endif +#undef min +#endif + +#ifdef max +#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS) +#if defined(_LIBCPP_WARNING) +_LIBCPP_WARNING("macro max is incompatible with C++. Try #define NOMINMAX " + "before any Windows header. #undefing max") +#else +#warning: macro max is incompatible with C++. #undefing max +#endif +#endif +#undef max +#endif Modified: vendor/libc++/dist/include/algorithm ============================================================================== --- vendor/libc++/dist/include/algorithm Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/algorithm Thu Jun 1 20:59:10 2017 (r319467) @@ -651,14 +651,16 @@ template #include #endif -#include <__undef_min_max> - #include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD // I'd like to replace these with _VSTD::equal_to, but can't because: @@ -2908,11 +2910,11 @@ struct __log2_imp<0, _Rp> static const size_t value = _Rp + 1; }; -template +template struct __log2 { static const size_t value = __log2_imp<_Xp, - sizeof(_UI) * __CHAR_BIT__ - 1>::value; + sizeof(_UIntType) * __CHAR_BIT__ - 1>::value; }; template @@ -5903,5 +5905,7 @@ prev_permutation(_BidirectionalIterator __first, _Bidi } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_ALGORITHM Modified: vendor/libc++/dist/include/array ============================================================================== --- vendor/libc++/dist/include/array Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/array Thu Jun 1 20:59:10 2017 (r319467) @@ -113,6 +113,8 @@ template const T&& get(c #pragma GCC system_header #endif + + _LIBCPP_BEGIN_NAMESPACE_STD template Modified: vendor/libc++/dist/include/bitset ============================================================================== --- vendor/libc++/dist/include/bitset Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/bitset Thu Jun 1 20:59:10 2017 (r319467) @@ -113,10 +113,6 @@ template struct hash>; */ -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - #include <__config> #include <__bit_reference> #include @@ -126,8 +122,14 @@ template struct hash>; #include #include <__functional_base> -#include <__undef_min_max> +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template @@ -1089,5 +1091,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x); _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_BITSET Modified: vendor/libc++/dist/include/chrono ============================================================================== --- vendor/libc++/dist/include/chrono Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/chrono Thu Jun 1 20:59:10 2017 (r319467) @@ -305,12 +305,14 @@ constexpr chrono::duration #include #include -#include <__undef_min_max> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD namespace chrono @@ -1159,5 +1161,7 @@ namespace chrono { // hoist the literals into namespac #endif _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_CHRONO Modified: vendor/libc++/dist/include/deque ============================================================================== --- vendor/libc++/dist/include/deque Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/deque Thu Jun 1 20:59:10 2017 (r319467) @@ -150,10 +150,6 @@ template */ -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - #include <__config> #include <__split_buffer> #include @@ -162,8 +158,14 @@ template #include #include -#include <__undef_min_max> +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template class __deque_base; @@ -2899,5 +2901,7 @@ swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocato } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_DEQUE Modified: vendor/libc++/dist/include/experimental/algorithm ============================================================================== --- vendor/libc++/dist/include/experimental/algorithm Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/experimental/algorithm Thu Jun 1 20:59:10 2017 (r319467) @@ -39,17 +39,18 @@ SampleIterator sample(PopulationIterator first, Popula #include #include -#include <__undef_min_max> - #include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif -_LIBCPP_BEGIN_NAMESPACE_LFTS +_LIBCPP_PUSH_MACROS +#include <__undef_macros> +_LIBCPP_BEGIN_NAMESPACE_LFTS + template _LIBCPP_INLINE_VISIBILITY _ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s) @@ -66,5 +67,7 @@ _SampleIterator sample(_PopulationIterator __first, _P } _LIBCPP_END_NAMESPACE_LFTS + +_LIBCPP_POP_MACROS #endif /* _LIBCPP_EXPERIMENTAL_ALGORITHM */ Modified: vendor/libc++/dist/include/experimental/dynarray ============================================================================== --- vendor/libc++/dist/include/experimental/dynarray Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/experimental/dynarray Thu Jun 1 20:59:10 2017 (r319467) @@ -107,6 +107,9 @@ class dynarray (public) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + namespace std { namespace experimental { inline namespace __array_extensions_v1 { template @@ -294,6 +297,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD template struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> : true_type {}; _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // if _LIBCPP_STD_VER > 11 #endif // _LIBCPP_DYNARRAY Modified: vendor/libc++/dist/include/experimental/functional ============================================================================== --- vendor/libc++/dist/include/experimental/functional Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/experimental/functional Thu Jun 1 20:59:10 2017 (r319467) @@ -89,21 +89,22 @@ inline namespace fundamentals_v1 { #include #include - #include #include #include #include #include -#include <__undef_min_max> - #include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_LFTS #if _LIBCPP_STD_VER > 11 @@ -455,5 +456,7 @@ make_boyer_moore_horspool_searcher( _RandomAccessItera #endif // _LIBCPP_STD_VER > 11 _LIBCPP_END_NAMESPACE_LFTS + +_LIBCPP_POP_MACROS #endif /* _LIBCPP_EXPERIMENTAL_FUNCTIONAL */ Modified: vendor/libc++/dist/include/experimental/memory_resource ============================================================================== --- vendor/libc++/dist/include/experimental/memory_resource Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/experimental/memory_resource Thu Jun 1 20:59:10 2017 (r319467) @@ -82,6 +82,9 @@ namespace pmr { #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR // Round __s up to next multiple of __a. @@ -418,5 +421,7 @@ using resource_adaptor = __resource_adaptor_imp< >; _LIBCPP_END_NAMESPACE_LFTS_PMR + +_LIBCPP_POP_MACROS #endif /* _LIBCPP_EXPERIMENTAL_MEMORY_RESOURCE */ Modified: vendor/libc++/dist/include/experimental/numeric ============================================================================== --- vendor/libc++/dist/include/experimental/numeric Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/experimental/numeric Thu Jun 1 20:59:10 2017 (r319467) @@ -41,6 +41,9 @@ inline namespace fundamentals_v2 { #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER > 11 _LIBCPP_BEGIN_NAMESPACE_LFTS_V2 @@ -110,4 +113,7 @@ lcm(_Tp __m, _Up __n) _LIBCPP_END_NAMESPACE_LFTS_V2 #endif /* _LIBCPP_STD_VER > 11 */ + +_LIBCPP_POP_MACROS + #endif /* _LIBCPP_EXPERIMENTAL_NUMERIC */ Modified: vendor/libc++/dist/include/experimental/optional ============================================================================== --- vendor/libc++/dist/include/experimental/optional Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/experimental/optional Thu Jun 1 20:59:10 2017 (r319467) @@ -143,7 +143,22 @@ namespace std { namespace experimental { inline namesp #include #include #include +#if _LIBCPP_STD_VER > 11 +#include +#include +#include +#include <__functional_base> +#include <__debug> +#endif +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access : public std::logic_error @@ -160,17 +175,6 @@ _LIBCPP_END_NAMESPACE_EXPERIMENTAL #if _LIBCPP_STD_VER > 11 -#include -#include -#include -#include <__functional_base> -#include <__undef_min_max> -#include <__debug> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - _LIBCPP_BEGIN_NAMESPACE_LFTS struct in_place_t {}; @@ -912,5 +916,7 @@ struct _LIBCPP_TEMPLATE_VIS hash 11 + +_LIBCPP_POP_MACROS #endif // _LIBCPP_EXPERIMENTAL_OPTIONAL Modified: vendor/libc++/dist/include/experimental/string_view ============================================================================== --- vendor/libc++/dist/include/experimental/string_view Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/experimental/string_view Thu Jun 1 20:59:10 2017 (r319467) @@ -189,6 +189,9 @@ namespace std { #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_LFTS template > @@ -809,5 +812,7 @@ quoted ( std::experimental::basic_string_view <_CharT, #endif _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_LFTS_STRING_VIEW Modified: vendor/libc++/dist/include/forward_list ============================================================================== --- vendor/libc++/dist/include/forward_list Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/forward_list Thu Jun 1 20:59:10 2017 (r319467) @@ -167,19 +167,20 @@ template */ #include <__config> - #include #include #include #include #include -#include <__undef_min_max> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template struct __forward_list_node; @@ -1718,5 +1719,7 @@ swap(forward_list<_Tp, _Alloc>& __x, forward_list<_Tp, } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_FORWARD_LIST Modified: vendor/libc++/dist/include/fstream ============================================================================== --- vendor/libc++/dist/include/fstream Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/fstream Thu Jun 1 20:59:10 2017 (r319467) @@ -171,12 +171,14 @@ typedef basic_fstream wfstream; #include <__locale> #include -#include <__undef_min_max> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template @@ -1475,5 +1477,7 @@ basic_fstream<_CharT, _Traits>::close() } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_FSTREAM Modified: vendor/libc++/dist/include/istream ============================================================================== --- vendor/libc++/dist/include/istream Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/istream Thu Jun 1 20:59:10 2017 (r319467) @@ -162,12 +162,14 @@ template #include <__config> #include -#include <__undef_min_max> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template @@ -1682,5 +1684,7 @@ _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_ #endif _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_ISTREAM Modified: vendor/libc++/dist/include/limits ============================================================================== --- vendor/libc++/dist/include/limits Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/limits Thu Jun 1 20:59:10 2017 (r319467) @@ -102,15 +102,8 @@ template<> class numeric_limits; */ #include <__config> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - #include -#include <__undef_min_max> - #if defined(_LIBCPP_COMPILER_MSVC) #include "support/win32/limits_msvc_win32.h" #endif // _LIBCPP_MSVCRT @@ -119,6 +112,14 @@ template<> class numeric_limits; #include "support/ibm/limits.h" #endif // __IBMCPP__ +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD enum float_round_style @@ -182,14 +183,14 @@ class __libcpp_numeric_limits (protected) static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero; }; -template +template struct __libcpp_compute_min { - static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << digits); + static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits); }; -template -struct __libcpp_compute_min<_Tp, digits, false> +template +struct __libcpp_compute_min<_Tp, __digits, false> { static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0); }; @@ -810,5 +811,7 @@ template _LIBCPP_CONSTEXPR const float_round_style numeric_limits::round_style; _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_LIMITS Modified: vendor/libc++/dist/include/list ============================================================================== --- vendor/libc++/dist/include/list Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/list Thu Jun 1 20:59:10 2017 (r319467) @@ -177,14 +177,16 @@ template #include #include -#include <__undef_min_max> - #include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template struct __list_node; @@ -2414,5 +2416,7 @@ swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_LIST Modified: vendor/libc++/dist/include/locale ============================================================================== --- vendor/libc++/dist/include/locale Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/locale Thu Jun 1 20:59:10 2017 (r319467) @@ -192,14 +192,7 @@ template class messages_byname; #endif #include #include -#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) -#include -#elif defined(_NEWLIB_VERSION) -// FIXME: replace all the uses of _NEWLIB_VERSION with __NEWLIB__ preceded by an -// include of once https://sourceware.org/ml/newlib-cvs/2014-q3/msg00038.html -// has had a chance to bake for a bit -#include -#endif +#include #ifdef _LIBCPP_HAS_CATOPEN #include #endif @@ -208,18 +201,20 @@ template class messages_byname; #include #endif -#include <__undef_min_max> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - #ifdef _LIBCPP_LOCALE__L_EXTENSIONS #include <__bsd_locale_defaults.h> #else #include <__bsd_locale_fallbacks.h> #endif +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD #if defined(__APPLE__) || defined(__FreeBSD__) @@ -4273,5 +4268,7 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::__close() } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS #endif // _LIBCPP_LOCALE Modified: vendor/libc++/dist/include/memory ============================================================================== --- vendor/libc++/dist/include/memory Thu Jun 1 20:59:06 2017 (r319466) +++ vendor/libc++/dist/include/memory Thu Jun 1 20:59:10 2017 (r319467) @@ -658,12 +658,14 @@ void* align(size_t alignment, size_t size, void*& ptr, # include #endif -#include <__undef_min_max> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD template @@ -1541,7 +1543,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits {return __a.allocate(__n);} _LIBCPP_INLINE_VISIBILITY static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) - {return allocate(__a, __n, __hint, + {return __allocate(__a, __n, __hint, __has_allocate_hint());} _LIBCPP_INLINE_VISIBILITY @@ -1595,7 +1597,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits _LIBCPP_INLINE_VISIBILITY static allocator_type select_on_container_copy_construction(const allocator_type& __a) - {return select_on_container_copy_construction( + {return __select_on_container_copy_construction( __has_select_on_container_copy_construction(), __a);} @@ -1694,11 +1696,11 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits private: _LIBCPP_INLINE_VISIBILITY - static pointer allocate(allocator_type& __a, size_type __n, + static pointer __allocate(allocator_type& __a, size_type __n, const_void_pointer __hint, true_type) {return __a.allocate(__n, __hint);} _LIBCPP_INLINE_VISIBILITY - static pointer allocate(allocator_type& __a, size_type __n, + static pointer __allocate(allocator_type& __a, size_type __n, const_void_pointer, false_type) {return __a.allocate(__n);} @@ -1735,11 +1737,11 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits _LIBCPP_INLINE_VISIBILITY static allocator_type - select_on_container_copy_construction(true_type, const allocator_type& __a) + __select_on_container_copy_construction(true_type, const allocator_type& __a) {return __a.select_on_container_copy_construction();} _LIBCPP_INLINE_VISIBILITY static allocator_type - select_on_container_copy_construction(false_type, const allocator_type& __a) + __select_on_container_copy_construction(false_type, const allocator_type& __a) {return __a;} }; @@ -3101,28 +3103,28 @@ struct _LIBCPP_TEMPLATE_VIS hash<__enable_hash_helper< struct __destruct_n { private: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 20:59:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4BEBB7EBD2; Thu, 1 Jun 2017 20:59:19 +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 6A60168033; Thu, 1 Jun 2017 20:59:19 +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 v51KxIEV035403; Thu, 1 Jun 2017 20:59:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KxISg035402; Thu, 1 Jun 2017 20:59:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012059.v51KxISg035402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319468 - vendor/libc++/libc++-trunk-r304460 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:59:19 -0000 Author: dim Date: Thu Jun 1 20:59:18 2017 New Revision: 319468 URL: https://svnweb.freebsd.org/changeset/base/319468 Log: Tag libc++ trunk r304460. Added: vendor/libc++/libc++-trunk-r304460/ - copied from r319467, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Thu Jun 1 20:59:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EB1EB7EC50; Thu, 1 Jun 2017 20:59:27 +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 024CC68119; Thu, 1 Jun 2017 20:59:26 +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 v51KxQO3035512; Thu, 1 Jun 2017 20:59:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KxQXs035511; Thu, 1 Jun 2017 20:59:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012059.v51KxQXs035511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:59:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319470 - vendor/lld/lld-trunk-r304460 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:59:27 -0000 Author: dim Date: Thu Jun 1 20:59:25 2017 New Revision: 319470 URL: https://svnweb.freebsd.org/changeset/base/319470 Log: Tag lld trunk r304460. Added: vendor/lld/lld-trunk-r304460/ - copied from r319469, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Thu Jun 1 20:59:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE400B7EC96; Thu, 1 Jun 2017 20:59:30 +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 C619E68177; Thu, 1 Jun 2017 20:59:30 +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 v51KxTv1035566; Thu, 1 Jun 2017 20:59:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KxTQo035560; Thu, 1 Jun 2017 20:59:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012059.v51KxTQo035560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319471 - in vendor/lldb/dist: cmake/modules packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts tools/lldb-mi www X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:59:31 -0000 Author: dim Date: Thu Jun 1 20:59:29 2017 New Revision: 319471 URL: https://svnweb.freebsd.org/changeset/base/319471 Log: Vendor import of lldb trunk r304460: https://llvm.org/svn/llvm-project/lldb/trunk@304460 Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp (contents, props changed) Modified: vendor/lldb/dist/cmake/modules/LLDBConfig.cmake vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp vendor/lldb/dist/www/projects.html Modified: vendor/lldb/dist/cmake/modules/LLDBConfig.cmake ============================================================================== --- vendor/lldb/dist/cmake/modules/LLDBConfig.cmake Thu Jun 1 20:59:25 2017 (r319470) +++ vendor/lldb/dist/cmake/modules/LLDBConfig.cmake Thu Jun 1 20:59:29 2017 (r319471) @@ -334,28 +334,26 @@ if (HAVE_LIBDL) list(APPEND system_libs ${CMAKE_DL_LIBS}) endif() -if (CMAKE_SYSTEM_NAME MATCHES "Linux") - # Check for syscall used by lldb-server on linux. - # If these are not found, it will fall back to ptrace (slow) for memory reads. - check_cxx_source_compiles(" - #include - int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }" - HAVE_PROCESS_VM_READV) +# Check for syscall used by lldb-server on linux. +# If these are not found, it will fall back to ptrace (slow) for memory reads. +check_cxx_source_compiles(" + #include + int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }" + HAVE_PROCESS_VM_READV) - if (HAVE_PROCESS_VM_READV) - add_definitions(-DHAVE_PROCESS_VM_READV) - else() - # If we don't have the syscall wrapper function, but we know the syscall number, we can - # still issue the syscall manually - check_cxx_source_compiles(" - #include - int main() { return __NR_process_vm_readv; }" - HAVE_NR_PROCESS_VM_READV) +if (HAVE_PROCESS_VM_READV) + add_definitions(-DHAVE_PROCESS_VM_READV) +else() + # If we don't have the syscall wrapper function, but we know the syscall number, we can + # still issue the syscall manually + check_cxx_source_compiles(" + #include + int main() { return __NR_process_vm_readv; }" + HAVE_NR_PROCESS_VM_READV) - if (HAVE_NR_PROCESS_VM_READV) - add_definitions(-DHAVE_NR_PROCESS_VM_READV) - endif() - endif() + if (HAVE_NR_PROCESS_VM_READV) + add_definitions(-DHAVE_NR_PROCESS_VM_READV) + endif() endif() # Figure out if lldb could use lldb-server. If so, then we'll Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile Thu Jun 1 20:59:29 2017 (r319471) @@ -0,0 +1,3 @@ +LEVEL = ../../../make +CXX_SOURCES := main.cpp +include $(LEVEL)/Makefile.rules Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py Thu Jun 1 20:59:29 2017 (r319471) @@ -0,0 +1,7 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest( + __file__, globals(), [ + decorators.expectedFailureAll( + oslist=["windows"], bugnumber="llvm.org/pr24764")]) Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp Thu Jun 1 20:59:29 2017 (r319471) @@ -0,0 +1,29 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +namespace n { + struct D { + int i; + static int anInt() { return 2; } + int dump() { return i; } + }; +} + +using namespace n; + +int foo(D* D) { + return D->dump(); //% self.expect("expression -- D->dump()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "2"]) +} + +int main (int argc, char const *argv[]) +{ + D myD { D::anInt() }; + foo(&myD); + return 0; +} Modified: vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp ============================================================================== --- vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp Thu Jun 1 20:59:25 2017 (r319470) +++ vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.cpp Thu Jun 1 20:59:29 2017 (r319471) @@ -510,22 +510,20 @@ bool CMICmdCmdVarUpdate::ExamineSBValueForChange(lldb: } lldb::SBType valueType = vrwValue.GetType(); - if (!valueType.IsPointerType() && !valueType.IsReferenceType()) { - const MIuint nChildren = vrwValue.GetNumChildren(); - for (MIuint i = 0; i < nChildren; ++i) { - lldb::SBValue member = vrwValue.GetChildAtIndex(i); - if (!member.IsValid()) - continue; - if (member.GetValueDidChange()) { - vrwbChanged = true; - return MIstatus::success; - } else if (ExamineSBValueForChange(member, vrwbChanged) && vrwbChanged) - // Handle composite types (i.e. struct or arrays) - return MIstatus::success; - } - } + const MIuint nChildren = vrwValue.GetNumChildren(); + for (MIuint i = 0; i < nChildren; ++i) { + lldb::SBValue member = vrwValue.GetChildAtIndex(i); + if (!member.IsValid()) + continue; + if (member.GetValueDidChange()) { + vrwbChanged = true; + return MIstatus::success; + } else if (ExamineSBValueForChange(member, vrwbChanged) && vrwbChanged) + // Handle composite types (i.e. struct or arrays) + return MIstatus::success; + } vrwbChanged = false; return MIstatus::success; } Modified: vendor/lldb/dist/www/projects.html ============================================================================== --- vendor/lldb/dist/www/projects.html Thu Jun 1 20:59:25 2017 (r319470) +++ vendor/lldb/dist/www/projects.html Thu Jun 1 20:59:29 2017 (r319471) @@ -244,6 +244,25 @@
  • + Reimplement the command interpreter commands using the SB API +

    + Currently, all the CommandObject::DoExecute methods are implemented + using the lldb_private API's. That generally means that there's code + that gets duplicated between the CommandObject and the SB API that does + roughly the same thing. We would reduce this code duplication, present a + single coherent face to the users of lldb, and keep + ourselves more honest about what we need in the SB API's if we implemented + the CommandObjects::DoExecute methods using the SB API's. +

    +

    + BTW, it is only the way it was much easier to develop lldb if it had a functioning + command-line early on. So we did that first, and developed the SB API's when lldb + was more mature. There's no good technical reason to have the commands use the + lldb_private API's. +

    +
  • + +
  • Documentation and better examples

    From owner-svn-src-all@freebsd.org Thu Jun 1 20:59:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61AC1B7EC18; Thu, 1 Jun 2017 20:59:23 +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 E3D8C68098; Thu, 1 Jun 2017 20:59:22 +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 v51KxMOv035464; Thu, 1 Jun 2017 20:59:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KxKEH035450; Thu, 1 Jun 2017 20:59:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012059.v51KxKEH035450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:59:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319469 - in vendor/lld/dist: ELF test/ELF X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:59:23 -0000 Author: dim Date: Thu Jun 1 20:59:20 2017 New Revision: 319469 URL: https://svnweb.freebsd.org/changeset/base/319469 Log: Vendor import of lld trunk r304460: https://llvm.org/svn/llvm-project/lld/trunk@304460 Added: vendor/lld/dist/test/ELF/gc-absolute.s (contents, props changed) vendor/lld/dist/test/ELF/i386-gotpc-dynamic.s (contents, props changed) vendor/lld/dist/test/ELF/mips64-eh-abs-reloc.s (contents, props changed) vendor/lld/dist/test/ELF/section-metadata-err.s (contents, props changed) Modified: vendor/lld/dist/ELF/InputSection.cpp vendor/lld/dist/ELF/InputSection.h vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/LinkerScript.h vendor/lld/dist/ELF/MarkLive.cpp vendor/lld/dist/ELF/OutputSections.cpp vendor/lld/dist/ELF/OutputSections.h vendor/lld/dist/ELF/Relocations.cpp vendor/lld/dist/ELF/ScriptParser.cpp vendor/lld/dist/ELF/Symbols.cpp vendor/lld/dist/ELF/SyntheticSections.cpp vendor/lld/dist/ELF/SyntheticSections.h vendor/lld/dist/ELF/Target.cpp vendor/lld/dist/ELF/Writer.cpp Modified: vendor/lld/dist/ELF/InputSection.cpp ============================================================================== --- vendor/lld/dist/ELF/InputSection.cpp Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/InputSection.cpp Thu Jun 1 20:59:20 2017 (r319469) @@ -139,21 +139,24 @@ uint64_t SectionBase::getOffset(uint64_t Offset) const return Offset; case Merge: const MergeInputSection *MS = cast(this); - if (MS->MergeSec) - return MS->MergeSec->OutSecOff + MS->getOffset(Offset); + if (InputSection *IS = MS->getParent()) + return IS->OutSecOff + MS->getOffset(Offset); return MS->getOffset(Offset); } llvm_unreachable("invalid section kind"); } OutputSection *SectionBase::getOutputSection() { + InputSection *Sec; if (auto *IS = dyn_cast(this)) - return IS->OutSec; - if (auto *MS = dyn_cast(this)) - return MS->MergeSec ? MS->MergeSec->OutSec : nullptr; - if (auto *EH = dyn_cast(this)) - return EH->EHSec->OutSec; - return cast(this); + Sec = IS; + else if (auto *MS = dyn_cast(this)) + Sec = MS->getParent(); + else if (auto *EH = dyn_cast(this)) + Sec = EH->getParent(); + else + return cast(this); + return Sec ? Sec->getParent() : nullptr; } // Uncompress section contents. Note that this function is called @@ -181,9 +184,15 @@ uint64_t SectionBase::getOffset(const DefinedRegular & return getOffset(Sym.Value); } -InputSectionBase *InputSectionBase::getLinkOrderDep() const { - if ((Flags & SHF_LINK_ORDER) && Link != 0) - return File->getSections()[Link]; +InputSection *InputSectionBase::getLinkOrderDep() const { + if ((Flags & SHF_LINK_ORDER) && Link != 0) { + InputSectionBase *L = File->getSections()[Link]; + if (auto *IS = dyn_cast(L)) + return IS; + error( + "Merge and .eh_frame sections are not supported with SHF_LINK_ORDER " + + toString(L)); + } return nullptr; } @@ -295,6 +304,10 @@ bool InputSectionBase::classof(const SectionBase *S) { return S->kind() != Output; } +OutputSection *InputSection::getParent() const { + return cast_or_null(Parent); +} + void InputSection::copyShtGroup(uint8_t *Buf) { assert(this->Type == SHT_GROUP); @@ -309,7 +322,8 @@ void InputSection::copyShtGroup(uint8_t *Buf) { ArrayRef Sections = this->File->getSections(); for (uint32_t Val : From.slice(1)) { uint32_t Index = read32(&Val, Config->Endianness); - write32(To++, Sections[Index]->OutSec->SectionIndex, Config->Endianness); + write32(To++, Sections[Index]->getOutputSection()->SectionIndex, + Config->Endianness); } } @@ -342,7 +356,7 @@ void InputSection::copyRelocations(uint8_t *Buf, Array // Output section VA is zero for -r, so r_offset is an offset within the // section, but for --emit-relocs it is an virtual address. - P->r_offset = RelocatedSection->OutSec->Addr + + P->r_offset = RelocatedSection->getOutputSection()->Addr + RelocatedSection->getOffset(Rel.r_offset); P->setSymbolAndType(InX::SymTab->getSymbolIndex(&Body), Type, Config->IsMips64EL); @@ -596,7 +610,7 @@ void InputSection::relocateNonAlloc(uint8_t *Buf, Arra return; } - uint64_t AddrLoc = this->OutSec->Addr + Offset; + uint64_t AddrLoc = getParent()->Addr + Offset; uint64_t SymVA = 0; if (!Sym.isTls() || Out::TlsPhdr) SymVA = SignExtend64( @@ -729,6 +743,10 @@ EhInputSection::EhInputSection(elf::ObjectFile * this->Live = true; } +SyntheticSection *EhInputSection::getParent() const { + return cast_or_null(Parent); +} + bool EhInputSection::classof(const SectionBase *S) { return S->kind() == InputSectionBase::EHFrame; } @@ -795,6 +813,10 @@ static size_t findNull(ArrayRef A, size_t Ent return I; } return StringRef::npos; +} + +SyntheticSection *MergeInputSection::getParent() const { + return cast_or_null(Parent); } // Split SHF_STRINGS section. Such section is a sequence of Modified: vendor/lld/dist/ELF/InputSection.h ============================================================================== --- vendor/lld/dist/ELF/InputSection.h Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/InputSection.h Thu Jun 1 20:59:20 2017 (r319469) @@ -120,8 +120,13 @@ class InputSectionBase : public SectionBase { (public) uint64_t Entsize, uint32_t Link, uint32_t Info, uint32_t Alignment, ArrayRef Data, StringRef Name, Kind SectionKind); - OutputSection *OutSec = nullptr; + // Input sections are part of an output section. Special sections + // like .eh_frame and merge sections are first combined into a + // synthetic section that is then added to an output section. In all + // cases this points one level up. + SectionBase *Parent = nullptr; + // Relocations that refer to this section. const void *FirstRelocation = nullptr; unsigned NumRelocations : 31; @@ -158,7 +163,7 @@ class InputSectionBase : public SectionBase { (public) return getFile()->getObj(); } - InputSectionBase *getLinkOrderDep() const; + InputSection *getLinkOrderDep() const; void uncompress(); @@ -237,10 +242,7 @@ class MergeInputSection : public InputSectionBase { (p SectionPiece *getSectionPiece(uint64_t Offset); const SectionPiece *getSectionPiece(uint64_t Offset) const; - // MergeInputSections are aggregated to a synthetic input sections, - // and then added to an OutputSection. This pointer points to a - // synthetic MergeSyntheticSection which this section belongs to. - MergeSyntheticSection *MergeSec = nullptr; + SyntheticSection *getParent() const; private: void splitStrings(ArrayRef A, size_t Size); @@ -280,7 +282,8 @@ class EhInputSection : public InputSectionBase { (publ // Splittable sections are handled as a sequence of data // rather than a single large blob of data. std::vector Pieces; - SyntheticSection *EHSec = nullptr; + + SyntheticSection *getParent() const; }; // This is a section that is added directly to an output section @@ -298,6 +301,8 @@ class InputSection : public InputSectionBase { (public // Write this section to a mmap'ed file, assuming Buf is pointing to // beginning of the output section. template void writeTo(uint8_t *Buf); + + OutputSection *getParent() const; // The offset from beginning of the output sections this section was assigned // to. The writer sets a value. Modified: vendor/lld/dist/ELF/LinkerScript.cpp ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.cpp Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/LinkerScript.cpp Thu Jun 1 20:59:20 2017 (r319469) @@ -26,6 +26,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" +#include "llvm/Support/Compression.h" #include "llvm/Support/ELF.h" #include "llvm/Support/Endian.h" #include "llvm/Support/ErrorHandling.h" @@ -51,9 +52,8 @@ LinkerScript *elf::Script; uint64_t ExprValue::getValue() const { if (Sec) { - if (Sec->getOutputSection()) - return alignTo(Sec->getOffset(Val) + Sec->getOutputSection()->Addr, - Alignment); + if (OutputSection *OS = Sec->getOutputSection()) + return alignTo(Sec->getOffset(Val) + OS->Addr, Alignment); error("unable to evaluate expression: input section " + Sec->Name + " has no output section assigned"); } @@ -85,29 +85,28 @@ template static SymbolBody *addRegular(Sy return Sym->body(); } -OutputSection *LinkerScript::getOutputSection(const Twine &Loc, - StringRef Name) { - for (OutputSection *Sec : *OutputSections) - if (Sec->Name == Name) - return Sec; - - static OutputSection Dummy("", 0, 0); - if (ErrorOnMissingSection) - error(Loc + ": undefined section " + Name); - return &Dummy; +OutputSectionCommand * +LinkerScript::createOutputSectionCommand(StringRef Name, StringRef Location) { + OutputSectionCommand *&CmdRef = NameToOutputSectionCommand[Name]; + OutputSectionCommand *Cmd; + if (CmdRef && CmdRef->Location.empty()) { + // There was a forward reference. + Cmd = CmdRef; + } else { + Cmd = make(Name); + if (!CmdRef) + CmdRef = Cmd; + } + Cmd->Location = Location; + return Cmd; } -// This function is essentially the same as getOutputSection(Name)->Size, -// but it won't print out an error message if a given section is not found. -// -// Linker script does not create an output section if its content is empty. -// We want to allow SIZEOF(.foo) where .foo is a section which happened to -// be empty. That is why this function is different from getOutputSection(). -uint64_t LinkerScript::getOutputSectionSize(StringRef Name) { - for (OutputSection *Sec : *OutputSections) - if (Sec->Name == Name) - return Sec->Size; - return 0; +OutputSectionCommand * +LinkerScript::getOrCreateOutputSectionCommand(StringRef Name) { + OutputSectionCommand *&CmdRef = NameToOutputSectionCommand[Name]; + if (!CmdRef) + CmdRef = make(Name); + return CmdRef; } void LinkerScript::setDot(Expr E, const Twine &Loc, bool InSec) { @@ -291,11 +290,13 @@ LinkerScript::computeInputSections(const InputSectionD size_t SizeBefore = Ret.size(); for (InputSectionBase *Sec : InputSections) { - if (!isa(Sec)) + if (Sec->Assigned) continue; - if (Sec->Assigned) + if (!Sec->Live) { + reportDiscarded(Sec); continue; + } // For -emit-relocs we have to ignore entries like // .rela.dyn : { *(.rela.data) } @@ -455,7 +456,7 @@ void LinkerScript::fabricateDefaultCommands() { // For each OutputSection that needs a VA fabricate an OutputSectionCommand // with an InputSectionDescription describing the InputSections for (OutputSection *Sec : *OutputSections) { - auto *OSCmd = make(Sec->Name); + auto *OSCmd = createOutputSectionCommand(Sec->Name, ""); OSCmd->Sec = Sec; SecToCommand[Sec] = OSCmd; @@ -487,7 +488,7 @@ void LinkerScript::fabricateDefaultCommands() { // Add sections that didn't match any sections command. void LinkerScript::addOrphanSections(OutputSectionFactory &Factory) { for (InputSectionBase *S : InputSections) { - if (!S->Live || S->OutSec) + if (!S->Live || S->Parent) continue; StringRef Name = getOutputSectionName(S->Name); auto I = std::find_if( @@ -590,7 +591,7 @@ void LinkerScript::process(BaseCommand &Base) { // It calculates and assigns the offsets for each section and also // updates the output section size. auto &Cmd = cast(Base); - for (InputSectionBase *Sec : Cmd.Sections) { + for (InputSection *Sec : Cmd.Sections) { // We tentatively added all synthetic sections at the beginning and removed // empty ones afterwards (because there is no way to know whether they were // going be empty or not other than actually running linker scripts.) @@ -601,8 +602,8 @@ void LinkerScript::process(BaseCommand &Base) { if (!Sec->Live) continue; - assert(CurOutSec == Sec->OutSec); - output(cast(Sec)); + assert(CurOutSec == Sec->getParent()); + output(Sec); } } @@ -842,7 +843,7 @@ void LinkerScript::placeOrphanSections() { // representations agree on which input sections to use. OutputSectionCommand *Cmd = getCmd(Sec); if (!Cmd) { - Cmd = make(Name); + Cmd = createOutputSectionCommand(Name, ""); Opt.Commands.insert(CmdIter, Cmd); ++CmdIndex; @@ -919,9 +920,10 @@ void LinkerScript::synchronize() { } } -static bool allocateHeaders(std::vector &Phdrs, - ArrayRef OutputSections, - uint64_t Min) { +static bool +allocateHeaders(std::vector &Phdrs, + ArrayRef OutputSectionCommands, + uint64_t Min) { auto FirstPTLoad = std::find_if(Phdrs.begin(), Phdrs.end(), [](const PhdrEntry &E) { return E.p_type == PT_LOAD; }); @@ -938,16 +940,19 @@ static bool allocateHeaders(std::vector &Ph assert(FirstPTLoad->First == Out::ElfHeader); OutputSection *ActualFirst = nullptr; - for (OutputSection *Sec : OutputSections) { + for (OutputSectionCommand *Cmd : OutputSectionCommands) { + OutputSection *Sec = Cmd->Sec; if (Sec->FirstInPtLoad == Out::ElfHeader) { ActualFirst = Sec; break; } } if (ActualFirst) { - for (OutputSection *Sec : OutputSections) + for (OutputSectionCommand *Cmd : OutputSectionCommands) { + OutputSection *Sec = Cmd->Sec; if (Sec->FirstInPtLoad == Out::ElfHeader) Sec->FirstInPtLoad = ActualFirst; + } FirstPTLoad->First = ActualFirst; } else { Phdrs.erase(FirstPTLoad); @@ -961,7 +966,9 @@ static bool allocateHeaders(std::vector &Ph return false; } -void LinkerScript::assignAddresses(std::vector &Phdrs) { +void LinkerScript::assignAddresses( + std::vector &Phdrs, + ArrayRef OutputSectionCommands) { // Assign addresses as instructed by linker script SECTIONS sub-commands. Dot = 0; ErrorOnMissingSection = true; @@ -983,14 +990,15 @@ void LinkerScript::assignAddresses(std::vector::max(); - for (OutputSection *Sec : *OutputSections) { + for (OutputSectionCommand *Cmd : OutputSectionCommands) { + OutputSection *Sec = Cmd->Sec; if (Sec->Flags & SHF_ALLOC) MinVA = std::min(MinVA, Sec->Addr); else Sec->Addr = 0; } - allocateHeaders(Phdrs, *OutputSections, MinVA); + allocateHeaders(Phdrs, OutputSectionCommands, MinVA); } // Creates program headers as instructed by PHDRS linker script command. @@ -1068,6 +1076,33 @@ static void writeInt(uint8_t *Buf, uint64_t Data, uint llvm_unreachable("unsupported Size argument"); } +// Compress section contents if this section contains debug info. +template void OutputSectionCommand::maybeCompress() { + typedef typename ELFT::Chdr Elf_Chdr; + + // Compress only DWARF debug sections. + if (!Config->CompressDebugSections || (Sec->Flags & SHF_ALLOC) || + !Name.startswith(".debug_")) + return; + + // Create a section header. + Sec->ZDebugHeader.resize(sizeof(Elf_Chdr)); + auto *Hdr = reinterpret_cast(Sec->ZDebugHeader.data()); + Hdr->ch_type = ELFCOMPRESS_ZLIB; + Hdr->ch_size = Sec->Size; + Hdr->ch_addralign = Sec->Alignment; + + // Write section contents to a temporary buffer and compress it. + std::vector Buf(Sec->Size); + writeTo(Buf.data()); + if (Error E = zlib::compress(toStringRef(Buf), Sec->CompressedData)) + fatal("compress failed: " + llvm::toString(std::move(E))); + + // Update section headers. + Sec->Size = sizeof(Elf_Chdr) + Sec->CompressedData.size(); + Sec->Flags |= SHF_COMPRESSED; +} + template void OutputSectionCommand::writeTo(uint8_t *Buf) { Sec->Loc = Buf; @@ -1084,7 +1119,12 @@ template void OutputSectionCommand::write return; // Write leading padding. - ArrayRef Sections = Sec->Sections; + std::vector Sections; + for (BaseCommand *Cmd : Commands) + if (auto *ISD = dyn_cast(Cmd)) + for (InputSection *IS : ISD->Sections) + if (IS->Live) + Sections.push_back(IS); uint32_t Filler = getFiller(); if (Filler) fill(Buf, Sections.empty() ? Sec->Size : Sections[0]->OutSecOff, Filler); @@ -1161,3 +1201,8 @@ template void OutputSectionCommand::writeTo(u template void OutputSectionCommand::writeTo(uint8_t *Buf); template void OutputSectionCommand::writeTo(uint8_t *Buf); template void OutputSectionCommand::writeTo(uint8_t *Buf); + +template void OutputSectionCommand::maybeCompress(); +template void OutputSectionCommand::maybeCompress(); +template void OutputSectionCommand::maybeCompress(); +template void OutputSectionCommand::maybeCompress(); Modified: vendor/lld/dist/ELF/LinkerScript.h ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.h Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/LinkerScript.h Thu Jun 1 20:59:20 2017 (r319469) @@ -137,6 +137,7 @@ struct OutputSectionCommand : BaseCommand { std::string MemoryRegionName; template void writeTo(uint8_t *Buf); + template void maybeCompress(); uint32_t getFiller(); }; @@ -221,6 +222,8 @@ struct ScriptConfiguration { class LinkerScript final { llvm::DenseMap SecToCommand; + llvm::DenseMap NameToOutputSectionCommand; + void assignSymbol(SymbolAssignment *Cmd, bool InSec); void setDot(Expr E, const Twine &Loc, bool InSec); @@ -241,7 +244,6 @@ class LinkerScript final { void process(BaseCommand &Base); OutputSection *Aether; - bool ErrorOnMissingSection = false; uint64_t Dot; uint64_t ThreadBssOffset = 0; @@ -251,11 +253,14 @@ class LinkerScript final { MemoryRegion *CurMemRegion = nullptr; public: + bool ErrorOnMissingSection = false; + OutputSectionCommand *createOutputSectionCommand(StringRef Name, + StringRef Location); + OutputSectionCommand *getOrCreateOutputSectionCommand(StringRef Name); + OutputSectionCommand *getCmd(OutputSection *Sec) const; bool hasPhdrsCommands() { return !Opt.PhdrsCommands.empty(); } uint64_t getDot() { return Dot; } - OutputSection *getOutputSection(const Twine &Loc, StringRef S); - uint64_t getOutputSectionSize(StringRef S); void discard(ArrayRef V); ExprValue getSymbolValue(const Twine &Loc, StringRef S); @@ -277,7 +282,8 @@ class LinkerScript final { void placeOrphanSections(); void processNonSectionCommands(); void synchronize(); - void assignAddresses(std::vector &Phdrs); + void assignAddresses(std::vector &Phdrs, + ArrayRef OutputSectionCommands); void addSymbol(SymbolAssignment *Cmd); void processCommands(OutputSectionFactory &Factory); Modified: vendor/lld/dist/ELF/MarkLive.cpp ============================================================================== --- vendor/lld/dist/ELF/MarkLive.cpp Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/MarkLive.cpp Thu Jun 1 20:59:20 2017 (r319469) @@ -220,7 +220,8 @@ template void elf::markLive() { auto MarkSymbol = [&](const SymbolBody *Sym) { if (auto *D = dyn_cast_or_null(Sym)) - Enqueue({cast(D->Section), D->Value}); + if (auto *IS = cast_or_null(D->Section)) + Enqueue({IS, D->Value}); }; // Add GC root symbols. Modified: vendor/lld/dist/ELF/OutputSections.cpp ============================================================================== --- vendor/lld/dist/ELF/OutputSections.cpp Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/OutputSections.cpp Thu Jun 1 20:59:20 2017 (r319469) @@ -16,7 +16,6 @@ #include "SyntheticSections.h" #include "Target.h" #include "Threads.h" -#include "llvm/Support/Compression.h" #include "llvm/Support/Dwarf.h" #include "llvm/Support/MD5.h" #include "llvm/Support/MathExtras.h" @@ -76,46 +75,19 @@ static bool compareByFilePosition(InputSection *A, Inp if (A->kind() == InputSectionBase::Synthetic || B->kind() == InputSectionBase::Synthetic) return false; - auto *LA = cast(A->getLinkOrderDep()); - auto *LB = cast(B->getLinkOrderDep()); - OutputSection *AOut = LA->OutSec; - OutputSection *BOut = LB->OutSec; + InputSection *LA = A->getLinkOrderDep(); + InputSection *LB = B->getLinkOrderDep(); + OutputSection *AOut = LA->getParent(); + OutputSection *BOut = LB->getParent(); if (AOut != BOut) return AOut->SectionIndex < BOut->SectionIndex; return LA->OutSecOff < LB->OutSecOff; } -// Compress section contents if this section contains debug info. -template void OutputSection::maybeCompress() { - typedef typename ELFT::Chdr Elf_Chdr; - - // Compress only DWARF debug sections. - if (!Config->CompressDebugSections || (Flags & SHF_ALLOC) || - !Name.startswith(".debug_")) - return; - - // Create a section header. - ZDebugHeader.resize(sizeof(Elf_Chdr)); - auto *Hdr = reinterpret_cast(ZDebugHeader.data()); - Hdr->ch_type = ELFCOMPRESS_ZLIB; - Hdr->ch_size = Size; - Hdr->ch_addralign = Alignment; - - // Write section contents to a temporary buffer and compress it. - std::vector Buf(Size); - Script->getCmd(this)->writeTo(Buf.data()); - if (Error E = zlib::compress(toStringRef(Buf), CompressedData)) - fatal("compress failed: " + llvm::toString(std::move(E))); - - // Update section headers. - Size = sizeof(Elf_Chdr) + CompressedData.size(); - Flags |= SHF_COMPRESSED; -} - template static void finalizeShtGroup(OutputSection *Sec) { // sh_link field for SHT_GROUP sections should contain the section index of // the symbol table. - Sec->Link = InX::SymTab->OutSec->SectionIndex; + Sec->Link = InX::SymTab->getParent()->SectionIndex; // sh_info then contain index of an entry in symbol table section which // provides signature of the section group. @@ -135,7 +107,7 @@ template void OutputSection::finalize() { // need to translate the InputSection sh_link to the OutputSection sh_link, // all InputSections in the OutputSection have the same dependency. if (auto *D = this->Sections.front()->getLinkOrderDep()) - this->Link = D->OutSec->SectionIndex; + this->Link = D->getParent()->SectionIndex; } uint32_t Type = this->Type; @@ -151,11 +123,11 @@ template void OutputSection::finalize() { if (isa(First)) return; - this->Link = InX::SymTab->OutSec->SectionIndex; + this->Link = InX::SymTab->getParent()->SectionIndex; // sh_info for SHT_REL[A] sections should contain the section header index of // the section to which the relocation applies. InputSectionBase *S = First->getRelocatedSection(); - this->Info = S->OutSec->SectionIndex; + Info = S->getOutputSection()->SectionIndex; } static uint64_t updateOffset(uint64_t Off, InputSection *S) { @@ -167,7 +139,7 @@ static uint64_t updateOffset(uint64_t Off, InputSectio void OutputSection::addSection(InputSection *S) { assert(S->Live); Sections.push_back(S); - S->OutSec = this; + S->Parent = this; this->updateAlignment(S->Alignment); // The actual offsets will be computed by assignAddresses. For now, use @@ -351,7 +323,7 @@ static bool canMergeToProgbits(unsigned Type) { Type == SHT_NOTE; } -static void reportDiscarded(InputSectionBase *IS) { +void elf::reportDiscarded(InputSectionBase *IS) { if (!Config->PrintGcSections) return; message("removing unused section from '" + IS->Name + "' in file '" + @@ -437,8 +409,3 @@ template void OutputSection::finalize(); template void OutputSection::finalize(); template void OutputSection::finalize(); template void OutputSection::finalize(); - -template void OutputSection::maybeCompress(); -template void OutputSection::maybeCompress(); -template void OutputSection::maybeCompress(); -template void OutputSection::maybeCompress(); Modified: vendor/lld/dist/ELF/OutputSections.h ============================================================================== --- vendor/lld/dist/ELF/OutputSections.h Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/OutputSections.h Thu Jun 1 20:59:20 2017 (r319469) @@ -83,7 +83,6 @@ class OutputSection final : public SectionBase { (publ void sortInitFini(); void sortCtorsDtors(); template void finalize(); - template void maybeCompress(); void assignOffsets(); std::vector Sections; @@ -149,6 +148,7 @@ class OutputSectionFactory { (private) }; uint64_t getHeaderSize(); +void reportDiscarded(InputSectionBase *IS); } // namespace elf } // namespace lld Modified: vendor/lld/dist/ELF/Relocations.cpp ============================================================================== --- vendor/lld/dist/ELF/Relocations.cpp Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/Relocations.cpp Thu Jun 1 20:59:20 2017 (r319469) @@ -360,9 +360,9 @@ static bool isStaticLinkTimeConstant(RelExpr E, uint32 // These expressions always compute a constant if (isRelExprOneOf(E)) + R_MIPS_TLSGD, R_GOT_PAGE_PC, R_GOT_PC, + R_GOTONLY_PC_FROM_END, R_PLT_PC, R_TLSGD_PC, R_TLSGD, + R_PPC_PLT_OPD, R_TLSDESC_CALL, R_TLSDESC_PAGE, R_HINT>(E)) return true; // These never do, except if the entire file is position dependent or if @@ -1015,7 +1015,7 @@ ThunkSection *ThunkCreator::getISThunkSec(InputSection ThunkSection *TS = ThunkedSections.lookup(IS); if (TS) return TS; - auto *TOS = cast(IS->OutSec); + auto *TOS = IS->getParent(); TS = make(TOS, IS->OutSecOff); ThunkSections[TOS].push_back(TS); ThunkedSections[IS] = TS; Modified: vendor/lld/dist/ELF/ScriptParser.cpp ============================================================================== --- vendor/lld/dist/ELF/ScriptParser.cpp Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/ScriptParser.cpp Thu Jun 1 20:59:20 2017 (r319469) @@ -55,6 +55,7 @@ class ScriptParser final : ScriptLexer { (public) private: void addFile(StringRef Path); + OutputSection *checkSection(OutputSectionCommand *Cmd, StringRef Loccation); void readAsNeeded(); void readEntry(); @@ -564,8 +565,8 @@ uint32_t ScriptParser::readFill() { OutputSectionCommand * ScriptParser::readOutputSectionDescription(StringRef OutSec) { - OutputSectionCommand *Cmd = make(OutSec); - Cmd->Location = getCurrentLocation(); + OutputSectionCommand *Cmd = + Script->createOutputSectionCommand(OutSec, getCurrentLocation()); // Read an address expression. // https://sourceware.org/binutils/docs/ld/Output-Section-Address.html @@ -819,6 +820,16 @@ StringRef ScriptParser::readParenLiteral() { return Tok; } +OutputSection *ScriptParser::checkSection(OutputSectionCommand *Cmd, + StringRef Location) { + if (Cmd->Location.empty() && Script->ErrorOnMissingSection) + error(Location + ": undefined section " + Cmd->Name); + if (Cmd->Sec) + return Cmd->Sec; + static OutputSection Dummy("", 0, 0); + return &Dummy; +} + Expr ScriptParser::readPrimary() { if (peek() == "(") return readParenExpr(); @@ -847,9 +858,8 @@ Expr ScriptParser::readPrimary() { } if (Tok == "ADDR") { StringRef Name = readParenLiteral(); - return [=]() -> ExprValue { - return {Script->getOutputSection(Location, Name), 0}; - }; + OutputSectionCommand *Cmd = Script->getOrCreateOutputSectionCommand(Name); + return [=]() -> ExprValue { return {checkSection(Cmd, Location), 0}; }; } if (Tok == "ALIGN") { expect("("); @@ -867,7 +877,8 @@ Expr ScriptParser::readPrimary() { } if (Tok == "ALIGNOF") { StringRef Name = readParenLiteral(); - return [=] { return Script->getOutputSection(Location, Name)->Alignment; }; + OutputSectionCommand *Cmd = Script->getOrCreateOutputSectionCommand(Name); + return [=] { return checkSection(Cmd, Location)->Alignment; }; } if (Tok == "ASSERT") return readAssertExpr(); @@ -912,7 +923,8 @@ Expr ScriptParser::readPrimary() { } if (Tok == "LOADADDR") { StringRef Name = readParenLiteral(); - return [=] { return Script->getOutputSection(Location, Name)->getLMA(); }; + OutputSectionCommand *Cmd = Script->getOrCreateOutputSectionCommand(Name); + return [=] { return checkSection(Cmd, Location)->getLMA(); }; } if (Tok == "ORIGIN") { StringRef Name = readParenLiteral(); @@ -930,7 +942,11 @@ Expr ScriptParser::readPrimary() { } if (Tok == "SIZEOF") { StringRef Name = readParenLiteral(); - return [=] { return Script->getOutputSectionSize(Name); }; + OutputSectionCommand *Cmd = Script->getOrCreateOutputSectionCommand(Name); + // Linker script does not create an output section if its content is empty. + // We want to allow SIZEOF(.foo) where .foo is a section which happened to + // be empty. + return [=] { return Cmd->Sec ? Cmd->Sec->Size : 0; }; } if (Tok == "SIZEOF_HEADERS") return [=] { return elf::getHeaderSize(); }; Modified: vendor/lld/dist/ELF/Symbols.cpp ============================================================================== --- vendor/lld/dist/ELF/Symbols.cpp Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/Symbols.cpp Thu Jun 1 20:59:20 2017 (r319469) @@ -101,12 +101,12 @@ static uint64_t getSymVA(const SymbolBody &Body, int64 case SymbolBody::DefinedCommonKind: if (!Config->DefineCommon) return 0; - return InX::Common->OutSec->Addr + InX::Common->OutSecOff + + return InX::Common->getParent()->Addr + InX::Common->OutSecOff + cast(Body).Offset; case SymbolBody::SharedKind: { auto &SS = cast(Body); if (SS.NeedsCopy) - return SS.CopyRelSec->OutSec->Addr + SS.CopyRelSec->OutSecOff + + return SS.CopyRelSec->getParent()->Addr + SS.CopyRelSec->OutSecOff + SS.CopyRelSecOff; if (SS.NeedsPltAddr) return Body.getPltVA(); @@ -207,13 +207,13 @@ OutputSection *SymbolBody::getOutputSection() const { if (auto *S = dyn_cast(this)) { if (S->NeedsCopy) - return S->CopyRelSec->OutSec; + return S->CopyRelSec->getParent(); return nullptr; } if (isa(this)) { if (Config->DefineCommon) - return InX::Common->OutSec; + return InX::Common->getParent(); return nullptr; } Modified: vendor/lld/dist/ELF/SyntheticSections.cpp ============================================================================== --- vendor/lld/dist/ELF/SyntheticSections.cpp Thu Jun 1 20:59:18 2017 (r319468) +++ vendor/lld/dist/ELF/SyntheticSections.cpp Thu Jun 1 20:59:20 2017 (r319469) @@ -48,8 +48,8 @@ using namespace lld; using namespace lld::elf; uint64_t SyntheticSection::getVA() const { - if (this->OutSec) - return this->OutSec->Addr + this->OutSecOff; + if (OutputSection *Sec = getParent()) + return Sec->Addr + OutSecOff; return 0; } @@ -367,8 +367,8 @@ BssSection::BssSection(StringRef Name) : SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_NOBITS, 0, Name) {} size_t BssSection::reserveSpace(uint64_t Size, uint32_t Alignment) { - if (OutSec) - OutSec->updateAlignment(Alignment); + if (OutputSection *Sec = getParent()) + Sec->updateAlignment(Alignment); this->Size = alignTo(this->Size, Alignment) + Size; this->Alignment = std::max(this->Alignment, Alignment); return this->Size - Size; @@ -494,7 +494,7 @@ void EhFrameSection::addSectionAux(EhInputSectio template void EhFrameSection::addSection(InputSectionBase *C) { auto *Sec = cast(C); - Sec->EHSec = this; + Sec->Parent = this; updateAlignment(Sec->Alignment); Sections.push_back(Sec); for (auto *DS : Sec->DependentSections) @@ -579,7 +579,7 @@ uint64_t EhFrameSection::getFdePc(uint8_t *Buf, if ((Enc & 0x70) == DW_EH_PE_absptr) return Addr; if ((Enc & 0x70) == DW_EH_PE_pcrel) - return Addr + this->OutSec->Addr + Off; + return Addr + getParent()->Addr + Off; fatal("unknown FDE size relative encoding"); } @@ -610,7 +610,7 @@ template void EhFrameSection::write uint8_t Enc = getFdeEncoding(Cie->Piece); for (SectionPiece *Fde : Cie->FdePieces) { uint64_t Pc = getFdePc(Buf, Fde->OutputOff, Enc); - uint64_t FdeVA = this->OutSec->Addr + Fde->OutputOff; + uint64_t FdeVA = getParent()->Addr + Fde->OutputOff; In::EhFrameHdr->addFde(Pc, FdeVA); } } @@ -698,8 +698,7 @@ void MipsGotSection::addEntry(SymbolBody &Sym, int64_t // sections referenced by GOT relocations. Then later in the `finalize` // method calculate number of "pages" required to cover all saved output // section and allocate appropriate number of GOT entries. - auto *DefSym = cast(&Sym); - PageIndexMap.insert({DefSym->Section->getOutputSection(), 0}); + PageIndexMap.insert({Sym.getOutputSection(), 0}); return; } if (Sym.isTls()) { @@ -766,8 +765,7 @@ static uint64_t getMipsPageCount(uint64_t Size) { uint64_t MipsGotSection::getPageEntryOffset(const SymbolBody &B, int64_t Addend) const { - const OutputSection *OutSec = - cast(&B)->Section->getOutputSection(); + const OutputSection *OutSec = B.getOutputSection(); uint64_t SecAddr = getMipsPageAddr(OutSec->Addr); uint64_t SymAddr = getMipsPageAddr(B.getVA(Addend)); uint64_t Index = PageIndexMap.lookup(OutSec) + (SymAddr - SecAddr) / 0xffff; @@ -1071,11 +1069,11 @@ template void DynamicSection::final if (this->Size) return; // Already finalized. - this->Link = InX::DynStrTab->OutSec->SectionIndex; - if (In::RelaDyn->OutSec->Size > 0) { + this->Link = InX::DynStrTab->getParent()->SectionIndex; + if (In::RelaDyn->getParent()->Size > 0) { bool IsRela = Config->IsRela; add({IsRela ? DT_RELA : DT_REL, In::RelaDyn}); - add({IsRela ? DT_RELASZ : DT_RELSZ, In::RelaDyn->OutSec->Size}); + add({IsRela ? DT_RELASZ : DT_RELSZ, In::RelaDyn->getParent()->Size}); add({IsRela ? DT_RELAENT : DT_RELENT, uint64_t(IsRela ? sizeof(Elf_Rela) : sizeof(Elf_Rel))}); @@ -1088,9 +1086,9 @@ template void DynamicSection::final add({IsRela ? DT_RELACOUNT : DT_RELCOUNT, NumRelativeRels}); } } - if (In::RelaPlt->OutSec->Size > 0) { + if (In::RelaPlt->getParent()->Size > 0) { add({DT_JMPREL, In::RelaPlt}); - add({DT_PLTRELSZ, In::RelaPlt->OutSec->Size}); + add({DT_PLTRELSZ, In::RelaPlt->getParent()->Size}); add({Config->EMachine == EM_MIPS ? DT_MIPS_PLTGOT : DT_PLTGOT, InX::GotPlt}); add({DT_PLTREL, uint64_t(Config->IsRela ? DT_RELA : DT_REL)}); @@ -1152,7 +1150,7 @@ template void DynamicSection::final add({DT_MIPS_RLD_MAP, InX::MipsRldMap}); } - this->OutSec->Link = this->Link; + getParent()->Link = this->Link; // +1 for DT_NULL this->Size = (Entries.size() + 1) * this->Entsize; @@ -1168,7 +1166,7 @@ template void DynamicSection::write P->d_un.d_ptr = E.OutSec->Addr; break; case Entry::InSecAddr: - P->d_un.d_ptr = E.InSec->OutSec->Addr + E.InSec->OutSecOff; + P->d_un.d_ptr = E.InSec->getParent()->Addr + E.InSec->OutSecOff; break; case Entry::SecSize: P->d_un.d_val = E.OutSec->Size; @@ -1185,7 +1183,7 @@ template void DynamicSection::write } uint64_t DynamicReloc::getOffset() const { - return InputSec->OutSec->Addr + InputSec->getOffset(OffsetInSec); + return InputSec->getOutputSection()->Addr + InputSec->getOffset(OffsetInSec); } int64_t DynamicReloc::getAddend() const { @@ -1258,11 +1256,11 @@ template unsigned RelocationSection } template void RelocationSection::finalizeContents() { - this->Link = InX::DynSymTab ? InX::DynSymTab->OutSec->SectionIndex - : InX::SymTab->OutSec->SectionIndex; + this->Link = InX::DynSymTab ? InX::DynSymTab->getParent()->SectionIndex + : InX::SymTab->getParent()->SectionIndex; // Set required output section properties. - this->OutSec->Link = this->Link; + getParent()->Link = this->Link; } SymbolTableBaseSection::SymbolTableBaseSection(StringTableSection &StrTabSec) @@ -1293,14 +1291,14 @@ static bool sortMipsSymbols(const SymbolTableEntry &L, // function. (For .dynsym, we don't do that because symbols for // dynamic linking are inherently all globals.) void SymbolTableBaseSection::finalizeContents() { - this->OutSec->Link = StrTabSec.OutSec->SectionIndex; + getParent()->Link = StrTabSec.getParent()->SectionIndex; // If it is a .dynsym, there should be no local symbols, but we need // to do a few things for the dynamic linker. if (this->Type == SHT_DYNSYM) { // Section's Info field has the index of the first non-local symbol. // Because the first symbol entry is a null entry, 1 is the first. - this->OutSec->Info = 1; + getParent()->Info = 1; if (InX::GnuHashTab) { // NB: It also sorts Symbols to meet the GNU hash table requirements. @@ -1326,7 +1324,7 @@ void SymbolTableBaseSection::postThunkContents() { S.Symbol->symbol()->computeBinding() == STB_LOCAL; }); size_t NumLocals = It - Symbols.begin(); - this->OutSec->Info = NumLocals + 1; + getParent()->Info = NumLocals + 1; } void SymbolTableBaseSection::addSymbol(SymbolBody *B) { @@ -1344,8 +1342,7 @@ size_t SymbolTableBaseSection::getSymbolIndex(SymbolBo // This is used for -r, so we have to handle multiple section // symbols being combined. if (Body->Type == STT_SECTION && E.Symbol->Type == STT_SECTION) - return cast(Body)->Section->getOutputSection() == - cast(E.Symbol)->Section->getOutputSection(); + return Body->getOutputSection() == E.Symbol->getOutputSection(); return false; }); if (I == Symbols.end()) @@ -1456,7 +1453,7 @@ GnuHashTableSection::GnuHashTableSection() } void GnuHashTableSection::finalizeContents() { - this->OutSec->Link = InX::DynSymTab->OutSec->SectionIndex; + getParent()->Link = InX::DynSymTab->getParent()->SectionIndex; // Computes bloom filter size in word size. We want to allocate 8 // bits for each symbol. It must be a power of two. @@ -1590,7 +1587,7 @@ HashTableSection::HashTableSection() } template void HashTableSection::finalizeContents() { - this->OutSec->Link = InX::DynSymTab->OutSec->SectionIndex; + getParent()->Link = InX::DynSymTab->getParent()->SectionIndex; unsigned NumEntries = 2; // nbucket and nchain. NumEntries += InX::DynSymTab->getNumSymbols(); // The chain entries. @@ -1801,7 +1798,7 @@ void GdbIndexSection::finalizeContents() { for (InputSectionBase *S : InputSections) if (InputSection *IS = dyn_cast(S)) - if (IS->OutSec && IS->Name == ".debug_info") + if (IS->getParent() && IS->Name == ".debug_info") readDwarf(IS); SymbolTable.finalizeContents(); @@ -1846,7 +1843,7 @@ void GdbIndexSection::writeTo(uint8_t *Buf) { // Write the address area. for (AddressEntry &E : AddressArea) { - uint64_t BaseAddr = E.Section->OutSec->Addr + E.Section->getOffset(0); + uint64_t BaseAddr = E.Section->getParent()->Addr + E.Section->getOffset(0); write64le(Buf, BaseAddr + E.LowAddress); write64le(Buf + 8, BaseAddr + E.HighAddress); write32le(Buf + 16, E.CuIndex); @@ -1906,7 +1903,7 @@ template void EhFrameHeader::writeT Buf[1] = DW_EH_PE_pcrel | DW_EH_PE_sdata4; Buf[2] = DW_EH_PE_udata4; Buf[3] = DW_EH_PE_datarel | DW_EH_PE_sdata4; - write32(Buf + 4, In::EhFrame->OutSec->Addr - this->getVA() - 4); + write32(Buf + 4, In::EhFrame->getParent()->Addr - this->getVA() - 4); write32(Buf + 8, Fdes.size()); Buf += 12; @@ -1948,12 +1945,12 @@ template void VersionDefinitionSectionVersionDefinitions) V.NameOff = InX::DynStrTab->addString(V.Name); - this->OutSec->Link = InX::DynStrTab->OutSec->SectionIndex; + getParent()->Link = InX::DynStrTab->getParent()->SectionIndex; // sh_info should be set to the number of definitions. This fact is missed in // documentation, but confirmed by binutils community: // https://sourceware.org/ml/binutils/2014-11/msg00355.html - this->OutSec->Info = getVerDefNum(); + getParent()->Info = getVerDefNum(); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 1 20:59:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DC4FB7ECDC; Thu, 1 Jun 2017 20:59:34 +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 54BA0681E0; Thu, 1 Jun 2017 20:59:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51KxXYw035614; Thu, 1 Jun 2017 20:59:33 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51KxXp0035613; Thu, 1 Jun 2017 20:59:33 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012059.v51KxXp0035613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 20:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319472 - vendor/lldb/lldb-trunk-r304460 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 20:59:34 -0000 Author: dim Date: Thu Jun 1 20:59:33 2017 New Revision: 319472 URL: https://svnweb.freebsd.org/changeset/base/319472 Log: Tag lldb trunk r304460. Added: vendor/lldb/lldb-trunk-r304460/ - copied from r319471, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Thu Jun 1 21:05:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D01CB7F009; Thu, 1 Jun 2017 21:05:58 +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 1D6F568E5D; Thu, 1 Jun 2017 21:05:58 +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 v51L5v3X039606; Thu, 1 Jun 2017 21:05:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51L5v34039605; Thu, 1 Jun 2017 21:05:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706012105.v51L5v34039605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 1 Jun 2017 21:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319473 - head/lib/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 21:05:58 -0000 Author: dim Date: Thu Jun 1 21:05:56 2017 New Revision: 319473 URL: https://svnweb.freebsd.org/changeset/base/319473 Log: For arm targets, place ABI at the end of the target triple For some reason, we have been inserting the ABI specification into the middle of the target triple, when building LLVM, like so: armv6-gnueabi-freebsd12.0 This is the wrong way around. LLVM even auto-canonicalizes it to: armv6--freebsd12.0-gnueabi Let's do this the right way in llvm.build.mk instead. While here, define a proper VENDOR macro which can be overridden easily. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10846 Modified: head/lib/clang/llvm.build.mk Modified: head/lib/clang/llvm.build.mk ============================================================================== --- head/lib/clang/llvm.build.mk Thu Jun 1 20:59:33 2017 (r319472) +++ head/lib/clang/llvm.build.mk Thu Jun 1 21:05:56 2017 (r319473) @@ -25,16 +25,17 @@ BUILD_ARCH?= ${MACHINE_ARCH} # arm (for armv4 and armv5 CPUs) always uses the soft float ABI. # For all other targets, we stick with 'unknown'. .if ${TARGET_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") -TARGET_ABI= gnueabihf +TARGET_ABI= -gnueabihf .elif ${TARGET_ARCH:Marm*} -TARGET_ABI= gnueabi +TARGET_ABI= -gnueabi .else -TARGET_ABI= unknown +TARGET_ABI= .endif +VENDOR= unknown OS_VERSION= freebsd12.0 -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-${OS_VERSION} -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-${OS_VERSION} +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION} CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" CFLAGS+= -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" From owner-svn-src-all@freebsd.org Thu Jun 1 21:07:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49152B7F09F; Thu, 1 Jun 2017 21:07:26 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24E2368FF0; Thu, 1 Jun 2017 21:07:26 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51L7PSI039710; Thu, 1 Jun 2017 21:07:25 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51L7Pnj039708; Thu, 1 Jun 2017 21:07:25 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201706012107.v51L7Pnj039708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 1 Jun 2017 21:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319474 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 21:07:26 -0000 Author: vangyzen Date: Thu Jun 1 21:07:25 2017 New Revision: 319474 URL: https://svnweb.freebsd.org/changeset/base/319474 Log: getenv(9): rename to "kern_getenv", etc. Update the documentation to catch up with r273174, which renamed getenv -> kern_getenv setenv -> kern_setenv unsetenv -> kern_unsetenv Leave the old links in place to support finger memory. MFC after: 3 days Sponsored by: Dell EMC Modified: head/share/man/man9/Makefile head/share/man/man9/getenv.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Jun 1 21:05:56 2017 (r319473) +++ head/share/man/man9/Makefile Thu Jun 1 21:07:25 2017 (r319474) @@ -857,6 +857,9 @@ MLINKS+=getenv.9 freeenv.9 \ getenv.9 getenv_quad.9 \ getenv.9 getenv_uint.9 \ getenv.9 getenv_ulong.9 \ + getenv.9 kern_getenv.9 \ + getenv.9 kern_setenv.9 \ + getenv.9 kern_unsetenv.9 \ getenv.9 setenv.9 \ getenv.9 testenv.9 \ getenv.9 unsetenv.9 Modified: head/share/man/man9/getenv.9 ============================================================================== --- head/share/man/man9/getenv.9 Thu Jun 1 21:05:56 2017 (r319473) +++ head/share/man/man9/getenv.9 Thu Jun 1 21:07:25 2017 (r319474) @@ -27,21 +27,21 @@ .\" .\" $FreeBSD$ .\" -.Dd October 22, 2015 +.Dd June 1, 2017 .Dt GETENV 9 .Os .Sh NAME .Nm freeenv , -.Nm getenv , +.Nm kern_getenv , .Nm getenv_int , .Nm getenv_long , .Nm getenv_string , .Nm getenv_quad , .Nm getenv_uint , .Nm getenv_ulong , -.Nm setenv , +.Nm kern_setenv , .Nm testenv , -.Nm unsetenv +.Nm kern_unsetenv .Nd kernel environment variable functions .Sh SYNOPSIS .In sys/param.h @@ -49,7 +49,7 @@ .Ft void .Fn freeenv "char *env" .Ft char * -.Fn getenv "const char *name" +.Fn kern_getenv "const char *name" .Ft int .Fn getenv_int "const char *name" "int *data" .Ft int @@ -63,41 +63,41 @@ .Ft int .Fn getenv_ulong "const char *name" "unsigned long *data" .Ft int -.Fn setenv "const char *name" "const char *value" +.Fn kern_setenv "const char *name" "const char *value" .Ft int .Fn testenv "const char *name" .Ft int -.Fn unsetenv "const char *name" +.Fn kern_unsetenv "const char *name" .Sh DESCRIPTION These functions set, unset, fetch, and parse variables from the kernel's environment. .Pp The -.Fn getenv +.Fn kern_getenv function obtains the current value of the kernel environment variable .Fa name and returns a pointer to the string value. The caller should not modify the string pointed to by the return value. The -.Fn getenv +.Fn kern_getenv function may allocate temporary storage, so the .Fn freeenv function must be called to release any allocated resources when the value returned by -.Fn getenv +.Fn kern_getenv is no longer needed. .Pp The .Fn freeenv function is used to release the resources allocated by a previous call to -.Fn getenv . +.Fn kern_getenv . The .Fa env argument passed to .Fn freeenv is the pointer returned by the earlier call to -.Fn getenv . +.Fn kern_getenv . Like .Xr free 3 , the @@ -107,7 +107,7 @@ argument can be in which case no action occurs. .Pp The -.Fn setenv +.Fn kern_setenv function inserts or resets the kernel environment variable .Fa name to @@ -120,7 +120,7 @@ This function can fail if an internal limit on the num variables is exceeded. .Pp The -.Fn unsetenv +.Fn kern_unsetenv function deletes the kernel environment variable .Fa name . .Pp @@ -196,15 +196,15 @@ characters of its value are copied to the buffer point followed by a null character and a non-zero value is returned. .Sh RETURN VALUES The -.Fn getenv +.Fn kern_getenv function returns a pointer to an environment variable's value on success or .Dv NULL if the variable does not exist. .Pp The -.Fn setenv +.Fn kern_setenv and -.Fn unsetenv +.Fn kern_unsetenv functions return zero on success and -1 on failure. .Pp The From owner-svn-src-all@freebsd.org Thu Jun 1 21:07:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B14DB7F0C0; Thu, 1 Jun 2017 21:07:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A1F26A032; Thu, 1 Jun 2017 21:07:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51L7WMc039763; Thu, 1 Jun 2017 21:07:32 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51L7WHr039762; Thu, 1 Jun 2017 21:07:32 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706012107.v51L7WHr039762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 1 Jun 2017 21:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319475 - head/tools/tools/crypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 21:07:33 -0000 Author: jhb Date: Thu Jun 1 21:07:32 2017 New Revision: 319475 URL: https://svnweb.freebsd.org/changeset/base/319475 Log: Fix some new errors and a warning in cryptotest. - Use a new 'char *key' to allocate storage for keys and assign the pointer to the session2_op 'const char *' members after the key is initialized. - Mark the 'find' variable used in crfind() static so that crfind() doesn't return a pointer to stack garbage. Reported by: olivier (1) MFC after: 2 weeks Sponsored by: Chelsio Communications Modified: head/tools/tools/crypto/cryptotest.c Modified: head/tools/tools/crypto/cryptotest.c ============================================================================== --- head/tools/tools/crypto/cryptotest.c Thu Jun 1 21:07:25 2017 (r319474) +++ head/tools/tools/crypto/cryptotest.c Thu Jun 1 21:07:32 2017 (r319475) @@ -216,7 +216,7 @@ crlookup(const char *devname) const char * crfind(int crid) { - struct crypt_find_op find; + static struct crypt_find_op find; bzero(&find, sizeof(find)); find.crid = crid; @@ -252,7 +252,7 @@ runtest(struct alg *alg, int count, int size, u_long c { int i, fd = crget(); struct timeval start, stop, dt; - char *cleartext, *ciphertext, *originaltext; + char *cleartext, *ciphertext, *originaltext, *key; struct session2_op sop; struct crypt_op cop; char iv[EALG_MAX_BLOCK_LEN]; @@ -260,19 +260,21 @@ runtest(struct alg *alg, int count, int size, u_long c bzero(&sop, sizeof(sop)); if (!alg->ishash) { sop.keylen = (alg->minkeylen + alg->maxkeylen)/2; - sop.key = (char *) malloc(sop.keylen); - if (sop.key == NULL) + key = (char *) malloc(sop.keylen); + if (key == NULL) err(1, "malloc (key)"); for (i = 0; i < sop.keylen; i++) - sop.key[i] = rdigit(); + key[i] = rdigit(); + sop.key = key; sop.cipher = alg->code; } else { sop.mackeylen = (alg->minkeylen + alg->maxkeylen)/2; - sop.mackey = (char *) malloc(sop.mackeylen); - if (sop.mackey == NULL) + key = (char *) malloc(sop.mackeylen); + if (key == NULL) err(1, "malloc (mac)"); for (i = 0; i < sop.mackeylen; i++) - sop.mackey[i] = rdigit(); + key[i] = rdigit(); + sop.mackey = key; sop.mac = alg->code; } sop.crid = crid; From owner-svn-src-all@freebsd.org Thu Jun 1 21:20:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1338FB7F2BF; Thu, 1 Jun 2017 21:20:46 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D65BA6A63B; Thu, 1 Jun 2017 21:20:45 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51LKikY044184; Thu, 1 Jun 2017 21:20:44 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51LKiNF044182; Thu, 1 Jun 2017 21:20:44 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201706012120.v51LKiNF044182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 1 Jun 2017 21:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319476 - in head/sys/dev/rtwn: rtl8192c rtl8812a X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 21:20:46 -0000 Author: avos Date: Thu Jun 1 21:20:44 2017 New Revision: 319476 URL: https://svnweb.freebsd.org/changeset/base/319476 Log: rtwn: drop obsolete (since r319460) code. Tested with RTL8188EU, STA mode. Modified: head/sys/dev/rtwn/rtl8192c/r92c_tx.c head/sys/dev/rtwn/rtl8812a/r12a_tx.c Modified: head/sys/dev/rtwn/rtl8192c/r92c_tx.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_tx.c Thu Jun 1 21:07:32 2017 (r319475) +++ head/sys/dev/rtwn/rtl8192c/r92c_tx.c Thu Jun 1 21:20:44 2017 (r319476) @@ -331,8 +331,6 @@ r92c_fill_tx_desc(struct rtwn_softc *sc, struct ieee80 if (m->m_flags & M_AMPDU_MPDU) { seqno = ni->ni_txseqs[tid]; - /* NB: clear Fragment Number field. */ - *(uint16_t *)wh->i_seq = 0; ni->ni_txseqs[tid]++; } else seqno = M_SEQNO_GET(m) % IEEE80211_SEQ_RANGE; Modified: head/sys/dev/rtwn/rtl8812a/r12a_tx.c ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a_tx.c Thu Jun 1 21:07:32 2017 (r319475) +++ head/sys/dev/rtwn/rtl8812a/r12a_tx.c Thu Jun 1 21:20:44 2017 (r319476) @@ -338,8 +338,6 @@ r12a_fill_tx_desc(struct rtwn_softc *sc, struct ieee80 if (m->m_flags & M_AMPDU_MPDU) { seqno = ni->ni_txseqs[tid]; - /* NB: clear Fragment Number field. */ - *(uint16_t *)wh->i_seq = 0; ni->ni_txseqs[tid]++; } else seqno = M_SEQNO_GET(m) % IEEE80211_SEQ_RANGE; From owner-svn-src-all@freebsd.org Thu Jun 1 21:23:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABD6FB7F487; Thu, 1 Jun 2017 21:23:05 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 849F76AA0D; Thu, 1 Jun 2017 21:23:05 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v51LN4bH047817; Thu, 1 Jun 2017 21:23:04 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51LN4WP047814; Thu, 1 Jun 2017 21:23:04 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201706012123.v51LN4WP047814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 1 Jun 2017 21:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319477 - in head: etc/rc.d usr.sbin/crashinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 21:23:05 -0000 Author: vangyzen Date: Thu Jun 1 21:23:04 2017 New Revision: 319477 URL: https://svnweb.freebsd.org/changeset/base/319477 Log: crashinfo: add "batch" mode and use it during boot In batch mode, most messages go into the core.txt.N file instead of stdout. Reviewed by: jhb MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10429 Modified: head/etc/rc.d/savecore head/usr.sbin/crashinfo/crashinfo.8 head/usr.sbin/crashinfo/crashinfo.sh Modified: head/etc/rc.d/savecore ============================================================================== --- head/etc/rc.d/savecore Thu Jun 1 21:20:44 2017 (r319476) +++ head/etc/rc.d/savecore Thu Jun 1 21:23:04 2017 (r319477) @@ -70,7 +70,7 @@ savecore_start() if savecore -C "${dev}" >/dev/null; then savecore ${savecore_flags} ${dumpdir} ${dumpdev} if checkyesno crashinfo_enable; then - ${crashinfo_program} -d ${dumpdir} + ${crashinfo_program} -b -d ${dumpdir} fi sync else Modified: head/usr.sbin/crashinfo/crashinfo.8 ============================================================================== --- head/usr.sbin/crashinfo/crashinfo.8 Thu Jun 1 21:20:44 2017 (r319476) +++ head/usr.sbin/crashinfo/crashinfo.8 Thu Jun 1 21:23:04 2017 (r319477) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2008 +.Dd April 19, 2017 .Dt CRASHINFO 8 .Os .Sh NAME @@ -88,6 +88,12 @@ and .Pp The options are as follows: .Bl -tag -width indent +.It Fl b +Run in batch mode. Write most messages to the +.Pa core.txt.XX +file instead of the terminal. This flag is used when +.Nm +is run during boot. .It Fl d Ar crashdir Specify an alternate core dump directory. The default crash dump directory is Modified: head/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- head/usr.sbin/crashinfo/crashinfo.sh Thu Jun 1 21:20:44 2017 (r319476) +++ head/usr.sbin/crashinfo/crashinfo.sh Thu Jun 1 21:23:04 2017 (r319477) @@ -31,7 +31,8 @@ usage() { - echo "usage: crashinfo [-d crashdir] [-n dumpnr] [-k kernel] [core]" + echo "usage: crashinfo [-b] [-d crashdir] [-n dumpnr]" \ + "[-k kernel] [core]" exit 1 } @@ -93,12 +94,16 @@ find_kernel() done } +BATCH=false CRASHDIR=/var/crash DUMPNR= KERNEL= -while getopts "d:n:k:" opt; do +while getopts "bd:n:k:" opt; do case "$opt" in + b) + BATCH=true + ;; d) CRASHDIR=$OPTARG ;; @@ -153,6 +158,11 @@ INFO=$CRASHDIR/info.$DUMPNR FILE=$CRASHDIR/core.txt.$DUMPNR HOSTNAME=`hostname` +if $BATCH; then + echo "Writing crash summary to $FILE." + exec > $FILE 2>&1 +fi + find_gdb if [ -z "$GDB" ]; then echo "Unable to find a kernel debugger." @@ -181,8 +191,6 @@ elif [ ! -e $KERNEL ]; then exit 1 fi -echo "Writing crash summary to $FILE." - umask 077 # Simulate uname @@ -191,7 +199,10 @@ osrelease=$(gdb_command $KERNEL 'printf "%s", osreleas version=$(gdb_command $KERNEL 'printf "%s", version' | tr '\t\n' ' ') machine=$(gdb_command $KERNEL 'printf "%s", machine') -exec > $FILE 2>&1 +if ! $BATCH; then + echo "Writing crash summary to $FILE." + exec > $FILE 2>&1 +fi echo "$HOSTNAME dumped core - see $VMCORE" echo From owner-svn-src-all@freebsd.org Thu Jun 1 23:04:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCC8DB82D6C; Thu, 1 Jun 2017 23:04:45 +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 AA79C70727; Thu, 1 Jun 2017 23:04:45 +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 v51N4ik3088489; Thu, 1 Jun 2017 23:04:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v51N4it3088487; Thu, 1 Jun 2017 23:04:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706012304.v51N4it3088487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 1 Jun 2017 23:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319481 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2017 23:04:46 -0000 Author: bdrewery Date: Thu Jun 1 23:04:44 2017 New Revision: 319481 URL: https://svnweb.freebsd.org/changeset/base/319481 Log: META_MODE: Move ignoring of /usr/local/etc/libmap.d to proper place. This was added in r318194 but local.meta.sys.mk is only used for DIRDEPS_BUILD. Modified: head/share/mk/local.meta.sys.mk head/share/mk/sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Thu Jun 1 22:59:41 2017 (r319480) +++ head/share/mk/local.meta.sys.mk Thu Jun 1 23:04:44 2017 (r319481) @@ -283,6 +283,3 @@ META_MODE+= missing-meta=yes .if empty(META_MODE:Mnofilemon) META_MODE+= missing-filemon=yes .endif -# We do not want everything out-of-date just because -# some unrelated shared lib updated this. -.MAKE.META.IGNORE_PATHS+= /usr/local/etc/libmap.d Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Thu Jun 1 22:59:41 2017 (r319480) +++ head/share/mk/sys.mk Thu Jun 1 23:04:44 2017 (r319481) @@ -91,7 +91,11 @@ META_MODE?= normal /usr/share \ .endif - +.if !empty(.MAKE.MODE:Mmeta) +# We do not want everything out-of-date just because +# some unrelated shared lib updated this. +.MAKE.META.IGNORE_PATHS+= /usr/local/etc/libmap.d +.endif .if ${MK_AUTO_OBJ} == "yes" # This needs to be done early - before .PATH is computed From owner-svn-src-all@freebsd.org Fri Jun 2 00:00:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE144B94F61; Fri, 2 Jun 2017 00:00:03 +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 7E4AB72F06; Fri, 2 Jun 2017 00:00:03 +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 v52002BF011719; Fri, 2 Jun 2017 00:00:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52002rs011718; Fri, 2 Jun 2017 00:00:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706020000.v52002rs011718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 2 Jun 2017 00:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r319482 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 00:00:03 -0000 Author: gjb Date: Fri Jun 2 00:00:02 2017 New Revision: 319482 URL: https://svnweb.freebsd.org/changeset/base/319482 Log: Require explicit re@ approval for commits to stable/11, as the code freeze for 11.1-RELEASE is now in effect. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Thu Jun 1 23:04:44 2017 (r319481) +++ svnadmin/conf/approvers Fri Jun 2 00:00:02 2017 (r319482) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/ re -#^stable/11/ re +^stable/11/ re #^stable/10/ re ^release/ re ^releng/11.0/ (security-officer|so) From owner-svn-src-all@freebsd.org Fri Jun 2 00:19:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAE4EB95822; Fri, 2 Jun 2017 00:19:20 +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 B547E73E4F; Fri, 2 Jun 2017 00:19:20 +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 CD9C4B59F; Fri, 2 Jun 2017 00:19:19 +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 60BB075AB; Fri, 2 Jun 2017 00:19:18 +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 q7p7as36gQAP; Fri, 2 Jun 2017 00:19:13 +0000 (UTC) Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7CB0675A6 To: "O. Hartmann" , Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> Date: Thu, 1 Jun 2017 17:18:51 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V1icEwmXx3OlJCduuuPnMlWWOmacs37qK" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 00:19:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --V1icEwmXx3OlJCduuuPnMlWWOmacs37qK Content-Type: multipart/mixed; boundary="mT8j5N0At4DUgVariKKhLPGTGoVCmmqqc"; protected-headers="v1" From: Bryan Drewery To: "O. Hartmann" , Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar Message-ID: <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> --mT8j5N0At4DUgVariKKhLPGTGoVCmmqqc Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/23/2017 12:00 PM, O. Hartmann wrote: > Am Tue, 23 May 2017 12:52:35 -0500 > Pedro Giffuni schrieb: >=20 >> On 23/05/2017 12:12, O. Hartmann wrote: >>> Am Tue, 23 May 2017 16:38:10 +0000 (UTC) >>> "Pedro F. Giffuni" schrieb: >>> =20 >>>> Author: pfg >>>> Date: Tue May 23 16:38:10 2017 >>>> New Revision: 318750 >>>> URL: https://svnweb.freebsd.org/changeset/base/318750 >>>> >>>> Log: >>>> Bring some rough support for FreeBSD S/390 to the GNU toolchain. >>>> =20 >>>> This is no-op and only for reference: the S/390 port seems to be = elusive >>>> in the BSDs so it is convenient to keep some trace from past effo= rts. >>>> It is likely newer attempts will focus on a newer toolchain using= clang >>>> instead. >>>> =20 >>>> Obtained from: Perforce depot/projects/s390 >>>> >>>> Added: >>>> head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh (content= s, props changed) >>>> head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh (contents,= props changed) >>>> head/contrib/gcc/config/s390/freebsd.h >>>> - copied, changed from r318546, head/contrib/gcc/config/s390/l= inux.h >>>> Modified: >>>> head/contrib/binutils/bfd/config.bfd >>>> head/contrib/binutils/ld/configure.tgt >>>> head/contrib/gcc/config.gcc =20 >> ... >>>> Buildworld fails on r318751 with a "Segmentation fault" error as sho= wn below: >>>> >>>> Building /usr/obj/usr/src/lib/libkiconv/_libinstall >>>> --- lib/libmd__L --- >>>> --- skein_block_asm.o --- >>>> Segmentation fault >>>> *** [skein_block_asm.o] Error code 139 >>>> >>>> make[4]: stopped in /usr/src/lib/libmd >>>> .ERROR_TARGET=3D'skein_block_asm.o' >>>> .ERROR_META_FILE=3D'/usr/obj/usr/src/lib/libmd/skein_block_asm.o.met= a' >>>> .MAKE.LEVEL=3D'4' >>>> MAKEFILE=3D'' >>>> >>>> >>>> Host is running recent CURRENT: FreeBSD 12.0-CURRENT #124 r318748: T= ue May 23 >>>> 18:52:59 CEST 2017 amd64 =20 >> >> It shouldn't be related to this change: >> >> 1) This only affects s390 configuration which is never activated >> 2) I did run a tinderbox build to make sure nothing was affected (the = >> only thing failing was an unrelated powerpc warning that was fixed). >> >> Pedro. >=20 > Hello, >=20 > the problem could be resolved by deleting the /usr/obj folder and start= a clean build > again. >=20 I think this is fallout from ino64 combined with META_MODE. META_MODE assumes that host tools will be ABI-compatible and generally does not [force] rebuild them very often. So the act of upgrading to ino64 host and then doing another build, your ld and various other host tools will still be running pre-ino64 binaries via COMPAT_FREEBSD11. I think the bug in this system is that it is possible for some of these tools to get mixed-ABI objects linked together resulting in differing ideas of what 'struct stat' is for example. This could be possible since META_MODE won't force rebuild all objects for a directory/tool but it may rebuild 1 object for some reason or just relink the resulting binary. Here's an example of what I'm talking about with the host ld object files= : > -rwxr-xr-x 1 root wheel 1857312 Jun 1 12:59 ld.bfd* =20 > -rwxr-xr-x 1 root wheel 931304 Jun 1 12:59 ld.bfd.debug* =20 > -rw-r--r-- 1 root wheel 978 Jun 1 12:59 ld.bfd.debug.meta =20 > -rwxr-xr-x 1 root wheel 2600311 Jun 1 12:59 ld.bfd.full* =20 > -rw-r--r-- 1 root wheel 3988 Jun 1 12:59 ld.bfd.full.meta =20 > -rw-r--r-- 1 root wheel 999 Jun 1 12:59 ld.bfd.meta =20 > -rw-r--r-- 1 root wheel 154400 Apr 18 16:12 ldcref.o =20 > -rw-r--r-- 1 root wheel 4553 Apr 18 16:12 ldcref.o.meta =20 > -rw-r--r-- 1 root wheel 137088 May 11 14:14 ldctor.o =20 > -rw-r--r-- 1 root wheel 4348 May 11 14:14 ldctor.o.meta =20 > -rw-r--r-- 1 root wheel 205 Oct 11 2016 ldemul-list.h =20 > -rw-r--r-- 1 root wheel 814 Oct 11 2016 ldemul-list.h.meta =20 > -rw-r--r-- 1 root wheel 144088 Oct 13 2016 ldemul.o =20 > -rw-r--r-- 1 root wheel 4374 Oct 13 2016 ldemul.o.meta =20 The object files predate ino64 but the linked binaries do not. I did not dig into these object files more but I suspect somewhere there are mixed-ABI object files hitting this bug or that just linking pre-ino64 objects may cause a problem. I don't think linking would be a problem though. Anyway the fix for this would be to either 'make cleanworld' after upgrading to ino64, use -DNO_META_IGNORE_HOST for the first build after, or wait for my fix. I will commit a fix to force rebuild host tools through known major ABI changes to avoid this problem. For discussion of why META_MODE tries to not rebuild host tools see r301467. The gist is that a simple 'buildworld->installworld->buildworld' causes everything to rebuild due to changed host file timestamps. Really it would be better if filemon/META_MODE used file content hashing like ccache did. Then timestamps wouldn't cause such a problem here. --=20 Regards, Bryan Drewery --mT8j5N0At4DUgVariKKhLPGTGoVCmmqqc-- --V1icEwmXx3OlJCduuuPnMlWWOmacs37qK 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 iQEcBAEBAgAGBQJZMK7vAAoJEDXXcbtuRpfPKAMH/Rj4xVb3O4EZMzBZdCQmR7Uz T7w4qB39FNFIaq6gZ4hMclAdAAVBl2T8vdk9KleTo3c+hggabLLf7JI/ZVKQvVct sG7cEYSBipWLVPzoN6d+M7vBj5yQ2958qhWi+UFn9NctwS/kUOW0CIWv9g5zGZtp ZQVpDmFCZ5/FNtPpvDHN3ADzULfgPIqRnk3WYOWwg3XZ7s0nVjP0aLBmu/Bj/IGX Q1kxUbif5sXvQ6LReEWzIH+orwJsqoIdaA6k6JaBD4pvRIZs8E4N7FBhaOmmbfnx J9AZfpycF7Ii8eIsP6jmuvZplBZ4ax8dPq07K2/VlgVXOCTXqa5LynCtMiYcY84= =FryF -----END PGP SIGNATURE----- --V1icEwmXx3OlJCduuuPnMlWWOmacs37qK-- From owner-svn-src-all@freebsd.org Fri Jun 2 00:27:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 077C0B95BE7; Fri, 2 Jun 2017 00:27:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBDB4743DD; Fri, 2 Jun 2017 00:27:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v520R9Aq024101; Fri, 2 Jun 2017 00:27:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v520R9lB024100; Fri, 2 Jun 2017 00:27:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706020027.v520R9lB024100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 2 Jun 2017 00:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319483 - stable/10/contrib/netbsd-tests/lib/libc/ssp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 00:27:10 -0000 Author: ngie Date: Fri Jun 2 00:27:08 2017 New Revision: 319483 URL: https://svnweb.freebsd.org/changeset/base/319483 Log: MFC r318210: ssp_test:read:: query the value of MAXPATHLEN via getconf(1) In the event the value of PATH_MAX was changed, the assumption that MAXPATHLEN is 1024 (and hence the buffer length required to trigger SSP to fail for read(2)) would be invalidated. Query getconf(1) for the actual value of MAXPATHLEN via _XOPEN_PATH_MAX instead, and increment the value by 1 to ensure that the SSP support tests the stack smashing support properly. Modified: stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri Jun 2 00:00:02 2017 (r319482) +++ stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri Jun 2 00:27:08 2017 (r319483) @@ -392,7 +392,8 @@ read_body() h_fail "$prog 1027" "echo bar |" else # End FreeBSD - h_fail "$prog 1025" "echo bar |" + MAX_PATH=$(getconf _XOPEN_MAX_PATH) || atf_fail "getconf failed" + h_fail "$prog $(( $MAX_PATH + 1))" "echo bar |" # Begin FreeBSD fi # End FreeBSD From owner-svn-src-all@freebsd.org Fri Jun 2 00:29:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38E2AB95D38; Fri, 2 Jun 2017 00:29:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08D5B745C2; Fri, 2 Jun 2017 00:29:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v520TOsS024257; Fri, 2 Jun 2017 00:29:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v520TO58024256; Fri, 2 Jun 2017 00:29:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706020029.v520TO58024256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 2 Jun 2017 00:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319484 - stable/10/contrib/netbsd-tests/lib/libc/ssp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 00:29:25 -0000 Author: ngie Date: Fri Jun 2 00:29:23 2017 New Revision: 319484 URL: https://svnweb.freebsd.org/changeset/base/319484 Log: MFC r318211: Fix up previous commit - Apply the logic to the FreeBSD block - Fix a typo with the getconf(1) call that I would have caught, were it not for the fact that I got the blocks wrong. - Consolidate the hardcoded buffer sizes to the NetBSD block. This would have been discovered had I run the test on a system where PATH_MAX != 1024 (I don't have that at my disposal right at this moment). MFC with: r318210 Modified: stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri Jun 2 00:27:08 2017 (r319483) +++ stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri Jun 2 00:29:23 2017 (r319484) @@ -386,14 +386,15 @@ read_body() { prog="$(atf_get_srcdir)/h_read" - h_pass "$prog 1024" "echo foo |" # Begin FreeBSD if true; then - h_fail "$prog 1027" "echo bar |" + MAX_PATH=$(getconf _XOPEN_PATH_MAX) || atf_fail "getconf failed" + h_pass "$prog $MAX_PATH" "echo foo |" + h_fail "$prog $(( $MAX_PATH + 3 ))" "echo bar |" else # End FreeBSD - MAX_PATH=$(getconf _XOPEN_MAX_PATH) || atf_fail "getconf failed" - h_fail "$prog $(( $MAX_PATH + 1))" "echo bar |" + h_pass "$prog 1024" "echo foo |" + h_fail "$prog 1025" "echo bar |" # Begin FreeBSD fi # End FreeBSD From owner-svn-src-all@freebsd.org Fri Jun 2 00:51:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BA45BD33C8; Fri, 2 Jun 2017 00:51:23 +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 34D207509F; Fri, 2 Jun 2017 00:51:23 +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 60481BE09; Fri, 2 Jun 2017 00:51:22 +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 7B75E7657; Fri, 2 Jun 2017 00:51:21 +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 yo2EVzHmM98z; Fri, 2 Jun 2017 00:51:15 +0000 (UTC) Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 2DCF7764F From: Bryan Drewery To: "O. Hartmann" , Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Thu, 1 Jun 2017 17:51:14 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DUJJ56CjpPj27HEroA56SwHNsIRO6aDHj" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 00:51:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DUJJ56CjpPj27HEroA56SwHNsIRO6aDHj Content-Type: multipart/mixed; boundary="9MCl0U2rDHlPTguCD2TQFdJJLllQsN8Nw"; protected-headers="v1" From: Bryan Drewery To: "O. Hartmann" , Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar Message-ID: Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> In-Reply-To: <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> --9MCl0U2rDHlPTguCD2TQFdJJLllQsN8Nw Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/1/2017 5:18 PM, Bryan Drewery wrote: > On 5/23/2017 12:00 PM, O. Hartmann wrote: >> Am Tue, 23 May 2017 12:52:35 -0500 >> Pedro Giffuni schrieb: >> >>> On 23/05/2017 12:12, O. Hartmann wrote: >>>> Am Tue, 23 May 2017 16:38:10 +0000 (UTC) >>>> "Pedro F. Giffuni" schrieb: >>>> =20 >>>>> Author: pfg >>>>> Date: Tue May 23 16:38:10 2017 >>>>> New Revision: 318750 >>>>> URL: https://svnweb.freebsd.org/changeset/base/318750 >>>>> >>>>> Log: >>>>> Bring some rough support for FreeBSD S/390 to the GNU toolchain.= >>>>> =20 >>>>> This is no-op and only for reference: the S/390 port seems to be= elusive >>>>> in the BSDs so it is convenient to keep some trace from past eff= orts. >>>>> It is likely newer attempts will focus on a newer toolchain usin= g clang >>>>> instead. >>>>> =20 >>>>> Obtained from: Perforce depot/projects/s390 >>>>> >>>>> Added: >>>>> head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh (conten= ts, props changed) >>>>> head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh (contents= , props changed) >>>>> head/contrib/gcc/config/s390/freebsd.h >>>>> - copied, changed from r318546, head/contrib/gcc/config/s390/= linux.h >>>>> Modified: >>>>> head/contrib/binutils/bfd/config.bfd >>>>> head/contrib/binutils/ld/configure.tgt >>>>> head/contrib/gcc/config.gcc =20 >>> ... >>>>> Buildworld fails on r318751 with a "Segmentation fault" error as sh= own below: >>>>> >>>>> Building /usr/obj/usr/src/lib/libkiconv/_libinstall >>>>> --- lib/libmd__L --- >>>>> --- skein_block_asm.o --- >>>>> Segmentation fault >>>>> *** [skein_block_asm.o] Error code 139 >>>>> >>>>> make[4]: stopped in /usr/src/lib/libmd >>>>> .ERROR_TARGET=3D'skein_block_asm.o' >>>>> .ERROR_META_FILE=3D'/usr/obj/usr/src/lib/libmd/skein_block_asm.o.me= ta' >>>>> .MAKE.LEVEL=3D'4' >>>>> MAKEFILE=3D'' >>>>> >>>>> >>>>> Host is running recent CURRENT: FreeBSD 12.0-CURRENT #124 r318748: = Tue May 23 >>>>> 18:52:59 CEST 2017 amd64 =20 >>> >>> It shouldn't be related to this change: >>> >>> 1) This only affects s390 configuration which is never activated >>> 2) I did run a tinderbox build to make sure nothing was affected (the= =20 >>> only thing failing was an unrelated powerpc warning that was fixed). >>> >>> Pedro. >> >> Hello, >> >> the problem could be resolved by deleting the /usr/obj folder and star= t a clean build >> again. >> >=20 > I think this is fallout from ino64 combined with META_MODE. META_MODE > assumes that host tools will be ABI-compatible and generally does not > [force] rebuild them very often. So the act of upgrading to ino64 host= > and then doing another build, your ld and various other host tools will= > still be running pre-ino64 binaries via COMPAT_FREEBSD11. I think the > bug in this system is that it is possible for some of these tools to ge= t > mixed-ABI objects linked together resulting in differing ideas of what > 'struct stat' is for example. This could be possible since META_MODE > won't force rebuild all objects for a directory/tool but it may rebuild= > 1 object for some reason or just relink the resulting binary. >=20 > Here's an example of what I'm talking about with the host ld object fil= es: >=20 >> -rwxr-xr-x 1 root wheel 1857312 Jun 1 12:59 ld.bfd* =20 >> -rwxr-xr-x 1 root wheel 931304 Jun 1 12:59 ld.bfd.debug* =20 >> -rw-r--r-- 1 root wheel 978 Jun 1 12:59 ld.bfd.debug.meta =20 >> -rwxr-xr-x 1 root wheel 2600311 Jun 1 12:59 ld.bfd.full* =20 >> -rw-r--r-- 1 root wheel 3988 Jun 1 12:59 ld.bfd.full.meta =20 >> -rw-r--r-- 1 root wheel 999 Jun 1 12:59 ld.bfd.meta =20 >> -rw-r--r-- 1 root wheel 154400 Apr 18 16:12 ldcref.o =20 >> -rw-r--r-- 1 root wheel 4553 Apr 18 16:12 ldcref.o.meta =20 >> -rw-r--r-- 1 root wheel 137088 May 11 14:14 ldctor.o =20 >> -rw-r--r-- 1 root wheel 4348 May 11 14:14 ldctor.o.meta =20 >> -rw-r--r-- 1 root wheel 205 Oct 11 2016 ldemul-list.h =20 >> -rw-r--r-- 1 root wheel 814 Oct 11 2016 ldemul-list.h.meta =20 >> -rw-r--r-- 1 root wheel 144088 Oct 13 2016 ldemul.o =20 >> -rw-r--r-- 1 root wheel 4374 Oct 13 2016 ldemul.o.meta =20 >=20 > The object files predate ino64 but the linked binaries do not. I did > not dig into these object files more but I suspect somewhere there are > mixed-ABI object files hitting this bug or that just linking pre-ino64 > objects may cause a problem. I don't think linking would be a problem > though. This commit did cause a mixed-ABI object issue that I predicted. Built before, updated, built again and targets.o is rebuilt. > Building /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targmatch.h= > Skipping meta for .depend: no commands > Skipping meta for afterdepend: .PHONY > Skipping meta for depend: .PHONY > Skipping meta for objwarn: .PHONY > Skipping meta for beforebuild: .PHONY > Skipping meta for .WAIT_1: .PHONY > /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targets.o.meta: 81: = file '/usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/./targmatch.h' i= s newer than the target... > Building /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targets.o targets.o is the only relevant object file I could find in the broken objtree given to me that was post-ino64. It doesn't directly use any of the changes structs that I can see, but the mixed-ABI proof is enough for me to put the understanding of this to rest. In case I wasn't clear, this commit is perfectly fine. It just triggered a META_MODE bug. >=20 > Anyway the fix for this would be to either 'make cleanworld' after > upgrading to ino64, use -DNO_META_IGNORE_HOST for the first build after= , > or wait for my fix. I will commit a fix to force rebuild host tools > through known major ABI changes to avoid this problem. >=20 > For discussion of why META_MODE tries to not rebuild host tools see > r301467. The gist is that a simple > 'buildworld->installworld->buildworld' causes everything to rebuild due= > to changed host file timestamps. Really it would be better if > filemon/META_MODE used file content hashing like ccache did. Then > timestamps wouldn't cause such a problem here. >=20 --=20 Regards, Bryan Drewery --9MCl0U2rDHlPTguCD2TQFdJJLllQsN8Nw-- --DUJJ56CjpPj27HEroA56SwHNsIRO6aDHj 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 iQEcBAEBAgAGBQJZMLaCAAoJEDXXcbtuRpfPY8IIAMNo7636uQaGIP5L3hh/8OcV 4wYK4JqED4Syn+H21q5yHx1oJ3uu3L2wglezfL6B7d+2/KgvwvNa8QOz8S63duOa De+QhT5KfevK8kPqou6bPwC2jFtv8EUW4nojcS6mO4XOwW3zJq0hD+0hi4QG2+OQ 1t41qMSzapYCZjKg0wEY+Yt9Fza1afZuXyH6S5gyMDsL3mtatA13CO3JCdwpQh3+ iMkpqJlSOvI27Z5FQHhyeHFN0/29k5eGaEF3CCRy/FXXyMUvb5U1abz9b598ghu8 yapJTWjmldLfS3TWWhNHp3mXL0Rm7Ff6V2Er8NLpu10EMED33H4rE25aO4N0ZAQ= =H2Pf -----END PGP SIGNATURE----- --DUJJ56CjpPj27HEroA56SwHNsIRO6aDHj-- From owner-svn-src-all@freebsd.org Fri Jun 2 00:58:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 173ECBD35F5; Fri, 2 Jun 2017 00:58:01 +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 D27D37540C; Fri, 2 Jun 2017 00:58:00 +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 v520vx6S036063; Fri, 2 Jun 2017 00:57:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v520vxke036062; Fri, 2 Jun 2017 00:57:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706020057.v520vxke036062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 2 Jun 2017 00:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319485 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 00:58:01 -0000 Author: bdrewery Date: Fri Jun 2 00:57:59 2017 New Revision: 319485 URL: https://svnweb.freebsd.org/changeset/base/319485 Log: native-xtools: Connect lld. This will ensure that aarch64 gets a working native /usr/bin/ld rather than requiring the aarch64-binutils hack in Poudriere, or emulating the aarch64 lld. PR: 217189 Reported by: swills, jbeich Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 2 00:29:23 2017 (r319484) +++ head/Makefile.inc1 Fri Jun 2 00:57:59 2017 (r319485) @@ -2019,6 +2019,7 @@ native-xtools: .PHONY ${_gcc_tools} \ ${_clang_libs} \ ${_clang} \ + ${_lld} \ sbin/md5 \ sbin/sysctl \ usr.bin/diff \ From owner-svn-src-all@freebsd.org Fri Jun 2 01:00:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FB76BD3711; Fri, 2 Jun 2017 01:00:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FA1A755C3; Fri, 2 Jun 2017 01:00:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5210e93036248; Fri, 2 Jun 2017 01:00:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5210e30036247; Fri, 2 Jun 2017 01:00:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706020100.v5210e30036247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 2 Jun 2017 01:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319486 - stable/11/contrib/netbsd-tests/lib/libc/ssp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 01:00:41 -0000 Author: ngie Date: Fri Jun 2 01:00:40 2017 New Revision: 319486 URL: https://svnweb.freebsd.org/changeset/base/319486 Log: MFC r318210,r318211: Approved by: re (gjb) r318210: ssp_test:read:: query the value of MAXPATHLEN via getconf(1) In the event the value of PATH_MAX was changed, the assumption that MAXPATHLEN is 1024 (and hence the buffer length required to trigger SSP to fail for read(2)) would be invalidated. Query getconf(1) for the actual value of MAXPATHLEN via _XOPEN_PATH_MAX instead, and increment the value by 1 to ensure that the SSP support tests the stack smashing support properly. r318211: Fix up previous commit - Apply the logic to the FreeBSD block - Fix a typo with the getconf(1) call that I would have caught, were it not for the fact that I got the blocks wrong. - Consolidate the hardcoded buffer sizes to the NetBSD block. This would have been discovered had I run the test on a system where PATH_MAX != 1024 (I don't have that at my disposal right at this moment). MFC with: r318210 Modified: stable/11/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri Jun 2 00:57:59 2017 (r319485) +++ stable/11/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri Jun 2 01:00:40 2017 (r319486) @@ -386,12 +386,14 @@ read_body() { prog="$(atf_get_srcdir)/h_read" - h_pass "$prog 1024" "echo foo |" # Begin FreeBSD if true; then - h_fail "$prog 1027" "echo bar |" + MAX_PATH=$(getconf _XOPEN_PATH_MAX) || atf_fail "getconf failed" + h_pass "$prog $MAX_PATH" "echo foo |" + h_fail "$prog $(( $MAX_PATH + 3 ))" "echo bar |" else # End FreeBSD + h_pass "$prog 1024" "echo foo |" h_fail "$prog 1025" "echo bar |" # Begin FreeBSD fi From owner-svn-src-all@freebsd.org Fri Jun 2 01:12:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60B53BD3CF2 for ; Fri, 2 Jun 2017 01:12:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm2-vm5.bullet.mail.ne1.yahoo.com (nm2-vm5.bullet.mail.ne1.yahoo.com [98.138.91.224]) (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 26D2475D47 for ; Fri, 2 Jun 2017 01:12:27 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1496365940; bh=DSNBu+jv+eGGMUVGU0gkvPPws2jRKUsfAYds1lxlU3s=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=nyqPLc2YzrUgyeNaart12PmblusabJmxLkufZTYAZueuJpR+791hlMDFut9yahf5xcVlNDdJ9x/7pEo1cNGf3pxz58hfivJiPy2AxNYg9eaZGPQ7Ga7XEt30uJwpbtC8wmKwePFcB9pAiRWJCOWIFCADZ98XLQ43BTxTDqKkEQoDl/y6hx9PxUQubSkrwmlcHWtZ3zIdo+hVi3RjacGnzVqaWeQzoGUmNdj3gusP99na3JLEaOg7cPyoDBB5JEpNzPGvQ4klbgXzAaQ+foVVW0HlZ0gtbn/yGfKAeiYTiBnFwuvM3i7DFzbVpuFq7AkJZQD63+mUg2JZhVfyrJCfHw== Received: from [98.138.100.117] by nm2.bullet.mail.ne1.yahoo.com with NNFMP; 02 Jun 2017 01:12:20 -0000 Received: from [98.138.226.125] by tm108.bullet.mail.ne1.yahoo.com with NNFMP; 02 Jun 2017 01:12:20 -0000 Received: from [127.0.0.1] by smtp204.mail.ne1.yahoo.com with NNFMP; 02 Jun 2017 01:12:20 -0000 X-Yahoo-Newman-Id: 360710.65729.bm@smtp204.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: f11FTckVM1mdnhoNp8gicB1CmHGtkdDItiSXRyXWIY7tAeP WbShqSppHeZVrlVd5gS2choa9E7bUZRpapgSlexKGeoQzcRHFq47MJO3hhQg KVEGzujICRX5F3iBKCnw8wAbeDOvYpsSLCwm9lza5gW.L9m4uolU1JrEDq89 iXqDCa8x8Bj7ez8kWvg9XVP.8_W.PuhkXGPBm.hORpR3MlsV0uKLv2BuGH2I Ja.vGi9dzZVlilJQlW.05pevVsMLRkPuFEuxu9dcs0.wS5YHYjxc1I8oz_ws WoelhviPlcSmnAfbhfDyNmd4VyvDiyYY9ziUQwDEJOtj6dOiMwsfv4wYUtI6 wJWpbLfJnhFKNSIIgOm7Ckdslf1BN0OMIfhvHZ264a9FQ.nXfBONET1P6eUu OBBjCr5hSzBA2H6gQIxAV8QV4_k6woGEU_5M0rLhadGvMgde.JWur7rGKakp srIMg87cPTG8zcyNvaFKFbcFAb56m5J5a88GYpUQVvXfi0z.zC7bxC1aSlhN n66q63tPWcOnH80dwaVrxZBu4PVEO1b5P0jqdxAsVbk4u X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 To: Bryan Drewery , "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: Date: Thu, 1 Jun 2017 20:12:18 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 01:12:27 -0000 Hi; On 06/01/17 19:51, Bryan Drewery wrote: ... >> Building /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targmatch.h >> Skipping meta for .depend: no commands >> Skipping meta for afterdepend: .PHONY >> Skipping meta for depend: .PHONY >> Skipping meta for objwarn: .PHONY >> Skipping meta for beforebuild: .PHONY >> Skipping meta for .WAIT_1: .PHONY >> /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targets.o.meta: 81: file '/usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/./targmatch.h' is newer than the target... >> Building /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targets.o > targets.o is the only relevant object file I could find in the broken > objtree given to me that was post-ino64. It doesn't directly use any of > the changes structs that I can see, but the mixed-ABI proof is enough > for me to put the understanding of this to rest. > > In case I wasn't clear, this commit is perfectly fine. It just > triggered a META_MODE bug. > Thanks for the research. Adding new platform support in a toolchain that is dying is indeed an unusual change. I won't do it again ;). Pedro. From owner-svn-src-all@freebsd.org Fri Jun 2 02:35:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDB03BEE38D; Fri, 2 Jun 2017 02:35:17 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A66737795B; Fri, 2 Jun 2017 02:35:17 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v522ZGZa076105; Fri, 2 Jun 2017 02:35:16 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v522ZGeC076100; Fri, 2 Jun 2017 02:35:16 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201706020235.v522ZGeC076100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 2 Jun 2017 02:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319487 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 02:35:17 -0000 Author: araujo Date: Fri Jun 2 02:35:16 2017 New Revision: 319487 URL: https://svnweb.freebsd.org/changeset/base/319487 Log: Add VNC Authentication support based on RFC6143 section 7.2.2. Submitted by: Fabian Freyer Reworked by: myself Reviewed by: grehan, rgrimes and jilles MFC after: 1 week. Relnotes: Yes. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D10818 Modified: head/usr.sbin/bhyve/Makefile head/usr.sbin/bhyve/bhyve.8 head/usr.sbin/bhyve/pci_fbuf.c head/usr.sbin/bhyve/rfb.c head/usr.sbin/bhyve/rfb.h Modified: head/usr.sbin/bhyve/Makefile ============================================================================== --- head/usr.sbin/bhyve/Makefile Fri Jun 2 01:00:40 2017 (r319486) +++ head/usr.sbin/bhyve/Makefile Fri Jun 2 02:35:16 2017 (r319487) @@ -2,6 +2,8 @@ # $FreeBSD$ # +.include + PROG= bhyve PACKAGE= bhyve @@ -62,6 +64,12 @@ SRCS= \ SRCS+= vmm_instruction_emul.c LIBADD= vmmapi md pthread z + +.if ${MK_OPENSSL} == "no" +CFLAGS+=-DNO_OPENSSL +.else +LIBADD+= crypto +.endif CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000 CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Fri Jun 2 01:00:40 2017 (r319486) +++ head/usr.sbin/bhyve/bhyve.8 Fri Jun 2 02:35:16 2017 (r319487) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2017 +.Dd May 22, 2017 .Dt BHYVE 8 .Os .Sh NAME @@ -309,7 +309,7 @@ Emergency write is advertised, but no-op at present. .Pp Framebuffer devices: .Bl -tag -width 10n -.It Oo rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc +.It Oo rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= Ns Ar password Oc .Bl -tag -width 8n .It Ar IP:port An @@ -368,6 +368,11 @@ Instruct to only boot upon the initiation of a VNC connection, simplifying the installation of operating systems that require immediate keyboard input. This can be removed for post-installation use. +.It password +This type of authentication is known to be cryptographically weak and is not +intended for use on untrusted networks. +Many implementations will want to use stronger security, such as running +the session over an encrypted channel provided by IPsec or SSH. .El .El .Pp Modified: head/usr.sbin/bhyve/pci_fbuf.c ============================================================================== --- head/usr.sbin/bhyve/pci_fbuf.c Fri Jun 2 01:00:40 2017 (r319486) +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Jun 2 02:35:16 2017 (r319487) @@ -93,6 +93,7 @@ struct pci_fbuf_softc { /* rfb server */ char *rfb_host; + char *rfb_password; int rfb_port; int rfb_wait; int vga_enabled; @@ -285,7 +286,8 @@ pci_fbuf_parse_opts(struct pci_fbuf_softc *sc, char *o goto done; } else if (sc->memregs.height == 0) sc->memregs.height = 1080; - + } else if (!strcmp(xopts, "password")) { + sc->rfb_password = config; } else { pci_fbuf_usage(xopts); ret = -1; @@ -407,7 +409,7 @@ pci_fbuf_init(struct vmctx *ctx, struct pci_devinst *p memset((void *)sc->fb_base, 0, FB_SIZE); - error = rfb_init(sc->rfb_host, sc->rfb_port, sc->rfb_wait); + error = rfb_init(sc->rfb_host, sc->rfb_port, sc->rfb_wait, sc->rfb_password); done: if (error) free(sc); Modified: head/usr.sbin/bhyve/rfb.c ============================================================================== --- head/usr.sbin/bhyve/rfb.c Fri Jun 2 01:00:40 2017 (r319486) +++ head/usr.sbin/bhyve/rfb.c Fri Jun 2 02:35:16 2017 (r319487) @@ -60,10 +60,23 @@ __FBSDID("$FreeBSD$"); #include "rfb.h" #include "sockstream.h" +#ifndef NO_OPENSSL +#include +#endif + static int rfb_debug = 0; #define DPRINTF(params) if (rfb_debug) printf params #define WPRINTF(params) printf params +#define AUTH_LENGTH 16 +#define PASSWD_LENGTH 8 + +#define SECURITY_TYPE_NONE 1 +#define SECURITY_TYPE_VNC_AUTH 2 + +#define AUTH_FAILED_UNAUTH 1 +#define AUTH_FAILED_ERROR 2 + struct rfb_softc { int sfd; pthread_t tid; @@ -72,10 +85,12 @@ struct rfb_softc { int width, height; - bool enc_raw_ok; - bool enc_zlib_ok; - bool enc_resize_ok; + char *password; + bool enc_raw_ok; + bool enc_zlib_ok; + bool enc_resize_ok; + z_stream zstream; uint8_t *zbuf; int zbuflen; @@ -208,7 +223,7 @@ static void rfb_send_resize_update_msg(struct rfb_softc *rc, int cfd) { struct rfb_srvr_updt_msg supdt_msg; - struct rfb_srvr_rect_hdr srect_hdr; + struct rfb_srvr_rect_hdr srect_hdr; /* Number of rectangles: 1 */ supdt_msg.type = 0; @@ -739,8 +754,19 @@ rfb_handle(struct rfb_softc *rc, int cfd) { const char *vbuf = "RFB 003.008\n"; unsigned char buf[80]; + unsigned char *message; + +#ifndef NO_OPENSSL + unsigned char challenge[AUTH_LENGTH]; + unsigned char keystr[PASSWD_LENGTH]; + unsigned char crypt_expected[AUTH_LENGTH]; + + DES_key_schedule ks; + int i; +#endif + pthread_t tid; - uint32_t sres; + uint32_t sres; int len; rc->cfd = cfd; @@ -751,19 +777,91 @@ rfb_handle(struct rfb_softc *rc, int cfd) /* 1b. Read client version */ len = read(cfd, buf, sizeof(buf)); - /* 2a. Send security type 'none' */ + /* 2a. Send security type */ buf[0] = 1; - buf[1] = 1; /* none */ +#ifndef NO_OPENSSL + if (rc->password) + buf[1] = SECURITY_TYPE_VNC_AUTH; + else + buf[1] = SECURITY_TYPE_NONE; +#else + buf[1] = SECURITY_TYPE_NONE; +#endif + stream_write(cfd, buf, 2); - /* 2b. Read agreed security type */ len = stream_read(cfd, buf, 1); - /* 2c. Write back a status of 0 */ - sres = 0; + /* 2c. Do VNC authentication */ + switch (buf[0]) { + case SECURITY_TYPE_NONE: + sres = 0; + break; + case SECURITY_TYPE_VNC_AUTH: + /* + * The client encrypts the challenge with DES, using a password + * supplied by the user as the key. + * To form the key, the password is truncated to + * eight characters, or padded with null bytes on the right. + * The client then sends the resulting 16-bytes response. + */ +#ifndef NO_OPENSSL + strncpy(keystr, rc->password, PASSWD_LENGTH); + + /* VNC clients encrypts the challenge with all the bit fields + * in each byte of the password mirrored. + * Here we flip each byte of the keystr. + */ + for (i = 0; i < PASSWD_LENGTH; i++) { + keystr[i] = (keystr[i] & 0xF0) >> 4 + | (keystr[i] & 0x0F) << 4; + keystr[i] = (keystr[i] & 0xCC) >> 2 + | (keystr[i] & 0x33) << 2; + keystr[i] = (keystr[i] & 0xAA) >> 1 + | (keystr[i] & 0x55) << 1; + } + + /* Initialize a 16-byte random challenge */ + arc4random_buf(challenge, sizeof(challenge)); + stream_write(cfd, challenge, AUTH_LENGTH); + + /* Receive the 16-byte challenge response */ + stream_read(cfd, buf, AUTH_LENGTH); + + memcpy(crypt_expected, challenge, AUTH_LENGTH); + + /* Encrypt the Challenge with DES */ + DES_set_key((C_Block *)keystr, &ks); + DES_ecb_encrypt((C_Block *)challenge, + (C_Block *)crypt_expected, &ks, DES_ENCRYPT); + DES_ecb_encrypt((C_Block *)(challenge + PASSWD_LENGTH), + (C_Block *)(crypt_expected + PASSWD_LENGTH), + &ks, DES_ENCRYPT); + + if (memcmp(crypt_expected, buf, AUTH_LENGTH) != 0) { + message = "Auth Failed: Invalid Password."; + sres = htonl(1); + } else + sres = 0; +#else + sres = 0; + WPRINTF(("Auth not supported, no OpenSSL in your system")); +#endif + + break; + } + + /* 2d. Write back a status */ stream_write(cfd, &sres, 4); + if (sres) { + *((uint32_t *) buf) = htonl(strlen(message)); + stream_write(cfd, buf, 4); + stream_write(cfd, message, strlen(message)); + goto done; + } + /* 3a. Read client shared-flag byte */ len = stream_read(cfd, buf, 1); @@ -869,7 +967,7 @@ sse42_supported(void) } int -rfb_init(char *hostname, int port, int wait) +rfb_init(char *hostname, int port, int wait, char *password) { struct rfb_softc *rc; struct sockaddr_in sin; @@ -886,6 +984,8 @@ rfb_init(char *hostname, int port, int wait) sizeof(uint32_t)); rc->crc_width = RFB_MAX_WIDTH; rc->crc_height = RFB_MAX_HEIGHT; + + rc->password = password; rc->sfd = socket(AF_INET, SOCK_STREAM, 0); if (rc->sfd < 0) { Modified: head/usr.sbin/bhyve/rfb.h ============================================================================== --- head/usr.sbin/bhyve/rfb.h Fri Jun 2 01:00:40 2017 (r319486) +++ head/usr.sbin/bhyve/rfb.h Fri Jun 2 02:35:16 2017 (r319487) @@ -31,6 +31,6 @@ #define RFB_PORT 5900 -int rfb_init(char *hostname, int port, int wait); +int rfb_init(char *hostname, int port, int wait, char *password); #endif /* _RFB_H_ */ From owner-svn-src-all@freebsd.org Fri Jun 2 02:37:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92670BEE46A; Fri, 2 Jun 2017 02:37:18 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 610F077AF3; Fri, 2 Jun 2017 02:37:18 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v522bHKP076209; Fri, 2 Jun 2017 02:37:17 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v522bHrO076208; Fri, 2 Jun 2017 02:37:17 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201706020237.v522bHrO076208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 2 Jun 2017 02:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319488 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 02:37:18 -0000 Author: araujo Date: Fri Jun 2 02:37:17 2017 New Revision: 319488 URL: https://svnweb.freebsd.org/changeset/base/319488 Log: Bump manpage date. Modified: head/usr.sbin/bhyve/bhyve.8 Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Fri Jun 2 02:35:16 2017 (r319487) +++ head/usr.sbin/bhyve/bhyve.8 Fri Jun 2 02:37:17 2017 (r319488) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 22, 2017 +.Dd June 2, 2017 .Dt BHYVE 8 .Os .Sh NAME From owner-svn-src-all@freebsd.org Fri Jun 2 03:26:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCDAFBEEE0E; Fri, 2 Jun 2017 03:26:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98BC97925E; Fri, 2 Jun 2017 03:26:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v523Pxll096867; Fri, 2 Jun 2017 03:25:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v523PxDP096866; Fri, 2 Jun 2017 03:25:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706020325.v523PxDP096866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 2 Jun 2017 03:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319489 - head/usr.bin/diff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 03:26:01 -0000 Author: jhb Date: Fri Jun 2 03:25:59 2017 New Revision: 319489 URL: https://svnweb.freebsd.org/changeset/base/319489 Log: Add -H as an alias for --speed-large-file to match GNU diff. This is undocumented to match GNU diff where -H is also undocumented. Some existing software (such as kompare) uses this option by default. Reviewed by: emaste, rpokala Differential Revision: https://reviews.freebsd.org/D11022 Modified: head/usr.bin/diff/diff.c Modified: head/usr.bin/diff/diff.c ============================================================================== --- head/usr.bin/diff/diff.c Fri Jun 2 02:37:17 2017 (r319488) +++ head/usr.bin/diff/diff.c Fri Jun 2 03:25:59 2017 (r319489) @@ -46,7 +46,7 @@ struct stat stb1, stb2; struct excludes *excludes_list; regex_t ignore_re; -#define OPTIONS "0123456789aBbC:cdD:efhI:iL:lnNPpqrS:sTtU:uwX:x:" +#define OPTIONS "0123456789aBbC:cdD:efHhI:iL:lnNPpqrS:sTtU:uwX:x:" enum { OPT_TSIZE = CHAR_MAX + 1, OPT_STRIPCR, @@ -54,7 +54,6 @@ enum { OPT_NO_IGN_FN_CASE, OPT_NORMAL, OPT_HORIZON_LINES, - OPT_SPEED_LARGE_FILES, OPT_CHANGED_GROUP_FORMAT, }; @@ -66,6 +65,7 @@ static struct option longopts[] = { { "minimal", no_argument, 0, 'd' }, { "ed", no_argument, 0, 'e' }, { "forward-ed", no_argument, 0, 'f' }, + { "speed-large-files", no_argument, NULL, 'H' }, { "ignore-matching-lines", required_argument, 0, 'I' }, { "ignore-case", no_argument, 0, 'i' }, { "paginate", no_argument, NULL, 'l' }, @@ -88,7 +88,6 @@ static struct option longopts[] = { { "horizon-lines", required_argument, NULL, OPT_HORIZON_LINES }, { "no-ignore-file-name-case", no_argument, NULL, OPT_NO_IGN_FN_CASE }, { "normal", no_argument, NULL, OPT_NORMAL }, - { "speed-large-files", no_argument, NULL, OPT_SPEED_LARGE_FILES}, { "strip-trailing-cr", no_argument, NULL, OPT_STRIPCR }, { "tabsize", optional_argument, NULL, OPT_TSIZE }, { "changed-group-format", required_argument, NULL, OPT_CHANGED_GROUP_FORMAT}, @@ -159,6 +158,9 @@ main(int argc, char **argv) case 'f': diff_format = D_REVERSE; break; + case 'H': + /* ignore but needed for compatibility with GNU diff */ + break; case 'h': /* silently ignore for backwards compatibility */ break; @@ -252,8 +254,6 @@ main(int argc, char **argv) usage(); } break; - case OPT_SPEED_LARGE_FILES: - break; /* ignore but needed for compatibility with GNU diff */ case OPT_STRIPCR: dflags |= D_STRIPCR; break; From owner-svn-src-all@freebsd.org Fri Jun 2 03:53:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDFBBBEF336; Fri, 2 Jun 2017 03:53:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E4C279C2C; Fri, 2 Jun 2017 03:53:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v523rY5w008998; Fri, 2 Jun 2017 03:53:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v523rYLv008996; Fri, 2 Jun 2017 03:53:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706020353.v523rYLv008996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 2 Jun 2017 03:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319490 - in head: . lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 03:53:35 -0000 Author: jhb Date: Fri Jun 2 03:53:34 2017 New Revision: 319490 URL: https://svnweb.freebsd.org/changeset/base/319490 Log: Remove stale cap_rights_get(2) manpage. The documentation moved to section 3 several years ago, but 'man cap_rights_get' pulls up cap_rights_limit(2) (which is MLINKed to cap_rights_get.2) instead of cap_rights_get(3). MFC after: 1 week Modified: head/ObsoleteFiles.inc head/lib/libc/sys/Makefile.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jun 2 03:25:59 2017 (r319489) +++ head/ObsoleteFiles.inc Fri Jun 2 03:53:34 2017 (r319490) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170601: remove stale manpage +OLD_FILES+=usr/share/man/man2/cap_rights_get.2.gz # 20170601: old libifconfig and libifc OLD_FILES+=usr/lib/libifc.a OLD_FILES+=usr/lib/libifc_p.a Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Fri Jun 2 03:25:59 2017 (r319489) +++ head/lib/libc/sys/Makefile.inc Fri Jun 2 03:53:34 2017 (r319490) @@ -350,7 +350,6 @@ MLINKS+=brk.2 sbrk.2 MLINKS+=cap_enter.2 cap_getmode.2 MLINKS+=cap_fcntls_limit.2 cap_fcntls_get.2 MLINKS+=cap_ioctls_limit.2 cap_ioctls_get.2 -MLINKS+=cap_rights_limit.2 cap_rights_get.2 MLINKS+=chdir.2 fchdir.2 MLINKS+=chflags.2 chflagsat.2 \ chflags.2 fchflags.2 \ From owner-svn-src-all@freebsd.org Fri Jun 2 07:03:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7129BBF1703; Fri, 2 Jun 2017 07:03:32 +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 3C91E7D911; Fri, 2 Jun 2017 07:03:32 +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 v5273V9I085288; Fri, 2 Jun 2017 07:03:31 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5273V5A085287; Fri, 2 Jun 2017 07:03:31 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201706020703.v5273V5A085287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 2 Jun 2017 07:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319491 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 07:03:32 -0000 Author: cperciva Date: Fri Jun 2 07:03:31 2017 New Revision: 319491 URL: https://svnweb.freebsd.org/changeset/base/319491 Log: Skip setting the MTU in the netfront driver (xn# devices) if the new MTU is the same as the old MTU. In particular, on Amazon EC2 "T2" instances without this change, the network interface is reinitialized every 30 minutes due to the MTU being (re)set when a new DHCP lease is obtained, causing packets to be dropped, along with annoying syslog messages about the link state changing. As a side note, the behaviour this commit fixes was responsible for exposing the locking problems fixed via r318523 and r318631. Maintainers of other network interface drivers may wish to consider making the corresponding change; the handling of SIOCSIFMTU does not seem to exhibit a great deal of consistency between drivers. MFC after: 1 week Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Fri Jun 2 03:53:34 2017 (r319490) +++ head/sys/dev/xen/netfront/netfront.c Fri Jun 2 07:03:31 2017 (r319491) @@ -1767,6 +1767,9 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) #endif break; case SIOCSIFMTU: + if (ifp->if_mtu == ifr->ifr_mtu) + break; + ifp->if_mtu = ifr->ifr_mtu; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; xn_ifinit(sc); From owner-svn-src-all@freebsd.org Fri Jun 2 09:54:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F589BF39C2; Fri, 2 Jun 2017 09:54:43 +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 43473817C9; Fri, 2 Jun 2017 09:54:43 +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 v529sgUN054425; Fri, 2 Jun 2017 09:54:42 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v529sgcB054420; Fri, 2 Jun 2017 09:54:42 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201706020954.v529sgcB054420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 2 Jun 2017 09:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319492 - stable/11/sys/netipsec X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 09:54:43 -0000 Author: ae Date: Fri Jun 2 09:54:41 2017 New Revision: 319492 URL: https://svnweb.freebsd.org/changeset/base/319492 Log: MFC r318734: Fix possible double releasing for SA reference. There are two possible ways how crypto callback are called: directly from caller and deffered from crypto thread. For inbound packets the direct call chain is the following: IPSEC_INPUT() method -> ipsec_common_input() -> xform_input() -> -> crypto_dispatch() -> crypto_invoke() -> crypto_done() -> -> xform_input_cb() -> ipsec[46]_common_input_cb() -> netisr_queue(). The SA reference is held while crypto processing is not finished. The error handling code wrongly expected that crypto callback always called from the crypto thread context, and it did SA reference releasing in xform_input_cb(). But when the crypto callback called directly, in case of error (e.g. data authentification failed) the error handling in ipsec_common_input() also did SA reference releasing. To fix this, remove error handling from ipsec_common_input() and do it in xform_input() before crypto_dispatch(). PR: 219356 MFC r318738: Fix possible double releasing for SA and SP references. There are two possible ways how crypto callback are called: directly from caller and deffered from crypto thread. For outbound packets the direct call chain is the following: IPSEC_OUTPUT() method -> ipsec[46]_common_output() -> -> ipsec[46]_perform_request() -> xform_output() -> -> crypto_dispatch() -> crypto_invoke() -> crypto_done() -> -> xform_output_cb() -> ipsec_process_done() -> ip[6]_output(). The SA and SP references are held while crypto processing is not finished. The error handling code wrongly expected that crypto callback always called from the crypto thread context, and it did references releasing in xform_output_cb(). But when the crypto callback called directly, in case of error the error handling code in ipsec[46]_perform_request() also did references releasing. To fix this, remove error handling from ipsec[46]_perform_request() and do it in xform_output() before crypto_dispatch(). Approved by: re (kib) Modified: stable/11/sys/netipsec/ipsec_input.c stable/11/sys/netipsec/ipsec_output.c stable/11/sys/netipsec/xform_ah.c stable/11/sys/netipsec/xform_esp.c stable/11/sys/netipsec/xform_ipcomp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netipsec/ipsec_input.c ============================================================================== --- stable/11/sys/netipsec/ipsec_input.c Fri Jun 2 07:03:31 2017 (r319491) +++ stable/11/sys/netipsec/ipsec_input.c Fri Jun 2 09:54:41 2017 (r319492) @@ -223,8 +223,6 @@ ipsec_common_input(struct mbuf *m, int skip, int proto * everything else. */ error = (*sav->tdb_xform->xf_input)(m, sav, skip, protoff); - if (error != 0) - key_freesav(&sav); return (error); } Modified: stable/11/sys/netipsec/ipsec_output.c ============================================================================== --- stable/11/sys/netipsec/ipsec_output.c Fri Jun 2 07:03:31 2017 (r319491) +++ stable/11/sys/netipsec/ipsec_output.c Fri Jun 2 09:54:41 2017 (r319492) @@ -273,10 +273,6 @@ ipsec4_perform_request(struct mbuf *m, struct secpolic goto bad; } error = (*sav->tdb_xform->xf_output)(m, sp, sav, idx, i, off); - if (error != 0) { - key_freesav(&sav); - key_freesp(&sp); - } return (error); bad: IPSECSTAT_INC(ips_out_inval); @@ -581,10 +577,6 @@ ipsec6_perform_request(struct mbuf *m, struct secpolic goto bad; } error = (*sav->tdb_xform->xf_output)(m, sp, sav, idx, i, off); - if (error != 0) { - key_freesav(&sav); - key_freesp(&sp); - } return (error); bad: IPSEC6STAT_INC(ips_out_inval); Modified: stable/11/sys/netipsec/xform_ah.c ============================================================================== --- stable/11/sys/netipsec/xform_ah.c Fri Jun 2 07:03:31 2017 (r319491) +++ stable/11/sys/netipsec/xform_ah.c Fri Jun 2 09:54:41 2017 (r319492) @@ -566,8 +566,8 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski if (ah == NULL) { DPRINTF(("ah_input: cannot pullup header\n")); AHSTAT_INC(ahs_hdrops); /*XXX*/ - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } /* Check replay window, if applicable. */ @@ -578,8 +578,8 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski AHSTAT_INC(ahs_replay); DPRINTF(("%s: packet replay failure: %s\n", __func__, ipsec_sa2str(sav, buf, sizeof(buf)))); - m_freem(m); - return (EACCES); + error = EACCES; + goto bad; } cryptoid = sav->tdb_cryptoid; SECASVAR_UNLOCK(sav); @@ -595,8 +595,8 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), (u_long) ntohl(sav->spi))); AHSTAT_INC(ahs_badauthl); - m_freem(m); - return EACCES; + error = EACCES; + goto bad; } AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl); @@ -606,8 +606,8 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski DPRINTF(("%s: failed to acquire crypto descriptor\n", __func__)); AHSTAT_INC(ahs_crypto); - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } crda = crp->crp_desc; @@ -629,8 +629,8 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski DPRINTF(("%s: failed to allocate xform_data\n", __func__)); AHSTAT_INC(ahs_crypto); crypto_freereq(crp); - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } /* @@ -650,6 +650,7 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski AHSTAT_INC(ahs_hdrops); free(xd, M_XDATA); crypto_freereq(crp); + key_freesav(&sav); return (error); } @@ -668,6 +669,10 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski xd->skip = skip; xd->cryptoid = cryptoid; return (crypto_dispatch(crp)); +bad: + m_freem(m); + key_freesav(&sav); + return (error); } /* @@ -1044,6 +1049,8 @@ ah_output(struct mbuf *m, struct secpolicy *sp, struct bad: if (m) m_freem(m); + key_freesav(&sav); + key_freesp(&sp); return (error); } Modified: stable/11/sys/netipsec/xform_esp.c ============================================================================== --- stable/11/sys/netipsec/xform_esp.c Fri Jun 2 07:03:31 2017 (r319491) +++ stable/11/sys/netipsec/xform_esp.c Fri Jun 2 09:54:41 2017 (r319492) @@ -272,18 +272,18 @@ esp_input(struct mbuf *m, struct secasvar *sav, int sk struct newesp *esp; uint8_t *ivp; uint64_t cryptoid; - int plen, alen, hlen; + int alen, error, hlen, plen; IPSEC_ASSERT(sav != NULL, ("null SA")); IPSEC_ASSERT(sav->tdb_encalgxform != NULL, ("null encoding xform")); + error = EINVAL; /* Valid IP Packet length ? */ if ( (skip&3) || (m->m_pkthdr.len&3) ){ DPRINTF(("%s: misaligned packet, skip %u pkt len %u", __func__, skip, m->m_pkthdr.len)); ESPSTAT_INC(esps_badilen); - m_freem(m); - return EINVAL; + goto bad; } /* XXX don't pullup, just copy header */ IP6_EXTHDR_GET(esp, struct newesp *, m, skip, sizeof (struct newesp)); @@ -314,8 +314,7 @@ esp_input(struct mbuf *m, struct secasvar *sav, int sk ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), (u_long)ntohl(sav->spi))); ESPSTAT_INC(esps_badilen); - m_freem(m); - return EINVAL; + goto bad; } /* @@ -328,8 +327,8 @@ esp_input(struct mbuf *m, struct secasvar *sav, int sk DPRINTF(("%s: packet replay check for %s\n", __func__, ipsec_sa2str(sav, buf, sizeof(buf)))); ESPSTAT_INC(esps_replay); - m_freem(m); - return (EACCES); + error = EACCES; + goto bad; } } cryptoid = sav->tdb_cryptoid; @@ -344,8 +343,8 @@ esp_input(struct mbuf *m, struct secasvar *sav, int sk DPRINTF(("%s: failed to acquire crypto descriptors\n", __func__)); ESPSTAT_INC(esps_crypto); - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } /* Get IPsec-specific opaque pointer */ @@ -354,8 +353,8 @@ esp_input(struct mbuf *m, struct secasvar *sav, int sk DPRINTF(("%s: failed to allocate xform_data\n", __func__)); ESPSTAT_INC(esps_crypto); crypto_freereq(crp); - m_freem(m); - return ENOBUFS; + error = ENOBUFS; + goto bad; } if (esph != NULL) { @@ -425,6 +424,10 @@ esp_input(struct mbuf *m, struct secasvar *sav, int sk crde->crd_alg = espx->type; return (crypto_dispatch(crp)); +bad: + m_freem(m); + key_freesav(&sav); + return (error); } /* @@ -858,6 +861,8 @@ esp_output(struct mbuf *m, struct secpolicy *sp, struc bad: if (m) m_freem(m); + key_freesav(&sav); + key_freesp(&sp); return (error); } /* Modified: stable/11/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/11/sys/netipsec/xform_ipcomp.c Fri Jun 2 07:03:31 2017 (r319491) +++ stable/11/sys/netipsec/xform_ipcomp.c Fri Jun 2 09:54:41 2017 (r319492) @@ -194,34 +194,35 @@ ipcomp_input(struct mbuf *m, struct secasvar *sav, int struct cryptop *crp; struct ipcomp *ipcomp; caddr_t addr; - int hlen = IPCOMP_HLENGTH; + int error, hlen = IPCOMP_HLENGTH; /* * Check that the next header of the IPComp is not IPComp again, before * doing any real work. Given it is not possible to do double * compression it means someone is playing tricks on us. */ + error = ENOBUFS; if (m->m_len < skip + hlen && (m = m_pullup(m, skip + hlen)) == NULL) { IPCOMPSTAT_INC(ipcomps_hdrops); /*XXX*/ DPRINTF(("%s: m_pullup failed\n", __func__)); - return (ENOBUFS); + key_freesav(&sav); + return (error); } addr = (caddr_t) mtod(m, struct ip *) + skip; ipcomp = (struct ipcomp *)addr; if (ipcomp->comp_nxt == IPPROTO_IPCOMP) { - m_freem(m); IPCOMPSTAT_INC(ipcomps_pdrops); /* XXX have our own stats? */ DPRINTF(("%s: recursive compression detected\n", __func__)); - return (EINVAL); + error = EINVAL; + goto bad; } /* Get crypto descriptors */ crp = crypto_getreq(1); if (crp == NULL) { - m_freem(m); DPRINTF(("%s: no crypto descriptors\n", __func__)); IPCOMPSTAT_INC(ipcomps_crypto); - return ENOBUFS; + goto bad; } /* Get IPsec-specific opaque pointer */ xd = malloc(sizeof(*xd), M_XDATA, M_NOWAIT | M_ZERO); @@ -229,8 +230,7 @@ ipcomp_input(struct mbuf *m, struct secasvar *sav, int DPRINTF(("%s: cannot allocate xform_data\n", __func__)); IPCOMPSTAT_INC(ipcomps_crypto); crypto_freereq(crp); - m_freem(m); - return ENOBUFS; + goto bad; } crdc = crp->crp_desc; @@ -259,6 +259,10 @@ ipcomp_input(struct mbuf *m, struct secasvar *sav, int SECASVAR_UNLOCK(sav); return crypto_dispatch(crp); +bad: + m_freem(m); + key_freesav(&sav); + return (error); } /* @@ -506,6 +510,8 @@ ipcomp_output(struct mbuf *m, struct secpolicy *sp, st bad: if (m) m_freem(m); + key_freesav(&sav); + key_freesp(&sp); return (error); } From owner-svn-src-all@freebsd.org Fri Jun 2 10:30:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2A4ABF4606; Fri, 2 Jun 2017 10:30:41 +0000 (UTC) (envelope-from prvs=319e99cc0=roger.pau@citrix.com) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [185.25.65.24]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "DigiCert SHA2 Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 901418282E; Fri, 2 Jun 2017 10:30:39 +0000 (UTC) (envelope-from prvs=319e99cc0=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.39,284,1493683200"; d="scan'208";a="47113062" Date: Fri, 2 Jun 2017 11:29:22 +0100 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Colin Percival CC: , , Subject: Re: svn commit: r319491 - head/sys/dev/xen/netfront Message-ID: <20170602102922.stlu47ceumggu6o7@dhcp-3-128.uk.xensource.com> References: <201706020703.v5273V5A085287@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <201706020703.v5273V5A085287@repo.freebsd.org> User-Agent: NeoMutt/20170428 (1.8.2) X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 10:30:41 -0000 On Fri, Jun 02, 2017 at 07:03:31AM +0000, Colin Percival wrote: > Author: cperciva > Date: Fri Jun 2 07:03:31 2017 > New Revision: 319491 > URL: https://svnweb.freebsd.org/changeset/base/319491 > > Log: > Skip setting the MTU in the netfront driver (xn# devices) if the new MTU > is the same as the old MTU. In particular, on Amazon EC2 "T2" instances > without this change, the network interface is reinitialized every 30 > minutes due to the MTU being (re)set when a new DHCP lease is obtained, > causing packets to be dropped, along with annoying syslog messages about > the link state changing. > > As a side note, the behaviour this commit fixes was responsible for > exposing the locking problems fixed via r318523 and r318631. > > Maintainers of other network interface drivers may wish to consider making > the corresponding change; the handling of SIOCSIFMTU does not seem to > exhibit a great deal of consistency between drivers. Is there any reason this check (ifp->if_mtu == ifr->ifr_mtu) is not done at a higher level for all the drivers? It seems pointless to add this chunk everywhere. Roger. From owner-svn-src-all@freebsd.org Fri Jun 2 12:50:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D93BCBF7551; Fri, 2 Jun 2017 12:50:04 +0000 (UTC) (envelope-from gjb@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 B3ECF128B; Fri, 2 Jun 2017 12:50:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from 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 did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id BA5DE11BD3; Fri, 2 Jun 2017 12:50:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Fri, 2 Jun 2017 12:50:01 +0000 From: Glen Barber To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r319173 - stable/11/tests/sys/aio Message-ID: <20170602125001.GA44390@FreeBSD.org> References: <201705300309.v4U3911t053281@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline In-Reply-To: <201705300309.v4U3911t053281@repo.freebsd.org> X-Operating-System: FreeBSD 11.0-STABLE amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer X-Spidey-Sense: Uh oh, Peter logged in User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 12:50:04 -0000 --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 30, 2017 at 03:09:01AM +0000, Ngie Cooper wrote: > Author: ngie > Date: Tue May 30 03:09:01 2017 > New Revision: 319173 > URL: https://svnweb.freebsd.org/changeset/base/319173 >=20 > Log: > MFC r312913,r318100,r318107: > =20 > r312913 (by asomers): > =20 > Improve the aio tests > =20 > * Add tests for aio_suspend(2). > * Add tests for polled completion notification. > * Test the full matrix of file descriptor types and completion notifica= tion > mechanisms. > * Don't bother with mkstemp, because ATF runs every test in its own tem= p dir. > * Fix some typos. > * Remove extraneous ATF_REQUIRE_KERNEL_MODULE calls. > =20 > r318100: > =20 > style(9): move function definition curly braces to column 0 > =20 > r318107: > =20 > Remove unused constant (PATH_TEMPLATE) > =20 > It was made unnecessary in r312913. > =20 > MFC with: r312913 >=20 > Modified: > stable/11/tests/sys/aio/aio_test.c > Directory Properties: > stable/11/ (props changed) >=20 > Modified: stable/11/tests/sys/aio/aio_test.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 > --- stable/11/tests/sys/aio/aio_test.c Tue May 30 03:05:22 2017 (r319172) > +++ stable/11/tests/sys/aio/aio_test.c Tue May 30 03:09:01 2017 (r319173) > @@ -33,7 +33,7 @@ > * reading it from a second descriptor using AIO. For some targets, the= same > * fd is used for write and read (i.e., file, md device), but for others= the > * operation is performed on a peer (pty, socket, fifo, etc). A timeout= is > - * initiated to detect undo blocking. This test does not attempt to exe= rcise > + * initiated to detect undue blocking. This test does not attempt to ex= ercise > * error cases or more subtle asynchronous behavior, just make sure that= the > * basic operations work on some basic object types. > */ > @@ -63,8 +63,6 @@ > #include "freebsd_test_suite/macros.h" > #include "local.h" > =20 > -#define PATH_TEMPLATE "aio.XXXXXXXXXX" > - > /* > * GLOBAL_MAX sets the largest usable buffer size to be read and written= , as > * it sizes ac_buffer in the aio_context structure. It is also the defa= ult > @@ -74,6 +72,13 @@ > #define GLOBAL_MAX 16384 > =20 > #define BUFFER_MAX GLOBAL_MAX > + > +/* > + * A completion function will block until the aio has completed, then re= turn > + * the result of the aio. errno will be set appropriately. > + */ > +typedef ssize_t (*completion)(struct aiocb*); > + > struct aio_context { > int ac_read_fd, ac_write_fd; > long ac_seed; > @@ -179,6 +184,48 @@ aio_context_init(struct aio_context *ac, int read_fd, > ac->ac_cleanup_arg =3D cleanup_arg; > } > =20 > +static ssize_t > +poll(struct aiocb *aio) > +{ > + int err; > + > + while ((err =3D aio_error(aio)) =3D=3D EINPROGRESS && !aio_timedout) > + usleep(25000); > + switch (err) { > + case EINPROGRESS: > + errno =3D EINTR; > + return (-1); > + case 0: > + return (aio_return(aio)); > + default: > + return (err); > + } > +} > + This appears to have broken GCC builds. =3D=3D=3D> tests/sys/aio (all) cc1: warnings being treated as errors /usr/src/tests/sys/aio/aio_test.c: In function 'poll': /usr/src/tests/sys/aio/aio_test.c:190: warning: declaration of 'err' shado= ws a global declaration /usr/obj/powerpc.powerpc/usr/src/tmp/usr/include/err.h:49: warning: shadow= ed declaration is here /usr/src/tests/sys/aio/aio_test.c: In function 'suspend': /usr/src/tests/sys/aio/aio_test.c:209: warning: declaration of 'err' shado= ws a global declaration /usr/obj/powerpc.powerpc/usr/src/tmp/usr/include/err.h:49: warning: shadow= ed declaration is here Glen --lrZ03NoBR/3+SXJZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlkxXvMACgkQAxRYpUeP 4pO9rw/+IknAruVUyAsqj8eAL0fR/jqSeZIVNZOmzdRbAelf2nQmNylISRgeh7zC D60HHbjIM8aMCoOCI1wbk5wvaANIcpURXfLXa0Mdo98qScCABhvLrVLz6gYDXSQh qwYx4Qiz4hpKgbcUw47iomMOneJ13m70QYNNXSUD/xnsWXEZJ9ebCtoshGQHBzDg wiT9rPwRLiyk5nOJtPnbbxV3Qap4MCax0/BSO9AFYQRufrCfXroNANOdggnR7Pd/ 01cfEfYVZX5crx5RZ+HajUHXjsIg1Pz6E5Sqsd8ozD8ColX1Vn7y3HBvm+CJnpm4 jxBBxeXiQoy+VzbdAgUpSFN2XSYuNuPdVhFPoY6Ibxyc3cWVUC0ansEiEpqJLF6H iBjHhGXJ/KIErOwcj/lUlbnGnmUd46rCk16Pa2wS8biv67bsFdzKOXII4v3nqC8r qO9TthRnnNcb/4tOsLrynBICaertj70h/Gx92fmidAsBoIP7y1G8UEap7wqwLPSl kG8wSkdS+9BL048zBOI2kN87vrz5VtjvAvl6vODaHlUuk9Bx0vuHQBLbystxWTrq 3dN78VdRGKg8/wIAnHVHxAQ5RQGOgYVvvvqDcqIaA1lbzNiqqbVa+DRz07+NROk0 z1U3pfuGKsI59He0Pm0PchU1iVyU1lIROH8fxDDbOFNriqaEsu0= =B09r -----END PGP SIGNATURE----- --lrZ03NoBR/3+SXJZ-- From owner-svn-src-all@freebsd.org Fri Jun 2 13:33:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10CA2BF8130; Fri, 2 Jun 2017 13:33:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF53A299A; Fri, 2 Jun 2017 13:33:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v52DXp7A044144; Fri, 2 Jun 2017 13:33:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52DXo79044142; Fri, 2 Jun 2017 13:33:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706021333.v52DXo79044142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 2 Jun 2017 13:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319493 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 13:33:52 -0000 Author: jhb Date: Fri Jun 2 13:33:50 2017 New Revision: 319493 URL: https://svnweb.freebsd.org/changeset/base/319493 Log: Decode the arguments passed to __cap_rights_get() and cap_rights_limit(). Submitted by: tobik Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Fri Jun 2 09:54:41 2017 (r319492) +++ head/usr.bin/truss/syscall.h Fri Jun 2 13:33:50 2017 (r319493) @@ -28,6 +28,7 @@ * Kevent -- a pointer to an array of struct kevents. Prints all elements. * Pathconf -- the 2nd argument of pathconf(). * Utrace -- utrace(2) buffer. + * CapRights -- a pointer to a cap_rights_t. Prints all set capabilities. * * In addition, the pointer types (String, Ptr) may have OUT masked in -- * this means that the data is set on *return* from the system call -- or @@ -47,7 +48,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHe Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel, - Sockoptname, Msgflags, + Sockoptname, Msgflags, CapRights, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Fri Jun 2 09:54:41 2017 (r319492) +++ head/usr.bin/truss/syscalls.c Fri Jun 2 13:33:50 2017 (r319493) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); * arguments. */ +#include #include #include #include @@ -76,6 +77,8 @@ __FBSDID("$FreeBSD$"); */ static struct syscall decoded_syscalls[] = { /* Native ABI */ + { .name = "__cap_rights_get", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Int, 1 }, { CapRights | OUT, 2 } } }, { .name = "__getcwd", .ret_type = 1, .nargs = 2, .args = { { Name | OUT, 0 }, { Int, 1 } } }, { .name = "_umtx_op", .ret_type = 1, .nargs = 5, @@ -96,6 +99,8 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 }, { CapFcntlRights | OUT, 1 } } }, { .name = "cap_fcntls_limit", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { CapFcntlRights, 1 } } }, + { .name = "cap_rights_limit", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { CapRights, 1 } } }, { .name = "chdir", .ret_type = 1, .nargs = 1, .args = { { Name, 0 } } }, { .name = "chflags", .ret_type = 1, .nargs = 2, @@ -1976,6 +1981,18 @@ print_arg(struct syscall_args *sc, unsigned long *args case Msgflags: print_mask_arg(sysdecode_msg_flags, fp, args[sc->offset]); break; + case CapRights: { + cap_rights_t rights; + + if (get_struct(pid, (void *)args[sc->offset], &rights, + sizeof(rights)) != -1) { + fputs("{ ", fp); + sysdecode_cap_rights(fp, &rights); + fputs(" }", fp); + } else + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } case CloudABIAdvice: fputs(xlookup(cloudabi_advice, args[sc->offset]), fp); From owner-svn-src-all@freebsd.org Fri Jun 2 14:01:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B7C1BF851B; Fri, 2 Jun 2017 14:01:19 +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 DAE0933FE; Fri, 2 Jun 2017 14:01:18 +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 v52E1HvG052658; Fri, 2 Jun 2017 14:01:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52E1H1k052657; Fri, 2 Jun 2017 14:01:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706021401.v52E1H1k052657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 2 Jun 2017 14:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319494 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 14:01:19 -0000 Author: andrew Date: Fri Jun 2 14:01:17 2017 New Revision: 319494 URL: https://svnweb.freebsd.org/changeset/base/319494 Log: Fix device lookup of for the stdout-path chosen property. The stdout-path chosen property may include the serial connection details, e.g. the baud rate. When passing the device to OF_finddevice we need to strip off this information as it will cause the lookup to fail. Reviewed by: emaste, manu Differential Revision: https://reviews.freebsd.org/D6846 Modified: head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Fri Jun 2 13:33:50 2017 (r319493) +++ head/sys/dev/uart/uart_bus_fdt.c Fri Jun 2 14:01:17 2017 (r319494) @@ -117,9 +117,18 @@ static int phandle_chosen_propdev(phandle_t chosen, const char *name, phandle_t *node) { char buf[64]; + char *sep; if (OF_getprop(chosen, name, buf, sizeof(buf)) <= 0) return (ENXIO); + /* + * stdout-path may have a ':' to separate the device from the + * connection settings. Split the string so we just pass the former + * to OF_finddevice. + */ + sep = strchr(buf, ':'); + if (sep != NULL) + *sep = '\0'; if ((*node = OF_finddevice(buf)) == -1) return (ENXIO); From owner-svn-src-all@freebsd.org Fri Jun 2 14:08:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 273F3BF8754; Fri, 2 Jun 2017 14:08:10 +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 E90E4375D; Fri, 2 Jun 2017 14:08:09 +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 v52E89pO056404; Fri, 2 Jun 2017 14:08:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52E89ur056403; Fri, 2 Jun 2017 14:08:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706021408.v52E89ur056403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 2 Jun 2017 14:08:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319495 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 14:08:10 -0000 Author: gjb Date: Fri Jun 2 14:08:08 2017 New Revision: 319495 URL: https://svnweb.freebsd.org/changeset/base/319495 Log: Document r319388, cxgbetool(8) addition. Submitted by: jhb Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jun 2 14:01:17 2017 (r319494) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jun 2 14:08:08 2017 (r319495) @@ -243,6 +243,10 @@ The &man.efivar.8; utility has been added, providing an interface to manage UEFI variables. + + The &man.cxgbetool.8; utility has been + added, providing command-line access to features and debugging + facilities of &man.cxgbe.4; devices. From owner-svn-src-all@freebsd.org Fri Jun 2 14:17:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 826F7BF8932; Fri, 2 Jun 2017 14:17:15 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CC473C31; Fri, 2 Jun 2017 14:17:15 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v52EHEUr060360; Fri, 2 Jun 2017 14:17:14 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52EHE4S060359; Fri, 2 Jun 2017 14:17:14 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201706021417.v52EHE4S060359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Fri, 2 Jun 2017 14:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319496 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 14:17:15 -0000 Author: cognet Date: Fri Jun 2 14:17:14 2017 New Revision: 319496 URL: https://svnweb.freebsd.org/changeset/base/319496 Log: - Don't bother flushing the data cache for pages we're about to unmap, there's no need to. - Remove pmap_is_current(), pmap_[pte|l3]_valid_cacheable as there were only used to know if we had to write back pages. - In pmap_remove_pages(), don't bother invalidating each page in the TLB, we're about to flush the whole TLB anyway. This makes make world 8-9% faster on my hardware. Reviewed by: andrew Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Fri Jun 2 14:08:08 2017 (r319495) +++ head/sys/arm64/arm64/pmap.c Fri Jun 2 14:17:14 2017 (r319496) @@ -495,14 +495,6 @@ pmap_get_tables(pmap_t pmap, vm_offset_t va, pd_entry_ } static __inline int -pmap_is_current(pmap_t pmap) -{ - - return ((pmap == pmap_kernel()) || - (pmap == curthread->td_proc->p_vmspace->vm_map.pmap)); -} - -static __inline int pmap_l3_valid(pt_entry_t l3) { @@ -510,24 +502,8 @@ pmap_l3_valid(pt_entry_t l3) } -/* Is a level 1 or 2entry a valid block and cacheable */ CTASSERT(L1_BLOCK == L2_BLOCK); -static __inline int -pmap_pte_valid_cacheable(pt_entry_t pte) -{ - return (((pte & ATTR_DESCR_MASK) == L1_BLOCK) && - ((pte & ATTR_IDX_MASK) == ATTR_IDX(CACHED_MEMORY))); -} - -static __inline int -pmap_l3_valid_cacheable(pt_entry_t l3) -{ - - return (((l3 & ATTR_DESCR_MASK) == L3_PAGE) && - ((l3 & ATTR_IDX_MASK) == ATTR_IDX(CACHED_MEMORY))); -} - #define PTE_SYNC(pte) cpu_dcache_wb_range((vm_offset_t)pte, sizeof(*pte)) /* @@ -1180,8 +1156,6 @@ pmap_kremove(vm_offset_t va) KASSERT(pte != NULL, ("pmap_kremove: Invalid address")); KASSERT(lvl == 3, ("pmap_kremove: Invalid pte level %d", lvl)); - if (pmap_l3_valid_cacheable(pmap_load(pte))) - cpu_dcache_wb_range(va, L3_SIZE); pmap_load_clear(pte); PTE_SYNC(pte); pmap_invalidate_page(kernel_pmap, va); @@ -1292,8 +1266,6 @@ pmap_qremove(vm_offset_t sva, int count) KASSERT(lvl == 3, ("Invalid device pagetable level: %d != 3", lvl)); if (pte != NULL) { - if (pmap_l3_valid_cacheable(pmap_load(pte))) - cpu_dcache_wb_range(va, L3_SIZE); pmap_load_clear(pte); PTE_SYNC(pte); } @@ -2295,8 +2267,6 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_ vm_page_t m; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - if (pmap_is_current(pmap) && pmap_l3_valid_cacheable(pmap_load(l3))) - cpu_dcache_wb_range(va, L3_SIZE); old_l3 = pmap_load_clear(l3); PTE_SYNC(l3); pmap_invalidate_page(pmap, va); @@ -2518,9 +2488,6 @@ retry: pte = pmap_l2_to_l3(pde, pv->pv_va); tpte = pmap_load(pte); - if (pmap_is_current(pmap) && - pmap_l3_valid_cacheable(tpte)) - cpu_dcache_wb_range(pv->pv_va, L3_SIZE); pmap_load_clear(pte); PTE_SYNC(pte); pmap_invalidate_page(pmap, pv->pv_va); @@ -3004,10 +2971,6 @@ havel3: } goto validate; } - - /* Flush the cache, there might be uncommitted data in it */ - if (pmap_is_current(pmap) && pmap_l3_valid_cacheable(orig_l3)) - cpu_dcache_wb_range(va, L3_SIZE); } else { /* * Increment the counters. @@ -3673,20 +3636,8 @@ pmap_remove_pages(pmap_t pmap) ("pmap_remove_pages: bad pte %#jx", (uintmax_t)tpte)); - if (pmap_is_current(pmap)) { - if (lvl == 2 && - pmap_l3_valid_cacheable(tpte)) { - cpu_dcache_wb_range(pv->pv_va, - L3_SIZE); - } else if (lvl == 1 && - pmap_pte_valid_cacheable(tpte)) { - cpu_dcache_wb_range(pv->pv_va, - L2_SIZE); - } - } pmap_load_clear(pte); PTE_SYNC(pte); - pmap_invalidate_page(pmap, pv->pv_va); /* * Update the vm_page_t clean/reference bits. From owner-svn-src-all@freebsd.org Fri Jun 2 14:37:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29204BF8E50; Fri, 2 Jun 2017 14:37:36 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x22a.google.com (mail-yb0-x22a.google.com [IPv6:2607:f8b0:4002:c09::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 DA19B64680; Fri, 2 Jun 2017 14:37:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x22a.google.com with SMTP id 132so18313563ybq.1; Fri, 02 Jun 2017 07:37:35 -0700 (PDT) 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=yYc+zVIKowHh+A3pYZ231sOz6oyR9yzegvaHkAGny0o=; b=Nq+vGhcd/IzOco5gAoGCm7EP8HTy8+xLNm4qWDZAaI5IVlY2WnKd+8V0vNDec1/zei bhkmUVrHjAZbdGd2zrKHAARNjoe11lcNbhopn9IDcperq+rWqn3+9nvIkTwgzMs7WLk6 3978k9evwIfMjmo54EDvnM1a9hRWyc+v50Z5A0BQ4gPLM5rrsDSWYOooCRQGIPKtbKqm c98PgeUMoVn0Ca/JJIO5yzJXAapsdLxuNccrzCoYDy4GBMt6+xyH/5KXidQeZKBEn3vz Dj4/f2ndzZ+W4YUhb4fGmmth8BrCnDOGC0tdzrGb1Xc22kfGX09vuUHGqdanKS9+/inM /Y3g== 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=yYc+zVIKowHh+A3pYZ231sOz6oyR9yzegvaHkAGny0o=; b=XyfpVCfPBqvc/w4KMpUyxnM+Sk4MQFZxRRIGKLKN+K8mxzW/MoqMbRKGb5nFuAWYrD J4RuI4pCtNdHYB7O5xddQoumm/n7LV1Oy9itQWmReOgnPvPnIuCLPxX2fEpp8s9pN71R 98ISdz10vMPDX3zDeYOSeLGOGo1nCADsBQ0xodY7A4keJpSrMtv670LNA2odCSwOoiWX BPIXlni6RATNiMvFsOfPulO2ugxI02MX3vROP6Mst6UZrX9JerSiV9PDS9/tH20XaQqT +3fHFkocefwhcWutO9BUvfVsE9guTmwm9JOO9cKs6PTrvWTRSVE1c+xj516I3tcI5+Jl z8kg== X-Gm-Message-State: AODbwcAT7s1AS0rwykaBsx7znPw56UC/899UsK9kGeArk7kJGMecmNMq 6YmLiixHkoeoDnzzKEisnOJa5Vo/odve X-Received: by 10.37.163.130 with SMTP id e2mr50407ybi.248.1496414254617; Fri, 02 Jun 2017 07:37:34 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.13.206.199 with HTTP; Fri, 2 Jun 2017 07:37:34 -0700 (PDT) In-Reply-To: <20170602125001.GA44390@FreeBSD.org> References: <201705300309.v4U3911t053281@repo.freebsd.org> <20170602125001.GA44390@FreeBSD.org> From: Alan Somers Date: Fri, 2 Jun 2017 08:37:34 -0600 X-Google-Sender-Auth: KCiXm6_-_7vpKIlTiDdrGaBFI3A Message-ID: Subject: Re: svn commit: r319173 - stable/11/tests/sys/aio To: Glen Barber Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 14:37:36 -0000 On Fri, Jun 2, 2017 at 6:50 AM, Glen Barber wrote: > On Tue, May 30, 2017 at 03:09:01AM +0000, Ngie Cooper wrote: >> Author: ngie >> Date: Tue May 30 03:09:01 2017 >> New Revision: 319173 >> URL: https://svnweb.freebsd.org/changeset/base/319173 >> >> Log: >> MFC r312913,r318100,r318107: >> >> r312913 (by asomers): >> >> Improve the aio tests >> >> * Add tests for aio_suspend(2). >> * Add tests for polled completion notification. >> * Test the full matrix of file descriptor types and completion notification >> mechanisms. >> * Don't bother with mkstemp, because ATF runs every test in its own temp dir. >> * Fix some typos. >> * Remove extraneous ATF_REQUIRE_KERNEL_MODULE calls. >> >> r318100: >> >> style(9): move function definition curly braces to column 0 >> >> r318107: >> >> Remove unused constant (PATH_TEMPLATE) >> >> It was made unnecessary in r312913. >> >> MFC with: r312913 >> >> Modified: >> stable/11/tests/sys/aio/aio_test.c >> Directory Properties: >> stable/11/ (props changed) >> >> Modified: stable/11/tests/sys/aio/aio_test.c >> ============================================================================== >> --- stable/11/tests/sys/aio/aio_test.c Tue May 30 03:05:22 2017 (r319172) >> +++ stable/11/tests/sys/aio/aio_test.c Tue May 30 03:09:01 2017 (r319173) >> @@ -33,7 +33,7 @@ >> * reading it from a second descriptor using AIO. For some targets, the same >> * fd is used for write and read (i.e., file, md device), but for others the >> * operation is performed on a peer (pty, socket, fifo, etc). A timeout is >> - * initiated to detect undo blocking. This test does not attempt to exercise >> + * initiated to detect undue blocking. This test does not attempt to exercise >> * error cases or more subtle asynchronous behavior, just make sure that the >> * basic operations work on some basic object types. >> */ >> @@ -63,8 +63,6 @@ >> #include "freebsd_test_suite/macros.h" >> #include "local.h" >> >> -#define PATH_TEMPLATE "aio.XXXXXXXXXX" >> - >> /* >> * GLOBAL_MAX sets the largest usable buffer size to be read and written, as >> * it sizes ac_buffer in the aio_context structure. It is also the default >> @@ -74,6 +72,13 @@ >> #define GLOBAL_MAX 16384 >> >> #define BUFFER_MAX GLOBAL_MAX >> + >> +/* >> + * A completion function will block until the aio has completed, then return >> + * the result of the aio. errno will be set appropriately. >> + */ >> +typedef ssize_t (*completion)(struct aiocb*); >> + >> struct aio_context { >> int ac_read_fd, ac_write_fd; >> long ac_seed; >> @@ -179,6 +184,48 @@ aio_context_init(struct aio_context *ac, int read_fd, >> ac->ac_cleanup_arg = cleanup_arg; >> } >> >> +static ssize_t >> +poll(struct aiocb *aio) >> +{ >> + int err; >> + >> + while ((err = aio_error(aio)) == EINPROGRESS && !aio_timedout) >> + usleep(25000); >> + switch (err) { >> + case EINPROGRESS: >> + errno = EINTR; >> + return (-1); >> + case 0: >> + return (aio_return(aio)); >> + default: >> + return (err); >> + } >> +} >> + > > This appears to have broken GCC builds. > > ===> tests/sys/aio (all) > cc1: warnings being treated as errors > /usr/src/tests/sys/aio/aio_test.c: In function 'poll': > /usr/src/tests/sys/aio/aio_test.c:190: warning: declaration of 'err' shadows a global declaration > /usr/obj/powerpc.powerpc/usr/src/tmp/usr/include/err.h:49: warning: shadowed declaration is here > /usr/src/tests/sys/aio/aio_test.c: In function 'suspend': > /usr/src/tests/sys/aio/aio_test.c:209: warning: declaration of 'err' shadows a global declaration > /usr/obj/powerpc.powerpc/usr/src/tmp/usr/include/err.h:49: warning: shadowed declaration is here > > Glen I think it needs an MFC of r312919 by rwatson. I'll take care of it. -Alan From owner-svn-src-all@freebsd.org Fri Jun 2 15:11:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE2DFBF9787; Fri, 2 Jun 2017 15:11:44 +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 943D565861; Fri, 2 Jun 2017 15:11:44 +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 v52FBht3082371; Fri, 2 Jun 2017 15:11:43 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52FBhNj082370; Fri, 2 Jun 2017 15:11:43 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201706021511.v52FBhNj082370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 2 Jun 2017 15:11:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319497 - stable/11/tests/sys/aio X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 15:11:44 -0000 Author: asomers Date: Fri Jun 2 15:11:43 2017 New Revision: 319497 URL: https://svnweb.freebsd.org/changeset/base/319497 Log: MFC r312919 (by rwatson) Fix build of aio_test on MIPS, where the compiler warns about the local variable 'err' shadowing the global function err(3). Which it does. Sponsored by: DARPA, AFRL Approved by: re Modified: stable/11/tests/sys/aio/aio_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/aio/aio_test.c ============================================================================== --- stable/11/tests/sys/aio/aio_test.c Fri Jun 2 14:17:14 2017 (r319496) +++ stable/11/tests/sys/aio/aio_test.c Fri Jun 2 15:11:43 2017 (r319497) @@ -187,18 +187,18 @@ aio_context_init(struct aio_context *ac, int read_fd, static ssize_t poll(struct aiocb *aio) { - int err; + int error; - while ((err = aio_error(aio)) == EINPROGRESS && !aio_timedout) + while ((error = aio_error(aio)) == EINPROGRESS && !aio_timedout) usleep(25000); - switch (err) { + switch (error) { case EINPROGRESS: errno = EINTR; return (-1); case 0: return (aio_return(aio)); default: - return (err); + return (error); } } @@ -206,13 +206,13 @@ static ssize_t suspend(struct aiocb *aio) { const struct aiocb *const iocbs[] = {aio}; - int err; + int error; - err = aio_suspend(iocbs, 1, NULL); - if (err == 0) + error = aio_suspend(iocbs, 1, NULL); + if (error == 0) return (aio_return(aio)); else - return (err); + return (error); } static ssize_t From owner-svn-src-all@freebsd.org Fri Jun 2 15:12:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CE81BF97EB; Fri, 2 Jun 2017 15:12:33 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A0E965A16; Fri, 2 Jun 2017 15:12:33 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v52FCWnj084553; Fri, 2 Jun 2017 15:12:32 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52FCWxg084551; Fri, 2 Jun 2017 15:12:32 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201706021512.v52FCWxg084551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 2 Jun 2017 15:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319498 - head/sys/dev/etherswitch/e6000sw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 15:12:33 -0000 Author: loos Date: Fri Jun 2 15:12:32 2017 New Revision: 319498 URL: https://svnweb.freebsd.org/changeset/base/319498 Log: style(9) fixes, remove unnecessary headers, remove duplicate #defines and in some cases, shuffle the code around to simplify locking. No functional changes. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c head/sys/dev/etherswitch/e6000sw/e6000swreg.h Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Fri Jun 2 15:11:43 2017 (r319497) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Fri Jun 2 15:12:32 2017 (r319498) @@ -28,40 +28,25 @@ #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 -#include #include #include -#include #include "e6000swreg.h" #include "etherswitch_if.h" @@ -71,14 +56,10 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_E6000SW); MALLOC_DEFINE(M_E6000SW, "e6000sw", "e6000sw switch"); -#define E6000SW_LOCK(_sc) \ - sx_xlock(&(_sc)->sx) -#define E6000SW_UNLOCK(_sc) \ - sx_unlock(&(_sc)->sx) -#define E6000SW_LOCK_ASSERT(_sc, _what) \ - sx_assert(&(_sc)->sx, (_what)) -#define E6000SW_TRYLOCK(_sc) \ - sx_tryxlock(&(_sc)->sx) +#define E6000SW_LOCK(_sc) sx_xlock(&(_sc)->sx) +#define E6000SW_UNLOCK(_sc) sx_unlock(&(_sc)->sx) +#define E6000SW_LOCK_ASSERT(_sc, _what) sx_assert(&(_sc)->sx, (_what)) +#define E6000SW_TRYLOCK(_sc) sx_tryxlock(&(_sc)->sx) typedef struct e6000sw_softc { device_t dev; @@ -108,46 +89,43 @@ static etherswitch_info_t etherswitch_info = { .es_name = "Marvell 6000 series switch" }; -static void e6000sw_identify(driver_t *driver, device_t parent); -static int e6000sw_probe(device_t dev); -static int e6000sw_attach(device_t dev); -static int e6000sw_detach(device_t dev); -static int e6000sw_readphy(device_t dev, int phy, int reg); -static int e6000sw_writephy(device_t dev, int phy, int reg, int data); -static etherswitch_info_t* e6000sw_getinfo(device_t dev); -static void e6000sw_lock(device_t dev); -static void e6000sw_unlock(device_t dev); -static int e6000sw_getport(device_t dev, etherswitch_port_t *p); -static int e6000sw_setport(device_t dev, etherswitch_port_t *p); -static int e6000sw_readreg_wrapper(device_t dev, int addr_reg); -static int e6000sw_writereg_wrapper(device_t dev, int addr_reg, int val); -static int e6000sw_readphy_wrapper(device_t dev, int phy, int reg); -static int e6000sw_writephy_wrapper(device_t dev, int phy, int reg, int data); -static int e6000sw_getvgroup_wrapper(device_t dev, etherswitch_vlangroup_t *vg); -static int e6000sw_setvgroup_wrapper(device_t dev, etherswitch_vlangroup_t *vg); -static int e6000sw_setvgroup(device_t dev, etherswitch_vlangroup_t *vg); -static int e6000sw_getvgroup(device_t dev, etherswitch_vlangroup_t *vg); -static void e6000sw_setup(device_t dev, e6000sw_softc_t *sc); -static void e6000sw_port_vlan_conf(e6000sw_softc_t *sc); -static void e6000sw_tick(void *arg); -static void e6000sw_set_atustat(device_t dev, e6000sw_softc_t *sc, int bin, - int flag); -static int e6000sw_atu_flush(device_t dev, e6000sw_softc_t *sc, int flag); -static __inline void e6000sw_writereg(e6000sw_softc_t *sc, int addr, int reg, - int val); -static __inline uint32_t e6000sw_readreg(e6000sw_softc_t *sc, int addr, - int reg); -static int e6000sw_ifmedia_upd(struct ifnet *ifp); -static void e6000sw_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr); -static int e6000sw_atu_mac_table(device_t dev, e6000sw_softc_t *sc, struct - atu_opt *atu, int flag); -static int e6000sw_get_pvid(e6000sw_softc_t *sc, int port, int *pvid); -static int e6000sw_set_pvid(e6000sw_softc_t *sc, int port, int pvid); -static __inline int e6000sw_is_cpuport(e6000sw_softc_t *sc, int port); -static __inline int e6000sw_is_fixedport(e6000sw_softc_t *sc, int port); -static __inline int e6000sw_is_phyport(e6000sw_softc_t *sc, int port); -static __inline struct mii_data *e6000sw_miiforphy(e6000sw_softc_t *sc, - unsigned int phy); +static void e6000sw_identify(driver_t *, device_t); +static int e6000sw_probe(device_t); +static int e6000sw_attach(device_t); +static int e6000sw_detach(device_t); +static int e6000sw_readphy(device_t, int, int); +static int e6000sw_writephy(device_t, int, int, int); +static etherswitch_info_t* e6000sw_getinfo(device_t); +static void e6000sw_lock(device_t); +static void e6000sw_unlock(device_t); +static int e6000sw_getport(device_t, etherswitch_port_t *); +static int e6000sw_setport(device_t, etherswitch_port_t *); +static int e6000sw_readreg_wrapper(device_t, int); +static int e6000sw_writereg_wrapper(device_t, int, int); +static int e6000sw_readphy_wrapper(device_t, int, int); +static int e6000sw_writephy_wrapper(device_t, int, int, int); +static int e6000sw_getvgroup_wrapper(device_t, etherswitch_vlangroup_t *); +static int e6000sw_setvgroup_wrapper(device_t, etherswitch_vlangroup_t *); +static int e6000sw_setvgroup(device_t, etherswitch_vlangroup_t *); +static int e6000sw_getvgroup(device_t, etherswitch_vlangroup_t *); +static void e6000sw_setup(device_t, e6000sw_softc_t *); +static void e6000sw_port_vlan_conf(e6000sw_softc_t *); +static void e6000sw_tick(void *); +static void e6000sw_set_atustat(device_t, e6000sw_softc_t *, int, int); +static int e6000sw_atu_flush(device_t, e6000sw_softc_t *, int); +static __inline void e6000sw_writereg(e6000sw_softc_t *, int, int, int); +static __inline uint32_t e6000sw_readreg(e6000sw_softc_t *, int, int); +static int e6000sw_ifmedia_upd(struct ifnet *); +static void e6000sw_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static int e6000sw_atu_mac_table(device_t, e6000sw_softc_t *, struct atu_opt *, + int); +static int e6000sw_get_pvid(e6000sw_softc_t *, int, int *); +static int e6000sw_set_pvid(e6000sw_softc_t *, int, int); +static __inline int e6000sw_is_cpuport(e6000sw_softc_t *, int); +static __inline int e6000sw_is_fixedport(e6000sw_softc_t *, int); +static __inline int e6000sw_is_phyport(e6000sw_softc_t *, int); +static __inline struct mii_data *e6000sw_miiforphy(e6000sw_softc_t *, + unsigned int); static device_method_t e6000sw_methods[] = { /* device interface */ @@ -190,14 +168,17 @@ DRIVER_MODULE(etherswitch, e6000sw, etherswitch_driver DRIVER_MODULE(miibus, e6000sw, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(e6000sw, mdio, 1, 1, 1); -#define SMI_CMD 0 -#define SMI_CMD_BUSY (1<<15) -#define SMI_CMD_OP_READ ((2<<10)|SMI_CMD_BUSY|(1<<12)) -#define SMI_CMD_OP_WRITE ((1<<10)|SMI_CMD_BUSY|(1<<12)) -#define SMI_DATA 1 +#define SMI_CMD 0 +#define SMI_CMD_BUSY (1 << 15) +#define SMI_CMD_OP_READ ((2 << 10) | SMI_CMD_BUSY | (1 << 12)) +#define SMI_CMD_OP_WRITE ((1 << 10) | SMI_CMD_BUSY | (1 << 12)) +#define SMI_DATA 1 -#define MDIO_READ(dev, addr, reg) MDIO_READREG(device_get_parent(dev), (addr), (reg)) -#define MDIO_WRITE(dev, addr, reg, val) MDIO_WRITEREG(device_get_parent(dev), (addr), (reg), (val)) +#define MDIO_READ(dev, addr, reg) \ + MDIO_READREG(device_get_parent(dev), (addr), (reg)) +#define MDIO_WRITE(dev, addr, reg, val) \ + MDIO_WRITEREG(device_get_parent(dev), (addr), (reg), (val)) + static void e6000sw_identify(driver_t *driver, device_t parent) { @@ -211,8 +192,8 @@ e6000sw_probe(device_t dev) { e6000sw_softc_t *sc; const char *description; - unsigned int id; phandle_t dsa_node, switch_node; + uint32_t id; dsa_node = fdt_find_compatible(OF_finddevice("/"), "marvell,dsa", 0); @@ -235,8 +216,8 @@ e6000sw_probe(device_t dev) /* Lock is necessary due to assertions. */ sx_init(&sc->sx, "e6000sw"); E6000SW_LOCK(sc); - id = e6000sw_readreg(sc, REG_PORT(0), SWITCH_ID); + E6000SW_UNLOCK(sc); switch (id & 0xfff0) { case 0x3520: @@ -249,7 +230,6 @@ e6000sw_probe(device_t dev) description = "Marvell 88E6176"; break; default: - E6000SW_UNLOCK(sc); sx_destroy(&sc->sx); device_printf(dev, "Unrecognized device, id 0x%x.\n", id); return (ENXIO); @@ -257,8 +237,6 @@ e6000sw_probe(device_t dev) device_set_desc(dev, description); - E6000SW_UNLOCK(sc); - return (BUS_PROBE_DEFAULT); } @@ -433,9 +411,9 @@ e6000sw_poll_done(e6000sw_softc_t *sc) { int i; - for (i = 0; i < 16; i++) { + for (i = 0; i < E6000SW_SMI_TIMEOUT; i++) { - if (!(e6000sw_readreg(sc, REG_GLOBAL2, PHY_CMD) & + if (!(e6000sw_readreg(sc, REG_GLOBAL2, SMI_PHY_CMD_REG) & (1 << PHY_CMD_SMI_BUSY))) return (0); @@ -457,8 +435,6 @@ e6000sw_readphy(device_t dev, int phy, int reg) int err; sc = device_get_softc(dev); - val = 0; - if (!e6000sw_is_phyport(sc, phy) || reg >= E6000SW_NUM_PHY_REGS) { device_printf(dev, "Wrong register address.\n"); return (EINVAL); @@ -472,7 +448,7 @@ e6000sw_readphy(device_t dev, int phy, int reg) return (err); } - val |= 1 << PHY_CMD_SMI_BUSY; + val = 1 << PHY_CMD_SMI_BUSY; val |= PHY_CMD_MODE_MDIO << PHY_CMD_MODE; val |= PHY_CMD_OPCODE_READ << PHY_CMD_OPCODE; val |= (reg << PHY_CMD_REG_ADDR) & PHY_CMD_REG_ADDR_MASK; @@ -485,10 +461,9 @@ e6000sw_readphy(device_t dev, int phy, int reg) return (err); } - val = e6000sw_readreg(sc, REG_GLOBAL2, SMI_PHY_DATA_REG) - & PHY_DATA_MASK; + val = e6000sw_readreg(sc, REG_GLOBAL2, SMI_PHY_DATA_REG); - return (val); + return (val & PHY_DATA_MASK); } static int @@ -499,8 +474,6 @@ e6000sw_writephy(device_t dev, int phy, int reg, int d int err; sc = device_get_softc(dev); - val = 0; - if (!e6000sw_is_phyport(sc, phy) || reg >= E6000SW_NUM_PHY_REGS) { device_printf(dev, "Wrong register address.\n"); return (EINVAL); @@ -514,22 +487,20 @@ e6000sw_writephy(device_t dev, int phy, int reg, int d return (err); } + val = 1 << PHY_CMD_SMI_BUSY; val |= PHY_CMD_MODE_MDIO << PHY_CMD_MODE; - val |= 1 << PHY_CMD_SMI_BUSY; val |= PHY_CMD_OPCODE_WRITE << PHY_CMD_OPCODE; val |= (reg << PHY_CMD_REG_ADDR) & PHY_CMD_REG_ADDR_MASK; val |= (phy << PHY_CMD_DEV_ADDR) & PHY_CMD_DEV_ADDR_MASK; e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_DATA_REG, - data & PHY_DATA_MASK); + data & PHY_DATA_MASK); e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_CMD_REG, val); err = e6000sw_poll_done(sc); - if (err != 0) { + if (err != 0) device_printf(dev, "Timeout while waiting for switch\n"); - return (err); - } - return (0); + return (err); } static int @@ -589,18 +560,14 @@ e6000sw_getport(device_t dev, etherswitch_port_t *p) int err; struct ifmediareq *ifmr; - err = 0; e6000sw_softc_t *sc = device_get_softc(dev); E6000SW_LOCK_ASSERT(sc, SA_UNLOCKED); - E6000SW_LOCK(sc); + if (p->es_port >= sc->num_ports || p->es_port < 0) + return (EINVAL); - if (p->es_port >= sc->num_ports || - p->es_port < 0) { - err = EINVAL; - goto out; - } - + err = 0; + E6000SW_LOCK(sc); e6000sw_get_pvid(sc, p->es_port, &p->es_pvid); if (e6000sw_is_cpuport(sc, p->es_port)) { @@ -623,9 +590,8 @@ e6000sw_getport(device_t dev, etherswitch_port_t *p) err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, &mii->mii_media, SIOCGIFMEDIA); } - -out: E6000SW_UNLOCK(sc); + return (err); } @@ -636,18 +602,14 @@ e6000sw_setport(device_t dev, etherswitch_port_t *p) int err; struct mii_data *mii; - err = 0; sc = device_get_softc(dev); E6000SW_LOCK_ASSERT(sc, SA_UNLOCKED); - E6000SW_LOCK(sc); + if (p->es_port >= sc->num_ports || p->es_port < 0) + return (EINVAL); - if (p->es_port >= sc->num_ports || - p->es_port < 0) { - err = EINVAL; - goto out; - } - + err = 0; + E6000SW_LOCK(sc); if (p->es_pvid != 0) e6000sw_set_pvid(sc, p->es_port, p->es_pvid); if (!e6000sw_is_cpuport(sc, p->es_port)) { @@ -655,9 +617,8 @@ e6000sw_setport(device_t dev, etherswitch_port_t *p) err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, &mii->mii_media, SIOCSIFMEDIA); } - -out: E6000SW_UNLOCK(sc); + return (err); } @@ -773,12 +734,10 @@ e6000sw_flush_port(e6000sw_softc_t *sc, int port) { uint32_t reg; - reg = e6000sw_readreg(sc, REG_PORT(port), - PORT_VLAN_MAP); + reg = e6000sw_readreg(sc, REG_PORT(port), PORT_VLAN_MAP); reg &= ~PORT_VLAN_MAP_TABLE_MASK; reg &= ~PORT_VLAN_MAP_FID_MASK; - e6000sw_writereg(sc, REG_PORT(port), - PORT_VLAN_MAP, reg); + e6000sw_writereg(sc, REG_PORT(port), PORT_VLAN_MAP, reg); if (sc->vgroup[port] != E6000SW_PORT_NO_VGROUP) { /* * If port belonged somewhere, owner-group @@ -795,14 +754,12 @@ e6000sw_port_assign_vgroup(e6000sw_softc_t *sc, int po { uint32_t reg; - reg = e6000sw_readreg(sc, REG_PORT(port), - PORT_VLAN_MAP); + reg = e6000sw_readreg(sc, REG_PORT(port), PORT_VLAN_MAP); reg &= ~PORT_VLAN_MAP_TABLE_MASK; reg &= ~PORT_VLAN_MAP_FID_MASK; reg |= members & ~(1 << port); reg |= (fid << PORT_VLAN_MAP_FID) & PORT_VLAN_MAP_FID_MASK; - e6000sw_writereg(sc, REG_PORT(port), PORT_VLAN_MAP, - reg); + e6000sw_writereg(sc, REG_PORT(port), PORT_VLAN_MAP, reg); sc->vgroup[port] = vgroup; } @@ -897,19 +854,18 @@ e6000sw_ifmedia_sts(struct ifnet *ifp, struct ifmediar ifmr->ifm_status = mii->mii_media_status; } - static int e6000sw_smi_waitready(e6000sw_softc_t *sc, int phy) { int i; for (i = 0; i < E6000SW_SMI_TIMEOUT; i++) { - if ((MDIO_READ(sc->dev, phy, SMI_CMD) - & SMI_CMD_BUSY) == 0) - return 0; + if ((MDIO_READ(sc->dev, phy, SMI_CMD) & SMI_CMD_BUSY) == 0) + return (0); + DELAY(1); } - return 1; + return (1); } static __inline uint32_t @@ -925,8 +881,8 @@ e6000sw_readreg(e6000sw_softc_t *sc, int addr, int reg printf("e6000sw: readreg timeout\n"); return (0xffff); } - MDIO_WRITE(sc->dev, sc->sw_addr, SMI_CMD, SMI_CMD_OP_READ | - (addr << 5) | reg); + MDIO_WRITE(sc->dev, sc->sw_addr, SMI_CMD, + SMI_CMD_OP_READ | (addr << 5) | reg); if (e6000sw_smi_waitready(sc, sc->sw_addr)) { printf("e6000sw: readreg timeout\n"); return (0xffff); @@ -951,14 +907,12 @@ e6000sw_writereg(e6000sw_softc_t *sc, int addr, int re return; } MDIO_WRITE(sc->dev, sc->sw_addr, SMI_DATA, val); - MDIO_WRITE(sc->dev, sc->sw_addr, SMI_CMD, SMI_CMD_OP_WRITE | - (addr << 5) | reg); + MDIO_WRITE(sc->dev, sc->sw_addr, SMI_CMD, + SMI_CMD_OP_WRITE | (addr << 5) | reg); if (e6000sw_smi_waitready(sc, sc->sw_addr)) { printf("e6000sw: readreg timeout\n"); return; } - - return; } static __inline int Modified: head/sys/dev/etherswitch/e6000sw/e6000swreg.h ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000swreg.h Fri Jun 2 15:11:43 2017 (r319497) +++ head/sys/dev/etherswitch/e6000sw/e6000swreg.h Fri Jun 2 15:12:32 2017 (r319498) @@ -155,8 +155,6 @@ struct atu_opt { #define SMI_PHY_CMD_REG 0x18 #define SMI_PHY_DATA_REG 0x19 -#define PHY_CMD 0x18 -#define PHY_DATA 0x19 #define PHY_DATA_MASK 0xffff #define PHY_CMD_SMI_BUSY 15 From owner-svn-src-all@freebsd.org Fri Jun 2 15:32:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEBCCBF9C4D; Fri, 2 Jun 2017 15:32:12 +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 8F49066183; Fri, 2 Jun 2017 15:32:12 +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 v52FWBvt093067; Fri, 2 Jun 2017 15:32:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52FWBao093066; Fri, 2 Jun 2017 15:32:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201706021532.v52FWBao093066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 2 Jun 2017 15:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319499 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 15:32:12 -0000 Author: trasz Date: Fri Jun 2 15:32:11 2017 New Revision: 319499 URL: https://svnweb.freebsd.org/changeset/base/319499 Log: Consistently use lowercase hex numbers in ascii(7). MFC after: 2 weeks Modified: head/share/man/man7/ascii.7 Modified: head/share/man/man7/ascii.7 ============================================================================== --- head/share/man/man7/ascii.7 Fri Jun 2 15:12:32 2017 (r319498) +++ head/share/man/man7/ascii.7 Fri Jun 2 15:32:11 2017 (r319499) @@ -64,9 +64,9 @@ The set: .Bd -literal -offset left 00 NUL 01 SOH 02 STX 03 ETX 04 EOT 05 ENQ 06 ACK 07 BEL -08 BS 09 HT 0A LF 0B VT 0C FF 0D CR 0E SO 0F SI +08 BS 09 HT 0a LF 0b VT 0c FF 0d CR 0e SO 0f SI 10 DLE 11 DC1 12 DC2 13 DC3 14 DC4 15 NAK 16 SYN 17 ETB -18 CAN 19 EM 1A SUB 1B ESC 1C FS 1D GS 1E RS 1F US +18 CAN 19 EM 1a SUB 1b ESC 1c FS 1d GS 1e RS 1f US 20 SP 21 ! 22 " 23 # 24 $ 25 % 26 & 27 ' 28 ( 29 ) 2a * 2b + 2c , 2d - 2e . 2f / 30 0 31 1 32 2 33 3 34 4 35 5 36 6 37 7 From owner-svn-src-all@freebsd.org Fri Jun 2 16:30:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCA24BFACC6; Fri, 2 Jun 2017 16:30:41 +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 9D15268DC7; Fri, 2 Jun 2017 16:30:41 +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 v52GUeYv016829; Fri, 2 Jun 2017 16:30:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52GUeTM016828; Fri, 2 Jun 2017 16:30:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706021630.v52GUeTM016828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 2 Jun 2017 16:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319500 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 16:30:41 -0000 Author: hselasky Date: Fri Jun 2 16:30:40 2017 New Revision: 319500 URL: https://svnweb.freebsd.org/changeset/base/319500 Log: Add support for setting the non-blocking I/O flag for LinuxKPI character devices. In Linux the FIONBIO IOCTL is handled by the kernel and not the drivers. Also need return success for the FIOASYNC ioctl due to existing logic in kern_fcntl() even though it is not supported currently. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Jun 2 15:32:11 2017 (r319499) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Jun 2 16:30:40 2017 (r319500) @@ -826,6 +826,10 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t return (error); filp->f_flags = file->f_flag; + /* the LinuxKPI supports blocking and non-blocking I/O */ + if (cmd == FIONBIO || cmd == FIOASYNC) + return (0); + linux_set_current(td); size = IOCPARM_LEN(cmd); /* refer to logic in sys_ioctl() */ From owner-svn-src-all@freebsd.org Fri Jun 2 16:52:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9354BFB46F; Fri, 2 Jun 2017 16:52: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 A37946AC5F; Fri, 2 Jun 2017 16:52: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 v52GqITU028921; Fri, 2 Jun 2017 16:52:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52GqIS7028920; Fri, 2 Jun 2017 16:52:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706021652.v52GqIS7028920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 2 Jun 2017 16:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319501 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 16:52:19 -0000 Author: hselasky Date: Fri Jun 2 16:52:18 2017 New Revision: 319501 URL: https://svnweb.freebsd.org/changeset/base/319501 Log: Improve kqueue() support in the LinuxKPI. Some applications using the kqueue() does not set non-blocking I/O mode for event driven read of file descriptors. This means the LinuxKPI internal kqueue read and write event flags must be updated before the next read and/or write system call. Else the read and/or write system call may block. This can happen when there is no more data to read following a previous read event. Then the application also gets blocked from processing other events. This situation can also be solved by the applications setting and using non-blocking I/O mode. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Jun 2 16:30:40 2017 (r319500) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Jun 2 16:52:18 2017 (r319501) @@ -438,7 +438,7 @@ linux_kq_lock_unowned(void *arg) } static void -linux_dev_kqfilter_poll(struct linux_file *); +linux_dev_kqfilter_poll(struct linux_file *, int); struct linux_file * linux_file_alloc(void) @@ -856,9 +856,11 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t current->bsd_ioctl_len = 0; } - if (error == EWOULDBLOCK) - linux_dev_kqfilter_poll(filp); - else if (error == ERESTARTSYS) + if (error == EWOULDBLOCK) { + /* update kqfilter status, if any */ + linux_dev_kqfilter_poll(filp, + LINUX_KQ_FLAG_HAS_READ | LINUX_KQ_FLAG_HAS_WRITE); + } else if (error == ERESTARTSYS) error = ERESTART; return (error); } @@ -893,14 +895,15 @@ linux_dev_read(struct cdev *dev, struct uio *uio, int uio->uio_resid -= bytes; } else { error = -bytes; - if (error == EWOULDBLOCK) - linux_dev_kqfilter_poll(filp); - else if (error == ERESTARTSYS) + if (error == ERESTARTSYS) error = ERESTART; } } else error = ENXIO; + /* update kqfilter status, if any */ + linux_dev_kqfilter_poll(filp, LINUX_KQ_FLAG_HAS_READ); + return (error); } @@ -934,14 +937,15 @@ linux_dev_write(struct cdev *dev, struct uio *uio, int uio->uio_resid -= bytes; } else { error = -bytes; - if (error == EWOULDBLOCK) - linux_dev_kqfilter_poll(filp); - else if (error == ERESTARTSYS) + if (error == ERESTARTSYS) error = ERESTART; } } else error = ENXIO; + /* update kqfilter status, if any */ + linux_dev_kqfilter_poll(filp, LINUX_KQ_FLAG_HAS_WRITE); + return (error); } @@ -1032,21 +1036,20 @@ static struct filterops linux_dev_kqfiltops_write = { }; static void -linux_dev_kqfilter_poll(struct linux_file *filp) +linux_dev_kqfilter_poll(struct linux_file *filp, int kqflags) { int temp; - spin_lock(&filp->f_kqlock); - temp = (filp->f_kqflags & (LINUX_KQ_FLAG_HAS_READ | LINUX_KQ_FLAG_HAS_WRITE)); - filp->f_kqflags &= ~(LINUX_KQ_FLAG_NEED_READ | LINUX_KQ_FLAG_NEED_WRITE); - spin_unlock(&filp->f_kqlock); - - if (temp != 0) { + if (filp->f_kqflags & kqflags) { /* get the latest polling state */ temp = filp->f_op->poll(filp, NULL); + spin_lock(&filp->f_kqlock); + /* clear kqflags */ + filp->f_kqflags &= ~(LINUX_KQ_FLAG_NEED_READ | + LINUX_KQ_FLAG_NEED_WRITE); + /* update kqflags */ if (temp & (POLLIN | POLLOUT)) { - spin_lock(&filp->f_kqlock); if (temp & POLLIN) filp->f_kqflags |= LINUX_KQ_FLAG_NEED_READ; if (temp & POLLOUT) @@ -1054,8 +1057,8 @@ linux_dev_kqfilter_poll(struct linux_file *filp) /* make sure the "knote" gets woken up */ KNOTE_LOCKED(&filp->f_selinfo.si_note, 0); - spin_unlock(&filp->f_kqlock); } + spin_unlock(&filp->f_kqlock); } } @@ -1099,7 +1102,10 @@ linux_dev_kqfilter(struct cdev *dev, struct knote *kn) if (error == 0) { linux_set_current(td); - linux_dev_kqfilter_poll(filp); + + /* update kqfilter status, if any */ + linux_dev_kqfilter_poll(filp, + LINUX_KQ_FLAG_HAS_READ | LINUX_KQ_FLAG_HAS_WRITE); } return (error); } From owner-svn-src-all@freebsd.org Fri Jun 2 17:31:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C79E7BFBE13; Fri, 2 Jun 2017 17:31:26 +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 A19E26EB51; Fri, 2 Jun 2017 17:31:26 +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 v52HVPj3043370; Fri, 2 Jun 2017 17:31:25 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52HVPFx043365; Fri, 2 Jun 2017 17:31:25 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706021731.v52HVPFx043365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 2 Jun 2017 17:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319502 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 17:31:26 -0000 Author: glebius Date: Fri Jun 2 17:31:25 2017 New Revision: 319502 URL: https://svnweb.freebsd.org/changeset/base/319502 Log: For UNIX sockets make vnode point not to the socket, but to the UNIX PCB, since the latter is the thing that links together VFS and sockets. While here, make the union in the struct vnode anonymous. Modified: head/sys/kern/uipc_usrreq.c head/sys/kern/vfs_default.c head/sys/kern/vfs_subr.c head/sys/kern/vnode_if.src head/sys/sys/vnode.h Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Fri Jun 2 16:52:18 2017 (r319501) +++ head/sys/kern/uipc_usrreq.c Fri Jun 2 17:31:25 2017 (r319502) @@ -552,7 +552,7 @@ restart: UNP_LINK_WLOCK(); UNP_PCB_LOCK(unp); - VOP_UNP_BIND(vp, unp->unp_socket); + VOP_UNP_BIND(vp, unp); unp->unp_vnode = vp; unp->unp_addr = soun; unp->unp_flags &= ~UNP_BINDING; @@ -670,9 +670,6 @@ uipc_detach(struct socket *so) UNP_LINK_WLOCK(); UNP_PCB_LOCK(unp); - /* - * XXXRW: Should assert vp->v_socket == so. - */ if ((vp = unp->unp_vnode) != NULL) { VOP_UNP_DETACH(vp); unp->unp_vnode = NULL; @@ -1386,11 +1383,12 @@ unp_connectat(int fd, struct socket *so, struct sockad * and to protect simultaneous locking of multiple pcbs. */ UNP_LINK_WLOCK(); - VOP_UNP_CONNECT(vp, &so2); - if (so2 == NULL) { + VOP_UNP_CONNECT(vp, &unp2); + if (unp2 == NULL) { error = ECONNREFUSED; goto bad2; } + so2 = unp2->unp_socket; if (so->so_type != so2->so_type) { error = EPROTOTYPE; goto bad2; @@ -2454,7 +2452,6 @@ unp_scan(struct mbuf *m0, void (*op)(struct filedescen void vfs_unp_reclaim(struct vnode *vp) { - struct socket *so; struct unpcb *unp; int active; @@ -2464,10 +2461,7 @@ vfs_unp_reclaim(struct vnode *vp) active = 0; UNP_LINK_WLOCK(); - VOP_UNP_CONNECT(vp, &so); - if (so == NULL) - goto done; - unp = sotounpcb(so); + VOP_UNP_CONNECT(vp, &unp); if (unp == NULL) goto done; UNP_PCB_LOCK(unp); Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Fri Jun 2 16:52:18 2017 (r319501) +++ head/sys/kern/vfs_default.c Fri Jun 2 17:31:25 2017 (r319502) @@ -1128,7 +1128,7 @@ int vop_stdunp_bind(struct vop_unp_bind_args *ap) { - ap->a_vp->v_socket = ap->a_socket; + ap->a_vp->v_unpcb = ap->a_unpcb; return (0); } @@ -1136,7 +1136,7 @@ int vop_stdunp_connect(struct vop_unp_connect_args *ap) { - *ap->a_socket = ap->a_vp->v_socket; + *ap->a_unpcb = ap->a_vp->v_unpcb; return (0); } @@ -1144,7 +1144,7 @@ int vop_stdunp_detach(struct vop_unp_detach_args *ap) { - ap->a_vp->v_socket = NULL; + ap->a_vp->v_unpcb = NULL; return (0); } Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Jun 2 16:52:18 2017 (r319501) +++ head/sys/kern/vfs_subr.c Fri Jun 2 17:31:25 2017 (r319502) @@ -2994,7 +2994,10 @@ _vdrop(struct vnode *vp, bool locked) /* XXX Elsewhere we detect an already freed vnode via NULL v_op. */ vp->v_op = NULL; #endif - bzero(&vp->v_un, sizeof(vp->v_un)); + vp->v_mountedhere = NULL; + vp->v_unpcb = NULL; + vp->v_rdev = NULL; + vp->v_fifoinfo = NULL; vp->v_lasta = vp->v_clen = vp->v_cstart = vp->v_lastw = 0; vp->v_iflag = 0; vp->v_vflag = 0; Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Fri Jun 2 16:52:18 2017 (r319501) +++ head/sys/kern/vnode_if.src Fri Jun 2 17:31:25 2017 (r319502) @@ -662,7 +662,7 @@ vop_advise { vop_unp_bind { IN struct vnode *vp; - IN struct socket *socket; + IN struct unpcb *unpcb; }; @@ -670,7 +670,7 @@ vop_unp_bind { vop_unp_connect { IN struct vnode *vp; - OUT struct socket **socket; + OUT struct unpcb **unpcb; }; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Jun 2 16:52:18 2017 (r319501) +++ head/sys/sys/vnode.h Fri Jun 2 17:31:25 2017 (r319502) @@ -112,14 +112,13 @@ struct vnode { /* * Type specific fields, only one applies to any given vnode. - * See #defines below for renaming to v_* namespace. */ union { - struct mount *vu_mount; /* v ptr to mountpoint (VDIR) */ - struct socket *vu_socket; /* v unix domain net (VSOCK) */ - struct cdev *vu_cdev; /* v device (VCHR, VBLK) */ - struct fifoinfo *vu_fifoinfo; /* v fifo (VFIFO) */ - } v_un; + struct mount *v_mountedhere; /* v ptr to mountpoint (VDIR) */ + struct unpcb *v_unpcb; /* v unix domain net (VSOCK) */ + struct cdev *v_rdev; /* v device (VCHR, VBLK) */ + struct fifoinfo *v_fifoinfo; /* v fifo (VFIFO) */ + }; /* * vfs_hash: (mount + inode) -> vnode hash. The hash value @@ -175,11 +174,6 @@ struct vnode { #endif /* defined(_KERNEL) || defined(_KVM_VNODE) */ -#define v_mountedhere v_un.vu_mount -#define v_socket v_un.vu_socket -#define v_rdev v_un.vu_cdev -#define v_fifoinfo v_un.vu_fifoinfo - #define bo2vnode(bo) __containerof((bo), struct vnode, v_bufobj) /* XXX: These are temporary to avoid a source sweep at this time */ @@ -200,7 +194,7 @@ struct xvnode { long xv_numoutput; /* num of writes in progress */ enum vtype xv_type; /* vnode type */ union { - void *xvu_socket; /* socket, if VSOCK */ + void *xvu_socket; /* unpcb, if VSOCK */ void *xvu_fifo; /* fifo, if VFIFO */ dev_t xvu_rdev; /* maj/min, if VBLK/VCHR */ struct { From owner-svn-src-all@freebsd.org Fri Jun 2 17:39:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F1FBFBEB0; Fri, 2 Jun 2017 17:39:06 +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 2C0656EF4C; Fri, 2 Jun 2017 17:39:06 +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 v52Hd5s9045501; Fri, 2 Jun 2017 17:39:05 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52Hd5Js045499; Fri, 2 Jun 2017 17:39:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706021739.v52Hd5Js045499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 2 Jun 2017 17:39:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319503 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 17:39:06 -0000 Author: glebius Date: Fri Jun 2 17:39:05 2017 New Revision: 319503 URL: https://svnweb.freebsd.org/changeset/base/319503 Log: Remove write only flag UNP_HAVEPCCACHED. Modified: head/sys/kern/uipc_usrreq.c head/sys/sys/unpcb.h Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Fri Jun 2 17:31:25 2017 (r319502) +++ head/sys/kern/uipc_usrreq.c Fri Jun 2 17:39:05 2017 (r319503) @@ -758,7 +758,6 @@ uipc_listen(struct socket *so, int backlog, struct thr error = solisten_proto_check(so); if (error == 0) { cru2x(td->td_ucred, &unp->unp_peercred); - unp->unp_flags |= UNP_HAVEPCCACHED; solisten_proto(so, backlog); } SOCK_UNLOCK(so); @@ -1429,8 +1428,6 @@ unp_connectat(int fd, struct socket *so, struct sockad * listen(); uipc_listen() cached that process's credentials * at that time so we can use them now. */ - KASSERT(unp2->unp_flags & UNP_HAVEPCCACHED, - ("unp_connect: listener without cached peercred")); memcpy(&unp->unp_peercred, &unp2->unp_peercred, sizeof(unp->unp_peercred)); unp->unp_flags |= UNP_HAVEPC; @@ -2495,10 +2492,6 @@ db_print_unpflags(int unp_flags) comma = 0; if (unp_flags & UNP_HAVEPC) { db_printf("%sUNP_HAVEPC", comma ? ", " : ""); - comma = 1; - } - if (unp_flags & UNP_HAVEPCCACHED) { - db_printf("%sUNP_HAVEPCCACHED", comma ? ", " : ""); comma = 1; } if (unp_flags & UNP_WANTCRED) { Modified: head/sys/sys/unpcb.h ============================================================================== --- head/sys/sys/unpcb.h Fri Jun 2 17:31:25 2017 (r319502) +++ head/sys/sys/unpcb.h Fri Jun 2 17:39:05 2017 (r319503) @@ -92,14 +92,8 @@ struct unpcb { * and is really the credentials of the connected peer. This is used * to determine whether the contents should be sent to the user or * not. - * - * UNP_HAVEPCCACHED - indicates that the unp_peercred member is filled - * in, but does *not* contain the credentials of the connected peer - * (there may not even be a peer). This is set in unp_listen() when - * it fills in unp_peercred for later consumption by unp_connect(). */ #define UNP_HAVEPC 0x001 -#define UNP_HAVEPCCACHED 0x002 #define UNP_WANTCRED 0x004 /* credentials wanted */ #define UNP_CONNWAIT 0x008 /* connect blocks until accepted */ From owner-svn-src-all@freebsd.org Fri Jun 2 17:43:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D565DAF80CC; Fri, 2 Jun 2017 17:43:48 +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 A4CAF6F423; Fri, 2 Jun 2017 17:43:48 +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 v52HhlrB049505; Fri, 2 Jun 2017 17:43:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52HhlZe049504; Fri, 2 Jun 2017 17:43:47 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706021743.v52HhlZe049504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 2 Jun 2017 17:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319504 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 17:43:48 -0000 Author: glebius Date: Fri Jun 2 17:43:47 2017 New Revision: 319504 URL: https://svnweb.freebsd.org/changeset/base/319504 Log: Style: unwrap lines that doesn't have a good reason to be wrapped. Modified: head/sys/kern/uipc_accf.c Modified: head/sys/kern/uipc_accf.c ============================================================================== --- head/sys/kern/uipc_accf.c Fri Jun 2 17:39:05 2017 (r319503) +++ head/sys/kern/uipc_accf.c Fri Jun 2 17:43:47 2017 (r319504) @@ -130,8 +130,7 @@ accept_filt_generic_mod_event(module_t mod, int event, switch (event) { case MOD_LOAD: - p = malloc(sizeof(*p), M_ACCF, - M_WAITOK); + p = malloc(sizeof(*p), M_ACCF, M_WAITOK); bcopy(accfp, p, sizeof(*p)); error = accept_filt_add(p); break; @@ -168,8 +167,7 @@ do_getopt_accept_filter(struct socket *so, struct sock int error; error = 0; - afap = malloc(sizeof(*afap), M_TEMP, - M_WAITOK | M_ZERO); + afap = malloc(sizeof(*afap), M_TEMP, M_WAITOK | M_ZERO); SOCK_LOCK(so); if ((so->so_options & SO_ACCEPTCONN) == 0) { error = EINVAL; @@ -227,8 +225,7 @@ do_setopt_accept_filter(struct socket *so, struct sock * Pre-allocate any memory we may need later to avoid blocking at * untimely moments. This does not optimize for invalid arguments. */ - afap = malloc(sizeof(*afap), M_TEMP, - M_WAITOK); + afap = malloc(sizeof(*afap), M_TEMP, M_WAITOK); error = sooptcopyin(sopt, afap, sizeof *afap, sizeof *afap); afap->af_name[sizeof(afap->af_name)-1] = '\0'; afap->af_arg[sizeof(afap->af_arg)-1] = '\0'; @@ -247,12 +244,10 @@ do_setopt_accept_filter(struct socket *so, struct sock * attached properly, 'newaf' is NULLed to avoid a free() * while in use. */ - newaf = malloc(sizeof(*newaf), M_ACCF, M_WAITOK | - M_ZERO); + newaf = malloc(sizeof(*newaf), M_ACCF, M_WAITOK | M_ZERO); if (afp->accf_create != NULL && afap->af_name[0] != '\0') { size_t len = strlen(afap->af_name) + 1; - newaf->so_accept_filter_str = malloc(len, M_ACCF, - M_WAITOK); + newaf->so_accept_filter_str = malloc(len, M_ACCF, M_WAITOK); strcpy(newaf->so_accept_filter_str, afap->af_name); } From owner-svn-src-all@freebsd.org Fri Jun 2 17:49:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2F97AF8176; Fri, 2 Jun 2017 17:49:22 +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 CA0596F5E9; Fri, 2 Jun 2017 17:49:22 +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 v52HnLcF049737; Fri, 2 Jun 2017 17:49:21 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52HnLsj049734; Fri, 2 Jun 2017 17:49:21 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706021749.v52HnLsj049734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 2 Jun 2017 17:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319505 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 17:49:23 -0000 Author: glebius Date: Fri Jun 2 17:49:21 2017 New Revision: 319505 URL: https://svnweb.freebsd.org/changeset/base/319505 Log: Rename accept filter getopt/setopt functions, so that they are prefixed with module name and match other functions in the module. There is no functional change. Modified: head/sys/kern/uipc_accf.c head/sys/kern/uipc_socket.c head/sys/sys/sockopt.h Modified: head/sys/kern/uipc_accf.c ============================================================================== --- head/sys/kern/uipc_accf.c Fri Jun 2 17:43:47 2017 (r319504) +++ head/sys/kern/uipc_accf.c Fri Jun 2 17:49:21 2017 (r319505) @@ -161,7 +161,7 @@ accept_filt_generic_mod_event(module_t mod, int event, } int -do_getopt_accept_filter(struct socket *so, struct sockopt *sopt) +accept_filt_getopt(struct socket *so, struct sockopt *sopt) { struct accept_filter_arg *afap; int error; @@ -189,7 +189,7 @@ out: } int -do_setopt_accept_filter(struct socket *so, struct sockopt *sopt) +accept_filt_setopt(struct socket *so, struct sockopt *sopt) { struct accept_filter_arg *afap; struct accept_filter *afp; Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Fri Jun 2 17:43:47 2017 (r319504) +++ head/sys/kern/uipc_socket.c Fri Jun 2 17:49:21 2017 (r319505) @@ -452,7 +452,7 @@ sodealloc(struct socket *so) &so->so_snd.sb_hiwat, 0, RLIM_INFINITY); /* remove accept filter if one is present. */ if (so->so_accf != NULL) - do_setopt_accept_filter(so, NULL); + accept_filt_setopt(so, NULL); #ifdef MAC mac_socket_destroy(so); #endif @@ -2526,7 +2526,7 @@ sosetopt(struct socket *so, struct sockopt *sopt) } else { switch (sopt->sopt_name) { case SO_ACCEPTFILTER: - error = do_setopt_accept_filter(so, sopt); + error = accept_filt_setopt(so, sopt); if (error) goto bad; break; @@ -2784,7 +2784,7 @@ sogetopt(struct socket *so, struct sockopt *sopt) } else { switch (sopt->sopt_name) { case SO_ACCEPTFILTER: - error = do_getopt_accept_filter(so, sopt); + error = accept_filt_getopt(so, sopt); break; case SO_LINGER: Modified: head/sys/sys/sockopt.h ============================================================================== --- head/sys/sys/sockopt.h Fri Jun 2 17:43:47 2017 (r319504) +++ head/sys/sys/sockopt.h Fri Jun 2 17:49:21 2017 (r319505) @@ -64,8 +64,8 @@ int sooptcopyout(struct sockopt *sopt, const void *buf int soopt_getm(struct sockopt *sopt, struct mbuf **mp); int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m); int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m); -int do_getopt_accept_filter(struct socket *so, struct sockopt *sopt); -int do_setopt_accept_filter(struct socket *so, struct sockopt *sopt); +int accept_filt_getopt(struct socket *, struct sockopt *); +int accept_filt_setopt(struct socket *, struct sockopt *); int so_setsockopt(struct socket *so, int level, int optname, void *optval, size_t optlen); From owner-svn-src-all@freebsd.org Fri Jun 2 17:57:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC1B4AF83E0; Fri, 2 Jun 2017 17:57:28 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE376FAD5; Fri, 2 Jun 2017 17:57:28 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v52HvRfp053606; Fri, 2 Jun 2017 17:57:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52HvRW1053605; Fri, 2 Jun 2017 17:57:27 GMT (envelope-from np@FreeBSD.org) Message-Id: <201706021757.v52HvRW1053605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 2 Jun 2017 17:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319506 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 17:57:28 -0000 Author: np Date: Fri Jun 2 17:57:27 2017 New Revision: 319506 URL: https://svnweb.freebsd.org/changeset/base/319506 Log: cxgbe(4): Update the statistics for compound tx work requests once per work request, not once per frame. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Jun 2 17:49:21 2017 (r319505) +++ head/sys/dev/cxgbe/t4_sge.c Fri Jun 2 17:57:27 2017 (r319506) @@ -4581,12 +4581,8 @@ write_txpkts_wr(struct sge_txq *txq, struct fw_eth_tx_ if (checkwrap && (uintptr_t)cpl == (uintptr_t)&eq->desc[eq->sidx]) cpl = (void *)&eq->desc[0]; - txq->txpkts0_pkts += txp->npkt; - txq->txpkts0_wrs++; } else { cpl = flitp; - txq->txpkts1_pkts += txp->npkt; - txq->txpkts1_wrs++; } /* Checksum offload */ @@ -4619,6 +4615,14 @@ write_txpkts_wr(struct sge_txq *txq, struct fw_eth_tx_ write_gl_to_txd(txq, m, (caddr_t *)(&flitp), checkwrap); + } + + if (txp->wr_type == 0) { + txq->txpkts0_pkts += txp->npkt; + txq->txpkts0_wrs++; + } else { + txq->txpkts1_pkts += txp->npkt; + txq->txpkts1_wrs++; } txsd = &txq->sdesc[eq->pidx]; From owner-svn-src-all@freebsd.org Fri Jun 2 18:39:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29009AF955B; Fri, 2 Jun 2017 18:39:55 +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 F414D72F4A; Fri, 2 Jun 2017 18:39:54 +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 v52IdsG2074483; Fri, 2 Jun 2017 18:39:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52IdrZJ074478; Fri, 2 Jun 2017 18:39:53 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706021839.v52IdrZJ074478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 2 Jun 2017 18:39:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319507 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 18:39:55 -0000 Author: emaste Date: Fri Jun 2 18:39:53 2017 New Revision: 319507 URL: https://svnweb.freebsd.org/changeset/base/319507 Log: msdosfs: use mem{cpy,move,set} instead of bcopy,bzero This somewhat simplifies use of msdosfs code in userland (for makefs), reduces diffs with NetBSD and is standard C as of C89. Reviewed by: imp MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11014 Modified: head/sys/fs/msdosfs/denode.h head/sys/fs/msdosfs/msdosfs_conv.c head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_vnops.c Modified: head/sys/fs/msdosfs/denode.h ============================================================================== --- head/sys/fs/msdosfs/denode.h Fri Jun 2 17:57:27 2017 (r319506) +++ head/sys/fs/msdosfs/denode.h Fri Jun 2 18:39:53 2017 (r319507) @@ -179,7 +179,7 @@ struct denode { #define DE_INTERNALIZE32(dep, dp) \ ((dep)->de_StartCluster |= getushort((dp)->deHighClust) << 16) #define DE_INTERNALIZE(dep, dp) \ - (bcopy((dp)->deName, (dep)->de_Name, 11), \ + (memcpy((dep)->de_Name, (dp)->deName, 11), \ (dep)->de_Attributes = (dp)->deAttributes, \ (dep)->de_LowerCase = (dp)->deLowerCase, \ (dep)->de_CHun = (dp)->deCHundredth, \ @@ -193,7 +193,7 @@ struct denode { (FAT32((dep)->de_pmp) ? DE_INTERNALIZE32((dep), (dp)) : 0)) #define DE_EXTERNALIZE(dp, dep) \ - (bcopy((dep)->de_Name, (dp)->deName, 11), \ + (memcpy((dp)->deName, (dep)->de_Name, 11), \ (dp)->deAttributes = (dep)->de_Attributes, \ (dp)->deLowerCase = (dep)->de_LowerCase, \ (dp)->deCHundredth = (dep)->de_CHun, \ Modified: head/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_conv.c Fri Jun 2 17:57:27 2017 (r319506) +++ head/sys/fs/msdosfs/msdosfs_conv.c Fri Jun 2 18:39:53 2017 (r319507) @@ -536,7 +536,7 @@ unix2winfn(const u_char *un, size_t unlen, struct wine /* * Initialize winentry to some useful default */ - for (wcp = (uint8_t *)wep, i = sizeof(*wep); --i >= 0; *wcp++ = 0xff); + memset(wep, 0xff, sizeof(*wep)); wep->weCnt = cnt; wep->weAttributes = ATTR_WIN95; wep->weReserved1 = 0; @@ -1043,11 +1043,11 @@ mbnambuf_write(struct mbnambuf *nbp, char *name, int i sizeof(nbp->nb_buf)) return (ENAMETOOLONG); - bcopy(slot + WIN_CHARS, slot + count, nbp->nb_len); + memmove(slot + count, slot + WIN_CHARS, nbp->nb_len); } /* Copy in the substring to its slot and update length so far. */ - bcopy(name, slot, count); + memcpy(slot, name, count); nbp->nb_len = newlen; nbp->nb_last_id = id; @@ -1069,7 +1069,7 @@ mbnambuf_flush(struct mbnambuf *nbp, struct dirent *dp mbnambuf_init(nbp); return (NULL); } - bcopy(&nbp->nb_buf[0], dp->d_name, nbp->nb_len); + memcpy(dp->d_name, &nbp->nb_buf[0], nbp->nb_len); dp->d_name[nbp->nb_len] = '\0'; dp->d_namlen = nbp->nb_len; Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Fri Jun 2 17:57:27 2017 (r319506) +++ head/sys/fs/msdosfs/msdosfs_denode.c Fri Jun 2 18:39:53 2017 (r319507) @@ -410,7 +410,7 @@ detrunc(struct denode *dep, u_long length, int flags, #endif return (error); } - bzero(bp->b_data + boff, pmp->pm_bpcluster - boff); + memset(bp->b_data + boff, 0, pmp->pm_bpcluster - boff); if (flags & IO_SYNC) bwrite(bp); else Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Fri Jun 2 17:57:27 2017 (r319506) +++ head/sys/fs/msdosfs/msdosfs_fat.c Fri Jun 2 18:39:53 2017 (r319507) @@ -335,7 +335,7 @@ updatefats(struct msdosfsmount *pmp, struct buf *bp, u /* getblk() never fails */ bpn = getblk(pmp->pm_devvp, fatbn, bp->b_bcount, 0, 0, 0); - bcopy(bp->b_data, bpn->b_data, bp->b_bcount); + memcpy(bpn->b_data, bp->b_data, bp->b_bcount); /* Force the clean bit on in the other copies. */ if (cleanfat == 16) ((uint8_t *)bpn->b_data)[3] |= 0x80; Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Fri Jun 2 17:57:27 2017 (r319506) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Fri Jun 2 18:39:53 2017 (r319507) @@ -165,7 +165,7 @@ msdosfs_create(struct vop_create_args *ap) if ((cnp->cn_flags & HASBUF) == 0) panic("msdosfs_create: no name"); #endif - bzero(&ndirent, sizeof(ndirent)); + memset(&ndirent, 0, sizeof(ndirent)); error = uniqdosname(pdep, cnp, ndirent.de_Name); if (error) goto bad; @@ -1156,13 +1156,13 @@ abortit: * we moved a directory, then update its .. entry to point * to the new parent directory. */ - bcopy(ip->de_Name, oldname, 11); - bcopy(toname, ip->de_Name, 11); /* update denode */ + memcpy(oldname, ip->de_Name, 11); + memcpy(ip->de_Name, toname, 11); /* update denode */ dp->de_fndoffset = to_diroffset; dp->de_fndcnt = to_count; error = createde(ip, dp, (struct denode **)0, tcnp); if (error) { - bcopy(oldname, ip->de_Name, 11); + memcpy(ip->de_Name, oldname, 11); if (newparent) VOP_UNLOCK(fdvp, 0); VOP_UNLOCK(fvp, 0); @@ -1178,7 +1178,7 @@ abortit: * to pass the correct name to createde(). Undo this. */ if ((ip->de_Attributes & ATTR_DIRECTORY) != 0) - bcopy(oldname, ip->de_Name, 11); + memcpy(ip->de_Name, oldname, 11); ip->de_refcnt++; zp->de_fndoffset = from_diroffset; error = removede(zp, ip); @@ -1324,7 +1324,7 @@ msdosfs_mkdir(struct vop_mkdir_args *ap) if (error) goto bad2; - bzero(&ndirent, sizeof(ndirent)); + memset(&ndirent, 0, sizeof(ndirent)); ndirent.de_pmp = pmp; ndirent.de_flag = DE_ACCESS | DE_CREATE | DE_UPDATE; getnanotime(&ts); @@ -1338,8 +1338,8 @@ msdosfs_mkdir(struct vop_mkdir_args *ap) bn = cntobn(pmp, newcluster); /* always succeeds */ bp = getblk(pmp->pm_devvp, bn, pmp->pm_bpcluster, 0, 0, 0); - bzero(bp->b_data, pmp->pm_bpcluster); - bcopy(&dosdirtemplate, bp->b_data, sizeof dosdirtemplate); + memset(bp->b_data, 0, pmp->pm_bpcluster); + memcpy(bp->b_data, &dosdirtemplate, sizeof dosdirtemplate); denp = (struct direntry *)bp->b_data; putushort(denp[0].deStartCluster, newcluster); putushort(denp[0].deCDate, ndirent.de_CDate); @@ -1504,7 +1504,7 @@ msdosfs_readdir(struct vop_readdir_args *ap) /* * To be safe, initialize dirbuf */ - bzero(dirbuf.d_name, sizeof(dirbuf.d_name)); + memset(dirbuf.d_name, 0, sizeof(dirbuf.d_name)); /* * If the user buffer is smaller than the size of one dos directory From owner-svn-src-all@freebsd.org Fri Jun 2 19:40:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D420AFA3C8 for ; Fri, 2 Jun 2017 19:40:36 +0000 (UTC) (envelope-from 0100015c6a52c6a9-195e4183-974c-4050-b361-592917f43f8d-000000@amazonses.com) Received: from a8-56.smtp-out.amazonses.com (a8-56.smtp-out.amazonses.com [54.240.8.56]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 315BC74F0B for ; Fri, 2 Jun 2017 19:40:35 +0000 (UTC) (envelope-from 0100015c6a52c6a9-195e4183-974c-4050-b361-592917f43f8d-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ae7m2yrxjw65l2cqdpjxuucyrvy564tn; d=tarsnap.com; t=1496432429; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=0mVBrsGAyI7XcG2eK0US9wzIHW2/7FBUZJzaf4f2U/c=; b=GUMlD7MIKKKZmqpI+pebaXL3M0SdD65csuIhOW10+TdBowuR9OTF6tITDihXxKPz aceUqi/NR/Db9paZwZFbZ85WlEXNeqLqCyYXTkVRNbYjIc/z8DWva7yVQGBg+cvFwks QFZn2EkdcgQYaeDLKy81kOFH8aakRhNYHjZUeHoc= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1496432429; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=0mVBrsGAyI7XcG2eK0US9wzIHW2/7FBUZJzaf4f2U/c=; b=b3px8bsW6OJ4XR3FS7fFXGX5M8vFyM1HiGbjlGe7Xy6rIPQ7p0wuq9XoGXtTOe84 Eyep16SveIAgJzdxm72kdumadBjQGU98QFGwO5eKmGelrkSBSoaWN1LLu1gEQ5FOOJK Df98qMup0tcuHK/182pJjc4SOtMT8ykc7yZKJiao= Subject: Re: svn commit: r319491 - head/sys/dev/xen/netfront To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <201706020703.v5273V5A085287@repo.freebsd.org> <20170602102922.stlu47ceumggu6o7@dhcp-3-128.uk.xensource.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Colin Percival Message-ID: <0100015c6a52c6a9-195e4183-974c-4050-b361-592917f43f8d-000000@email.amazonses.com> Date: Fri, 2 Jun 2017 19:40:28 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170602102922.stlu47ceumggu6o7@dhcp-3-128.uk.xensource.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-SES-Outgoing: 2017.06.02-54.240.8.56 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 19:40:36 -0000 On 06/02/17 03:29, Roger Pau Monn� wrote: > On Fri, Jun 02, 2017 at 07:03:31AM +0000, Colin Percival wrote: >> Skip setting the MTU in the netfront driver (xn# devices) if the new MTU >> is the same as the old MTU. [...] >> Maintainers of other network interface drivers may wish to consider making >> the corresponding change; the handling of SIOCSIFMTU does not seem to >> exhibit a great deal of consistency between drivers. > > Is there any reason this check (ifp->if_mtu == ifr->ifr_mtu) is not > done at a higher level for all the drivers? It seems pointless to add > this chunk everywhere. I wondered about that. Some drivers already do this (if_sk, if_age, if_jme, if_tx, if_bge, if_vge, ...) but every driver seems to spell it differently; and many drivers do things beyond merely recording the new value and re-initializing. I certainly have no objection to seeing a more generic handling of interface MTU setting, but I don't know enough about the network stack to do this myself. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@freebsd.org Fri Jun 2 20:25:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D484FAFAEA2; Fri, 2 Jun 2017 20:25:26 +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 A370176527; Fri, 2 Jun 2017 20:25:26 +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 v52KPPW8020225; Fri, 2 Jun 2017 20:25:25 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52KPPuT020224; Fri, 2 Jun 2017 20:25:25 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201706022025.v52KPPuT020224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Fri, 2 Jun 2017 20:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319508 - head/usr.bin/last X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 20:25:26 -0000 Author: stevek Date: Fri Jun 2 20:25:25 2017 New Revision: 319508 URL: https://svnweb.freebsd.org/changeset/base/319508 Log: Fix a memory leak with last free memory allocated to 'buf' Submitted by: Thomas Rix Reviewed by: ed Approved by: sjg (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9850 Modified: head/usr.bin/last/last.c Modified: head/usr.bin/last/last.c ============================================================================== --- head/usr.bin/last/last.c Fri Jun 2 18:39:53 2017 (r319507) +++ head/usr.bin/last/last.c Fri Jun 2 20:25:25 2017 (r319508) @@ -243,7 +243,7 @@ wtmp(void) /* Display them in reverse order. */ while (amount > 0) doentry(&buf[--amount]); - + free(buf); tm = localtime(&t); (void) strftime(ct, sizeof(ct), "%+", tm); printf("\n%s begins %s\n", ((file == NULL) ? "utx.log" : file), ct); From owner-svn-src-all@freebsd.org Fri Jun 2 22:35:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DCD5AFC725; Fri, 2 Jun 2017 22:35:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A20A792FD; Fri, 2 Jun 2017 22:35:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v52MZIYj072442; Fri, 2 Jun 2017 22:35:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52MZI2b072440; Fri, 2 Jun 2017 22:35:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706022235.v52MZI2b072440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 2 Jun 2017 22:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319509 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 22:35:19 -0000 Author: jhb Date: Fri Jun 2 22:35:18 2017 New Revision: 319509 URL: https://svnweb.freebsd.org/changeset/base/319509 Log: Decode the argument passed to cap_getmode(). The returned integer value is output. Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Fri Jun 2 20:25:25 2017 (r319508) +++ head/usr.bin/truss/syscall.h Fri Jun 2 22:35:18 2017 (r319509) @@ -48,7 +48,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHe Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel, - Sockoptname, Msgflags, CapRights, + Sockoptname, Msgflags, CapRights, PUInt, CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Fri Jun 2 20:25:25 2017 (r319508) +++ head/usr.bin/truss/syscalls.c Fri Jun 2 22:35:18 2017 (r319509) @@ -99,6 +99,8 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 }, { CapFcntlRights | OUT, 1 } } }, { .name = "cap_fcntls_limit", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { CapFcntlRights, 1 } } }, + { .name = "cap_getmode", .ret_type = 1, .nargs = 1, + .args = { { PUInt | OUT, 0 } } }, { .name = "cap_rights_limit", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { CapRights, 1 } } }, { .name = "chdir", .ret_type = 1, .nargs = 1, @@ -1190,6 +1192,16 @@ print_arg(struct syscall_args *sc, unsigned long *args case UInt: fprintf(fp, "%u", (unsigned int)args[sc->offset]); break; + case PUInt: { + unsigned int val; + + if (get_struct(pid, (void *)args[sc->offset], &val, + sizeof(val)) == 0) + fprintf(fp, "{ %u }", val); + else + fprintf(fp, "0x%lx", args[sc->offset]); + break; + } case LongHex: fprintf(fp, "0x%lx", args[sc->offset]); break; From owner-svn-src-all@freebsd.org Sat Jun 3 02:47:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2370B7BF05; Sat, 3 Jun 2017 02:47:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE3D080218; Sat, 3 Jun 2017 02:47:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v532lU4K072292; Sat, 3 Jun 2017 02:47:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v532lU28072291; Sat, 3 Jun 2017 02:47:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706030247.v532lU28072291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 3 Jun 2017 02:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319511 - stable/10/sys/dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 02:47:32 -0000 Author: emaste Date: Sat Jun 3 02:47:30 2017 New Revision: 319511 URL: https://svnweb.freebsd.org/changeset/base/319511 Log: MFC r318974: uart: add AMT SOL PCI ID I adjusted the description to be similar to existing AMT entries. PR: 219384 Modified: stable/10/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_pci.c Sat Jun 3 02:42:49 2017 (r319510) +++ stable/10/sys/dev/uart/uart_bus_pci.c Sat Jun 3 02:47:30 2017 (r319511) @@ -118,6 +118,7 @@ static const struct pci_id pci_ns8250_ids[] = { { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5xxxx Serial Port", 0x10, 8 * DEFAULT_RCLK }, +{ 0x8086, 0x108f, 0xffff, 0, "Intel AMT - SOL", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, From owner-svn-src-all@freebsd.org Sat Jun 3 02:42:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99D76B7BBE3; Sat, 3 Jun 2017 02:42:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 662CC7FFAC; Sat, 3 Jun 2017 02:42:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v532gnXG072042; Sat, 3 Jun 2017 02:42:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v532gni4072040; Sat, 3 Jun 2017 02:42:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706030242.v532gni4072040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 3 Jun 2017 02:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319510 - head/contrib/xz/src/liblzma/check X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 02:42:50 -0000 Author: emaste Date: Sat Jun 3 02:42:49 2017 New Revision: 319510 URL: https://svnweb.freebsd.org/changeset/base/319510 Log: xz: set noexec stack flag on FreeBSD Will also be proposed upstream. Reviewed by: delphij Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11033 Modified: head/contrib/xz/src/liblzma/check/crc32_x86.S head/contrib/xz/src/liblzma/check/crc64_x86.S Modified: head/contrib/xz/src/liblzma/check/crc32_x86.S ============================================================================== --- head/contrib/xz/src/liblzma/check/crc32_x86.S Fri Jun 2 22:35:18 2017 (r319509) +++ head/contrib/xz/src/liblzma/check/crc32_x86.S Sat Jun 3 02:42:49 2017 (r319510) @@ -299,6 +299,6 @@ LZMA_CRC32: * use __linux__ here, but I don't know a way to detect when * we are using GNU assembler. */ -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__)) .section .note.GNU-stack,"",@progbits #endif Modified: head/contrib/xz/src/liblzma/check/crc64_x86.S ============================================================================== --- head/contrib/xz/src/liblzma/check/crc64_x86.S Fri Jun 2 22:35:18 2017 (r319509) +++ head/contrib/xz/src/liblzma/check/crc64_x86.S Sat Jun 3 02:42:49 2017 (r319510) @@ -282,6 +282,6 @@ LZMA_CRC64: * use __linux__ here, but I don't know a way to detect when * we are using GNU assembler. */ -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__)) .section .note.GNU-stack,"",@progbits #endif From owner-svn-src-all@freebsd.org Sat Jun 3 03:15:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D151FB7D54E; Sat, 3 Jun 2017 03:15:58 +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 9AFE4816A5; Sat, 3 Jun 2017 03:15:58 +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 v533FvCR085053; Sat, 3 Jun 2017 03:15:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v533FvXV085052; Sat, 3 Jun 2017 03:15:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706030315.v533FvXV085052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 3 Jun 2017 03:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319512 - stable/11/sys/dev/uart X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 03:15:58 -0000 Author: emaste Date: Sat Jun 3 03:15:57 2017 New Revision: 319512 URL: https://svnweb.freebsd.org/changeset/base/319512 Log: MFC r318974: uart: add AMT SOL PCI ID I adjusted the description to be similar to existing AMT entries. PR: 219384 Approved by: re (gjb) Modified: stable/11/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/11/sys/dev/uart/uart_bus_pci.c Sat Jun 3 02:47:30 2017 (r319511) +++ stable/11/sys/dev/uart/uart_bus_pci.c Sat Jun 3 03:15:57 2017 (r319512) @@ -125,6 +125,7 @@ static const struct pci_id pci_ns8250_ids[] = { 24 * DEFAULT_RCLK, 2 }, { 0x8086, 0x0f0c, 0xffff, 0, "Intel ValleyView LPIO1 HSUART#2", 0x10, 24 * DEFAULT_RCLK, 2 }, +{ 0x8086, 0x108f, 0xffff, 0, "Intel AMT - SOL", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, From owner-svn-src-all@freebsd.org Sat Jun 3 03:40:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3736FB7E525; Sat, 3 Jun 2017 03:40:13 +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 02BCF82449; Sat, 3 Jun 2017 03:40:12 +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 v533eCql093538; Sat, 3 Jun 2017 03:40:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v533eBR5093536; Sat, 3 Jun 2017 03:40:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706030340.v533eBR5093536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 3 Jun 2017 03:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319513 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 03:40:13 -0000 Author: emaste Date: Sat Jun 3 03:40:11 2017 New Revision: 319513 URL: https://svnweb.freebsd.org/changeset/base/319513 Log: linux vdso: pass -fPIC to the assembler, not linker -fPIC has no effect on linking although it seems to be ignored by GNU ld.bfd. However, it causes ld.lld to terminate with an invalid argument error. This is equivalent to r296057 but for the kernel (not modules) case. MFC after: 2 months Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Sat Jun 3 03:15:57 2017 (r319512) +++ head/sys/conf/files.amd64 Sat Jun 3 03:40:11 2017 (r319513) @@ -46,7 +46,7 @@ linux32_assym.h optional compat_linux32 \ # linux32_locore.o optional compat_linux32 \ dependency "linux32_assym.h $S/amd64/linux32/linux32_locore.s" \ - compile-with "${CC} -x assembler-with-cpp -DLOCORE -m32 -shared -s -pipe -I. -I$S -Werror -Wall -fno-common -nostdinc -nostdlib -Wl,-T$S/amd64/linux32/linux32_vdso.lds.s -Wl,-soname=linux32_vdso.so,--eh-frame-hdr,-fPIC,-warn-common ${.IMPSRC} -o ${.TARGET}" \ + compile-with "${CC} -x assembler-with-cpp -DLOCORE -m32 -shared -s -pipe -I. -I$S -Werror -Wall -fPIC -fno-common -nostdinc -nostdlib -Wl,-T$S/amd64/linux32/linux32_vdso.lds.s -Wl,-soname=linux32_vdso.so,--eh-frame-hdr,-warn-common ${.IMPSRC} -o ${.TARGET}" \ no-obj no-implicit-rule \ clean "linux32_locore.o" # Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Sat Jun 3 03:15:57 2017 (r319512) +++ head/sys/conf/files.i386 Sat Jun 3 03:40:11 2017 (r319513) @@ -33,7 +33,7 @@ linux_assym.h optional compat_linux \ # linux_locore.o optional compat_linux \ dependency "linux_assym.h $S/i386/linux/linux_locore.s" \ - compile-with "${CC} -x assembler-with-cpp -DLOCORE -shared -s -pipe -I. -I$S -Werror -Wall -fno-common -nostdinc -nostdlib -Wl,-T$S/i386/linux/linux_vdso.lds.s -Wl,-soname=linux_vdso.so,--eh-frame-hdr,-fPIC,-warn-common ${.IMPSRC} -o ${.TARGET}" \ + compile-with "${CC} -x assembler-with-cpp -DLOCORE -shared -s -pipe -I. -I$S -Werror -Wall -fPIC -fno-common -nostdinc -nostdlib -Wl,-T$S/i386/linux/linux_vdso.lds.s -Wl,-soname=linux_vdso.so,--eh-frame-hdr,-warn-common ${.IMPSRC} -o ${.TARGET}" \ no-obj no-implicit-rule \ clean "linux_locore.o" # From owner-svn-src-all@freebsd.org Sat Jun 3 07:38:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55459B95A4B; Sat, 3 Jun 2017 07:38:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id CC0E134C6; Sat, 3 Jun 2017 07:38:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 9AA22425C28; Sat, 3 Jun 2017 17:05:33 +1000 (AEST) Date: Sat, 3 Jun 2017 17:05:25 +1000 (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: r319507 - head/sys/fs/msdosfs In-Reply-To: <201706021839.v52IdrZJ074478@repo.freebsd.org> Message-ID: <20170603161546.D939@besplex.bde.org> References: <201706021839.v52IdrZJ074478@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=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=GCT6H45XDI6av1AEreMA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 07:38:29 -0000 On Fri, 2 Jun 2017, Ed Maste wrote: > Log: > msdosfs: use mem{cpy,move,set} instead of bcopy,bzero > > This somewhat simplifies use of msdosfs code in userland (for makefs), > reduces diffs with NetBSD and is standard C as of C89. This is a style bug in the kernel. The kernel should use the standard BSD functions bcopy() and bzero(). bzero() is better designed than memset() for zeroing. bcopy() is essentially the same as memmove(), but is implemented more optimally (the non-use of memmove() in the kernel used to be implememented by by not having it, but someone broke this by adding an memmove() wrapper which is an extern function that calls bcopy(). This is even slower than the inline wrappers used to break intentionally leaving out some of the other functions). memcpy() became a non-style-bug in the kernel when dg optimized some networking code by using it. It was supposed to be used only for small fixed-sized copies when the compiler can and does inlines it. The extern memcpy() unfortunately had to be implemented so that compiling with -O0 (which turns off inlining) is used, so that the code doesn't need ifdefs for -O0. This became nonsense when -ffreestanding killed inlining of all Standard C functions. The slow support function for -O0 is used in all cases where memcpy() is used. It turns out to be not very slow, at least on x86. On x86, it was never optimized like bcopy() was, but the optimizations for bcopy() were very MD and are now not attempted, so memcpy() is now just bcopy() with the support for overlapping copies removed, so is slightly faster. On newer x86, "rep movs[any]" is as fast as anything for large copies, but has a large startup overhead so is a bad method for small copies, but is used in all cases. Compiler inlines wouldn't use it for small copies, but the threshold for using it is very MD so always using it is not too bad as a default. memset() has a bad inline implementation. It just calls bzero() when the fill byte is zero. Otherwise, it slowly stores 1 byte per iteration. memset() is also extern in libkern with the same bad implementation, and and it takes complicated macros to get the inline version. memcmp() used to have a worse inline implementation that wrapped bcmp(). This was broken since bcmp() is boolean while memcmp() is 3-state. This has been fixed by using the extern libkern version which is a copy of the generic libc version. Except it is a bug for memcmp() to exist in the kernel. > Modified: head/sys/fs/msdosfs/msdosfs_conv.c > ============================================================================== > --- head/sys/fs/msdosfs/msdosfs_conv.c Fri Jun 2 17:57:27 2017 (r319506) > +++ head/sys/fs/msdosfs/msdosfs_conv.c Fri Jun 2 18:39:53 2017 (r319507) > @@ -536,7 +536,7 @@ unix2winfn(const u_char *un, size_t unlen, struct wine > /* > * Initialize winentry to some useful default > */ > - for (wcp = (uint8_t *)wep, i = sizeof(*wep); --i >= 0; *wcp++ = 0xff); > + memset(wep, 0xff, sizeof(*wep)); > wep->weCnt = cnt; > wep->weAttributes = ATTR_WIN95; > wep->weReserved1 = 0; memset() uses the same slow loop as the old inline code. Unfortunately, there is no bset() function in the bcopy family, so the unusual case of setting to nonzero had to be handled inline. Bruce From owner-svn-src-all@freebsd.org Sat Jun 3 10:38:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D11EBEEE1E; Sat, 3 Jun 2017 10:38:43 +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 0661A670C2; Sat, 3 Jun 2017 10:38:42 +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 v53AcgVt064128; Sat, 3 Jun 2017 10:38:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53Acg0G064126; Sat, 3 Jun 2017 10:38:42 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706031038.v53Acg0G064126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 10:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319514 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 10:38:43 -0000 Author: andrew Date: Sat Jun 3 10:38:41 2017 New Revision: 319514 URL: https://svnweb.freebsd.org/changeset/base/319514 Log: Mark the non-INTRNG armv6 configs with NO_UNIVERSE to prepare for INTRNG being always enabled on armv6. Modified: head/sys/arm/conf/AML8726 head/sys/arm/conf/ARMADAXP Modified: head/sys/arm/conf/AML8726 ============================================================================== --- head/sys/arm/conf/AML8726 Sat Jun 3 03:40:11 2017 (r319513) +++ head/sys/arm/conf/AML8726 Sat Jun 3 10:38:41 2017 (r319514) @@ -18,6 +18,9 @@ # # $FreeBSD$ +# TODO: Port to INTRNG +#NO_UNIVERSE + ident AML8726 include "std.armv6" Modified: head/sys/arm/conf/ARMADAXP ============================================================================== --- head/sys/arm/conf/ARMADAXP Sat Jun 3 03:40:11 2017 (r319513) +++ head/sys/arm/conf/ARMADAXP Sat Jun 3 10:38:41 2017 (r319514) @@ -18,6 +18,9 @@ # # $FreeBSD$ +# TODO: Port to INTRNG +#NO_UNIVERSE + ident MV-88F78XX0 include "std.armv6" From owner-svn-src-all@freebsd.org Sat Jun 3 10:40:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1624BEEECC; Sat, 3 Jun 2017 10:40:46 +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 9BB90672D8; Sat, 3 Jun 2017 10:40:46 +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 v53Aejk1064914; Sat, 3 Jun 2017 10:40:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53AejVP064913; Sat, 3 Jun 2017 10:40:45 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706031040.v53AejVP064913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 10:40:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319515 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 10:40:46 -0000 Author: andrew Date: Sat Jun 3 10:40:45 2017 New Revision: 319515 URL: https://svnweb.freebsd.org/changeset/base/319515 Log: Make it an error to build armv6 without INTRNG enabled. Most kernel configs have been updated for this, with the exception of the two marked as NO_UNIVERSE in r319514. Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sat Jun 3 10:38:41 2017 (r319514) +++ head/sys/arm/arm/machdep.c Sat Jun 3 10:40:45 2017 (r319515) @@ -103,6 +103,10 @@ __FBSDID("$FreeBSD$"); #error FreeBSD/arm doesn't provide compatibility with releases prior to 10 #endif +#if __ARM_ARCH >= 6 && !defined(INTRNG) +#error armv6 requires INTRNG +#endif + struct pcpu __pcpu[MAXCPU]; struct pcpu *pcpup = &__pcpu[0]; From owner-svn-src-all@freebsd.org Sat Jun 3 13:13:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D47FEBF15FE; Sat, 3 Jun 2017 13:13:58 +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 917EB6EED2; Sat, 3 Jun 2017 13:13:58 +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 v53DDvo9028428; Sat, 3 Jun 2017 13:13:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53DDvCp028427; Sat, 3 Jun 2017 13:13:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706031313.v53DDvCp028427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 3 Jun 2017 13:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319516 - head/contrib/compiler-rt/lib/tsan/rtl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 13:13:58 -0000 Author: emaste Date: Sat Jun 3 13:13:57 2017 New Revision: 319516 URL: https://svnweb.freebsd.org/changeset/base/319516 Log: tsan: set noexec stack on aarch64 This may be refined upstream. Reviewed by: dim MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11034 Modified: head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S Modified: head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S ============================================================================== --- head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S Sat Jun 3 10:40:45 2017 (r319515) +++ head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S Sat Jun 3 13:13:57 2017 (r319516) @@ -252,7 +252,7 @@ __sigsetjmp: CFI_ENDPROC .size __sigsetjmp, .-__sigsetjmp -#if defined(__linux__) +#if defined(__FreeBSD__) || defined(__linux__) /* We do not need executable stack. */ .section .note.GNU-stack,"",@progbits #endif From owner-svn-src-all@freebsd.org Sat Jun 3 14:10:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32ACABF2238; Sat, 3 Jun 2017 14:10:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F162470A56; Sat, 3 Jun 2017 14:10:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53EA9dN050219; Sat, 3 Jun 2017 14:10:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53EA9V1050218; Sat, 3 Jun 2017 14:10:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706031410.v53EA9V1050218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 3 Jun 2017 14:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319517 - head/lib/libsysdecode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 14:10:11 -0000 Author: jhb Date: Sat Jun 3 14:10:09 2017 New Revision: 319517 URL: https://svnweb.freebsd.org/changeset/base/319517 Log: Add a cross-reference to sysdecode_socket_protocol(3). Modified: head/lib/libsysdecode/sysdecode.3 Modified: head/lib/libsysdecode/sysdecode.3 ============================================================================== --- head/lib/libsysdecode/sysdecode.3 Sat Jun 3 13:13:57 2017 (r319516) +++ head/lib/libsysdecode/sysdecode.3 Sat Jun 3 14:10:09 2017 (r319517) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2016 +.Dd June 3, 2017 .Dt SYSDECODE 3 .Os .Sh NAME @@ -76,6 +76,7 @@ A placeholder for use when the ABI is not known. .Xr sysdecode_mask 3 , .Xr sysdecode_quotactl_cmd 3 , .Xr sysdecode_sigcode 3 , +.Xr sysdecode_socket_protocol 3 , .Xr sysdecode_sockopt_name 3 , .Xr sysdecode_syscallnames 3 , .Xr sysdecode_utrace 3 From owner-svn-src-all@freebsd.org Sat Jun 3 14:12:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2E62BF2427; Sat, 3 Jun 2017 14:12:18 +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 82BBC70E71; Sat, 3 Jun 2017 14:12:18 +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 v53ECH1U054030; Sat, 3 Jun 2017 14:12:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53ECHoW054029; Sat, 3 Jun 2017 14:12:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706031412.v53ECHoW054029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 3 Jun 2017 14:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319518 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 14:12:18 -0000 Author: kib Date: Sat Jun 3 14:12:17 2017 New Revision: 319518 URL: https://svnweb.freebsd.org/changeset/base/319518 Log: Ensure that cached struct thread does not keep spurious td_su reference on an UFS mount point. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sat Jun 3 14:10:09 2017 (r319517) +++ head/sys/kern/kern_proc.c Sat Jun 3 14:12:17 2017 (r319518) @@ -226,6 +226,8 @@ proc_dtor(void *mem, int size, void *arg) #endif /* Free all OSD associated to this thread. */ osd_thread_exit(td); + td_softdep_cleanup(td); + MPASS(td->td_su == NULL); /* Make sure all thread destructors are executed */ EVENTHANDLER_INVOKE(thread_dtor, td); From owner-svn-src-all@freebsd.org Sat Jun 3 14:15:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 212CFBF24E5; Sat, 3 Jun 2017 14:15:16 +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 D2E717101C; Sat, 3 Jun 2017 14:15:15 +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 v53EFEeV054172; Sat, 3 Jun 2017 14:15:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53EFETM054171; Sat, 3 Jun 2017 14:15:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706031415.v53EFETM054171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 3 Jun 2017 14:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319519 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 14:15:16 -0000 Author: kib Date: Sat Jun 3 14:15:14 2017 New Revision: 319519 URL: https://svnweb.freebsd.org/changeset/base/319519 Log: Clean possible td_su reference on the struct mount being unmounted as the last step of ffs_unmount(). It is possible that the mount point is recorded for cleanup in AST context while softdep flush is executed during unmount. The workitems are flushed by other means for the unmount, but the stray reference to struct mount blocks destruction of mount. Check for the situation and manually call vfs_rel() before returning from ffs_unmount(). Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sat Jun 3 14:12:17 2017 (r319518) +++ head/sys/ufs/ffs/ffs_vfsops.c Sat Jun 3 14:15:14 2017 (r319519) @@ -1319,6 +1319,10 @@ ffs_unmount(mp, mntflags) MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_LOCAL; MNT_IUNLOCK(mp); + if (td->td_su == mp) { + td->td_su = NULL; + vfs_rel(mp); + } return (error); fail: From owner-svn-src-all@freebsd.org Sat Jun 3 14:22:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C59C9BF2837; Sat, 3 Jun 2017 14:22:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94B6E715D6; Sat, 3 Jun 2017 14:22:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53EMG4E058344; Sat, 3 Jun 2017 14:22:16 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53EMFGH058336; Sat, 3 Jun 2017 14:22:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706031422.v53EMFGH058336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 3 Jun 2017 14:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319520 - in head: lib/libsysdecode usr.bin/kdump usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 14:22:17 -0000 Author: jhb Date: Sat Jun 3 14:22:15 2017 New Revision: 319520 URL: https://svnweb.freebsd.org/changeset/base/319520 Log: Decode the 'who' argument passed to getrusage(). Add a new sysdecode_getrusage_who() which decodes the RUSAGE_* constant passed as the first argument to getrusage(). Use this function in both kdump and truss to decode the first argument to getrusage(). PR: 215448 Submitted by: Anton Yuzhaninov MFC after: 1 month Modified: head/lib/libsysdecode/Makefile head/lib/libsysdecode/flags.c head/lib/libsysdecode/mktables head/lib/libsysdecode/sysdecode.h head/lib/libsysdecode/sysdecode_enum.3 head/usr.bin/kdump/kdump.c head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Sat Jun 3 14:15:14 2017 (r319519) +++ head/lib/libsysdecode/Makefile Sat Jun 3 14:22:15 2017 (r319520) @@ -32,6 +32,7 @@ MLINKS+=sysdecode_enum.3 sysdecode_acltype.3 \ sysdecode_enum.3 sysdecode_fadvice.3 \ sysdecode_enum.3 sysdecode_fcntl_cmd.3 \ sysdecode_enum.3 sysdecode_getfsstat_mode.3 \ + sysdecode_enum.3 sysdecode_getrusage_who.3 \ sysdecode_enum.3 sysdecode_idtype.3 \ sysdecode_enum.3 sysdecode_ipproto.3 \ sysdecode_enum.3 sysdecode_kldsym_cmd.3 \ Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Sat Jun 3 14:15:14 2017 (r319519) +++ head/lib/libsysdecode/flags.c Sat Jun 3 14:22:15 2017 (r319520) @@ -487,6 +487,13 @@ sysdecode_getfsstat_mode(int mode) } const char * +sysdecode_getrusage_who(int who) +{ + + return (lookup_value(rusage, who)); +} + +const char * sysdecode_kldsym_cmd(int cmd) { Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Sat Jun 3 14:15:14 2017 (r319519) +++ head/lib/libsysdecode/mktables Sat Jun 3 14:22:15 2017 (r319520) @@ -114,6 +114,7 @@ gen_table "quotactlcmds" "Q_[A-Z]+[[:space:]]+0x[0- gen_table "rebootopt" "RB_[A-Z]+[[:space:]]+0x[0-9]+" "sys/reboot.h" gen_table "rforkflags" "RF[A-Z]+[[:space:]]+\([0-9]+<<[0-9]+\)" "sys/unistd.h" gen_table "rlimit" "RLIMIT_[A-Z]+[[:space:]]+[0-9]+" "sys/resource.h" +gen_table "rusage" "RUSAGE_[A-Z]+[[:space:]]+[-0-9]+" "sys/resource.h" gen_table "schedpolicy" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sched.h" gen_table "sendfileflags" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "sys/shm.h" Modified: head/lib/libsysdecode/sysdecode.h ============================================================================== --- head/lib/libsysdecode/sysdecode.h Sat Jun 3 14:15:14 2017 (r319519) +++ head/lib/libsysdecode/sysdecode.h Sat Jun 3 14:22:15 2017 (r319520) @@ -55,6 +55,7 @@ bool sysdecode_filemode(FILE *_fp, int _mode, int *_re bool sysdecode_flock_operation(FILE *_fp, int _operation, int *_rem); int sysdecode_freebsd_to_abi_errno(enum sysdecode_abi _abi, int _error); const char *sysdecode_getfsstat_mode(int _mode); +const char *sysdecode_getrusage_who(int _who); const char *sysdecode_idtype(int _idtype); const char *sysdecode_ioctlname(unsigned long _val); const char *sysdecode_ipproto(int _protocol); Modified: head/lib/libsysdecode/sysdecode_enum.3 ============================================================================== --- head/lib/libsysdecode/sysdecode_enum.3 Sat Jun 3 14:15:14 2017 (r319519) +++ head/lib/libsysdecode/sysdecode_enum.3 Sat Jun 3 14:22:15 2017 (r319520) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2017 +.Dd June 3, 2017 .Dt sysdecode_enum 3 .Os .Sh NAME @@ -36,6 +36,7 @@ .Nm sysdecode_fadvice , .Nm sysdecode_fcntl_cmd , .Nm sysdecode_getfsstat_mode , +.Nm sysdecode_getrusage_who , .Nm sysdecode_idtype , .Nm sysdecode_ipproto , .Nm sysdecode_kldsym_cmd , @@ -89,6 +90,8 @@ .Ft const char * .Fn sysdecode_getfsstat_mode "int mode" .Ft const char * +.Fn sysdecode_getrusage_who "int who" +.Ft const char * .Fn sysdecode_idtype "int idtype" .Ft const char * .Fn sysdecode_ipproto "int protocol" @@ -188,6 +191,7 @@ Most of these functions decode an argument passed to a .It Fn sysdecode_ptrace_request Ta Xr ptrace 2 Ta Fa request .It Fn sysdecode_rlimit Ta Xr getrlimit 2 Ta Fa resource .It Fn sysdecode_rtprio_function Ta Xr rtprio 2 Ta Fa function +.It Fn sysdecode_getrusage_who Ta Xr getrusage 2 Ta Fa who .It Fn sysdecode_scheduler_policy Ta Xr sched_setscheduler 2 Ta Fa policy .It Fn sysdecode_semctl_cmd Ta Xr semctl 2 Ta Fa cmd .It Fn sysdecode_shmctl_cmd Ta Xr shmctl 2 Ta Fa cmd Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Jun 3 14:15:14 2017 (r319519) +++ head/usr.bin/kdump/kdump.c Sat Jun 3 14:22:15 2017 (r319520) @@ -1190,6 +1190,13 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) narg--; c = ','; break; + case SYS_getrusage: + putchar('('); + print_integer_arg(sysdecode_getrusage_who, *ip); + ip++; + narg--; + c = ','; + break; case SYS_quotactl: print_number(ip, narg, c); putchar(','); Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Sat Jun 3 14:15:14 2017 (r319519) +++ head/usr.bin/truss/syscall.h Sat Jun 3 14:22:15 2017 (r319520) @@ -42,8 +42,8 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHe Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval, Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open, - Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, - Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, + Fcntlflag, Rusage, RusageWho, BinString, Shutdown, Resource, Rlimit, + Timeval2, Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Jun 3 14:15:14 2017 (r319519) +++ head/usr.bin/truss/syscalls.c Sat Jun 3 14:22:15 2017 (r319520) @@ -176,7 +176,7 @@ static struct syscall decoded_syscalls[] = { { .name = "getrlimit", .ret_type = 1, .nargs = 2, .args = { { Resource, 0 }, { Rlimit | OUT, 1 } } }, { .name = "getrusage", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Rusage | OUT, 1 } } }, + .args = { { RusageWho, 0 }, { Rusage | OUT, 1 } } }, { .name = "getsid", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, { .name = "getsockname", .ret_type = 1, .nargs = 3, @@ -1595,6 +1595,9 @@ print_arg(struct syscall_args *sc, unsigned long *args break; case Resource: print_integer_arg(sysdecode_rlimit, fp, args[sc->offset]); + break; + case RusageWho: + print_integer_arg(sysdecode_getrusage_who, fp, args[sc->offset]); break; case Pathconf: fputs(xlookup(pathconf_arg, args[sc->offset]), fp); From owner-svn-src-all@freebsd.org Sat Jun 3 14:28:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36E5CBF2C0A; Sat, 3 Jun 2017 14:28:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0393071A6D; Sat, 3 Jun 2017 14:28:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53ESKte058699; Sat, 3 Jun 2017 14:28:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53ESKXx058698; Sat, 3 Jun 2017 14:28:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706031428.v53ESKXx058698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 3 Jun 2017 14:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319521 - head/usr.sbin/makefs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 14:28:21 -0000 Author: emaste Date: Sat Jun 3 14:28:19 2017 New Revision: 319521 URL: https://svnweb.freebsd.org/changeset/base/319521 Log: makefs: rename variable for NetBSD diff reduction Modified: head/usr.sbin/makefs/ffs/buf.c Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Sat Jun 3 14:22:15 2017 (r319520) +++ head/usr.sbin/makefs/ffs/buf.c Sat Jun 3 14:28:19 2017 (r319521) @@ -60,7 +60,7 @@ bread(struct vnode *vp, daddr_t blkno, int size, struc { off_t offset; ssize_t rv; - fsinfo_t *fsinfo = vp->fs; + fsinfo_t *fs = vp->fs; assert (bpp != NULL); @@ -68,7 +68,7 @@ bread(struct vnode *vp, daddr_t blkno, int size, struc printf("%s: blkno %lld size %d\n", __func__, (long long)blkno, size); *bpp = getblk(vp, blkno, size, 0, 0, 0); - offset = (*bpp)->b_blkno * fsinfo->sectorsize + fsinfo->offset; + offset = (*bpp)->b_blkno * fs->sectorsize + fs->offset; if (debug & DEBUG_BUF_BREAD) printf("%s: blkno %lld offset %lld bcount %ld\n", __func__, (long long)(*bpp)->b_blkno, (long long) offset, From owner-svn-src-all@freebsd.org Sat Jun 3 14:45:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85B55BF3184; Sat, 3 Jun 2017 14:45:47 +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 518497259C; Sat, 3 Jun 2017 14:45:47 +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 v53EjkCo067200; Sat, 3 Jun 2017 14:45:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53EjkGH067199; Sat, 3 Jun 2017 14:45:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706031445.v53EjkGH067199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 14:45:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319522 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 14:45:47 -0000 Author: andrew Date: Sat Jun 3 14:45:46 2017 New Revision: 319522 URL: https://svnweb.freebsd.org/changeset/base/319522 Log: Remove RT1310 from universe as it fails to build. Modified: head/sys/arm/conf/RT1310 Modified: head/sys/arm/conf/RT1310 ============================================================================== --- head/sys/arm/conf/RT1310 Sat Jun 3 14:28:19 2017 (r319521) +++ head/sys/arm/conf/RT1310 Sat Jun 3 14:45:46 2017 (r319522) @@ -3,6 +3,8 @@ # # $FreeBSD$ # +# TODO: This fails to build under universe, irnore it until it's fixed +#NO_UNIVERSE ident RT1310 include "std.arm" From owner-svn-src-all@freebsd.org Sat Jun 3 15:20:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42164BF388B; Sat, 3 Jun 2017 15:20:43 +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 E75EF732E4; Sat, 3 Jun 2017 15:20:42 +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 v53FKgcE079663; Sat, 3 Jun 2017 15:20:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FKgOY079662; Sat, 3 Jun 2017 15:20:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031520.v53FKgOY079662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319524 - vendor/llvm/llvm-trunk-r304659 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:20:43 -0000 Author: dim Date: Sat Jun 3 15:20:41 2017 New Revision: 319524 URL: https://svnweb.freebsd.org/changeset/base/319524 Log: Tag llvm trunk r304659. Added: vendor/llvm/llvm-trunk-r304659/ - copied from r319523, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Sat Jun 3 15:20:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C9EFBF387E; Sat, 3 Jun 2017 15:20: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 CCBE2732D8; Sat, 3 Jun 2017 15:20: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 v53FKbY5079616; Sat, 3 Jun 2017 15:20:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FKbEg079606; Sat, 3 Jun 2017 15:20:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031520.v53FKbEg079606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319523 - in vendor/llvm/dist: include/llvm include/llvm/ADT include/llvm/Analysis include/llvm/CodeGen include/llvm/CodeGen/PBQP include/llvm/DebugInfo/CodeView include/llvm/DebugInfo/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:20:39 -0000 Author: dim Date: Sat Jun 3 15:20:36 2017 New Revision: 319523 URL: https://svnweb.freebsd.org/changeset/base/319523 Log: Vendor import of llvm trunk r304659: https://llvm.org/svn/llvm-project/llvm/trunk@304659 Added: vendor/llvm/dist/lib/Target/ARM/ARMScheduleA57.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleA57WriteRes.td vendor/llvm/dist/test/CodeGen/AMDGPU/not-scalarize-volatile-load.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-alu.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-basic.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-ldm-wrback.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-ldm.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-stm-wrback.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-stm.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-vfma.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-vldm-wrback.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-vldm.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-vstm-wrback.ll vendor/llvm/dist/test/CodeGen/ARM/cortex-a57-misched-vstm.ll vendor/llvm/dist/test/CodeGen/Hexagon/newify-crash.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-sizereduction/micromips-lbu16-lhu16-sb16-sh16.ll vendor/llvm/dist/test/CodeGen/PowerPC/scavenging.mir vendor/llvm/dist/test/CodeGen/SystemZ/RAbasic-invalid-LR-update.mir vendor/llvm/dist/test/CodeGen/X86/scavenger.mir vendor/llvm/dist/test/CodeGen/X86/vector-unsigned-cmp.ll vendor/llvm/dist/test/DebugInfo/MIR/AArch64/ vendor/llvm/dist/test/DebugInfo/MIR/AArch64/clobber-sp.mir vendor/llvm/dist/test/DebugInfo/MIR/AArch64/lit.local.cfg vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/inline-8bit-counters.ll vendor/llvm/dist/test/MC/WebAssembly/external-data.ll vendor/llvm/dist/test/Transforms/CodeExtractor/cost.ll vendor/llvm/dist/test/Transforms/CodeExtractor/cost_meta.ll vendor/llvm/dist/test/Transforms/LowerExpectIntrinsic/phi_merge.ll vendor/llvm/dist/test/Transforms/LowerExpectIntrinsic/phi_or.ll vendor/llvm/dist/test/Transforms/LowerExpectIntrinsic/phi_tern.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/Inputs/use-typeid1-dead.yaml vendor/llvm/dist/test/Transforms/LowerTypeTests/export-dead.ll vendor/llvm/dist/test/Transforms/Util/PredicateInfo/condprop2.ll vendor/llvm/dist/test/Transforms/Util/PredicateInfo/testandor2.ll vendor/llvm/dist/unittests/Analysis/OrderedBasicBlockTest.cpp (contents, props changed) Modified: vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/Analysis/OrderedBasicBlock.h vendor/llvm/dist/include/llvm/Analysis/RegionPass.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegionInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineScheduler.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/CostAllocator.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/Graph.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/Math.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/ReductionRules.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/Solution.h vendor/llvm/dist/include/llvm/CodeGen/PBQPRAConstraint.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h vendor/llvm/dist/include/llvm/CodeGen/RegisterScavenging.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAGInstrs.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/CodeGen/StackMaps.h vendor/llvm/dist/include/llvm/CodeGen/TargetSchedule.h vendor/llvm/dist/include/llvm/CodeGen/WinEHFuncInfo.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeView.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CodeViewRecordIO.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDumper.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolRecordMapping.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolSerializer.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/MappedBlockStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/PDBStringTable.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiStream.h vendor/llvm/dist/include/llvm/IR/DIBuilder.h vendor/llvm/dist/include/llvm/IR/DebugLoc.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndex.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h vendor/llvm/dist/include/llvm/IR/Statepoint.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/LTO/Config.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h vendor/llvm/dist/include/llvm/ObjectYAML/CodeViewYAMLSymbols.h vendor/llvm/dist/include/llvm/TableGen/Record.h vendor/llvm/dist/include/llvm/Transforms/IPO/FunctionImport.h vendor/llvm/dist/include/llvm/Transforms/Instrumentation.h vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/IndirectCallPromotionAnalysis.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/ModuleSummaryAnalysis.cpp vendor/llvm/dist/lib/Analysis/OrderedBasicBlock.cpp vendor/llvm/dist/lib/Analysis/RegionPass.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp vendor/llvm/dist/lib/CodeGen/CodeGen.cpp vendor/llvm/dist/lib/CodeGen/GlobalMerge.cpp vendor/llvm/dist/lib/CodeGen/LivePhysRegs.cpp vendor/llvm/dist/lib/CodeGen/LiveRegUnits.cpp vendor/llvm/dist/lib/CodeGen/MachineRegionInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/RegAllocBasic.cpp vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.cpp vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/StatepointLowering.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringBase.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolDumper.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolSerializer.cpp vendor/llvm/dist/lib/DebugInfo/MSF/MappedBlockStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/InfoStreamBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBFile.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/PDBStringTable.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/TpiStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp vendor/llvm/dist/lib/IR/DIBuilder.cpp vendor/llvm/dist/lib/IR/DebugLoc.cpp vendor/llvm/dist/lib/IR/OptBisect.cpp vendor/llvm/dist/lib/LTO/LTO.cpp vendor/llvm/dist/lib/LTO/LTOBackend.cpp vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp vendor/llvm/dist/lib/MC/WasmObjectWriter.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp vendor/llvm/dist/lib/ObjectYAML/CodeViewYAMLSymbols.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64PBQPRegAlloc.h vendor/llvm/dist/lib/Target/AArch64/AArch64SchedFalkorDetails.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIFoldOperands.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInsertWaitcnts.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInsertWaits.cpp vendor/llvm/dist/lib/Target/AMDGPU/SMInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOP3Instructions.td vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMCallLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMSchedule.td vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MicroMipsSizeReduction.cpp vendor/llvm/dist/lib/Target/WebAssembly/known_gcc_test_failures.txt vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Transforms/Coroutines/CoroSplit.cpp vendor/llvm/dist/lib/Transforms/Coroutines/Coroutines.cpp vendor/llvm/dist/lib/Transforms/IPO/FunctionAttrs.cpp vendor/llvm/dist/lib/Transforms/IPO/FunctionImport.cpp vendor/llvm/dist/lib/Transforms/IPO/LowerTypeTests.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/MemorySanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/SanitizerCoverage.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp vendor/llvm/dist/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/runtimes/CMakeLists.txt vendor/llvm/dist/test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir vendor/llvm/dist/test/CodeGen/AMDGPU/basic-branch.ll vendor/llvm/dist/test/CodeGen/AMDGPU/branch-condition-and.ll vendor/llvm/dist/test/CodeGen/AMDGPU/branch-relaxation.ll vendor/llvm/dist/test/CodeGen/AMDGPU/commute-compares.ll vendor/llvm/dist/test/CodeGen/AMDGPU/control-flow-fastregalloc.ll vendor/llvm/dist/test/CodeGen/AMDGPU/indirect-addressing-si.ll vendor/llvm/dist/test/CodeGen/AMDGPU/infinite-loop.ll vendor/llvm/dist/test/CodeGen/AMDGPU/insert_vector_elt.v2i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.store.format.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.store.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.ds.swizzle.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.image.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.kernarg.segment.ptr.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.barrier.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.dcache.inv.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.dcache.inv.vol.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.dcache.wb.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.dcache.wb.vol.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.waitcnt.ll vendor/llvm/dist/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ret_jump.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-lower-control-flow-unreachable-block.ll vendor/llvm/dist/test/CodeGen/AMDGPU/smrd-vccz-bug.ll vendor/llvm/dist/test/CodeGen/AMDGPU/spill-m0.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sub.i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/valu-i1.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll vendor/llvm/dist/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll vendor/llvm/dist/test/CodeGen/ARM/global-merge-external.ll vendor/llvm/dist/test/CodeGen/MIR/Generic/runPass.mir vendor/llvm/dist/test/CodeGen/X86/and-sink.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cvt.ll vendor/llvm/dist/test/CodeGen/X86/broadcast-elm-cross-splat-vec.ll vendor/llvm/dist/test/CodeGen/X86/clear_upper_vector_element_bits.ll vendor/llvm/dist/test/CodeGen/X86/select.ll vendor/llvm/dist/test/CodeGen/X86/shrink-compare.ll vendor/llvm/dist/test/CodeGen/X86/sse3.ll vendor/llvm/dist/test/CodeGen/X86/stack-folding-fp-avx1.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-allocas.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-call-lowering.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-far-call.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-forward.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-gctransition-call-lowering.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-invoke.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-live-in.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-stack-usage.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-stackmap-format.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-uniqueing.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-vector-bad-spill.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-vector.ll vendor/llvm/dist/test/CodeGen/X86/wide-fma-contraction.ll vendor/llvm/dist/test/CodeGen/X86/xor-icmp.ll vendor/llvm/dist/test/DebugInfo/PDB/Inputs/simple-line-info.yaml vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-write.test vendor/llvm/dist/test/DebugInfo/PDB/pdbdump-yaml-lineinfo.test vendor/llvm/dist/test/ThinLTO/X86/deadstrip.ll vendor/llvm/dist/test/ThinLTO/X86/newpm-basic.ll vendor/llvm/dist/test/Transforms/Coroutines/coro-split-02.ll vendor/llvm/dist/test/Transforms/Inline/AArch64/switch.ll vendor/llvm/dist/test/Transforms/InstCombine/not.ll vendor/llvm/dist/test/Transforms/InstSimplify/compare.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/Inputs/import-unsat.yaml vendor/llvm/dist/test/Transforms/LowerTypeTests/Inputs/use-typeid1-typeid2.yaml vendor/llvm/dist/test/Transforms/LowerTypeTests/export-nothing.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/import-unsat.ll vendor/llvm/dist/test/Transforms/SROA/address-spaces.ll vendor/llvm/dist/test/Transforms/Util/PredicateInfo/condprop.ll vendor/llvm/dist/test/Transforms/Util/PredicateInfo/testandor.ll vendor/llvm/dist/test/Transforms/WholeProgramDevirt/Inputs/export.yaml vendor/llvm/dist/test/Transforms/WholeProgramDevirt/Inputs/import-indir.yaml vendor/llvm/dist/test/Transforms/WholeProgramDevirt/export-nothing.ll vendor/llvm/dist/test/Transforms/WholeProgramDevirt/export-single-impl.ll vendor/llvm/dist/test/Transforms/WholeProgramDevirt/export-uniform-ret-val.ll vendor/llvm/dist/test/Transforms/WholeProgramDevirt/export-unique-ret-val.ll vendor/llvm/dist/test/Transforms/WholeProgramDevirt/export-unsuccessful-checked.ll vendor/llvm/dist/test/Transforms/WholeProgramDevirt/import-indir.ll vendor/llvm/dist/test/tools/llvm-lto2/X86/pipeline.ll vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-config/llvm-config.cpp vendor/llvm/dist/tools/llvm-lto2/llvm-lto2.cpp vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbdump/PdbYaml.cpp vendor/llvm/dist/tools/llvm-pdbdump/PdbYaml.h vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.h vendor/llvm/dist/tools/llvm-pdbdump/fuzzer/llvm-pdbdump-fuzzer.cpp vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.cpp vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/unittests/ADT/SmallVectorTest.cpp vendor/llvm/dist/unittests/Analysis/CMakeLists.txt vendor/llvm/dist/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp vendor/llvm/dist/unittests/Transforms/Utils/Cloning.cpp vendor/llvm/dist/utils/TableGen/X86FoldTablesEmitter.cpp vendor/llvm/dist/utils/lit/lit/util.py Modified: vendor/llvm/dist/include/llvm/ADT/SmallVector.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/SmallVector.h Sat Jun 3 14:45:46 2017 (r319522) +++ vendor/llvm/dist/include/llvm/ADT/SmallVector.h Sat Jun 3 15:20:36 2017 (r319523) @@ -415,12 +415,20 @@ class SmallVectorImpl : public SmallVectorTemplateBase append(IL.begin(), IL.end()); } + // FIXME: Consider assigning over existing elements, rather than clearing & + // re-initializing them - for all assign(...) variants. + void assign(size_type NumElts, const T &Elt) { clear(); if (this->capacity() < NumElts) this->grow(NumElts); this->setEnd(this->begin()+NumElts); std::uninitialized_fill(this->begin(), this->end(), Elt); + } + + template void assign(in_iter in_start, in_iter in_end) { + clear(); + append(in_start, in_end); } void assign(std::initializer_list IL) { Modified: vendor/llvm/dist/include/llvm/Analysis/OrderedBasicBlock.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/OrderedBasicBlock.h Sat Jun 3 14:45:46 2017 (r319522) +++ vendor/llvm/dist/include/llvm/Analysis/OrderedBasicBlock.h Sat Jun 3 15:20:36 2017 (r319523) @@ -58,6 +58,7 @@ class OrderedBasicBlock { (public) /// comes before \p B in \p BB. This is a simplification that considers /// cached instruction positions and ignores other basic blocks, being /// only relevant to compare relative instructions positions inside \p BB. + /// Returns false for A == B. bool dominates(const Instruction *A, const Instruction *B); }; Modified: vendor/llvm/dist/include/llvm/Analysis/RegionPass.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/RegionPass.h Sat Jun 3 14:45:46 2017 (r319522) +++ vendor/llvm/dist/include/llvm/Analysis/RegionPass.h Sat Jun 3 15:20:36 2017 (r319523) @@ -78,6 +78,11 @@ class RegionPass : public Pass { (public) return PMT_RegionPassManager; } //@} + +protected: + /// Optional passes call this function to check whether the pass should be + /// skipped. This is the case when optimization bisect is over the limit. + bool skipRegion(Region &R) const; }; /// @brief The pass manager to schedule RegionPasses. Modified: vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Sat Jun 3 14:45:46 2017 (r319522) +++ vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Sat Jun 3 15:20:36 2017 (r319523) @@ -636,7 +636,7 @@ class ScalarEvolution { (private) /// @} public: - BackedgeTakenInfo() : MaxAndComplete(nullptr, 0) {} + BackedgeTakenInfo() : MaxAndComplete(nullptr, 0), MaxOrZero(false) {} BackedgeTakenInfo(BackedgeTakenInfo &&) = default; BackedgeTakenInfo &operator=(BackedgeTakenInfo &&) = default; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineRegionInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineRegionInfo.h Sat Jun 3 14:45:46 2017 (r319522) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineRegionInfo.h Sat Jun 3 15:20:36 2017 (r319523) @@ -10,83 +10,77 @@ #ifndef LLVM_CODEGEN_MACHINEREGIONINFO_H #define LLVM_CODEGEN_MACHINEREGIONINFO_H +#include "llvm/ADT/DepthFirstIterator.h" #include "llvm/Analysis/RegionInfo.h" #include "llvm/Analysis/RegionIterator.h" +#include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineDominanceFrontier.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineLoopInfo.h" +#include - namespace llvm { -class MachineDominatorTree; struct MachinePostDominatorTree; class MachineRegion; class MachineRegionNode; class MachineRegionInfo; -template<> -struct RegionTraits { - typedef MachineFunction FuncT; - typedef MachineBasicBlock BlockT; - typedef MachineRegion RegionT; - typedef MachineRegionNode RegionNodeT; - typedef MachineRegionInfo RegionInfoT; - typedef MachineDominatorTree DomTreeT; - typedef MachineDomTreeNode DomTreeNodeT; - typedef MachinePostDominatorTree PostDomTreeT; - typedef MachineDominanceFrontier DomFrontierT; - typedef MachineInstr InstT; - typedef MachineLoop LoopT; - typedef MachineLoopInfo LoopInfoT; +template <> struct RegionTraits { + using FuncT = MachineFunction; + using BlockT = MachineBasicBlock; + using RegionT = MachineRegion; + using RegionNodeT = MachineRegionNode; + using RegionInfoT = MachineRegionInfo; + using DomTreeT = MachineDominatorTree; + using DomTreeNodeT = MachineDomTreeNode; + using PostDomTreeT = MachinePostDominatorTree; + using DomFrontierT = MachineDominanceFrontier; + using InstT = MachineInstr; + using LoopT = MachineLoop; + using LoopInfoT = MachineLoopInfo; static unsigned getNumSuccessors(MachineBasicBlock *BB) { return BB->succ_size(); } }; - class MachineRegionNode : public RegionNodeBase> { public: - inline MachineRegionNode(MachineRegion *Parent, - MachineBasicBlock *Entry, + inline MachineRegionNode(MachineRegion *Parent, MachineBasicBlock *Entry, bool isSubRegion = false) - : RegionNodeBase>(Parent, Entry, isSubRegion) { + : RegionNodeBase>(Parent, Entry, + isSubRegion) {} - } - bool operator==(const MachineRegion &RN) const { - return this == reinterpret_cast(&RN); + return this == reinterpret_cast(&RN); } }; class MachineRegion : public RegionBase> { public: MachineRegion(MachineBasicBlock *Entry, MachineBasicBlock *Exit, - MachineRegionInfo* RI, - MachineDominatorTree *DT, MachineRegion *Parent = nullptr); + MachineRegionInfo *RI, MachineDominatorTree *DT, + MachineRegion *Parent = nullptr); ~MachineRegion(); bool operator==(const MachineRegionNode &RN) const { - return &RN == reinterpret_cast(this); + return &RN == reinterpret_cast(this); } }; class MachineRegionInfo : public RegionInfoBase> { public: explicit MachineRegionInfo(); - ~MachineRegionInfo() override; // updateStatistics - Update statistic about created regions. void updateStatistics(MachineRegion *R) final; - void recalculate(MachineFunction &F, - MachineDominatorTree *DT, - MachinePostDominatorTree *PDT, - MachineDominanceFrontier *DF); + void recalculate(MachineFunction &F, MachineDominatorTree *DT, + MachinePostDominatorTree *PDT, MachineDominanceFrontier *DF); }; class MachineRegionInfoPass : public MachineFunctionPass { @@ -94,17 +88,13 @@ class MachineRegionInfoPass : public MachineFunctionPa public: static char ID; - explicit MachineRegionInfoPass(); + explicit MachineRegionInfoPass(); ~MachineRegionInfoPass() override; - MachineRegionInfo &getRegionInfo() { - return RI; - } + MachineRegionInfo &getRegionInfo() { return RI; } - const MachineRegionInfo &getRegionInfo() const { - return RI; - } + const MachineRegionInfo &getRegionInfo() const { return RI; } /// @name MachineFunctionPass interface //@{ @@ -117,66 +107,76 @@ class MachineRegionInfoPass : public MachineFunctionPa //@} }; - template <> template <> -inline MachineBasicBlock* RegionNodeBase>::getNodeAs() const { +inline MachineBasicBlock * +RegionNodeBase>::getNodeAs() + const { assert(!isSubRegion() && "This is not a MachineBasicBlock RegionNode!"); return getEntry(); } -template<> -template<> -inline MachineRegion* RegionNodeBase>::getNodeAs() const { +template <> +template <> +inline MachineRegion * +RegionNodeBase>::getNodeAs() + const { assert(isSubRegion() && "This is not a subregion RegionNode!"); - auto Unconst = const_cast>*>(this); - return reinterpret_cast(Unconst); + auto Unconst = + const_cast> *>(this); + return reinterpret_cast(Unconst); } - RegionNodeGraphTraits(MachineRegionNode, MachineBasicBlock, MachineRegion); -RegionNodeGraphTraits(const MachineRegionNode, MachineBasicBlock, MachineRegion); +RegionNodeGraphTraits(const MachineRegionNode, MachineBasicBlock, + MachineRegion); RegionGraphTraits(MachineRegion, MachineRegionNode); RegionGraphTraits(const MachineRegion, const MachineRegionNode); -template <> struct GraphTraits - : public GraphTraits > { - typedef df_iterator, false, - GraphTraits>> - nodes_iterator; +template <> +struct GraphTraits + : public GraphTraits> { + using nodes_iterator = df_iterator, + false, GraphTraits>>; static NodeRef getEntryNode(MachineRegionInfo *RI) { - return GraphTraits >::getEntryNode(RI->getTopLevelRegion()); + return GraphTraits>::getEntryNode( + RI->getTopLevelRegion()); } - static nodes_iterator nodes_begin(MachineRegionInfo* RI) { + + static nodes_iterator nodes_begin(MachineRegionInfo *RI) { return nodes_iterator::begin(getEntryNode(RI)); } + static nodes_iterator nodes_end(MachineRegionInfo *RI) { return nodes_iterator::end(getEntryNode(RI)); } }; -template <> struct GraphTraits - : public GraphTraits { - typedef df_iterator, false, - GraphTraits>> - nodes_iterator; +template <> +struct GraphTraits + : public GraphTraits { + using nodes_iterator = df_iterator, + false, GraphTraits>>; static NodeRef getEntryNode(MachineRegionInfoPass *RI) { - return GraphTraits::getEntryNode(&RI->getRegionInfo()); + return GraphTraits::getEntryNode(&RI->getRegionInfo()); } - static nodes_iterator nodes_begin(MachineRegionInfoPass* RI) { - return GraphTraits::nodes_begin(&RI->getRegionInfo()); + + static nodes_iterator nodes_begin(MachineRegionInfoPass *RI) { + return GraphTraits::nodes_begin(&RI->getRegionInfo()); } + static nodes_iterator nodes_end(MachineRegionInfoPass *RI) { - return GraphTraits::nodes_end(&RI->getRegionInfo()); + return GraphTraits::nodes_end(&RI->getRegionInfo()); } }; extern template class RegionBase>; extern template class RegionNodeBase>; extern template class RegionInfoBase>; -} -#endif +} // end namespace llvm + +#endif // LLVM_CODEGEN_MACHINEREGIONINFO_H Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h Sat Jun 3 14:45:46 2017 (r319522) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h Sat Jun 3 15:20:36 2017 (r319523) @@ -14,11 +14,13 @@ #ifndef LLVM_CODEGEN_MACHINEREGISTERINFO_H #define LLVM_CODEGEN_MACHINEREGISTERINFO_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IndexedMap.h" #include "llvm/ADT/iterator_range.h" #include "llvm/ADT/PointerUnion.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/GlobalISel/RegisterBank.h" #include "llvm/CodeGen/LowLevelType.h" #include "llvm/CodeGen/MachineBasicBlock.h" @@ -41,8 +43,8 @@ namespace llvm { class PSetIterator; /// Convenient type to represent either a register class or a register bank. -typedef PointerUnion - RegClassOrRegBank; +using RegClassOrRegBank = + PointerUnion; /// MachineRegisterInfo - Keep track of information for virtual and physical /// registers, including vreg register classes, use/def chains for registers, @@ -125,7 +127,7 @@ class MachineRegisterInfo { (private) /// started. BitVector ReservedRegs; - typedef DenseMap VRegToTypeMap; + using VRegToTypeMap = DenseMap; /// Map generic virtual registers to their actual size. mutable std::unique_ptr VRegToType; @@ -266,8 +268,8 @@ class MachineRegisterInfo { (private) /// reg_iterator/reg_begin/reg_end - Walk all defs and uses of the specified /// register. - typedef defusechain_iterator - reg_iterator; + using reg_iterator = + defusechain_iterator; reg_iterator reg_begin(unsigned RegNo) const { return reg_iterator(getRegUseDefListHead(RegNo)); } @@ -279,8 +281,8 @@ class MachineRegisterInfo { (private) /// reg_instr_iterator/reg_instr_begin/reg_instr_end - Walk all defs and uses /// of the specified register, stepping by MachineInstr. - typedef defusechain_instr_iterator - reg_instr_iterator; + using reg_instr_iterator = + defusechain_instr_iterator; reg_instr_iterator reg_instr_begin(unsigned RegNo) const { return reg_instr_iterator(getRegUseDefListHead(RegNo)); } @@ -295,8 +297,8 @@ class MachineRegisterInfo { (private) /// reg_bundle_iterator/reg_bundle_begin/reg_bundle_end - Walk all defs and uses /// of the specified register, stepping by bundle. - typedef defusechain_instr_iterator - reg_bundle_iterator; + using reg_bundle_iterator = + defusechain_instr_iterator; reg_bundle_iterator reg_bundle_begin(unsigned RegNo) const { return reg_bundle_iterator(getRegUseDefListHead(RegNo)); } @@ -314,8 +316,8 @@ class MachineRegisterInfo { (private) /// reg_nodbg_iterator/reg_nodbg_begin/reg_nodbg_end - Walk all defs and uses /// of the specified register, skipping those marked as Debug. - typedef defusechain_iterator - reg_nodbg_iterator; + using reg_nodbg_iterator = + defusechain_iterator; reg_nodbg_iterator reg_nodbg_begin(unsigned RegNo) const { return reg_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -331,8 +333,8 @@ class MachineRegisterInfo { (private) /// reg_instr_nodbg_iterator/reg_instr_nodbg_begin/reg_instr_nodbg_end - Walk /// all defs and uses of the specified register, stepping by MachineInstr, /// skipping those marked as Debug. - typedef defusechain_instr_iterator - reg_instr_nodbg_iterator; + using reg_instr_nodbg_iterator = + defusechain_instr_iterator; reg_instr_nodbg_iterator reg_instr_nodbg_begin(unsigned RegNo) const { return reg_instr_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -348,8 +350,8 @@ class MachineRegisterInfo { (private) /// reg_bundle_nodbg_iterator/reg_bundle_nodbg_begin/reg_bundle_nodbg_end - Walk /// all defs and uses of the specified register, stepping by bundle, /// skipping those marked as Debug. - typedef defusechain_instr_iterator - reg_bundle_nodbg_iterator; + using reg_bundle_nodbg_iterator = + defusechain_instr_iterator; reg_bundle_nodbg_iterator reg_bundle_nodbg_begin(unsigned RegNo) const { return reg_bundle_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -369,8 +371,8 @@ class MachineRegisterInfo { (private) } /// def_iterator/def_begin/def_end - Walk all defs of the specified register. - typedef defusechain_iterator - def_iterator; + using def_iterator = + defusechain_iterator; def_iterator def_begin(unsigned RegNo) const { return def_iterator(getRegUseDefListHead(RegNo)); } @@ -382,8 +384,8 @@ class MachineRegisterInfo { (private) /// def_instr_iterator/def_instr_begin/def_instr_end - Walk all defs of the /// specified register, stepping by MachineInst. - typedef defusechain_instr_iterator - def_instr_iterator; + using def_instr_iterator = + defusechain_instr_iterator; def_instr_iterator def_instr_begin(unsigned RegNo) const { return def_instr_iterator(getRegUseDefListHead(RegNo)); } @@ -398,8 +400,8 @@ class MachineRegisterInfo { (private) /// def_bundle_iterator/def_bundle_begin/def_bundle_end - Walk all defs of the /// specified register, stepping by bundle. - typedef defusechain_instr_iterator - def_bundle_iterator; + using def_bundle_iterator = + defusechain_instr_iterator; def_bundle_iterator def_bundle_begin(unsigned RegNo) const { return def_bundle_iterator(getRegUseDefListHead(RegNo)); } @@ -425,8 +427,8 @@ class MachineRegisterInfo { (private) } /// use_iterator/use_begin/use_end - Walk all uses of the specified register. - typedef defusechain_iterator - use_iterator; + using use_iterator = + defusechain_iterator; use_iterator use_begin(unsigned RegNo) const { return use_iterator(getRegUseDefListHead(RegNo)); } @@ -438,8 +440,8 @@ class MachineRegisterInfo { (private) /// use_instr_iterator/use_instr_begin/use_instr_end - Walk all uses of the /// specified register, stepping by MachineInstr. - typedef defusechain_instr_iterator - use_instr_iterator; + using use_instr_iterator = + defusechain_instr_iterator; use_instr_iterator use_instr_begin(unsigned RegNo) const { return use_instr_iterator(getRegUseDefListHead(RegNo)); } @@ -454,8 +456,8 @@ class MachineRegisterInfo { (private) /// use_bundle_iterator/use_bundle_begin/use_bundle_end - Walk all uses of the /// specified register, stepping by bundle. - typedef defusechain_instr_iterator - use_bundle_iterator; + using use_bundle_iterator = + defusechain_instr_iterator; use_bundle_iterator use_bundle_begin(unsigned RegNo) const { return use_bundle_iterator(getRegUseDefListHead(RegNo)); } @@ -482,8 +484,8 @@ class MachineRegisterInfo { (private) /// use_nodbg_iterator/use_nodbg_begin/use_nodbg_end - Walk all uses of the /// specified register, skipping those marked as Debug. - typedef defusechain_iterator - use_nodbg_iterator; + using use_nodbg_iterator = + defusechain_iterator; use_nodbg_iterator use_nodbg_begin(unsigned RegNo) const { return use_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -499,8 +501,8 @@ class MachineRegisterInfo { (private) /// use_instr_nodbg_iterator/use_instr_nodbg_begin/use_instr_nodbg_end - Walk /// all uses of the specified register, stepping by MachineInstr, skipping /// those marked as Debug. - typedef defusechain_instr_iterator - use_instr_nodbg_iterator; + using use_instr_nodbg_iterator = + defusechain_instr_iterator; use_instr_nodbg_iterator use_instr_nodbg_begin(unsigned RegNo) const { return use_instr_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -516,8 +518,8 @@ class MachineRegisterInfo { (private) /// use_bundle_nodbg_iterator/use_bundle_nodbg_begin/use_bundle_nodbg_end - Walk /// all uses of the specified register, stepping by bundle, skipping /// those marked as Debug. - typedef defusechain_instr_iterator - use_bundle_nodbg_iterator; + using use_bundle_nodbg_iterator = + defusechain_instr_iterator; use_bundle_nodbg_iterator use_bundle_nodbg_begin(unsigned RegNo) const { return use_bundle_nodbg_iterator(getRegUseDefListHead(RegNo)); } @@ -593,7 +595,6 @@ class MachineRegisterInfo { (private) /// Return the register class of the specified virtual register. /// This shouldn't be used directly unless \p Reg has a register class. /// \see getRegClassOrNull when this might happen. - /// const TargetRegisterClass *getRegClass(unsigned Reg) const { assert(VRegInfo[Reg].first.is() && "Register class not set, wrong accessor"); @@ -620,7 +621,6 @@ class MachineRegisterInfo { (private) /// a register bank or has been assigned a register class. /// \note It is possible to get the register bank from the register class via /// RegisterBankInfo::getRegBankFromRegClass. - /// const RegisterBank *getRegBankOrNull(unsigned Reg) const { const RegClassOrRegBank &Val = VRegInfo[Reg].first; return Val.dyn_cast(); @@ -629,17 +629,14 @@ class MachineRegisterInfo { (private) /// Return the register bank or register class of \p Reg. /// \note Before the register bank gets assigned (i.e., before the /// RegBankSelect pass) \p Reg may not have either. - /// const RegClassOrRegBank &getRegClassOrRegBank(unsigned Reg) const { return VRegInfo[Reg].first; } /// setRegClass - Set the register class of the specified virtual register. - /// void setRegClass(unsigned Reg, const TargetRegisterClass *RC); /// Set the register bank to \p RegBank for \p Reg. - /// void setRegBank(unsigned Reg, const RegisterBank &RegBank); void setRegClassOrRegBank(unsigned Reg, @@ -653,7 +650,6 @@ class MachineRegisterInfo { (private) /// new register class, or NULL if no such class exists. /// This should only be used when the constraint is known to be trivial, like /// GR32 -> GR32_NOSP. Beware of increasing register pressure. - /// const TargetRegisterClass *constrainRegClass(unsigned Reg, const TargetRegisterClass *RC, unsigned MinNumRegs = 0); @@ -665,12 +661,10 @@ class MachineRegisterInfo { (private) /// This method can be used after constraints have been removed from a /// virtual register, for example after removing instructions or splitting /// the live range. - /// bool recomputeRegClass(unsigned Reg); /// createVirtualRegister - Create and return a new virtual register in the /// function with the specified register class. - /// unsigned createVirtualRegister(const TargetRegisterClass *RegClass); /// Accessor for VRegToType. This accessor should only be used @@ -704,7 +698,6 @@ class MachineRegisterInfo { (private) unsigned createIncompleteVirtualRegister(); /// getNumVirtRegs - Return the number of virtual registers created. - /// unsigned getNumVirtRegs() const { return VRegInfo.size(); } /// clearVirtRegs - Remove all virtual registers (after physreg assignment). @@ -810,7 +803,6 @@ class MachineRegisterInfo { (private) /// /// Reserved registers may belong to an allocatable register class, but the /// target has explicitly requested that they are not used. - /// bool isReserved(unsigned PhysReg) const { return getReservedRegs().test(PhysReg); } @@ -838,8 +830,8 @@ class MachineRegisterInfo { (private) // Iteration support for the live-ins set. It's kept in sorted order // by register number. - typedef std::vector>::const_iterator - livein_iterator; + using livein_iterator = + std::vector>::const_iterator; livein_iterator livein_begin() const { return LiveIns.begin(); } livein_iterator livein_end() const { return LiveIns.end(); } bool livein_empty() const { return LiveIns.empty(); } @@ -910,10 +902,10 @@ class MachineRegisterInfo { (private) } public: - typedef std::iterator::reference reference; - typedef std::iterator::pointer pointer; + using reference = std::iterator::reference; + using pointer = std::iterator::pointer; defusechain_iterator() = default; @@ -1016,10 +1008,10 @@ class MachineRegisterInfo { (private) } public: - typedef std::iterator::reference reference; - typedef std::iterator::pointer pointer; + using reference = std::iterator::reference; + using pointer = std::iterator::pointer; defusechain_instr_iterator() = default; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineScheduler.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineScheduler.h Sat Jun 3 14:45:46 2017 (r319522) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineScheduler.h Sat Jun 3 15:20:36 2017 (r319523) @@ -104,10 +104,15 @@ extern cl::opt ForceBottomUp; class LiveIntervals; class MachineDominatorTree; +class MachineFunction; +class MachineInstr; class MachineLoopInfo; class RegisterClassInfo; class SchedDFSResult; class ScheduleHazardRecognizer; +class TargetInstrInfo; +class TargetPassConfig; +class TargetRegisterInfo; /// MachineSchedContext provides enough context from the MachineScheduler pass /// for the target to instantiate a scheduler. @@ -129,10 +134,10 @@ struct MachineSchedContext { /// schedulers. class MachineSchedRegistry : public MachinePassRegistryNode { public: - typedef ScheduleDAGInstrs *(*ScheduleDAGCtor)(MachineSchedContext *); + using ScheduleDAGCtor = ScheduleDAGInstrs *(*)(MachineSchedContext *); // RegisterPassParser requires a (misnamed) FunctionPassCtor type. - typedef ScheduleDAGCtor FunctionPassCtor; + using FunctionPassCtor = ScheduleDAGCtor; static MachinePassRegistry Registry; @@ -527,7 +532,7 @@ class ReadyQueue { (public) unsigned size() const { return Queue.size(); } - typedef std::vector::iterator iterator; + using iterator = std::vector::iterator; iterator begin() { return Queue.begin(); } Modified: vendor/llvm/dist/include/llvm/CodeGen/PBQP/CostAllocator.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/PBQP/CostAllocator.h Sat Jun 3 14:45:46 2017 (r319522) +++ vendor/llvm/dist/include/llvm/CodeGen/PBQP/CostAllocator.h Sat Jun 3 15:20:36 2017 (r319523) @@ -1,4 +1,4 @@ -//===---------- CostAllocator.h - PBQP Cost Allocator -----------*- C++ -*-===// +//===- CostAllocator.h - PBQP Cost Allocator --------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -19,26 +19,28 @@ #define LLVM_CODEGEN_PBQP_COSTALLOCATOR_H #include "llvm/ADT/DenseSet.h" +#include +#include #include -#include namespace llvm { namespace PBQP { -template -class ValuePool { +template class ValuePool { public: - typedef std::shared_ptr PoolRef; + using PoolRef = std::shared_ptr; private: - class PoolEntry : public std::enable_shared_from_this { public: template PoolEntry(ValuePool &Pool, ValueKeyT Value) : Pool(Pool), Value(std::move(Value)) {} + ~PoolEntry() { Pool.removeEntry(this); } - const ValueT& getValue() const { return Value; } + + const ValueT &getValue() const { return Value; } + private: ValuePool &Pool; ValueT Value; @@ -46,10 +48,10 @@ class ValuePool { (private) class PoolEntryDSInfo { public: - static inline PoolEntry* getEmptyKey() { return nullptr; } + static inline PoolEntry *getEmptyKey() { return nullptr; } - static inline PoolEntry* getTombstoneKey() { - return reinterpret_cast(static_cast(1)); + static inline PoolEntry *getTombstoneKey() { + return reinterpret_cast(static_cast(1)); } template @@ -66,8 +68,7 @@ class ValuePool { (private) } template - static - bool isEqual(const ValueKeyT1 &C1, const ValueKeyT2 &C2) { + static bool isEqual(const ValueKeyT1 &C1, const ValueKeyT2 &C2) { return C1 == C2; } @@ -83,10 +84,9 @@ class ValuePool { (private) return P1 == P2; return isEqual(P1->getValue(), P2); } - }; - typedef DenseSet EntrySetT; + using EntrySetT = DenseSet; EntrySetT EntrySet; @@ -105,28 +105,31 @@ class ValuePool { (private) } }; -template -class PoolCostAllocator { +template class PoolCostAllocator { private: - typedef ValuePool VectorCostPool; - typedef ValuePool MatrixCostPool; + using VectorCostPool = ValuePool; + using MatrixCostPool = ValuePool; + public: - typedef VectorT Vector; - typedef MatrixT Matrix; - typedef typename VectorCostPool::PoolRef VectorPtr; - typedef typename MatrixCostPool::PoolRef MatrixPtr; + using Vector = VectorT; + using Matrix = MatrixT; + using VectorPtr = typename VectorCostPool::PoolRef; + using MatrixPtr = typename MatrixCostPool::PoolRef; - template - VectorPtr getVector(VectorKeyT v) { return VectorPool.getValue(std::move(v)); } + template VectorPtr getVector(VectorKeyT v) { + return VectorPool.getValue(std::move(v)); + } - template - MatrixPtr getMatrix(MatrixKeyT m) { return MatrixPool.getValue(std::move(m)); } + template MatrixPtr getMatrix(MatrixKeyT m) { + return MatrixPool.getValue(std::move(m)); + } + private: VectorCostPool VectorPool; MatrixCostPool MatrixPool; }; -} // namespace PBQP -} // namespace llvm +} // end namespace PBQP +} // end namespace llvm -#endif +#endif // LLVM_CODEGEN_PBQP_COSTALLOCATOR_H Modified: vendor/llvm/dist/include/llvm/CodeGen/PBQP/Graph.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/PBQP/Graph.h Sat Jun 3 14:45:46 2017 (r319522) +++ vendor/llvm/dist/include/llvm/CodeGen/PBQP/Graph.h Sat Jun 3 15:20:36 2017 (r319523) @@ -1,4 +1,4 @@ -//===-------------------- Graph.h - PBQP Graph ------------------*- C++ -*-===// +//===- Graph.h - PBQP Graph -------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,16 +11,14 @@ // //===----------------------------------------------------------------------===// - #ifndef LLVM_CODEGEN_PBQP_GRAPH_H #define LLVM_CODEGEN_PBQP_GRAPH_H #include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Debug.h" #include #include +#include #include -#include #include namespace llvm { @@ -28,8 +26,8 @@ namespace PBQP { class GraphBase { public: - typedef unsigned NodeId; - typedef unsigned EdgeId; + using NodeId = unsigned; + using EdgeId = unsigned; /// @brief Returns a value representing an invalid (non-existent) node. static NodeId invalidNodeId() { @@ -48,32 +46,32 @@ namespace PBQP { template class Graph : public GraphBase { private: - typedef typename SolverT::CostAllocator CostAllocator; + using CostAllocator = typename SolverT::CostAllocator; + public: - typedef typename SolverT::RawVector RawVector; - typedef typename SolverT::RawMatrix RawMatrix; - typedef typename SolverT::Vector Vector; - typedef typename SolverT::Matrix Matrix; - typedef typename CostAllocator::VectorPtr VectorPtr; - typedef typename CostAllocator::MatrixPtr MatrixPtr; - typedef typename SolverT::NodeMetadata NodeMetadata; - typedef typename SolverT::EdgeMetadata EdgeMetadata; - typedef typename SolverT::GraphMetadata GraphMetadata; + using RawVector = typename SolverT::RawVector; + using RawMatrix = typename SolverT::RawMatrix; + using Vector = typename SolverT::Vector; + using Matrix = typename SolverT::Matrix; + using VectorPtr = typename CostAllocator::VectorPtr; + using MatrixPtr = typename CostAllocator::MatrixPtr; + using NodeMetadata = typename SolverT::NodeMetadata; + using EdgeMetadata = typename SolverT::EdgeMetadata; + using GraphMetadata = typename SolverT::GraphMetadata; private: - class NodeEntry { public: - typedef std::vector AdjEdgeList; - typedef AdjEdgeList::size_type AdjEdgeIdx; - typedef AdjEdgeList::const_iterator AdjEdgeItr; + using AdjEdgeList = std::vector; + using AdjEdgeIdx = AdjEdgeList::size_type; + using AdjEdgeItr = AdjEdgeList::const_iterator; + NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {} + static AdjEdgeIdx getInvalidAdjEdgeIdx() { return std::numeric_limits::max(); } - NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {} - AdjEdgeIdx addAdjEdgeId(EdgeId EId) { AdjEdgeIdx Idx = AdjEdgeIds.size(); AdjEdgeIds.push_back(EId); @@ -96,6 +94,7 @@ namespace PBQP { VectorPtr Costs; NodeMetadata Metadata; + private: AdjEdgeList AdjEdgeIds; }; @@ -150,8 +149,10 @@ namespace PBQP { NodeId getN1Id() const { return NIds[0]; } NodeId getN2Id() const { return NIds[1]; } + MatrixPtr Costs; EdgeMetadata Metadata; + private: NodeId NIds[2]; typename NodeEntry::AdjEdgeIdx ThisEdgeAdjIdxs[2]; @@ -161,18 +162,20 @@ namespace PBQP { GraphMetadata Metadata; CostAllocator CostAlloc; - SolverT *Solver; + SolverT *Solver = nullptr; - typedef std::vector NodeVector; - typedef std::vector FreeNodeVector; + using NodeVector = std::vector; + using FreeNodeVector = std::vector; NodeVector Nodes; FreeNodeVector FreeNodeIds; - typedef std::vector EdgeVector; - typedef std::vector FreeEdgeVector; + using EdgeVector = std::vector; + using FreeEdgeVector = std::vector; EdgeVector Edges; FreeEdgeVector FreeEdgeIds; + Graph(const Graph &Other) {} + // ----- INTERNAL METHODS ----- NodeEntry &getNode(NodeId NId) { @@ -220,20 +223,18 @@ namespace PBQP { return EId; } - Graph(const Graph &Other) {} void operator=(const Graph &Other) {} public: + using AdjEdgeItr = typename NodeEntry::AdjEdgeItr; - typedef typename NodeEntry::AdjEdgeItr AdjEdgeItr; - class NodeItr { public: - typedef std::forward_iterator_tag iterator_category; - typedef NodeId value_type; - typedef int difference_type; - typedef NodeId* pointer; - typedef NodeId& reference; + using iterator_category = std::forward_iterator_tag; + using value_type = NodeId; + using difference_type = int; + using pointer = NodeId *; + using reference = NodeId &; NodeItr(NodeId CurNId, const Graph &G) : CurNId(CurNId), EndNId(G.Nodes.size()), FreeNodeIds(G.FreeNodeIds) { @@ -283,53 +284,65 @@ namespace PBQP { class NodeIdSet { public: - NodeIdSet(const Graph &G) : G(G) { } + NodeIdSet(const Graph &G) : G(G) {} + NodeItr begin() const { return NodeItr(0, G); } NodeItr end() const { return NodeItr(G.Nodes.size(), G); } + bool empty() const { return G.Nodes.empty(); } + typename NodeVector::size_type size() const { return G.Nodes.size() - G.FreeNodeIds.size(); } + private: const Graph& G; }; class EdgeIdSet { public: - EdgeIdSet(const Graph &G) : G(G) { } + EdgeIdSet(const Graph &G) : G(G) {} + EdgeItr begin() const { return EdgeItr(0, G); } EdgeItr end() const { return EdgeItr(G.Edges.size(), G); } + bool empty() const { return G.Edges.empty(); } + typename NodeVector::size_type size() const { return G.Edges.size() - G.FreeEdgeIds.size(); } + private: const Graph& G; }; class AdjEdgeIdSet { public: - AdjEdgeIdSet(const NodeEntry &NE) : NE(NE) { } + AdjEdgeIdSet(const NodeEntry &NE) : NE(NE) {} + typename NodeEntry::AdjEdgeItr begin() const { return NE.getAdjEdgeIds().begin(); } + typename NodeEntry::AdjEdgeItr end() const { return NE.getAdjEdgeIds().end(); } + bool empty() const { return NE.getAdjEdgeIds().empty(); } + typename NodeEntry::AdjEdgeList::size_type size() const { return NE.getAdjEdgeIds().size(); } + private: const NodeEntry &NE; }; /// @brief Construct an empty PBQP graph. - Graph() : Solver(nullptr) {} + Graph() = default; /// @brief Construct an empty PBQP graph with the given graph metadata. - Graph(GraphMetadata Metadata) - : Metadata(std::move(Metadata)), Solver(nullptr) {} + Graph(GraphMetadata Metadata) : Metadata(std::move(Metadata)) {} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jun 3 15:20:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3861EBF38E1; Sat, 3 Jun 2017 15:20:55 +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 BA81F733B7; Sat, 3 Jun 2017 15:20:54 +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 v53FKrLS082706; Sat, 3 Jun 2017 15:20:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FKmSG079711; Sat, 3 Jun 2017 15:20:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031520.v53FKmSG079711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319525 - in vendor/clang/dist: docs include/clang/Basic include/clang/Driver include/clang/Frontend include/clang/Lex lib/ARCMigrate lib/AST lib/Analysis lib/Basic lib/CodeGen lib/Driv... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:20:55 -0000 Author: dim Date: Sat Jun 3 15:20:48 2017 New Revision: 319525 URL: https://svnweb.freebsd.org/changeset/base/319525 Log: Vendor import of clang trunk r304659: https://llvm.org/svn/llvm-project/cfe/trunk@304659 Added: vendor/clang/dist/test/CodeGen/pr26099.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/pr33080.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/unaligned-member-qualifier.cpp (contents, props changed) vendor/clang/dist/test/Frontend/rewrite-includes-filenotfound.c (contents, props changed) vendor/clang/dist/test/Modules/Inputs/check-for-sanitizer-feature/ vendor/clang/dist/test/Modules/Inputs/check-for-sanitizer-feature/check.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/check-for-sanitizer-feature/map vendor/clang/dist/test/Modules/Inputs/header-attribs/ vendor/clang/dist/test/Modules/Inputs/header-attribs/bar.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/header-attribs/baz.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/header-attribs/foo.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/header-attribs/modular.modulemap vendor/clang/dist/test/Modules/Inputs/header-attribs/textual.modulemap vendor/clang/dist/test/Modules/check-for-sanitizer-feature.cpp (contents, props changed) vendor/clang/dist/test/Modules/header-attribs.cpp (contents, props changed) vendor/clang/dist/test/Modules/preprocess-missing.modulemap Deleted: vendor/clang/dist/test/CodeGenCXX/unaligned-duplicated-mangle-name.cpp Modified: vendor/clang/dist/docs/Modules.rst vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td vendor/clang/dist/include/clang/Basic/Module.h vendor/clang/dist/include/clang/Basic/Sanitizers.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def vendor/clang/dist/include/clang/Lex/ModuleMap.h vendor/clang/dist/lib/ARCMigrate/TransRetainReleaseDealloc.cpp vendor/clang/dist/lib/ARCMigrate/TransformActions.cpp vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDiagnostic.cpp vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/ItaniumMangle.cpp vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp vendor/clang/dist/lib/Analysis/PseudoConstantAnalysis.cpp vendor/clang/dist/lib/Analysis/ScanfFormatString.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/LangOptions.cpp vendor/clang/dist/lib/Basic/Module.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/Driver/SanitizerArgs.cpp vendor/clang/dist/lib/Edit/RewriteObjCFoundationAPI.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp vendor/clang/dist/lib/Frontend/SerializedDiagnosticReader.cpp vendor/clang/dist/lib/Lex/HeaderSearch.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseInit.cpp vendor/clang/dist/lib/Parse/ParseOpenMP.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Rewrite/HTMLRewrite.cpp vendor/clang/dist/lib/Sema/CoroutineStmtBuilder.h vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaCoroutine.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaLambda.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaStmtAsm.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/SValBuilder.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp vendor/clang/dist/test/CodeGen/thin_link_bitcode.c vendor/clang/dist/test/CodeGen/ubsan-pointer-overflow.m vendor/clang/dist/test/CodeGenCoroutines/coro-params.cpp vendor/clang/dist/test/CodeGenObjCXX/arc-mangle.mm vendor/clang/dist/test/Driver/fsanitize-coverage.c vendor/clang/dist/test/Integration/carbon.c vendor/clang/dist/test/Integration/cocoa-pch.m vendor/clang/dist/test/Integration/cocoa.m vendor/clang/dist/test/Misc/ast-print-objectivec.m vendor/clang/dist/test/Modules/diagnostics.modulemap vendor/clang/dist/test/Modules/lookup.m vendor/clang/dist/test/Modules/preprocess-module.cpp vendor/clang/dist/test/Sema/warn-strict-prototypes.m vendor/clang/dist/test/SemaCXX/coroutines.cpp vendor/clang/dist/test/SemaOpenCL/func.cl vendor/clang/dist/test/SemaTemplate/deduction-crash.cpp vendor/clang/dist/test/lit.cfg vendor/clang/dist/unittests/AST/DeclPrinterTest.cpp Modified: vendor/clang/dist/docs/Modules.rst ============================================================================== --- vendor/clang/dist/docs/Modules.rst Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/docs/Modules.rst Sat Jun 3 15:20:48 2017 (r319525) @@ -469,10 +469,17 @@ A header declaration specifies that a particular heade .. parsed-literal:: *header-declaration*: - ``private``:sub:`opt` ``textual``:sub:`opt` ``header`` *string-literal* - ``umbrella`` ``header`` *string-literal* - ``exclude`` ``header`` *string-literal* + ``private``:sub:`opt` ``textual``:sub:`opt` ``header`` *string-literal* *header-attrs*:sub:`opt` + ``umbrella`` ``header`` *string-literal* *header-attrs*:sub:`opt` + ``exclude`` ``header`` *string-literal* *header-attrs*:sub:`opt` + *header-attrs*: + '{' *header-attr** '}' + + *header-attr*: + ``size`` *integer-literal* + ``mtime`` *integer-literal* + A header declaration that does not contain ``exclude`` nor ``textual`` specifies a header that contributes to the enclosing module. Specifically, when the module is built, the named header will be parsed and its declarations will be (logically) placed into the enclosing submodule. A header with the ``umbrella`` specifier is called an umbrella header. An umbrella header includes all of the headers within its directory (and any subdirectories), and is typically used (in the ``#include`` world) to easily access the full API provided by a particular library. With modules, an umbrella header is a convenient shortcut that eliminates the need to write out ``header`` declarations for every library header. A given directory can only contain a single umbrella header. @@ -503,6 +510,18 @@ A header with the ``exclude`` specifier is excluded fr } A given header shall not be referenced by more than one *header-declaration*. + +Two *header-declaration*\s, or a *header-declaration* and a ``#include``, are +considered to refer to the same file if the paths resolve to the same file +and the specified *header-attr*\s (if any) match the attributes of that file, +even if the file is named differently (for instance, by a relative path or +via symlinks). + +.. note:: + The use of *header-attr*\s avoids the need for Clang to speculatively + ``stat`` every header referenced by a module map. It is recommended that + *header-attr*\s only be used in machine-generated module maps, to avoid + mismatches between attribute values and the corresponding files. Umbrella directory declaration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Modified: vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td Sat Jun 3 15:20:48 2017 (r319525) @@ -664,6 +664,12 @@ def warn_mmap_mismatched_top_level_private : Warning< InGroup; def note_mmap_rename_top_level_private_as_submodule : Note< "make '%0' a submodule of '%1' to ensure it can be found by name">; +def err_mmap_duplicate_header_attribute : Error< + "header attribute '%0' specified multiple times">; +def err_mmap_invalid_header_attribute_value : Error< + "expected integer literal as value for header attribute '%0'">; +def err_mmap_expected_header_attribute : Error< + "expected a header attribute name ('size' or 'mtime')">; def warn_auto_module_import : Warning< "treating #%select{include|import|include_next|__include_macros}0 as an " Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Sat Jun 3 15:20:48 2017 (r319525) @@ -4584,7 +4584,7 @@ def warn_missing_prototype : Warning< def note_declaration_not_a_prototype : Note< "this declaration is not a prototype; add 'void' to make it a prototype for a zero-parameter function">; def warn_strict_prototypes : Warning< - "this %select{function declaration is not|" + "this %select{function declaration is not|block declaration is not|" "old-style function definition is not preceded by}0 a prototype">, InGroup>, DefaultIgnore; def warn_missing_variable_declarations : Warning< @@ -7268,7 +7268,7 @@ def err_invalid_conversion_between_vector_and_integer "invalid conversion between vector type %0 and integer type %1 " "of different size">; -def err_opencl_function_pointer_variable : Error< +def err_opencl_function_pointer : Error< "pointers to functions are not allowed">; def err_opencl_taking_function_address : Error< Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td Sat Jun 3 15:20:48 2017 (r319525) @@ -174,10 +174,6 @@ def note_module_odr_violation_mismatch_decl_diff : Not "method %2 with %ordinal3 parameter of type %4%select{| decayed from %6}5|" "method %2 with %ordinal3 parameter named %4}1">; -def warn_module_uses_date_time : Warning< - "%select{precompiled header|module}0 uses __DATE__ or __TIME__">, - InGroup>; - def warn_duplicate_module_file_extension : Warning< "duplicate module file extension block name '%0'">, InGroup; @@ -186,7 +182,15 @@ def warn_module_system_bit_conflict : Warning< "module file '%0' was validated as a system module and is now being imported " "as a non-system module; any difference in diagnostic options will be ignored">, InGroup; +} // let CategoryName +let CategoryName = "AST Serialization Issue" in { +def warn_module_uses_date_time : Warning< + "%select{precompiled header|module}0 uses __DATE__ or __TIME__">, + InGroup>; +def err_module_no_size_mtime_for_header : Error< + "cannot emit module %0: %select{size|mtime}1 must be explicitly specified " + "for missing header file \"%2\"">; } // let CategoryName } // let Component Modified: vendor/clang/dist/include/clang/Basic/Module.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/Module.h Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/include/clang/Basic/Module.h Sat Jun 3 15:20:48 2017 (r319525) @@ -154,10 +154,18 @@ class Module { (public) /// \brief Stored information about a header directive that was found in the /// module map file but has not been resolved to a file. struct UnresolvedHeaderDirective { + HeaderKind Kind = HK_Normal; SourceLocation FileNameLoc; std::string FileName; - bool IsUmbrella; + bool IsUmbrella = false; + bool HasBuiltinHeader = false; + Optional Size; + Optional ModTime; }; + + /// Headers that are mentioned in the module map file but that we have not + /// yet attempted to resolve to a file on the file system. + SmallVector UnresolvedHeaders; /// \brief Headers that are mentioned in the module map file but could not be /// found on the file system. Modified: vendor/clang/dist/include/clang/Basic/Sanitizers.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/Sanitizers.h Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/include/clang/Basic/Sanitizers.h Sat Jun 3 15:20:48 2017 (r319525) @@ -61,8 +61,8 @@ struct SanitizerSet { Mask = Value ? (Mask | K) : (Mask & ~K); } - /// \brief Disable all sanitizers. - void clear() { Mask = 0; } + /// Disable the sanitizers specified in \p K. + void clear(SanitizerMask K = SanitizerKind::All) { Mask &= ~K; } /// \brief Returns true if at least one sanitizer is enabled. bool empty() const { return Mask == 0; } @@ -78,6 +78,12 @@ SanitizerMask parseSanitizerValue(StringRef Value, boo /// For each sanitizer group bit set in \p Kinds, set the bits for sanitizers /// this group enables. SanitizerMask expandSanitizerGroups(SanitizerMask Kinds); + +/// Return the sanitizers which do not affect preprocessing. +static inline SanitizerMask getPPTransparentSanitizers() { + return SanitizerKind::CFI | SanitizerKind::Integer | + SanitizerKind::Nullability | SanitizerKind::Undefined; +} } // end namespace clang Modified: vendor/clang/dist/include/clang/Driver/CC1Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/CC1Options.td Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/include/clang/Driver/CC1Options.td Sat Jun 3 15:20:48 2017 (r319525) @@ -293,6 +293,9 @@ def fsanitize_coverage_trace_gep def fsanitize_coverage_8bit_counters : Flag<["-"], "fsanitize-coverage-8bit-counters">, HelpText<"Enable frequency counters in sanitizer coverage">; +def fsanitize_coverage_inline_8bit_counters + : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">, + HelpText<"Enable inline 8-bit counters in sanitizer coverage">; def fsanitize_coverage_trace_pc : Flag<["-"], "fsanitize-coverage-trace-pc">, HelpText<"Enable PC tracing in sanitizer coverage">; Modified: vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def ============================================================================== --- vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def Sat Jun 3 15:20:48 2017 (r319525) @@ -163,6 +163,7 @@ CODEGENOPT(SanitizeCoverageTracePC, 1, 0) ///< Enable ///< in sanitizer coverage. CODEGENOPT(SanitizeCoverageTracePCGuard, 1, 0) ///< Enable PC tracing with guard ///< in sanitizer coverage. +CODEGENOPT(SanitizeCoverageInline8bitCounters, 1, 0) ///< Use inline 8bit counters. CODEGENOPT(SanitizeCoverageNoPrune, 1, 0) ///< Disable coverage pruning. CODEGENOPT(SanitizeStats , 1, 0) ///< Collect statistics for sanitizers. CODEGENOPT(SimplifyLibCalls , 1, 1) ///< Set when -fbuiltin is enabled. Modified: vendor/clang/dist/include/clang/Lex/ModuleMap.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/ModuleMap.h Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/include/clang/Lex/ModuleMap.h Sat Jun 3 15:20:48 2017 (r319525) @@ -26,6 +26,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" +#include "llvm/ADT/TinyPtrVector.h" #include "llvm/ADT/Twine.h" #include #include @@ -116,6 +117,11 @@ class ModuleMap { (public) // Adjust ModuleMap::addHeader. }; + /// Convert a header kind to a role. Requires Kind to not be HK_Excluded. + static ModuleHeaderRole headerKindToRole(Module::HeaderKind Kind); + /// Convert a header role to a kind. + static Module::HeaderKind headerRoleToKind(ModuleHeaderRole Role); + /// \brief A header that is known to reside within a given module, /// whether it was included or excluded. class KnownHeader { @@ -165,7 +171,13 @@ class ModuleMap { (public) /// \brief Mapping from each header to the module that owns the contents of /// that header. HeadersMap Headers; - + + /// Map from file sizes to modules with lazy header directives of that size. + mutable llvm::DenseMap> LazyHeadersBySize; + /// Map from mtimes to modules with lazy header directives with those mtimes. + mutable llvm::DenseMap> + LazyHeadersByModTime; + /// \brief Mapping from directories with umbrella headers to the module /// that is generated from the umbrella header. /// @@ -257,22 +269,30 @@ class ModuleMap { (public) /// resolved. Module *resolveModuleId(const ModuleId &Id, Module *Mod, bool Complain) const; - /// Resolve the given header directive to an actual header file. + /// Add an unresolved header to a module. + void addUnresolvedHeader(Module *Mod, + Module::UnresolvedHeaderDirective Header); + + /// Look up the given header directive to find an actual header file. /// /// \param M The module in which we're resolving the header directive. /// \param Header The header directive to resolve. /// \param RelativePathName Filled in with the relative path name from the /// module to the resolved header. /// \return The resolved file, if any. - const FileEntry *resolveHeader(Module *M, - Module::UnresolvedHeaderDirective Header, - SmallVectorImpl &RelativePathName); + const FileEntry *findHeader(Module *M, + const Module::UnresolvedHeaderDirective &Header, + SmallVectorImpl &RelativePathName); + /// Resolve the given header directive. + void resolveHeader(Module *M, + const Module::UnresolvedHeaderDirective &Header); + /// Attempt to resolve the specified header directive as naming a builtin /// header. - const FileEntry * - resolveAsBuiltinHeader(Module *M, Module::UnresolvedHeaderDirective Header, - SmallVectorImpl &BuiltinPathName); + /// \return \c true if a corresponding builtin header was found. + bool resolveAsBuiltinHeader(Module *M, + const Module::UnresolvedHeaderDirective &Header); /// \brief Looks up the modules that \p File corresponds to. /// @@ -367,6 +387,15 @@ class ModuleMap { (public) /// Typically, \ref findModuleForHeader should be used instead, as it picks /// the preferred module for the header. ArrayRef findAllModulesForHeader(const FileEntry *File) const; + + /// Resolve all lazy header directives for the specified file. + /// + /// This ensures that the HeaderFileInfo on HeaderSearch is up to date. This + /// is effectively internal, but is exposed so HeaderSearch can call it. + void resolveHeaderDirectives(const FileEntry *File) const; + + /// Resolve all lazy header directives for the specified module. + void resolveHeaderDirectives(Module *Mod) const; /// \brief Reports errors if a module must not include a specific file. /// Modified: vendor/clang/dist/lib/ARCMigrate/TransRetainReleaseDealloc.cpp ============================================================================== --- vendor/clang/dist/lib/ARCMigrate/TransRetainReleaseDealloc.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/ARCMigrate/TransRetainReleaseDealloc.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -78,6 +78,7 @@ class RetainReleaseDeallocRemover : (public) } } // Pass through. + LLVM_FALLTHROUGH; case OMF_retain: case OMF_release: if (E->getReceiverKind() == ObjCMessageExpr::Instance) Modified: vendor/clang/dist/lib/ARCMigrate/TransformActions.cpp ============================================================================== --- vendor/clang/dist/lib/ARCMigrate/TransformActions.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/ARCMigrate/TransformActions.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -539,6 +539,7 @@ void TransformActionsImpl::addRemoval(CharSourceRange return; case Range_Contains: RI->End = newRange.End; + LLVM_FALLTHROUGH; case Range_ExtendsBegin: newRange.End = RI->End; Removals.erase(RI); Modified: vendor/clang/dist/lib/AST/ASTContext.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTContext.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/AST/ASTContext.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -6240,6 +6240,8 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T S += "{objc_class=}"; return; } + // TODO: Double check to make sure this intentially falls through. + LLVM_FALLTHROUGH; } case Type::ObjCInterface: { Modified: vendor/clang/dist/lib/AST/ASTDiagnostic.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTDiagnostic.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/AST/ASTDiagnostic.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -360,6 +360,7 @@ void clang::FormatASTNodeDiagnosticArgument( Modifier = StringRef(); Argument = StringRef(); // Fall through + LLVM_FALLTHROUGH; } case DiagnosticsEngine::ak_qualtype: { assert(Modifier.empty() && Argument.empty() && Modified: vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -424,6 +424,7 @@ static bool IsStructurallyEquivalent(StructuralEquival return false; // Fall through to check the bits common with FunctionNoProtoType. + LLVM_FALLTHROUGH; } case Type::FunctionNoProto: { Modified: vendor/clang/dist/lib/AST/DeclPrinter.cpp ============================================================================== --- vendor/clang/dist/lib/AST/DeclPrinter.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/AST/DeclPrinter.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -1189,7 +1189,9 @@ void DeclPrinter::VisitObjCMethodDecl(ObjCMethodDecl * for (const auto *PI : OMD->parameters()) { // FIXME: selector is missing here! pos = name.find_first_of(':', lastPos); - Out << " " << name.substr(lastPos, pos - lastPos) << ':'; + if (lastPos != 0) + Out << " "; + Out << name.substr(lastPos, pos - lastPos) << ':'; PrintObjCMethodType(OMD->getASTContext(), PI->getObjCDeclQualifier(), PI->getType()); @@ -1198,7 +1200,7 @@ void DeclPrinter::VisitObjCMethodDecl(ObjCMethodDecl * } if (OMD->param_begin() == OMD->param_end()) - Out << " " << name; + Out << name; if (OMD->isVariadic()) Out << ", ..."; Modified: vendor/clang/dist/lib/AST/Expr.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Expr.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/AST/Expr.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -1576,6 +1576,7 @@ bool CastExpr::CastConsistency() const { getSubExpr()->getType()->isBlockPointerType()); assert(getType()->getPointeeType().getAddressSpace() != getSubExpr()->getType()->getPointeeType().getAddressSpace()); + LLVM_FALLTHROUGH; // These should not have an inheritance path. case CK_Dynamic: case CK_ToUnion: @@ -2102,6 +2103,7 @@ bool Expr::isUnusedResultAWarning(const Expr *&WarnE, } // Fallthrough for generic call handling. + LLVM_FALLTHROUGH; } case CallExprClass: case CXXMemberCallExprClass: Modified: vendor/clang/dist/lib/AST/ExprConstant.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ExprConstant.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/AST/ExprConstant.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -736,6 +736,7 @@ namespace { if (!HasFoldFailureDiagnostic) break; // We've already failed to fold something. Keep that diagnostic. + LLVM_FALLTHROUGH; case EM_ConstantExpression: case EM_PotentialConstantExpression: case EM_ConstantExpressionUnevaluated: @@ -10374,6 +10375,7 @@ static ICEDiag CheckICE(const Expr* E, const ASTContex } // OffsetOf falls through here. + LLVM_FALLTHROUGH; } case Expr::OffsetOfExprClass: { // Note that per C99, offsetof must be an ICE. And AFAIK, using @@ -10476,6 +10478,7 @@ static ICEDiag CheckICE(const Expr* E, const ASTContex return Worst(LHSResult, RHSResult); } } + LLVM_FALLTHROUGH; } case Expr::ImplicitCastExprClass: case Expr::CStyleCastExprClass: Modified: vendor/clang/dist/lib/AST/ItaniumMangle.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ItaniumMangle.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/AST/ItaniumMangle.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -1459,8 +1459,6 @@ void CXXNameMangler::mangleNestedName(const NamedDecl // We do not consider restrict a distinguishing attribute for overloading // purposes so we must not mangle it. MethodQuals.removeRestrict(); - // __unaligned is not currently mangled in any way, so remove it. - MethodQuals.removeUnaligned(); mangleQualifiers(MethodQuals); mangleRefQualifier(Method->getRefQualifier()); } @@ -2140,7 +2138,8 @@ CXXNameMangler::mangleOperatorName(OverloadedOperatorK } void CXXNameMangler::mangleQualifiers(Qualifiers Quals) { - // Vendor qualifiers come first. + // Vendor qualifiers come first and if they are order-insensitive they must + // be emitted in reversed alphabetical order, see Itanium ABI 5.1.5. // Address space qualifiers start with an ordinary letter. if (Quals.hasAddressSpace()) { @@ -2176,17 +2175,28 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals } // The ARC ownership qualifiers start with underscores. - switch (Quals.getObjCLifetime()) { // Objective-C ARC Extension: // // ::= U "__strong" // ::= U "__weak" // ::= U "__autoreleasing" + // + // Note: we emit __weak first to preserve the order as + // required by the Itanium ABI. + if (Quals.getObjCLifetime() == Qualifiers::OCL_Weak) + mangleVendorQualifier("__weak"); + + // __unaligned (from -fms-extensions) + if (Quals.hasUnaligned()) + mangleVendorQualifier("__unaligned"); + + // Remaining ARC ownership qualifiers. + switch (Quals.getObjCLifetime()) { case Qualifiers::OCL_None: break; case Qualifiers::OCL_Weak: - mangleVendorQualifier("__weak"); + // Do nothing as we already handled this case above. break; case Qualifiers::OCL_Strong: @@ -3775,6 +3785,7 @@ recurse: Out << "v1U" << Kind.size() << Kind; } // Fall through to mangle the cast itself. + LLVM_FALLTHROUGH; case Expr::CStyleCastExprClass: mangleCastExpression(E, "cv"); @@ -4327,7 +4338,7 @@ bool CXXNameMangler::mangleSubstitution(const NamedDec /// substitutions. static bool hasMangledSubstitutionQualifiers(QualType T) { Qualifiers Qs = T.getQualifiers(); - return Qs.getCVRQualifiers() || Qs.hasAddressSpace(); + return Qs.getCVRQualifiers() || Qs.hasAddressSpace() || Qs.hasUnaligned(); } bool CXXNameMangler::mangleSubstitution(QualType T) { Modified: vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp ============================================================================== --- vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -290,6 +290,7 @@ NestedNameSpecifier::print(raw_ostream &OS, case TypeSpecWithTemplate: OS << "template "; // Fall through to print the type. + LLVM_FALLTHROUGH; case TypeSpec: { const Type *T = getAsType(); Modified: vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp ============================================================================== --- vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -441,6 +441,7 @@ ArgType PrintfSpecifier::getArgType(ASTContext &Ctx, case LengthModifier::AsShort: if (Ctx.getTargetInfo().getTriple().isOSMSVCRT()) return Ctx.IntTy; + LLVM_FALLTHROUGH; default: return ArgType::Invalid(); } Modified: vendor/clang/dist/lib/Analysis/PseudoConstantAnalysis.cpp ============================================================================== --- vendor/clang/dist/lib/Analysis/PseudoConstantAnalysis.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Analysis/PseudoConstantAnalysis.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -109,6 +109,7 @@ void PseudoConstantAnalysis::RunAnalysis() { // Do not visit the children continue; + LLVM_FALLTHROUGH; } case BO_AddAssign: case BO_SubAssign: Modified: vendor/clang/dist/lib/Analysis/ScanfFormatString.cpp ============================================================================== --- vendor/clang/dist/lib/Analysis/ScanfFormatString.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Analysis/ScanfFormatString.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -341,6 +341,7 @@ ArgType ScanfSpecifier::getArgType(ASTContext &Ctx) co case LengthModifier::AsShort: if (Ctx.getTargetInfo().getTriple().isOSMSVCRT()) return ArgType::PtrTo(ArgType::AnyCharTy); + LLVM_FALLTHROUGH; default: return ArgType::Invalid(); } @@ -357,6 +358,7 @@ ArgType ScanfSpecifier::getArgType(ASTContext &Ctx) co case LengthModifier::AsShort: if (Ctx.getTargetInfo().getTriple().isOSMSVCRT()) return ArgType::PtrTo(ArgType::AnyCharTy); + LLVM_FALLTHROUGH; default: return ArgType::Invalid(); } Modified: vendor/clang/dist/lib/Basic/IdentifierTable.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/IdentifierTable.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Basic/IdentifierTable.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -551,6 +551,7 @@ ObjCInstanceTypeFamily Selector::getInstTypeMethodFami case 's': if (startsWithWord(name, "shared")) return OIT_ReturnsSelf; if (startsWithWord(name, "standard")) return OIT_Singleton; + break; case 'i': if (startsWithWord(name, "init")) return OIT_Init; default: Modified: vendor/clang/dist/lib/Basic/LangOptions.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/LangOptions.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Basic/LangOptions.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -29,9 +29,7 @@ void LangOptions::resetNonModularOptions() { Name = Default; #include "clang/Basic/LangOptions.def" - // FIXME: This should not be reset; modules can be different with different - // sanitizer options (this affects __has_feature(address_sanitizer) etc). - Sanitize.clear(); + // These options do not affect AST generation. SanitizerBlacklistFiles.clear(); XRayAlwaysInstrumentFiles.clear(); XRayNeverInstrumentFiles.clear(); Modified: vendor/clang/dist/lib/Basic/Module.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Module.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Basic/Module.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -394,11 +394,30 @@ void Module::print(raw_ostream &OS, unsigned Indent) c {"exclude ", HK_Excluded}}; for (auto &K : Kinds) { + assert(&K == &Kinds[K.Kind] && "kinds in wrong order"); for (auto &H : Headers[K.Kind]) { OS.indent(Indent + 2); OS << K.Prefix << "header \""; OS.write_escaped(H.NameAsWritten); - OS << "\"\n"; + OS << "\" { size " << H.Entry->getSize() + << " mtime " << H.Entry->getModificationTime() << " }\n"; + } + } + for (auto *Unresolved : {&UnresolvedHeaders, &MissingHeaders}) { + for (auto &U : *Unresolved) { + OS.indent(Indent + 2); + OS << Kinds[U.Kind].Prefix << "header \""; + OS.write_escaped(U.FileName); + OS << "\""; + if (U.Size || U.ModTime) { + OS << " {"; + if (U.Size) + OS << " size " << *U.Size; + if (U.ModTime) + OS << " mtime " << *U.ModTime; + OS << " }"; + } + OS << "\n"; } } Modified: vendor/clang/dist/lib/Basic/TargetInfo.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/TargetInfo.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Basic/TargetInfo.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -143,9 +143,11 @@ const char *TargetInfo::getTypeConstantSuffix(IntType case UnsignedChar: if (getCharWidth() < getIntWidth()) return ""; + LLVM_FALLTHROUGH; case UnsignedShort: if (getShortWidth() < getIntWidth()) return ""; + LLVM_FALLTHROUGH; case UnsignedInt: return "U"; case UnsignedLong: return "UL"; case UnsignedLongLong: return "ULL"; Modified: vendor/clang/dist/lib/CodeGen/BackendUtil.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/BackendUtil.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/BackendUtil.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -49,6 +49,7 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/AlwaysInliner.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" +#include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h" #include "llvm/Transforms/Instrumentation.h" #include "llvm/Transforms/ObjCARC.h" #include "llvm/Transforms/Scalar.h" @@ -186,6 +187,7 @@ static void addSanitizerCoveragePass(const PassManager Opts.TracePC = CGOpts.SanitizeCoverageTracePC; Opts.TracePCGuard = CGOpts.SanitizeCoverageTracePCGuard; Opts.NoPrune = CGOpts.SanitizeCoverageNoPrune; + Opts.Inline8bitCounters = CGOpts.SanitizeCoverageInline8bitCounters; PM.add(createSanitizerCoverageModulePass(Opts)); } @@ -897,6 +899,7 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManage // create that pass manager here and use it as needed below. legacy::PassManager CodeGenPasses; bool NeedCodeGen = false; + Optional ThinLinkOS; // Append any output we need to the pass manager. switch (Action) { @@ -904,9 +907,24 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManage break; case Backend_EmitBC: - MPM.addPass(BitcodeWriterPass(*OS, CodeGenOpts.EmitLLVMUseLists, - CodeGenOpts.EmitSummaryIndex, - CodeGenOpts.EmitSummaryIndex)); + if (CodeGenOpts.EmitSummaryIndex) { + if (!CodeGenOpts.ThinLinkBitcodeFile.empty()) { + std::error_code EC; + ThinLinkOS.emplace(CodeGenOpts.ThinLinkBitcodeFile, EC, + llvm::sys::fs::F_None); + if (EC) { + Diags.Report(diag::err_fe_unable_to_open_output) + << CodeGenOpts.ThinLinkBitcodeFile << EC.message(); + return; + } + } + MPM.addPass( + ThinLTOBitcodeWriterPass(*OS, ThinLinkOS ? &*ThinLinkOS : nullptr)); + } else { + MPM.addPass(BitcodeWriterPass(*OS, CodeGenOpts.EmitLLVMUseLists, + CodeGenOpts.EmitSummaryIndex, + CodeGenOpts.EmitSummaryIndex)); + } break; case Backend_EmitLL: @@ -1029,6 +1047,7 @@ static void runThinLTOBackend(ModuleSummaryIndex *Comb Conf.CGOptLevel = getCGOptLevel(CGOpts); initTargetOptions(Conf.Options, CGOpts, TOpts, LOpts, HeaderOpts); Conf.SampleProfile = std::move(SampleProfile); + Conf.UseNewPM = CGOpts.ExperimentalNewPassManager; switch (Action) { case Backend_EmitNothing: Conf.PreCodeGenModuleHook = [](size_t Task, const Module &Mod) { Modified: vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -2659,6 +2659,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const Function Builder.CreateCall(CGM.CreateRuntimeFunction(FTy, Name), llvm::ArrayRef(Args))); } + LLVM_FALLTHROUGH; } // OpenCL v2.0 s6.13.17.6 - Kernel query functions need bitcast of block // parameter. @@ -3813,6 +3814,7 @@ Value *CodeGenFunction::EmitCommonNeonBuiltinExpr( case NEON::BI__builtin_neon_vcalt_v: case NEON::BI__builtin_neon_vcaltq_v: std::swap(Ops[0], Ops[1]); + LLVM_FALLTHROUGH; case NEON::BI__builtin_neon_vcage_v: case NEON::BI__builtin_neon_vcageq_v: case NEON::BI__builtin_neon_vcagt_v: @@ -5056,6 +5058,7 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned Bu case NEON::BI__builtin_neon_vsri_n_v: case NEON::BI__builtin_neon_vsriq_n_v: rightShift = true; + LLVM_FALLTHROUGH; case NEON::BI__builtin_neon_vsli_n_v: case NEON::BI__builtin_neon_vsliq_n_v: Ops[2] = EmitNeonShiftVector(Ops[2], Ty, rightShift); Modified: vendor/clang/dist/lib/CodeGen/CGCall.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGCall.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/CGCall.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -4259,6 +4259,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo Builder.CreateStore(elt, eltAddr); } // FALLTHROUGH + LLVM_FALLTHROUGH; } case ABIArgInfo::InAlloca: Modified: vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -625,6 +625,7 @@ RValue CodeGenFunction::EmitCoroutineIntrinsic(const C CGM.Error(E->getLocStart(), "this builtin expect that __builtin_coro_id has" " been used earlier in this function"); // Fallthrough to the next case to add TokenNone as the first argument. + LLVM_FALLTHROUGH; } // @llvm.coro.suspend takes a token parameter. Add token 'none' as the first // argument. Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -2781,6 +2781,7 @@ llvm::DICompositeType *CGDebugInfo::CreateLimitedType( // them distinct if they are ODR-uniqued. if (FullName.empty()) break; + LLVM_FALLTHROUGH; case llvm::dwarf::DW_TAG_structure_type: case llvm::dwarf::DW_TAG_union_type: @@ -3263,7 +3264,7 @@ void CGDebugInfo::EmitInlineFunctionStart(CGBuilderTy void CGDebugInfo::EmitInlineFunctionEnd(CGBuilderTy &Builder) { assert(CurInlinedAt && "unbalanced inline scope stack"); - EmitFunctionEnd(Builder); + EmitFunctionEnd(Builder, nullptr); setInlinedAt(llvm::DebugLoc(CurInlinedAt).getInlinedAt()); } @@ -3332,7 +3333,7 @@ void CGDebugInfo::EmitLexicalBlockEnd(CGBuilderTy &Bui LexicalBlockStack.pop_back(); } -void CGDebugInfo::EmitFunctionEnd(CGBuilderTy &Builder) { +void CGDebugInfo::EmitFunctionEnd(CGBuilderTy &Builder, llvm::Function *Fn) { assert(!LexicalBlockStack.empty() && "Region stack mismatch, stack empty!"); unsigned RCount = FnBeginRegionCount.back(); assert(RCount <= LexicalBlockStack.size() && "Region stack mismatch"); @@ -3344,6 +3345,9 @@ void CGDebugInfo::EmitFunctionEnd(CGBuilderTy &Builder LexicalBlockStack.pop_back(); } FnBeginRegionCount.pop_back(); + + if (Fn && Fn->getSubprogram()) + DBuilder.finalizeSubprogram(Fn->getSubprogram()); } llvm::DIType *CGDebugInfo::EmitTypeForVarWithBlocksAttr(const VarDecl *VD, Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.h Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.h Sat Jun 3 15:20:48 2017 (r319525) @@ -367,7 +367,7 @@ class CGDebugInfo { (public) void EmitFunctionDecl(GlobalDecl GD, SourceLocation Loc, QualType FnType); /// Constructs the debug code for exiting a function. - void EmitFunctionEnd(CGBuilderTy &Builder); + void EmitFunctionEnd(CGBuilderTy &Builder, llvm::Function *Fn); /// Emit metadata to indicate the beginning of a new lexical block /// and push the block onto the stack. Modified: vendor/clang/dist/lib/CodeGen/CGExpr.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExpr.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/CGExpr.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -1487,9 +1487,9 @@ void CodeGenFunction::EmitStoreOfScalar(llvm::Value *V // Handle vectors differently to get better performance. if (Ty->isVectorType()) { llvm::Type *SrcTy = Value->getType(); - auto *VecTy = cast(SrcTy); + auto *VecTy = dyn_cast(SrcTy); // Handle vec3 special. - if (VecTy->getNumElements() == 3) { + if (VecTy && VecTy->getNumElements() == 3) { // Our source is a vec3, do a shuffle vector to make it a vec4. llvm::Constant *Mask[] = {Builder.getInt32(0), Builder.getInt32(1), Builder.getInt32(2), Modified: vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -3887,7 +3887,7 @@ Value *CodeGenFunction::EmitCheckedInBoundsGEP(Value * /// Return the result of the given binary operation. auto eval = [&](BinaryOperator::Opcode Opcode, llvm::Value *LHS, llvm::Value *RHS) -> llvm::Value * { - assert(Opcode == BO_Add || Opcode == BO_Mul && "Can't eval binop"); + assert((Opcode == BO_Add || Opcode == BO_Mul) && "Can't eval binop"); // If the operands are constants, return a constant result. if (auto *LHSCI = dyn_cast(LHS)) { Modified: vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -348,7 +348,7 @@ void CodeGenFunction::FinishFunction(SourceLocation En // Emit debug descriptor for function end. if (CGDebugInfo *DI = getDebugInfo()) - DI->EmitFunctionEnd(Builder); + DI->EmitFunctionEnd(Builder, CurFn); // Reset the debug location to that of the simple 'return' expression, if any // rather than that of the end of the function's scope '}'. Modified: vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -3841,6 +3841,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { // Skip variable templates if (cast(D)->getDescribedVarTemplate()) return; + LLVM_FALLTHROUGH; case Decl::VarTemplateSpecialization: EmitGlobal(cast(D)); if (auto *DD = dyn_cast(D)) Modified: vendor/clang/dist/lib/Driver/SanitizerArgs.cpp ============================================================================== --- vendor/clang/dist/lib/Driver/SanitizerArgs.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Driver/SanitizerArgs.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -48,13 +48,14 @@ enum CoverageFeature { CoverageBB = 1 << 1, CoverageEdge = 1 << 2, CoverageIndirCall = 1 << 3, - CoverageTraceBB = 1 << 4, + CoverageTraceBB = 1 << 4, // Deprecated. CoverageTraceCmp = 1 << 5, CoverageTraceDiv = 1 << 6, CoverageTraceGep = 1 << 7, - Coverage8bitCounters = 1 << 8, + Coverage8bitCounters = 1 << 8, // Deprecated. CoverageTracePC = 1 << 9, CoverageTracePCGuard = 1 << 10, + CoverageInline8bitCounters = 1 << 12, CoverageNoPrune = 1 << 11, }; @@ -530,7 +531,8 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, } // trace-pc w/o func/bb/edge implies edge. - if ((CoverageFeatures & (CoverageTracePC | CoverageTracePCGuard)) && + if ((CoverageFeatures & + (CoverageTracePC | CoverageTracePCGuard | CoverageInline8bitCounters)) && !(CoverageFeatures & InsertionPointTypes)) CoverageFeatures |= CoverageEdge; @@ -637,6 +639,7 @@ void SanitizerArgs::addArgs(const ToolChain &TC, const std::make_pair(Coverage8bitCounters, "-fsanitize-coverage-8bit-counters"), std::make_pair(CoverageTracePC, "-fsanitize-coverage-trace-pc"), std::make_pair(CoverageTracePCGuard, "-fsanitize-coverage-trace-pc-guard"), + std::make_pair(CoverageInline8bitCounters, "-fsanitize-coverage-inline-8bit-counters"), std::make_pair(CoverageNoPrune, "-fsanitize-coverage-no-prune")}; for (auto F : CoverageFlags) { if (CoverageFeatures & F.first) @@ -798,6 +801,7 @@ int parseCoverageFeatures(const Driver &D, const llvm: .Case("trace-pc", CoverageTracePC) .Case("trace-pc-guard", CoverageTracePCGuard) .Case("no-prune", CoverageNoPrune) + .Case("inline-8bit-counters", CoverageInline8bitCounters) .Default(0); if (F == 0) D.Diag(clang::diag::err_drv_unsupported_option_argument) Modified: vendor/clang/dist/lib/Edit/RewriteObjCFoundationAPI.cpp ============================================================================== --- vendor/clang/dist/lib/Edit/RewriteObjCFoundationAPI.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Edit/RewriteObjCFoundationAPI.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -798,24 +798,28 @@ static bool rewriteToNumberLiteral(const ObjCMessageEx case NSAPI::NSNumberWithUnsignedInt: case NSAPI::NSNumberWithUnsignedInteger: CallIsUnsigned = true; + LLVM_FALLTHROUGH; case NSAPI::NSNumberWithInt: case NSAPI::NSNumberWithInteger: break; case NSAPI::NSNumberWithUnsignedLong: CallIsUnsigned = true; + LLVM_FALLTHROUGH; case NSAPI::NSNumberWithLong: CallIsLong = true; break; case NSAPI::NSNumberWithUnsignedLongLong: CallIsUnsigned = true; + LLVM_FALLTHROUGH; case NSAPI::NSNumberWithLongLong: CallIsLongLong = true; break; case NSAPI::NSNumberWithDouble: CallIsDouble = true; + LLVM_FALLTHROUGH; case NSAPI::NSNumberWithFloat: CallIsFloating = true; break; Modified: vendor/clang/dist/lib/Frontend/CompilerInstance.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/CompilerInstance.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Frontend/CompilerInstance.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -1727,6 +1727,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, diag::warn_module_config_mismatch) << ModuleFileName; // Fall through to error out. + LLVM_FALLTHROUGH; case ASTReader::VersionMismatch: case ASTReader::HadErrors: ModuleLoader::HadFatalFailure = true; Modified: vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -768,6 +768,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, Arg Opts.SanitizeCoverageTracePCGuard = Args.hasArg(OPT_fsanitize_coverage_trace_pc_guard); Opts.SanitizeCoverageNoPrune = Args.hasArg(OPT_fsanitize_coverage_no_prune); + Opts.SanitizeCoverageInline8bitCounters = + Args.hasArg(OPT_fsanitize_coverage_inline_8bit_counters); Opts.SanitizeMemoryTrackOrigins = getLastArgIntValue(Args, OPT_fsanitize_memory_track_origins_EQ, 0, Diags); Opts.SanitizeMemoryUseAfterDtor = @@ -2699,6 +2701,13 @@ std::string CompilerInvocation::getModuleHash() const for (const auto &ext : frontendOpts.ModuleFileExtensions) { code = ext->hashExtension(code); } + + // Extend the signature with the enabled sanitizers, if at least one is + // enabled. Sanitizers which cannot affect AST generation aren't hashed. + SanitizerSet SanHash = LangOpts->Sanitize; + SanHash.clear(getPPTransparentSanitizers()); + if (!SanHash.empty()) + code = hash_combine(code, SanHash.Mask); return llvm::APInt(64, code).toString(36, /*Signed=*/false); } Modified: vendor/clang/dist/lib/Frontend/FrontendAction.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/FrontendAction.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Frontend/FrontendAction.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -289,14 +289,28 @@ static void addHeaderInclude(StringRef HeaderName, /// /// \param Includes Will be augmented with the set of \#includes or \#imports /// needed to load all of the named headers. -static std::error_code -collectModuleHeaderIncludes(const LangOptions &LangOpts, FileManager &FileMgr, - ModuleMap &ModMap, clang::Module *Module, - SmallVectorImpl &Includes) { +static std::error_code collectModuleHeaderIncludes( + const LangOptions &LangOpts, FileManager &FileMgr, DiagnosticsEngine &Diag, + ModuleMap &ModMap, clang::Module *Module, SmallVectorImpl &Includes) { // Don't collect any headers for unavailable modules. if (!Module->isAvailable()) return std::error_code(); + // Resolve all lazy header directives to header files. + ModMap.resolveHeaderDirectives(Module); + + // If any headers are missing, we can't build this module. In most cases, + // diagnostics for this should have already been produced; we only get here + // if explicit stat information was provided. + // FIXME: If the name resolves to a file with different stat information, + // produce a better diagnostic. + if (!Module->MissingHeaders.empty()) { + auto &MissingHeader = Module->MissingHeaders.front(); + Diag.Report(MissingHeader.FileNameLoc, diag::err_module_header_missing) + << MissingHeader.IsUmbrella << MissingHeader.FileName; + return std::error_code(); + } + // Add includes for each of these headers. for (auto HK : {Module::HK_Normal, Module::HK_Private}) { for (Module::Header &H : Module->Headers[HK]) { @@ -367,7 +381,7 @@ collectModuleHeaderIncludes(const LangOptions &LangOpt SubEnd = Module->submodule_end(); Sub != SubEnd; ++Sub) if (std::error_code Err = collectModuleHeaderIncludes( - LangOpts, FileMgr, ModMap, *Sub, Includes)) + LangOpts, FileMgr, Diag, ModMap, *Sub, Includes)) return Err; return std::error_code(); @@ -494,7 +508,7 @@ getInputBufferForModule(CompilerInstance &CI, Module * addHeaderInclude(UmbrellaHeader.NameAsWritten, HeaderContents, CI.getLangOpts(), M->IsExternC); Err = collectModuleHeaderIncludes( - CI.getLangOpts(), FileMgr, + CI.getLangOpts(), FileMgr, CI.getDiagnostics(), CI.getPreprocessor().getHeaderSearchInfo().getModuleMap(), M, HeaderContents); Modified: vendor/clang/dist/lib/Frontend/FrontendActions.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/FrontendActions.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Frontend/FrontendActions.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -546,8 +546,11 @@ void PrintPreprocessedAction::ExecuteAction() { // module itself before switching to the input buffer. auto &Input = getCurrentInput(); if (Input.getKind().getFormat() == InputKind::ModuleMap) { - if (Input.isFile()) - (*OS) << "# 1 \"" << Input.getFile() << "\"\n"; + if (Input.isFile()) { + (*OS) << "# 1 \""; + OS->write_escaped(Input.getFile()); + (*OS) << "\"\n"; + } // FIXME: Include additional information here so that we don't need the // original source files to exist on disk. getCurrentModule()->print(*OS); Modified: vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -221,6 +221,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const l case llvm::Triple::Win32: if (triple.getEnvironment() != llvm::Triple::Cygnus) break; + LLVM_FALLTHROUGH; default: // FIXME: temporary hack: hard-coded paths. AddPath("/usr/local/include", System, false); @@ -343,6 +344,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const l AddPath(BaseSDKPath + "/target/include", System, false); if (triple.isPS4CPU()) AddPath(BaseSDKPath + "/target/include_common", System, false); + LLVM_FALLTHROUGH; } default: AddPath("/usr/include", ExternCSystem, false); Modified: vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -200,8 +200,11 @@ void RewriteIncludesAction::ExecuteAction() { // module itself before switching to the input buffer. auto &Input = getCurrentInput(); if (Input.getKind().getFormat() == InputKind::ModuleMap) { - if (Input.isFile()) - (*OS) << "# 1 \"" << Input.getFile() << "\"\n"; + if (Input.isFile()) { + (*OS) << "# 1 \""; + OS->write_escaped(Input.getFile()); + (*OS) << "\"\n"; + } // FIXME: Include additional information here so that we don't need the // original source files to exist on disk. getCurrentModule()->print(*OS); Modified: vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp Sat Jun 3 15:20:41 2017 (r319524) +++ vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp Sat Jun 3 15:20:48 2017 (r319525) @@ -177,7 +177,9 @@ void InclusionRewriter::FileSkipped(const FileEntry &/ /// directives. It does not say whether the file has been included, but it /// provides more information about the directive (hash location instead /// of location inside the included file). It is assumed that the matching -/// FileChanged() or FileSkipped() is called after this. +/// FileChanged() or FileSkipped() is called after this (or neither is +/// called if this #include results in an error or does not textually include +/// anything). void InclusionRewriter::InclusionDirective(SourceLocation HashLoc, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jun 3 15:20:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 348FEBF38F7; Sat, 3 Jun 2017 15:20:59 +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 D9EBB73411; Sat, 3 Jun 2017 15:20:58 +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 v53FKv4b082753; Sat, 3 Jun 2017 15:20:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FKvAM082752; Sat, 3 Jun 2017 15:20:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031520.v53FKvAM082752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319526 - vendor/clang/clang-trunk-r304659 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:20:59 -0000 Author: dim Date: Sat Jun 3 15:20:57 2017 New Revision: 319526 URL: https://svnweb.freebsd.org/changeset/base/319526 Log: Tag clang trunk r304659. Added: vendor/clang/clang-trunk-r304659/ - copied from r319525, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Sat Jun 3 15:21:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C5B8BF3939; Sat, 3 Jun 2017 15:21:04 +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 E44A87348F; Sat, 3 Jun 2017 15:21:03 +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 v53FL2tq082833; Sat, 3 Jun 2017 15:21:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FL0qc082806; Sat, 3 Jun 2017 15:21:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031521.v53FL0qc082806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319527 - in vendor/compiler-rt/dist: include/sanitizer lib/asan lib/lsan lib/sanitizer_common lib/sanitizer_common/scripts lib/sanitizer_common/tests lib/ubsan test/asan/TestCases/Andr... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:21:04 -0000 Author: dim Date: Sat Jun 3 15:21:00 2017 New Revision: 319527 URL: https://svnweb.freebsd.org/changeset/base/319527 Log: Vendor import of compiler-rt trunk r304659: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304659 Added: vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc (contents, props changed) vendor/compiler-rt/dist/test/ubsan/TestCases/Pointer/ vendor/compiler-rt/dist/test/ubsan/TestCases/Pointer/index-overflow.cpp (contents, props changed) Deleted: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc vendor/compiler-rt/dist/test/asan/TestCases/Android/coverage-android.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-maybe-open-file.cc Modified: vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h vendor/compiler-rt/dist/lib/asan/asan_activation.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/asan_thread.cc vendor/compiler-rt/dist/lib/lsan/lsan_common.cc vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_interface.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/scripts/check_lint.sh vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_checks.inc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.h vendor/compiler-rt/dist/lib/ubsan/ubsan_interface.inc vendor/compiler-rt/dist/test/asan/TestCases/Linux/uar_signals.cc Modified: vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h Sat Jun 3 15:21:00 2017 (r319527) @@ -19,8 +19,6 @@ extern "C" { #endif - // Initialize coverage. - void __sanitizer_cov_init(); // Record and dump coverage info. void __sanitizer_cov_dump(); @@ -28,10 +26,6 @@ extern "C" { // .sancov files. void __sanitizer_dump_coverage(const uintptr_t *pcs, uintptr_t len); - // Open .sancov.packed in the coverage directory and return the file - // descriptor. Returns -1 on failure, or if coverage dumping is disabled. - // This is intended for use by sandboxing code. - intptr_t __sanitizer_maybe_open_cov_file(const char *name); #ifdef __cplusplus } // extern "C" #endif Modified: vendor/compiler-rt/dist/lib/asan/asan_activation.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_activation.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/asan/asan_activation.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -106,7 +106,6 @@ void AsanDeactivate() { // Deactivate the runtime. SetCanPoisonMemory(false); SetMallocContextSize(1); - ReInitializeCoverage(false, nullptr); AllocatorOptions disabled = asan_deactivated_flags.allocator_options; disabled.quarantine_size_mb = 0; @@ -130,8 +129,6 @@ void AsanActivate() { SetCanPoisonMemory(asan_deactivated_flags.poison_heap); SetMallocContextSize(asan_deactivated_flags.malloc_context_size); - ReInitializeCoverage(asan_deactivated_flags.coverage, - asan_deactivated_flags.coverage_dir); ReInitializeAllocator(asan_deactivated_flags.allocator_options); asan_is_deactivated = false; Modified: vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -242,9 +242,8 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free, void *) CheckNoDeepBind(filename, flag); \ } while (false) #define COMMON_INTERCEPTOR_ON_EXIT(ctx) OnExit() -#define COMMON_INTERCEPTOR_LIBRARY_LOADED(filename, handle) \ - CoverageUpdateMapping() -#define COMMON_INTERCEPTOR_LIBRARY_UNLOADED() CoverageUpdateMapping() +#define COMMON_INTERCEPTOR_LIBRARY_LOADED(filename, handle) +#define COMMON_INTERCEPTOR_LIBRARY_UNLOADED() #define COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED (!asan_inited) #define COMMON_INTERCEPTOR_GET_TLS_RANGE(begin, end) \ if (AsanThread *t = GetCurrentThread()) { \ @@ -723,9 +722,7 @@ static void AfterFork() { INTERCEPTOR(int, fork, void) { ENSURE_ASAN_INITED(); BeforeFork(); - if (common_flags()->coverage) CovBeforeFork(); int pid = REAL(fork)(); - if (common_flags()->coverage) CovAfterFork(pid); AfterFork(); return pid; } Modified: vendor/compiler-rt/dist/lib/asan/asan_thread.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_thread.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/asan/asan_thread.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -166,16 +166,19 @@ void AsanThread::FinishSwitchFiber(FakeStack *fake_sta } inline AsanThread::StackBounds AsanThread::GetStackBounds() const { - if (!atomic_load(&stack_switching_, memory_order_acquire)) - return StackBounds{stack_bottom_, stack_top_}; // NOLINT + if (!atomic_load(&stack_switching_, memory_order_acquire)) { + // Make sure the stack bounds are fully initialized. + if (stack_bottom_ >= stack_top_) return {0, 0}; + return {stack_bottom_, stack_top_}; + } char local; const uptr cur_stack = (uptr)&local; // Note: need to check next stack first, because FinishSwitchFiber // may be in process of overwriting stack_top_/bottom_. But in such case // we are already on the next stack. if (cur_stack >= next_stack_bottom_ && cur_stack < next_stack_top_) - return StackBounds{next_stack_bottom_, next_stack_top_}; // NOLINT - return StackBounds{stack_bottom_, stack_top_}; // NOLINT + return {next_stack_bottom_, next_stack_top_}; + return {stack_bottom_, stack_top_}; } uptr AsanThread::stack_top() { @@ -197,6 +200,7 @@ FakeStack *AsanThread::AsyncSignalSafeLazyInitFakeStac uptr stack_size = this->stack_size(); if (stack_size == 0) // stack_size is not yet available, don't use FakeStack. return nullptr; + CHECK_LE(stack_size, 0x10000000); uptr old_val = 0; // fake_stack_ has 3 states: // 0 -- not initialized Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_common.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/lsan/lsan_common.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -408,6 +408,9 @@ static void MarkInvalidPCCb(uptr chunk, void *arg) { // On Linux, handles dynamically allocated TLS blocks by treating all chunks // allocated from ld-linux.so as reachable. +// On Linux, treats all chunks allocated from ld-linux.so as reachable, which +// covers dynamically allocated TLS blocks, internal dynamic loader's loaded +// modules accounting etc. // Dynamic TLS blocks contain the TLS variables of dynamically loaded modules. // They are allocated with a __libc_memalign() call in allocate_and_init() // (elf/dl-tls.c). Glibc won't tell us the address ranges occupied by those Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -23,6 +23,10 @@ #include "sanitizer_common/sanitizer_linux.h" #include "sanitizer_common/sanitizer_stackdepot.h" +#if SANITIZER_USE_GETAUXVAL +#include +#endif // SANITIZER_USE_GETAUXVAL + namespace __lsan { static const char kLinkerName[] = "ld"; @@ -30,8 +34,12 @@ static const char kLinkerName[] = "ld"; static char linker_placeholder[sizeof(LoadedModule)] ALIGNED(64); static LoadedModule *linker = nullptr; -static bool IsLinker(const char* full_name) { - return LibraryNameIs(full_name, kLinkerName); +static bool IsLinker(const LoadedModule& module) { +#if SANITIZER_USE_GETAUXVAL + return module.base_address() == getauxval(AT_BASE); +#else + return LibraryNameIs(module.full_name(), kLinkerName); +#endif // SANITIZER_USE_GETAUXVAL } __attribute__((tls_model("initial-exec"))) @@ -49,22 +57,25 @@ void InitializePlatformSpecificModules() { ListOfModules modules; modules.init(); for (LoadedModule &module : modules) { - if (!IsLinker(module.full_name())) continue; + if (!IsLinker(module)) + continue; if (linker == nullptr) { linker = reinterpret_cast(linker_placeholder); *linker = module; module = LoadedModule(); } else { VReport(1, "LeakSanitizer: Multiple modules match \"%s\". " - "TLS will not be handled correctly.\n", kLinkerName); + "TLS and other allocations originating from linker might be " + "falsely reported as leaks.\n", kLinkerName); linker->clear(); linker = nullptr; return; } } if (linker == nullptr) { - VReport(1, "LeakSanitizer: Dynamic linker not found. " - "TLS will not be handled correctly.\n"); + VReport(1, "LeakSanitizer: Dynamic linker not found. TLS and other " + "allocations originating from linker might be falsely reported " + "as leaks.\n"); } } Modified: vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt Sat Jun 3 15:21:00 2017 (r319527) @@ -54,9 +54,7 @@ set(SANITIZER_NOLIBC_SOURCES set(SANITIZER_LIBCDEP_SOURCES sanitizer_common_libcdep.cc sancov_flags.cc - sanitizer_coverage_libcdep.cc sanitizer_coverage_libcdep_new.cc - sanitizer_coverage_mapping_libcdep.cc sanitizer_coverage_win_sections.cc sanitizer_linux_libcdep.cc sanitizer_posix_libcdep.cc Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h Sat Jun 3 15:21:00 2017 (r319527) @@ -317,15 +317,9 @@ bool AddressSpaceIsUnlimited(); void SetAddressSpaceUnlimited(); void AdjustStackSize(void *attr); void PrepareForSandboxing(__sanitizer_sandbox_arguments *args); -void CovPrepareForSandboxing(__sanitizer_sandbox_arguments *args); void SetSandboxingCallback(void (*f)()); -void CoverageUpdateMapping(); -void CovBeforeFork(); -void CovAfterFork(int child_pid); - void InitializeCoverage(bool enabled, const char *coverage_dir); -void ReInitializeCoverage(bool enabled, const char *coverage_dir); void InitTlsSize(); uptr GetTlsSize(); Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_interface.inc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_interface.inc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_interface.inc Sat Jun 3 15:21:00 2017 (r319527) @@ -11,7 +11,6 @@ INTERFACE_FUNCTION(__sanitizer_cov_dump) INTERFACE_FUNCTION(__sanitizer_dump_coverage) INTERFACE_FUNCTION(__sanitizer_dump_trace_pc_guard_coverage) -INTERFACE_FUNCTION(__sanitizer_maybe_open_cov_file) INTERFACE_WEAK_FUNCTION(__sancov_default_options) INTERFACE_WEAK_FUNCTION(__sanitizer_cov_trace_cmp) INTERFACE_WEAK_FUNCTION(__sanitizer_cov_trace_cmp1) Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -146,6 +146,17 @@ static TracePcGuardController pc_guard_controller; } // namespace } // namespace __sancov +namespace __sanitizer { +void InitializeCoverage(bool enabled, const char *dir) { + static bool coverage_enabled = false; + if (coverage_enabled) + return; // May happen if two sanitizer enable coverage in the same process. + coverage_enabled = enabled; + Atexit(__sanitizer_cov_dump); + AddDieCallback(__sanitizer_cov_dump); +} +} // namespace __sanitizer + extern "C" { SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_dump_coverage( // NOLINT const uptr* pcs, uptr len) { @@ -166,4 +177,18 @@ SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_tra SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_dump_trace_pc_guard_coverage() { __sancov::pc_guard_controller.Dump(); } +SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_cov_dump() { + __sanitizer_dump_trace_pc_guard_coverage(); +} +// Default empty implementations (weak). Users should redefine them. +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp1, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp2, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp4, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_cmp8, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_switch, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_div4, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_div8, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_gep, void) {} +SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_cov_trace_pc_indir, void) {} } // extern "C" Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc Sat Jun 3 15:21:00 2017 (r319527) @@ -138,16 +138,6 @@ COMMON_FLAG( bool, coverage, false, "If set, coverage information will be dumped at program shutdown (if the " "coverage instrumentation was enabled at compile time).") -COMMON_FLAG(bool, coverage_pcs, true, - "If set (and if 'coverage' is set too), the coverage information " - "will be dumped as a set of PC offsets for every module.") -COMMON_FLAG(bool, coverage_order_pcs, false, - "If true, the PCs will be dumped in the order they've" - " appeared during the execution.") -COMMON_FLAG(bool, coverage_direct, SANITIZER_ANDROID, - "If set, coverage information will be dumped directly to a memory " - "mapped file. This way data is not lost even if the process is " - "suddenly killed.") COMMON_FLAG(const char *, coverage_dir, ".", "Target directory for coverage dumps. Defaults to the current " "directory.") Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -62,8 +62,6 @@ #if SANITIZER_FREEBSD #include #include -#include -#include #include extern "C" { // must be included after and on @@ -77,16 +75,6 @@ extern char **environ; // provided by crt1 #include #endif -#ifndef __GLIBC_PREREQ -#define __GLIBC_PREREQ(x, y) 0 -#endif - -#if SANITIZER_LINUX && __GLIBC_PREREQ(2, 16) -# define SANITIZER_USE_GETAUXVAL 1 -#else -# define SANITIZER_USE_GETAUXVAL 0 -#endif - #if SANITIZER_USE_GETAUXVAL #include #endif @@ -237,7 +225,8 @@ static void kernel_stat_to_stat(struct kernel_stat *in uptr internal_stat(const char *path, void *buf) { #if SANITIZER_FREEBSD - return internal_syscall(SYSCALL(stat), path, buf); + return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path, + (uptr)buf, 0); #elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, (uptr)buf, 0); @@ -261,7 +250,8 @@ uptr internal_stat(const char *path, void *buf) { uptr internal_lstat(const char *path, void *buf) { #if SANITIZER_FREEBSD - return internal_syscall(SYSCALL(lstat), path, buf); + return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path, + (uptr)buf, AT_SYMLINK_NOFOLLOW); #elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, (uptr)buf, AT_SYMLINK_NOFOLLOW); @@ -604,7 +594,9 @@ uptr internal_getppid() { } uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count) { -#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS +#if SANITIZER_FREEBSD + return internal_syscall(SYSCALL(getdirentries), fd, (uptr)dirp, count, NULL); +#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS return internal_syscall(SYSCALL(getdents64), fd, (uptr)dirp, count); #else return internal_syscall(SYSCALL(getdents), fd, (uptr)dirp, count); Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform.h Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform.h Sat Jun 3 15:21:00 2017 (r319527) @@ -269,5 +269,14 @@ # define SANITIZER_SUPPRESS_LEAK_ON_PTHREAD_EXIT 0 #endif +#ifndef __GLIBC_PREREQ +#define __GLIBC_PREREQ(x, y) 0 +#endif + +#if SANITIZER_LINUX && __GLIBC_PREREQ(2, 16) +# define SANITIZER_USE_GETAUXVAL 1 +#else +# define SANITIZER_USE_GETAUXVAL 0 +#endif #endif // SANITIZER_PLATFORM_H Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.h Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.h Sat Jun 3 15:21:00 2017 (r319527) @@ -23,6 +23,9 @@ // incorporates the map structure. # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \ ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 544))) +// Get sys/_types.h, because that tells us whether 64-bit inodes are +// used in struct dirent below. +#include #else # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) ((link_map*)(handle)) #endif // !SANITIZER_FREEBSD @@ -485,7 +488,12 @@ namespace __sanitizer { }; #elif SANITIZER_FREEBSD struct __sanitizer_dirent { +#if defined(__INO64) + unsigned long long d_fileno; + unsigned long long d_off; +#else unsigned int d_fileno; +#endif unsigned short d_reclen; // more fields that we don't care about }; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -264,7 +264,6 @@ void PrepareForSandboxing(__sanitizer_sandbox_argument // Same for /proc/self/exe in the symbolizer. #if !SANITIZER_GO Symbolizer::GetOrInit()->PrepareForSandboxing(); - CovPrepareForSandboxing(args); #endif } Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -400,9 +400,6 @@ void ReExec() { } void PrepareForSandboxing(__sanitizer_sandbox_arguments *args) { -#if !SANITIZER_GO - CovPrepareForSandboxing(args); -#endif } bool StackSizeIsUnlimited() { Modified: vendor/compiler-rt/dist/lib/sanitizer_common/scripts/check_lint.sh ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/scripts/check_lint.sh Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/scripts/check_lint.sh Sat Jun 3 15:21:00 2017 (r319527) @@ -18,7 +18,7 @@ fi # Filters # TODO: remove some of these filters COMMON_LINT_FILTER=-build/include,-build/header_guard,-legal/copyright,-whitespace/comments,-readability/casting,\ --build/namespaces +-build/namespaces,-readability/braces ASAN_RTL_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/int ASAN_TEST_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/sizeof,-runtime/int,-runtime/printf,-runtime/threadsafe_fn ASAN_LIT_TEST_LINT_FILTER=${ASAN_TEST_LINT_FILTER},-whitespace/line_length Modified: vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -167,13 +167,13 @@ TEST(SanitizerCommon, CommonFlags) { cf.symbolize = false; cf.coverage = true; - cf.coverage_direct = true; + cf.heap_profile = true; cf.log_path = "path/one"; - parser.ParseString("symbolize=1:coverage_direct=false log_path='path/two'"); + parser.ParseString("symbolize=1:heap_profile=false log_path='path/two'"); EXPECT_TRUE(cf.symbolize); EXPECT_TRUE(cf.coverage); - EXPECT_FALSE(cf.coverage_direct); + EXPECT_FALSE(cf.heap_profile); EXPECT_STREQ("path/two", cf.log_path); } Modified: vendor/compiler-rt/dist/lib/ubsan/ubsan_checks.inc ============================================================================== --- vendor/compiler-rt/dist/lib/ubsan/ubsan_checks.inc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/ubsan/ubsan_checks.inc Sat Jun 3 15:21:00 2017 (r319527) @@ -19,6 +19,7 @@ UBSAN_CHECK(GenericUB, "undefined-behavior", "undefined") UBSAN_CHECK(NullPointerUse, "null-pointer-use", "null") +UBSAN_CHECK(PointerOverflow, "pointer-overflow", "pointer-overflow") UBSAN_CHECK(MisalignedPointerUse, "misaligned-pointer-use", "alignment") UBSAN_CHECK(InsufficientObjectSize, "insufficient-object-size", "object-size") UBSAN_CHECK(SignedIntegerOverflow, "signed-integer-overflow", Modified: vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc ============================================================================== --- vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -554,6 +554,37 @@ void __ubsan::__ubsan_handle_nullability_arg_abort(Non Die(); } +static void handlePointerOverflowImpl(PointerOverflowData *Data, + ValueHandle Base, + ValueHandle Result, + ReportOptions Opts) { + SourceLocation Loc = Data->Loc.acquire(); + ErrorType ET = ErrorType::PointerOverflow; + + if (ignoreReport(Loc, Opts, ET)) + return; + + ScopedReport R(Opts, Loc, ET); + + Diag(Loc, DL_Error, "pointer index expression with base %0 overflowed to %1") + << (void *)Base << (void*)Result; +} + +void __ubsan::__ubsan_handle_pointer_overflow(PointerOverflowData *Data, + ValueHandle Base, + ValueHandle Result) { + GET_REPORT_OPTIONS(false); + handlePointerOverflowImpl(Data, Base, Result, Opts); +} + +void __ubsan::__ubsan_handle_pointer_overflow_abort(PointerOverflowData *Data, + ValueHandle Base, + ValueHandle Result) { + GET_REPORT_OPTIONS(true); + handlePointerOverflowImpl(Data, Base, Result, Opts); + Die(); +} + static void handleCFIBadIcall(CFICheckFailData *Data, ValueHandle Function, ReportOptions Opts) { if (Data->CheckKind != CFITCK_ICall) Modified: vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.h ============================================================================== --- vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.h Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.h Sat Jun 3 15:21:00 2017 (r319527) @@ -152,6 +152,13 @@ struct NonNullArgData { RECOVERABLE(nonnull_arg, NonNullArgData *Data) RECOVERABLE(nullability_arg, NonNullArgData *Data) +struct PointerOverflowData { + SourceLocation Loc; +}; + +RECOVERABLE(pointer_overflow, PointerOverflowData *Data, ValueHandle Base, + ValueHandle Result) + /// \brief Known CFI check kinds. /// Keep in sync with the enum of the same name in CodeGenFunction.h enum CFITypeCheckKind : unsigned char { Modified: vendor/compiler-rt/dist/lib/ubsan/ubsan_interface.inc ============================================================================== --- vendor/compiler-rt/dist/lib/ubsan/ubsan_interface.inc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/lib/ubsan/ubsan_interface.inc Sat Jun 3 15:21:00 2017 (r319527) @@ -36,6 +36,8 @@ INTERFACE_FUNCTION(__ubsan_handle_nullability_return) INTERFACE_FUNCTION(__ubsan_handle_nullability_return_abort) INTERFACE_FUNCTION(__ubsan_handle_out_of_bounds) INTERFACE_FUNCTION(__ubsan_handle_out_of_bounds_abort) +INTERFACE_FUNCTION(__ubsan_handle_pointer_overflow) +INTERFACE_FUNCTION(__ubsan_handle_pointer_overflow_abort) INTERFACE_FUNCTION(__ubsan_handle_shift_out_of_bounds) INTERFACE_FUNCTION(__ubsan_handle_shift_out_of_bounds_abort) INTERFACE_FUNCTION(__ubsan_handle_sub_overflow) Modified: vendor/compiler-rt/dist/test/asan/TestCases/Linux/uar_signals.cc ============================================================================== --- vendor/compiler-rt/dist/test/asan/TestCases/Linux/uar_signals.cc Sat Jun 3 15:20:57 2017 (r319526) +++ vendor/compiler-rt/dist/test/asan/TestCases/Linux/uar_signals.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -1,12 +1,13 @@ // This test checks that the implementation of use-after-return // is async-signal-safe. -// RUN: %clangxx_asan -O1 %s -o %t -pthread && %run %t +// RUN: %clangxx_asan -std=c++11 -O1 %s -o %t -pthread && %run %t // REQUIRES: stable-runtime #include #include #include #include #include +#include int *g; int n_signals; @@ -17,7 +18,6 @@ void SignalHandler(int, siginfo_t*, void*) { int local; g = &local; n_signals++; - // printf("s: %p\n", &local); } static void EnableSigprof(Sigaction SignalHandler) { @@ -49,22 +49,29 @@ void RecursiveFunction(int depth) { RecursiveFunction(depth - 1); } -void *Thread(void *) { - RecursiveFunction(18); +void *FastThread(void *) { + RecursiveFunction(1); return NULL; } +void *SlowThread(void *) { + RecursiveFunction(1); + return NULL; +} + int main(int argc, char **argv) { EnableSigprof(SignalHandler); - for (int i = 0; i < 4; i++) { - fprintf(stderr, "."); - const int kNumThread = sizeof(void*) == 8 ? 16 : 8; - pthread_t t[kNumThread]; - for (int i = 0; i < kNumThread; i++) - pthread_create(&t[i], 0, Thread, 0); - for (int i = 0; i < kNumThread; i++) - pthread_join(t[i], 0); + for (auto Thread : {&FastThread, &SlowThread}) { + for (int i = 0; i < 1000; i++) { + fprintf(stderr, "."); + const int kNumThread = sizeof(void*) == 8 ? 32 : 8; + pthread_t t[kNumThread]; + for (int i = 0; i < kNumThread; i++) + pthread_create(&t[i], 0, Thread, 0); + for (int i = 0; i < kNumThread; i++) + pthread_join(t[i], 0); + } + fprintf(stderr, "\n"); } - fprintf(stderr, "\n"); } Added: vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc Sat Jun 3 15:21:00 2017 (r319527) @@ -0,0 +1,23 @@ +// Tests -fsanitize-coverage=inline-8bit-counters +// +// REQUIRES: has_sancovcc,stable-runtime +// UNSUPPORTED: i386-darwin +// +// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1 + +#include +#include + +const char *first_counter; + +extern "C" +void __sanitizer_cov_8bit_counters_init(const char *start, const char *end) { + printf("INIT: %p %p\n", start, end); + assert(end - start > 1); + first_counter = start; +} + +int main() { + assert(first_counter); + assert(*first_counter == 1); +} Added: vendor/compiler-rt/dist/test/ubsan/TestCases/Pointer/index-overflow.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/test/ubsan/TestCases/Pointer/index-overflow.cpp Sat Jun 3 15:21:00 2017 (r319527) @@ -0,0 +1,19 @@ +// RUN: %clangxx -fsanitize=pointer-overflow %s -o %t +// RUN: %t 1 2>&1 | FileCheck %s --check-prefix=ERR +// RUN: %t 0 2>&1 | FileCheck %s --check-prefix=SAFE +// RUN: %t -1 2>&1 | FileCheck %s --check-prefix=SAFE + +#include +#include +#include + +int main(int argc, char *argv[]) { + // SAFE-NOT: runtime error + // ERR: runtime error: pointer index expression with base {{.*}} overflowed to + + char *p = (char *)(UINTPTR_MAX); + + printf("%p\n", p + atoi(argv[1])); + + return 0; +} From owner-svn-src-all@freebsd.org Sat Jun 3 15:21:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4BE9BF3971; Sat, 3 Jun 2017 15:21:08 +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 943A373529; Sat, 3 Jun 2017 15:21:08 +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 v53FL7d1082880; Sat, 3 Jun 2017 15:21:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FL7aE082879; Sat, 3 Jun 2017 15:21:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031521.v53FL7aE082879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319528 - vendor/compiler-rt/compiler-rt-trunk-r304659 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:21:09 -0000 Author: dim Date: Sat Jun 3 15:21:07 2017 New Revision: 319528 URL: https://svnweb.freebsd.org/changeset/base/319528 Log: Tag compiler-rt trunk r304659. Added: vendor/compiler-rt/compiler-rt-trunk-r304659/ - copied from r319527, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Sat Jun 3 15:21:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C4A8BF39F7; Sat, 3 Jun 2017 15:21:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE88B73624; Sat, 3 Jun 2017 15:21:16 +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 v53FLF06082982; Sat, 3 Jun 2017 15:21:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FLF0G082981; Sat, 3 Jun 2017 15:21:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031521.v53FLF0G082981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319530 - vendor/libc++/libc++-trunk-r304659 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:21:17 -0000 Author: dim Date: Sat Jun 3 15:21:15 2017 New Revision: 319530 URL: https://svnweb.freebsd.org/changeset/base/319530 Log: Tag libc++ trunk r304659. Added: vendor/libc++/libc++-trunk-r304659/ - copied from r319529, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Sat Jun 3 15:21:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E053DBF39B7; Sat, 3 Jun 2017 15:21:12 +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 B2B23735A5; Sat, 3 Jun 2017 15:21:12 +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 v53FLBGf082935; Sat, 3 Jun 2017 15:21:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FLBUL082928; Sat, 3 Jun 2017 15:21:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031521.v53FLBUL082928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319529 - in vendor/libc++/dist: include test/libcxx/containers/unord test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion test/std/exp... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:21:13 -0000 Author: dim Date: Sat Jun 3 15:21:10 2017 New Revision: 319529 URL: https://svnweb.freebsd.org/changeset/base/319529 Log: Vendor import of libc++ trunk r304659: https://llvm.org/svn/llvm-project/libcxx/trunk@304659 Added: vendor/libc++/dist/test/libcxx/containers/unord/next_pow2.pass.cpp (contents, props changed) Modified: vendor/libc++/dist/include/__hash_table vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp Modified: vendor/libc++/dist/include/__hash_table ============================================================================== --- vendor/libc++/dist/include/__hash_table Sat Jun 3 15:21:07 2017 (r319528) +++ vendor/libc++/dist/include/__hash_table Sat Jun 3 15:21:10 2017 (r319529) @@ -137,7 +137,7 @@ inline _LIBCPP_INLINE_VISIBILITY size_t __next_hash_pow2(size_t __n) { - return size_t(1) << (std::numeric_limits::digits - __clz(__n-1)); + return __n < 2 ? __n : (size_t(1) << (std::numeric_limits::digits - __clz(__n-1))); } Added: vendor/libc++/dist/test/libcxx/containers/unord/next_pow2.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/test/libcxx/containers/unord/next_pow2.pass.cpp Sat Jun 3 15:21:10 2017 (r319529) @@ -0,0 +1,88 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// REQUIRES: long_tests +// UNSUPPORTED: c++98, c++03 + +// Not a portable test + +// <__hash_table> + +// size_t __next_hash_pow2(size_t n); + +// If n <= 1, return n. If n is a power of 2, return n. +// Otherwise, return the next power of 2. + +#include <__hash_table> +#include +#include + +#include + +bool +is_power_of_two(unsigned long n) +{ + return __builtin_popcount(n) == 1; +} + +void test_next_pow2_val(size_t n) +{ + std::size_t npow2 = std::__next_hash_pow2(n); + assert(is_power_of_two(npow2) && npow2 > n); +} + +void +test_next_pow2() +{ + assert(!is_power_of_two(0)); + assert(is_power_of_two(1)); + assert(is_power_of_two(2)); + assert(!is_power_of_two(3)); + + assert(std::__next_hash_pow2(0) == 0); + assert(std::__next_hash_pow2(1) == 1); + + for (std::size_t n = 2; n < (sizeof(std::size_t) * 8 - 1); ++n) + { + std::size_t pow2 = 1ULL << n; + assert(std::__next_hash_pow2(pow2) == pow2); + } + + test_next_pow2_val(3); + test_next_pow2_val(7); + test_next_pow2_val(9); + test_next_pow2_val(15); + test_next_pow2_val(127); + test_next_pow2_val(129); +} + +// Note: this is only really useful when run with -fsanitize=undefined. +void +fuzz_unordered_map_reserve(unsigned num_inserts, + unsigned num_reserve1, + unsigned num_reserve2) +{ + std::unordered_map m; + m.reserve(num_reserve1); + for (unsigned I = 0; I < num_inserts; ++I) m[I] = 0; + m.reserve(num_reserve2); + assert(m.bucket_count() >= num_reserve2); +} + +int main() +{ + test_next_pow2(); + + for (unsigned num_inserts = 0; num_inserts <= 64; ++num_inserts) + for (unsigned num_reserve1 = 1; num_reserve1 <= 64; ++num_reserve1) + for (unsigned num_reserve2 = 1; num_reserve2 <= 64; ++num_reserve2) + fuzz_unordered_map_reserve(num_inserts, num_reserve1, num_reserve2); + + return 0; +} Modified: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp Sat Jun 3 15:21:07 2017 (r319528) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp Sat Jun 3 15:21:10 2017 (r319529) @@ -33,7 +33,7 @@ void do_test(coro::coroutine_handle const& H) // FIXME Add a runtime test { ASSERT_SAME_TYPE(decltype(H.done()), bool); - ASSERT_NOT_NOEXCEPT(H.done()); + LIBCPP_ASSERT_NOT_NOEXCEPT(H.done()); } } Modified: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp Sat Jun 3 15:21:07 2017 (r319528) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/await_result.pass.cpp Sat Jun 3 15:21:10 2017 (r319529) @@ -23,7 +23,7 @@ struct coro_t { } suspend_never initial_suspend() { return {}; } suspend_never final_suspend() { return {}; } - void return_void(){} + void return_void() {} static void unhandled_exception() {} }; }; @@ -37,7 +37,7 @@ struct B { struct A { - ~A(){} + ~A() {} bool await_ready() { return true; } int await_resume() { return 42; } template void await_suspend(F) {} Modified: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp Sat Jun 3 15:21:07 2017 (r319528) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp Sat Jun 3 15:21:10 2017 (r319529) @@ -10,6 +10,9 @@ // UNSUPPORTED: c++98, c++03, c++11 +// See https://bugs.llvm.org/show_bug.cgi?id=33271 +// UNSUPPORTED: ubsan + #include #include @@ -22,7 +25,7 @@ struct coro_t { } suspend_never initial_suspend() { return {}; } suspend_never final_suspend() { return {}; } - void return_void(){} + void return_void() {} void unhandled_exception() {} }; coro_t(coroutine_handle hh) : h(hh) {} Modified: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp Sat Jun 3 15:21:07 2017 (r319528) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/generator.pass.cpp Sat Jun 3 15:21:10 2017 (r319529) @@ -10,6 +10,9 @@ // UNSUPPORTED: c++98, c++03, c++11 +// See https://bugs.llvm.org/show_bug.cgi?id=33271 +// UNSUPPORTED: ubsan + #include #include #include Modified: vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp Sat Jun 3 15:21:07 2017 (r319528) +++ vendor/libc++/dist/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp Sat Jun 3 15:21:10 2017 (r319529) @@ -68,10 +68,10 @@ template struct func { (private) std::vector yielded_values = {}; int yield(int x) { yielded_values.push_back(x); return x + 1; } -float fyield(int x) { yielded_values.push_back(x); return x + 2; } +float fyield(int x) { yielded_values.push_back(x); return static_cast(x + 2); } void Do1(func f) { yield(f()); } -void Do2(func f) { yield(f()); } +void Do2(func f) { yield(static_cast(f())); } int main() { Do1([] { return yield(43); }); From owner-svn-src-all@freebsd.org Sat Jun 3 15:21:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62C89BF3AD1; Sat, 3 Jun 2017 15:21:26 +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 1264C73754; Sat, 3 Jun 2017 15:21:25 +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 v53FLO9G083096; Sat, 3 Jun 2017 15:21:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FLOYe083095; Sat, 3 Jun 2017 15:21:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031521.v53FLOYe083095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319532 - vendor/lld/lld-trunk-r304659 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:21:26 -0000 Author: dim Date: Sat Jun 3 15:21:24 2017 New Revision: 319532 URL: https://svnweb.freebsd.org/changeset/base/319532 Log: Tag lld trunk r304659. Added: vendor/lld/lld-trunk-r304659/ - copied from r319531, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Sat Jun 3 15:21:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 043AABF3A52; Sat, 3 Jun 2017 15:21:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEF94736B0; Sat, 3 Jun 2017 15:21:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53FLJtv083043; Sat, 3 Jun 2017 15:21:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FLIbE083030; Sat, 3 Jun 2017 15:21:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031521.v53FLIbE083030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:21:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319531 - in vendor/lld/dist: COFF ELF test/COFF test/ELF X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:21:21 -0000 Author: dim Date: Sat Jun 3 15:21:18 2017 New Revision: 319531 URL: https://svnweb.freebsd.org/changeset/base/319531 Log: Vendor import of lld trunk r304659: https://llvm.org/svn/llvm-project/lld/trunk@304659 Added: vendor/lld/dist/test/COFF/def-export-stdcall.s (contents, props changed) Modified: vendor/lld/dist/COFF/DLL.cpp vendor/lld/dist/COFF/DLL.h vendor/lld/dist/COFF/Driver.cpp vendor/lld/dist/COFF/PDB.cpp vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/OutputSections.cpp vendor/lld/dist/ELF/OutputSections.h vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/test/COFF/armnt-imports.test vendor/lld/dist/test/COFF/hello32.test vendor/lld/dist/test/COFF/imports.test vendor/lld/dist/test/ELF/emit-relocs.s Modified: vendor/lld/dist/COFF/DLL.cpp ============================================================================== --- vendor/lld/dist/COFF/DLL.cpp Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/COFF/DLL.cpp Sat Jun 3 15:21:18 2017 (r319531) @@ -100,17 +100,13 @@ class ImportDirectoryChunk : public Chunk { (public) void writeTo(uint8_t *Buf) const override { auto *E = (coff_import_directory_table_entry *)(Buf + OutputSectionOff); + E->ImportLookupTableRVA = LookupTab->getRVA(); E->NameRVA = DLLName->getRVA(); - - // The import descriptor table contains two pointers to - // the tables describing dllimported symbols. But the - // Windows loader actually uses only one. So we create - // only one table and set both fields to its address. - E->ImportLookupTableRVA = AddressTab->getRVA(); E->ImportAddressTableRVA = AddressTab->getRVA(); } Chunk *DLLName; + Chunk *LookupTab; Chunk *AddressTab; }; @@ -392,6 +388,7 @@ std::vector IdataContents::getChunks() { // Add each type in the correct order. std::vector V; V.insert(V.end(), Dirs.begin(), Dirs.end()); + V.insert(V.end(), Lookups.begin(), Lookups.end()); V.insert(V.end(), Addresses.begin(), Addresses.end()); V.insert(V.end(), Hints.begin(), Hints.end()); V.insert(V.end(), DLLNames.begin(), DLLNames.end()); @@ -407,18 +404,21 @@ void IdataContents::create() { // we need to create HintName chunks to store the names. // If they don't (if they are import-by-ordinals), we store only // ordinal values to the table. - size_t Base = Addresses.size(); + size_t Base = Lookups.size(); for (DefinedImportData *S : Syms) { uint16_t Ord = S->getOrdinal(); if (S->getExternalName().empty()) { + Lookups.push_back(make(Ord)); Addresses.push_back(make(Ord)); continue; } auto *C = make(S->getExternalName(), Ord); + Lookups.push_back(make(C)); Addresses.push_back(make(C)); Hints.push_back(C); } // Terminate with null values. + Lookups.push_back(make(ptrSize())); Addresses.push_back(make(ptrSize())); for (int I = 0, E = Syms.size(); I < E; ++I) @@ -427,6 +427,7 @@ void IdataContents::create() { // Create the import table header. DLLNames.push_back(make(Syms[0]->getDLLName())); auto *Dir = make(DLLNames.back()); + Dir->LookupTab = Lookups[Base]; Dir->AddressTab = Addresses[Base]; Dirs.push_back(Dir); } Modified: vendor/lld/dist/COFF/DLL.h ============================================================================== --- vendor/lld/dist/COFF/DLL.h Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/COFF/DLL.h Sat Jun 3 15:21:18 2017 (r319531) @@ -36,6 +36,7 @@ class IdataContents { (private) std::vector Imports; std::vector Dirs; + std::vector Lookups; std::vector Addresses; std::vector Hints; std::vector DLLNames; Modified: vendor/lld/dist/COFF/Driver.cpp ============================================================================== --- vendor/lld/dist/COFF/Driver.cpp Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/COFF/Driver.cpp Sat Jun 3 15:21:18 2017 (r319531) @@ -434,7 +434,8 @@ std::vector createCOFFShortExportFrom std::vector Exports; for (Export &E1 : Config->Exports) { COFFShortExport E2; - E2.Name = E1.Name; + // Use SymbolName, which will have any stdcall or fastcall qualifiers. + E2.Name = E1.SymbolName; E2.ExtName = E1.ExtName; E2.Ordinal = E1.Ordinal; E2.Noname = E1.Noname; Modified: vendor/lld/dist/COFF/PDB.cpp ============================================================================== --- vendor/lld/dist/COFF/PDB.cpp Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/COFF/PDB.cpp Sat Jun 3 15:21:18 2017 (r319531) @@ -157,7 +157,8 @@ static void dumpDebugS(ScopedPrinter &W, ObjectFile *F fatal(EC, "StreamReader.readArray failed"); TypeDatabase TDB(0); - CVSymbolDumper SymbolDumper(W, TDB, nullptr, false); + CVSymbolDumper SymbolDumper(W, TDB, CodeViewContainer::ObjectFile, nullptr, + false); if (auto EC = SymbolDumper.dump(Symbols)) fatal(EC, "CVSymbolDumper::dump failed"); } Modified: vendor/lld/dist/ELF/LinkerScript.cpp ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.cpp Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/ELF/LinkerScript.cpp Sat Jun 3 15:21:18 2017 (r319531) @@ -463,12 +463,7 @@ void LinkerScript::fabricateDefaultCommands() { // Prefer user supplied address over additional alignment constraint auto I = Config->SectionStartMap.find(Sec->Name); if (I != Config->SectionStartMap.end()) - Commands.push_back( - make(".", [=] { return I->second; }, "")); - else if (Sec->PageAlign) - OSCmd->AddrExpr = [=] { - return alignTo(Script->getDot(), Config->MaxPageSize); - }; + OSCmd->AddrExpr = [=] { return I->second; }; Commands.push_back(OSCmd); if (Sec->Sections.size()) { Modified: vendor/lld/dist/ELF/OutputSections.cpp ============================================================================== --- vendor/lld/dist/ELF/OutputSections.cpp Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/ELF/OutputSections.cpp Sat Jun 3 15:21:18 2017 (r319531) @@ -128,6 +128,7 @@ template void OutputSection::finalize() { // the section to which the relocation applies. InputSectionBase *S = First->getRelocatedSection(); Info = S->getOutputSection()->SectionIndex; + Flags |= SHF_INFO_LINK; } static uint64_t updateOffset(uint64_t Off, InputSection *S) { Modified: vendor/lld/dist/ELF/OutputSections.h ============================================================================== --- vendor/lld/dist/ELF/OutputSections.h Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/ELF/OutputSections.h Sat Jun 3 15:21:18 2017 (r319531) @@ -59,10 +59,6 @@ class OutputSection final : public SectionBase { (publ Alignment = Val; } - // If true, this section will be page aligned on disk. - // Typically the first section of each PT_LOAD segment has this flag. - bool PageAlign = false; - // Pointer to the first section in PT_LOAD segment, which this section // also resides in. This field is used to correctly compute file offset // of a section. When two sections share the same load segment, difference Modified: vendor/lld/dist/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist/ELF/Writer.cpp Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/ELF/Writer.cpp Sat Jun 3 15:21:18 2017 (r319531) @@ -257,19 +257,20 @@ template void Writer::run() { if (ErrorCount) return; - if (!Script->Opt.HasSections) { - if (!Config->Relocatable) - fixSectionAlignments(); + if (!Script->Opt.HasSections) Script->fabricateDefaultCommands(); - } else { + else Script->synchronize(); - } for (BaseCommand *Base : Script->Opt.Commands) if (auto *Cmd = dyn_cast(Base)) OutputSectionCommands.push_back(Cmd); clearOutputSections(); + + if (!Script->Opt.HasSections &&!Config->Relocatable) + fixSectionAlignments(); + // If -compressed-debug-sections is specified, we need to compress // .debug_* sections. Do it right now because it changes the size of // output sections. @@ -1504,24 +1505,33 @@ void Writer::addPtArmExid(std::vector // first section after PT_GNU_RELRO have to be page aligned so that the dynamic // linker can set the permissions. template void Writer::fixSectionAlignments() { + auto PageAlign = [](OutputSection *Sec) { + OutputSectionCommand *Cmd = Script->getCmd(Sec); + if (Cmd && !Cmd->AddrExpr) + Cmd->AddrExpr = [=] { + return alignTo(Script->getDot(), Config->MaxPageSize); + }; + }; + for (const PhdrEntry &P : Phdrs) if (P.p_type == PT_LOAD && P.First) - P.First->PageAlign = true; + PageAlign(P.First); for (const PhdrEntry &P : Phdrs) { if (P.p_type != PT_GNU_RELRO) continue; if (P.First) - P.First->PageAlign = true; + PageAlign(P.First); // Find the first section after PT_GNU_RELRO. If it is in a PT_LOAD we // have to align it to a page. - auto End = OutputSections.end(); - auto I = std::find(OutputSections.begin(), End, P.Last); + auto End = OutputSectionCommands.end(); + auto I = + std::find(OutputSectionCommands.begin(), End, Script->getCmd(P.Last)); if (I == End || (I + 1) == End) continue; - OutputSection *Sec = *(I + 1); + OutputSection *Sec = (*(I + 1))->Sec; if (needsPtLoad(Sec)) - Sec->PageAlign = true; + PageAlign(Sec); } } Modified: vendor/lld/dist/test/COFF/armnt-imports.test ============================================================================== --- vendor/lld/dist/test/COFF/armnt-imports.test Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/test/COFF/armnt-imports.test Sat Jun 3 15:21:18 2017 (r319531) @@ -6,7 +6,7 @@ # CHECK: Import { # CHECK: Name: library.dll # CHECK: ImportLookupTableRVA: 0x2028 -# CHECK: ImportAddressTableRVA: 0x2028 +# CHECK: ImportAddressTableRVA: 0x2030 # CHECK: Symbol: function (0) # CHECK: } Added: vendor/lld/dist/test/COFF/def-export-stdcall.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/def-export-stdcall.s Sat Jun 3 15:21:18 2017 (r319531) @@ -0,0 +1,25 @@ +# RUN: llvm-mc -filetype=obj -triple=i686-windows-msvc %s -o %t.obj +# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall" > %t.def +# RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib +# RUN: llvm-nm %t.lib | FileCheck %s +# CHECK: __imp__stdcall@8 +# CHECK: _stdcall@8 + + .def _stdcall@8; + .scl 2; + .type 32; + .endef + .globl _stdcall@8 +_stdcall@8: + movl 8(%esp), %eax + addl 4(%esp), %eax + retl $8 + + .def _dllmain; + .scl 2; + .type 32; + .endef + .globl _dllmain +_dllmain: + retl + Modified: vendor/lld/dist/test/COFF/hello32.test ============================================================================== --- vendor/lld/dist/test/COFF/hello32.test Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/test/COFF/hello32.test Sat Jun 3 15:21:18 2017 (r319531) @@ -78,7 +78,7 @@ HEADER-NEXT: LoadConfigTableRVA: 0x0 HEADER-NEXT: LoadConfigTableSize: 0x0 HEADER-NEXT: BoundImportRVA: 0x0 HEADER-NEXT: BoundImportSize: 0x0 -HEADER-NEXT: IATRVA: 0x3028 +HEADER-NEXT: IATRVA: 0x3034 HEADER-NEXT: IATSize: 0xC HEADER-NEXT: DelayImportDescriptorRVA: 0x0 HEADER-NEXT: DelayImportDescriptorSize: 0x0 @@ -114,7 +114,7 @@ IMPORTS: AddressSize: 32bit IMPORTS: Import { IMPORTS: Name: std32.dll IMPORTS: ImportLookupTableRVA: 0x3028 -IMPORTS: ImportAddressTableRVA: 0x3028 +IMPORTS: ImportAddressTableRVA: 0x3034 IMPORTS: Symbol: ExitProcess (0) IMPORTS: Symbol: MessageBoxA (1) IMPORTS: } Modified: vendor/lld/dist/test/COFF/imports.test ============================================================================== --- vendor/lld/dist/test/COFF/imports.test Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/test/COFF/imports.test Sat Jun 3 15:21:18 2017 (r319531) @@ -21,14 +21,14 @@ TEXT-NEXT: callq 60 TEXT-NEXT: movl $0, %ecx TEXT-NEXT: callq 18 TEXT-NEXT: callq 29 -TEXT: jmpq *4066(%rip) -TEXT: jmpq *4058(%rip) -TEXT: jmpq *4050(%rip) +TEXT: jmpq *4098(%rip) +TEXT: jmpq *4090(%rip) +TEXT: jmpq *4082(%rip) IMPORT: Import { IMPORT-NEXT: Name: std64.dll IMPORT-NEXT: ImportLookupTableRVA: 0x3028 -IMPORT-NEXT: ImportAddressTableRVA: 0x3028 +IMPORT-NEXT: ImportAddressTableRVA: 0x3048 IMPORT-NEXT: Symbol: ExitProcess (0) IMPORT-NEXT: Symbol: (50) IMPORT-NEXT: Symbol: MessageBoxA (1) Modified: vendor/lld/dist/test/ELF/emit-relocs.s ============================================================================== --- vendor/lld/dist/test/ELF/emit-relocs.s Sat Jun 3 15:21:15 2017 (r319530) +++ vendor/lld/dist/test/ELF/emit-relocs.s Sat Jun 3 15:21:18 2017 (r319531) @@ -1,16 +1,23 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o # RUN: ld.lld --emit-relocs %t1.o -o %t -# RUN: llvm-readobj -t -r %t | FileCheck %s +# RUN: llvm-readobj -t -r -s %t | FileCheck %s ## Check single dash form. # RUN: ld.lld -emit-relocs %t1.o -o %t1 -# RUN: llvm-readobj -t -r %t1 | FileCheck %s +# RUN: llvm-readobj -t -r -s %t1 | FileCheck %s ## Check alias. # RUN: ld.lld -q %t1.o -o %t2 -# RUN: llvm-readobj -t -r %t2 | FileCheck %s +# RUN: llvm-readobj -t -r -s %t2 | FileCheck %s +# CHECK: Section { +# CHECK: Index: 2 +# CHECK-NEXT: Name: .rela.text +# CHECK-NEXT: Type: SHT_RELA +# CHECK-NEXT: Flags [ +# CHECK-NEXT: SHF_INFO_LINK +# CHECK-NEXT: ] # CHECK: Relocations [ # CHECK-NEXT: Section ({{.*}}) .rela.text { # CHECK-NEXT: 0x201002 R_X86_64_32 .text 0x1 From owner-svn-src-all@freebsd.org Sat Jun 3 15:21:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38674BF3B3E; Sat, 3 Jun 2017 15:21:30 +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 E6CAA737C2; Sat, 3 Jun 2017 15:21:29 +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 v53FLSsT083160; Sat, 3 Jun 2017 15:21:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FLRkV083146; Sat, 3 Jun 2017 15:21:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031521.v53FLRkV083146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319533 - in vendor/lldb/dist: cmake/modules include/lldb/Host include/lldb/Host/linux packages/Python/lldbsuite/test/lang/objc/objc-new-syntax source/Host/linux source/Plugins/Platform... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:21:30 -0000 Author: dim Date: Sat Jun 3 15:21:27 2017 New Revision: 319533 URL: https://svnweb.freebsd.org/changeset/base/319533 Log: Vendor import of lldb trunk r304659: https://llvm.org/svn/llvm-project/lldb/trunk@304659 Modified: vendor/lldb/dist/cmake/modules/LLDBConfig.cmake vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake vendor/lldb/dist/include/lldb/Host/Config.h.cmake vendor/lldb/dist/include/lldb/Host/linux/Uio.h vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py vendor/lldb/dist/source/Host/linux/LibcGlue.cpp vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.h vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp vendor/lldb/dist/source/Symbol/ClangASTContext.cpp vendor/lldb/dist/unittests/CMakeLists.txt Modified: vendor/lldb/dist/cmake/modules/LLDBConfig.cmake ============================================================================== --- vendor/lldb/dist/cmake/modules/LLDBConfig.cmake Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/cmake/modules/LLDBConfig.cmake Sat Jun 3 15:21:27 2017 (r319533) @@ -334,28 +334,6 @@ if (HAVE_LIBDL) list(APPEND system_libs ${CMAKE_DL_LIBS}) endif() -# Check for syscall used by lldb-server on linux. -# If these are not found, it will fall back to ptrace (slow) for memory reads. -check_cxx_source_compiles(" - #include - int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }" - HAVE_PROCESS_VM_READV) - -if (HAVE_PROCESS_VM_READV) - add_definitions(-DHAVE_PROCESS_VM_READV) -else() - # If we don't have the syscall wrapper function, but we know the syscall number, we can - # still issue the syscall manually - check_cxx_source_compiles(" - #include - int main() { return __NR_process_vm_readv; }" - HAVE_NR_PROCESS_VM_READV) - - if (HAVE_NR_PROCESS_VM_READV) - add_definitions(-DHAVE_NR_PROCESS_VM_READV) - endif() -endif() - # Figure out if lldb could use lldb-server. If so, then we'll # ensure we build lldb-server when an lldb target is being built. if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD") Modified: vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake ============================================================================== --- vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake Sat Jun 3 15:21:27 2017 (r319533) @@ -12,6 +12,15 @@ check_symbol_exists(sigaction signal.h HAVE_SIGACTION) check_include_file(termios.h HAVE_TERMIOS_H) check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H) +check_cxx_source_compiles(" + #include + int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }" + HAVE_PROCESS_VM_READV) +check_cxx_source_compiles(" + #include + int main() { return __NR_process_vm_readv; }" + HAVE_NR_PROCESS_VM_READV) + # These checks exist in LLVM's configuration, so I want to match the LLVM names # so that the check isn't duplicated, but we translate them into the LLDB names # so that I don't have to change all the uses at the moment. Modified: vendor/lldb/dist/include/lldb/Host/Config.h.cmake ============================================================================== --- vendor/lldb/dist/include/lldb/Host/Config.h.cmake Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/include/lldb/Host/Config.h.cmake Sat Jun 3 15:21:27 2017 (r319533) @@ -20,4 +20,8 @@ #cmakedefine01 HAVE_SIGACTION +#cmakedefine01 HAVE_PROCESS_VM_READV + +#cmakedefine01 HAVE_NR_PROCESS_VM_READV + #endif // #ifndef LLDB_HOST_CONFIG_H Modified: vendor/lldb/dist/include/lldb/Host/linux/Uio.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/linux/Uio.h Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/include/lldb/Host/linux/Uio.h Sat Jun 3 15:21:27 2017 (r319533) @@ -10,11 +10,12 @@ #ifndef liblldb_Host_linux_Uio_h_ #define liblldb_Host_linux_Uio_h_ +#include "lldb/Host/Config.h" #include // We shall provide our own implementation of process_vm_readv if it is not // present -#ifndef HAVE_PROCESS_VM_READV +#if !HAVE_PROCESS_VM_READV ssize_t process_vm_readv(::pid_t pid, const struct iovec *local_iov, unsigned long liovcnt, const struct iovec *remote_iov, unsigned long riovcnt, unsigned long flags); Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py Sat Jun 3 15:21:27 2017 (r319533) @@ -26,16 +26,7 @@ class ObjCNewSyntaxTestCase(TestBase): # Find the line number to break inside main(). self.line = line_number('main.m', '// Set breakpoint 0 here.') - @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) - @skipIf(macos_version=["<", "10.12"]) - @expectedFailureAll(archs=["i[3-6]86"]) - def test_expr(self): + def runToBreakpoint(self): self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -55,6 +46,18 @@ class ObjCNewSyntaxTestCase(TestBase): self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE, substrs=[' resolved, hit count = 1']) + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_read_array(self): + self.runToBreakpoint() + self.expect( "expr --object-description -- immutable_array[0]", VARIABLES_DISPLAYED_CORRECTLY, @@ -65,6 +68,18 @@ class ObjCNewSyntaxTestCase(TestBase): VARIABLES_DISPLAYED_CORRECTLY, substrs=["foo"]) + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_update_array(self): + self.runToBreakpoint() + self.expect( "expr --object-description -- mutable_array[0] = @\"bar\"", VARIABLES_DISPLAYED_CORRECTLY, @@ -75,6 +90,18 @@ class ObjCNewSyntaxTestCase(TestBase): VARIABLES_DISPLAYED_CORRECTLY, substrs=["bar"]) + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_read_dictionary(self): + self.runToBreakpoint() + self.expect( "expr --object-description -- immutable_dictionary[@\"key\"]", VARIABLES_DISPLAYED_CORRECTLY, @@ -85,6 +112,18 @@ class ObjCNewSyntaxTestCase(TestBase): VARIABLES_DISPLAYED_CORRECTLY, substrs=["value"]) + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_update_dictionary(self): + self.runToBreakpoint() + self.expect( "expr --object-description -- mutable_dictionary[@\"key\"] = @\"object\"", VARIABLES_DISPLAYED_CORRECTLY, @@ -95,6 +134,18 @@ class ObjCNewSyntaxTestCase(TestBase): VARIABLES_DISPLAYED_CORRECTLY, substrs=["object"]) + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_array_literal(self): + self.runToBreakpoint() + self.expect( "expr --object-description -- @[ @\"foo\", @\"bar\" ]", VARIABLES_DISPLAYED_CORRECTLY, @@ -103,6 +154,18 @@ class ObjCNewSyntaxTestCase(TestBase): "foo", "bar"]) + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_dictionary_literal(self): + self.runToBreakpoint() + self.expect( "expr --object-description -- @{ @\"key\" : @\"object\" }", VARIABLES_DISPLAYED_CORRECTLY, @@ -110,9 +173,33 @@ class ObjCNewSyntaxTestCase(TestBase): "key", "object"]) + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_char_literal(self): + self.runToBreakpoint() + self.expect("expr --object-description -- @'a'", VARIABLES_DISPLAYED_CORRECTLY, substrs=[str(ord('a'))]) + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_integer_literals(self): + self.runToBreakpoint() + self.expect( "expr --object-description -- @1", VARIABLES_DISPLAYED_CORRECTLY, @@ -138,8 +225,32 @@ class ObjCNewSyntaxTestCase(TestBase): VARIABLES_DISPLAYED_CORRECTLY, substrs=["1"]) + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_float_literal(self): + self.runToBreakpoint() + self.expect("expr -- @123.45", VARIABLES_DISPLAYED_CORRECTLY, substrs=["NSNumber", "123.45"]) + + @skipUnlessDarwin + @expectedFailureAll( + oslist=['macosx'], + compiler='clang', + compiler_version=[ + '<', + '7.0.0']) + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_expressions_in_literals(self): + self.runToBreakpoint() self.expect( "expr --object-description -- @( 1 + 3 )", Modified: vendor/lldb/dist/source/Host/linux/LibcGlue.cpp ============================================================================== --- vendor/lldb/dist/source/Host/linux/LibcGlue.cpp Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/source/Host/linux/LibcGlue.cpp Sat Jun 3 15:21:27 2017 (r319533) @@ -14,13 +14,13 @@ #include #include -#ifndef HAVE_PROCESS_VM_READV // If the syscall wrapper is not available, - // provide one. +#if !HAVE_PROCESS_VM_READV +// If the syscall wrapper is not available, provide one. ssize_t process_vm_readv(::pid_t pid, const struct iovec *local_iov, unsigned long liovcnt, const struct iovec *remote_iov, unsigned long riovcnt, unsigned long flags) { -#ifdef HAVE_NR_PROCESS_VM_READV // If we have the syscall number, we can issue - // the syscall ourselves. +#if HAVE_NR_PROCESS_VM_READV + // If we have the syscall number, we can issue the syscall ourselves. return syscall(__NR_process_vm_readv, pid, local_iov, liovcnt, remote_iov, riovcnt, flags); #else // If not, let's pretend the syscall is not present. Modified: vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Sat Jun 3 15:21:27 2017 (r319533) @@ -33,6 +33,7 @@ #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolFile.h" #include "lldb/Symbol/SymbolVendor.h" +#include "lldb/Target/Platform.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/DataBufferLLVM.h" @@ -1762,4 +1763,80 @@ PlatformDarwin::LaunchProcess(lldb_private::ProcessLau // Let our parent class do the real launching. return PlatformPOSIX::LaunchProcess(launch_info); +} + +lldb_private::Status +PlatformDarwin::FindBundleBinaryInExecSearchPaths (const ModuleSpec &module_spec, Process *process, + ModuleSP &module_sp, + const FileSpecList *module_search_paths_ptr, + ModuleSP *old_module_sp_ptr, bool *did_create_ptr) +{ + const FileSpec &platform_file = module_spec.GetFileSpec(); + // See if the file is present in any of the module_search_paths_ptr directories. + if (!module_sp && module_search_paths_ptr && platform_file) { + // create a vector of all the file / directory names in platform_file + // e.g. this might be + // /System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation + // + // We'll need to look in the module_search_paths_ptr directories for + // both "UIFoundation" and "UIFoundation.framework" -- most likely the + // latter will be the one we find there. + + FileSpec platform_pull_apart(platform_file); + std::vector path_parts; + ConstString unix_root_dir("/"); + while (true) { + ConstString part = platform_pull_apart.GetLastPathComponent(); + platform_pull_apart.RemoveLastPathComponent(); + if (part.IsEmpty() || part == unix_root_dir) + break; + path_parts.push_back(part.AsCString()); + } + const size_t path_parts_size = path_parts.size(); + + size_t num_module_search_paths = module_search_paths_ptr->GetSize(); + for (size_t i = 0; i < num_module_search_paths; ++i) { + Log *log_verbose = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST); + if (log_verbose) + log_verbose->Printf ("PlatformRemoteDarwinDevice::GetSharedModule searching for binary in search-path %s", module_search_paths_ptr->GetFileSpecAtIndex(i).GetPath().c_str()); + // Create a new FileSpec with this module_search_paths_ptr + // plus just the filename ("UIFoundation"), then the parent + // dir plus filename ("UIFoundation.framework/UIFoundation") + // etc - up to four names (to handle "Foo.framework/Contents/MacOS/Foo") + + for (size_t j = 0; j < 4 && j < path_parts_size - 1; ++j) { + FileSpec path_to_try(module_search_paths_ptr->GetFileSpecAtIndex(i)); + + // Add the components backwards. For + // .../PrivateFrameworks/UIFoundation.framework/UIFoundation + // path_parts is + // [0] UIFoundation + // [1] UIFoundation.framework + // [2] PrivateFrameworks + // + // and if 'j' is 2, we want to append path_parts[1] and then + // path_parts[0], aka + // 'UIFoundation.framework/UIFoundation', to the module_search_paths_ptr + // path. + + for (int k = j; k >= 0; --k) { + path_to_try.AppendPathComponent(path_parts[k]); + } + + if (path_to_try.Exists()) { + ModuleSpec new_module_spec(module_spec); + new_module_spec.GetFileSpec() = path_to_try; + Status new_error(Platform::GetSharedModule( + new_module_spec, process, module_sp, NULL, old_module_sp_ptr, + did_create_ptr)); + + if (module_sp) { + module_sp->SetPlatformFileSpec(path_to_try); + return new_error; + } + } + } + } + } + return Status(); } Modified: vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.h ============================================================================== --- vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.h Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.h Sat Jun 3 15:21:27 2017 (r319533) @@ -128,9 +128,15 @@ class PlatformDarwin : public PlatformPOSIX { (protect std::vector &options, SDKType sdk_type); + const char *GetDeveloperDirectory(); + + lldb_private::Status + FindBundleBinaryInExecSearchPaths (const lldb_private::ModuleSpec &module_spec, lldb_private::Process *process, + lldb::ModuleSP &module_sp, const lldb_private::FileSpecList *module_search_paths_ptr, + lldb::ModuleSP *old_module_sp_ptr, bool *did_create_ptr); + std::string m_developer_directory; - const char *GetDeveloperDirectory(); private: DISALLOW_COPY_AND_ASSIGN(PlatformDarwin); Modified: vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Sat Jun 3 15:21:27 2017 (r319533) @@ -339,5 +339,9 @@ lldb_private::Status PlatformMacOSX::GetSharedModule( } } } + + if (!module_sp) { + error = FindBundleBinaryInExecSearchPaths (module_spec, process, module_sp, module_search_paths_ptr, old_module_sp_ptr, did_create_ptr); + } return error; } Modified: vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp Sat Jun 3 15:21:27 2017 (r319533) @@ -605,70 +605,12 @@ Status PlatformRemoteDarwinDevice::GetSharedModule( // See if the file is present in any of the module_search_paths_ptr // directories. - if (!module_sp && module_search_paths_ptr && platform_file) { - // create a vector of all the file / directory names in platform_file - // e.g. this might be - // /System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation - // - // We'll need to look in the module_search_paths_ptr directories for - // both "UIFoundation" and "UIFoundation.framework" -- most likely the - // latter will be the one we find there. + if (!module_sp) + error = PlatformDarwin::FindBundleBinaryInExecSearchPaths (module_spec, process, module_sp, + module_search_paths_ptr, old_module_sp_ptr, did_create_ptr); - FileSpec platform_pull_apart(platform_file); - std::vector path_parts; - ConstString unix_root_dir("/"); - while (true) { - ConstString part = platform_pull_apart.GetLastPathComponent(); - platform_pull_apart.RemoveLastPathComponent(); - if (part.IsEmpty() || part == unix_root_dir) - break; - path_parts.push_back(part.AsCString()); - } - const size_t path_parts_size = path_parts.size(); - - size_t num_module_search_paths = module_search_paths_ptr->GetSize(); - for (size_t i = 0; i < num_module_search_paths; ++i) { - LLDB_LOGV(log, "searching for binary in search-path {0}", - module_search_paths_ptr->GetFileSpecAtIndex(i)); - // Create a new FileSpec with this module_search_paths_ptr - // plus just the filename ("UIFoundation"), then the parent - // dir plus filename ("UIFoundation.framework/UIFoundation") - // etc - up to four names (to handle "Foo.framework/Contents/MacOS/Foo") - - for (size_t j = 0; j < 4 && j < path_parts_size - 1; ++j) { - FileSpec path_to_try(module_search_paths_ptr->GetFileSpecAtIndex(i)); - - // Add the components backwards. For - // .../PrivateFrameworks/UIFoundation.framework/UIFoundation - // path_parts is - // [0] UIFoundation - // [1] UIFoundation.framework - // [2] PrivateFrameworks - // - // and if 'j' is 2, we want to append path_parts[1] and then - // path_parts[0], aka - // 'UIFoundation.framework/UIFoundation', to the module_search_paths_ptr - // path. - - for (int k = j; k >= 0; --k) { - path_to_try.AppendPathComponent(path_parts[k]); - } - - if (path_to_try.Exists()) { - ModuleSpec new_module_spec(module_spec); - new_module_spec.GetFileSpec() = path_to_try; - Status new_error(Platform::GetSharedModule( - new_module_spec, process, module_sp, NULL, old_module_sp_ptr, - did_create_ptr)); - - if (module_sp) { - module_sp->SetPlatformFileSpec(path_to_try); - return new_error; - } - } - } - } - } + if (error.Success()) + return error; const bool always_create = false; error = ModuleList::GetSharedModule( Modified: vendor/lldb/dist/source/Symbol/ClangASTContext.cpp ============================================================================== --- vendor/lldb/dist/source/Symbol/ClangASTContext.cpp Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/source/Symbol/ClangASTContext.cpp Sat Jun 3 15:21:27 2017 (r319533) @@ -3938,6 +3938,11 @@ ClangASTContext::GetTypeInfo(lldb::opaque_compiler_typ const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { + case clang::Type::Attributed: + return GetTypeInfo( + qual_type->getAs() + ->getModifiedType().getAsOpaquePtr(), + pointee_or_element_clang_type); case clang::Type::Builtin: { const clang::BuiltinType *builtin_type = llvm::dyn_cast( qual_type->getCanonicalTypeInternal()); Modified: vendor/lldb/dist/unittests/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/unittests/CMakeLists.txt Sat Jun 3 15:21:24 2017 (r319532) +++ vendor/lldb/dist/unittests/CMakeLists.txt Sat Jun 3 15:21:27 2017 (r319533) @@ -40,7 +40,7 @@ function(add_lldb_unittest test_name) POST_BUILD COMMAND "${CMAKE_COMMAND}" -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/Inputs) - target_link_libraries(${test_name} ${ARG_LINK_LIBS} ${CLANG_USED_LIBS} ${LLDB_SYSTEM_LIBS}) + target_link_libraries(${test_name} ${ARG_LINK_LIBS} ${LLDB_SYSTEM_LIBS}) endfunction() function(add_unittest_inputs test_name inputs) From owner-svn-src-all@freebsd.org Sat Jun 3 15:21:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61C08BF3BAB; Sat, 3 Jun 2017 15:21: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 0F27E7385B; Sat, 3 Jun 2017 15:21:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53FLYpc083215; Sat, 3 Jun 2017 15:21:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FLYVC083214; Sat, 3 Jun 2017 15:21:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706031521.v53FLYVC083214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Jun 2017 15:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r319534 - vendor/lldb/lldb-trunk-r304659 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:21:35 -0000 Author: dim Date: Sat Jun 3 15:21:33 2017 New Revision: 319534 URL: https://svnweb.freebsd.org/changeset/base/319534 Log: Tag lldb trunk r304659. Added: vendor/lldb/lldb-trunk-r304659/ - copied from r319533, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Sat Jun 3 15:39:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36B2ABF419C; Sat, 3 Jun 2017 15:39: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 F18787487D; Sat, 3 Jun 2017 15:39: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 v53FdOVp088391; Sat, 3 Jun 2017 15:39:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FdNuD088387; Sat, 3 Jun 2017 15:39:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706031539.v53FdNuD088387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 15:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319535 - in head/sys/arm: conf freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:39:25 -0000 Author: andrew Date: Sat Jun 3 15:39:23 2017 New Revision: 319535 URL: https://svnweb.freebsd.org/changeset/base/319535 Log: Enable MULTIDELAY in the i.MX5 kernel configs. This will help adding them to GENERIC. Modified: head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/IMX53 head/sys/arm/freescale/imx/imx51_machdep.c head/sys/arm/freescale/imx/imx53_machdep.c Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Sat Jun 3 15:21:33 2017 (r319534) +++ head/sys/arm/conf/EFIKA_MX Sat Jun 3 15:39:23 2017 (r319535) @@ -31,6 +31,7 @@ options SCHED_4BSD # 4BSD scheduler #options MD_ROOT # MD is a potential root device #options NFSD # Network Filesystem Server options PLATFORM +options MULTIDELAY options INCLUDE_CONFIG_FILE # Include this file in kernel # NFS root from boopt/dhcp Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Sat Jun 3 15:21:33 2017 (r319534) +++ head/sys/arm/conf/IMX53 Sat Jun 3 15:39:23 2017 (r319535) @@ -28,6 +28,7 @@ options SOC_IMX53 options SCHED_4BSD # 4BSD scheduler #options NFSD # Network Filesystem Server options PLATFORM +options MULTIDELAY options INCLUDE_CONFIG_FILE # Include this file in kernel # kernel/memory size reduction Modified: head/sys/arm/freescale/imx/imx51_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_machdep.c Sat Jun 3 15:21:33 2017 (r319534) +++ head/sys/arm/freescale/imx/imx51_machdep.c Sat Jun 3 15:39:23 2017 (r319535) @@ -99,4 +99,4 @@ static platform_method_t imx51_methods[] = { PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(imx51, "i.MX51", 0, "fsl,imx51", 0); +FDT_PLATFORM_DEF(imx51, "i.MX51", 0, "fsl,imx51", 100); Modified: head/sys/arm/freescale/imx/imx53_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx53_machdep.c Sat Jun 3 15:21:33 2017 (r319534) +++ head/sys/arm/freescale/imx/imx53_machdep.c Sat Jun 3 15:39:23 2017 (r319535) @@ -95,5 +95,4 @@ static platform_method_t imx53_methods[] = { PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(imx53, "i.MX53", 0, "fsl,imx53", 0); - +FDT_PLATFORM_DEF(imx53, "i.MX53", 0, "fsl,imx53", 100); From owner-svn-src-all@freebsd.org Sat Jun 3 15:40:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94254BF428E; Sat, 3 Jun 2017 15:40: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 5FEC074AC6; Sat, 3 Jun 2017 15:40: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 v53FeYgm088495; Sat, 3 Jun 2017 15:40:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FeYvR088494; Sat, 3 Jun 2017 15:40:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706031540.v53FeYvR088494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 15:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319536 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:40:35 -0000 Author: andrew Date: Sat Jun 3 15:40:34 2017 New Revision: 319536 URL: https://svnweb.freebsd.org/changeset/base/319536 Log: Add MULTIDELAY to the Beaglebone kenrel config to help moving it to GENERIC. Modified: head/sys/arm/conf/BEAGLEBONE Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sat Jun 3 15:39:23 2017 (r319535) +++ head/sys/arm/conf/BEAGLEBONE Sat Jun 3 15:40:34 2017 (r319536) @@ -29,6 +29,7 @@ include "../ti/am335x/std.am335x" makeoptions MODULES_EXTRA="dtb/am335x am335x_dmtpps" options INTRNG +options MULTIDELAY options SCHED_4BSD # 4BSD scheduler options PLATFORM From owner-svn-src-all@freebsd.org Sat Jun 3 15:48:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64DF4BF45A9; Sat, 3 Jun 2017 15:48:05 +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 395EB74F34; Sat, 3 Jun 2017 15:48:05 +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 v53Fm3IJ092555; Sat, 3 Jun 2017 15:48:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53Fm3tG092554; Sat, 3 Jun 2017 15:48:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706031548.v53Fm3tG092554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 15:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319537 - head/sys/arm/versatile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:48:05 -0000 Author: andrew Date: Sat Jun 3 15:48:03 2017 New Revision: 319537 URL: https://svnweb.freebsd.org/changeset/base/319537 Log: Add MULTIDELAY support to the sp804 driver. Modified: head/sys/arm/versatile/sp804.c Modified: head/sys/arm/versatile/sp804.c ============================================================================== --- head/sys/arm/versatile/sp804.c Sat Jun 3 15:40:34 2017 (r319536) +++ head/sys/arm/versatile/sp804.c Sat Jun 3 15:48:03 2017 (r319537) @@ -42,6 +42,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef MULTIDELAY +#include /* For arm_set_delay */ +#endif + #include #include #include @@ -109,6 +113,7 @@ struct sp804_timer_softc { bus_space_write_4(sc->bst, sc->bsh, reg, val) static unsigned sp804_timer_tc_get_timecount(struct timecounter *); +static void sp804_timer_delay(int, void *); static unsigned sp804_timer_tc_get_timecount(struct timecounter *tc) @@ -287,6 +292,10 @@ sp804_timer_attach(device_t dev) (sp804_timer_tc_read_4(SP804_PRIMECELL_ID0 + i*4) & 0xff); } +#ifdef MULTIDELAY + arm_set_delay(sp804_timer_delay, sc); +#endif + device_printf(dev, "PrimeCell ID: %08x\n", id); sc->timer_initialized = 1; @@ -310,11 +319,36 @@ static devclass_t sp804_timer_devclass; DRIVER_MODULE(sp804_timer, simplebus, sp804_timer_driver, sp804_timer_devclass, 0, 0); +static void +sp804_timer_delay(int usec, void *arg) +{ + struct sp804_timer_softc *sc = arg; + int32_t counts; + uint32_t first, last; + + /* Get the number of times to count */ + counts = usec * ((sc->tc.tc_frequency / 1000000) + 1); + + first = sp804_timer_tc_get_timecount(&sc->tc); + + while (counts > 0) { + last = sp804_timer_tc_get_timecount(&sc->tc); + if (last == first) + continue; + if (last > first) { + counts -= (int32_t)(last - first); + } else { + counts -= (int32_t)((0xFFFFFFFF - first) + last); + } + first = last; + } +} + +#ifndef MULTIDELAY void DELAY(int usec) { int32_t counts; - uint32_t first, last; device_t timer_dev; struct sp804_timer_softc *sc; int timer_initialized = 0; @@ -336,23 +370,8 @@ DELAY(int usec) for (counts = 200; counts > 0; counts--) /* Prevent gcc from optimizing out the loop */ cpufunc_nullop(); - return; + } else { + sp804_timer_delay(usec, sc); } - - /* Get the number of times to count */ - counts = usec * ((sc->tc.tc_frequency / 1000000) + 1); - - first = sp804_timer_tc_get_timecount(&sc->tc); - - while (counts > 0) { - last = sp804_timer_tc_get_timecount(&sc->tc); - if (last == first) - continue; - if (last>first) { - counts -= (int32_t)(last - first); - } else { - counts -= (int32_t)((0xFFFFFFFF - first) + last); - } - first = last; - } } +#endif From owner-svn-src-all@freebsd.org Sat Jun 3 15:56:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4598CBF4829; Sat, 3 Jun 2017 15:56:56 +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 19A1C753B7; Sat, 3 Jun 2017 15:56:56 +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 v53FutI0096752; Sat, 3 Jun 2017 15:56:55 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53FutIR096751; Sat, 3 Jun 2017 15:56:55 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706031556.v53FutIR096751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 15:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319538 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 15:56:56 -0000 Author: andrew Date: Sat Jun 3 15:56:54 2017 New Revision: 319538 URL: https://svnweb.freebsd.org/changeset/base/319538 Log: Add MULTIDELAY support to the mpcore timer driver. This is needed when using this with GENERIC. While here remove the weak symbol, it doesn't seem to be needed anymore. Modified: head/sys/arm/arm/mpcore_timer.c Modified: head/sys/arm/arm/mpcore_timer.c ============================================================================== --- head/sys/arm/arm/mpcore_timer.c Sat Jun 3 15:48:03 2017 (r319537) +++ head/sys/arm/arm/mpcore_timer.c Sat Jun 3 15:56:54 2017 (r319538) @@ -59,6 +59,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef MULTIDELAY +#include /* For arm_set_delay */ +#endif + #include #include #include @@ -115,6 +119,8 @@ static boolean_t arm_tmr_freq_varies; #define tmr_gbl_read_4(sc, reg) bus_read_4((sc)->gbl_mem, reg) #define tmr_gbl_write_4(sc, reg, val) bus_write_4((sc)->gbl_mem, reg, val) +static void arm_tmr_delay(int, void *); + static timecounter_get_t arm_tmr_get_timecount; static struct timecounter arm_tmr_timecount = { @@ -431,6 +437,11 @@ arm_tmr_attach(device_t dev) if (tc_err != 0 && et_err != 0) { return (ENXIO); } + +#ifdef MULTIDELAY + arm_set_delay(arm_tmr_delay, sc); +#endif + return (0); } @@ -482,37 +493,14 @@ arm_tmr_change_frequency(uint64_t newfreq) et_change_frequency(arm_tmr_et, newfreq); } -/** - * DELAY - Delay for at least usec microseconds. - * @usec: number of microseconds to delay by - * - * This function is called all over the kernel and is suppose to provide a - * consistent delay. This function may also be called before the console - * is setup so no printf's can be called here. - * - * RETURNS: - * nothing - */ -static void __used /* Must emit function code for the weak ref below. */ -arm_tmr_DELAY(int usec) +static void +arm_tmr_delay(int usec, void *arg) { - struct arm_tmr_softc *sc; + struct arm_tmr_softc *sc = arg; int32_t counts_per_usec; int32_t counts; uint32_t first, last; - /* Check the timers are setup, if not just use a for loop for the meantime */ - if (arm_tmr_tc == NULL || arm_tmr_timecount.tc_frequency == 0) { - for (; usec > 0; usec--) - for (counts = 200; counts > 0; counts--) - cpufunc_nullop(); /* Prevent gcc from optimizing - * out the loop - */ - return; - } - - sc = arm_tmr_tc->tc_priv; - /* Get the number of times to count */ counts_per_usec = ((arm_tmr_timecount.tc_frequency / 1000000) + 1); @@ -536,10 +524,34 @@ arm_tmr_DELAY(int usec) } } -/* - * Supply a DELAY() implementation via weak linkage. A platform may want to use - * the mpcore per-cpu eventtimers but provide its own DELAY() routine, - * especially when the core frequency can change on the fly. +#ifndef MULTIDELAY +/** + * DELAY - Delay for at least usec microseconds. + * @usec: number of microseconds to delay by + * + * This function is called all over the kernel and is suppose to provide a + * consistent delay. This function may also be called before the console + * is setup so no printf's can be called here. + * + * RETURNS: + * nothing */ -__weak_reference(arm_tmr_DELAY, DELAY); +void +DELAY(int usec) +{ + struct arm_tmr_softc *sc; + int32_t counts; + /* Check the timers are setup, if not just use a for loop for the meantime */ + if (arm_tmr_tc == NULL || arm_tmr_timecount.tc_frequency == 0) { + for (; usec > 0; usec--) + for (counts = 200; counts > 0; counts--) + cpufunc_nullop(); /* Prevent gcc from optimizing + * out the loop + */ + } else { + sc = arm_tmr_tc->tc_priv; + arm_tmr_delay(usec, sc); + } +} +#endif From owner-svn-src-all@freebsd.org Sat Jun 3 16:18:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68B0EBF4DA1; Sat, 3 Jun 2017 16:18:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F79F75F4E; Sat, 3 Jun 2017 16:18:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53GIpsu005433; Sat, 3 Jun 2017 16:18:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53GIpLC005431; Sat, 3 Jun 2017 16:18:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706031618.v53GIpLC005431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 3 Jun 2017 16:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319539 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 16:18:52 -0000 Author: kib Date: Sat Jun 3 16:18:50 2017 New Revision: 319539 URL: https://svnweb.freebsd.org/changeset/base/319539 Log: Mitigate several problems with the softdep_request_cleanup() on busy host. Problems start appearing when there are several threads all doing operations on a UFS volume and the SU workqueue needs a cleanup. It is possible that each thread calling softdep_request_cleanup() owns the lock for some dirty vnode (e.g. all of them are executing mkdir(2), mknod(2), creat(2) etc) and all vnodes which must be flushed are locked by corresponding thread. Then, we get all the threads simultaneously entering softdep_request_cleanup(). There are two problems: - Several threads execute MNT_VNODE_FOREACH_ALL() loops in parallel. Due to the locking, they quickly start executing 'in phase' with the speed of the slowest thread. - Since each thread already owns the lock for a dirty vnode, other threads non-blocking attempt to lock the vnode owned by other thread fail, and loops executing without making the progress. Retry logic does not allow the situation to recover. The result is a livelock. Fix these problems by making the following changes: - Allow only one thread to enter MNT_VNODE_FOREACH_ALL() loop per mp. A new flag FLUSH_RC_ACTIVE guards the loop. - If there were failed locking attempts during the loop, abort retry even if there are still work items on the mp work list. An assumption is that the items will be cleaned when other thread either fsyncs its vnode, or unlock and allow yet another thread to make the progress. It is possible now that some calls would get undeserved ENOSPC from ffs_alloc(), because the cleanup is not aggressive enough. But I do not see how can we reliably clean up workitems if calling softdep_request_cleanup() while still owning the vnode lock. I thought about scheme where ffs_alloc() returns ERESTART and saves the retry counter somewhere in struct thread, to return to the top level, unlock the vnode and retry. But IMO the very rare (and unproven) spurious ENOSPC is not worth the complications. Reported and tested by: pho Style and comments by: mckusick Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/softdep.h Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sat Jun 3 15:56:54 2017 (r319538) +++ head/sys/ufs/ffs/ffs_softdep.c Sat Jun 3 16:18:50 2017 (r319539) @@ -901,6 +901,7 @@ static int pagedep_find(struct pagedep_hashhead *, ino struct pagedep **); static void pause_timer(void *); static int request_cleanup(struct mount *, int); +static int softdep_request_cleanup_flush(struct mount *, struct ufsmount *); static void schedule_cleanup(struct mount *); static void softdep_ast_cleanup_proc(struct thread *); static int process_worklist_item(struct mount *, int, int); @@ -13274,10 +13275,9 @@ softdep_request_cleanup(fs, vp, cred, resource) { struct ufsmount *ump; struct mount *mp; - struct vnode *lvp, *mvp; long starttime; ufs2_daddr_t needed; - int error; + int error, failed_vnode; /* * If we are being called because of a process doing a @@ -13368,41 +13368,88 @@ retry: * to the worklist that we can then process to reap addition * resources. We walk the vnodes associated with the mount point * until we get the needed worklist requests that we can reap. + * + * If there are several threads all needing to clean the same + * mount point, only one is allowed to walk the mount list. + * When several threads all try to walk the same mount list, + * they end up competing with each other and often end up in + * livelock. This approach ensures that forward progress is + * made at the cost of occational ENOSPC errors being returned + * that might otherwise have been avoided. */ + error = 1; if ((resource == FLUSH_BLOCKS_WAIT && fs->fs_cstotal.cs_nbfree <= needed) || (resource == FLUSH_INODES_WAIT && fs->fs_pendinginodes > 0 && fs->fs_cstotal.cs_nifree <= needed)) { - MNT_VNODE_FOREACH_ALL(lvp, mp, mvp) { - if (TAILQ_FIRST(&lvp->v_bufobj.bo_dirty.bv_hd) == 0) { - VI_UNLOCK(lvp); - continue; + ACQUIRE_LOCK(ump); + if ((ump->um_softdep->sd_flags & FLUSH_RC_ACTIVE) == 0) { + ump->um_softdep->sd_flags |= FLUSH_RC_ACTIVE; + FREE_LOCK(ump); + failed_vnode = softdep_request_cleanup_flush(mp, ump); + ACQUIRE_LOCK(ump); + ump->um_softdep->sd_flags &= ~FLUSH_RC_ACTIVE; + FREE_LOCK(ump); + if (ump->softdep_on_worklist > 0) { + stat_cleanup_retries += 1; + if (!failed_vnode) + goto retry; } - if (vget(lvp, LK_EXCLUSIVE | LK_INTERLOCK | LK_NOWAIT, - curthread)) - continue; - if (lvp->v_vflag & VV_NOSYNC) { /* unlinked */ - vput(lvp); - continue; - } - (void) ffs_syncvnode(lvp, MNT_NOWAIT, 0); - vput(lvp); + } else { + FREE_LOCK(ump); + error = 0; } - lvp = ump->um_devvp; - if (vn_lock(lvp, LK_EXCLUSIVE | LK_NOWAIT) == 0) { - VOP_FSYNC(lvp, MNT_NOWAIT, curthread); - VOP_UNLOCK(lvp, 0); - } - if (ump->softdep_on_worklist > 0) { - stat_cleanup_retries += 1; - goto retry; - } stat_cleanup_failures += 1; } if (time_second - starttime > stat_cleanup_high_delay) stat_cleanup_high_delay = time_second - starttime; UFS_LOCK(ump); - return (1); + return (error); +} + +/* + * Scan the vnodes for the specified mount point flushing out any + * vnodes that can be locked without waiting. Finally, try to flush + * the device associated with the mount point if it can be locked + * without waiting. + * + * We return 0 if we were able to lock every vnode in our scan. + * If we had to skip one or more vnodes, we return 1. + */ +static int +softdep_request_cleanup_flush(mp, ump) + struct mount *mp; + struct ufsmount *ump; +{ + struct thread *td; + struct vnode *lvp, *mvp; + int failed_vnode; + + failed_vnode = 0; + td = curthread; + MNT_VNODE_FOREACH_ALL(lvp, mp, mvp) { + if (TAILQ_FIRST(&lvp->v_bufobj.bo_dirty.bv_hd) == 0) { + VI_UNLOCK(lvp); + continue; + } + if (vget(lvp, LK_EXCLUSIVE | LK_INTERLOCK | LK_NOWAIT, + td) != 0) { + failed_vnode = 1; + continue; + } + if (lvp->v_vflag & VV_NOSYNC) { /* unlinked */ + vput(lvp); + continue; + } + (void) ffs_syncvnode(lvp, MNT_NOWAIT, 0); + vput(lvp); + } + lvp = ump->um_devvp; + if (vn_lock(lvp, LK_EXCLUSIVE | LK_NOWAIT) == 0) { + VOP_FSYNC(lvp, MNT_NOWAIT, td); + VOP_UNLOCK(lvp, 0); + } + return (failed_vnode); } static bool Modified: head/sys/ufs/ffs/softdep.h ============================================================================== --- head/sys/ufs/ffs/softdep.h Sat Jun 3 15:56:54 2017 (r319538) +++ head/sys/ufs/ffs/softdep.h Sat Jun 3 16:18:50 2017 (r319539) @@ -1065,6 +1065,7 @@ struct mount_softdeps { #define FLUSH_EXIT 0x0001 /* time to exit */ #define FLUSH_CLEANUP 0x0002 /* need to clear out softdep structures */ #define FLUSH_STARTING 0x0004 /* flush thread not yet started */ +#define FLUSH_RC_ACTIVE 0x0008 /* a thread is flushing the mount point */ /* * Keep the old names from when these were in the ufsmount structure. From owner-svn-src-all@freebsd.org Sat Jun 3 16:19:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97263BF4E18; Sat, 3 Jun 2017 16:19:34 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6141A76096; Sat, 3 Jun 2017 16:19:34 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53GJXef005502; Sat, 3 Jun 2017 16:19:33 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53GJX5F005501; Sat, 3 Jun 2017 16:19:33 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706031619.v53GJX5F005501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 3 Jun 2017 16:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319540 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 16:19:34 -0000 Author: alc Date: Sat Jun 3 16:19:33 2017 New Revision: 319540 URL: https://svnweb.freebsd.org/changeset/base/319540 Log: The data type returned by vmoff() is too narrow in its range. This could break the transmission of files longer than 4 GB on 32-bit architectures. Reviewed by: glebius, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10019 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Sat Jun 3 16:18:50 2017 (r319539) +++ head/sys/kern/kern_sendfile.c Sat Jun 3 16:19:33 2017 (r319540) @@ -207,12 +207,12 @@ xfsize(int i, int n, off_t off, off_t len) /* * Helper function to get offset within object for i page. */ -static inline vm_offset_t +static inline vm_ooffset_t vmoff(int i, off_t off) { if (i == 0) - return ((vm_offset_t)off); + return ((vm_ooffset_t)off); return (trunc_page(off + i * PAGE_SIZE)); } From owner-svn-src-all@freebsd.org Sat Jun 3 16:24:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B675EBF4FE8; Sat, 3 Jun 2017 16:24:18 +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 811F876483; Sat, 3 Jun 2017 16:24:18 +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 v53GOHEr009336; Sat, 3 Jun 2017 16:24:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53GOH5x009333; Sat, 3 Jun 2017 16:24:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706031624.v53GOH5x009333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 16:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319541 - in head/sys/arm: annapurna/alpine arm versatile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 16:24:18 -0000 Author: andrew Date: Sat Jun 3 16:24:17 2017 New Revision: 319541 URL: https://svnweb.freebsd.org/changeset/base/319541 Log: Stop making cpu_initclocks weak when using event timers. A weak symbol could be overridden in the SoC specific code, but this would break GENERIC as it is likely to be incorrect. Remove the versatile implementation of cpu_initclocks as it's unneeded. Deleted: head/sys/arm/versatile/versatile_timer.c Modified: head/sys/arm/annapurna/alpine/files.alpine head/sys/arm/arm/machdep.c head/sys/arm/versatile/files.versatile Modified: head/sys/arm/annapurna/alpine/files.alpine ============================================================================== --- head/sys/arm/annapurna/alpine/files.alpine Sat Jun 3 16:19:33 2017 (r319540) +++ head/sys/arm/annapurna/alpine/files.alpine Sat Jun 3 16:24:17 2017 (r319541) @@ -3,7 +3,6 @@ kern/kern_clocksource.c standard arm/versatile/sp804.c standard -arm/versatile/versatile_timer.c standard dev/uart/uart_dev_ns8250.c optional uart arm/annapurna/alpine/common.c standard Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sat Jun 3 16:19:33 2017 (r319540) +++ head/sys/arm/arm/machdep.c Sat Jun 3 16:24:17 2017 (r319541) @@ -301,6 +301,7 @@ cpu_idle_wakeup(int cpu) return (0); } +#ifdef NO_EVENTTIMERS /* * Most ARM platforms don't need to do anything special to init their clocks * (they get intialized during normal device attachment), and by not defining a @@ -311,8 +312,14 @@ cpu_idle_wakeup(int cpu) void arm_generic_initclocks(void) { +} +__weak_reference(arm_generic_initclocks, cpu_initclocks); -#ifndef NO_EVENTTIMERS +#else +void +cpu_initclocks(void) +{ + #ifdef SMP if (PCPU_GET(cpuid) == 0) cpu_initclocks_bsp(); @@ -321,9 +328,8 @@ arm_generic_initclocks(void) #else cpu_initclocks_bsp(); #endif -#endif } -__weak_reference(arm_generic_initclocks, cpu_initclocks); +#endif #ifdef MULTIDELAY void Modified: head/sys/arm/versatile/files.versatile ============================================================================== --- head/sys/arm/versatile/files.versatile Sat Jun 3 16:19:33 2017 (r319540) +++ head/sys/arm/versatile/files.versatile Sat Jun 3 16:24:17 2017 (r319541) @@ -8,6 +8,5 @@ arm/versatile/versatile_common.c standard arm/versatile/versatile_pci.c optional pci arm/versatile/versatile_scm.c standard arm/versatile/versatile_sic.c standard -arm/versatile/versatile_timer.c standard kern/kern_clocksource.c standard From owner-svn-src-all@freebsd.org Sat Jun 3 17:24:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C1BABF5D3B; Sat, 3 Jun 2017 17:24:15 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03B4A77AB5; Sat, 3 Jun 2017 17:24:14 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53HOEvC033296; Sat, 3 Jun 2017 17:24:14 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53HOEm1033295; Sat, 3 Jun 2017 17:24:14 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706031724.v53HOEm1033295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 3 Jun 2017 17:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319542 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 17:24:15 -0000 Author: alc Date: Sat Jun 3 17:24:13 2017 New Revision: 319542 URL: https://svnweb.freebsd.org/changeset/base/319542 Log: Eliminate duplication of the pmap and pv list unlock operations in pmap_enter() by implementing a single return path. Otherwise, the duplication will only increase with the upcoming support for psind == 1. Reviewed by: kib (some time ago) Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jun 3 16:24:17 2017 (r319541) +++ head/sys/amd64/amd64/pmap.c Sat Jun 3 17:24:13 2017 (r319542) @@ -4313,6 +4313,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v pv_entry_t pv; vm_paddr_t opa, pa; vm_page_t mpte, om; + int rv; boolean_t nosleep; PG_A = pmap_accessed_bit(pmap); @@ -4387,10 +4388,8 @@ retry: mpte = _pmap_allocpte(pmap, pmap_pde_pindex(va), nosleep ? NULL : &lock); if (mpte == NULL && nosleep) { - if (lock != NULL) - rw_wunlock(lock); - PMAP_UNLOCK(pmap); - return (KERN_RESOURCE_SHORTAGE); + rv = KERN_RESOURCE_SHORTAGE; + goto out; } goto retry; } else @@ -4516,10 +4515,12 @@ unchanged: vm_reserv_level_iffullpop(m) == 0) pmap_promote_pde(pmap, pde, va, &lock); + rv = KERN_SUCCESS; +out: if (lock != NULL) rw_wunlock(lock); PMAP_UNLOCK(pmap); - return (KERN_SUCCESS); + return (rv); } /* From owner-svn-src-all@freebsd.org Sat Jun 3 17:56:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DBD1BF6254; Sat, 3 Jun 2017 17:56:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C59478510; Sat, 3 Jun 2017 17:56:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53HuV2P045505; Sat, 3 Jun 2017 17:56:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53HuVum045504; Sat, 3 Jun 2017 17:56:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706031756.v53HuVum045504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 3 Jun 2017 17:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319543 - head/bin/dd/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 17:56:32 -0000 Author: ngie Date: Sat Jun 3 17:56:31 2017 New Revision: 319543 URL: https://svnweb.freebsd.org/changeset/base/319543 Log: Stylistic tweaks Move opening braces of functions from the last column to column 0. MFC after: 18 days MFC with: r319339 Sponsored by: Dell EMC Isilon Modified: head/bin/dd/tests/dd2_test.sh Modified: head/bin/dd/tests/dd2_test.sh ============================================================================== --- head/bin/dd/tests/dd2_test.sh Sat Jun 3 17:24:13 2017 (r319542) +++ head/bin/dd/tests/dd2_test.sh Sat Jun 3 17:56:31 2017 (r319543) @@ -27,10 +27,12 @@ atf_test_case seek_overflow -seek_overflow_head() { +seek_overflow_head() +{ atf_set "descr" "dd(1) should reject too-large seek values" } -seek_overflow_body() { +seek_overflow_body() +{ touch f.in # Positive tests seek=`echo "2^63 / 4096 - 1" | bc` From owner-svn-src-all@freebsd.org Sat Jun 3 17:59:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D36C0BF6404; Sat, 3 Jun 2017 17:59:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1C6378799; Sat, 3 Jun 2017 17:59:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53HxAV5045791; Sat, 3 Jun 2017 17:59:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53HxAEV045790; Sat, 3 Jun 2017 17:59:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706031759.v53HxAEV045790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 3 Jun 2017 17:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319544 - head/bin/dd/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 17:59:11 -0000 Author: ngie Date: Sat Jun 3 17:59:10 2017 New Revision: 319544 URL: https://svnweb.freebsd.org/changeset/base/319544 Log: Mark :seek_overflow as an expected failure MFC after: 18 days MFC with: r319339 PR: 219757 Sponsored by: Dell EMC Isilon Modified: head/bin/dd/tests/dd2_test.sh Modified: head/bin/dd/tests/dd2_test.sh ============================================================================== --- head/bin/dd/tests/dd2_test.sh Sat Jun 3 17:56:31 2017 (r319543) +++ head/bin/dd/tests/dd2_test.sh Sat Jun 3 17:59:10 2017 (r319544) @@ -33,6 +33,8 @@ seek_overflow_head() } seek_overflow_body() { + atf_expect_fail "fails with 'dd: truncating f.out: File too large' - bug 219757" + touch f.in # Positive tests seek=`echo "2^63 / 4096 - 1" | bc` From owner-svn-src-all@freebsd.org Sat Jun 3 18:10:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59C02BF6830; Sat, 3 Jun 2017 18:10:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27ADF78DAA; Sat, 3 Jun 2017 18:10:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53IA47b049948; Sat, 3 Jun 2017 18:10:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53IA47S049947; Sat, 3 Jun 2017 18:10:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706031810.v53IA47S049947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 3 Jun 2017 18:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319545 - head/usr.sbin/newsyslog/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 18:10:05 -0000 Author: ngie Date: Sat Jun 3 18:10:04 2017 New Revision: 319545 URL: https://svnweb.freebsd.org/changeset/base/319545 Log: Don't execute the TODO cases in a subshell This messes up the testcase counter, as seen in bug 219756. PR: 212160, 219756 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/newsyslog/tests/legacy_test.sh Modified: head/usr.sbin/newsyslog/tests/legacy_test.sh ============================================================================== --- head/usr.sbin/newsyslog/tests/legacy_test.sh Sat Jun 3 17:59:10 2017 (r319544) +++ head/usr.sbin/newsyslog/tests/legacy_test.sh Sat Jun 3 18:10:04 2017 (r319545) @@ -380,7 +380,6 @@ tests_time_rotate() { sleep 1.1 - ( TODO="rotate time 2-4 fail today; bug 212160" begin "rotate time 2 ${name_postfix}" @@ -404,7 +403,7 @@ tests_time_rotate() { ckfe ${LOGFNAME} chkfcnt 3 ${dir}${LOGFNAME}.*${ext} end - ) + unset TODO begin "noaction ${name_postfix}" ofiles=`ls -1 ${dir}${LOGFNAME}.*${ext} | tr -d '\n'` From owner-svn-src-all@freebsd.org Sat Jun 3 18:12:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A93FBF6991; Sat, 3 Jun 2017 18:12:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48BBF78FE1; Sat, 3 Jun 2017 18:12:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53IC0nX053803; Sat, 3 Jun 2017 18:12:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53IC0so053802; Sat, 3 Jun 2017 18:12:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706031812.v53IC0so053802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 3 Jun 2017 18:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319546 - head/usr.sbin/newsyslog/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 18:12:01 -0000 Author: ngie Date: Sat Jun 3 18:12:00 2017 New Revision: 319546 URL: https://svnweb.freebsd.org/changeset/base/319546 Log: Fix the testplan after ^/head@r318960 The number of executed testcases is 128, not 126. MFC after: 18 days MFC with: r318960 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/newsyslog/tests/legacy_test.sh Modified: head/usr.sbin/newsyslog/tests/legacy_test.sh ============================================================================== --- head/usr.sbin/newsyslog/tests/legacy_test.sh Sat Jun 3 18:10:04 2017 (r319545) +++ head/usr.sbin/newsyslog/tests/legacy_test.sh Sat Jun 3 18:12:00 2017 (r319546) @@ -454,7 +454,7 @@ tests_rfc5424() { tmpdir_clean } -echo 1..126 +echo 1..128 mkdir -p ${TMPDIR} cd ${TMPDIR} From owner-svn-src-all@freebsd.org Sat Jun 3 18:20:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DF33BF6ADA; Sat, 3 Jun 2017 18:20:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED96C794AB; Sat, 3 Jun 2017 18:20:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53IKOJQ054374; Sat, 3 Jun 2017 18:20:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53IKO16054373; Sat, 3 Jun 2017 18:20:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706031820.v53IKO16054373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 3 Jun 2017 18:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319548 - head/usr.sbin/newsyslog/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 18:20:25 -0000 Author: ngie Date: Sat Jun 3 18:20:23 2017 New Revision: 319548 URL: https://svnweb.freebsd.org/changeset/base/319548 Log: Remove TODO for sub testcases added for bug 212160 On closer inspection, the past failures no longer occur on ^/head. PR: 212160 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/newsyslog/tests/legacy_test.sh Modified: head/usr.sbin/newsyslog/tests/legacy_test.sh ============================================================================== --- head/usr.sbin/newsyslog/tests/legacy_test.sh Sat Jun 3 18:18:34 2017 (r319547) +++ head/usr.sbin/newsyslog/tests/legacy_test.sh Sat Jun 3 18:20:23 2017 (r319548) @@ -380,8 +380,6 @@ tests_time_rotate() { sleep 1.1 - TODO="rotate time 2-4 fail today; bug 212160" - begin "rotate time 2 ${name_postfix}" run_newsyslog ${newsyslog_args} ckfe ${LOGFNAME} @@ -403,7 +401,6 @@ tests_time_rotate() { ckfe ${LOGFNAME} chkfcnt 3 ${dir}${LOGFNAME}.*${ext} end - unset TODO begin "noaction ${name_postfix}" ofiles=`ls -1 ${dir}${LOGFNAME}.*${ext} | tr -d '\n'` From owner-svn-src-all@freebsd.org Sat Jun 3 18:25:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C70CBF6DBE; Sat, 3 Jun 2017 18:25:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5560C79A69; Sat, 3 Jun 2017 18:25:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53IPaew058525; Sat, 3 Jun 2017 18:25:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53IPanl058524; Sat, 3 Jun 2017 18:25:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706031825.v53IPanl058524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 3 Jun 2017 18:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319550 - stable/10/usr.sbin/extattr/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 18:25:37 -0000 Author: ngie Date: Sat Jun 3 18:25:36 2017 New Revision: 319550 URL: https://svnweb.freebsd.org/changeset/base/319550 Log: MFC r316503,r316504,r316505: r316503: Clean up trailing whitespace r316504: Clean up more trailing whitespace in the licensing tort that happened to be spaces, not tabs r316505: Don't assume NAME_MAX is 255 Query the filesystem limit via getconf(3) instead Modified: stable/10/usr.sbin/extattr/tests/extattr_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/extattr/tests/extattr_test.sh ============================================================================== --- stable/10/usr.sbin/extattr/tests/extattr_test.sh Sat Jun 3 18:21:50 2017 (r319549) +++ stable/10/usr.sbin/extattr/tests/extattr_test.sh Sat Jun 3 18:25:36 2017 (r319550) @@ -10,7 +10,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. -# +# # 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 @@ -36,7 +36,7 @@ bad_namespace_body() { setextattr badnamespace myattr X foo atf_check -s not-exit:0 -e match:"Invalid argument" \ lsextattr -q badnamespace foo -} +} atf_test_case hex hex_head() { @@ -48,7 +48,7 @@ hex_body() { atf_check -s exit:0 -o empty setextattr user myattr XYZ foo atf_check -s exit:0 -o inline:"58 59 5a\n" \ getextattr -qx user myattr foo -} +} atf_test_case hex_nonascii hex_nonascii_head() { @@ -62,7 +62,7 @@ hex_nonascii_body() { getextattr user myattr foo atf_check -s exit:0 -o inline:"20 30 40 55 66 70 81 a2 b3 ee ff\n" \ getextattr -qx user myattr foo -} +} atf_test_case long_name long_name_head() { @@ -70,10 +70,15 @@ long_name_head() { } long_name_body() { check_fs + + if ! NAME_MAX=$(getconf NAME_MAX .); then + atf_skip "Filesystem not reporting NAME_MAX; skipping testcase" + fi + # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208965 atf_expect_fail "BUG 208965 extattr(2) doesn't allow maxlen attr names" - ATTRNAME=`jot -b X -s "" 255 0` + ATTRNAME=`jot -b X -s "" $NAME_MAX 0` touch foo atf_check -s exit:0 -o empty setextattr user $ATTRNAME myvalue foo atf_check -s exit:0 -o inline:"${ATTRNAME}\n" lsextattr -q user foo @@ -81,7 +86,7 @@ long_name_body() { getextattr -q user ${ATTRNAME} foo atf_check -s exit:0 -o empty rmextattr user ${ATTRNAME} foo atf_check -s exit:0 -o empty lsextattr -q user foo -} +} atf_test_case loud loud_head() { @@ -99,7 +104,7 @@ loud_body() { printf "%s %s" $(getextattr user myattr foo) atf_check -s exit:0 -o empty rmextattr user myattr foo atf_check -s exit:0 -o inline:"foo" printf %s $(lsextattr user foo) -} +} atf_test_case noattrs noattrs_head() { @@ -109,7 +114,7 @@ noattrs_body() { check_fs touch foo atf_check -s exit:0 -o empty lsextattr -q user foo -} +} atf_test_case nonexistent_file nonexistent_file_head() { @@ -125,7 +130,7 @@ nonexistent_file_body() { getextattr user myattr foo atf_check -s exit:1 -e match:"No such file or directory" \ rmextattr user myattr foo -} +} atf_test_case null null_head() { @@ -136,7 +141,7 @@ null_body() { touch foo atf_check -s exit:0 -o empty setextattr -n user myattr myvalue foo atf_check -s exit:0 -o inline:"myvalue\0\n" getextattr -q user myattr foo -} +} atf_test_case one_user_attr one_user_attr_head() { @@ -150,7 +155,7 @@ one_user_attr_body() { atf_check -s exit:0 -o inline:"myvalue\n" getextattr -q user myattr foo atf_check -s exit:0 -o empty rmextattr user myattr foo atf_check -s exit:0 -o empty lsextattr -q user foo -} +} atf_test_case one_system_attr one_system_attr_head() { @@ -165,7 +170,7 @@ one_system_attr_body() { atf_check -s exit:0 -o inline:"myvalue\n" getextattr -q system myattr foo atf_check -s exit:0 -o empty rmextattr system myattr foo atf_check -s exit:0 -o empty lsextattr -q system foo -} +} atf_test_case stdin stdin_head() { @@ -179,7 +184,7 @@ stdin_body() { atf_check -s exit:0 -o inline:"myattr\n" lsextattr -q user foo getextattr -qq user myattr foo > outfile || atf_fail "getextattr failed" atf_check -s exit:0 cmp -s infile outfile -} +} atf_test_case stringify stringify_head() { @@ -191,7 +196,7 @@ stringify_body() { atf_check -s exit:0 -o empty setextattr user myattr "my value" foo atf_check -s exit:0 -o inline:"\"my\\\040value\"\n" \ getextattr -qs user myattr foo -} +} atf_test_case symlink symlink_head() { @@ -248,7 +253,7 @@ system_and_user_attrs_body() { atf_check -s exit:0 -o empty rmextattr system sysattr foo atf_check -s exit:0 -o empty lsextattr -q user foo atf_check -s exit:0 -o empty lsextattr -q system foo -} +} atf_test_case two_files two_files_head() { @@ -315,7 +320,7 @@ two_user_attrs_body() { atf_check -s exit:0 -o empty rmextattr user myattr2 foo atf_check -s exit:0 -o empty rmextattr user myattr1 foo atf_check -s exit:0 -o empty lsextattr -q user foo -} +} atf_test_case unprivileged_user_cannot_set_system_attr unprivileged_user_cannot_set_system_attr_head() { @@ -327,7 +332,7 @@ unprivileged_user_cannot_set_system_attr_body() { touch foo atf_check -s exit:1 -e match:"Operation not permitted" \ setextattr system myattr myvalue foo -} +} atf_init_test_cases() { From owner-svn-src-all@freebsd.org Sat Jun 3 18:29:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B68ABF6E5F; Sat, 3 Jun 2017 18:29:19 +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 4913479BBC; Sat, 3 Jun 2017 18:29:19 +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 v53ITILa058753; Sat, 3 Jun 2017 18:29:18 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53ITIwT058752; Sat, 3 Jun 2017 18:29:18 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201706031829.v53ITIwT058752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 3 Jun 2017 18:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319551 - head/bin/dd/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 18:29:19 -0000 Author: asomers Date: Sat Jun 3 18:29:18 2017 New Revision: 319551 URL: https://svnweb.freebsd.org/changeset/base/319551 Log: Fix bin/dd/dd2_tests:seek_overflow on UFS and TMPFS Split the postive and negative parts into separate test cases. The positive test case can only run on ZFS, because only ZFS supports files that large. PR: 219757 Reported by: ngie MFC after: 18 days X-MFC-with: 319339 Modified: head/bin/dd/tests/dd2_test.sh Modified: head/bin/dd/tests/dd2_test.sh ============================================================================== --- head/bin/dd/tests/dd2_test.sh Sat Jun 3 18:25:36 2017 (r319550) +++ head/bin/dd/tests/dd2_test.sh Sat Jun 3 18:29:18 2017 (r319551) @@ -26,21 +26,35 @@ # $FreeBSD$ -atf_test_case seek_overflow -seek_overflow_head() +atf_test_case max_seek +max_seek_head() { - atf_set "descr" "dd(1) should reject too-large seek values" + atf_set "descr" "dd(1) can seek by the maximum amount" } -seek_overflow_body() +max_seek_body() { - atf_expect_fail "fails with 'dd: truncating f.out: File too large' - bug 219757" + case `df -T . | tail -n 1 | cut -wf 2` in + "ufs") + atf_skip "UFS's maximum file size is too small";; + "zfs") ;; # ZFS is fine + "tmpfs") + atf_skip "tmpfs can't create arbitrarily large spare files";; + *) atf_skip "Unknown file system";; + esac touch f.in - # Positive tests seek=`echo "2^63 / 4096 - 1" | bc` atf_check -s exit:0 -e ignore dd if=f.in of=f.out bs=4096 seek=$seek +} - # Negative tests +atf_test_case seek_overflow +seek_overflow_head() +{ + atf_set "descr" "dd(1) should reject too-large seek values" +} +seek_overflow_body() +{ + touch f.in seek=`echo "2^63 / 4096" | bc` atf_check -s not-exit:0 -e match:"seek offsets cannot be larger than" \ dd if=f.in of=f.out bs=4096 seek=$seek @@ -50,5 +64,6 @@ seek_overflow_body() atf_init_test_cases() { - atf_add_test_case seek_overflow + atf_add_test_case max_seek + atf_add_test_case seek_overflow } From owner-svn-src-all@freebsd.org Sat Jun 3 18:37:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D658FBF6FE8; Sat, 3 Jun 2017 18:37:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::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 8C8D079F84; Sat, 3 Jun 2017 18:37:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x243.google.com with SMTP id i206so16297139ita.3; Sat, 03 Jun 2017 11:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=RECcfuDd1h2/fGg/wB2qYeLsNgMUBRcLTnpqqwCukTM=; b=RQZ3ywfdcMdxDJrgNMm5mbMz4wU/PxyZMB0/Kdgnn6I26tEZUlevopNIFQo86/PHET oxMpXIFi13aYgjtAzFDj+/gzJRpN6YMCBRaoC5IX+aqEhqq/ck141+tLLQDeMLt9SPH3 /hkhj28uki/pAKwm/QKv2z8b5CGtpOXtqYWZ88YmPTwkENsU0LihYwmUylFjrQ7buRJ1 PYASuppSD2wG1BgU4HkACpcBIXdxrYg08HnRoewR1sMnTJKb22l9kO76UqkxBka7FIx8 d/Hs3Bk7VkZVfrIxXizaRjaT1Jg6hDPgpqhYwraoQP6sWEO0yB9yplI42NsUYRvUEVy7 wLnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=RECcfuDd1h2/fGg/wB2qYeLsNgMUBRcLTnpqqwCukTM=; b=jfJF2m4++5ZipWq6FriXYxAz8FvWrFsyTn5VF5+y89Mw+PS2h/+5DoQtOLAvRn8h7H 0W4tOj5n8zvhAVeEoBLsmOgZfkhaDuWThdiKchvMArdXdG/Pld2h41eh6FnmcHgwMvIM iaHpQh3XRAueu1CDGHFXx4TxDf2Lr6gfP8rScRyJxdEkzuPEgJY1ovBZxKoRyxwVmk4A D+u4d18k4JNu+4/bEkgCLXPHdH1ZZRo0T3vd5mmS/Z6RIYbMJbmJzyhRF8mx2Nx18bZC AUSsdyVKwR807cgr9RvrdwOCG5wcq48lY4MpWhzWJb705lQeKdRHFLWhcpTJ9FofEt/l /HFg== X-Gm-Message-State: AODbwcAJFmLQ1Z46GZIVQc3oQWmIpLH02CHXKy81FqW/UJTqT/NCvu5X KQBJR/rO/I9xp2r+Aig= X-Received: by 10.107.58.10 with SMTP id h10mr13766772ioa.205.1496515063762; Sat, 03 Jun 2017 11:37:43 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id c10sm11617735ioj.48.2017.06.03.11.37.42 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Jun 2017 11:37:43 -0700 (PDT) Subject: Re: svn commit: r319551 - head/bin/dd/tests Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BBAA6824-6264-4320-8993-D8B0D1E64E14"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201706031829.v53ITIwT058752@repo.freebsd.org> Date: Sat, 3 Jun 2017 11:37:41 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201706031829.v53ITIwT058752@repo.freebsd.org> To: Alan Somers X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 18:37:44 -0000 --Apple-Mail=_BBAA6824-6264-4320-8993-D8B0D1E64E14 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jun 3, 2017, at 11:29, Alan Somers wrote: >=20 > Author: asomers > Date: Sat Jun 3 18:29:18 2017 > New Revision: 319551 > URL: https://svnweb.freebsd.org/changeset/base/319551 >=20 > Log: > Fix bin/dd/dd2_tests:seek_overflow on UFS and TMPFS >=20 > Split the postive and negative parts into separate test cases. The = positive > test case can only run on ZFS, because only ZFS supports files that = large. >=20 > PR: 219757 > Reported by: ngie > MFC after: 18 days > X-MFC-with: 319339 Thanks :)! -Ngie --Apple-Mail=_BBAA6824-6264-4320-8993-D8B0D1E64E14 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZMwH1AAoJEPWDqSZpMIYVwcEP/iTiJ/6yjBPGtheUdAle+cFm a+RlwMEkEjXQzoyopPX9Wo8B7c2uGPfgcTJ+mtMlh/6Q6wy2WEkojuE4rsk2jo3o ArDA/i7OAg9o8MdiYbrUhwHwusCuuhN0oRygdPmt8O5TKdUNS8fmDO9Uog0ukT3b P+AqoLsElYi2lxgDVWViaijFRF5fBA9Sdcal2VHKS+DmUGsU9hf1olFnBU5MK2Yh tu8DiYJKZSqJh7EF27M6NUkaU0g5yqMJqe8IjWhEzuC5BWY5d2uvGJjm6UcjNsR6 9g2371LGy5Q37z+QBBUhovskFbpCY2ttXgWUp7P1o0z0v/XuSBnDfxtMIKvDrgat VqJ/j66Wp8ZM5JYLepCue3bTB64uKLscuCK1UIUibYAaUMHr0wBOxNuKjP5VbqKt PnU3vwO8kHG4c7FMzvbBMdjbUko7IP2mJlVXfOyZoIZUzoj58YgOsgXP1VtLck29 LTaQbDyJd13dEUMcyCtQpHmP0jX2IhJxN5GcbFyLRvXsAUHygrsA2FMxjiTYb/t/ q1xpJtAnblamRN+AhLY0/Oi90nLeFRQg3wf6WGyqzs07wJTkdi+LWa2VKmkQU4lS 0XKEimrNzWMX4EuDJz1oJEjKJ0b1hU3EpcJYPUkR/t8+mXmGpwX0NS2NMqK3gkV4 jzaUDy9Z/5JM4X7lbAUv =yLDs -----END PGP SIGNATURE----- --Apple-Mail=_BBAA6824-6264-4320-8993-D8B0D1E64E14-- From owner-svn-src-all@freebsd.org Sat Jun 3 19:05:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B55AEBF74C0; Sat, 3 Jun 2017 19:05:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 758EF7AB84; Sat, 3 Jun 2017 19:05:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id A491510AFA2; Sat, 3 Jun 2017 15:05:11 -0400 (EDT) From: John Baldwin To: Baptiste Daroussin Cc: rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318441 - in head/etc: . cron.d Date: Sat, 03 Jun 2017 12:05:08 -0700 Message-ID: <1833775.llHFF7vaD6@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <9570430.uB7Ojud3DG@ralph.baldwin.cx> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> <9570430.uB7Ojud3DG@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Sat, 03 Jun 2017 15:05:11 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 19:05:13 -0000 On Friday, May 19, 2017 09:17:23 AM John Baldwin wrote: > On Thursday, May 18, 2017 11:24:29 PM Baptiste Daroussin wrote: > > On Thu, May 18, 2017 at 09:48:25AM -0700, John Baldwin wrote: > > > On Thursday, May 18, 2017 03:09:32 PM Baptiste Daroussin wrote: > > > > On Thu, May 18, 2017 at 02:56:31AM -0700, Rodney W. Grimes wrote: > > > > > > Author: ngie > > > > > > Date: Thu May 18 06:25:39 2017 > > > > > > New Revision: 318441 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/318441 > > > > > > > > > > > > Log: > > > > > > Handle the cron.d entry for MK_AT in cron conditionally > > > > > > > > > > > > Install /etc/cron.d/at if MK_AT != no, always using it, which tries > > > > > > to run a non-existent program via cron(8) every 5 minutes with the > > > > > > default /etc/crontab, prior to this commit. > > > > > > > > > > > > SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at > > > > > > because atrun(8) executes programs, which may rely on environment > > > > > > currently set via /etc/crontab. > > > > > > > > > > > > Noted by: bdrewery (in an internal review) > > > > > > MFC after: 2 months > > > > > > Relnotes: yes (may need to add environmental modifications to > > > > > > /etc/cron.d/at) > > > > > > Sponsored by: Dell EMC Isilon > > > > > > > > > > > > Added: > > > > > > head/etc/cron.d/ > > > > > > head/etc/cron.d/Makefile (contents, props changed) > > > > > > head/etc/cron.d/at (contents, props changed) > > > > > > Modified: > > > > > > head/etc/Makefile > > > > > > head/etc/crontab > > > > > > > > > > > > Modified: head/etc/Makefile > > > > > > ============================================================================== > > > > > > --- head/etc/Makefile Thu May 18 06:15:42 2017 (r318440) > > > > > > +++ head/etc/Makefile Thu May 18 06:25:39 2017 (r318441) > > > > > > @@ -8,6 +8,7 @@ FILESGROUPS= FILES > > > > > > # No need as it is empty and just causes rebuilds since this file does so much. > > > > > > UPDATE_DEPENDFILE= no > > > > > > SUBDIR= \ > > > > > > + cron.d \ > > > > > > newsyslog.conf.d \ > > > > > > syslog.d > > > > > > > > > > The thread on the newsyslog clearly shows that this is a contriversial change. > > > > > > > > > > I strongly object to further splitting of /etc/FOO into /etc/foo.d/FOO files > > > > > to suite Dell/EMC/Isilon's needs. It is in conflict with the needs and > > > > > desires of others. > > > > > > > > Has multiple people has stated, on the newsyslog thread. this is not a > > > > DELL/EMC/Isilon need, this is also a requirement for plenty of use cases > > > > 1. Consistency > > > > as a project we do support building WITHOUT_FOO there is no reason to install > > > > syslog, cron configuration for FOO if the system was built without foo > > > > > > Though it doesn't _hurt_, and breaking POLA has to be worth it, not just > > > because it looks nice. > > > > > > > 2. Packaging base > > > > if one does not install at there is no need for the at crontab to be installed > > > > (same reason as 1.) > > > > > > This is a viable reason except that it isn't fully baked yet. > > > > > > > 3. Large deployment of freebsd farms > > > > Being able to administrate thousands of FreeBSD machines, one often ends up > > > > using tools like puppet, chef, ansible, cfengine. When programmatically > > > > handling configuration management it is way easier and safer to simple > > > > add/removes files in a directory rather than mangling^Winplace editing files. > > > > > > There's nothing preventing you now from deploying split files and an empty > > > global configuration file since the daemons support foo.d. You don't require > > > that to change in upstream since you should be using some sort of VCS to > > > manage your configuration as it is. > > > > > > > 4. Ports/packages > > > > On can provide easily sample configuration for cron, syslog (not only) and the > > > > admin can decide to use it or not easily (ususally this is done by making > > > > symlinks from the said file which would live in share/* into the .d directory. > > > > > > > > This is not a new trend in FreeBSD: newsyslog, rc.conf, libmap and more. > > > > > > The support for broken out files has long been there, but the base system has > > > not used them previously for default config shipped during a release. That > > > is in fact a new trend. > > > > > > However, the current approach seems to be the absolute worst way to do this. > > > If someone wants to use the existing base system image and modify it with > > > config management, they now have to use a mix of styles (for some services > > > edit a global config file for certain settings, but use a dedicated file for > > > other settings for the same service, or for the same settings but a different > > > service). It's also the worst case for humans trying to work with our system > > > as the division between which services are broken out vs global is > > > inconsistent and arbitrary. > > > > > > Once you split up the files you make a merge conflict for anyone trying to do > > > an upgrade. If we do this piecemail then we create N merge conflicts for users > > > to deal with as opposed to if you split it up all at once. > > > > > > Also, there wasn't a clear consensus (a mail to arch@ with "hey, we should > > > switch to splitting up config files for reasons A and B and let's do this for > > > 12.0 but not merge to stable so there is a clear flag day / sign post for users > > > to manage upgrades". Instead there have been a couple of commits and any > > > not-in-100%-agreement opinions are ignored. > > > > > That's true, another thing is the way it is done, there is no simple way to > > disable the at cron from an admin point of view rather than rm /etc/cron.d/at > > for an end user which an upgrade will bring back. > > I think an upgrade won't bring the file back necessarily (etcupdate warns you > that a removed file changed, but it doesn't bring it back, I think a similar > strategy might be sensible for pkg as well). > > To be clear, my main thoughts are that if we are going to start using conf.d > for the base system: > > 1) We should be intentional about deciding to use that approach in general > (so discuss it first, though perhaps we've had enough discussion in the > current threads). > > 2) When converting a utility from a global foo.conf to a conf.d style, I > think we should convert it all at once, not piecemeal so that there's just > one painful update for users to work through instead of N updates to the > same file. > > 3) This is probably a sufficiently large POLA violation to not MFC, but be > part of a new X.0. Ping? bapt@ agreed with this, but I haven't seen any other feedback? If others agree then we should either revert back to a single foo.conf or we should fully split newsyslog.conf and syslogd.conf out to individual files. -- John Baldwin From owner-svn-src-all@freebsd.org Sat Jun 3 19:11:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E7B9BF784E; Sat, 3 Jun 2017 19:11:34 +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 0D7C27AF1D; Sat, 3 Jun 2017 19:11:33 +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 v53JBWsi075825; Sat, 3 Jun 2017 19:11:32 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53JBWo0075807; Sat, 3 Jun 2017 19:11:32 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706031911.v53JBWo0075807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 19:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319552 - in head/sys/arm: conf xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 19:11:34 -0000 Author: andrew Date: Sat Jun 3 19:11:32 2017 New Revision: 319552 URL: https://svnweb.freebsd.org/changeset/base/319552 Log: Port the Xilinx code to use PLATFORM and PLATFORM_SMP. This will help move it to be part of the armv6 GENERIC kernel. Added: head/sys/arm/xilinx/zy7_mp.h (contents, props changed) Modified: head/sys/arm/conf/ZEDBOARD head/sys/arm/xilinx/zy7_machdep.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Sat Jun 3 18:29:18 2017 (r319551) +++ head/sys/arm/conf/ZEDBOARD Sat Jun 3 19:11:32 2017 (r319552) @@ -27,6 +27,8 @@ include "../xilinx/std.zynq7" makeoptions MODULES_EXTRA="dtb/zynq" options SCHED_ULE # ULE scheduler +options PLATFORM # Platform based SoC +options PLATFORM_SMP #options NFSSD # Network Filesystem Server options SMP # Enable multiple cores Modified: head/sys/arm/xilinx/zy7_machdep.c ============================================================================== --- head/sys/arm/xilinx/zy7_machdep.c Sat Jun 3 18:29:18 2017 (r319551) +++ head/sys/arm/xilinx/zy7_machdep.c Sat Jun 3 19:11:32 2017 (r319552) @@ -33,6 +33,8 @@ * (v1.4) November 16, 2012. Xilinx doc UG585. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -47,41 +49,22 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include +#include "platform_if.h" + void (*zynq7_cpu_reset)(void); -vm_offset_t -platform_lastaddr(void) -{ - - return (devmap_lastaddr()); -} - -void -platform_probe_and_attach(void) -{ - -} - -void -platform_gpio_init(void) -{ -} - -void -platform_late_init(void) -{ -} - /* * Set up static device mappings. Not strictly necessary -- simplebus will * dynamically establish mappings as needed -- but doing it this way gets us * nice efficient 1MB section mappings. */ -int -platform_devmap_init(void) +static int +zynq7_devmap_init(platform_t plat) { devmap_add_entry(ZYNQ7_PSIO_HWBASE, ZYNQ7_PSIO_SIZE); @@ -90,8 +73,8 @@ platform_devmap_init(void) return (0); } -void -cpu_reset(void) +static void +zynq7_do_cpu_reset(platform_t plat) { if (zynq7_cpu_reset != NULL) (*zynq7_cpu_reset)(); @@ -100,3 +83,17 @@ cpu_reset(void) for (;;) ; } + +static platform_method_t zynq7_methods[] = { + PLATFORMMETHOD(platform_devmap_init, zynq7_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, zynq7_do_cpu_reset), + +#ifdef SMP + PLATFORMMETHOD(platform_mp_setmaxid, zynq7_mp_setmaxid), + PLATFORMMETHOD(platform_mp_start_ap, zynq7_mp_start_ap), +#endif + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(zynq7, "zynq7", 0, "xlnx,zynq-7000", 0); Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Sat Jun 3 18:29:18 2017 (r319551) +++ head/sys/arm/xilinx/zy7_mp.c Sat Jun 3 19:11:32 2017 (r319552) @@ -22,6 +22,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); #include @@ -38,7 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #define ZYNQ7_CPU1_ENTRY 0xfffffff0 @@ -47,7 +51,7 @@ __FBSDID("$FreeBSD$"); #define SCU_CONTROL_ENABLE (1 << 0) void -platform_mp_setmaxid(void) +zynq7_mp_setmaxid(platform_t plat) { mp_maxid = 1; @@ -55,7 +59,7 @@ platform_mp_setmaxid(void) } void -platform_mp_start_ap(void) +zynq7_mp_start_ap(platform_t plat) { bus_space_handle_t scu_handle; bus_space_handle_t ocm_handle; Added: head/sys/arm/xilinx/zy7_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/xilinx/zy7_mp.h Sat Jun 3 19:11:32 2017 (r319552) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2017 Andrew Turner + * 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 ``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. + * + * $FreeBSD$ + */ + +#ifndef _ZY7_MP_H_ +#define _ZY7_MP_H_ + +void zynq7_mp_setmaxid(platform_t); +void zynq7_mp_start_ap(platform_t); + +#endif /* _ZY7_MP_H_ */ From owner-svn-src-all@freebsd.org Sat Jun 3 20:02:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ABBDBF8450; Sat, 3 Jun 2017 20:02:14 +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 2EB8E7C78B; Sat, 3 Jun 2017 20:02:14 +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 v53K2Da5099039; Sat, 3 Jun 2017 20:02:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53K2C0J098143; Sat, 3 Jun 2017 20:02:12 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706032002.v53K2C0J098143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 20:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319553 - in head/sys/arm: conf samsung/exynos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 20:02:14 -0000 Author: andrew Date: Sat Jun 3 20:02:12 2017 New Revision: 319553 URL: https://svnweb.freebsd.org/changeset/base/319553 Log: Port the Samsung ARM code to use PLATFORM and PLATFORM_SMP. This will help move it into the GENERIC kernel config. Added: head/sys/arm/samsung/exynos/exynos5_mp.h (contents, props changed) Deleted: head/sys/arm/samsung/exynos/exynos5_common.c Modified: head/sys/arm/conf/EXYNOS5.common head/sys/arm/samsung/exynos/exynos5_machdep.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/samsung/exynos/files.exynos5 Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Sat Jun 3 19:11:32 2017 (r319552) +++ head/sys/arm/conf/EXYNOS5.common Sat Jun 3 20:02:12 2017 (r319553) @@ -22,6 +22,8 @@ makeoptions WERROR="-Werror" include "std.armv6" options SCHED_ULE # ULE scheduler +options PLATFORM # Platform based SoC +options PLATFORM_SMP options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols Modified: head/sys/arm/samsung/exynos/exynos5_machdep.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_machdep.c Sat Jun 3 19:11:32 2017 (r319552) +++ head/sys/arm/samsung/exynos/exynos5_machdep.c Sat Jun 3 20:02:12 2017 (r319553) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include "opt_ddb.h" #include "opt_platform.h" #include @@ -37,40 +36,26 @@ __FBSDID("$FreeBSD$"); #include +#include + #include #include +#include #include #include +#include -vm_offset_t -platform_lastaddr(void) -{ +#include - return (devmap_lastaddr()); -} +#include "platform_if.h" -void -platform_probe_and_attach(void) -{ +static platform_devmap_init_t exynos5_devmap_init; +static platform_cpu_reset_t exynos5_cpu_reset; -} - -void -platform_gpio_init(void) +static int +exynos5_devmap_init(platform_t plat) { -} - -void -platform_late_init(void) -{ - -} - -int -platform_devmap_init(void) -{ - /* CHIP ID */ devmap_add_entry(0x10000000, 0x100000); @@ -82,3 +67,28 @@ platform_devmap_init(void) return (0); } + +static void +exynos5_cpu_reset(platform_t plat) +{ + bus_space_handle_t bsh; + + bus_space_map(fdtbus_bs_tag, 0x10040400, 0x1000, 0, &bsh); + bus_space_write_4(fdtbus_bs_tag, bsh, 0, 1); + + while (1); +} + +static platform_method_t exynos5_methods[] = { + PLATFORMMETHOD(platform_devmap_init, exynos5_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, exynos5_cpu_reset), + +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, exynos5_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, exynos5_mp_setmaxid), +#endif + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(exynos5, "exynos5", 0, "samsung,exynos5", 0); Modified: head/sys/arm/samsung/exynos/exynos5_mp.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_mp.c Sat Jun 3 19:11:32 2017 (r319552) +++ head/sys/arm/samsung/exynos/exynos5_mp.c Sat Jun 3 20:02:12 2017 (r319553) @@ -40,7 +40,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include + #define EXYNOS_CHIPID 0x10000000 #define EXYNOS5250_SOC_ID 0x43520000 @@ -71,7 +74,7 @@ exynos_get_soc_id(void) } void -platform_mp_setmaxid(void) +exynos5_mp_setmaxid(platform_t plat) { if (exynos_get_soc_id() == EXYNOS5420_SOC_ID) @@ -83,7 +86,7 @@ platform_mp_setmaxid(void) } void -platform_mp_start_ap(void) +exynos5_mp_start_ap(platform_t plat) { bus_addr_t sysram, pmu; int err, i, j; Added: head/sys/arm/samsung/exynos/exynos5_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/samsung/exynos/exynos5_mp.h Sat Jun 3 20:02:12 2017 (r319553) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2017 Andrew Turner + * 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 ``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. + * + * $FreeBSD$ + */ + +#ifndef _EXYNOS5_MP_H_ +#define _EXYNOS5_MP_H_ + +void exynos5_mp_setmaxid(platform_t); +void exynos5_mp_start_ap(platform_t); + +#endif /* _EXYNOS5_MP_H_ */ Modified: head/sys/arm/samsung/exynos/files.exynos5 ============================================================================== --- head/sys/arm/samsung/exynos/files.exynos5 Sat Jun 3 19:11:32 2017 (r319552) +++ head/sys/arm/samsung/exynos/files.exynos5 Sat Jun 3 20:02:12 2017 (r319553) @@ -4,7 +4,6 @@ kern/kern_clocksource.c standard arm/samsung/exynos/exynos5_mct.c standard arm/samsung/exynos/exynos5_mp.c optional smp -arm/samsung/exynos/exynos5_common.c standard arm/samsung/exynos/exynos5_machdep.c standard arm/samsung/exynos/exynos5_combiner.c standard arm/samsung/exynos/exynos5_pad.c optional gpio From owner-svn-src-all@freebsd.org Sat Jun 3 20:14:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A93EBF8748; Sat, 3 Jun 2017 20:14:48 +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 3D1A87CDB2; Sat, 3 Jun 2017 20:14:48 +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 v53KElLS003842; Sat, 3 Jun 2017 20:14:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53KElLw003839; Sat, 3 Jun 2017 20:14:47 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201706032014.v53KElLw003839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 3 Jun 2017 20:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319554 - in head/sys/arm: conf freescale/vybrid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 20:14:48 -0000 Author: andrew Date: Sat Jun 3 20:14:46 2017 New Revision: 319554 URL: https://svnweb.freebsd.org/changeset/base/319554 Log: Port the Vybrid code to PLATFORM to help move it into GENERIC. Deleted: head/sys/arm/freescale/vybrid/vf_common.c Modified: head/sys/arm/conf/VYBRID head/sys/arm/freescale/vybrid/files.vybrid head/sys/arm/freescale/vybrid/vf_machdep.c Modified: head/sys/arm/conf/VYBRID ============================================================================== --- head/sys/arm/conf/VYBRID Sat Jun 3 20:02:12 2017 (r319553) +++ head/sys/arm/conf/VYBRID Sat Jun 3 20:14:46 2017 (r319554) @@ -25,6 +25,7 @@ include "../freescale/vybrid/std.vybrid" makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler +options PLATFORM # Platform based SoC #options NANDFS # NAND Filesystem #options SMP # Enable multiple cores Modified: head/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/files.vybrid Sat Jun 3 20:02:12 2017 (r319553) +++ head/sys/arm/freescale/vybrid/files.vybrid Sat Jun 3 20:14:46 2017 (r319554) @@ -3,7 +3,6 @@ kern/kern_clocksource.c standard arm/freescale/vybrid/vf_machdep.c standard -arm/freescale/vybrid/vf_common.c standard arm/freescale/vybrid/vf_ccm.c standard arm/freescale/vybrid/vf_anadig.c standard arm/freescale/vybrid/vf_iomuxc.c standard Modified: head/sys/arm/freescale/vybrid/vf_machdep.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_machdep.c Sat Jun 3 20:02:12 2017 (r319553) +++ head/sys/arm/freescale/vybrid/vf_machdep.c Sat Jun 3 20:14:46 2017 (r319554) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#include "opt_ddb.h" #include "opt_platform.h" #include @@ -32,46 +31,56 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include -#include +#include + #include -#include +#include #include +#include -vm_offset_t -platform_lastaddr(void) -{ +#include - return (devmap_lastaddr()); -} +#include "platform_if.h" -void -platform_probe_and_attach(void) +static int +vf_devmap_init(platform_t plat) { + devmap_add_entry(0x40000000, 0x100000); + + return (0); } -void -platform_gpio_init(void) +static void +vf_cpu_reset(platform_t plat) { + phandle_t src; + uint32_t paddr; + bus_addr_t vaddr; -} + if (src_swreset() == 0) + goto end; -void -platform_late_init(void) -{ + src = OF_finddevice("src"); + if ((src != 0) && (OF_getencprop(src, "reg", &paddr, sizeof(paddr))) > 0) { + if (bus_space_map(fdtbus_bs_tag, paddr, 0x10, 0, &vaddr) == 0) { + bus_space_write_4(fdtbus_bs_tag, vaddr, 0x00, SW_RST); + } + } +end: + while (1); } -int -platform_devmap_init(void) -{ +static platform_method_t vf_methods[] = { + PLATFORMMETHOD(platform_devmap_init, vf_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, vf_cpu_reset), - devmap_add_entry(0x40000000, 0x100000); + PLATFORMMETHOD_END, +}; - return (0); -} +FDT_PLATFORM_DEF(vf, "vybrid", 0, "freescale,vybrid", 0); From owner-svn-src-all@freebsd.org Sat Jun 3 20:39:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D36B4BF8B00; Sat, 3 Jun 2017 20:39:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D43E7D47F; Sat, 3 Jun 2017 20:39:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v53KdmvR012142; Sat, 3 Jun 2017 20:39:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53Kdmrd012141; Sat, 3 Jun 2017 20:39:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706032039.v53Kdmrd012141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 3 Jun 2017 20:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319555 - stable/11/usr.sbin/extattr/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 20:39:49 -0000 Author: ngie Date: Sat Jun 3 20:39:48 2017 New Revision: 319555 URL: https://svnweb.freebsd.org/changeset/base/319555 Log: MFC r316503,r316504,r316505: Approved by: re (gjb) r316503: Clean up trailing whitespace r316504: Clean up more trailing whitespace in the licensing tort that happened to be spaces, not tabs r316505: Don't assume NAME_MAX is 255 Query the filesystem limit via getconf(3) instead Modified: stable/11/usr.sbin/extattr/tests/extattr_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/extattr/tests/extattr_test.sh ============================================================================== --- stable/11/usr.sbin/extattr/tests/extattr_test.sh Sat Jun 3 20:14:46 2017 (r319554) +++ stable/11/usr.sbin/extattr/tests/extattr_test.sh Sat Jun 3 20:39:48 2017 (r319555) @@ -10,7 +10,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. -# +# # 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 @@ -36,7 +36,7 @@ bad_namespace_body() { setextattr badnamespace myattr X foo atf_check -s not-exit:0 -e match:"Invalid argument" \ lsextattr -q badnamespace foo -} +} atf_test_case hex hex_head() { @@ -48,7 +48,7 @@ hex_body() { atf_check -s exit:0 -o empty setextattr user myattr XYZ foo atf_check -s exit:0 -o inline:"58 59 5a\n" \ getextattr -qx user myattr foo -} +} atf_test_case hex_nonascii hex_nonascii_head() { @@ -62,7 +62,7 @@ hex_nonascii_body() { getextattr user myattr foo atf_check -s exit:0 -o inline:"20 30 40 55 66 70 81 a2 b3 ee ff\n" \ getextattr -qx user myattr foo -} +} atf_test_case long_name long_name_head() { @@ -70,10 +70,15 @@ long_name_head() { } long_name_body() { check_fs + + if ! NAME_MAX=$(getconf NAME_MAX .); then + atf_skip "Filesystem not reporting NAME_MAX; skipping testcase" + fi + # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208965 atf_expect_fail "BUG 208965 extattr(2) doesn't allow maxlen attr names" - ATTRNAME=`jot -b X -s "" 255 0` + ATTRNAME=`jot -b X -s "" $NAME_MAX 0` touch foo atf_check -s exit:0 -o empty setextattr user $ATTRNAME myvalue foo atf_check -s exit:0 -o inline:"${ATTRNAME}\n" lsextattr -q user foo @@ -81,7 +86,7 @@ long_name_body() { getextattr -q user ${ATTRNAME} foo atf_check -s exit:0 -o empty rmextattr user ${ATTRNAME} foo atf_check -s exit:0 -o empty lsextattr -q user foo -} +} atf_test_case loud loud_head() { @@ -99,7 +104,7 @@ loud_body() { printf "%s %s" $(getextattr user myattr foo) atf_check -s exit:0 -o empty rmextattr user myattr foo atf_check -s exit:0 -o inline:"foo" printf %s $(lsextattr user foo) -} +} atf_test_case noattrs noattrs_head() { @@ -109,7 +114,7 @@ noattrs_body() { check_fs touch foo atf_check -s exit:0 -o empty lsextattr -q user foo -} +} atf_test_case nonexistent_file nonexistent_file_head() { @@ -125,7 +130,7 @@ nonexistent_file_body() { getextattr user myattr foo atf_check -s exit:1 -e match:"No such file or directory" \ rmextattr user myattr foo -} +} atf_test_case null null_head() { @@ -136,7 +141,7 @@ null_body() { touch foo atf_check -s exit:0 -o empty setextattr -n user myattr myvalue foo atf_check -s exit:0 -o inline:"myvalue\0\n" getextattr -q user myattr foo -} +} atf_test_case one_user_attr one_user_attr_head() { @@ -150,7 +155,7 @@ one_user_attr_body() { atf_check -s exit:0 -o inline:"myvalue\n" getextattr -q user myattr foo atf_check -s exit:0 -o empty rmextattr user myattr foo atf_check -s exit:0 -o empty lsextattr -q user foo -} +} atf_test_case one_system_attr one_system_attr_head() { @@ -165,7 +170,7 @@ one_system_attr_body() { atf_check -s exit:0 -o inline:"myvalue\n" getextattr -q system myattr foo atf_check -s exit:0 -o empty rmextattr system myattr foo atf_check -s exit:0 -o empty lsextattr -q system foo -} +} atf_test_case stdin stdin_head() { @@ -179,7 +184,7 @@ stdin_body() { atf_check -s exit:0 -o inline:"myattr\n" lsextattr -q user foo getextattr -qq user myattr foo > outfile || atf_fail "getextattr failed" atf_check -s exit:0 cmp -s infile outfile -} +} atf_test_case stringify stringify_head() { @@ -191,7 +196,7 @@ stringify_body() { atf_check -s exit:0 -o empty setextattr user myattr "my value" foo atf_check -s exit:0 -o inline:"\"my\\\040value\"\n" \ getextattr -qs user myattr foo -} +} atf_test_case symlink symlink_head() { @@ -248,7 +253,7 @@ system_and_user_attrs_body() { atf_check -s exit:0 -o empty rmextattr system sysattr foo atf_check -s exit:0 -o empty lsextattr -q user foo atf_check -s exit:0 -o empty lsextattr -q system foo -} +} atf_test_case two_files two_files_head() { @@ -315,7 +320,7 @@ two_user_attrs_body() { atf_check -s exit:0 -o empty rmextattr user myattr2 foo atf_check -s exit:0 -o empty rmextattr user myattr1 foo atf_check -s exit:0 -o empty lsextattr -q user foo -} +} atf_test_case unprivileged_user_cannot_set_system_attr unprivileged_user_cannot_set_system_attr_head() { @@ -327,7 +332,7 @@ unprivileged_user_cannot_set_system_attr_body() { touch foo atf_check -s exit:1 -e match:"Operation not permitted" \ setextattr system myattr myvalue foo -} +} atf_init_test_cases() { From owner-svn-src-all@freebsd.org Sat Jun 3 20:49:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE795BF8D21; Sat, 3 Jun 2017 20:49:36 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e: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 A84FD7D8EF; Sat, 3 Jun 2017 20:49:36 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id v14so1820322pgn.1; Sat, 03 Jun 2017 13:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=nmdxQoe417gH4GFAdXORQanvX88Sh1U66uj/FiwmR/8=; b=JPljxPwFz+jKQJ50hYVh28xh+zB9k0Yl5JNOS34h30g427fTZQL0iFItMbIMhI+6H9 6+FgdDXevyJhYkGyYOVjM9Odm2nnbbFuEQqsPia8AeghbE7ziPwcwSevk+rHVGPT+4q2 Omd85z2DjJpvobU3wxCRBkNTcX191zNU34TGhuhsWK5s5MfdGflkflTvf5jx9ZGa0V4J LQJDN2lmVOVIzgepEQNWrGhvMvFzSDpVwzVBHq8ocZrVlhEQZGDWQslcOi+5VH5AwWON /CjkLD3/ziELwCJ9/peCIiFXsW2lgMouBPGlfk93+g8scn2i5APiDAoSEgwCyDiG8XIS v0Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=nmdxQoe417gH4GFAdXORQanvX88Sh1U66uj/FiwmR/8=; b=VnE7tvDQg+VdSDou9na+PXV2oCAKVMvn/Dl4OBJFT/54gZ1+KSKkwPlEF0YnHenvrs HW7AYDXPBCByZ9IKn5WpTDuA0wYmmqM7c6sWr5zmtMVWZ1kUIvcZSsew1XrRn+pRtrMl +kWvKvtIWffRu3TKxe5dnqNAb5szrKBJ5LKkO9kuaCzqP6ghAm7YRBCY9+AJJ+NCDvaV 7GOmcuGl7RZEQaemWyG5dQWLJYdbuAyI7XYmhUfltvpHC6sO5ZFXALjVjf8dmGcAhg1Q fpMbZWhvTRACuBn0Ma/UqMILRDS6n9MjSE9z+ynbaAwLE1DBzOBKMwfcWTFsgrL8neRT Lobg== X-Gm-Message-State: AODbwcBtn8lTaG/ndd86gc8u5LHVMnaKEW71sgOZVPvyq31DTDLAwTJ9 4pkbkqTU6LM93BRF2lc= X-Received: by 10.98.152.214 with SMTP id d83mr12992356pfk.7.1496522976001; Sat, 03 Jun 2017 13:49:36 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id d75sm49969634pfj.75.2017.06.03.13.49.34 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Jun 2017 13:49:35 -0700 (PDT) Subject: Re: svn commit: r318441 - in head/etc: . cron.d Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EBD02BC4-9A70-4AEA-8053-E39C7D35234E"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <1833775.llHFF7vaD6@ralph.baldwin.cx> Date: Sat, 3 Jun 2017 13:49:34 -0700 Cc: Baptiste Daroussin , rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Message-Id: <16687E47-B9A1-4386-BFCD-FB9E1F5C3D90@gmail.com> References: <201705180625.v4I6Pd9j062495@repo.freebsd.org> <20170518212429.rugl6vnv5d2b2hpb@ivaldir.net> <9570430.uB7Ojud3DG@ralph.baldwin.cx> <1833775.llHFF7vaD6@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 20:49:37 -0000 --Apple-Mail=_EBD02BC4-9A70-4AEA-8053-E39C7D35234E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 3, 2017, at 12:05, John Baldwin wrote: =E2=80=A6 > Ping? bapt@ agreed with this, but I haven't seen any other feedback? = If others > agree then we should either revert back to a single foo.conf or we = should fully > split newsyslog.conf and syslogd.conf out to individual files. Please, no. The single monolithic foo.conf idea may have made sense back = in the day, but with the various knobs that are available for building = the system, for ease-of-use/intuitiveness the feature makes sense. I planned on introducing more of these files for other areas of the = system that aren=E2=80=99t currently being handled=E2=80=94 like = bsnmpd=E2=80=99s logging, etc. I think the modularization makes sense. Thanks, -Ngie --Apple-Mail=_EBD02BC4-9A70-4AEA-8053-E39C7D35234E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZMyDeAAoJEPWDqSZpMIYVxEYP/0nEbnES1R/b0xtEULrJ+K1o S5Erc4KLAeVPIyambAHMC6CegZcUwTrEQyOa95zxO0OzywzaIsFaZFC3HbSmVgXf PNXYxc4+ZdSY9DBqsrRun+TlU+yZc5pv2E5PiMj+DapOdavrODZfKxemfK9QDq5i pfgNe1YoYlpzEZ3vlTFuH1oPRqFDvmJvM03yb6iuw/lFOwzP0xp+mly/UUGWUKiL eDjJviC1hLESkmW6PPDFabgkeBpLNU6H6C95LhnjLX+au6dJLDPHZTeCVgmftCLj Rcr/jya3Nytm56QR5JcJKf+80efhYGC8kUu6glXu9lNmwlBNLSU1aiOX3cL1uy0f xgbHkV/2TLtCo+JcpgKWa/en39DQ4Soj789F05wm9qOlQHzkbgRLdqTLSiadvJdl 1xHEjVBi7MHcppvxJWafP+hgTHnCRXmESBLOeWPLtDgGqkS6vrfBJioz3vyCuMxr xPKqjVtmtwqd+Ftaq8IcPMKftjmJzkeVTvJbj5mtNvEcc8Dx8WrbLR5AP9NY1R5/ bn1YcmkKt9fhOIvhoc3QJzHi7yhRgQa+KrLbQAi0WtqkMXhj8SGeXLBAzstFZZFL +AkBJKIGdSuYtSBqtqnHfobNcLZ/QY2x6XyDqUZZZBKofff4ZmF5RAhJGmxsYwgS gKhuNA5DscgOtxrrV6Vf =FgnK -----END PGP SIGNATURE----- --Apple-Mail=_EBD02BC4-9A70-4AEA-8053-E39C7D35234E-- From owner-svn-src-all@freebsd.org Sat Jun 3 21:53:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3ED6BF9B58; Sat, 3 Jun 2017 21:53:59 +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 A23DE7F271; Sat, 3 Jun 2017 21:53:59 +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 v53LrwpZ044031; Sat, 3 Jun 2017 21:53:58 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53LrwFP044028; Sat, 3 Jun 2017 21:53:58 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201706032153.v53LrwFP044028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 3 Jun 2017 21:53:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319556 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 21:53:59 -0000 Author: tuexen Date: Sat Jun 3 21:53:58 2017 New Revision: 319556 URL: https://svnweb.freebsd.org/changeset/base/319556 Log: Fix the ICMP6 handling for TCP. The ICMP6 packets might not be contained in a single mbuf. So don't assume this. Keep the IPv4 and IPv6 code in sync and make explicit that the syncache code only need the TCP sequence number, not the complete TCP header. MFC after: 3 days Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_syncache.h Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sat Jun 3 20:39:48 2017 (r319555) +++ head/sys/netinet/tcp_subr.c Sat Jun 3 21:53:58 2017 (r319556) @@ -1963,16 +1963,16 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip) if (inp != NULL && PRC_IS_REDIRECT(cmd)) { /* signal EHOSTDOWN, as it flushes the cached route */ inp = (*notify)(inp, EHOSTDOWN); - if (inp != NULL) - INP_WUNLOCK(inp); - } else if (inp != NULL) { + goto out; + } + icmp_tcp_seq = th->th_seq; + if (inp != NULL) { if (!(inp->inp_flags & INP_TIMEWAIT) && !(inp->inp_flags & INP_DROPPED) && !(inp->inp_socket == NULL)) { - icmp_tcp_seq = ntohl(th->th_seq); tp = intotcpcb(inp); - if (SEQ_GEQ(icmp_tcp_seq, tp->snd_una) && - SEQ_LT(icmp_tcp_seq, tp->snd_max)) { + if (SEQ_GEQ(ntohl(icmp_tcp_seq), tp->snd_una) && + SEQ_LT(ntohl(icmp_tcp_seq), tp->snd_max)) { if (cmd == PRC_MSGSIZE) { /* * MTU discovery: @@ -1980,7 +1980,7 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip) * in the route to the suggested new * value (if given) and then notify. */ - mtu = ntohs(icp->icmp_nextmtu); + mtu = ntohs(icp->icmp_nextmtu); /* * If no alternative MTU was * proposed, try the next smaller @@ -2011,16 +2011,17 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip) inetctlerrmap[cmd]); } } - if (inp != NULL) - INP_WUNLOCK(inp); } else { bzero(&inc, sizeof(inc)); inc.inc_fport = th->th_dport; inc.inc_lport = th->th_sport; inc.inc_faddr = faddr; inc.inc_laddr = ip->ip_src; - syncache_unreach(&inc, th); + syncache_unreach(&inc, icmp_tcp_seq); } +out: + if (inp != NULL) + INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); } #endif /* INET */ @@ -2030,7 +2031,6 @@ void tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) { struct in6_addr *dst; - struct tcphdr *th; struct inpcb *(*notify)(struct inpcb *, int) = tcp_notify; struct ip6_hdr *ip6; struct mbuf *m; @@ -2040,11 +2040,14 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) struct ip6ctlparam *ip6cp = NULL; const struct sockaddr_in6 *sa6_src = NULL; struct in_conninfo inc; + struct tcp_ports { + uint16_t th_sport; + uint16_t th_dport; + } t_ports; tcp_seq icmp_tcp_seq; unsigned int mtu; unsigned int off; - if (sa->sa_family != AF_INET6 || sa->sa_len != sizeof(struct sockaddr_in6)) return; @@ -2093,27 +2096,31 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) /* Check if we can safely get the ports from the tcp hdr */ if (m == NULL || (m->m_pkthdr.len < - (int32_t) (off + offsetof(struct tcphdr, th_seq)))) { + (int32_t) (off + sizeof(struct tcp_ports)))) { return; } - - th = (struct tcphdr *) mtodo(ip6cp->ip6c_m, ip6cp->ip6c_off); + bzero(&t_ports, sizeof(struct tcp_ports)); + m_copydata(m, off, sizeof(struct tcp_ports), (caddr_t)&t_ports); INP_INFO_RLOCK(&V_tcbinfo); - inp = in6_pcblookup(&V_tcbinfo, &ip6->ip6_dst, th->th_dport, - &ip6->ip6_src, th->th_sport, INPLOOKUP_WLOCKPCB, NULL); + inp = in6_pcblookup(&V_tcbinfo, &ip6->ip6_dst, t_ports.th_dport, + &ip6->ip6_src, t_ports.th_sport, INPLOOKUP_WLOCKPCB, NULL); if (inp != NULL && PRC_IS_REDIRECT(cmd)) { /* signal EHOSTDOWN, as it flushes the cached route */ inp = (*notify)(inp, EHOSTDOWN); - if (inp != NULL) - INP_WUNLOCK(inp); - } else if (inp != NULL) { + goto out; + } + off += sizeof(struct tcp_ports); + if (m->m_pkthdr.len < (int32_t) (off + sizeof(tcp_seq))) { + goto out; + } + m_copydata(m, off, sizeof(tcp_seq), (caddr_t)&icmp_tcp_seq); + if (inp != NULL) { if (!(inp->inp_flags & INP_TIMEWAIT) && !(inp->inp_flags & INP_DROPPED) && !(inp->inp_socket == NULL)) { - icmp_tcp_seq = ntohl(th->th_seq); tp = intotcpcb(inp); - if (SEQ_GEQ(icmp_tcp_seq, tp->snd_una) && - SEQ_LT(icmp_tcp_seq, tp->snd_max)) { + if (SEQ_GEQ(ntohl(icmp_tcp_seq), tp->snd_una) && + SEQ_LT(ntohl(icmp_tcp_seq), tp->snd_max)) { if (cmd == PRC_MSGSIZE) { /* * MTU discovery: @@ -2130,22 +2137,20 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) */ if (mtu < IPV6_MMTU) mtu = IPV6_MMTU - 8; - - bzero(&inc, sizeof(inc)); inc.inc_fibnum = M_GETFIB(m); inc.inc_flags |= INC_ISIPV6; inc.inc6_faddr = *dst; if (in6_setscope(&inc.inc6_faddr, m->m_pkthdr.rcvif, NULL)) - goto unlock_inp; - + goto out; /* * Only process the offered MTU if it * is smaller than the current one. */ if (mtu < tp->t_maxseg + - (sizeof (*th) + sizeof (*ip6))) { + sizeof (struct tcphdr) + + sizeof (struct ip6_hdr)) { tcp_hc_updatemtu(&inc, mtu); tcp_mtudisc(inp, mtu); ICMP6STAT_INC(icp6s_pmtuchg); @@ -2155,19 +2160,19 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) inet6ctlerrmap[cmd]); } } -unlock_inp: - if (inp != NULL) - INP_WUNLOCK(inp); } else { bzero(&inc, sizeof(inc)); inc.inc_fibnum = M_GETFIB(m); inc.inc_flags |= INC_ISIPV6; - inc.inc_fport = th->th_dport; - inc.inc_lport = th->th_sport; + inc.inc_fport = t_ports.th_dport; + inc.inc_lport = t_ports.th_sport; inc.inc6_faddr = *dst; inc.inc6_laddr = ip6->ip6_src; - syncache_unreach(&inc, th); + syncache_unreach(&inc, icmp_tcp_seq); } +out: + if (inp != NULL) + INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); } #endif /* INET6 */ Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Sat Jun 3 20:39:48 2017 (r319555) +++ head/sys/netinet/tcp_syncache.c Sat Jun 3 21:53:58 2017 (r319556) @@ -602,7 +602,7 @@ syncache_badack(struct in_conninfo *inc) } void -syncache_unreach(struct in_conninfo *inc, struct tcphdr *th) +syncache_unreach(struct in_conninfo *inc, tcp_seq th_seq) { struct syncache *sc; struct syncache_head *sch; @@ -613,7 +613,7 @@ syncache_unreach(struct in_conninfo *inc, struct tcphd goto done; /* If the sequence number != sc_iss, then it's a bogus ICMP msg */ - if (ntohl(th->th_seq) != sc->sc_iss) + if (ntohl(th_seq) != sc->sc_iss) goto done; /* Modified: head/sys/netinet/tcp_syncache.h ============================================================================== --- head/sys/netinet/tcp_syncache.h Sat Jun 3 20:39:48 2017 (r319555) +++ head/sys/netinet/tcp_syncache.h Sat Jun 3 21:53:58 2017 (r319556) @@ -38,7 +38,7 @@ void syncache_init(void); #ifdef VIMAGE void syncache_destroy(void); #endif -void syncache_unreach(struct in_conninfo *, struct tcphdr *); +void syncache_unreach(struct in_conninfo *, tcp_seq); int syncache_expand(struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct socket **, struct mbuf *); int syncache_add(struct in_conninfo *, struct tcpopt *, From owner-svn-src-all@freebsd.org Sat Jun 3 22:30:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0A71BFA190; Sat, 3 Jun 2017 22:30:31 +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 BC1E77FE1E; Sat, 3 Jun 2017 22:30:31 +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 v53MUUCu056537; Sat, 3 Jun 2017 22:30:30 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53MUUAB056536; Sat, 3 Jun 2017 22:30:30 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201706032230.v53MUUAB056536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 3 Jun 2017 22:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319557 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 22:30:32 -0000 Author: cem Date: Sat Jun 3 22:30:30 2017 New Revision: 319557 URL: https://svnweb.freebsd.org/changeset/base/319557 Log: ext2fs(4): Fix a number of broken flag checks Introduced in r319071. Reported by: Coverity CIDs: 1375847, 1375848, 1375849 Sponsored by: Dell EMC Isilon Modified: head/sys/fs/ext2fs/ext2_acl.c Modified: head/sys/fs/ext2fs/ext2_acl.c ============================================================================== --- head/sys/fs/ext2fs/ext2_acl.c Sat Jun 3 21:53:58 2017 (r319556) +++ head/sys/fs/ext2fs/ext2_acl.c Sat Jun 3 22:30:30 2017 (r319557) @@ -276,7 +276,7 @@ ext2_getacl(struct vop_getacl_args *ap) { if (((ap->a_vp->v_mount->mnt_flag & MNT_ACLS) == 0) || - ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) == 1)) + ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) != 0)) return (EOPNOTSUPP); if (ap->a_type == ACL_TYPE_NFS4) @@ -473,7 +473,7 @@ int ext2_setacl(struct vop_setacl_args *ap) { if (((ap->a_vp->v_mount->mnt_flag & MNT_ACLS) == 0) || - ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) == 1)) + ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) != 0)) return (EOPNOTSUPP); if (ap->a_type == ACL_TYPE_NFS4) @@ -490,7 +490,7 @@ ext2_aclcheck(struct vop_aclcheck_args *ap) { if (((ap->a_vp->v_mount->mnt_flag & MNT_ACLS) == 0) || - ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) == 1)) + ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) != 0)) return (EOPNOTSUPP); if (ap->a_type == ACL_TYPE_NFS4) From owner-svn-src-all@freebsd.org Sat Jun 3 22:39:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16F0FBFA3EC; Sat, 3 Jun 2017 22:39:52 +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 D196C80234; Sat, 3 Jun 2017 22:39:51 +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 v53Mdott060469; Sat, 3 Jun 2017 22:39:50 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53Mdo5q060468; Sat, 3 Jun 2017 22:39:50 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201706032239.v53Mdo5q060468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 3 Jun 2017 22:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319558 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 22:39:52 -0000 Author: cem Date: Sat Jun 3 22:39:50 2017 New Revision: 319558 URL: https://svnweb.freebsd.org/changeset/base/319558 Log: ext2fs(4): Fix a null dererence and clean an unclear switch Coverity warned that the switch statement fell through. While this was intentional, the pattern wasn't especially clear. I just changed it to a conventional if pattern. Reported by: Coverity CIDs: 1375851 (false positive), 1375853 Sponsored by: Dell EMC Isilon Modified: head/sys/fs/ext2fs/ext2_acl.c Modified: head/sys/fs/ext2fs/ext2_acl.c ============================================================================== --- head/sys/fs/ext2fs/ext2_acl.c Sat Jun 3 22:30:30 2017 (r319557) +++ head/sys/fs/ext2fs/ext2_acl.c Sat Jun 3 22:39:50 2017 (r319558) @@ -127,13 +127,18 @@ ext2_sync_inode_from_acl(struct acl *acl, struct inode static int ext4_acl_from_disk(char *value, size_t size, struct acl *acl) { - const char *end = value + size; + const char *end; int n, count, s; + if (value == NULL) + return (EINVAL); + + end = value + size; + if (((struct ext2_acl_header *)value)->a_version != EXT4_ACL_VERSION) return (EINVAL); - if (!value || size < sizeof(struct ext2_acl_header)) + if (size < sizeof(struct ext2_acl_header)) return (EINVAL); s = size - sizeof(struct ext2_acl_header); @@ -230,8 +235,7 @@ ext2_getacl_posix1e(struct vop_getacl_args *ap) error = vn_extattr_get(ap->a_vp, IO_NODELOCKED, attrnamespace, attrname, &len, value, ap->a_td); - switch (error) { - case ENOATTR: + if (error == ENOATTR) { switch (ap->a_type) { case ACL_TYPE_ACCESS: ap->a_aclp->acl_cnt = 3; @@ -250,21 +254,20 @@ ext2_getacl_posix1e(struct vop_getacl_args *ap) ap->a_aclp->acl_cnt = 0; break; } - case 0: - if (!error) { - error = ext4_acl_from_disk(value, len, ap->a_aclp); - if (error) - goto out; - } + } else if (error != 0) + goto out; - if (error == ENOATTR) - error = 0; - - if (ap->a_type == ACL_TYPE_ACCESS) - ext2_sync_acl_from_inode(VTOI(ap->a_vp), ap->a_aclp); - default: - break; + if (!error) { + error = ext4_acl_from_disk(value, len, ap->a_aclp); + if (error) + goto out; } + + if (error == ENOATTR) + error = 0; + + if (ap->a_type == ACL_TYPE_ACCESS) + ext2_sync_acl_from_inode(VTOI(ap->a_vp), ap->a_aclp); out: free(value, M_TEMP); From owner-svn-src-all@freebsd.org Sat Jun 3 22:54:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60F88BFA78C; Sat, 3 Jun 2017 22:54:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (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 2160380904; Sat, 3 Jun 2017 22:54:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id f27so16493233pfe.0; Sat, 03 Jun 2017 15:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Bv1ogT90RuC+xirZVXkDvQDpzJvonn1wDJGSjENaNZc=; b=K11CUy7uOEnvD4Q7hdsC+1W1jW1jIYfN5/0bC0HsQS0WpCeHHjQF6BDXjtceFbQE8v oOC9odzDaDfmuIfgmFosRaWswIYLp9Sumq/q5A1dAqrAhvN1+GQy0Qf3Xt82G43jYZLc KLD+hyX9IZRn8wYR2ImiOrbqlPdCj/geFe/RdibcYcRQfm/pXE+bD3ke6pQLnACpcKPN tlrwELmV6zripr9Xh+sevM4GLvzbduCoErwLyqJqvqwZlGaLCtjf/wE5GRkHdyWePrmt LY1clhoW6lmqffMOcCWDLYSgvx+8QSVRyST7DIXy6grfjYRwWGtXwa7xFx/1p3lYqipo yj4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Bv1ogT90RuC+xirZVXkDvQDpzJvonn1wDJGSjENaNZc=; b=gWKBiTWBdO1r1sFs37Px9orLXiWvPJ6nbuDDh0sH3bE5jWzXRhzRbdOwNZvNm0JKXY JX/R12J5S1qOXZJp+vT/CZOmRv/UcWRuTihh5RVjmr406hTmAaZn+f1MIC5qYaMNluc8 SoHpDpyA3FKmYy3/cAPhItm7TTxrxg31Aaq64na4/3dqDLvi9zV1cuvDof34LZRnl6Cf Qlhc2USlLODzHqxRCMYvJwZiC9mVVsbOcn1WIcHW9V+rxt+7DkDj3nPKTSIs230ZCD9j 1OX5XIATV5GTHY9hn33OMxpAk0zlwrR4YVk0mTFdcNzvV7C39q7HntFOPQK1Zk8HMX1x uiLA== X-Gm-Message-State: AODbwcDxRN2ABLoGJgsiaKTvNfmE71N0bgeYE5khfPxpPRGqulVIIDos E4GHsqyn4hA6r1sL8ZY= X-Received: by 10.99.116.7 with SMTP id p7mr13595796pgc.162.1496530497521; Sat, 03 Jun 2017 15:54:57 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id f1sm40906041pgc.8.2017.06.03.15.54.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Jun 2017 15:54:56 -0700 (PDT) Subject: Re: svn commit: r319557 - head/sys/fs/ext2fs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1D3E8610-C022-4EFD-9E5A-1FE1DCE071B2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201706032230.v53MUUAB056536@repo.freebsd.org> Date: Sat, 3 Jun 2017 15:54:55 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Pedro Giffuni Message-Id: <25EB123A-EAF7-4ADD-8834-93C2618315B6@gmail.com> References: <201706032230.v53MUUAB056536@repo.freebsd.org> To: Conrad Meyer X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 22:54:58 -0000 --Apple-Mail=_1D3E8610-C022-4EFD-9E5A-1FE1DCE071B2 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jun 3, 2017, at 15:30, Conrad Meyer wrote: > > Author: cem > Date: Sat Jun 3 22:30:30 2017 > New Revision: 319557 > URL: https://svnweb.freebsd.org/changeset/base/319557 > > Log: > ext2fs(4): Fix a number of broken flag checks > > Introduced in r319071. > > Reported by: Coverity > CIDs: 1375847, 1375848, 1375849 > Sponsored by: Dell EMC Isilon Did pjg review this? -Ngie --Apple-Mail=_1D3E8610-C022-4EFD-9E5A-1FE1DCE071B2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZMz4/AAoJEPWDqSZpMIYV2Q4P/347qtY1TQSHp1aVe/3NAmmg md/oSGKbf0O7z23jqhxqLFZ7HiZ95igvkxpprBIbsl2+Bdv47Xb7KMBos9C18V2M Ndxaw4O68uSOM94Qs4yhDX0mof6/pSWMkTy+RXdsrePwVY0QCJRXx/glCXmMOkJ1 VaAvlBbPJkVcwmxUV3vqJ7xHYEp9uAQeShEx9QQ47xNdACK4k5+Yy3LSuJ3AQELE BftJ++KFZB4oi+tQafpegAsuOgo3hdneXwMkepdVo+KhDNYKCRbyzrgAPAem+chB I1PLff8WKTeo9o1YHXjhQgulsZkutHmIhN3Iv+Urg72GA/kgkk3dCDE0UIDcs7vV vk0mOQ55HoT2HPjvDEJLDek9crWdk8uhTLUzGwQsgm7UIRv0ges509pS4jTDb/0S 2vcboEvH4oXUFMK4sWJCWwx2W4oa0cm+L3voAEuSP0h5a3gc7W7yy6Nyt43OR2On 0UM5WyMtVUdAAnin6HwbBmQGureU0S/02kzIAMTEsrPwv5Lx2rfZaodkvKldpINT aeawjzTS6P11f3eCEP8ozS5ocA32yzYme3oJV7Pm/aCDpH3qm4zPfbf26b/cDjaR U4InVq+TGGUGs0YpluW9DEmAA74oylFu8jeyd7r+wT9C8HbXebdtXZaTArNPPWlb mS03+odhEuXZ+VmyG22h =8kdk -----END PGP SIGNATURE----- --Apple-Mail=_1D3E8610-C022-4EFD-9E5A-1FE1DCE071B2-- From owner-svn-src-all@freebsd.org Sat Jun 3 23:13:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA133BFAB40; Sat, 3 Jun 2017 23:13:47 +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 A298080F51; Sat, 3 Jun 2017 23:13:47 +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 v53NDkFB076155; Sat, 3 Jun 2017 23:13:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v53NDkWr076154; Sat, 3 Jun 2017 23:13:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706032313.v53NDkWr076154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 3 Jun 2017 23:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319559 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 23:13:48 -0000 Author: bdrewery Date: Sat Jun 3 23:13:46 2017 New Revision: 319559 URL: https://svnweb.freebsd.org/changeset/base/319559 Log: native-xtools: Connect makewhatis. This speeds up some port staging, namely perl. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jun 3 22:39:50 2017 (r319558) +++ head/Makefile.inc1 Sat Jun 3 23:13:46 2017 (r319559) @@ -1964,7 +1964,7 @@ NXBMAKE= ${NXBENV} ${MAKE} \ MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \ MK_GDB=no MK_TESTS=no \ SSP_CFLAGS= \ - MK_HTML=no NO_LINT=yes MK_MAN=no \ + MK_HTML=no NO_LINT=yes MK_MAN=no MK_MAN_UTILS=yes \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ @@ -2038,6 +2038,8 @@ native-xtools: .PHONY usr.bin/lex \ usr.bin/limits \ usr.bin/lorder \ + ${_libopenbsd} \ + ${_makewhatis} \ usr.bin/mktemp \ usr.bin/mt \ usr.bin/patch \