From owner-svn-src-head@freebsd.org Sun Jun 12 11:13:39 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E121AF0811; Sun, 12 Jun 2016 11:13:39 +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 0F6922FAD; Sun, 12 Jun 2016 11:13:38 +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 u5CBDcSu036535; Sun, 12 Jun 2016 11:13:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5CBDceu036534; Sun, 12 Jun 2016 11:13:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606121113.u5CBDceu036534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 12 Jun 2016 11:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301838 - head/sys/compat/linprocfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2016 11:13:39 -0000 Author: kib Date: Sun Jun 12 11:13:38 2016 New Revision: 301838 URL: https://svnweb.freebsd.org/changeset/base/301838 Log: swap_dev_info() does not require Giant, so Giant locking around the loop in linprocfs_doswaps() is useless. List of the registered filesystems is protected by vfsconf_sx, not by the Giant. Adjust linprocfs_dofilesystems() correspondingly. Approved by: re (delphij), des (linprocfs maintainer) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sun Jun 12 08:32:39 2016 (r301837) +++ head/sys/compat/linprocfs/linprocfs.c Sun Jun 12 11:13:38 2016 (r301838) @@ -490,7 +490,6 @@ linprocfs_doswaps(PFS_FILL_ARGS) char devname[SPECNAMELEN + 1]; sbuf_printf(sb, "Filename\t\t\t\tType\t\tSize\tUsed\tPriority\n"); - mtx_lock(&Giant); for (n = 0; ; n++) { if (swap_dev_info(n, &xsw, devname, sizeof(devname)) != 0) break; @@ -504,7 +503,6 @@ linprocfs_doswaps(PFS_FILL_ARGS) sbuf_printf(sb, "/dev/%-34s unknown\t\t%jd\t%jd\t-1\n", devname, total, used); } - mtx_unlock(&Giant); return (0); } @@ -1326,13 +1324,13 @@ linprocfs_dofilesystems(PFS_FILL_ARGS) { struct vfsconf *vfsp; - mtx_lock(&Giant); + vfsconf_slock(); TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { if (vfsp->vfc_flags & VFCF_SYNTHETIC) sbuf_printf(sb, "nodev"); sbuf_printf(sb, "\t%s\n", vfsp->vfc_name); } - mtx_unlock(&Giant); + vfsconf_sunlock(); return(0); } From owner-svn-src-head@freebsd.org Sun Jun 12 20:02:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D009AAF1F1C; Sun, 12 Jun 2016 20:02:38 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98CF72F8C; Sun, 12 Jun 2016 20:02:38 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPS id 2FD3E101035; Sun, 12 Jun 2016 22:02:35 +0200 (CEST) Subject: Re: svn commit: r300943 - in head: . lib/libc++ lib/libcxxrt share/mk To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201605290620.u4T6KFjT002312@repo.freebsd.org> From: Andreas Tobler Message-ID: Date: Sun, 12 Jun 2016 22:02:34 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <201605290620.u4T6KFjT002312@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.73 on 127.0.1.1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2016 20:02:38 -0000 Hi Bryan, On 29.05.16 08:20, Bryan Drewery wrote: > Author: bdrewery > Date: Sun May 29 06:20:15 2016 > New Revision: 300943 > URL: https://svnweb.freebsd.org/changeset/base/300943 > > Log: > GCC External: Revert r300886, r300904, r300917, r300918 > > The fix in r300873 is mostly enough. A fix for lib32 will be > committed.separately. Did this commit already happen? I still suffer a broken buildworld on powerpc64 for 32-bit with internal tools. Unknown option -std=c++11... Thanks, Andreas From owner-svn-src-head@freebsd.org Sun Jun 12 22:55:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BAF6AF0385; Sun, 12 Jun 2016 22:55:52 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C84F121D8; Sun, 12 Jun 2016 22:55:51 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5CMtp1o095913; Sun, 12 Jun 2016 22:55:51 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5CMtoIB095911; Sun, 12 Jun 2016 22:55:50 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201606122255.u5CMtoIB095911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Sun, 12 Jun 2016 22:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301841 - head/sys/dev/dwc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2016 22:55:52 -0000 Author: jmcneill Date: Sun Jun 12 22:55:50 2016 New Revision: 301841 URL: https://svnweb.freebsd.org/changeset/base/301841 Log: Fix an issue with multicast hash filters on Amlogic and Allwinner boards. For DWC_GMAC_ALT_DESC implementations, the multicast hash table has only 64 entries. Instead of 8 registers starting at 0x500, a pair of registers at 0x08 and 0x0c are used instead. Approved by: re (hrs) Submitted by: Guy Yur Modified: head/sys/dev/dwc/if_dwc.c head/sys/dev/dwc/if_dwc.h Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Sun Jun 12 15:37:35 2016 (r301840) +++ head/sys/dev/dwc/if_dwc.c Sun Jun 12 22:55:50 2016 (r301841) @@ -587,14 +587,13 @@ dwc_setup_rxfilter(struct dwc_softc *sc) struct ifmultiaddr *ifma; struct ifnet *ifp; uint8_t *eaddr, val; - uint32_t crc, ffval, hashbit, hashreg, hi, lo, hash[8], hmask; + uint32_t crc, ffval, hashbit, hashreg, hi, lo, hash[8]; int nhash, i; DWC_ASSERT_LOCKED(sc); ifp = sc->ifp; nhash = sc->mactype == DWC_GMAC_ALT_DESC ? 2 : 8; - hmask = ((nhash << 5) - 1) | 0xf; /* * Set the multicast (group) filter hash. @@ -615,11 +614,10 @@ dwc_setup_rxfilter(struct dwc_softc *sc) ifma->ifma_addr), ETHER_ADDR_LEN); /* Take lower 8 bits and reverse it */ - val = bitreverse(~crc & 0xff) & hmask; + val = bitreverse(~crc & 0xff); if (sc->mactype == DWC_GMAC_ALT_DESC) - hashreg = (val >> 5) == 0; - else - hashreg = (val >> 5); + val >>= nhash; /* Only need lower 6 bits */ + hashreg = (val >> 5); hashbit = (val & 31); hash[hashreg] |= (1 << hashbit); } @@ -642,8 +640,13 @@ dwc_setup_rxfilter(struct dwc_softc *sc) WRITE4(sc, MAC_ADDRESS_LOW(0), lo); WRITE4(sc, MAC_ADDRESS_HIGH(0), hi); WRITE4(sc, MAC_FRAME_FILTER, ffval); - for (i = 0; i < nhash; i++) - WRITE4(sc, HASH_TABLE_REG(i), hash[i]); + if (sc->mactype == DWC_GMAC_ALT_DESC) { + WRITE4(sc, GMAC_MAC_HTLOW, hash[0]); + WRITE4(sc, GMAC_MAC_HTHIGH, hash[1]); + } else { + for (i = 0; i < nhash; i++) + WRITE4(sc, HASH_TABLE_REG(i), hash[i]); + } } static int Modified: head/sys/dev/dwc/if_dwc.h ============================================================================== --- head/sys/dev/dwc/if_dwc.h Sun Jun 12 15:37:35 2016 (r301840) +++ head/sys/dev/dwc/if_dwc.h Sun Jun 12 22:55:50 2016 (r301841) @@ -53,6 +53,8 @@ #define FRAME_FILTER_HMC (1 << 2) #define FRAME_FILTER_HUC (1 << 1) #define FRAME_FILTER_PR (1 << 0) /* All Incoming Frames */ +#define GMAC_MAC_HTHIGH 0x08 +#define GMAC_MAC_HTLOW 0x0c #define GMII_ADDRESS 0x10 #define GMII_ADDRESS_PA_MASK 0x1f /* Phy device */ #define GMII_ADDRESS_PA_SHIFT 11 From owner-svn-src-head@freebsd.org Sun Jun 12 23:26:39 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E53AAF0998; Sun, 12 Jun 2016 23:26:39 +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 1DB672BA5; Sun, 12 Jun 2016 23:26:39 +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 u5CNQc0a006849; Sun, 12 Jun 2016 23:26:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5CNQcPU006848; Sun, 12 Jun 2016 23:26:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201606122326.u5CNQcPU006848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 12 Jun 2016 23:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301842 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2016 23:26:39 -0000 Author: hselasky Date: Sun Jun 12 23:26:38 2016 New Revision: 301842 URL: https://svnweb.freebsd.org/changeset/base/301842 Log: Implement code to stop all USB endpoints before executing a USB device reset command, alternate setting command or set configuration command. Else LibUSB v1.0 will not re-open the endpoints which the kernel closes and the USB application might wait infinitely for transfers to complete. Approved by: re (hrs) MFC after: 3 days Modified: head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Sun Jun 12 22:55:50 2016 (r301841) +++ head/lib/libusb/libusb10.c Sun Jun 12 23:26:38 2016 (r301842) @@ -51,6 +51,8 @@ #include "libusb.h" #include "libusb10.h" +#define LIBUSB_NUM_SW_ENDPOINTS (16 * 4) + static pthread_mutex_t default_context_lock = PTHREAD_MUTEX_INITIALIZER; struct libusb_context *usbi_default_context = NULL; @@ -442,7 +444,7 @@ libusb_open(libusb_device *dev, libusb_d if (dev == NULL) return (LIBUSB_ERROR_INVALID_PARAM); - err = libusb20_dev_open(pdev, 16 * 4 /* number of endpoints */ ); + err = libusb20_dev_open(pdev, LIBUSB_NUM_SW_ENDPOINTS); if (err) { libusb_unref_device(dev); return (LIBUSB_ERROR_NO_MEM); @@ -1482,7 +1484,17 @@ libusb_cancel_transfer(struct libusb_tra UNEXPORTED void libusb10_cancel_all_transfer(libusb_device *dev) { - /* TODO */ + struct libusb20_device *pdev = dev->os_priv; + unsigned x; + + for (x = 0; x != LIBUSB_NUM_SW_ENDPOINTS; x++) { + struct libusb20_transfer *xfer; + + xfer = libusb20_tr_get_pointer(pdev, x); + if (xfer == NULL) + continue; + libusb20_tr_close(xfer); + } } uint16_t From owner-svn-src-head@freebsd.org Sun Jun 12 23:34:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B4C3AF0B17; Sun, 12 Jun 2016 23:34:50 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E14942F47; Sun, 12 Jun 2016 23:34:49 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5CNYnUA010446; Sun, 12 Jun 2016 23:34:49 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5CNYn1w010445; Sun, 12 Jun 2016 23:34:49 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201606122334.u5CNYn1w010445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Sun, 12 Jun 2016 23:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301843 - head/contrib/blacklist/libexec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2016 23:34:50 -0000 Author: lidl Date: Sun Jun 12 23:34:48 2016 New Revision: 301843 URL: https://svnweb.freebsd.org/changeset/base/301843 Log: Add ipfilter support to blacklistd-helper In addition to adding initial support for the ipfilter packet filtering system, wrap a few long lines, perform whitespace cleanup and sync with upstream changes made in NetBSD. Submitted by: cy Reviewed by: cy Approved by: re (hrs) Relnotes: YES Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6823 Modified: head/contrib/blacklist/libexec/blacklistd-helper Modified: head/contrib/blacklist/libexec/blacklistd-helper ============================================================================== --- head/contrib/blacklist/libexec/blacklistd-helper Sun Jun 12 23:26:38 2016 (r301842) +++ head/contrib/blacklist/libexec/blacklistd-helper Sun Jun 12 23:34:48 2016 (r301843) @@ -10,12 +10,6 @@ # $7 id pf= -for f in npf pf; do - if [ -f "/etc/$f.conf" ]; then - pf="$f" - break - fi -done if [ -f "/etc/ipfw-blacklist.rc" ]; then pf="ipfw" . /etc/ipfw-blacklist.rc @@ -23,6 +17,15 @@ if [ -f "/etc/ipfw-blacklist.rc" ]; then fi if [ -z "$pf" ]; then + for f in npf pf ipf; do + if [ -f "/etc/$f.conf" ]; then + pf="$f" + break + fi + done +fi + +if [ -z "$pf" ]; then echo "$0: Unsupported packet filter" 1>&2 exit 1 fi @@ -48,12 +51,20 @@ esac case "$1" in add) case "$pf" in + ipf) + /sbin/ipfstat -io | /sbin/ipf -I -f - >/dev/null 2>&1 + echo block in quick $proto from $addr/$mask to \ + any port=$6 head port$6 | \ + /sbin/ipf -I -f - -s >/dev/null 2>&1 + ;; ipfw) - rule=$(( $ipfw_offset + $6 )) # use $ipfw_offset+$port for rule number + # use $ipfw_offset+$port for rule number + rule=$(($ipfw_offset + $6)) tname="port$6" /sbin/ipfw table $tname create type addr 2>/dev/null /sbin/ipfw -q table $tname add "$addr/$mask" - /sbin/ipfw -q add $rule drop $3 from "table("$tname")" to any dst-port $6 + /sbin/ipfw -q add $rule drop $3 from "table("$tname")" to \ + any dst-port $6 ;; npf) /sbin/npfctl rule "$2" add block in final $proto from \ @@ -69,6 +80,12 @@ add) ;; rem) case "$pf" in + ipf) + /sbin/ipfstat -io | /sbin/ipf -I -f - >/dev/null 2>&1 + echo block in quick $proto from $addr/$mask to \ + any port=$6 head port$6 | \ + /sbin/ipf -I -r -f - -s >/dev/null 2>&1 + ;; ipfw) /sbin/ipfw table "port$6" delete "$addr/$mask" 2>/dev/null ;; @@ -81,7 +98,10 @@ rem) esac ;; flush) - case "$pf" in + case "$pf" in + ipf) + /sbin/ipf -Z -I -Fi -s > /dev/null + ;; ipfw) /sbin/ipfw table "port$6" flush 2>/dev/null ;; From owner-svn-src-head@freebsd.org Mon Jun 13 00:03:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C57FAF1393; Mon, 13 Jun 2016 00:03:56 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2E3E29D3; Mon, 13 Jun 2016 00:03:55 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5D03tUI021132; Mon, 13 Jun 2016 00:03:55 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5D03txm021131; Mon, 13 Jun 2016 00:03:55 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201606130003.u5D03txm021131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Mon, 13 Jun 2016 00:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301844 - head/lib/libcasper/libcasper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 00:03:56 -0000 Author: oshogbo Date: Mon Jun 13 00:03:55 2016 New Revision: 301844 URL: https://svnweb.freebsd.org/changeset/base/301844 Log: Don't close fd if it's lower then stderr, otherwise we can close one of the descriptor which we just set. Pointed out by: jilles Approved by: re (hrs) Modified: head/lib/libcasper/libcasper/service.c Modified: head/lib/libcasper/libcasper/service.c ============================================================================== --- head/lib/libcasper/libcasper/service.c Sun Jun 12 23:34:48 2016 (r301843) +++ head/lib/libcasper/libcasper/service.c Mon Jun 13 00:03:55 2016 (r301844) @@ -360,7 +360,8 @@ stdnull(void) if (dup2(fd, STDERR_FILENO) == -1) errx(1, "Unable to cover stderr"); - close(fd); + if (fd > STDERR_FILENO) + close(fd); } static void From owner-svn-src-head@freebsd.org Mon Jun 13 00:13:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5454AF15BA; Mon, 13 Jun 2016 00:13:21 +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 7DF9A2DCC; Mon, 13 Jun 2016 00:13:21 +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 u5D0DKOa025104; Mon, 13 Jun 2016 00:13:20 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5D0DKuX025102; Mon, 13 Jun 2016 00:13:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201606130013.u5D0DKuX025102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 13 Jun 2016 00:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301845 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 00:13:21 -0000 Author: adrian Date: Mon Jun 13 00:13:20 2016 New Revision: 301845 URL: https://svnweb.freebsd.org/changeset/base/301845 Log: [iwm] Fix up busdma use in the RX path When allocating a new mbuf or bus_dmamap_load()-ing it fails, we can just keep the old mbuf since we are dropping that packet anyway. Instead of doing bus_dmamap_create() and bus_dmamap_destroy() all the time, create an extra bus_dmamap_t which we can use to safely try bus_dmamap_load()-ing the new mbuf. On success we just swap the spare bus_dmamap_t with the data->map of that ring entry. Tested: Tested with Intel AC7260, verified with vmstat -m that new kernel no longer visibly leaks memory from the M_DEVBUF malloc type. Before, leakage was 1KB every few seconds while ping(8)-ing over the wlan connection. Submitted by: Imre Vadasz Approved by: re@ Obtained from: DragonflyBSD.git cc440b26818b5dfdd9af504d71c1b0e6522b53ef Differential Revision: https://reviews.freebsd.org/D6742 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Mon Jun 13 00:03:55 2016 (r301844) +++ head/sys/dev/iwm/if_iwm.c Mon Jun 13 00:13:20 2016 (r301845) @@ -866,10 +866,28 @@ iwm_alloc_rx_ring(struct iwm_softc *sc, goto fail; } + /* Allocate spare bus_dmamap_t for iwm_rx_addbuf() */ + error = bus_dmamap_create(ring->data_dmat, 0, &ring->spare_map); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not create RX buf DMA map, error %d\n", + __func__, error); + goto fail; + } /* * Allocate and map RX buffers. */ for (i = 0; i < IWM_RX_RING_COUNT; i++) { + struct iwm_rx_data *data = &ring->data[i]; + error = bus_dmamap_create(ring->data_dmat, 0, &data->map); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not create RX buf DMA map, error %d\n", + __func__, error); + goto fail; + } + data->m = NULL; + if ((error = iwm_rx_addbuf(sc, IWM_RBUF_SIZE, i)) != 0) { goto fail; } @@ -923,6 +941,10 @@ iwm_free_rx_ring(struct iwm_softc *sc, s data->map = NULL; } } + if (ring->spare_map != NULL) { + bus_dmamap_destroy(ring->data_dmat, ring->spare_map); + ring->spare_map = NULL; + } if (ring->data_dmat != NULL) { bus_dma_tag_destroy(ring->data_dmat); ring->data_dmat = NULL; @@ -2119,6 +2141,7 @@ iwm_rx_addbuf(struct iwm_softc *sc, int struct iwm_rx_ring *ring = &sc->rxq; struct iwm_rx_data *data = &ring->data[idx]; struct mbuf *m; + bus_dmamap_t dmamap = NULL; int error; bus_addr_t paddr; @@ -2126,28 +2149,26 @@ iwm_rx_addbuf(struct iwm_softc *sc, int if (m == NULL) return ENOBUFS; - if (data->m != NULL) - bus_dmamap_unload(ring->data_dmat, data->map); - m->m_len = m->m_pkthdr.len = m->m_ext.ext_size; - error = bus_dmamap_create(ring->data_dmat, 0, &data->map); - if (error != 0) { - device_printf(sc->sc_dev, - "%s: could not create RX buf DMA map, error %d\n", - __func__, error); - goto fail; - } - data->m = m; - error = bus_dmamap_load(ring->data_dmat, data->map, - mtod(data->m, void *), IWM_RBUF_SIZE, iwm_dma_map_addr, + error = bus_dmamap_load(ring->data_dmat, ring->spare_map, + mtod(m, void *), IWM_RBUF_SIZE, iwm_dma_map_addr, &paddr, BUS_DMA_NOWAIT); if (error != 0 && error != EFBIG) { device_printf(sc->sc_dev, - "%s: can't not map mbuf, error %d\n", __func__, - error); + "%s: can't map mbuf, error %d\n", __func__, error); goto fail; } + + if (data->m != NULL) + bus_dmamap_unload(ring->data_dmat, data->map); + + /* Swap ring->spare_map with data->map */ + dmamap = data->map; + data->map = ring->spare_map; + ring->spare_map = dmamap; + bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_PREREAD); + data->m = m; /* Update RX descriptor. */ ring->desc[idx] = htole32(paddr >> 8); @@ -2156,6 +2177,7 @@ iwm_rx_addbuf(struct iwm_softc *sc, int return 0; fail: + m_free(m); return error; } Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Mon Jun 13 00:03:55 2016 (r301844) +++ head/sys/dev/iwm/if_iwmvar.h Mon Jun 13 00:13:20 2016 (r301845) @@ -289,6 +289,7 @@ struct iwm_rx_ring { uint32_t *desc; struct iwm_rb_status *stat; struct iwm_rx_data data[IWM_RX_RING_COUNT]; + bus_dmamap_t spare_map; /* for iwm_rx_addbuf() */ bus_dma_tag_t data_dmat; int cur; }; From owner-svn-src-head@freebsd.org Mon Jun 13 01:33:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F4AAF0481; Mon, 13 Jun 2016 01:33: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 34D7E278A; Mon, 13 Jun 2016 01:33: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 u5D1X2dc054662; Mon, 13 Jun 2016 01:33:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5D1X27l054661; Mon, 13 Jun 2016 01:33:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201606130133.u5D1X27l054661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 13 Jun 2016 01:33:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301846 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 01:33:03 -0000 Author: hselasky Date: Mon Jun 13 01:33:02 2016 New Revision: 301846 URL: https://svnweb.freebsd.org/changeset/base/301846 Log: Fix compile warning. Approved by: re (delphij) MFC after: 1 week Modified: head/lib/libusb/libusb10_desc.c Modified: head/lib/libusb/libusb10_desc.c ============================================================================== --- head/lib/libusb/libusb10_desc.c Mon Jun 13 00:13:20 2016 (r301845) +++ head/lib/libusb/libusb10_desc.c Mon Jun 13 01:33:02 2016 (r301846) @@ -332,7 +332,7 @@ libusb_get_string_descriptor_ascii(libus if (libusb20_dev_req_string_simple_sync(pdev, desc_index, data, length) == 0) - return (strlen(data)); + return (strlen((char *)data)); return (LIBUSB_ERROR_OTHER); } From owner-svn-src-head@freebsd.org Mon Jun 13 03:17:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B118AF0BA5; Mon, 13 Jun 2016 03:17:01 +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 6BF2F2163; Mon, 13 Jun 2016 03:17: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 u5D3H0XB091895; Mon, 13 Jun 2016 03:17:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5D3H0Kw091894; Mon, 13 Jun 2016 03:17:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201606130317.u5D3H0Kw091894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 13 Jun 2016 03:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301849 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 03:17:01 -0000 Author: adrian Date: Mon Jun 13 03:17:00 2016 New Revision: 301849 URL: https://svnweb.freebsd.org/changeset/base/301849 Log: [mips] set hardfloat for fpu instruction generation for gcc/binutils 5.x This allows -HEAD to be compiled again using the gcc-5 mips port compiler. Reviewed by: imp Approved by: re@ Modified: head/sys/mips/mips/swtch.S Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Mon Jun 13 03:03:08 2016 (r301848) +++ head/sys/mips/mips/swtch.S Mon Jun 13 03:17:00 2016 (r301849) @@ -400,6 +400,7 @@ END(cpu_switch) * *---------------------------------------------------------------------------- */ +.set hardfloat LEAF(MipsSwitchFPState) mfc0 t1, MIPS_COP_0_STATUS # Save old SR li t0, MIPS_SR_COP_1_BIT # enable the coprocessor From owner-svn-src-head@freebsd.org Mon Jun 13 03:39:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4893AF0F19; Mon, 13 Jun 2016 03:39:17 +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 A5CB62A26; Mon, 13 Jun 2016 03:39:17 +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 u5D3dGgr099395; Mon, 13 Jun 2016 03:39:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5D3dGCf099394; Mon, 13 Jun 2016 03:39:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606130339.u5D3dGCf099394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 13 Jun 2016 03:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301851 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 03:39:17 -0000 Author: kib Date: Mon Jun 13 03:39:16 2016 New Revision: 301851 URL: https://svnweb.freebsd.org/changeset/base/301851 Log: Explicitely initialize sw_alloc_sx. Currently it is not initialized but works due to zeroed out bss on startup. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs) Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Mon Jun 13 03:28:37 2016 (r301850) +++ head/sys/vm/swap_pager.c Mon Jun 13 03:39:16 2016 (r301851) @@ -488,6 +488,7 @@ swap_pager_init(void) TAILQ_INIT(&swap_pager_object_list[i]); mtx_init(&sw_alloc_mtx, "swap_pager list", NULL, MTX_DEF); mtx_init(&sw_dev_mtx, "swapdev", NULL, MTX_DEF); + sx_init(&sw_alloc_sx, "swspsx"); sx_init(&swdev_syscall_lock, "swsysc"); /* From owner-svn-src-head@freebsd.org Mon Jun 13 03:42:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 627D9AF1142; Mon, 13 Jun 2016 03:42:47 +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 3F59C2DFD; Mon, 13 Jun 2016 03:42:47 +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 u5D3gk2s002858; Mon, 13 Jun 2016 03:42:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5D3gkAI002857; Mon, 13 Jun 2016 03:42:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606130342.u5D3gkAI002857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 13 Jun 2016 03:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301852 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 03:42:47 -0000 Author: kib Date: Mon Jun 13 03:42:46 2016 New Revision: 301852 URL: https://svnweb.freebsd.org/changeset/base/301852 Log: Fix inconsistent locking of the swap pager named objects list. Right now, all modifications of the list are locked by sw_alloc_mtx. But initial lookup of the object by the handle in swap_pager_alloc() is not protected by sw_alloc_mtx, which means that vm_pager_object_lookup() could follow freed pointer. Create a new named swap object with the OBJT_SWAP type, instead of OBJT_DEFAULT. With this change, swp_pager_meta_build() never need to upgrade named OBJT_DEFAULT to OBJT_SWAP (in the other place, we do not forbid for client code to create named OBJT_DEFAULT objects at all). That change allows to remove sw_alloc_mtx and make the list locked by sw_alloc_sx lock. Update swap_pager_copy() to new locking mode. Create helper swap_pager_alloc_init() to consolidate named and anonymous swap objects creation, while a caller ensures that the neccesary locks are held around the helper. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Approved by: re (hrs) Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Mon Jun 13 03:39:16 2016 (r301851) +++ head/sys/vm/swap_pager.c Mon Jun 13 03:42:46 2016 (r301852) @@ -345,7 +345,6 @@ static struct sx sw_alloc_sx; #define NOBJLIST(handle) \ (&swap_pager_object_list[((int)(intptr_t)handle >> 4) & (NOBJLISTS-1)]) -static struct mtx sw_alloc_mtx; /* protect list manipulation */ static struct pagerlst swap_pager_object_list[NOBJLISTS]; static uma_zone_t swap_zone; @@ -486,7 +485,6 @@ swap_pager_init(void) for (i = 0; i < NOBJLISTS; ++i) TAILQ_INIT(&swap_pager_object_list[i]); - mtx_init(&sw_alloc_mtx, "swap_pager list", NULL, MTX_DEF); mtx_init(&sw_dev_mtx, "swapdev", NULL, MTX_DEF); sx_init(&sw_alloc_sx, "swspsx"); sx_init(&swdev_syscall_lock, "swsysc"); @@ -583,28 +581,46 @@ swap_pager_swap_init(void) mtx_init(&swhash_mtx, "swap_pager swhash", NULL, MTX_DEF); } +static vm_object_t +swap_pager_alloc_init(void *handle, struct ucred *cred, vm_ooffset_t size, + vm_ooffset_t offset) +{ + vm_object_t object; + + if (cred != NULL) { + if (!swap_reserve_by_cred(size, cred)) + return (NULL); + crhold(cred); + } + object = vm_object_allocate(OBJT_SWAP, OFF_TO_IDX(offset + + PAGE_MASK + size)); + object->handle = handle; + if (cred != NULL) { + object->cred = cred; + object->charge = size; + } + object->un_pager.swp.swp_bcount = 0; + return (object); +} + /* * SWAP_PAGER_ALLOC() - allocate a new OBJT_SWAP VM object and instantiate * its metadata structures. * * This routine is called from the mmap and fork code to create a new - * OBJT_SWAP object. We do this by creating an OBJT_DEFAULT object - * and then converting it with swp_pager_meta_build(). - * - * This routine may block in vm_object_allocate() and create a named - * object lookup race, so we must interlock. + * OBJT_SWAP object. * - * MPSAFE + * This routine must ensure that no live duplicate is created for + * the named object request, which is protected against by + * holding the sw_alloc_sx lock in case handle != NULL. */ static vm_object_t swap_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t offset, struct ucred *cred) { vm_object_t object; - vm_pindex_t pindex; - pindex = OFF_TO_IDX(offset + PAGE_MASK + size); - if (handle) { + if (handle != NULL) { /* * Reference existing named region or allocate new one. There * should not be a race here against swp_pager_meta_build() @@ -614,38 +630,16 @@ swap_pager_alloc(void *handle, vm_ooffse sx_xlock(&sw_alloc_sx); object = vm_pager_object_lookup(NOBJLIST(handle), handle); if (object == NULL) { - if (cred != NULL) { - if (!swap_reserve_by_cred(size, cred)) { - sx_xunlock(&sw_alloc_sx); - return (NULL); - } - crhold(cred); - } - object = vm_object_allocate(OBJT_DEFAULT, pindex); - VM_OBJECT_WLOCK(object); - object->handle = handle; - if (cred != NULL) { - object->cred = cred; - object->charge = size; + object = swap_pager_alloc_init(handle, cred, size, + offset); + if (object != NULL) { + TAILQ_INSERT_TAIL(NOBJLIST(object->handle), + object, pager_object_list); } - swp_pager_meta_build(object, 0, SWAPBLK_NONE); - VM_OBJECT_WUNLOCK(object); } sx_xunlock(&sw_alloc_sx); } else { - if (cred != NULL) { - if (!swap_reserve_by_cred(size, cred)) - return (NULL); - crhold(cred); - } - object = vm_object_allocate(OBJT_DEFAULT, pindex); - VM_OBJECT_WLOCK(object); - if (cred != NULL) { - object->cred = cred; - object->charge = size; - } - swp_pager_meta_build(object, 0, SWAPBLK_NONE); - VM_OBJECT_WUNLOCK(object); + object = swap_pager_alloc_init(handle, cred, size, offset); } return (object); } @@ -664,17 +658,22 @@ static void swap_pager_dealloc(vm_object_t object) { + VM_OBJECT_ASSERT_WLOCKED(object); + KASSERT((object->flags & OBJ_DEAD) != 0, ("dealloc of reachable obj")); + /* * Remove from list right away so lookups will fail if we block for * pageout completion. */ if (object->handle != NULL) { - mtx_lock(&sw_alloc_mtx); - TAILQ_REMOVE(NOBJLIST(object->handle), object, pager_object_list); - mtx_unlock(&sw_alloc_mtx); + VM_OBJECT_WUNLOCK(object); + sx_xlock(&sw_alloc_sx); + TAILQ_REMOVE(NOBJLIST(object->handle), object, + pager_object_list); + sx_xunlock(&sw_alloc_sx); + VM_OBJECT_WLOCK(object); } - VM_OBJECT_ASSERT_WLOCKED(object); vm_object_pip_wait(object, "swpdea"); /* @@ -901,16 +900,19 @@ swap_pager_copy(vm_object_t srcobject, v * If destroysource is set, we remove the source object from the * swap_pager internal queue now. */ - if (destroysource) { - if (srcobject->handle != NULL) { - mtx_lock(&sw_alloc_mtx); - TAILQ_REMOVE( - NOBJLIST(srcobject->handle), - srcobject, - pager_object_list - ); - mtx_unlock(&sw_alloc_mtx); - } + if (destroysource && srcobject->handle != NULL) { + vm_object_pip_add(srcobject, 1); + VM_OBJECT_WUNLOCK(srcobject); + vm_object_pip_add(dstobject, 1); + VM_OBJECT_WUNLOCK(dstobject); + sx_xlock(&sw_alloc_sx); + TAILQ_REMOVE(NOBJLIST(srcobject->handle), srcobject, + pager_object_list); + sx_xunlock(&sw_alloc_sx); + VM_OBJECT_WLOCK(dstobject); + vm_object_pip_wakeup(dstobject); + VM_OBJECT_WLOCK(srcobject); + vm_object_pip_wakeup(srcobject); } /* @@ -1746,16 +1748,7 @@ swp_pager_meta_build(vm_object_t object, if (object->type != OBJT_SWAP) { object->type = OBJT_SWAP; object->un_pager.swp.swp_bcount = 0; - - if (object->handle != NULL) { - mtx_lock(&sw_alloc_mtx); - TAILQ_INSERT_TAIL( - NOBJLIST(object->handle), - object, - pager_object_list - ); - mtx_unlock(&sw_alloc_mtx); - } + KASSERT(object->handle == NULL, ("default pager with handle")); } /* From owner-svn-src-head@freebsd.org Mon Jun 13 03:45:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1852CAF11D8; Mon, 13 Jun 2016 03:45:10 +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 E84EF2F7B; Mon, 13 Jun 2016 03:45:09 +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 u5D3j9WF003032; Mon, 13 Jun 2016 03:45:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5D3j9hC003031; Mon, 13 Jun 2016 03:45:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606130345.u5D3j9hC003031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 13 Jun 2016 03:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301853 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 03:45:10 -0000 Author: kib Date: Mon Jun 13 03:45:08 2016 New Revision: 301853 URL: https://svnweb.freebsd.org/changeset/base/301853 Log: Do not access pv_table array for fictitious pages, since the array does not cover the dynamically registered ficititious ranges, and fictitious pages mappings are not promoted. Offer a dummy struct md_page to fetch constant superpage pv list generation to satisfy logic. Also, by initializing the pv_dummy pv_list to empty, we can remove several explicit PG_FICTITIOUS tests. Reported and tested by: Michael Butler (previous version) Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D6728 Approved by: re (hrs) Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Jun 13 03:42:46 2016 (r301852) +++ head/sys/amd64/amd64/pmap.c Mon Jun 13 03:45:08 2016 (r301853) @@ -386,6 +386,7 @@ static struct mtx pv_chunks_mutex; static struct rwlock pv_list_locks[NPV_LIST_LOCKS]; static u_long pv_invl_gen[NPV_LIST_LOCKS]; static struct md_page *pv_table; +static struct md_page pv_dummy; /* * All those kernel PT submaps that BSD is so fond of @@ -1264,6 +1265,7 @@ pmap_init(void) M_WAITOK | M_ZERO); for (i = 0; i < pv_npg; i++) TAILQ_INIT(&pv_table[i].pv_list); + TAILQ_INIT(&pv_dummy.pv_list); pmap_initialized = 1; for (i = 0; i < PMAP_PREINIT_MAPPING_COUNT; i++) { @@ -3920,11 +3922,10 @@ pmap_remove_all(vm_page_t m) ("pmap_remove_all: page %p is not managed", m)); SLIST_INIT(&free); lock = VM_PAGE_TO_PV_LIST_LOCK(m); - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : + pa_to_pvh(VM_PAGE_TO_PHYS(m)); retry: rw_wlock(lock); - if ((m->flags & PG_FICTITIOUS) != 0) - goto small_mappings; while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -3943,7 +3944,6 @@ retry: (void)pmap_demote_pde_locked(pmap, pde, va, &lock); PMAP_UNLOCK(pmap); } -small_mappings: while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -5743,11 +5743,10 @@ pmap_remove_write(vm_page_t m) if (!vm_page_xbusied(m) && (m->aflags & PGA_WRITEABLE) == 0) return; lock = VM_PAGE_TO_PV_LIST_LOCK(m); - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : + pa_to_pvh(VM_PAGE_TO_PHYS(m)); retry_pv_loop: rw_wlock(lock); - if ((m->flags & PG_FICTITIOUS) != 0) - goto small_mappings; TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -5771,7 +5770,6 @@ retry_pv_loop: lock, VM_PAGE_TO_PV_LIST_LOCK(m), m)); PMAP_UNLOCK(pmap); } -small_mappings: TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -5877,12 +5875,11 @@ pmap_ts_referenced(vm_page_t m) cleared = 0; pa = VM_PAGE_TO_PHYS(m); lock = PHYS_TO_PV_LIST_LOCK(pa); - pvh = pa_to_pvh(pa); + pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(pa); rw_wlock(lock); retry: not_cleared = 0; - if ((m->flags & PG_FICTITIOUS) != 0 || - (pvf = TAILQ_FIRST(&pvh->pv_list)) == NULL) + if ((pvf = TAILQ_FIRST(&pvh->pv_list)) == NULL) goto small_mappings; pv = pvf; do { @@ -6194,12 +6191,11 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : + pa_to_pvh(VM_PAGE_TO_PHYS(m)); lock = VM_PAGE_TO_PV_LIST_LOCK(m); rw_wlock(lock); restart: - if ((m->flags & PG_FICTITIOUS) != 0) - goto small_mappings; TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -6243,7 +6239,6 @@ restart: } PMAP_UNLOCK(pmap); } -small_mappings: TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { From owner-svn-src-head@freebsd.org Mon Jun 13 09:22:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29F2AAF1024; Mon, 13 Jun 2016 09:22:22 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF17D2D16; Mon, 13 Jun 2016 09:22:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5D9ML5d028008; Mon, 13 Jun 2016 09:22:21 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5D9MLup028007; Mon, 13 Jun 2016 09:22:21 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201606130922.u5D9MLup028007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Mon, 13 Jun 2016 09:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301867 - head/sys/security/audit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 09:22:22 -0000 Author: rwatson Date: Mon Jun 13 09:22:20 2016 New Revision: 301867 URL: https://svnweb.freebsd.org/changeset/base/301867 Log: Implement AUE_PREAD and AUE_PWRITE BSM conversion support, eliminating console warnings when pread(2) and pwrite(2) are used with full system-call auditing enabled. We audit the same file-descriptor data for these calls as we do read(2) and write(2). Approved by: re (kib) MFC after: 3 days Sponsored by: DARPA, AFRL Modified: head/sys/security/audit/audit_bsm.c Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Mon Jun 13 09:02:08 2016 (r301866) +++ head/sys/security/audit/audit_bsm.c Mon Jun 13 09:22:20 2016 (r301867) @@ -952,6 +952,8 @@ kaudit_to_bsm(struct kaudit_record *kar, case AUE_GETDIRENTRIESATTR: case AUE_LSEEK: case AUE_POLL: + case AUE_PREAD: + case AUE_PWRITE: case AUE_READ: case AUE_READV: case AUE_WRITE: From owner-svn-src-head@freebsd.org Mon Jun 13 10:35:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D400AF16CA; Mon, 13 Jun 2016 10:35: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 0F33928A6; Mon, 13 Jun 2016 10:35: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 u5DAZC0j053870; Mon, 13 Jun 2016 10:35:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5DAZCij053866; Mon, 13 Jun 2016 10:35:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606131035.u5DAZCij053866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Jun 2016 10:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301869 - in head: share/misc usr.bin/calendar/calendars usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 10:35:13 -0000 Author: ngie Date: Mon Jun 13 10:35:11 2016 New Revision: 301869 URL: https://svnweb.freebsd.org/changeset/base/301869 Log: Change my given name from "Garrett" to "Ngie" A legal name change from "Garrett" to "Ngie", as well as a FreeBSD account name change, is pending. Approved by: re (hrs) Modified: head/share/misc/committers-src.dot head/usr.bin/calendar/calendars/calendar.freebsd head/usr.sbin/sysrc/sysrc.8 Directory Properties: head/ (props changed) Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Mon Jun 13 10:30:49 2016 (r301868) +++ head/share/misc/committers-src.dot Mon Jun 13 10:35:11 2016 (r301869) @@ -244,7 +244,7 @@ mp [label="Mark Peek\nmp@FreeBSD.org\n20 mr [label="Michael Reifenberger\nmr@FreeBSD.org\n2001/09/30"] neel [label="Neel Natu\nneel@FreeBSD.org\n2009/09/20"] netchild [label="Alexander Leidinger\nnetchild@FreeBSD.org\n2005/03/31"] -ngie [label="Garrett Cooper\nngie@FreeBSD.org\n2014/07/27"] +ngie [label="Ngie Cooper\nngie@FreeBSD.org\n2014/07/27"] nork [label="Norikatsu Shigemura\nnork@FreeBSD.org\n2009/06/09"] np [label="Navdeep Parhar\nnp@FreeBSD.org\n2009/06/05"] nwhitehorn [label="Nathan Whitehorn\nnwhitehorn@FreeBSD.org\n2008/07/03"] Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jun 13 10:30:49 2016 (r301868) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jun 13 10:35:11 2016 (r301869) @@ -36,7 +36,7 @@ 01/26 Andrew Gallatin born in Buffalo, New York, United States, 1970 01/27 Nick Sayer born in San Diego, California, United States, 1968 01/27 Jacques Anthony Vidrine born in Baton Rouge, Louisiana, United States, 1971 -01/27 Garrett Cooper born in Seattle, Washington, United States, 1984 +01/27 Ngie Cooper born in Seattle, Washington, United States, 1984 01/31 Hidetoshi Shimokawa born in Yokohama, Kanagawa, Japan, 1970 02/01 Doug Rabson born in London, England, 1966 02/01 Nicola Vitale born in Busto Arsizio, Varese, Italy, 1976 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Mon Jun 13 10:30:49 2016 (r301868) +++ head/usr.sbin/sysrc/sysrc.8 Mon Jun 13 10:35:11 2016 (r301869) @@ -480,6 +480,6 @@ utility first appeared in .Sh AUTHORS .An Devin Teske Aq Mt dteske@FreeBSD.org .Sh THANKS TO -Brandon Gooch, Garrett Cooper, Julian Elischer, Pawel Jakub Dawidek, +Brandon Gooch, Ngie Cooper, Julian Elischer, Pawel Jakub Dawidek, Cyrille Lefevre, Ross West, Stefan Esser, Marco Steinbach, Jilles Tjoelker, Allan Jude, and Lars Engels for suggestions, help, and testing. From owner-svn-src-head@freebsd.org Mon Jun 13 10:53:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 844A9AF1B06; Mon, 13 Jun 2016 10:53: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 56A022288; Mon, 13 Jun 2016 10:53: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 u5DArYff061294; Mon, 13 Jun 2016 10:53:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5DArYFP061293; Mon, 13 Jun 2016 10:53:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201606131053.u5DArYFP061293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 13 Jun 2016 10:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301870 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 10:53:35 -0000 Author: avg Date: Mon Jun 13 10:53:34 2016 New Revision: 301870 URL: https://svnweb.freebsd.org/changeset/base/301870 Log: zfs_vptocnp: check for an invalid znode ... which can arise after the receive or rollback and failed zfs_rezget(). Approved by: re (kib) MFC after: 1 week 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 Jun 13 10:35:11 2016 (r301869) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Jun 13 10:53:34 2016 (r301870) @@ -7170,16 +7170,24 @@ zfs_vptocnp(struct vop_vptocnp_args *ap) int ltype; int error; + ZFS_ENTER(zfsvfs); + ZFS_VERIFY_ZP(zp); + /* * If we are a snapshot mounted under .zfs, run the operation * on the covered vnode. */ if ((error = sa_lookup(zp->z_sa_hdl, - SA_ZPL_PARENT(zfsvfs), &parent, sizeof (parent))) != 0) + SA_ZPL_PARENT(zfsvfs), &parent, sizeof (parent))) != 0) { + ZFS_EXIT(zfsvfs); return (error); + } - if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs) + if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs) { + ZFS_EXIT(zfsvfs); return (vop_stdvptocnp(ap)); + } + ZFS_EXIT(zfsvfs); covered_vp = vp->v_mount->mnt_vnodecovered; vhold(covered_vp); From owner-svn-src-head@freebsd.org Mon Jun 13 11:19:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67048AF14C5; Mon, 13 Jun 2016 11:19: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 36D0E22C1; Mon, 13 Jun 2016 11:19: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 u5DBJ6tt068732; Mon, 13 Jun 2016 11:19:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5DBJ60X068731; Mon, 13 Jun 2016 11:19:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606131119.u5DBJ60X068731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 13 Jun 2016 11:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301871 - head/usr.sbin/rpc.lockd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 11:19:07 -0000 Author: ngie Date: Mon Jun 13 11:19:06 2016 New Revision: 301871 URL: https://svnweb.freebsd.org/changeset/base/301871 Log: Add missing break in lock_partialfilelock(..) with NFS_RESERR This will help ensure that the right error is trickled up when the function is called if the lock status is NFS_RESERR Differential Revision: https://reviews.freebsd.org/D6622 Reviewed by: rmacklem Approved by: re (gjb) Tested with: fsx; svn info/svnversion (uses bdb locking); locktests from Bull http://nfsv4.bullopensource.org/tools/tests/locktest.php MFC after: 2 weeks Reported by: Coverity CID: 1008161, 1304956 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/rpc.lockd/lockd_lock.c Modified: head/usr.sbin/rpc.lockd/lockd_lock.c ============================================================================== --- head/usr.sbin/rpc.lockd/lockd_lock.c Mon Jun 13 10:53:34 2016 (r301870) +++ head/usr.sbin/rpc.lockd/lockd_lock.c Mon Jun 13 11:19:06 2016 (r301871) @@ -1426,6 +1426,7 @@ lock_partialfilelock(struct file_lock *f break; case NFS_RESERR: retval = PFL_NFSRESERR; + break; default: debuglog("Unmatched lnlstatus %d\n"); retval = PFL_NFSDENIED_NOLOCK; From owner-svn-src-head@freebsd.org Mon Jun 13 16:13:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20196AF1466; Mon, 13 Jun 2016 16:13:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 086DF27E0; Mon, 13 Jun 2016 16:13:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 024E01F70; Mon, 13 Jun 2016 16:13:13 +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 A0ABD20AB9; Mon, 13 Jun 2016 16:13:12 +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 jYVMI8xcHuFN; Mon, 13 Jun 2016 16:13:10 +0000 (UTC) Subject: Re: svn commit: r300943 - in head: . lib/libc++ lib/libcxxrt share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com AB83B20AB1 To: Andreas Tobler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201605290620.u4T6KFjT002312@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <019be81b-9f3c-f4c7-620a-b1849f4e82ff@FreeBSD.org> Date: Mon, 13 Jun 2016 09:13:09 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PahxjkGojnXiWvs55iRhV0W3f6DflVNI5" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 16:13:13 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PahxjkGojnXiWvs55iRhV0W3f6DflVNI5 Content-Type: multipart/mixed; boundary="vwklwn0foAr3edejbmepJEb68Hu8Pfh7l" From: Bryan Drewery To: Andreas Tobler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <019be81b-9f3c-f4c7-620a-b1849f4e82ff@FreeBSD.org> Subject: Re: svn commit: r300943 - in head: . lib/libc++ lib/libcxxrt share/mk References: <201605290620.u4T6KFjT002312@repo.freebsd.org> In-Reply-To: --vwklwn0foAr3edejbmepJEb68Hu8Pfh7l Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/12/2016 1:02 PM, Andreas Tobler wrote: > Hi Bryan, >=20 > On 29.05.16 08:20, Bryan Drewery wrote: >> Author: bdrewery >> Date: Sun May 29 06:20:15 2016 >> New Revision: 300943 >> URL: https://svnweb.freebsd.org/changeset/base/300943 >> >> Log: >> GCC External: Revert r300886, r300904, r300917, r300918 >> >> The fix in r300873 is mostly enough. A fix for lib32 will be >> committed.separately. >=20 > Did this commit already happen? >=20 > I still suffer a broken buildworld on powerpc64 for 32-bit with interna= l > tools. >=20 > Unknown option -std=3Dc++11... Can you tee the entire build and send me the log please? --=20 Regards, Bryan Drewery --vwklwn0foAr3edejbmepJEb68Hu8Pfh7l-- --PahxjkGojnXiWvs55iRhV0W3f6DflVNI5 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 iQEcBAEBAgAGBQJXXtuZAAoJEDXXcbtuRpfPZmIH/2+5hfmZKubfoxmwraarHA57 hUaP/HLe7Sb0HIqOwEeETgPQdWp7fNZlib0LDo5sZbOTt/giQheTycDOxi0FIM4m j8Tnz/ErrB8XztppqQqiEygTaLlPsUaLEmlQJ1oPF2bttBSqatSZ5KaoQyoDTglM Burx4qQ521faArVpLLUp/KM6l8qDIONwI3J7kSEcFIG8VLlSaOaL+KB7Wr/x+gwW BcrRwgXJYq7e4Z6wgq9qgUxX81GTnOpJxxQKEx22St/dICzYPp6q18PjjqubXD3d ozf/u4MjbUkkv9eB4gOh133/mDU+CZzxKPvLooIG52QFEnpVIf9+nFFZ01PTBxY= =hfzr -----END PGP SIGNATURE----- --PahxjkGojnXiWvs55iRhV0W3f6DflVNI5-- From owner-svn-src-head@freebsd.org Mon Jun 13 16:48:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B452BAF1B86; Mon, 13 Jun 2016 16:48:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85A252D16; Mon, 13 Jun 2016 16:48:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5DGmRMb089450; Mon, 13 Jun 2016 16:48:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5DGmRFb089449; Mon, 13 Jun 2016 16:48:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201606131648.u5DGmRFb089449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 13 Jun 2016 16:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301872 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 16:48:28 -0000 Author: ian Date: Mon Jun 13 16:48:27 2016 New Revision: 301872 URL: https://svnweb.freebsd.org/changeset/base/301872 Log: Do not define __NO_STRICT_ALIGNMENT for armv6. While the requirements are no longer natural-alignment strict, there are still some restrictions. FreeBSD network code assumes data is naturally-aligned or is running on a platform with no restrictions; pointers are not annotated to indicate the data pointed to may be packed or unaligned. The clang optimizer can sometimes combine the load or store of a pair of adjacent 32-bit values into a single doubleword load/store, and that operation requires at least 4-byte alignment. __NO_STRICT_ALIGNMENT can lead to tcp headers being only 2-byte aligned. Note that alignment faults remain disabled on armv6, this change reverts only the defining of the symbol which leads to some overly-agressive code shortcuts when building common/shared drivers and network code for arm. Approved by: re(kib) Modified: head/sys/arm/include/_types.h Modified: head/sys/arm/include/_types.h ============================================================================== --- head/sys/arm/include/_types.h Mon Jun 13 11:19:06 2016 (r301871) +++ head/sys/arm/include/_types.h Mon Jun 13 16:48:27 2016 (r301872) @@ -43,10 +43,6 @@ #error this file needs sys/cdefs.h as a prerequisite #endif -#if __ARM_ARCH >= 6 -#define __NO_STRICT_ALIGNMENT -#endif - /* * Basic types upon which most other types are built. */ From owner-svn-src-head@freebsd.org Mon Jun 13 18:39:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B640AF22DE; Mon, 13 Jun 2016 18:39:14 +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 6CF8B2FE0; Mon, 13 Jun 2016 18:39: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 u5DIdDcD029839; Mon, 13 Jun 2016 18:39:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5DIdDFS029838; Mon, 13 Jun 2016 18:39:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201606131839.u5DIdDFS029838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 13 Jun 2016 18:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301873 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 18:39:14 -0000 Author: avg Date: Mon Jun 13 18:39:13 2016 New Revision: 301873 URL: https://svnweb.freebsd.org/changeset/base/301873 Log: l2arc: reset b_tmp_cdata to NULL in the case of unset b_daddr The change is in arc_buf_l2_cdata_free(). Without this we can trip the assertion in arc_hdr_realloc() if INVARIANTS option is enabled. Approved by: re (kib) MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Jun 13 16:48:27 2016 (r301872) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Jun 13 18:39:13 2016 (r301873) @@ -2249,6 +2249,7 @@ arc_buf_l2_cdata_free(arc_buf_hdr_t *hdr ASSERT3P(hdr->b_l1hdr.b_tmp_cdata, ==, hdr->b_l1hdr.b_buf->b_data); ASSERT3U(hdr->b_l2hdr.b_compress, ==, ZIO_COMPRESS_OFF); + hdr->b_l1hdr.b_tmp_cdata = NULL; return; } From owner-svn-src-head@freebsd.org Mon Jun 13 21:51:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B5A6AF25D1; Mon, 13 Jun 2016 21:51:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 52B74293A; Mon, 13 Jun 2016 21:51:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 4C4E71374; Mon, 13 Jun 2016 21:51:37 +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 8FA4721433; Mon, 13 Jun 2016 21:51:36 +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 Un2Il1Xn-Uvv; Mon, 13 Jun 2016 21:51:33 +0000 (UTC) Subject: Re: svn commit: r300943 - in head: . lib/libc++ lib/libcxxrt share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com E7C0B2142D To: Andreas Tobler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201605290620.u4T6KFjT002312@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <42af97ed-8cd8-fd2c-3e4f-576885a28ad2@FreeBSD.org> Date: Mon, 13 Jun 2016 14:51:32 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="62poNK4tg28d0pOtgn9pLwC12aj85oJT4" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 21:51:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --62poNK4tg28d0pOtgn9pLwC12aj85oJT4 Content-Type: multipart/mixed; boundary="qIE8EXESq1OBspWMfKGebe3IpGm7rtBoQ" From: Bryan Drewery To: Andreas Tobler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <42af97ed-8cd8-fd2c-3e4f-576885a28ad2@FreeBSD.org> Subject: Re: svn commit: r300943 - in head: . lib/libc++ lib/libcxxrt share/mk References: <201605290620.u4T6KFjT002312@repo.freebsd.org> In-Reply-To: --qIE8EXESq1OBspWMfKGebe3IpGm7rtBoQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/12/2016 1:02 PM, Andreas Tobler wrote: > Hi Bryan, >=20 > On 29.05.16 08:20, Bryan Drewery wrote: >> Author: bdrewery >> Date: Sun May 29 06:20:15 2016 >> New Revision: 300943 >> URL: https://svnweb.freebsd.org/changeset/base/300943 >> >> Log: >> GCC External: Revert r300886, r300904, r300917, r300918 >> >> The fix in r300873 is mostly enough. A fix for lib32 will be >> committed.separately. >=20 > Did this commit already happen? >=20 > I still suffer a broken buildworld on powerpc64 for 32-bit with interna= l > tools. >=20 > Unknown option -std=3Dc++11... Try with this patch please, number of -j doesn't matter. https://people.freebsd.org/~bdrewery/patches/libcompat-xgcc-c++11.diff --=20 Regards, Bryan Drewery --qIE8EXESq1OBspWMfKGebe3IpGm7rtBoQ-- --62poNK4tg28d0pOtgn9pLwC12aj85oJT4 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 iQEcBAEBAgAGBQJXXyrkAAoJEDXXcbtuRpfPsiEH+QEfEP0vBl1/iuR6NYL3as24 D+1FVWra4soBc0FjLFi30JtF2nLgo5zStguiQ5XfWMdtge+ouJFBv1n/S6k8y3Ra eLgIc+Tu8bDUfFlU8oSxktJoXR7wkdiM0toxQ41Pq70KIJRQz1YjKumbvR0RO7rk dX75yi07bDIQ7nXk96KHhZnEDMQn9y4wW78rERpi/OJRRVTb8XNj1skPQacUUigS jqM6i8LrUqM6XfYqoC8q7rqcosHeI7l9FOraeXz6NRZw5BID6ewlI20cSL3Bn9hI TE/aJ4mlp3JBXqUW9aULrQe+suKMmW7MPhVqPp7KgSmG3lPFzdzcS+2wZiVcnsQ= =k81+ -----END PGP SIGNATURE----- --62poNK4tg28d0pOtgn9pLwC12aj85oJT4-- From owner-svn-src-head@freebsd.org Mon Jun 13 22:00:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD045AF2949; Mon, 13 Jun 2016 22:00: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 8B0AE20AC; Mon, 13 Jun 2016 22:00: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 u5DM0iXY005945; Mon, 13 Jun 2016 22:00:44 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5DM0i6J005944; Mon, 13 Jun 2016 22:00:44 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201606132200.u5DM0i6J005944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 13 Jun 2016 22:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301874 - head/usr.sbin/extattr/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 22:00:45 -0000 Author: asomers Date: Mon Jun 13 22:00:44 2016 New Revision: 301874 URL: https://svnweb.freebsd.org/changeset/base/301874 Log: Fix usr.sbin/extattr testcases on tmpfs Skip the usr.sbin/extattr testscases if $TMPDIR is tmpfs, which doesn't support extended attributes PR: 210184 Reported by: ngie Reviewed by: ngie Approved by: re (glebius) MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D6802 Sponsored by: Spectra Logic Corp Modified: head/usr.sbin/extattr/tests/extattr_test.sh Modified: head/usr.sbin/extattr/tests/extattr_test.sh ============================================================================== --- head/usr.sbin/extattr/tests/extattr_test.sh Mon Jun 13 18:39:13 2016 (r301873) +++ head/usr.sbin/extattr/tests/extattr_test.sh Mon Jun 13 22:00:44 2016 (r301874) @@ -30,6 +30,7 @@ bad_namespace_head() { atf_set "descr" "Can't set attributes for nonexistent namespaces" } bad_namespace_body() { + check_fs touch foo atf_check -s not-exit:0 -e match:"Invalid argument" \ setextattr badnamespace myattr X foo @@ -42,6 +43,7 @@ hex_head() { atf_set "descr" "Set and get attribute values in hexadecimal" } hex_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user myattr XYZ foo atf_check -s exit:0 -o inline:"58 59 5a\n" \ @@ -53,6 +55,7 @@ hex_nonascii_head() { atf_set "descr" "Get binary attribute values in hexadecimal" } hex_nonascii_body() { + check_fs touch foo BINSTUFF=`echo $'\x20\x30\x40\x55\x66\x70\x81\xa2\xb3\xee\xff'` atf_check -s exit:0 -o empty setextattr user myattr "$BINSTUFF" foo @@ -66,6 +69,7 @@ long_name_head() { atf_set "descr" "A maximum length attribute name" } long_name_body() { + check_fs # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208965 atf_expect_fail "BUG 208965 extattr(2) doesn't allow maxlen attr names" @@ -84,6 +88,7 @@ loud_head() { atf_set "descr" "Loud (non -q) output for each command" } loud_body() { + check_fs touch foo # setextattr(8) and friends print hard tabs. Use printf to convert # them to spaces before checking the output. @@ -101,6 +106,7 @@ noattrs_head() { atf_set "descr" "A file with no extended attributes" } noattrs_body() { + check_fs touch foo atf_check -s exit:0 -o empty lsextattr -q user foo } @@ -110,6 +116,7 @@ nonexistent_file_head() { atf_set "descr" "A file that does not exist" } nonexistent_file_body() { + check_fs atf_check -s exit:1 -e match:"No such file or directory" \ lsextattr user foo atf_check -s exit:1 -e match:"No such file or directory" \ @@ -125,6 +132,7 @@ null_head() { atf_set "descr" "NUL-terminate an attribute value" } null_body() { + check_fs 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 @@ -135,6 +143,7 @@ one_user_attr_head() { atf_set "descr" "A file with one extended attribute" } one_user_attr_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user myattr myvalue foo atf_check -s exit:0 -o inline:"myattr\n" lsextattr -q user foo @@ -149,6 +158,7 @@ one_system_attr_head() { atf_set "require.user" "root" } one_system_attr_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr system myattr myvalue foo atf_check -s exit:0 -o inline:"myattr\n" lsextattr -q system foo @@ -162,6 +172,7 @@ stdin_head() { atf_set "descr" "Set attribute value from stdin" } stdin_body() { + check_fs dd if=/dev/random of=infile bs=1k count=8 touch foo setextattr -i user myattr foo < infile || atf_fail "setextattr failed" @@ -175,6 +186,7 @@ stringify_head() { atf_set "descr" "Stringify the output of getextattr" } stringify_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user myattr "my value" foo atf_check -s exit:0 -o inline:"\"my\\\040value\"\n" \ @@ -186,6 +198,7 @@ symlink_head() { atf_set "descr" "A symlink to an ordinary file" } symlink_body() { + check_fs touch foo ln -s foo foolink atf_check -s exit:0 -o empty setextattr user myattr myvalue foolink @@ -199,6 +212,7 @@ symlink_nofollow_head() { atf_set "descr" "Operating directly on a symlink" } symlink_nofollow_body() { + check_fs touch foo ln -s foo foolink # Check that with -h we can operate directly on the link @@ -221,6 +235,7 @@ system_and_user_attrs_head() { atf_set "require.user" "root" } system_and_user_attrs_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user userattr userval foo atf_check -s exit:0 -o empty setextattr system sysattr sysval foo @@ -240,6 +255,7 @@ two_files_head() { atf_set "descr" "Manipulate two files" } two_files_body() { + check_fs touch foo bar atf_check -s exit:0 -o empty setextattr user myattr myvalue foo bar atf_check -s exit:0 -o inline:"foo\tmyattr\nbar\tmyattr\n" \ @@ -256,6 +272,7 @@ two_files_force_head() { atf_set "descr" "Manipulate two files. The first does not exist" } two_files_force_body() { + check_fs touch bar atf_check -s exit:1 -e match:"No such file or directory" \ setextattr user myattr myvalue foo bar @@ -281,6 +298,7 @@ two_user_attrs_head() { atf_set "descr" "A file with two extended attributes" } two_user_attrs_body() { + check_fs touch foo atf_check -s exit:0 -o empty setextattr user myattr1 myvalue1 foo atf_check -s exit:0 -o empty setextattr user myattr2 myvalue2 foo @@ -305,6 +323,7 @@ unprivileged_user_cannot_set_system_attr atf_set "require.user" "unprivileged" } unprivileged_user_cannot_set_system_attr_body() { + check_fs touch foo atf_check -s exit:1 -e match:"Operation not permitted" \ setextattr system myattr myvalue foo @@ -333,3 +352,11 @@ atf_init_test_cases() { atf_add_test_case two_user_attrs atf_add_test_case unprivileged_user_cannot_set_system_attr } + +check_fs() { + case `df -T . | tail -n 1 | cut -wf 2` in + "ufs") ;; # UFS is fine + "zfs") ;; # ZFS is fine + "tmpfs") atf_skip "tmpfs does not support extended attributes";; + esac +} From owner-svn-src-head@freebsd.org Mon Jun 13 22:31:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 766B4AF2F4D; Mon, 13 Jun 2016 22:31:17 +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 38A3C2FDE; Mon, 13 Jun 2016 22:31:17 +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 u5DMVGBF017511; Mon, 13 Jun 2016 22:31:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5DMVGnF017509; Mon, 13 Jun 2016 22:31:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201606132231.u5DMVGnF017509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 13 Jun 2016 22:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301875 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 22:31:17 -0000 Author: pfg Date: Mon Jun 13 22:31:16 2016 New Revision: 301875 URL: https://svnweb.freebsd.org/changeset/base/301875 Log: Remove the SIOCSIFALIFETIME_IN6 ioctl. The SIOCSIFALIFETIME_IN6 provided by the kame project is unused, it can't really be used safely and has been completely removed from NetBSD and OpenBSD. Obtained from: NetBSD (kern/35897) PR: 210148 (exp-run) Reviewed by: ae, hrs Relnotes: yes Approved by: re (glebius) Differential Revision: https://reviews.freebsd.org/D5491 Modified: head/sys/netinet6/in6.c head/sys/netinet6/in6_var.h Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Mon Jun 13 22:00:44 2016 (r301874) +++ head/sys/netinet6/in6.c Mon Jun 13 22:31:16 2016 (r301875) @@ -360,7 +360,6 @@ in6_control(struct socket *so, u_long cm case SIOCSPFXFLUSH_IN6: case SIOCSRTRFLUSH_IN6: case SIOCGIFALIFETIME_IN6: - case SIOCSIFALIFETIME_IN6: case SIOCGIFSTAT_IN6: case SIOCGIFSTAT_ICMP6: sa6 = &ifr->ifr_addr; @@ -459,34 +458,6 @@ in6_control(struct socket *so, u_long cm goto out; } break; - - case SIOCSIFALIFETIME_IN6: - { - struct in6_addrlifetime *lt; - - if (td != NULL) { - error = priv_check(td, PRIV_NETINET_ALIFETIME6); - if (error) - goto out; - } - if (ia == NULL) { - error = EADDRNOTAVAIL; - goto out; - } - /* sanity for overflow - beware unsigned */ - lt = &ifr->ifr_ifru.ifru_lifetime; - if (lt->ia6t_vltime != ND6_INFINITE_LIFETIME && - lt->ia6t_vltime + time_uptime < time_uptime) { - error = EINVAL; - goto out; - } - if (lt->ia6t_pltime != ND6_INFINITE_LIFETIME && - lt->ia6t_pltime + time_uptime < time_uptime) { - error = EINVAL; - goto out; - } - break; - } } switch (cmd) { @@ -572,21 +543,6 @@ in6_control(struct socket *so, u_long cm } break; - case SIOCSIFALIFETIME_IN6: - ia->ia6_lifetime = ifr->ifr_ifru.ifru_lifetime; - /* for sanity */ - if (ia->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME) { - ia->ia6_lifetime.ia6t_expire = - time_uptime + ia->ia6_lifetime.ia6t_vltime; - } else - ia->ia6_lifetime.ia6t_expire = 0; - if (ia->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME) { - ia->ia6_lifetime.ia6t_preferred = - time_uptime + ia->ia6_lifetime.ia6t_pltime; - } else - ia->ia6_lifetime.ia6t_preferred = 0; - break; - case SIOCAIFADDR_IN6: { struct nd_prefixctl pr0; Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Mon Jun 13 22:00:44 2016 (r301874) +++ head/sys/netinet6/in6_var.h Mon Jun 13 22:31:16 2016 (r301875) @@ -453,7 +453,6 @@ struct in6_rrenumreq { #define SIOCSRTRFLUSH_IN6 _IOWR('i', 80, struct in6_ifreq) #define SIOCGIFALIFETIME_IN6 _IOWR('i', 81, struct in6_ifreq) -#define SIOCSIFALIFETIME_IN6 _IOWR('i', 82, struct in6_ifreq) #define SIOCGIFSTAT_IN6 _IOWR('i', 83, struct in6_ifreq) #define SIOCGIFSTAT_ICMP6 _IOWR('i', 84, struct in6_ifreq) From owner-svn-src-head@freebsd.org Mon Jun 13 23:36:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29559AF0EEE; Mon, 13 Jun 2016 23:36:17 +0000 (UTC) (envelope-from mahrens@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF58020D9; Mon, 13 Jun 2016 23:36:16 +0000 (UTC) (envelope-from mahrens@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5DNaGRo041947; Mon, 13 Jun 2016 23:36:16 GMT (envelope-from mahrens@FreeBSD.org) Received: (from mahrens@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5DNaGvY041946; Mon, 13 Jun 2016 23:36:16 GMT (envelope-from mahrens@FreeBSD.org) Message-Id: <201606132336.u5DNaGvY041946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mahrens set sender to mahrens@FreeBSD.org using -f From: Matthew Ahrens Date: Mon, 13 Jun 2016 23:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301876 - head/usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 23:36:17 -0000 Author: mahrens Date: Mon Jun 13 23:36:15 2016 New Revision: 301876 URL: https://svnweb.freebsd.org/changeset/base/301876 Log: Add myself (mahrens) to calendar.freebsd Approved by: mckusick Approved by: re (gjb) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jun 13 22:31:16 2016 (r301875) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jun 13 23:36:15 2016 (r301876) @@ -338,6 +338,7 @@ 10/25 Eric Melville born in Los Gatos, California, United States, 1980 10/25 Julien Laffaye born in Toulouse, France, 1988 10/25 Ashish SHUKLA born in Kanpur, India, 1985 +10/26 Matthew Ahrens born in United States, 1979 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 From owner-svn-src-head@freebsd.org Tue Jun 14 00:24:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AB6EAF1DE6; Tue, 14 Jun 2016 00:24:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 3D87C2C19; Tue, 14 Jun 2016 00:24:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 31ABD1AE6; Tue, 14 Jun 2016 00:24:17 +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 E014C21708; Tue, 14 Jun 2016 00:24:16 +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 f309ueLNWsQI; Tue, 14 Jun 2016 00:24:13 +0000 (UTC) Subject: Re: svn commit: r301814 - in head/sys: conf modules DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 3F3D121702 To: "Jonathan T. Looney" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201606101906.u5AJ6BVE045417@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <3706c18e-cc5b-d20a-26eb-6914118f9071@FreeBSD.org> Date: Mon, 13 Jun 2016 17:24:12 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <201606101906.u5AJ6BVE045417@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hEixmUwjJRfNU60a5SIIjMg9uUIEcCPL0" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 00:24:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hEixmUwjJRfNU60a5SIIjMg9uUIEcCPL0 Content-Type: multipart/mixed; boundary="mOJPLKDo8gAaSgeACukMUNeV3clcvCJPI" From: Bryan Drewery To: "Jonathan T. Looney" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <3706c18e-cc5b-d20a-26eb-6914118f9071@FreeBSD.org> Subject: Re: svn commit: r301814 - in head/sys: conf modules References: <201606101906.u5AJ6BVE045417@repo.freebsd.org> In-Reply-To: <201606101906.u5AJ6BVE045417@repo.freebsd.org> --mOJPLKDo8gAaSgeACukMUNeV3clcvCJPI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/10/2016 12:06 PM, Jonathan T. Looney wrote: > Author: jtl > Date: Fri Jun 10 19:06:11 2016 > New Revision: 301814 > URL: https://svnweb.freebsd.org/changeset/base/301814 >=20 > Log: > Change the default build behavior so we don't compile extra TCP modul= es by > default. At least initially, the feature to support multiple TCP stac= ks is > aimed at supporting advanced use cases and TCP development, but it is= not > necessarily aimed at a wide audience. Therefore, there is no need to = build > and install the extra TCP stacks by default. Instead, the people who = are > using or developing this functionality can add the extra option to bu= ild/ > install the extra TCP stacks. > =20 > However, we do want to build the extra TCP stacks as part of test bui= lds > (e.g. LINT or tinderbox) to ensure that developers who are testing th= eir > changes will know that their changes do not break the additional TCP > stack modules. > =20 > After this change, a user will need to add WITH_EXTRA_TCP_STACKS=3D1 = to > make.conf or the kernel config in order to build the extra TCP module= s. > =20 > Differential Revision: https://reviews.freebsd.org/D6795 > Reviewed by: sjg > Approved by: re (kib) >=20 > Modified: > head/sys/conf/kern.opts.mk > head/sys/conf/kern.post.mk > head/sys/modules/Makefile >=20 > Modified: head/sys/conf/kern.opts.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/kern.opts.mk Fri Jun 10 18:47:11 2016 (r301813) > +++ head/sys/conf/kern.opts.mk Fri Jun 10 19:06:11 2016 (r301814) > @@ -45,6 +45,7 @@ __DEFAULT_YES_OPTIONS =3D \ > =20 > __DEFAULT_NO_OPTIONS =3D \ > EISA \ > + EXTRA_TCP_STACKS \ > NAND \ > OFED no description found for WITH_EXTRA_TCP_STACKS, skipping A src.conf.5 handler is needed for this. Please add a WITH_EXTRA_TCP_STACKS file into tools/build/options, svn commit, svn up, and then run from that directory: =2E/makeman > ../../../share/man/man5/src.conf.5 Then commit ../../../share/man/man5/src.conf.5 (That's the process at least, both commits need re@ approval) --=20 Regards, Bryan Drewery --mOJPLKDo8gAaSgeACukMUNeV3clcvCJPI-- --hEixmUwjJRfNU60a5SIIjMg9uUIEcCPL0 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 iQEcBAEBAgAGBQJXX06sAAoJEDXXcbtuRpfP2poH/3+2SCeoTQlWjd8xY1R+eSPU MZt53w3hwwro7zeBfBZdPPM2S5zMyfHKc8ogpKDbu2WNbn69eYPQ3D9XkxKoZyRN bzs4XO99f2BwPPDE6KK0rygWgPXKkaVoZa6sXvbMPinKKcp1ctC2cl423cGDZYD9 c2Wx3raGxj6Xi+Iz/2Y7aGN+ogmAdKW1r8VtAOs95/2v8x7eZPa0k15gdCqWVIj3 hLoFCvXOrsDITRekpdmH0kj9jBPX7VBOPM8EK87dglkbsI+hMkR69ycK25T7iS61 abof8JtK9Y53k7OkPqfl6Y58pjgbUiOfzXWYK/vj2YzrKNU2fn98wyl+wKtbap0= =ASSR -----END PGP SIGNATURE----- --hEixmUwjJRfNU60a5SIIjMg9uUIEcCPL0-- From owner-svn-src-head@freebsd.org Tue Jun 14 01:36:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 980D7AF0BED; Tue, 14 Jun 2016 01:36:42 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52C8B2070; Tue, 14 Jun 2016 01:36:42 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by mail-qt0-x22c.google.com with SMTP id c34so39418028qte.0; Mon, 13 Jun 2016 18:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=qlB8YqasPFoTHMPPH8oVvK3RsHFQQt4nS5bdQKoVzqg=; b=PxJExDvBq2pVHHWhrLbkN7cTHC739jmhiPX5CFmQuE6mO9i46UoMx3ChpARzs1+KpF kfObFFa5WZIT/4ka87jWqmT6O+qPueMcQzDpw8/qbC7IJ0wEZh6iu4m29V31Uds1iIeq wxbQFQ8ytpzA+qihKjg/d3hs0Y0gxQ/UjX+IFxtDX9gUR0mJKN+e4AzSQhYfD4/hqBwX FmGdAVeH6J4o4OnBJBURV69rgWzkmxU154ckL3nqreUx9SA0TG52lKcPU0EezTemoNdD MxewIhu3WpAxVUOU1XuJQoowIz4gue7Y/lIPpbpMlkw9cLOXF8z+AYsUw4yUKce0PbBN aoFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version; bh=qlB8YqasPFoTHMPPH8oVvK3RsHFQQt4nS5bdQKoVzqg=; b=KkYaUUdOA5kFAEygGEAGEwyu8JsgrVUew1ei8up6TyMTSZeWvAfvp5ND597hrLi75i NiZxLIpCiGD6czd6Qp7zi9cqxzDmqcjTmcESiOkELXjL+dM1G5t9jp9BY5fcswQGCiUu 60Z7rCXe3KAkFWi0aOLgPX9y0V+hthNxhXznrKw+q6QbOpCVK6VrddJy19ceAcpxH/gv T9rRB85uRnWV92xZhy04ip4e35HxERyroIumn2/Po8+zxdh6jU6f/+7T9kP+AnmQlJh1 KpiNTVXQVkwr6dlPH98PZxQxQlGLxChsJLJJEjw3SoOtRs+x9yJtpKRfQnczNtkHe/60 HSSA== X-Gm-Message-State: ALyK8tJrNQEsmeKcnNAbblBEneonV5kMImBEUlOUPxKjojloyyxS9CaWfmmJkz9So7jrTg== X-Received: by 10.200.40.197 with SMTP id j5mr17581637qtj.14.1465868201397; Mon, 13 Jun 2016 18:36:41 -0700 (PDT) Received: from kan ([2601:18f:802:4680:226:18ff:fe00:232e]) by smtp.gmail.com with ESMTPSA id 8sm7583813qhm.1.2016.06.13.18.36.40 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Jun 2016 18:36:40 -0700 (PDT) Date: Mon, 13 Jun 2016 21:36:33 -0400 From: Alexander Kabaev To: Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301849 - head/sys/mips/mips Message-ID: <20160613213633.7fd1631a@kan> In-Reply-To: <201606130317.u5D3H0Kw091894@repo.freebsd.org> References: <201606130317.u5D3H0Kw091894@repo.freebsd.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/QZ.DN=rCde3_UE2=GrGf4kg"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 01:36:42 -0000 --Sig_/QZ.DN=rCde3_UE2=GrGf4kg Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 13 Jun 2016 03:17:00 +0000 (UTC) Adrian Chadd wrote: > Author: adrian > Date: Mon Jun 13 03:17:00 2016 > New Revision: 301849 > URL: https://svnweb.freebsd.org/changeset/base/301849 >=20 > Log: > [mips] set hardfloat for fpu instruction generation for > gcc/binutils 5.x=20 > This allows -HEAD to be compiled again using the gcc-5 mips port > compiler.=20 > Reviewed by: imp > Approved by: re@ >=20 > Modified: > head/sys/mips/mips/swtch.S >=20 > Modified: head/sys/mips/mips/swtch.S > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/mips/swtch.S Mon Jun 13 03:03:08 2016 > (r301848) +++ head/sys/mips/mips/swtch.S Mon Jun 13 03:17:00 > 2016 (r301849) @@ -400,6 +400,7 @@ END(cpu_switch) > * > *----------------------------------------------------------------------= ------ > */ > +.set hardfloat > LEAF(MipsSwitchFPState) > mfc0 t1, MIPS_COP_0_STATUS # Save old SR > li t0, MIPS_SR_COP_1_BIT # enable the > coprocessor Hi, https://github.com/akabaev/freebsd/commit/5735b8108c8831a5a649815318391789e= 977a198 is a bit more complete version that only enables hardfloat in routines that need it, not in random place of the file and for the rest of it. --=20 Alexander Kabaev --Sig_/QZ.DN=rCde3_UE2=GrGf4kg Content-Type: application/pgp-signature Content-Description: Цифровая подпись OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJXX1+iXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDNUY3RDk5NTk5QjY0MUUxM0M1MTU2OTEw NzEzMjI5OTkyNzkyRTdFAAoJEAcTIpmSeS5+RGcP/RMpBZdnLA2fessGs5rkyfMW urAT60bL7mYexwAVa3Dtn1kkHwCdrn6lZrkVyfxiEa8xPwuRLb0W/oBUOz5fJgUB EbSrvbcDyaHqHVwgd39hcGZEfm4bxftgws4nEJPUwJQpyYtKKiRvIJ1U9OsQnks4 q1M3m4DV9VU8MLI0b4U0E8KtLhoeAMLjWSCnw4N2ZGSyqkFxhjv+SNCkQ149Guma n5SZ/TX9BAvCmJOgMac+Zjwbk9MkwkyJPh4wxrYkeViKSMQOcCzxI71PJfqyoFd8 e/jDlyB4QEH1lSk4xF8Bu95A4rpoToEo3i+Uv8xXhHLM4WtRKwMkeYRwX70Xrjo9 CYrIzN6/5vF4lUraBCgLsQ+ZlwFA/TOtBaZ9FGtQ97AuOITZ79cxkWferVYA5v6e bkTqlWFavE52Kc5TLgCWx0jC0EiGk5PrCQeGYdpozSYoq6+OdN5ZaTq0KtX/+dWh 0j+QaBa9bDYrHWW+EZ1UaBeIGYcLR1mmx61P19tJTX+YRNzASwYi385ZWvM6rTGK UngA1CmwRw1utHu07GUkNyzMQEiphEL3HO7lhiKHitvgTKdfOQR46T7+mqenjtKH iv7rud+Eo+tR5Ja2w2tWyAzZOy1uJRvDLV/CPp3lPI82/d4qecQppU4pIj3CyX1m EZ2ees+5Ggby4MLF/tWR =Xokx -----END PGP SIGNATURE----- --Sig_/QZ.DN=rCde3_UE2=GrGf4kg-- From owner-svn-src-head@freebsd.org Tue Jun 14 01:48:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0CA4AF0FDE; Tue, 14 Jun 2016 01:48:28 +0000 (UTC) (envelope-from jtl@freebsd.org) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0112.outbound.protection.outlook.com [207.46.100.112]) (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 183B625D4; Tue, 14 Jun 2016 01:48:27 +0000 (UTC) (envelope-from jtl@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=junipernetworks.onmicrosoft.com; s=selector1-junipernetworks-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KfGZ/F7zcNR+p+YKUQz4QnA3sW9SCafiGuxx4t5CloY=; b=f/ceZcTvb3uIkRnZ1qOrHTfVZmanmOfD6XrOH131Ef1ojksFKszv3iy3dNGP9GWsfZgmPfdYh2XGLWOSacDFJvpgeCNgFYlpSjY51Olzg4Kng6lf6vwx4Uw8Bo6bbHbAhmC7O5gFHxIEtsGNFFsOFaQVHtqHlAyxF+m8G7EBd5c= Received: from BY1PR0501CA0009.namprd05.prod.outlook.com (10.162.139.19) by DM2PR0501MB811.namprd05.prod.outlook.com (10.242.115.141) with Microsoft SMTP Server (TLS) id 15.1.517.8; Tue, 14 Jun 2016 01:18:05 +0000 Received: from BL2FFO11FD016.protection.gbl (2a01:111:f400:7c09::198) by BY1PR0501CA0009.outlook.office365.com (2a01:111:e400:4821::19) with Microsoft SMTP Server (TLS) id 15.1.517.8 via Frontend Transport; Tue, 14 Jun 2016 01:18:05 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.19) smtp.mailfrom=freebsd.org; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=freebsd.org; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning freebsd.org discourages use of 66.129.239.19 as permitted sender) Received: from P-EMFE01C-SAC.jnpr.net (66.129.239.19) by BL2FFO11FD016.mail.protection.outlook.com (10.173.160.224) with Microsoft SMTP Server (TLS) id 15.1.511.7 via Frontend Transport; Tue, 14 Jun 2016 01:18:04 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMFE01C-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Mon, 13 Jun 2016 18:18:03 -0700 Received: from [172.29.35.241] ([172.29.35.241]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id u5E1I2E93985; Mon, 13 Jun 2016 18:18:02 -0700 (PDT) (envelope-from jtl@freebsd.org) User-Agent: Microsoft-MacOutlook/f.16.0.160506 Date: Mon, 13 Jun 2016 21:18:01 -0400 Subject: Re: svn commit: r301814 - in head/sys: conf modules From: "Jonathan T. Looney" Sender: Jonathan Looney To: Bryan Drewery CC: , , Message-ID: Thread-Topic: svn commit: r301814 - in head/sys: conf modules References: <201606101906.u5AJ6BVE045417@repo.freebsd.org> <3706c18e-cc5b-d20a-26eb-6914118f9071@FreeBSD.org> In-Reply-To: <3706c18e-cc5b-d20a-26eb-6914118f9071@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.129.239.19; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(979002)(6009001)(7916002)(2980300002)(199003)(24454002)(51914003)(377454003)(189002)(82746002)(19580395003)(19580405001)(8936002)(106466001)(83506001)(2950100001)(4326007)(69596002)(16796002)(47776003)(105596002)(86362001)(68736007)(11100500001)(6806005)(54356999)(87936001)(76176999)(36756003)(586003)(9686002)(50986999)(50466002)(83716003)(77096005)(33656002)(92566002)(23676002)(189998001)(97736004)(356003)(4001350100001)(450100001)(110136002)(81156014)(2906002)(230700001)(81166006)(8676002)(5820100001)(42262002)(104396002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0501MB811; H:P-EMFE01C-SAC.jnpr.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; CAT:NONE; LANG:en; CAT:NONE; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD016; 1:9pru0jW7EaMFkwhOzXPra1uAE6AbCRZh2u+tu8I5eSkBoW1VNNRyavLuDXoc42rB1eoatSYwsBlBDxb1jV1dDsNrcA08DquXWzquboHGhjh04Tyar0ihCYDYw+2ci7gfCQxlt5ZqfbxRBKAXiRetz8rhrXNC088VVZmhHLFXqfKSpLX1NWC9c5U+SiA3SyrHKlhc3akklyN5yVHzKGCCVmn+olTa4FOoAJf0dZIw0wXBGg0s2oMMlcqxllbIot0fEdWSfyalGR7or3av0cf+75VsLEOfr/hQIVdFGg2XjsJfQ70MYZ/+VZmBnO7GN7Hoifxy7K+GSvd3i6qo7K5ocCEPMN7CfQShmkpf0a4Qr5bhPE/xFqmTxksBR1SaxbmQY3WO7hz7UWJh+WaX4ULncELkOS+LnZ4YopwfQ7j4C0ZA68Y2kqjOYcx1wlhO375XObihncdcOZJzZdu1L3UPcF1H/8vIu+YQTyzLTp0q46lErcZbBR3UGz1zcCPDzXQoZ5/KOAsoAgESNpZeg7juYry7ifm+cF+9vEg7Ctpobk8= X-MS-Office365-Filtering-Correlation-Id: bb475f5c-19fa-4d9c-8b51-08d393f1bc95 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB811; 2:UwVgRdZGt/L4YKaWHJU98Dm7ZN+5NhHLpbq5++hUeGnvNFDejD3vI0xOLJmsXDWVmMvVhiuIOR0DTbk96sWAw2qN9RaW6OKbo891txYiGUN40FvUvgANVlszEEjvFa9I4uA3KbEqiWq8V2QLuhm1DVdvObi/XUgFlYm9QocJO1xAtaEAqc7SyYAElVSqMK9S; 3:Hp9TdK6NMnxbyX+KqIlKp7ViMMo0fpN6I+6FukAzAgTe0p0LXY3ZAsadTSgG+LBdo3KAwzR2aWppH4s1wz+2KFGQYbqygLzG3pscNNWJ8jTT15x1HAAKKNe5w/14CddcStXAzeqlqdGdMmm7ZPSSA2j4PMQzgq3amoFgiUPATo9yYQXAIAH3LQvYoQIOA9+J7eX0SALcXLw5HGU/fGy85rlHAzCpqfvINcustMyeaeE=; 25:XoF7ckuqPRuIPr+tS6880X/3m605gSI8sU6vTwf1HCSVEBxnQ4NkmeM1MVnmBg3ij8UJyfYLoJiDLxM+Tj1G02OJ0dFjh33fyx/qBfCT3Hu8LnrolFxa2UEEn0F6wSCSQfdWs2bGRwo+Huqg6MDJ1Vfe7kFq2gwqbE+US4yIQ9rO4YaRrEMdbWDJAkPt1+r/Jxy6JboF8XQoHbRKfRp4T7CddLYFDm+MxFNdbOhNL4FqrpNQmPPi8RlQ0qBgan9WhKhzavxyfZR2N45rfwcESu5n/d/9l6jk6S7v0Juk06lefV79KNyDYa8R7N7VM0GHg2K0Uv6MiF/ZOay0i2cZZu9B+0fMEkoHAzeK4enE5+A/6PyxBoFRh/fGVTlvz6NKlnyBjA41hZc7IM1ga7Z1ap8rO2MvqFlNIRvrsvFLiPI= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0501MB811; X-JNPR-Received-From: outside X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB811; 20:yWilHwLQHMykajL5Q+6DhC0HukFTzXFJGCflyMGQ5Cxmv5aR9uPSGgnvSqFbEe1KdKMvNi4/y2ZjbQj10YJ01kE21p5D3if65OoKqoMpkWEsmZhoehnCoVyRAg9hLhJeq0fxPJtzZNGU1ELpqlMcw7kxoOZXpklxE5aB/K9gxiLchA4Qa7IbYJi0EdaFYcRNXQvaCxY8QOFVG/0uclKDkOmxnzioAhHrtUp3paQUnlaXU9sDNe3YtzGgD/lVTZygAtsIdPgDJFW1prD0l7dRfQB2cpSm3GAftBkbZtPFI9QbUIosgVIsZJWYABebjH8NXvsx5l4Rj4EDOLhuKBSswkJhDBjgcRnjziSpA7yaUimN94fFR9WcdA0Zf8MhgaiNeRxNCylHI+urgbJb0JWi9MxiqwF4qAB9FPvIZrvx6c1N1Dt7soDSUxG4qISjHWd2kWLbAnM6qvlPt1ATzQUOQjAuAyYfy9Ow8m5U+tX/phASbhfFFxcK5bRUFRBwWTJt X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13015025)(13017025)(13018025)(13024025)(13023025)(3002001)(10201501046)(6055026); SRVR:DM2PR0501MB811; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0501MB811; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB811; 4:2lhWd3hHDFQvdvdp/ME6MSKZodeHf0wQU+wDZSYlnhUyZO7YtLtZD3u64UtcHslwbP2ZJzo6Mslpg8CA67N5BFSkPILPwDO8oP2SYqn2SjZznFl/c89VT3AARyu69OxEqLIHOO1pBtKOes8YO2WTclo/FgZQj8riIxO4ft6beiaCZjukHs2ZDt9VqZH7NZqV9+rVIsm8vT7AoX6Di7EAlmpMr7Zaq4+5SkArnJ/JSKYHhoHqjYroRW95kCOW+yw2rz/iQv/K/9C2QVyhbooi57zHi77kVo7hTgVNvy9sazKpF7QJgc/RGxjBCzNStkLwJPYjavE27+O/BpjXwxNvsqyxFgtYFwppX2gh8y5NuxPt9HXd+gU/BRUSPT+9YdAnRD3S+NNvLCtDJwVwIaqHLthf2ZMVuRycphHKDAC8zPPcH+Gxh82/qwX4et42Bq7xKfJl2M8rEJjiLUJtPcCDkCh6PhcG0Y6JTLX5IaJ9qgk= X-Forefront-PRVS: 09730BD177 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjA1MDFNQjgxMTsyMzovTXBNSXRBZlM0NkQyTnN2NXp1dWFsY0F3?= =?utf-8?B?YnVVN2xXSlJjMndTbC8vbW1EYmxWVWJlb3B3aGNPWVBKVFBQYVViOVVzVjhu?= =?utf-8?B?eHFyQWs0NEJqd1lod3U5R1RGZjVlQkRQaER6RU12Zkw3SHBoNjEyNUh4OFdK?= =?utf-8?B?UHp6RE9lcVhoY0hwSEo5SHR4TXVEU2lsYzVyVHZtMEFZUUU3QXFVNmRCWHN5?= =?utf-8?B?U0J4bitUdWk2ZzVNc1M0VWhOeEtUNHcvM1RzYWptWmp3NFlnVm1Oai9KbWNx?= =?utf-8?B?cVliL2FTdjlmMWVYUEJkM0hwZ28vZE40VmZjNjQvVG41T3MzTFZCSk5iaE14?= =?utf-8?B?VXFtM09HSW1xNkJ1aXdqU0FOZnhndEh0ajZveHlNRmFNUWVKVkw4eVo4ZVZP?= =?utf-8?B?M2s5ODJ5OU1peXo5RGMra25qS1Zmb0lYdSs0bVk5U1VyM0N0RllCK2pwNmxy?= =?utf-8?B?bjFWWEhkN2tQVytNRHFKRFFPelQ5ZjhPdXYxZnVhTjJ3bWMvTDc3VUVnajRv?= =?utf-8?B?eERmVzBHTkJ6SWJIMjk0WTVzMTd5SWZSNDBTNlpFeTNGVktucnNnQ1N1a204?= =?utf-8?B?aHJWV1RHazI2SnJhMTFDOHk3R0UvdjFKNGxpZzhQRzU1WlRVUDV1bjZnNjNH?= =?utf-8?B?UE1YbW5zN3BabHJ4a0c2KytVaTcwTlRLYjBQRklnQkNWbUFuc1ExbWdXYmNp?= =?utf-8?B?WFBqV3ptTnMrRXV6Wlc3SUpYUE5qWGN6RCthVlhCczE4RktldkZYK01hWC9Y?= =?utf-8?B?cTlVd09mMUNJYUpJRnFzVUlrMmRFOW5tVDVyZFlzcE56dE55a2ZrT1MySzho?= =?utf-8?B?L2lTTmwvU3hOVy9aa1ZOYmt4YmtBNTVDSzlqOCtvc0h1UWNrekIrTk1hLzMv?= =?utf-8?B?bks5em4yMWJyZnRtVjlDTDRSek5kK1BaK21VbmdIS3Y0SzhiRnJqOXA3ZWdT?= =?utf-8?B?OGU1cGJzTmU5TEkyMUhzVzNsTlZjQlBhWUorQStmd1A4MUVZVWJ0d1AzdUhS?= =?utf-8?B?SDRRdnZQMXVEVlVRMVN2NVZwb2dMeXlnaHJHTjd6UzBFSko2NXZMUDA4dmVW?= =?utf-8?B?Y21FSkxhSWFQQzlLTnpETzFWZ0NnOVVhb2lKUGhhNk1BMUhhVUNvUTdXelNi?= =?utf-8?B?RHRNQm1WL1FhUDVNaXY4c1hzTzZRemgrVkFOYUVaUG8wbHE4ZlFqM3NGUUth?= =?utf-8?B?TVYrbndrUnVPaHlDbCttWU5oL0tiTG5KTUpzTkN5Qm1VUmxyVFhoOFNiT1R6?= =?utf-8?B?V1BZSFYrNjQ5U3o4a1A4czhGRlZLK2FkemlxTE5Ocm4yRjQyMDNaUFJUSGZo?= =?utf-8?B?OHVFeEcvb2FMNENTS3NQQzlVc2ZsT2hyTG5xdVZZRzZGZlJ4WDJJdUZ0S0NW?= =?utf-8?B?WHMxMGRZcVZMb25oaWgyWWlHRjZCc29oeGlQSHFzTWdGL2ZzSnBIbHkwN0kw?= =?utf-8?B?QlZJVEpObk1TUHJWcXpJTVRVeHptazV2WUg2SWE0ZFhPRG9zbDh4SkRQOGpU?= =?utf-8?B?aHZkb3F2WWNpby92K1NZc0xudS9KMGVKcDV5MEV1RzYvUlc1S0h1WVlwcUpz?= =?utf-8?B?d1haQ3paeFU4cUZzTG0rcEVOaGlMWTV2YUllOStwa3BObHdRa3VDNHRGakh3?= =?utf-8?B?WWpSbXo0TDhaTzBOVHFvcHEycjdnRzQ2RjFwMFpsWGhqb1dta1hNdU0wRytv?= =?utf-8?B?dndLL29DcXJobytVa050bVI3RGRsaFY0cWhCQVB2QVFmcXRWeVVlSENKam9K?= =?utf-8?B?ejlJdk5uZWl6ejZZc2V5WUo1NU5xQlpCUy9SMS9KT2ZBRTg5OXdHU00yckth?= =?utf-8?B?YlIrWU83aGYydEI0OEhEWmpKS1VLcXN5NTkybzFETWUzR3NHWmVZQzY0b05Z?= =?utf-8?Q?77nvtgrVk68o=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB811; 6:Z88YTR7dsoAx4+eos51yMsBuO5yRz1rReTSNjRZMDQZ0DiYGt0vqpQc9Kkwor9d3TtQgWO1NNwYTbKPai+4dCudxcEqXoYiqnnqieGfigacZoih16TfPv8HUT/IW/ei4Zd8SYQsX6wpNXMnupaxX1eT5oShLYx8h0cgHr7nCewro2Nli3liNop11k+d6zj8C9QmyFRldRhFe1i9B4wpe2RRj7gHUwnQgVPYB+VnpHEggKH6iRJvgyzYKD5Sg1l8L/MnlorL2SoVDEVXrIf9yjszVlQwgJ46Q1bQTcKrV/cuqBDG7pTT/pkmXKSO5WdTt9MyYDRQ0NS2FsJzQGYnMOA==; 5:Rdoeovz0Y+dQOSRKbRlmDKK9QAAt7csPxhXARLE0kEuOg1/7iRXJ376058/ajQtWy5rppEg3+PDvwxROB+39eJTARmQOifSK0x9V4dbEP/M/sEgRmjmexlpInxnx9GKRVE2AWPGfDsV17T+4+khHxw==; 24:tpxlWkt782a84QkNiw7KB5mZEoxAlXygGIINRSr1+AII2/zDl6MG6YIhlKjlJwZTbLiY75JKZqocQ7LDIu1XT2DA0epM3267zpBPaNb+LTU=; 7:RtMXEac4gSI11VEcjjNongvBBp8rC4ONMyMpLNNAJy5PWy5oBz+m3bTxMvBVtZpXcqe2y/tSKx0TLZ9HyfkbrX23OuUgCZnEryov2E3eEg9NvywuShLJgIU9XqBnzbdlvys5vT76ezLozJa2n6ss3BokxxJ6xWCEvkj1azsnbFgm2dHsED01giokeksSRwe8lohyn8AXWjGqo73/k/8AqiJpmedDuSbWaCsCi+P3444= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2016 01:18:04.6102 (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.19]; Helo=[P-EMFE01C-SAC.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0501MB811 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 01:48:29 -0000 On 6/13/16, 8:24 PM, "Bryan Drewery" wrote: >no description found for WITH_EXTRA_TCP_STACKS, skipping >A src.conf.5 handler is needed for this. > > >Please add a WITH_EXTRA_TCP_STACKS file into tools/build/options, svn >commit, svn up, and then >run from that directory: > >./makeman > ../../../share/man/man5/src.conf.5 > >Then commit ../../../share/man/man5/src.conf.5 > >(That's the process at least, both commits need re@ approval) Thanks for the info! I'll add it to our existing "to do" item to add documentation for this feature. (In theory, that will happen in the next week or so.) Jonathan From owner-svn-src-head@freebsd.org Tue Jun 14 03:57:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C994AF2D8D; Tue, 14 Jun 2016 03:57:01 +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 2DAFD268B; Tue, 14 Jun 2016 03:57:01 +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 u5E3v0J6037098; Tue, 14 Jun 2016 03:57:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5E3v0G4037097; Tue, 14 Jun 2016 03:57:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201606140357.u5E3v0G4037097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 14 Jun 2016 03:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301877 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 03:57:01 -0000 Author: markj Date: Tue Jun 14 03:57:00 2016 New Revision: 301877 URL: https://svnweb.freebsd.org/changeset/base/301877 Log: Add a missing error check for a malloc() call in idr_get(). Submitted by: Matt Joras Approved by: re (gjb) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/compat/linuxkpi/common/src/linux_idr.c Modified: head/sys/compat/linuxkpi/common/src/linux_idr.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_idr.c Mon Jun 13 23:36:15 2016 (r301876) +++ head/sys/compat/linuxkpi/common/src/linux_idr.c Tue Jun 14 03:57:00 2016 (r301877) @@ -292,7 +292,8 @@ idr_get(struct idr *idr) return (il); } il = malloc(sizeof(*il), M_IDR, M_ZERO | M_NOWAIT); - bitmap_fill(&il->bitmap, IDR_SIZE); + if (il != NULL) + bitmap_fill(&il->bitmap, IDR_SIZE); return (il); } From owner-svn-src-head@freebsd.org Tue Jun 14 04:51:39 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 592B7AF2B41; Tue, 14 Jun 2016 04:51:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 339462C0C; Tue, 14 Jun 2016 04:51:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 274011822; Tue, 14 Jun 2016 04:51:39 +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 0305721E5A; Tue, 14 Jun 2016 04:51:37 +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 5Vflzt4UxQ-I; Tue, 14 Jun 2016 04:51:35 +0000 (UTC) Subject: Re: svn commit: r300770 - in head: . contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libc++/src/include contrib/libc++/src/support lib/l... DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com D9CF021E52 To: Dimitry Andric , Alan Somers References: <201605261852.u4QIqn5w073953@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Organization: FreeBSD Message-ID: <0602fe0c-8194-ed6f-fb1d-596b7acad6c0@FreeBSD.org> Date: Mon, 13 Jun 2016 21:51:33 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="UDDvSVvDP4uoce7XVIkEKEv4FXkkuOOHk" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 04:51:39 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UDDvSVvDP4uoce7XVIkEKEv4FXkkuOOHk Content-Type: multipart/mixed; boundary="bOO6MvPeNk3qsxe8RirmL22clJqIpAOsL" From: Bryan Drewery To: Dimitry Andric , Alan Somers Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-ID: <0602fe0c-8194-ed6f-fb1d-596b7acad6c0@FreeBSD.org> Subject: Re: svn commit: r300770 - in head: . contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libc++/src/include contrib/libc++/src/support lib/l... References: <201605261852.u4QIqn5w073953@repo.freebsd.org> In-Reply-To: --bOO6MvPeNk3qsxe8RirmL22clJqIpAOsL Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 5/27/16 9:19 AM, Dimitry Andric wrote: > This is most likely caused by the option: >=20 > -isystem /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr= /include >=20 > because that forces this path to become before any auto-detected system= > include directory. Note that this option is not needed, since the othe= r > option: >=20 > --sysroot=3D/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32 >=20 > is already taking care of adding the right include directories. It eve= n > warns about the duplicate directory: >=20 > ignoring duplicate directory > "/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include= " Argh, I wish GCC cross-compiler wasn't so dumb. It does require -isystem despite --sysroot. It's working currently due to a mistake of having X_COMPILER_TYPE set even for native GCC builds. This is just a reminder that GCC --sysroot is not nearly as useful and obvious as clang's. I'm unwinding some bugs from this and other related X_COMPILER changes. --=20 Regards, Bryan Drewery --bOO6MvPeNk3qsxe8RirmL22clJqIpAOsL-- --UDDvSVvDP4uoce7XVIkEKEv4FXkkuOOHk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJXX41WAAoJEDXXcbtuRpfP7RAIAJY74mB8FRvwWnOsrG+uUUTH CavT9z74AnwpQY0hnjD8IQN9ocl8NwzlaYgVk13cG7a1QjhpaMkSgc+uTbjMtVET TNS6qevJoGEJuCgtKN2sm5ot8Tz/BNVVi5fqdykHPlyvf1bMQLmjQdr3WP3dg801 qERY9E1xVmnk5BLtqDZipuqLDGFFKfNH6q4pkGW6ihM9PiaELkiSJVpzZqm4zVb4 0y8IgtA5zZ/+gTahyHokGkmjtwNgJJu0R0C3VrNNaBbAc2/5fmGem93+pGXouIn+ SB6All60NWvtukzNSZluxHmXzDRRJj3aSetwRcr0IfH0QtHuJU9talcDwiDv2NE= =onaI -----END PGP SIGNATURE----- --UDDvSVvDP4uoce7XVIkEKEv4FXkkuOOHk-- From owner-svn-src-head@freebsd.org Tue Jun 14 05:38:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A66FAF24CA; Tue, 14 Jun 2016 05:38:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 392CA2E93; Tue, 14 Jun 2016 05:38:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x229.google.com with SMTP id e5so59193686ith.0; Mon, 13 Jun 2016 22:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ah2z3l08QjIA4IO/AEQ2z0TAvoO1GWAwU8UNGntj3rg=; b=mZTasoqq+VyVkzFJE5aozu4ZqJ4AwZnSnvFOyoF74JYPee8DYQSiB9PLMwxZ2M3OZ8 p3atETTC3HwNkro3HrlqM+1qt3KP27asiJdawMcOedZdf0UMQFh19wamTHk0oVD2tpH0 FfVwTMr5D2HEjxIDj9OmIW776Oh4Db8Xaxfd2tkVc287sZjWK4XGiWS/krTE+BbEK+k2 ih9oKQw9fWkT9DsuBDUKDS/phuPusKJMHQ/K8aJeERNKUcl8GyNR8fAdrNufpCqPsYHP bG+vjRizmq31zl0X300EgKVY6FcMkrjrCxB7dWJnSuxZFvbBlZXcYqeiHFV1+pE7lhLY x3HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ah2z3l08QjIA4IO/AEQ2z0TAvoO1GWAwU8UNGntj3rg=; b=IYY0fPlqeHrbmrW28abnYxao5KC1F+B7g31ReLC/qUQZE6yuZ14csYGMWNLLHlLBnY rWhSNrt/D0c5DfEorfhaEO1eCJSuLkv5tZet8ogonmpADTcegVeWbEiL8jAwd8Q2q3Eq zYW69LULSkXBZZE7Hdmzw7j/y/cLRJvTVRiEXpXQVwQgdB0ZAmrLrBsN5lVqRR1emShl Wr411rXdUO3R6Z61V1Wa8buJNFAZvzLqPTkltDwjjmEsrp70XbAjozRwgjrIareiZMsR oKWTVeP2vIb3tsF3feV8vRYhx/58JTrBYGeDZXco1PFS578gzOGcCKeAzsak3Pm0yRko FymQ== X-Gm-Message-State: ALyK8tKAUhQ9u+PMPr4bjLuWIZ+evT5R5WuWSuGilUZknCzbyQRzVKJbEApmRM3GdIDq0drv+F4z1HWeLY7Seg== X-Received: by 10.36.51.15 with SMTP id k15mr5039536itk.80.1465882700619; Mon, 13 Jun 2016 22:38:20 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.113.3 with HTTP; Mon, 13 Jun 2016 22:38:19 -0700 (PDT) In-Reply-To: <20160613213633.7fd1631a@kan> References: <201606130317.u5D3H0Kw091894@repo.freebsd.org> <20160613213633.7fd1631a@kan> From: Adrian Chadd Date: Mon, 13 Jun 2016 22:38:19 -0700 X-Google-Sender-Auth: 7N1OPYKcdG-9boisCA9c8A_2JXE Message-ID: Subject: Re: svn commit: r301849 - head/sys/mips/mips To: Alexander Kabaev Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 05:38:21 -0000 I'll test that now. Thanks! -a On 13 June 2016 at 18:36, Alexander Kabaev wrote: > On Mon, 13 Jun 2016 03:17:00 +0000 (UTC) > Adrian Chadd wrote: > >> Author: adrian >> Date: Mon Jun 13 03:17:00 2016 >> New Revision: 301849 >> URL: https://svnweb.freebsd.org/changeset/base/301849 >> >> Log: >> [mips] set hardfloat for fpu instruction generation for >> gcc/binutils 5.x >> This allows -HEAD to be compiled again using the gcc-5 mips port >> compiler. >> Reviewed by: imp >> Approved by: re@ >> >> Modified: >> head/sys/mips/mips/swtch.S >> >> Modified: head/sys/mips/mips/swtch.S >> ============================================================================== >> --- head/sys/mips/mips/swtch.S Mon Jun 13 03:03:08 2016 >> (r301848) +++ head/sys/mips/mips/swtch.S Mon Jun 13 03:17:00 >> 2016 (r301849) @@ -400,6 +400,7 @@ END(cpu_switch) >> * >> *---------------------------------------------------------------------------- >> */ >> +.set hardfloat >> LEAF(MipsSwitchFPState) >> mfc0 t1, MIPS_COP_0_STATUS # Save old SR >> li t0, MIPS_SR_COP_1_BIT # enable the >> coprocessor > > Hi, > > https://github.com/akabaev/freebsd/commit/5735b8108c8831a5a649815318391789e977a198 > > is a bit more complete version that only enables hardfloat in routines > that need it, not in random place of the file and for the rest of it. > > -- > Alexander Kabaev From owner-svn-src-head@freebsd.org Tue Jun 14 06:21:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDCDDAF2BF7; Tue, 14 Jun 2016 06:21:52 +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 BE1EE2F8B; Tue, 14 Jun 2016 06:21:52 +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 u5E6LpMS091268; Tue, 14 Jun 2016 06:21:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5E6Lptr091267; Tue, 14 Jun 2016 06:21:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201606140621.u5E6Lptr091267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 14 Jun 2016 06:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301878 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 06:21:53 -0000 Author: adrian Date: Tue Jun 14 06:21:51 2016 New Revision: 301878 URL: https://svnweb.freebsd.org/changeset/base/301878 Log: [mips] Tidy up setting/clearing the hardfloat flag. Submitted by: kan Approved by: re (delphij) Modified: head/sys/mips/mips/swtch.S Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Tue Jun 14 03:57:00 2016 (r301877) +++ head/sys/mips/mips/swtch.S Tue Jun 14 06:21:51 2016 (r301878) @@ -400,8 +400,9 @@ END(cpu_switch) * *---------------------------------------------------------------------------- */ -.set hardfloat LEAF(MipsSwitchFPState) + .set push + .set hardfloat mfc0 t1, MIPS_COP_0_STATUS # Save old SR li t0, MIPS_SR_COP_1_BIT # enable the coprocessor mtc0 t0, MIPS_COP_0_STATUS @@ -503,6 +504,7 @@ LEAF(MipsSwitchFPState) ITLBNOPFIX j ra nop + .set pop END(MipsSwitchFPState) /*---------------------------------------------------------------------------- @@ -523,6 +525,8 @@ END(MipsSwitchFPState) *---------------------------------------------------------------------------- */ LEAF(MipsSaveCurFPState) + .set push + .set hardfloat PTR_L a0, TD_PCB(a0) # get pointer to pcb for thread mfc0 t1, MIPS_COP_0_STATUS # Disable interrupts and li t0, MIPS_SR_COP_1_BIT # enable the coprocessor @@ -581,6 +585,7 @@ LEAF(MipsSaveCurFPState) ITLBNOPFIX j ra nop + .set pop END(MipsSaveCurFPState) /* From owner-svn-src-head@freebsd.org Tue Jun 14 12:56:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92A78B68886 for ; Tue, 14 Jun 2016 12:56:36 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: from vfemail.net (onethreetwo.vfemail.net [199.16.11.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 484F32F64 for ; Tue, 14 Jun 2016 12:56:35 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: (qmail 9502 invoked by uid 89); 14 Jun 2016 12:56:27 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 14 Jun 2016 12:56:25 -0000 Received: (qmail 68072 invoked by uid 89); 14 Jun 2016 00:32:38 -0000 Received: by simscan 1.3.1 ppid: 68064, pid: 68068, t: 0.0045s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 14 Jun 2016 00:32:38 -0000 Received: (qmail 3003 invoked by uid 89); 14 Jun 2016 00:32:38 -0000 Received: by simscan 1.4.0 ppid: 2983, pid: 2996, t: 0.7573s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by mail.vfemail.net with ESMTPA; 14 Jun 2016 00:32:37 -0000 From: Jan Beich To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r299448 - in head/sys/cddl/contrib/opensolaris: common/acl uts/common/fs/zfs uts/common/sys References: <201605111343.u4BDhKhp076695@repo.freebsd.org> Date: Tue, 14 Jun 2016 02:32:26 +0200 In-Reply-To: <201605111343.u4BDhKhp076695@repo.freebsd.org> (Alexander Motin's message of "Wed, 11 May 2016 13:43:20 +0000 (UTC)") Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 12:56:36 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Alexander Motin writes: > Author: mav > Date: Wed May 11 13:43:20 2016 > New Revision: 299448 > URL: https://svnweb.freebsd.org/changeset/base/299448 > > Log: > MFV r299442: 6762 POSIX write should imply DELETE_CHILD on directories = - and > some additional considerations >=20=20=20 > Reviewed by: Gordon Ross > Reviewed by: Yuri Pankov > Author: Kevin Crowe >=20=20=20 > openzfs/openzfs@d316fffc9c361532a482208561bbb614dac7f916 This commit confuses acl_is_trivial_np(3). Notice '+' in ls(1) and 'D' in getfacl(1) outputs. $ ls -ld /etc drwxr-xr-x 28 root wheel 121 Jun 10 11:03 /etc $ getfacl -q /etc owner@:rwxp--aARWcCos:-------:allow group@:r-x---a-R-c--s:-------:allow everyone@:r-x---a-R-c--s:-------:allow $ mkdir /foo $ ls -ld /foo drwxr-xr-x+ 2 root wheel 2 Jun 14 08:17 /foo $ getfacl -q /foo owner@:rwxpD-aARWcCos:-------:allow group@:r-x---a-R-c--s:-------:allow everyone@:r-x---a-R-c--s:-------:allow=20=20 $ zfs get all rootfs | fgrep acl rootfs aclmode discard default rootfs aclinherit restricted default --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJXX1CaXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3b5tIIAIQKbFxcG50EZP/XOhq/MeSl 0sRwCumNeaZuyLL/b1XOkR06iLb9S/Kw/c/MYIjKNs+HsEYgHBcX8N/QEfwVTJq9 jh+palnDYlWcqwK6Xzwr+R2a2a5KAbhyzO76JYJ9Skgvoi53TsUcFHU4BVzQlvr8 6gnwT3QZizg02/g2TQs9xexUa7dr61SVcBDxZBuo8g/piwdS0LkSeDhvp1P+v4ts mCuCHfVhLyCB7KAlgyK+IZEyPxancqA/nihpcxII/A/M/6pTUQO1AafdeM880NaI edZQXQbO8oop5l+6z+MIlnAc4DBhTsEwYkdTg49y5l1aBSHH6tQ42ugL0YafkNc= =GP8q -----END PGP SIGNATURE----- --=-=-=-- From owner-svn-src-head@freebsd.org Tue Jun 14 14:03:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 281A4AF285C; Tue, 14 Jun 2016 14:03:30 +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 E7C172F13; Tue, 14 Jun 2016 14:03:29 +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 u5EE3T5s059808; Tue, 14 Jun 2016 14:03:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EE3Smt059800; Tue, 14 Jun 2016 14:03:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201606141403.u5EE3Smt059800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 14 Jun 2016 14:03:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301879 - in 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 14:03:30 -0000 Author: emaste Date: Tue Jun 14 14:03:28 2016 New Revision: 301879 URL: https://svnweb.freebsd.org/changeset/base/301879 Log: makefs: Provide a -T option to set timestamps to a consistent value This is taken from the NetBSD versions listed below and adapted to the makefs version in FreeBSD, along with a bug fix from cem@ that will be sent to NetBSD. Reviewed by: pfg Approved by: re (gjb) Obtained from: NetBSD MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D6835 Modified: head/usr.sbin/makefs/cd9660.c head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/mkfs.c head/usr.sbin/makefs/ffs/newfs_extern.h head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c head/usr.sbin/makefs/makefs.h head/usr.sbin/makefs/walk.c Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Tue Jun 14 06:21:51 2016 (r301878) +++ head/usr.sbin/makefs/cd9660.c Tue Jun 14 14:03:28 2016 (r301879) @@ -442,7 +442,7 @@ cd9660_parse_opts(const char *option, fs */ void cd9660_makefs(const char *image, const char *dir, fsnode *root, - fsinfo_t *fsopts) + fsinfo_t *fsopts) { int64_t startoffset; int numDirectories; @@ -619,7 +619,7 @@ typedef int (*cd9660node_func)(cd9660nod static void cd9660_finalize_PVD(void) { - time_t tim; + time_t tstamp = stampst.st_ino ? stampst.st_mtime : time(NULL); /* root should be a fixed size of 34 bytes since it has no name */ memcpy(diskStructure.primaryDescriptor.root_directory_record, @@ -668,26 +668,26 @@ cd9660_finalize_PVD(void) diskStructure.primaryDescriptor.bibliographic_file_id, 37); /* Setup dates */ - time(&tim); cd9660_time_8426( (unsigned char *)diskStructure.primaryDescriptor.creation_date, - tim); + tstamp); cd9660_time_8426( (unsigned char *)diskStructure.primaryDescriptor.modification_date, - tim); + tstamp); - /* - cd9660_set_date(diskStructure.primaryDescriptor.expiration_date, now); - */ +#if 0 + cd9660_set_date(diskStructure.primaryDescriptor.expiration_date, + tstamp); +#endif memset(diskStructure.primaryDescriptor.expiration_date, '0', 16); diskStructure.primaryDescriptor.expiration_date[16] = 0; cd9660_time_8426( (unsigned char *)diskStructure.primaryDescriptor.effective_date, - tim); + tstamp); /* make this sane */ cd9660_time_915(diskStructure.rootNode->dot_record->isoDirRecord->date, - tim); + tstamp); } static void @@ -808,7 +808,7 @@ cd9660_fill_extended_attribute_record(cd static int cd9660_translate_node_common(cd9660node *newnode) { - time_t tim; + time_t tstamp = stampst.st_ino ? stampst.st_mtime : time(NULL); int test; u_char flag; char temp[ISO_FILENAME_MAXLENGTH_WITH_PADDING]; @@ -829,9 +829,8 @@ cd9660_translate_node_common(cd9660node /* Set the various dates */ /* If we want to use the current date and time */ - time(&tim); - cd9660_time_915(newnode->isoDirRecord->date, tim); + cd9660_time_915(newnode->isoDirRecord->date, tstamp); cd9660_bothendian_dword(newnode->fileDataLength, newnode->isoDirRecord->size); @@ -876,7 +875,8 @@ cd9660_translate_node(fsnode *node, cd96 return 0; /* Finally, overwrite some of the values that are set by default */ - cd9660_time_915(newnode->isoDirRecord->date, node->inode->st.st_mtime); + cd9660_time_915(newnode->isoDirRecord->date, + stampst.st_ino ? stampst.st_mtime : node->inode->st.st_mtime); return 1; } @@ -1261,6 +1261,8 @@ cd9660_rrip_move_directory(cd9660node *d diskStructure.rootNode, dir); if (diskStructure.rr_moved_dir == NULL) return 0; + cd9660_time_915(diskStructure.rr_moved_dir->isoDirRecord->date, + stampst.st_ino ? stampst.st_mtime : start_time.tv_sec); } /* Create a file with the same ORIGINAL name */ Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Tue Jun 14 06:21:51 2016 (r301878) +++ head/usr.sbin/makefs/ffs.c Tue Jun 14 14:03:28 2016 (r301879) @@ -482,6 +482,7 @@ ffs_create_image(const char *image, fsin char *buf; int i, bufsize; off_t bufrem; + time_t tstamp; assert (image != NULL); assert (fsopts != NULL); @@ -541,7 +542,15 @@ ffs_create_image(const char *image, fsin /* make the file system */ if (debug & DEBUG_FS_CREATE_IMAGE) printf("calling mkfs(\"%s\", ...)\n", image); - fs = ffs_mkfs(image, fsopts); + + if (stampst.st_ino != 0) + tstamp = stampst.st_ctime; + else + tstamp = start_time.tv_sec; + + srandom(tstamp); + + fs = ffs_mkfs(image, fsopts, tstamp); fsopts->superblock = (void *)fs; if (debug & DEBUG_FS_CREATE_IMAGE) { time_t t; @@ -648,19 +657,12 @@ ffs_build_dinode1(struct ufs1_dinode *di { int slen; void *membuf; + struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st; memset(dinp, 0, sizeof(*dinp)); dinp->di_mode = cur->inode->st.st_mode; dinp->di_nlink = cur->inode->nlink; dinp->di_size = cur->inode->st.st_size; - dinp->di_atime = cur->inode->st.st_atime; - dinp->di_mtime = cur->inode->st.st_mtime; - dinp->di_ctime = cur->inode->st.st_ctime; -#if HAVE_STRUCT_STAT_ST_MTIMENSEC - dinp->di_atimensec = cur->inode->st.st_atimensec; - dinp->di_mtimensec = cur->inode->st.st_mtimensec; - dinp->di_ctimensec = cur->inode->st.st_ctimensec; -#endif #if HAVE_STRUCT_STAT_ST_FLAGS dinp->di_flags = cur->inode->st.st_flags; #endif @@ -669,6 +671,15 @@ ffs_build_dinode1(struct ufs1_dinode *di #endif dinp->di_uid = cur->inode->st.st_uid; dinp->di_gid = cur->inode->st.st_gid; + + dinp->di_atime = st->st_atime; + dinp->di_mtime = st->st_mtime; + dinp->di_ctime = st->st_ctime; +#if HAVE_STRUCT_STAT_ST_MTIMENSEC + dinp->di_atimensec = st->st_atimensec; + dinp->di_mtimensec = st->st_mtimensec; + dinp->di_ctimensec = st->st_ctimensec; +#endif /* not set: di_db, di_ib, di_blocks, di_spare */ membuf = NULL; @@ -696,31 +707,33 @@ ffs_build_dinode2(struct ufs2_dinode *di { int slen; void *membuf; + struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st; memset(dinp, 0, sizeof(*dinp)); dinp->di_mode = cur->inode->st.st_mode; dinp->di_nlink = cur->inode->nlink; dinp->di_size = cur->inode->st.st_size; - dinp->di_atime = cur->inode->st.st_atime; - dinp->di_mtime = cur->inode->st.st_mtime; - dinp->di_ctime = cur->inode->st.st_ctime; -#if HAVE_STRUCT_STAT_ST_MTIMENSEC - dinp->di_atimensec = cur->inode->st.st_atimensec; - dinp->di_mtimensec = cur->inode->st.st_mtimensec; - dinp->di_ctimensec = cur->inode->st.st_ctimensec; -#endif #if HAVE_STRUCT_STAT_ST_FLAGS dinp->di_flags = cur->inode->st.st_flags; #endif #if HAVE_STRUCT_STAT_ST_GEN dinp->di_gen = cur->inode->st.st_gen; #endif -#if HAVE_STRUCT_STAT_BIRTHTIME - dinp->di_birthtime = cur->inode->st.st_birthtime; - dinp->di_birthnsec = cur->inode->st.st_birthtimensec; -#endif dinp->di_uid = cur->inode->st.st_uid; dinp->di_gid = cur->inode->st.st_gid; + + dinp->di_atime = st->st_atime; + dinp->di_mtime = st->st_mtime; + dinp->di_ctime = st->st_ctime; +#if HAVE_STRUCT_STAT_ST_MTIMENSEC + dinp->di_atimensec = st->st_atimensec; + dinp->di_mtimensec = st->st_mtimensec; + dinp->di_ctimensec = st->st_ctimensec; +#endif +#if HAVE_STRUCT_STAT_BIRTHTIME + dinp->di_birthtime = st->st_birthtime; + dinp->di_birthnsec = st->st_birthtimensec; +#endif /* not set: di_db, di_ib, di_blocks, di_spare */ membuf = NULL; @@ -1125,11 +1138,6 @@ ffs_write_inode(union dinode *dp, uint32 initediblk < ufs_rw32(cgp->cg_niblk, fsopts->needswap)) { memset(buf, 0, fs->fs_bsize); dip = (struct ufs2_dinode *)buf; - /* - * XXX: Time-based seeds should be avoided for - * reproduceable builds. - */ - srandom(time(NULL)); for (i = 0; i < INOPB(fs); i++) { dip->di_gen = random(); dip++; Modified: head/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- head/usr.sbin/makefs/ffs/mkfs.c Tue Jun 14 06:21:51 2016 (r301878) +++ head/usr.sbin/makefs/ffs/mkfs.c Tue Jun 14 14:03:28 2016 (r301879) @@ -113,7 +113,7 @@ static int avgfilesize; /* expect static int avgfpdir; /* expected number of files per directory */ struct fs * -ffs_mkfs(const char *fsys, const fsinfo_t *fsopts) +ffs_mkfs(const char *fsys, const fsinfo_t *fsopts, time_t tstamp) { int fragsperinode, optimalfpg, origdensity, minfpg, lastminfpg; int32_t cylno, i, csfrags; @@ -434,7 +434,7 @@ ffs_mkfs(const char *fsys, const fsinfo_ sblock.fs_state = 0; sblock.fs_clean = FS_ISCLEAN; sblock.fs_ronly = 0; - sblock.fs_id[0] = start_time.tv_sec; + sblock.fs_id[0] = tstamp; sblock.fs_id[1] = random(); sblock.fs_fsmnt[0] = '\0'; csfrags = howmany(sblock.fs_cssize, sblock.fs_fsize); @@ -450,9 +450,9 @@ ffs_mkfs(const char *fsys, const fsinfo_ sblock.fs_cstotal.cs_nifree = sblock.fs_ncg * sblock.fs_ipg - ROOTINO; sblock.fs_cstotal.cs_ndir = 0; sblock.fs_dsize -= csfrags; - sblock.fs_time = start_time.tv_sec; + sblock.fs_time = tstamp; if (Oflag <= 1) { - sblock.fs_old_time = start_time.tv_sec; + sblock.fs_old_time = tstamp; sblock.fs_old_dsize = sblock.fs_dsize; sblock.fs_old_csaddr = sblock.fs_csaddr; sblock.fs_old_cstotal.cs_ndir = sblock.fs_cstotal.cs_ndir; @@ -508,7 +508,7 @@ ffs_mkfs(const char *fsys, const fsinfo_ printf("super-block backups (for fsck -b #) at:"); for (cylno = 0; cylno < sblock.fs_ncg; cylno++) { - initcg(cylno, start_time.tv_sec, fsopts); + initcg(cylno, tstamp, fsopts); if (cylno % nprintcols == 0) printf("\n"); printf(" %*lld,", printcolwidth, @@ -521,7 +521,7 @@ ffs_mkfs(const char *fsys, const fsinfo_ * Now construct the initial file system, * then write out the super-block. */ - sblock.fs_time = start_time.tv_sec; + sblock.fs_time = tstamp; if (Oflag <= 1) { sblock.fs_old_cstotal.cs_ndir = sblock.fs_cstotal.cs_ndir; sblock.fs_old_cstotal.cs_nbfree = sblock.fs_cstotal.cs_nbfree; Modified: head/usr.sbin/makefs/ffs/newfs_extern.h ============================================================================== --- head/usr.sbin/makefs/ffs/newfs_extern.h Tue Jun 14 06:21:51 2016 (r301878) +++ head/usr.sbin/makefs/ffs/newfs_extern.h Tue Jun 14 14:03:28 2016 (r301879) @@ -1,4 +1,4 @@ -/* $NetBSD: newfs_extern.h,v 1.3 2009/10/21 01:07:47 snj Exp $ */ +/* $NetBSD: newfs_extern.h,v 1.4 2015/12/21 00:58:08 christos Exp $ */ /* From: NetBSD: extern.h,v 1.3 2000/12/01 12:03:27 simonb Exp $ */ /* @@ -28,7 +28,7 @@ */ /* prototypes */ -struct fs *ffs_mkfs(const char *, const fsinfo_t *); +struct fs *ffs_mkfs(const char *, const fsinfo_t *, time_t); void ffs_write_superblock(struct fs *, const fsinfo_t *); void ffs_rdfs(daddr_t, int, void *, const fsinfo_t *); void ffs_wtfs(daddr_t, int, void *, const fsinfo_t *); Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Tue Jun 14 06:21:51 2016 (r301878) +++ head/usr.sbin/makefs/makefs.8 Tue Jun 14 14:03:28 2016 (r301879) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2015 +.Dd June 14, 2016 .Dt MAKEFS 8 .Os .Sh NAME @@ -56,6 +56,7 @@ .Op Fl R Ar roundup-size .Op Fl S Ar sector-size .Op Fl s Ar image-size +.Op Fl T Ar timestamp .Op Fl t Ar fs-type .Ar image-file .Ar directory | manifest @@ -212,6 +213,18 @@ Defaults to 512. .It Fl s Ar image-size Set the size of the file system image to .Ar image-size . +.It Fl T Ar timestamp +Specify a timestamp to be set for all filesystem files and directories +created so that repeatable builds are possible. +The +.Ar timestamp +can be a +.Pa pathname , +where the timestamps are derived from that file, or an integer +value interpreted as the number of seconds from the Epoch. +Note that timestamps specified in an +.Xr mtree 5 +spec file, override the default timestamp. .It Fl t Ar fs-type Create an .Ar fs-type Modified: head/usr.sbin/makefs/makefs.c ============================================================================== --- head/usr.sbin/makefs/makefs.c Tue Jun 14 06:21:51 2016 (r301878) +++ head/usr.sbin/makefs/makefs.c Tue Jun 14 14:03:28 2016 (r301879) @@ -78,8 +78,10 @@ static fstype_t fstypes[] = { u_int debug; int dupsok; struct timespec start_time; +struct stat stampst; static fstype_t *get_fstype(const char *); +static int get_tstamp(const char *, struct stat *); static void usage(void); int main(int, char *[]); @@ -110,13 +112,15 @@ main(int argc, char *argv[]) fstype->prepare_options(&fsoptions); specfile = NULL; - if (gettimeofday(&start, NULL) == -1) - err(1, "Unable to get system time"); - + ch = gettimeofday(&start, NULL); start_time.tv_sec = start.tv_sec; start_time.tv_nsec = start.tv_usec * 1000; - while ((ch = getopt(argc, argv, "B:b:Dd:f:F:M:m:N:o:pR:s:S:t:xZ")) != -1) { + if (ch == -1) + err(1, "Unable to get system time"); + + + while ((ch = getopt(argc, argv, "B:b:Dd:f:F:M:m:N:o:pR:s:S:t:T:xZ")) != -1) { switch (ch) { case 'B': @@ -239,6 +243,12 @@ main(int argc, char *argv[]) fstype->prepare_options(&fsoptions); break; + case 'T': + if (get_tstamp(optarg, &stampst) == -1) + errx(1, "Cannot get timestamp from `%s'", + optarg); + break; + case 'x': fsoptions.onlyspec = 1; break; @@ -360,6 +370,32 @@ get_fstype(const char *type) return (NULL); } +static int +get_tstamp(const char *b, struct stat *st) +{ + time_t when; + char *eb; + long long l; + + if (stat(b, st) != -1) + return 0; + + { + errno = 0; + l = strtoll(b, &eb, 0); + if (b == eb || *eb || errno) + return -1; + when = (time_t)l; + } + + st->st_ino = 1; +#ifdef HAVE_STRUCT_STAT_BIRTHTIME + st->st_birthtime = +#endif + st->st_mtime = st->st_ctime = st->st_atime = when; + return 0; +} + static void usage(void) { @@ -370,7 +406,8 @@ usage(void) "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" "\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-R roundup-size]\n" "\t[-s image-size] [-b free-blocks] [-f free-files] [-F mtree-specfile]\n" -"\t[-xZ] [-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", +"\t[-xZ] [-N userdb-dir] [-T ]\n" +"\timage-file directory | manifest [extra-directory ...]\n", prog); exit(1); } Modified: head/usr.sbin/makefs/makefs.h ============================================================================== --- head/usr.sbin/makefs/makefs.h Tue Jun 14 06:21:51 2016 (r301878) +++ head/usr.sbin/makefs/makefs.h Tue Jun 14 14:03:28 2016 (r301879) @@ -172,6 +172,7 @@ void cd9660_makefs(const char *, const extern u_int debug; extern int dupsok; extern struct timespec start_time; +extern struct stat stampst; /* * If -x is specified, we want to exclude nodes which do not appear Modified: head/usr.sbin/makefs/walk.c ============================================================================== --- head/usr.sbin/makefs/walk.c Tue Jun 14 06:21:51 2016 (r301878) +++ head/usr.sbin/makefs/walk.c Tue Jun 14 14:03:28 2016 (r301879) @@ -229,6 +229,20 @@ create_fsnode(const char *root, const ch cur->type = stbuf->st_mode & S_IFMT; cur->inode->nlink = 1; cur->inode->st = *stbuf; + if (stampst.st_ino) { + cur->inode->st.st_atime = stampst.st_atime; + cur->inode->st.st_mtime = stampst.st_mtime; + cur->inode->st.st_ctime = stampst.st_ctime; +#if HAVE_STRUCT_STAT_ST_MTIMENSEC + cur->inode->st.st_atimensec = stampst.st_atimensec; + cur->inode->st.st_mtimensec = stampst.st_mtimensec; + cur->inode->st.st_ctimensec = stampst.st_ctimensec; +#endif +#if HAVE_STRUCT_STAT_BIRTHTIME + cur->inode->st.st_birthtime = stampst.st_birthtime; + cur->inode->st.st_birthtimensec = stampst.st_birthtimensec; +#endif + } return (cur); } From owner-svn-src-head@freebsd.org Tue Jun 14 14:46:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 373A6B69632; Tue, 14 Jun 2016 14:46:50 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0358E25A5; Tue, 14 Jun 2016 14:46:50 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x234.google.com with SMTP id z189so79226716itg.0; Tue, 14 Jun 2016 07:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=C/ErwcXYUSWwn59gi3EPahjYHpbzO/pA6gB5v0+bOCA=; b=IN8T97AngQQcF4X0Ls4hE/tIA/cEVPfsnpBjC6CHrg8gTRNDbtMAr4fwrTmF1fWp1N ZufkSwgVJwehaA/D3PrzvxPlrgF2/q0JOSrnfRR8m4Z6lUYz9fNDzCGrflgS0BBTSHtL f3AAPhdbAK79JF8bUcxjj8y3qUXr4WEGvL44Fzo/XNQIdLTNeVm8TDTeZ4FQ2WsxBJsz wwsc8YDk5getpkTQ9qEQV+GxAPwuxR/db4R0mBJg5K49+KhK0DANxR2LLtsEUe38eksY IsPA+6OEfrvW5RqNg6RWVkNo1bPYz9Dq6Ln3iqWO8dp1smp6pGugQQrFFJK8IKsqsh1X lfZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=C/ErwcXYUSWwn59gi3EPahjYHpbzO/pA6gB5v0+bOCA=; b=SDlOqaVmPmoveFrXgDV3GHng/nDx+/hySUIMuv1P1AUq4t6Eev9RG1a6qzh5cUeatt d8NQmn3Iy6Af181t14G4kJIpv+P5iyhPrEI1ljKQPcZeR2nJHT05oZhKLWpSNCTqtKHB PKfcI7FX+l+Ax9eD9Fsms0H4ZmTCVz/NO405UgCCB1YZHtJdgg/s6/Eb7pTrag6H9zi5 1ZhrroXwyzLv2lzJTqFoCQGmUzFb8+FMtHO4EgD6Ujq1iPZJQcRnKTEWh6Kj35MQzUUQ 9JlmBRgHWjKQ8M9WX8FunMq4uF1BcLvfJeLsiVN4TZ+xpP1B03apsmBfxZi4ZzbMmyy9 EAow== X-Gm-Message-State: ALyK8tKG8HY/lFFQvOhEcrsushQLRpNsly837DPnlHIi9M2JmcvFP47Zj394yI84xZFDwabYEGQ+Xx3yti8KOw== X-Received: by 10.36.9.14 with SMTP id 14mr8858569itm.68.1465915605362; Tue, 14 Jun 2016 07:46:45 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.27.197 with HTTP; Tue, 14 Jun 2016 07:46:25 -0700 (PDT) In-Reply-To: <201606141403.u5EE3Smt059800@repo.freebsd.org> References: <201606141403.u5EE3Smt059800@repo.freebsd.org> From: Ed Maste Date: Tue, 14 Jun 2016 10:46:25 -0400 X-Google-Sender-Auth: PtsbrdLp8ympQF2f_EDlpBukf5s Message-ID: Subject: Re: svn commit: r301879 - in head/usr.sbin/makefs: . ffs To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 14:46:50 -0000 On 14 June 2016 at 10:03, Ed Maste wrote: > Author: emaste > Date: Tue Jun 14 14:03:28 2016 > New Revision: 301879 > URL: https://svnweb.freebsd.org/changeset/base/301879 > > Log: > makefs: Provide a -T option to set timestamps to a consistent value > > This is taken from the NetBSD versions listed below and adapted to the > makefs version in FreeBSD, along with a bug fix from cem@ that will be > sent to NetBSD. Oops, I left the NetBSD versions out of the commit message. They are: usr.sbin/makefs/ffs/mkfs.c 1.66 usr.sbin/makefs/ffs/newfs_extern.h 1.33 usr.sbin/makefs/cd9660.c 1.50 1.51 usr.sbin/makefs/ffs.c 1.65 1.68 usr.sbin/makefs/makefs.8 1.54 usr.sbin/makefs/makefs.c 1.51 usr.sbin/makefs/makefs.h 1.36 usr.sbin/makefs/walk.c 1.29 From owner-svn-src-head@freebsd.org Tue Jun 14 16:19:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 783B6B6A6EA; Tue, 14 Jun 2016 16:19: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 2D15F2F5B; Tue, 14 Jun 2016 16:19: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 u5EGJirS007972; Tue, 14 Jun 2016 16:19:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGJiKd007971; Tue, 14 Jun 2016 16:19:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141619.u5EGJiKd007971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301880 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:19:45 -0000 Author: bdrewery Date: Tue Jun 14 16:19:44 2016 New Revision: 301880 URL: https://svnweb.freebsd.org/changeset/base/301880 Log: WITH_META_MODE+WITH_DEBUG_FILES: Fix library symlinks causing bogus rebuilds. A simplified example of the library targets with WITH_DEBUG_FILES is: libgeom.so.5: libgeom.so.5.full cp libgeom.so.5.full libgeom.so.5 libgeom.so.5.full: ln -s libgeom.so.5 libgeom.so cc -o libgeom.so.5.full *.o Before, or without, WITH_DEBUG_FILES it is: libgeom.so.5: ln -s libgeom.so.5 libgeom.so cc -o libgeom.so.5 *.o The problem is that bmake considers the link source for the libgeom.so link in the libgeom.so.5.full target as being a dependency for libgeom.so.5.full. That resolves to libgeom.so.5. Thus a cyclic dependency is created. The result of this is that if libgeom.so.5 is created with a newer timestamp than libgeom.so.5.full, then libgeom.so.5.full will be rebuilt on the next build. This causes a chain reaction of everything in the build relinking, or hitting the problem itself. Moving the link creation to the target that actually creates libgeom.so.5 fixes the problem. The simplest fix here is to just duplicate the logic. Submitted by: sjg Approved by: re (implicit) Modified: head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Jun 14 14:03:28 2016 (r301879) +++ head/share/mk/bsd.lib.mk Tue Jun 14 16:19:44 2016 (r301880) @@ -244,7 +244,7 @@ CLEANFILES+= ${SHLIB_LINK} ${SHLIB_NAME_FULL}: ${SOBJS} @${ECHO} building shared library ${SHLIB_NAME} @rm -f ${SHLIB_NAME} ${SHLIB_LINK} -.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) +.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) && ${MK_DEBUG_FILES} == "no" @${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} .endif ${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ @@ -259,6 +259,9 @@ CLEANFILES+= ${SHLIB_NAME_FULL} ${SHLIB_ ${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \ ${SHLIB_NAME_FULL} ${.TARGET} +.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) + @${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} +.endif ${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} ${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET} From owner-svn-src-head@freebsd.org Tue Jun 14 16:19:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E2B2B6A723; Tue, 14 Jun 2016 16:19:50 +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 125002F89; Tue, 14 Jun 2016 16:19:50 +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 u5EGJn4V008017; Tue, 14 Jun 2016 16:19:49 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGJniM008016; Tue, 14 Jun 2016 16:19:49 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141619.u5EGJniM008016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301881 - head/bin/csh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:19:50 -0000 Author: bdrewery Date: Tue Jun 14 16:19:49 2016 New Revision: 301881 URL: https://svnweb.freebsd.org/changeset/base/301881 Log: WITH_META_MODE: Fix bin/csh rebuilding tc.const.h This is the same issue as r297997, but was missed in it. The WARNS value changes between 'build-tools' (MK_WARNS=no) and 'everything' resulting in a rebuild of this file. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/bin/csh/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Tue Jun 14 16:19:44 2016 (r301880) +++ head/bin/csh/Makefile Tue Jun 14 16:19:49 2016 (r301881) @@ -136,7 +136,7 @@ sh.err.h: sh.err.c grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET} @echo '#endif /* _h_sh_err */' >> ${.TARGET} -tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h +tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h ${BUILD_TOOLS_META} @rm -f ${.TARGET} @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} @echo '#ifndef _h_tc_const' >> ${.TARGET} From owner-svn-src-head@freebsd.org Tue Jun 14 16:19:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CACB0B6A759; Tue, 14 Jun 2016 16:19:55 +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 9539920E8; Tue, 14 Jun 2016 16:19:55 +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 u5EGJseD008065; Tue, 14 Jun 2016 16:19:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGJsqf008064; Tue, 14 Jun 2016 16:19:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141619.u5EGJsqf008064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301882 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:19:55 -0000 Author: bdrewery Date: Tue Jun 14 16:19:54 2016 New Revision: 301882 URL: https://svnweb.freebsd.org/changeset/base/301882 Log: WITH_META_MODE: Fix rescue rebuilding build-tools. This is the same issue as r297997. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Tue Jun 14 16:19:49 2016 (r301881) +++ head/share/mk/bsd.crunchgen.mk Tue Jun 14 16:19:54 2016 (r301882) @@ -130,7 +130,7 @@ ${PROG}: ${OUTPUTS} objs .META objs: ${OUTMK} .META ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \ - ${MAKE} -f ${OUTMK} objs + ${MAKE} -f ${OUTMK} BUILD_TOOLS_META=.NOMETA_CMP objs # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. From owner-svn-src-head@freebsd.org Tue Jun 14 16:20:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21528B6A7AD; Tue, 14 Jun 2016 16:20: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 DE068220C; Tue, 14 Jun 2016 16:20: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 u5EGK0En008131; Tue, 14 Jun 2016 16:20:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGK037008121; Tue, 14 Jun 2016 16:20:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141620.u5EGK037008121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301883 - head/kerberos5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:20:01 -0000 Author: bdrewery Date: Tue Jun 14 16:19:59 2016 New Revision: 301883 URL: https://svnweb.freebsd.org/changeset/base/301883 Log: Define targets in same order as .ORDER This is a NOP but is done for style and to reduce confusion. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/kerberos5/Makefile.inc Modified: head/kerberos5/Makefile.inc ============================================================================== --- head/kerberos5/Makefile.inc Tue Jun 14 16:19:54 2016 (r301882) +++ head/kerberos5/Makefile.inc Tue Jun 14 16:19:59 2016 (r301883) @@ -36,7 +36,7 @@ ETSRCS= \ .if ${SRCS:M${_ET}.[ch]} != "" .ORDER: ${_ET}.h ${_ET}.c ${_ET}.c: .NOMETA -${_ET}.c ${_ET}.h: ${ET} +${_ET}.h ${_ET}.c: ${ET} compile_et ${.ALLSRC} CLEANFILES+= ${_ET}.h ${_ET}.c .endif From owner-svn-src-head@freebsd.org Tue Jun 14 16:20:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC340B6A7E4; Tue, 14 Jun 2016 16:20:06 +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 8EB55243C; Tue, 14 Jun 2016 16:20:06 +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 u5EGK5uH008184; Tue, 14 Jun 2016 16:20:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGK5Zs008183; Tue, 14 Jun 2016 16:20:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141620.u5EGK5Zs008183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301884 - head/usr.bin/awk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:20:07 -0000 Author: bdrewery Date: Tue Jun 14 16:20:05 2016 New Revision: 301884 URL: https://svnweb.freebsd.org/changeset/base/301884 Log: WITH_META_MODE: Fix rebuilding maketab outside of build-tools. The bsd.dep.mk yacc targets rely on only the .c file getting a .meta file. However the previous code here relying on only the .h file meant that it would be generated with a .meta file. r301285 made it so that the .h file is never expected to get a .meta file. To keep this restriction in place add in an extra dependency on the .c file so that it is generated at this time. It's a hack but the best for the patterns we have at the moment for handling build-tools and side-effect-generated files. Reported by: Mark Millard Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/awk/Makefile Modified: head/usr.bin/awk/Makefile ============================================================================== --- head/usr.bin/awk/Makefile Tue Jun 14 16:19:59 2016 (r301883) +++ head/usr.bin/awk/Makefile Tue Jun 14 16:20:05 2016 (r301884) @@ -17,8 +17,10 @@ MLINKS= awk.1 nawk.1 CLEANFILES= maketab proctab.c ytab.h -ytab.h: awkgram.h .NOMETA - ln -sf ${.ALLSRC} ${.TARGET} +# XXX: awkgram.c isn't really needed here but it is added to keep +# awkgram.h: .NOMETA respected. +ytab.h: awkgram.c awkgram.h .NOMETA + ln -sf ${.ALLSRC:M*.h} ${.TARGET} proctab.c: maketab ${BTOOLSPATH:U.}/maketab > proctab.c From owner-svn-src-head@freebsd.org Tue Jun 14 16:20:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C7BB6A807; Tue, 14 Jun 2016 16:20:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 793712520; Tue, 14 Jun 2016 16:20:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5EGK8MM008231; Tue, 14 Jun 2016 16:20:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGK8jd008230; Tue, 14 Jun 2016 16:20:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141620.u5EGK8jd008230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301885 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:20:10 -0000 Author: bdrewery Date: Tue Jun 14 16:20:08 2016 New Revision: 301885 URL: https://svnweb.freebsd.org/changeset/base/301885 Log: Add more missing .PHONY Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jun 14 16:20:05 2016 (r301884) +++ head/Makefile Tue Jun 14 16:20:08 2016 (r301885) @@ -274,7 +274,7 @@ CHECK_TIME!= find ${.CURDIR}/sys/sys/par # not included. One can argue that this target doesn't build everything # then. # -world: upgrade_checks +world: upgrade_checks .PHONY @echo "--------------------------------------------------------------" @echo ">>> make world started on ${STARTTIME}" @echo "--------------------------------------------------------------" @@ -300,7 +300,7 @@ world: upgrade_checks @echo " (started ${STARTTIME})" @echo "--------------------------------------------------------------" .else -world: +world: .PHONY @echo "WARNING: make world will overwrite your existing FreeBSD" @echo "installation without also building and installing a new" @echo "kernel. This can be dangerous. Please read the handbook," @@ -317,13 +317,13 @@ world: # # Short hand for `make buildkernel installkernel' # -kernel: buildkernel installkernel +kernel: buildkernel installkernel .PHONY # # Perform a few tests to determine if the installed tools are adequate # for building the world. # -upgrade_checks: +upgrade_checks: .PHONY .if defined(NEED_MAKE_UPGRADE) @${_+_}(cd ${.CURDIR} && ${MAKE} ${WANT_MAKE:S,^f,,}) .endif @@ -359,19 +359,19 @@ regress: .PHONY tinderbox toolchains kernel-toolchains kernels worlds: upgrade_checks -tinderbox: +tinderbox: .PHONY @cd ${.CURDIR}; ${SUB_MAKE} DOING_TINDERBOX=YES universe -toolchains: +toolchains: .PHONY @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=toolchain universe -kernel-toolchains: +kernel-toolchains: .PHONY @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe -kernels: +kernels: .PHONY @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildkernel universe -worlds: +worlds: .PHONY @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildworld universe # @@ -397,9 +397,9 @@ TARGET_ARCHES_${target}?= ${target} # It does not build with the in-tree linker. .if !exists(/usr/local/aarch64-freebsd/bin/ld) && empty(${TARGETS}) _UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:Narm64} -universe: universe_arm64_skip -universe_epilogue: universe_arm64_skip -universe_arm64_skip: universe_prologue +universe: universe_arm64_skip .PHONY +universe_epilogue: universe_arm64_skip .PHONY +universe_arm64_skip: universe_prologue .PHONY @echo ">> arm64 skipped - install aarch64-binutils port or package to build" .endif @@ -437,16 +437,16 @@ universe_prologue: .PHONY .for target in ${_UNIVERSE_TARGETS} universe: universe_${target} universe_epilogue: universe_${target} -universe_${target}: universe_${target}_prologue -universe_${target}_prologue: universe_prologue +universe_${target}: universe_${target}_prologue .PHONY +universe_${target}_prologue: universe_prologue .PHONY @echo ">> ${target} started on `LC_ALL=C date`" -universe_${target}_worlds: +universe_${target}_worlds: .PHONY .if !defined(MAKE_JUST_KERNELS) -universe_${target}_done: universe_${target}_worlds +universe_${target}_done: universe_${target}_worlds .PHONY .for target_arch in ${TARGET_ARCHES_${target}} -universe_${target}_worlds: universe_${target}_${target_arch} -universe_${target}_${target_arch}: universe_${target}_prologue .MAKE +universe_${target}_worlds: universe_${target}_${target_arch} .PHONY +universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ ${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ @@ -461,9 +461,9 @@ universe_${target}_${target_arch}: unive .endif # !MAKE_JUST_KERNELS .if !defined(MAKE_JUST_WORLDS) -universe_${target}_done: universe_${target}_kernels -universe_${target}_kernels: universe_${target}_worlds -universe_${target}_kernels: universe_${target}_prologue .MAKE +universe_${target}_done: universe_${target}_kernels .PHONY +universe_${target}_kernels: universe_${target}_worlds .PHONY +universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY .if exists(${KERNSRCDIR}/${target}/conf/NOTES) @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \ ${SUB_MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ @@ -479,7 +479,7 @@ universe_${target}: universe_${target}_d universe_${target}_done: @echo ">> ${target} completed on `LC_ALL=C date`" .endfor -universe_kernels: universe_kernconfs +universe_kernels: universe_kernconfs .PHONY .if !defined(TARGET) TARGET!= uname -m .endif @@ -493,7 +493,7 @@ KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/c -type f -maxdepth 0 \ ! -name DEFAULTS ! -name NOTES | \ ${_THINNER} -universe_kernconfs: +universe_kernconfs: .PHONY .for kernel in ${KERNCONFS} TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \ config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \ @@ -527,7 +527,7 @@ universe_epilogue: .PHONY .endif .endif -buildLINT: +buildLINT: .PHONY ${MAKE} -C ${.CURDIR}/sys/${_TARGET}/conf LINT .if defined(.PARSEDIR) From owner-svn-src-head@freebsd.org Tue Jun 14 16:20:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64353B6A8D5; Tue, 14 Jun 2016 16:20: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 354FA2830; Tue, 14 Jun 2016 16:20: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 u5EGKKEA008372; Tue, 14 Jun 2016 16:20:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGKK5O008368; Tue, 14 Jun 2016 16:20:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141620.u5EGKK5O008368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301888 - in head: . share/mk 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:20:21 -0000 Author: bdrewery Date: Tue Jun 14 16:20:19 2016 New Revision: 301888 URL: https://svnweb.freebsd.org/changeset/base/301888 Log: WITH_META_MODE: Lessen the filemon(4) requirement scope. - Move the sys.mk filemon requirement to bsd.init.mk as a warning. This is intended only to show when building directly in a subdirectory without filemon loaded. - Move the error into Makefile and only apply it when building from the META_TGT_WHITELIST target list. -DNO_FILEMON can be used to suppress both the warning and the error but makes WITH_META_MODE less useful. It will only compare build commands in this mode rather than track all dependencies. This fixes installing from a jail which doesn't need filemon in this phase [1]. Reported by: Nikolai Lifanov [1] Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile head/share/mk/bsd.init.mk head/share/mk/sys.mk head/tools/build/options/WITH_META_MODE Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jun 14 16:20:14 2016 (r301887) +++ head/Makefile Tue Jun 14 16:20:19 2016 (r301888) @@ -219,6 +219,13 @@ _CAN_USE_META_MODE?= yes .if !defined(_CAN_USE_META_MODE) _MAKE+= MK_META_MODE=no .unexport META_MODE +.elif ${MK_META_MODE} == "yes" +.if !exists(/dev/filemon) && !defined(NO_FILEMON) && !make(showconfig) +# Require filemon be loaded to provide a working incremental build +.error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded. \ + ${.newline}ERROR: WITH_META_MODE is enabled but requires filemon for an incremental build. \ + ${.newline}ERROR: 'kldload filemon' or pass -DNO_FILEMON to suppress this error. +.endif # !exists(/dev/filemon) && !defined(NO_FILEMON) .endif # !defined(_CAN_USE_META_MODE) # Guess machine architecture from machine type, and vice versa. Modified: head/share/mk/bsd.init.mk ============================================================================== --- head/share/mk/bsd.init.mk Tue Jun 14 16:20:14 2016 (r301887) +++ head/share/mk/bsd.init.mk Tue Jun 14 16:20:19 2016 (r301888) @@ -28,4 +28,14 @@ _SKIP_BUILD = not building at level 0 .warning ${_SKIP_BUILD} .endif +.if ${MK_META_MODE} == "yes" +.if !exists(/dev/filemon) && \ + ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON) && \ + !make(showconfig) +.warning The filemon module (/dev/filemon) is not loaded. +.warning META_MODE is less useful for incremental builds without filemon. +.warning 'kldload filemon' or pass -DNO_FILEMON to suppress this warning. +.endif +.endif # ${MK_META_MODE} == "yes" + .endif # !target(____) Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Tue Jun 14 16:20:14 2016 (r301887) +++ head/share/mk/sys.mk Tue Jun 14 16:20:19 2016 (r301888) @@ -60,10 +60,6 @@ META_MODE+= missing-meta=yes META_MODE+= silent=yes .endif .if !exists(/dev/filemon) -.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON) && \ - !make(showconfig) -.error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded. -.endif META_MODE+= nofilemon .endif # Require filemon data with bmake Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Tue Jun 14 16:20:14 2016 (r301887) +++ head/tools/build/options/WITH_META_MODE Tue Jun 14 16:20:19 2016 (r301888) @@ -7,9 +7,13 @@ using 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. -When the +The .Xr filemon 4 -module is loaded, any files used by the commands executed will be tracked as +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: From owner-svn-src-head@freebsd.org Tue Jun 14 16:20:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2CA3B6A837; Tue, 14 Jun 2016 16:20:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B658525CE; Tue, 14 Jun 2016 16:20:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5EGKBJA008276; Tue, 14 Jun 2016 16:20:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGKB8h008275; Tue, 14 Jun 2016 16:20:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141620.u5EGKB8h008275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301886 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:20:13 -0000 Author: bdrewery Date: Tue Jun 14 16:20:11 2016 New Revision: 301886 URL: https://svnweb.freebsd.org/changeset/base/301886 Log: WITH_META_MODE: Set MK_META_MODE=no with -B. Using -B already sets .MAKE.MODE=compat but it was leaving MK_META_MODE set which could still cause other MK_META_MODE==yes checks to trigger. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Tue Jun 14 16:20:08 2016 (r301885) +++ head/share/mk/sys.mk Tue Jun 14 16:20:11 2016 (r301886) @@ -42,9 +42,14 @@ __ENV_ONLY_OPTIONS:= \ .include +# Disable MK_META_MODE with make -B +.if ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) && ${.MAKEFLAGS:M-B} +MK_META_MODE= no +.endif + .if ${MK_DIRDEPS_BUILD} == "yes" .sinclude -.elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) && ${.MAKEFLAGS:M-B} == "" +.elif ${MK_META_MODE} == "yes" # verbose will show .MAKE.META.PREFIX for each target. META_MODE+= meta verbose .if !defined(NO_META_MISSING) From owner-svn-src-head@freebsd.org Tue Jun 14 16:20:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2891FB6A87C; Tue, 14 Jun 2016 16:20:16 +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 D8129269E; Tue, 14 Jun 2016 16:20:15 +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 u5EGKFGf008323; Tue, 14 Jun 2016 16:20:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGKFa1008322; Tue, 14 Jun 2016 16:20:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141620.u5EGKFa1008322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301887 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:20:16 -0000 Author: bdrewery Date: Tue Jun 14 16:20:14 2016 New Revision: 301887 URL: https://svnweb.freebsd.org/changeset/base/301887 Log: WITH_META_MODE: Whitelist targets that are meta-mode-safe. META_TGT_WHITELIST is added to define which build targets are safe for meta mode. See comments for more details. This fixes 'make delete-old-libs' to properly show the interactive prompt. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jun 14 16:20:11 2016 (r301886) +++ head/Makefile Tue Jun 14 16:20:14 2016 (r301887) @@ -133,12 +133,27 @@ TGTS= all all-man buildenv buildenvvars create-world-packages create-kernel-packages create-packages \ packages installconfig real-packages sign-packages package-pkg +# XXX: r156740: This can't work since bsd.subdir.mk is not included ever. +# It will only work for SUBDIR_TARGETS in make.conf. TGTS+= ${SUBDIR_TARGETS} BITGTS= files includes BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/} TGTS+= ${BITGTS} +# Only some targets are allowed to use meta mode. Others get it +# disabled. In some cases, such as 'install', meta mode can be dangerous +# as a cookie may be used to prevent redundant installations (such as +# for WORLDTMP staging). For DESTDIR=/ we always want to install though. +# For other cases, such as delete-old-libs, meta mode may break +# the interactive tty prompt. The safest route is to just whitelist +# the ones that benefit from it. +META_TGT_WHITELIST+= \ + _* build32 buildfiles buildincludes buildkernel buildsoft \ + buildworld everything kernel-toolchains kernels libraries \ + native-xtools tinderbox toolchain toolchains universe worlds \ + xdev xdev-build + .ORDER: buildworld installworld .ORDER: buildworld distributeworld .ORDER: buildworld buildkernel @@ -194,14 +209,17 @@ SUB_MAKE= ${MAKE} -m ${.CURDIR}/share/mk _MAKE= PATH=${PATH} ${SUB_MAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} -# Must disable META_MODE when installing to avoid missing anything. The -# main problem is that buildworld will create cookies for install targets -# since they are being installed into WORLDTMP. This avoids unneeded and -# redundant restaging but is dangerous for user install targets. -.if make(distrib*) || make(*install*) +# Only allow meta mode for the whitelisted targets. See META_TGT_WHITELIST +# above. +.for _tgt in ${META_TGT_WHITELIST} +.if make(${_tgt}) +_CAN_USE_META_MODE?= yes +.endif +.endfor +.if !defined(_CAN_USE_META_MODE) _MAKE+= MK_META_MODE=no .unexport META_MODE -.endif +.endif # !defined(_CAN_USE_META_MODE) # Guess machine architecture from machine type, and vice versa. .if !defined(TARGET_ARCH) && defined(TARGET) From owner-svn-src-head@freebsd.org Tue Jun 14 16:20:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FFB9B6A936; Tue, 14 Jun 2016 16:20:27 +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 9FBA629D9; Tue, 14 Jun 2016 16:20:26 +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 u5EGKP8c008421; Tue, 14 Jun 2016 16:20:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGKPRQ008419; Tue, 14 Jun 2016 16:20:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141620.u5EGKPRQ008419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301889 - in head: share/mk 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:20:27 -0000 Author: bdrewery Date: Tue Jun 14 16:20:25 2016 New Revision: 301889 URL: https://svnweb.freebsd.org/changeset/base/301889 Log: WITH_META_MODE: Enable printing of some of make's environment on error. This will print a set of variables from make on error using MAKE_PRINT_VAR_ON_ERROR. It is already enabled for the DIRDEPS_BUILD. It may make sense to enable this in the non-meta mode as well once people are more used to its more verbose error output. This makes it much simpler to see which .meta file is used when a command files so that it may be inspected for the build command. Suggested by: sjg Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.sys.mk head/tools/build/options/WITH_META_MODE Modified: head/share/mk/local.sys.mk ============================================================================== --- head/share/mk/local.sys.mk Tue Jun 14 16:20:19 2016 (r301888) +++ head/share/mk/local.sys.mk Tue Jun 14 16:20:25 2016 (r301889) @@ -1,6 +1,18 @@ # $FreeBSD$ -.if ${MK_DIRDEPS_BUILD} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" || ${MK_META_MODE} == "yes" + +# Not in the below list as it may make sense for non-meta mode +# eventually. meta.sys.mk (DIRDEPS_BUILD) also already adds these in. +.if ${MK_DIRDEPS_BUILD} == "no" && ${MK_META_MODE} == "yes" +MAKE_PRINT_VAR_ON_ERROR += \ + .ERROR_TARGET \ + .ERROR_META_FILE \ + .MAKE.LEVEL \ + MAKEFILE \ + .MAKE.MODE +.endif + MAKE_PRINT_VAR_ON_ERROR+= \ .CURDIR \ .MAKE \ @@ -12,7 +24,7 @@ MAKE_PRINT_VAR_ON_ERROR+= \ MACHINE_ARCH \ MAKEOBJDIRPREFIX \ MAKESYSPATH \ - MAKE_VERSION\ + MAKE_VERSION \ PATH \ SRCTOP \ OBJTOP \ Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Tue Jun 14 16:20:19 2016 (r301888) +++ head/tools/build/options/WITH_META_MODE Tue Jun 14 16:20:25 2016 (r301889) @@ -41,6 +41,9 @@ The meta files can also be useful for de 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 From owner-svn-src-head@freebsd.org Tue Jun 14 16:25:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C8E5B6AD5B; Tue, 14 Jun 2016 16:25:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x233.google.com (mail-qg0-x233.google.com [IPv6:2607:f8b0:400d:c04::233]) (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 537B12456; Tue, 14 Jun 2016 16:25:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qg0-x233.google.com with SMTP id v48so69609668qgd.2; Tue, 14 Jun 2016 09:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gBlsz2sL3Hfl3jijyQNrW4ppux/HDJor0xFTqY0w1R0=; b=wlfSM3VNX2PeK5hQ4xAYyFeZxqyX2Pww97KE4uWVla76kdEyc+TSCQJNDmk1RcDYU+ TBzP9feSb2Te5qpDM0RTQBQ8QqvH6lf1tjb8b0yajjKpF2ufga2MG1U3VdDdc2ocZW4X 6PhvyqdRSbLsANqvA/97/FEWT4PMvyCRmd2J3JFBsb+zkLgM1YBShWz3r6sEnjmHqHCk FS4zNEgN7NNHkTmTsIs9RpZLSgLgicH3W0J+Q88pPnbJq4wNXP/kDcTleoGaN7PAtIbH 4pdqvupM2k8XrXJvCfG/wntro2/gGrlEjdpfoGHswxl+t2C9McOdy7VfzLjpcXe1MzLT E2vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gBlsz2sL3Hfl3jijyQNrW4ppux/HDJor0xFTqY0w1R0=; b=iEN7Tsd4EpRglnjNjX40HfaecmNz1A2k2WUtOWkLDNjaMLeNjcNLn6L+IX2y3pFWot x7HaJ1fhvAnssvBH+9mcAthuyI7m2wjMigscxiDl/B23HRZkT5Nf5knWfvtebkyggAFt SkEOQwqUYDKvWIIBSwPjgvw30DtMhkxQ8V1uydjOAyrE39IyuXKKUPxTU+iuPCX7q1Uo svKCt2kSmizYcbK+WYzcg+p33y5exeMOrF6dClocJlJkl0fgZk+V9QaitK08NsFr6TCw fAJflEE+Doh1273mobNlCOHxR7SXSAwRlGwzqsz908UPiTgoYxkoH4kGlBL2cGVpTToo wWvQ== X-Gm-Message-State: ALyK8tLYj+le2xKB6asOz6MJpEGUirnYTxBjmpfUK5LhXqh9mvzBbG9xwuvhsuJzgYcKBdjM7T6GpSR/TPVvhQ== X-Received: by 10.140.153.135 with SMTP id 129mr21083608qhz.71.1465921519480; Tue, 14 Jun 2016 09:25:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.148.131 with HTTP; Tue, 14 Jun 2016 09:25:19 -0700 (PDT) In-Reply-To: <201606081147.u58BlJ8X099462@repo.freebsd.org> References: <201606081147.u58BlJ8X099462@repo.freebsd.org> From: Ngie Cooper Date: Tue, 14 Jun 2016 09:25:19 -0700 Message-ID: Subject: Re: svn commit: r301602 - in head: . lib/libpam lib/libpam/libpam lib/libpam/libpam/security tools/build/mk To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:25:20 -0000 On Wed, Jun 8, 2016 at 4:47 AM, Dag-Erling Sm=C3=B8rgrav = wrote: > Author: des > Date: Wed Jun 8 11:47:19 2016 > New Revision: 301602 > URL: https://svnweb.freebsd.org/changeset/base/301602 > > Log: > Replace _pam_verbose_error() with a macro. This was the last differenc= e > between our libpam and stock OpenPAM, meaning that it is now possible t= o > replace the base libpam with a hypothetical ports version of OpenPAM. Unfortunately this commit wasn't followed by a bump to __FreeBSD_version, so the package cluster hasn't updated all packages that require libpam.so, like sudo, etc. I can't commit anything for a while (my Macbook Pro is a bit out of commission)... but I'll try and prod someone else to do it. Thanks, -Ngie From owner-svn-src-head@freebsd.org Tue Jun 14 16:37:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D7FFB7214E; Tue, 14 Jun 2016 16:37:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 618772B86; Tue, 14 Jun 2016 16:37:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 53BF018D2; Tue, 14 Jun 2016 16:37:21 +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 1BBFC1DD92; Tue, 14 Jun 2016 16:37: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 sZrGvBSBy9fI; Tue, 14 Jun 2016 16:37:17 +0000 (UTC) Subject: Re: svn commit: r301602 - in head: . lib/libpam lib/libpam/libpam lib/libpam/libpam/security tools/build/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com A89421DD8D To: Ngie Cooper , =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= References: <201606081147.u58BlJ8X099462@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> Date: Tue, 14 Jun 2016 09:37:17 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KeaqhvPNSk8MW9FHQcVm2BlulG1bWRDab" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:37:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KeaqhvPNSk8MW9FHQcVm2BlulG1bWRDab Content-Type: multipart/mixed; boundary="do8MRQVSlGrB0UTLqHg92jLcGMJvdk13G" From: Bryan Drewery To: Ngie Cooper , =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-ID: <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> Subject: Re: svn commit: r301602 - in head: . lib/libpam lib/libpam/libpam lib/libpam/libpam/security tools/build/mk References: <201606081147.u58BlJ8X099462@repo.freebsd.org> In-Reply-To: --do8MRQVSlGrB0UTLqHg92jLcGMJvdk13G Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/14/2016 9:25 AM, Ngie Cooper wrote: > On Wed, Jun 8, 2016 at 4:47 AM, Dag-Erling Sm=C3=B8rgrav wrote: >> Author: des >> Date: Wed Jun 8 11:47:19 2016 >> New Revision: 301602 >> URL: https://svnweb.freebsd.org/changeset/base/301602 >> >> Log: >> Replace _pam_verbose_error() with a macro. This was the last differ= ence >> between our libpam and stock OpenPAM, meaning that it is now possibl= e to >> replace the base libpam with a hypothetical ports version of OpenPAM= =2E >=20 > Unfortunately this commit wasn't followed by a bump to > __FreeBSD_version, so the package cluster hasn't updated all packages > that require libpam.so, like sudo, etc. >=20 > I can't commit anything for a while (my Macbook Pro is a bit out of > commission)... but I'll try and prod someone else to do it. >=20 Note this will also cause the OpenSSL bump in r301271 to break packages. Ports OpenSSL is supposed to be +1 over what is in base but r301271 made it match... thus rebuilding packages will likely cause chaos. We'll need to fix the OpenSSL port first. Also, I sort of consider this a failure on Poudriere/ports/pkg. We should be able to detect that shared libraries were bumped and some packages need to be rebuilt now. Unfortunately pkg doesn't record the dependency. Poudriere could record it and use it. This goes back to my proposal (which has lacked implementation time) about how to auto-detect when the system ABI changes without relying on __FreeBSD_version. Bumped libraries would have to be one of them. --=20 Regards, Bryan Drewery --do8MRQVSlGrB0UTLqHg92jLcGMJvdk13G-- --KeaqhvPNSk8MW9FHQcVm2BlulG1bWRDab 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 iQEbBAEBAgAGBQJXYDK9AAoJEDXXcbtuRpfPZkwH9ifCwcztS+I+Y/KvYtkvbOWu o9Zr7JWQr5lrDYgvOmyx5pwYPYDpelVX7USBy306lkdCZQ6wJyMUVFFr9JsbAVBc FOtfvLOOJCH0pZ4FmQCJKxgXvsSOmX4fqOnAYJlYiQNnfcQtw4tnYZ8EtMLPHRw1 3WXCMSwsjC8wb1UJLiIHe8F7BWg6pSu8NqDnY/9H/PkpRxh3HxbHfLMmhmIrJpYG gZcTHAceLfYOsOxvcLlNrH1fBg2va9aeXYWCGfbhXZHb6cnwGi5vtCHb1L00Ni5t v3La+RISt51r1pbkuFFBSg7/xMUyJ6flSS4kxqXDRYbdandT849iMpWuzEh+nw== =uWbe -----END PGP SIGNATURE----- --KeaqhvPNSk8MW9FHQcVm2BlulG1bWRDab-- From owner-svn-src-head@freebsd.org Tue Jun 14 16:41:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6B96B72335; Tue, 14 Jun 2016 16:41: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 B63782EE9; Tue, 14 Jun 2016 16:41:40 +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 u5EGfdi3016191; Tue, 14 Jun 2016 16:41:39 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGfdwD016190; Tue, 14 Jun 2016 16:41:39 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201606141641.u5EGfdwD016190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 14 Jun 2016 16:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301890 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:41:41 -0000 Author: andrew Date: Tue Jun 14 16:41:39 2016 New Revision: 301890 URL: https://svnweb.freebsd.org/changeset/base/301890 Log: Move the arm call to intr_pic_init_secondary earlier in the secondary CPU initialisation. This ensures it will complete before signalling to the boot CPU it has booted. This fixes a race with the GIC where the arm_gic_map may not be populated before it is used to bind interrupts leading to some interrupts becoming bound to no CPUs. Approved by: re (kib) Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/mp_machdep.c Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Tue Jun 14 16:20:25 2016 (r301889) +++ head/sys/arm/arm/mp_machdep.c Tue Jun 14 16:41:39 2016 (r301890) @@ -199,6 +199,9 @@ init_secondary(int cpu) vfp_init(); #endif + /* Configure the interrupt controller */ + intr_pic_init_secondary(); + mtx_lock_spin(&ap_boot_mtx); atomic_add_rel_32(&smp_cpus, 1); @@ -237,7 +240,6 @@ init_secondary(int cpu) cpu_initclocks_ap(); CTR0(KTR_SMP, "go into scheduler"); - intr_pic_init_secondary(); /* Enter the scheduler */ sched_throw(NULL); From owner-svn-src-head@freebsd.org Tue Jun 14 16:44:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2827B723AE; Tue, 14 Jun 2016 16:44:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id D615D210F; Tue, 14 Jun 2016 16:44:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id CA7DD1C17; Tue, 14 Jun 2016 16:44:05 +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 94A3D1DE03; Tue, 14 Jun 2016 16:44:05 +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 HPSUGDmdWXyA; Tue, 14 Jun 2016 16:44:02 +0000 (UTC) Subject: Re: svn commit: r301602 - in head: . lib/libpam lib/libpam/libpam lib/libpam/libpam/security tools/build/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com F37461DDFE To: Ngie Cooper , =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= References: <201606081147.u58BlJ8X099462@repo.freebsd.org> <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Tue, 14 Jun 2016 09:44:01 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PiSqV81TdtoXERPhCtKkO6iFGqWtRmMAl" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:44:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PiSqV81TdtoXERPhCtKkO6iFGqWtRmMAl Content-Type: multipart/mixed; boundary="02q6ChKSXE5g6tLlKFEAVa4cVNC5h4dMc" From: Bryan Drewery To: Ngie Cooper , =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-ID: Subject: Re: svn commit: r301602 - in head: . lib/libpam lib/libpam/libpam lib/libpam/libpam/security tools/build/mk References: <201606081147.u58BlJ8X099462@repo.freebsd.org> <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> In-Reply-To: <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> --02q6ChKSXE5g6tLlKFEAVa4cVNC5h4dMc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/14/2016 9:37 AM, Bryan Drewery wrote: > On 6/14/2016 9:25 AM, Ngie Cooper wrote: >> On Wed, Jun 8, 2016 at 4:47 AM, Dag-Erling Sm=C3=B8rgrav wrote: >>> Author: des >>> Date: Wed Jun 8 11:47:19 2016 >>> New Revision: 301602 >>> URL: https://svnweb.freebsd.org/changeset/base/301602 >>> >>> Log: >>> Replace _pam_verbose_error() with a macro. This was the last diffe= rence >>> between our libpam and stock OpenPAM, meaning that it is now possib= le to >>> replace the base libpam with a hypothetical ports version of OpenPA= M. >> >> Unfortunately this commit wasn't followed by a bump to >> __FreeBSD_version, so the package cluster hasn't updated all packages >> that require libpam.so, like sudo, etc. >> >> I can't commit anything for a while (my Macbook Pro is a bit out of >> commission)... but I'll try and prod someone else to do it. >> >=20 > Note this will also cause the OpenSSL bump in r301271 to break packages= =2E > Ports OpenSSL is supposed to be +1 over what is in base but r301271 > made it match... thus rebuilding packages will likely cause chaos. > We'll need to fix the OpenSSL port first. The port maintainer tells me he only bumps the port on base releases and doesn't consider CURRENT. So whatever @ OpenSSL. >=20 > Also, I sort of consider this a failure on Poudriere/ports/pkg. We > should be able to detect that shared libraries were bumped and some > packages need to be rebuilt now. >=20 > Unfortunately pkg doesn't record the dependency. >=20 > Poudriere could record it and use it. >=20 > This goes back to my proposal (which has lacked implementation time) > about how to auto-detect when the system ABI changes without relying on= > __FreeBSD_version. Bumped libraries would have to be one of them. >=20 >=20 --=20 Regards, Bryan Drewery --02q6ChKSXE5g6tLlKFEAVa4cVNC5h4dMc-- --PiSqV81TdtoXERPhCtKkO6iFGqWtRmMAl 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 iQEcBAEBAgAGBQJXYDRSAAoJEDXXcbtuRpfPI7IH/iqyCTOon9KrfTRbK/NaXzsQ /9ZQj3jtpIUiTXxFmANHGFI6zHCoTAUd9sUWyPQghnRdP//1yOWjdeD+iDwZ3hmk HAQPvpOFSQAdvKx/LltMmo6i8NG0BPGMnwzY6csYsrLkSrudVQaHbUWQwmMkyC2h Am6dhQXl8vYtZlgilUg98AbWonvvODbF5drPw80W7GWCMO1XfzizCW/JOIATJB4K bTRWsg/D0jLxHaug4GvlB8tPwXd4GBBxaxfXmWTyvnlmhigpttNSdcZyGKVaPQrY CZKnII2DBANU8sjp9fe4VFRCIzP5yAOjiAttL0AR9UKb4U56r9siRIvhpCgMCo0= =37rt -----END PGP SIGNATURE----- --PiSqV81TdtoXERPhCtKkO6iFGqWtRmMAl-- From owner-svn-src-head@freebsd.org Tue Jun 14 16:55:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDC1FB7265D; Tue, 14 Jun 2016 16:55:07 +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 7F61B29B0; Tue, 14 Jun 2016 16:55:07 +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 u5EGt6Op023231; Tue, 14 Jun 2016 16:55:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGt53J023220; Tue, 14 Jun 2016 16:55:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141655.u5EGt53J023220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:55:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301891 - in head: gnu/usr.bin/groff/src/libs/libbib kerberos5/tools/asn1_compile lib/libclang_rt/asan_cxx lib/libclang_rt/profile lib/libclang_rt/safestack lib/libpam/static_libpam lib... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:55:07 -0000 Author: bdrewery Date: Tue Jun 14 16:55:05 2016 New Revision: 301891 URL: https://svnweb.freebsd.org/changeset/base/301891 Log: DIRDEPS_BUILD: Update dependencies Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/groff/src/libs/libbib/Makefile.depend head/kerberos5/tools/asn1_compile/Makefile.depend head/lib/libclang_rt/asan_cxx/Makefile.depend head/lib/libclang_rt/profile/Makefile.depend head/lib/libclang_rt/safestack/Makefile.depend head/lib/libpam/static_libpam/Makefile.depend head/libexec/fingerd/Makefile.depend head/libexec/ftpd/Makefile.depend head/libexec/rlogind/Makefile.depend head/libexec/rshd/Makefile.depend head/secure/usr.sbin/sshd/Makefile.depend Modified: head/gnu/usr.bin/groff/src/libs/libbib/Makefile.depend ============================================================================== --- head/gnu/usr.bin/groff/src/libs/libbib/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/gnu/usr.bin/groff/src/libs/libbib/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -4,6 +4,7 @@ DIRDEPS = \ include \ include/xlocale \ + lib/libc++ \ .include Modified: head/kerberos5/tools/asn1_compile/Makefile.depend ============================================================================== --- head/kerberos5/tools/asn1_compile/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/kerberos5/tools/asn1_compile/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -9,6 +9,7 @@ DIRDEPS = \ include/xlocale \ kerberos5/lib/libroken \ kerberos5/lib/libvers \ + kerberos5/tools/make-roken.host \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ Modified: head/lib/libclang_rt/asan_cxx/Makefile.depend ============================================================================== --- head/lib/libclang_rt/asan_cxx/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/lib/libclang_rt/asan_cxx/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -3,6 +3,7 @@ DIRDEPS = \ include \ + lib/libc++ \ .include Modified: head/lib/libclang_rt/profile/Makefile.depend ============================================================================== --- head/lib/libclang_rt/profile/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/lib/libclang_rt/profile/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -4,6 +4,7 @@ DIRDEPS = \ include \ include/xlocale \ + lib/libc++ \ .include Modified: head/lib/libclang_rt/safestack/Makefile.depend ============================================================================== --- head/lib/libclang_rt/safestack/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/lib/libclang_rt/safestack/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -5,6 +5,7 @@ DIRDEPS = \ include \ include/arpa \ include/xlocale \ + lib/libc++ \ lib/ncurses/ncursesw \ Modified: head/lib/libpam/static_libpam/Makefile.depend ============================================================================== --- head/lib/libpam/static_libpam/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/lib/libpam/static_libpam/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/libpam/libpam \ lib/libpam/modules/pam_chroot \ lib/libpam/modules/pam_deny \ lib/libpam/modules/pam_echo \ Modified: head/libexec/fingerd/Makefile.depend ============================================================================== --- head/libexec/fingerd/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/libexec/fingerd/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -8,8 +8,10 @@ DIRDEPS = \ include/arpa \ include/xlocale \ lib/${CSU_DIR} \ + lib/libblacklist \ lib/libc \ lib/libcompiler_rt \ + lib/libthr \ lib/libutil \ Modified: head/libexec/ftpd/Makefile.depend ============================================================================== --- head/libexec/ftpd/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/libexec/ftpd/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -8,12 +8,14 @@ DIRDEPS = \ include/arpa \ include/xlocale \ lib/${CSU_DIR} \ + lib/libblacklist \ lib/libc \ lib/libcompiler_rt \ lib/libcrypt \ lib/libmd \ lib/libopie \ lib/libpam/libpam \ + lib/libthr \ lib/libutil \ lib/libxo \ lib/msun \ Modified: head/libexec/rlogind/Makefile.depend ============================================================================== --- head/libexec/rlogind/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/libexec/rlogind/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -8,8 +8,10 @@ DIRDEPS = \ include/arpa \ include/xlocale \ lib/${CSU_DIR} \ + lib/libblacklist \ lib/libc \ lib/libcompiler_rt \ + lib/libthr \ lib/libutil \ Modified: head/libexec/rshd/Makefile.depend ============================================================================== --- head/libexec/rshd/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/libexec/rshd/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -8,9 +8,11 @@ DIRDEPS = \ include/arpa \ include/xlocale \ lib/${CSU_DIR} \ + lib/libblacklist \ lib/libc \ lib/libcompiler_rt \ lib/libpam/libpam \ + lib/libthr \ lib/libutil \ Modified: head/secure/usr.sbin/sshd/Makefile.depend ============================================================================== --- head/secure/usr.sbin/sshd/Makefile.depend Tue Jun 14 16:41:39 2016 (r301890) +++ head/secure/usr.sbin/sshd/Makefile.depend Tue Jun 14 16:55:05 2016 (r301891) @@ -17,6 +17,7 @@ DIRDEPS = \ kerberos5/lib/libroken \ kerberos5/lib/libwind \ lib/${CSU_DIR} \ + lib/libblacklist \ lib/libbsm \ lib/libc \ lib/libcom_err \ From owner-svn-src-head@freebsd.org Tue Jun 14 17:15:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCEBDB72C07; Tue, 14 Jun 2016 17:15:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89EB725D1; Tue, 14 Jun 2016 17:15:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5EHFa40030983; Tue, 14 Jun 2016 17:15:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EHFaa3030982; Tue, 14 Jun 2016 17:15:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141715.u5EHFaa3030982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 17:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301892 - head/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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 17:15:37 -0000 Author: bdrewery Date: Tue Jun 14 17:15:36 2016 New Revision: 301892 URL: https://svnweb.freebsd.org/changeset/base/301892 Log: Bump __FreeBSD_version for r301602. Reported by: ngie, Ben Lavery PR: 210229 Approved by: re (gjb) Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Jun 14 16:55:05 2016 (r301891) +++ head/sys/sys/param.h Tue Jun 14 17:15:36 2016 (r301892) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100116 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100117 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Tue Jun 14 17:23:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5456B72EF2; Tue, 14 Jun 2016 17:23:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FB262D4D; Tue, 14 Jun 2016 17:23:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5EHNMl6034485; Tue, 14 Jun 2016 17:23:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EHNM2o034484; Tue, 14 Jun 2016 17:23:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141723.u5EHNM2o034484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 17:23:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301893 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 17:23:23 -0000 Author: bdrewery Date: Tue Jun 14 17:23:22 2016 New Revision: 301893 URL: https://svnweb.freebsd.org/changeset/base/301893 Log: Fix build from stable/10 with fmake. This was broken in r301888. fmake does not look in share/mk by default and thus does not yet have MK_META_MODE set with default. Pointyhat to: bdrewery Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jun 14 17:15:36 2016 (r301892) +++ head/Makefile Tue Jun 14 17:23:22 2016 (r301893) @@ -219,7 +219,7 @@ _CAN_USE_META_MODE?= yes .if !defined(_CAN_USE_META_MODE) _MAKE+= MK_META_MODE=no .unexport META_MODE -.elif ${MK_META_MODE} == "yes" +.elif defined(MK_META_MODE) && ${MK_META_MODE} == "yes" .if !exists(/dev/filemon) && !defined(NO_FILEMON) && !make(showconfig) # Require filemon be loaded to provide a working incremental build .error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded. \ From owner-svn-src-head@freebsd.org Tue Jun 14 17:26:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6595B720D6; Tue, 14 Jun 2016 17:26:05 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d: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 6443C2229; Tue, 14 Jun 2016 17:26:05 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x230.google.com with SMTP id c73so66388669qkg.2; Tue, 14 Jun 2016 10:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=P/KZ6+X83T6oJcc/yUe+ZRtM5wjZQhRvPkxxMhx/LNM=; b=llrb5qAJuUgAqa4leNnEfgDHHG+7yZEIxM+yEW1AOVKpoCUmxWPwFxzAx+KupfZzps oHudpQuNIXtlWCNCSSaVZiGLZhnELEQYje/1wnTEa576bYI1NXc2G4iaX2f7Hdu0tmz/ hOlIKpaFxnisCE1z21FvU0tLdZ2B7PF264NmvBsrX6gxWgXw+x82GbKDfhObkGsT2NIP OwYm262gCqRZ25c46UdshNqQGs+18GSrfbjDr+8G3naN70LOd4mr2/gi82n7neQyEa+I Zm6Ez/Cs/n87pHKnW4vlM+MraSkXAVcefGy+j9JVQ+x0X5NrtnE/6uoFFRvFSiJCH3cz xvHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=P/KZ6+X83T6oJcc/yUe+ZRtM5wjZQhRvPkxxMhx/LNM=; b=dZVsn7Yh93PHBI68lLmAWE6UMACkxXub4Up5IHjyNfZkBOX/XYZpR2NamlgVIV5Jma OPafLGjuK54KwZzTHfkbYkxL9qG0oJnSsvWifi1wxBejVDpV3Z9oMbZQVAb1NkQ1Jvrj 2H5abU+YFrDTqtSopWzdafTBei2bVLdCy1hvmdeBDOu8hoDpl4RCaBRyeZ78TxYqN6V7 pwAhLEtonHIukXeGI8ht6SIbgkNhwXQQfuH4ecn8rkwnsbGjsefOXxrMeQQKSf8QQp25 Yhb0nYhX4NoxnIEupmKAAwSFgXbpJ9wUUKDtTNaGxvEBCaFKtCn2jqo+4EpFgPxJfpyf Vcug== X-Gm-Message-State: ALyK8tKrN3cEeV2fUZPZTJUlIbr68hhSDU6IyjTZsjfGPu/hfy6l2ciNWUZC/UZAQUZArMu6HLfs//9Wv2Oe1w== X-Received: by 10.55.73.209 with SMTP id w200mr1968750qka.77.1465925164689; Tue, 14 Jun 2016 10:26:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.148.131 with HTTP; Tue, 14 Jun 2016 10:26:04 -0700 (PDT) In-Reply-To: <201606141715.u5EHFaa3030982@repo.freebsd.org> References: <201606141715.u5EHFaa3030982@repo.freebsd.org> From: Ngie Cooper Date: Tue, 14 Jun 2016 10:26:04 -0700 Message-ID: Subject: Re: svn commit: r301892 - head/sys/sys To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 17:26:05 -0000 On Tue, Jun 14, 2016 at 10:15 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Jun 14 17:15:36 2016 > New Revision: 301892 > URL: https://svnweb.freebsd.org/changeset/base/301892 > > Log: > Bump __FreeBSD_version for r301602. > > Reported by: ngie, Ben Lavery > PR: 210229 > Approved by: re (gjb) Thanks Bryan :)!!! From owner-svn-src-head@freebsd.org Tue Jun 14 17:47:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02E97B7258D; Tue, 14 Jun 2016 17:47:01 +0000 (UTC) (envelope-from ben.lavery@hashbang0.com) Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E49FE2EBF; Tue, 14 Jun 2016 17:47:00 +0000 (UTC) (envelope-from ben.lavery@hashbang0.com) Received: from talantinc.lan (51.250.113.87.dyn.plus.net [87.113.250.51]) by mx.zohomail.com with SMTPS id 1465926409926783.684557784328; Tue, 14 Jun 2016 10:46:49 -0700 (PDT) Subject: Re: svn commit: r301892 - head/sys/sys Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8EF860FB-9FEE-4C7E-9D4A-CF5EE3BDB0A9"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.6b2 From: Ben Lavery In-Reply-To: <201606141715.u5EHFaa3030982@repo.freebsd.org> Date: Tue, 14 Jun 2016 18:46:35 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201606141715.u5EHFaa3030982@repo.freebsd.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3124) X-Zoho-Virus-Status: 1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 17:47:01 -0000 --Apple-Mail=_8EF860FB-9FEE-4C7E-9D4A-CF5EE3BDB0A9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 14 Jun 2016, at 18:15, Bryan Drewery wrote: >=20 > Author: bdrewery > Date: Tue Jun 14 17:15:36 2016 > New Revision: 301892 > URL: https://svnweb.freebsd.org/changeset/base/301892 >=20 > Log: > Bump __FreeBSD_version for r301602. >=20 > Reported by: ngie, Ben Lavery > PR: 210229 > Approved by: re (gab) Thanks Bryan and those involved. Apologies for not being more specific = in my initial report! --Apple-Mail=_8EF860FB-9FEE-4C7E-9D4A-CF5EE3BDB0A9 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 iQEcBAEBCgAGBQJXYEMEAAoJEB8k5j03kFtxgUQIAJgBjoY2UiKmlBy5JFcZjpja c4aQH8VUojCSco5C9XSQyEooXFwxqpUo96YsLCIMjGbo+Jou4YDsy+3PzasRZ1l0 dtuvFh1GStegE2lWYhTeoXV5SFKFF0Bw4HMWI/cJ1GZvnJ0ANBuyJBRdBVveNGGZ FxGK8CodUdoJxbtoLfIDMJxSNO+rLERuq512XfzPwqzSaptFsNeLZaXhnyWiFxjN yfMKs+sfiR6TKneMWpo5IFGbiU71X/qvU13Q5Pw+SgSB/17LaykZOwVAIy6K0WzY j8LN3fsMGhV3nGm/QmeIo+eXUy2IWvixaVT2VtMkCwLH7JgG+LCEqjEda13Fu2A= =w9G0 -----END PGP SIGNATURE----- --Apple-Mail=_8EF860FB-9FEE-4C7E-9D4A-CF5EE3BDB0A9-- From owner-svn-src-head@freebsd.org Tue Jun 14 18:37:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D397DAF28E2; Tue, 14 Jun 2016 18:37:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A52B02FAB; Tue, 14 Jun 2016 18:37:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5EIbXXQ060470; Tue, 14 Jun 2016 18:37:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EIbXJI060469; Tue, 14 Jun 2016 18:37:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141837.u5EIbXJI060469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 18:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301894 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 18:37:34 -0000 Author: bdrewery Date: Tue Jun 14 18:37:33 2016 New Revision: 301894 URL: https://svnweb.freebsd.org/changeset/base/301894 Log: Fix makeman showing dependency of DIRDEPS_BUILD->META_MODE. This broke in r301887 with the meta mode whitelist. 'make showconfig' still needs WITH_META_MODE support. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jun 14 17:23:22 2016 (r301893) +++ head/Makefile Tue Jun 14 18:37:33 2016 (r301894) @@ -151,8 +151,8 @@ TGTS+= ${BITGTS} META_TGT_WHITELIST+= \ _* build32 buildfiles buildincludes buildkernel buildsoft \ buildworld everything kernel-toolchains kernels libraries \ - native-xtools tinderbox toolchain toolchains universe worlds \ - xdev xdev-build + native-xtools showconfig tinderbox toolchain toolchains universe \ + worlds xdev xdev-build .ORDER: buildworld installworld .ORDER: buildworld distributeworld From owner-svn-src-head@freebsd.org Tue Jun 14 18:41:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16AF7AF2A81; Tue, 14 Jun 2016 18:41:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEF8F21CC; Tue, 14 Jun 2016 18:41:19 +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 u5EIfIXV061492; Tue, 14 Jun 2016 18:41:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EIfIlF061491; Tue, 14 Jun 2016 18:41:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141841.u5EIfIlF061491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 18:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301895 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 18:41:20 -0000 Author: bdrewery Date: Tue Jun 14 18:41:18 2016 New Revision: 301895 URL: https://svnweb.freebsd.org/changeset/base/301895 Log: Renegerate for WITH_META_MODE updates. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Jun 14 18:37:33 2016 (r301894) +++ head/share/man/man5/src.conf.5 Tue Jun 14 18:41:18 2016 (r301895) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery .\" $FreeBSD$ -.Dd June 8, 2016 +.Dd June 14, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1080,7 +1080,7 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITH_META_MODE -.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 301474 2016-06-05 23:14:06Z bdrewery +.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 301889 2016-06-14 16:20:25Z bdrewery Creates .Xr make 1 meta files when building, which can provide a reliable incremental build when @@ -1089,9 +1089,13 @@ using 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. -When the +The .Xr filemon 4 -module is loaded, any files used by the commands executed will be tracked as +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: @@ -1119,6 +1123,9 @@ The meta files can also be useful for de 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 From owner-svn-src-head@freebsd.org Tue Jun 14 19:16:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97579B720B7; Tue, 14 Jun 2016 19:16:19 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from mail.infocus-llc.com (mail.infocus-llc.com [199.15.120.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 756832124; Tue, 14 Jun 2016 19:16:19 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from draco.over-yonder.net (c-75-65-60-66.hsd1.ms.comcast.net [75.65.60.66]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.tarragon.infocus-llc.com (Postfix) with ESMTPSA id 3rTfJJ4DGVz1QM; Tue, 14 Jun 2016 14:06:24 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3rTfJJ0Zgtz2W6; Tue, 14 Jun 2016 14:06:24 -0500 (CDT) Date: Tue, 14 Jun 2016 14:06:24 -0500 From: "Matthew D. Fuller" To: Bryan Drewery Cc: Ngie Cooper , Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r301602 - in head: . lib/libpam lib/libpam/libpam lib/libpam/libpam/security tools/build/mk Message-ID: <20160614190624.GI89416@over-yonder.net> References: <201606081147.u58BlJ8X099462@repo.freebsd.org> <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> X-Editor: vi X-OS: FreeBSD X-Virus-Scanned: clamav-milter 0.99 at mail.tarragon.infocus-llc.com X-Virus-Status: Clean User-Agent: Mutt/1.6.1-fullermd.4 (2016-04-27) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 19:16:19 -0000 On Tue, Jun 14, 2016 at 09:37:17AM -0700 I heard the voice of Bryan Drewery, and lo! it spake thus: > > Ports OpenSSL is supposed to be +1 over what is in base but r301271 > made it match... thus rebuilding packages will likely cause chaos. Actually since r290207 (last Oct). It makes life... interesting. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. From owner-svn-src-head@freebsd.org Tue Jun 14 20:20:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D1C9B72F29; Tue, 14 Jun 2016 20:20:54 +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 C73162195; Tue, 14 Jun 2016 20:20:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA19671; Tue, 14 Jun 2016 23:20:50 +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 1bCupO-0009Ak-82; Tue, 14 Jun 2016 23:20:50 +0300 Subject: Re: svn commit: r301602 - in head: . lib/libpam lib/libpam/libpam lib/libpam/libpam/security tools/build/mk To: Bryan Drewery References: <201606081147.u58BlJ8X099462@repo.freebsd.org> <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> Cc: Ngie Cooper , =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Andriy Gapon Message-ID: Date: Tue, 14 Jun 2016 23:19:48 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <15ae4cc5-c65f-49af-5456-07d2cf476337@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 20:20:54 -0000 On 14/06/2016 19:37, Bryan Drewery wrote: > Note this will also cause the OpenSSL bump in r301271 to break packages. > Ports OpenSSL is supposed to be +1 over what is in base but r301271 I am curious if it is r301271 (change of SHLIB_VERSION_NUMBER C macro) or if it is the actual bump of base's libssl to version 8. And why. So that I know it from now on. -- Andriy Gapon From owner-svn-src-head@freebsd.org Tue Jun 14 20:58:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7866CB72551; Tue, 14 Jun 2016 20:58: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 3B13422D3; Tue, 14 Jun 2016 20:58: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 u5EKw5fC012794; Tue, 14 Jun 2016 20:58:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EKw5ci012793; Tue, 14 Jun 2016 20:58:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201606142058.u5EKw5ci012793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 14 Jun 2016 20:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301896 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 20:58:06 -0000 Author: np Date: Tue Jun 14 20:58:05 2016 New Revision: 301896 URL: https://svnweb.freebsd.org/changeset/base/301896 Log: Fix bug in iwcm that caused a panic in iw_cm_wq when krping is run repeatedly in a tight loop. Approved by: re (gjb@) Obtained from: hselasky@ (part of larger changes in D5791) Modified: head/sys/ofed/drivers/infiniband/core/iwcm.c Modified: head/sys/ofed/drivers/infiniband/core/iwcm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/iwcm.c Tue Jun 14 18:41:18 2016 (r301895) +++ head/sys/ofed/drivers/infiniband/core/iwcm.c Tue Jun 14 20:58:05 2016 (r301896) @@ -266,9 +266,16 @@ static void add_ref(struct iw_cm_id *cm_ static void rem_ref(struct iw_cm_id *cm_id) { struct iwcm_id_private *cm_id_priv; + int cb_destroy; + cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); - if (iwcm_deref_id(cm_id_priv) && - test_bit(IWCM_F_CALLBACK_DESTROY, &cm_id_priv->flags)) { + + /* + * Test bit before deref in case the cm_id gets freed on another + * thread. + */ + cb_destroy = test_bit(IWCM_F_CALLBACK_DESTROY, &cm_id_priv->flags); + if (iwcm_deref_id(cm_id_priv) && cb_destroy) { BUG_ON(!list_empty(&cm_id_priv->work_list)); free_cm_id(cm_id_priv); } @@ -1157,6 +1164,8 @@ static void cm_work_handler(struct work_ } return; } + if (empty) + return; spin_lock_irqsave(&cm_id_priv->lock, flags); } spin_unlock_irqrestore(&cm_id_priv->lock, flags); From owner-svn-src-head@freebsd.org Tue Jun 14 21:02:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E28EB72692; Tue, 14 Jun 2016 21:02:38 +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 D8BD427B8; Tue, 14 Jun 2016 21:02:37 +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 u5EL2bOZ016382; Tue, 14 Jun 2016 21:02:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EL2bXb016381; Tue, 14 Jun 2016 21:02:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201606142102.u5EL2bXb016381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 14 Jun 2016 21:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301897 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 21:02:38 -0000 Author: np Date: Tue Jun 14 21:02:36 2016 New Revision: 301897 URL: https://svnweb.freebsd.org/changeset/base/301897 Log: iw_cxgbe: Make sure that send_abort results in a TCP RST and not a FIN. Release the hold on ep->com immediately after sending the RST. This fixes a bug that sometimes leaves userspace iWARP tools hung when the user presses ^C. Submitted by: Krishnamraju Eraparaju @ Chelsio Approved by: re (gjb@) Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jun 14 20:58:05 2016 (r301896) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jun 14 21:02:36 2016 (r301897) @@ -760,7 +760,7 @@ process_socket_event(struct c4iw_ep *ep) } /* peer close */ - if ((so->so_rcv.sb_state & SBS_CANTRCVMORE) && state < CLOSING) { + if ((so->so_rcv.sb_state & SBS_CANTRCVMORE) && state <= CLOSING) { process_peer_close(ep); return; } @@ -1223,9 +1223,23 @@ static int send_abort(struct c4iw_ep *ep CTR2(KTR_IW_CXGBE, "%s:abB %p", __func__, ep); abort_socket(ep); - err = close_socket(&ep->com, 0); + + /* + * Since socket options were set as l_onoff=1 and l_linger=0 in in + * abort_socket, invoking soclose here sends a RST (reset) to the peer. + */ + err = close_socket(&ep->com, 1); set_bit(ABORT_CONN, &ep->com.history); CTR2(KTR_IW_CXGBE, "%s:abE %p", __func__, ep); + + /* + * TBD: iw_cgbe driver should receive ABORT reply for every ABORT + * request it has sent. But the current TOE driver is not propagating + * this ABORT reply event (via do_abort_rpl) to iw_cxgbe. So as a work- + * around de-refer 'ep' (which was refered before sending ABORT request) + * here instead of doing it in abort_rpl() handler of iw_cxgbe driver. + */ + c4iw_put_ep(&ep->com); return err; } From owner-svn-src-head@freebsd.org Tue Jun 14 21:09:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D6D6B7271E; Tue, 14 Jun 2016 21:09:02 +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 D328829AC; Tue, 14 Jun 2016 21:09:01 +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 u5EL91AV016644; Tue, 14 Jun 2016 21:09:01 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EL91xm016643; Tue, 14 Jun 2016 21:09:01 GMT (envelope-from np@FreeBSD.org) Message-Id: <201606142109.u5EL91xm016643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 14 Jun 2016 21:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301898 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 21:09:02 -0000 Author: np Date: Tue Jun 14 21:09:00 2016 New Revision: 301898 URL: https://svnweb.freebsd.org/changeset/base/301898 Log: cxgbe/t4_tom: Fix inverted assertion in r300895. It is RDMA connections and not others that are allowed to fail the receive window check. Approved by: re (gjb@) Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jun 14 21:02:36 2016 (r301897) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jun 14 21:09:00 2016 (r301898) @@ -1418,7 +1418,7 @@ do_rx_data(struct sge_iq *iq, const stru tp->rcv_nxt += len; if (tp->rcv_wnd < len) { - KASSERT(toep->ulp_mode != ULP_MODE_RDMA, + KASSERT(toep->ulp_mode == ULP_MODE_RDMA, ("%s: negative window size", __func__)); } From owner-svn-src-head@freebsd.org Tue Jun 14 23:52:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA4ABAF0AF6; Tue, 14 Jun 2016 23:52:33 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 836022FC0; Tue, 14 Jun 2016 23:52:33 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5ENqWQA078197; Tue, 14 Jun 2016 23:52:32 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5ENqWhP078196; Tue, 14 Jun 2016 23:52:32 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201606142352.u5ENqWhP078196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Tue, 14 Jun 2016 23:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301900 - head/contrib/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 23:52:33 -0000 Author: sjg Date: Tue Jun 14 23:52:32 2016 New Revision: 301900 URL: https://svnweb.freebsd.org/changeset/base/301900 Log: meta_oodate: set needOODATE if oodate due to missing .meta file. Reviewed by: bdrewery Approved by: re Modified: head/contrib/bmake/meta.c Modified: head/contrib/bmake/meta.c ============================================================================== --- head/contrib/bmake/meta.c Tue Jun 14 23:41:07 2016 (r301899) +++ head/contrib/bmake/meta.c Tue Jun 14 23:52:32 2016 (r301900) @@ -1474,6 +1474,7 @@ meta_oodate(GNode *gn, Boolean oodate) if (DEBUG(META)) fprintf(debug_file, "%s: required but missing\n", fname); oodate = TRUE; + needOODATE = TRUE; /* assume the worst */ } } } From owner-svn-src-head@freebsd.org Wed Jun 15 08:34:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43362A09D82; Wed, 15 Jun 2016 08:34:37 +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 13AE81740; Wed, 15 Jun 2016 08:34:37 +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 u5F8YaGH070080; Wed, 15 Jun 2016 08:34:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5F8Yac1070079; Wed, 15 Jun 2016 08:34:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201606150834.u5F8Yac1070079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 15 Jun 2016 08:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301922 - head/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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 08:34:37 -0000 Author: mjg Date: Wed Jun 15 08:34:36 2016 New Revision: 301922 URL: https://svnweb.freebsd.org/changeset/base/301922 Log: sdt: annotate the probe test as likely to fail This saves a jump in plenty of cases. Approved by: re (kib) MFC after: 1 week Modified: head/sys/sys/sdt.h Modified: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Wed Jun 15 06:42:30 2016 (r301921) +++ head/sys/sys/sdt.h Wed Jun 15 08:34:36 2016 (r301922) @@ -161,7 +161,7 @@ SET_DECLARE(sdt_argtypes_set, struct sdt extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \ - if (sdt_##prov##_##mod##_##func##_##name->id) \ + if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \ (*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \ (uintptr_t) arg0, (uintptr_t) arg1, (uintptr_t) arg2, \ (uintptr_t) arg3, (uintptr_t) arg4); \ From owner-svn-src-head@freebsd.org Wed Jun 15 15:55:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EE8AA450CE; Wed, 15 Jun 2016 15:55: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 EFD1019E3; Wed, 15 Jun 2016 15:55: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 u5FFtFkK032187; Wed, 15 Jun 2016 15:55:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FFtFZq032186; Wed, 15 Jun 2016 15:55:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606151555.u5FFtFZq032186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Jun 2016 15:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301928 - head/sys/fs/devfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 15:55:16 -0000 Author: kib Date: Wed Jun 15 15:55:14 2016 New Revision: 301928 URL: https://svnweb.freebsd.org/changeset/base/301928 Log: Another follow-up to r291460. Only access vp->v_rdev for VCHR vnodes in devfs_reclaim(). Reported and tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 1 week Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Wed Jun 15 14:12:22 2016 (r301927) +++ head/sys/fs/devfs/devfs_vnops.c Wed Jun 15 15:55:14 2016 (r301928) @@ -1360,10 +1360,10 @@ devfs_readlink(struct vop_readlink_args static int devfs_reclaim(struct vop_reclaim_args *ap) { - struct vnode *vp = ap->a_vp; + struct vnode *vp; struct devfs_dirent *de; - struct cdev *dev; + vp = ap->a_vp; mtx_lock(&devfs_de_interlock); de = vp->v_data; if (de != NULL) { @@ -1371,24 +1371,31 @@ devfs_reclaim(struct vop_reclaim_args *a vp->v_data = NULL; } mtx_unlock(&devfs_de_interlock); - vnode_destroy_vobject(vp); + return (0); +} + +static int +devfs_reclaim_vchr(struct vop_reclaim_args *ap) +{ + struct vnode *vp; + struct cdev *dev; + + vp = ap->a_vp; + MPASS(vp->v_type == VCHR); + + devfs_reclaim(ap); VI_LOCK(vp); dev_lock(); dev = vp->v_rdev; vp->v_rdev = NULL; - - if (dev == NULL) { - dev_unlock(); - VI_UNLOCK(vp); - return (0); - } - - dev->si_usecount -= vp->v_usecount; + if (dev != NULL) + dev->si_usecount -= vp->v_usecount; dev_unlock(); VI_UNLOCK(vp); - dev_rel(dev); + if (dev != NULL) + dev_rel(dev); return (0); } @@ -1898,7 +1905,7 @@ static struct vop_vector devfs_specops = .vop_readdir = VOP_PANIC, .vop_readlink = VOP_PANIC, .vop_reallocblks = VOP_PANIC, - .vop_reclaim = devfs_reclaim, + .vop_reclaim = devfs_reclaim_vchr, .vop_remove = devfs_remove, .vop_rename = VOP_PANIC, .vop_revoke = devfs_revoke, From owner-svn-src-head@freebsd.org Wed Jun 15 15:56:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4D8AA451C3; Wed, 15 Jun 2016 15:56:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A9E41B71; Wed, 15 Jun 2016 15:56:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5FFu39s032258; Wed, 15 Jun 2016 15:56:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FFu3pt032257; Wed, 15 Jun 2016 15:56:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606151556.u5FFu3pt032257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 15 Jun 2016 15:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301929 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 15:56:04 -0000 Author: kib Date: Wed Jun 15 15:56:03 2016 New Revision: 301929 URL: https://svnweb.freebsd.org/changeset/base/301929 Log: Do not assume that we own the use reference on the covered vnode until we set MNTK_UNMOUNT flag on the mp. Otherwise parallel unmount which wins race with us could dereference the covered vnode, and we are left with the locked freed memory. Reported and tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 1 week Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Wed Jun 15 15:55:14 2016 (r301928) +++ head/sys/kern/vfs_mount.c Wed Jun 15 15:56:03 2016 (r301929) @@ -1220,7 +1220,6 @@ dounmount(struct mount *mp, int flags, s VI_LOCK(coveredvp); vholdl(coveredvp); vn_lock(coveredvp, LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY); - vdrop(coveredvp); /* * Check for mp being unmounted while waiting for the * covered vnode lock. @@ -1228,18 +1227,22 @@ dounmount(struct mount *mp, int flags, s if (coveredvp->v_mountedhere != mp || coveredvp->v_mountedhere->mnt_gen != mnt_gen_r) { VOP_UNLOCK(coveredvp, 0); + vdrop(coveredvp); vfs_rel(mp); return (EBUSY); } } + /* * Only privileged root, or (if MNT_USER is set) the user that did the * original mount is permitted to unmount this filesystem. */ error = vfs_suser(mp, td); if (error != 0) { - if (coveredvp) + if (coveredvp != NULL) { VOP_UNLOCK(coveredvp, 0); + vdrop(coveredvp); + } vfs_rel(mp); return (error); } @@ -1249,8 +1252,10 @@ dounmount(struct mount *mp, int flags, s if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 || !TAILQ_EMPTY(&mp->mnt_uppers)) { MNT_IUNLOCK(mp); - if (coveredvp) + if (coveredvp != NULL) { VOP_UNLOCK(coveredvp, 0); + vdrop(coveredvp); + } vn_finished_write(mp); return (EBUSY); } @@ -1283,6 +1288,16 @@ dounmount(struct mount *mp, int flags, s if (mp->mnt_flag & MNT_EXPUBLIC) vfs_setpublicfs(NULL, NULL, NULL); + /* + * From now, we can claim that the use reference on the + * coveredvp is ours, and the ref can be released only by + * successfull unmount by us, or left for later unmount + * attempt. The previously acquired hold reference is no + * longer needed to protect the vnode from reuse. + */ + if (coveredvp != NULL) + vdrop(coveredvp); + vfs_msync(mp, MNT_WAIT); MNT_ILOCK(mp); async_flag = mp->mnt_flag & MNT_ASYNC; From owner-svn-src-head@freebsd.org Wed Jun 15 20:56:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16731A47960; Wed, 15 Jun 2016 20:56:47 +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 C8D871357; Wed, 15 Jun 2016 20:56:46 +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 u5FKujHI008381; Wed, 15 Jun 2016 20:56:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FKujOu008377; Wed, 15 Jun 2016 20:56:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201606152056.u5FKujOu008377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 15 Jun 2016 20:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301930 - in head/sys: dev/cxgbe/tom 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 20:56:47 -0000 Author: jhb Date: Wed Jun 15 20:56:45 2016 New Revision: 301930 URL: https://svnweb.freebsd.org/changeset/base/301930 Log: Move backend-specific fields of kaiocb into a union. This reduces the size of kaiocb slightly. I've also added some generic fields that other backends can use in place of the BIO-specific fields. Change the socket and Chelsio DDP backends to use 'backend3' instead of abusing _aiocb_private.status directly. This confines the use of _aiocb_private to the AIO internals in vfs_aio.c. Reviewed by: kib (earlier version) Approved by: re (gjb) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D6547 Modified: head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/kern/sys_socket.c head/sys/kern/vfs_aio.c head/sys/sys/aio.h Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Wed Jun 15 15:56:03 2016 (r301929) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Wed Jun 15 20:56:45 2016 (r301930) @@ -74,6 +74,12 @@ VNET_DECLARE(int, tcp_autorcvbuf_inc); VNET_DECLARE(int, tcp_autorcvbuf_max); #define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) +/* + * Use the 'backend3' field in AIO jobs to store the amount of data + * received by the AIO job so far. + */ +#define aio_received backend3 + static void aio_ddp_requeue_task(void *context, int pending); static void ddp_complete_all(struct toepcb *toep, int error); static void t4_aio_cancel_active(struct kaiocb *job); @@ -204,7 +210,7 @@ ddp_complete_one(struct kaiocb *job, int * it was cancelled, report it as a short read rather than an * error. */ - copied = job->uaiocb._aiocb_private.status; + copied = job->aio_received; if (copied != 0 || error == 0) aio_complete(job, copied, 0); else @@ -350,7 +356,7 @@ insert_ddp_data(struct toepcb *toep, uin MPASS((toep->ddp_flags & db_flag) != 0); db = &toep->db[db_idx]; job = db->job; - copied = job->uaiocb._aiocb_private.status; + copied = job->aio_received; placed = n; if (placed > job->uaiocb.aio_nbytes - copied) placed = job->uaiocb.aio_nbytes - copied; @@ -360,7 +366,7 @@ insert_ddp_data(struct toepcb *toep, uin * t4_aio_cancel_active() completes this * request. */ - job->uaiocb._aiocb_private.status += placed; + job->aio_received += placed; } else if (copied + placed != 0) { CTR4(KTR_CXGBE, "%s: completing %p (copied %ld, placed %lu)", @@ -601,16 +607,16 @@ handle_ddp_data(struct toepcb *toep, __b * Update the job's length but defer completion to the * TCB_RPL callback. */ - job->uaiocb._aiocb_private.status += len; + job->aio_received += len; goto out; } else if (!aio_clear_cancel_function(job)) { /* * Update the copied length for when * t4_aio_cancel_active() completes this request. */ - job->uaiocb._aiocb_private.status += len; + job->aio_received += len; } else { - copied = job->uaiocb._aiocb_private.status; + copied = job->aio_received; #ifdef VERBOSE_TRACES CTR4(KTR_CXGBE, "%s: completing %p (copied %ld, placed %d)", __func__, job, copied, len); @@ -698,7 +704,7 @@ handle_ddp_tcb_rpl(struct toepcb *toep, * also take care of updating the tp, etc. */ job = db->job; - copied = job->uaiocb._aiocb_private.status; + copied = job->aio_received; if (copied == 0) { CTR2(KTR_CXGBE, "%s: cancelling %p", __func__, job); aio_cancel(job); @@ -746,7 +752,7 @@ handle_ddp_close(struct toepcb *toep, st MPASS((toep->ddp_flags & db_flag) != 0); db = &toep->db[db_idx]; job = db->job; - copied = job->uaiocb._aiocb_private.status; + copied = job->aio_received; placed = len; if (placed > job->uaiocb.aio_nbytes - copied) placed = job->uaiocb.aio_nbytes - copied; @@ -756,7 +762,7 @@ handle_ddp_close(struct toepcb *toep, st * t4_aio_cancel_active() completes this * request. */ - job->uaiocb._aiocb_private.status += placed; + job->aio_received += placed; } else { CTR4(KTR_CXGBE, "%s: tid %d completed buf %d len %d", __func__, toep->tid, db_idx, placed); @@ -1212,7 +1218,7 @@ aio_ddp_cancel_one(struct kaiocb *job) * it was cancelled, report it as a short read rather than an * error. */ - copied = job->uaiocb._aiocb_private.status; + copied = job->aio_received; if (copied != 0) aio_complete(job, copied, 0); else @@ -1297,7 +1303,7 @@ restart: * a short read and leave the error to be reported by * a future request. */ - copied = job->uaiocb._aiocb_private.status; + copied = job->aio_received; if (copied != 0) { SOCKBUF_UNLOCK(sb); aio_complete(job, copied, 0); @@ -1371,7 +1377,7 @@ restart: SOCKBUF_LOCK(sb); if (so->so_error && sbavail(sb) == 0) { - copied = job->uaiocb._aiocb_private.status; + copied = job->aio_received; if (copied != 0) { SOCKBUF_UNLOCK(sb); recycle_pageset(toep, ps); @@ -1421,9 +1427,9 @@ sbcopy: * copy those mbufs out directly. */ copied = 0; - offset = ps->offset + job->uaiocb._aiocb_private.status; - MPASS(job->uaiocb._aiocb_private.status <= job->uaiocb.aio_nbytes); - resid = job->uaiocb.aio_nbytes - job->uaiocb._aiocb_private.status; + offset = ps->offset + job->aio_received; + MPASS(job->aio_received <= job->uaiocb.aio_nbytes); + resid = job->uaiocb.aio_nbytes - job->aio_received; m = sb->sb_mb; KASSERT(m == NULL || toep->ddp_active_count == 0, ("%s: sockbuf data with active DDP", __func__)); @@ -1451,8 +1457,8 @@ sbcopy: } if (copied != 0) { sbdrop_locked(sb, copied); - job->uaiocb._aiocb_private.status += copied; - copied = job->uaiocb._aiocb_private.status; + job->aio_received += copied; + copied = job->aio_received; inp = sotoinpcb(so); if (!INP_TRY_WLOCK(inp)) { /* @@ -1568,8 +1574,8 @@ sbcopy: * which will keep it open and keep the TCP PCB attached until * after the job is completed. */ - wr = mk_update_tcb_for_ddp(sc, toep, db_idx, ps, - job->uaiocb._aiocb_private.status, ddp_flags, ddp_flags_mask); + wr = mk_update_tcb_for_ddp(sc, toep, db_idx, ps, job->aio_received, + ddp_flags, ddp_flags_mask); if (wr == NULL) { recycle_pageset(toep, ps); aio_ddp_requeue_one(toep, job); @@ -1727,7 +1733,6 @@ t4_aio_queue_ddp(struct socket *so, stru if (!aio_set_cancel_function(job, t4_aio_cancel_queued)) panic("new job was cancelled"); TAILQ_INSERT_TAIL(&toep->ddp_aiojobq, job, list); - job->uaiocb._aiocb_private.status = 0; toep->ddp_waiting_count++; toep->ddp_flags |= DDP_OK; Modified: head/sys/kern/sys_socket.c ============================================================================== --- head/sys/kern/sys_socket.c Wed Jun 15 15:56:03 2016 (r301929) +++ head/sys/kern/sys_socket.c Wed Jun 15 20:56:45 2016 (r301930) @@ -390,6 +390,12 @@ soo_fill_kinfo(struct file *fp, struct k return (0); } +/* + * Use the 'backend3' field in AIO jobs to store the amount of data + * completed by the AIO job so far. + */ +#define aio_done backend3 + static STAILQ_HEAD(, task) soaio_jobs; static struct mtx soaio_jobs_lock; static struct task soaio_kproc_task; @@ -567,7 +573,7 @@ retry: td_savedcred = td->td_ucred; td->td_ucred = job->cred; - done = job->uaiocb._aiocb_private.status; + done = job->aio_done; cnt = job->uaiocb.aio_nbytes - done; iov.iov_base = (void *)((uintptr_t)job->uaiocb.aio_buf + done); iov.iov_len = cnt; @@ -604,7 +610,7 @@ retry: } done += cnt - uio.uio_resid; - job->uaiocb._aiocb_private.status = done; + job->aio_done = done; td->td_ucred = td_savedcred; if (error == EWOULDBLOCK) { @@ -740,7 +746,7 @@ soo_aio_cancel(struct kaiocb *job) sb->sb_flags &= ~SB_AIO; SOCKBUF_UNLOCK(sb); - done = job->uaiocb._aiocb_private.status; + done = job->aio_done; if (done != 0) aio_complete(job, done, 0); else @@ -774,7 +780,6 @@ soo_aio_queue(struct file *fp, struct ka if (!aio_set_cancel_function(job, soo_aio_cancel)) panic("new job was cancelled"); TAILQ_INSERT_TAIL(&sb->sb_aiojobq, job, list); - job->uaiocb._aiocb_private.status = 0; if (!(sb->sb_flags & SB_AIO_RUNNING)) { if (soaio_ready(so, sb)) sowakeup_aio(so, sb); Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Wed Jun 15 15:56:03 2016 (r301929) +++ head/sys/kern/vfs_aio.c Wed Jun 15 20:56:45 2016 (r301930) @@ -520,7 +520,6 @@ aio_free_entry(struct kaiocb *job) sigqueue_take(&job->ksi); PROC_UNLOCK(p); - MPASS(job->bp == NULL); AIO_UNLOCK(ki); /* Modified: head/sys/sys/aio.h ============================================================================== --- head/sys/sys/aio.h Wed Jun 15 15:56:03 2016 (r301929) +++ head/sys/sys/aio.h Wed Jun 15 20:56:45 2016 (r301930) @@ -121,10 +121,6 @@ struct kaiocb { int jobflags; /* (a) job flags */ int inputcharge; /* (*) input blocks */ int outputcharge; /* (*) output blocks */ - struct bio *bp; /* (*) BIO backend BIO pointer */ - struct buf *pbuf; /* (*) BIO backend buffer pointer */ - struct vm_page *pages[btoc(MAXPHYS)+1]; /* BIO backend pages */ - int npages; /* BIO backend number of pages */ struct proc *userproc; /* (*) user process */ struct ucred *cred; /* (*) active credential when created */ struct file *fd_file; /* (*) pointer to file structure */ @@ -134,9 +130,25 @@ struct kaiocb { struct aiocb uaiocb; /* (*) copy of user I/O control block */ ksiginfo_t ksi; /* (a) realtime signal info */ uint64_t seqno; /* (*) job number */ - int pending; /* (a) number of pending I/O, aio_fsync only */ aio_cancel_fn_t *cancel_fn; /* (a) backend cancel function */ aio_handle_fn_t *handle_fn; /* (c) backend handle function */ + union { /* Backend-specific data fields */ + struct { /* BIO backend */ + struct bio *bp; /* (*) BIO pointer */ + struct buf *pbuf; /* (*) buffer pointer */ + struct vm_page *pages[btoc(MAXPHYS)+1]; /* (*) */ + int npages; /* (*) number of pages */ + }; + struct { /* fsync() requests */ + int pending; /* (a) number of pending I/O */ + }; + struct { + void *backend1; + void *backend2; + long backend3; + int backend4; + }; + }; }; struct socket; From owner-svn-src-head@freebsd.org Wed Jun 15 21:01:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4024DA47AF5; Wed, 15 Jun 2016 21:01:54 +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 1D27F1846; Wed, 15 Jun 2016 21:01:54 +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 u5FL1rtE011226; Wed, 15 Jun 2016 21:01:53 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FL1reW011224; Wed, 15 Jun 2016 21:01:53 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201606152101.u5FL1reW011224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 15 Jun 2016 21:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301931 - head/tools/tools/decioctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 21:01:54 -0000 Author: jhb Date: Wed Jun 15 21:01:53 2016 New Revision: 301931 URL: https://svnweb.freebsd.org/changeset/base/301931 Log: Add a tool to decode ioctl commands. One or more ioctl command values can be passed as arguments on the command line. For each value, the command is broken down into it's components (direction, group, number, and length). In addition, if a command has a known name it is output via sysdecode_ioctlname(). Reviewed by: kib, emaste, avg Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D6851 Added: head/tools/tools/decioctl/ head/tools/tools/decioctl/Makefile (contents, props changed) head/tools/tools/decioctl/decioctl.c (contents, props changed) Added: head/tools/tools/decioctl/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/decioctl/Makefile Wed Jun 15 21:01:53 2016 (r301931) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +PROG= decioctl +SRCS= decioctl.c +MAN= +BINDIR?= /usr/bin + +LIBADD= sysdecode + +.include Added: head/tools/tools/decioctl/decioctl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/decioctl/decioctl.c Wed Jun 15 21:01:53 2016 (r301931) @@ -0,0 +1,94 @@ +/*- + * Copyright (c) 2005-2006,2016 John H. 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +static void +usage(char **av) +{ + fprintf(stderr, "%s: [ ... ]\n", av[0]); + exit(1); +} + +int +main(int ac, char **av) +{ + unsigned long cmd; + const char *name; + char *cp; + int group, i; + + if (ac < 2) + usage(av); + printf(" command : dir group num len name\n"); + for (i = 1; i < ac; i++) { + errno = 0; + cmd = strtoul(av[i], &cp, 0); + if (*cp != '\0' || errno != 0) { + fprintf(stderr, "Invalid integer: %s\n", av[i]); + usage(av); + } + printf("0x%08lx: ", cmd); + switch (cmd & IOC_DIRMASK) { + case IOC_VOID: + printf("VOID "); + break; + case IOC_OUT: + printf("OUT "); + break; + case IOC_IN: + printf("IN "); + break; + case IOC_INOUT: + printf("INOUT"); + break; + default: + printf("%01lx ???", (cmd & IOC_DIRMASK) >> 29); + break; + } + printf(" "); + group = IOCGROUP(cmd); + if (isprint(group)) + printf(" '%c' ", group); + else + printf(" 0x%02x", group); + printf(" %3lu %4lu", cmd & 0xff, IOCPARM_LEN(cmd)); + name = sysdecode_ioctlname(cmd); + if (name != NULL) + printf(" %s", name); + printf("\n"); + } + return (0); +} From owner-svn-src-head@freebsd.org Wed Jun 15 21:08:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4846A47BCD; Wed, 15 Jun 2016 21:08: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 8F69D1B09; Wed, 15 Jun 2016 21:08:52 +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 u5FL8pYk012175; Wed, 15 Jun 2016 21:08:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FL8pcO012174; Wed, 15 Jun 2016 21:08:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201606152108.u5FL8pcO012174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 15 Jun 2016 21:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301932 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 21:08:53 -0000 Author: jhb Date: Wed Jun 15 21:08:51 2016 New Revision: 301932 URL: https://svnweb.freebsd.org/changeset/base/301932 Log: Use sbused() instead of sbspace() to avoid signed issues. Inserting a full mbuf with an external cluster into the socket buffer resulted in sbspace() returning -MLEN. However, since sb_hiwat is unsigned, the -MLEN value was converted to unsigned in comparisons. As a result, the socket buffer was never autosized. Note that sb_lowat is signed to permit direct comparisons with sbspace(), but sb_hiwat is unsigned. Follow suit with what tcp_output() does and compare the value of sbused() with sb_hiwat instead. Approved by: re (gjb) Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jun 15 21:01:53 2016 (r301931) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jun 15 21:08:51 2016 (r301932) @@ -577,7 +577,7 @@ t4_push_frames(struct adapter *sc, struc struct tcpcb *tp = intotcpcb(inp); struct socket *so = inp->inp_socket; struct sockbuf *sb = &so->so_snd; - int tx_credits, shove, compl, space, sowwakeup; + int tx_credits, shove, compl, sowwakeup; struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; INP_WLOCK_ASSERT(inp); @@ -652,9 +652,7 @@ t4_push_frames(struct adapter *sc, struc } } - space = sbspace(sb); - - if (space <= sb->sb_hiwat * 3 / 8 && + if (sbused(sb) > sb->sb_hiwat * 5 / 8 && toep->plen_nocompl + plen >= sb->sb_hiwat / 4) compl = 1; else @@ -663,7 +661,7 @@ t4_push_frames(struct adapter *sc, struc if (sb->sb_flags & SB_AUTOSIZE && V_tcp_do_autosndbuf && sb->sb_hiwat < V_tcp_autosndbuf_max && - space < sb->sb_hiwat / 8) { + sbused(sb) >= sb->sb_hiwat * 7 / 8) { int newsize = min(sb->sb_hiwat + V_tcp_autosndbuf_inc, V_tcp_autosndbuf_max); From owner-svn-src-head@freebsd.org Wed Jun 15 21:50:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A872BA317C8; Wed, 15 Jun 2016 21:50:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.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 8A74D13B8; Wed, 15 Jun 2016 21:50:34 +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 bigwig.baldwin.cx (Postfix) with ESMTPSA id D291CB917; Wed, 15 Jun 2016 17:50:32 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301932 - head/sys/dev/cxgbe/tom Date: Wed, 15 Jun 2016 14:16:54 -0700 Message-ID: <10550858.Wqzuf5sXBE@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201606152108.u5FL8pcO012174@repo.freebsd.org> References: <201606152108.u5FL8pcO012174@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.2.7 (bigwig.baldwin.cx); Wed, 15 Jun 2016 17:50:32 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 21:50:34 -0000 On Wednesday, June 15, 2016 09:08:51 PM John Baldwin wrote: > Author: jhb > Date: Wed Jun 15 21:08:51 2016 > New Revision: 301932 > URL: https://svnweb.freebsd.org/changeset/base/301932 > > Log: > Use sbused() instead of sbspace() to avoid signed issues. > > Inserting a full mbuf with an external cluster into the socket buffer > resulted in sbspace() returning -MLEN. However, since sb_hiwat is > unsigned, the -MLEN value was converted to unsigned in comparisons. As a > result, the socket buffer was never autosized. Note that sb_lowat is signed > to permit direct comparisons with sbspace(), but sb_hiwat is unsigned. > Follow suit with what tcp_output() does and compare the value of sbused() > with sb_hiwat instead. > > Approved by: re (gjb) > Sponsored by: Chelsio Communications Amusingly (or not), sb_lowat used to be signed as well. Mike Karels changed it to signed in this commit to BSD: https://svnweb.freebsd.org/csrg/sys/sys/socketvar.h?revision=43896 The log reads: add SB_ASYNC in sockbuf, add SB_NOTIFY, SB_NOINTR; make lowat signed for comparison with sbspace (should probably give up and make all fields signed -- John Baldwin From owner-svn-src-head@freebsd.org Wed Jun 15 21:50:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56388A317CC; Wed, 15 Jun 2016 21:50:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.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 3817D13BC; Wed, 15 Jun 2016 21:50:35 +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 bigwig.baldwin.cx (Postfix) with ESMTPSA id 2D8B8B94C; Wed, 15 Jun 2016 17:50:34 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301931 - head/tools/tools/decioctl Date: Wed, 15 Jun 2016 14:12:26 -0700 Message-ID: <13453684.1tT3vNfOUf@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201606152101.u5FL1reW011224@repo.freebsd.org> References: <201606152101.u5FL1reW011224@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.2.7 (bigwig.baldwin.cx); Wed, 15 Jun 2016 17:50:34 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 21:50:35 -0000 On Wednesday, June 15, 2016 09:01:53 PM John Baldwin wrote: > Author: jhb > Date: Wed Jun 15 21:01:53 2016 > New Revision: 301931 > URL: https://svnweb.freebsd.org/changeset/base/301931 > > Log: > Add a tool to decode ioctl commands. > > One or more ioctl command values can be passed as arguments on the command > line. For each value, the command is broken down into it's components > (direction, group, number, and length). In addition, if a command has a > known name it is output via sysdecode_ioctlname(). > > Reviewed by: kib, emaste, avg > Approved by: re (gjb) > Differential Revision: https://reviews.freebsd.org/D6851 I've had a version of this in a private tree of utilities for several years. I added the sysdecode stuff yesterday though now that it's easy to do so. Sample output: % ./decioctl 0xc4d01902 0xc4e01902 0x4004667f command : dir group num len name 0xc4d01902: INOUT 0x19 2 1232 CAMIOCOMMAND 0xc4e01902: INOUT 0x19 2 1248 0x4004667f: OUT 'f' 127 4 FIONREAD -- John Baldwin From owner-svn-src-head@freebsd.org Wed Jun 15 23:57:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A358A474DA; Wed, 15 Jun 2016 23:57:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CDCA1EEB; Wed, 15 Jun 2016 23:57:33 +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 u5FNvXA5075544; Wed, 15 Jun 2016 23:57:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FNvXIf075542; Wed, 15 Jun 2016 23:57:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606152357.u5FNvXIf075542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Jun 2016 23:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301933 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:57:34 -0000 Author: bdrewery Date: Wed Jun 15 23:57:32 2016 New Revision: 301933 URL: https://svnweb.freebsd.org/changeset/base/301933 Log: Don't truncate OBJS_DEPEND_GUESS.target from Makefile This is important to allow a Makefile to override OBJS_DEPEND_GUESS for handling in META_MODE when its depend files are missing. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Wed Jun 15 21:08:51 2016 (r301932) +++ head/share/mk/bsd.dep.mk Wed Jun 15 23:57:32 2016 (r301933) @@ -86,7 +86,7 @@ _SKIP_READ_DEPEND= 1 CLEANFILES?= .for _S in ${SRCS:N*.[dhly]} -OBJS_DEPEND_GUESS.${_S:R}.o= ${_S} +OBJS_DEPEND_GUESS.${_S:R}.o+= ${_S} .endfor # Lexical analyzers @@ -94,7 +94,7 @@ OBJS_DEPEND_GUESS.${_S:R}.o= ${_S} .for _LC in ${_LSRC:R}.c ${_LC}: ${_LSRC} ${LEX} ${LFLAGS} -o${.TARGET} ${.ALLSRC} -OBJS_DEPEND_GUESS.${_LC:R}.o= ${_LC} +OBJS_DEPEND_GUESS.${_LC:R}.o+= ${_LC} SRCS:= ${SRCS:S/${_LSRC}/${_LC}/} CLEANFILES+= ${_LC} .endfor @@ -125,7 +125,7 @@ CLEANFILES+= ${_YH} ${_YC}: ${_YSRC} ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} .endif -OBJS_DEPEND_GUESS.${_YC:R}.o= ${_YC} +OBJS_DEPEND_GUESS.${_YC:R}.o+= ${_YC} .endfor .endfor Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Wed Jun 15 21:08:51 2016 (r301932) +++ head/share/mk/bsd.lib.mk Wed Jun 15 23:57:32 2016 (r301933) @@ -424,13 +424,13 @@ lint: ${SRCS:M*.c} .if defined(LIB) && !empty(LIB) OBJS_DEPEND_GUESS+= ${SRCS:M*.h} .for _S in ${SRCS:N*.[hly]} -OBJS_DEPEND_GUESS.${_S:R}.po= ${_S} +OBJS_DEPEND_GUESS.${_S:R}.po+= ${_S} .endfor .endif .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) .for _S in ${SRCS:N*.[hly]} -OBJS_DEPEND_GUESS.${_S:R}.So= ${_S} +OBJS_DEPEND_GUESS.${_S:R}.So+= ${_S} .endfor .endif From owner-svn-src-head@freebsd.org Wed Jun 15 23:57:48 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19F4EA4751E; Wed, 15 Jun 2016 23:57:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E573911B1; Wed, 15 Jun 2016 23:57: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 u5FNvlxH075594; Wed, 15 Jun 2016 23:57:47 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FNvkYY075592; Wed, 15 Jun 2016 23:57:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606152357.u5FNvkYY075592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Jun 2016 23:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301934 - head/gnu/usr.bin/cc/cc_tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:57:48 -0000 Author: bdrewery Date: Wed Jun 15 23:57:46 2016 New Revision: 301934 URL: https://svnweb.freebsd.org/changeset/base/301934 Log: Convert to new FAST_DEPEND syntax for guessed dependencies. This OBJS_DEPEND_GUESS is needed since each target gets its own .depend.target.o file but also because it is spelled .meta.target.o with WITH_META_MODE. The OBJS_DEPEND_GUESS will apply the dependency if the required file is missing. Also remove redundant .c files while here to avoid prolems with targets using .ALLSRC and getting multiple source files. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/cc/cc_tools/Makefile head/gnu/usr.bin/cc/cc_tools/Makefile.dep Modified: head/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile Wed Jun 15 23:57:32 2016 (r301933) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Wed Jun 15 23:57:46 2016 (r301934) @@ -438,9 +438,7 @@ CLEANFILES+= ${GENSRCS} ${GENONLY} ${GEN #----------------------------------------------------------------------- # Manual dependencies. -.if !exists(${DEPENDFILE}) .include "Makefile.dep" -.endif .include # DO NOT DELETE Modified: head/gnu/usr.bin/cc/cc_tools/Makefile.dep ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile.dep Wed Jun 15 23:57:32 2016 (r301933) +++ head/gnu/usr.bin/cc/cc_tools/Makefile.dep Wed Jun 15 23:57:46 2016 (r301934) @@ -1,131 +1,131 @@ # $FreeBSD$ -errors.o: bconfig.h auto-host.h +OBJS_DEPEND_GUESS.errors.o+= bconfig.h auto-host.h -genattr.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genattr.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -genattrtab.o: bconfig.h \ +OBJS_DEPEND_GUESS.genattrtab.o+= bconfig.h \ auto-host.h \ tm.h options.h \ insn-modes.h \ gtype-desc.h -genautomata.o: bconfig.h \ +OBJS_DEPEND_GUESS.genautomata.o+= bconfig.h \ auto-host.h \ tm.h options.h \ insn-modes.h -gencheck.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.gencheck.o+= bconfig.h auto-host.h \ tm.h options.h \ gencheck.h -genchecksum.o: bconfig.h \ +OBJS_DEPEND_GUESS.genchecksum.o+= bconfig.h \ auto-host.h -gencodes.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.gencodes.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -genconditions.o: bconfig.h \ +OBJS_DEPEND_GUESS.genconditions.o+= bconfig.h \ auto-host.h \ tm.h options.h \ insn-modes.h -genconfig.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genconfig.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -genconstants.o: bconfig.h \ +OBJS_DEPEND_GUESS.genconstants.o+= bconfig.h \ auto-host.h \ tm.h options.h \ insn-modes.h -genemit.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genemit.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -genextract.o: bconfig.h \ +OBJS_DEPEND_GUESS.genextract.o+= bconfig.h \ auto-host.h \ tm.h options.h \ insn-modes.h \ insn-config.h -genflags.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genflags.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -gengenrtl.o: bconfig.h auto-host.h +OBJS_DEPEND_GUESS.gengenrtl.o+= bconfig.h auto-host.h -gengtype.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.gengtype.o+= bconfig.h auto-host.h \ tm.h options.h \ gtyp-gen.h -genmddeps.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genmddeps.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -genmodes.o: bconfig.h auto-host.h +OBJS_DEPEND_GUESS.genmodes.o+= bconfig.h auto-host.h -genopinit.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genopinit.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -genoutput.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genoutput.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -genpeep.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genpeep.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -genpreds.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genpreds.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -genrecog.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.genrecog.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -gensupport.o: bconfig.h \ +OBJS_DEPEND_GUESS.gensupport.o+= bconfig.h \ auto-host.h \ tm.h options.h \ insn-modes.h -ggc-none.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.ggc-none.o+= bconfig.h auto-host.h \ gtype-desc.h -print-rtl.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.print-rtl.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -read-rtl.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.read-rtl.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h -rtl.o: bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.rtl.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-modes.h \ gtype-desc.h -insn-modes.o: insn-modes.c config.h auto-host.h \ +OBJS_DEPEND_GUESS.insn-modes.o+= insn-modes.c config.h auto-host.h \ tm.h options.h \ insn-modes.h -min-insn-modes.o: min-insn-modes.c bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.min-insn-modes.o+= bconfig.h auto-host.h \ insn-modes.h -gengtype-lex.o: gengtype-lex.c \ +OBJS_DEPEND_GUESS.gengtype-lex.o+= \ bconfig.h auto-host.h \ gengtype-yacc.h -gengtype-yacc+%DIKED.o: gengtype-yacc+%DIKED.c \ +OBJS_DEPEND_GUESS.gengtype-yacc+%DIKED.o+= \ bconfig.h \ auto-host.h \ tm.h options.h \ -insn-conditions.o: insn-conditions.c bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.insn-conditions.o+= insn-conditions.c bconfig.h auto-host.h \ insn-constants.h \ tm.h options.h \ insn-modes.h \ @@ -133,12 +133,12 @@ insn-conditions.o: insn-conditions.c bco tm-preds.h \ options.h -gencondmd.o: gencondmd.c \ +OBJS_DEPEND_GUESS.gencondmd.o+= \ tm.h options.h tm_p.h \ tm-preds.h tm-constrs.h tree-check.h \ insn-constants.h -gencondmd.o: gencondmd.c bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.gencondmd.o+= bconfig.h auto-host.h \ tm.h options.h \ insn-constants.h \ insn-modes.h \ @@ -147,7 +147,7 @@ gencondmd.o: gencondmd.c bconfig.h auto- tree-check.h \ tm-constrs.h -vec.o: vec.c bconfig.h auto-host.h \ +OBJS_DEPEND_GUESS.vec.o+= bconfig.h auto-host.h \ insn-modes.h \ tree-check.h \ gtype-desc.h From owner-svn-src-head@freebsd.org Wed Jun 15 23:57:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA1FDA47533; Wed, 15 Jun 2016 23:57:51 +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 71DAC11C9; Wed, 15 Jun 2016 23:57:51 +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 u5FNvokW075642; Wed, 15 Jun 2016 23:57:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FNvorj075640; Wed, 15 Jun 2016 23:57:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606152357.u5FNvorj075640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Jun 2016 23:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301935 - in head: share/mk 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:57:51 -0000 Author: bdrewery Date: Wed Jun 15 23:57:50 2016 New Revision: 301935 URL: https://svnweb.freebsd.org/changeset/base/301935 Log: WITH_META_MODE: Do include headers for specific guessed dependencies This is a follow-up to r300343. This is important for the OBJS_DEPEND_GUESS usage in gnu/usr.bin/cc/cc_tools. See comments for more details. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk head/sys/conf/kern.post.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Wed Jun 15 23:57:46 2016 (r301934) +++ head/share/mk/bsd.dep.mk Wed Jun 15 23:57:50 2016 (r301935) @@ -221,9 +221,11 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .elif defined(_meta_filemon) # For meta mode we still need to know which file to depend on to avoid # ambiguous suffix transformation rules from .PATH. Meta mode does not -# use .depend files. We really only need source files, not headers. +# use .depend files. We really only need source files, not headers since +# they are typically in SRCS/beforebuild already. For target-specific +# guesses do include headers though since they may not be in SRCS. ${__obj}: ${OBJS_DEPEND_GUESS:N*.h} -${__obj}: ${OBJS_DEPEND_GUESS.${__obj}:N*.h} +${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .endif .endfor Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Wed Jun 15 23:57:46 2016 (r301934) +++ head/sys/conf/kern.post.mk Wed Jun 15 23:57:50 2016 (r301935) @@ -254,11 +254,13 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .elif defined(_meta_filemon) # For meta mode we still need to know which file to depend on to avoid # ambiguous suffix transformation rules from .PATH. Meta mode does not -# use .depend files. We really only need source files, not headers. +# use .depend files. We really only need source files, not headers since +# they are typically in SRCS/beforebuild already. For target-specific +# guesses do include headers though since they may not be in SRCS. .if ${SYSTEM_OBJS:M${__obj}} ${__obj}: ${OBJS_DEPEND_GUESS:N*.h} .endif -${__obj}: ${OBJS_DEPEND_GUESS.${__obj}:N*.h} +${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .endif .endfor From owner-svn-src-head@freebsd.org Wed Jun 15 23:57:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 852D0A47567; Wed, 15 Jun 2016 23:57:55 +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 2A04D12C2; Wed, 15 Jun 2016 23:57:55 +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 u5FNvs6a075687; Wed, 15 Jun 2016 23:57:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FNvs6o075686; Wed, 15 Jun 2016 23:57:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606152357.u5FNvs6o075686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Jun 2016 23:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301936 - head/gnu/usr.bin/cc/cc_tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:57:55 -0000 Author: bdrewery Date: Wed Jun 15 23:57:53 2016 New Revision: 301936 URL: https://svnweb.freebsd.org/changeset/base/301936 Log: WITH_META_MODE: Don't expect a .meta file for side-effect generated files. This is the same as r301285. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/cc/cc_tools/Makefile Modified: head/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile Wed Jun 15 23:57:50 2016 (r301935) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Wed Jun 15 23:57:53 2016 (r301936) @@ -261,7 +261,7 @@ gengtype-lex.c: gengtype-lex.l gengtype-yacc.h: gengtype-yacc.y yacc -d -o gengtype-yacc.c ${.ALLSRC} -gengtype-yacc.c: gengtype-yacc.h +gengtype-yacc.c: gengtype-yacc.h .NOMETA gengtype-yacc+%DIKED.c: gengtype-yacc.c cat ${.ALLSRC} > ${.TARGET} From owner-svn-src-head@freebsd.org Wed Jun 15 23:57:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85EEAA47588; Wed, 15 Jun 2016 23:57:58 +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 3C32F139B; Wed, 15 Jun 2016 23:57:58 +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 u5FNvvGZ075735; Wed, 15 Jun 2016 23:57:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FNvvBx075734; Wed, 15 Jun 2016 23:57:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606152357.u5FNvvBx075734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Jun 2016 23:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301937 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:57:58 -0000 Author: bdrewery Date: Wed Jun 15 23:57:57 2016 New Revision: 301937 URL: https://svnweb.freebsd.org/changeset/base/301937 Log: WITH_META_MODE: Keep .MAKE.MODE/META_MODE clean Due to META_MODE being passed into the environment it tends to keep growing with the defaults. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Wed Jun 15 23:57:53 2016 (r301936) +++ head/share/mk/sys.mk Wed Jun 15 23:57:57 2016 (r301937) @@ -425,6 +425,10 @@ __MAKE_CONF?=/etc/make.conf # late include for customization .sinclude +.if defined(META_MODE) +META_MODE:= ${META_MODE:O:u} +.endif + .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL) SHELL= ${__MAKE_SHELL} .SHELL: path=${__MAKE_SHELL} From owner-svn-src-head@freebsd.org Wed Jun 15 23:58:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D23DA475F8; Wed, 15 Jun 2016 23:58:08 +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 C97CE17B8; Wed, 15 Jun 2016 23:58:07 +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 u5FNw6pL075879; Wed, 15 Jun 2016 23:58:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FNw6o3075878; Wed, 15 Jun 2016 23:58:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606152358.u5FNw6o3075878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Jun 2016 23:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301940 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:58:08 -0000 Author: bdrewery Date: Wed Jun 15 23:58:06 2016 New Revision: 301940 URL: https://svnweb.freebsd.org/changeset/base/301940 Log: WITH_META_MODE: Whitelist 'make kernel' and 'make world'. installkernel is technically META_MODE safe but doesn't need an explicit approval to use it since it's all disabled via .PHONY. world uses 'make -B installworld' which already will disable META_MODE via the -B (.MAKE.MODE=compat) usage. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Wed Jun 15 23:58:03 2016 (r301939) +++ head/Makefile Wed Jun 15 23:58:06 2016 (r301940) @@ -150,9 +150,9 @@ TGTS+= ${BITGTS} # the ones that benefit from it. META_TGT_WHITELIST+= \ _* build32 buildfiles buildincludes buildkernel buildsoft \ - buildworld everything kernel-toolchains kernels libraries \ + buildworld everything kernel-toolchains kernel kernels libraries \ native-xtools showconfig tinderbox toolchain toolchains universe \ - worlds xdev xdev-build + world worlds xdev xdev-build .ORDER: buildworld installworld .ORDER: buildworld distributeworld From owner-svn-src-head@freebsd.org Wed Jun 15 23:58:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 568FCA475AD; Wed, 15 Jun 2016 23: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 2166314C3; Wed, 15 Jun 2016 23:58:01 +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 u5FNw0XW075784; Wed, 15 Jun 2016 23:58:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FNw02W075783; Wed, 15 Jun 2016 23:58:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606152358.u5FNw02W075783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Jun 2016 23:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301938 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:58:01 -0000 Author: bdrewery Date: Wed Jun 15 23:58:00 2016 New Revision: 301938 URL: https://svnweb.freebsd.org/changeset/base/301938 Log: tinderbox/universe: Only show arm64 warning if it was in the TARGETS list. This was a flaw in my change in r287903 but also in the original change in r282156 since it used empty(${TARGETS}) rather than empty(TARGETS). Reported by: lidl Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Wed Jun 15 23:57:57 2016 (r301937) +++ head/Makefile Wed Jun 15 23:58:00 2016 (r301938) @@ -418,9 +418,9 @@ TARGET_ARCHES_pc98?= i386 TARGET_ARCHES_${target}?= ${target} .endfor -# XXX Add arm64 to universe only if we have an external binutils installed. +# XXX Remove arm64 from universe if the required binutils package is missing. # It does not build with the in-tree linker. -.if !exists(/usr/local/aarch64-freebsd/bin/ld) && empty(${TARGETS}) +.if !exists(/usr/local/aarch64-freebsd/bin/ld) && ${TARGETS:Marm64} _UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:Narm64} universe: universe_arm64_skip .PHONY universe_epilogue: universe_arm64_skip .PHONY From owner-svn-src-head@freebsd.org Wed Jun 15 23:58:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77F7AA47631; Wed, 15 Jun 2016 23:58:11 +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 13B2118D7; Wed, 15 Jun 2016 23:58:10 +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 u5FNwAXX075924; Wed, 15 Jun 2016 23:58:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FNwAIo075923; Wed, 15 Jun 2016 23:58:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606152358.u5FNwAIo075923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Jun 2016 23:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301941 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:58:11 -0000 Author: bdrewery Date: Wed Jun 15 23:58:09 2016 New Revision: 301941 URL: https://svnweb.freebsd.org/changeset/base/301941 Log: Mark targets with _SUBDIR as .PHONY. This is mostly fixing META_MODE with realinstall wanting a .meta file when it does not need one. These targets really should always run though since they have _SUBDIR on them. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Jun 15 23:58:06 2016 (r301940) +++ head/share/mk/bsd.subdir.mk Wed Jun 15 23:58:09 2016 (r301941) @@ -158,9 +158,9 @@ ${__target}_subdir_${DIRPRFX}${__dir}: . ${_SUBDIR_SH}; .endif .endfor # __dir in ${SUBDIR} -${__target}: ${__subdir_targets} +${__target}: ${__subdir_targets} .PHONY .else -${__target}: _SUBDIR +${__target}: _SUBDIR .PHONY .endif # SUBDIR_PARALLEL || _is_standalone_target .endif # make(${__target}) .endfor # __target in ${SUBDIR_TARGETS} From owner-svn-src-head@freebsd.org Wed Jun 15 23:58:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 187E3A475D0; Wed, 15 Jun 2016 23:58:05 +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 BA83616D8; Wed, 15 Jun 2016 23:58:04 +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 u5FNw3lg075833; Wed, 15 Jun 2016 23:58:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5FNw3tO075830; Wed, 15 Jun 2016 23:58:03 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606152358.u5FNw3tO075830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 15 Jun 2016 23:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301939 - in 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:58:05 -0000 Author: bdrewery Date: Wed Jun 15 23:58:03 2016 New Revision: 301939 URL: https://svnweb.freebsd.org/changeset/base/301939 Log: Fix native powerpc64 build of lib32 with in-tree GCC. - This was broken by r300350 and r300885. - Add some comments around the external GCC logic since it is spread out and in need of some cleanup. - The problem was that X_COMPILER_TYPE is always defined from CC->XCC's default, so if /usr/bin/cc is GCC (as it is on native powerpc64) then X_COMPILER_TYPE was getting GCC and triggering the external logic in Makefile.libcompat. It was intended to always provide -isystem with GCC since --sysroot is used into the lib32 sysroot which won't modify the header path without the -isystem. The use of the libc++/std=c++11 override was only intended to be used for external compilers though (more accurately GCC 4.8+ but that's a separate assumption to cleanup). Apply the same logic from Makefile.inc1 to Makefile.libcompat to only add the libc++ override when needed for external compilers. Pointyhat to: bdrewery Tested with: native ppc64 (swills), universe, ppc64 xtoolchain, amd64 xtoolchain, sparc64 cross-build of ppc64 (host GCC 4.2) Reported by: andreast, swills Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 head/Makefile.libcompat head/share/mk/src.opts.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jun 15 23:58:00 2016 (r301938) +++ head/Makefile.inc1 Wed Jun 15 23:58:03 2016 (r301939) @@ -543,9 +543,12 @@ TARGET_ABI= gnueabi .endif .endif .if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc -# GCC requires -isystem and -L when using a cross-compiler. +# GCC requires -isystem and -L when using a cross-compiler. --sysroot +# won't set header path and -L is used to ensure the base library path +# is added before the port PREFIX library path. XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib # Force using libc++ for external GCC. +# XXX: This should be checking MK_GNUCXX == no XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \ -nostdinc++ -L${WORLDTMP}/../lib/libc++ .else Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Wed Jun 15 23:58:00 2016 (r301938) +++ head/Makefile.libcompat Wed Jun 15 23:58:03 2016 (r301939) @@ -72,13 +72,21 @@ LIBCOMPATCFLAGS+= ${LIBCOMPATCPUFLAGS} \ # -B is needed to find /usr/lib32/crti.o for GCC and /usr/libsoft/crti.o for # Clang/GCC. LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/lib${libcompat} + .if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc -# GCC requires -isystem when using a cross-compiler. +# GCC requires -isystem when using a cross-compiler and --sysroot. Note that +# Makefile.inc1 only applies this with an external compiler but libcompat +# always does since even in-tree GCC 4.2 needs this to override the built-in +# sysroot path which --sysroot does not actually do for headers. LIBCOMPATCFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include # Force using libc++ for external GCC. +# XXX: This should be checking MK_GNUCXX == no +.if ${MK_CROSS_COMPILER} == "no" || \ + (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no") LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \ -nostdinc++ -L${LIBCOMPAT_OBJTREE}${.CURDIR}/lib/libc++ .endif +.endif # Yes, the flags are redundant. LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \ Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Jun 15 23:58:00 2016 (r301938) +++ head/share/mk/src.opts.mk Wed Jun 15 23:58:03 2016 (r301939) @@ -419,6 +419,9 @@ MK_LLDB:= no # gcc 4.8 and newer supports libc++, so suppress gnuc++ in that case. # while in theory we could build it with that, we don't want to do # that since it creates too much confusion for too little gain. +# XXX: This is incomplete and needs X_COMPILER_TYPE/VERSION checks too +# to prevent Makefile.inc1 from bootstrapping unneeded dependencies +# and to support 'make delete-old' when supplying an external toolchain. .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800 MK_GNUCXX:=no MK_GCC:=no From owner-svn-src-head@freebsd.org Thu Jun 16 00:38:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AB47A45114; Thu, 16 Jun 2016 00:38:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 344471F3A; Thu, 16 Jun 2016 00:38:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 2DBDF1C85; Thu, 16 Jun 2016 00:38: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 D56DB1DD81; Thu, 16 Jun 2016 00:38: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 8CufENABx5uA; Thu, 16 Jun 2016 00:38:14 +0000 (UTC) Subject: Re: svn commit: r300943 - in head: . lib/libc++ lib/libcxxrt share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 01E5E1DD79 To: Andreas Tobler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201605290620.u4T6KFjT002312@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <1d471fc9-4e32-98cb-3001-83a95f9eae2c@FreeBSD.org> Date: Wed, 15 Jun 2016 17:38:14 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pe0epEjKBr8umNgmb6nabLA8aik0vumdS" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 00:38:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Pe0epEjKBr8umNgmb6nabLA8aik0vumdS Content-Type: multipart/mixed; boundary="rUQpN2ECwLfS2iTURfO0qT0KQ0fiETXdK" From: Bryan Drewery To: Andreas Tobler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <1d471fc9-4e32-98cb-3001-83a95f9eae2c@FreeBSD.org> Subject: Re: svn commit: r300943 - in head: . lib/libc++ lib/libcxxrt share/mk References: <201605290620.u4T6KFjT002312@repo.freebsd.org> In-Reply-To: --rUQpN2ECwLfS2iTURfO0qT0KQ0fiETXdK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/12/2016 1:02 PM, Andreas Tobler wrote: > Hi Bryan, >=20 > On 29.05.16 08:20, Bryan Drewery wrote: >> Author: bdrewery >> Date: Sun May 29 06:20:15 2016 >> New Revision: 300943 >> URL: https://svnweb.freebsd.org/changeset/base/300943 >> >> Log: >> GCC External: Revert r300886, r300904, r300917, r300918 >> >> The fix in r300873 is mostly enough. A fix for lib32 will be >> committed.separately. >=20 > Did this commit already happen? >=20 > I still suffer a broken buildworld on powerpc64 for 32-bit with interna= l > tools. >=20 > Unknown option -std=3Dc++11... Fixed in r301939. --=20 Regards, Bryan Drewery --rUQpN2ECwLfS2iTURfO0qT0KQ0fiETXdK-- --Pe0epEjKBr8umNgmb6nabLA8aik0vumdS 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 iQEcBAEBAgAGBQJXYfT2AAoJEDXXcbtuRpfPDd4IAKy+I4Mzt0qikqQrKqisP/P8 nOR5+YgubdjALY/VwR0ol/bgl1fJOBeLMgW+xjd0b0O8Ah7SD7JkfOs+Py3az9HQ /ZOrFpLlPRGWsxSqXjTzNRK8Btgej71Nnqgsiia+6XSfwbE0fJNzLy86cESRVMT0 r5HPC8mTdlatYzzuNQS//dAnoPZrgEN2QZFdfKr1d1GDHQ2NusmO8jO0ZVZKyLtR fX6YZ6wIuaouQ72BTTixi25EhL2jpyPJDdXxghdb3QBwCpS+YZujcdT5hEs95PJh xdsAoLUei6h3cnqhhQZ2EvRnjKpt3UW5iZ+r39V/CwBDokqv5V7/8rAhrgJfV8g= =dd1T -----END PGP SIGNATURE----- --Pe0epEjKBr8umNgmb6nabLA8aik0vumdS-- From owner-svn-src-head@freebsd.org Thu Jun 16 01:55:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0901A31C17; Thu, 16 Jun 2016 01:55:11 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-vk0-x234.google.com (mail-vk0-x234.google.com [IPv6:2607:f8b0:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BEB81EDA; Thu, 16 Jun 2016 01:55:11 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-vk0-x234.google.com with SMTP id d185so54535834vkg.0; Wed, 15 Jun 2016 18:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4sJeafA0tHADY7ib+z6QldPdoUYh+FXYeA/4f+g/ehg=; b=MwXgPQhvxkuYx0jplPCD+bggXsI48Ot78x3mjfNmy1DMJ3eE89eL+zQvAr7e1x2/JF 1PyPKxIe/2+PSNk+bhA/gWQXmh77dZAIIq4edqZaACvV8ghxPIc2rMJha8u8nyNcas6i k9YtLMPX56akr4vX44cvoEOG2McyNC+X5zEEPiLcILeWDQHUykJbpdD7LanVLZ3BV3xa oz00Xl6apgZaqvpn6ePACFgSE4fFdFxwwAWaBJ+lFUPfcDIbI7Wf7v6geWZbAnQZzKkO gxU34mcESo4jQHQhoBUzIvkHBgz4z2pPnXRubUbzKheIQYwoC1KGs7dJUtqfa7wY2X8t WVMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4sJeafA0tHADY7ib+z6QldPdoUYh+FXYeA/4f+g/ehg=; b=C2Oin1zRPlFeJsz4FUB1k+c7WPid/dp39NWfc9vOxQBhwvNpD9kwhGSbwa3/aGgb+M zftxc90342EIFsvOme8ol+7LKvSR5FK7SSqzx/Pp2yT3aYlL6kNURyYDqZCa7pOlqAuc RmCuY+HieMRWXdwGrZCwf1aiZWuNEfp0uvVVDi+KP4YT2t5dpa17j2OM48yDZFup32IA C0Pkj/YIhvEFCi6/1whQEijuHQzCnX/ImD0PvUoaTln4Vd55DDX1aF01+uG6fhPdFndX 8v2sQWBHszd2PGPQtGtim1iK5GNEk30OdZXP+2uDGLMYCfdsxJaqV+aSr7viAUQCg1bv m0jQ== X-Gm-Message-State: ALyK8tJLPz264KfsYGh0N1LQFo7H6e4U5tYfyNvTDulAWZ/mQivmKFAbqdYS+OsYwIDhGP4ZHFXtOWuDNPL20g== X-Received: by 10.31.168.138 with SMTP id r132mr991717vke.8.1466042110241; Wed, 15 Jun 2016 18:55:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.37.1 with HTTP; Wed, 15 Jun 2016 18:55:09 -0700 (PDT) In-Reply-To: <13453684.1tT3vNfOUf@ralph.baldwin.cx> References: <201606152101.u5FL1reW011224@repo.freebsd.org> <13453684.1tT3vNfOUf@ralph.baldwin.cx> From: Sepherosa Ziehau Date: Thu, 16 Jun 2016 09:55:09 +0800 Message-ID: Subject: Re: svn commit: r301931 - head/tools/tools/decioctl To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 01:55:11 -0000 On Thu, Jun 16, 2016 at 5:12 AM, John Baldwin wrote: > On Wednesday, June 15, 2016 09:01:53 PM John Baldwin wrote: >> Author: jhb >> Date: Wed Jun 15 21:01:53 2016 >> New Revision: 301931 >> URL: https://svnweb.freebsd.org/changeset/base/301931 >> >> Log: >> Add a tool to decode ioctl commands. >> >> One or more ioctl command values can be passed as arguments on the command >> line. For each value, the command is broken down into it's components >> (direction, group, number, and length). In addition, if a command has a >> known name it is output via sysdecode_ioctlname(). >> >> Reviewed by: kib, emaste, avg >> Approved by: re (gjb) >> Differential Revision: https://reviews.freebsd.org/D6851 > > I've had a version of this in a private tree of utilities for several years. > I added the sysdecode stuff yesterday though now that it's easy to do so. > > Sample output: > > % ./decioctl 0xc4d01902 0xc4e01902 0x4004667f > command : dir group num len name > 0xc4d01902: INOUT 0x19 2 1232 CAMIOCOMMAND > 0xc4e01902: INOUT 0x19 2 1248 > 0x4004667f: OUT 'f' 127 4 FIONREAD Haha, very nice :D -- Tomorrow Will Never Die From owner-svn-src-head@freebsd.org Thu Jun 16 03:00:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B964BA47DA9; Thu, 16 Jun 2016 03:00: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 7CF981441; Thu, 16 Jun 2016 03:00: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 u5G30AdC042970; Thu, 16 Jun 2016 03:00:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5G30AQ8042969; Thu, 16 Jun 2016 03:00:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201606160300.u5G30AQ8042969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Jun 2016 03:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301944 - head/share/zoneinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 03:00:11 -0000 Author: gjb Date: Thu Jun 16 03:00:10 2016 New Revision: 301944 URL: https://svnweb.freebsd.org/changeset/base/301944 Log: Fix zoneinfo file packaging. This change fixes 468 of 488 zoneinfo file packaging issues, the rest still to be investigated. Approved by: re (blanket, pkgbase) Sponsored by: The FreeBSD Foundation Modified: head/share/zoneinfo/Makefile Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Thu Jun 16 02:48:18 2016 (r301943) +++ head/share/zoneinfo/Makefile Thu Jun 16 03:00:10 2016 (r301944) @@ -82,10 +82,10 @@ zoneinfo: yearistype ${TDATA} beforeinstall: install-zoneinfo install-zoneinfo: cd ${TZBUILDDIR} && \ - find -s * -type f -print -exec ${INSTALL} \ + find -s * -type f -print -exec ${INSTALL} -T ${TAGS} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ + ${INSTALL} -T ${TAGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ afterinstall: From owner-svn-src-head@freebsd.org Thu Jun 16 03:02:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D233A470C4; Thu, 16 Jun 2016 03:02:28 +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 4B5BA1E90; Thu, 16 Jun 2016 03:02:28 +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 u5G32RvJ047493; Thu, 16 Jun 2016 03:02:27 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5G32RPg047492; Thu, 16 Jun 2016 03:02:27 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201606160302.u5G32RPg047492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 16 Jun 2016 03:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301945 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 03:02:28 -0000 Author: manu Date: Thu Jun 16 03:02:27 2016 New Revision: 301945 URL: https://svnweb.freebsd.org/changeset/base/301945 Log: Bump /tmp from 30m to 50m for ARM release images. 30m isn't enough for pkg anymore to extract packagesite.txz. 40m is fine for now but let's take a safer way as we don't know when pkg will need more. Reported by: many Approved by: re (gjb), andrew (mentor) Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Thu Jun 16 03:00:10 2016 (r301944) +++ head/release/tools/arm.subr Thu Jun 16 03:02:27 2016 (r301945) @@ -109,7 +109,7 @@ arm_install_base() { >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "tmpfs /tmp tmpfs rw,mode=1777,size=30m 0 0" \ + echo "tmpfs /tmp tmpfs rw,mode=1777,size=50m 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab local hostname From owner-svn-src-head@freebsd.org Thu Jun 16 07:45:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD085A4731C; Thu, 16 Jun 2016 07:45:58 +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 76D3214C9; Thu, 16 Jun 2016 07:45:58 +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 u5G7jvDe050453; Thu, 16 Jun 2016 07:45:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5G7jvag050452; Thu, 16 Jun 2016 07:45:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201606160745.u5G7jvag050452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 16 Jun 2016 07:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301955 - head/sys/boot/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 07:45:58 -0000 Author: avg Date: Thu Jun 16 07:45:57 2016 New Revision: 301955 URL: https://svnweb.freebsd.org/changeset/base/301955 Log: fix a zfs boot regression introduced in r300117 by accident There is no reason to return non-zero value from zfs_probe_partition() as that causes following partitions to not be probed for ZFS vdevs. A particular scenario that I encountered is a GPT partitioned disk where several partitions have freebsd-zfs type. A partition with a lower index is used as a cache (l2arc) vdev and in that case case zfs_probe() returned a non-zero status. That status was returned to ptable_iterate() and caused it to abort the iteration. Because of that the subsequent partitions were not probed and a root pool was not discovered resulting in a boot failure. While there fix the style for nearby return statements. Approved by: re (kib) Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Thu Jun 16 06:34:12 2016 (r301954) +++ head/sys/boot/zfs/zfs.c Thu Jun 16 07:45:57 2016 (r301955) @@ -450,7 +450,7 @@ zfs_probe_partition(void *arg, const cha /* Probe only freebsd-zfs and freebsd partitions */ if (part->type != PART_FREEBSD && part->type != PART_FREEBSD_ZFS) - return 0; + return (0); ppa = (struct zfs_probe_args *)arg; strncpy(devname, ppa->devname, strlen(ppa->devname) - 1); @@ -458,10 +458,10 @@ zfs_probe_partition(void *arg, const cha sprintf(devname, "%s%s:", devname, partname); pa.fd = open(devname, O_RDONLY); if (pa.fd == -1) - return 0; + return (0); ret = zfs_probe(pa.fd, ppa->pool_guid); if (ret == 0) - return 0; + return (0); /* Do we have BSD label here? */ if (part->type == PART_FREEBSD) { pa.devname = devname; @@ -470,12 +470,12 @@ zfs_probe_partition(void *arg, const cha table = ptable_open(&pa, part->end - part->start + 1, ppa->secsz, zfs_diskread); if (table != NULL) { - ret = ptable_iterate(table, &pa, zfs_probe_partition); + ptable_iterate(table, &pa, zfs_probe_partition); ptable_close(table); } } close(pa.fd); - return (ret); + return (0); } int From owner-svn-src-head@freebsd.org Thu Jun 16 07:48:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54222A47461; Thu, 16 Jun 2016 07:48:23 +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 13C5F17B5; Thu, 16 Jun 2016 07:48:23 +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 u5G7mMKf050588; Thu, 16 Jun 2016 07:48:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5G7mL0E050584; Thu, 16 Jun 2016 07:48:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201606160748.u5G7mL0E050584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Jun 2016 07:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301956 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 07:48:23 -0000 Author: hselasky Date: Thu Jun 16 07:48:21 2016 New Revision: 301956 URL: https://svnweb.freebsd.org/changeset/base/301956 Log: Implement libusb_get_version() and update libusb manual page. Approved by: re (glebius) Requested by: swills MFC after: 1 week Modified: head/lib/libusb/Makefile head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10.c Modified: head/lib/libusb/Makefile ============================================================================== --- head/lib/libusb/Makefile Thu Jun 16 07:45:57 2016 (r301955) +++ head/lib/libusb/Makefile Thu Jun 16 07:48:21 2016 (r301956) @@ -65,6 +65,7 @@ CFLAGS+= -I ../../sys .endif # LibUSB v1.0 +MLINKS += libusb.3 libusb_get_version.3 MLINKS += libusb.3 libusb_init.3 MLINKS += libusb.3 libusb_exit.3 MLINKS += libusb.3 libusb_strerror.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Thu Jun 16 07:45:57 2016 (r301955) +++ head/lib/libusb/libusb.3 Thu Jun 16 07:48:21 2016 (r301956) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2014 +.Dd June 16, 2016 .Dt LIBUSB 3 .Os .Sh NAME @@ -43,6 +43,10 @@ The library contains interfaces for directly managing a usb device. The current implementation supports v1.0 of the libusb API. .Sh LIBRARY INITIALISATION AND DEINITIALISATION +.Ft "const struct libusb_version *" +.Fn libusb_get_version "void" +This function returns version information about LibUSB. +.Pp .Ft int .Fn libusb_init "libusb_context **ctx" This function initialises libusb. Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Thu Jun 16 07:45:57 2016 (r301955) +++ head/lib/libusb/libusb.h Thu Jun 16 07:48:21 2016 (r301956) @@ -235,6 +235,15 @@ struct libusb_pollfd { short events; }; +struct libusb_version { + const uint16_t major; + const uint16_t minor; + const uint16_t micro; + const uint16_t nano; + const char *rc; + const char *describe; +}; + typedef struct libusb_context libusb_context; typedef struct libusb_device libusb_device; typedef struct libusb_device_handle libusb_device_handle; @@ -384,6 +393,7 @@ typedef struct libusb_transfer { /* Library initialisation */ void libusb_set_debug(libusb_context * ctx, int level); +const struct libusb_version *libusb_get_version(void); const char *libusb_strerror(int code); const char *libusb_error_name(int code); int libusb_init(libusb_context ** context); Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Thu Jun 16 07:45:57 2016 (r301955) +++ head/lib/libusb/libusb10.c Thu Jun 16 07:48:21 2016 (r301956) @@ -69,6 +69,22 @@ static void libusb10_submit_transfer_sub /* Library initialisation / deinitialisation */ +static const struct libusb_version libusb_version = { + .major = 1, + .minor = 0, + .micro = 0, + .nano = 2016, + .rc = "", + .describe = "http://www.freebsd.org" +}; + +const struct libusb_version * +libusb_get_version(void) +{ + + return (&libusb_version); +} + void libusb_set_debug(libusb_context *ctx, int level) { From owner-svn-src-head@freebsd.org Thu Jun 16 11:51:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4D0DA706A4; Thu, 16 Jun 2016 11:51:21 +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 81BC21BFB; Thu, 16 Jun 2016 11:51:21 +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 u5GBpKrO038940; Thu, 16 Jun 2016 11:51:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GBpKJf038939; Thu, 16 Jun 2016 11:51:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201606161151.u5GBpKJf038939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Jun 2016 11:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301957 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 11:51:21 -0000 Author: hselasky Date: Thu Jun 16 11:51:20 2016 New Revision: 301957 URL: https://svnweb.freebsd.org/changeset/base/301957 Log: Define LIBUSB_API_VERSION. Approved by: re (kostikbel) Requested by: swills MFC after: 1 week Modified: head/lib/libusb/libusb.h Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Thu Jun 16 07:48:21 2016 (r301956) +++ head/lib/libusb/libusb.h Thu Jun 16 11:51:20 2016 (r301957) @@ -33,6 +33,8 @@ #include #endif +#define LIBUSB_API_VERSION 0x01000102 + #define LIBUSB_CALL #ifdef __cplusplus From owner-svn-src-head@freebsd.org Thu Jun 16 11:55:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FB43A708A0; Thu, 16 Jun 2016 11:55:26 +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 E2EE411A6; Thu, 16 Jun 2016 11:55:25 +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 u5GBtPMm042474; Thu, 16 Jun 2016 11:55:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GBtP5j042473; Thu, 16 Jun 2016 11:55:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201606161155.u5GBtP5j042473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Jun 2016 11:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301958 - head/share/zoneinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 11:55:26 -0000 Author: gjb Date: Thu Jun 16 11:55:24 2016 New Revision: 301958 URL: https://svnweb.freebsd.org/changeset/base/301958 Log: Revert r301944, which apparently broke zoneinfo install during installworld (although I am not sure why). I'll revisit this change after I further understand the cause of the breakage. Thanks to our secret canary (dhw) for the report. Approved by: re (blanket, pkgbase) Sponsored by: The FreeBSD Foundation Modified: head/share/zoneinfo/Makefile Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Thu Jun 16 11:51:20 2016 (r301957) +++ head/share/zoneinfo/Makefile Thu Jun 16 11:55:24 2016 (r301958) @@ -82,10 +82,10 @@ zoneinfo: yearistype ${TDATA} beforeinstall: install-zoneinfo install-zoneinfo: cd ${TZBUILDDIR} && \ - find -s * -type f -print -exec ${INSTALL} -T ${TAGS} \ + find -s * -type f -print -exec ${INSTALL} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; - ${INSTALL} -T ${TAGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ afterinstall: From owner-svn-src-head@freebsd.org Thu Jun 16 11:58:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0D8BA709DD; Thu, 16 Jun 2016 11:58:47 +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 C11BE13BE; Thu, 16 Jun 2016 11:58:47 +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 u5GBwkM6042633; Thu, 16 Jun 2016 11:58:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GBwkd1042632; Thu, 16 Jun 2016 11:58:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606161158.u5GBwkd1042632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 16 Jun 2016 11:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301959 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 11:58:48 -0000 Author: kib Date: Thu Jun 16 11:58:46 2016 New Revision: 301959 URL: https://svnweb.freebsd.org/changeset/base/301959 Log: Remove code duplication. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs) X-Differential revision: https://reviews.freebsd.org/D6731 Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Thu Jun 16 11:55:24 2016 (r301958) +++ head/sys/kern/kern_thread.c Thu Jun 16 11:58:46 2016 (r301959) @@ -669,11 +669,6 @@ weed_inhib(int mode, struct thread *td2, wakeup_swapper |= sleepq_abort(td2, EINTR); break; case SINGLE_BOUNDARY: - if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) - wakeup_swapper |= thread_unsuspend_one(td2, p, false); - if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) - wakeup_swapper |= sleepq_abort(td2, ERESTART); - break; case SINGLE_NO_EXIT: if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) wakeup_swapper |= thread_unsuspend_one(td2, p, false); From owner-svn-src-head@freebsd.org Thu Jun 16 12:01:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCCE6A7123C; Thu, 16 Jun 2016 12:01:12 +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 8A0161C68; Thu, 16 Jun 2016 12:01:12 +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 u5GC1BOa045345; Thu, 16 Jun 2016 12:01:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GC1Brq045344; Thu, 16 Jun 2016 12:01:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606161201.u5GC1Brq045344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 16 Jun 2016 12:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301960 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 12:01:12 -0000 Author: kib Date: Thu Jun 16 12:01:11 2016 New Revision: 301960 URL: https://svnweb.freebsd.org/changeset/base/301960 Log: Remove XXX comments from kern_thread.c. In one case, there is no reason for it in modern times. In the other case, expand the comment stating instead of doubting. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs) X-Differential revision: https://reviews.freebsd.org/D6731 Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Thu Jun 16 11:58:46 2016 (r301959) +++ head/sys/kern/kern_thread.c Thu Jun 16 12:01:11 2016 (r301960) @@ -480,7 +480,7 @@ thread_exit(void) * architecture specific resources that * would not be on a new untouched process. */ - cpu_thread_exit(td); /* XXXSMP */ + cpu_thread_exit(td); /* * The last thread is left attached to the process @@ -907,8 +907,8 @@ thread_suspend_check(int return_instead) /* * The only suspension in action is a * single-threading. Single threader need not stop. - * XXX Should be safe to access unlocked - * as it can only be set to be true by us. + * It is safe to access p->p_singlethread unlocked + * because it can only be set to our address by us. */ if (p->p_singlethread == td) return (0); /* Exempt from stopping. */ From owner-svn-src-head@freebsd.org Thu Jun 16 12:05:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D833AA71626; Thu, 16 Jun 2016 12:05:47 +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 A55EE120A; Thu, 16 Jun 2016 12:05:47 +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 u5GC5kqc046210; Thu, 16 Jun 2016 12:05:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GC5jiG046192; Thu, 16 Jun 2016 12:05:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606161205.u5GC5jiG046192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 16 Jun 2016 12:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301961 - in head/sys: amd64/amd64 amd64/cloudabi64 arm/arm arm64/arm64 arm64/cloudabi64 compat/linux i386/i386 kern mips/mips powerpc/powerpc riscv/riscv sparc64/sparc64 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 12:05:47 -0000 Author: kib Date: Thu Jun 16 12:05:44 2016 New Revision: 301961 URL: https://svnweb.freebsd.org/changeset/base/301961 Log: Update comments for the MD functions managing contexts for new threads, to make it less confusing and using modern kernel terms. Rename the functions to reflect current use of the functions, instead of the historic KSE conventions: cpu_set_fork_handler -> cpu_fork_kthread_handler (for kthreads) cpu_set_upcall -> cpu_copy_thread (for forks) cpu_set_upcall_kse -> cpu_set_upcall (for new threads creation) Reviewed by: jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs) Differential revision: https://reviews.freebsd.org/D6731 Modified: head/sys/amd64/amd64/vm_machdep.c head/sys/amd64/cloudabi64/cloudabi64_sysvec.c head/sys/arm/arm/swtch-v6.S head/sys/arm/arm/vm_machdep.c head/sys/arm64/arm64/vm_machdep.c head/sys/arm64/cloudabi64/cloudabi64_sysvec.c head/sys/compat/linux/linux_fork.c head/sys/i386/i386/vm_machdep.c head/sys/kern/init_main.c head/sys/kern/kern_fork.c head/sys/kern/kern_kthread.c head/sys/kern/kern_thr.c head/sys/mips/mips/vm_machdep.c head/sys/powerpc/powerpc/exec_machdep.c head/sys/powerpc/powerpc/vm_machdep.c head/sys/riscv/riscv/vm_machdep.c head/sys/sparc64/sparc64/vm_machdep.c head/sys/sys/proc.h Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/amd64/amd64/vm_machdep.c Thu Jun 16 12:05:44 2016 (r301961) @@ -285,10 +285,7 @@ cpu_fork(td1, p2, td2, flags) * This is needed to make kernel threads stay in kernel mode. */ void -cpu_set_fork_handler(td, func, arg) - struct thread *td; - void (*func)(void *); - void *arg; +cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) { /* * Note that the trap frame follows the args, so the function @@ -421,14 +418,14 @@ cpu_set_syscall_retval(struct thread *td } /* - * Initialize machine state (pcb and trap frame) for a new thread about to - * upcall. Put enough state in the new thread's PCB to get it to go back - * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources - * such as those generated in thread_userret() itself. + * Initialize machine state, mostly pcb and trap frame for a new + * thread, about to return to userspace. Put enough state in the new + * thread's PCB to get it to go back to the fork_return(), which + * finalizes the thread state and handles peculiarities of the first + * return to userspace for the new thread. */ void -cpu_set_upcall(struct thread *td, struct thread *td0) +cpu_copy_thread(struct thread *td, struct thread *td0) { struct pcb *pcb2; @@ -484,13 +481,12 @@ cpu_set_upcall(struct thread *td, struct } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Set that machine state for performing an upcall that starts + * the entry function with the given argument. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, - stack_t *stack) +cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, + stack_t *stack) { /* @@ -505,7 +501,7 @@ cpu_set_upcall_kse(struct thread *td, vo #ifdef COMPAT_FREEBSD32 if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { /* - * Set the trap frame to point at the beginning of the uts + * Set the trap frame to point at the beginning of the entry * function. */ td->td_frame->tf_rbp = 0; @@ -513,10 +509,7 @@ cpu_set_upcall_kse(struct thread *td, vo (((uintptr_t)stack->ss_sp + stack->ss_size - 4) & ~0x0f) - 4; td->td_frame->tf_rip = (uintptr_t)entry; - /* - * Pass the address of the mailbox for this kse to the uts - * function as a parameter on the stack. - */ + /* Pass the argument to the entry point. */ suword32((void *)(td->td_frame->tf_rsp + sizeof(int32_t)), (uint32_t)(uintptr_t)arg); @@ -539,10 +532,7 @@ cpu_set_upcall_kse(struct thread *td, vo td->td_frame->tf_gs = _ugssel; td->td_frame->tf_flags = TF_HASSEGS; - /* - * Pass the address of the mailbox for this kse to the uts - * function as a parameter on the stack. - */ + /* Pass the argument to the entry point. */ td->td_frame->tf_rdi = (register_t)arg; } Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Thu Jun 16 12:05:44 2016 (r301961) @@ -172,7 +172,7 @@ cloudabi64_thread_setregs(struct thread /* Perform standard register initialization. */ stack.ss_sp = (void *)attr->stack; stack.ss_size = tcbptr - attr->stack; - cpu_set_upcall_kse(td, (void *)attr->entry_point, NULL, &stack); + cpu_set_upcall(td, (void *)attr->entry_point, NULL, &stack); /* * Pass in the thread ID of the new thread and the argument Modified: head/sys/arm/arm/swtch-v6.S ============================================================================== --- head/sys/arm/arm/swtch-v6.S Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/arm/arm/swtch-v6.S Thu Jun 16 12:05:44 2016 (r301961) @@ -450,8 +450,8 @@ sw1: /* * Restore all saved registers and return. Note that some saved - * registers can be changed when either cpu_fork(), cpu_set_upcall(), - * cpu_set_fork_handler(), or makectx() was called. + * registers can be changed when either cpu_fork(), cpu_copy_thread(), + * cpu_fork_kthread_handler(), or makectx() was called. */ add r3, r7, #PCB_R4 ldmia r3, {r4-r12, sp, pc} Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/arm/arm/vm_machdep.c Thu Jun 16 12:05:44 2016 (r301961) @@ -226,14 +226,14 @@ cpu_set_syscall_retval(struct thread *td } /* - * Initialize machine state (pcb and trap frame) for a new thread about to - * upcall. Put enough state in the new thread's PCB to get it to go back - * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources - * such as those generated in thread_userret() itself. + * Initialize machine state, mostly pcb and trap frame for a new + * thread, about to return to userspace. Put enough state in the new + * thread's PCB to get it to go back to the fork_return(), which + * finalizes the thread state and handles peculiarities of the first + * return to userspace for the new thread. */ void -cpu_set_upcall(struct thread *td, struct thread *td0) +cpu_copy_thread(struct thread *td, struct thread *td0) { bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe)); @@ -253,12 +253,11 @@ cpu_set_upcall(struct thread *td, struct } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Set that machine state for performing an upcall that starts + * the entry function with the given argument. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf = td->td_frame; @@ -327,7 +326,7 @@ cpu_thread_clean(struct thread *td) * This is needed to make kernel threads stay in kernel mode. */ void -cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg) +cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) { td->td_pcb->pcb_regs.sf_r4 = (register_t)func; /* function */ td->td_pcb->pcb_regs.sf_r5 = (register_t)arg; /* first arg */ Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/arm64/arm64/vm_machdep.c Thu Jun 16 12:05:44 2016 (r301961) @@ -153,14 +153,14 @@ cpu_set_syscall_retval(struct thread *td } /* - * Initialize machine state (pcb and trap frame) for a new thread about to - * upcall. Put enough state in the new thread's PCB to get it to go back - * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources - * such as those generated in thread_userret() itself. + * Initialize machine state, mostly pcb and trap frame for a new + * thread, about to return to userspace. Put enough state in the new + * thread's PCB to get it to go back to the fork_return(), which + * finalizes the thread state and handles peculiarities of the first + * return to userspace for the new thread. */ void -cpu_set_upcall(struct thread *td, struct thread *td0) +cpu_copy_thread(struct thread *td, struct thread *td0) { bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe)); bcopy(td0->td_pcb, td->td_pcb, sizeof(struct pcb)); @@ -177,12 +177,11 @@ cpu_set_upcall(struct thread *td, struct } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Set that machine state for performing an upcall that starts + * the entry function with the given argument. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf = td->td_frame; @@ -238,7 +237,7 @@ cpu_thread_clean(struct thread *td) * This is needed to make kernel threads stay in kernel mode. */ void -cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg) +cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) { td->td_pcb->pcb_x[8] = (uintptr_t)func; Modified: head/sys/arm64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Thu Jun 16 12:05:44 2016 (r301961) @@ -140,7 +140,7 @@ cloudabi64_thread_setregs(struct thread /* Perform standard register initialization. */ stack.ss_sp = (void *)attr->stack; stack.ss_size = attr->stack_size; - cpu_set_upcall_kse(td, (void *)attr->entry_point, NULL, &stack); + cpu_set_upcall(td, (void *)attr->entry_point, NULL, &stack); /* * Pass in the thread ID of the new thread and the argument Modified: head/sys/compat/linux/linux_fork.c ============================================================================== --- head/sys/compat/linux/linux_fork.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/compat/linux/linux_fork.c Thu Jun 16 12:05:44 2016 (r301961) @@ -299,8 +299,8 @@ linux_clone_thread(struct thread *td, st error = kern_thr_alloc(p, 0, &newtd); if (error) goto fail; - - cpu_set_upcall(newtd, td); + + cpu_copy_thread(newtd, td); bzero(&newtd->td_startzero, __rangeof(struct thread, td_startzero, td_endzero)); Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/i386/i386/vm_machdep.c Thu Jun 16 12:05:44 2016 (r301961) @@ -324,10 +324,7 @@ cpu_fork(td1, p2, td2, flags) * This is needed to make kernel threads stay in kernel mode. */ void -cpu_set_fork_handler(td, func, arg) - struct thread *td; - void (*func)(void *); - void *arg; +cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) { /* * Note that the trap frame follows the args, so the function @@ -458,14 +455,14 @@ cpu_set_syscall_retval(struct thread *td } /* - * Initialize machine state (pcb and trap frame) for a new thread about to - * upcall. Put enough state in the new thread's PCB to get it to go back - * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources - * such as those generated in thread_userret() itself. + * Initialize machine state, mostly pcb and trap frame for a new + * thread, about to return to userspace. Put enough state in the new + * thread's PCB to get it to go back to the fork_return(), which + * finalizes the thread state and handles peculiarities of the first + * return to userspace for the new thread. */ void -cpu_set_upcall(struct thread *td, struct thread *td0) +cpu_copy_thread(struct thread *td, struct thread *td0) { struct pcb *pcb2; @@ -527,13 +524,12 @@ cpu_set_upcall(struct thread *td, struct } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Set that machine state for performing an upcall that starts + * the entry function with the given argument. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, - stack_t *stack) +cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, + stack_t *stack) { /* @@ -546,7 +542,7 @@ cpu_set_upcall_kse(struct thread *td, vo cpu_thread_clean(td); /* - * Set the trap frame to point at the beginning of the uts + * Set the trap frame to point at the beginning of the entry * function. */ td->td_frame->tf_ebp = 0; @@ -554,10 +550,7 @@ cpu_set_upcall_kse(struct thread *td, vo (((int)stack->ss_sp + stack->ss_size - 4) & ~0x0f) - 4; td->td_frame->tf_eip = (int)entry; - /* - * Pass the address of the mailbox for this kse to the uts - * function as a parameter on the stack. - */ + /* Pass the argument to the entry point. */ suword((void *)(td->td_frame->tf_esp + sizeof(void *)), (int)arg); } Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/kern/init_main.c Thu Jun 16 12:05:44 2016 (r301961) @@ -862,7 +862,8 @@ create_init(const void *udata __unused) PROC_UNLOCK(initproc); sx_xunlock(&proctree_lock); crfree(oldcred); - cpu_set_fork_handler(FIRST_THREAD_IN_PROC(initproc), start_init, NULL); + cpu_fork_kthread_handler(FIRST_THREAD_IN_PROC(initproc), + start_init, NULL); } SYSINIT(init, SI_SUB_CREATE_INIT, SI_ORDER_FIRST, create_init, NULL); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/kern/kern_fork.c Thu Jun 16 12:05:44 2016 (r301961) @@ -1030,7 +1030,7 @@ fork_exit(void (*callout)(void *, struct thread_unlock(td); /* - * cpu_set_fork_handler intercepts this function call to + * cpu_fork_kthread_handler intercepts this function call to * have this call a non-return function to stay in kernel mode. * initproc has its own fork handler, but it does return. */ Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/kern/kern_kthread.c Thu Jun 16 12:05:44 2016 (r301961) @@ -124,7 +124,7 @@ kproc_create(void (*func)(void *), void #endif /* call the processes' main()... */ - cpu_set_fork_handler(td, func, arg); + cpu_fork_kthread_handler(td, func, arg); /* Avoid inheriting affinity from a random parent. */ cpuset_setthread(td->td_tid, cpuset_root); @@ -281,14 +281,11 @@ kthread_add(void (*func)(void *), void * vsnprintf(newtd->td_name, sizeof(newtd->td_name), fmt, ap); va_end(ap); - newtd->td_proc = p; /* needed for cpu_set_upcall */ - - /* XXX optimise this probably? */ - /* On x86 (and probably the others too) it is way too full of junk */ - /* Needs a better name */ - cpu_set_upcall(newtd, oldtd); + newtd->td_proc = p; /* needed for cpu_copy_thread */ + /* might be further optimized for kthread */ + cpu_copy_thread(newtd, oldtd); /* put the designated function(arg) as the resume context */ - cpu_set_fork_handler(newtd, func, arg); + cpu_fork_kthread_handler(newtd, func, arg); newtd->td_pflags |= TDP_KTHREAD; thread_cow_get_proc(newtd, p); Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/kern/kern_thr.c Thu Jun 16 12:05:44 2016 (r301961) @@ -163,7 +163,7 @@ thr_new_initthr(struct thread *td, void stack.ss_sp = param->stack_base; stack.ss_size = param->stack_size; /* Set upcall address to user thread entry function. */ - cpu_set_upcall_kse(td, param->start_func, param->arg, &stack); + cpu_set_upcall(td, param->start_func, param->arg, &stack); /* Setup user TLS address and TLS pointer register. */ return (cpu_set_user_tls(td, param->tls_base)); } @@ -227,7 +227,7 @@ thread_create(struct thread *td, struct if (error) goto fail; - cpu_set_upcall(newtd, td); + cpu_copy_thread(newtd, td); bzero(&newtd->td_startzero, __rangeof(struct thread, td_startzero, td_endzero)); Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/mips/mips/vm_machdep.c Thu Jun 16 12:05:44 2016 (r301961) @@ -194,7 +194,7 @@ cpu_fork(register struct thread *td1,reg * This is needed to make kernel threads stay in kernel mode. */ void -cpu_set_fork_handler(struct thread *td, void (*func) __P((void *)), void *arg) +cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) { /* * Note that the trap frame follows the args, so the function @@ -352,14 +352,14 @@ cpu_set_syscall_retval(struct thread *td } /* - * Initialize machine state (pcb and trap frame) for a new thread about to - * upcall. Put enough state in the new thread's PCB to get it to go back - * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcalls that are from other sources - * such as those generated in thread_userret() itself. + * Initialize machine state, mostly pcb and trap frame for a new + * thread, about to return to userspace. Put enough state in the new + * thread's PCB to get it to go back to the fork_return(), which + * finalizes the thread state and handles peculiarities of the first + * return to userspace for the new thread. */ void -cpu_set_upcall(struct thread *td, struct thread *td0) +cpu_copy_thread(struct thread *td, struct thread *td0) { struct pcb *pcb2; @@ -415,12 +415,11 @@ cpu_set_upcall(struct thread *td, struct } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Set that machine state for performing an upcall that starts + * the entry function with the given argument. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf; Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/powerpc/powerpc/exec_machdep.c Thu Jun 16 12:05:44 2016 (r301961) @@ -955,7 +955,7 @@ cpu_set_user_tls(struct thread *td, void } void -cpu_set_upcall(struct thread *td, struct thread *td0) +cpu_copy_thread(struct thread *td, struct thread *td0) { struct pcb *pcb2; struct trapframe *tf; @@ -996,8 +996,8 @@ cpu_set_upcall(struct thread *td, struct } void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, - stack_t *stack) +cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, + stack_t *stack) { struct trapframe *tf; uintptr_t sp; Modified: head/sys/powerpc/powerpc/vm_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/vm_machdep.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/powerpc/powerpc/vm_machdep.c Thu Jun 16 12:05:44 2016 (r301961) @@ -179,7 +179,7 @@ cpu_fork(struct thread *td1, struct proc * This is needed to make kernel threads stay in kernel mode. */ void -cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg) +cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) { struct callframe *cf; Modified: head/sys/riscv/riscv/vm_machdep.c ============================================================================== --- head/sys/riscv/riscv/vm_machdep.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/riscv/riscv/vm_machdep.c Thu Jun 16 12:05:44 2016 (r301961) @@ -146,14 +146,14 @@ cpu_set_syscall_retval(struct thread *td } /* - * Initialize machine state (pcb and trap frame) for a new thread about to - * upcall. Put enough state in the new thread's PCB to get it to go back - * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources - * such as those generated in thread_userret() itself. + * Initialize machine state, mostly pcb and trap frame for a new + * thread, about to return to userspace. Put enough state in the new + * thread's PCB to get it to go back to the fork_return(), which + * finalizes the thread state and handles peculiarities of the first + * return to userspace for the new thread. */ void -cpu_set_upcall(struct thread *td, struct thread *td0) +cpu_copy_thread(struct thread *td, struct thread *td0) { bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe)); @@ -170,12 +170,11 @@ cpu_set_upcall(struct thread *td, struct } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Set that machine state for performing an upcall that starts + * the entry function with the given argument. */ void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf = td->td_frame; @@ -231,7 +230,7 @@ cpu_thread_clean(struct thread *td) * This is needed to make kernel threads stay in kernel mode. */ void -cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg) +cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) { td->td_pcb->pcb_s[0] = (uintptr_t)func; Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/sparc64/sparc64/vm_machdep.c Thu Jun 16 12:05:44 2016 (r301961) @@ -174,7 +174,7 @@ cpu_set_syscall_retval(struct thread *td } void -cpu_set_upcall(struct thread *td, struct thread *td0) +cpu_copy_thread(struct thread *td, struct thread *td0) { struct trapframe *tf; struct frame *fr; @@ -197,7 +197,7 @@ cpu_set_upcall(struct thread *td, struct } void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, +cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) { struct trapframe *tf; @@ -360,7 +360,7 @@ cpu_reset(void) * This is needed to make kernel threads stay in kernel mode. */ void -cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg) +cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) { struct frame *fp; struct pcb *pcb; Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Jun 16 12:01:11 2016 (r301960) +++ head/sys/sys/proc.h Thu Jun 16 12:05:44 2016 (r301961) @@ -1005,12 +1005,12 @@ void userret(struct thread *, struct tra void cpu_exit(struct thread *); void exit1(struct thread *, int, int) __dead2; +void cpu_copy_thread(struct thread *td, struct thread *td0); int cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa); void cpu_fork(struct thread *, struct proc *, struct thread *, int); -void cpu_set_fork_handler(struct thread *, void (*)(void *), void *); +void cpu_fork_kthread_handler(struct thread *, void (*)(void *), void *); void cpu_set_syscall_retval(struct thread *, int); -void cpu_set_upcall(struct thread *td, struct thread *td0); -void cpu_set_upcall_kse(struct thread *, void (*)(void *), void *, +void cpu_set_upcall(struct thread *, void (*)(void *), void *, stack_t *); int cpu_set_user_tls(struct thread *, void *tls_base); void cpu_thread_alloc(struct thread *); From owner-svn-src-head@freebsd.org Thu Jun 16 12:07:41 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81403A71714; Thu, 16 Jun 2016 12:07:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DAFA14DD; Thu, 16 Jun 2016 12:07:41 +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 u5GC7eRv046480; Thu, 16 Jun 2016 12:07:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GC7ewk046479; Thu, 16 Jun 2016 12:07:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606161207.u5GC7ewk046479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 16 Jun 2016 12:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301962 - head/sys/dev/cpuctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 12:07:41 -0000 Author: kib Date: Thu Jun 16 12:07:40 2016 New Revision: 301962 URL: https://svnweb.freebsd.org/changeset/base/301962 Log: Always allow loading of cpuctl(4). When a CPU feature is not supported, e.g. CPUID or MSR, return ENODEV from the ioctl which needs that feature. Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs) Modified: head/sys/dev/cpuctl/cpuctl.c Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Thu Jun 16 12:05:44 2016 (r301961) +++ head/sys/dev/cpuctl/cpuctl.c Thu Jun 16 12:07:40 2016 (r301962) @@ -67,9 +67,9 @@ static d_ioctl_t cpuctl_ioctl; static int cpuctl_do_msr(int cpu, cpuctl_msr_args_t *data, u_long cmd, struct thread *td); -static void cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data, +static int cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data, struct thread *td); -static void cpuctl_do_cpuid_count(int cpu, cpuctl_cpuid_count_args_t *data, +static int cpuctl_do_cpuid_count(int cpu, cpuctl_cpuid_count_args_t *data, struct thread *td); static int cpuctl_do_update(int cpu, cpuctl_update_args_t *data, struct thread *td); @@ -171,8 +171,7 @@ cpuctl_ioctl(struct cdev *dev, u_long cm ret = cpuctl_do_msr(cpu, (cpuctl_msr_args_t *)data, cmd, td); break; case CPUCTL_CPUID: - cpuctl_do_cpuid(cpu, (cpuctl_cpuid_args_t *)data, td); - ret = 0; + ret = cpuctl_do_cpuid(cpu, (cpuctl_cpuid_args_t *)data, td); break; case CPUCTL_UPDATE: ret = priv_check(td, PRIV_CPUCTL_UPDATE); @@ -181,9 +180,8 @@ cpuctl_ioctl(struct cdev *dev, u_long cm ret = cpuctl_do_update(cpu, (cpuctl_update_args_t *)data, td); break; case CPUCTL_CPUID_COUNT: - cpuctl_do_cpuid_count(cpu, (cpuctl_cpuid_count_args_t *)data, - td); - ret = 0; + ret = cpuctl_do_cpuid_count(cpu, + (cpuctl_cpuid_count_args_t *)data, td); break; default: ret = EINVAL; @@ -196,7 +194,7 @@ fail: /* * Actually perform cpuid operation. */ -static void +static int cpuctl_do_cpuid_count(int cpu, cpuctl_cpuid_count_args_t *data, struct thread *td) { @@ -210,23 +208,30 @@ cpuctl_do_cpuid_count(int cpu, cpuctl_cp bzero(data->data, sizeof(data->data)); DPRINTF("[cpuctl,%d]: retrieving cpuid lev %#0x type %#0x for %d cpu\n", __LINE__, data->level, data->level_type, cpu); +#ifdef __i386__ + if (cpu_id == 0) + return (ENODEV); +#endif oldcpu = td->td_oncpu; is_bound = cpu_sched_is_bound(td); set_cpu(cpu, td); cpuid_count(data->level, data->level_type, data->data); restore_cpu(oldcpu, is_bound, td); + return (0); } -static void +static int cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data, struct thread *td) { cpuctl_cpuid_count_args_t cdata; + int error; cdata.level = data->level; /* Override the level type. */ cdata.level_type = 0; - cpuctl_do_cpuid_count(cpu, &cdata, td); + error = cpuctl_do_cpuid_count(cpu, &cdata, td); bcopy(cdata.data, data->data, sizeof(data->data)); /* Ignore error */ + return (error); } /* @@ -249,6 +254,10 @@ cpuctl_do_msr(int cpu, cpuctl_msr_args_t */ DPRINTF("[cpuctl,%d]: operating on MSR %#0x for %d cpu\n", __LINE__, data->msr, cpu); +#ifdef __i386__ + if ((cpu_feature & CPUID_MSR) == 0) + return (ENODEV); +#endif oldcpu = td->td_oncpu; is_bound = cpu_sched_is_bound(td); set_cpu(cpu, td); @@ -291,7 +300,9 @@ cpuctl_do_update(int cpu, cpuctl_update_ ("[cpuctl,%d]: bad cpu number %d", __LINE__, cpu)); DPRINTF("[cpuctl,%d]: XXX %d", __LINE__, cpu); - cpuctl_do_cpuid(cpu, &args, td); + ret = cpuctl_do_cpuid(cpu, &args, td); + if (ret != 0) + return (ret); ((uint32_t *)vendor)[0] = args.data[1]; ((uint32_t *)vendor)[1] = args.data[3]; ((uint32_t *)vendor)[2] = args.data[2]; @@ -518,11 +529,6 @@ cpuctl_modevent(module_t mod __unused, i switch(type) { case MOD_LOAD: - if ((cpu_feature & CPUID_MSR) == 0) { - if (bootverbose) - printf("cpuctl: not available.\n"); - return (ENODEV); - } if (bootverbose) printf("cpuctl: access to MSR registers/cpuid info.\n"); cpuctl_devs = malloc(sizeof(*cpuctl_devs) * mp_ncpus, M_CPUCTL, From owner-svn-src-head@freebsd.org Thu Jun 16 12:08:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F9D4A71776; Thu, 16 Jun 2016 12:08: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 70F22175F; Thu, 16 Jun 2016 12:08: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 u5GC8PlJ046556; Thu, 16 Jun 2016 12:08:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GC8P8h046555; Thu, 16 Jun 2016 12:08:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606161208.u5GC8P8h046555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 16 Jun 2016 12:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301963 - head/usr.sbin/cpucontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 12:08:26 -0000 Author: kib Date: Thu Jun 16 12:08:25 2016 New Revision: 301963 URL: https://svnweb.freebsd.org/changeset/base/301963 Log: Return usual error indicator to shell. Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs) Modified: head/usr.sbin/cpucontrol/cpucontrol.c Modified: head/usr.sbin/cpucontrol/cpucontrol.c ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.c Thu Jun 16 12:07:40 2016 (r301962) +++ head/usr.sbin/cpucontrol/cpucontrol.c Thu Jun 16 12:08:25 2016 (r301963) @@ -481,5 +481,5 @@ main(int argc, char *argv[]) usage(); /* Only one command can be selected. */ } SLIST_FREE(&datadirs, next, free); - return (error); + return (error == 0 ? 0 : 1); } From owner-svn-src-head@freebsd.org Thu Jun 16 12:14:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF164A71A01; Thu, 16 Jun 2016 12:14:20 +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 9518F1C97; Thu, 16 Jun 2016 12:14:20 +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 u5GCEJap050034; Thu, 16 Jun 2016 12:14:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GCEJuP050031; Thu, 16 Jun 2016 12:14:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201606161214.u5GCEJuP050031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Jun 2016 12:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301964 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 12:14:21 -0000 Author: hselasky Date: Thu Jun 16 12:14:19 2016 New Revision: 301964 URL: https://svnweb.freebsd.org/changeset/base/301964 Log: Add support for libusb_get_port_number() to the LibUSB v1.0 API. Approved by: re (kostikbel) Requested by: swills MFC after: 1 week Modified: head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Thu Jun 16 12:08:25 2016 (r301963) +++ head/lib/libusb/libusb.3 Thu Jun 16 12:14:19 2016 (r301964) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2016 +.Dd June 17, 2016 .Dt LIBUSB 3 .Os .Sh NAME @@ -106,6 +106,12 @@ counter decremented once. Returns the number of the bus contained by the device .Fa dev . .Pp +.Ft uint8_t +.Fn libusb_get_port_number "libusb_device *dev" +Returns the port number which the device given by +.Fa dev +is attached to. +.Pp .Ft int .Fn libusb_get_port_numbers "libusb_device *dev" "uint8_t *buf" "uint8_t bufsize" Stores, in the buffer Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Thu Jun 16 12:08:25 2016 (r301963) +++ head/lib/libusb/libusb.h Thu Jun 16 12:14:19 2016 (r301964) @@ -406,6 +406,7 @@ void libusb_exit(struct libusb_context * ssize_t libusb_get_device_list(libusb_context * ctx, libusb_device *** list); void libusb_free_device_list(libusb_device ** list, int unref_devices); uint8_t libusb_get_bus_number(libusb_device * dev); +uint8_t libusb_get_port_number(libusb_device * dev); int libusb_get_port_numbers(libusb_device *dev, uint8_t *buf, uint8_t bufsize); int libusb_get_port_path(libusb_context *ctx, libusb_device *dev, uint8_t *buf, uint8_t bufsize); uint8_t libusb_get_device_address(libusb_device * dev); Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Thu Jun 16 12:08:25 2016 (r301963) +++ head/lib/libusb/libusb10.c Thu Jun 16 12:14:19 2016 (r301964) @@ -308,6 +308,14 @@ libusb_get_bus_number(libusb_device *dev return (libusb20_dev_get_bus_number(dev->os_priv)); } +uint8_t +libusb_get_port_number(libusb_device *dev) +{ + if (dev == NULL) + return (0); /* should not happen */ + return (libusb20_dev_get_parent_port(dev->os_priv)); +} + int libusb_get_port_numbers(libusb_device *dev, uint8_t *buf, uint8_t bufsize) { From owner-svn-src-head@freebsd.org Thu Jun 16 13:34:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36B3FA47401; Thu, 16 Jun 2016 13:34:22 +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 065D41F9F; Thu, 16 Jun 2016 13:34: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 u5GDYLbM081310; Thu, 16 Jun 2016 13:34:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GDYLrY081309; Thu, 16 Jun 2016 13:34:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201606161334.u5GDYLrY081309@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 16 Jun 2016 13:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301965 - head/share/zoneinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 13:34:22 -0000 Author: gjb Date: Thu Jun 16 13:34:20 2016 New Revision: 301965 URL: https://svnweb.freebsd.org/changeset/base/301965 Log: Reimplement r301944 using the correct install(1) invocation, which again fixes packaging tzdata/zoneinfo. Thank you to hrs for the pointer on what I did incorrectly. Approved by: re (blanket, pkgbase) Sponsored by: The FreeBSD Foundation Modified: head/share/zoneinfo/Makefile Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Thu Jun 16 12:14:19 2016 (r301964) +++ head/share/zoneinfo/Makefile Thu Jun 16 13:34:20 2016 (r301965) @@ -82,10 +82,10 @@ zoneinfo: yearistype ${TDATA} beforeinstall: install-zoneinfo install-zoneinfo: cd ${TZBUILDDIR} && \ - find -s * -type f -print -exec ${INSTALL} \ + find -s * -type f -print -exec ${INSTALL} ${TAG_ARGS} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ + ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ afterinstall: From owner-svn-src-head@freebsd.org Thu Jun 16 14:26:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97BBEA47E3C; Thu, 16 Jun 2016 14:26: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 59B0A18F0; Thu, 16 Jun 2016 14:26: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 u5GEQ58A099500; Thu, 16 Jun 2016 14:26:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GEQ5Cr099493; Thu, 16 Jun 2016 14:26:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201606161426.u5GEQ5Cr099493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Jun 2016 14:26:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301966 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 14:26:06 -0000 Author: hselasky Date: Thu Jun 16 14:26:04 2016 New Revision: 301966 URL: https://svnweb.freebsd.org/changeset/base/301966 Log: Add support for libusb_set_auto_detach_kernel_driver() to the LibUSB v1.0 API. Approved by: re (kostikbel) Requested by: swills MFC after: 1 week Modified: head/lib/libusb/Makefile head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10.c head/lib/libusb/libusb20.c head/lib/libusb/libusb20_int.h Modified: head/lib/libusb/Makefile ============================================================================== --- head/lib/libusb/Makefile Thu Jun 16 13:34:20 2016 (r301965) +++ head/lib/libusb/Makefile Thu Jun 16 14:26:04 2016 (r301966) @@ -74,6 +74,7 @@ MLINKS += libusb.3 libusb_set_debug.3 MLINKS += libusb.3 libusb_get_device_list.3 MLINKS += libusb.3 libusb_free_device_list.3 MLINKS += libusb.3 libusb_get_bus_number.3 +MLINKS += libusb.3 libusb_get_port_number.3 MLINKS += libusb.3 libusb_get_device_address.3 MLINKS += libusb.3 libusb_get_device_speed.3 MLINKS += libusb.3 libusb_get_max_packet_size.3 @@ -98,6 +99,7 @@ MLINKS += libusb.3 libusb_get_driver_np. MLINKS += libusb.3 libusb_detach_kernel_driver.3 MLINKS += libusb.3 libusb_detach_kernel_driver_np.3 MLINKS += libusb.3 libusb_attach_kernel_driver.3 +MLINKS += libusb.3 libusb_set_auto_detach_kernel_driver.3 MLINKS += libusb.3 libusb_get_device_descriptor.3 MLINKS += libusb.3 libusb_get_active_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Thu Jun 16 13:34:20 2016 (r301965) +++ head/lib/libusb/libusb.3 Thu Jun 16 14:26:04 2016 (r301966) @@ -298,6 +298,18 @@ LIBUSB_ERROR_NO_DEVICE if the device has been disconnected, LIBUSB_ERROR_BUSY if the driver cannot be attached because the interface is claimed by a program or driver and a LIBUSB_ERROR code on failure. +.Pp +.Ft int +.Fn libusb_set_auto_detach_kernel_driver "libusb_device_handle *devh" "int enable" +This function enables automatic kernel interface driver detach when an +interface is claimed. +When the interface is restored the kernel driver is allowed to be re-attached. +If the +.Fa enable +argument is non-zero the feature is enabled. +Else disabled. +Returns 0 on success and a LIBUSB_ERROR code on +failure. .Sh USB DESCRIPTORS .Ft int .Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc" Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Thu Jun 16 13:34:20 2016 (r301965) +++ head/lib/libusb/libusb.h Thu Jun 16 14:26:04 2016 (r301966) @@ -432,6 +432,7 @@ int libusb_get_driver(libusb_device_hand int libusb_detach_kernel_driver_np(libusb_device_handle * devh, int interface); int libusb_detach_kernel_driver(libusb_device_handle * devh, int interface); int libusb_attach_kernel_driver(libusb_device_handle * devh, int interface); +int libusb_set_auto_detach_kernel_driver(libusb_device_handle *dev, int enable); int libusb_set_interface_alt_setting(libusb_device_handle * devh, int interface_number, int alternate_setting); /* USB Descriptors */ Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Thu Jun 16 13:34:20 2016 (r301965) +++ head/lib/libusb/libusb10.c Thu Jun 16 14:26:04 2016 (r301966) @@ -637,6 +637,7 @@ int libusb_claim_interface(struct libusb20_device *pdev, int interface_number) { libusb_device *dev; + int err = 0; dev = libusb_get_device(pdev); if (dev == NULL) @@ -645,11 +646,17 @@ libusb_claim_interface(struct libusb20_d if (interface_number < 0 || interface_number > 31) return (LIBUSB_ERROR_INVALID_PARAM); + if (pdev->auto_detach != 0) { + err = libusb_detach_kernel_driver(pdev, interface_number); + if (err != 0) + goto done; + } + CTX_LOCK(dev->ctx); dev->claimed_interfaces |= (1 << interface_number); CTX_UNLOCK(dev->ctx); - - return (0); +done: + return (err); } int @@ -665,13 +672,19 @@ libusb_release_interface(struct libusb20 if (interface_number < 0 || interface_number > 31) return (LIBUSB_ERROR_INVALID_PARAM); + if (pdev->auto_detach != 0) { + err = libusb_attach_kernel_driver(pdev, interface_number); + if (err != 0) + goto done; + } + CTX_LOCK(dev->ctx); if (!(dev->claimed_interfaces & (1 << interface_number))) err = LIBUSB_ERROR_NOT_FOUND; - - if (!err) + else dev->claimed_interfaces &= ~(1 << interface_number); CTX_UNLOCK(dev->ctx); +done: return (err); } @@ -873,6 +886,12 @@ libusb_attach_kernel_driver(struct libus return (0); } +int +libusb_set_auto_detach_kernel_driver(libusb_device_handle *dev, int enable) +{ + dev->auto_detach = (enable ? 1 : 0); +} + /* Asynchronous device I/O */ struct libusb_transfer * Modified: head/lib/libusb/libusb20.c ============================================================================== --- head/lib/libusb/libusb20.c Thu Jun 16 13:34:20 2016 (r301965) +++ head/lib/libusb/libusb20.c Thu Jun 16 14:26:04 2016 (r301966) @@ -601,6 +601,12 @@ libusb20_dev_close(struct libusb20_devic */ pdev->claimed_interface = 0; + /* + * The following variable is only used by the libusb v1.0 + * compat layer: + */ + pdev->auto_detach = 0; + return (error); } Modified: head/lib/libusb/libusb20_int.h ============================================================================== --- head/lib/libusb/libusb20_int.h Thu Jun 16 13:34:20 2016 (r301965) +++ head/lib/libusb/libusb20_int.h Thu Jun 16 14:26:04 2016 (r301966) @@ -213,6 +213,9 @@ struct libusb20_device { /* claimed interface */ uint8_t claimed_interface; + /* auto detach kernel driver */ + uint8_t auto_detach; + /* device file handle */ int file; From owner-svn-src-head@freebsd.org Thu Jun 16 15:25:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5A3FA72EB3; Thu, 16 Jun 2016 15:25:38 +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 958E31CAF; Thu, 16 Jun 2016 15:25:38 +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 u5GFPbAi021883; Thu, 16 Jun 2016 15:25:37 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GFPbkl021882; Thu, 16 Jun 2016 15:25:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201606161525.u5GFPbkl021882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 16 Jun 2016 15:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301967 - head/usr.sbin/rpcbind/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 15:25:38 -0000 Author: asomers Date: Thu Jun 16 15:25:37 2016 New Revision: 301967 URL: https://svnweb.freebsd.org/changeset/base/301967 Log: Fix usr.sbin/rpcbind ATF tests on 32-bit platforms usr.sbin/rpcbind/tests/addrmerge_test.c Fix some sizeof calculations that work only by luck on 64-bit platforms. PR: 210314 Reviewed by: ngie Approved by: re (kib) Reported by: Mark Millard MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6855 Modified: head/usr.sbin/rpcbind/tests/addrmerge_test.c Modified: head/usr.sbin/rpcbind/tests/addrmerge_test.c ============================================================================== --- head/usr.sbin/rpcbind/tests/addrmerge_test.c Thu Jun 16 14:26:04 2016 (r301966) +++ head/usr.sbin/rpcbind/tests/addrmerge_test.c Thu Jun 16 15:25:37 2016 (r301967) @@ -92,15 +92,15 @@ mock_ifaddr4(const char* name, const cha in->sin_family = AF_INET; in->sin_port = 0; - in->sin_len = sizeof(in); + in->sin_len = sizeof(*in); in->sin_addr.s_addr = inet_addr(addr); mask_in->sin_family = AF_INET; mask_in->sin_port = 0; - mask_in->sin_len = sizeof(mask_in); + mask_in->sin_len = sizeof(*mask_in); mask_in->sin_addr.s_addr = inet_addr(mask); bcast_in->sin_family = AF_INET; bcast_in->sin_port = 0; - bcast_in->sin_len = sizeof(bcast_in); + bcast_in->sin_len = sizeof(*bcast_in); bcast_in->sin_addr.s_addr = inet_addr(bcast); *ifaddr = (struct ifaddrs) { .ifa_next = NULL, From owner-svn-src-head@freebsd.org Thu Jun 16 16:17:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BDFFA4721A; Thu, 16 Jun 2016 16:17: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 54ED61479; Thu, 16 Jun 2016 16:17:30 +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 u5GGHTHO040403; Thu, 16 Jun 2016 16:17:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GGHTjV040397; Thu, 16 Jun 2016 16:17:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201606161617.u5GGHTjV040397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Jun 2016 16:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301968 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 16:17:30 -0000 Author: hselasky Date: Thu Jun 16 16:17:29 2016 New Revision: 301968 URL: https://svnweb.freebsd.org/changeset/base/301968 Log: Add multiple missing descriptor parsing functions to the LibUSB v1.0 API. Approved by: re (kib) Requested by: swills MFC after: 1 week Modified: head/lib/libusb/Makefile head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10_desc.c Modified: head/lib/libusb/Makefile ============================================================================== --- head/lib/libusb/Makefile Thu Jun 16 15:25:37 2016 (r301967) +++ head/lib/libusb/Makefile Thu Jun 16 16:17:29 2016 (r301968) @@ -109,8 +109,16 @@ MLINKS += libusb.3 libusb_get_string_des MLINKS += libusb.3 libusb_get_string_descriptor_ascii.3 MLINKS += libusb.3 libusb_parse_ss_endpoint_comp.3 MLINKS += libusb.3 libusb_free_ss_endpoint_comp.3 +MLINKS += libusb.3 libusb_get_ss_endpoint_companion_descriptor.3 +MLINKS += libusb.3 libusb_free_ss_endpoint_companion_descriptor.3 MLINKS += libusb.3 libusb_parse_bos_descriptor.3 MLINKS += libusb.3 libusb_free_bos_descriptor.3 +MLINKS += libusb.3 libusb_get_usb_2_0_extension_descriptor.3 +MLINKS += libusb.3 libusb_free_usb_2_0_extension_descriptor.3 +MLINKS += libusb.3 libusb_get_ss_usb_device_capability_descriptor.3 +MLINKS += libusb.3 libusb_free_ss_usb_device_capability_descriptor.3 +MLINKS += libusb.3 libusb_get_container_id_descriptor.3 +MLINKS += libusb.3 libusb_free_container_id_descriptor.3 MLINKS += libusb.3 libusb_alloc_transfer.3 MLINKS += libusb.3 libusb_free_transfer.3 MLINKS += libusb.3 libusb_submit_transfer.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Thu Jun 16 15:25:37 2016 (r301967) +++ head/lib/libusb/libusb.3 Thu Jun 16 16:17:29 2016 (r301968) @@ -376,7 +376,31 @@ freed using the libusb_free_ss_endpoint_ .Pp .Ft void .Fn libusb_free_ss_endpoint_comp "libusb_ss_endpoint_companion_descriptor *ep_comp" -This function is NULL safe and frees a parsed USB 3.0 endpoint companion descriptor. +This function is NULL safe and frees a parsed USB 3.0 endpoint companion descriptor given by +.Fa ep_comp . +.Pp +.Ft int +.Fn libusb_get_ss_endpoint_companion_descriptor "struct libusb_context *ctx" "const struct libusb_endpoint_descriptor *endpoint" "struct libusb_ss_endpoint_companion_descriptor **ep_comp" +This function finds and parses the USB 3.0 endpoint companion descriptor given by +.Fa endpoint . +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed USB 3.0 endpoint companion descriptor must be +freed using the libusb_free_ss_endpoint_companion_descriptor function. +.Pp +.Ft void +.Fn libusb_free_ss_endpoint_companion_descriptor "struct libusb_ss_endpoint_companion_descriptor *ep_comp" +This function is NULL safe and frees a parsed USB 3.0 endpoint companion descriptor given by +.Fa ep_comp . +.Pp +.Ft int +.Fn libusb_get_bos_descriptor "libusb_device_handle *handle" "struct libusb_bos_descriptor **bos" +This function queries the USB device given by +.Fa handle +and stores a pointer to a parsed BOS descriptor into +.Fa bos . +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed BOS descriptor must be +freed using the libusb_free_bos_descriptor function. .Pp .Ft int .Fn libusb_parse_bos_descriptor "const void *buf" "int len" "libusb_bos_descriptor **bos" @@ -392,7 +416,53 @@ libusb_free_bos_descriptor function. .Pp .Ft void .Fn libusb_free_bos_descriptor "libusb_bos_descriptor *bos" -This function is NULL safe and frees a parsed BOS descriptor. +This function is NULL safe and frees a parsed BOS descriptor given by +.Fa bos . +.Pp +.Ft int +.Fn libusb_get_usb_2_0_extension_descriptor "struct libusb_context *ctx" "struct libusb_bos_dev_capability_descriptor *dev_cap" "struct libusb_usb_2_0_extension_descriptor **usb_2_0_extension" +This function parses the USB 2.0 extension descriptor from the descriptor given by +.Fa dev_cap +and stores a pointer to the parsed descriptor into +.Fa usb_2_0_extension . +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed USB 2.0 extension descriptor must be freed using the +libusb_free_usb_2_0_extension_descriptor function. +.Pp +.Ft void +.Fn libusb_free_usb_2_0_extension_descriptor "struct libusb_usb_2_0_extension_descriptor *usb_2_0_extension" +This function is NULL safe and frees a parsed USB 2.0 extension descriptor given by +.Fa usb_2_0_extension . +.Pp +.Ft int +.Fn libusb_get_ss_usb_device_capability_descriptor "struct libusb_context *ctx" "struct libusb_bos_dev_capability_descriptor *dev_cap" "struct libusb_ss_usb_device_capability_descriptor **ss_usb_device_capability" +This function parses the SuperSpeed device capability descriptor from the descriptor given by +.Fa dev_cap +and stores a pointer to the parsed descriptor into +.Fa ss_usb_device_capability . +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed SuperSpeed device capability descriptor must be freed using the +libusb_free_ss_usb_device_capability_descriptor function. +.Pp +.Ft void +.Fn libusb_free_ss_usb_device_capability_descriptor "struct libusb_ss_usb_device_capability_descriptor *ss_usb_device_capability" +This function is NULL safe and frees a parsed SuperSpeed device capability descriptor given by +.Fa ss_usb_device_capability . +.Pp +.Ft int +.Fn libusb_get_container_id_descriptor "struct libusb_context *ctx" "struct libusb_bos_dev_capability_descriptor *dev_cap" "struct libusb_container_id_descriptor **container_id" +This function parses the container ID descriptor from the descriptor given by +.Fa dev_cap +and stores a pointer to the parsed descriptor into +.Fa container_id . +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed container ID descriptor must be freed using the +libusb_free_container_id_descriptor function. +.Pp +.Ft void +.Fn libusb_free_container_id_descriptor "struct libusb_container_id_descriptor *container_id" +This function is NULL safe and frees a parsed container ID descriptor given by +.Fa container_id . .Sh USB ASYNCHRONOUS I/O .Ft struct libusb_transfer * .Fn libusb_alloc_transfer "int iso_packets" Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Thu Jun 16 15:25:37 2016 (r301967) +++ head/lib/libusb/libusb.h Thu Jun 16 16:17:29 2016 (r301968) @@ -101,6 +101,10 @@ enum libusb_device_capability_type { #define LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE 7 #define LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE 10 +#define LIBUSB_BT_USB_2_0_EXTENSION_SIZE 7 +#define LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE 10 +#define LIBUSB_BT_CONTAINER_ID_SIZE 20 + #define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f #define LIBUSB_ENDPOINT_DIR_MASK 0x80 @@ -165,6 +169,13 @@ enum libusb_iso_usage_type { LIBUSB_ISO_USAGE_TYPE_IMPLICIT = 2, }; +enum libusb_bos_type { + LIBUSB_BT_WIRELESS_USB_DEVICE_CAPABILITY = 1, + LIBUSB_BT_USB_2_0_EXTENSION = 2, + LIBUSB_BT_SS_USB_DEVICE_CAPABILITY = 3, + LIBUSB_BT_CONTAINER_ID = 4, +}; + enum libusb_error { LIBUSB_SUCCESS = 0, LIBUSB_ERROR_IO = -1, @@ -349,6 +360,13 @@ typedef struct libusb_ss_usb_device_capa uint16_t wU2DevExitLat; } libusb_ss_usb_device_capability_descriptor __aligned(sizeof(void *)); +typedef struct libusb_bos_dev_capability_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint8_t dev_capability_data[0]; +} libusb_bos_dev_capability_descriptor __aligned(sizeof(void *)); + typedef struct libusb_bos_descriptor { uint8_t bLength; uint8_t bDescriptorType; @@ -358,6 +376,21 @@ typedef struct libusb_bos_descriptor { struct libusb_ss_usb_device_capability_descriptor *ss_usb_cap; } libusb_bos_descriptor __aligned(sizeof(void *)); +typedef struct libusb_usb_2_0_extension_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint32_t bmAttributes; +} libusb_usb_2_0_extension_descriptor __aligned(sizeof(void *)); + +typedef struct libusb_container_id_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint8_t bReserved; + uint8_t ContainerID[16]; +} libusb_container_id_descriptor __aligned(sizeof(void *)); + typedef struct libusb_control_setup { uint8_t bmRequestType; uint8_t bRequest; @@ -442,6 +475,8 @@ int libusb_get_active_config_descriptor( int libusb_get_config_descriptor(libusb_device * dev, uint8_t config_index, struct libusb_config_descriptor **config); int libusb_get_config_descriptor_by_value(libusb_device * dev, uint8_t bConfigurationValue, struct libusb_config_descriptor **config); void libusb_free_config_descriptor(struct libusb_config_descriptor *config); +int libusb_get_ss_endpoint_companion_descriptor(struct libusb_context *ctx, const struct libusb_endpoint_descriptor *endpoint, struct libusb_ss_endpoint_companion_descriptor **ep_comp); +void libusb_free_ss_endpoint_companion_descriptor(struct libusb_ss_endpoint_companion_descriptor *ep_comp); int libusb_get_string_descriptor(libusb_device_handle * devh, uint8_t desc_index, uint16_t langid, unsigned char *data, int length); int libusb_get_string_descriptor_ascii(libusb_device_handle * devh, uint8_t desc_index, uint8_t *data, int length); int libusb_get_descriptor(libusb_device_handle * devh, uint8_t desc_type, uint8_t desc_index, uint8_t *data, int length); @@ -449,6 +484,13 @@ int libusb_parse_ss_endpoint_comp(const void libusb_free_ss_endpoint_comp(struct libusb_ss_endpoint_companion_descriptor *ep_comp); int libusb_parse_bos_descriptor(const void *buf, int len, struct libusb_bos_descriptor **bos); void libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos); +int libusb_get_bos_descriptor(libusb_device_handle *handle, struct libusb_bos_descriptor **bos); +int libusb_get_usb_2_0_extension_descriptor(struct libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_usb_2_0_extension_descriptor **usb_2_0_extension); +void libusb_free_usb_2_0_extension_descriptor(struct libusb_usb_2_0_extension_descriptor *usb_2_0_extension); +int libusb_get_ss_usb_device_capability_descriptor(struct libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_ss_usb_device_capability_descriptor **ss_usb_device_capability); +void libusb_free_ss_usb_device_capability_descriptor(struct libusb_ss_usb_device_capability_descriptor *ss_usb_device_capability); +int libusb_get_container_id_descriptor(struct libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_container_id_descriptor **container_id); +void libusb_free_container_id_descriptor(struct libusb_container_id_descriptor *container_id); /* Asynchronous device I/O */ Modified: head/lib/libusb/libusb10_desc.c ============================================================================== --- head/lib/libusb/libusb10_desc.c Thu Jun 16 15:25:37 2016 (r301967) +++ head/lib/libusb/libusb10_desc.c Thu Jun 16 16:17:29 2016 (r301968) @@ -410,6 +410,23 @@ libusb_free_ss_endpoint_comp(struct libu } int +libusb_get_ss_endpoint_companion_descriptor(struct libusb_context *ctx, + const struct libusb_endpoint_descriptor *endpoint, + struct libusb_ss_endpoint_companion_descriptor **ep_comp) +{ + if (endpoint == NULL) + return (LIBUSB_ERROR_INVALID_PARAM); + return (libusb_parse_ss_endpoint_comp(endpoint->extra, endpoint->extra_length, ep_comp)); +} + +void +libusb_free_ss_endpoint_companion_descriptor(struct libusb_ss_endpoint_companion_descriptor *ep_comp) +{ + + libusb_free_ss_endpoint_comp(ep_comp); +} + +int libusb_parse_bos_descriptor(const void *buf, int len, struct libusb_bos_descriptor **bos) { @@ -520,3 +537,154 @@ libusb_free_bos_descriptor(struct libusb free(bos); } + +int +libusb_get_bos_descriptor(libusb_device_handle *handle, + struct libusb_bos_descriptor **bos) +{ + uint8_t bos_header[LIBUSB_DT_BOS_SIZE] = {0}; + uint16_t wTotalLength; + uint8_t *bos_data; + int err; + + err = libusb_get_descriptor(handle, LIBUSB_DT_BOS, 0, + bos_header, sizeof(bos_header)); + if (err < 0) + return (err); + + wTotalLength = bos_header[2] | (bos_header[3] << 8); + if (wTotalLength < LIBUSB_DT_BOS_SIZE) + return (LIBUSB_ERROR_INVALID_PARAM); + + bos_data = calloc(wTotalLength, 1); + if (bos_data == NULL) + return (LIBUSB_ERROR_NO_MEM); + + err = libusb_get_descriptor(handle, LIBUSB_DT_BOS, 0, + bos_data, wTotalLength); + if (err < 0) + goto done; + + /* avoid descriptor length mismatches */ + bos_data[2] = (wTotalLength & 0xFF); + bos_data[3] = (wTotalLength >> 8); + + err = libusb_parse_bos_descriptor(bos_data, wTotalLength, bos); +done: + free(bos_data); + return (err); +} + +int +libusb_get_usb_2_0_extension_descriptor(struct libusb_context *ctx, + struct libusb_bos_dev_capability_descriptor *dev_cap, + struct libusb_usb_2_0_extension_descriptor **usb_2_0_extension) +{ + struct libusb_usb_2_0_extension_descriptor *desc; + + if (dev_cap == NULL || usb_2_0_extension == NULL || + dev_cap->bDevCapabilityType != LIBUSB_BT_USB_2_0_EXTENSION) + return (LIBUSB_ERROR_INVALID_PARAM); + if (dev_cap->bLength < LIBUSB_BT_USB_2_0_EXTENSION_SIZE) + return (LIBUSB_ERROR_IO); + + desc = malloc(sizeof(*desc)); + if (desc == NULL) + return (LIBUSB_ERROR_NO_MEM); + + desc->bLength = LIBUSB_BT_USB_2_0_EXTENSION_SIZE; + desc->bDescriptorType = dev_cap->bDescriptorType; + desc->bDevCapabilityType = dev_cap->bDevCapabilityType; + desc->bmAttributes = + (dev_cap->dev_capability_data[0]) | + (dev_cap->dev_capability_data[1] << 8) | + (dev_cap->dev_capability_data[2] << 16) | + (dev_cap->dev_capability_data[3] << 24); + + *usb_2_0_extension = desc; + return (0); +} + +void +libusb_free_usb_2_0_extension_descriptor( + struct libusb_usb_2_0_extension_descriptor *usb_2_0_extension) +{ + + free(usb_2_0_extension); +} + +int +libusb_get_ss_usb_device_capability_descriptor(struct libusb_context *ctx, + struct libusb_bos_dev_capability_descriptor *dev_cap, + struct libusb_ss_usb_device_capability_descriptor **ss_usb_device_capability) +{ + struct libusb_ss_usb_device_capability_descriptor *desc; + + if (dev_cap == NULL || ss_usb_device_capability == NULL || + dev_cap->bDevCapabilityType != LIBUSB_BT_SS_USB_DEVICE_CAPABILITY) + return (LIBUSB_ERROR_INVALID_PARAM); + if (dev_cap->bLength < LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE) + return (LIBUSB_ERROR_IO); + + desc = malloc(sizeof(*desc)); + if (desc == NULL) + return (LIBUSB_ERROR_NO_MEM); + + desc->bLength = LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE; + desc->bDescriptorType = dev_cap->bDescriptorType; + desc->bDevCapabilityType = dev_cap->bDevCapabilityType; + desc->bmAttributes = dev_cap->dev_capability_data[0]; + desc->wSpeedSupported = dev_cap->dev_capability_data[1] | + (dev_cap->dev_capability_data[2] << 8); + desc->bFunctionalitySupport = dev_cap->dev_capability_data[3]; + desc->bU1DevExitLat = dev_cap->dev_capability_data[4]; + desc->wU2DevExitLat = dev_cap->dev_capability_data[5] | + (dev_cap->dev_capability_data[6] << 8); + + *ss_usb_device_capability = desc; + return (0); +} + +void +libusb_free_ss_usb_device_capability_descriptor( + struct libusb_ss_usb_device_capability_descriptor *ss_usb_device_capability) +{ + + free(ss_usb_device_capability); +} + +int +libusb_get_container_id_descriptor(struct libusb_context *ctx, + struct libusb_bos_dev_capability_descriptor *dev_cap, + struct libusb_container_id_descriptor **container_id) +{ + struct libusb_container_id_descriptor *desc; + + if (dev_cap == NULL || container_id == NULL || + dev_cap->bDevCapabilityType != LIBUSB_BT_CONTAINER_ID) + return (LIBUSB_ERROR_INVALID_PARAM); + if (dev_cap->bLength < LIBUSB_BT_CONTAINER_ID_SIZE) + return (LIBUSB_ERROR_IO); + + desc = malloc(sizeof(*desc)); + if (desc == NULL) + return (LIBUSB_ERROR_NO_MEM); + + desc->bLength = LIBUSB_BT_CONTAINER_ID_SIZE; + desc->bDescriptorType = dev_cap->bDescriptorType; + desc->bDevCapabilityType = dev_cap->bDevCapabilityType; + desc->bReserved = dev_cap->dev_capability_data[0]; + memcpy(desc->ContainerID, dev_cap->dev_capability_data + 1, + sizeof(desc->ContainerID)); + + *container_id = desc; + return (0); +} + +void +libusb_free_container_id_descriptor( + struct libusb_container_id_descriptor *container_id) +{ + + free(container_id); +} From owner-svn-src-head@freebsd.org Thu Jun 16 16:26:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ED31A4771F; Thu, 16 Jun 2016 16:26: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 E28F71D4F; Thu, 16 Jun 2016 16:26: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 u5GGQHNp044170; Thu, 16 Jun 2016 16:26:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GGQHwW044169; Thu, 16 Jun 2016 16:26:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201606161626.u5GGQHwW044169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 Jun 2016 16:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301969 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 16:26:18 -0000 Author: hselasky Date: Thu Jun 16 16:26:16 2016 New Revision: 301969 URL: https://svnweb.freebsd.org/changeset/base/301969 Log: Add missing return statement. Approved by: re (gjb) MFC after: 1 week Modified: head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Thu Jun 16 16:17:29 2016 (r301968) +++ head/lib/libusb/libusb10.c Thu Jun 16 16:26:16 2016 (r301969) @@ -890,6 +890,7 @@ int libusb_set_auto_detach_kernel_driver(libusb_device_handle *dev, int enable) { dev->auto_detach = (enable ? 1 : 0); + return (0); } /* Asynchronous device I/O */ From owner-svn-src-head@freebsd.org Thu Jun 16 17:40:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2B6CA76DE2; Thu, 16 Jun 2016 17:40:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) (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 C7618195E; Thu, 16 Jun 2016 17:40:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f173.google.com with SMTP id f30so48605831ioj.2; Thu, 16 Jun 2016 10:40:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=WRb8/wLjfSKBM6KmB2+pzPxcVkcL29LbKAhTrC2tO5Q=; b=m1Na3i/KR+rI9AmGK53rusaGK9eF/uEKG9TqVgUl1qnpznQp46AavjXpxzygQxMmPD pQCn7iNtln5PhR9xFVJ4O2LS1lc4FUq41/fiOTbv1PfGFK3FhQ+lhElWR8BUiJ8iFd/k vQy6ZhFzyd1eZ8S/1Bfse1cOXLMuaJkLM+lm44dDT4A8rrtvbZXmDR6zsjg+ZcN6U/3Z nVS/VXXSiCzy4NY+mnPu5iKHv+A2jZ8/Miwdk7Z4ZInz0G+JZgbdmFyFJcOqpOawvzw2 3clIMoUi4mCjNtO9LsVpgN5QplS8dXb64ssyDQ0OzzYA4VSNZZs7SUCTYFnzSx5uwKp4 rbEg== X-Gm-Message-State: ALyK8tI9ilgSmcl9aiNM0AIPazDleu9u9ks2m1/9pPM8anmE/inadDHgV6lsThyJ+5DqPg== X-Received: by 10.107.180.68 with SMTP id d65mr5138195iof.151.1466097440059; Thu, 16 Jun 2016 10:17:20 -0700 (PDT) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com. [209.85.223.169]) by smtp.gmail.com with ESMTPSA id q184sm2586568itc.17.2016.06.16.10.17.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jun 2016 10:17:19 -0700 (PDT) Received: by mail-io0-f169.google.com with SMTP id 5so56420391ioy.1; Thu, 16 Jun 2016 10:17:19 -0700 (PDT) X-Received: by 10.107.46.158 with SMTP id u30mr9536067iou.162.1466097439420; Thu, 16 Jun 2016 10:17:19 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.205.70 with HTTP; Thu, 16 Jun 2016 10:17:19 -0700 (PDT) In-Reply-To: <201606161158.u5GBwkd1042632@repo.freebsd.org> References: <201606161158.u5GBwkd1042632@repo.freebsd.org> From: Conrad Meyer Date: Thu, 16 Jun 2016 10:17:19 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r301959 - head/sys/kern To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 17:40:57 -0000 On Thu, Jun 16, 2016 at 4:58 AM, Konstantin Belousov wrote: > --- head/sys/kern/kern_thread.c Thu Jun 16 11:55:24 2016 (r301958) > +++ head/sys/kern/kern_thread.c Thu Jun 16 11:58:46 2016 (r301959) > @@ -669,11 +669,6 @@ weed_inhib(int mode, struct thread *td2, > wakeup_swapper |= sleepq_abort(td2, EINTR); > break; > case SINGLE_BOUNDARY: > - if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) > - wakeup_swapper |= thread_unsuspend_one(td2, p, false); > - if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) > - wakeup_swapper |= sleepq_abort(td2, ERESTART); > - break; style(9) nit: /* FALLTHROUGH */ Best, Conrad > case SINGLE_NO_EXIT: > if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) > wakeup_swapper |= thread_unsuspend_one(td2, p, false); > From owner-svn-src-head@freebsd.org Thu Jun 16 17:43:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42087A76FAD; Thu, 16 Jun 2016 17:43:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x22a.google.com (mail-pf0-x22a.google.com [IPv6:2607:f8b0:400e:c00::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 133ED1E2C; Thu, 16 Jun 2016 17:43:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x22a.google.com with SMTP id c2so22057426pfa.2; Thu, 16 Jun 2016 10:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hhWWEch+djOLxYhC5o11VGZndJ2xBCjEKOOG6pWBYOM=; b=c3y1kYwVEe5n9/1RqdP6hY2uz1+irGRzWjBHAa8DaseMsUWw8YJlrhNrp0hdWycLlf CjQ2y5/jAbaH8fGosPinjjcY6C3hlOqHAQZtkiPwRhcB1agYCUmJWp/Iy0gfqAHcfQIU Ef/sB4LnEl9lhEE1Pdh29/aZWe9ujO1Z+fPyXo3ZX+i9feahLnm2gUOxx8D5u+VaEmDc 2DA9RINAvVPZ0PM9LeS9wEBbWLPAQmdwZpe/AFpwMp1XkSYg0ey4/1HiCMLge0rkXG0d dGHo04gxvJtvrQHgZgXuidAKwKq385FNPs2twWfL7rCESMmxfDaWJ32mFlhftIXnYDNM qEjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hhWWEch+djOLxYhC5o11VGZndJ2xBCjEKOOG6pWBYOM=; b=bGgMwkpneQOi+n0LgIHmJS/2DbTjFxbvpckhLOwyELRFCUEfLXoHulE/InVEjdfWDH tVvNAi/ETNtmVO2ZRa7ZbkPYGV250iN+qMKepO0fV52vLz3vcFMXqp/q4LchoGo1qWk6 //f/2zD8JJ1NymsmH4LcXaFJ84/8Hfnb+O8kqeqvYkWmopsWWCpJ6SUrXlg051hAG6tA 2UHD9dycaI1gkbyqBQSa04P5wPBrpuwj+ZeVsdRvFXP6DRKSGxqdqirdIhnrh3zUInT0 8yyLPz4o7UQiKlTh0NjyR49gGjyUMk2NwZH4C0FGMZwvb77CMqV/Y5Ol/fJ0IyyrPCZs U53Q== X-Gm-Message-State: ALyK8tKjYP13EYEgA64o6IeyZXrl9qoizTLnJrCjvYUVM3oFQb1EQcMTiToHjmpAVW1ugg== X-Received: by 10.98.74.92 with SMTP id x89mr6549377pfa.79.1466099035228; Thu, 16 Jun 2016 10:43:55 -0700 (PDT) Received: from [29.120.49.71] ([172.58.40.150]) by smtp.gmail.com with ESMTPSA id h77sm30008469pfj.86.2016.06.16.10.43.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2016 10:43:54 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r301959 - head/sys/kern From: Ngie Cooper X-Mailer: iPhone Mail (13F69) In-Reply-To: Date: Thu, 16 Jun 2016 10:43:53 -0700 Cc: Konstantin Belousov , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201606161158.u5GBwkd1042632@repo.freebsd.org> To: cem@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 17:43:56 -0000 > On Jun 16, 2016, at 10:17, Conrad Meyer wrote: >=20 >> On Thu, Jun 16, 2016 at 4:58 AM, Konstantin Belousov wr= ote: >> --- head/sys/kern/kern_thread.c Thu Jun 16 11:55:24 2016 (r301958)= >> +++ head/sys/kern/kern_thread.c Thu Jun 16 11:58:46 2016 (r301959)= >> @@ -669,11 +669,6 @@ weed_inhib(int mode, struct thread *td2, >> wakeup_swapper |=3D sleepq_abort(td2, EINTR); >> break; >> case SINGLE_BOUNDARY: >> - if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY= ) =3D=3D 0) >> - wakeup_swapper |=3D thread_unsuspend_one(td2, p, f= alse); >> - if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) !=3D= 0) >> - wakeup_swapper |=3D sleepq_abort(td2, ERESTART); >> - break; >=20 > style(9) nit: /* FALLTHROUGH */ >=20 Also, coverity will complain about the missing break unless that's there... > Best, > Conrad >=20 >> case SINGLE_NO_EXIT: >> if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY)= =3D=3D 0) >> wakeup_swapper |=3D thread_unsuspend_one(td2, p, f= alse); >=20 From owner-svn-src-head@freebsd.org Thu Jun 16 17:59:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0785A77251; Thu, 16 Jun 2016 17:59:16 +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 71F2B1886; Thu, 16 Jun 2016 17:59:16 +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 u5GHxFMu077215; Thu, 16 Jun 2016 17:59:15 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GHxFaX077214; Thu, 16 Jun 2016 17:59:15 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201606161759.u5GHxFaX077214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 16 Jun 2016 17:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301970 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 17:59:16 -0000 Author: adrian Date: Thu Jun 16 17:59:15 2016 New Revision: 301970 URL: https://svnweb.freebsd.org/changeset/base/301970 Log: [iwm] free RX ring / NVM memory after they're used. * Free RX ring during detach * Free NVM memory after parsing Tested: * 7260, STA mode Submitted by: Imre Vadasz Approved by: re (gjb) Obtained from: dragonflybsd Differential Revision: https://reviews.freebsd.org/D6817 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Thu Jun 16 16:26:16 2016 (r301969) +++ head/sys/dev/iwm/if_iwm.c Thu Jun 16 17:59:15 2016 (r301970) @@ -1823,7 +1823,7 @@ iwm_parse_nvm_data(struct iwm_softc *sc, struct iwm_nvm_section { uint16_t length; - const uint8_t *data; + uint8_t *data; }; static int @@ -1860,6 +1860,8 @@ iwm_nvm_init(struct iwm_softc *sc) "%s: Read NVM\n", __func__); + memset(nvm_sections, 0, sizeof(nvm_sections)); + /* TODO: find correct NVM max size for a section */ nvm_buffer = malloc(IWM_OTP_LOW_IMAGE_SIZE, M_DEVBUF, M_NOWAIT); if (nvm_buffer == NULL) @@ -1883,10 +1885,15 @@ iwm_nvm_init(struct iwm_softc *sc) nvm_sections[section].length = len; } free(nvm_buffer, M_DEVBUF); - if (error) - return error; + if (error == 0) + error = iwm_parse_nvm_sections(sc, nvm_sections); - return iwm_parse_nvm_sections(sc, nvm_sections); + for (i = 0; i < IWM_NVM_NUM_OF_SECTIONS; i++) { + if (nvm_sections[i].data != NULL) + free(nvm_sections[i].data, M_DEVBUF); + } + + return error; } /* @@ -5008,6 +5015,7 @@ iwm_detach_local(struct iwm_softc *sc, i ieee80211_ifdetach(&sc->sc_ic); /* Free descriptor rings */ + iwm_free_rx_ring(sc, &sc->rxq); for (i = 0; i < nitems(sc->txq); i++) iwm_free_tx_ring(sc, &sc->txq[i]); From owner-svn-src-head@freebsd.org Thu Jun 16 18:15:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ACB8A776CD for ; Thu, 16 Jun 2016 18:15:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A4B822B0 for ; Thu, 16 Jun 2016 18:15:11 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 4dc9bd32-33ee-11e6-8929-8ded99d5e9d7 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Thu, 16 Jun 2016 18:15:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u5GIF3vH005643; Thu, 16 Jun 2016 12:15:03 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1466100903.51702.5.camel@freebsd.org> Subject: Re: svn commit: r301959 - head/sys/kern From: Ian Lepore To: Ngie Cooper , cem@freebsd.org Cc: Konstantin Belousov , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 16 Jun 2016 12:15:03 -0600 In-Reply-To: References: <201606161158.u5GBwkd1042632@repo.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 18:15:11 -0000 On Thu, 2016-06-16 at 10:43 -0700, Ngie Cooper wrote: > > On Jun 16, 2016, at 10:17, Conrad Meyer wrote: > > > > > On Thu, Jun 16, 2016 at 4:58 AM, Konstantin Belousov < > > > kib@freebsd.org> wrote: > > > --- head/sys/kern/kern_thread.c Thu Jun 16 11:55:24 2016 > > > (r301958) > > > +++ head/sys/kern/kern_thread.c Thu Jun 16 11:58:46 2016 > > > (r301959) > > > @@ -669,11 +669,6 @@ weed_inhib(int mode, struct thread *td2, > > > wakeup_swapper |= sleepq_abort(td2, > > > EINTR); > > > break; > > > case SINGLE_BOUNDARY: > > > - if (TD_IS_SUSPENDED(td2) && (td2->td_flags & > > > TDF_BOUNDARY) == 0) > > > - wakeup_swapper |= > > > thread_unsuspend_one(td2, p, false); > > > - if (TD_ON_SLEEPQ(td2) && (td2->td_flags & > > > TDF_SINTR) != 0) > > > - wakeup_swapper |= sleepq_abort(td2, > > > ERESTART); > > > - break; > > > > style(9) nit: /* FALLTHROUGH */ > > > Also, coverity will complain about the missing break unless that's > there... > If coverity complains about case 1: case 2: statements; break; then it is coverity that needs to be fixed. -- Ian > > Best, > > Conrad > > > > > case SINGLE_NO_EXIT: > > > if (TD_IS_SUSPENDED(td2) && (td2->td_flags & > > > TDF_BOUNDARY) == 0) > > > wakeup_swapper |= > > > thread_unsuspend_one(td2, p, false); > > > > From owner-svn-src-head@freebsd.org Thu Jun 16 19:57:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE695A77CF2; Thu, 16 Jun 2016 19:57:25 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA4F317B3; Thu, 16 Jun 2016 19:57:25 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5GJvPgR021920; Thu, 16 Jun 2016 19:57:25 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GJvOaZ021916; Thu, 16 Jun 2016 19:57:24 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201606161957.u5GJvOaZ021916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Thu, 16 Jun 2016 19:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301971 - in head/sys/dev/bhnd: . cores/chipc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 19:57:26 -0000 Author: landonf Date: Thu Jun 16 19:57:24 2016 New Revision: 301971 URL: https://svnweb.freebsd.org/changeset/base/301971 Log: bhnd(4): Fix resource allocation issues exposed by chipc PMU support. - Delete all chipc children on attachment failure. - Added missing bhnd_nexus bhnd_bus_deactivate_resource implementation. - Drop a CHIPC_UNLOCK() accidentally left behind after lifting synchronization into the chipc region refcounting API. - Fix re-allocation of chipc resources. Previously, the resource ID was reset to -1 on release, preventing later re-allocation. Approved by: re (gjb), adrian (mentor) Differential Revision: https://reviews.freebsd.org/D6849 Modified: head/sys/dev/bhnd/bhnd_nexus.c head/sys/dev/bhnd/cores/chipc/chipc.c head/sys/dev/bhnd/cores/chipc/chipc_private.h head/sys/dev/bhnd/cores/chipc/chipc_subr.c Modified: head/sys/dev/bhnd/bhnd_nexus.c ============================================================================== --- head/sys/dev/bhnd/bhnd_nexus.c Thu Jun 16 17:59:15 2016 (r301970) +++ head/sys/dev/bhnd/bhnd_nexus.c Thu Jun 16 19:57:24 2016 (r301971) @@ -106,10 +106,26 @@ bhnd_nexus_activate_resource(device_t de return (0); } +static int +bhnd_nexus_deactivate_resource(device_t dev, device_t child, + int type, int rid, struct bhnd_resource *r) +{ + int error; + + /* Always direct */ + KASSERT(r->direct, ("indirect resource delegated to bhnd_nexus\n")); + + if ((error = bus_deactivate_resource(child, type, rid, r->res))) + return (error); + + r->direct = false; + return (0); +} static device_method_t bhnd_nexus_methods[] = { /* bhnd interface */ DEVMETHOD(bhnd_bus_activate_resource, bhnd_nexus_activate_resource), + DEVMETHOD(bhnd_bus_deactivate_resource, bhnd_nexus_deactivate_resource), DEVMETHOD(bhnd_bus_is_hw_disabled, bhnd_nexus_is_hw_disabled), DEVMETHOD(bhnd_bus_get_attach_type, bhnd_nexus_get_attach_type), Modified: head/sys/dev/bhnd/cores/chipc/chipc.c ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipc.c Thu Jun 16 17:59:15 2016 (r301970) +++ head/sys/dev/bhnd/cores/chipc/chipc.c Thu Jun 16 19:57:24 2016 (r301971) @@ -282,6 +282,8 @@ chipc_attach(device_t dev) return (0); failed: + device_delete_children(sc->dev); + if (sc->core_region != NULL) { chipc_release_region(sc, sc->core_region, RF_ALLOCATED|RF_ACTIVE); @@ -878,10 +880,8 @@ chipc_alloc_resource(device_t dev, devic } /* Try to retain a region reference */ - if ((error = chipc_retain_region(sc, cr, RF_ALLOCATED))) { - CHIPC_UNLOCK(sc); + if ((error = chipc_retain_region(sc, cr, RF_ALLOCATED))) return (NULL); - } /* Make our rman reservation */ rv = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, Modified: head/sys/dev/bhnd/cores/chipc/chipc_private.h ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipc_private.h Thu Jun 16 17:59:15 2016 (r301970) +++ head/sys/dev/bhnd/cores/chipc/chipc_private.h Thu Jun 16 19:57:24 2016 (r301971) @@ -84,11 +84,13 @@ struct chipc_region { bhnd_addr_t cr_addr; /**< region base address */ bhnd_addr_t cr_end; /**< region end address */ bhnd_size_t cr_count; /**< region count */ - int cr_rid; /**< rid, or -1 if no rid - * is allocated by the bus for - * this region */ + int cr_rid; /**< rid to use when performing + resource allocation, or -1 + if region has no assigned + resource ID */ struct bhnd_resource *cr_res; /**< bus resource, or NULL */ + int cr_res_rid; /**< cr_res RID, if any. */ u_int cr_refs; /**< RF_ALLOCATED refcount */ u_int cr_act_refs; /**< RF_ACTIVE refcount */ Modified: head/sys/dev/bhnd/cores/chipc/chipc_subr.c ============================================================================== --- head/sys/dev/bhnd/cores/chipc/chipc_subr.c Thu Jun 16 17:59:15 2016 (r301970) +++ head/sys/dev/bhnd/cores/chipc/chipc_subr.c Thu Jun 16 19:57:24 2016 (r301971) @@ -150,9 +150,10 @@ chipc_alloc_region(struct chipc_softc *s cr->cr_end = cr->cr_addr + cr->cr_count - 1; - /* Note that not all regions have an assigned rid, in which case - * this will return -1 */ + /* Fetch default resource ID for this region. Not all regions have an + * assigned rid, in which case this will return -1 */ cr->cr_rid = bhnd_get_port_rid(sc->dev, type, port, region); + return (cr); failed: @@ -177,7 +178,7 @@ chipc_free_region(struct chipc_softc *sc cr->cr_region_num, cr->cr_refs)); if (cr->cr_res != NULL) { - bhnd_release_resource(sc->dev, SYS_RES_MEMORY, cr->cr_rid, + bhnd_release_resource(sc->dev, SYS_RES_MEMORY, cr->cr_res_rid, cr->cr_res); } @@ -264,10 +265,16 @@ chipc_retain_region(struct chipc_softc * KASSERT(cr->cr_res == NULL, ("non-NULL resource has refcount")); + /* Fetch initial resource ID */ + if ((cr->cr_res_rid = cr->cr_rid) == -1) { + CHIPC_UNLOCK(sc); + return (EINVAL); + } + + /* Allocate resource */ cr->cr_res = bhnd_alloc_resource(sc->dev, - SYS_RES_MEMORY, &cr->cr_rid, cr->cr_addr, + SYS_RES_MEMORY, &cr->cr_res_rid, cr->cr_addr, cr->cr_end, cr->cr_count, 0); - if (cr->cr_res == NULL) { CHIPC_UNLOCK(sc); return (ENXIO); @@ -287,7 +294,7 @@ chipc_retain_region(struct chipc_softc * /* If this is the first reference, activate the resource */ if (cr->cr_act_refs == 0) { error = bhnd_activate_resource(sc->dev, SYS_RES_MEMORY, - cr->cr_rid, cr->cr_res); + cr->cr_res_rid, cr->cr_res); if (error) { /* Drop any allocation reference acquired * above */ @@ -324,6 +331,8 @@ chipc_release_region(struct chipc_softc CHIPC_LOCK(sc); error = 0; + KASSERT(cr->cr_res != NULL, ("release on NULL region resource")); + if (flags & RF_ACTIVE) { KASSERT(cr->cr_act_refs > 0, ("RF_ACTIVE over-released")); KASSERT(cr->cr_act_refs <= cr->cr_refs, @@ -332,7 +341,7 @@ chipc_release_region(struct chipc_softc /* If this is the last reference, deactivate the resource */ if (cr->cr_act_refs == 1) { error = bhnd_deactivate_resource(sc->dev, - SYS_RES_MEMORY, cr->cr_rid, cr->cr_res); + SYS_RES_MEMORY, cr->cr_res_rid, cr->cr_res); if (error) goto done; } @@ -343,16 +352,14 @@ chipc_release_region(struct chipc_softc if (flags & RF_ALLOCATED) { KASSERT(cr->cr_refs > 0, ("overrelease of refs")); - /* If this is the last reference, release the resource */ if (cr->cr_refs == 1) { - error = bhnd_release_resource(sc->dev, - SYS_RES_MEMORY, cr->cr_rid, cr->cr_res); + error = bhnd_release_resource(sc->dev, SYS_RES_MEMORY, + cr->cr_res_rid, cr->cr_res); if (error) goto done; cr->cr_res = NULL; - cr->cr_rid = -1; } /* Drop our allocation refcount */ From owner-svn-src-head@freebsd.org Thu Jun 16 20:04:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B033A77E27; Thu, 16 Jun 2016 20:04:35 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDF471C1D; Thu, 16 Jun 2016 20:04:34 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5GK4Y50025639; Thu, 16 Jun 2016 20:04:34 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GK4XuR025634; Thu, 16 Jun 2016 20:04:33 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201606162004.u5GK4XuR025634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Thu, 16 Jun 2016 20:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301972 - head/sys/dev/bhnd/siba X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 20:04:35 -0000 Author: landonf Date: Thu Jun 16 20:04:33 2016 New Revision: 301972 URL: https://svnweb.freebsd.org/changeset/base/301972 Log: siba(4): Adopt bcma-compatible mapping of bhnd(4) port/region identifiers. Maps Sonics/OCP per-core address spaces to bcma(4)-compatible port/region identifiers. This permits the use of common address map identifiers in bhnd device drivers, independent of the underlying interconnect type. Approved by: re (gjb), adrian (mentor) Differential Revision: https://reviews.freebsd.org/D6850 Modified: head/sys/dev/bhnd/siba/siba.c head/sys/dev/bhnd/siba/siba_subr.c head/sys/dev/bhnd/siba/sibareg.h head/sys/dev/bhnd/siba/sibavar.h Modified: head/sys/dev/bhnd/siba/siba.c ============================================================================== --- head/sys/dev/bhnd/siba/siba.c Thu Jun 16 19:57:24 2016 (r301971) +++ head/sys/dev/bhnd/siba/siba.c Thu Jun 16 20:04:33 2016 (r301972) @@ -70,7 +70,6 @@ siba_attach(device_t dev) for (int i = 0; i < ndevs; i++) { struct siba_addrspace *addrspace; - struct siba_port *port; dinfo = device_get_ivars(devs[i]); @@ -79,14 +78,10 @@ siba_attach(device_t dev) "not be suspended before siba_attach()")); /* Fetch the core register address space */ - port = siba_dinfo_get_port(dinfo, BHND_PORT_DEVICE, 0); - if (port == NULL) { - error = ENXIO; - goto cleanup; - } - - addrspace = siba_find_port_addrspace(port, SIBA_ADDRSPACE_CORE); + addrspace = siba_find_addrspace(dinfo, BHND_PORT_DEVICE, 0, 0); if (addrspace == NULL) { + device_printf(dev, + "missing device registers for core %d\n", i); error = ENXIO; goto cleanup; } @@ -94,7 +89,7 @@ siba_attach(device_t dev) /* * Map the per-core configuration blocks */ - KASSERT(dinfo->core_id.num_cfg_blocks <= SIBA_CFG_NUM_MAX, + KASSERT(dinfo->core_id.num_cfg_blocks <= SIBA_MAX_CFG, ("config block count %u out of range", dinfo->core_id.num_cfg_blocks)); @@ -285,32 +280,25 @@ siba_get_port_count(device_t dev, device type)); dinfo = device_get_ivars(child); - - /* We advertise exactly one port of any type */ - if (siba_dinfo_get_port(dinfo, type, 0) != NULL) - return (1); - - return (0); + return (siba_addrspace_port_count(dinfo)); } static u_int siba_get_region_count(device_t dev, device_t child, bhnd_port_type type, - u_int port_num) + u_int port) { struct siba_devinfo *dinfo; - struct siba_port *port; /* delegate non-bus-attached devices to our parent */ if (device_get_parent(child) != dev) return (BHND_BUS_GET_REGION_COUNT(device_get_parent(dev), child, - type, port_num)); + type, port)); dinfo = device_get_ivars(child); - port = siba_dinfo_get_port(dinfo, type, port_num); - if (port == NULL) + if (!siba_is_port_valid(dinfo, type, port)) return (0); - return (port->sp_num_addrs); + return (siba_addrspace_region_count(dinfo, port)); } static int @@ -318,7 +306,6 @@ siba_get_port_rid(device_t dev, device_t u_int port_num, u_int region_num) { struct siba_devinfo *dinfo; - struct siba_port *port; struct siba_addrspace *addrspace; /* delegate non-bus-attached devices to our parent */ @@ -327,17 +314,11 @@ siba_get_port_rid(device_t dev, device_t port_type, port_num, region_num)); dinfo = device_get_ivars(child); - port = siba_dinfo_get_port(dinfo, port_type, port_num); - if (port == NULL) + addrspace = siba_find_addrspace(dinfo, port_type, port_num, region_num); + if (addrspace == NULL) return (-1); - STAILQ_FOREACH(addrspace, &port->sp_addrs, sa_link) { - if (addrspace->sa_region_num == region_num) - return (addrspace->sa_rid); - } - - /* not found */ - return (-1); + return (addrspace->sa_rid); } static int @@ -345,8 +326,6 @@ siba_decode_port_rid(device_t dev, devic bhnd_port_type *port_type, u_int *port_num, u_int *region_num) { struct siba_devinfo *dinfo; - struct siba_port *port; - struct siba_addrspace *addrspace; /* delegate non-bus-attached devices to our parent */ if (device_get_parent(child) != dev) @@ -359,29 +338,17 @@ siba_decode_port_rid(device_t dev, devic if (type != SYS_RES_MEMORY) return (EINVAL); - /* Starting with the most likely device list, search all three port - * lists */ - bhnd_port_type types[] = { - BHND_PORT_DEVICE, - BHND_PORT_AGENT, - BHND_PORT_BRIDGE - }; - - for (int i = 0; i < nitems(types); i++) { - port = siba_dinfo_get_port(dinfo, types[i], 0); - if (port == NULL) + for (int i = 0; i < dinfo->core_id.num_addrspace; i++) { + if (dinfo->addrspace[i].sa_rid != rid) continue; - - STAILQ_FOREACH(addrspace, &port->sp_addrs, sa_link) { - if (addrspace->sa_rid != rid) - continue; - - *port_type = port->sp_type; - *port_num = port->sp_num; - *region_num = addrspace->sa_region_num; - } + + *port_type = BHND_PORT_DEVICE; + *port_num = siba_addrspace_port(i); + *region_num = siba_addrspace_region(i); + return (0); } + /* Not found */ return (ENOENT); } @@ -390,7 +357,6 @@ siba_get_region_addr(device_t dev, devic u_int port_num, u_int region_num, bhnd_addr_t *addr, bhnd_size_t *size) { struct siba_devinfo *dinfo; - struct siba_port *port; struct siba_addrspace *addrspace; /* delegate non-bus-attached devices to our parent */ @@ -400,20 +366,13 @@ siba_get_region_addr(device_t dev, devic } dinfo = device_get_ivars(child); - port = siba_dinfo_get_port(dinfo, port_type, port_num); - if (port == NULL) + addrspace = siba_find_addrspace(dinfo, port_type, port_num, region_num); + if (addrspace == NULL) return (ENOENT); - STAILQ_FOREACH(addrspace, &port->sp_addrs, sa_link) { - if (addrspace->sa_region_num != region_num) - continue; - - *addr = addrspace->sa_base; - *size = addrspace->sa_size - addrspace->sa_bus_reserved; - return (0); - } - - return (ENOENT); + *addr = addrspace->sa_base; + *size = addrspace->sa_size - addrspace->sa_bus_reserved; + return (0); } @@ -432,26 +391,21 @@ siba_register_addrspaces(device_t dev, s struct siba_core_id *cid; uint32_t addr; uint32_t size; - u_int region_num; int error; cid = &di->core_id; - /* Region numbers must be assigned in order, but our siba address - * space IDs may be sparsely allocated; thus, we track - * the region index separately. */ - region_num = 0; /* Register the device address space entries */ - for (uint8_t sid = 0; sid < di->core_id.num_addrspace; sid++) { + for (uint8_t i = 0; i < di->core_id.num_addrspace; i++) { uint32_t adm; u_int adm_offset; uint32_t bus_reserved; /* Determine the register offset */ - adm_offset = siba_admatch_offset(sid); + adm_offset = siba_admatch_offset(i); if (adm_offset == 0) { - device_printf(dev, "addrspace %hhu is unsupported", sid); + device_printf(dev, "addrspace %hhu is unsupported", i); return (ENODEV); } @@ -469,17 +423,14 @@ siba_register_addrspaces(device_t dev, s * reserve the Sonics configuration register blocks for the * use of our bus. */ bus_reserved = 0; - if (sid == SIBA_ADDRSPACE_CORE) + if (i == SIBA_CORE_ADDRSPACE) bus_reserved = cid->num_cfg_blocks * SIBA_CFG_SIZE; /* Append the region info */ - error = siba_append_dinfo_region(di, BHND_PORT_DEVICE, 0, - region_num, sid, addr, size, bus_reserved); + error = siba_append_dinfo_region(di, i, addr, size, + bus_reserved); if (error) return (error); - - - region_num++; } return (0); Modified: head/sys/dev/bhnd/siba/siba_subr.c ============================================================================== --- head/sys/dev/bhnd/siba/siba_subr.c Thu Jun 16 19:57:24 2016 (r301971) +++ head/sys/dev/bhnd/siba/siba_subr.c Thu Jun 16 20:04:33 2016 (r301972) @@ -106,35 +106,6 @@ siba_parse_core_id(uint32_t idhigh, uint } /** - * Initialize new port descriptor. - * - * @param port_num Port number. - * @param port_type Port type. - */ -static void -siba_init_port(struct siba_port *port, bhnd_port_type port_type, u_int port_num) -{ - port->sp_num = port_num; - port->sp_type = port_type; - port->sp_num_addrs = 0; - STAILQ_INIT(&port->sp_addrs); -} - -/** - * Deallocate all resources associated with the given port descriptor. - * - * @param port Port descriptor to be deallocated. - */ -static void -siba_release_port(struct siba_port *port) { - struct siba_addrspace *as, *as_next; - - STAILQ_FOREACH_SAFE(as, &port->sp_addrs, sa_link, as_next) { - free(as, M_BHND); - } -} - -/** * Allocate and initialize new device info structure, copying the * provided core id. * @@ -157,76 +128,153 @@ siba_alloc_dinfo(device_t bus, const str dinfo->cfg_rid[i] = -1; } - siba_init_port(&dinfo->device_port, BHND_PORT_DEVICE, 0); resource_list_init(&dinfo->resources); return dinfo; } /** - * Return the @p dinfo port instance for @p type, or NULL. + * Map an addrspace index to its corresponding bhnd(4) port number. * - * @param dinfo The siba device info. - * @param type The requested port type. + * @param addrspace Address space index. + */ +u_int +siba_addrspace_port(u_int addrspace) +{ + /* The first addrspace is always mapped to device0; the remainder + * are mapped to device1 */ + if (addrspace == 0) + return (0); + else + return (1); +} + +/** + * Map an addrspace index to its corresponding bhnd(4) region number. * - * @retval siba_port If @p port_type and @p port_num are defined on @p dinfo. - * @retval NULL If the requested port is not defined on @p dinfo. + * @param addrspace Address space index. */ -struct siba_port * -siba_dinfo_get_port(struct siba_devinfo *dinfo, bhnd_port_type port_type, - u_int port_num) +u_int +siba_addrspace_region(u_int addrspace) { - /* We only define a single port for any given type. */ - if (port_num != 0) - return (NULL); + /* The first addrspace is always mapped to device0.0; the remainder + * are mapped to device1.0 + (n - 1) */ + if (addrspace == 0) + return (0); + else + return (addrspace - 1); +} - switch (port_type) { - case BHND_PORT_DEVICE: - return (&dinfo->device_port); - case BHND_PORT_BRIDGE: - return (NULL); - case BHND_PORT_AGENT: - return (NULL); - default: - printf("%s: unknown port_type (%d)\n", - __func__, - port_type); - return (NULL); - } +/** + * Return the number of bhnd(4) ports to advertise for the given + * @p dinfo. + * + * @param dinfo The device info to query. + */ +u_int +siba_addrspace_port_count(struct siba_devinfo *dinfo) +{ + /* 0, 1, or 2 ports */ + return min(dinfo->core_id.num_addrspace, 2); } +/** + * Return the number of bhnd(4) regions to advertise on @p port + * given the provided @p num_addrspace address space count. + * + * @param num_addrspace The number of core-mapped siba(4) Sonics/OCP address + * spaces. + */ +u_int +siba_addrspace_region_count(struct siba_devinfo *dinfo, u_int port) +{ + u_int num_addrspace = dinfo->core_id.num_addrspace; + + /* The first address space, if any, is mapped to device0.0 */ + if (port == 0) + return (min(num_addrspace, 1)); + + /* All remaining address spaces are mapped to device0.(n - 1) */ + if (port == 1 && num_addrspace >= 2) + return (num_addrspace - 1); + + /* No region mapping */ + return (0); +} + +/** + * Return true if @p port is defined on @p dinfo, false otherwise. + * + * Refer to the siba_find_addrspace() function for information on siba's + * mapping of bhnd(4) port and region identifiers. + * + * @param dinfo The device info to verify the port against. + * @param type The bhnd(4) port type. + * @param port The bhnd(4) port number. + */ +bool +siba_is_port_valid(struct siba_devinfo *dinfo, bhnd_port_type type, u_int port) +{ + /* Only device ports are supported */ + if (type != BHND_PORT_DEVICE) + return (false); + + /* Verify the index against the port count */ + if (siba_addrspace_port_count(dinfo) <= port) + return (false); + + return (true); +} /** - * Find an address space with @p sid on @p port. + * Map an bhnd(4) type/port/region triplet to its associated address space + * entry, if any. * - * @param port The port to search for a matching address space. - * @param sid The siba-assigned address space ID to search for. + * For compatibility with bcma(4), we map address spaces to port/region + * identifiers as follows: + * + * [port] [addrspace] + * device0.0 0 + * device1.0 1 + * device1.1 2 + * device1.2 3 + * + * The only supported port type is BHND_PORT_DEVICE. + * + * @param dinfo The device info to search for a matching address space. + * @param type The bhnd(4) port type. + * @param port The bhnd(4) port number. + * @param region The bhnd(4) port region. */ struct siba_addrspace * -siba_find_port_addrspace(struct siba_port *port, uint8_t sid) +siba_find_addrspace(struct siba_devinfo *dinfo, bhnd_port_type type, u_int port, + u_int region) { - struct siba_addrspace *addrspace; + u_int addridx; - STAILQ_FOREACH(addrspace, &port->sp_addrs, sa_link) { - if (addrspace->sa_sid == sid) - return (addrspace); - } + if (!siba_is_port_valid(dinfo, type, port)) + return (NULL); - /* not found */ - return (NULL); + if (port == 0) + addridx = region; + else if (port == 1) + addridx = region + 1; + else + return (NULL); + + /* Out of range? */ + if (addridx >= dinfo->core_id.num_addrspace) + return (NULL); + + /* Found */ + return (&dinfo->addrspace[addridx]); } /** - * Append a new address space entry to @p port_num of type @p port_type - * in @p dinfo. - * - * The range will also be registered in @p dinfo resource list. + * Append an address space entry to @p dinfo. * * @param dinfo The device info entry to update. - * @param port_type The port type. - * @param port_num The port number. - * @param region_num The region index number. - * @param sid The siba-assigned core-unique address space identifier. + * @param addridx The address space index. * @param base The mapping's base address. * @param size The mapping size. * @param bus_reserved Number of bytes to reserve in @p size for bus use @@ -237,12 +285,10 @@ siba_find_port_addrspace(struct siba_por * @retval non-zero An error occurred appending the entry. */ int -siba_append_dinfo_region(struct siba_devinfo *dinfo, bhnd_port_type port_type, - u_int port_num, u_int region_num, uint8_t sid, uint32_t base, uint32_t size, - uint32_t bus_reserved) +siba_append_dinfo_region(struct siba_devinfo *dinfo, uint8_t addridx, + uint32_t base, uint32_t size, uint32_t bus_reserved) { struct siba_addrspace *sa; - struct siba_port *port; rman_res_t r_size; /* Verify that base + size will not overflow */ @@ -257,20 +303,14 @@ siba_append_dinfo_region(struct siba_dev if (size == 0) return (EINVAL); - /* Determine target port */ - port = siba_dinfo_get_port(dinfo, port_type, port_num); - if (port == NULL) + /* Must not exceed addrspace array size */ + if (addridx >= nitems(dinfo->addrspace)) return (EINVAL); - /* Allocate new addrspace entry */ - sa = malloc(sizeof(*sa), M_BHND, M_NOWAIT|M_ZERO); - if (sa == NULL) - return (ENOMEM); - + /* Initialize new addrspace entry */ + sa = &dinfo->addrspace[addridx]; sa->sa_base = base; sa->sa_size = size; - sa->sa_sid = sid; - sa->sa_region_num = region_num; sa->sa_bus_reserved = bus_reserved; /* Populate the resource list */ @@ -278,10 +318,6 @@ siba_append_dinfo_region(struct siba_dev sa->sa_rid = resource_list_add_next(&dinfo->resources, SYS_RES_MEMORY, base, base + (r_size - 1), r_size); - /* Append to target port */ - STAILQ_INSERT_TAIL(&port->sp_addrs, sa, sa_link); - port->sp_num_addrs++; - return (0); } @@ -294,8 +330,6 @@ siba_append_dinfo_region(struct siba_dev void siba_free_dinfo(device_t dev, struct siba_devinfo *dinfo) { - siba_release_port(&dinfo->device_port); - resource_list_free(&dinfo->resources); /* Free all mapped configuration blocks */ Modified: head/sys/dev/bhnd/siba/sibareg.h ============================================================================== --- head/sys/dev/bhnd/siba/sibareg.h Thu Jun 16 19:57:24 2016 (r301971) +++ head/sys/dev/bhnd/siba/sibareg.h Thu Jun 16 20:04:33 2016 (r301972) @@ -51,9 +51,6 @@ #define SIBA_MAX_CORES \ (SIBA_ENUM_SIZE/SIBA_CORE_SIZE) /**< Maximum number of cores */ -#define SIBA_ADDRSPACE_CORE 0 /**< address space identifier of the - core enumeration block. */ - /**< Evaluates to the bus address of the @p idx core register block */ #define SIBA_CORE_ADDR(idx) \ (SIBA_ENUM_ADDR + ((idx) * SIBA_CORE_SIZE)) @@ -175,7 +172,7 @@ #define SIBA_IMCH_BEM_MASK 0xc0 /* bus error mode */ #define SIBA_IMCH_BEM_SHIFT 6 -/* sbadmatch0 */ +/* sbadmatch0-4 */ #define SIBA_AM_TYPE_MASK 0x3 /* address type */ #define SIBA_AM_TYPE_SHIFT 0x0 #define SIBA_AM_AD64 0x4 /* reserved */ Modified: head/sys/dev/bhnd/siba/sibavar.h ============================================================================== --- head/sys/dev/bhnd/siba/sibavar.h Thu Jun 16 19:57:24 2016 (r301971) +++ head/sys/dev/bhnd/siba/sibavar.h Thu Jun 16 20:04:33 2016 (r301972) @@ -47,7 +47,6 @@ struct siba_addrspace; struct siba_devinfo; -struct siba_port; struct siba_core_id; int siba_probe(device_t dev); @@ -69,47 +68,53 @@ struct siba_devinfo *siba_alloc_dinfo(de void siba_free_dinfo(device_t dev, struct siba_devinfo *dinfo); -struct siba_port *siba_dinfo_get_port(struct siba_devinfo *dinfo, - bhnd_port_type port_type, u_int port_num); +u_int siba_addrspace_port_count(struct siba_devinfo *dinfo); +u_int siba_addrspace_region_count(struct siba_devinfo *dinfo, + u_int port); -struct siba_addrspace *siba_find_port_addrspace(struct siba_port *port, - uint8_t sid); +u_int siba_addrspace_port(u_int addrspace); +u_int siba_addrspace_region(u_int addrspace); + +bool siba_is_port_valid(struct siba_devinfo *dinfo, + bhnd_port_type type, u_int port); + +struct siba_addrspace *siba_find_addrspace(struct siba_devinfo *dinfo, + bhnd_port_type type, u_int port, u_int region); int siba_append_dinfo_region(struct siba_devinfo *dinfo, - bhnd_port_type port_type, u_int port_num, - u_int region_num, uint8_t sid, uint32_t base, - uint32_t size, uint32_t bus_reserved); + uint8_t sid, uint32_t base, uint32_t size, + uint32_t bus_reserved); u_int siba_admatch_offset(uint8_t addrspace); int siba_parse_admatch(uint32_t am, uint32_t *addr, uint32_t *size); + /* Sonics configuration register blocks */ #define SIBA_CFG_NUM_2_2 1 /**< sonics <= 2.2 maps SIBA_CFG0. */ #define SIBA_CFG_NUM_2_3 2 /**< sonics <= 2.3 maps SIBA_CFG0 and SIBA_CFG1 */ -#define SIBA_CFG_NUM_MAX SIBA_CFG_NUM_2_3 /**< maximum number of supported config +#define SIBA_MAX_CFG SIBA_CFG_NUM_2_3 /**< maximum number of supported config register blocks */ +/* Sonics/OCP address space mappings */ +#define SIBA_CORE_ADDRSPACE 0 /**< Address space mapping the primary + device registers */ + +#define SIBA_MAX_ADDRSPACE 4 /**< Maximum number of Sonics/OCP + * address space mappings for a + * single core. */ + +/* bhnd(4) (port,region) representation of siba address space mappings */ +#define SIBA_MAX_PORT 2 /**< maximum number of advertised + * bhnd(4) ports */ + /** siba(4) address space descriptor */ struct siba_addrspace { uint32_t sa_base; /**< base address */ uint32_t sa_size; /**< size */ - u_int sa_region_num; /**< bhnd region id */ - uint8_t sa_sid; /**< siba-assigned address space ID */ int sa_rid; /**< bus resource id */ uint32_t sa_bus_reserved;/**< number of bytes at high end of * address space reserved for the bus */ - - STAILQ_ENTRY(siba_addrspace) sa_link; -}; - -/** siba(4) port descriptor */ -struct siba_port { - bhnd_port_type sp_type; /**< port type */ - u_int sp_num; /**< port number */ - u_int sp_num_addrs; /**< number of address space mappings */ - - STAILQ_HEAD(, siba_addrspace) sp_addrs; /**< address spaces mapped to this port */ }; /** @@ -133,16 +138,10 @@ struct siba_core_id { struct siba_devinfo { struct resource_list resources; /**< per-core memory regions. */ struct siba_core_id core_id; /**< core identification info */ + struct siba_addrspace addrspace[SIBA_MAX_ADDRSPACE]; /**< memory map descriptors */ - struct siba_port device_port; /**< device port holding ownership - * of all siba address space - * entries for this core. */ - - /** SIBA_CFG* register blocks */ - struct bhnd_resource *cfg[SIBA_CFG_NUM_MAX]; - - /** SIBA_CFG* resource IDs */ - int cfg_rid[SIBA_CFG_NUM_MAX]; + struct bhnd_resource *cfg[SIBA_MAX_CFG]; /**< SIBA_CFG_* registers */ + int cfg_rid[SIBA_MAX_CFG]; /**< SIBA_CFG_* resource IDs */ }; From owner-svn-src-head@freebsd.org Thu Jun 16 21:14:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50408A77A87; Thu, 16 Jun 2016 21:14:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EB6C16FA; Thu, 16 Jun 2016 21:14:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5GLEQZL051171; Thu, 16 Jun 2016 21:14:26 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GLEPa6051162; Thu, 16 Jun 2016 21:14:25 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201606162114.u5GLEPa6051162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 16 Jun 2016 21:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301973 - in head/usr.sbin/bsdconfig: include networking networking/include networking/share share/media X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 21:14:27 -0000 Author: dteske Date: Thu Jun 16 21:14:25 2016 New Revision: 301973 URL: https://svnweb.freebsd.org/changeset/base/301973 Log: Add bsdconfig `wifi' (aka `wireless' or `wlan') module Approved by: re (gjb) MFC after: 8 weeks Relnotes: yes Added: head/usr.sbin/bsdconfig/networking/wlanconfig (contents, props changed) head/usr.sbin/bsdconfig/share/media/wlan.subr (contents, props changed) Modified: head/usr.sbin/bsdconfig/include/messages.subr head/usr.sbin/bsdconfig/networking/INDEX head/usr.sbin/bsdconfig/networking/Makefile head/usr.sbin/bsdconfig/networking/include/messages.subr head/usr.sbin/bsdconfig/networking/networking head/usr.sbin/bsdconfig/networking/share/device.subr head/usr.sbin/bsdconfig/share/media/Makefile Modified: head/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/include/messages.subr Thu Jun 16 20:04:33 2016 (r301972) +++ head/usr.sbin/bsdconfig/include/messages.subr Thu Jun 16 21:14:25 2016 (r301973) @@ -66,9 +66,11 @@ msg_canada="Canada" msg_cancel="Cancel" msg_cancel_exit="Cancel/Exit" msg_cannot_create_permission_denied="%s: cannot create %s: Permission denied" +msg_cannot_edit_wireless_ssid="Cannot edit wireless configuration; no matches for\nSSID \`%s' in wpa_supplicants.conf(5)" msg_cannot_resolve_hostname="Cannot resolve \`%s'! Are you sure that your\nname server, gateway and network interface are correctly configured?" msg_cant_find_distribution="Warning: Can't find the \`%s' distribution on this\nFTP server. You may need to visit a different server for\nthe release you are trying to fetch or go to the Options\nmenu and set the release name to explicitly match what's\navailable on %s (or set to \"any\").\n\nWould you like to select another FTP server?" msg_cant_seem_to_write_out_resolv_conf="Can't seem to write out %s. Net cannot be used." +msg_cant_start_wpa_supplicant="Can't start wpa_supplicant(8). Please create a wlan(4)\ninterface from the \`wlans' option after selecting your\nfavorite wireless adapter (i.e., %s)." msg_cd_dvd="CD/DVD" msg_cdrom="CDROM" msg_checking_access_to="Checking access to\n %s" @@ -85,6 +87,9 @@ msg_client_error="Client error, you coul msg_command_failed_rest_of_script_aborted="Command \`%s' failed - rest of script aborted." msg_comms_desc="Communications utilities." msg_configuration_for_interface="Configuration for Interface" +msg_configured="Configured" +msg_configured_lc="configured" +msg_configured_ssids="Configured SSIDs" msg_converters_desc="Format conversion utilities." msg_could_not_unmount_the_cdrom_dvd="Could not unmount the CDROM/DVD from %s: %s" msg_could_not_unmount_the_dos_partition="Could not unmount the DOS partition from %s: %s" @@ -94,12 +99,15 @@ msg_couldnt_connect_to_ftp_server="Could msg_couldnt_connect_to_proxy="Couldn't connect to proxy" msg_couldnt_connect_to_server="Couldn't connect to server" msg_couldnt_open_ftp_connection="Couldn't open FTP connection to %s:\n %s." +msg_create_new="Create New" msg_created_path="Created %s" msg_czech_republic="Czech Republic" msg_databases_desc="Database software." msg_debugging="Debugging" msg_denmark="Denmark" msg_deskutils_desc="Various Desktop utilities." +msg_destroy="Destroy" +msg_details="Details" msg_devel_desc="Software development utilities and libraries." msg_device_is_not_configured="The %s device is not configured. You will need to do so\nin the Networking configuration menu before proceeding." msg_dhcp="DHCP" @@ -107,6 +115,7 @@ msg_dialog_mixedform_navigation_help="Us msg_directory="Directory" msg_directory_not_found="%s: Directory not found." msg_directory_where_package_temporary_files_go="The directory where package temporary files should go" +msg_discovered_ssids="Discovered SSIDs" msg_dns_desc="Domain Name Service tools." msg_docs_desc="Meta-ports for FreeBSD documentation." msg_done="Done" @@ -129,10 +138,15 @@ msg_exit="Exit" msg_exit_bsdconfig="Exit bsdconfig" msg_extra_options_to_ifconfig="Extra options to ifconfig (usually empty):" msg_failed_to_add_default_route="Failed to add a default route; please check your network configuration" +msg_failed_to_reach_wpa_supplicant="Failed to reach wpa_supplicant: %s" msg_file_system="File System" msg_finance_desc="Monetary, financial and related applications." msg_finland="Finland" msg_floppy="Floppy" +msg_forget_all="Forget All" +msg_forget_all_confirm="WARNING! Are you really sure you want to forget all known networks\nby re-initializing wpa_supplicants.conf(5)? This cannot be undone." +msg_forget_all_help="Reset wpa_supplicant(8) configuration, forgetting all known networks" +msg_found="found" msg_france="France" msg_french_desc="Ported software for French countries." msg_ftp="FTP" @@ -202,12 +216,15 @@ msg_linux_desc="Linux programs that can msg_lisp_desc="Software related to the Lisp language." msg_lithuania="Lithuania" msg_loading_of_dependent_package_failed="Loading of dependent package %s failed" +msg_loading_wireless_menu="Loading Wireless Menu..." msg_logging_in_to_user_at_host="Logging in to %s@%s.." msg_looking_for_keymap_files="Looking for keymap files..." msg_looking_up_host="Looking up host %s" msg_mail_desc="Electronic mail packages and utilities." msg_main_menu="Main Menu" msg_main_site="Main Site" +msg_manually_connect="Manually Connect" +msg_manually_connect_help="Connect to a wireless network that may be unlisted" msg_math_desc="Mathematical computation software." msg_mbone_desc="Applications and utilities for the MBONE." msg_media_timeout="Media Timeout" @@ -271,6 +288,7 @@ msg_parallel_desc="Applications dealing msg_pear_desc="Software related to the Pear PHP framework." msg_perl5_desc="Utilities/modules for the PERL5 language." msg_permission_denied="%s: %s: Permission denied" +msg_pick_an_interface_to_destroy="Pick an interface to destroy" msg_pkg_delete_failed="Warning: pkg-delete(8) of %s failed.\n Run with debugging for details." msg_pkg_install_apparently_did_not_like_the_package="pkg-install(8) apparently did not like the %s package." msg_pkg_not_yet_installed_install_now="pkg(8) not yet installed. Install now?" @@ -319,9 +337,12 @@ msg_reinstall_desc="Mark this package fo msg_release_name="Release Name" msg_required_package_not_found="Warning: %s is a required package but was not found." msg_rerun_bsdconfig_initial_device_probe="Re-run bsdconfig initial device probe" +msg_rescan_wireless="Rescan Wireless" +msg_rescan_wireless_help="Scan for new wireless networks" msg_rescan_devices="Re-scan Devices" msg_reset="RESET!" msg_reset_all_values_to_startup_defaults="Reset all values to startup defaults" +msg_return_to_previous_menu="Return to previous menu" msg_reuse_old_ftp_site_selection_values="Re-use old FTP site selection values?" msg_reuse_old_http_site_settings="Re-use old HTTP site settings?" msg_review="Review" @@ -334,6 +355,7 @@ msg_russia="Russia" msg_russian_desc="Ported software for the Russian market." msg_scanning_for_dhcp_servers="Scanning for DHCP servers..." msg_scanning_for_ra_servers="Scanning for RA servers..." +msg_scanning_wireless_pausing="Scanning Wireless... (pausing for %i seconds)" msg_scheme_desc="Software related to the Scheme language." msg_science_desc="Scientific software." msg_secure_mode_requires_root="Secure-mode requires root-access!" @@ -341,9 +363,18 @@ msg_secure_mode_requires_x11="Secure-mod msg_security_desc="System security software." msg_select="Select" msg_select_a_site_thats_close="Select a site that's close!" +msg_select_the_configuration_you_would_like="Select the configuration you would like to edit:\nAddional network information displayed in help line." +msg_select_wlan_interfaces_for="Select wlan interfaces for %s:" msg_selected="selected" msg_server_error_when_requesting_url="Server error when requesting %s, you could try an other server" msg_shells_desc="Various shells (tcsh, bash, etc)." +msg_show_all="Show All" +msg_show_all_help="Show wireless networks without an SSID and all BSSIDs" +msg_show_configured="Show Configured" +msg_show_configured_help="Show networks configured in wpa_supplicants.conf(5)" +msg_show_scan_results="Show Scan Results" +msg_show_scan_results_help="Show wpa_cli(8) scan results" +msg_skip="Skip" msg_slovak_republic="Slovak Republic" msg_slovenia="Slovenia" msg_sorry_invalid_url="Sorry, %s is an invalid URL!" @@ -378,6 +409,7 @@ msg_unable_to_initialize_media_type_for_ msg_unable_to_make_directory_mountpoint="Unable to make %s directory mountpoint for %s!" msg_unable_to_open="Unable to open %s" msg_unable_to_update_pkg_from_selected_media="Unable to update pkg(8) from selected media." +msg_unconfigured="Unconfigured" msg_uninstall="Uninstall" msg_uninstall_desc="Mark this package for deletion" msg_uninstalling_package_waiting_for_pkg_delete="Uninstalling %s package - waiting for pkg-delete(8)" @@ -397,11 +429,15 @@ msg_using_interface="Using interface %s" msg_using_usb_device="Using USB device: %s" msg_vietnamese_desc="Ported software for the Vietnamese market." msg_view_set_various_media_options="View/Set various media options" +msg_warning_no_wireless_devices="WARNING! No wireless devices found." msg_what_would_you_like_to_do_with="What would you like to do with %s?" msg_which_release_to_attempt_to_load="Which release to attempt to load from installation media" msg_which_text_editor_to_use="Which text editor to use during installation" +msg_wireless_networks_text="Select an unmarked ([ ]) entry to join that network.\nSelect a marked ([X]) entry to edit that configuration." msg_windowmaker_desc="Ports to support the WindowMaker window manager." +msg_wireless_network_configuration_for="Wireless network configuration for SSID \`%s'" msg_would_you_like_to_bring_interface_up="Would you like to bring the %s interface up right now?" +msg_wpa_cli_ping_failed="wpa_cli(8) ping failed" msg_www_desc="Web utilities (browsers, HTTP servers, etc)." msg_x11_clocks_desc="X Window System based clocks." msg_x11_desc="X Window System based utilities." Modified: head/usr.sbin/bsdconfig/networking/INDEX ============================================================================== --- head/usr.sbin/bsdconfig/networking/INDEX Thu Jun 16 20:04:33 2016 (r301972) +++ head/usr.sbin/bsdconfig/networking/INDEX Thu Jun 16 21:14:25 2016 (r301973) @@ -1,5 +1,5 @@ # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012 Devin Teske +# Copyright (c) 2012-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -50,6 +50,9 @@ menu_selection="defaultrouter|defaultrou menu_selection="hostname|hostname" menu_selection="nameservers|nameservers" menu_selection="netdev|devices" +menu_selection="wireless|wlanconfig" +menu_selection="wlan|wlanconfig" +menu_selection="wifi|wlanconfig" # # ------------ Items below this line do NOT need i18n translation ------------ Modified: head/usr.sbin/bsdconfig/networking/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/networking/Makefile Thu Jun 16 20:04:33 2016 (r301972) +++ head/usr.sbin/bsdconfig/networking/Makefile Thu Jun 16 21:14:25 2016 (r301973) @@ -6,6 +6,7 @@ FILESDIR= ${LIBEXECDIR}/bsdconfig/120.ne FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} -SCRIPTS= defaultrouter devices hostname nameservers networking +SCRIPTS= defaultrouter devices hostname nameservers networking \ + wlanconfig .include Modified: head/usr.sbin/bsdconfig/networking/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/include/messages.subr Thu Jun 16 20:04:33 2016 (r301972) +++ head/usr.sbin/bsdconfig/networking/include/messages.subr Thu Jun 16 21:14:25 2016 (r301973) @@ -1,4 +1,4 @@ -# Copyright (c) 2012 Devin Teske +# Copyright (c) 2012-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -100,6 +100,8 @@ msg_scanning_for_dhcp="Scanning for DHCP msg_select_network_interface="Select a network interface to configure.\n\n* Interface is marked as \"active\"" msg_supported_media_options="Below is a list of supported media options for the %s interface. Please select the options that you would like to set for the %s network interface" msg_unknown_networking_menu_selection="Unknown networking menu selection" +msg_wireless_networks="Wireless Networks" +msg_wlans="wlans" xmsg_please_enter_fqhn="Please enter your fully qualified hostname (e.g. foo.bar.com).\n The domain portion of the hostname will be configured in resolv.conf(5)." xmsg_please_enter_nameserver_existing="Please enter the new IP address of the DNS nameserver\n(set to the NULL string to remove entry):" xmsg_supported_media_options="Below is a list of supported media options for the %s interface. Please\nselect the options that you would like to set for the %s network interface" Modified: head/usr.sbin/bsdconfig/networking/networking ============================================================================== --- head/usr.sbin/bsdconfig/networking/networking Thu Jun 16 20:04:33 2016 (r301972) +++ head/usr.sbin/bsdconfig/networking/networking Thu Jun 16 21:14:25 2016 (r301973) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2006-2013 Devin Teske +# Copyright (c) 2006-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -53,8 +53,9 @@ dialog_menu_main() 'X' '$msg_exit' '1' '$msg_hostname_domain' '2' '$msg_network_interfaces' - '3' '$msg_default_router' - '4' '$msg_dns_nameservers' + '3' '$msg_wireless_networks' + '4' '$msg_default_router' + '5' '$msg_dns_nameservers' " # END-QUOTE local defaultitem= # Calculated below local hline="$hline_arrows_tab_enter" @@ -124,8 +125,9 @@ while :; do X) break ;; 1) command=hostname ;; # Hostname/Domain 2) command=devices ;; # Network Interfaces - 3) command=defaultrouter ;; # Default Router/Gateway - 4) command=nameservers ;; # DNS nameservers + 3) command=wlanconfig ;; # Wireless Networks + 4) command=defaultrouter ;; # Default Router/Gateway + 5) command=nameservers ;; # DNS nameservers esac if [ "$command" ]; then Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Thu Jun 16 20:04:33 2016 (r301972) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Thu Jun 16 21:14:25 2016 (r301973) @@ -1,6 +1,6 @@ if [ ! "$_NETWORKING_DEVICE_SUBR" ]; then _NETWORKING_DEVICE_SUBR=1 # -# Copyright (c) 2006-2015 Devin Teske +# Copyright (c) 2006-2016 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -34,6 +34,7 @@ f_dprintf "%s: loading includes..." netw f_include $BSDCFG_SHARE/device.subr f_include $BSDCFG_SHARE/dialog.subr f_include $BSDCFG_SHARE/media/tcpip.subr +f_include $BSDCFG_SHARE/media/wlan.subr f_include $BSDCFG_SHARE/networking/common.subr f_include $BSDCFG_SHARE/networking/ipaddr.subr f_include $BSDCFG_SHARE/networking/media.subr @@ -194,15 +195,29 @@ f_dialog_menu_netdev_edit() # to ifconfig(8). # local defaultitem= + local wlans wlan_status while :; do local dhcp_status="$msg_disabled" [ "$dhcp" ] && dhcp_status="$msg_enabled" + if f_device_is_wireless "$interface"; then + wlans=$( f_sysrc_get "wlans_$interface" ) + wlan_status="$msg_unconfigured" + [ -e "$( f_sysrc_get wpa_supplicant_conf_file )" ] && + wlan_status="$msg_configured" + fi + # # Display configuration-edit menu # menu_list=" 'X $msg_save_exit' '$msg_return_to_previous_menu' + " # END-QUOTE + f_device_is_wireless "$interface" && menu_list="$menu_list + 'W $msg_wireless_networks' '$wlan_status' + '1 $msg_wlans' '$wlans' + " # END-QUOTE + menu_list="$menu_list '2 $msg_dhcp' '$dhcp_status' '3 $msg_ipaddr4' '$ipaddr' '4 $msg_netmask' '$netmask' @@ -251,6 +266,9 @@ f_dialog_menu_netdev_edit() # case "$tag" in X\ *) break ;; + W\ *) f_dialog_menu_wireless_edit ;; + 1\ *) f_dialog_menu_wlandev_edit \ + "$interface" "${wlans%%[$IFS]*}" ;; 2\ *) # # Proceed cautiously (confirm with the user) if/when NFS- # mounts are active. If the network on which these mounts Added: head/usr.sbin/bsdconfig/networking/wlanconfig ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/networking/wlanconfig Thu Jun 16 21:14:25 2016 (r301973) @@ -0,0 +1,78 @@ +#!/bin/sh +#- +# Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Tom Rhodes +# Copyright (c) 2013-2016 Devin Teske +# 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$ +# +############################################################ INCLUDES + +# Prevent device.subr (included indirectly) from auto scanning on load +DEVICE_SELF_SCAN_ALL=NO + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/media/wlan.subr +f_include $BSDCFG_SHARE/mustberoot.subr + +BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" +f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr + +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" + +############################################################ MAIN + +# Incorporate rc-file if it exists +[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" + +# +# Process command-line arguments +# +while getopts h$GETOPTS_STDARGS flag; do + case "$flag" in + h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;; + esac +done +shift $(( $OPTIND - 1 )) + +# +# Initialize +# +f_dialog_title "$msg_wireless_networks" +f_dialog_backtitle "${ipgm:+bsdconfig }$pgm" +f_mustberoot_init + +# +# Launch the wireless network menu +# +f_dialog_menu_wireless_edit + +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdconfig/share/media/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/share/media/Makefile Thu Jun 16 20:04:33 2016 (r301972) +++ head/usr.sbin/bsdconfig/share/media/Makefile Thu Jun 16 21:14:25 2016 (r301973) @@ -3,6 +3,6 @@ FILESDIR= ${SHAREDIR}/bsdconfig/media FILES= any.subr cdrom.subr common.subr directory.subr dos.subr \ floppy.subr ftp.subr http.subr httpproxy.subr network.subr \ - nfs.subr options.subr tcpip.subr ufs.subr usb.subr + nfs.subr options.subr tcpip.subr ufs.subr usb.subr wlan.subr .include Added: head/usr.sbin/bsdconfig/share/media/wlan.subr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/share/media/wlan.subr Thu Jun 16 21:14:25 2016 (r301973) @@ -0,0 +1,1392 @@ +if [ ! "$_MEDIA_WLAN_SUBR" ]; then _MEDIA_WLAN_SUBR=1 +# +# Copyright (c) 2013-2016 Devin Teske +# 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$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." media/wlan.subr +f_include $BSDCFG_SHARE/device.subr +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/strings.subr +f_include $BSDCFG_SHARE/sysrc.subr + +BSDCFG_LIBE="/usr/libexec/bsdconfig" +f_include_lang $BSDCFG_LIBE/include/messages.subr + +############################################################ GLOBALS + +NWIRELESS_CONFIGS=0 +NWSCAN_RESULTS=0 + +# +# Settings used while interacting with various dialog(1) menus +# +: ${DIALOG_MENU_WLAN_SCAN_DURATION:=5} +: ${DIALOG_MENU_WLAN_SHOW_ALL=} +: ${DIALOG_MENU_WLAN_SHOW_CONFIGURED=1} +: ${DIALOG_MENU_WLAN_SHOW_SCAN_RESULTS=1} + +# +# Structure to contain the wpa_supplicant.conf(5) default overrides +# +f_struct_define WPA_DEFAULTS \ + ap_scan \ + ctrl_interface \ + ctrl_interface_group \ + eapol_version \ + fast_reauth + +# +# Structure of wpa_supplicant.conf(5) network={ ... } entry +# +f_struct_define WPA_NETWORK \ + anonymous_identity \ + auth_alg \ + bssid \ + ca_cert \ + ca_cert2 \ + client_cert \ + client_cert2 \ + dh_file \ + dh_file2 \ + eap \ + eap_workaround \ + eapol_flags \ + eappsk \ + engine \ + engine_id \ + frequency \ + group \ + identity \ + key_id \ + key_mgmt \ + mixed_cell \ + mode \ + nai \ + pac_file \ + pairwise \ + password \ + pcsc \ + phase1 \ + phase2 \ + pin \ + priority \ + private_key \ + private_key2 \ + private_key2_passwd \ + private_key_passwd \ + proto \ + psk \ + scan_ssid \ + server_nai \ + ssid \ + subject_match \ + subject_match2 \ + wep_key0 \ + wep_key1 \ + wep_key2 \ + wep_key3 \ + wpa_ptk_rekey \ + wep_tx_keyidx + +# +# The following properties are ``Lists'' and as such should not be quoted. +# Everything else should be quoted. +# +WPA_NETWORK_LIST_PROPERTIES=" + auth_algo + eap + group + key_mgmt + pairwise + proto +" # END-QUOTE + +# +# Structure of wpa_cli(8) `scan_results' entry +# +f_struct_define WPA_SCAN_RESULT \ + bssid \ + flags \ + freq \ + siglev \ + ssid + +# +# Structure of a menu item in the wireless editor +# +f_struct_define WLAN_MENU_ITEM \ + letter \ + ssid \ + nconfigs \ + nfound \ + help + +############################################################ FUNCTIONS + +# f_wpa_supplicant_init $file +# +# Initialize $file with basic contents of new wpa_supplicant.conf(5). +# +f_wpa_supplicant_init() +{ + local funcname=f_wpa_supplicant_init + local conf_file="$1" tmpfile + + # Create a temporary file + f_eval_catch -k tmpfile $funcname mktemp 'mktemp -t "%s"' "$pgm" || + return $FAILURE + + # Make it unreadable by anyone but ourselves + f_eval_catch $funcname chmod \ + 'chmod 0600 "%s"' "$tmpfile" || return $FAILURE + + # Make it owned by root/wheel + f_eval_catch $funcname chown \ + 'chown 0:0 "%s"' "$tmpfile" || return $FAILURE + + # Populate it + cat <<-EOF >> "$tmpfile" + ctrl_interface=/var/run/wpa_supplicant + eapol_version=2 + ap_scan=1 + fast_reauth=1 + EOF + echo >> "$tmpfile" + + # Move it into place + f_eval_catch $funcname mv 'mv "%s" "%s"' "$tmpfile" "$conf_file" +} + +# f_wpa_supplicant_parse $file [struct_prefix [count_var]] +# +# Parse wpa_supplicant.conf(5) $file. Default overrides are stored in a struct +# (see struct.subr for additional details) named `{struct_prefix}defaults'. See +# WPA_DEFAULTS struct definition in the GLOBALS section above. +# +# In addition, for each one of the wireless networks we parse from $file, +# create a struct named `struct_prefixN' where `N' is a number starting from 1 +# and ending in $count_var (zero means no networks). See WPA_NETWORK struct +# definition in the GLOBALS section above. +# +# If a `blob-base64-*={ ... }' entry appears, a struct named +# `{struct_prefix}blob_base64_*' is created and the `data' property holds the +# base64 encoded binary data without whitespace. +# +# Custom `*={ ... }' definitions are also supported, but should be unique +# (unlike the `network' definition). A struct named `{struct_prefix}*' is +# created if at least one property is defined in the block. +# +f_wpa_supplicant_parse() +{ + local file="$1" struct_prefix="$2" count_var="$3" + + [ "$count_var" ] && setvar "$count_var" 0 + + [ "$file" ] || file=$( f_sysrc_get wpa_supplicant_conf_file ) + if [ ! -e "$file" ]; then + f_dprintf "%s: No such file or directory" "$file" + return $FAILURE + fi + + local list_properties + f_replaceall "$WPA_NETWORK_LIST_PROPERTIES" "$NL" "" list_properties + eval "$( awk \ + -v count_var="$count_var" \ + -v struct_prefix="$struct_prefix" \ + -v list_properties="$list_properties" ' + BEGIN { + if (!count_var && !struct_prefix) exit + blob = count = custom_struct = network = 0 + split(list_properties, lists, FS) + } + function set_value(struct, prop, value) + { + quoted = substr(value, 0, 1) == "\"" + for (l in lists) if (list = prop == lists[l]) break + # Remove data after whitespace if unquoted and not a list + if (!quoted && !list) sub("[[:space:]].*", "", value) + # Otherwise if quoted and not a list, remove the quotes + # NB: wep_keyN needs to retain quoting if/when present + else if (quoted && !list && prop !~ /^wep_key[[:digit:]]+/) { + sub("^\"", "", value) + sub("\".*", "", value) + } + gsub(/'\''/, "'\''\\'\'\''", value) # Sanitize the value + if (!created[struct]) { + print "debug= f_struct_free", struct + print "debug= f_struct_new WPA_NETWORK", struct + created[struct] = 1 + } + printf "debug= %s set %s '\'%s\''\n", struct, prop, value + } + { + if ($1 ~ /^network={/) { + empty = 1 # We do not increment count unless !empty + network = 1 + next + } else if (match($1, "^blob-base64-[[:alnum:]_./-]+={")) { + blob = 1 + blob_data = "" + struct = struct_prefix "blob_bas64_" + struct = struct substr($1, 13, RLENGTH - 14) + next + } else if (match($1, "^[[:alnum:]_./-]+={")) { + empty = 1 + custom_struct = 1 + struct = struct_prefix substr($1, 0, RLENGTH - 2) + gsub(/[^[:alnum:]_]/, "_", struct) + next + } else if ($1 ~ /^}/) { + if (blob) { + gsub("[[:space:]]", "", blob_data) + set_value(struct, "data", blob_data) + } + blob = custom_struct = network = 0 + next + } else if (!match($0, /^[[:space:]]*[[:alnum:]_]+=/)) + next + + if (blob) { + blob_data = blob_data $0 + next + } else if (network) { + if (empty) { count++; empty = 0 } + struct = struct_prefix count + } else if (!custom_struct) + struct = struct_prefix "defaults" + + if (!struct_prefix) next + + prop = substr($0, 0, RLENGTH - 1) + sub(/^[[:space:]]*/, "", prop) + value = substr($0, RSTART + RLENGTH) + + set_value(struct, prop, value) + } + END { if (count_var) print count_var "=" count }' "$file" )" +} + +# f_wpa_scan_results_parse [struct_prefix [count_var]] +# +# Parse the results of wpa_cli(8) `scan_results' into a series of structs (see +# struct.subr for additional details) named `struct_prefixN' where `N' is a +# number starting from 1 and ending in $count_var (zero means no results). See +# WPA_SCAN_RESULT struct definition in the GLOBALS section above. +# +f_wpa_scan_results_parse() +{ + local struct_prefix="$1" count_var="$2" + + [ "$count_var" ] && setvar "$count_var" 0 + + eval "$( wpa_cli scan_results 2> /dev/null | awk \ + -v count_var="$count_var" \ + -v struct_prefix="$struct_prefix" ' + BEGIN { + if (!count_var && !struct_prefix) exit + count = 0 + seg = "[[:xdigit:]][[:xdigit:]]" + bssid = seg":"seg":"seg":"seg":"seg":"seg + freq = siglev = flags = "[^[:space:]]+" + S = "[[:space:]]+" + line = bssid S freq S siglev S flags + line = "^[[:space:]]*" line "[[:space:]]*" + } + function set_value(struct, prop, value) + { + gsub(/'\''/, "'\''\\'\'\''", value) # Sanitize the value + if (!created[struct]) { + print "debug= f_struct_free", struct + print "debug= f_struct_new WPA_SCAN_RESULT", struct + created[struct] = 1 + } + printf "debug= %s set %s '\'%s\''\n", struct, prop, value + } + { + if (!match($0, line)) next + ssid = substr($0, RLENGTH + 1) + + count++ + if (!struct_prefix) next + + struct = struct_prefix count + set_value(struct, "ssid", ssid) + set_value(struct, "bssid", $1) + set_value(struct, "freq", $2) + set_value(struct, "siglev", $3) + set_value(struct, "flags", $4) + } + END { if (count_var) print count_var "=" count }' )" +} + +# f_wpa_scan_match_network WPA_SCAN_RESULT WPA_NETWORK +# +# Compares a WPA_SCAN_RESULT struct to a WPA_NETWORK struct. If they appear to +# be a match returns success, otherwise failure. +# +f_wpa_scan_match_network() +{ + local scan_struct="$1" wireless_struct="$2" + local cp debug= + + f_struct "$scan_struct" || return $FAILURE + f_struct "$wireless_struct" || return $FAILURE + + local scan_ssid scan_bssid + $scan_struct get ssid scan_ssid + $scan_struct get bssid scan_bssid + local wireless_ssid wireless_bssid + $wireless_struct get ssid wireless_ssid + $wireless_struct get bssid wireless_bssid + + local id_matched= + if [ "$wireless_ssid" -a "$wireless_bssid" ]; then + # Must match both SSID and BSSID + [ "$scan_ssid" = "$wireless_ssid" -a \ + "$scan_bssid" = "$wireless_bssid" ] && id_matched=1 + elif [ "$wireless_ssid" ]; then + # Must match SSID only + [ "$scan_ssid" = "$wireless_ssid" ] && id_matched=1 + elif [ "$wireless_bssid" ]; then + # Must match BSSID only + [ "$scan_bssid" = "$wireless_bssid" ] && id_matched=1 + fi + [ "$id_matched" ] || return $FAILURE + + + # + # Get the scanned flags for the next few comparisons + # + local flags + $scan_struct get flags flags + + # + # Compare configured key management against scanned network + # + if $wireless_struct get key_mgmt cp && [ "$cp" -a "$cp" != "NONE" ] + then + local mgmt mgmt_matched= + for mgmt in $cp; do + local mgmt2="$mgmt" + [ "$mgmt" != "${mgmt#WPA-}" ] && + mgmt2="WPA2${mgmt#WPA}" + case "$flags" in + "$mgmt"|"$mgmt"-*|*-"$mgmt"|*-"$mgmt"-*) + mgmt_matched=1 break ;; + "$mgmt2"|"$mgmt2"-*|*-"$mgmt2"|*-"$mgmt2"-*) + mgmt_matched=1 break ;; + esac + done + [ "$mgmt_matched" ] || return $FAILURE + fi + + local enc type flag + + # + # Compare configured encryption against scanned network + # + for enc in psk:PSK eap:EAP \ + wep_key0:WEP wep_key1:WEP wep_key2:WEP wep_key3:WEP + do + type=${enc%%:*} + flag=${enc#*:} + { debug= $wireless_struct get $type cp && [ "$cp" ]; } || + continue + # Configured network requires encryption + case "$flags" in "[$flag]"|*"-$flag-"*) + break # Success; stop after first match + esac + return $FAILURE + done + cp="" # sensitive info + + # + # Compare scanned network encryption against configuration + # NB: Scanned network flags indicates _one_ of PSK EAP or WEP + # NB: Otherwise, no encryption (so encryption won't match) + # + local enc_wanted= + for enc in -PSK-:psk -EAP-:eap; do + flag=${enc%%:*} + type=${enc#*:} + case "$flags" in *"$flag"*) + enc_wanted=1 + { debug= $wireless_struct get $type cp && + [ "$cp" ]; } || return $FAILURE + break # success + esac + done + case "$flags" in *"[WEP]"*) + enc_wanted=1 + local wep_found= + for type in wep_key0 wep_key1 wep_key2 wep_key3; do + debug= $wireless_struct get $type cp && [ "$cp" ] && + wep_found=1 break + done + [ "$wep_found" ] || return $FAILURE + esac + if [ ! "$enc_wanted" ]; then + # No match if the network specifies encryption + for type in psk eap wep_key0 wep_key1 wep_key2 wep_key3; do + debug= $wireless_struct get $type cp && [ "$cp" ] && + return $FAILURE + done + fi + cp="" # sensitive info + + return $SUCCESS +} + +# f_wpa_scan_find_matches scans_prefix $scans_count \ +# wireless_prefix $wireless_count +# +# For each struct from `{scans_prefix}1' up to `{scans_prefix}$scans_count' +# (see struct.subr for additional details) compare the wireless network info +# (defined as struct WPA_SCAN_RESULT) to that of each configured wireless +# stored in `{wireless_prefix}1' (defined as struct WPA_NETWORK) up to +# `{wireless_prefix}$wireless_count'. +# +# If a scanned network is deemed to be a match to a configured wireless +# network, a new `match' property is set on the WPA_NETWORK struct with a value +# of `{scans_prefix}N' (where N represents the scanned network that matched). +# At the same time, a new `matched' property is set on the WPA_SCAN_RESULT +# struct with a value of 1, indicating that this network has been matched to a +# stored [known] configuration and that it should not be displayed in menus. +# +# NB: If a matching entry is not correct, the user can optionally `Forget' the +# network and that will cause the WPA_SCAN_RESULT to no longer match anything, +# causing it to appear in the menus again. +# +# Return status should be ignored. +# +f_wpa_scan_find_matches() +{ + local scans_prefix="$1" scans_count="$2" + local wireless_prefix="$3" wireless_count="$4" + local matches + + [ "$scans_count" -a "$wireless_count" ] || return $SUCCESS + f_isinteger "$scans_count" || return $FAILURE + f_isinteger "$wireless_count" || return $FAILURE + + # + # Go through and eradicate any flags we set in a prior run, as things + # might have changed on us (either from the config side or scan side) + # + local w=1 + while [ $w -le $wireless_count ]; do + f_struct "$wireless_prefix$w" set matches "" + w=$(( $w + 1 )) + done + + # + # Find matches and set match data on structs + # + local s=1 + while [ $s -le $scans_count ]; do + f_struct "$scans_prefix$s" set matched "" + w=1 + while [ $w -le $wireless_count ]; do + if f_wpa_scan_match_network \ + "$scans_prefix$s" "$wireless_prefix$w" + then + f_struct "$scans_prefix$s" set matched 1 + debug= f_struct "$wireless_prefix$w" \ + get matches matches + matches="$matches${matches:+ }$scans_prefix$s" + f_struct "$wireless_prefix$w" \ + set matches "$matches" + break # to next scan result + fi + w=$(( $w + 1 )) + done + s=$(( $s + 1 )) + done +} + +# f_dialog_menu_wlandev_edit $wlandev [$defaultitem] +# +# Display a list of wireless network devices (wlan*) associated with +# $wlandev (e.g., `iwn0'). Allow the user to create and destroy wlan interfaces +# while selecting ones to be cloned at startup (by setting `wlans_$wlandev'). +# +f_dialog_menu_wlandev_edit() +{ + local funcname=f_dialog_menu_wlandev_edit + local wlandev="$1" defaultitem="$2" + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt # Calculated below + local hline="$hline_arrows_tab_enter" + + [ "$wlandev" ] || return $FAILURE + + f_sprintf prompt "$msg_select_wlan_interfaces_for" "wlandev" + + # + # Initially mark wlan devices with a %parent of $wlandev + # + local dev devs if list_to_save= + f_device_find "" $DEVICE_TYPE_NETWORK devs + for dev in $devs; do + f_struct "$dev" get name if || continue + case "$if" in wlan[0-9]*) + parent=$( sysctl -n net.wlan.${if#wlan}.%parent \ + 2> /dev/null ) + if [ "$parent" = "$if" ]; then + local _wlanmark_$if="X" + list_to_save="$list_to_save $if" + fi + esac + done + list_to_save="${list_to_save# }" + + # + # Operate in a loop so we can create/destroy interfaces from here + # + while :; do + # + # Refresh list of wlan interfaces + # + local wlanlist= + f_device_rescan_network + f_device_find "" $DEVICE_TYPE_NETWORK devs + for dev in $devs; do + f_struct "$dev" get name if || continue + case "$if" in wlan[0-9]*) + wlanlist="$wlanlist $if" + esac + done + + # + # Build menu list of wlan devices + # + local menu_list=" + '> $msg_save_exit' '$msg_return_to_previous_menu' + '> $msg_create_new' 'wlan' + '> $msg_destroy' '...' + " # END-QUOTE + local parent X + for if in $wlanlist; do + f_getvar _wlanmark_$if-" " X + menu_list="$menu_list '[$X] $if' '%parent: $parent'" + [ "$defaultitem" = "$if" ] && defaultitem="[$X] $if" + done + + # + # Ask user to make a choice + # + local height width rows + eval f_dialog_menu_size height width rows \ + \"\$title\" \"\$btitle\" \"\$prompt\" \"\$hline\" \ + $menu_list + local menu_choice + menu_choice=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --hline \"\$hline\" \ + --ok-label \"\$msg_select\" \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Jun 16 21:22:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53DC7A77CCF; Thu, 16 Jun 2016 21:22:28 +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 083F11CBE; Thu, 16 Jun 2016 21:22:27 +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 u5GLMRr0054904; Thu, 16 Jun 2016 21:22:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5GLMRwK054902; Thu, 16 Jun 2016 21:22:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201606162122.u5GLMRwK054902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 16 Jun 2016 21:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301974 - head/usr.bin/ar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 21:22:28 -0000 Author: emaste Date: Thu Jun 16 21:22:26 2016 New Revision: 301974 URL: https://svnweb.freebsd.org/changeset/base/301974 Log: ar: enable reproducible output by default when invoked as 'ar -s' ar output is already deterministic by default for ar -q and ar -r, and when invoked as ranlib. Make ar -s equivalent to ranlib and enable deterministic output by default in that case too. PR: 210330 Reviewed by: bdrewery Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6871 Modified: head/usr.bin/ar/ar.1 head/usr.bin/ar/ar.c Modified: head/usr.bin/ar/ar.1 ============================================================================== --- head/usr.bin/ar/ar.1 Thu Jun 16 21:14:25 2016 (r301973) +++ head/usr.bin/ar/ar.1 Thu Jun 16 21:22:26 2016 (r301974) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 2015 +.Dd June 16, 2016 .Dt AR 1 .Os .Sh NAME @@ -205,7 +205,12 @@ When used in combination with the .Fl r or .Fl q -option, insert 0's instead of the real mtime, uid and gid values +option, +with the +.Fl s +option without other options, or when invoked as +.Nm ranlib , +insert 0's instead of the real mtime, uid and gid values and 0644 instead of file mode from the members named by arguments .Ar . This ensures that checksums on the resulting archives are reproducible Modified: head/usr.bin/ar/ar.c ============================================================================== --- head/usr.bin/ar/ar.c Thu Jun 16 21:14:25 2016 (r301973) +++ head/usr.bin/ar/ar.c Thu Jun 16 21:22:26 2016 (r301974) @@ -283,7 +283,8 @@ main(int argc, char **argv) } /* Set determinstic mode for -D, and by default without -U. */ - if (Dflag || (Uflag == 0 && (bsdar->mode == 'q' || bsdar->mode == 'r'))) + if (Dflag || (Uflag == 0 && (bsdar->mode == 'q' || bsdar->mode == 'r' || + (bsdar->mode == '\0' && bsdar->options & AR_S)))) bsdar->options |= AR_D; if (bsdar->options & AR_A) From owner-svn-src-head@freebsd.org Thu Jun 16 21:28:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79E51A77DB9; Thu, 16 Jun 2016 21:28:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 695F11F86; Thu, 16 Jun 2016 21:28:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 61F101C97; Thu, 16 Jun 2016 21:28:37 +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 139D922426; Thu, 16 Jun 2016 21:28:37 +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 fEo7Rc9SxT8Z; Thu, 16 Jun 2016 21:28:30 +0000 (UTC) Subject: Re: svn commit: r301973 - in head/usr.sbin/bsdconfig: include networking networking/include networking/share share/media DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com AF3F52241F To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201606162114.u5GLEPa6051162@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <4a9ec3a9-5668-f35d-82fc-f936826841db@FreeBSD.org> Date: Thu, 16 Jun 2016 14:28:27 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <201606162114.u5GLEPa6051162@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 21:28:37 -0000 On 6/16/16 2:14 PM, Devin Teske wrote: > Author: dteske > Date: Thu Jun 16 21:14:25 2016 > New Revision: 301973 > URL: https://svnweb.freebsd.org/changeset/base/301973 > > Log: > Add bsdconfig `wifi' (aka `wireless' or `wlan') module > > Approved by: re (gjb) > MFC after: 8 weeks 8 weeks is about August 11. Presumably you think this change is not "stable" enough for the stable/10 branch (note that "stable" has different meanings there). releng/11.0 branch: July 29, 2016 ports/ release tag: August 12, 2016 RC3 build starts: August 12, 2016 [*] RELEASE build starts: August 19, 2016 [*] - If needed Looking at the planned schedule, you won't MFC it to stable/10 (which won't be released for a year?) until nearly the release of 11.0. My question is, does this really belong in head right now for 11.0 or should it wait until after the stable/11 branching? > Relnotes: yes -- Regards, Bryan Drewery From owner-svn-src-head@freebsd.org Fri Jun 17 00:00:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A465A77426; Fri, 17 Jun 2016 00:00:46 +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 481A62CF7; Fri, 17 Jun 2016 00:00:46 +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 u5H00j6X011057; Fri, 17 Jun 2016 00:00:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5H00jNA011056; Fri, 17 Jun 2016 00:00:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201606170000.u5H00jNA011056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 17 Jun 2016 00:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301975 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 00:00:46 -0000 Author: gjb Date: Fri Jun 17 00:00:45 2016 New Revision: 301975 URL: https://svnweb.freebsd.org/changeset/base/301975 Log: Update 11.0 to -ALPHA4 in preparation of a new set of snapshot builds. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Thu Jun 16 21:22:26 2016 (r301974) +++ head/sys/conf/newvers.sh Fri Jun 17 00:00:45 2016 (r301975) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="11.0" -BRANCH="ALPHA3" +BRANCH="ALPHA4" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-head@freebsd.org Fri Jun 17 01:53:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76507A4751A; Fri, 17 Jun 2016 01:53:24 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67CA3220B; Fri, 17 Jun 2016 01:53:24 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:19222 helo=[10.238.228.248]) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1bDiHt-000DfT-Nv; Thu, 16 Jun 2016 18:09:33 -0700 Message-ID: <1466124774.1392.54.camel@FreeBSD.org> Subject: Re: svn commit: r301973 - in head/usr.sbin/bsdconfig: include networking networking/include networking/share share/media From: Devin Teske To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Cc: dteske@freebsd.org Date: Thu, 16 Jun 2016 17:52:54 -0700 In-Reply-To: <4a9ec3a9-5668-f35d-82fc-f936826841db@FreeBSD.org> References: <201606162114.u5GLEPa6051162@repo.freebsd.org> <4a9ec3a9-5668-f35d-82fc-f936826841db@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: devin@shxd.cx X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 01:53:24 -0000 On Thu, 2016-06-16 at 14:28 -0700, Bryan Drewery wrote: > On 6/16/16 2:14 PM, Devin Teske wrote: > > Author: dteske > > Date: Thu Jun 16 21:14:25 2016 > > New Revision: 301973 > > URL: https://svnweb.freebsd.org/changeset/base/301973 > > > > Log: > > Add bsdconfig `wifi' (aka `wireless' or `wlan') module > > > > Approved by: re (gjb) > > MFC after: 8 weeks > > 8 weeks is about August 11. > > Presumably you think this change is not "stable" enough for the > stable/10 branch (note that "stable" has different meanings there). > > releng/11.0 branch: July 29, 2016 > ports/ release tag: August 12, 2016 > RC3 build starts: August 12, 2016 [*] > RELEASE build starts: August 19, 2016 > [*] - If needed > > Looking at the planned schedule, you won't MFC it to stable/10 (which > won't be released for a year?) until nearly the release of 11.0. My > question is, does this really belong in head right now for 11.0 or > should it wait until after the stable/11 branching? > > > > Relnotes: yes > > I may never MFC it. The 8 weeks is to remind me to re-think that when I get the reminder from sobomax. It actually cannot be MFC'd without changes. There are some very slight minor differences in 10 and 11. The 8 weeks should not reflect how stable the code is or not, but rather that is a time when I predict I might have the time/energy to integrate it into the older branch(es). -- Devin From owner-svn-src-head@freebsd.org Fri Jun 17 06:13:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4D4EA78605; Fri, 17 Jun 2016 06:13:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 6F44E12CB; Fri, 17 Jun 2016 06:13:17 +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 u5H6D7sD052353 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 17 Jun 2016 09:13:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u5H6D7sD052353 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u5H6D6WC052352; Fri, 17 Jun 2016 09:13:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 17 Jun 2016 09:13:06 +0300 From: Konstantin Belousov To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301959 - head/sys/kern Message-ID: <20160617061306.GS38613@kib.kiev.ua> References: <201606161158.u5GBwkd1042632@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 06:13:17 -0000 On Thu, Jun 16, 2016 at 10:17:19AM -0700, Conrad Meyer wrote: > style(9) nit: /* FALLTHROUGH */ FALLTHROUGH is only applicable when there are executable statements for both cases, and first sequence of statements does not end in break. Look at the switch() example right after the FALLTHROUGH requirement in the style(9), which shows case '?'. From owner-svn-src-head@freebsd.org Fri Jun 17 15:48:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32551A78C32; Fri, 17 Jun 2016 15:48:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 079022D45; Fri, 17 Jun 2016 15:48:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id F17BA18D2; Fri, 17 Jun 2016 15:48:45 +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 9FDF5D4D8; Fri, 17 Jun 2016 15:48:45 +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 83ly0AebFyNO; Fri, 17 Jun 2016 15:48:42 +0000 (UTC) Subject: Re: svn commit: r301973 - in head/usr.sbin/bsdconfig: include networking networking/include networking/share share/media DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 6186ED4D2 To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201606162114.u5GLEPa6051162@repo.freebsd.org> <4a9ec3a9-5668-f35d-82fc-f936826841db@FreeBSD.org> <1466124774.1392.54.camel@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <1e26ffae-d2b4-ee52-12a6-dedc937f1483@FreeBSD.org> Date: Fri, 17 Jun 2016 08:48:43 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <1466124774.1392.54.camel@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="boHHu2aGlBtNMxofD4nVksRRc0qMUmtEI" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 15:48:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --boHHu2aGlBtNMxofD4nVksRRc0qMUmtEI Content-Type: multipart/mixed; boundary="RogIuKiDB7o9HQ0ojHwIF3Eo3uWjiQXkW" From: Bryan Drewery To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <1e26ffae-d2b4-ee52-12a6-dedc937f1483@FreeBSD.org> Subject: Re: svn commit: r301973 - in head/usr.sbin/bsdconfig: include networking networking/include networking/share share/media References: <201606162114.u5GLEPa6051162@repo.freebsd.org> <4a9ec3a9-5668-f35d-82fc-f936826841db@FreeBSD.org> <1466124774.1392.54.camel@FreeBSD.org> In-Reply-To: <1466124774.1392.54.camel@FreeBSD.org> --RogIuKiDB7o9HQ0ojHwIF3Eo3uWjiQXkW Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 6/16/2016 5:52 PM, Devin Teske wrote: > On Thu, 2016-06-16 at 14:28 -0700, Bryan Drewery wrote: >> On 6/16/16 2:14 PM, Devin Teske wrote: >>> Author: dteske >>> Date: Thu Jun 16 21:14:25 2016 >>> New Revision: 301973 >>> URL: https://svnweb.freebsd.org/changeset/base/301973 >>> >>> Log: >>> Add bsdconfig `wifi' (aka `wireless' or `wlan') module >>> =20 >>> Approved by: re (gjb) >>> MFC after: 8 weeks >> >> 8 weeks is about August 11. >> >> Presumably you think this change is not "stable" enough for the >> stable/10 branch (note that "stable" has different meanings there). >> >> releng/11.0 branch: July 29, 2016 >> ports/ release tag: August 12, 2016 >> RC3 build starts: August 12, 2016 [*] >> RELEASE build starts: August 19, 2016 >> [*] - If needed >> >> Looking at the planned schedule, you won't MFC it to stable/10 (which >> won't be released for a year?) until nearly the release of 11.0. My >> question is, does this really belong in head right now for 11.0 or >> should it wait until after the stable/11 branching? >> >> >>> Relnotes: yes >> >> >=20 > I may never MFC it. >=20 > The 8 weeks is to remind me to re-think that when I get the reminder > from sobomax. >=20 > It actually cannot be MFC'd without changes. There are some very slight= > minor differences in 10 and 11. >=20 > The 8 weeks should not reflect how stable the code is or not, but > rather that is a time when I predict I might have the time/energy to > integrate it into the older branch(es). >=20 Thank you for the explanation! Sounds fine. --=20 Regards, Bryan Drewery --RogIuKiDB7o9HQ0ojHwIF3Eo3uWjiQXkW-- --boHHu2aGlBtNMxofD4nVksRRc0qMUmtEI 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 iQEcBAEBAgAGBQJXZBvfAAoJEDXXcbtuRpfPq7QIAIX05cDRZjw1sRTVbZ379mDY qwFju6HYp1cgZvRrZ3BLF2C5qEJ3e13IEiTkBJ6j11g0G9efIbeo1mywV1swBbX0 sHQ8dZkj4QCmRM4SZglsWL8f6hrv73q7C0enxvAy/sH5aXbeSbH0Qnxiuxa9LJyH cjQPHk5D8KbMpZo/NAOwRb0jWWQ4X2Yre5TuhGB5TwOM7lS8usYn3xuR+HTdD668 QC58qhjVOQiCHL/YuQItvqLLcF63bXaZLNKelZ41epcfhsuKY+PPGOtQ+5bAeCqS nNTJmq5VoNOw3L6/7X3QhTqYCjFXART2wcW//6ZkyDwmtFxRMoiRyFRjdwVQ2AE= =57OR -----END PGP SIGNATURE----- --boHHu2aGlBtNMxofD4nVksRRc0qMUmtEI-- From owner-svn-src-head@freebsd.org Fri Jun 17 16:34:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3F8EA77C38; Fri, 17 Jun 2016 16:34:26 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94F0D2D2C; Fri, 17 Jun 2016 16:34:26 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5HGYPiU083215; Fri, 17 Jun 2016 16:34:25 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HGYP22083214; Fri, 17 Jun 2016 16:34:25 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201606171634.u5HGYP22083214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 17 Jun 2016 16:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301991 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 16:34:26 -0000 Author: lidl Date: Fri Jun 17 16:34:25 2016 New Revision: 301991 URL: https://svnweb.freebsd.org/changeset/base/301991 Log: Note ipfilter support in blacklist-helper script in relnotes Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jun 17 16:14:42 2016 (r301990) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jun 17 16:34:25 2016 (r301991) @@ -631,6 +631,9 @@ the &man.ipfw.4; packet filter has been added to the blacklistd-helper script. + Support for + the &man.ipfilter.4; packet filter has been added to the + blacklistd-helper script. From owner-svn-src-head@freebsd.org Fri Jun 17 16:44:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64203A77F9C; Fri, 17 Jun 2016 16:44:32 +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 2F9B5163B; Fri, 17 Jun 2016 16:44:32 +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 u5HGiVQ5087017; Fri, 17 Jun 2016 16:44:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HGiVuD087016; Fri, 17 Jun 2016 16:44:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606171644.u5HGiVuD087016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 17 Jun 2016 16:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301992 - head/contrib/llvm/tools/clang/tools/clang-format X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 16:44:32 -0000 Author: bdrewery Date: Fri Jun 17 16:44:31 2016 New Revision: 301992 URL: https://svnweb.freebsd.org/changeset/base/301992 Log: Import ClangFormat.cpp from ^/vendor/clang/clang-release_380-r262564 Discussed with: dim Approved by: re (gjb) Added: head/contrib/llvm/tools/clang/tools/clang-format/ head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp - copied unchanged from r301991, vendor/clang/clang-release_380-r262564/tools/clang-format/ClangFormat.cpp Copied: head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp (from r301991, vendor/clang/clang-release_380-r262564/tools/clang-format/ClangFormat.cpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp Fri Jun 17 16:44:31 2016 (r301992, copy of r301991, vendor/clang/clang-release_380-r262564/tools/clang-format/ClangFormat.cpp) @@ -0,0 +1,364 @@ +//===-- clang-format/ClangFormat.cpp - Clang format tool ------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// \brief This file implements a clang-format tool that automatically formats +/// (fragments of) C++ code. +/// +//===----------------------------------------------------------------------===// + +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/DiagnosticOptions.h" +#include "clang/Basic/FileManager.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Basic/Version.h" +#include "clang/Format/Format.h" +#include "clang/Rewrite/Core/Rewriter.h" +#include "llvm/ADT/StringMap.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/Signals.h" + +using namespace llvm; +using clang::tooling::Replacements; + +static cl::opt Help("h", cl::desc("Alias for -help"), cl::Hidden); + +// Mark all our options with this category, everything else (except for -version +// and -help) will be hidden. +static cl::OptionCategory ClangFormatCategory("Clang-format options"); + +static cl::list + Offsets("offset", + cl::desc("Format a range starting at this byte offset.\n" + "Multiple ranges can be formatted by specifying\n" + "several -offset and -length pairs.\n" + "Can only be used with one input file."), + cl::cat(ClangFormatCategory)); +static cl::list + Lengths("length", + cl::desc("Format a range of this length (in bytes).\n" + "Multiple ranges can be formatted by specifying\n" + "several -offset and -length pairs.\n" + "When only a single -offset is specified without\n" + "-length, clang-format will format up to the end\n" + "of the file.\n" + "Can only be used with one input file."), + cl::cat(ClangFormatCategory)); +static cl::list +LineRanges("lines", cl::desc(": - format a range of\n" + "lines (both 1-based).\n" + "Multiple ranges can be formatted by specifying\n" + "several -lines arguments.\n" + "Can't be used with -offset and -length.\n" + "Can only be used with one input file."), + cl::cat(ClangFormatCategory)); +static cl::opt + Style("style", + cl::desc(clang::format::StyleOptionHelpDescription), + cl::init("file"), cl::cat(ClangFormatCategory)); +static cl::opt +FallbackStyle("fallback-style", + cl::desc("The name of the predefined style used as a\n" + "fallback in case clang-format is invoked with\n" + "-style=file, but can not find the .clang-format\n" + "file to use.\n" + "Use -fallback-style=none to skip formatting."), + cl::init("LLVM"), cl::cat(ClangFormatCategory)); + +static cl::opt +AssumeFileName("assume-filename", + cl::desc("When reading from stdin, clang-format assumes this\n" + "filename to look for a style config file (with\n" + "-style=file) and to determine the language."), + cl::init(""), cl::cat(ClangFormatCategory)); + +static cl::opt Inplace("i", + cl::desc("Inplace edit s, if specified."), + cl::cat(ClangFormatCategory)); + +static cl::opt OutputXML("output-replacements-xml", + cl::desc("Output replacements as XML."), + cl::cat(ClangFormatCategory)); +static cl::opt + DumpConfig("dump-config", + cl::desc("Dump configuration options to stdout and exit.\n" + "Can be used with -style option."), + cl::cat(ClangFormatCategory)); +static cl::opt + Cursor("cursor", + cl::desc("The position of the cursor when invoking\n" + "clang-format from an editor integration"), + cl::init(0), cl::cat(ClangFormatCategory)); + +static cl::opt SortIncludes( + "sort-includes", + cl::desc("If set, overrides the include sorting behavior determined by the " + "SortIncludes style flag"), + cl::cat(ClangFormatCategory)); + +static cl::list FileNames(cl::Positional, cl::desc("[ ...]"), + cl::cat(ClangFormatCategory)); + +namespace clang { +namespace format { + +static FileID createInMemoryFile(StringRef FileName, MemoryBuffer *Source, + SourceManager &Sources, FileManager &Files, + vfs::InMemoryFileSystem *MemFS) { + MemFS->addFileNoOwn(FileName, 0, Source); + return Sources.createFileID(Files.getFile(FileName), SourceLocation(), + SrcMgr::C_User); +} + +// Parses : input to a pair of line numbers. +// Returns true on error. +static bool parseLineRange(StringRef Input, unsigned &FromLine, + unsigned &ToLine) { + std::pair LineRange = Input.split(':'); + return LineRange.first.getAsInteger(0, FromLine) || + LineRange.second.getAsInteger(0, ToLine); +} + +static bool fillRanges(MemoryBuffer *Code, + std::vector &Ranges) { + IntrusiveRefCntPtr InMemoryFileSystem( + new vfs::InMemoryFileSystem); + FileManager Files(FileSystemOptions(), InMemoryFileSystem); + DiagnosticsEngine Diagnostics( + IntrusiveRefCntPtr(new DiagnosticIDs), + new DiagnosticOptions); + SourceManager Sources(Diagnostics, Files); + FileID ID = createInMemoryFile("", Code, Sources, Files, + InMemoryFileSystem.get()); + if (!LineRanges.empty()) { + if (!Offsets.empty() || !Lengths.empty()) { + errs() << "error: cannot use -lines with -offset/-length\n"; + return true; + } + + for (unsigned i = 0, e = LineRanges.size(); i < e; ++i) { + unsigned FromLine, ToLine; + if (parseLineRange(LineRanges[i], FromLine, ToLine)) { + errs() << "error: invalid : pair\n"; + return true; + } + if (FromLine > ToLine) { + errs() << "error: start line should be less than end line\n"; + return true; + } + SourceLocation Start = Sources.translateLineCol(ID, FromLine, 1); + SourceLocation End = Sources.translateLineCol(ID, ToLine, UINT_MAX); + if (Start.isInvalid() || End.isInvalid()) + return true; + unsigned Offset = Sources.getFileOffset(Start); + unsigned Length = Sources.getFileOffset(End) - Offset; + Ranges.push_back(tooling::Range(Offset, Length)); + } + return false; + } + + if (Offsets.empty()) + Offsets.push_back(0); + if (Offsets.size() != Lengths.size() && + !(Offsets.size() == 1 && Lengths.empty())) { + errs() << "error: number of -offset and -length arguments must match.\n"; + return true; + } + for (unsigned i = 0, e = Offsets.size(); i != e; ++i) { + if (Offsets[i] >= Code->getBufferSize()) { + errs() << "error: offset " << Offsets[i] << " is outside the file\n"; + return true; + } + SourceLocation Start = + Sources.getLocForStartOfFile(ID).getLocWithOffset(Offsets[i]); + SourceLocation End; + if (i < Lengths.size()) { + if (Offsets[i] + Lengths[i] > Code->getBufferSize()) { + errs() << "error: invalid length " << Lengths[i] + << ", offset + length (" << Offsets[i] + Lengths[i] + << ") is outside the file.\n"; + return true; + } + End = Start.getLocWithOffset(Lengths[i]); + } else { + End = Sources.getLocForEndOfFile(ID); + } + unsigned Offset = Sources.getFileOffset(Start); + unsigned Length = Sources.getFileOffset(End) - Offset; + Ranges.push_back(tooling::Range(Offset, Length)); + } + return false; +} + +static void outputReplacementXML(StringRef Text) { + // FIXME: When we sort includes, we need to make sure the stream is correct + // utf-8. + size_t From = 0; + size_t Index; + while ((Index = Text.find_first_of("\n\r<&", From)) != StringRef::npos) { + outs() << Text.substr(From, Index - From); + switch (Text[Index]) { + case '\n': + outs() << " "; + break; + case '\r': + outs() << " "; + break; + case '<': + outs() << "<"; + break; + case '&': + outs() << "&"; + break; + default: + llvm_unreachable("Unexpected character encountered!"); + } + From = Index + 1; + } + outs() << Text.substr(From); +} + +static void outputReplacementsXML(const Replacements &Replaces) { + for (const auto &R : Replaces) { + outs() << ""; + outputReplacementXML(R.getReplacementText()); + outs() << "\n"; + } +} + +// Returns true on error. +static bool format(StringRef FileName) { + ErrorOr> CodeOrErr = + MemoryBuffer::getFileOrSTDIN(FileName); + if (std::error_code EC = CodeOrErr.getError()) { + errs() << EC.message() << "\n"; + return true; + } + std::unique_ptr Code = std::move(CodeOrErr.get()); + if (Code->getBufferSize() == 0) + return false; // Empty files are formatted correctly. + std::vector Ranges; + if (fillRanges(Code.get(), Ranges)) + return true; + StringRef AssumedFileName = (FileName == "-") ? AssumeFileName : FileName; + FormatStyle FormatStyle = getStyle(Style, AssumedFileName, FallbackStyle); + if (SortIncludes.getNumOccurrences() != 0) + FormatStyle.SortIncludes = SortIncludes; + unsigned CursorPosition = Cursor; + Replacements Replaces = sortIncludes(FormatStyle, Code->getBuffer(), Ranges, + AssumedFileName, &CursorPosition); + std::string ChangedCode = + tooling::applyAllReplacements(Code->getBuffer(), Replaces); + for (const auto &R : Replaces) + Ranges.push_back({R.getOffset(), R.getLength()}); + + bool IncompleteFormat = false; + Replacements FormatChanges = reformat(FormatStyle, ChangedCode, Ranges, + AssumedFileName, &IncompleteFormat); + Replaces = tooling::mergeReplacements(Replaces, FormatChanges); + if (OutputXML) { + outs() << "\n\n"; + if (Cursor.getNumOccurrences() != 0) + outs() << "" + << tooling::shiftedCodePosition(FormatChanges, CursorPosition) + << "\n"; + + outputReplacementsXML(Replaces); + outs() << "\n"; + } else { + IntrusiveRefCntPtr InMemoryFileSystem( + new vfs::InMemoryFileSystem); + FileManager Files(FileSystemOptions(), InMemoryFileSystem); + DiagnosticsEngine Diagnostics( + IntrusiveRefCntPtr(new DiagnosticIDs), + new DiagnosticOptions); + SourceManager Sources(Diagnostics, Files); + FileID ID = createInMemoryFile(AssumedFileName, Code.get(), Sources, Files, + InMemoryFileSystem.get()); + Rewriter Rewrite(Sources, LangOptions()); + tooling::applyAllReplacements(Replaces, Rewrite); + if (Inplace) { + if (FileName == "-") + errs() << "error: cannot use -i when reading from stdin.\n"; + else if (Rewrite.overwriteChangedFiles()) + return true; + } else { + if (Cursor.getNumOccurrences() != 0) + outs() << "{ \"Cursor\": " + << tooling::shiftedCodePosition(FormatChanges, CursorPosition) + << ", \"IncompleteFormat\": " + << (IncompleteFormat ? "true" : "false") << " }\n"; + Rewrite.getEditBuffer(ID).write(outs()); + } + } + return false; +} + +} // namespace format +} // namespace clang + +static void PrintVersion() { + raw_ostream &OS = outs(); + OS << clang::getClangToolFullVersion("clang-format") << '\n'; +} + +int main(int argc, const char **argv) { + llvm::sys::PrintStackTraceOnErrorSignal(); + + cl::HideUnrelatedOptions(ClangFormatCategory); + + cl::SetVersionPrinter(PrintVersion); + cl::ParseCommandLineOptions( + argc, argv, + "A tool to format C/C++/Java/JavaScript/Objective-C/Protobuf code.\n\n" + "If no arguments are specified, it formats the code from standard input\n" + "and writes the result to the standard output.\n" + "If s are given, it reformats the files. If -i is specified\n" + "together with s, the files are edited in-place. Otherwise, the\n" + "result is written to the standard output.\n"); + + if (Help) + cl::PrintHelpMessage(); + + if (DumpConfig) { + std::string Config = + clang::format::configurationAsText(clang::format::getStyle( + Style, FileNames.empty() ? AssumeFileName : FileNames[0], + FallbackStyle)); + outs() << Config << "\n"; + return 0; + } + + bool Error = false; + switch (FileNames.size()) { + case 0: + Error = clang::format::format("-"); + break; + case 1: + Error = clang::format::format(FileNames[0]); + break; + default: + if (!Offsets.empty() || !Lengths.empty() || !LineRanges.empty()) { + errs() << "error: -offset, -length and -lines can only be used for " + "single file.\n"; + return 1; + } + for (unsigned i = 0; i < FileNames.size(); ++i) + Error |= clang::format::format(FileNames[i]); + break; + } + return Error ? 1 : 0; +} + From owner-svn-src-head@freebsd.org Fri Jun 17 16:47:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E042A7801D; Fri, 17 Jun 2016 16:47: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 05C26180B; Fri, 17 Jun 2016 16:47: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 u5HGl0Oo087155; Fri, 17 Jun 2016 16:47:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HGkxN9087141; Fri, 17 Jun 2016 16:46:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606171646.u5HGkxN9087141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 17 Jun 2016 16:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301993 - in head: lib/clang lib/clang/libclangformat lib/clang/libclangtoolingcore targets/pseudo/clang tools/build/mk usr.bin/clang usr.bin/clang/clang-format X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 16:47:01 -0000 Author: bdrewery Date: Fri Jun 17 16:46:58 2016 New Revision: 301993 URL: https://svnweb.freebsd.org/changeset/base/301993 Log: Add clang-format under WITH_CLANG_EXTRAS. Reviewed by: dim Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D6856 Added: head/lib/clang/libclangformat/ head/lib/clang/libclangformat/Makefile (contents, props changed) head/lib/clang/libclangformat/Makefile.depend (contents, props changed) head/lib/clang/libclangtoolingcore/ head/lib/clang/libclangtoolingcore/Makefile (contents, props changed) head/lib/clang/libclangtoolingcore/Makefile.depend (contents, props changed) head/usr.bin/clang/clang-format/ head/usr.bin/clang/clang-format/Makefile (contents, props changed) head/usr.bin/clang/clang-format/Makefile.depend (contents, props changed) Modified: head/lib/clang/Makefile head/targets/pseudo/clang/Makefile.depend head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/Makefile Modified: head/lib/clang/Makefile ============================================================================== --- head/lib/clang/Makefile Fri Jun 17 16:44:31 2016 (r301992) +++ head/lib/clang/Makefile Fri Jun 17 16:46:58 2016 (r301993) @@ -90,7 +90,9 @@ SUBDIR= libclanganalysis \ libllvmx86utils .if ${MK_CLANG_EXTRAS} != "no" -SUBDIR+=libllvmdebuginfodwarf \ +SUBDIR+=libclangformat \ + libclangtoolingcore \ + libllvmdebuginfodwarf \ libllvmdebuginfopdb \ libllvmlibdriver \ libllvmlto \ Added: head/lib/clang/libclangformat/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libclangformat/Makefile Fri Jun 17 16:46:58 2016 (r301993) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include + +LIB= clangformat + +SRCDIR= tools/clang/lib/Format + +SRCS= BreakableToken.cpp \ + ContinuationIndenter.cpp \ + Format.cpp \ + FormatToken.cpp \ + TokenAnnotator.cpp \ + UnwrappedLineFormatter.cpp \ + UnwrappedLineParser.cpp \ + WhitespaceManager.cpp + +TGHDRS= DiagnosticCommonKinds + +.include "../clang.lib.mk" Added: head/lib/clang/libclangformat/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libclangformat/Makefile.depend Fri Jun 17 16:46:58 2016 (r301993) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc++ \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/lib/clang/libclangtoolingcore/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libclangtoolingcore/Makefile Fri Jun 17 16:46:58 2016 (r301993) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.include + +LIB= clangtoolingcore + +SRCDIR= tools/clang/lib/Tooling/Core +CFLAGS+= -I${LLVM_SRCS}/tools +SRCS= Lookup.cpp \ + Replacement.cpp + +TGHDRS= AttrList \ + Attrs \ + CommentCommandList \ + DeclNodes \ + DiagnosticCommonKinds \ + StmtNodes + +.include "../clang.lib.mk" Added: head/lib/clang/libclangtoolingcore/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libclangtoolingcore/Makefile.depend Fri Jun 17 16:46:58 2016 (r301993) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc++ \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: head/targets/pseudo/clang/Makefile.depend ============================================================================== --- head/targets/pseudo/clang/Makefile.depend Fri Jun 17 16:44:31 2016 (r301992) +++ head/targets/pseudo/clang/Makefile.depend Fri Jun 17 16:46:58 2016 (r301993) @@ -21,6 +21,7 @@ DIRDEPS+= \ .if ${MK_CLANG_EXTRAS} == "yes" DIRDEPS+= \ usr.bin/clang/bugpoint \ + usr.bin/clang/clang-format \ usr.bin/clang/llc \ usr.bin/clang/lli \ usr.bin/clang/llvm-ar \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jun 17 16:44:31 2016 (r301992) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jun 17 16:46:58 2016 (r301993) @@ -1237,6 +1237,7 @@ OLD_FILES+=usr/share/man/man1/llvm-tblge .if ${MK_CLANG_EXTRAS} == no OLD_FILES+=usr/bin/bugpoint +OLD_FILES+=usr/bin/clang-format OLD_FILES+=usr/bin/llc OLD_FILES+=usr/bin/lli OLD_FILES+=usr/bin/llvm-ar Modified: head/usr.bin/clang/Makefile ============================================================================== --- head/usr.bin/clang/Makefile Fri Jun 17 16:44:31 2016 (r301992) +++ head/usr.bin/clang/Makefile Fri Jun 17 16:46:58 2016 (r301993) @@ -7,6 +7,7 @@ SUBDIR= clang clang-tblgen llvm-tblgen .if !defined(TOOLS_PREFIX) .if ${MK_CLANG_EXTRAS} != "no" SUBDIR+=bugpoint \ + clang-format \ llc \ lli \ llvm-ar \ Added: head/usr.bin/clang/clang-format/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/clang-format/Makefile Fri Jun 17 16:46:58 2016 (r301993) @@ -0,0 +1,23 @@ +# $FreeBSD$ + +MAN= +.include + +PROG_CXX=clang-format + +SRCDIR= tools/clang/tools/clang-format +SRCS= ClangFormat.cpp + +LIBDEPS=clangrewrite \ + clanglex \ + clangformat \ + clangbasic \ + clangast \ + clangtoolingcore \ + llvmmc \ + llvmcore \ + llvmsupport \ + +TGHDRS= DiagnosticCommonKinds + +.include "../clang.prog.mk" Added: head/usr.bin/clang/clang-format/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/clang-format/Makefile.depend Fri Jun 17 16:46:58 2016 (r301993) @@ -0,0 +1,32 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/clang/libclangast \ + lib/clang/libclangbasic \ + lib/clang/libclangformat \ + lib/clang/libclanglex \ + lib/clang/libclangrewrite \ + lib/clang/libclangtoolingcore \ + lib/clang/libllvmcore \ + lib/clang/libllvmmc \ + lib/clang/libllvmsupport \ + lib/libc \ + lib/libc++ \ + lib/libcompiler_rt \ + lib/libthr \ + lib/msun \ + lib/ncurses/ncursesw \ + usr.bin/clang/clang-tblgen.host \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From owner-svn-src-head@freebsd.org Fri Jun 17 16:51:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D54A7A7819C; Fri, 17 Jun 2016 16:51:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id AFE6F1B5A; Fri, 17 Jun 2016 16:51:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id A965A1E55; Fri, 17 Jun 2016 16:51:44 +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 67AE0DAF4; Fri, 17 Jun 2016 16:51:44 +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 EPyeL1eDRzEj; Fri, 17 Jun 2016 16:51:42 +0000 (UTC) Subject: Re: svn commit: r301959 - head/sys/kern DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 8C62EDAEE To: Konstantin Belousov , Conrad Meyer References: <201606161158.u5GBwkd1042632@repo.freebsd.org> <20160617061306.GS38613@kib.kiev.ua> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Fri, 17 Jun 2016 09:51:45 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160617061306.GS38613@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Jt34htBudipOAbaTOakPrNd9fq6xiSCE6" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 16:51:44 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Jt34htBudipOAbaTOakPrNd9fq6xiSCE6 Content-Type: multipart/mixed; boundary="HObBJ5hGTFws0doCBSAtRQaJrNbb98SSU" From: Bryan Drewery To: Konstantin Belousov , Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r301959 - head/sys/kern References: <201606161158.u5GBwkd1042632@repo.freebsd.org> <20160617061306.GS38613@kib.kiev.ua> In-Reply-To: <20160617061306.GS38613@kib.kiev.ua> --HObBJ5hGTFws0doCBSAtRQaJrNbb98SSU Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 6/16/2016 11:13 PM, Konstantin Belousov wrote: > On Thu, Jun 16, 2016 at 10:17:19AM -0700, Conrad Meyer wrote: >> style(9) nit: /* FALLTHROUGH */ >=20 > FALLTHROUGH is only applicable when there are executable statements for= > both cases, and first sequence of statements does not end in break. > Look at the switch() example right after the FALLTHROUGH requirement > in the style(9), which shows case '?'. >=20 Yes the example shows code in both cases, but the text about it is more strict "Elements in a switch statement that cascade should have a FALLTHROUGH comment." --=20 Regards, Bryan Drewery --HObBJ5hGTFws0doCBSAtRQaJrNbb98SSU-- --Jt34htBudipOAbaTOakPrNd9fq6xiSCE6 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 iQEcBAEBAgAGBQJXZCqhAAoJEDXXcbtuRpfPsC0H/jOWJXEkMMI689nbH+iWARaj MEv9UVa3KIo7XH1lnWJnUiQ1np/ihKCwMI/7q/aZbfwBkuT7DWu25Beaow6lE6ii 2Cz0gCLYTq366v7mlhEpE60M8YfG3D6k+AcR2vy7iTtbYDNvFeMCBi+2CqzvP4c6 UGGanycqUJZSCdQ7lkcXp45QDoOIsmvXCagHJHevnBB1Nk62xl/EA82jpW55x4PG MYiWqY/DyilInItofqpNX4/7KsxxHx8W+wbhFu+1GIVxwsErHuJPRQeL0VCsJ4LR Zet+LJHbUQ33m9UsYBzo0ArxmxitnldRn70EnSWaUyetgAXMDOpGTqn/8FeQAOg= =0H0+ -----END PGP SIGNATURE----- --Jt34htBudipOAbaTOakPrNd9fq6xiSCE6-- From owner-svn-src-head@freebsd.org Fri Jun 17 16:56:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 599E9A78223; Fri, 17 Jun 2016 16:56:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA061E9F; Fri, 17 Jun 2016 16:56:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 26DA91045; Fri, 17 Jun 2016 16:56:45 +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 D26A9DB0D; Fri, 17 Jun 2016 16:56:44 +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 4El52RSPkeoO; Fri, 17 Jun 2016 16:56:42 +0000 (UTC) Subject: Re: svn commit: r301959 - head/sys/kern DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 3F776DB07 To: Konstantin Belousov , Conrad Meyer References: <201606161158.u5GBwkd1042632@repo.freebsd.org> <20160617061306.GS38613@kib.kiev.ua> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Fri, 17 Jun 2016 09:56:47 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PenS8IDv3O4uDII91gFuGAbi6G5xBv0sX" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 16:56:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PenS8IDv3O4uDII91gFuGAbi6G5xBv0sX Content-Type: multipart/mixed; boundary="MKgwKcVqiIqqrf1iNTc2qvbH3MsFa3js9" From: Bryan Drewery To: Konstantin Belousov , Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r301959 - head/sys/kern References: <201606161158.u5GBwkd1042632@repo.freebsd.org> <20160617061306.GS38613@kib.kiev.ua> In-Reply-To: --MKgwKcVqiIqqrf1iNTc2qvbH3MsFa3js9 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 6/17/2016 9:51 AM, Bryan Drewery wrote: > On 6/16/2016 11:13 PM, Konstantin Belousov wrote: >> On Thu, Jun 16, 2016 at 10:17:19AM -0700, Conrad Meyer wrote: >>> style(9) nit: /* FALLTHROUGH */ >> >> FALLTHROUGH is only applicable when there are executable statements fo= r >> both cases, and first sequence of statements does not end in break. >> Look at the switch() example right after the FALLTHROUGH requirement >> in the style(9), which shows case '?'. >> >=20 > Yes the example shows code in both cases, but the text about it is more= > strict "Elements in a switch statement that cascade should have a > FALLTHROUGH comment." >=20 My personal opinion does agree with your interpretation. I think we should clarify style.9 about when to use FALLTHROUGH. --=20 Regards, Bryan Drewery --MKgwKcVqiIqqrf1iNTc2qvbH3MsFa3js9-- --PenS8IDv3O4uDII91gFuGAbi6G5xBv0sX 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 iQEcBAEBAgAGBQJXZCvQAAoJEDXXcbtuRpfPLkYIAKSuGvE4HjTdSq7Xbh3DNH6p AzTLallgZF2NBKgYbkLSmrxLsNg2Nx7u0utcJ9AoHiftpd6nhJqQC5+Uu5j1XRaK T0f15uc14owJnWj4s4jGTVHzDzklHkbDqGq/GczDA9dVqmJyLqDTdyIT0eZjB+es bbGemsUUpigtTq9yGxMn0zA4o71lFCHQLMCKqce3/YABdQQHTX5S2jQEeAtKmeuT xdqh1KFADxPsTaMal9yscH3VEwQ7tq+MLXgxwvPwfw2H1ohUGPdLU/Zjw6R207xs 28mSuOTE8WYMvl7l5mSEzob/99CqmvIIiVpXB7X9chKv77vMmVn//KT05oeE3fE= =Sk26 -----END PGP SIGNATURE----- --PenS8IDv3O4uDII91gFuGAbi6G5xBv0sX-- From owner-svn-src-head@freebsd.org Fri Jun 17 17:01:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26BCAA78363; Fri, 17 Jun 2016 17:01:34 +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 ECB00224D; Fri, 17 Jun 2016 17:01:33 +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 u5HH1XqA091613; Fri, 17 Jun 2016 17:01:33 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HH1XCY091612; Fri, 17 Jun 2016 17:01:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201606171701.u5HH1XCY091612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 17 Jun 2016 17:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301994 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 17:01:34 -0000 Author: adrian Date: Fri Jun 17 17:01:32 2016 New Revision: 301994 URL: https://svnweb.freebsd.org/changeset/base/301994 Log: [ath] don't debug RX EDMA descriptors that are not yet complete. Approved by: re@ (gjb) Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Fri Jun 17 16:46:58 2016 (r301993) +++ head/sys/dev/ath/if_ath_rx_edma.c Fri Jun 17 17:01:32 2016 (r301994) @@ -427,6 +427,8 @@ ath_edma_recv_proc_queue(struct ath_soft rs = &bf->bf_status.ds_rxstat; bf->bf_rxstatus = ath_hal_rxprocdesc(ah, ds, bf->bf_daddr, NULL, rs); + if (bf->bf_rxstatus == HAL_EINPROGRESS) + break; #ifdef ATH_DEBUG if (sc->sc_debug & ATH_DEBUG_RECV_DESC) ath_printrxbuf(sc, bf, 0, bf->bf_rxstatus == HAL_OK); @@ -436,8 +438,6 @@ ath_edma_recv_proc_queue(struct ath_soft if_ath_alq_post(&sc->sc_alq, ATH_ALQ_EDMA_RXSTATUS, sc->sc_rx_statuslen, (char *) ds); #endif /* ATH_DEBUG */ - if (bf->bf_rxstatus == HAL_EINPROGRESS) - break; /* * Completed descriptor. From owner-svn-src-head@freebsd.org Fri Jun 17 17:09:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E67EA786E8; Fri, 17 Jun 2016 17:09:24 +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 E3A6B29E5; Fri, 17 Jun 2016 17:09:23 +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 u5HH9Nqa094846; Fri, 17 Jun 2016 17:09:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HH9NB4094845; Fri, 17 Jun 2016 17:09:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201606171709.u5HH9NB4094845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 17 Jun 2016 17:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301995 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 17:09:24 -0000 Author: manu Date: Fri Jun 17 17:09:22 2016 New Revision: 301995 URL: https://svnweb.freebsd.org/changeset/base/301995 Log: Print a message when disks are found but no logical partition are reported by EFI implementation. This address comment on r301714. Approved by: re (gjb), andrew (mentor) Differential Revision: https://reviews.freebsd.org/D6787 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Fri Jun 17 17:01:32 2016 (r301994) +++ head/sys/boot/efi/libefi/efipart.c Fri Jun 17 17:09:22 2016 (r301995) @@ -82,7 +82,7 @@ efipart_init(void) EFI_HANDLE *hin, *hout, *aliases, handle; EFI_STATUS status; UINTN sz; - u_int n, nin, nout; + u_int n, nin, nout, nrdisk; int err; sz = 0; @@ -103,6 +103,7 @@ efipart_init(void) hout = hin + nin; aliases = hout + nin; nout = 0; + nrdisk = 0; bzero(aliases, nin * sizeof(EFI_HANDLE)); pdinfo = malloc(nin * sizeof(*pdinfo)); @@ -120,8 +121,7 @@ efipart_init(void) if (EFI_ERROR(status)) continue; if (!blkio->Media->LogicalPartition) { - printf("%s%d isn't a logical partition, skipping\n", - efipart_dev.dv_name, n); + nrdisk++; continue; } @@ -156,6 +156,9 @@ efipart_init(void) bcache_add_dev(npdinfo); err = efi_register_handles(&efipart_dev, hout, aliases, nout); free(hin); + + if (nout == 0 && nrdisk > 0) + printf("Found %d disk(s) but no logical partition\n", nrdisk); return (err); } From owner-svn-src-head@freebsd.org Fri Jun 17 17:22:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24849A78A3C; Fri, 17 Jun 2016 17:22:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.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 0413F175C; Fri, 17 Jun 2016 17:22:02 +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 bigwig.baldwin.cx (Postfix) with ESMTPSA id 16AD4B917; Fri, 17 Jun 2016 13:22:01 -0400 (EDT) From: John Baldwin To: Bryan Drewery Cc: Konstantin Belousov , Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301959 - head/sys/kern Date: Fri, 17 Jun 2016 10:21:45 -0700 Message-ID: <1585557.0rxbtFOHCR@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <201606161158.u5GBwkd1042632@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.2.7 (bigwig.baldwin.cx); Fri, 17 Jun 2016 13:22:01 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 17:22:02 -0000 On Friday, June 17, 2016 09:56:47 AM Bryan Drewery wrote: > On 6/17/2016 9:51 AM, Bryan Drewery wrote: > > On 6/16/2016 11:13 PM, Konstantin Belousov wrote: > >> On Thu, Jun 16, 2016 at 10:17:19AM -0700, Conrad Meyer wrote: > >>> style(9) nit: /* FALLTHROUGH */ > >> > >> FALLTHROUGH is only applicable when there are executable statements for > >> both cases, and first sequence of statements does not end in break. > >> Look at the switch() example right after the FALLTHROUGH requirement > >> in the style(9), which shows case '?'. > >> > > > > Yes the example shows code in both cases, but the text about it is more > > strict "Elements in a switch statement that cascade should have a > > FALLTHROUGH comment." > > > > My personal opinion does agree with your interpretation. I think we > should clarify style.9 about when to use FALLTHROUGH. As Bruce often notes, the code samples in style(9) trump the prose if there is a conflict. This is the first time I've ever seen anyone suggest that an empty case body warrants a FALLTHROUGH, and I don't recall ever seeing a single example of it in the tree. I had assumed that the Conrad had just misread the diff and assumed there was still a code block there, not that Conrad actually wanted a FALLTHROUGH for an empty block. In that case, I'm not sure changing style.9 would help as the trigger was misreading the diff, not confusion over the FALLTHROUGH convention. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Jun 17 17:33:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1394AA78CF2; Fri, 17 Jun 2016 17:33: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 C69DE1F3F; Fri, 17 Jun 2016 17:33: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 u5HHXPUu005755; Fri, 17 Jun 2016 17:33:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HHXPCt005753; Fri, 17 Jun 2016 17:33:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606171733.u5HHXPCt005753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 17 Jun 2016 17:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301996 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 17:33:27 -0000 Author: kib Date: Fri Jun 17 17:33:25 2016 New Revision: 301996 URL: https://svnweb.freebsd.org/changeset/base/301996 Log: Add VFS interface to flush specified amount of free vnodes belonging to mount points with the given filesystem type, specified by mount vfs_ops pointer. Based on patch by: mckusick Reviewed by: avg, mckusick Tested by: allanjude, madpilot Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Jun 17 17:09:22 2016 (r301995) +++ head/sys/kern/vfs_subr.c Fri Jun 17 17:33:25 2016 (r301996) @@ -107,7 +107,6 @@ static void v_incr_usecount(struct vnode static void v_incr_usecount_locked(struct vnode *); static void v_incr_devcount(struct vnode *); static void v_decr_devcount(struct vnode *); -static void vnlru_free(int); static void vgonel(struct vnode *); static void vfs_knllock(void *arg); static void vfs_knlunlock(void *arg); @@ -942,15 +941,23 @@ relock_mnt: return done; } +static int max_vnlru_free = 10000; /* limit on vnode free requests per call */ +SYSCTL_INT(_debug, OID_AUTO, max_vnlru_free, CTLFLAG_RW, &max_vnlru_free, + 0, + "limit on vnode free requests per call to the vnlru_free routine"); + /* * Attempt to reduce the free list by the requested amount. */ static void -vnlru_free(int count) +vnlru_free_locked(int count, struct vfsops *mnt_op) { struct vnode *vp; + struct mount *mp; mtx_assert(&vnode_free_list_mtx, MA_OWNED); + if (count > max_vnlru_free) + count = max_vnlru_free; for (; count > 0; count--) { vp = TAILQ_FIRST(&vnode_free_list); /* @@ -966,10 +973,17 @@ vnlru_free(int count) KASSERT((vp->v_iflag & VI_ACTIVE) == 0, ("Mangling active vnode")); TAILQ_REMOVE(&vnode_free_list, vp, v_actfreelist); + /* - * Don't recycle if we can't get the interlock. + * Don't recycle if our vnode is from different type + * of mount point. Note that mp is type-safe, the + * check does not reach unmapped address even if + * vnode is reclaimed. + * Don't recycle if we can't get the interlock without + * blocking. */ - if (!VI_TRYLOCK(vp)) { + if ((mnt_op != NULL && (mp = vp->v_mount) != NULL && + mp->mnt_op != mnt_op) || !VI_TRYLOCK(vp)) { TAILQ_INSERT_TAIL(&vnode_free_list, vp, v_actfreelist); continue; } @@ -1001,6 +1015,16 @@ vnlru_free(int count) } } +void +vnlru_free(int count, struct vfsops *mnt_op) +{ + + mtx_lock(&vnode_free_list_mtx); + vnlru_free_locked(count, mnt_op); + mtx_unlock(&vnode_free_list_mtx); +} + + /* XXX some names and initialization are bad for limits and watermarks. */ static int vspace(void) @@ -1046,8 +1070,8 @@ vnlru_proc(void) * try to reduce it by discarding from the free list. */ if (numvnodes > desiredvnodes && freevnodes > 0) - vnlru_free(ulmin(numvnodes - desiredvnodes, - freevnodes)); + vnlru_free_locked(ulmin(numvnodes - desiredvnodes, + freevnodes), NULL); /* * Sleep if the vnode cache is in a good state. This is * when it is not over-full and has space for about a 4% @@ -1237,7 +1261,7 @@ getnewvnode_wait(int suspended) } /* Post-adjust like the pre-adjust in getnewvnode(). */ if (numvnodes + 1 > desiredvnodes && freevnodes > 1) - vnlru_free(1); + vnlru_free_locked(1, NULL); return (numvnodes >= desiredvnodes ? ENFILE : 0); } @@ -1254,8 +1278,8 @@ getnewvnode_reserve(u_int count) /* XXX no longer so quick, but this part is not racy. */ mtx_lock(&vnode_free_list_mtx); if (numvnodes + count > desiredvnodes && freevnodes > wantfreevnodes) - vnlru_free(ulmin(numvnodes + count - desiredvnodes, - freevnodes - wantfreevnodes)); + vnlru_free_locked(ulmin(numvnodes + count - desiredvnodes, + freevnodes - wantfreevnodes), NULL); mtx_unlock(&vnode_free_list_mtx); td = curthread; @@ -1337,7 +1361,7 @@ getnewvnode(const char *tag, struct moun if (numvnodes + 1 <= desiredvnodes) ; else if (freevnodes > 0) - vnlru_free(1); + vnlru_free_locked(1, NULL); else { error = getnewvnode_wait(mp != NULL && (mp->mnt_kern_flag & MNTK_SUSPEND)); Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Jun 17 17:09:22 2016 (r301995) +++ head/sys/sys/vnode.h Fri Jun 17 17:33:25 2016 (r301996) @@ -603,6 +603,7 @@ struct nstat; struct ucred; struct uio; struct vattr; +struct vfsops; struct vnode; typedef int (*vn_get_ino_t)(struct mount *, void *, int, struct vnode **); @@ -738,6 +739,7 @@ void vfs_timestamp(struct timespec *); void vfs_write_resume(struct mount *mp, int flags); int vfs_write_suspend(struct mount *mp, int flags); int vfs_write_suspend_umnt(struct mount *mp); +void vnlru_free(int, struct vfsops *); int vop_stdbmap(struct vop_bmap_args *); int vop_stdfsync(struct vop_fsync_args *); int vop_stdgetwritemount(struct vop_getwritemount_args *); From owner-svn-src-head@freebsd.org Fri Jun 17 17:34:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A32FA78D4E; Fri, 17 Jun 2016 17:34:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D54720F5; Fri, 17 Jun 2016 17:34:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5HHYTIe005858; Fri, 17 Jun 2016 17:34:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HHYTCb005855; Fri, 17 Jun 2016 17:34:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606171734.u5HHYTCb005855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 17 Jun 2016 17:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301997 - in head/sys/cddl: compat/opensolaris/sys 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 17:34:30 -0000 Author: kib Date: Fri Jun 17 17:34:28 2016 New Revision: 301997 URL: https://svnweb.freebsd.org/changeset/base/301997 Log: Use vnlru_free(9) to implement dnlc_reduce_cache(). This apparently puts ARC back under the limits after the vnode pressure rework in r291244, in particular due to the kmem exhaustion. Based on patch by: mckusick Reviewed by: avg, mckusick Tested by: allanjude, madpilot Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: head/sys/cddl/compat/opensolaris/sys/dnlc.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/compat/opensolaris/sys/dnlc.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/dnlc.h Fri Jun 17 17:33:25 2016 (r301996) +++ head/sys/cddl/compat/opensolaris/sys/dnlc.h Fri Jun 17 17:34:28 2016 (r301997) @@ -35,6 +35,6 @@ #define dnlc_update(dvp, name, vp) do { } while (0) #define dnlc_remove(dvp, name) do { } while (0) #define dnlc_purge_vfsp(vfsp, count) (0) -#define dnlc_reduce_cache(percent) do { } while (0) +void dnlc_reduce_cache(void *arg); #endif /* !_OPENSOLARIS_SYS_DNLC_H_ */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jun 17 17:33:25 2016 (r301996) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jun 17 17:34:28 2016 (r301997) @@ -159,6 +159,10 @@ static kmutex_t arc_user_evicts_lock; static kcondvar_t arc_user_evicts_cv; static boolean_t arc_user_evicts_thread_exit; +static kmutex_t arc_dnlc_evicts_lock; +static kcondvar_t arc_dnlc_evicts_cv; +static boolean_t arc_dnlc_evicts_thread_exit; + uint_t arc_reduce_dnlc_percent = 3; /* @@ -3749,6 +3753,57 @@ arc_user_evicts_thread(void *dummy __unu thread_exit(); } +static u_int arc_dnlc_evicts_arg; +extern struct vfsops zfs_vfsops; + +static void +arc_dnlc_evicts_thread(void *dummy __unused) +{ + callb_cpr_t cpr; + u_int percent; + + CALLB_CPR_INIT(&cpr, &arc_dnlc_evicts_lock, callb_generic_cpr, FTAG); + + mutex_enter(&arc_dnlc_evicts_lock); + while (!arc_dnlc_evicts_thread_exit) { + CALLB_CPR_SAFE_BEGIN(&cpr); + (void) cv_wait(&arc_dnlc_evicts_cv, &arc_dnlc_evicts_lock); + CALLB_CPR_SAFE_END(&cpr, &arc_dnlc_evicts_lock); + if (arc_dnlc_evicts_arg != 0) { + percent = arc_dnlc_evicts_arg; + mutex_exit(&arc_dnlc_evicts_lock); +#ifdef _KERNEL + vnlru_free(desiredvnodes * percent / 100, &zfs_vfsops); +#endif + mutex_enter(&arc_dnlc_evicts_lock); + /* + * Clear our token only after vnlru_free() + * pass is done, to avoid false queueing of + * the requests. + */ + arc_dnlc_evicts_arg = 0; + } + } + arc_dnlc_evicts_thread_exit = FALSE; + cv_broadcast(&arc_dnlc_evicts_cv); + CALLB_CPR_EXIT(&cpr); + thread_exit(); +} + +void +dnlc_reduce_cache(void *arg) +{ + u_int percent; + + percent = (u_int)arg; + mutex_enter(&arc_dnlc_evicts_lock); + if (arc_dnlc_evicts_arg == 0) { + arc_dnlc_evicts_arg = percent; + cv_broadcast(&arc_dnlc_evicts_cv); + } + mutex_exit(&arc_dnlc_evicts_lock); +} + /* * Adapt arc info given the number of bytes we are trying to add and * the state that we are comming from. This function is only called @@ -5311,6 +5366,9 @@ arc_init(void) mutex_init(&arc_user_evicts_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&arc_user_evicts_cv, NULL, CV_DEFAULT, NULL); + mutex_init(&arc_dnlc_evicts_lock, NULL, MUTEX_DEFAULT, NULL); + cv_init(&arc_dnlc_evicts_cv, NULL, CV_DEFAULT, NULL); + /* Convert seconds to clock ticks */ arc_min_prefetch_lifespan = 1 * hz; @@ -5463,6 +5521,7 @@ arc_init(void) arc_reclaim_thread_exit = FALSE; arc_user_evicts_thread_exit = FALSE; + arc_dnlc_evicts_thread_exit = FALSE; arc_eviction_list = NULL; bzero(&arc_eviction_hdr, sizeof (arc_buf_hdr_t)); @@ -5486,6 +5545,9 @@ arc_init(void) (void) thread_create(NULL, 0, arc_user_evicts_thread, NULL, 0, &p0, TS_RUN, minclsyspri); + (void) thread_create(NULL, 0, arc_dnlc_evicts_thread, NULL, 0, &p0, + TS_RUN, minclsyspri); + arc_dead = FALSE; arc_warm = B_FALSE; @@ -5568,6 +5630,18 @@ arc_fini(void) } mutex_exit(&arc_user_evicts_lock); + mutex_enter(&arc_dnlc_evicts_lock); + arc_dnlc_evicts_thread_exit = TRUE; + /* + * The user evicts thread will set arc_user_evicts_thread_exit + * to FALSE when it is finished exiting; we're waiting for that. + */ + while (arc_dnlc_evicts_thread_exit) { + cv_signal(&arc_dnlc_evicts_cv); + cv_wait(&arc_dnlc_evicts_cv, &arc_dnlc_evicts_lock); + } + mutex_exit(&arc_dnlc_evicts_lock); + /* Use TRUE to ensure *all* buffers are evicted */ arc_flush(NULL, TRUE); @@ -5585,6 +5659,9 @@ arc_fini(void) mutex_destroy(&arc_user_evicts_lock); cv_destroy(&arc_user_evicts_cv); + mutex_destroy(&arc_dnlc_evicts_lock); + cv_destroy(&arc_dnlc_evicts_cv); + refcount_destroy(&arc_anon->arcs_size); refcount_destroy(&arc_mru->arcs_size); refcount_destroy(&arc_mru_ghost->arcs_size); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Jun 17 17:33:25 2016 (r301996) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Jun 17 17:34:28 2016 (r301997) @@ -101,7 +101,7 @@ static int zfs_fhtovp(vfs_t *vfsp, fid_t static void zfs_objset_close(zfsvfs_t *zfsvfs); static void zfs_freevfs(vfs_t *vfsp); -static struct vfsops zfs_vfsops = { +struct vfsops zfs_vfsops = { .vfs_mount = zfs_mount, .vfs_unmount = zfs_umount, .vfs_root = zfs_root, From owner-svn-src-head@freebsd.org Fri Jun 17 18:21:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C228EA787A0; Fri, 17 Jun 2016 18:21:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 841DF1B3B; Fri, 17 Jun 2016 18:21:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5HILu63021655; Fri, 17 Jun 2016 18:21:56 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HILudm021649; Fri, 17 Jun 2016 18:21:56 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201606171821.u5HILudm021649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 17 Jun 2016 18:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301998 - in head: sbin/pfctl share/man/man5 sys/net sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 18:21:57 -0000 Author: kp Date: Fri Jun 17 18:21:55 2016 New Revision: 301998 URL: https://svnweb.freebsd.org/changeset/base/301998 Log: pf: Filter on and set vlan PCP values Adopt the OpenBSD syntax for setting and filtering on VLAN PCP values. This introduces two new keywords: 'set prio' to set the PCP value, and 'prio' to filter on it. Reviewed by: allanjude, araujo Approved by: re (gjb) Obtained from: OpenBSD (mostly) Differential Revision: https://reviews.freebsd.org/D6786 Modified: head/sbin/pfctl/parse.y head/sbin/pfctl/pfctl_parser.c head/share/man/man5/pf.conf.5 head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_ioctl.c Modified: head/sbin/pfctl/parse.y ============================================================================== --- head/sbin/pfctl/parse.y Fri Jun 17 17:34:28 2016 (r301997) +++ head/sbin/pfctl/parse.y Fri Jun 17 18:21:55 2016 (r301998) @@ -217,6 +217,8 @@ struct filter_opts { #define FOM_TOS 0x04 #define FOM_KEEP 0x08 #define FOM_SRCTRACK 0x10 +#define FOM_SETPRIO 0x0400 +#define FOM_PRIO 0x2000 struct node_uid *uid; struct node_gid *gid; struct { @@ -240,6 +242,8 @@ struct filter_opts { char *match_tag; u_int8_t match_tag_not; u_int rtableid; + u_int8_t prio; + u_int8_t set_prio[2]; struct { struct node_host *addr; u_int16_t port; @@ -453,7 +457,7 @@ int parseport(char *, struct range *r, i %token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY %token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME %token UPPERLIMIT QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE TARGET INTERVAL -%token LOAD RULESET_OPTIMIZATION +%token LOAD RULESET_OPTIMIZATION PRIO %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE %token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY %token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS @@ -468,7 +472,7 @@ int parseport(char *, struct range *r, i %type no dir af fragcache optimizer %type sourcetrack flush unaryop statelock %type action nataction natpasslog scrubaction -%type flags flag blockspec +%type flags flag blockspec prio %type portplain portstar portrange %type hashkey %type proto proto_list proto_item @@ -504,6 +508,7 @@ int parseport(char *, struct range *r, i %type codelopts_list codelopts_item codel_opts %type bandwidth %type filter_opts filter_opt filter_opts_l +%type filter_sets filter_set filter_sets_l %type antispoof_opts antispoof_opt antispoof_opts_l %type queue_opts queue_opt queue_opts_l %type scrub_opts scrub_opt scrub_opts_l @@ -889,6 +894,17 @@ anchorrule : ANCHOR anchorname dir quick YYERROR; } r.match_tag_not = $9.match_tag_not; + if ($9.marker & FOM_PRIO) { + if ($9.prio == 0) + r.prio = PF_PRIO_ZERO; + else + r.prio = $9.prio; + } + if ($9.marker & FOM_SETPRIO) { + r.set_prio[0] = $9.set_prio[0]; + r.set_prio[1] = $9.set_prio[1]; + r.scrub_flags |= PFSTATE_SETPRIO; + } decide_address_family($8.src.host, &r.af); decide_address_family($8.dst.host, &r.af); @@ -2014,6 +2030,18 @@ pfrule : action dir logquick interface r.prob = $9.prob; r.rtableid = $9.rtableid; + if ($9.marker & FOM_PRIO) { + if ($9.prio == 0) + r.prio = PF_PRIO_ZERO; + else + r.prio = $9.prio; + } + if ($9.marker & FOM_SETPRIO) { + r.set_prio[0] = $9.set_prio[0]; + r.set_prio[1] = $9.set_prio[1]; + r.scrub_flags |= PFSTATE_SETPRIO; + } + r.af = $6; if ($9.tag) if (strlcpy(r.tagname, $9.tag, @@ -2434,6 +2462,18 @@ filter_opt : USER uids { filter_opts.marker |= FOM_ICMP; filter_opts.icmpspec = $1; } + | PRIO NUMBER { + if (filter_opts.marker & FOM_PRIO) { + yyerror("prio cannot be redefined"); + YYERROR; + } + if ($2 < 0 || $2 > PF_PRIO_MAX) { + yyerror("prio must be 0 - %u", PF_PRIO_MAX); + YYERROR; + } + filter_opts.marker |= FOM_PRIO; + filter_opts.prio = $2; + } | TOS tos { if (filter_opts.marker & FOM_TOS) { yyerror("tos cannot be redefined"); @@ -2532,6 +2572,42 @@ filter_opt : USER uids { filter_opts.divert.port = 1; /* some random value */ #endif } + | filter_sets + ; + +filter_sets : SET '(' filter_sets_l ')' { $$ = filter_opts; } + | SET filter_set { $$ = filter_opts; } + ; + +filter_sets_l : filter_sets_l comma filter_set + | filter_set + ; + +filter_set : prio { + if (filter_opts.marker & FOM_SETPRIO) { + yyerror("prio cannot be redefined"); + YYERROR; + } + filter_opts.marker |= FOM_SETPRIO; + filter_opts.set_prio[0] = $1.b1; + filter_opts.set_prio[1] = $1.b2; + } +prio : PRIO NUMBER { + if ($2 < 0 || $2 > PF_PRIO_MAX) { + yyerror("prio must be 0 - %u", PF_PRIO_MAX); + YYERROR; + } + $$.b1 = $$.b2 = $2; + } + | PRIO '(' NUMBER comma NUMBER ')' { + if ($3 < 0 || $3 > PF_PRIO_MAX || + $5 < 0 || $5 > PF_PRIO_MAX) { + yyerror("prio must be 0 - %u", PF_PRIO_MAX); + YYERROR; + } + $$.b1 = $3; + $$.b2 = $5; + } ; probability : STRING { @@ -5426,6 +5502,7 @@ lookup(char *s) { "overload", OVERLOAD}, { "pass", PASS}, { "port", PORT}, + { "prio", PRIO}, { "priority", PRIORITY}, { "priq", PRIQ}, { "probability", PROBABILITY}, Modified: head/sbin/pfctl/pfctl_parser.c ============================================================================== --- head/sbin/pfctl/pfctl_parser.c Fri Jun 17 17:34:28 2016 (r301997) +++ head/sbin/pfctl/pfctl_parser.c Fri Jun 17 18:21:55 2016 (r301998) @@ -841,6 +841,21 @@ print_rule(struct pf_rule *r, const char } if (r->tos) printf(" tos 0x%2.2x", r->tos); + if (r->prio) + printf(" prio %u", r->prio == PF_PRIO_ZERO ? 0 : r->prio); + if (r->scrub_flags & PFSTATE_SETMASK) { + char *comma = ""; + printf(" set ("); + if (r->scrub_flags & PFSTATE_SETPRIO) { + if (r->set_prio[0] == r->set_prio[1]) + printf("%s prio %u", comma, r->set_prio[0]); + else + printf("%s prio(%u, %u)", comma, r->set_prio[0], + r->set_prio[1]); + comma = ","; + } + printf(" )"); + } if (!r->keep_state && r->action == PF_PASS && !anchor_call[0]) printf(" no state"); else if (r->keep_state == PF_STATE_NORMAL) Modified: head/share/man/man5/pf.conf.5 ============================================================================== --- head/share/man/man5/pf.conf.5 Fri Jun 17 17:34:28 2016 (r301997) +++ head/share/man/man5/pf.conf.5 Fri Jun 17 18:21:55 2016 (r301998) @@ -28,7 +28,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 25, 2015 +.Dd June 9, 2016 .Dt PF.CONF 5 .Os .Sh NAME @@ -1785,6 +1785,25 @@ For example: pass in proto tcp to port 25 queue mail pass in proto tcp to port 22 queue(ssh_bulk, ssh_prio) .Ed +.Pp +.It Cm set prio Ar priority | Pq Ar priority , priority +Packets matching this rule will be assigned a specific queueing priority. +Priorities are assigned as integers 0 through 7. +If the packet is transmitted on a +.Xr vlan 4 +interface, the queueing priority will be written as the priority +code point in the 802.1Q VLAN header. +If two priorities are given, packets which have a TOS of +.Cm lowdelay +and TCP ACKs with no data payload will be assigned to the second one. +.Pp +For example: +.Bd -literal -offset indent +pass in proto tcp to port 25 set prio 2 +pass in proto tcp to port 22 set prio (2, 5) +.Ed +.Pp + .It Ar tag Aq Ar string Packets matching this rule will be tagged with the specified string. @@ -1845,6 +1864,9 @@ For example, the following rule will dro .Bd -literal -offset indent block in proto icmp probability 20% .Ed +.It Ar prio Aq Ar number +Only match packets which have the given queueing priority assigned. +.Pp .El .Sh ROUTING If a packet matches a rule with a route option set, the packet filter will @@ -2831,8 +2853,9 @@ filteropt = user | group | flags | "max-mss" number | "random-id" | "reassemble tcp" | fragmentation | "allow-opts" | "label" string | "tag" string | [ ! ] "tagged" string | + "set prio" ( number | "(" number [ [ "," ] number ] ")" ) | "queue" ( string | "(" string [ [ "," ] string ] ")" ) | - "rtable" number | "probability" number"%" + "rtable" number | "probability" number"%" | "prio" number nat-rule = [ "no" ] "nat" [ "pass" [ "log" [ "(" logopts ")" ] ] ] [ "on" ifspec ] [ af ] Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Fri Jun 17 17:34:28 2016 (r301997) +++ head/sys/net/pfvar.h Fri Jun 17 18:21:55 2016 (r301998) @@ -540,7 +540,7 @@ struct pf_rule { u_int16_t max_mss; u_int16_t tag; u_int16_t match_tag; - u_int16_t spare2; /* netgraph */ + u_int16_t scrub_flags; struct pf_rule_uid uid; struct pf_rule_gid gid; @@ -577,6 +577,10 @@ struct pf_rule { #define PF_FLUSH 0x01 #define PF_FLUSH_GLOBAL 0x02 u_int8_t flush; +#define PF_PRIO_ZERO 0xff /* match "prio 0" packets */ +#define PF_PRIO_MAX 7 + u_int8_t prio; + u_int8_t set_prio[2]; struct { struct pf_addr addr; @@ -739,6 +743,8 @@ struct pf_state { /* was PFSTATE_PFLOW 0x04 */ #define PFSTATE_NOSYNC 0x08 #define PFSTATE_ACK 0x10 +#define PFSTATE_SETPRIO 0x0200 +#define PFSTATE_SETMASK (PFSTATE_SETPRIO) u_int8_t timeout; u_int8_t sync_state; /* PFSYNC_S_x */ Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Fri Jun 17 17:34:28 2016 (r301997) +++ head/sys/netpfil/pf/pf.c Fri Jun 17 18:21:55 2016 (r301998) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2445,6 +2446,45 @@ pf_send_tcp(struct mbuf *replyto, const pf_send(pfse); } +static int +pf_ieee8021q_setpcp(struct mbuf *m, u_int8_t prio) +{ + struct m_tag *mtag; + + KASSERT(prio <= PF_PRIO_MAX, + ("%s with invalid pcp", __func__)); + + mtag = m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_OUT, NULL); + if (mtag == NULL) { + mtag = m_tag_alloc(MTAG_8021Q, MTAG_8021Q_PCP_OUT, + sizeof(uint8_t), M_NOWAIT); + if (mtag == NULL) + return (ENOMEM); + m_tag_prepend(m, mtag); + } + + *(uint8_t *)(mtag + 1) = prio; + return (0); +} + +static int +pf_match_ieee8021q_pcp(u_int8_t prio, struct mbuf *m) +{ + struct m_tag *mtag; + u_int8_t mpcp; + + mtag = m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_IN, NULL); + if (mtag == NULL) + return (0); + + if (prio == PF_PRIO_ZERO) + prio = 0; + + mpcp = *(uint8_t *)(mtag + 1); + + return (mpcp == prio); +} + static void pf_send_icmp(struct mbuf *m, u_int8_t type, u_int8_t code, sa_family_t af, struct pf_rule *r) @@ -3317,6 +3357,9 @@ pf_test_rule(struct pf_rule **rm, struct !pf_match_gid(r->gid.op, r->gid.gid[0], r->gid.gid[1], pd->lookup.gid)) r = TAILQ_NEXT(r, entries); + else if (r->prio && + !pf_match_ieee8021q_pcp(r->prio, m)) + r = TAILQ_NEXT(r, entries); else if (r->prob && r->prob <= arc4random()) r = TAILQ_NEXT(r, entries); @@ -3779,6 +3822,9 @@ pf_test_fragment(struct pf_rule **rm, in pd->proto == IPPROTO_ICMPV6) && (r->type || r->code)) r = TAILQ_NEXT(r, entries); + else if (r->prio && + !pf_match_ieee8021q_pcp(r->prio, m)) + r = TAILQ_NEXT(r, entries); else if (r->prob && r->prob <= (arc4random() % (UINT_MAX - 1) + 1)) r = TAILQ_NEXT(r, entries); @@ -6003,6 +6049,18 @@ done: if (r->rtableid >= 0) M_SETFIB(m, r->rtableid); + if (r->scrub_flags & PFSTATE_SETPRIO) { + if (pd.tos & IPTOS_LOWDELAY) + pqid = 1; + if (pf_ieee8021q_setpcp(m, r->set_prio[pqid])) { + action = PF_DROP; + REASON_SET(&reason, PFRES_MEMORY); + log = 1; + DPFPRINTF(PF_DEBUG_MISC, + ("pf: failed to allocate 802.1q mtag\n")); + } + } + #ifdef ALTQ if (action == PF_PASS && r->qid) { if (pd.pf_mtag == NULL && @@ -6176,7 +6234,7 @@ pf_test6(int dir, struct ifnet *ifp, str struct pf_state *s = NULL; struct pf_ruleset *ruleset = NULL; struct pf_pdesc pd; - int off, terminal = 0, dirndx, rh_cnt = 0; + int off, terminal = 0, dirndx, rh_cnt = 0, pqid = 0; int fwdir = dir; M_ASSERTPKTHDR(m); @@ -6449,6 +6507,18 @@ done: if (r->rtableid >= 0) M_SETFIB(m, r->rtableid); + if (r->scrub_flags & PFSTATE_SETPRIO) { + if (pd.tos & IPTOS_LOWDELAY) + pqid = 1; + if (pf_ieee8021q_setpcp(m, r->set_prio[pqid])) { + action = PF_DROP; + REASON_SET(&reason, PFRES_MEMORY); + log = 1; + DPFPRINTF(PF_DEBUG_MISC, + ("pf: failed to allocate 802.1q mtag\n")); + } + } + #ifdef ALTQ if (action == PF_PASS && r->qid) { if (pd.pf_mtag == NULL && Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Fri Jun 17 17:34:28 2016 (r301997) +++ head/sys/netpfil/pf/pf_ioctl.c Fri Jun 17 18:21:55 2016 (r301998) @@ -1242,6 +1242,10 @@ pfioctl(struct cdev *dev, u_long cmd, ca error = ENOMEM; if (pf_anchor_setup(rule, ruleset, pr->anchor_call)) error = EINVAL; + if (rule->scrub_flags & PFSTATE_SETPRIO && + (rule->set_prio[0] > PF_PRIO_MAX || + rule->set_prio[1] > PF_PRIO_MAX)) + error = EINVAL; TAILQ_FOREACH(pa, &V_pf_pabuf, entries) if (pa->addr.type == PF_ADDR_TABLE) { pa->addr.p.tbl = pfr_attach_table(ruleset, From owner-svn-src-head@freebsd.org Fri Jun 17 18:49:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67448A78CBA; Fri, 17 Jun 2016 18:49:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37F05296D; Fri, 17 Jun 2016 18:49:43 +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 u5HIngm9032015; Fri, 17 Jun 2016 18:49:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HIngTa032014; Fri, 17 Jun 2016 18:49:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201606171849.u5HIngTa032014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 17 Jun 2016 18:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301999 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 18:49:43 -0000 Author: emaste Date: Fri Jun 17 18:49:42 2016 New Revision: 301999 URL: https://svnweb.freebsd.org/changeset/base/301999 Log: mkimg: bump version to 20151211 after r292082 mkimg has had a number of functional additions after the last time the version was incremented. Do so now, to r292082's commit date, so that users can determine what is supported. Reviewed by: marcel Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6882 Modified: head/usr.bin/mkimg/Makefile Modified: head/usr.bin/mkimg/Makefile ============================================================================== --- head/usr.bin/mkimg/Makefile Fri Jun 17 18:21:55 2016 (r301998) +++ head/usr.bin/mkimg/Makefile Fri Jun 17 18:49:42 2016 (r301999) @@ -6,7 +6,7 @@ PROG= mkimg SRCS= format.c image.c mkimg.c scheme.c MAN= mkimg.1 -MKIMG_VERSION=20150620 +MKIMG_VERSION=20151211 mkimg.o: Makefile CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION} From owner-svn-src-head@freebsd.org Fri Jun 17 19:41:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 677DDA78D97; Fri, 17 Jun 2016 19:41:31 +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 2C1F32B65; Fri, 17 Jun 2016 19:41:31 +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 u5HJfUp1054210; Fri, 17 Jun 2016 19:41:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HJfUif054208; Fri, 17 Jun 2016 19:41:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201606171941.u5HJfUif054208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Jun 2016 19:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302000 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 19:41:31 -0000 Author: mjg Date: Fri Jun 17 19:41:30 2016 New Revision: 302000 URL: https://svnweb.freebsd.org/changeset/base/302000 Log: vfs: ifdef out noop vop_* primitives on !DEBUG_VFS_LOCKS kernels This removes calls to empty functions like vop_lock_{pre/post} from common vfs routines. Approved by: re (gjb) Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Jun 17 18:49:42 2016 (r301999) +++ head/sys/kern/vfs_subr.c Fri Jun 17 19:41:30 2016 (r302000) @@ -4529,10 +4529,10 @@ vop_rename_pre(void *ap) vhold(a->a_tvp); } +#ifdef DEBUG_VFS_LOCKS void vop_strategy_pre(void *ap) { -#ifdef DEBUG_VFS_LOCKS struct vop_strategy_args *a; struct buf *bp; @@ -4552,56 +4552,48 @@ vop_strategy_pre(void *ap) if (vfs_badlock_ddb) kdb_enter(KDB_WHY_VFSLOCK, "lock violation"); } -#endif } void vop_lock_pre(void *ap) { -#ifdef DEBUG_VFS_LOCKS struct vop_lock1_args *a = ap; if ((a->a_flags & LK_INTERLOCK) == 0) ASSERT_VI_UNLOCKED(a->a_vp, "VOP_LOCK"); else ASSERT_VI_LOCKED(a->a_vp, "VOP_LOCK"); -#endif } void vop_lock_post(void *ap, int rc) { -#ifdef DEBUG_VFS_LOCKS struct vop_lock1_args *a = ap; ASSERT_VI_UNLOCKED(a->a_vp, "VOP_LOCK"); if (rc == 0 && (a->a_flags & LK_EXCLOTHER) == 0) ASSERT_VOP_LOCKED(a->a_vp, "VOP_LOCK"); -#endif } void vop_unlock_pre(void *ap) { -#ifdef DEBUG_VFS_LOCKS struct vop_unlock_args *a = ap; if (a->a_flags & LK_INTERLOCK) ASSERT_VI_LOCKED(a->a_vp, "VOP_UNLOCK"); ASSERT_VOP_LOCKED(a->a_vp, "VOP_UNLOCK"); -#endif } void vop_unlock_post(void *ap, int rc) { -#ifdef DEBUG_VFS_LOCKS struct vop_unlock_args *a = ap; if (a->a_flags & LK_INTERLOCK) ASSERT_VI_UNLOCKED(a->a_vp, "VOP_UNLOCK"); -#endif } +#endif void vop_create_post(void *ap, int rc) Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Jun 17 18:49:42 2016 (r301999) +++ head/sys/sys/vnode.h Fri Jun 17 19:41:30 2016 (r302000) @@ -781,8 +781,6 @@ void vop_close_post(void *a, int rc); void vop_create_post(void *a, int rc); void vop_deleteextattr_post(void *a, int rc); void vop_link_post(void *a, int rc); -void vop_lock_pre(void *a); -void vop_lock_post(void *a, int rc); void vop_lookup_post(void *a, int rc); void vop_lookup_pre(void *a); void vop_mkdir_post(void *a, int rc); @@ -797,10 +795,21 @@ void vop_rename_pre(void *a); void vop_rmdir_post(void *a, int rc); void vop_setattr_post(void *a, int rc); void vop_setextattr_post(void *a, int rc); -void vop_strategy_pre(void *a); void vop_symlink_post(void *a, int rc); + +#ifdef DEBUG_VFS_LOCKS +void vop_strategy_pre(void *a); +void vop_lock_pre(void *a); +void vop_lock_post(void *a, int rc); void vop_unlock_post(void *a, int rc); void vop_unlock_pre(void *a); +#else +#define vop_strategy_pre(x) do { } while (0) +#define vop_lock_pre(x) do { } while (0) +#define vop_lock_post(x, y) do { } while (0) +#define vop_unlock_post(x, y) do { } while (0) +#define vop_unlock_pre(x) do { } while (0) +#endif void vop_rename_fail(struct vop_rename_args *ap); From owner-svn-src-head@freebsd.org Sat Jun 18 02:28:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDC06A78CF6; Sat, 18 Jun 2016 02:28:52 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-yw0-x235.google.com (mail-yw0-x235.google.com [IPv6:2607:f8b0:4002:c05::235]) (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 757A71F3B; Sat, 18 Jun 2016 02:28:52 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-yw0-x235.google.com with SMTP id z186so86819690ywd.2; Fri, 17 Jun 2016 19:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc; bh=Mi7cnszI1OOGMPVZhpDh5XS4NFGJxBrcnz/1mU5+G3Q=; b=l2hF1ZPpLfG9wJFCnKK4a+lRoPwMzAugIPuSKD3N3yH/orExMG1IwMGi4VHYvlpCUh WqLi8aZit0jDtQFMKYJUDl8gd2hDu0qcbmdUt0VyoT5+fJSEdv797ZpalJ6T1w645q6O u7MLoSge/oBbuBpf/LRZ/0LlgFAqi/YdKNkDzRlJINELqnPqREEuISUyjrSidlbZRjM4 iYCWw6vtZYWCcMhrGgUPcYEzAdCqfMjIIYWqdQGRNFlVTZEvI3VTXzta6bDW4SiO0FI0 d/BNxO3VuRv1YAnJq78NizBtNJD9T0aQ8AR055v5o4BVHRsLxjs4AM8J3LZBu9FKaoOf 9KJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc; bh=Mi7cnszI1OOGMPVZhpDh5XS4NFGJxBrcnz/1mU5+G3Q=; b=B3pmu5Lx2olmyCocK9OkyzTKWYb1jMwhcGNVKKE6fUQKOdxiDBIGfNqfqFnUut3JR5 8Tg4w7uPuhD+mz2PkqQ7paubakP3cN9Sne2bR/ENn119W4Ug3kLNzniwkCQ+uX5n32qf 3Vp8rWBki/8RqrhnciB2owk13ug02Hgo1sZfQ6yLa87NMR3Ki6yBk9hYt8bxFO1WbkFx Awxrxm+iWCS8pg+7hK3yw8RJgbg2KKYUZDcsw4NdjDeBRYgNC5aYGSB1qcZ8w3xKAqQu U0327jVRCDsmSwDonp6FdILNd/Or8QiRn1GYP6xkYWiH5folUO/A5jqLv+HYuSHviqLW aIZg== X-Gm-Message-State: ALyK8tLZFj2WQGilKaxLZQOlJ1+o3MbqZ4f3k+FHxASJlvy8RVsWCwQXAGTDuWDvwCKvkB84u+TQh7lDB8U8Tw== MIME-Version: 1.0 X-Received: by 10.37.98.141 with SMTP id w135mr2887985ybb.9.1466216931374; Fri, 17 Jun 2016 19:28:51 -0700 (PDT) Received: by 10.129.10.212 with HTTP; Fri, 17 Jun 2016 19:28:51 -0700 (PDT) Received: by 10.129.10.212 with HTTP; Fri, 17 Jun 2016 19:28:51 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: <201606171821.u5HILudm021649@repo.freebsd.org> References: <201606171821.u5HILudm021649@repo.freebsd.org> Date: Sat, 18 Jun 2016 10:28:51 +0800 Message-ID: Subject: Re: svn commit: r301998 - in head: sbin/pfctl share/man/man5 sys/net sys/netpfil/pf From: Marcelo Araujo To: Kristof Provost Cc: svn-src-head@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2016 02:28:52 -0000 Thanks to work on it Kristof! On Jun 18, 2016 2:22 AM, "Kristof Provost" wrote: > Author: kp > Date: Fri Jun 17 18:21:55 2016 > New Revision: 301998 > URL: https://svnweb.freebsd.org/changeset/base/301998 > > Log: > pf: Filter on and set vlan PCP values > > Adopt the OpenBSD syntax for setting and filtering on VLAN PCP values. > This > introduces two new keywords: 'set prio' to set the PCP value, and 'prio' > to > filter on it. > > Reviewed by: allanjude, araujo > Approved by: re (gjb) > Obtained from: OpenBSD (mostly) > Differential Revision: https://reviews.freebsd.org/D6786 > > Modified: > head/sbin/pfctl/parse.y > head/sbin/pfctl/pfctl_parser.c > head/share/man/man5/pf.conf.5 > head/sys/net/pfvar.h > head/sys/netpfil/pf/pf.c > head/sys/netpfil/pf/pf_ioctl.c > > Modified: head/sbin/pfctl/parse.y > > ============================================================================== > --- head/sbin/pfctl/parse.y Fri Jun 17 17:34:28 2016 (r301997) > +++ head/sbin/pfctl/parse.y Fri Jun 17 18:21:55 2016 (r301998) > @@ -217,6 +217,8 @@ struct filter_opts { > #define FOM_TOS 0x04 > #define FOM_KEEP 0x08 > #define FOM_SRCTRACK 0x10 > +#define FOM_SETPRIO 0x0400 > +#define FOM_PRIO 0x2000 > struct node_uid *uid; > struct node_gid *gid; > struct { > @@ -240,6 +242,8 @@ struct filter_opts { > char *match_tag; > u_int8_t match_tag_not; > u_int rtableid; > + u_int8_t prio; > + u_int8_t set_prio[2]; > struct { > struct node_host *addr; > u_int16_t port; > @@ -453,7 +457,7 @@ int parseport(char *, struct range *r, i > %token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY > %token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME > %token UPPERLIMIT QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE TARGET > INTERVAL > -%token LOAD RULESET_OPTIMIZATION > +%token LOAD RULESET_OPTIMIZATION PRIO > %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE > %token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY > %token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS > @@ -468,7 +472,7 @@ int parseport(char *, struct range *r, i > %type no dir af fragcache optimizer > %type sourcetrack flush unaryop statelock > %type action nataction natpasslog scrubaction > -%type flags flag blockspec > +%type flags flag blockspec prio > %type portplain portstar portrange > %type hashkey > %type proto proto_list proto_item > @@ -504,6 +508,7 @@ int parseport(char *, struct range *r, i > %type codelopts_list codelopts_item codel_opts > %type bandwidth > %type filter_opts filter_opt filter_opts_l > +%type filter_sets filter_set filter_sets_l > %type antispoof_opts antispoof_opt > antispoof_opts_l > %type queue_opts queue_opt queue_opts_l > %type scrub_opts scrub_opt scrub_opts_l > @@ -889,6 +894,17 @@ anchorrule : ANCHOR anchorname dir quick > YYERROR; > } > r.match_tag_not = $9.match_tag_not; > + if ($9.marker & FOM_PRIO) { > + if ($9.prio == 0) > + r.prio = PF_PRIO_ZERO; > + else > + r.prio = $9.prio; > + } > + if ($9.marker & FOM_SETPRIO) { > + r.set_prio[0] = $9.set_prio[0]; > + r.set_prio[1] = $9.set_prio[1]; > + r.scrub_flags |= PFSTATE_SETPRIO; > + } > > decide_address_family($8.src.host, &r.af); > decide_address_family($8.dst.host, &r.af); > @@ -2014,6 +2030,18 @@ pfrule : action dir logquick interface > r.prob = $9.prob; > r.rtableid = $9.rtableid; > > + if ($9.marker & FOM_PRIO) { > + if ($9.prio == 0) > + r.prio = PF_PRIO_ZERO; > + else > + r.prio = $9.prio; > + } > + if ($9.marker & FOM_SETPRIO) { > + r.set_prio[0] = $9.set_prio[0]; > + r.set_prio[1] = $9.set_prio[1]; > + r.scrub_flags |= PFSTATE_SETPRIO; > + } > + > r.af = $6; > if ($9.tag) > if (strlcpy(r.tagname, $9.tag, > @@ -2434,6 +2462,18 @@ filter_opt : USER uids { > filter_opts.marker |= FOM_ICMP; > filter_opts.icmpspec = $1; > } > + | PRIO NUMBER { > + if (filter_opts.marker & FOM_PRIO) { > + yyerror("prio cannot be redefined"); > + YYERROR; > + } > + if ($2 < 0 || $2 > PF_PRIO_MAX) { > + yyerror("prio must be 0 - %u", > PF_PRIO_MAX); > + YYERROR; > + } > + filter_opts.marker |= FOM_PRIO; > + filter_opts.prio = $2; > + } > | TOS tos { > if (filter_opts.marker & FOM_TOS) { > yyerror("tos cannot be redefined"); > @@ -2532,6 +2572,42 @@ filter_opt : USER uids { > filter_opts.divert.port = 1; /* some random > value */ > #endif > } > + | filter_sets > + ; > + > +filter_sets : SET '(' filter_sets_l ')' { $$ = filter_opts; } > + | SET filter_set { $$ = filter_opts; } > + ; > + > +filter_sets_l : filter_sets_l comma filter_set > + | filter_set > + ; > + > +filter_set : prio { > + if (filter_opts.marker & FOM_SETPRIO) { > + yyerror("prio cannot be redefined"); > + YYERROR; > + } > + filter_opts.marker |= FOM_SETPRIO; > + filter_opts.set_prio[0] = $1.b1; > + filter_opts.set_prio[1] = $1.b2; > + } > +prio : PRIO NUMBER { > + if ($2 < 0 || $2 > PF_PRIO_MAX) { > + yyerror("prio must be 0 - %u", > PF_PRIO_MAX); > + YYERROR; > + } > + $$.b1 = $$.b2 = $2; > + } > + | PRIO '(' NUMBER comma NUMBER ')' { > + if ($3 < 0 || $3 > PF_PRIO_MAX || > + $5 < 0 || $5 > PF_PRIO_MAX) { > + yyerror("prio must be 0 - %u", > PF_PRIO_MAX); > + YYERROR; > + } > + $$.b1 = $3; > + $$.b2 = $5; > + } > ; > > probability : STRING { > @@ -5426,6 +5502,7 @@ lookup(char *s) > { "overload", OVERLOAD}, > { "pass", PASS}, > { "port", PORT}, > + { "prio", PRIO}, > { "priority", PRIORITY}, > { "priq", PRIQ}, > { "probability", PROBABILITY}, > > Modified: head/sbin/pfctl/pfctl_parser.c > > ============================================================================== > --- head/sbin/pfctl/pfctl_parser.c Fri Jun 17 17:34:28 2016 > (r301997) > +++ head/sbin/pfctl/pfctl_parser.c Fri Jun 17 18:21:55 2016 > (r301998) > @@ -841,6 +841,21 @@ print_rule(struct pf_rule *r, const char > } > if (r->tos) > printf(" tos 0x%2.2x", r->tos); > + if (r->prio) > + printf(" prio %u", r->prio == PF_PRIO_ZERO ? 0 : r->prio); > + if (r->scrub_flags & PFSTATE_SETMASK) { > + char *comma = ""; > + printf(" set ("); > + if (r->scrub_flags & PFSTATE_SETPRIO) { > + if (r->set_prio[0] == r->set_prio[1]) > + printf("%s prio %u", comma, > r->set_prio[0]); > + else > + printf("%s prio(%u, %u)", comma, > r->set_prio[0], > + r->set_prio[1]); > + comma = ","; > + } > + printf(" )"); > + } > if (!r->keep_state && r->action == PF_PASS && !anchor_call[0]) > printf(" no state"); > else if (r->keep_state == PF_STATE_NORMAL) > > Modified: head/share/man/man5/pf.conf.5 > > ============================================================================== > --- head/share/man/man5/pf.conf.5 Fri Jun 17 17:34:28 2016 > (r301997) > +++ head/share/man/man5/pf.conf.5 Fri Jun 17 18:21:55 2016 > (r301998) > @@ -28,7 +28,7 @@ > .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > .\" POSSIBILITY OF SUCH DAMAGE. > .\" > -.Dd July 25, 2015 > +.Dd June 9, 2016 > .Dt PF.CONF 5 > .Os > .Sh NAME > @@ -1785,6 +1785,25 @@ For example: > pass in proto tcp to port 25 queue mail > pass in proto tcp to port 22 queue(ssh_bulk, ssh_prio) > .Ed > +.Pp > +.It Cm set prio Ar priority | Pq Ar priority , priority > +Packets matching this rule will be assigned a specific queueing priority. > +Priorities are assigned as integers 0 through 7. > +If the packet is transmitted on a > +.Xr vlan 4 > +interface, the queueing priority will be written as the priority > +code point in the 802.1Q VLAN header. > +If two priorities are given, packets which have a TOS of > +.Cm lowdelay > +and TCP ACKs with no data payload will be assigned to the second one. > +.Pp > +For example: > +.Bd -literal -offset indent > +pass in proto tcp to port 25 set prio 2 > +pass in proto tcp to port 22 set prio (2, 5) > +.Ed > +.Pp > + > .It Ar tag Aq Ar string > Packets matching this rule will be tagged with the > specified string. > @@ -1845,6 +1864,9 @@ For example, the following rule will dro > .Bd -literal -offset indent > block in proto icmp probability 20% > .Ed > +.It Ar prio Aq Ar number > +Only match packets which have the given queueing priority assigned. > +.Pp > .El > .Sh ROUTING > If a packet matches a rule with a route option set, the packet filter will > @@ -2831,8 +2853,9 @@ filteropt = user | group | flags | > "max-mss" number | "random-id" | "reassemble tcp" | > fragmentation | "allow-opts" | > "label" string | "tag" string | [ ! ] "tagged" string | > + "set prio" ( number | "(" number [ [ "," ] number ] ")" > ) | > "queue" ( string | "(" string [ [ "," ] string ] ")" ) | > - "rtable" number | "probability" number"%" > + "rtable" number | "probability" number"%" | "prio" number > > nat-rule = [ "no" ] "nat" [ "pass" [ "log" [ "(" logopts ")" ] ] ] > [ "on" ifspec ] [ af ] > > Modified: head/sys/net/pfvar.h > > ============================================================================== > --- head/sys/net/pfvar.h Fri Jun 17 17:34:28 2016 (r301997) > +++ head/sys/net/pfvar.h Fri Jun 17 18:21:55 2016 (r301998) > @@ -540,7 +540,7 @@ struct pf_rule { > u_int16_t max_mss; > u_int16_t tag; > u_int16_t match_tag; > - u_int16_t spare2; /* > netgraph */ > + u_int16_t scrub_flags; > > struct pf_rule_uid uid; > struct pf_rule_gid gid; > @@ -577,6 +577,10 @@ struct pf_rule { > #define PF_FLUSH 0x01 > #define PF_FLUSH_GLOBAL 0x02 > u_int8_t flush; > +#define PF_PRIO_ZERO 0xff /* match "prio 0" packets > */ > +#define PF_PRIO_MAX 7 > + u_int8_t prio; > + u_int8_t set_prio[2]; > > struct { > struct pf_addr addr; > @@ -739,6 +743,8 @@ struct pf_state { > /* was PFSTATE_PFLOW 0x04 */ > #define PFSTATE_NOSYNC 0x08 > #define PFSTATE_ACK 0x10 > +#define PFSTATE_SETPRIO 0x0200 > +#define PFSTATE_SETMASK (PFSTATE_SETPRIO) > u_int8_t timeout; > u_int8_t sync_state; /* PFSYNC_S_x */ > > > Modified: head/sys/netpfil/pf/pf.c > > ============================================================================== > --- head/sys/netpfil/pf/pf.c Fri Jun 17 17:34:28 2016 (r301997) > +++ head/sys/netpfil/pf/pf.c Fri Jun 17 18:21:55 2016 (r301998) > @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -2445,6 +2446,45 @@ pf_send_tcp(struct mbuf *replyto, const > pf_send(pfse); > } > > +static int > +pf_ieee8021q_setpcp(struct mbuf *m, u_int8_t prio) > +{ > + struct m_tag *mtag; > + > + KASSERT(prio <= PF_PRIO_MAX, > + ("%s with invalid pcp", __func__)); > + > + mtag = m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_OUT, NULL); > + if (mtag == NULL) { > + mtag = m_tag_alloc(MTAG_8021Q, MTAG_8021Q_PCP_OUT, > + sizeof(uint8_t), M_NOWAIT); > + if (mtag == NULL) > + return (ENOMEM); > + m_tag_prepend(m, mtag); > + } > + > + *(uint8_t *)(mtag + 1) = prio; > + return (0); > +} > + > +static int > +pf_match_ieee8021q_pcp(u_int8_t prio, struct mbuf *m) > +{ > + struct m_tag *mtag; > + u_int8_t mpcp; > + > + mtag = m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_IN, NULL); > + if (mtag == NULL) > + return (0); > + > + if (prio == PF_PRIO_ZERO) > + prio = 0; > + > + mpcp = *(uint8_t *)(mtag + 1); > + > + return (mpcp == prio); > +} > + > static void > pf_send_icmp(struct mbuf *m, u_int8_t type, u_int8_t code, sa_family_t af, > struct pf_rule *r) > @@ -3317,6 +3357,9 @@ pf_test_rule(struct pf_rule **rm, struct > !pf_match_gid(r->gid.op, r->gid.gid[0], r->gid.gid[1], > pd->lookup.gid)) > r = TAILQ_NEXT(r, entries); > + else if (r->prio && > + !pf_match_ieee8021q_pcp(r->prio, m)) > + r = TAILQ_NEXT(r, entries); > else if (r->prob && > r->prob <= arc4random()) > r = TAILQ_NEXT(r, entries); > @@ -3779,6 +3822,9 @@ pf_test_fragment(struct pf_rule **rm, in > pd->proto == IPPROTO_ICMPV6) && > (r->type || r->code)) > r = TAILQ_NEXT(r, entries); > + else if (r->prio && > + !pf_match_ieee8021q_pcp(r->prio, m)) > + r = TAILQ_NEXT(r, entries); > else if (r->prob && r->prob <= > (arc4random() % (UINT_MAX - 1) + 1)) > r = TAILQ_NEXT(r, entries); > @@ -6003,6 +6049,18 @@ done: > if (r->rtableid >= 0) > M_SETFIB(m, r->rtableid); > > + if (r->scrub_flags & PFSTATE_SETPRIO) { > + if (pd.tos & IPTOS_LOWDELAY) > + pqid = 1; > + if (pf_ieee8021q_setpcp(m, r->set_prio[pqid])) { > + action = PF_DROP; > + REASON_SET(&reason, PFRES_MEMORY); > + log = 1; > + DPFPRINTF(PF_DEBUG_MISC, > + ("pf: failed to allocate 802.1q mtag\n")); > + } > + } > + > #ifdef ALTQ > if (action == PF_PASS && r->qid) { > if (pd.pf_mtag == NULL && > @@ -6176,7 +6234,7 @@ pf_test6(int dir, struct ifnet *ifp, str > struct pf_state *s = NULL; > struct pf_ruleset *ruleset = NULL; > struct pf_pdesc pd; > - int off, terminal = 0, dirndx, rh_cnt = 0; > + int off, terminal = 0, dirndx, rh_cnt = 0, > pqid = 0; > int fwdir = dir; > > M_ASSERTPKTHDR(m); > @@ -6449,6 +6507,18 @@ done: > if (r->rtableid >= 0) > M_SETFIB(m, r->rtableid); > > + if (r->scrub_flags & PFSTATE_SETPRIO) { > + if (pd.tos & IPTOS_LOWDELAY) > + pqid = 1; > + if (pf_ieee8021q_setpcp(m, r->set_prio[pqid])) { > + action = PF_DROP; > + REASON_SET(&reason, PFRES_MEMORY); > + log = 1; > + DPFPRINTF(PF_DEBUG_MISC, > + ("pf: failed to allocate 802.1q mtag\n")); > + } > + } > + > #ifdef ALTQ > if (action == PF_PASS && r->qid) { > if (pd.pf_mtag == NULL && > > Modified: head/sys/netpfil/pf/pf_ioctl.c > > ============================================================================== > --- head/sys/netpfil/pf/pf_ioctl.c Fri Jun 17 17:34:28 2016 > (r301997) > +++ head/sys/netpfil/pf/pf_ioctl.c Fri Jun 17 18:21:55 2016 > (r301998) > @@ -1242,6 +1242,10 @@ pfioctl(struct cdev *dev, u_long cmd, ca > error = ENOMEM; > if (pf_anchor_setup(rule, ruleset, pr->anchor_call)) > error = EINVAL; > + if (rule->scrub_flags & PFSTATE_SETPRIO && > + (rule->set_prio[0] > PF_PRIO_MAX || > + rule->set_prio[1] > PF_PRIO_MAX)) > + error = EINVAL; > TAILQ_FOREACH(pa, &V_pf_pabuf, entries) > if (pa->addr.type == PF_ADDR_TABLE) { > pa->addr.p.tbl = pfr_attach_table(ruleset, > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Sat Jun 18 20:20:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A32D7A78545; Sat, 18 Jun 2016 20:20:01 +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 724A016A6; Sat, 18 Jun 2016 20:20:01 +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 u5IKK0dD011440; Sat, 18 Jun 2016 20:20:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5IKK0sq011439; Sat, 18 Jun 2016 20:20:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606182020.u5IKK0sq011439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 18 Jun 2016 20:20:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302012 - 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-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2016 20:20:01 -0000 Author: kib Date: Sat Jun 18 20:20:00 2016 New Revision: 302012 URL: https://svnweb.freebsd.org/changeset/base/302012 Log: Fix gcc build. Reported andt tested by: swills Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Jun 18 13:44:10 2016 (r302011) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Jun 18 20:20:00 2016 (r302012) @@ -3795,7 +3795,7 @@ dnlc_reduce_cache(void *arg) { u_int percent; - percent = (u_int)arg; + percent = (u_int)(uintptr_t)arg; mutex_enter(&arc_dnlc_evicts_lock); if (arc_dnlc_evicts_arg == 0) { arc_dnlc_evicts_arg = percent; From owner-svn-src-head@freebsd.org Sat Jun 18 20:22:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 921EAA786E7; Sat, 18 Jun 2016 20:22:54 +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 5E8F71A8C; Sat, 18 Jun 2016 20:22: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 u5IKMrMd015093; Sat, 18 Jun 2016 20:22:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5IKMreS015092; Sat, 18 Jun 2016 20:22:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201606182022.u5IKMreS015092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 18 Jun 2016 20:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302013 - head/sys/nlm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2016 20:22:54 -0000 Author: kib Date: Sat Jun 18 20:22:53 2016 New Revision: 302013 URL: https://svnweb.freebsd.org/changeset/base/302013 Log: After the vnode unlock, mount point might be destroyed immediately, dropping the reference on mnt_cred. Prevent this by referencing the temporal credentials before unlock. Tested by: pho Reviewed by: dfr Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (gjb) Modified: head/sys/nlm/nlm_advlock.c Modified: head/sys/nlm/nlm_advlock.c ============================================================================== --- head/sys/nlm/nlm_advlock.c Sat Jun 18 20:20:00 2016 (r302012) +++ head/sys/nlm/nlm_advlock.c Sat Jun 18 20:22:53 2016 (r302013) @@ -210,7 +210,7 @@ nlm_advlock_internal(struct vnode *vp, v struct rpc_callextra ext; struct nlm_feedback_arg nf; AUTH *auth; - struct ucred *cred; + struct ucred *cred, *cred1; struct nlm_file_svid *ns; int svid; int error; @@ -240,15 +240,17 @@ nlm_advlock_internal(struct vnode *vp, v else retries = INT_MAX; - if (unlock_vp) - VOP_UNLOCK(vp, 0); - /* * We need to switch to mount-point creds so that we can send - * packets from a privileged port. + * packets from a privileged port. Reference mnt_cred and + * switch to them before unlocking the vnode, since mount + * point could be unmounted right after unlock. */ cred = td->td_ucred; td->td_ucred = vp->v_mount->mnt_cred; + crhold(td->td_ucred); + if (unlock_vp) + VOP_UNLOCK(vp, 0); host = nlm_find_host_by_name(servername, sa, vers); auth = authunix_create(cred); @@ -373,7 +375,9 @@ nlm_advlock_internal(struct vnode *vp, v if (ns) nlm_free_svid(ns); + cred1 = td->td_ucred; td->td_ucred = cred; + crfree(cred1); AUTH_DESTROY(auth); nlm_host_release(host); From owner-svn-src-head@freebsd.org Sat Jun 18 22:06:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2103DA79057; Sat, 18 Jun 2016 22:06:51 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.daemonic.se (cloud.daemonic.se [185.34.0.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8B8E1F68; Sat, 18 Jun 2016 22:06:50 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from cloud.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 3rXB6T6tlqz27LY; Sat, 18 Jun 2016 22:06:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([127.0.0.1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cloud.daemonic.se (mailscanner.daemonic.se [127.0.0.1]) (amavisd-new, port 10587) with ESMTPS id OnrL_A8Amv67; Sat, 18 Jun 2016 22:06:41 +0000 (UTC) Received: from tifa.daemonic.se (tifa.daemonic.se [IPv6:2001:470:dca9:2::5]) by mail.daemonic.se (Postfix) with ESMTPSA id 3rXB6T1R5Xz27C0; Sat, 18 Jun 2016 22:06:40 +0000 (UTC) Subject: Re: svn commit: r288291 - head/etc To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201509270403.t8R43B5Z062241@repo.freebsd.org> From: Niclas Zeising Message-ID: <2171b966-35c7-2dad-2c0f-f23061cb677a@freebsd.org> Date: Sun, 19 Jun 2016 00:06:32 +0200 User-Agent: Mutt/1.5.21 MIME-Version: 1.0 In-Reply-To: <201509270403.t8R43B5Z062241@repo.freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2016 22:06:51 -0000 On 09/27/15 06:03, Adrian Chadd wrote: > Author: adrian > Date: Sun Sep 27 04:03:11 2015 > New Revision: 288291 > URL: https://svnweb.freebsd.org/changeset/base/288291 > > Log: > Enforce consistent limits of daemons run from rc.subr: > > * Allow the user to configure the login class to use in rc.conf > by using {daemon}_login_class, which; > * Use the daemon class by default; > * .. and then use 'limits' to set the login class so it works both > via init at startup (which runs this in 'daemon' class) and via > whichever root environment (eg command line, other daemons, etc.) > > Reviewed by: dteske > Differential Revision: https://reviews.freebsd.org/D3630 > > Modified: > head/etc/rc.subr > > Modified: head/etc/rc.subr > ============================================================================== > --- head/etc/rc.subr Sun Sep 27 03:46:55 2015 (r288290) > +++ head/etc/rc.subr Sun Sep 27 04:03:11 2015 (r288291) > @@ -768,6 +768,8 @@ check_startmsgs() > # > # ${name}_prepend n Command added before ${command}. > # > +# ${name}_login_class n Login class to use, else "daemon". > +# > # ${rc_arg}_cmd n If set, use this as the method when invoked; > # Otherwise, use default command (see below) > # > @@ -942,7 +944,7 @@ run_rc_command() > _nice=\$${name}_nice _user=\$${name}_user \ > _group=\$${name}_group _groups=\$${name}_groups \ > _fib=\$${name}_fib _env=\$${name}_env \ > - _prepend=\$${name}_prepend > + _prepend=\$${name}_prepend _login_class=\${${name}_login_class:-daemon} > > if [ -n "$_user" ]; then # unset $_user if running as that user > if [ "$_user" = "$(eval $IDCMD)" ]; then > @@ -1050,6 +1052,9 @@ $command $rc_flags $command_args" > fi > fi > > + # Prepend default limits > + _doit="limits -C $_login_class $_doit" ^^^^^^^^^^ > + > # run the full command > # > if ! _run_rc_doit "$_doit"; then Apologies for waking so late. This breaks the start of scripts running before file systems are mounted, for example /etc/rc.d/ddb, if / and /usr are on separate partitions. The issue is that limits is /usr/bin/limits, and for obvious reasons can't be found before /usr is mounted. I suggest either move /usr/bin/limits to /bin/limits or avoid using it altogether. Do you want me to open a PR to track this issue? Regards! -- Niclas Zeising From owner-svn-src-head@freebsd.org Sat Jun 18 23:18:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07EE4A79EBB; Sat, 18 Jun 2016 23:18: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 CCAE41FD6; Sat, 18 Jun 2016 23:18: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 u5INI5JJ079127; Sat, 18 Jun 2016 23:18:05 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5INI5wL079126; Sat, 18 Jun 2016 23:18:05 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201606182318.u5INI5wL079126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 18 Jun 2016 23:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302014 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2016 23:18:06 -0000 Author: vangyzen Date: Sat Jun 18 23:18:04 2016 New Revision: 302014 URL: https://svnweb.freebsd.org/changeset/base/302014 Log: Fix if_ntb interface setup to include IFF_MULTICAST. This allows IPv6 link local addresses (and other IPv6 functionality) to work. PR: 210355 Submitted by: Steve Wahl and David Bright (both at Dell Inc.) Reviewed by: cem, mav Tested by: mav (on Intel hardware) Approved by: re (kib) MFC after: 5 days Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D6885 Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jun 18 20:22:53 2016 (r302013) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sat Jun 18 23:18:04 2016 (r302014) @@ -427,7 +427,7 @@ ntb_setup_interface(void) &handlers); ifp->if_init = ntb_net_init; ifp->if_softc = &net_softc; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ntb_ioctl; ifp->if_start = ntb_start; IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);